Commit bedd4ac0 authored by Keith M. Wesolowski's avatar Keith M. Wesolowski

[SPARC32]: Rename cpuid functions

smp_processor_id is to be used when current_thread_info()->cpu is
valid; i.e. almost always.  Early on or when setting that field,
hard_smp_processor_id is used.  Clarify the distinction and only
export to modules what's really needed.  smp_processor_id is not
model-specific, so we no longer need btfixups for it.
parent 4ea21dd5
...@@ -183,7 +183,7 @@ EXPORT_SYMBOL(io_remap_page_range); ...@@ -183,7 +183,7 @@ EXPORT_SYMBOL(io_remap_page_range);
#ifndef CONFIG_SMP #ifndef CONFIG_SMP
EXPORT_SYMBOL_NOVERS(BTFIXUP_CALL(___xchg32)); EXPORT_SYMBOL_NOVERS(BTFIXUP_CALL(___xchg32));
#else #else
EXPORT_SYMBOL_NOVERS(BTFIXUP_CALL(__smp_processor_id)); EXPORT_SYMBOL_NOVERS(BTFIXUP_CALL(__hard_smp_processor_id));
#endif #endif
EXPORT_SYMBOL_NOVERS(BTFIXUP_CALL(enable_irq)); EXPORT_SYMBOL_NOVERS(BTFIXUP_CALL(enable_irq));
EXPORT_SYMBOL_NOVERS(BTFIXUP_CALL(disable_irq)); EXPORT_SYMBOL_NOVERS(BTFIXUP_CALL(disable_irq));
......
...@@ -53,8 +53,8 @@ void smp_info(struct seq_file *); ...@@ -53,8 +53,8 @@ void smp_info(struct seq_file *);
BTFIXUPDEF_CALL(void, smp_cross_call, smpfunc_t, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long) BTFIXUPDEF_CALL(void, smp_cross_call, smpfunc_t, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long)
BTFIXUPDEF_CALL(void, smp_message_pass, int, int, unsigned long, int) BTFIXUPDEF_CALL(void, smp_message_pass, int, int, unsigned long, int)
BTFIXUPDEF_CALL(int, __smp_processor_id, void) BTFIXUPDEF_CALL(int, __hard_smp_processor_id, void)
BTFIXUPDEF_BLACKBOX(smp_processor_id) BTFIXUPDEF_BLACKBOX(hard_smp_processor_id)
BTFIXUPDEF_BLACKBOX(load_current) BTFIXUPDEF_BLACKBOX(load_current)
#define smp_cross_call(func,arg1,arg2,arg3,arg4,arg5) BTFIXUP_CALL(smp_cross_call)(func,arg1,arg2,arg3,arg4,arg5) #define smp_cross_call(func,arg1,arg2,arg3,arg4,arg5) BTFIXUP_CALL(smp_cross_call)(func,arg1,arg2,arg3,arg4,arg5)
...@@ -129,7 +129,7 @@ extern __inline__ int hard_smp_processor_id(void) ...@@ -129,7 +129,7 @@ extern __inline__ int hard_smp_processor_id(void)
"=&r" (cpuid)); "=&r" (cpuid));
See btfixup.h and btfixupprep.c to understand how a blackbox works. See btfixup.h and btfixupprep.c to understand how a blackbox works.
*/ */
__asm__ __volatile__("sethi %%hi(___b_smp_processor_id), %0\n\t" __asm__ __volatile__("sethi %%hi(___b_hard_smp_processor_id), %0\n\t"
"sethi %%hi(boot_cpu_id), %0\n\t" "sethi %%hi(boot_cpu_id), %0\n\t"
"ldub [%0 + %%lo(boot_cpu_id)], %0\n\t" : "ldub [%0 + %%lo(boot_cpu_id)], %0\n\t" :
"=&r" (cpuid)); "=&r" (cpuid));
...@@ -141,7 +141,7 @@ extern __inline__ int hard_smp_processor_id(void) ...@@ -141,7 +141,7 @@ extern __inline__ int hard_smp_processor_id(void)
int cpuid; int cpuid;
__asm__ __volatile__("mov %%o7, %%g1\n\t" __asm__ __volatile__("mov %%o7, %%g1\n\t"
"call ___f___smp_processor_id\n\t" "call ___f___hard_smp_processor_id\n\t"
" nop\n\t" " nop\n\t"
"mov %%g2, %0\n\t" : "=r"(cpuid) : : "g1", "g2"); "mov %%g2, %0\n\t" : "=r"(cpuid) : : "g1", "g2");
return cpuid; return cpuid;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment