A series from Baoquan He cleans up the asm-generic/io.h to remove the ioremap_uc() definition from everything except x86, which still needs it for pre-PAT systems. This series notably contains a patch from Jiaxun Yang that converts MIPS to use asm-generic/io.h like every other architecture does, enabling future cleanups. Some of my own patches fix -Wmissing-prototype warnings in architecture specific code across several architectures. This is now needed as the warning is enabled by default. There are still some remaining warnings in minor platforms, but the series should catch most of the widely used ones make them more consistent with one another. David McKay fixes a bug in __generic_cmpxchg_local() when this is used on 64-bit architectures. This could currently only affect parisc64 and sparc64. Additional cleanups address from Linus Walleij, Uwe Kleine-König, Thomas Huth, and Kefeng Wang help reduce unnecessary inconsistencies between architectures. -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmWeak8ACgkQYKtH/8kJ UidSiQ/+LL1WTO9d3Zx5HI0GGGjaIYpYs6jUNSf9Y5GPQiOrvjfEWj7CU11/4vxl GlQRpRyncYm8Eiz0Qu+aNxZFiiMah8Uful75yfbX8P1L4EPTbAYNDjkyNJrTjIAK jPK4sl8awIrapOeFUz++PsEj22R/4Is4f0mo+CqoCkL5RKlHe5oFdXzcwjmds4yK CvU6Ldn+M7FZ3EItMdjXaB3D3HS9uictFiO5JByZY8p+IcqgNRI/iHNnZIMsltJ+ XjDi0DG+x4jCj6teElSchw7AofE4OcNSP3xbR1PLKv6+xBLGYaAGZhNuPTz88eV/ Gj0loDQrrR5McGUfDBRHK9zN2Jd0O/FKnfh9kLOt1FLFyGPvC78Q/2HkpVCjbBr2 Pr1aqhLDHA+tGNSsThsV8RUa8/tiEnxAki43tfBFS3SEKhtQsTm2g1z4miwbE3p0 BJIrSgTqrP/SBq7a9z/thPrkzdZcNuA9FUETTbaMeUlJS51n1V9E5A1t7sOG7jaI vV/gbuR6FjvD49mTyQiOSCt3V4ygRqgN1Q+C4QM8WLqq2keUq0AhGodquv8F78in J3x2j2r27lHY7jKf8B0dua/JXAsF20u8qD6yDQ9ymkjt/MWhGXBgK0jpT7RTIuMS e2jmTywUVD4UohAcx3inkOojUhIJ5KDB0I4Pzv4zWcHNbyFNKcY= =4VQl -----END PGP SIGNATURE----- Merge tag 'asm-generic-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic Pull asm-generic cleanups from Arnd Bergmann: "A series from Baoquan He cleans up the asm-generic/io.h to remove the ioremap_uc() definition from everything except x86, which still needs it for pre-PAT systems. This series notably contains a patch from Jiaxun Yang that converts MIPS to use asm-generic/io.h like every other architecture does, enabling future cleanups. Some of my own patches fix -Wmissing-prototype warnings in architecture specific code across several architectures. This is now needed as the warning is enabled by default. There are still some remaining warnings in minor platforms, but the series should catch most of the widely used ones make them more consistent with one another. David McKay fixes a bug in __generic_cmpxchg_local() when this is used on 64-bit architectures. This could currently only affect parisc64 and sparc64. Additional cleanups address from Linus Walleij, Uwe Kleine-König, Thomas Huth, and Kefeng Wang help reduce unnecessary inconsistencies between architectures" * tag 'asm-generic-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic: asm-generic: Fix 32 bit __generic_cmpxchg_local Hexagon: Make pfn accessors statics inlines ARC: mm: Make virt_to_pfn() a static inline mips: remove extraneous asm-generic/iomap.h include sparc: Use $(kecho) to announce kernel images being ready arm64: vdso32: Define BUILD_VDSO32_64 to correct prototypes csky: fix arch_jump_label_transform_static override arch: add do_page_fault prototypes arch: add missing prepare_ftrace_return() prototypes arch: vdso: consolidate gettime prototypes arch: include linux/cpu.h for trap_init() prototype arch: fix asm-offsets.c building with -Wmissing-prototypes arch: consolidate arch_irq_work_raise prototypes hexagon: Remove CONFIG_HEXAGON_ARCH_VERSION from uapi header asm/io: remove unnecessary xlate_dev_mem_ptr() and unxlate_dev_mem_ptr() mips: io: remove duplicated codes arch/*/io.h: remove ioremap_uc in some architectures mips: add <asm-generic/io.h> including
107 lines
2.2 KiB
C
107 lines
2.2 KiB
C
/*
|
|
* This file is subject to the terms and conditions of the GNU General
|
|
* Public License. See the file "COPYING" in the main directory of this
|
|
* archive for more details.
|
|
*
|
|
* Copyright (C) 2000 - 2001 by Kanoj Sarcar (kanoj@sgi.com)
|
|
* Copyright (C) 2000 - 2001 by Silicon Graphics, Inc.
|
|
* Copyright (C) 2000, 2001, 2002 Ralf Baechle
|
|
* Copyright (C) 2000, 2001 Broadcom Corporation
|
|
*/
|
|
#ifndef __ASM_SMP_OPS_H
|
|
#define __ASM_SMP_OPS_H
|
|
|
|
#include <linux/errno.h>
|
|
|
|
#ifdef CONFIG_SMP
|
|
|
|
#include <linux/cpumask.h>
|
|
|
|
struct task_struct;
|
|
|
|
struct plat_smp_ops {
|
|
void (*send_ipi_single)(int cpu, unsigned int action);
|
|
void (*send_ipi_mask)(const struct cpumask *mask, unsigned int action);
|
|
void (*init_secondary)(void);
|
|
void (*smp_finish)(void);
|
|
int (*boot_secondary)(int cpu, struct task_struct *idle);
|
|
void (*smp_setup)(void);
|
|
void (*prepare_cpus)(unsigned int max_cpus);
|
|
void (*prepare_boot_cpu)(void);
|
|
#ifdef CONFIG_HOTPLUG_CPU
|
|
int (*cpu_disable)(void);
|
|
void (*cpu_die)(unsigned int cpu);
|
|
void (*cleanup_dead_cpu)(unsigned cpu);
|
|
#endif
|
|
#ifdef CONFIG_KEXEC_CORE
|
|
void (*kexec_nonboot_cpu)(void);
|
|
#endif
|
|
};
|
|
|
|
extern void register_smp_ops(const struct plat_smp_ops *ops);
|
|
|
|
static inline void plat_smp_setup(void)
|
|
{
|
|
extern const struct plat_smp_ops *mp_ops; /* private */
|
|
|
|
mp_ops->smp_setup();
|
|
}
|
|
|
|
extern void mips_smp_send_ipi_single(int cpu, unsigned int action);
|
|
extern void mips_smp_send_ipi_mask(const struct cpumask *mask,
|
|
unsigned int action);
|
|
|
|
#else /* !CONFIG_SMP */
|
|
|
|
struct plat_smp_ops;
|
|
|
|
static inline void plat_smp_setup(void)
|
|
{
|
|
/* UP, nothing to do ... */
|
|
}
|
|
|
|
static inline void register_smp_ops(const struct plat_smp_ops *ops)
|
|
{
|
|
}
|
|
|
|
#endif /* !CONFIG_SMP */
|
|
|
|
static inline int register_up_smp_ops(void)
|
|
{
|
|
#ifdef CONFIG_SMP_UP
|
|
extern const struct plat_smp_ops up_smp_ops;
|
|
|
|
register_smp_ops(&up_smp_ops);
|
|
|
|
return 0;
|
|
#else
|
|
return -ENODEV;
|
|
#endif
|
|
}
|
|
|
|
static inline int register_vsmp_smp_ops(void)
|
|
{
|
|
#ifdef CONFIG_MIPS_MT_SMP
|
|
extern const struct plat_smp_ops vsmp_smp_ops;
|
|
|
|
if (!cpu_has_mipsmt)
|
|
return -ENODEV;
|
|
|
|
register_smp_ops(&vsmp_smp_ops);
|
|
|
|
return 0;
|
|
#else
|
|
return -ENODEV;
|
|
#endif
|
|
}
|
|
|
|
#ifdef CONFIG_MIPS_CPS
|
|
extern int register_cps_smp_ops(void);
|
|
#else
|
|
static inline int register_cps_smp_ops(void)
|
|
{
|
|
return -ENODEV;
|
|
}
|
|
#endif
|
|
|
|
#endif /* __ASM_SMP_OPS_H */
|