From 81d7cac4d11cc65f29be68c72759429d5194347a Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Mon, 24 Jul 2023 15:02:42 -0600 Subject: powerpc: Explicitly include correct DT includes The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it as merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also include platform_device.h and of.h. As a result, there's a pretty much random mix of those include files used throughout the tree. In order to detangle these headers and replace the implicit includes with struct declarations, users need to explicitly include the correct includes. Signed-off-by: Rob Herring [mpe: Fixup maple/setup.c which needs platform_device] Signed-off-by: Michael Ellerman Link: https://msgid.link/20230724210247.778034-1-robh@kernel.org --- arch/powerpc/platforms/86xx/pic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/powerpc/platforms/86xx/pic.c') diff --git a/arch/powerpc/platforms/86xx/pic.c b/arch/powerpc/platforms/86xx/pic.c index 2c32c3488afb..5c7bd925653d 100644 --- a/arch/powerpc/platforms/86xx/pic.c +++ b/arch/powerpc/platforms/86xx/pic.c @@ -6,8 +6,8 @@ #include #include #include +#include #include -#include #include #include -- cgit v1.2.3 From 54f30b83fe627453082f15d83d7820b28b2d24bb Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Thu, 27 Jul 2023 14:26:50 +0200 Subject: powerpc: address missing-prototypes warnings There are a few warnings in powerpc64 defconfig builds after -Wmissing-prototypes gets promoted from W=1 to the default warning set: arch/powerpc/mm/book3s64/pgtable.c:422:6: error: no previous prototype for 'arch_report_meminfo' [-Werror=missing-prototypes] arch/powerpc/platforms/cell/ras.c:275:5: error: no previous prototype for 'cbe_sysreset_hack' [-Werror=missing-prototypes] arch/powerpc/platforms/cell/spu_manage.c:29:21: error: no previous prototype for 'spu_devnode' [-Werror=missing-prototypes] arch/powerpc/platforms/pasemi/time.c:12:17: error: no previous prototype for 'pas_get_boot_time' [-Werror=missing-prototypes] arch/powerpc/platforms/powermac/feature.c:1532:13: error: no previous prototype for 'g5_phy_disable_cpu1' [-Werror=missing-prototypes] arch/powerpc/platforms/86xx/pic.c:28:13: error: no previous prototype for 'mpc86xx_init_irq' [-Werror=missing-prototypes] drivers/pci/pci-sysfs.c:936:13: error: no previous prototype for 'pci_adjust_legacy_attr' [-Werror=missing-prototypes] Address these by including the right header files or marking the functions static. The audit.c one is a bit tricky since compat_audit.h cannot include regular kernel headers tht have conflicting types on 32-bit powerpc. Signed-off-by: Arnd Bergmann [mpe: Drop change to __vmemmap_free() which only exists in mm] Signed-off-by: Michael Ellerman Link: https://msgid.link/20230727122720.2558065-1-arnd@kernel.org --- arch/powerpc/include/asm/pci.h | 3 ++- arch/powerpc/kernel/audit.c | 3 ++- arch/powerpc/kernel/audit_32.h | 7 +++++++ arch/powerpc/kernel/compat_audit.c | 2 ++ arch/powerpc/mm/book3s64/pgtable.c | 1 + arch/powerpc/platforms/86xx/pic.c | 2 ++ arch/powerpc/platforms/cell/ras.c | 2 +- arch/powerpc/platforms/cell/spu_manage.c | 1 + arch/powerpc/platforms/pasemi/pasemi.h | 1 + arch/powerpc/platforms/pasemi/time.c | 2 ++ arch/powerpc/platforms/powermac/feature.c | 2 ++ 11 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 arch/powerpc/kernel/audit_32.h (limited to 'arch/powerpc/platforms/86xx/pic.c') diff --git a/arch/powerpc/include/asm/pci.h b/arch/powerpc/include/asm/pci.h index 289f1ec85bc5..f5078a7dd85a 100644 --- a/arch/powerpc/include/asm/pci.h +++ b/arch/powerpc/include/asm/pci.h @@ -82,7 +82,8 @@ extern int pci_legacy_write(struct pci_bus *bus, loff_t port, u32 val, extern int pci_mmap_legacy_page_range(struct pci_bus *bus, struct vm_area_struct *vma, enum pci_mmap_state mmap_state); - +extern void pci_adjust_legacy_attr(struct pci_bus *bus, + enum pci_mmap_state mmap_type); #define HAVE_PCI_LEGACY 1 extern void pcibios_claim_one_bus(struct pci_bus *b); diff --git a/arch/powerpc/kernel/audit.c b/arch/powerpc/kernel/audit.c index 1bcfca5fdf67..92298d6a3a37 100644 --- a/arch/powerpc/kernel/audit.c +++ b/arch/powerpc/kernel/audit.c @@ -4,6 +4,8 @@ #include #include +#include "audit_32.h" + static unsigned dir_class[] = { #include ~0U @@ -41,7 +43,6 @@ int audit_classify_arch(int arch) int audit_classify_syscall(int abi, unsigned syscall) { #ifdef CONFIG_PPC64 - extern int ppc32_classify_syscall(unsigned); if (abi == AUDIT_ARCH_PPC) return ppc32_classify_syscall(syscall); #endif diff --git a/arch/powerpc/kernel/audit_32.h b/arch/powerpc/kernel/audit_32.h new file mode 100644 index 000000000000..c6c79c3041ab --- /dev/null +++ b/arch/powerpc/kernel/audit_32.h @@ -0,0 +1,7 @@ +// SPDX-License-Identifier: GPL-2.0 +#ifndef __AUDIT_32_H__ +#define __AUDIT_32_H__ + +extern int ppc32_classify_syscall(unsigned); + +#endif diff --git a/arch/powerpc/kernel/compat_audit.c b/arch/powerpc/kernel/compat_audit.c index d92ffe4e5dc1..57b38c592b9f 100644 --- a/arch/powerpc/kernel/compat_audit.c +++ b/arch/powerpc/kernel/compat_audit.c @@ -3,6 +3,8 @@ #include #include +#include "audit_32.h" + unsigned ppc32_dir_class[] = { #include ~0U diff --git a/arch/powerpc/mm/book3s64/pgtable.c b/arch/powerpc/mm/book3s64/pgtable.c index 85c84e89e3ea..2f2872986b09 100644 --- a/arch/powerpc/mm/book3s64/pgtable.c +++ b/arch/powerpc/mm/book3s64/pgtable.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include diff --git a/arch/powerpc/platforms/86xx/pic.c b/arch/powerpc/platforms/86xx/pic.c index 5c7bd925653d..9ca36de23532 100644 --- a/arch/powerpc/platforms/86xx/pic.c +++ b/arch/powerpc/platforms/86xx/pic.c @@ -12,6 +12,8 @@ #include #include +#include "mpc86xx.h" + #ifdef CONFIG_PPC_I8259 static void mpc86xx_8259_cascade(struct irq_desc *desc) { diff --git a/arch/powerpc/platforms/cell/ras.c b/arch/powerpc/platforms/cell/ras.c index 98db63b72d56..f6b87926530c 100644 --- a/arch/powerpc/platforms/cell/ras.c +++ b/arch/powerpc/platforms/cell/ras.c @@ -22,7 +22,7 @@ #include #include "ras.h" - +#include "pervasive.h" static void dump_fir(int cpu) { diff --git a/arch/powerpc/platforms/cell/spu_manage.c b/arch/powerpc/platforms/cell/spu_manage.c index 74567b32c48c..f464a1f2e568 100644 --- a/arch/powerpc/platforms/cell/spu_manage.c +++ b/arch/powerpc/platforms/cell/spu_manage.c @@ -25,6 +25,7 @@ #include "spufs/spufs.h" #include "interrupt.h" +#include "spu_priv1_mmio.h" struct device_node *spu_devnode(struct spu *spu) { diff --git a/arch/powerpc/platforms/pasemi/pasemi.h b/arch/powerpc/platforms/pasemi/pasemi.h index 3f277a200fd8..018c30665e1b 100644 --- a/arch/powerpc/platforms/pasemi/pasemi.h +++ b/arch/powerpc/platforms/pasemi/pasemi.h @@ -4,6 +4,7 @@ extern time64_t pas_get_boot_time(void); extern void pas_pci_init(void); +struct pci_dev; extern void pas_pci_irq_fixup(struct pci_dev *dev); extern void pas_pci_dma_dev_setup(struct pci_dev *dev); diff --git a/arch/powerpc/platforms/pasemi/time.c b/arch/powerpc/platforms/pasemi/time.c index ad721882c8b6..70ac6db027d0 100644 --- a/arch/powerpc/platforms/pasemi/time.c +++ b/arch/powerpc/platforms/pasemi/time.c @@ -9,6 +9,8 @@ #include +#include "pasemi.h" + time64_t __init pas_get_boot_time(void) { /* Let's just return a fake date right now */ diff --git a/arch/powerpc/platforms/powermac/feature.c b/arch/powerpc/platforms/powermac/feature.c index ed58928469b5..ed472b797e28 100644 --- a/arch/powerpc/platforms/powermac/feature.c +++ b/arch/powerpc/platforms/powermac/feature.c @@ -37,6 +37,8 @@ #include #include +#include "pmac.h" + #undef DEBUG_FEATURE #ifdef DEBUG_FEATURE -- cgit v1.2.3