Skip to content

Commit 1b24881

Browse files
nathanlynchmpe
authored andcommitted
powerpc/rtas: remove unused rtas_suspend_last_cpu()
rtas_suspend_last_cpu() is now unused, remove it and __rtas_suspend_last_cpu() which also becomes unused. Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20201207215200.1785968-24-nathanl@linux.ibm.com
1 parent 366fb13 commit 1b24881

2 files changed

Lines changed: 0 additions & 44 deletions

File tree

‎arch/powerpc/include/asm/rtas.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,6 @@ extern bool rtas_indicator_present(int token, int *maxindex);
256256
extern int rtas_set_indicator(int indicator, int index, int new_value);
257257
extern int rtas_set_indicator_fast(int indicator, int index, int new_value);
258258
extern void rtas_progress(char *s, unsigned short hex);
259-
extern int rtas_suspend_last_cpu(struct rtas_suspend_me_data *data);
260259
int rtas_ibm_suspend_me(int *fw_status);
261260

262261
struct rtc_time;

‎arch/powerpc/kernel/rtas.c‎

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -830,49 +830,6 @@ void rtas_activate_firmware(void)
830830

831831
static int ibm_suspend_me_token = RTAS_UNKNOWN_SERVICE;
832832
#ifdef CONFIG_PPC_PSERIES
833-
static int __rtas_suspend_last_cpu(struct rtas_suspend_me_data *data, int wake_when_done)
834-
{
835-
u16 slb_size = mmu_slb_size;
836-
int rc = H_MULTI_THREADS_ACTIVE;
837-
int cpu;
838-
839-
slb_set_size(SLB_MIN_SIZE);
840-
printk(KERN_DEBUG "calling ibm,suspend-me on cpu %i\n", smp_processor_id());
841-
842-
while (rc == H_MULTI_THREADS_ACTIVE && !atomic_read(&data->done) &&
843-
!atomic_read(&data->error))
844-
rc = rtas_call(data->token, 0, 1, NULL);
845-
846-
if (rc || atomic_read(&data->error)) {
847-
printk(KERN_DEBUG "ibm,suspend-me returned %d\n", rc);
848-
slb_set_size(slb_size);
849-
}
850-
851-
if (atomic_read(&data->error))
852-
rc = atomic_read(&data->error);
853-
854-
atomic_set(&data->error, rc);
855-
pSeries_coalesce_init();
856-
857-
if (wake_when_done) {
858-
atomic_set(&data->done, 1);
859-
860-
for_each_online_cpu(cpu)
861-
plpar_hcall_norets(H_PROD, get_hard_smp_processor_id(cpu));
862-
}
863-
864-
if (atomic_dec_return(&data->working) == 0)
865-
complete(data->complete);
866-
867-
return rc;
868-
}
869-
870-
int rtas_suspend_last_cpu(struct rtas_suspend_me_data *data)
871-
{
872-
atomic_inc(&data->working);
873-
return __rtas_suspend_last_cpu(data, 0);
874-
}
875-
876833
/**
877834
* rtas_call_reentrant() - Used for reentrant rtas calls
878835
* @token: Token for desired reentrant RTAS call

0 commit comments

Comments
 (0)