aboutsummaryrefslogtreecommitdiffstats
path: root/arch/parisc
diff options
context:
space:
mode:
authorKyle McMartin <kyle@parisc-linux.org>2007-01-15 12:29:25 -0500
committerKyle McMartin <kyle@athena.road.mcmartin.ca>2007-02-17 01:11:41 -0500
commit430a502abec76fd2fd9fd1df7506ccf911a6d6d2 (patch)
treef7ef175858a97587e22c5e9c6461e18d1253a166 /arch/parisc
parent5492a0f001bdf5435318edb0a68eab5f16995bff (diff)
[PARISC] kill ENTRY_SYS_CPUS
it's unlikely iCOD will ever happen on parisc-linux now... ;-) Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
Diffstat (limited to 'arch/parisc')
-rw-r--r--arch/parisc/kernel/processor.c3
-rw-r--r--arch/parisc/kernel/smp.c129
2 files changed, 0 insertions, 132 deletions
diff --git a/arch/parisc/kernel/processor.c b/arch/parisc/kernel/processor.c
index 0af1fad2fc65..b20894a01d56 100644
--- a/arch/parisc/kernel/processor.c
+++ b/arch/parisc/kernel/processor.c
@@ -337,9 +337,6 @@ show_cpuinfo (struct seq_file *m, void *v)
337#ifdef CONFIG_SMP 337#ifdef CONFIG_SMP
338 if (0 == cpu_data[n].hpa) 338 if (0 == cpu_data[n].hpa)
339 continue; 339 continue;
340#ifdef ENTRY_SYS_CPUS
341#error iCOD support wants to show CPU state here
342#endif
343#endif 340#endif
344 seq_printf(m, "processor\t: %d\n" 341 seq_printf(m, "processor\t: %d\n"
345 "cpu family\t: PA-RISC %s\n", 342 "cpu family\t: PA-RISC %s\n",
diff --git a/arch/parisc/kernel/smp.c b/arch/parisc/kernel/smp.c
index a5a730cea0f5..6ba9257fdb7f 100644
--- a/arch/parisc/kernel/smp.c
+++ b/arch/parisc/kernel/smp.c
@@ -16,9 +16,6 @@
16** the Free Software Foundation; either version 2 of the License, or 16** the Free Software Foundation; either version 2 of the License, or
17** (at your option) any later version. 17** (at your option) any later version.
18*/ 18*/
19#undef ENTRY_SYS_CPUS /* syscall support for iCOD-like functionality */
20
21
22#include <linux/types.h> 19#include <linux/types.h>
23#include <linux/spinlock.h> 20#include <linux/spinlock.h>
24#include <linux/slab.h> 21#include <linux/slab.h>
@@ -116,13 +113,6 @@ enum ipi_message_type {
116static void 113static void
117ipi_init(int cpuid) 114ipi_init(int cpuid)
118{ 115{
119
120 /* If CPU is present ... */
121#ifdef ENTRY_SYS_CPUS
122 /* *and* running (not stopped) ... */
123#error iCOD support wants state checked here.
124#endif
125
126#error verify IRQ_OFFSET(IPI_IRQ) is ipi_interrupt() in new IRQ region 116#error verify IRQ_OFFSET(IPI_IRQ) is ipi_interrupt() in new IRQ region
127 117
128 if(cpu_online(cpuid) ) 118 if(cpu_online(cpuid) )
@@ -142,23 +132,12 @@ ipi_init(int cpuid)
142static void 132static void
143halt_processor(void) 133halt_processor(void)
144{ 134{
145#ifdef ENTRY_SYS_CPUS
146#error halt_processor() needs rework
147/*
148** o migrate I/O interrupts off this CPU.
149** o leave IPI enabled - __cli() will disable IPI.
150** o leave CPU in online map - just change the state
151*/
152 cpu_data[this_cpu].state = STATE_STOPPED;
153 mark_bh(IPI_BH);
154#else
155 /* REVISIT : redirect I/O Interrupts to another CPU? */ 135 /* REVISIT : redirect I/O Interrupts to another CPU? */
156 /* REVISIT : does PM *know* this CPU isn't available? */ 136 /* REVISIT : does PM *know* this CPU isn't available? */
157 cpu_clear(smp_processor_id(), cpu_online_map); 137 cpu_clear(smp_processor_id(), cpu_online_map);
158 local_irq_disable(); 138 local_irq_disable();
159 for (;;) 139 for (;;)
160 ; 140 ;
161#endif
162} 141}
163 142
164 143
@@ -238,17 +217,11 @@ ipi_interrupt(int irq, void *dev_id)
238 217
239 case IPI_CPU_START: 218 case IPI_CPU_START:
240 smp_debug(100, KERN_DEBUG "CPU%d IPI_CPU_START\n", this_cpu); 219 smp_debug(100, KERN_DEBUG "CPU%d IPI_CPU_START\n", this_cpu);
241#ifdef ENTRY_SYS_CPUS
242 p->state = STATE_RUNNING;
243#endif
244 break; 220 break;
245 221
246 case IPI_CPU_STOP: 222 case IPI_CPU_STOP:
247 smp_debug(100, KERN_DEBUG "CPU%d IPI_CPU_STOP\n", this_cpu); 223 smp_debug(100, KERN_DEBUG "CPU%d IPI_CPU_STOP\n", this_cpu);
248#ifdef ENTRY_SYS_CPUS
249#else
250 halt_processor(); 224 halt_processor();
251#endif
252 break; 225 break;
253 226
254 case IPI_CPU_TEST: 227 case IPI_CPU_TEST:
@@ -561,9 +534,6 @@ alive:
561 /* Remember the Slave data */ 534 /* Remember the Slave data */
562 smp_debug(100, KERN_DEBUG "SMP: CPU:%d came alive after %ld _us\n", 535 smp_debug(100, KERN_DEBUG "SMP: CPU:%d came alive after %ld _us\n",
563 cpuid, timeout * 100); 536 cpuid, timeout * 100);
564#ifdef ENTRY_SYS_CPUS
565 cpu_data[cpuid].state = STATE_RUNNING;
566#endif
567 return 0; 537 return 0;
568} 538}
569 539
@@ -571,10 +541,6 @@ void __devinit smp_prepare_boot_cpu(void)
571{ 541{
572 int bootstrap_processor=cpu_data[0].cpuid; /* CPU ID of BSP */ 542 int bootstrap_processor=cpu_data[0].cpuid; /* CPU ID of BSP */
573 543
574#ifdef ENTRY_SYS_CPUS
575 cpu_data[0].state = STATE_RUNNING;
576#endif
577
578 /* Setup BSP mappings */ 544 /* Setup BSP mappings */
579 printk("SMP: bootstrap CPU ID is %d\n",bootstrap_processor); 545 printk("SMP: bootstrap CPU ID is %d\n",bootstrap_processor);
580 546
@@ -613,101 +579,6 @@ int __cpuinit __cpu_up(unsigned int cpu)
613 return cpu_online(cpu) ? 0 : -ENOSYS; 579 return cpu_online(cpu) ? 0 : -ENOSYS;
614} 580}
615 581
616
617
618#ifdef ENTRY_SYS_CPUS
619/* Code goes along with:
620** entry.s: ENTRY_NAME(sys_cpus) / * 215, for cpu stat * /
621*/
622int sys_cpus(int argc, char **argv)
623{
624 int i,j=0;
625 extern int current_pid(int cpu);
626
627 if( argc > 2 ) {
628 printk("sys_cpus:Only one argument supported\n");
629 return (-1);
630 }
631 if ( argc == 1 ){
632
633#ifdef DUMP_MORE_STATE
634 for_each_online_cpu(i) {
635 int cpus_per_line = 4;
636
637 if (j++ % cpus_per_line)
638 printk(" %3d",i);
639 else
640 printk("\n %3d",i);
641 }
642 printk("\n");
643#else
644 printk("\n 0\n");
645#endif
646 } else if((argc==2) && !(strcmp(argv[1],"-l"))) {
647 printk("\nCPUSTATE TASK CPUNUM CPUID HARDCPU(HPA)\n");
648#ifdef DUMP_MORE_STATE
649 for_each_online_cpu(i) {
650 if (cpu_data[i].cpuid != NO_PROC_ID) {
651 switch(cpu_data[i].state) {
652 case STATE_RENDEZVOUS:
653 printk("RENDEZVS ");
654 break;
655 case STATE_RUNNING:
656 printk((current_pid(i)!=0) ? "RUNNING " : "IDLING ");
657 break;
658 case STATE_STOPPED:
659 printk("STOPPED ");
660 break;
661 case STATE_HALTED:
662 printk("HALTED ");
663 break;
664 default:
665 printk("%08x?", cpu_data[i].state);
666 break;
667 }
668 if(cpu_online(i)) {
669 printk(" %4d",current_pid(i));
670 }
671 printk(" %6d",cpu_number_map(i));
672 printk(" %5d",i);
673 printk(" 0x%lx\n",cpu_data[i].hpa);
674 }
675 }
676#else
677 printk("\n%s %4d 0 0 --------",
678 (current->pid)?"RUNNING ": "IDLING ",current->pid);
679#endif
680 } else if ((argc==2) && !(strcmp(argv[1],"-s"))) {
681#ifdef DUMP_MORE_STATE
682 printk("\nCPUSTATE CPUID\n");
683 for_each_online_cpu(i) {
684 if (cpu_data[i].cpuid != NO_PROC_ID) {
685 switch(cpu_data[i].state) {
686 case STATE_RENDEZVOUS:
687 printk("RENDEZVS");break;
688 case STATE_RUNNING:
689 printk((current_pid(i)!=0) ? "RUNNING " : "IDLING");
690 break;
691 case STATE_STOPPED:
692 printk("STOPPED ");break;
693 case STATE_HALTED:
694 printk("HALTED ");break;
695 default:
696 }
697 printk(" %5d\n",i);
698 }
699 }
700#else
701 printk("\n%s CPU0",(current->pid==0)?"RUNNING ":"IDLING ");
702#endif
703 } else {
704 printk("sys_cpus:Unknown request\n");
705 return (-1);
706 }
707 return 0;
708}
709#endif /* ENTRY_SYS_CPUS */
710
711#ifdef CONFIG_PROC_FS 582#ifdef CONFIG_PROC_FS
712int __init 583int __init
713setup_profiling_timer(unsigned int multiplier) 584setup_profiling_timer(unsigned int multiplier)