root/arch/sparc/kernel/c_mp.c

/* [previous][next][first][last][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. sparc_cpu_init
  2. sparc_cpu_idle

   1 /* mp.c:  SMP cpu idling and dispatch on the Sparc.
   2  *
   3  * Copyright (C) 1995 David S. Miller
   4  */
   5 
   6 #include <asm/mp.h>
   7 #include <asm/mbus.h>
   8 
   9 struct sparc_percpu *percpu_table;
  10 
  11 void
  12 sparc_cpu_init(void)
     /* [previous][next][first][last][top][bottom][index][help] */
  13 {
  14         /* We now have our per-cpu mappings ok, and we should
  15          * be good to go.
  16          */
  17 
  18         /* Do cache crap here. */
  19 
  20         /* CPU initted, idle the puppy. */
  21 
  22         return;
  23 }
  24 
  25 extern thiscpus_mid;
  26 
  27 void
  28 sparc_cpu_idle(void)
     /* [previous][next][first][last][top][bottom][index][help] */
  29 {
  30         int cpuid;
  31 
  32 /*      cpuid = get_cpuid(); */
  33         cpuid = (thiscpus_mid&(~8));
  34 /*      printk("SMP: cpu%d has entered idle loop", cpuid); */
  35 
  36         /* Say that we exist and set up. */
  37         percpu_table[cpuid].cpuid = cpuid;
  38         percpu_table[cpuid].cpu_is_alive = 0x1;
  39         percpu_table[cpuid].cpu_is_idling = 0x1;
  40 
  41         /* Let other cpus catch up. */
  42         while(linux_smp_still_initting) ;
  43         printk("cpu%d done spinning\n", get_cpuid());
  44         for(;;) ;  /* Do something useful here... */
  45 
  46         return;
  47 }       

/* [previous][next][first][last][top][bottom][index][help] */