Skip to content

Commit

Permalink
Merge branches 'sched-urgent-for-linus', 'timers-urgent-for-linus' an…
Browse files Browse the repository at this point in the history
…d 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull scheduler, timer and x86 fixes from Ingo Molnar:
 - A context tracking ARM build and functional fix
 - A handful of ARM clocksource/clockevent driver fixes
 - An AMD microcode patch level sysfs reporting fixlet

* 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  arm: Fix build error with context tracking calls

* 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  clocksource: em_sti: Set cpu_possible_mask to fix SMP broadcast
  clocksource: of: Respect device tree node status
  clocksource: exynos_mct: Set IRQ affinity when the CPU goes online
  arm: clocksource: mvebu: Use the main timer as clock source from DT

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/microcode/AMD: Fix patch level reporting for family 15h
  • Loading branch information
torvalds committed Sep 28, 2013
4 parents 9b565a8 + 62d08ae + 2199a55 + accd1e8 commit 669fc2f
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 6 deletions.
8 changes: 4 additions & 4 deletions arch/arm/kernel/entry-header.S
Original file line number Diff line number Diff line change
Expand Up @@ -329,10 +329,10 @@
#ifdef CONFIG_CONTEXT_TRACKING
.if \save
stmdb sp!, {r0-r3, ip, lr}
bl user_exit
bl context_tracking_user_exit
ldmia sp!, {r0-r3, ip, lr}
.else
bl user_exit
bl context_tracking_user_exit
.endif
#endif
.endm
Expand All @@ -341,10 +341,10 @@
#ifdef CONFIG_CONTEXT_TRACKING
.if \save
stmdb sp!, {r0-r3, ip, lr}
bl user_enter
bl context_tracking_user_enter
ldmia sp!, {r0-r3, ip, lr}
.else
bl user_enter
bl context_tracking_user_enter
.endif
#endif
.endm
Expand Down
1 change: 1 addition & 0 deletions arch/x86/kernel/microcode_amd.c
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ int apply_microcode_amd(int cpu)
/* need to apply patch? */
if (rev >= mc_amd->hdr.patch_id) {
c->microcode = rev;
uci->cpu_sig.rev = rev;
return 0;
}

Expand Down
1 change: 1 addition & 0 deletions drivers/clocksource/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ config DW_APB_TIMER_OF

config ARMADA_370_XP_TIMER
bool
select CLKSRC_OF

config ORION_TIMER
select CLKSRC_OF
Expand Down
3 changes: 3 additions & 0 deletions drivers/clocksource/clksrc-of.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ void __init clocksource_of_init(void)
clocksource_of_init_fn init_func;

for_each_matching_node_and_match(np, __clksrc_of_table, &match) {
if (!of_device_is_available(np))
continue;

init_func = match->data;
init_func(np);
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/clocksource/em_sti.c
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ static void em_sti_register_clockevent(struct em_sti_priv *p)
ced->name = dev_name(&p->pdev->dev);
ced->features = CLOCK_EVT_FEAT_ONESHOT;
ced->rating = 200;
ced->cpumask = cpumask_of(0);
ced->cpumask = cpu_possible_mask;
ced->set_next_event = em_sti_clock_event_next;
ced->set_mode = em_sti_clock_event_mode;

Expand Down
10 changes: 9 additions & 1 deletion drivers/clocksource/exynos_mct.c
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,6 @@ static int exynos4_local_timer_setup(struct clock_event_device *evt)
evt->irq);
return -EIO;
}
irq_set_affinity(evt->irq, cpumask_of(cpu));
} else {
enable_percpu_irq(mct_irqs[MCT_L0_IRQ], 0);
}
Expand All @@ -449,6 +448,7 @@ static int exynos4_mct_cpu_notify(struct notifier_block *self,
unsigned long action, void *hcpu)
{
struct mct_clock_event_device *mevt;
unsigned int cpu;

/*
* Grab cpu pointer in each case to avoid spurious
Expand All @@ -459,6 +459,12 @@ static int exynos4_mct_cpu_notify(struct notifier_block *self,
mevt = this_cpu_ptr(&percpu_mct_tick);
exynos4_local_timer_setup(&mevt->evt);
break;
case CPU_ONLINE:
cpu = (unsigned long)hcpu;
if (mct_int_type == MCT_INT_SPI)
irq_set_affinity(mct_irqs[MCT_L0_IRQ + cpu],
cpumask_of(cpu));
break;
case CPU_DYING:
mevt = this_cpu_ptr(&percpu_mct_tick);
exynos4_local_timer_stop(&mevt->evt);
Expand Down Expand Up @@ -500,6 +506,8 @@ static void __init exynos4_timer_resources(struct device_node *np, void __iomem
&percpu_mct_tick);
WARN(err, "MCT: can't request IRQ %d (%d)\n",
mct_irqs[MCT_L0_IRQ], err);
} else {
irq_set_affinity(mct_irqs[MCT_L0_IRQ], cpumask_of(0));
}

err = register_cpu_notifier(&exynos4_mct_cpu_nb);
Expand Down
12 changes: 12 additions & 0 deletions kernel/context_tracking.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,15 @@ void context_tracking_user_enter(void)
{
unsigned long flags;

/*
* Repeat the user_enter() check here because some archs may be calling
* this from asm and if no CPU needs context tracking, they shouldn't
* go further. Repeat the check here until they support the static key
* check.
*/
if (!static_key_false(&context_tracking_enabled))
return;

/*
* Some contexts may involve an exception occuring in an irq,
* leading to that nesting:
Expand Down Expand Up @@ -151,6 +160,9 @@ void context_tracking_user_exit(void)
{
unsigned long flags;

if (!static_key_false(&context_tracking_enabled))
return;

if (in_interrupt())
return;

Expand Down

0 comments on commit 669fc2f

Please sign in to comment.