Re: [patch 6/7] s390: ipl device.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Sep 16, 2005 at 09:14:44AM +0200, Heiko Carstens wrote:
> > > Export the ipl device settings to userspace via the sysfs:
> > >  * /sys/kernel/ipl_device
> > What?  Why that location?  Why not in the proper location for your
> > device, on your bus?
> 
> This interface tells from where the kernel was booted from.

Then why not use /sys/firmware/ipl/ ?  That matches the
/sys/firmware/edd usage we currently have on x86 boxes.

> > > +static ssize_t
> > > +ipl_device_show(struct subsystem *subsys, char *page)
> > > +{
> > > +	struct ipl_parameter_block *ipl = IPL_PARMBLOCK_START;
> > > +
> > > +	if (!IPL_DEVNO_VALID)
> > > +		goto type_unknown;
> > > +	if (!IPL_PARMBLOCK_VALID)
> > > +		goto type_ccw;
> > > +	if (ipl->hdr.header.version > IPL_MAX_SUPPORTED_VERSION)
> > > +		goto type_unknown;
> > > +	if (ipl->fcp.pbt != IPL_TYPE_FCP)
> > > +		goto type_unknown;
> > > +
> > > +	return sprintf(page, "fcp 0.0.%04x,0x%016llx,0x%016llx\n",
> > > +		       ipl->fcp.devno,
> > > +		       (unsigned long long) ipl->fcp.wwpn,
> > > +		       (unsigned long long) ipl->fcp.lun);
> > > + type_unknown:
> > > +	return sprintf(page, "unknown\n");
> > > + type_ccw:
> > > +	return sprintf(page, "ccw 0.0.%04x\n",ipl_devno);
> > 
> > That doesn't look like a "single value" from a single file there.  Can't
> > you break that up into individual files, based on what exactly is
> > present at the time?
> 
> Sure, so I would end up with quite a few files:

That's fine to have.

> always a file which tells the type of ipl e.g. ipl_type and dependent
> on that additionally:
> - in case of ccw ipl:
>    just the bus_id of the ipl device (e.g. ipl_bus_id).
> - in case of fcp ipl:
>    the bus_id, the wwpn and the fcp_lun all exported via different files.
> 
> Does that sound reasonable?

Yes.

thanks,

greg k-h
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux