Skip to content
Snippets Groups Projects
  1. Mar 27, 2017
    • Michael Neuling's avatar
      powerpc/powernv: Fix XSCOM address mangling for form 1 indirect · 517c2757
      Michael Neuling authored
      
      POWER9 adds form 1 scoms. The form of the indirection is specified in
      the top nibble of the scom address.
      
      Currently we do some (ugly) bit mangling so that we can fit a 64 bit
      scom address into the debugfs interface. The current code only shifts
      the top bit (indirect bit).
      
      This patch changes it to shift the whole top nibble so that the form
      of the indirection is also shifted.
      
      This patch is backwards compatible with older scoms.
      
      (This change isn't required in the arch/powerpc/platforms/powernv/opal-prd.c
      scom interface as it passes the whole 64bit scom address without any bit
      mangling)
      
      Signed-off-by: default avatarMichael Neuling <mikey@neuling.org>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      517c2757
    • Oliver O'Halloran's avatar
      powerpc/powernv: de-deuplicate OPAL call wrappers · c3a08e93
      Oliver O'Halloran authored
      
      Currently the code to perform an OPAL call is duplicated between the
      normal path and path taken when tracepoints are enabled. There's no
      real need for this and combining them makes opal_tracepoint_entry
      considerably easier to understand.
      
      Signed-off-by: default avatarOliver O'Halloran <oohall@gmail.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      c3a08e93
    • Guilherme G. Piccoli's avatar
      powerpc/xmon: add debugfs entry for xmon · de78ae6c
      Guilherme G. Piccoli authored
      
      Currently the xmon debugger is set only via kernel boot command-line.
      It's disabled by default, and can be enabled with "xmon=on" on the
      command-line. Also, xmon may be accessed via sysrq mechanism.
      But we cannot enable/disable xmon in runtime, it needs kernel reload.
      
      This patch introduces a debugfs entry for xmon, allowing user to query
      its current state and change it if desired. Basically, the "xmon" file
      to read from/write to is under the debugfs mount point, on powerpc
      directory. It's a simple attribute, value 0 meaning xmon is disabled
      and value 1 the opposite. Writing these states to the file will take
      immediate effect in the debugger.
      
      Signed-off-by: default avatarGuilherme G. Piccoli <gpiccoli@linux.vnet.ibm.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      de78ae6c
    • Guilherme G. Piccoli's avatar
      powerpc/xmon: drop the nobt option from xmon plus minor fixes · b561783c
      Guilherme G. Piccoli authored
      
      The xmon parameter nobt was added long time ago, by commit 26c8af5f
      ("[POWERPC] print backtrace when entering xmon"). The problem that time
      was that during a crash in a machine with USB keyboard, xmon wouldn't
      respond to commands from the keyboard, so printing the backtrace wouldn't
      be possible.
      
      Idea then was to show automatically the backtrace on xmon crash for the
      first time it's invoked (if it recovers, next time xmon won't show
      backtrace automatically). The nobt parameter was added _only_ to prevent
      this automatic trace show. Seems long time ago USB keyboards didn't work
      that well!
      
      We don't need this parameter anymore, the feature of auto showing the
      backtrace is interesting (imagine a case of auto-reboot script),
      so this patch extends the functionality, by always showing the backtrace
      automatically when xmon is invoked; it removes the nobt parameter too.
      
      Also, this patch fixes __initdata placement on xmon_early and replaces
      __initcall() with modern device_initcall() on sysrq handler.
      
      Signed-off-by: default avatarGuilherme G. Piccoli <gpiccoli@linux.vnet.ibm.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      b561783c
    • Pan Xinhui's avatar
      powerpc/xmon: Fix an unexpected xmon on/off state change · 3b5bf42b
      Pan Xinhui authored
      
      Once xmon is triggered by sysrq-x, it is enabled always afterwards even
      if it is disabled during boot. This will cause a system reset interrupt
      fail to dump. So keep xmon in its original state after exit.
      
      We have several ways to set xmon on or off.
      1) by a build config CONFIG_XMON_DEFAULT.
      2) by a boot cmdline with xmon or xmon=early or xmon=on to enable xmon
      and xmon=off to disable xmon. This value will override that in step 1.
      3) by a debugfs interface, as proposed in this patchset.
      And this value can override those in step 1 and 2.
      
      Signed-off-by: default avatarPan Xinhui <xinhui.pan@linux.vnet.ibm.com>
      Signed-off-by: default avatarGuilherme G. Piccoli <gpiccoli@linux.vnet.ibm.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      3b5bf42b
  2. Mar 21, 2017
  3. Mar 20, 2017
  4. Mar 18, 2017
  5. Mar 17, 2017
  6. Mar 16, 2017
  7. Mar 15, 2017
  8. Mar 14, 2017
    • Jiri Olsa's avatar
      x86/intel_rdt: Put group node in rdtgroup_kn_unlock · 49ec8f5b
      Jiri Olsa authored
      
      The rdtgroup_kn_unlock waits for the last user to release and put its
      node. But it's calling kernfs_put on the node which calls the
      rdtgroup_kn_unlock, which might not be the group's directory node, but
      another group's file node.
      
      This race could be easily reproduced by running 2 instances
      of following script:
      
        mount -t resctrl resctrl /sys/fs/resctrl/
        pushd /sys/fs/resctrl/
        mkdir krava
        echo "krava" > krava/schemata
        rmdir krava
        popd
        umount  /sys/fs/resctrl
      
      It triggers the slub debug error message with following command
      line config: slub_debug=,kernfs_node_cache.
      
      Call kernfs_put on the group's node to fix it.
      
      Fixes: 60cf5e10 ("x86/intel_rdt: Add mkdir to resctrl file system")
      Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
      Cc: Fenghua Yu <fenghua.yu@intel.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Shaohua Li <shli@fb.com>
      Cc: stable@vger.kernel.org
      Link: http://lkml.kernel.org/r/1489501253-20248-1-git-send-email-jolsa@kernel.org
      
      
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      49ec8f5b
    • Josh Poimboeuf's avatar
      x86/unwind: Fix last frame check for aligned function stacks · 87a6b297
      Josh Poimboeuf authored
      
      Pavel Machek reported the following warning on x86-32:
      
        WARNING: kernel stack frame pointer at f50cdf98 in swapper/2:0 has bad value   (null)
      
      The warning is caused by the unwinder not realizing that it reached the
      end of the stack, due to an unusual prologue which gcc sometimes
      generates for aligned stacks.  The prologue is based on a gcc feature
      called the Dynamic Realign Argument Pointer (DRAP).  It's almost always
      enabled for aligned stacks when -maccumulate-outgoing-args isn't set.
      
      This issue is similar to the one fixed by the following commit:
      
        8023e0e2 ("x86/unwind: Adjust last frame check for aligned function stacks")
      
      ... but that fix was specific to x86-64.
      
      Make the fix more generic to cover x86-32 as well, and also ensure that
      the return address referred to by the frame pointer is a copy of the
      original return address.
      
      Fixes: acb4608a ("x86/unwind: Create stack frames for saved syscall registers")
      Reported-by: default avatarPavel Machek <pavel@ucw.cz>
      Signed-off-by: default avatarJosh Poimboeuf <jpoimboe@redhat.com>
      Cc: stable@vger.kernel.org
      Link: http://lkml.kernel.org/r/50d4924db716c264b14f1633037385ec80bf89d2.1489465609.git.jpoimboe@redhat.com
      
      
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      87a6b297
Loading