powerpc/machdep: Remove stale functions from ppc_md structure
ppc_md.iommu_save() is not set anymore by any platform after commitc40785ad30
("powerpc/dart: Use a cachable DART"). So iommu_save() has become a nop and can be removed. ppc_md.show_percpuinfo() is not set anymore by any platform after commit4350147a81
("[PATCH] ppc64: SMU based macs cpufreq support"). Last users of ppc_md.rtc_read_val() and ppc_md.rtc_write_val() were removed by commit0f03a43b8f
("[POWERPC] Remove todc code from ARCH=powerpc") Last user of kgdb_map_scc() was removed by commit17ce452f7e
("kgdb, powerpc: arch specific powerpc kgdb support"). ppc.machine_kexec_prepare() has not been used since commit8ee3e0d696
("powerpc: Remove the main legacy iSerie platform code"). This allows the removal of machine_kexec_prepare() and the rename of default_machine_kexec_prepare() into machine_kexec_prepare() Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Reviewed-by: Daniel Axtens <dja@axtens.net> [mpe: Drop prototype for default_machine_kexec_prepare() as noted by dja] Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/24d4ca0ada683c9436a5f812a7aeb0a1362afa2b.1630398606.git.christophe.leroy@csgroup.eu
This commit is contained in:
parent
e606a2f46c
commit
8f7fadb4ba
|
@ -280,12 +280,6 @@ extern void iommu_init_early_dart(struct pci_controller_ops *controller_ops);
|
|||
extern void iommu_init_early_pasemi(void);
|
||||
|
||||
#if defined(CONFIG_PPC64) && defined(CONFIG_PM)
|
||||
static inline void iommu_save(void)
|
||||
{
|
||||
if (ppc_md.iommu_save)
|
||||
ppc_md.iommu_save();
|
||||
}
|
||||
|
||||
static inline void iommu_restore(void)
|
||||
{
|
||||
if (ppc_md.iommu_restore)
|
||||
|
|
|
@ -79,7 +79,6 @@ extern int crash_wake_offline;
|
|||
struct kimage;
|
||||
struct pt_regs;
|
||||
extern void default_machine_kexec(struct kimage *image);
|
||||
extern int default_machine_kexec_prepare(struct kimage *image);
|
||||
extern void default_machine_crash_shutdown(struct pt_regs *regs);
|
||||
extern int crash_shutdown_register(crash_shutdown_t handler);
|
||||
extern int crash_shutdown_unregister(crash_shutdown_t handler);
|
||||
|
|
|
@ -29,7 +29,6 @@ struct machdep_calls {
|
|||
char *name;
|
||||
#ifdef CONFIG_PPC64
|
||||
#ifdef CONFIG_PM
|
||||
void (*iommu_save)(void);
|
||||
void (*iommu_restore)(void);
|
||||
#endif
|
||||
#ifdef CONFIG_MEMORY_HOTPLUG_SPARSE
|
||||
|
@ -43,7 +42,6 @@ struct machdep_calls {
|
|||
void (*setup_arch)(void); /* Optional, may be NULL */
|
||||
/* Optional, may be NULL. */
|
||||
void (*show_cpuinfo)(struct seq_file *m);
|
||||
void (*show_percpuinfo)(struct seq_file *m, int i);
|
||||
/* Returns the current operating frequency of "cpu" in Hz */
|
||||
unsigned long (*get_proc_freq)(unsigned int cpu);
|
||||
|
||||
|
@ -74,8 +72,6 @@ struct machdep_calls {
|
|||
int (*set_rtc_time)(struct rtc_time *);
|
||||
void (*get_rtc_time)(struct rtc_time *);
|
||||
time64_t (*get_boot_time)(void);
|
||||
unsigned char (*rtc_read_val)(int addr);
|
||||
void (*rtc_write_val)(int addr, unsigned char val);
|
||||
|
||||
void (*calibrate_decr)(void);
|
||||
|
||||
|
@ -141,8 +137,6 @@ struct machdep_calls {
|
|||
May be NULL. */
|
||||
void (*init)(void);
|
||||
|
||||
void (*kgdb_map_scc)(void);
|
||||
|
||||
/*
|
||||
* optional PCI "hooks"
|
||||
*/
|
||||
|
@ -187,13 +181,6 @@ struct machdep_calls {
|
|||
#ifdef CONFIG_KEXEC_CORE
|
||||
void (*kexec_cpu_down)(int crash_shutdown, int secondary);
|
||||
|
||||
/* Called to do what every setup is needed on image and the
|
||||
* reboot code buffer. Returns 0 on success.
|
||||
* Provide your own (maybe dummy) implementation if your platform
|
||||
* claims to support kexec.
|
||||
*/
|
||||
int (*machine_kexec_prepare)(struct kimage *image);
|
||||
|
||||
/* Called to perform the _real_ kexec.
|
||||
* Do NOT allocate memory or fail here. We are past the point of
|
||||
* no return.
|
||||
|
|
|
@ -278,9 +278,6 @@ static int show_cpuinfo(struct seq_file *m, void *v)
|
|||
seq_printf(m, "clock\t\t: %lu.%06luMHz\n",
|
||||
proc_freq / 1000000, proc_freq % 1000000);
|
||||
|
||||
if (ppc_md.show_percpuinfo != NULL)
|
||||
ppc_md.show_percpuinfo(m, cpu_id);
|
||||
|
||||
/* If we are a Freescale core do a simple check so
|
||||
* we dont have to keep adding cases in the future */
|
||||
if (PVR_VER(pvr) & 0x8000) {
|
||||
|
|
|
@ -17,8 +17,3 @@ void do_after_copyback(void)
|
|||
touch_softlockup_watchdog();
|
||||
mb();
|
||||
}
|
||||
|
||||
void _iommu_save(void)
|
||||
{
|
||||
iommu_save();
|
||||
}
|
||||
|
|
|
@ -128,7 +128,6 @@ END_FW_FTR_SECTION_IFCLR(FW_FEATURE_LPAR)
|
|||
* stack pointer on the stack like a real stackframe */
|
||||
addi r1,r1,-128
|
||||
|
||||
bl _iommu_save
|
||||
bl swsusp_save
|
||||
|
||||
/* restore LR */
|
||||
|
|
|
@ -48,19 +48,6 @@ void machine_crash_shutdown(struct pt_regs *regs)
|
|||
default_machine_crash_shutdown(regs);
|
||||
}
|
||||
|
||||
/*
|
||||
* Do what every setup is needed on image and the
|
||||
* reboot code buffer to allow us to avoid allocations
|
||||
* later.
|
||||
*/
|
||||
int machine_kexec_prepare(struct kimage *image)
|
||||
{
|
||||
if (ppc_md.machine_kexec_prepare)
|
||||
return ppc_md.machine_kexec_prepare(image);
|
||||
else
|
||||
return default_machine_kexec_prepare(image);
|
||||
}
|
||||
|
||||
void machine_kexec_cleanup(struct kimage *image)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -63,7 +63,7 @@ void default_machine_kexec(struct kimage *image)
|
|||
(*rnk)(page_list, reboot_code_buffer_phys, image->start);
|
||||
}
|
||||
|
||||
int default_machine_kexec_prepare(struct kimage *image)
|
||||
int machine_kexec_prepare(struct kimage *image)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
#include <asm/svm.h>
|
||||
#include <asm/ultravisor.h>
|
||||
|
||||
int default_machine_kexec_prepare(struct kimage *image)
|
||||
int machine_kexec_prepare(struct kimage *image)
|
||||
{
|
||||
int i;
|
||||
unsigned long begin, end; /* limits of segment */
|
||||
|
|
Loading…
Reference in New Issue