Merge branch 'linus' into core/percpu
Conflicts: kernel/irq/handle.c
This commit is contained in:
+18
-10
@@ -1115,8 +1115,10 @@ static void cgroup_kill_sb(struct super_block *sb) {
|
||||
}
|
||||
write_unlock(&css_set_lock);
|
||||
|
||||
list_del(&root->root_list);
|
||||
root_count--;
|
||||
if (!list_empty(&root->root_list)) {
|
||||
list_del(&root->root_list);
|
||||
root_count--;
|
||||
}
|
||||
|
||||
mutex_unlock(&cgroup_mutex);
|
||||
|
||||
@@ -2434,7 +2436,9 @@ static long cgroup_create(struct cgroup *parent, struct dentry *dentry,
|
||||
|
||||
err_remove:
|
||||
|
||||
cgroup_lock_hierarchy(root);
|
||||
list_del(&cgrp->sibling);
|
||||
cgroup_unlock_hierarchy(root);
|
||||
root->number_of_cgroups--;
|
||||
|
||||
err_destroy:
|
||||
@@ -2507,7 +2511,7 @@ static int cgroup_clear_css_refs(struct cgroup *cgrp)
|
||||
for_each_subsys(cgrp->root, ss) {
|
||||
struct cgroup_subsys_state *css = cgrp->subsys[ss->subsys_id];
|
||||
int refcnt;
|
||||
do {
|
||||
while (1) {
|
||||
/* We can only remove a CSS with a refcnt==1 */
|
||||
refcnt = atomic_read(&css->refcnt);
|
||||
if (refcnt > 1) {
|
||||
@@ -2521,7 +2525,10 @@ static int cgroup_clear_css_refs(struct cgroup *cgrp)
|
||||
* css_tryget() to spin until we set the
|
||||
* CSS_REMOVED bits or abort
|
||||
*/
|
||||
} while (atomic_cmpxchg(&css->refcnt, refcnt, 0) != refcnt);
|
||||
if (atomic_cmpxchg(&css->refcnt, refcnt, 0) == refcnt)
|
||||
break;
|
||||
cpu_relax();
|
||||
}
|
||||
}
|
||||
done:
|
||||
for_each_subsys(cgrp->root, ss) {
|
||||
@@ -2991,20 +2998,21 @@ int cgroup_clone(struct task_struct *tsk, struct cgroup_subsys *subsys,
|
||||
mutex_unlock(&cgroup_mutex);
|
||||
return 0;
|
||||
}
|
||||
task_lock(tsk);
|
||||
cg = tsk->cgroups;
|
||||
parent = task_cgroup(tsk, subsys->subsys_id);
|
||||
|
||||
/* Pin the hierarchy */
|
||||
if (!atomic_inc_not_zero(&parent->root->sb->s_active)) {
|
||||
if (!atomic_inc_not_zero(&root->sb->s_active)) {
|
||||
/* We race with the final deactivate_super() */
|
||||
mutex_unlock(&cgroup_mutex);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Keep the cgroup alive */
|
||||
task_lock(tsk);
|
||||
parent = task_cgroup(tsk, subsys->subsys_id);
|
||||
cg = tsk->cgroups;
|
||||
get_css_set(cg);
|
||||
task_unlock(tsk);
|
||||
|
||||
mutex_unlock(&cgroup_mutex);
|
||||
|
||||
/* Now do the VFS work to create a cgroup */
|
||||
@@ -3043,7 +3051,7 @@ int cgroup_clone(struct task_struct *tsk, struct cgroup_subsys *subsys,
|
||||
mutex_unlock(&inode->i_mutex);
|
||||
put_css_set(cg);
|
||||
|
||||
deactivate_super(parent->root->sb);
|
||||
deactivate_super(root->sb);
|
||||
/* The cgroup is still accessible in the VFS, but
|
||||
* we're not going to try to rmdir() it at this
|
||||
* point. */
|
||||
@@ -3069,7 +3077,7 @@ int cgroup_clone(struct task_struct *tsk, struct cgroup_subsys *subsys,
|
||||
mutex_lock(&cgroup_mutex);
|
||||
put_css_set(cg);
|
||||
mutex_unlock(&cgroup_mutex);
|
||||
deactivate_super(parent->root->sb);
|
||||
deactivate_super(root->sb);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -40,6 +40,18 @@ void handle_bad_irq(unsigned int irq, struct irq_desc *desc)
|
||||
ack_bad_irq(irq);
|
||||
}
|
||||
|
||||
#if defined(CONFIG_SMP) && defined(CONFIG_GENERIC_HARDIRQS)
|
||||
static void __init init_irq_default_affinity(void)
|
||||
{
|
||||
alloc_bootmem_cpumask_var(&irq_default_affinity);
|
||||
cpumask_setall(irq_default_affinity);
|
||||
}
|
||||
#else
|
||||
static void __init init_irq_default_affinity(void)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Linux has a controller-independent interrupt architecture.
|
||||
* Every controller has a 'controller-template', that is used
|
||||
@@ -133,6 +145,8 @@ int __init early_irq_init(void)
|
||||
int legacy_count;
|
||||
int i;
|
||||
|
||||
init_irq_default_affinity();
|
||||
|
||||
/* initialize nr_irqs based on nr_cpu_ids */
|
||||
arch_probe_nr_irqs();
|
||||
printk(KERN_INFO "NR_IRQS:%d nr_irqs:%d\n", NR_IRQS, nr_irqs);
|
||||
@@ -229,6 +243,8 @@ int __init early_irq_init(void)
|
||||
int count;
|
||||
int i;
|
||||
|
||||
init_irq_default_affinity();
|
||||
|
||||
printk(KERN_INFO "NR_IRQS:%d\n", NR_IRQS);
|
||||
|
||||
desc = irq_desc;
|
||||
|
||||
+1
-9
@@ -15,17 +15,9 @@
|
||||
|
||||
#include "internals.h"
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
#if defined(CONFIG_SMP) && defined(CONFIG_GENERIC_HARDIRQS)
|
||||
cpumask_var_t irq_default_affinity;
|
||||
|
||||
static int init_irq_default_affinity(void)
|
||||
{
|
||||
alloc_cpumask_var(&irq_default_affinity, GFP_KERNEL);
|
||||
cpumask_setall(irq_default_affinity);
|
||||
return 0;
|
||||
}
|
||||
core_initcall(init_irq_default_affinity);
|
||||
|
||||
/**
|
||||
* synchronize_irq - wait for pending IRQ handlers (on other CPUs)
|
||||
* @irq: interrupt number to wait for
|
||||
|
||||
@@ -71,6 +71,14 @@ void hibernation_set_ops(struct platform_hibernation_ops *ops)
|
||||
mutex_unlock(&pm_mutex);
|
||||
}
|
||||
|
||||
static bool entering_platform_hibernation;
|
||||
|
||||
bool system_entering_hibernation(void)
|
||||
{
|
||||
return entering_platform_hibernation;
|
||||
}
|
||||
EXPORT_SYMBOL(system_entering_hibernation);
|
||||
|
||||
#ifdef CONFIG_PM_DEBUG
|
||||
static void hibernation_debug_sleep(void)
|
||||
{
|
||||
@@ -411,6 +419,7 @@ int hibernation_platform_enter(void)
|
||||
if (error)
|
||||
goto Close;
|
||||
|
||||
entering_platform_hibernation = true;
|
||||
suspend_console();
|
||||
error = device_suspend(PMSG_HIBERNATE);
|
||||
if (error) {
|
||||
@@ -445,6 +454,7 @@ int hibernation_platform_enter(void)
|
||||
Finish:
|
||||
hibernation_ops->finish();
|
||||
Resume_devices:
|
||||
entering_platform_hibernation = false;
|
||||
device_resume(PMSG_RESTORE);
|
||||
resume_console();
|
||||
Close:
|
||||
|
||||
Reference in New Issue
Block a user