diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-02-20 17:01:21 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-02-20 17:01:21 -0500 |
commit | 4cee9fe53e4d181b608c7758090ed492b45d6801 (patch) | |
tree | 17e52e823ee0c903583cd32913bd4b21c9bf90a5 | |
parent | 42e1b14b6e1455ece2ccbe474c25388d0230a590 (diff) | |
parent | 543113d2f4b5dd40d46a95502effe86b845dfe34 (diff) |
Merge branch 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 apic changes from Ingo Molnar:
"The main changes in this cycle were:
- Re-activate the hw IRQ resend mechanism that was downgraded to a
sw-resend unintentionally. (Ruslan Ruslichenko)
- Avoid sporadic spurious hrtimer interrupts (Frederic Weisbecker)"
[ Let's see if the io_apic retrigger ends up surviving this release, it
got reverted last time because it found problems elsewhere - Linus ]
* 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/apic: Fix a typo in a comment line
x86/ioapic: Restore IO-APIC irq_chip retrigger callback
x86/apic: Implement set_state_oneshot_stopped() callback
x86/apic: Fix typos in comments
-rw-r--r-- | arch/x86/kernel/apic/apic.c | 33 | ||||
-rw-r--r-- | arch/x86/kernel/apic/io_apic.c | 2 |
2 files changed, 19 insertions, 16 deletions
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c index 5b7e43eff139..8567c851172c 100644 --- a/arch/x86/kernel/apic/apic.c +++ b/arch/x86/kernel/apic/apic.c | |||
@@ -529,18 +529,19 @@ static void lapic_timer_broadcast(const struct cpumask *mask) | |||
529 | * The local apic timer can be used for any function which is CPU local. | 529 | * The local apic timer can be used for any function which is CPU local. |
530 | */ | 530 | */ |
531 | static struct clock_event_device lapic_clockevent = { | 531 | static struct clock_event_device lapic_clockevent = { |
532 | .name = "lapic", | 532 | .name = "lapic", |
533 | .features = CLOCK_EVT_FEAT_PERIODIC | | 533 | .features = CLOCK_EVT_FEAT_PERIODIC | |
534 | CLOCK_EVT_FEAT_ONESHOT | CLOCK_EVT_FEAT_C3STOP | 534 | CLOCK_EVT_FEAT_ONESHOT | CLOCK_EVT_FEAT_C3STOP |
535 | | CLOCK_EVT_FEAT_DUMMY, | 535 | | CLOCK_EVT_FEAT_DUMMY, |
536 | .shift = 32, | 536 | .shift = 32, |
537 | .set_state_shutdown = lapic_timer_shutdown, | 537 | .set_state_shutdown = lapic_timer_shutdown, |
538 | .set_state_periodic = lapic_timer_set_periodic, | 538 | .set_state_periodic = lapic_timer_set_periodic, |
539 | .set_state_oneshot = lapic_timer_set_oneshot, | 539 | .set_state_oneshot = lapic_timer_set_oneshot, |
540 | .set_next_event = lapic_next_event, | 540 | .set_state_oneshot_stopped = lapic_timer_shutdown, |
541 | .broadcast = lapic_timer_broadcast, | 541 | .set_next_event = lapic_next_event, |
542 | .rating = 100, | 542 | .broadcast = lapic_timer_broadcast, |
543 | .irq = -1, | 543 | .rating = 100, |
544 | .irq = -1, | ||
544 | }; | 545 | }; |
545 | static DEFINE_PER_CPU(struct clock_event_device, lapic_events); | 546 | static DEFINE_PER_CPU(struct clock_event_device, lapic_events); |
546 | 547 | ||
@@ -1245,7 +1246,7 @@ static void lapic_setup_esr(void) | |||
1245 | /** | 1246 | /** |
1246 | * setup_local_APIC - setup the local APIC | 1247 | * setup_local_APIC - setup the local APIC |
1247 | * | 1248 | * |
1248 | * Used to setup local APIC while initializing BSP or bringin up APs. | 1249 | * Used to setup local APIC while initializing BSP or bringing up APs. |
1249 | * Always called with preemption disabled. | 1250 | * Always called with preemption disabled. |
1250 | */ | 1251 | */ |
1251 | void setup_local_APIC(void) | 1252 | void setup_local_APIC(void) |
@@ -2028,8 +2029,8 @@ void disconnect_bsp_APIC(int virt_wire_setup) | |||
2028 | /* | 2029 | /* |
2029 | * The number of allocated logical CPU IDs. Since logical CPU IDs are allocated | 2030 | * The number of allocated logical CPU IDs. Since logical CPU IDs are allocated |
2030 | * contiguously, it equals to current allocated max logical CPU ID plus 1. | 2031 | * contiguously, it equals to current allocated max logical CPU ID plus 1. |
2031 | * All allocated CPU ID should be in [0, nr_logical_cpuidi), so the maximum of | 2032 | * All allocated CPU IDs should be in the [0, nr_logical_cpuids) range, |
2032 | * nr_logical_cpuids is nr_cpu_ids. | 2033 | * so the maximum of nr_logical_cpuids is nr_cpu_ids. |
2033 | * | 2034 | * |
2034 | * NOTE: Reserve 0 for BSP. | 2035 | * NOTE: Reserve 0 for BSP. |
2035 | */ | 2036 | */ |
@@ -2094,7 +2095,7 @@ int __generic_processor_info(int apicid, int version, bool enabled) | |||
2094 | * Since fixing handling of boot_cpu_physical_apicid requires | 2095 | * Since fixing handling of boot_cpu_physical_apicid requires |
2095 | * another discussion and tests on each platform, we leave it | 2096 | * another discussion and tests on each platform, we leave it |
2096 | * for now and here we use read_apic_id() directly in this | 2097 | * for now and here we use read_apic_id() directly in this |
2097 | * function, generic_processor_info(). | 2098 | * function, __generic_processor_info(). |
2098 | */ | 2099 | */ |
2099 | if (disabled_cpu_apicid != BAD_APICID && | 2100 | if (disabled_cpu_apicid != BAD_APICID && |
2100 | disabled_cpu_apicid != read_apic_id() && | 2101 | disabled_cpu_apicid != read_apic_id() && |
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index bd6b8c270c24..52f352b063fd 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c | |||
@@ -1875,6 +1875,7 @@ static struct irq_chip ioapic_chip __read_mostly = { | |||
1875 | .irq_ack = irq_chip_ack_parent, | 1875 | .irq_ack = irq_chip_ack_parent, |
1876 | .irq_eoi = ioapic_ack_level, | 1876 | .irq_eoi = ioapic_ack_level, |
1877 | .irq_set_affinity = ioapic_set_affinity, | 1877 | .irq_set_affinity = ioapic_set_affinity, |
1878 | .irq_retrigger = irq_chip_retrigger_hierarchy, | ||
1878 | .flags = IRQCHIP_SKIP_SET_WAKE, | 1879 | .flags = IRQCHIP_SKIP_SET_WAKE, |
1879 | }; | 1880 | }; |
1880 | 1881 | ||
@@ -1886,6 +1887,7 @@ static struct irq_chip ioapic_ir_chip __read_mostly = { | |||
1886 | .irq_ack = irq_chip_ack_parent, | 1887 | .irq_ack = irq_chip_ack_parent, |
1887 | .irq_eoi = ioapic_ir_ack_level, | 1888 | .irq_eoi = ioapic_ir_ack_level, |
1888 | .irq_set_affinity = ioapic_set_affinity, | 1889 | .irq_set_affinity = ioapic_set_affinity, |
1890 | .irq_retrigger = irq_chip_retrigger_hierarchy, | ||
1889 | .flags = IRQCHIP_SKIP_SET_WAKE, | 1891 | .flags = IRQCHIP_SKIP_SET_WAKE, |
1890 | }; | 1892 | }; |
1891 | 1893 | ||