patch-2.4.23 linux-2.4.23/arch/sparc64/kernel/smp.c
Next file: linux-2.4.23/arch/sparc64/kernel/sys_sparc32.c
Previous file: linux-2.4.23/arch/sparc64/kernel/setup.c
Back to the patch index
Back to the overall index
- Lines: 70
- Date:
2003-11-28 10:26:19.000000000 -0800
- Orig file:
linux-2.4.22/arch/sparc64/kernel/smp.c
- Orig date:
2003-06-13 07:51:32.000000000 -0700
diff -urN linux-2.4.22/arch/sparc64/kernel/smp.c linux-2.4.23/arch/sparc64/kernel/smp.c
@@ -133,7 +133,6 @@
static volatile unsigned long callin_flag = 0;
extern void inherit_locked_prom_mappings(int save_p);
-extern void cpu_probe(void);
void __init smp_callin(void)
{
@@ -153,8 +152,6 @@
__flush_cache_all();
__flush_tlb_all();
- cpu_probe();
-
smp_setup_percpu_timer();
__sti();
@@ -537,12 +534,19 @@
#endif
static void cheetah_xcall_deliver(u64 data0, u64 data1, u64 data2, unsigned long mask)
{
- u64 pstate;
- int nack_busy_id;
+ u64 pstate, ver;
+ int nack_busy_id, is_jalapeno;
if (!mask)
return;
+ /* Unfortunately, someone at Sun had the brilliant idea to make the
+ * busy/nack fields hard-coded by ITID number for this Ultra-III
+ * derivative processor.
+ */
+ __asm__ ("rdpr %%ver, %0" : "=r" (ver));
+ is_jalapeno = ((ver >> 32) == 0x003e0016);
+
__asm__ __volatile__("rdpr %%pstate, %0" : "=r" (pstate));
retry:
@@ -567,11 +571,13 @@
if (mask & (1UL << i)) {
u64 target = (i << 14) | 0x70;
- target |= (nack_busy_id++ << 24);
+ if (!is_jalapeno)
+ target |= (nack_busy_id << 24);
__asm__ __volatile__("stxa %%g0, [%0] %1\n\t"
"membar #Sync\n\t"
: /* no outputs */
: "r" (target), "i" (ASI_INTR_W));
+ nack_busy_id++;
ncpus--;
}
}
@@ -618,7 +624,14 @@
*/
for (i = 0; i < NR_CPUS; i++) {
if (mask & (1UL << i)) {
- if ((dispatch_stat & (0x2 << this_busy_nack)) == 0)
+ u64 check_mask;
+
+ if (is_jalapeno)
+ check_mask = (0x2UL << (2*i));
+ else
+ check_mask = (0x2UL <<
+ this_busy_nack);
+ if ((dispatch_stat & check_mask) == 0)
mask &= ~(1UL << i);
this_busy_nack += 2;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)