Skip to content
Snippets Groups Projects
  1. Jan 26, 2020
  2. Aug 28, 2019
  3. May 30, 2019
  4. May 02, 2019
  5. Feb 23, 2019
  6. Feb 21, 2019
    • Christophe Leroy's avatar
      powerpc: simplify BDI switch · 40058337
      Christophe Leroy authored
      
      There is no reason to re-read each time the pointer at
      location 0xf0 as it is fixed and known.
      
      Signed-off-by: default avatarChristophe Leroy <christophe.leroy@c-s.fr>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      40058337
    • Christophe Leroy's avatar
      powerpc/8xx: hide itlbie and dtlbie symbols · 32ceaa6e
      Christophe Leroy authored
      
      When disassembling InstructionTLBError we get the following messy code:
      
      c000138c:       7d 84 63 78     mr      r4,r12
      c0001390:       75 25 58 00     andis.  r5,r9,22528
      c0001394:       75 2a 40 00     andis.  r10,r9,16384
      c0001398:       41 a2 00 08     beq     c00013a0 <itlbie>
      c000139c:       7c 00 22 64     tlbie   r4,r0
      
      c00013a0 <itlbie>:
      c00013a0:       39 40 04 01     li      r10,1025
      c00013a4:       91 4b 00 b0     stw     r10,176(r11)
      c00013a8:       39 40 10 32     li      r10,4146
      c00013ac:       48 00 cc 59     bl      c000e004 <transfer_to_handler>
      
      For a cleaner code dump, this patch replaces itlbie and dtlbie
      symbols by local symbols.
      
      c000138c:       7d 84 63 78     mr      r4,r12
      c0001390:       75 25 58 00     andis.  r5,r9,22528
      c0001394:       75 2a 40 00     andis.  r10,r9,16384
      c0001398:       41 a2 00 08     beq     c00013a0 <InstructionTLBError+0xa0>
      c000139c:       7c 00 22 64     tlbie   r4,r0
      c00013a0:       39 40 04 01     li      r10,1025
      c00013a4:       91 4b 00 b0     stw     r10,176(r11)
      c00013a8:       39 40 10 32     li      r10,4146
      c00013ac:       48 00 cc 59     bl      c000e004 <transfer_to_handler>
      Signed-off-by: default avatarChristophe Leroy <christophe.leroy@c-s.fr>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      32ceaa6e
  7. Jan 11, 2019
  8. Dec 19, 2018
    • Christophe Leroy's avatar
      powerpc/8xx: add exception frame marker · 0ed5b558
      Christophe Leroy authored
      
      This patch adds STACK_FRAME_REGS_MARKER in the stack at exception entry
      in order to see interrupts in call traces as below:
      
      [    0.013964] Call Trace:
      [    0.014014] [c0745db0] [c007a9d4] tick_periodic.constprop.5+0xd8/0x104 (unreliable)
      [    0.014086] [c0745dc0] [c007aa20] tick_handle_periodic+0x20/0x9c
      [    0.014181] [c0745de0] [c0009cd0] timer_interrupt+0xa0/0x264
      [    0.014258] [c0745e10] [c000e484] ret_from_except+0x0/0x14
      [    0.014390] --- interrupt: 901 at console_unlock.part.7+0x3f4/0x528
      [    0.014390]     LR = console_unlock.part.7+0x3f0/0x528
      [    0.014455] [c0745ee0] [c0050334] console_unlock.part.7+0x114/0x528 (unreliable)
      [    0.014542] [c0745f30] [c00524e0] register_console+0x3d8/0x44c
      [    0.014625] [c0745f60] [c0675aac] cpm_uart_console_init+0x18/0x2c
      [    0.014709] [c0745f70] [c06614f4] console_init+0x114/0x1cc
      [    0.014795] [c0745fb0] [c0658b68] start_kernel+0x300/0x3d8
      [    0.014864] [c0745ff0] [c00022cc] start_here+0x44/0x98
      
      Signed-off-by: default avatarChristophe Leroy <christophe.leroy@c-s.fr>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      0ed5b558
  9. Dec 04, 2018
    • Christophe Leroy's avatar
      powerpc/8xx: regroup TLB handler routines · b14fc502
      Christophe Leroy authored
      
      As this is running with MMU off, the CPU only does speculative
      fetch for code in the same page.
      
      Following the significant size reduction of TLB handler routines,
      the side handlers can be brought back close to the main part,
      ie in the same page.
      
      Signed-off-by: default avatarChristophe Leroy <christophe.leroy@c-s.fr>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      b14fc502
    • Christophe Leroy's avatar
      powerpc/8xx: don't use r12/SPRN_SPRG_SCRATCH2 in TLB Miss handlers · 74fabcad
      Christophe Leroy authored
      
      This patch reworks the TLB Miss handler in order to not use r12
      register, hence avoiding having to save it into SPRN_SPRG_SCRATCH2.
      
      In the DAR Fixup code we can now use SPRN_M_TW, freeing
      SPRN_SPRG_SCRATCH2.
      
      Then SPRN_SPRG_SCRATCH2 may be used for something else in the future.
      
      Signed-off-by: default avatarChristophe Leroy <christophe.leroy@c-s.fr>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      74fabcad
    • Christophe Leroy's avatar
      powerpc/8xx: Use hardware assistance in TLB handlers · 6a8f911b
      Christophe Leroy authored
      
      Today, on the 8xx the TLB handlers do SW tablewalk by doing all
      the calculation in ASM, in order to match with the Linux page
      table structure.
      
      The 8xx offers hardware assistance which allows significant size
      reduction of the TLB handlers, hence also reduces the time spent
      in the handlers.
      
      However, using this HW assistance implies some constraints on the
      page table structure:
      - Regardless of the main page size used (4k or 16k), the
      level 1 table (PGD) contains 1024 entries and each PGD entry covers
      a 4Mbytes area which is managed by a level 2 table (PTE) containing
      also 1024 entries each describing a 4k page.
      - 16k pages require 4 identifical entries in the L2 table
      - 512k pages PTE have to be spread every 128 bytes in the L2 table
      - 8M pages PTE are at the address pointed by the L1 entry and each
      8M page require 2 identical entries in the PGD.
      
      This patch modifies the TLB handlers to use HW assistance for 4K PAGES.
      
      Before that patch, the mean time spent in TLB miss handlers is:
      - ITLB miss: 80 ticks
      - DTLB miss: 62 ticks
      After that patch, the mean time spent in TLB miss handlers is:
      - ITLB miss: 72 ticks
      - DTLB miss: 54 ticks
      So the improvement is 10% for ITLB and 13% for DTLB misses
      
      Signed-off-by: default avatarChristophe Leroy <christophe.leroy@c-s.fr>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      6a8f911b
    • Christophe Leroy's avatar
      powerpc/8xx: Temporarily disable 16k pages and hugepages · 5af543be
      Christophe Leroy authored
      
      In preparation of making use of hardware assistance in TLB handlers,
      this patch temporarily disables 16K pages and hugepages. The reason
      is that when using HW assistance in 4K pages mode, the linux model
      fit with the HW model for 4K pages and 8M pages.
      
      However for 16K pages and 512K mode some additional work is needed
      to get linux model fit with HW model.
      For the 8M pages, they will naturaly come back when we switch to
      HW assistance, without any additional handling.
      In order to keep the following patch smaller, the removal of the
      current special handling for 8M pages gets removed here as well.
      
      Therefore the 4K pages mode will be implemented first and without
      support for 512k hugepages. Then the 512k hugepages will be brought
      back. And the 16K pages will be implemented in the following step.
      
      Signed-off-by: default avatarChristophe Leroy <christophe.leroy@c-s.fr>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      5af543be
    • Christophe Leroy's avatar
      powerpc/8xx: Move SW perf counters in first 32kb of memory · 8cfe4f52
      Christophe Leroy authored
      
      In order to simplify time critical exceptions handling 8xx
      specific SW perf counters, this patch moves the counters into
      the beginning of memory. This is possible because .text is readable
      and the counters are never modified outside of the handlers.
      
      By doing this, we avoid having to set a second register with
      the upper part of the address of the counters.
      
      Signed-off-by: default avatarChristophe Leroy <christophe.leroy@c-s.fr>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      8cfe4f52
  10. Oct 26, 2018
  11. Oct 14, 2018
  12. Jul 30, 2018
  13. Jul 19, 2018
  14. May 24, 2018
  15. Jan 16, 2018
  16. Aug 15, 2017
Loading