Merge branches 'core-objtool-for-linus', 'x86-cleanups-for-linus' and 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 objtool, cleanup, and apic updates from Ingo Molnar: "Objtool: - Fix a gawk 5.0 incompatibility in gen-insn-attr-x86.awk. Most distros are still on gawk 4.2.x. Cleanup: - Misc cleanups, plus the removal of obsolete code such as Calgary IOMMU support, which code hasn't seen any real testing in a long time and there's no known users left. apic: - Two changes: a cleanup and a fix for an (old) race for oneshot threaded IRQ handlers" * 'core-objtool-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/insn: Fix awk regexp warnings * 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86: Remove unused asm/rio.h x86: Fix typos in comments x86/pci: Remove #ifdef __KERNEL__ guard from <asm/pci.h> x86/pci: Remove pci_64.h x86: Remove the calgary IOMMU driver x86/apic, x86/uprobes: Correct parameter names in kernel-doc comments x86/kdump: Remove the unused crash_copy_backup_region() x86/nmi: Remove stale EDAC include leftover * 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/ioapic: Rename misnamed functions x86/ioapic: Prevent inconsistent state when moving an interrupt
This commit is contained in:
@@ -2337,7 +2337,7 @@ static int cpuid_to_apicid[] = {
|
||||
#ifdef CONFIG_SMP
|
||||
/**
|
||||
* apic_id_is_primary_thread - Check whether APIC ID belongs to a primary thread
|
||||
* @id: APIC ID to check
|
||||
* @apicid: APIC ID to check
|
||||
*/
|
||||
bool apic_id_is_primary_thread(unsigned int apicid)
|
||||
{
|
||||
|
@@ -1725,19 +1725,20 @@ static bool io_apic_level_ack_pending(struct mp_chip_data *data)
|
||||
return false;
|
||||
}
|
||||
|
||||
static inline bool ioapic_irqd_mask(struct irq_data *data)
|
||||
static inline bool ioapic_prepare_move(struct irq_data *data)
|
||||
{
|
||||
/* If we are moving the irq we need to mask it */
|
||||
/* If we are moving the IRQ we need to mask it */
|
||||
if (unlikely(irqd_is_setaffinity_pending(data))) {
|
||||
mask_ioapic_irq(data);
|
||||
if (!irqd_irq_masked(data))
|
||||
mask_ioapic_irq(data);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
static inline void ioapic_irqd_unmask(struct irq_data *data, bool masked)
|
||||
static inline void ioapic_finish_move(struct irq_data *data, bool moveit)
|
||||
{
|
||||
if (unlikely(masked)) {
|
||||
if (unlikely(moveit)) {
|
||||
/* Only migrate the irq if the ack has been received.
|
||||
*
|
||||
* On rare occasions the broadcast level triggered ack gets
|
||||
@@ -1766,15 +1767,17 @@ static inline void ioapic_irqd_unmask(struct irq_data *data, bool masked)
|
||||
*/
|
||||
if (!io_apic_level_ack_pending(data->chip_data))
|
||||
irq_move_masked_irq(data);
|
||||
unmask_ioapic_irq(data);
|
||||
/* If the IRQ is masked in the core, leave it: */
|
||||
if (!irqd_irq_masked(data))
|
||||
unmask_ioapic_irq(data);
|
||||
}
|
||||
}
|
||||
#else
|
||||
static inline bool ioapic_irqd_mask(struct irq_data *data)
|
||||
static inline bool ioapic_prepare_move(struct irq_data *data)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
static inline void ioapic_irqd_unmask(struct irq_data *data, bool masked)
|
||||
static inline void ioapic_finish_move(struct irq_data *data, bool moveit)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
@@ -1783,11 +1786,11 @@ static void ioapic_ack_level(struct irq_data *irq_data)
|
||||
{
|
||||
struct irq_cfg *cfg = irqd_cfg(irq_data);
|
||||
unsigned long v;
|
||||
bool masked;
|
||||
bool moveit;
|
||||
int i;
|
||||
|
||||
irq_complete_move(cfg);
|
||||
masked = ioapic_irqd_mask(irq_data);
|
||||
moveit = ioapic_prepare_move(irq_data);
|
||||
|
||||
/*
|
||||
* It appears there is an erratum which affects at least version 0x11
|
||||
@@ -1842,7 +1845,7 @@ static void ioapic_ack_level(struct irq_data *irq_data)
|
||||
eoi_ioapic_pin(cfg->vector, irq_data->chip_data);
|
||||
}
|
||||
|
||||
ioapic_irqd_unmask(irq_data, masked);
|
||||
ioapic_finish_move(irq_data, moveit);
|
||||
}
|
||||
|
||||
static void ioapic_ir_ack_level(struct irq_data *irq_data)
|
||||
|
Reference in New Issue
Block a user