1. 27 Jul, 2022 8 commits
  2. 25 Jul, 2022 16 commits
  3. 20 Jul, 2022 6 commits
  4. 18 Jul, 2022 4 commits
  5. 09 Jul, 2022 2 commits
  6. 04 Jul, 2022 1 commit
  7. 29 Jun, 2022 3 commits
    • Aneesh Kumar K.V's avatar
      powerpc/memhotplug: Add add_pages override for PPC · ac790d09
      Aneesh Kumar K.V authored
      With commit ffa0b64e ("powerpc: Fix virt_addr_valid() for 64-bit Book3E & 32-bit")
      the kernel now validate the addr against high_memory value. This results
      in the below BUG_ON with dax pfns.
      
      [  635.798741][T26531] kernel BUG at mm/page_alloc.c:5521!
      1:mon> e
      cpu 0x1: Vector: 700 (Program Check) at [c000000007287630]
          pc: c00000000055ed48: free_pages.part.0+0x48/0x110
          lr: c00000000053ca70: tlb_finish_mmu+0x80/0xd0
          sp: c0000000072878d0
         msr: 800000000282b033
        current = 0xc00000000afabe00
        paca    = 0xc00000037ffff300   irqmask: 0x03   irq_happened: 0x05
          pid   = 26531, comm = 50-landscape-sy
      kernel BUG at :5521!
      Linux version 5.19.0-rc3-14659-g4ec05be7c2e1 (kvaneesh@ltc-boston8) (gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #625 SMP Thu Jun 23 00:35:43 CDT 2022
      1:mon> t
      [link register   ] c00000000053ca70 tlb_finish_mmu+0x80/0xd0
      [c0000000072878d0] c00000000053ca54 tlb_finish_mmu+0x64/0xd0 (unreliable)
      [c000000007287900] c000000000539424 exit_mmap+0xe4/0x2a0
      [c0000000072879e0] c00000000019fc1c mmput+0xcc/0x210
      [c000000007287a20] c000000000629230 begin_new_exec+0x5e0/0xf40
      [c000000007287ae0] c00000000070b3cc load_elf_binary+0x3ac/0x1e00
      [c000000007287c10] c000000000627af0 bprm_execve+0x3b0/0xaf0
      [c000000007287cd0] c000000000628414 do_execveat_common.isra.0+0x1e4/0x310
      [c000000007287d80] c00000000062858c sys_execve+0x4c/0x60
      [c000000007287db0] c00000000002c1b0 system_call_exception+0x160/0x2c0
      [c000000007287e10] c00000000000c53c system_call_common+0xec/0x250
      
      The fix is to make sure we update high_memory on memory hotplug.
      This is similar to what x86 does in commit 3072e413 ("mm/memory_hotplug: introduce add_pages")
      
      Fixes: ffa0b64e ("powerpc: Fix virt_addr_valid() for 64-bit Book3E & 32-bit")
      Signed-off-by: default avatarAneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
      Reviewed-by: default avatarKefeng Wang <wangkefeng.wang@huawei.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Link: https://lore.kernel.org/r/20220629050925.31447-1-aneesh.kumar@linux.ibm.com
      ac790d09
    • Naveen N. Rao's avatar
      powerpc/bpf: Fix use of user_pt_regs in uapi · b21bd5a4
      Naveen N. Rao authored
      Trying to build a .c file that includes <linux/bpf_perf_event.h>:
        $ cat test_bpf_headers.c
        #include <linux/bpf_perf_event.h>
      
      throws the below error:
        /usr/include/linux/bpf_perf_event.h:14:28: error: field ‘regs’ has incomplete type
           14 |         bpf_user_pt_regs_t regs;
      	|                            ^~~~
      
      This is because we typedef bpf_user_pt_regs_t to 'struct user_pt_regs'
      in arch/powerpc/include/uaps/asm/bpf_perf_event.h, but 'struct
      user_pt_regs' is not exposed to userspace.
      
      Powerpc has both pt_regs and user_pt_regs structures. However, unlike
      arm64 and s390, we expose user_pt_regs to userspace as just 'pt_regs'.
      As such, we should typedef bpf_user_pt_regs_t to 'struct pt_regs' for
      userspace.
      
      Within the kernel though, we want to typedef bpf_user_pt_regs_t to
      'struct user_pt_regs'.
      
      Remove arch/powerpc/include/uapi/asm/bpf_perf_event.h so that the
      uapi/asm-generic version of the header is exposed to userspace.
      Introduce arch/powerpc/include/asm/bpf_perf_event.h so that we can
      typedef bpf_user_pt_regs_t to 'struct user_pt_regs' for use within the
      kernel.
      
      Note that this was not showing up with the bpf selftest build since
      tools/include/uapi/asm/bpf_perf_event.h didn't include the powerpc
      variant.
      
      Fixes: a6460b03 ("powerpc/bpf: Fix broken uapi for BPF_PROG_TYPE_PERF_EVENT")
      Cc: stable@vger.kernel.org # v4.20+
      Signed-off-by: default avatarNaveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
      [mpe: Use typical naming for header include guard]
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Link: https://lore.kernel.org/r/20220627191119.142867-1-naveen.n.rao@linux.vnet.ibm.com
      b21bd5a4
    • Pali Rohár's avatar
      powerpc: dts: Add DTS file for CZ.NIC Turris 1.x routers · 54c15ec3
      Pali Rohár authored
      CZ.NIC Turris 1.0 and 1.1 are open source routers, they have dual-core
      PowerPC Freescale P2020 CPU and are based on Freescale P2020RDB-PC-A board.
      Hardware design is fully open source, all firmware and hardware design
      files are available at Turris project website:
      
      https://docs.turris.cz/hw/turris-1x/turris-1x/
      https://project.turris.cz/en/hardware.htmlSigned-off-by: default avatarPali Rohár <pali@kernel.org>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Link: https://lore.kernel.org/r/20220624085550.20570-1-pali@kernel.org
      54c15ec3