Skip to content

Commit 669fc2f

Browse files
committed
Merge branches 'sched-urgent-for-linus', 'timers-urgent-for-linus' and '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
4 parents 9b565a8 + 62d08ae + 2199a55 + accd1e8 commit 669fc2f

7 files changed

Lines changed: 31 additions & 6 deletions

File tree

‎arch/arm/kernel/entry-header.S‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -329,10 +329,10 @@
329329
#ifdef CONFIG_CONTEXT_TRACKING
330330
.if \save
331331
stmdb sp!, {r0-r3, ip, lr}
332-
bl user_exit
332+
bl context_tracking_user_exit
333333
ldmia sp!, {r0-r3, ip, lr}
334334
.else
335-
bl user_exit
335+
bl context_tracking_user_exit
336336
.endif
337337
#endif
338338
.endm
@@ -341,10 +341,10 @@
341341
#ifdef CONFIG_CONTEXT_TRACKING
342342
.if \save
343343
stmdb sp!, {r0-r3, ip, lr}
344-
bl user_enter
344+
bl context_tracking_user_enter
345345
ldmia sp!, {r0-r3, ip, lr}
346346
.else
347-
bl user_enter
347+
bl context_tracking_user_enter
348348
.endif
349349
#endif
350350
.endm

‎arch/x86/kernel/microcode_amd.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ int apply_microcode_amd(int cpu)
216216
/* need to apply patch? */
217217
if (rev >= mc_amd->hdr.patch_id) {
218218
c->microcode = rev;
219+
uci->cpu_sig.rev = rev;
219220
return 0;
220221
}
221222

‎drivers/clocksource/Kconfig‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ config DW_APB_TIMER_OF
2626

2727
config ARMADA_370_XP_TIMER
2828
bool
29+
select CLKSRC_OF
2930

3031
config ORION_TIMER
3132
select CLKSRC_OF

‎drivers/clocksource/clksrc-of.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ void __init clocksource_of_init(void)
3030
clocksource_of_init_fn init_func;
3131

3232
for_each_matching_node_and_match(np, __clksrc_of_table, &match) {
33+
if (!of_device_is_available(np))
34+
continue;
35+
3336
init_func = match->data;
3437
init_func(np);
3538
}

‎drivers/clocksource/em_sti.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ static void em_sti_register_clockevent(struct em_sti_priv *p)
301301
ced->name = dev_name(&p->pdev->dev);
302302
ced->features = CLOCK_EVT_FEAT_ONESHOT;
303303
ced->rating = 200;
304-
ced->cpumask = cpumask_of(0);
304+
ced->cpumask = cpu_possible_mask;
305305
ced->set_next_event = em_sti_clock_event_next;
306306
ced->set_mode = em_sti_clock_event_mode;
307307

‎drivers/clocksource/exynos_mct.c‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,6 @@ static int exynos4_local_timer_setup(struct clock_event_device *evt)
428428
evt->irq);
429429
return -EIO;
430430
}
431-
irq_set_affinity(evt->irq, cpumask_of(cpu));
432431
} else {
433432
enable_percpu_irq(mct_irqs[MCT_L0_IRQ], 0);
434433
}
@@ -449,6 +448,7 @@ static int exynos4_mct_cpu_notify(struct notifier_block *self,
449448
unsigned long action, void *hcpu)
450449
{
451450
struct mct_clock_event_device *mevt;
451+
unsigned int cpu;
452452

453453
/*
454454
* Grab cpu pointer in each case to avoid spurious
@@ -459,6 +459,12 @@ static int exynos4_mct_cpu_notify(struct notifier_block *self,
459459
mevt = this_cpu_ptr(&percpu_mct_tick);
460460
exynos4_local_timer_setup(&mevt->evt);
461461
break;
462+
case CPU_ONLINE:
463+
cpu = (unsigned long)hcpu;
464+
if (mct_int_type == MCT_INT_SPI)
465+
irq_set_affinity(mct_irqs[MCT_L0_IRQ + cpu],
466+
cpumask_of(cpu));
467+
break;
462468
case CPU_DYING:
463469
mevt = this_cpu_ptr(&percpu_mct_tick);
464470
exynos4_local_timer_stop(&mevt->evt);
@@ -500,6 +506,8 @@ static void __init exynos4_timer_resources(struct device_node *np, void __iomem
500506
&percpu_mct_tick);
501507
WARN(err, "MCT: can't request IRQ %d (%d)\n",
502508
mct_irqs[MCT_L0_IRQ], err);
509+
} else {
510+
irq_set_affinity(mct_irqs[MCT_L0_IRQ], cpumask_of(0));
503511
}
504512

505513
err = register_cpu_notifier(&exynos4_mct_cpu_nb);

‎kernel/context_tracking.c‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,15 @@ void context_tracking_user_enter(void)
5050
{
5151
unsigned long flags;
5252

53+
/*
54+
* Repeat the user_enter() check here because some archs may be calling
55+
* this from asm and if no CPU needs context tracking, they shouldn't
56+
* go further. Repeat the check here until they support the static key
57+
* check.
58+
*/
59+
if (!static_key_false(&context_tracking_enabled))
60+
return;
61+
5362
/*
5463
* Some contexts may involve an exception occuring in an irq,
5564
* leading to that nesting:
@@ -151,6 +160,9 @@ void context_tracking_user_exit(void)
151160
{
152161
unsigned long flags;
153162

163+
if (!static_key_false(&context_tracking_enabled))
164+
return;
165+
154166
if (in_interrupt())
155167
return;
156168

0 commit comments

Comments
 (0)