Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

authored by

Nathan Lynch and committed by
Michael Ellerman
1b248817 366fb13b

-44
-1
arch/powerpc/include/asm/rtas.h
··· 256 256 extern int rtas_set_indicator(int indicator, int index, int new_value); 257 257 extern int rtas_set_indicator_fast(int indicator, int index, int new_value); 258 258 extern void rtas_progress(char *s, unsigned short hex); 259 - extern int rtas_suspend_last_cpu(struct rtas_suspend_me_data *data); 260 259 int rtas_ibm_suspend_me(int *fw_status); 261 260 262 261 struct rtc_time;
-43
arch/powerpc/kernel/rtas.c
··· 830 830 831 831 static int ibm_suspend_me_token = RTAS_UNKNOWN_SERVICE; 832 832 #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 - 876 833 /** 877 834 * rtas_call_reentrant() - Used for reentrant rtas calls 878 835 * @token: Token for desired reentrant RTAS call