diff options
| -rw-r--r-- | arch/powerpc/boot/Makefile | 2 | ||||
| -rw-r--r-- | arch/powerpc/boot/crt0.S | 4 | ||||
| -rw-r--r-- | arch/powerpc/include/asm/perf_event.h | 2 | ||||
| -rw-r--r-- | arch/powerpc/include/uapi/asm/Kbuild | 1 | ||||
| -rw-r--r-- | arch/powerpc/include/uapi/asm/bpf_perf_event.h | 9 | ||||
| -rw-r--r-- | arch/powerpc/kernel/legacy_serial.c | 6 | ||||
| -rw-r--r-- | arch/powerpc/kernel/msi.c | 7 | ||||
| -rw-r--r-- | arch/powerpc/kernel/ptrace.c | 7 | ||||
| -rw-r--r-- | arch/powerpc/mm/dump_linuxpagetables.c | 1 | ||||
| -rw-r--r-- | arch/powerpc/mm/init_64.c | 19 | ||||
| -rw-r--r-- | arch/powerpc/platforms/pseries/Kconfig | 3 | ||||
| -rw-r--r-- | arch/powerpc/platforms/pseries/papr_scm.c | 39 |
12 files changed, 80 insertions, 20 deletions
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile index 39354365f54a..ed9883169190 100644 --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile | |||
| @@ -197,7 +197,7 @@ $(obj)/empty.c: | |||
| 197 | $(obj)/zImage.coff.lds $(obj)/zImage.ps3.lds : $(obj)/%: $(srctree)/$(src)/%.S | 197 | $(obj)/zImage.coff.lds $(obj)/zImage.ps3.lds : $(obj)/%: $(srctree)/$(src)/%.S |
| 198 | $(Q)cp $< $@ | 198 | $(Q)cp $< $@ |
| 199 | 199 | ||
| 200 | $(obj)/serial.c: $(obj)/autoconf.h | 200 | $(srctree)/$(src)/serial.c: $(obj)/autoconf.h |
| 201 | 201 | ||
| 202 | $(obj)/autoconf.h: $(obj)/%: $(objtree)/include/generated/% | 202 | $(obj)/autoconf.h: $(obj)/%: $(objtree)/include/generated/% |
| 203 | $(Q)cp $< $@ | 203 | $(Q)cp $< $@ |
diff --git a/arch/powerpc/boot/crt0.S b/arch/powerpc/boot/crt0.S index 32dfe6d083f3..9b9d17437373 100644 --- a/arch/powerpc/boot/crt0.S +++ b/arch/powerpc/boot/crt0.S | |||
| @@ -15,7 +15,7 @@ | |||
| 15 | RELA = 7 | 15 | RELA = 7 |
| 16 | RELACOUNT = 0x6ffffff9 | 16 | RELACOUNT = 0x6ffffff9 |
| 17 | 17 | ||
| 18 | .text | 18 | .data |
| 19 | /* A procedure descriptor used when booting this as a COFF file. | 19 | /* A procedure descriptor used when booting this as a COFF file. |
| 20 | * When making COFF, this comes first in the link and we're | 20 | * When making COFF, this comes first in the link and we're |
| 21 | * linked at 0x500000. | 21 | * linked at 0x500000. |
| @@ -23,6 +23,8 @@ RELACOUNT = 0x6ffffff9 | |||
| 23 | .globl _zimage_start_opd | 23 | .globl _zimage_start_opd |
| 24 | _zimage_start_opd: | 24 | _zimage_start_opd: |
| 25 | .long 0x500000, 0, 0, 0 | 25 | .long 0x500000, 0, 0, 0 |
| 26 | .text | ||
| 27 | b _zimage_start | ||
| 26 | 28 | ||
| 27 | #ifdef __powerpc64__ | 29 | #ifdef __powerpc64__ |
| 28 | .balign 8 | 30 | .balign 8 |
diff --git a/arch/powerpc/include/asm/perf_event.h b/arch/powerpc/include/asm/perf_event.h index 8bf1b6351716..16a49819da9a 100644 --- a/arch/powerpc/include/asm/perf_event.h +++ b/arch/powerpc/include/asm/perf_event.h | |||
| @@ -26,6 +26,8 @@ | |||
| 26 | #include <asm/ptrace.h> | 26 | #include <asm/ptrace.h> |
| 27 | #include <asm/reg.h> | 27 | #include <asm/reg.h> |
| 28 | 28 | ||
| 29 | #define perf_arch_bpf_user_pt_regs(regs) ®s->user_regs | ||
| 30 | |||
| 29 | /* | 31 | /* |
| 30 | * Overload regs->result to specify whether we should use the MSR (result | 32 | * Overload regs->result to specify whether we should use the MSR (result |
| 31 | * is zero) or the SIAR (result is non zero). | 33 | * is zero) or the SIAR (result is non zero). |
diff --git a/arch/powerpc/include/uapi/asm/Kbuild b/arch/powerpc/include/uapi/asm/Kbuild index a658091a19f9..3712152206f3 100644 --- a/arch/powerpc/include/uapi/asm/Kbuild +++ b/arch/powerpc/include/uapi/asm/Kbuild | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | # UAPI Header export list | 1 | # UAPI Header export list |
| 2 | include include/uapi/asm-generic/Kbuild.asm | 2 | include include/uapi/asm-generic/Kbuild.asm |
| 3 | 3 | ||
| 4 | generic-y += bpf_perf_event.h | ||
| 5 | generic-y += param.h | 4 | generic-y += param.h |
| 6 | generic-y += poll.h | 5 | generic-y += poll.h |
| 7 | generic-y += resource.h | 6 | generic-y += resource.h |
diff --git a/arch/powerpc/include/uapi/asm/bpf_perf_event.h b/arch/powerpc/include/uapi/asm/bpf_perf_event.h new file mode 100644 index 000000000000..b551b741653d --- /dev/null +++ b/arch/powerpc/include/uapi/asm/bpf_perf_event.h | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0 */ | ||
| 2 | #ifndef _UAPI__ASM_BPF_PERF_EVENT_H__ | ||
| 3 | #define _UAPI__ASM_BPF_PERF_EVENT_H__ | ||
| 4 | |||
| 5 | #include <asm/ptrace.h> | ||
| 6 | |||
| 7 | typedef struct user_pt_regs bpf_user_pt_regs_t; | ||
| 8 | |||
| 9 | #endif /* _UAPI__ASM_BPF_PERF_EVENT_H__ */ | ||
diff --git a/arch/powerpc/kernel/legacy_serial.c b/arch/powerpc/kernel/legacy_serial.c index 33b34a58fc62..5b9dce17f0c9 100644 --- a/arch/powerpc/kernel/legacy_serial.c +++ b/arch/powerpc/kernel/legacy_serial.c | |||
| @@ -372,6 +372,8 @@ void __init find_legacy_serial_ports(void) | |||
| 372 | 372 | ||
| 373 | /* Now find out if one of these is out firmware console */ | 373 | /* Now find out if one of these is out firmware console */ |
| 374 | path = of_get_property(of_chosen, "linux,stdout-path", NULL); | 374 | path = of_get_property(of_chosen, "linux,stdout-path", NULL); |
| 375 | if (path == NULL) | ||
| 376 | path = of_get_property(of_chosen, "stdout-path", NULL); | ||
| 375 | if (path != NULL) { | 377 | if (path != NULL) { |
| 376 | stdout = of_find_node_by_path(path); | 378 | stdout = of_find_node_by_path(path); |
| 377 | if (stdout) | 379 | if (stdout) |
| @@ -595,8 +597,10 @@ static int __init check_legacy_serial_console(void) | |||
| 595 | /* We are getting a weird phandle from OF ... */ | 597 | /* We are getting a weird phandle from OF ... */ |
| 596 | /* ... So use the full path instead */ | 598 | /* ... So use the full path instead */ |
| 597 | name = of_get_property(of_chosen, "linux,stdout-path", NULL); | 599 | name = of_get_property(of_chosen, "linux,stdout-path", NULL); |
| 600 | if (name == NULL) | ||
| 601 | name = of_get_property(of_chosen, "stdout-path", NULL); | ||
| 598 | if (name == NULL) { | 602 | if (name == NULL) { |
| 599 | DBG(" no linux,stdout-path !\n"); | 603 | DBG(" no stdout-path !\n"); |
| 600 | return -ENODEV; | 604 | return -ENODEV; |
| 601 | } | 605 | } |
| 602 | prom_stdout = of_find_node_by_path(name); | 606 | prom_stdout = of_find_node_by_path(name); |
diff --git a/arch/powerpc/kernel/msi.c b/arch/powerpc/kernel/msi.c index dab616a33b8d..f2197654be07 100644 --- a/arch/powerpc/kernel/msi.c +++ b/arch/powerpc/kernel/msi.c | |||
| @@ -34,5 +34,10 @@ void arch_teardown_msi_irqs(struct pci_dev *dev) | |||
| 34 | { | 34 | { |
| 35 | struct pci_controller *phb = pci_bus_to_host(dev->bus); | 35 | struct pci_controller *phb = pci_bus_to_host(dev->bus); |
| 36 | 36 | ||
| 37 | phb->controller_ops.teardown_msi_irqs(dev); | 37 | /* |
| 38 | * We can be called even when arch_setup_msi_irqs() returns -ENOSYS, | ||
| 39 | * so check the pointer again. | ||
| 40 | */ | ||
| 41 | if (phb->controller_ops.teardown_msi_irqs) | ||
| 42 | phb->controller_ops.teardown_msi_irqs(dev); | ||
| 38 | } | 43 | } |
diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c index afb819f4ca68..714c3480c52d 100644 --- a/arch/powerpc/kernel/ptrace.c +++ b/arch/powerpc/kernel/ptrace.c | |||
| @@ -3266,12 +3266,17 @@ long do_syscall_trace_enter(struct pt_regs *regs) | |||
| 3266 | user_exit(); | 3266 | user_exit(); |
| 3267 | 3267 | ||
| 3268 | if (test_thread_flag(TIF_SYSCALL_EMU)) { | 3268 | if (test_thread_flag(TIF_SYSCALL_EMU)) { |
| 3269 | ptrace_report_syscall(regs); | ||
| 3270 | /* | 3269 | /* |
| 3270 | * A nonzero return code from tracehook_report_syscall_entry() | ||
| 3271 | * tells us to prevent the syscall execution, but we are not | ||
| 3272 | * going to execute it anyway. | ||
| 3273 | * | ||
| 3271 | * Returning -1 will skip the syscall execution. We want to | 3274 | * Returning -1 will skip the syscall execution. We want to |
| 3272 | * avoid clobbering any register also, thus, not 'gotoing' | 3275 | * avoid clobbering any register also, thus, not 'gotoing' |
| 3273 | * skip label. | 3276 | * skip label. |
| 3274 | */ | 3277 | */ |
| 3278 | if (tracehook_report_syscall_entry(regs)) | ||
| 3279 | ; | ||
| 3275 | return -1; | 3280 | return -1; |
| 3276 | } | 3281 | } |
| 3277 | 3282 | ||
diff --git a/arch/powerpc/mm/dump_linuxpagetables.c b/arch/powerpc/mm/dump_linuxpagetables.c index 2b74f8adf4d0..6aa41669ac1a 100644 --- a/arch/powerpc/mm/dump_linuxpagetables.c +++ b/arch/powerpc/mm/dump_linuxpagetables.c | |||
| @@ -19,6 +19,7 @@ | |||
| 19 | #include <linux/hugetlb.h> | 19 | #include <linux/hugetlb.h> |
| 20 | #include <linux/io.h> | 20 | #include <linux/io.h> |
| 21 | #include <linux/mm.h> | 21 | #include <linux/mm.h> |
| 22 | #include <linux/highmem.h> | ||
| 22 | #include <linux/sched.h> | 23 | #include <linux/sched.h> |
| 23 | #include <linux/seq_file.h> | 24 | #include <linux/seq_file.h> |
| 24 | #include <asm/fixmap.h> | 25 | #include <asm/fixmap.h> |
diff --git a/arch/powerpc/mm/init_64.c b/arch/powerpc/mm/init_64.c index 7a9886f98b0c..a5091c034747 100644 --- a/arch/powerpc/mm/init_64.c +++ b/arch/powerpc/mm/init_64.c | |||
| @@ -188,15 +188,20 @@ int __meminit vmemmap_populate(unsigned long start, unsigned long end, int node, | |||
| 188 | pr_debug("vmemmap_populate %lx..%lx, node %d\n", start, end, node); | 188 | pr_debug("vmemmap_populate %lx..%lx, node %d\n", start, end, node); |
| 189 | 189 | ||
| 190 | for (; start < end; start += page_size) { | 190 | for (; start < end; start += page_size) { |
| 191 | void *p; | 191 | void *p = NULL; |
| 192 | int rc; | 192 | int rc; |
| 193 | 193 | ||
| 194 | if (vmemmap_populated(start, page_size)) | 194 | if (vmemmap_populated(start, page_size)) |
| 195 | continue; | 195 | continue; |
| 196 | 196 | ||
| 197 | /* | ||
| 198 | * Allocate from the altmap first if we have one. This may | ||
| 199 | * fail due to alignment issues when using 16MB hugepages, so | ||
| 200 | * fall back to system memory if the altmap allocation fail. | ||
| 201 | */ | ||
| 197 | if (altmap) | 202 | if (altmap) |
| 198 | p = altmap_alloc_block_buf(page_size, altmap); | 203 | p = altmap_alloc_block_buf(page_size, altmap); |
| 199 | else | 204 | if (!p) |
| 200 | p = vmemmap_alloc_block_buf(page_size, node); | 205 | p = vmemmap_alloc_block_buf(page_size, node); |
| 201 | if (!p) | 206 | if (!p) |
| 202 | return -ENOMEM; | 207 | return -ENOMEM; |
| @@ -255,8 +260,15 @@ void __ref vmemmap_free(unsigned long start, unsigned long end, | |||
| 255 | { | 260 | { |
| 256 | unsigned long page_size = 1 << mmu_psize_defs[mmu_vmemmap_psize].shift; | ||
