1. 30 10月, 2008 1 次提交
  2. 20 10月, 2008 5 次提交
  3. 17 10月, 2008 13 次提交
  4. 12 10月, 2008 1 次提交
  5. 09 10月, 2008 1 次提交
    • T
      driver-core: use klist for class device list and implement iterator · 5a3ceb86
      Tejun Heo 提交于
      Iterating over entries using callback usually isn't too fun especially
      when the entry being iterated over can't be manipulated freely.  This
      patch converts class->p->class_devices to klist and implements class
      device iterator so that the users can freely build their own control
      structure.  The users are also free to call back into class code
      without worrying about locking.
      
      class_for_each_device() and class_find_device() are converted to use
      the new iterators, so their users don't have to worry about locking
      anymore either.
      
      Note: This depends on klist-dont-iterate-over-deleted-entries patch
      because class_intf->add/remove_dev() depends on proper synchronization
      with device removal.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: Greg Kroah-Hartman <gregkh@suse.de>
      Cc: Jens Axboe <jens.axboe@oracle.com>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      5a3ceb86
  6. 07 9月, 2008 1 次提交
    • J
      x86: check for and defend against BIOS memory corruption · 5394f80f
      Jeremy Fitzhardinge 提交于
      Some BIOSes have been observed to corrupt memory in the low 64k.  This
      change:
       - Reserves all memory which does not have to be in that area, to
         prevent it from being used as general memory by the kernel.  Things
         like the SMP trampoline are still in the memory, however.
       - Clears the reserved memory so we can observe changes to it.
       - Adds a function check_for_bios_corruption() which checks and reports on
         memory becoming unexpectedly non-zero.  Currently it's called in the
         x86 fault handler, and the powermanagement debug output.
      Signed-off-by: NJeremy Fitzhardinge <jeremy@goop.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      5394f80f
  7. 22 8月, 2008 6 次提交
  8. 29 7月, 2008 1 次提交
  9. 28 7月, 2008 1 次提交
  10. 27 7月, 2008 2 次提交
  11. 26 7月, 2008 1 次提交
  12. 25 7月, 2008 1 次提交
    • B
      memory-hotplug: add sysfs removable attribute for hotplug memory remove · 5c755e9f
      Badari Pulavarty 提交于
      Memory may be hot-removed on a per-memory-block basis, particularly on
      POWER where the SPARSEMEM section size often matches the memory-block
      size.  A user-level agent must be able to identify which sections of
      memory are likely to be removable before attempting the potentially
      expensive operation.  This patch adds a file called "removable" to the
      memory directory in sysfs to help such an agent.  In this patch, a memory
      block is considered removable if;
      
      o It contains only MOVABLE pageblocks
      o It contains only pageblocks with free pages regardless of pageblock type
      
      On the other hand, a memory block starting with a PageReserved() page will
      never be considered removable.  Without this patch, the user-agent is
      forced to choose a memory block to remove randomly.
      
      Sample output of the sysfs files:
      
      ./memory/memory0/removable: 0
      ./memory/memory1/removable: 0
      ./memory/memory2/removable: 0
      ./memory/memory3/removable: 0
      ./memory/memory4/removable: 0
      ./memory/memory5/removable: 0
      ./memory/memory6/removable: 0
      ./memory/memory7/removable: 1
      ./memory/memory8/removable: 0
      ./memory/memory9/removable: 0
      ./memory/memory10/removable: 0
      ./memory/memory11/removable: 0
      ./memory/memory12/removable: 0
      ./memory/memory13/removable: 0
      ./memory/memory14/removable: 0
      ./memory/memory15/removable: 0
      ./memory/memory16/removable: 0
      ./memory/memory17/removable: 1
      ./memory/memory18/removable: 1
      ./memory/memory19/removable: 1
      ./memory/memory20/removable: 1
      ./memory/memory21/removable: 1
      ./memory/memory22/removable: 1
      Signed-off-by: NBadari Pulavarty <pbadari@us.ibm.com>
      Signed-off-by: NMel Gorman <mel@csn.ul.ie>
      Acked-by: NKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      5c755e9f
  13. 22 7月, 2008 6 次提交
    • A
      sysdev: Add utility functions for simple int/ulong variable sysdev attributes · 9800794a
      Andi Kleen 提交于
      This adds a new sysdev_ext_attribute that stores a pointer to the variable
      it manages and some utility functions/macro to easily use them.
      
      Previously all users wrote custom macros to generate show/store
      functions for each variable, with this it is possible to avoid
      that in many cases.
      Signed-off-by: NAndi Kleen <ak@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      9800794a
    • A
      sysdev: Pass the attribute to the low level sysdev show/store function · 4a0b2b4d
      Andi Kleen 提交于
      This allow to dynamically generate attributes and share show/store
      functions between attributes. Right now most attributes are generated
      by special macros and lots of duplicated code. With the attribute
      passed it's instead possible to attach some data to the attribute
      and then use that in shared low level functions to do different things.
      
      I need this for the dynamically generated bank attributes in the x86
      machine check code, but it'll allow some further cleanups.
      
      I converted all users in tree to the new show/store prototype. It's a single
      huge patch to avoid unbisectable sections.
      
      Runtime tested: x86-32, x86-64
      Compiled only: ia64, powerpc
      Not compile tested/only grep converted: sh, arm, avr32
      Signed-off-by: NAndi Kleen <ak@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      4a0b2b4d
    • C
      driver core: Suppress sysfs warnings for device_rename(). · 36ce6dad
      Cornelia Huck 提交于
      driver core: Suppress sysfs warnings for device_rename().
      
      Renaming network devices to an already existing name is not
      something we want sysfs to print a scary warning for, since the
      callers can deal with this correctly. So let's introduce
      sysfs_create_link_nowarn() which gets rid of the common warning.
      Signed-off-by: NCornelia Huck <cornelia.huck@de.ibm.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      36ce6dad
    • A
      always enable FW_LOADER unless EMBEDDED=y · d9b19199
      Adrian Bunk 提交于
      James Bottomley recently discovered that we have
      {request,release}_firmware() dummies for the case of the actual
      functions not being available and has a fix for the bug that was
      actually causing build errors for built-in users with
      CONFIG_FW_LOADER=m.
      
      But now missing selects on FW_LOADER are no longer visible at
      compile-time at all and can become runtime problems.
      
      FW_LOADER is infrastructure with relatively small codesize we can safely
      enable for everyone, and only for people who really need small kernels
      (and can be expected to know what they are doing) it matters being able
      to disable it.
      
      This patch therefore always sets FW_LOADER=y and allows users only to
      disable it with EMBEDDED=y.
      
      As a bonus, we can then get rid of all "select FW_LOADER" plus the due
      to it required "depends on HOTPLUG" which removes some complexity from
      our Kconfig files.
      Signed-off-by: NAdrian Bunk <bunk@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      d9b19199
    • B
      sysdev: fix debugging statements in registration code. · 838ea8e8
      Ben Dooks 提交于
      The systdev_class_register() and sysdev_register() functions have
      pr_debug() statements which are enabled when the user selects the
      driver core debug. Both of these routines do not produce the
      correct output, as they make assumptions about data which has not
      been initialised.
      
      In sysdev_class_register() the code uses the kobject_name(&cls->kset.kobj)
      at the start of the function, but this is not setup until later in the
      same call. Change this to use cls->name which is passed in from the caller.
      
      The sysdev_register() function tries to get the name of the sysdev by
      kobject_name(&sysdev->kobj), but that isn't setup until later in the same
      function so change this message to use the name of the sysdev's class and
      add another message once the name is initialised.
      Signed-off-by: NBen Dooks <ben-linux@fluff.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      838ea8e8
    • G
      driver core: fix a lot of printk usages of bus_id · fc3a8828
      Greg Kroah-Hartman 提交于
      We have the dev_printk() variants for this kind of thing, use them
      instead of directly trying to access the bus_id field of struct device.
      
      This is done in order to remove bus_id entirely.
      
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      fc3a8828