smp.c (5b929bd11df23922daf1be5d52731cc3900c1d79) | smp.c (787047eea24a2443c366679ae6b5a3873a33b64e) |
---|---|
1/* 2 * linux/arch/arm/kernel/smp.c 3 * 4 * Copyright (C) 2002 ARM Limited, All Rights Reserved. 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License version 2 as 8 * published by the Free Software Foundation. --- 161 unchanged lines hidden (view full) --- 170 return 1; 171} 172 173static int platform_cpu_disable(unsigned int cpu) 174{ 175 if (smp_ops.cpu_disable) 176 return smp_ops.cpu_disable(cpu); 177 | 1/* 2 * linux/arch/arm/kernel/smp.c 3 * 4 * Copyright (C) 2002 ARM Limited, All Rights Reserved. 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License version 2 as 8 * published by the Free Software Foundation. --- 161 unchanged lines hidden (view full) --- 170 return 1; 171} 172 173static int platform_cpu_disable(unsigned int cpu) 174{ 175 if (smp_ops.cpu_disable) 176 return smp_ops.cpu_disable(cpu); 177 |
178 return 0; 179} 180 181int platform_can_hotplug_cpu(unsigned int cpu) 182{ 183 /* cpu_die must be specified to support hotplug */ 184 if (!smp_ops.cpu_die) 185 return 0; 186 187 if (smp_ops.cpu_can_disable) 188 return smp_ops.cpu_can_disable(cpu); 189 |
|
178 /* 179 * By default, allow disabling all CPUs except the first one, 180 * since this is special on a lot of platforms, e.g. because 181 * of clock tick interrupts. 182 */ | 190 /* 191 * By default, allow disabling all CPUs except the first one, 192 * since this is special on a lot of platforms, e.g. because 193 * of clock tick interrupts. 194 */ |
183 return cpu == 0 ? -EPERM : 0; | 195 return cpu != 0; |
184} | 196} |
197 |
|
185/* 186 * __cpu_disable runs on the processor to be shutdown. 187 */ 188int __cpu_disable(void) 189{ 190 unsigned int cpu = smp_processor_id(); 191 int ret; 192 --- 380 unchanged lines hidden (view full) --- 573} 574 575void handle_IPI(int ipinr, struct pt_regs *regs) 576{ 577 unsigned int cpu = smp_processor_id(); 578 struct pt_regs *old_regs = set_irq_regs(regs); 579 580 if ((unsigned)ipinr < NR_IPI) { | 198/* 199 * __cpu_disable runs on the processor to be shutdown. 200 */ 201int __cpu_disable(void) 202{ 203 unsigned int cpu = smp_processor_id(); 204 int ret; 205 --- 380 unchanged lines hidden (view full) --- 586} 587 588void handle_IPI(int ipinr, struct pt_regs *regs) 589{ 590 unsigned int cpu = smp_processor_id(); 591 struct pt_regs *old_regs = set_irq_regs(regs); 592 593 if ((unsigned)ipinr < NR_IPI) { |
581 trace_ipi_entry_rcuidle(ipi_types[ipinr]); | 594 trace_ipi_entry(ipi_types[ipinr]); |
582 __inc_irq_stat(cpu, ipi_irqs[ipinr]); 583 } 584 585 switch (ipinr) { 586 case IPI_WAKEUP: 587 break; 588 589#ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST --- 42 unchanged lines hidden (view full) --- 632 633 default: 634 pr_crit("CPU%u: Unknown IPI message 0x%x\n", 635 cpu, ipinr); 636 break; 637 } 638 639 if ((unsigned)ipinr < NR_IPI) | 595 __inc_irq_stat(cpu, ipi_irqs[ipinr]); 596 } 597 598 switch (ipinr) { 599 case IPI_WAKEUP: 600 break; 601 602#ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST --- 42 unchanged lines hidden (view full) --- 645 646 default: 647 pr_crit("CPU%u: Unknown IPI message 0x%x\n", 648 cpu, ipinr); 649 break; 650 } 651 652 if ((unsigned)ipinr < NR_IPI) |
640 trace_ipi_exit_rcuidle(ipi_types[ipinr]); | 653 trace_ipi_exit(ipi_types[ipinr]); |
641 set_irq_regs(old_regs); 642} 643 644void smp_send_reschedule(int cpu) 645{ 646 smp_cross_call(cpumask_of(cpu), IPI_RESCHEDULE); 647} 648 --- 78 unchanged lines hidden --- | 654 set_irq_regs(old_regs); 655} 656 657void smp_send_reschedule(int cpu) 658{ 659 smp_cross_call(cpumask_of(cpu), IPI_RESCHEDULE); 660} 661 --- 78 unchanged lines hidden --- |