1. 01 Nov, 2021 7 commits
    • Helge Deller's avatar
      parisc: Move thread_info into task struct · 2214c0e7
      Helge Deller authored
      This implements the CONFIG_THREAD_INFO_IN_TASK option.
      
      With this change:
      - before thread_info was part of the stack and located at the beginning of the stack
      - now the thread_info struct is moved and located inside the task_struct structure
      - the stack is allocated and handled like the major other platforms
      - drop the cpu field of thread_info and use instead the one in task_struct
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      Signed-off-by: default avatarSven Schnelle <svens@stackframe.org>
      2214c0e7
    • Sven Schnelle's avatar
      parisc: add support for TOC (transfer of control) · bc294838
      Sven Schnelle authored
      Almost all PA-RISC machines have either a button that
      is labeled with 'TOC' or a BMC function to trigger a TOC.
      TOC is a non-maskable interrupt that is sent to the processor.
      This can be used for diagnostic purposes like obtaining a
      stack trace/register dump or to enter KDB/KGDB.
      
      As an example, on my c8000, TOC can be used with:
      
      CONFIG_KGDB=y
      CONFIG_KGDB_KDB=y
      
      and the 'kgdboc=ttyS0,115200' appended to the command line.
      
      Press ^[( on serial console, which will enter the BMC command line,
      and enter 'TOC s':
      
      root@(none):/# (
      cli>TOC s
      Sending TOC/INIT.
      <Cpu3> 2800035d03e00000  0000000040c21ac8  CC_ERR_CHECK_TOC
      <Cpu0> 2800035d00e00000  0000000040c21ad0  CC_ERR_CHECK_TOC
      <Cpu2> 2800035d02e00000  0000000040c21ac8  CC_ERR_CHECK_TOC
      <Cpu1> 2800035d01e00000  0000000040c21ad0  CC_ERR_CHECK_TOC
      <Cpu3> 37000f7303e00000  2000000000000000  CC_ERR_CPU_CHECK_SUMMARY
      <Cpu0> 37000f7300e00000  2000000000000000  CC_ERR_CPU_CHECK_SUMMARY
      <Cpu2> 37000f7302e00000  2000000000000000  CC_ERR_CPU_CHECK_SUMMARY
      <Cpu1> 37000f7301e00000  2000000000000000  CC_ERR_CPU_CHECK_SUMMARY
      <Cpu3> 4300100803e00000  c0000000001d26cc  CC_MC_BR_TO_OS_TOC
      <Cpu0> 4300100800e00000  c0000000001d26cc  CC_MC_BR_TO_OS_TOC
      <Cpu2> 4300100802e00000  c0000000001d26cc  CC_MC_BR_TO_OS_TOC
      <Cpu1> 4300100801e00000  c0000000001d26cc  CC_MC_BR_TO_OS_TOC
      
      Entering kdb (current=0x00000000411cef80, pid 0) on processor 0 due to NonMaskable Interrupt @ 0x40c21ad0
      [0]kdb>
      Signed-off-by: default avatarSven Schnelle <svens@stackframe.org>
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      bc294838
    • Sven Schnelle's avatar
      parisc/firmware: add functions to retrieve TOC data · ecac7036
      Sven Schnelle authored
      Add functions to retrieve TOC data from firmware both
      for 1.1 and 2.0 PDC.
      Signed-off-by: default avatarSven Schnelle <svens@stackframe.org>
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      ecac7036
    • Sven Schnelle's avatar
      parisc: add PIM TOC data structures · d9e20336
      Sven Schnelle authored
      These data structures describe the TOC data we get from firmware
      when issuing a PDC_PIM_TOC request.
      Signed-off-by: default avatarSven Schnelle <svens@stackframe.org>
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      d9e20336
    • Sven Schnelle's avatar
      parisc: move virt_map macro to assembly.h · b5f73da5
      Sven Schnelle authored
      This macro will also be used by the TOC code, so move it
      into asm/assembly.h to avoid duplication.
      Signed-off-by: default avatarSven Schnelle <svens@stackframe.org>
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      b5f73da5
    • Sven Schnelle's avatar
      parisc/unwind: fix unwinder when CONFIG_64BIT is enabled · 8e0ba125
      Sven Schnelle authored
      With 64 bit kernels unwind_special() is not working because
      it compares the pc to the address of the function descriptor.
      Add a helper function that compares pc with the dereferenced
      address. This fixes all of the backtraces on my c8000. Without
      this changes, a lot of backtraces are missing in kdb or the
      show-all-tasks command from /proc/sysrq-trigger.
      Signed-off-by: default avatarSven Schnelle <svens@stackframe.org>
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      8e0ba125
    • Helge Deller's avatar
      parisc: Fix ptrace check on syscall return · 8779e05b
      Helge Deller authored
      The TIF_XXX flags are stored in the flags field in the thread_info
      struct (TI_FLAGS), not in the flags field of the task_struct structure
      (TASK_FLAGS).
      
      It seems this bug didn't generate any important side-effects, otherwise it
      wouldn't have went unnoticed for 12 years (since v2.6.32).
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      Fixes: ecd3d4bc ("parisc: stop using task->ptrace for {single,block}step flags")
      Cc: Kyle McMartin <kyle@mcmartin.ca>
      Cc: stable@vger.kernel.org
      8779e05b
  2. 30 Oct, 2021 18 commits
  3. 29 Oct, 2021 15 commits