1. 22 6月, 2006 1 次提交
    • D
      [IA64] esi-support · 2ab561a1
      David Mosberger-Tang 提交于
      Add support for making ESI calls [1].  ESI stands for "Extensible SAL
      specification" and is basically a way for invoking firmware
      subroutines which are identified by a GUID.  I don't know whether ESI
      is used by vendors other than HP (if you do, please let me know) but
      as firmware "backdoors" go, this seems one of the cleaner methods, so
      it seems reasonable to support it, even though I'm not aware of any
      publicly documented ESI calls.  I'd have liked to make the ESI module
      completely stand-alone, but unfortunately that is not easily (or not
      at all) possible because in order to make ESI calls in physical mode,
      a small stub similar to the EFI stub is needed in the kernel proper.
      I did try to create a stub that would work in user-level, but it
      quickly got ugly beyond recognition (e.g., the stub had to make
      assumptions about how the module-loader generated call-stubs work) and
      I didn't even get it to work (that's probably fixable, but I didn't
      bother because I concluded it was too ugly anyhow).  While it's not
      terribly elegant to have kernel code which isn't actively used in the
      kernel proper, I think it might be worth making an exception here for
      two reasons: the code is trivially small (all that's really needed is
      esi_stub.S) and by including it in the normal kernel distro, it might
      encourage other OEMs to also use ESI, which I think would be far
      better than each inventing their own firmware "backdoor".
      
      The code was originally written by Alex.  I just massaged and packaged
      it a bit (and perhaps messed up some things along the way...).
      
      Changes since first version of patch that was posted to mailing list:
      * Export ia64_esi_call and ia64_esi_call_phys() as GPL symbols.
      * Disallow building esi.c as a module for now.  Building as a module
        would currently lead to an unresolved reference to "sal_lock" on SMP kernels
        because that symbol doesn't get exported.
      * Export esi_call_phys() only if ESI is enabled.
      * Remove internal stuff from esi.h and add a "proc_type" argument to
        ia64_esi_call() such that serialization-requirements can be expressed (ESI
        follows SAL here, where procedure calls may have to be serialized, are
        MP-safe, or MP-safe andr reentrant).
      
      [1] h21007.www2.hp.com/dspp/tech/tech_TechDocumentDetailPage_IDX/1,1701,919,00.html
      Signed-off-by: NDavid Mosberger <David.Mosberger@acm.org>
      Signed-off-by: NAlex Williamson <alex.williamson@hp.com>
      Signed-off-by: NTony Luck <tony.luck@intel.com>
      2ab561a1
  2. 17 5月, 2006 2 次提交
  3. 01 5月, 2006 1 次提交
  4. 28 4月, 2006 1 次提交
  5. 26 4月, 2006 2 次提交
  6. 21 4月, 2006 1 次提交
  7. 20 4月, 2006 1 次提交
  8. 15 4月, 2006 1 次提交
  9. 14 4月, 2006 1 次提交
  10. 11 4月, 2006 1 次提交
    • J
      [PATCH] splice: add support for sys_tee() · 70524490
      Jens Axboe 提交于
      Basically an in-kernel implementation of tee, which uses splice and the
      pipe buffers as an intelligent way to pass data around by reference.
      
      Where the user space tee consumes the input and produces a stdout and
      file output, this syscall merely duplicates the data inside a pipe to
      another pipe. No data is copied, the output just grabs a reference to the
      input pipe data.
      Signed-off-by: NJens Axboe <axboe@suse.de>
      70524490
  11. 08 4月, 2006 2 次提交
  12. 07 4月, 2006 3 次提交
  13. 05 4月, 2006 1 次提交
  14. 01 4月, 2006 1 次提交
  15. 31 3月, 2006 3 次提交
    • Z
      [IA64] Export cpu cache info by sysfs · f1918005
      Zhang, Yanmin 提交于
      The patch exports 8 attributes of cpu cache info under
      /sys/devices/system/cpu/cpuX/cache/indexX:
      1) level
      2) type
      3) coherency_line_size
      4) ways_of_associativity
      5) size
      6) shared_cpu_map
      7) attributes
      8) number_of_sets: number_of_sets=size/ways_of_associativity/coherency_line_size.
      Signed-off-by: NZhang Yanmin <yanmin.zhang@intel.com>
      Signed-off-by: NTony Luck <tony.luck@intel.com>
      f1918005
    • J
      [PATCH] Introduce sys_splice() system call · 5274f052
      Jens Axboe 提交于
      This adds support for the sys_splice system call. Using a pipe as a
      transport, it can connect to files or sockets (latter as output only).
      
      From the splice.c comments:
      
         "splice": joining two ropes together by interweaving their strands.
      
         This is the "extended pipe" functionality, where a pipe is used as
         an arbitrary in-memory buffer. Think of a pipe as a small kernel
         buffer that you can use to transfer data from one end to the other.
      
         The traditional unix read/write is extended with a "splice()" operation
         that transfers data buffers to or from a pipe buffer.
      
         Named by Larry McVoy, original implementation from Linus, extended by
         Jens to support splicing to files and fixing the initial implementation
         bugs.
      Signed-off-by: NJens Axboe <axboe@suse.de>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      5274f052
    • J
      [IA64] Add __mca_table to the DISCARD list in gate.lds · 3283a67d
      Jes Sorensen 提交于
      Add __mca_table to the DISCARD list for the gate.lds linker script to
      avoid broken linker references when linking the final vmlinux file.
      
      Also add comment to include/asm-ia64/asmmacros.h to avoid anyone else
      hitting this problem in the future.
      
      Credits to James Bottomley <James.Bottomley@SteelEye.com> for spotting
      the DISCARD list in gate.lds.S
      Signed-off-by: NJes Sorensen <jes@sgi.com>
      Signed-off-by: NTony Luck <tony.luck@intel.com>
      3283a67d
  16. 30 3月, 2006 1 次提交
  17. 29 3月, 2006 2 次提交
  18. 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
  19. 27 3月, 2006 7 次提交
  20. 25 3月, 2006 4 次提交
    • F
      [IA64] New IA64 core/thread detection patch · 4129a953
      Fenghua Yu 提交于
      IPF SDM 2.2 changes definition of PAL_LOGICAL_TO_PHYSICAL to add
      proc_number=-1 to get core/thread mapping info on the running processer.
      
      Based on this change, we had better to update existing core/thread
      detection in IA64 kernel correspondingly. The attached patch implements
      this change. It simplifies detection code and eliminates potential race
      condition. It also runs a bit faster and has better scalability especially
      when cores and threads number grows up in one package.
      Signed-off-by: NFenghua Yu <fenghua.yu@intel.com>
      Signed-off-by: NTony Luck <tony.luck@intel.com>
      4129a953
    • J
      [IA64] Increase max node count on SN platforms · a9de9835
      Jack Steiner 提交于
      Node number are kept in the cpu_to_node_map which is
      currently defined as u8. Change to u16 to accomodate
      larger node numbers.
      Signed-off-by: NJack Steiner <steiner@sgi.com>
      Signed-off-by: NTony Luck <tony.luck@intel.com>
      a9de9835
    • J
      [IA64] Increase max node count on SN platforms · 3ad5ef8b
      Jack Steiner 提交于
      Add support in IA64 acpi for platforms that support more than
      256 nodes. Currently, ACPI is limited to 256 nodes because the
      proximity domain number is 8-bits.
      
      Long term, we expect to use ACPI3.0 to support >256 nodes.
      This patch is an interim solution that works with platforms
      that pass the  high order bits of the proximity domain in
      "reserved" fields of the ACPI tables. This code is enabled
      ONLY on SN platforms.
      Signed-off-by: NJack Steiner <steiner@sgi.com>
      Signed-off-by: NTony Luck <tony.luck@intel.com>
      3ad5ef8b
    • R
      [IA64] MCA recovery: kernel context recovery table · d2a28ad9
      Russ Anderson 提交于
      Memory errors encountered by user applications may surface
      when the CPU is running in kernel context.  The current code
      will not attempt recovery if the MCA surfaces in kernel
      context (privilage mode 0).  This patch adds a check for cases
      where the user initiated the load that surfaces in kernel
      interrupt code.
      
      An example is a user process lauching a load from memory
      and the data in memory had bad ECC.  Before the bad data
      gets to the CPU register, and interrupt comes in.  The
      code jumps to the IVT interrupt entry point and begins
      execution in kernel context.  The process of saving the
      user registers (SAVE_REST) causes the bad data to be loaded
      into a CPU register, triggering the MCA.  The MCA surfaces in
      kernel context, even though the load was initiated from
      user context.
      
      As suggested by David and Tony, this patch uses an exception
      table like approach, puting the tagged recovery addresses in
      a searchable table.  One difference from the exception table
      is that MCAs do not surface in precise places (such as with
      a TLB miss), so instead of tagging specific instructions,
      address ranges are registers.  A single macro is used to do
      the tagging, with the input parameter being the label
      of the starting address and the macro being the ending
      address.  This limits clutter in the code.
      
      This patch only tags one spot, the interrupt ivt entry.
      Testing showed that spot to be a "heavy hitter" with
      MCAs surfacing while saving user registers.  Other spots
      can be added as needed by adding a single macro.
      
      Signed-off-by: Russ Anderson (rja@sgi.com)
      Signed-off-by: NTony Luck <tony.luck@intel.com>
      d2a28ad9
  21. 24 3月, 2006 2 次提交
  22. 23 3月, 2006 1 次提交