1. 07 May, 2012 1 commit
  2. 25 Apr, 2012 4 commits
    • Li Zhong's avatar
      x86/nmi: Fix page faults by nmiaction if kmemcheck is enabled · 72b3fb24
      Li Zhong authored
      This patch tries to fix the problem of page fault exception
      caused by accessing nmiaction structure in nmi if kmemcheck
      is enabled.
      
      If kmemcheck is enabled, the memory allocated through slab are
      in pages that are marked non-present, so that some checks could
      be done in the page fault handling code ( e.g. whether the
      memory is read before written to ).
      
      As nmiaction is allocated in this way, so it resides in a
      non-present page. Then there is a page fault while the nmi code
      accessing the nmiaction structure, which would then cause a
      warning by WARN_ON_ONCE(in_nmi()) in kmemcheck_fault(), called
      by do_page_fault().
      
      This significantly simplifies the code as well, as the whole
      dynamic allocation dance goes away.
      
      v2: as Peter suggested, changed the nmiaction to use static
          storage.
      
      v3: as Peter suggested, use macro to shorten the codes. Also
          keep the original usage of register_nmi_handler, so users of
          this call doesn't need change.
      Tested-by: default avatarSeiji Aguchi <seiji.aguchi@hds.com>
      Fixes: https://lkml.org/lkml/2012/3/2/356Signed-off-by: default avatarLi Zhong <zhong@linux.vnet.ibm.com>
      [ simplified the wrappers ]
      Signed-off-by: default avatarDon Zickus <dzickus@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: thomas.mingarelli@hp.com
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Link: http://lkml.kernel.org/r/1333051877-15755-4-git-send-email-dzickus@redhat.com
      [ tidied the patch a bit ]
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      72b3fb24
    • Don Zickus's avatar
      x86/nmi: Add new NMI queues to deal with IO_CHK and SERR · 553222f3
      Don Zickus authored
      In discussions with Thomas Mingarelli about hpwdt, he explained
      to me some issues they were some when using their virtual NMI
      button to test the hpwdt driver.
      
      It turns out the virtual NMI button used on HP's machines do no
      send unknown NMIs but instead send IO_CHK NMIs.  The way the
      kernel code is written, the hpwdt driver can not register itself
      against that type of NMI and therefore can not successfully
      capture system information before panic'ing.
      
      To solve this I created two new NMI queues to allow driver to
      register against the IO_CHK and SERR NMIs.  Or in the hpwdt all
      three (if you include unknown NMIs too).
      
      The change is straightforward and just mimics what the unknown
      NMI does.
      Reported-and-tested-by: default avatarThomas Mingarelli <thomas.mingarelli@hp.com>
      Signed-off-by: default avatarDon Zickus <dzickus@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Link: http://lkml.kernel.org/r/1333051877-15755-3-git-send-email-dzickus@redhat.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      553222f3
    • Don Zickus's avatar
      watchdog, hpwdt: Remove priority option for NMI callback · 09ee1014
      Don Zickus authored
      The NMI_UNKNOWN bucket only allows for one function to register
      to it. The reason for that is because only functions which can
      not determine if the NMI belongs to them or not should register
      and would like to assume/swallow any NMI they see.
      
      As a result it doesn't make sense to let more than one function
      like this register.  In fact, letting a second function fail
      allows us to know that more than one function is going to
      swallow NMIs on the current system. This is better than silently
      being ignored.
      
      Therefore hpwdt's priority mechanism doesn't make sense any
      more.  They will be always first on the NMI_UNKNOWN queue, if
      they register.
      
      Removing this parameter cleans up the code and simplifies things
      for the next patch which changes how nmis are registered.
      Signed-off-by: default avatarDon Zickus <dzickus@redhat.com>
      Cc: Thomas Mingarelli <thomas.mingarelli@hp.com>
      Cc: Wim Van Sebroeck <wim@iguana.be>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Link: http://lkml.kernel.org/r/1333051877-15755-2-git-send-email-dzickus@redhat.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      09ee1014
    • Sasha Levin's avatar
      hung task debugging: Inject NMI when hung and going to panic · 625056b6
      Sasha Levin authored
      Send an NMI to all CPUs when a hung task is detected and the hung
      task code is configured to panic. This gives us a fairly uptodate
      snapshot of all CPUs in the system.
      
      This lets us get stack trace of all CPUs which makes life easier
      trying to debug a deadlock, and the NMI doesn't change anything
      since the next step is a kernel panic.
      Signed-off-by: default avatarSasha Levin <levinsasha928@gmail.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Link: http://lkml.kernel.org/r/1331848040-1676-1-git-send-email-levinsasha928@gmail.com
      [ extended the changelog a bit ]
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      625056b6
  3. 24 Apr, 2012 14 commits
  4. 23 Apr, 2012 20 commits
  5. 22 Apr, 2012 1 commit