1. 29 8月, 2017 1 次提交
  2. 03 10月, 2015 1 次提交
    • P
      MIPS: Fix octeon FP context switch handling · 0fa24340
      Paul Burton 提交于
      Commit 1a3d5957 ("MIPS: Tidy up FPU context switching") removed FP
      context saving from the asm-written resume function in favour of reusing
      existing code to perform the same task. However it only removed the FP
      context saving code from the r4k_switch.S implementation of resume.
      Octeon uses its own implementation in octeon_switch.S, so remove FP
      context saving there too in order to prevent attempting to save context
      twice. That formerly led to an exception from the second save as follows
      because the FPU had already been disabled by the first save:
      
          do_cpu invoked from kernel context![#1]:
          CPU: 0 PID: 2 Comm: kthreadd Not tainted 4.3.0-rc2-dirty #2
          task: 800000041f84a008 ti: 800000041f864000 task.ti: 800000041f864000
          $ 0   : 0000000000000000 0000000010008ce1 0000000000100000 ffffffffbfffffff
          $ 4   : 800000041f84a008 800000041f84ac08 800000041f84c000 0000000000000004
          $ 8   : 0000000000000001 0000000000000000 0000000000000000 0000000000000001
          $12   : 0000000010008ce3 0000000000119c60 0000000000000036 800000041f864000
          $16   : 800000041f84ac08 800000000792ce80 800000041f84a008 ffffffff81758b00
          $20   : 0000000000000000 ffffffff8175ae50 0000000000000000 ffffffff8176c740
          $24   : 0000000000000006 ffffffff81170300
          $28   : 800000041f864000 800000041f867d90 0000000000000000 ffffffff815f3fa0
          Hi    : 0000000000fa8257
          Lo    : ffffffffe15cfc00
          epc   : ffffffff8112821c resume+0x9c/0x200
          ra    : ffffffff815f3fa0 __schedule+0x3f0/0x7d8
          Status: 10008ce2        KX SX UX KERNEL EXL
          Cause : 1080002c (ExcCode 0b)
          PrId  : 000d0601 (Cavium Octeon+)
          Modules linked in:
          Process kthreadd (pid: 2, threadinfo=800000041f864000, task=800000041f84a008, tls=0000000000000000)
          Stack : ffffffff81604218 ffffffff815f7e08 800000041f84a008 ffffffff811681b0
                    800000041f84a008 ffffffff817e9878 0000000000000000 ffffffff81770000
                    ffffffff81768340 ffffffff81161398 0000000000000001 0000000000000000
                    0000000000000000 ffffffff815f4424 0000000000000000 ffffffff81161d68
                    ffffffff81161be8 0000000000000000 0000000000000000 0000000000000000
                    0000000000000000 0000000000000000 0000000000000000 ffffffff8111e16c
                    0000000000000000 0000000000000000 0000000000000000 0000000000000000
                    0000000000000000 0000000000000000 0000000000000000 0000000000000000
                    0000000000000000 0000000000000000 0000000000000000 0000000000000000
                    0000000000000000 0000000000000000 0000000000000000 0000000000000000
                    ...
          Call Trace:
          [<ffffffff8112821c>] resume+0x9c/0x200
          [<ffffffff815f3fa0>] __schedule+0x3f0/0x7d8
          [<ffffffff815f4424>] schedule+0x34/0x98
          [<ffffffff81161d68>] kthreadd+0x180/0x198
          [<ffffffff8111e16c>] ret_from_kernel_thread+0x14/0x1c
      
      Tested using cavium_octeon_defconfig on an EdgeRouter Lite.
      
      Fixes: 1a3d5957 ("MIPS: Tidy up FPU context switching")
      Reported-by: NAaro Koskinen <aaro.koskinen@nokia.com>
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: Aleksey Makarov <aleksey.makarov@auriga.com>
      Cc: linux-kernel@vger.kernel.org
      Cc: Chandrakala Chavva <cchavva@caviumnetworks.com>
      Cc: David Daney <david.daney@cavium.com>
      Cc: Leonid Rosenboim <lrosenboim@caviumnetworks.com>
      Patchwork: https://patchwork.linux-mips.org/patch/11166/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      0fa24340
  3. 20 2月, 2015 5 次提交
  4. 31 5月, 2014 1 次提交
  5. 07 10月, 2013 1 次提交
    • J
      MIPS: stack protector: Fix per-task canary switch · 8b3c569a
      James Hogan 提交于
      Commit 1400eb65 (MIPS: r4k,octeon,r2300: stack protector: change canary
      per task) was merged in v3.11 and introduced assembly in the MIPS resume
      functions to update the value of the current canary in
      __stack_chk_guard. However it used PTR_L resulting in a load of the
      canary value, instead of PTR_LA to construct its address. The value is
      intended to be random but is then treated as an address in the
      subsequent LONG_S (store).
      
      This was observed to cause a fault and panic:
      
      CPU 0 Unable to handle kernel paging request at virtual address 139fea20, epc == 8000cc0c, ra == 8034f2a4
      Oops[#1]:
      ...
      $24   : 139fea20 1e1f7cb6
      ...
      Call Trace:
      [<8000cc0c>] resume+0xac/0x118
      [<8034f2a4>] __schedule+0x5f8/0x78c
      [<8034f4e0>] schedule_preempt_disabled+0x20/0x2c
      [<80348eec>] rest_init+0x74/0x84
      [<804dc990>] start_kernel+0x43c/0x454
      Code: 3c18804b  8f184030  8cb901f8 <af190000> 00c0e021  8cb002f0 8cb102f4  8cb202f8  8cb302fc
      
      This can also be forced by modifying
      arch/mips/include/asm/stackprotector.h so that the default
      __stack_chk_guard value is more likely to be a bad (or unaligned)
      pointer.
      
      Fix it to use PTR_LA instead, to load the address of the canary value,
      which the LONG_S can then use to write into it.
      
      Reported-by: bobjones (via #mipslinux on IRC)
      Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Gregory Fong <gregory.0xf0@gmail.com>
      Cc: linux-mips@linux-mips.org
      Cc: stable@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/6026/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      8b3c569a
  6. 01 7月, 2013 1 次提交
  7. 13 6月, 2013 1 次提交
  8. 01 2月, 2013 1 次提交
  9. 29 12月, 2012 1 次提交
  10. 19 7月, 2012 1 次提交
  11. 06 4月, 2011 1 次提交
  12. 27 2月, 2010 1 次提交
  13. 18 9月, 2009 1 次提交
  14. 11 1月, 2009 1 次提交
    • D
      MIPS: Add Cavium OCTEON processor support files to arch/mips/cavium-octeon. · 5b3b1688
      David Daney 提交于
      These are the rest of the new files needed to add OCTEON processor
      support to the Linux kernel.  Other than Makefile and Kconfig which
      should be obvious, we have:
      
      csrc-octeon.c   -- Clock source driver for OCTEON.
      dma-octeon.c    -- Helper functions for mapping DMA memory.
      flash_setup.c   -- Register on-board flash with the MTD subsystem.
      octeon-irq.c    -- OCTEON interrupt controller managment.
      octeon-memcpy.S -- Optimized memcpy() implementation.
      serial.c        -- Register 8250 platform driver and early console.
      setup.c         -- Early architecture initialization.
      smp.c           -- OCTEON SMP support.
      octeon_switch.S -- Scheduler context switch for OCTEON.
      c-octeon.c      -- OCTEON cache controller support.
      cex-oct.S       -- OCTEON cache exception handler.
      
      asm/mach-cavium-octeon/*.h -- Architecture include files.
      Signed-off-by: NTomaso Paoletti <tpaoletti@caviumnetworks.com>
      Signed-off-by: NDavid Daney <ddaney@caviumnetworks.com>
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      
       create mode 100644 arch/mips/cavium-octeon/Kconfig
       create mode 100644 arch/mips/cavium-octeon/Makefile
       create mode 100644 arch/mips/cavium-octeon/csrc-octeon.c
       create mode 100644 arch/mips/cavium-octeon/dma-octeon.c
       create mode 100644 arch/mips/cavium-octeon/flash_setup.c
       create mode 100644 arch/mips/cavium-octeon/octeon-irq.c
       create mode 100644 arch/mips/cavium-octeon/octeon-memcpy.S
       create mode 100644 arch/mips/cavium-octeon/serial.c
       create mode 100644 arch/mips/cavium-octeon/setup.c
       create mode 100644 arch/mips/cavium-octeon/smp.c
       create mode 100644 arch/mips/include/asm/mach-cavium-octeon/cpu-feature-overrides.h
       create mode 100644 arch/mips/include/asm/mach-cavium-octeon/dma-coherence.h
       create mode 100644 arch/mips/include/asm/mach-cavium-octeon/irq.h
       create mode 100644 arch/mips/include/asm/mach-cavium-octeon/kernel-entry-init.h
       create mode 100644 arch/mips/include/asm/mach-cavium-octeon/war.h
       create mode 100644 arch/mips/include/asm/octeon/octeon.h
       create mode 100644 arch/mips/kernel/octeon_switch.S
       create mode 100644 arch/mips/mm/c-octeon.c
       create mode 100644 arch/mips/mm/cex-oct.S
      5b3b1688