linux/arch/powerpc/platforms/pseries
Nathan Lynch 9be4feb768 powerpc/rtas_pci: rename and properly expose config access APIs
The rtas_read_config() and rtas_write_config() functions in
kernel/rtas_pci.c have external linkage and two users in arch/powerpc:
the rtas_pci code itself and the pseries platform's "enhanced error
handling" (EEH) support code.

The prototypes for these functions in asm/ppc-pci.h have until now
been guarded by CONFIG_EEH since the only external caller is the
pseries EEH code. However, this presumably has always generated
warnings when built with !CONFIG_EEH and -Wmissing-prototypes:

  arch/powerpc/kernel/rtas_pci.c:46:5: error: no previous prototype for
  function 'rtas_read_config' [-Werror,-Wmissing-prototypes]
     46 | int rtas_read_config(struct pci_dn *pdn, int where,
                               int size, u32 *val)

  arch/powerpc/kernel/rtas_pci.c:98:5: error: no previous prototype for
  function 'rtas_write_config' [-Werror,-Wmissing-prototypes]
     98 | int rtas_write_config(struct pci_dn *pdn, int where,
                                int size, u32 val)

The introduction of commit c6345dfa6e3e ("Makefile.extrawarn: turn on
missing-prototypes globally") forces the issue.

The efika and chrp platform code have (static) functions with the same
names but different signatures. We may as well eliminate the potential
for conflicts and confusion by renaming the globally visible versions
as their prototypes get moved out of the CONFIG_EEH-guarded region;
their current names are too generic anyway. Since they operate on
objects of the type 'struct pci_dn *', give them the slightly more
verbose prefix "rtas_pci_dn_" and fix up all the call sites.

Fixes: c6345dfa6e3e ("Makefile.extrawarn: turn on missing-prototypes globally")
Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
Closes: https://lore.kernel.org/linuxppc-dev/CA+G9fYt0LLXtjSz+Hkf3Fhm-kf0ZQanrhUS+zVZGa3O+Wt2+vg@mail.gmail.com/
Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20231127-rtas-pci-rw-config-v1-1-385d29ace3df@linux.ibm.com
2023-11-28 21:49:45 +11:00
..
cc_platform.c
cmm.c mm: Convert all PageMovable users to movable_operations 2022-08-02 12:34:03 -04:00
dlpar.c powerpc, workqueue: Use alloc_ordered_workqueue() to create ordered workqueues 2023-05-08 13:52:27 -10:00
dtl.c powerpc/pseries: Fix CONFIG_DTL=n build 2022-10-13 22:30:07 +11:00
eeh_pseries.c powerpc/rtas_pci: rename and properly expose config access APIs 2023-11-28 21:49:45 +11:00
event_sources.c
firmware.c powerpc/pseries: Add FW_FEATURE_PLPKS feature flag 2023-04-20 13:21:46 +10:00
hotplug-cpu.c powerpc/pseries: Honour current SMT state when DLPAR onlining CPUs 2023-08-02 22:49:46 +10:00
hotplug-memory.c powerpc: Annotate endianness of various variables and functions 2023-10-19 17:12:47 +11:00
hvCall_inst.c
hvCall.S powerpc/pseries: Remove unused r0 in the hcall tracing code 2023-09-30 22:52:18 +10:00
hvconsole.c
hvcserver.c powerpc: move from strlcpy with unused retval to strscpy 2022-08-26 11:02:20 +10:00
ibmebus.c powerpc/pseries: fix possible memory leak in ibmebus_bus_init() 2023-08-16 23:54:48 +10:00
io_event_irq.c powerpc/rtas: arch-wide function token lookup conversions 2023-02-13 22:35:03 +11:00
iommu.c powerpc/pseries/iommu: enable_ddw incorrectly returns direct mapping for SR-IOV device 2023-10-19 23:36:03 +11:00
Kconfig powerpc/pseries: PLPKS SED Opal keystore support 2023-10-17 09:10:06 -06:00
kexec.c powerpc: Don't include asm/setup.h in asm/machdep.h 2022-06-20 11:29:49 +10:00
lpar.c powerpc/pseries: fix potential memory leak in init_cpu_associativity() 2023-10-20 17:32:14 +11:00
lparcfg.c powerpc/pseries: Rework lppaca_shared_proc() to avoid DEBUG_PREEMPT 2023-08-24 22:33:17 +10:00
Makefile powerpc/pseries: PLPKS SED Opal keystore support 2023-10-17 09:10:06 -06:00
mobility.c powerpc: Remove now superfluous sentinel element from ctl_table arrays 2023-10-10 15:22:02 -07:00
msi.c powerpc/rtas: arch-wide function token lookup conversions 2023-02-13 22:35:03 +11:00
nvram.c powerpc/rtas: arch-wide function token lookup conversions 2023-02-13 22:35:03 +11:00
of_helpers.c
of_helpers.h
papr_platform_attributes.c powerpc: Include asm/firmware.h in all users of firmware_has_feature() 2022-06-29 16:45:05 +10:00
papr_scm.c powerpc/papr_scm: Update the NUMA distance table for the target node 2023-04-04 22:08:35 +10:00
papr-sysparm.c powerpc/rtas: arch-wide function token lookup conversions 2023-02-13 22:35:03 +11:00
pci_dlpar.c powerpc/pseries: Fix use after free in remove_phb_dynamic() 2022-03-21 13:17:47 +11:00
pci.c PCI: Introduce pci_dev_for_each_resource() 2023-04-04 10:43:52 -05:00
plpks_sed_ops.c powerpc/pseries: PLPKS SED Opal keystore support 2023-10-17 09:10:06 -06:00
plpks-secvar.c powerpc/pseries: Fix endianness issue when parsing PLPKS secvar flags 2023-02-16 21:16:22 +11:00
plpks.c powerpc/pseries: use kfree_sensitive() in plpks_gen_password() 2023-10-20 23:22:17 +11:00
pmem.c powerpc: Remove asm/prom.h from all files that don't need it 2022-05-08 22:15:04 +10:00
power.c powerpc: declare unmodified attribute_group usages const 2022-03-08 22:15:32 +11:00
pseries_energy.c powerpc/pseries: move to use bus_get_dev_root() 2023-03-17 15:29:38 +01:00
pseries.h powerpc/rtas: Move post_mobility_fixup() declaration to pseries 2023-11-21 12:06:50 +11:00
ras.c powerpc/rtas: arch-wide function token lookup conversions 2023-02-13 22:35:03 +11:00
reconfig.c powerpc/pseries: block untrusted device tree changes when locked down 2022-09-28 19:22:14 +10:00
rng.c powerpc/pseries: wire up rng during setup_arch() 2022-06-18 10:19:10 +10:00
rtas-fadump.c powerpc: Add missing headers 2022-05-08 22:15:40 +10:00
rtas-fadump.h
rtas-work-area.c powerpc/pseries/rtas-work-area: Fix rtas_work_area_reserve_arena() kernel-doc 2023-11-07 13:13:44 +11:00
setup.c powerpc/pseries: Rework lppaca_shared_proc() to avoid DEBUG_PREEMPT 2023-08-24 22:33:17 +10:00
smp.c powerpc/rtas: arch-wide function token lookup conversions 2023-02-13 22:35:03 +11:00
suspend.c powerpc/rtas: Move post_mobility_fixup() declaration to pseries 2023-11-21 12:06:50 +11:00
svm.c swiotlb: add a SWIOTLB_ANY flag to lift the low memory restriction 2022-04-18 07:21:12 +02:00
vas-sysfs.c powerpc/pseries/vas: Call misc_deregister if sysfs init fails 2022-05-22 15:58:31 +10:00
vas.c powerpc/vas: Limit open window failure messages in log bufffer 2023-10-20 17:10:03 +11:00
vas.h powerpc/pseries: Use lparcfg to reconfig VAS windows for DLPAR CPU 2022-10-18 22:46:18 +11:00
vio.c powerpc updates for 6.4 2023-04-28 16:24:32 -07:00
vphn.c powerpc/pseries: Move VPHN constants into vphn.h 2023-08-24 22:33:16 +10:00