Merge branch 'x86-pat-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'x86-pat-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: x86, pat: Fix cacheflush address in change_page_attr_set_clr() mm: remove !NUMA condition from PAGEFLAGS_EXTENDED condition set x86: Fix earlyprintk=dbgp for machines without NX x86, pat: Sanity check remap_pfn_range for RAM region x86, pat: Lookup the protection from memtype list on vm_insert_pfn() x86, pat: Add lookup_memtype to get the current memtype of a paddr x86, pat: Use page flags to track memtypes of RAM pages x86, pat: Generalize the use of page flag PG_uncached x86, pat: Add rbtree to do quick lookup in memtype tracking x86, pat: Add PAT reserve free to io_mapping* APIs x86, pat: New i/f for driver to request memtype for IO regions x86, pat: ioremap to follow same PAT restrictions as other PAT users x86, pat: Keep identity maps consistent with mmaps even when pat_disabled x86, mtrr: make mtrr_aps_delayed_init static bool x86, pat/mtrr: Rendezvous all the cpus for MTRR/PAT init generic-ipi: Allow cpus not yet online to call smp_call_function with irqs disabled x86: Fix an incorrect argument of reserve_bootmem() x86: Fix system crash when loading with "reservetop" parameter
This commit is contained in:
14
kernel/cpu.c
14
kernel/cpu.c
@@ -414,6 +414,14 @@ int disable_nonboot_cpus(void)
|
||||
return error;
|
||||
}
|
||||
|
||||
void __weak arch_enable_nonboot_cpus_begin(void)
|
||||
{
|
||||
}
|
||||
|
||||
void __weak arch_enable_nonboot_cpus_end(void)
|
||||
{
|
||||
}
|
||||
|
||||
void __ref enable_nonboot_cpus(void)
|
||||
{
|
||||
int cpu, error;
|
||||
@@ -425,6 +433,9 @@ void __ref enable_nonboot_cpus(void)
|
||||
goto out;
|
||||
|
||||
printk("Enabling non-boot CPUs ...\n");
|
||||
|
||||
arch_enable_nonboot_cpus_begin();
|
||||
|
||||
for_each_cpu(cpu, frozen_cpus) {
|
||||
error = _cpu_up(cpu, 1);
|
||||
if (!error) {
|
||||
@@ -433,6 +444,9 @@ void __ref enable_nonboot_cpus(void)
|
||||
}
|
||||
printk(KERN_WARNING "Error taking CPU%d up: %d\n", cpu, error);
|
||||
}
|
||||
|
||||
arch_enable_nonboot_cpus_end();
|
||||
|
||||
cpumask_clear(frozen_cpus);
|
||||
out:
|
||||
cpu_maps_update_done();
|
||||
|
40
kernel/smp.c
40
kernel/smp.c
@@ -176,6 +176,11 @@ void generic_smp_call_function_interrupt(void)
|
||||
struct call_function_data *data;
|
||||
int cpu = get_cpu();
|
||||
|
||||
/*
|
||||
* Shouldn't receive this interrupt on a cpu that is not yet online.
|
||||
*/
|
||||
WARN_ON_ONCE(!cpu_online(cpu));
|
||||
|
||||
/*
|
||||
* Ensure entry is visible on call_function_queue after we have
|
||||
* entered the IPI. See comment in smp_call_function_many.
|
||||
@@ -230,6 +235,11 @@ void generic_smp_call_function_single_interrupt(void)
|
||||
unsigned int data_flags;
|
||||
LIST_HEAD(list);
|
||||
|
||||
/*
|
||||
* Shouldn't receive this interrupt on a cpu that is not yet online.
|
||||
*/
|
||||
WARN_ON_ONCE(!cpu_online(smp_processor_id()));
|
||||
|
||||
spin_lock(&q->lock);
|
||||
list_replace_init(&q->list, &list);
|
||||
spin_unlock(&q->lock);
|
||||
@@ -285,8 +295,14 @@ int smp_call_function_single(int cpu, void (*func) (void *info), void *info,
|
||||
*/
|
||||
this_cpu = get_cpu();
|
||||
|
||||
/* Can deadlock when called with interrupts disabled */
|
||||
WARN_ON_ONCE(irqs_disabled() && !oops_in_progress);
|
||||
/*
|
||||
* Can deadlock when called with interrupts disabled.
|
||||
* We allow cpu's that are not yet online though, as no one else can
|
||||
* send smp call function interrupt to this cpu and as such deadlocks
|
||||
* can't happen.
|
||||
*/
|
||||
WARN_ON_ONCE(cpu_online(this_cpu) && irqs_disabled()
|
||||
&& !oops_in_progress);
|
||||
|
||||
if (cpu == this_cpu) {
|
||||
local_irq_save(flags);
|
||||
@@ -329,8 +345,14 @@ void __smp_call_function_single(int cpu, struct call_single_data *data,
|
||||
{
|
||||
csd_lock(data);
|
||||
|
||||
/* Can deadlock when called with interrupts disabled */
|
||||
WARN_ON_ONCE(wait && irqs_disabled() && !oops_in_progress);
|
||||
/*
|
||||
* Can deadlock when called with interrupts disabled.
|
||||
* We allow cpu's that are not yet online though, as no one else can
|
||||
* send smp call function interrupt to this cpu and as such deadlocks
|
||||
* can't happen.
|
||||
*/
|
||||
WARN_ON_ONCE(cpu_online(smp_processor_id()) && wait && irqs_disabled()
|
||||
&& !oops_in_progress);
|
||||
|
||||
generic_exec_single(cpu, data, wait);
|
||||
}
|
||||
@@ -365,8 +387,14 @@ void smp_call_function_many(const struct cpumask *mask,
|
||||
unsigned long flags;
|
||||
int cpu, next_cpu, this_cpu = smp_processor_id();
|
||||
|
||||
/* Can deadlock when called with interrupts disabled */
|
||||
WARN_ON_ONCE(irqs_disabled() && !oops_in_progress);
|
||||
/*
|
||||
* Can deadlock when called with interrupts disabled.
|
||||
* We allow cpu's that are not yet online though, as no one else can
|
||||
* send smp call function interrupt to this cpu and as such deadlocks
|
||||
* can't happen.
|
||||
*/
|
||||
WARN_ON_ONCE(cpu_online(this_cpu) && irqs_disabled()
|
||||
&& !oops_in_progress);
|
||||
|
||||
/* So, what's a CPU they want? Ignoring this one. */
|
||||
cpu = cpumask_first_and(mask, cpu_online_mask);
|
||||
|
Reference in New Issue
Block a user