1. 13 3月, 2010 3 次提交
    • C
      Add generic sys_olduname() · 5cacdb4a
      Christoph Hellwig 提交于
      Add generic implementations of the old and really old uname system calls.
      Note that sh only implements sys_olduname but not sys_oldolduname, but I'm
      not going to bother with another ifdef for that special case.
      
      m32r implemented an old uname but never wired it up, so kill it, too.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: Hirokazu Takata <takata@linux-m32r.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: "Luck, Tony" <tony.luck@intel.com>
      Cc: James Morris <jmorris@namei.org>
      Cc: Andreas Schwab <schwab@linux-m68k.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      5cacdb4a
    • C
      improve sys_newuname() for compat architectures · e28cbf22
      Christoph Hellwig 提交于
      On an architecture that supports 32-bit compat we need to override the
      reported machine in uname with the 32-bit value.  Instead of doing this
      separately in every architecture introduce a COMPAT_UTS_MACHINE define in
      <asm/compat.h> and apply it directly in sys_newuname().
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: Hirokazu Takata <takata@linux-m32r.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: "Luck, Tony" <tony.luck@intel.com>
      Cc: James Morris <jmorris@namei.org>
      Cc: Andreas Schwab <schwab@linux-m68k.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e28cbf22
    • C
      Add generic sys_ipc wrapper · baed7fc9
      Christoph Hellwig 提交于
      Add a generic implementation of the ipc demultiplexer syscall.  Except for
      s390 and sparc64 all implementations of the sys_ipc are nearly identical.
      
      There are slight differences in the types of the parameters, where mips
      and powerpc as the only 64-bit architectures with sys_ipc use unsigned
      long for the "third" argument as it gets casted to a pointer later, while
      it traditionally is an "int" like most other paramters.  frv goes even
      further and uses unsigned long for all parameters execept for "ptr" which
      is a pointer type everywhere.  The change from int to unsigned long for
      "third" and back to "int" for the others on frv should be fine due to the
      in-register calling conventions for syscalls (we already had a similar
      issue with the generic sys_ptrace), but I'd prefer to have the arch
      maintainers looks over this in details.
      
      Except for that h8300, m68k and m68knommu lack an impplementation of the
      semtimedop sub call which this patch adds, and various architectures have
      gets used - at least on i386 it seems superflous as the compat code on
      x86-64 and ia64 doesn't even bother to implement it.
      
      [akpm@linux-foundation.org: add sys_ipc to sys_ni.c]
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: Hirokazu Takata <takata@linux-m32r.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@elte.hu>
      Reviewed-by: NH. Peter Anvin <hpa@zytor.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: "Luck, Tony" <tony.luck@intel.com>
      Cc: James Morris <jmorris@namei.org>
      Cc: Andreas Schwab <schwab@linux-m68k.org>
      Acked-by: NJesper Nilsson <jesper.nilsson@axis.com>
      Acked-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      Acked-by: NDavid Howells <dhowells@redhat.com>
      Acked-by: NKyle McMartin <kyle@mcmartin.ca>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      baed7fc9
  2. 08 3月, 2010 5 次提交
  3. 07 3月, 2010 16 次提交
  4. 04 3月, 2010 5 次提交
  5. 03 3月, 2010 1 次提交
  6. 02 3月, 2010 2 次提交
    • Y
      early_res: Need to save the allocation name in drop_range_partial() · dce46a04
      Yinghai Lu 提交于
      During free_early_partial(), reserve_early_without_check() could end
      extending the early_res area from __check_and_double_early_res(); as a
      result, the location of the name for the current reservation could
      change.
      
      Therefore, we need to save a local copy of the name.
      
      [ hpa: rewrote comment and checkin description ]
      Signed-off-by: NYinghai Lu <yinghai@kernel.org>
      LKML-Reference: <4B8C7C94.7070000@kernel.org>
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      dce46a04
    • W
      resource: Fix generic page_is_ram() for partial RAM pages · 37b99dd5
      Wu Fengguang 提交于
      The System RAM walk shall skip partial RAM pages and avoid calling
      func() on them. So that page_is_ram() return 0 for a partial RAM page.
      
      In particular, it shall not call func() with len=0.
      This fixes a boot time bug reported by Sachin and root caused by Thomas:
      
      > >>> WARNING: at arch/x86/mm/ioremap.c:111 __ioremap_caller+0x169/0x2f1()
      > >>> Hardware name: BladeCenter LS21 -[79716AA]-
      > >>> Modules linked in:
      > >>> Pid: 0, comm: swapper Not tainted 2.6.33-git6-autotest #1
      > >>> Call Trace:
      > >>> [<ffffffff81047cff>] ? __ioremap_caller+0x169/0x2f1
      > >>> [<ffffffff81063b7d>] warn_slowpath_common+0x77/0xa4
      > >>> [<ffffffff81063bb9>] warn_slowpath_null+0xf/0x11
      > >>> [<ffffffff81047cff>] __ioremap_caller+0x169/0x2f1
      > >>> [<ffffffff813747a3>] ? acpi_os_map_memory+0x12/0x1b
      > >>> [<ffffffff81047f10>] ioremap_nocache+0x12/0x14
      > >>> [<ffffffff813747a3>] acpi_os_map_memory+0x12/0x1b
      > >>> [<ffffffff81282fa0>] acpi_tb_verify_table+0x29/0x5b
      > >>> [<ffffffff812827f0>] acpi_load_tables+0x39/0x15a
      > >>> [<ffffffff8191c8f8>] acpi_early_init+0x60/0xf5
      > >>> [<ffffffff818f2cad>] start_kernel+0x397/0x3a7
      > >>> [<ffffffff818f2295>] x86_64_start_reservations+0xa5/0xa9
      > >>> [<ffffffff818f237a>] x86_64_start_kernel+0xe1/0xe8
      > >>> ---[ end trace 4eaa2a86a8e2da22 ]---
      > >>> ioremap reserve_memtype failed -22
      
      The return code is -EINVAL, so it failed in the is_ram check, which is
      not too surprising
      
      > BIOS-provided physical RAM map:
      >  BIOS-e820: 0000000000000000 - 000000000009c000 (usable)
      >  BIOS-e820: 000000000009c000 - 00000000000a0000 (reserved)
      >  BIOS-e820: 00000000000e0000 - 0000000000100000 (reserved)
      >  BIOS-e820: 0000000000100000 - 00000000cffa3900 (usable)
      >  BIOS-e820: 00000000cffa3900 - 00000000cffa7400 (ACPI data)
      
      The ACPI data is not starting on a page boundary and neither does the
      usable RAM area end on a page boundary. Very useful !
      
      > ACPI: DSDT 00000000cffa3900 036CE (v01 IBM    SERLEWIS 00001000 INTL 20060912)
      
      ACPI is trying to map DSDT at cffa3900, which results in a check
      vs. cffa3000 which is the relevant page boundary. The generic is_ram
      check correctly identifies that as RAM because it's in the usable
      resource area. The old e820 based is_ram check does not take
      overlapping resource areas into account. That's why it works.
      
      CC: Sachin Sant <sachinp@in.ibm.com>
      CC: Thomas Gleixner <tglx@linutronix.de>
      CC: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Signed-off-by: NWu Fengguang <fengguang.wu@intel.com>
      LKML-Reference: <20100301135551.GA9998@localhost>
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      37b99dd5
  7. 01 3月, 2010 2 次提交
  8. 27 2月, 2010 6 次提交
    • P
      rcu: Fix accelerated GPs for last non-dynticked CPU · 71da8132
      Paul E. McKenney 提交于
      This patch disables irqs across the call to rcu_needs_cpu().  It
      also enforces a hold-off period so that the idle loop doesn't
      softirq itself to death when there are lots of RCU callbacks in
      flight on the last non-dynticked CPU.
      Signed-off-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: laijs@cn.fujitsu.com
      Cc: dipankar@in.ibm.com
      Cc: mathieu.desnoyers@polymtl.ca
      Cc: josh@joshtriplett.org
      Cc: dvhltc@us.ibm.com
      Cc: niv@us.ibm.com
      Cc: peterz@infradead.org
      Cc: rostedt@goodmis.org
      Cc: Valdis.Kletnieks@vt.edu
      Cc: dhowells@redhat.com
      LKML-Reference: <1267231138-27856-3-git-send-email-paulmck@linux.vnet.ibm.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      71da8132
    • P
      rcu: Fix accelerated grace periods for last non-dynticked CPU · a47cd880
      Paul E. McKenney 提交于
      It is invalid to invoke __rcu_process_callbacks() with irqs
      disabled, so do it indirectly via raise_softirq().  This
      requires a state-machine implementation to cycle through the
      grace-period machinery the required number of times.
      Located-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: laijs@cn.fujitsu.com
      Cc: dipankar@in.ibm.com
      Cc: mathieu.desnoyers@polymtl.ca
      Cc: josh@joshtriplett.org
      Cc: dvhltc@us.ibm.com
      Cc: niv@us.ibm.com
      Cc: peterz@infradead.org
      Cc: rostedt@goodmis.org
      Cc: Valdis.Kletnieks@vt.edu
      Cc: dhowells@redhat.com
      LKML-Reference: <1267231138-27856-1-git-send-email-paulmck@linux.vnet.ibm.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      a47cd880
    • S
      ftrace: Add function names to dangling } in function graph tracer · f1c7f517
      Steven Rostedt 提交于
      The function graph tracer is currently the most invasive tracer
      in the ftrace family. It can easily overflow the buffer even with
      10megs per CPU. This means that events can often be lost.
      
      On start up, or after events are lost, if the function return is
      recorded but the function enter was lost, all we get to see is the
      exiting '}'.
      
      Here is how a typical trace output starts:
      
       [tracing] cat trace
       # tracer: function_graph
       #
       # CPU  DURATION                  FUNCTION CALLS
       # |     |   |                     |   |   |   |
        0) + 91.897 us   |                  }
        0) ! 567.961 us  |                }
        0)   <========== |
        0) ! 579.083 us  |                _raw_spin_lock_irqsave();
        0)   4.694 us    |                _raw_spin_unlock_irqrestore();
        0) ! 594.862 us  |              }
        0) ! 603.361 us  |            }
        0) ! 613.574 us  |          }
        0) ! 623.554 us  |        }
        0)   3.653 us    |        fget_light();
        0)               |        sock_poll() {
      
      There are a series of '}' with no matching "func() {". There's no information
      to what functions these ending brackets belong to.
      
      This patch adds a stack on the per cpu structure used in outputting
      the function graph tracer to keep track of what function was outputted.
      Then on a function exit event, it checks the depth to see if the
      function exit has a matching entry event. If it does, then it only
      prints the '}', otherwise it adds the function name after the '}'.
      
      This allows function exit events to show what function they belong to
      at trace output startup, when the entry was lost due to ring buffer
      overflow, or even after a new task is scheduled in.
      
      Here is what the above trace will look like after this patch:
      
       [tracing] cat trace
       # tracer: function_graph
       #
       # CPU  DURATION                  FUNCTION CALLS
       # |     |   |                     |   |   |   |
        0) + 91.897 us   |                  } (irq_exit)
        0) ! 567.961 us  |                } (smp_apic_timer_interrupt)
        0)   <========== |
        0) ! 579.083 us  |                _raw_spin_lock_irqsave();
        0)   4.694 us    |                _raw_spin_unlock_irqrestore();
        0) ! 594.862 us  |              } (add_wait_queue)
        0) ! 603.361 us  |            } (__pollwait)
        0) ! 613.574 us  |          } (tcp_poll)
        0) ! 623.554 us  |        } (sock_poll)
        0)   3.653 us    |        fget_light();
        0)               |        sock_poll() {
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      f1c7f517
    • R
      PM / Hibernate: Fix preallocating of memory · a9c9b442
      Rafael J. Wysocki 提交于
      The hibernate memory preallocation code allocates memory to push some
      user space data out of physical RAM, so that the hibernation image is
      not too large.  It allocates more memory than necessary for creating
      the image, so it has to release some pages to make room for
      allocations made while suspending devices and disabling nonboot CPUs,
      or the system will hang due to the lack of free pages to allocate
      from.  Unfortunately, the function used for freeing these pages,
      free_unnecessary_pages(), contains a bug that prevents it from doing
      the job on all systems without highmem.
      
      Fix this problem, which is a regression from the 2.6.30 kernel, by
      using the right condition for the termination of the loop in
      free_unnecessary_pages().
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Reported-and-tested-by: NAlan Jenkins <sourcejedi.lkml@googlemail.com>
      Cc: stable@kernel.org
      a9c9b442
    • J
      PM / Hibernate: Remove swsusp.c finally · f8bb0db8
      Jiri Slaby 提交于
      Its contents and entry in Makefile were already removed in
      8e60c6a1
      (Shift remaining code from swsusp.c to hibernate.c)
      but somehow it remained in-place (rjw: which most likely was my
      mistake).
      Signed-off-by: NJiri Slaby <jslaby@suse.cz>
      Acked-by: NNigel Cunningham <nigel@tuxonice.net>
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      f8bb0db8
    • F
      PM / Hibernate: Remove trailing space in message · 07c3bb57
      Frans Pop 提交于
      Remove a trailing space from a message in swsusp_save().
      Signed-off-by: NFrans Pop <elendil@planet.nl>
      Acked-by: NPavel Machek <pavel@ucw.cz>
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      07c3bb57