Merge branch 'linus' into x86/mce3
Conflicts: arch/x86/kernel/cpu/mcheck/mce_64.c arch/x86/kernel/irq.c Merge reason: Resolve the conflicts above. Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
* Mikael Pettersson : PM converted to driver model.
|
||||
*/
|
||||
|
||||
#include <linux/perf_counter.h>
|
||||
#include <linux/kernel_stat.h>
|
||||
#include <linux/mc146818rtc.h>
|
||||
#include <linux/acpi_pmtmr.h>
|
||||
@@ -34,6 +35,7 @@
|
||||
#include <linux/smp.h>
|
||||
#include <linux/mm.h>
|
||||
|
||||
#include <asm/perf_counter.h>
|
||||
#include <asm/pgalloc.h>
|
||||
#include <asm/atomic.h>
|
||||
#include <asm/mpspec.h>
|
||||
@@ -249,7 +251,7 @@ static void native_apic_write_dummy(u32 reg, u32 v)
|
||||
|
||||
static u32 native_apic_read_dummy(u32 reg)
|
||||
{
|
||||
WARN_ON_ONCE((cpu_has_apic || !disable_apic));
|
||||
WARN_ON_ONCE((cpu_has_apic && !disable_apic));
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1187,6 +1189,7 @@ void __cpuinit setup_local_APIC(void)
|
||||
apic_write(APIC_ESR, 0);
|
||||
}
|
||||
#endif
|
||||
perf_counters_lapic_init();
|
||||
|
||||
preempt_disable();
|
||||
|
||||
@@ -1609,6 +1612,13 @@ void __init init_apic_mappings(void)
|
||||
new_apicid = read_apic_id();
|
||||
if (boot_cpu_physical_apicid != new_apicid) {
|
||||
boot_cpu_physical_apicid = new_apicid;
|
||||
/*
|
||||
* yeah -- we lie about apic_version
|
||||
* in case if apic was disabled via boot option
|
||||
* but it's not a problem for SMP compiled kernel
|
||||
* since smp_sanity_check is prepared for such a case
|
||||
* and disable smp mode
|
||||
*/
|
||||
apic_version[new_apicid] =
|
||||
GET_APIC_VERSION(apic_read(APIC_LVR));
|
||||
}
|
||||
@@ -2027,7 +2037,7 @@ static int lapic_resume(struct sys_device *dev)
|
||||
unsigned int l, h;
|
||||
unsigned long flags;
|
||||
int maxlvt;
|
||||
int ret;
|
||||
int ret = 0;
|
||||
struct IO_APIC_route_entry **ioapic_entries = NULL;
|
||||
|
||||
if (!apic_pm_state.active)
|
||||
@@ -2038,14 +2048,15 @@ static int lapic_resume(struct sys_device *dev)
|
||||
ioapic_entries = alloc_ioapic_entries();
|
||||
if (!ioapic_entries) {
|
||||
WARN(1, "Alloc ioapic_entries in lapic resume failed.");
|
||||
return -ENOMEM;
|
||||
ret = -ENOMEM;
|
||||
goto restore;
|
||||
}
|
||||
|
||||
ret = save_IO_APIC_setup(ioapic_entries);
|
||||
if (ret) {
|
||||
WARN(1, "Saving IO-APIC state failed: %d\n", ret);
|
||||
free_ioapic_entries(ioapic_entries);
|
||||
return ret;
|
||||
goto restore;
|
||||
}
|
||||
|
||||
mask_IO_APIC_setup(ioapic_entries);
|
||||
@@ -2097,10 +2108,10 @@ static int lapic_resume(struct sys_device *dev)
|
||||
restore_IO_APIC_setup(ioapic_entries);
|
||||
free_ioapic_entries(ioapic_entries);
|
||||
}
|
||||
|
||||
restore:
|
||||
local_irq_restore(flags);
|
||||
|
||||
return 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@@ -59,6 +59,7 @@
|
||||
#include <asm/setup.h>
|
||||
#include <asm/irq_remapping.h>
|
||||
#include <asm/hpet.h>
|
||||
#include <asm/hw_irq.h>
|
||||
#include <asm/uv/uv_hub.h>
|
||||
#include <asm/uv/uv_irq.h>
|
||||
|
||||
@@ -176,16 +177,18 @@ int __init arch_early_irq_init(void)
|
||||
struct irq_cfg *cfg;
|
||||
struct irq_desc *desc;
|
||||
int count;
|
||||
int node;
|
||||
int i;
|
||||
|
||||
cfg = irq_cfgx;
|
||||
count = ARRAY_SIZE(irq_cfgx);
|
||||
node= cpu_to_node(boot_cpu_id);
|
||||
|
||||
for (i = 0; i < count; i++) {
|
||||
desc = irq_to_desc(i);
|
||||
desc->chip_data = &cfg[i];
|
||||
alloc_bootmem_cpumask_var(&cfg[i].domain);
|
||||
alloc_bootmem_cpumask_var(&cfg[i].old_domain);
|
||||
alloc_cpumask_var_node(&cfg[i].domain, GFP_NOWAIT, node);
|
||||
alloc_cpumask_var_node(&cfg[i].old_domain, GFP_NOWAIT, node);
|
||||
if (i < NR_IRQS_LEGACY)
|
||||
cpumask_setall(cfg[i].domain);
|
||||
}
|
||||
@@ -4012,6 +4015,7 @@ int __init io_apic_get_unique_id(int ioapic, int apic_id)
|
||||
|
||||
return apic_id;
|
||||
}
|
||||
#endif
|
||||
|
||||
int __init io_apic_get_version(int ioapic)
|
||||
{
|
||||
@@ -4024,7 +4028,6 @@ int __init io_apic_get_version(int ioapic)
|
||||
|
||||
return reg_01.bits.version;
|
||||
}
|
||||
#endif
|
||||
|
||||
int acpi_get_override_irq(int bus_irq, int *trigger, int *polarity)
|
||||
{
|
||||
|
@@ -104,7 +104,7 @@ static __init void nmi_cpu_busy(void *data)
|
||||
}
|
||||
#endif
|
||||
|
||||
static void report_broken_nmi(int cpu, int *prev_nmi_count)
|
||||
static void report_broken_nmi(int cpu, unsigned int *prev_nmi_count)
|
||||
{
|
||||
printk(KERN_CONT "\n");
|
||||
|
||||
|
@@ -160,7 +160,6 @@ extern struct apic apic_summit;
|
||||
extern struct apic apic_bigsmp;
|
||||
extern struct apic apic_es7000;
|
||||
extern struct apic apic_es7000_cluster;
|
||||
extern struct apic apic_default;
|
||||
|
||||
struct apic *apic = &apic_default;
|
||||
EXPORT_SYMBOL_GPL(apic);
|
||||
|
@@ -10,7 +10,7 @@
|
||||
#include <asm/apic.h>
|
||||
#include <asm/ipi.h>
|
||||
|
||||
DEFINE_PER_CPU(u32, x86_cpu_to_logical_apicid);
|
||||
static DEFINE_PER_CPU(u32, x86_cpu_to_logical_apicid);
|
||||
|
||||
static int x2apic_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
|
||||
{
|
||||
|
@@ -562,7 +562,7 @@ void __init uv_system_init(void)
|
||||
union uvh_node_id_u node_id;
|
||||
unsigned long gnode_upper, lowmem_redir_base, lowmem_redir_size;
|
||||
int bytes, nid, cpu, lcpu, pnode, blade, i, j, m_val, n_val;
|
||||
int max_pnode = 0;
|
||||
int gnode_extra, max_pnode = 0;
|
||||
unsigned long mmr_base, present, paddr;
|
||||
unsigned short pnode_mask;
|
||||
|
||||
@@ -574,6 +574,13 @@ void __init uv_system_init(void)
|
||||
mmr_base =
|
||||
uv_read_local_mmr(UVH_RH_GAM_MMR_OVERLAY_CONFIG_MMR) &
|
||||
~UV_MMR_ENABLE;
|
||||
pnode_mask = (1 << n_val) - 1;
|
||||
node_id.v = uv_read_local_mmr(UVH_NODE_ID);
|
||||
gnode_extra = (node_id.s.node_id & ~((1 << n_val) - 1)) >> 1;
|
||||
gnode_upper = ((unsigned long)gnode_extra << m_val);
|
||||
printk(KERN_DEBUG "UV: N %d, M %d, gnode_upper 0x%lx, gnode_extra 0x%x\n",
|
||||
n_val, m_val, gnode_upper, gnode_extra);
|
||||
|
||||
printk(KERN_DEBUG "UV: global MMR base 0x%lx\n", mmr_base);
|
||||
|
||||
for(i = 0; i < UVH_NODE_PRESENT_TABLE_DEPTH; i++)
|
||||
@@ -610,11 +617,6 @@ void __init uv_system_init(void)
|
||||
}
|
||||
}
|
||||
|
||||
pnode_mask = (1 << n_val) - 1;
|
||||
node_id.v = uv_read_local_mmr(UVH_NODE_ID);
|
||||
gnode_upper = (((unsigned long)node_id.s.node_id) &
|
||||
~((1 << n_val) - 1)) << m_val;
|
||||
|
||||
uv_bios_init();
|
||||
uv_bios_get_sn_info(0, &uv_type, &sn_partition_id,
|
||||
&sn_coherency_id, &sn_region_size);
|
||||
@@ -637,6 +639,7 @@ void __init uv_system_init(void)
|
||||
uv_cpu_hub_info(cpu)->pnode_mask = pnode_mask;
|
||||
uv_cpu_hub_info(cpu)->gpa_mask = (1 << (m_val + n_val)) - 1;
|
||||
uv_cpu_hub_info(cpu)->gnode_upper = gnode_upper;
|
||||
uv_cpu_hub_info(cpu)->gnode_extra = gnode_extra;
|
||||
uv_cpu_hub_info(cpu)->global_mmr_base = mmr_base;
|
||||
uv_cpu_hub_info(cpu)->coherency_domain_number = sn_coherency_id;
|
||||
uv_cpu_hub_info(cpu)->scir.offset = SCIR_LOCAL_MMR_BASE + lcpu;
|
||||
|
Reference in New Issue
Block a user