From: Greg KH <greg@kroah.com>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Jesse Barnes <jbarnes@engr.sgi.com>,
Linux Kernel list <linux-kernel@vger.kernel.org>,
linux-ia64@vger.kernel.org, willy@debian.org,
Bjorn Helgaas <bjorn.helgaas@hp.com>
Subject: Re: [PATCH] add legacy resources to sysfs
Date: Wed, 22 Dec 2004 16:09:52 +0000 [thread overview]
Message-ID: <20041222160952.GB9358@kroah.com> (raw)
In-Reply-To: <1103704739.28670.57.camel@gaston>
On Wed, Dec 22, 2004 at 09:38:59AM +0100, Benjamin Herrenschmidt wrote:
> On Tue, 2004-12-21 at 13:46 -0800, Greg KH wrote:
> > On Tue, Dec 21, 2004 at 12:47:44PM -0800, Jesse Barnes wrote:
> > > Here's a rediff against Greg's current tree. It adds legacy_io and legacy_mem
> > > files to each PCI bus directory in sysfs for use by applications that want to
> > > do old school ISA style programming from userspace.
> > >
> > > I'm not sure I've got the sysfs file creation correct, Greg? Am I passing the
> > > wrong thing around? The compile warnings in pci-sysfs.c for the new routines
> > > seem to indicate that... Basically I need to get to a pci_bus structure from
> > > the read/write/mmap routines, and that should be accessible from the kobject
> > > somewhere, right?
> >
> > You are passing the wrong things around :)
> >
> > A struct pci_bus is a struct class_device, not a struct device. I think
> > you need to rethink your goal of putting the files into the pci device
> > directory, or just put the files into the proper /sys/class/pci_bus/*
> > directory as your code assumes is happening.
>
> It makes no sense in /sys/class/pci_bus/* since we need the files to be
> in a bus _instance_
Hm, what do you mean by "instance"? My /sys/class/pci_bus has the
individual pci busses:
$ tree /sys/class/pci_bus/
/sys/class/pci_bus/
|-- 0000:00
| |-- bridge -> ../../../devices/pci0000:00
| `-- cpuaffinity
|-- 0000:01
| |-- bridge -> ../../../devices/pci0000:00/0000:00:01.0
| `-- cpuaffinity
`-- 0000:02
|-- bridge -> ../../../devices/pci0000:00/0000:00:1e.0
`-- cpuaffinity
We already have the cpuaffinity stuff in there, why not more, pci bus
specific things?
thanks,
greg k-h
WARNING: multiple messages have this Message-ID (diff)
From: Greg KH <greg@kroah.com>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Jesse Barnes <jbarnes@engr.sgi.com>,
Linux Kernel list <linux-kernel@vger.kernel.org>,
linux-ia64@vger.kernel.org, willy@debian.org,
Bjorn Helgaas <bjorn.helgaas@hp.com>
Subject: Re: [PATCH] add legacy resources to sysfs
Date: Wed, 22 Dec 2004 08:09:52 -0800 [thread overview]
Message-ID: <20041222160952.GB9358@kroah.com> (raw)
In-Reply-To: <1103704739.28670.57.camel@gaston>
On Wed, Dec 22, 2004 at 09:38:59AM +0100, Benjamin Herrenschmidt wrote:
> On Tue, 2004-12-21 at 13:46 -0800, Greg KH wrote:
> > On Tue, Dec 21, 2004 at 12:47:44PM -0800, Jesse Barnes wrote:
> > > Here's a rediff against Greg's current tree. It adds legacy_io and legacy_mem
> > > files to each PCI bus directory in sysfs for use by applications that want to
> > > do old school ISA style programming from userspace.
> > >
> > > I'm not sure I've got the sysfs file creation correct, Greg? Am I passing the
> > > wrong thing around? The compile warnings in pci-sysfs.c for the new routines
> > > seem to indicate that... Basically I need to get to a pci_bus structure from
> > > the read/write/mmap routines, and that should be accessible from the kobject
> > > somewhere, right?
> >
> > You are passing the wrong things around :)
> >
> > A struct pci_bus is a struct class_device, not a struct device. I think
> > you need to rethink your goal of putting the files into the pci device
> > directory, or just put the files into the proper /sys/class/pci_bus/*
> > directory as your code assumes is happening.
>
> It makes no sense in /sys/class/pci_bus/* since we need the files to be
> in a bus _instance_
Hm, what do you mean by "instance"? My /sys/class/pci_bus has the
individual pci busses:
$ tree /sys/class/pci_bus/
/sys/class/pci_bus/
|-- 0000:00
| |-- bridge -> ../../../devices/pci0000:00
| `-- cpuaffinity
|-- 0000:01
| |-- bridge -> ../../../devices/pci0000:00/0000:00:01.0
| `-- cpuaffinity
`-- 0000:02
|-- bridge -> ../../../devices/pci0000:00/0000:00:1e.0
`-- cpuaffinity
We already have the cpuaffinity stuff in there, why not more, pci bus
specific things?
thanks,
greg k-h
next prev parent reply other threads:[~2004-12-22 16:09 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-21 20:47 [PATCH] add legacy resources to sysfs Jesse Barnes
2004-12-21 20:47 ` Jesse Barnes
2004-12-21 21:28 ` Matthew Wilcox
2004-12-21 21:28 ` Matthew Wilcox
2004-12-21 21:44 ` Greg KH
2004-12-21 21:44 ` Greg KH
2004-12-21 21:49 ` Jesse Barnes
2004-12-21 21:49 ` Jesse Barnes
2004-12-21 21:46 ` Greg KH
2004-12-21 21:46 ` Greg KH
2004-12-21 22:05 ` Jesse Barnes
2004-12-21 22:05 ` Jesse Barnes
2004-12-21 23:42 ` Jesse Barnes
2004-12-22 0:05 ` Greg KH
2004-12-22 0:14 ` Jesse Barnes
2004-12-22 0:20 ` Greg KH
2004-12-22 8:38 ` Benjamin Herrenschmidt
2004-12-22 8:38 ` Benjamin Herrenschmidt
2004-12-22 16:09 ` Greg KH [this message]
2004-12-22 16:09 ` Greg KH
2004-12-22 16:34 ` Benjamin Herrenschmidt
2004-12-22 16:34 ` Benjamin Herrenschmidt
2004-12-22 16:58 ` Jesse Barnes
2004-12-22 16:58 ` Jesse Barnes
2004-12-22 18:31 ` Jesse Barnes
2004-12-22 18:31 ` Jesse Barnes
2004-12-22 21:07 ` Greg KH
2004-12-22 21:07 ` Greg KH
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=20041222160952.GB9358@kroah.com \
--to=greg@kroah.com \
--cc=benh@kernel.crashing.org \
--cc=bjorn.helgaas@hp.com \
--cc=jbarnes@engr.sgi.com \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.