Skip to content

Commit d517be5

Browse files
committed
Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 fixes from Thomas Gleixner: "A bit on the largish side due to a series of fixes for a regression in the x86 vector management which was introduced in 4.3. This work was started in December already, but it took some time to fix all corner cases and a couple of older bugs in that area which were detected while at it Aside of that a few platform updates for intel-mid, quark and UV and two fixes for in the mm code: - Use proper types for pgprot values to avoid truncation - Prevent a size truncation in the pageattr code when setting page attributes for large mappings" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (21 commits) x86/mm/pat: Avoid truncation when converting cpa->numpages to address x86/mm: Fix types used in pgprot cacheability flags translations x86/platform/quark: Print boundaries correctly x86/platform/UV: Remove EFI memmap quirk for UV2+ x86/platform/intel-mid: Join string and fix SoC name x86/platform/intel-mid: Enable 64-bit build x86/irq: Plug vector cleanup race x86/irq: Call irq_force_move_complete with irq descriptor x86/irq: Remove outgoing CPU from vector cleanup mask x86/irq: Remove the cpumask allocation from send_cleanup_vector() x86/irq: Clear move_in_progress before sending cleanup IPI x86/irq: Remove offline cpus from vector cleanup x86/irq: Get rid of code duplication x86/irq: Copy vectormask instead of an AND operation x86/irq: Check vector allocation early x86/irq: Reorganize the search in assign_irq_vector x86/irq: Reorganize the return path in assign_irq_vector x86/irq: Do not use apic_chip_data.old_domain as temporary buffer x86/irq: Validate that irq descriptor is still active x86/irq: Fix a race in x86_vector_free_irqs() ...
2 parents dc799d0 + 7425637 commit d517be5

File tree

12 files changed

+209
-103
lines changed

12 files changed

+209
-103
lines changed

arch/x86/Kconfig

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -509,11 +509,10 @@ config X86_INTEL_CE
509509

510510
config X86_INTEL_MID
511511
bool "Intel MID platform support"
512-
depends on X86_32
513512
depends on X86_EXTENDED_PLATFORM
514513
depends on X86_PLATFORM_DEVICES
515514
depends on PCI
516-
depends on PCI_GOANY
515+
depends on X86_64 || (PCI_GOANY && X86_32)
517516
depends on X86_IO_APIC
518517
select SFI
519518
select I2C

arch/x86/include/asm/irq.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,13 @@ extern void irq_ctx_init(int cpu);
2323

2424
#define __ARCH_HAS_DO_SOFTIRQ
2525

26+
struct irq_desc;
27+
2628
#ifdef CONFIG_HOTPLUG_CPU
2729
#include <linux/cpumask.h>
2830
extern int check_irq_vectors_for_cpu_disable(void);
2931
extern void fixup_irqs(void);
30-
extern void irq_force_complete_move(int);
32+
extern void irq_force_complete_move(struct irq_desc *desc);
3133
#endif
3234

3335
#ifdef CONFIG_HAVE_KVM
@@ -37,7 +39,6 @@ extern void kvm_set_posted_intr_wakeup_handler(void (*handler)(void));
3739
extern void (*x86_platform_ipi_callback)(void);
3840
extern void native_init_IRQ(void);
3941

40-
struct irq_desc;
4142
extern bool handle_irq(struct irq_desc *desc, struct pt_regs *regs);
4243

4344
extern __visible unsigned int do_IRQ(struct pt_regs *regs);

arch/x86/include/asm/pgtable_types.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -366,20 +366,18 @@ static inline enum page_cache_mode pgprot2cachemode(pgprot_t pgprot)
366366
}
367367
static inline pgprot_t pgprot_4k_2_large(pgprot_t pgprot)
368368
{
369+
pgprotval_t val = pgprot_val(pgprot);
369370
pgprot_t new;
370-
unsigned long val;
371371

372-
val = pgprot_val(pgprot);
373372
pgprot_val(new) = (val & ~(_PAGE_PAT | _PAGE_PAT_LARGE)) |
374373
((val & _PAGE_PAT) << (_PAGE_BIT_PAT_LARGE - _PAGE_BIT_PAT));
375374
return new;
376375
}
377376
static inline pgprot_t pgprot_large_2_4k(pgprot_t pgprot)
378377
{
378+
pgprotval_t val = pgprot_val(pgprot);
379379
pgprot_t new;
380-
unsigned long val;
381380

382-
val = pgprot_val(pgprot);
383381
pgprot_val(new) = (val & ~(_PAGE_PAT | _PAGE_PAT_LARGE)) |
384382
((val & _PAGE_PAT_LARGE) >>
385383
(_PAGE_BIT_PAT_LARGE - _PAGE_BIT_PAT));

arch/x86/kernel/apic/io_apic.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2521,6 +2521,7 @@ void __init setup_ioapic_dest(void)
25212521
{
25222522
int pin, ioapic, irq, irq_entry;
25232523
const struct cpumask *mask;
2524+
struct irq_desc *desc;
25242525
struct irq_data *idata;
25252526
struct irq_chip *chip;
25262527

@@ -2536,7 +2537,9 @@ void __init setup_ioapic_dest(void)
25362537
if (irq < 0 || !mp_init_irq_at_boot(ioapic, irq))
25372538
continue;
25382539

2539-
idata = irq_get_irq_data(irq);
2540+
desc = irq_to_desc(irq);
2541+
raw_spin_lock_irq(&desc->lock);
2542+
idata = irq_desc_get_irq_data(desc);
25402543

25412544
/*
25422545
* Honour affinities which have been set in early boot
@@ -2550,6 +2553,7 @@ void __init setup_ioapic_dest(void)
25502553
/* Might be lapic_chip for irq 0 */
25512554
if (chip->irq_set_affinity)
25522555
chip->irq_set_affinity(idata, mask, false);
2556+
raw_spin_unlock_irq(&desc->lock);
25532557
}
25542558
}
25552559
#endif

0 commit comments

Comments
 (0)