Skip to content
Snippets Groups Projects
  1. Dec 21, 2013
  2. Nov 12, 2013
    • Jiri Slaby's avatar
      x86/dumpstack: Fix printk_address for direct addresses · 5f01c988
      Jiri Slaby authored
      
      Consider a kernel crash in a module, simulated the following way:
      
       static int my_init(void)
       {
               char *map = (void *)0x5;
               *map = 3;
               return 0;
       }
       module_init(my_init);
      
      When we turn off FRAME_POINTERs, the very first instruction in
      that function causes a BUG. The problem is that we print IP in
      the BUG report using %pB (from printk_address). And %pB
      decrements the pointer by one to fix printing addresses of
      functions with tail calls.
      
      This was added in commit 71f9e598 ("x86, dumpstack: Use
      %pB format specifier for stack trace") to fix the call stack
      printouts.
      
      So instead of correct output:
      
        BUG: unable to handle kernel NULL pointer dereference at 0000000000000005
        IP: [<ffffffffa01ac000>] my_init+0x0/0x10 [pb173]
      
      We get:
      
        BUG: unable to handle kernel NULL pointer dereference at 0000000000000005
        IP: [<ffffffffa0152000>] 0xffffffffa0151fff
      
      To fix that, we use %pS only for stack addresses printouts (via
      newly added printk_stack_address) and %pB for regs->ip (via
      printk_address). I.e. we revert to the old behaviour for all
      except call stacks. And since from all those reliable is 1, we
      remove that parameter from printk_address.
      
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      Cc: Namhyung Kim <namhyung@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: joe@perches.com
      Cc: jirislaby@gmail.com
      Link: http://lkml.kernel.org/r/1382706418-8435-1-git-send-email-jslaby@suse.cz
      
      
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      5f01c988
  3. Nov 11, 2013
    • Ingo Molnar's avatar
      Revert "x86/UV: Add uvtrace support" · b5dfcb09
      Ingo Molnar authored
      
      This reverts commit 8eba1842.
      
      uv_trace() is not used by anything, nor is uv_trace_nmi_func, nor
      uv_trace_func.
      
      That's not how we do instrumentation code in the kernel: we add
      tracepoints, printk()s, etc. so that everyone not just those with
      magic kernel modules can debug a system.
      
      So remove this unused (and misguied) piece of code.
      
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      Cc: Mike Travis <travis@sgi.com>
      Cc: Dimitri Sivanich <sivanich@sgi.com>
      Cc: Hedi Berriche <hedi@sgi.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
      Cc: Jason Wessel <jason.wessel@windriver.com>
      Link: http://lkml.kernel.org/n/tip-tumfBffmr4jmnt8Gyxanoblg@git.kernel.org
      b5dfcb09
  4. Nov 07, 2013
  5. Nov 02, 2013
  6. Oct 28, 2013
  7. Oct 18, 2013
  8. Oct 04, 2013
  9. Oct 03, 2013
    • Mike Travis's avatar
      x86/UV: Add call to KGDB/KDB from NMI handler · e379ea82
      Mike Travis authored
      
      This patch restores the capability to enter KDB (and KGDB) from
      the UV NMI handler.  This is needed because the UV system
      console is not capable of sending the 'break' signal to the
      serial console port.  It is also useful when the kernel is hung
      in such a way that it isn't responding to normal external I/O,
      so sending 'g' to sysreq-trigger does not work either.
      
      Another benefit of the external NMI command is that all the cpus
      receive the NMI signal at roughly the same time so they are more
      closely aligned timewise.
      
      It utilizes the newly added kgdb_nmicallin function to gain
      entry to KGDB/KDB by the master.  The slaves still enter via the
      standard kgdb_nmicallback function.  It also uses the new
      'send_ready' pointer to tell KGDB/KDB to signal the slaves when
      to proceed into the KGDB slave loop.
      
      It is enabled when the nmi action is set to "kdb" and the kernel
      is built with CONFIG_KDB enabled.  Note that if kgdb is
      connected that interface will be used instead.
      
      Signed-off-by: default avatarMike Travis <travis@sgi.com>
      Reviewed-by: default avatarDimitri Sivanich <sivanich@sgi.com>
      Reviewed-by: default avatarHedi Berriche <hedi@sgi.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
      Cc: Jason Wessel <jason.wessel@windriver.com>
      Link: http://lkml.kernel.org/r/20131002151418.089692683@asylum.americas.sgi.com
      
      
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      e379ea82
  10. Oct 01, 2013
  11. Sep 24, 2013
    • Ingo Molnar's avatar
      x86/UV: Check for alloc_cpumask_var() failures properly in uv_nmi_setup() · 8a1f4653
      Ingo Molnar authored
      GCC warned about:
      
         arch/x86/platform/uv/uv_nmi.c: In function ‘uv_nmi_setup’:
         arch/x86/platform/uv/uv_nmi.c:664:2: warning: the address of ‘uv_nmi_cpu_mask’ will always evaluate as ‘true’
      
      The reason is this code:
      
              alloc_cpumask_var(&uv_nmi_cpu_mask, GFP_KERNEL);
              BUG_ON(!uv_nmi_cpu_mask);
      
      which is not the way to check for alloc_cpumask_var() failures - its
      return code should be checked instead.
      
      Cc: Mike Travis <travis@sgi.com>
      Link: http://lkml.kernel.org/n/tip-2pXRemsjupmvonbpmmnzleo1@git.kernel.org
      
      
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      8a1f4653
    • Mike Travis's avatar
      x86/UV: Add uvtrace support · 8eba1842
      Mike Travis authored
      
      This patch adds support for the uvtrace module by providing a
      skeleton call to the registered trace function.  It also
      provides another separate 'NMI' tracer that is triggered by the
      system wide 'power nmi' command.
      
      Signed-off-by: default avatarMike Travis <travis@sgi.com>
      Reviewed-by: default avatarDimitri Sivanich <sivanich@sgi.com>
      Reviewed-by: default avatarHedi Berriche <hedi@sgi.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
      Cc: Jason Wessel <jason.wessel@windriver.com>
      Link: http://lkml.kernel.org/r/20130923212501.185052551@asylum.americas.sgi.com
      
      
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      8eba1842
    • Mike Travis's avatar
      x86/UV: Add kdump to UV NMI handler · 12ba6c99
      Mike Travis authored
      
      If a system has hung and it no longer responds to external
      events, this patch adds the capability of doing a standard kdump
      and system reboot then triggered by the system NMI command.
      
      It is enabled when the nmi action is changed to "kdump" and the
      kernel is built with CONFIG_KEXEC enabled.
      
      Signed-off-by: default avatarMike Travis <travis@sgi.com>
      Reviewed-by: default avatarDimitri Sivanich <sivanich@sgi.com>
      Reviewed-by: default avatarHedi Berriche <hedi@sgi.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
      Cc: Jason Wessel <jason.wessel@windriver.com>
      Link: http://lkml.kernel.org/r/20130923212500.660567460@asylum.americas.sgi.com
      
      
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      12ba6c99
    • Mike Travis's avatar
      x86/UV: Add summary of cpu activity to UV NMI handler · 3c121d9a
      Mike Travis authored
      
      The standard NMI handler dumps the states of all the cpus.  This
      includes a full register dump and stack trace.  This can be way
      more information than what is needed.  This patch adds a
      "summary" dump that is basically a form of the "ps" command.  It
      includes the symbolic IP address as well as the command field
      and basic process information.
      
      It is enabled when the nmi action is changed to "ips".
      
      Signed-off-by: default avatarMike Travis <travis@sgi.com>
      Reviewed-by: default avatarDimitri Sivanich <sivanich@sgi.com>
      Reviewed-by: default avatarHedi Berriche <hedi@sgi.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
      Cc: Jason Wessel <jason.wessel@windriver.com>
      Link: http://lkml.kernel.org/r/20130923212500.507922930@asylum.americas.sgi.com
      
      
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      3c121d9a
    • Mike Travis's avatar
      x86/UV: Update UV support for external NMI signals · 0d12ef0c
      Mike Travis authored
      
      The current UV NMI handler has not been updated for the changes
      in the system NMI handler and the perf operations.  The UV NMI
      handler reads an MMR in the UV Hub to check to see if the NMI
      event was caused by the external 'system NMI' that the operator
      can initiate on the System Mgmt Controller.
      
      The problem arises when the perf tools are running, causing
      millions of perf events per second on very large CPU count
      systems.  Previously this was okay because the perf NMI handler
      ran at a higher priority on the NMI call chain and if the NMI
      was a perf event, it would stop calling other NMI handlers
      remaining on the NMI call chain.
      
      Now the system NMI handler calls all the handlers on the NMI
      call chain including the UV NMI handler.  This causes the UV NMI
      handler to read the MMRs at the same millions per second rate.
      This can lead to significant performance loss and possible
      system failures.  It also can cause thousands of 'Dazed and
      Confused' messages being sent to the system console.  This
      effectively makes perf tools unusable on UV systems.
      
      To avoid this excessive overhead when perf tools are running,
      this code has been optimized to minimize reading of the MMRs as
      much as possible, by moving to the NMI_UNKNOWN notifier chain.
      This chain is called only when all the users on the standard
      NMI_LOCAL call chain have been called and none of them have
      claimed this NMI.
      
      There is an exception where the NMI_LOCAL notifier chain is
      used.  When the perf tools are in use, it's possible that the UV
      NMI was captured by some other NMI handler and then either
      ignored or mistakenly processed as a perf event.  We set a
      per_cpu ('ping') flag for those CPUs that ignored the initial
      NMI, and then send them an IPI NMI signal.  The NMI_LOCAL
      handler on each cpu does not need to read the MMR, but instead
      checks the in memory flag indicating it was pinged.  There are
      two module variables, 'ping_count' indicating how many requested
      NMI events occurred, and 'ping_misses' indicating how many stray
      NMI events.  These most likely are perf events so it shows the
      overhead of the perf NMI interrupts and how many MMR reads were avoided.
      
      This patch also minimizes the reads of the MMRs by having the
      first cpu entering the NMI handler on each node set a per HUB
      in-memory atomic value.  (Having a per HUB value avoids sending
      lock traffic over NumaLink.)  Both types of UV NMIs from the SMI
      layer are supported.
      
      Signed-off-by: default avatarMike Travis <travis@sgi.com>
      Reviewed-by: default avatarDimitri Sivanich <sivanich@sgi.com>
      Reviewed-by: default avatarHedi Berriche <hedi@sgi.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
      Cc: Jason Wessel <jason.wessel@windriver.com>
      Link: http://lkml.kernel.org/r/20130923212500.353547733@asylum.americas.sgi.com
      
      
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      0d12ef0c
    • Mike Travis's avatar
      x86/UV: Move NMI support · 1e019421
      Mike Travis authored
      
      This patch moves the UV NMI support from the x2apic file to a
      new separate uv_nmi.c file in preparation for the next sequence
      of patches. It prevents upcoming bloat of the x2apic file, and
      has the added benefit of putting the upcoming /sys/module
      parameters under the name 'uv_nmi' instead of 'x2apic_uv_x',
      which was obscure.
      
      Signed-off-by: default avatarMike Travis <travis@sgi.com>
      Reviewed-by: default avatarDimitri Sivanich <sivanich@sgi.com>
      Reviewed-by: default avatarHedi Berriche <hedi@sgi.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
      Cc: Jason Wessel <jason.wessel@windriver.com>
      Link: http://lkml.kernel.org/r/20130923212500.183295611@asylum.americas.sgi.com
      
      
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      1e019421
    • Zhang Rui's avatar
      olpc_xo15_sci: convert acpi_evaluate_object() to acpi_execute_simple_method() · b408a054
      Zhang Rui authored
      
      acpi_execute_simple_method() is a new ACPI API introduced to invoke
      an ACPI control method that has single integer parameter and no return value.
      
      Convert acpi_evaluate_object() to acpi_execute_simple_method()
      in arch/x86/platform/olpc/olpc-xo15-sci.c
      
      Signed-off-by: default avatarZhang Rui <rui.zhang@intel.com>
      CC: Daniel Drake <dsd@laptop.org>
      CC: H. Peter Anvin <hpa@linux.intel.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      b408a054
  12. Sep 18, 2013
    • Josh Boyer's avatar
      x86, efi: Don't map Boot Services on i386 · 70087011
      Josh Boyer authored
      
      Add patch to fix 32bit EFI service mapping (rhbz 726701)
      
      Multiple people are reporting hitting the following WARNING on i386,
      
        WARNING: at arch/x86/mm/ioremap.c:102 __ioremap_caller+0x3d3/0x440()
        Modules linked in:
        Pid: 0, comm: swapper Not tainted 3.9.0-rc7+ #95
        Call Trace:
         [<c102b6af>] warn_slowpath_common+0x5f/0x80
         [<c1023fb3>] ? __ioremap_caller+0x3d3/0x440
         [<c1023fb3>] ? __ioremap_caller+0x3d3/0x440
         [<c102b6ed>] warn_slowpath_null+0x1d/0x20
         [<c1023fb3>] __ioremap_caller+0x3d3/0x440
         [<c106007b>] ? get_usage_chars+0xfb/0x110
         [<c102d937>] ? vprintk_emit+0x147/0x480
         [<c1418593>] ? efi_enter_virtual_mode+0x1e4/0x3de
         [<c102406a>] ioremap_cache+0x1a/0x20
         [<c1418593>] ? efi_enter_virtual_mode+0x1e4/0x3de
         [<c1418593>] efi_enter_virtual_mode+0x1e4/0x3de
         [<c1407984>] start_kernel+0x286/0x2f4
         [<c1407535>] ? repair_env_string+0x51/0x51
         [<c1407362>] i386_start_kernel+0x12c/0x12f
      
      Due to the workaround described in commit 916f676f ("x86, efi: Retain
      boot service code until after switching to virtual mode") EFI Boot
      Service regions are mapped for a period during boot. Unfortunately, with
      the limited size of the i386 direct kernel map it's possible that some
      of the Boot Service regions will not be directly accessible, which
      causes them to be ioremap()'d, triggering the above warning as the
      regions are marked as E820_RAM in the e820 memmap.
      
      There are currently only two situations where we need to map EFI Boot
      Service regions,
      
        1. To workaround the firmware bug described in 916f676f
        2. To access the ACPI BGRT image
      
      but since we haven't seen an i386 implementation that requires either,
      this simple fix should suffice for now.
      
      [ Added to changelog - Matt ]
      
      Reported-by: default avatarBryan O'Donoghue <bryan.odonoghue.lkml@nexus-software.ie>
      Acked-by: default avatarTom Zanussi <tom.zanussi@intel.com>
      Acked-by: default avatarDarren Hart <dvhart@linux.intel.com>
      Cc: Josh Triplett <josh@joshtriplett.org>
      Cc: Matthew Garrett <mjg59@srcf.ucam.org>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarJosh Boyer <jwboyer@redhat.com>
      Signed-off-by: default avatarMatt Fleming <matt.fleming@intel.com>
      70087011
  13. Sep 05, 2013
  14. Aug 29, 2013
  15. Jul 31, 2013
  16. Jul 15, 2013
    • Paul Gortmaker's avatar
      x86: delete __cpuinit usage from all x86 files · 148f9bb8
      Paul Gortmaker authored
      The __cpuinit type of throwaway sections might have made sense
      some time ago when RAM was more constrained, but now the savings
      do not offset the cost and complications.  For example, the fix in
      commit 5e427ec2 ("x86: Fix bit corruption at CPU resume time")
      is a good example of the nasty type of bugs that can be created
      with improper use of the various __init prefixes.
      
      After a discussion on LKML[1] it was decided that cpuinit should go
      the way of devinit and be phased out.  Once all the users are gone,
      we can then finally remove the macros themselves from linux/init.h.
      
      Note that some harmless section mismatch warnings may result, since
      notify_cpu_starting() and cpu_up() are arch independent (kernel/cpu.c)
      are flagged as __cpuinit  -- so if we remove the __cpuinit from
      arch specific callers, we will also get section mismatch warnings.
      As an intermediate step, we intend to turn the linux/init.h cpuinit
      content into no-ops as early as possible, since that will get rid
      of these warnings.  In any case, they are temporary and harmless.
      
      This removes all the arch/x86 uses of the __cpuinit macros from
      all C files.  x86 only had the one __CPUINIT used in assembly files,
      and it wasn't paired off with a .previous or a __FINIT, so we can
      delete it directly w/o any corresponding additional change there.
      
      [1] https://lkml.org/lkml/2013/5/20/589
      
      
      
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: x86@kernel.org
      Acked-by: default avatarIngo Molnar <mingo@kernel.org>
      Acked-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Acked-by: default avatarH. Peter Anvin <hpa@linux.intel.com>
      Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
      148f9bb8
  17. Jul 12, 2013
  18. Jul 11, 2013
Loading