1. 24 5月, 2011 1 次提交
  2. 23 5月, 2011 4 次提交
  3. 20 5月, 2011 3 次提交
    • S
      extable, core_kernel_data(): Make sure all archs define _sdata · a2d063ac
      Steven Rostedt 提交于
      A new utility function (core_kernel_data()) is used to determine if a
      passed in address is part of core kernel data or not. It may or may not
      return true for RO data, but this utility must work for RW data.
      
      Thus both _sdata and _edata must be defined and continuous,
      without .init sections that may later be freed and replaced by
      volatile memory (memory that can be freed).
      
      This utility function is used to determine if data is safe from
      ever being freed. Thus it should return true for all RW global
      data that is not in a module or has been allocated, or false
      otherwise.
      
      Also change core_kernel_data() back to the more precise _sdata condition
      and document the function.
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      Acked-by: NRalf Baechle <ralf@linux-mips.org>
      Acked-by: NHirokazu Takata <takata@linux-m32r.org>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
      Cc: Matt Turner <mattst88@gmail.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Cc: linux-m68k@lists.linux-m68k.org
      Cc: Kyle McMartin <kyle@mcmartin.ca>
      Cc: Helge Deller <deller@gmx.de>
      Cc: JamesE.J.Bottomley <jejb@parisc-linux.org>
      Link: http://lkml.kernel.org/r/1305855298.1465.19.camel@gandalf.stny.rr.comSigned-off-by: NIngo Molnar <mingo@elte.hu>
      ----
       arch/alpha/kernel/vmlinux.lds.S   |    1 +
       arch/m32r/kernel/vmlinux.lds.S    |    1 +
       arch/m68k/kernel/vmlinux-std.lds  |    2 ++
       arch/m68k/kernel/vmlinux-sun3.lds |    1 +
       arch/mips/kernel/vmlinux.lds.S    |    1 +
       arch/parisc/kernel/vmlinux.lds.S  |    3 +++
       kernel/extable.c                  |   12 +++++++++++-
       7 files changed, 20 insertions(+), 1 deletion(-)
      a2d063ac
    • I
      core_kernel_data(): Fix architectures that do not define _sdata · c5fc4721
      Ingo Molnar 提交于
      Some architectures such as Alpha do not define _sdata but _data:
      
        kernel/built-in.o: In function `core_kernel_data':
        kernel/extable.c:77: undefined reference to `_sdata'
      
      So expand the scope of the data range to the text addresses too,
      this might be more correct anyway because this way we can
      cover readonly variables as well.
      
      Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Link: http://lkml.kernel.org/n/tip-i878c8a0e0g0ep4v7i6vxnhz@git.kernel.orgSigned-off-by: NIngo Molnar <mingo@elte.hu>
      c5fc4721
    • P
      Revert "rcu: Decrease memory-barrier usage based on semi-formal proof" · 80d02085
      Paul E. McKenney 提交于
      This reverts commit e59fb312.
      
      This reversion was due to (extreme) boot-time slowdowns on SPARC seen by
      Yinghai Lu and on x86 by Ingo
      .
      This is a non-trivial reversion due to intervening commits.
      
      Conflicts:
      
      	Documentation/RCU/trace.txt
      	kernel/rcutree.c
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      80d02085
  4. 19 5月, 2011 25 次提交
  5. 18 5月, 2011 7 次提交
    • J
      irq: Export functions to allow modular irq drivers · edf76f83
      Jonathan Cameron 提交于
      Export handle_simple_irq, irq_modify_status, irq_alloc_descs,
      irq_free_descs and generic_handle_irq to allow their usage in
      modules. First user is IIO, which wants to be built modular, but needs
      to be able to create irq chips, allocate and configure interrupt
      descriptors and handle demultiplexing interrupts.
      
      [ tglx: Moved the uninlinig of generic_handle_irq to a separate patch ]
      Signed-off-by: NJonathan Cameron <jic23@cam.ac.uk>
      Link: http://lkml.kernel.org/r/%3C1305711544-505-1-git-send-email-jic23%40cam.ac.uk%3ESigned-off-by: NThomas Gleixner <tglx@linutronix.de>
      edf76f83
    • T
      genirq: Uninline and sanity check generic_handle_irq() · fe12bc2c
      Thomas Gleixner 提交于
      generic_handle_irq() is missing a NULL pointer check for the result of
      irq_to_desc. This was a not a big problem, but we want to expose it to
      drivers, so we better have sanity checks in place. Add a return value
      as well, which indicates that the irq number was valid and the handler
      was invoked.
      
      Based on the pure code move from Jonathan Cameron.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: Jonathan Cameron <jic23@cam.ac.uk>
      fe12bc2c
    • T
      genirq: Remove pointless ifdefs · fe051434
      Thomas Gleixner 提交于
      kernel/irq/ is only built when CONFIG_GENERIC_HARDIRQS=y. So making
      code inside of kernel/irq/ conditional on CONFIG_GENERIC_HARDIRQS is
      pointless.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      fe051434
    • R
      PM: Allow drivers to allocate memory from .prepare() callbacks safely · 91e7c75b
      Rafael J. Wysocki 提交于
      If device drivers allocate substantial amounts of memory (above 1 MB)
      in their hibernate .freeze() callbacks (or in their legacy suspend
      callbcks during hibernation), the subsequent creation of hibernate
      image may fail due to the lack of memory.  This is the case, because
      the drivers' .freeze() callbacks are executed after the hibernate
      memory preallocation has been carried out and the preallocated amount
      of memory may be too small to cover the new driver allocations.
      Unfortunately, the drivers' .prepare() callbacks also are executed
      after the hibernate memory preallocation has completed, so they are
      not suitable for allocating additional memory either.  Thus the only
      way a driver can safely allocate memory during hibernation is to use
      a hibernate/suspend notifier.  However, the notifiers are called
      before the freezing of user space and the drivers wanting to use them
      for allocating additional memory may not know how much memory needs
      to be allocated at that point.
      
      To let device drivers overcome this difficulty rework the hibernation
      sequence so that the memory preallocation is carried out after the
      drivers' .prepare() callbacks have been executed, so that the
      .prepare() callbacks can be used for allocating additional memory
      to be used by the drivers' .freeze() callbacks.  Update documentation
      to match the new behavior of the code.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      91e7c75b
    • R
      PM: Remove CONFIG_PM_VERBOSE · c650da23
      Rafael J. Wysocki 提交于
      Now that we have CONFIG_DYNAMIC_DEBUG there is no need for yet
      another flag causing dev_dbg() and pr_debug() statements in the
      core PM code to produce output.  Moreover, CONFIG_PM_VERBOSE
      causes so much output to be generated that it's not really useful
      and almost no one sets it.
      
      References: https://bugzilla.kernel.org/show_bug.cgi?id=23182Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      c650da23
    • R
      Revert "PM / Hibernate: Reduce autotuned default image size" · 1c1be3a9
      Rafael J. Wysocki 提交于
      This reverts commit bea3864f
      (PM / Hibernate: Reduce autotuned default image size), because users
      are now able to resolve the issue this commit was supposed to address
      in a different way (i.e. by using the new /sys/power/reserved_size
      interface).
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      1c1be3a9
    • R
      PM / Hibernate: Add sysfs knob to control size of memory for drivers · ddeb6487
      Rafael J. Wysocki 提交于
      Martin reports that on his system hibernation occasionally fails due
      to the lack of memory, because the radeon driver apparently allocates
      too much of it during the device freeze stage.  It turns out that the
      amount of memory allocated by radeon during hibernation (and
      presumably during system suspend too) depends on the utilization of
      the GPU (e.g. hibernating while there are two KDE 4 sessions with
      compositing enabled causes radeon to allocate more memory than for
      one KDE 4 session).
      
      In principle it should be possible to use image_size to make the
      memory preallocation mechanism free enough memory for the radeon
      driver, but in practice it is not easy to guess the right value
      because of the way the preallocation code uses image_size.  For this
      reason, it seems reasonable to allow users to control the amount of
      memory reserved for driver allocations made after the hibernate
      preallocation, which currently is constant and amounts to 1 MB.
      
      Introduce a new sysfs file, /sys/power/reserved_size, whose value
      will be used as the amount of memory to reserve for the
      post-preallocation reservations made by device drivers, in bytes.
      For backwards compatibility, set its default (and initial) value to
      the currently used number (1 MB).
      
      References: https://bugzilla.kernel.org/show_bug.cgi?id=34102Reported-and-tested-by: NMartin Steigerwald <Martin@Lichtvoll.de>
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      ddeb6487