1. 15 4月, 2006 1 次提交
  2. 28 3月, 2006 1 次提交
    • A
      [PATCH] Notifier chain update: API changes · e041c683
      Alan Stern 提交于
      The kernel's implementation of notifier chains is unsafe.  There is no
      protection against entries being added to or removed from a chain while the
      chain is in use.  The issues were discussed in this thread:
      
          http://marc.theaimsgroup.com/?l=linux-kernel&m=113018709002036&w=2
      
      We noticed that notifier chains in the kernel fall into two basic usage
      classes:
      
      	"Blocking" chains are always called from a process context
      	and the callout routines are allowed to sleep;
      
      	"Atomic" chains can be called from an atomic context and
      	the callout routines are not allowed to sleep.
      
      We decided to codify this distinction and make it part of the API.  Therefore
      this set of patches introduces three new, parallel APIs: one for blocking
      notifiers, one for atomic notifiers, and one for "raw" notifiers (which is
      really just the old API under a new name).  New kinds of data structures are
      used for the heads of the chains, and new routines are defined for
      registration, unregistration, and calling a chain.  The three APIs are
      explained in include/linux/notifier.h and their implementation is in
      kernel/sys.c.
      
      With atomic and blocking chains, the implementation guarantees that the chain
      links will not be corrupted and that chain callers will not get messed up by
      entries being added or removed.  For raw chains the implementation provides no
      guarantees at all; users of this API must provide their own protections.  (The
      idea was that situations may come up where the assumptions of the atomic and
      blocking APIs are not appropriate, so it should be possible for users to
      handle these things in their own way.)
      
      There are some limitations, which should not be too hard to live with.  For
      atomic/blocking chains, registration and unregistration must always be done in
      a process context since the chain is protected by a mutex/rwsem.  Also, a
      callout routine for a non-raw chain must not try to register or unregister
      entries on its own chain.  (This did happen in a couple of places and the code
      had to be changed to avoid it.)
      
      Since atomic chains may be called from within an NMI handler, they cannot use
      spinlocks for synchronization.  Instead we use RCU.  The overhead falls almost
      entirely in the unregister routine, which is okay since unregistration is much
      less frequent that calling a chain.
      
      Here is the list of chains that we adjusted and their classifications.  None
      of them use the raw API, so for the moment it is only a placeholder.
      
        ATOMIC CHAINS
        -------------
      arch/i386/kernel/traps.c:		i386die_chain
      arch/ia64/kernel/traps.c:		ia64die_chain
      arch/powerpc/kernel/traps.c:		powerpc_die_chain
      arch/sparc64/kernel/traps.c:		sparc64die_chain
      arch/x86_64/kernel/traps.c:		die_chain
      drivers/char/ipmi/ipmi_si_intf.c:	xaction_notifier_list
      kernel/panic.c:				panic_notifier_list
      kernel/profile.c:			task_free_notifier
      net/bluetooth/hci_core.c:		hci_notifier
      net/ipv4/netfilter/ip_conntrack_core.c:	ip_conntrack_chain
      net/ipv4/netfilter/ip_conntrack_core.c:	ip_conntrack_expect_chain
      net/ipv6/addrconf.c:			inet6addr_chain
      net/netfilter/nf_conntrack_core.c:	nf_conntrack_chain
      net/netfilter/nf_conntrack_core.c:	nf_conntrack_expect_chain
      net/netlink/af_netlink.c:		netlink_chain
      
        BLOCKING CHAINS
        ---------------
      arch/powerpc/platforms/pseries/reconfig.c:	pSeries_reconfig_chain
      arch/s390/kernel/process.c:		idle_chain
      arch/x86_64/kernel/process.c		idle_notifier
      drivers/base/memory.c:			memory_chain
      drivers/cpufreq/cpufreq.c		cpufreq_policy_notifier_list
      drivers/cpufreq/cpufreq.c		cpufreq_transition_notifier_list
      drivers/macintosh/adb.c:		adb_client_list
      drivers/macintosh/via-pmu.c		sleep_notifier_list
      drivers/macintosh/via-pmu68k.c		sleep_notifier_list
      drivers/macintosh/windfarm_core.c	wf_client_list
      drivers/usb/core/notify.c		usb_notifier_list
      drivers/video/fbmem.c			fb_notifier_list
      kernel/cpu.c				cpu_chain
      kernel/module.c				module_notify_list
      kernel/profile.c			munmap_notifier
      kernel/profile.c			task_exit_notifier
      kernel/sys.c				reboot_notifier_list
      net/core/dev.c				netdev_chain
      net/decnet/dn_dev.c:			dnaddr_chain
      net/ipv4/devinet.c:			inetaddr_chain
      
      It's possible that some of these classifications are wrong.  If they are,
      please let us know or submit a patch to fix them.  Note that any chain that
      gets called very frequently should be atomic, because the rwsem read-locking
      used for blocking chains is very likely to incur cache misses on SMP systems.
      (However, if the chain's callout routines may sleep then the chain cannot be
      atomic.)
      
      The patch set was written by Alan Stern and Chandra Seetharaman, incorporating
      material written by Keith Owens and suggestions from Paul McKenney and Andrew
      Morton.
      
      [jes@sgi.com: restructure the notifier chain initialization macros]
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NChandra Seetharaman <sekharan@us.ibm.com>
      Signed-off-by: NJes Sorensen <jes@sgi.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      e041c683
  3. 27 3月, 2006 1 次提交
  4. 23 3月, 2006 1 次提交
  5. 22 3月, 2006 1 次提交
  6. 10 3月, 2006 1 次提交
  7. 15 1月, 2006 1 次提交
    • A
      [PATCH] dell_rbu: fix Bug 5854 · 2c560840
      Abhay Salunke 提交于
      This fixes http://bugzilla.kernel.org/show_bug.cgi?id=5854
      
      Root cause:
      
      The dell_rbu driver creates entries in /sys/class/firmware/dell_rbu/ by
      calling request_firmware_nowait (without hotplug ) this function inturn
      starts a kernel thread which creates the entries in
      /sys/class/firmware/dell_rbu/loading , data and the thread waits on the
      user action to return control back to the callback fucntion of dell_rbu.
      The thread calls wait_on_completion which puts it in a D state until the
      user action happens.  If there is no user action happening the load average
      goes up as the thread D state is taken in to account.  Also after
      downloading the BIOS image the enrties go away momentarily but they are
      recreated from the callback function in dell_rbu.  This causes the thread
      to get recreated causing the load average to permenently stay around 1.
      
      Fix:
      
      The dell_rbu also creates the entry
      /sys/devices/platform/dell_rbu/image_type at driver load time.  The image
      type by default is mono if required the user can echo packet to image_type
      to make the BIOS update mechanism using packets.  Also by echoing init in
      to image_type the /sys/class/firmware/dell_rbu entries can be created.
      
      The driver code was changed to not create /sys/class/firmware/dell_rbu
      entries during load time, and also to not create the above entries from the
      callback function.  The entries are only created by echoing init to
      /sys/devices/platform/dell_rbu/image_type The user now needs to create the
      entries to download the image monolithic or packet.  This fixes the issue
      since the kernel thread only is created when ever the user is ready to
      download the BIOS image; this minimizes the life span of the kernel thread
      and the load average goes back to normal.
      
      Signed off by Abhay Salunke <abhay_salunke@dell.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      2c560840
  8. 12 1月, 2006 1 次提交
  9. 16 12月, 2005 1 次提交
  10. 23 11月, 2005 1 次提交
  11. 09 11月, 2005 1 次提交
    • O
      [PATCH] changing CONFIG_LOCALVERSION rebuilds too much, for no good reason · 733482e4
      Olaf Hering 提交于
      This patch removes almost all inclusions of linux/version.h.  The 3
      #defines are unused in most of the touched files.
      
      A few drivers use the simple KERNEL_VERSION(a,b,c) macro, which is
      unfortunatly in linux/version.h.
      
      There are also lots of #ifdef for long obsolete kernels, this was not
      touched.  In a few places, the linux/version.h include was move to where
      the LINUX_VERSION_CODE was used.
      
      quilt vi `find * -type f -name "*.[ch]"|xargs grep -El '(UTS_RELEASE|LINUX_VERSION_CODE|KERNEL_VERSION|linux/version.h)'|grep -Ev '(/(boot|coda|drm)/|~$)'`
      
      search pattern:
      /UTS_RELEASE\|LINUX_VERSION_CODE\|KERNEL_VERSION\|linux\/\(utsname\|version\).h
      Signed-off-by: NOlaf Hering <olh@suse.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      733482e4
  12. 07 11月, 2005 2 次提交
  13. 31 10月, 2005 2 次提交
  14. 30 10月, 2005 1 次提交
  15. 12 10月, 2005 1 次提交
    • A
      [PATCH] dell_rbu: changes in packet update mechanism · ad6ce87e
      Abhay Salunke 提交于
      In the current dell_rbu code ver 2.0 the packet update mechanism makes the
      user app dump every individual packet in to the driver.
      
      This adds in efficiency as every packet update makes the
      /sys/class/firmware/dell_rbu/loading and data files to disappear and reappear
      again.  Thus the user app needs to wait for the files to reappear to dump
      another packet.  This slows down the packet update tremendously in case of
      large number of packets.  I am submitting a new patch for dell_rbu which will
      change the way we do packet updates;
      
      In the new method the user app will create a new single file which has already
      packetized the rbu image and all the packets are now staged in this file.
      
      This driver also creates a new entry in
      /sys/devices/platform/dell_rbu/packet_size ; the user needs to echo the packet
      size here before downloading the packet file.
      
      The user should do the following:
      
       create one single file which has all the packets stacked together.
       echo the packet size in to /sys/devices/platform/dell_rbu/packet_size.
       echo 1 > /sys/class/firmware/dell_rbu/loading
       cat the packetfile > /sys/class/firmware/dell_rbu/data
       echo 0 > /sys/class/firmware/dell_rbu/loading
      
      The driver takes the file which came through /sys/class/firmware/dell_rbu/data
      and takes chunks of paket_size data from it and place in contiguous memory.
      
      This makes packet update process very efficient and fast.  As all the packet
      update happens in one single operation.  The user can still read back the
      downloaded file from /sys/devices/platform/dell_rbu/data.
      Signed-off-by: NAbhay Salunke <abhay_salunke@dell.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      ad6ce87e
  16. 18 9月, 2005 2 次提交
    • A
      [PATCH] dell_rbu tidy · dda8577f
      Andrew Morton 提交于
      Whitespace standardisation.
      
      Cc: Abhay Salunke <Abhay_Salunke@dell.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      dda8577f
    • A
      [PATCH] dell_rbu: enhancements and fixes · e61c0e33
      Abhay Salunke 提交于
      BUG fixes:
      
        The driver used to allocate memory with spinlock held which has been
        fixed in this patch.
      
        The driver was printing the entire buffer when it received a invalid
        entry in image_type.  The fix is to only print a warning message and not
        the buffer.
      
      Usability enhancements:
      
        It is possible that due to user error the /sys/class/firmware/dell_rbu
        entries might be missing, this can happen if the user does the following
      
      	echo 1 > /sys/class/firmware/dell_rbu/loading
      	echo 0 > /sys/class/firmware/dell_rbu/loading
      
        This will make the entries in /sys/class/firmware/ to disappear and the
        only way get them back was bby unloading and loading the driver.
      
        This patch makes the user recreate these entries by echoing init in to
        image_type.
      
      This patch has been tested with Libsmbios and Dell OpenManage.
      Signed-off-by: NAbhay Salunke <Abhay_Salunke@dell.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      e61c0e33
  17. 08 9月, 2005 2 次提交
  18. 28 7月, 2005 1 次提交
  19. 14 7月, 2005 1 次提交
  20. 29 6月, 2005 1 次提交
    • M
      [IA64-SGI] pcdp: add PCDP pci interface support · 66b7f8a3
      Mark Maule 提交于
      Resend 2 with changes per Bjorn Helgaas comments.  Changes from original:
      
      + Change globals to vga_console_iobase/vga_console_membase and make them
        unconditional.
      + Address style-related comments.
      
      Patch to extend the PCDP vga setup code to support PCI io/mem translations
      for the legacy vga ioport and ram spaces on architectures (e.g. altix) which
      need them.
      
      Summary of the changes:
      
      drivers/firmware/pcdp.c
      drivers/firmware/pcdp.h
      -----------------------
      + add declaration for the spec-defined PCI interface struct (pcdp_if_pci)
        as well as support macros.
      
      + extend setup_vga_console() to know about pcdp_if_pci and add a couple of
        globals to hold the io and mem translation offsets if present.
      
      arch/ia64/kernel/setup.c
      ------------------------
      + tweek early_console_setup() to allow multiple early console setup routines
        to be called.
      
      include/asm-ia64/vga.h
      ----------------------
      + make VGA_MAP_MEM vga_console_membase aware
      Signed-off-by: NMark Maule <maule@sgi.com>
      Signed-off-by: NTony Luck <tony.luck@intel.com>
      66b7f8a3
  21. 26 6月, 2005 1 次提交
  22. 24 6月, 2005 1 次提交
  23. 21 6月, 2005 1 次提交
  24. 01 6月, 2005 1 次提交
    • P
      [PATCH] pcdp.c build fix · 97d3a00f
      Peter Chubb 提交于
      In file included from drivers/firmware/pcdp.c:18:
      drivers/firmware/pcdp.h:48: error: field `addr' has incomplete type
      drivers/firmware/pcdp.c: In function `setup_serial_console':
      drivers/firmware/pcdp.c:27: error:  `ACPI_ADR_SPACE_SYSTEM_MEMORY' undeclared (first use in this  function)
      
      Cc: <tony.luck@intel.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      97d3a00f
  25. 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