1. 29 11月, 2007 1 次提交
  2. 17 7月, 2007 1 次提交
    • A
      Remove capability.h from mm.h · aa0ac365
      Alexey Dobriyan 提交于
      I forgot to remove capability.h from mm.h while removing sched.h!  This
      patch remedies that, because the only inline function which was using
      CAP_something was made out of line.
      
      Cross-compile tested without regressions on:
      
      	all powerpc defconfigs
      	all mips defconfigs
      	all m68k defconfigs
      	all arm defconfigs
      	all ia64 defconfigs
      
      	alpha alpha-allnoconfig alpha-defconfig alpha-up
      	arm
      	i386 i386-allnoconfig i386-defconfig i386-up
      	ia64 ia64-allnoconfig ia64-defconfig ia64-up
      	m68k
      	mips
      	parisc parisc-allnoconfig parisc-defconfig parisc-up
      	powerpc powerpc-up
      	s390 s390-allnoconfig s390-defconfig s390-up
      	sparc sparc-allnoconfig sparc-defconfig sparc-up
      	sparc64 sparc64-allnoconfig sparc64-defconfig sparc64-up
      	um-x86_64
      	x86_64 x86_64-allnoconfig x86_64-defconfig x86_64-up
      
      as well as my two usual configs.
      Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      aa0ac365
  3. 12 7月, 2007 4 次提交
    • Z
      sysfs: add parameter "struct bin_attribute *" in .read/.write methods for sysfs binary attributes · 91a69029
      Zhang Rui 提交于
      Well, first of all, I don't want to change so many files either.
      
      What I do:
      Adding a new parameter "struct bin_attribute *" in the
      .read/.write methods for the sysfs binary attributes.
      
      In fact, only the four lines change in fs/sysfs/bin.c and
      include/linux/sysfs.h do the real work.
      But I have to update all the files that use binary attributes
      to make them compatible with the new .read and .write methods.
      I'm not sure if I missed any. :(
      
      Why I do this:
      For a sysfs attribute, we can get a pointer pointing to the
      struct attribute in the .show/.store method,
      while we can't do this for the binary attributes.
      I don't know why this is different, but this does make it not
      so handy to use the binary attributes as the regular ones.
      So I think this patch is reasonable. :)
      
      Who benefits from it:
      The patch that exposes ACPI tables in sysfs
      requires such an improvement.
      All the table binary attributes share the same .read method.
      Parameter "struct bin_attribute *" is used to get
      the table signature and instance number which are used to
      distinguish different ACPI table binary attributes.
      
      Without this parameter, we need to offer different .read methods
      for different ACPI table binary attributes.
      This is impossible as there are various ACPI tables on different
      platforms, and we don't know what they are until they are loaded.
      Signed-off-by: NZhang Rui <rui.zhang@intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      91a69029
    • T
      sysfs: kill unnecessary attribute->owner · 7b595756
      Tejun Heo 提交于
      sysfs is now completely out of driver/module lifetime game.  After
      deletion, a sysfs node doesn't access anything outside sysfs proper,
      so there's no reason to hold onto the attribute owners.  Note that
      often the wrong modules were accounted for as owners leading to
      accessing removed modules.
      
      This patch kills now unnecessary attribute->owner.  Note that with
      this change, userland holding a sysfs node does not prevent the
      backing module from being unloaded.
      
      For more info regarding lifetime rule cleanup, please read the
      following message.
      
        http://article.gmane.org/gmane.linux.kernel/510293
      
      (tweaked by Greg to not delete the field just yet, to make it easier to
      merge things properly.)
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      7b595756
    • M
      PCI: Make pcibios_add_platform_entries() return errors · a2cd52ca
      Michael Ellerman 提交于
      Currently pcibios_add_platform_entries() returns void, but could fail,
      so instead have it return an int and propagate errors up to
      pci_create_sysfs_dev_files().
      
      Fixes:
      arch/powerpc/kernel/pci_64.c: In function 'pcibios_add_platform_entries':
      arch/powerpc/kernel/pci_64.c:878: warning: ignoring return value of
      	'device_create_file', declared with attribute warn_unused_result
      arch/powerpc/kernel/pci_32.c: In function 'pcibios_add_platform_entries':
        arch/powerpc/kernel/pci_32.c:1043: warning: ignoring return value of
      	'device_create_file', declared with attribute warn_unused_result
      Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
      a2cd52ca
    • M
      PCI: Use a weak symbol for the empty version of pcibios_add_platform_entries() · 575e3348
      Michael Ellerman 提交于
      I'm not sure if this is going to fly, weak symbols work on the compilers I'm
      using, but whether they work for all of the affected architectures I can't say.
      I've cc'ed as many arch maintainers/lists as I could find.
      
      But assuming they do, we can use a weak empty definition of
      pcibios_add_platform_entries() to avoid having an empty definition on every
      arch.
      Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
      575e3348
  4. 03 5月, 2007 2 次提交
  5. 17 2月, 2007 1 次提交
  6. 02 12月, 2006 1 次提交
    • I
      PCI: switch pci_{enable,disable}_device() to be nestable · bae94d02
      Inaky Perez-Gonzalez 提交于
      Changes the pci_{enable,disable}_device() functions to work in a
      nested basis, so that eg, three calls to enable_device() require three
      calls to disable_device().
      
      The reason for this is to simplify PCI drivers for
      multi-interface/capability devices. These are devices that cram more
      than one interface in a single function. A relevant example of that is
      the Wireless [USB] Host Controller Interface (similar to EHCI) [see
      http://www.intel.com/technology/comms/wusb/whci.htm]. 
      
      In these kind of devices, multiple interfaces are accessed through a
      single bar and IRQ line. For that, the drivers map only the smallest
      area of the bar to access their register banks and use shared IRQ
      handlers. 
      
      However, because the order at which those drivers load cannot be known
      ahead of time, the sequence in which the calls to pci_enable_device()
      and pci_disable_device() cannot be predicted. Thus:
      
      1. driverA     starts     pci_enable_device()
      2. driverB     starts     pci_enable_device()
      3. driverA     shutdown   pci_disable_device()
      4. driverB     shutdown   pci_disable_device()
      
      between steps 3 and 4, driver B would loose access to it's device,
      even if it didn't intend to.
      
      By using this modification, the device won't be disabled until all the
      callers to enable() have called disable().
      
      This is implemented by replacing 'struct pci_dev->is_enabled' from a
      bitfield to an atomic use count. Each caller to enable increments it,
      each caller to disable decrements it. When the count increments from 0
      to 1, __pci_enable_device() is called to actually enable the
      device. When it drops to zero, pci_disable_device() actually does the
      disabling.
      
      We keep the backend __pci_enable_device() for pci_default_resume() to
      use and also change the sysfs method implementation, so that userspace
      enabling/disabling the device doesn't disable it one time too much.
      Signed-off-by: NInaky Perez-Gonzalez <inaky@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      bae94d02
  7. 13 11月, 2006 1 次提交
    • D
      [PATCH] pci: don't try to remove sysfs files before they are setup. · d67afe5e
      David Miller 提交于
      The PCI sysfs attributes are created after the initial PCI bus scan.  With
      the addition of more return value checking and assertions in the device and
      sysfs layers we now can get dumps like this on sparc64:
      
      [   20.135032] Call Trace:
      [   20.135042]  [0000000000537f88] pci_remove_bus_device+0x30/0xc0
      [   20.135076]  [000000000078f890] pci_fill_in_pbm_cookies+0x98/0x440
      [   20.135109]  [000000000042e828] sabre_scan_bus+0x230/0x400
      [   20.135139]  [000000000078c710] pcibios_init+0x58/0xa0
      [   20.135159]  [0000000000416f14] init+0x9c/0x2e0
      [   20.135190]  [0000000000417a50] kernel_thread+0x38/0x60
      [   20.135211]  [0000000000417170] rest_init+0x18/0x40
      [   20.135514] PCI0(PBMB): Bus running at 33MHz
      
      It's triggering because removal of the "config" PCI sysfs file for the
      device fails.
      
      On sparc64, after probing the device, we'll delete the PCI device via
      pci_remove_bus_device() if we cannot find the firmware device tree node
      corresponding to it.
      
      This is fine, but at this point the sysfs files for the PCI device won't be
      setup yet.
      
      So we should not try to do anything in pci_remove_sysfs_dev_files() if
      pci_sysfs_init() has not run yet.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      Acked-by: NGreg Kroah-Hartman <gregkh@suse.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      d67afe5e
  8. 27 9月, 2006 2 次提交
  9. 01 7月, 2006 1 次提交
  10. 28 6月, 2006 1 次提交
  11. 22 6月, 2006 2 次提交
    • D
      [PATCH] PCI: Bus Parity Status sysfs interface · bdee9d98
      Doug Thompson 提交于
      From: Doug Thompson <norsk5@yahoo.com>
      
      This patch adds the 'broken_parity_status' sysfs attribute file to a PCI device.
      Reading this attribute a userland program can determine if PCI device provides false
      positives (value of 1) in its generation of PCI Parity status, or not (value of 0).
      As PCI devices are found to be 'bad' in this regard, userland programs can also set
      the appropriate value (root access only) of a faulty device. This per device
      information will be used in the EDAC PCI Parity scanner code in a future patch once
      this interface becomes available.
      Signed-off-by: NDoug Thompson <norsk5@yahoo.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      bdee9d98
    • A
      [PATCH] PCI: Add a "enable" sysfs attribute to the pci devices to allow... · 9f125d30
      Arjan van de Ven 提交于
      [PATCH] PCI: Add a "enable" sysfs attribute to the pci devices to allow userspace (Xorg) to enable devices without doing foul direct access
      
      This patch adds an "enable" sysfs attribute to each PCI device. When read it
      shows the "enabled-ness" of the device, but you can write a "0" into it to
      disable a device, and a "1" to enable it.
      
      This later is needed for X and other cases where userspace wants to enable
      the BARs on a device (typical example: to run the video bios on a secundary
      head). Right now X does all this "by hand" via bitbanging, that's just evil.
      This allows X to no longer do that but to just let the kernel do this.
      Signed-off-by: NArjan van de Ven <arjan@linux.intel.com>
      CC: Peter Jones <pjones@redhat.com>
      Acked-by: NDave Airlie <airlied@linux.ie>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      9f125d30
  12. 24 3月, 2006 1 次提交
  13. 29 10月, 2005 1 次提交
    • B
      [PATCH] PCI: Block config access during BIST · e04b0ea2
      Brian King 提交于
      Some PCI adapters (eg.  ipr scsi adapters) have an exposure today in that they
      issue BIST to the adapter to reset the card.  If, during the time it takes to
      complete BIST, userspace attempts to access PCI config space, the host bus
      bridge will master abort the access since the ipr adapter does not respond on
      the PCI bus for a brief period of time when running BIST.  On PPC64 hardware,
      this master abort results in the host PCI bridge isolating that PCI device
      from the rest of the system, making the device unusable until Linux is
      rebooted.  This patch is an attempt to close that exposure by introducing some
      blocking code in the PCI code.  When blocked, writes will be humored and reads
      will return the cached value.  Ben Herrenschmidt has also mentioned that he
      plans to use this in PPC power management.
      Signed-off-by: NBrian King <brking@us.ibm.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
       drivers/pci/access.c    |   89 ++++++++++++++++++++++++++++++++++++++++++++++++
       drivers/pci/pci-sysfs.c |   20 +++++-----
       drivers/pci/pci.h       |    7 +++
       drivers/pci/proc.c      |   28 +++++++--------
       drivers/pci/syscall.c   |   14 +++----
       include/linux/pci.h     |    7 +++
       6 files changed, 134 insertions(+), 31 deletions(-)
      e04b0ea2
  14. 22 9月, 2005 1 次提交
  15. 11 9月, 2005 1 次提交
  16. 28 6月, 2005 1 次提交
    • M
      [PATCH] PCI: fix-pci-mmap-on-ppc-and-ppc64.patch · 2311b1f2
      Michael Ellerman 提交于
      This is an updated version of Ben's fix-pci-mmap-on-ppc-and-ppc64.patch
      which is in 2.6.12-rc4-mm1.
      
      It fixes the patch to work on PPC iSeries, removes some debug printks
      at Ben's request, and incorporates your
      fix-pci-mmap-on-ppc-and-ppc64-fix.patch also.
      
      Originally from Benjamin Herrenschmidt <benh@kernel.crashing.org>
      
      This patch was discussed at length on linux-pci and so far, the last
      iteration of it didn't raise any comment.  It's effect is a nop on
      architecture that don't define the new pci_resource_to_user() callback
      anyway.  It allows architecture like ppc who put weird things inside of
      PCI resource structures to convert to some different value for user
      visible ones.  It also fixes mmap'ing of IO space on those archs.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      2311b1f2
  17. 21 6月, 2005 3 次提交
  18. 18 5月, 2005 1 次提交
  19. 04 5月, 2005 1 次提交
  20. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4