Skip to content

Commit 5f6665e

Browse files
nathanlynchmpe
authored andcommitted
powerpc/rtas: remove rtas_ibm_suspend_me_unsafe()
rtas_ibm_suspend_me_unsafe() is now unused; remove it and rtas_percpu_suspend_me() which becomes unused as a result. 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-17-nathanl@linux.ibm.com
1 parent 4d75689 commit 5f6665e

File tree

2 files changed

+1
-67
lines changed

2 files changed

+1
-67
lines changed

arch/powerpc/include/asm/rtas.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,6 @@ extern int rtas_set_indicator_fast(int indicator, int index, int new_value);
258258
extern void rtas_progress(char *s, unsigned short hex);
259259
extern int rtas_suspend_cpu(struct rtas_suspend_me_data *data);
260260
extern int rtas_suspend_last_cpu(struct rtas_suspend_me_data *data);
261-
int rtas_ibm_suspend_me_unsafe(u64 handle);
262261
int rtas_ibm_suspend_me(int *fw_status);
263262

264263
struct rtc_time;

arch/powerpc/kernel/rtas.c

Lines changed: 1 addition & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -925,66 +925,6 @@ int rtas_suspend_cpu(struct rtas_suspend_me_data *data)
925925
return __rtas_suspend_cpu(data, 0);
926926
}
927927

928-
static void rtas_percpu_suspend_me(void *info)
929-
{
930-
__rtas_suspend_cpu((struct rtas_suspend_me_data *)info, 1);
931-
}
932-
933-
int rtas_ibm_suspend_me_unsafe(u64 handle)
934-
{
935-
long state;
936-
long rc;
937-
unsigned long retbuf[PLPAR_HCALL_BUFSIZE];
938-
struct rtas_suspend_me_data data;
939-
DECLARE_COMPLETION_ONSTACK(done);
940-
941-
if (!rtas_service_present("ibm,suspend-me"))
942-
return -ENOSYS;
943-
944-
/* Make sure the state is valid */
945-
rc = plpar_hcall(H_VASI_STATE, retbuf, handle);
946-
947-
state = retbuf[0];
948-
949-
if (rc) {
950-
printk(KERN_ERR "rtas_ibm_suspend_me: vasi_state returned %ld\n",rc);
951-
return rc;
952-
} else if (state == H_VASI_ENABLED) {
953-
return -EAGAIN;
954-
} else if (state != H_VASI_SUSPENDING) {
955-
printk(KERN_ERR "rtas_ibm_suspend_me: vasi_state returned state %ld\n",
956-
state);
957-
return -EIO;
958-
}
959-
960-
atomic_set(&data.working, 0);
961-
atomic_set(&data.done, 0);
962-
atomic_set(&data.error, 0);
963-
data.token = rtas_token("ibm,suspend-me");
964-
data.complete = &done;
965-
966-
lock_device_hotplug();
967-
968-
cpu_hotplug_disable();
969-
970-
/* Call function on all CPUs. One of us will make the
971-
* rtas call
972-
*/
973-
on_each_cpu(rtas_percpu_suspend_me, &data, 0);
974-
975-
wait_for_completion(&done);
976-
977-
if (atomic_read(&data.error) != 0)
978-
printk(KERN_ERR "Error doing global join\n");
979-
980-
981-
cpu_hotplug_enable();
982-
983-
unlock_device_hotplug();
984-
985-
return atomic_read(&data.error);
986-
}
987-
988928
/**
989929
* rtas_call_reentrant() - Used for reentrant rtas calls
990930
* @token: Token for desired reentrant RTAS call
@@ -1035,12 +975,7 @@ int rtas_call_reentrant(int token, int nargs, int nret, int *outputs, ...)
1035975
return ret;
1036976
}
1037977

1038-
#else /* CONFIG_PPC_PSERIES */
1039-
int rtas_ibm_suspend_me_unsafe(u64 handle)
1040-
{
1041-
return -ENOSYS;
1042-
}
1043-
#endif
978+
#endif /* CONFIG_PPC_PSERIES */
1044979

1045980
/**
1046981
* Find a specific pseries error log in an RTAS extended event log.

0 commit comments

Comments
 (0)