public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>,
	akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: [patch 6/7] s390: ipl device.
Date: Fri, 16 Sep 2005 14:39:14 -0700	[thread overview]
Message-ID: <20050916213914.GA13807@kroah.com> (raw)
In-Reply-To: <20050916071444.GA11851@osiris.boeblingen.de.ibm.com>

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

  parent reply	other threads:[~2005-09-16 21:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-14 15:55 [patch 6/7] s390: ipl device Martin Schwidefsky
2005-09-15 17:17 ` Greg KH
2005-09-16  7:14   ` Heiko Carstens
2005-09-16  8:39     ` Martin Schwidefsky
2005-09-16 21:39     ` Greg KH [this message]
2005-09-19  8:59       ` Heiko Carstens

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050916213914.GA13807@kroah.com \
    --to=greg@kroah.com \
    --cc=akpm@osdl.org \
    --cc=heiko.carstens@de.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=schwidefsky@de.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox