1. 07 1月, 2014 1 次提交
  2. 07 11月, 2013 1 次提交
  3. 20 8月, 2013 1 次提交
    • Y
      x86/ioapic/kcrash: Prevent crash_kexec() from deadlocking on ioapic_lock · 17405453
      Yoshihiro YUNOMAE 提交于
      Prevent crash_kexec() from deadlocking on ioapic_lock. When
      crash_kexec() is executed on a CPU, the CPU will take ioapic_lock
      in disable_IO_APIC(). So if the cpu gets an NMI while locking
      ioapic_lock, a deadlock will happen.
      
      In this patch, ioapic_lock is zapped/initialized before disable_IO_APIC().
      
      You can reproduce this deadlock the following way:
      
      1. Add mdelay(1000) after raw_spin_lock_irqsave() in
         native_ioapic_set_affinity()@arch/x86/kernel/apic/io_apic.c
      
         Although the deadlock can occur without this modification, it will increase
         the potential of the deadlock problem.
      
      2. Build and install the kernel
      
      3. Set up the OS which will run panic() and kexec when NMI is injected
          # echo "kernel.unknown_nmi_panic=1" >> /etc/sysctl.conf
          # vim /etc/default/grub
            add "nmi_watchdog=0 crashkernel=256M" in GRUB_CMDLINE_LINUX line
          # grub2-mkconfig
      
      4. Reboot the OS
      
      5. Run following command for each vcpu on the guest
          # while true; do echo <CPU num> > /proc/irq/<IO-APIC-edge or IO-APIC-fasteoi>/smp_affinitity; done;
         By running this command, cpus will get ioapic_lock for setting affinity.
      
      6. Inject NMI (push a dump button or execute 'virsh inject-nmi <domain>' if you
         use VM). After injecting NMI, panic() is called in an nmi-handler context.
         Then, kexec will normally run in panic(), but the operation will be stopped
         by deadlock on ioapic_lock in crash_kexec()->machine_crash_shutdown()->
         native_machine_crash_shutdown()->disable_IO_APIC()->clear_IO_APIC()->
         clear_IO_APIC_pin()->ioapic_read_entry().
      Signed-off-by: NYoshihiro YUNOMAE <yoshihiro.yunomae.ez@hitachi.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Gleb Natapov <gleb@redhat.com>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Joerg Roedel <joro@8bytes.org>
      Cc: Marcelo Tosatti <mtosatti@redhat.com>
      Cc: Hidehiro Kawai <hidehiro.kawai.ez@hitachi.com>
      Cc: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
      Cc: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
      Cc: Eric W. Biederman <ebiederm@xmission.com>
      Cc: yrl.pp-manager.tt@hitachi.com
      Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: Seiji Aguchi <seiji.aguchi@hds.com>
      Link: http://lkml.kernel.org/r/20130820070107.28245.83806.stgit@yunodevelSigned-off-by: NIngo Molnar <mingo@kernel.org>
      17405453
  4. 12 12月, 2012 1 次提交
  5. 07 12月, 2012 1 次提交
  6. 10 10月, 2011 1 次提交
  7. 22 7月, 2010 1 次提交
    • C
      x86, UV: Make kdump avoid stack dumps · 5edd19af
      Cliff Wickman 提交于
      UV NMI callback's should not write stack dumps when a kdump is to be written.
      
      When invoking the crash kernel to write a dump, kdump_nmi_shootdown_cpus()
      uses NMI's to get all the cpu's to save their register context and halt.
      
      But the NMI interrupt handler runs a callback list.  This patch sets a flag
      to prevent any of those callbacks from interfering with the halt of the cpu.
      
      For UV, which currently has the only callback to which this is relevant, the
      uv_handle_nmi() callback should not do dumping of stacks.
      
      The 'in_crash_kexec' flag is defined as an extern in kdebug.h firstly
      because x2apic_uv_x.c includes it.  Secondly because some future callback
      might need the flag to know that it should not enter the debugger.
      (Such a scenario was in fact present in the 2.6.32 kernel, SuSE distribution,
       where a call to kdb needed to be avoided.)
      Signed-off-by: NCliff Wickman <cpw@sgi.com>
      LKML-Reference: <E1ObLvt-0005UZ-Va@eag09.americas.sgi.com>
      Signed-off-by: NH. Peter Anvin <hpa@linux.intel.com>
      5edd19af
  8. 07 4月, 2010 1 次提交
  9. 08 11月, 2009 1 次提交
    • F
      x86: Use x86_platform for iommu_shutdown · 338bac52
      FUJITA Tomonori 提交于
      This patch cleans up pci_iommu_shutdown() a bit to use
      x86_platform (similar to how IA64 initializes an IOMMU driver).
      
      This adds iommu_shutdown() to x86_platform to avoid calling
      every IOMMUs' shutdown functions in pci_iommu_shutdown() in
      order. The IOMMU shutdown functions are platform specific (we
      don't have multiple different IOMMU hardware) so the current way
      is pointless.
      
      An IOMMU driver sets x86_platform.iommu_shutdown to the shutdown
      function if necessary.
      Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Cc: joerg.roedel@amd.com
      LKML-Reference: <20091027163358F.fujita.tomonori@lab.ntt.co.jp>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      338bac52
  10. 15 6月, 2009 1 次提交
  11. 18 2月, 2009 2 次提交
  12. 29 1月, 2009 1 次提交
  13. 08 1月, 2009 1 次提交
  14. 31 12月, 2008 1 次提交
  15. 17 12月, 2008 1 次提交
    • M
      x86 smp: modify send_IPI_mask interface to accept cpumask_t pointers · e7986739
      Mike Travis 提交于
      Impact: cleanup, change parameter passing
      
        * Change genapic interfaces to accept cpumask_t pointers where possible.
      
        * Modify external callers to use cpumask_t pointers in function calls.
      
        * Create new send_IPI_mask_allbutself which is the same as the
          send_IPI_mask functions but removes smp_processor_id() from list.
          This removes another common need for a temporary cpumask_t variable.
      
        * Functions that used a temp cpumask_t variable for:
      
      	cpumask_t allbutme = cpu_online_map;
      
      	cpu_clear(smp_processor_id(), allbutme);
      	if (!cpus_empty(allbutme))
      		...
      
          become:
      
      	if (!cpus_equal(cpu_online_map, cpumask_of_cpu(cpu)))
      		...
      
        * Other minor code optimizations (like using cpus_clear instead of
          CPU_MASK_NONE, etc.)
      
      Applies to linux-2.6.tip/master.
      Signed-off-by: NMike Travis <travis@sgi.com>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Acked-by: NIngo Molnar <mingo@elte.hu>
      e7986739
  16. 13 11月, 2008 6 次提交
  17. 27 4月, 2008 1 次提交
  18. 17 4月, 2008 1 次提交
  19. 04 12月, 2007 1 次提交
  20. 24 10月, 2007 2 次提交
  21. 11 10月, 2007 2 次提交
  22. 09 5月, 2007 1 次提交
    • C
      move die notifier handling to common code · 1eeb66a1
      Christoph Hellwig 提交于
      This patch moves the die notifier handling to common code.  Previous
      various architectures had exactly the same code for it.  Note that the new
      code is compiled unconditionally, this should be understood as an appel to
      the other architecture maintainer to implement support for it aswell (aka
      sprinkling a notify_die or two in the proper place)
      
      arm had a notifiy_die that did something totally different, I renamed it to
      arm_notify_die as part of the patch and made it static to the file it's
      declared and used at.  avr32 used to pass slightly less information through
      this interface and I brought it into line with the other architectures.
      
      [akpm@linux-foundation.org: build fix]
      [akpm@linux-foundation.org: fix vmalloc_sync_all bustage]
      [bryan.wu@analog.com: fix vmalloc_sync_all in nommu]
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Cc: <linux-arch@vger.kernel.org>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Signed-off-by: NBryan Wu <bryan.wu@analog.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      1eeb66a1
  23. 08 12月, 2006 1 次提交
    • M
      [PATCH] Kexec / Kdump: Unify elf note code · 85916f81
      Magnus Damm 提交于
      The elf note saving code is currently duplicated over several
      architectures.  This cleanup patch simply adds code to a common file and
      then replaces the arch-specific code with calls to the newly added code.
      
      The only drawback with this approach is that s390 doesn't fully support
      kexec-on-panic which for that arch leads to introduction of unused code.
      Signed-off-by: NMagnus Damm <magnus@valinux.co.jp>
      Cc: Vivek Goyal <vgoyal@in.ibm.com>
      Cc: Andi Kleen <ak@suse.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      85916f81
  24. 01 10月, 2006 2 次提交
  25. 26 9月, 2006 2 次提交
  26. 15 7月, 2006 1 次提交
  27. 27 6月, 2006 2 次提交
    • K
      [PATCH] x86_64: Standardize i386/x86_64 handling of NMI_VECTOR · 45486f81
      Keith Owens 提交于
      x86_64 and i386 behave inconsistently when sending an IPI on vector 2
      (NMI_VECTOR).  Make both behave the same, so IPI 2 is sent as NMI.
      
      The crash code was abusing send_IPI_allbutself() by passing a code
      instead of a vector, it only worked because crash knew about the
      internal code of send_IPI_allbutself().  Change crash to use NMI_VECTOR
      instead, and remove the comment about how crash was abusing the function.
      
      This patch is a pre-requisite for fixing the problem where sending an
      IPI as NMI would reboot some Dell Xeon systems.  I cannot fix that
      problem while crash continus to abuse send_IPI_allbutself().
      
      It also removes the inconsistency between i386 and x86_64 for
      NMI_VECTOR.  That will simplify all the RAS code that needs to bring
      all the cpus to a clean stop, even when one or more cpus are spinning
      disabled.
      Signed-off-by: NKeith Owens <kaos@sgi.com>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      45486f81
    • L
      fix paniced->panicked typos · f18190bd
      Lee Revell 提交于
      In a testament to the utter simplicity and logic of the English
      language ;-), I found a single correct use - in kernel/panic.c - and
      10-15 incorrect ones.
      Signed-Off-By: NLee Revell <rlrevell@joe-job.com>
      Signed-off-by: NAdrian Bunk <bunk@stusta.de>
      f18190bd
  28. 26 6月, 2006 1 次提交
  29. 01 4月, 2006 1 次提交