|
|
@@ -1610,24 +1610,15 @@ static inline void try_to_enable_x2apic(int remap_mode) { }
|
|
|
static inline void __x2apic_enable(void) { }
|
|
|
#endif /* !CONFIG_X86_X2APIC */
|
|
|
|
|
|
-static int __init try_to_enable_IR(void)
|
|
|
-{
|
|
|
-#ifdef CONFIG_X86_IO_APIC
|
|
|
- if (!x2apic_enabled() && skip_ioapic_setup) {
|
|
|
- pr_info("Not enabling interrupt remapping due to skipped IO-APIC setup\n");
|
|
|
- return -1;
|
|
|
- }
|
|
|
-#endif
|
|
|
- return irq_remapping_enable();
|
|
|
-}
|
|
|
-
|
|
|
void __init enable_IR_x2apic(void)
|
|
|
{
|
|
|
unsigned long flags;
|
|
|
int ret, ir_stat;
|
|
|
|
|
|
- if (skip_ioapic_setup)
|
|
|
+ if (skip_ioapic_setup) {
|
|
|
+ pr_info("Not enabling interrupt remapping due to skipped IO-APIC setup\n");
|
|
|
return;
|
|
|
+ }
|
|
|
|
|
|
ir_stat = irq_remapping_prepare();
|
|
|
if (ir_stat < 0 && !x2apic_supported())
|
|
|
@@ -1645,7 +1636,7 @@ void __init enable_IR_x2apic(void)
|
|
|
|
|
|
/* If irq_remapping_prepare() succeeded, try to enable it */
|
|
|
if (ir_stat >= 0)
|
|
|
- ir_stat = try_to_enable_IR();
|
|
|
+ ir_stat = irq_remapping_enable();
|
|
|
/* ir_stat contains the remap mode or an error code */
|
|
|
try_to_enable_x2apic(ir_stat);
|
|
|
|
|
|
@@ -2062,10 +2053,10 @@ static int allocate_logical_cpuid(int apicid)
|
|
|
|
|
|
/* Allocate a new cpuid. */
|
|
|
if (nr_logical_cpuids >= nr_cpu_ids) {
|
|
|
- WARN_ONCE(1, "Only %d processors supported."
|
|
|
+ WARN_ONCE(1, "APIC: NR_CPUS/possible_cpus limit of %i reached. "
|
|
|
"Processor %d/0x%x and the rest are ignored.\n",
|
|
|
- nr_cpu_ids - 1, nr_logical_cpuids, apicid);
|
|
|
- return -1;
|
|
|
+ nr_cpu_ids, nr_logical_cpuids, apicid);
|
|
|
+ return -EINVAL;
|
|
|
}
|
|
|
|
|
|
cpuid_to_apicid[nr_logical_cpuids] = apicid;
|