From: Greg KH <greg@kroah.com>
To: Jesse Barnes <jbarnes@engr.sgi.com>
Cc: linux-pci@atrey.karlin.mff.cuni.cz, linux-kernel@vger.kernel.org,
Bjorn Helgaas <bjorn.helgaas@hp.com>,
willy@debian.org, benh@kernel.crashing.org
Subject: Re: [PATCH] add PCI API to sysfs
Date: Mon, 20 Dec 2004 14:58:17 -0800 [thread overview]
Message-ID: <20041220225817.GA21404@kroah.com> (raw)
In-Reply-To: <200412201450.47952.jbarnes@engr.sgi.com>
On Mon, Dec 20, 2004 at 02:50:46PM -0800, Jesse Barnes wrote:
> Ok, how does this one look? It needs some obvious work, but is the approach
> of adding functionality to sysfs instead of /proc the right way to go? What
> I've done:
>
> o add mmap support to bin files in sysfs
> o make PCI resources available via mmap
> o make legacy I/O and memory space available in sysfs
How about splitting this up into the different patches that each do one
thing?
That way finding stuff like the following is easier:
> ===== fs/sysfs/bin.c 1.19 vs edited =====
> --- 1.19/fs/sysfs/bin.c 2004-11-01 12:46:46 -08:00
> +++ edited/fs/sysfs/bin.c 2004-12-20 11:07:58 -08:00
> @@ -92,6 +92,15 @@
> return count;
> }
>
> +static int mmap(struct file *file, struct vm_area_struct *vma)
> +{
> + struct dentry *dentry = file->f_dentry;
> + struct bin_attribute *attr = to_bin_attr(dentry);
> + struct kobject *kobj = to_kobj(dentry->d_parent);
> +
> + return attr->mmap(kobj, attr, vma);
> +}
> +
What happens if mmap is not set? oops...
also CC: to the sysfs and pci maintainer will jog his memory that he
should be looking at these types of patches :)
thanks,
greg k-h
next prev parent reply other threads:[~2004-12-20 23:04 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-20 22:50 [PATCH] add PCI API to sysfs Jesse Barnes
2004-12-20 22:58 ` Greg KH [this message]
2004-12-20 23:01 ` Jesse Barnes
2004-12-21 7:12 ` Benjamin Herrenschmidt
2004-12-21 12:31 ` Matthew Wilcox
2004-12-21 16:13 ` Benjamin Herrenschmidt
2004-12-21 17:05 ` Greg KH
2004-12-21 17:20 ` Jesse Barnes
2004-12-21 7:10 ` Benjamin Herrenschmidt
2004-12-21 16:22 ` Jesse Barnes
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=20041220225817.GA21404@kroah.com \
--to=greg@kroah.com \
--cc=benh@kernel.crashing.org \
--cc=bjorn.helgaas@hp.com \
--cc=jbarnes@engr.sgi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@atrey.karlin.mff.cuni.cz \
--cc=willy@debian.org \
/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