1. 18 4月, 2013 3 次提交
  2. 28 2月, 2013 6 次提交
  3. 30 1月, 2013 1 次提交
    • Y
      x86: Add Crash kernel low reservation · 0212f915
      Yinghai Lu 提交于
      During kdump kernel's booting stage, it need to find low ram for
      swiotlb buffer when system does not support intel iommu/dmar remapping.
      
      kexed-tools is appending memmap=exactmap and range from /proc/iomem
      with "Crash kernel", and that range is above 4G for 64bit after boot
      protocol 2.12.
      
      We need to add another range in /proc/iomem like "Crash kernel low",
      so kexec-tools could find that info and append to kdump kernel
      command line.
      
      Try to reserve some under 4G if the normal "Crash kernel" is above 4G.
      
      User could specify the size with crashkernel_low=XX[KMG].
      
      -v2: fix warning that is found by Fengguang's test robot.
      -v3: move out get_mem_size change to another patch, to solve compiling
           warning that is found by Borislav Petkov <bp@alien8.de>
      -v4: user must specify crashkernel_low if system does not support
           intel or amd iommu.
      Signed-off-by: NYinghai Lu <yinghai@kernel.org>
      Link: http://lkml.kernel.org/r/1359058816-7615-31-git-send-email-yinghai@kernel.org
      Cc: Eric Biederman <ebiederm@xmission.com>
      Cc: Rob Landley <rob@landley.net>
      Signed-off-by: NH. Peter Anvin <hpa@linux.intel.com>
      0212f915
  4. 06 10月, 2012 1 次提交
  5. 31 7月, 2012 1 次提交
  6. 29 3月, 2012 3 次提交
  7. 30 1月, 2012 1 次提交
    • R
      PM / Sleep: Introduce "late suspend" and "early resume" of devices · cf579dfb
      Rafael J. Wysocki 提交于
      The current device suspend/resume phases during system-wide power
      transitions appear to be insufficient for some platforms that want
      to use the same callback routines for saving device states and
      related operations during runtime suspend/resume as well as during
      system suspend/resume.  In principle, they could point their
      .suspend_noirq() and .resume_noirq() to the same callback routines
      as their .runtime_suspend() and .runtime_resume(), respectively,
      but at least some of them require device interrupts to be enabled
      while the code in those routines is running.
      
      It also makes sense to have device suspend-resume callbacks that will
      be executed with runtime PM disabled and with device interrupts
      enabled in case someone needs to run some special code in that
      context during system-wide power transitions.
      
      Apart from this, .suspend_noirq() and .resume_noirq() were introduced
      as a workaround for drivers using shared interrupts and failing to
      prevent their interrupt handlers from accessing suspended hardware.
      It appears to be better not to use them for other porposes, or we may
      have to deal with some serious confusion (which seems to be happening
      already).
      
      For the above reasons, introduce new device suspend/resume phases,
      "late suspend" and "early resume" (and analogously for hibernation)
      whose callback will be executed with runtime PM disabled and with
      device interrupts enabled and whose callback pointers generally may
      point to runtime suspend/resume routines.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Reviewed-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      Reviewed-by: NKevin Hilman <khilman@ti.com>
      cf579dfb
  8. 13 1月, 2012 3 次提交
    • M
      kdump: crashk_res init check for /sys/kernel/kexec_crash_size · bec013c4
      Michael Holzheu 提交于
      Currently it is possible to set the crash_size via the sysfs
      /sys/kernel/kexec_crash_size even if no crash kernel memory has been
      defined with the "crashkernel" parameter.  In this case "crashk_res" is
      not initialized and crashk_res.start = crashk_res.end = 0.  Unfortunately
      resource_size(&crashk_res) returns 1 in this case.  This breaks the s390
      implementation of crash_(un)map_reserved_pages().
      
      To fix the problem the correct "old_size" is now calculated in
      crash_shrink_memory().  "old_size is set to "0" if crashk_res is not
      initialized.  With this change crash_shrink_memory() will do nothing, when
      "crashk_res" is not initialized.  It will return "0" for "echo 0 >
      /sys/kernel/kexec_crash_size" and -EINVAL for "echo [not zero] >
      /sys/kernel/kexec_crash_size".
      
      In addition to that this patch also simplifies the "ret = -EINVAL" vs.
      "ret = 0" logic as suggested by Simon Horman.
      Signed-off-by: NMichael Holzheu <holzheu@linux.vnet.ibm.com>
      Reviewed-by: NDave Young <dyoung@redhat.com>
      Reviewed-by: NWANG Cong <xiyou.wangcong@gmail.com>
      Reviewed-by: NSimon Horman <horms@verge.net.au>
      Cc: Vivek Goyal <vgoyal@redhat.com>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      bec013c4
    • M
      kdump: add missing RAM resource in crash_shrink_memory() · 6480e5a0
      Michael Holzheu 提交于
      When shrinking crashkernel memory using /sys/kernel/kexec_crash_size for
      the newly added memory no RAM resource is created at the moment.
      
      Example:
      
        $ cat /proc/iomem
        00000000-bfffffff : System RAM
          00000000-005b7ac3 : Kernel code
          005b7ac4-009743bf : Kernel data
          009bb000-00a85c33 : Kernel bss
        c0000000-cfffffff : Crash kernel
        d0000000-ffffffff : System RAM
      
        $ echo 0 > /sys/kernel/kexec_crash_size
        $ cat /proc/iomem
        00000000-bfffffff : System RAM
          00000000-005b7ac3 : Kernel code
          005b7ac4-009743bf : Kernel data
          009bb000-00a85c33 : Kernel bss
                                         <<-- here is System RAM missing
        d0000000-ffffffff : System RAM
      
      One result of this bug is that the memory chunk can never be set offline
      using memory hotplug.  With this patch I insert a new "System RAM"
      resource for the released memory.  Then the upper example looks like the
      following:
      
        $ echo 0 > /sys/kernel/kexec_crash_size
        $ cat /proc/iomem
        00000000-bfffffff : System RAM
          00000000-005b7ac3 : Kernel code
          005b7ac4-009743bf : Kernel data
          009bb000-00a85c33 : Kernel bss
        c0000000-cfffffff : System RAM   <<-- new rescoure
        d0000000-ffffffff : System RAM
      
      And now I can set chunk c0000000-cfffffff offline.
      Signed-off-by: NMichael Holzheu <holzheu@linux.vnet.ibm.com>
      Cc: Vivek Goyal <vgoyal@redhat.com>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      6480e5a0
    • W
      kexec: remove KMSG_DUMP_KEXEC · a3dd3323
      WANG Cong 提交于
      KMSG_DUMP_KEXEC is useless because we already save kernel messages inside
      /proc/vmcore, and it is unsafe to allow modules to do other stuffs in a
      crash dump scenario.
      
      [akpm@linux-foundation.org: fix powerpc build]
      Signed-off-by: NWANG Cong <xiyou.wangcong@gmail.com>
      Reported-by: NVivek Goyal <vgoyal@redhat.com>
      Acked-by: NVivek Goyal <vgoyal@redhat.com>
      Acked-by: NJarod Wilson <jarod@redhat.com>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a3dd3323
  9. 09 12月, 2011 1 次提交
  10. 30 10月, 2011 3 次提交
    • M
      [S390] kdump: Add infrastructure for unmapping crashkernel memory · 558df720
      Michael Holzheu 提交于
      This patch introduces a mechanism that allows architecture backends to
      remove page tables for the crashkernel memory. This can protect the loaded
      kdump kernel from being overwritten by broken kernel code.  Two new
      functions crash_map_reserved_pages() and crash_unmap_reserved_pages() are
      added that can be implemented by architecture code.  The
      crash_map_reserved_pages() function is called before and
      crash_unmap_reserved_pages() after the crashkernel segments are loaded.  The
      functions are also called in crash_shrink_memory() to create/remove page
      tables when the crashkernel memory size is reduced.
      
      To support architectures that have large pages this patch also introduces
      a new define KEXEC_CRASH_MEM_ALIGN. The crashkernel start and size must
      always be aligned with KEXEC_CRASH_MEM_ALIGN.
      
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Acked-by: NVivek Goyal <vgoyal@redhat.com>
      Signed-off-by: NMichael Holzheu <holzheu@linux.vnet.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      558df720
    • M
      [S390] kdump: Initialize vmcoreinfo note at startup · fa8ff292
      Michael Holzheu 提交于
      Currently the vmcoreinfo note is only initialized in case of kdump. On s390
      it is possible to create kernel dumps with other dump mechanisms than kdump
      (e.g. via hypervisor dump or stand-alone dump tools). For those dumps it
      would also be desirable to include the vmcoreinfo data. To accomplish this,
      with this patch the vmcoreinfo ELF note is always initialized, not only in
      case of a (kdump) crash. On s390 we will add an ABI defined pointer at
      a well known address to vmcoreinfo so that dump analysis tools are able to
      find this information.
      
      In particular on s390 we have a tool named zgetdump. With this tool it is
      possible to convert dump formats on the fly using fuse. E.g. you can mount a
      s390 stand-alone dump as ELF dump. When this is done, the tool finds the
      vmcoreinfo in the stand-alone dump via the well known ABI defined address and
      it creates the respective VMCOREINFO ELF note in the output ELF dump. This then
      can be used e.g. by makedumpfile for dump filtering.  No more need for a
      vmlinux file with debug information.
      
      So this will look like the following:
      $ zgetdump --mount standalone.dump -f elf /mnt
      $ ls /mnt
        dump.elf
      $ readelf -n /mnt/dump.elf
      $ ...
        VMCOREINFO            0x00000474      Unknown note type: (0x00000000)
      $ makedumpfile -c -d 31 /mnt/dump.elf dump.kdump
      
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Acked-by: NVivek Goyal <vgoyal@redhat.com>
      Signed-off-by: NMichael Holzheu <holzheu@linux.vnet.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      fa8ff292
    • M
      [S390] kdump: Add KEXEC_CRASH_CONTROL_MEMORY_LIMIT · 3d214fae
      Michael Holzheu 提交于
      On s390 there is a different KEXEC_CONTROL_MEMORY_LIMIT for the normal and
      the kdump kexec case. Therefore this patch introduces a new macro
      KEXEC_CRASH_CONTROL_MEMORY_LIMIT. This is set to
      KEXEC_CONTROL_MEMORY_LIMIT for all architectures that do not define
      KEXEC_CRASH_CONTROL_MEMORY_LIMIT.
      Acked-by: NVivek Goyal <vgoyal@redhat.com>
      Acked-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NMichael Holzheu <holzheu@linux.vnet.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      3d214fae
  11. 10 6月, 2011 1 次提交
  12. 12 5月, 2011 1 次提交
  13. 20 4月, 2011 1 次提交
  14. 01 4月, 2011 1 次提交
  15. 31 3月, 2011 1 次提交
  16. 02 11月, 2010 1 次提交
  17. 27 10月, 2010 1 次提交
  18. 11 8月, 2010 1 次提交
  19. 30 6月, 2010 1 次提交
  20. 12 5月, 2010 1 次提交
  21. 17 2月, 2010 1 次提交
  22. 01 1月, 2010 1 次提交
  23. 16 12月, 2009 1 次提交
  24. 12 12月, 2009 1 次提交
  25. 30 7月, 2009 1 次提交
  26. 13 6月, 2009 2 次提交
    • A
      PM core: rename suspend and resume functions · d1616302
      Alan Stern 提交于
      This patch (as1241) renames a bunch of functions in the PM core.
      Rather than go through a boring list of name changes, suffice it to
      say that in the end we have a bunch of pairs of functions:
      
      	device_resume_noirq	dpm_resume_noirq
      	device_resume		dpm_resume
      	device_complete		dpm_complete
      	device_suspend_noirq	dpm_suspend_noirq
      	device_suspend		dpm_suspend
      	device_prepare		dpm_prepare
      
      in which device_X does the X operation on a single device and dpm_X
      invokes device_X for all devices in the dpm_list.
      
      In addition, the old dpm_power_up and device_resume_noirq have been
      combined into a single function (dpm_resume_noirq).
      
      Lastly, dpm_suspend_start and dpm_resume_end are the renamed versions
      of the former top-level device_suspend and device_resume routines.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Acked-by: NMagnus Damm <damm@igel.co.jp>
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      d1616302
    • M
      PM: Rename device_power_down/up() · e39a71ef
      Magnus Damm 提交于
      Rename the functions performing "_noirq" dev_pm_ops
      operations from device_power_down() and device_power_up()
      to device_suspend_noirq() and device_resume_noirq().
      
      The new function names are chosen to show that the functions
      are responsible for calling the _noirq() versions to finalize
      the suspend/resume operation. The current function names do
      not perform power down/up anymore so the names may be misleading.
      
      Global function renames:
      - device_power_down() -> device_suspend_noirq()
      - device_power_up() -> device_resume_noirq()
      
      Static function renames:
      - suspend_device_noirq() -> __device_suspend_noirq()
      - resume_device_noirq() -> __device_resume_noirq()
      Signed-off-by: NMagnus Damm <damm@igel.co.jp>
      Acked-by: NGreg Kroah-Hartman <gregkh@suse.de>
      Acked-by: NLen Brown <lenb@kernel.org>
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      e39a71ef