lkml.org 
[lkml]   [2004]   [Dec]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] add legacy resources to sysfs
    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
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 14:08    [W:0.024 / U:30.280 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site