Commit a15a82f4 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'x86-fixes-for-linus' of...

Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  Revert "x86: default to reboot via ACPI"
  x86: align DirectMap in /proc/meminfo
  AMD IOMMU: fix lazy IO/TLB flushing in unmap path
  x86: add smp_mb() before sending INVALIDATE_TLB_VECTOR
  x86: remove VISWS and PARAVIRT around NR_IRQS puzzle
  x86: mention ACPI in top-level Kconfig menu
  x86: size NR_IRQS on 32-bit systems the same way as 64-bit
  x86: don't allow nr_irqs > NR_IRQS
  x86/docs: remove noirqbalance param docs
  x86: don't use tsc_khz to calculate lpj if notsc is passed
  x86, voyager: fix smp_intr_init() compile breakage
  AMD IOMMU: fix detection of NP capable IOMMUs
parents 9144f382 8d00450d
...@@ -1472,8 +1472,6 @@ and is between 256 and 4096 characters. It is defined in the file ...@@ -1472,8 +1472,6 @@ and is between 256 and 4096 characters. It is defined in the file
Valid arguments: on, off Valid arguments: on, off
Default: on Default: on
noirqbalance [X86-32,SMP,KNL] Disable kernel irq balancing
noirqdebug [X86-32] Disables the code which attempts to detect and noirqdebug [X86-32] Disables the code which attempts to detect and
disable unhandled interrupt sources. disable unhandled interrupt sources.
......
...@@ -1494,7 +1494,7 @@ config HAVE_ARCH_EARLY_PFN_TO_NID ...@@ -1494,7 +1494,7 @@ config HAVE_ARCH_EARLY_PFN_TO_NID
def_bool X86_64 def_bool X86_64
depends on NUMA depends on NUMA
menu "Power management options" menu "Power management and ACPI options"
depends on !X86_VOYAGER depends on !X86_VOYAGER
config ARCH_HIBERNATION_HEADER config ARCH_HIBERNATION_HEADER
......
...@@ -101,30 +101,22 @@ ...@@ -101,30 +101,22 @@
#define LAST_VM86_IRQ 15 #define LAST_VM86_IRQ 15
#define invalid_vm86_irq(irq) ((irq) < 3 || (irq) > 15) #define invalid_vm86_irq(irq) ((irq) < 3 || (irq) > 15)
#ifdef CONFIG_X86_64 #if defined(CONFIG_X86_IO_APIC) && !defined(CONFIG_X86_VOYAGER)
# if NR_CPUS < MAX_IO_APICS # if NR_CPUS < MAX_IO_APICS
# define NR_IRQS (NR_VECTORS + (32 * NR_CPUS)) # define NR_IRQS (NR_VECTORS + (32 * NR_CPUS))
# else # else
# define NR_IRQS (NR_VECTORS + (32 * MAX_IO_APICS)) # define NR_IRQS (NR_VECTORS + (32 * MAX_IO_APICS))
# endif # endif
#elif !defined(CONFIG_X86_VOYAGER) #elif defined(CONFIG_X86_VOYAGER)
# if defined(CONFIG_X86_IO_APIC) || defined(CONFIG_PARAVIRT) || defined(CONFIG_X86_VISWS)
# define NR_IRQS 224 # define NR_IRQS 224
# else /* IO_APIC || PARAVIRT */ #else /* IO_APIC || VOYAGER */
# define NR_IRQS 16 # define NR_IRQS 16
# endif #endif
#else /* !VISWS && !VOYAGER */
# define NR_IRQS 224
#endif /* VISWS */
/* Voyager specific defines */ /* Voyager specific defines */
/* These define the CPIs we use in linux */ /* These define the CPIs we use in linux */
......
...@@ -520,6 +520,7 @@ extern void voyager_restart(void); ...@@ -520,6 +520,7 @@ extern void voyager_restart(void);
extern void voyager_cat_power_off(void); extern void voyager_cat_power_off(void);
extern void voyager_cat_do_common_interrupt(void); extern void voyager_cat_do_common_interrupt(void);
extern void voyager_handle_nmi(void); extern void voyager_handle_nmi(void);
extern void voyager_smp_intr_init(void);
/* Commands for the following are */ /* Commands for the following are */
#define VOYAGER_PSI_READ 0 #define VOYAGER_PSI_READ 0
#define VOYAGER_PSI_WRITE 1 #define VOYAGER_PSI_WRITE 1
......
...@@ -50,7 +50,7 @@ static int dma_ops_unity_map(struct dma_ops_domain *dma_dom, ...@@ -50,7 +50,7 @@ static int dma_ops_unity_map(struct dma_ops_domain *dma_dom,
/* returns !0 if the IOMMU is caching non-present entries in its TLB */ /* returns !0 if the IOMMU is caching non-present entries in its TLB */
static int iommu_has_npcache(struct amd_iommu *iommu) static int iommu_has_npcache(struct amd_iommu *iommu)
{ {
return iommu->cap & IOMMU_CAP_NPCACHE; return iommu->cap & (1UL << IOMMU_CAP_NPCACHE);
} }
/**************************************************************************** /****************************************************************************
...@@ -536,6 +536,9 @@ static void dma_ops_free_addresses(struct dma_ops_domain *dom, ...@@ -536,6 +536,9 @@ static void dma_ops_free_addresses(struct dma_ops_domain *dom,
{ {
address >>= PAGE_SHIFT; address >>= PAGE_SHIFT;
iommu_area_free(dom->bitmap, address, pages); iommu_area_free(dom->bitmap, address, pages);
if (address + pages >= dom->next_bit)
dom->need_flush = true;
} }
/**************************************************************************** /****************************************************************************
...@@ -992,8 +995,10 @@ static void __unmap_single(struct amd_iommu *iommu, ...@@ -992,8 +995,10 @@ static void __unmap_single(struct amd_iommu *iommu,
dma_ops_free_addresses(dma_dom, dma_addr, pages); dma_ops_free_addresses(dma_dom, dma_addr, pages);
if (amd_iommu_unmap_flush) if (amd_iommu_unmap_flush || dma_dom->need_flush) {
iommu_flush_pages(iommu, dma_dom->domain.id, dma_addr, size); iommu_flush_pages(iommu, dma_dom->domain.id, dma_addr, size);
dma_dom->need_flush = false;
}
} }
/* /*
......
...@@ -3611,6 +3611,8 @@ int __init probe_nr_irqs(void) ...@@ -3611,6 +3611,8 @@ int __init probe_nr_irqs(void)
/* something wrong ? */ /* something wrong ? */
if (nr < nr_min) if (nr < nr_min)
nr = nr_min; nr = nr_min;
if (WARN_ON(nr > NR_IRQS))
nr = NR_IRQS;
return nr; return nr;
} }
......
...@@ -29,11 +29,7 @@ EXPORT_SYMBOL(pm_power_off); ...@@ -29,11 +29,7 @@ EXPORT_SYMBOL(pm_power_off);
static const struct desc_ptr no_idt = {}; static const struct desc_ptr no_idt = {};
static int reboot_mode; static int reboot_mode;
/* enum reboot_type reboot_type = BOOT_KBD;
* Keyboard reset and triple fault may result in INIT, not RESET, which
* doesn't work when we're in vmx root mode. Try ACPI first.
*/
enum reboot_type reboot_type = BOOT_ACPI;
int reboot_force; int reboot_force;
#if defined(CONFIG_X86_32) && defined(CONFIG_SMP) #if defined(CONFIG_X86_32) && defined(CONFIG_SMP)
......
...@@ -154,6 +154,12 @@ void native_flush_tlb_others(const cpumask_t *cpumaskp, struct mm_struct *mm, ...@@ -154,6 +154,12 @@ void native_flush_tlb_others(const cpumask_t *cpumaskp, struct mm_struct *mm,
flush_mm = mm; flush_mm = mm;
flush_va = va; flush_va = va;
cpus_or(flush_cpumask, cpumask, flush_cpumask); cpus_or(flush_cpumask, cpumask, flush_cpumask);
/*
* Make the above memory operations globally visible before
* sending the IPI.
*/
smp_mb();
/* /*
* We have to send the IPI only to * We have to send the IPI only to
* CPUs affected. * CPUs affected.
......
...@@ -182,6 +182,11 @@ void native_flush_tlb_others(const cpumask_t *cpumaskp, struct mm_struct *mm, ...@@ -182,6 +182,11 @@ void native_flush_tlb_others(const cpumask_t *cpumaskp, struct mm_struct *mm,
f->flush_va = va; f->flush_va = va;
cpus_or(f->flush_cpumask, cpumask, f->flush_cpumask); cpus_or(f->flush_cpumask, cpumask, f->flush_cpumask);
/*
* Make the above memory operations globally visible before
* sending the IPI.
*/
smp_mb();
/* /*
* We have to send the IPI only to * We have to send the IPI only to
* CPUs affected. * CPUs affected.
......
...@@ -813,10 +813,6 @@ void __init tsc_init(void) ...@@ -813,10 +813,6 @@ void __init tsc_init(void)
cpu_khz = calibrate_cpu(); cpu_khz = calibrate_cpu();
#endif #endif
lpj = ((u64)tsc_khz * 1000);
do_div(lpj, HZ);
lpj_fine = lpj;
printk("Detected %lu.%03lu MHz processor.\n", printk("Detected %lu.%03lu MHz processor.\n",
(unsigned long)cpu_khz / 1000, (unsigned long)cpu_khz / 1000,
(unsigned long)cpu_khz % 1000); (unsigned long)cpu_khz % 1000);
...@@ -836,6 +832,10 @@ void __init tsc_init(void) ...@@ -836,6 +832,10 @@ void __init tsc_init(void)
/* now allow native_sched_clock() to use rdtsc */ /* now allow native_sched_clock() to use rdtsc */
tsc_disabled = 0; tsc_disabled = 0;
lpj = ((u64)tsc_khz * 1000);
do_div(lpj, HZ);
lpj_fine = lpj;
use_tsc_delay(); use_tsc_delay();
/* Check and install the TSC clocksource */ /* Check and install the TSC clocksource */
dmi_check_system(bad_tsc_dmi_table); dmi_check_system(bad_tsc_dmi_table);
......
...@@ -27,7 +27,7 @@ static struct irqaction irq2 = { ...@@ -27,7 +27,7 @@ static struct irqaction irq2 = {
void __init intr_init_hook(void) void __init intr_init_hook(void)
{ {
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
smp_intr_init(); voyager_smp_intr_init();
#endif #endif
setup_irq(2, &irq2); setup_irq(2, &irq2);
......
...@@ -1258,7 +1258,7 @@ static void handle_vic_irq(unsigned int irq, struct irq_desc *desc) ...@@ -1258,7 +1258,7 @@ static void handle_vic_irq(unsigned int irq, struct irq_desc *desc)
#define QIC_SET_GATE(cpi, vector) \ #define QIC_SET_GATE(cpi, vector) \
set_intr_gate((cpi) + QIC_DEFAULT_CPI_BASE, (vector)) set_intr_gate((cpi) + QIC_DEFAULT_CPI_BASE, (vector))
void __init smp_intr_init(void) void __init voyager_smp_intr_init(void)
{ {
int i; int i;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment