3.0.6-rt16
Subsystems (24)
Dear RT Folks,
I'm pleased to announce the 3.0.6-rt16 release.
Changes from 3.0.4-rt14 to 3.0.4-rt15
This is an intermediate version to get a rt only delta. Please use 3.0.4-rt16!
* Drop RCU_bh hack (Thanks to Paul McKenney for review and explanation!)
* Hotplug fix for softirq (Peter Zijlstra) - should fix cpu online/offline and poweroff/suspend problems
* migrate_disable() performance optimizations (Steven Rostedt, Peter Zijlstra)
* workqueue sanitizing (Peter Zijlstra)
* Reenable adaptive rtmutex spinning
* ARM split PTL fix (Frank Rowand)
* MIPS IRQ_NO_THREAD annotations (Venkat Subbiah)
* x86_64 irq vs. idle_exit fixes (Frederic Weisbecker)
* tracing fixes (Steven Rostedt)
* Forced sysrq printing (Frank Rowand)
* HPET MSI disable for Lenovo W510
* Raw spinlock annotations (Frank Rowand)
* !RT compile fix (John Kacur)
* Rtmutex debug RCU fix
* Some cherry picked mainline fixes
Delta patch against 3.0.4-rt14
https://tglx.de/~tglx/rt/older/patch-3.0.4-rt14-rt15.patch.gz
also appended below.
Changes from 3.0.4-rt15 to 3.0.6-rt16
* Update to 3.0.6 (Dropped a few patches which made it into 3.0.6)
Patch against 3.0.6 can be found here:
https://tglx.de/~tglx/rt/patch-3.0.6-rt16.patch.gz
The split quilt queue is available at:
https://tglx.de/~tglx/rt/patches-3.0.6-rt16.tar.gz
Enjoy,
tglx
--------------->
arch/arm/kernel/process.c +25 -0
@@ -484,6 +484,31 @@ unsigned long arch_randomize_brk(struct }#ifdef CONFIG_MMU + +/* +* CONFIG_SPLIT_PTLOCK_CPUS results in a page->ptl lock. If the lock is not +* initialized by pgtable_page_ctor() then a coredump of the vector page will +* fail. +*/ +static int __init vectors_user_mapping_init_page (void ) +{ +struct page *page; +unsigned long addr =0xffff0000 ; +pgd_t *pgd; +pud_t *pud; +pmd_t *pmd; + + pgd =pgd_offset_k (addr); + pud =pud_offset (pgd, addr); + pmd =pmd_offset (pud, addr); + page =pmd_page (*(pmd)); + +pgtable_page_ctor (page); + +return 0 ; +} +late_initcall (vectors_user_mapping_init_page); +/* * The vectors page is always readable from user space for the * atomic helpers and the signal restart code. Let's declare a mapping
arch/arm/plat-mxc/include/mach/iomux-v3.h +1 -1
@@ -66,6 +66,7 @@ typedef u64 iomux_v3_cfg_t;#define MUX_MODE_MASK ((iomux_v3_cfg_t)0x1f << MUX_MODE_SHIFT)#define MUX_PAD_CTRL_SHIFT 41#define MUX_PAD_CTRL_MASK ((iomux_v3_cfg_t)0x1ffff << MUX_PAD_CTRL_SHIFT) +#define NO_PAD_CTRL ((iomux_v3_cfg_t)1 << (MUX_PAD_CTRL_SHIFT + 16))#define MUX_SEL_INPUT_SHIFT 58#define MUX_SEL_INPUT_MASK ((iomux_v3_cfg_t)0xf << MUX_SEL_INPUT_SHIFT)
@@ -84,7 +85,6 @@ typedef u64 iomux_v3_cfg_t;* Use to set PAD control */ -#define NO_PAD_CTRL (1 << 16)#define PAD_CTL_DVS (1 << 13)#define PAD_CTL_HYS (1 << 8)
arch/x86/kernel/apic/io_apic.c +1 -1
@@ -2275,8 +2275,8 @@ asmlinkage void smp_irq_move_cleanup_intunsigned vector, me;ack_APIC_irq (); -exit_idle ();irq_enter (); +exit_idle (); me =smp_processor_id ();for (vector =FIRST_EXTERNAL_VECTOR ; vector <NR_VECTORS ; vector++) {
arch/x86/kernel/cpu/mcheck/mce.c +1 -1
@@ -471,8 +471,8 @@ static inline void mce_get_rip(struct mc asmlinkage void smp_mce_self_interrupt(struct pt_regs *regs) {ack_APIC_irq (); -exit_idle ();irq_enter (); +exit_idle ();mce_notify_irq ();mce_schedule_work ();irq_exit ();
include/linux/cpu.h +8 -6
@@ -60,14 +60,16 @@ enum {*/ CPU_PRI_SCHED_ACTIVE =INT_MAX ,CPU_PRI_CPUSET_ACTIVE =INT_MAX -1 , -CPU_PRI_SCHED_INACTIVE =INT_MIN +1 , -CPU_PRI_CPUSET_INACTIVE =INT_MIN ,/* migration should happen before other stuff but after perf */ -CPU_PRI_PERF =20 , -CPU_PRI_MIGRATION =10 , -/* prepare workqueues for other notifiers */ - CPU_PRI_WORKQUEUE = 5, +CPU_PRI_PERF =20 , +CPU_PRI_MIGRATION =10 , +CPU_PRI_WORKQUEUE_ACTIVE =5 ,/* prepare workqueues for others */ +CPU_PRI_NORMAL =0 , +CPU_PRI_WORKQUEUE_INACTIVE =-5 ,/* flush workqueues after others */ + +CPU_PRI_SCHED_INACTIVE =INT_MIN +1 , + CPU_PRI_CPUSET_INACTIVE = INT_MIN, };#ifdef CONFIG_SMP
include/linux/rcupdate.h +0 -32
@@ -78,13 +78,7 @@ struct rcu_head {extern void call_rcu_sched (struct rcu_head *head,void (*func)(struct rcu_head *rcu));extern void synchronize_sched (void ); - -#ifdef CONFIG_PREEMPT_RT_FULL -# define rcu_barrier_bh rcu_barrier -#else extern void rcu_barrier_bh (void ); -#endif -extern void rcu_barrier_sched (void );static inline void __rcu_read_lock_bh (void )
@@ -144,13 +138,7 @@ static inline int rcu_preempt_depth(void/* Internal to kernel */ extern void rcu_sched_qs (int cpu); - -#ifndef CONFIG_PREEMPT_RT_FULL extern void rcu_bh_qs (int cpu); -#else -static inline void rcu_bh_qs (int cpu) { } -#endif -extern void rcu_check_callbacks (int cpu,int user);struct notifier_block ;
@@ -241,14 +229,7 @@ static inline int rcu_read_lock_held(voi* rcu_read_lock_bh_held() is defined out of line to avoid #include-file * hell. */ -#ifdef CONFIG_PREEMPT_RT_FULL -static inline int rcu_read_lock_bh_held (void ) -{ -return rcu_read_lock_held (); -} -#else extern int rcu_read_lock_bh_held (void ); -#endif /** * rcu_read_lock_sched_held() - might we be in RCU-sched read-side critical section?
@@ -657,13 +638,8 @@ static inline void rcu_read_unlock(void)static inline void rcu_read_lock_bh (void ) {__rcu_read_lock_bh (); - -#ifdef CONFIG_PREEMPT_RT_FULL -rcu_read_lock (); -#else __acquire (RCU_BH );rcu_read_acquire_bh (); -#endif }/*
@@ -673,12 +649,8 @@ static inline void rcu_read_lock_bh(void*/ static inline void rcu_read_unlock_bh (void ) { -#ifdef CONFIG_PREEMPT_RT_FULL -rcu_read_unlock (); -#else rcu_read_release_bh ();__release (RCU_BH ); -#endif __rcu_read_unlock_bh (); }
@@ -785,9 +757,6 @@ extern void call_rcu(struct rcu_head *he#endif /* #else #ifdef CONFIG_PREEMPT_RCU */ -#ifdef CONFIG_PREEMPT_RT_FULL -#define call_rcu_bh call_rcu -#else /** * call_rcu_bh() - Queue an RCU for invocation after a quicker grace period. * @head: structure to be used for queueing the RCU updates.
@@ -808,7 +777,6 @@ extern void call_rcu(struct rcu_head *he*/ extern void call_rcu_bh (struct rcu_head *head,void (*func)(struct rcu_head *head)); -#endif /* * debug_rcu_head_queue()/debug_rcu_head_unqueue() are used internally
include/linux/rcutree.h +2 -12
@@ -57,11 +57,7 @@ static inline void exit_rcu(void)#endif /* #else #ifdef CONFIG_TREE_PREEMPT_RCU */ -#ifndef CONFIG_PREEMPT_RT_FULL extern void synchronize_rcu_bh (void ); -#else -# define synchronize_rcu_bh () synchronize_rcu() -#endif extern void synchronize_sched_expedited (void );extern void synchronize_rcu_expedited (void );
@@ -75,18 +71,12 @@ extern void rcu_barrier(void);extern unsigned long rcutorture_testseq;extern unsigned long rcutorture_vernum;extern long rcu_batches_completed (void ); +extern long rcu_batches_completed_bh (void );extern long rcu_batches_completed_sched (void );extern void rcu_force_quiescent_state (void ); -extern void rcu_sched_force_quiescent_state (void ); - -#ifndef CONFIG_PREEMPT_RT_FULL extern void rcu_bh_force_quiescent_state (void ); -extern long rcu_batches_completed_bh (void ); -#else -# define rcu_bh_force_quiescent_state rcu_force_quiescent_state -# define rcu_batches_completed_bh rcu_batches_completed -#endif +extern void rcu_sched_force_quiescent_state (void );/* A context switch is a grace period for RCU-sched and RCU-bh. */ static inline int rcu_blocking_is_gp (void )
include/linux/rwlock_types.h +2 -1
@@ -47,6 +47,7 @@ typedef struct { RW_DEP_MAP_INIT(lockname) }#endif -#define DEFINE_RWLOCK (x) rwlock_t x = __RW_LOCK_UNLOCKED(x) +#define DEFINE_RWLOCK (name) \ + rwlock_t name __cacheline_aligned_in_smp = __RW_LOCK_UNLOCKED(name)#endif /* __LINUX_RWLOCK_TYPES_H */
kernel/fork.c +1 -1
@@ -87,7 +87,7 @@ int max_threads; /* tunable limit on nr DEFINE_PER_CPU(unsigned long, process_counts) = 0; -__cacheline_aligned DEFINE_RWLOCK (tasklist_lock );/* outer */ +DEFINE_RWLOCK (tasklist_lock);/* outer */ #ifdef CONFIG_PROVE_RCU int lockdep_tasklist_lock_is_held (void )
kernel/printk.c +3 -2
@@ -21,6 +21,7 @@#include <linux/tty.h> #include <linux/tty_driver.h> #include <linux/console.h> +#include <linux/sysrq.h> #include <linux/init.h> #include <linux/jiffies.h> #include <linux/nmi.h>
@@ -831,8 +832,8 @@ static int console_trylock_for_printk(un __releases(&logbuf_lock) {#ifdef CONFIG_PREEMPT_RT_FULL -int lock = !early_boot_irqs_disabled && !irqs_disabled_flags (flags) && - !preempt_count (); +int lock = (!early_boot_irqs_disabled && !irqs_disabled_flags (flags) && + !preempt_count ()) || sysrq_in_progress;#else int lock =1 ;#endif
kernel/rcupdate.c +0 -2
@@ -72,7 +72,6 @@ int debug_lockdep_rcu_enabled(void) }EXPORT_SYMBOL_GPL (debug_lockdep_rcu_enabled); -#ifndef CONFIG_PREEMPT_RT_FULL /** * rcu_read_lock_bh_held() - might we be in RCU-bh read-side critical section? *
@@ -92,7 +91,6 @@ int rcu_read_lock_bh_held(void) return in_softirq() || irqs_disabled(); }EXPORT_SYMBOL_GPL (rcu_read_lock_bh_held); -#endif #endif /* #ifdef CONFIG_DEBUG_LOCK_ALLOC */
kernel/rcutree.c +0 -10
@@ -166,7 +166,6 @@ void rcu_sched_qs(int cpu) rdp->passed_quiesc =1 ; } -#ifndef CONFIG_PREEMPT_RT_FULL void rcu_bh_qs (int cpu) {struct rcu_data *rdp = &per_cpu (rcu_bh_data, cpu);
@@ -175,7 +174,6 @@ void rcu_bh_qs(int cpu)barrier (); rdp->passed_quiesc =1 ; } -#endif /* * Note a context switch. This is a quiescent state for RCU-sched,
@@ -218,7 +216,6 @@ long rcu_batches_completed_sched(void) }EXPORT_SYMBOL_GPL (rcu_batches_completed_sched); -#ifndef CONFIG_PREEMPT_RT_FULL /* * Return the number of RCU BH batches processed thus far for debug & stats. */
@@ -236,7 +233,6 @@ void rcu_bh_force_quiescent_state(void)force_quiescent_state (&rcu_bh_state,0 ); }EXPORT_SYMBOL_GPL (rcu_bh_force_quiescent_state); -#endif /* * Record the number of times rcutorture tests have been initiated and
@@ -1583,7 +1579,6 @@ void call_rcu_sched(struct rcu_head *hea }EXPORT_SYMBOL_GPL (call_rcu_sched); -#ifndef CONFIG_PREEMPT_RT_FULL /* * Queue an RCU for invocation after a quicker grace period. */
@@ -1592,7 +1587,6 @@ void call_rcu_bh(struct rcu_head *head,__call_rcu (head, func, &rcu_bh_state); }EXPORT_SYMBOL_GPL (call_rcu_bh); -#endif /** * synchronize_sched - wait until an rcu-sched grace period has elapsed.
@@ -1634,7 +1628,6 @@ void synchronize_sched(void) }EXPORT_SYMBOL_GPL (synchronize_sched); -#ifndef CONFIG_PREEMPT_RT_FULL /** * synchronize_rcu_bh - wait until an rcu_bh grace period has elapsed. *
@@ -1660,7 +1653,6 @@ void synchronize_rcu_bh(void)destroy_rcu_head_on_stack (&rcu.head); }EXPORT_SYMBOL_GPL (synchronize_rcu_bh); -#endif /* * Check to see if there is any immediate RCU-related work to be done
@@ -1814,7 +1806,6 @@ static void _rcu_barrier(struct rcu_statmutex_unlock (&rcu_barrier_mutex); } -#ifndef CONFIG_PREEMPT_RT_FULL /** * rcu_barrier_bh - Wait until all in-flight call_rcu_bh() callbacks complete. */
@@ -1823,7 +1814,6 @@ void rcu_barrier_bh(void)_rcu_barrier (&rcu_bh_state, call_rcu_bh); }EXPORT_SYMBOL_GPL (rcu_barrier_bh); -#endif /** * rcu_barrier_sched - Wait for in-flight call_rcu_sched() callbacks.
kernel/rtmutex-debug.c +3 -1
@@ -94,8 +94,10 @@ void debug_rt_mutex_print_deadlock(strucreturn ; } -if (!debug_locks_off ()) +if (!debug_locks_off ()) { +rcu_read_unlock ();return ; + }printk ("\n============================================\n" );printk ("[ BUG: circular locking deadlock detected! ]\n" );
kernel/rtmutex.c +1 -1
@@ -659,7 +659,7 @@ static inline void rt_spin_lock_fastunloslowfn (lock); } -#ifdef CONFIG_SMP_X +#ifdef CONFIG_SMP /* * Note that owner is a speculative pointer and dereferencing relies * on rcu_read_lock() and the check against the lock owner.
kernel/sched.c +132 -119
282 lines not on this page · raw message
kernel/signal.c +0 -8
@@ -1860,15 +1860,7 @@ static void ptrace_stop(int exit_code, iif (gstop_done && !real_parent_is_ptracer (current))do_notify_parent_cldstop (current, false, why); -/* -* Don't want to allow preemption here, because -* sys_ptrace() needs this task to be inactive. -* -* XXX: implement read_unlock_no_resched(). -*/ -preempt_disable ();read_unlock (&tasklist_lock); -__preempt_enable_no_resched ();schedule (); }else {/*
kernel/softirq.c +2 -6
@@ -1104,9 +1104,8 @@ static int __cpuinit cpu_callback(structint hotcpu = (unsigned long )hcpu;struct task_struct *p; -switch (action) { +switch (action & ~CPU_TASKS_FROZEN ) {case CPU_UP_PREPARE : -case CPU_UP_PREPARE_FROZEN : p = kthread_create_on_node(run_ksoftirqd, hcpu, cpu_to_node(hotcpu),
@@ -1119,19 +1118,16 @@ static int __cpuinit cpu_callback(structper_cpu (ksoftirqd, hotcpu) = p;break ;case CPU_ONLINE : -case CPU_ONLINE_FROZEN :wake_up_process (per_cpu (ksoftirqd, hotcpu));break ;#ifdef CONFIG_HOTPLUG_CPU case CPU_UP_CANCELED : -case CPU_UP_CANCELED_FROZEN :if (!per_cpu (ksoftirqd, hotcpu))break ;/* Unbind so it can run. Fall thru. */ kthread_bind (per_cpu (ksoftirqd, hotcpu),cpumask_any (cpu_online_mask)); -case CPU_DEAD : -case CPU_DEAD_FROZEN : { +case CPU_POST_DEAD : {static const struct sched_param param = { .sched_priority =MAX_RT_PRIO -1 };
kernel/time/Kconfig +0 -1
@@ -7,7 +7,6 @@ config TICK_ONESHOT config NO_HZ bool "Tickless System (Dynamic Ticks)" depends on !ARCH_USES_GETTIMEOFFSET && GENERIC_CLOCKEVENTS - depends on !PREEMPT_RT_FULL select TICK_ONESHOT help This option enables a tickless system: timer interrupts will
kernel/trace/ring_buffer.c +79 -68
343 lines not on this page · raw message
kernel/trace/trace_irqsoff.c +3 -3
@@ -513,14 +513,14 @@ EXPORT_SYMBOL(trace_hardirqs_off_caller)void trace_preempt_on (unsigned long a0,unsigned long a1) {trace_preemptirqsoff_hist (PREEMPT_ON ,0 ); -if (preempt_trace ()) +if (preempt_trace () && !irq_trace ())stop_critical_timing (a0, a1); }void trace_preempt_off (unsigned long a0,unsigned long a1) { -trace_preemptirqsoff_hist (PREEMPT_OFF ,1 ); -if (preempt_trace ()) +trace_preemptirqsoff_hist (PREEMPT_ON ,1 ); +if (preempt_trace () && !irq_trace ())start_critical_timing (a0, a1); }#endif /* CONFIG_PREEMPT_TRACER */
kernel/workqueue.c +161 -416
767 lines not on this page · raw message
lib/Kconfig.debug +22 -0
@@ -62,6 +62,28 @@ config MAGIC_SYSRQ keys are documented in <file:Documentation/sysrq.txt>. Don't say Y unless you really know what this hack does. +config MAGIC_SYSRQ_FORCE_PRINTK + bool "Force printk from Magic SysRq" + depends on MAGIC_SYSRQ && PREEMPT_RT_FULL + default n + help + Allow the output from Magic SysRq to be output immediately, even if + this causes large latencies. This can cause performance problems + for real-time processes. + + If PREEMPT_RT_FULL, printk() will not try to acquire the console lock + when interrupts or preemption are disabled. If the console lock is + not acquired the printk() output will be buffered, but will not be + output immediately. Some drivers call into the Magic SysRq code + with interrupts or preemption disabled, so the output of Magic SysRq + will be buffered instead of printing immediately if this option is + not selected. + + Even with this option selected, Magic SysRq output will be delayed + if the attempt to acquire the console lock fails. + + Don't say Y unless you really know what this hack does. + config STRIP_ASM_SYMS bool "Strip assembler-generated symbols during link" default n
localversion-rt +1 -1
@@ -1 +1 @@ --rt14 +-rt15
arch/x86/kernel/apic/apic.c +3 -3
@@ -856,8 +856,8 @@ void __irq_entry smp_apic_timer_interrup* Besides, if we don't timer interrupts ignore the global * interrupt lock, which is the WrongThing (tm) to do. */ -exit_idle ();irq_enter (); +exit_idle ();local_apic_timer_interrupt ();irq_exit ();
@@ -1790,8 +1790,8 @@ void smp_spurious_interrupt(struct pt_re {u32 v; -exit_idle ();irq_enter (); +exit_idle ();/* * Check if this really is a spurious interrupt and ACK it * if it is a vectored one. Just in case...
@@ -1827,8 +1827,8 @@ void smp_error_interrupt(struct pt_regs "Illegal register address", /* APIC Error Bit 7 */ }; -exit_idle ();irq_enter (); +exit_idle ();/* First tickle the hardware, only then report what went on. -- REW */ v0 =apic_read (APIC_ESR );apic_write (APIC_ESR ,0 );
arch/x86/kernel/cpu/mcheck/therm_throt.c +1 -1
@@ -396,8 +396,8 @@ static void (*smp_thermal_vector)(void) asmlinkage void smp_thermal_interrupt(struct pt_regs *regs) { -exit_idle ();irq_enter (); +exit_idle ();inc_irq_stat (irq_thermal_count);smp_thermal_vector ();irq_exit ();
arch/x86/kernel/cpu/mcheck/threshold.c +1 -1
@@ -19,8 +19,8 @@ void (*mce_threshold_vector)(void) = def asmlinkage void smp_threshold_interrupt(void) { -exit_idle ();irq_enter (); +exit_idle ();inc_irq_stat (irq_threshold_count);mce_threshold_vector ();irq_exit ();
arch/x86/kernel/irq.c +3 -3
@@ -180,8 +180,8 @@ unsigned int __irq_entry do_IRQ(struct punsigned vector = ~regs->orig_ax;unsigned irq; -exit_idle ();irq_enter (); +exit_idle (); irq =__this_cpu_read (vector_irq[vector]);
@@ -208,10 +208,10 @@ void smp_x86_platform_ipi(struct pt_regsack_APIC_irq (); -exit_idle (); -irq_enter (); +exit_idle (); +inc_irq_stat (x86_platform_ipis);if (x86_platform_ipi_callback)
kernel/taskstats.c +1 -0
@@ -657,6 +657,7 @@ static struct genl_ops taskstats_ops = { .cmd = TASKSTATS_CMD_GET, .doit = taskstats_user_cmd, .policy = taskstats_cmd_get_policy, + .flags = GENL_ADMIN_PERM, };static struct genl_ops cgroupstats_ops = {
arch/x86/kernel/hpet.c +26 -0
@@ -7,6 +7,7 @@#include <linux/slab.h> #include <linux/hpet.h> #include <linux/init.h> +#include <linux/dmi.h> #include <linux/cpu.h> #include <linux/pm.h> #include <linux/io.h>
@@ -566,6 +567,29 @@ static void init_one_hpet_msi_clockevent#define RESERVE_TIMERS 0#endif +static int __init dmi_disable_hpet_msi (const struct dmi_system_id *d) +{ + hpet_msi_disable =1 ; +} + +static struct dmi_system_id __initdata dmi_hpet_table[] = { +/* +* MSI based per cpu timers lose interrupts when intel_idle() +* is enabled - independent of the c-state. With idle=poll the +* problem cannot be observed. We have no idea yet, whether +* this is a W510 specific issue or a general chipset oddity. +*/ + { + .callback = dmi_disable_hpet_msi, + .ident ="Lenovo W510" , + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"LENOVO" ), +DMI_MATCH (DMI_PRODUCT_VERSION ,"ThinkPad W510" ), + }, + }, + {} +}; +static void hpet_msi_capability_lookup (unsigned int start_timer) {unsigned int id;
@@ -573,6 +597,8 @@ static void hpet_msi_capability_lookup(uunsigned int num_timers_used =0 ;int i; +dmi_check_system (dmi_hpet_table); +if (hpet_msi_disable)return ;
drivers/watchdog/octeon-wdt-main.c +1 -1
@@ -402,7 +402,7 @@ static void octeon_wdt_setup_interrupt(i irq =OCTEON_IRQ_WDOG0 + core;if (request_irq (irq, octeon_wdt_poke_irq, -IRQF_DISABLED ,"octeon_wdt" , octeon_wdt_poke_irq)) +IRQF_NO_THREAD ,"octeon_wdt" , octeon_wdt_poke_irq))panic ("octeon_wdt: Couldn't obtain irq %d" , irq);cpumask_set_cpu (cpu, &irq_enabled_cpus);
arch/mips/cavium-octeon/smp.c +3 -2
@@ -207,8 +207,9 @@ void octeon_prepare_cpus(unsigned int ma* the other bits alone. */ cvmx_write_csr (CVMX_CIU_MBOX_CLRX (cvmx_get_core_num ()),0xffff ); -if (request_irq (OCTEON_IRQ_MBOX0 , mailbox_interrupt,IRQF_DISABLED , -"SMP-IPI" , mailbox_interrupt)) { +if (request_irq (OCTEON_IRQ_MBOX0 , mailbox_interrupt, +IRQF_PERCPU |IRQF_NO_THREAD ,"SMP-IPI" , + mailbox_interrupt)) {panic ("Cannot request_irq(OCTEON_IRQ_MBOX0)\n" ); } }
arch/x86/include/asm/irqflags.h +6 -5
@@ -60,23 +60,24 @@ static inline void native_halt(void)#include <asm/paravirt.h> #else #ifndef __ASSEMBLY__ +#include <linux/types.h> -static inline unsigned long arch_local_save_flags (void ) +static inline notrace unsigned long arch_local_save_flags (void ) {return native_save_fl (); } -static inline void arch_local_irq_restore (unsigned long flags) +static inline notrace void arch_local_irq_restore(unsigned long flags) {native_restore_fl (flags); } -static inline void arch_local_irq_disable (void ) +static inline notrace void arch_local_irq_disable(void) {native_irq_disable (); } -static inline void arch_local_irq_enable (void ) +static inline notrace void arch_local_irq_enable(void) {native_irq_enable (); }
@@ -102,7 +103,7 @@ static inline void halt(void)/* * For spinlocks, etc: */ -static inline unsigned long arch_local_irq_save (void ) +static inline notrace unsigned long arch_local_irq_save (void ) {unsigned long flags =arch_local_save_flags ();arch_local_irq_disable ();
arch/arm/plat-versatile/platsmp.c +5 -5
@@ -37,7 +37,7 @@ static void __cpuinit write_pen_release(outer_clean_range (__pa (&pen_release),__pa (&pen_release +1 )); } -static DEFINE_SPINLOCK (boot_lock); +static DEFINE_RAW_SPINLOCK (boot_lock);void __cpuinit platform_secondary_init (unsigned int cpu) {
@@ -57,8 +57,8 @@ void __cpuinit platform_secondary_init(u/* * Synchronise with the boot thread. */ -spin_lock (&boot_lock); -spin_unlock (&boot_lock); +raw_spin_lock (&boot_lock); +raw_spin_unlock (&boot_lock); }int __cpuinit boot_secondary (unsigned int cpu,struct task_struct *idle)
@@ -69,7 +69,7 @@ int __cpuinit boot_secondary(unsigned in* Set synchronisation state between this boot processor * and the secondary one */ -spin_lock (&boot_lock); +raw_spin_lock (&boot_lock);/* * This is really belt and braces; we hold unintended secondary
@@ -99,7 +99,7 @@ int __cpuinit boot_secondary(unsigned in* now the secondary core is starting up let it run its * calibrations, then wait for it to finish */ -spin_unlock (&boot_lock); +raw_spin_unlock (&boot_lock);return pen_release !=-1 ? -ENOSYS :0 ; }
arch/arm/mach-exynos4/platsmp.c +5 -5
@@ -56,7 +56,7 @@ static void __iomem *scu_base_addr(void)return (void __iomem *)(S5P_VA_SCU ); } -static DEFINE_SPINLOCK (boot_lock); +static DEFINE_RAW_SPINLOCK (boot_lock);void __cpuinit platform_secondary_init (unsigned int cpu) {
@@ -76,8 +76,8 @@ void __cpuinit platform_secondary_init(u/* * Synchronise with the boot thread. */ -spin_lock (&boot_lock); -spin_unlock (&boot_lock); +raw_spin_lock (&boot_lock); +raw_spin_unlock (&boot_lock); }int __cpuinit boot_secondary (unsigned int cpu,struct task_struct *idle)
@@ -88,7 +88,7 @@ int __cpuinit boot_secondary(unsigned in* Set synchronisation state between this boot processor * and the secondary one */ -spin_lock (&boot_lock); +raw_spin_lock (&boot_lock);/* * The secondary processor is waiting to be released from
@@ -120,7 +120,7 @@ int __cpuinit boot_secondary(unsigned in* now the secondary core is starting up let it run its * calibrations, then wait for it to finish */ -spin_unlock (&boot_lock); +raw_spin_unlock (&boot_lock);return pen_release !=-1 ? -ENOSYS :0 ; }
arch/arm/mach-msm/platsmp.c +5 -5
@@ -38,7 +38,7 @@ extern void msm_secondary_startup(void);*/ volatile int pen_release =-1 ; -static DEFINE_SPINLOCK (boot_lock); +static DEFINE_RAW_SPINLOCK (boot_lock);void __cpuinit platform_secondary_init (unsigned int cpu) {
@@ -62,8 +62,8 @@ void __cpuinit platform_secondary_init(u/* * Synchronise with the boot thread. */ -spin_lock (&boot_lock); -spin_unlock (&boot_lock); +raw_spin_lock (&boot_lock); +raw_spin_unlock (&boot_lock); }static __cpuinit void prepare_cold_cpu (unsigned int cpu)
@@ -100,7 +100,7 @@ int __cpuinit boot_secondary(unsigned in* set synchronisation state between this boot processor * and the secondary one */ -spin_lock (&boot_lock); +raw_spin_lock (&boot_lock);/* * The secondary processor is waiting to be released from
@@ -134,7 +134,7 @@ int __cpuinit boot_secondary(unsigned in* now the secondary core is starting up let it run its * calibrations, then wait for it to finish */ -spin_unlock (&boot_lock); +raw_spin_unlock (&boot_lock);return pen_release !=-1 ? -ENOSYS :0 ; }
arch/arm/mach-omap2/omap-smp.c +5 -5
@@ -29,7 +29,7 @@/* SCU base address */ static void __iomem *scu_base; -static DEFINE_SPINLOCK (boot_lock); +static DEFINE_RAW_SPINLOCK (boot_lock);void __cpuinit platform_secondary_init (unsigned int cpu) {
@@ -43,8 +43,8 @@ void __cpuinit platform_secondary_init(u/* * Synchronise with the boot thread. */ -spin_lock (&boot_lock); -spin_unlock (&boot_lock); +raw_spin_lock (&boot_lock); +raw_spin_unlock (&boot_lock); }int __cpuinit boot_secondary (unsigned int cpu,struct task_struct *idle)
@@ -53,7 +53,7 @@ int __cpuinit boot_secondary(unsigned in* Set synchronisation state between this boot processor * and the secondary one */ -spin_lock (&boot_lock); +raw_spin_lock (&boot_lock);/* * Update the AuxCoreBoot0 with boot state for secondary core.
@@ -70,7 +70,7 @@ int __cpuinit boot_secondary(unsigned in* Now the secondary core is starting up let it run its * calibrations, then wait for it to finish */ -spin_unlock (&boot_lock); +raw_spin_unlock (&boot_lock);return 0 ; }
arch/arm/mach-tegra/platsmp.c +5 -5
@@ -29,7 +29,7 @@extern void tegra_secondary_startup (void ); -static DEFINE_SPINLOCK (boot_lock); +static DEFINE_RAW_SPINLOCK (boot_lock);static void __iomem *scu_base =IO_ADDRESS (TEGRA_ARM_PERIF_BASE );#define EVP_CPU_RESET_VECTOR \
@@ -51,8 +51,8 @@ void __cpuinit platform_secondary_init(u/* * Synchronise with the boot thread. */ -spin_lock (&boot_lock); -spin_unlock (&boot_lock); +raw_spin_lock (&boot_lock); +raw_spin_unlock (&boot_lock); }int __cpuinit boot_secondary (unsigned int cpu,struct task_struct *idle)
@@ -66,7 +66,7 @@ int __cpuinit boot_secondary(unsigned in* set synchronisation state between this boot processor * and the secondary one */ -spin_lock (&boot_lock); +raw_spin_lock (&boot_lock);/* set the reset vector to point to the secondary_startup routine */
@@ -102,7 +102,7 @@ int __cpuinit boot_secondary(unsigned in* now the secondary core is starting up let it run its * calibrations, then wait for it to finish */ -spin_unlock (&boot_lock); +raw_spin_unlock (&boot_lock);return 0 ; }
arch/arm/mach-ux500/platsmp.c +5 -5
@@ -57,7 +57,7 @@ static void __iomem *scu_base_addr(void)return NULL ; } -static DEFINE_SPINLOCK (boot_lock); +static DEFINE_RAW_SPINLOCK (boot_lock);void __cpuinit platform_secondary_init (unsigned int cpu) {
@@ -77,8 +77,8 @@ void __cpuinit platform_secondary_init(u/* * Synchronise with the boot thread. */ -spin_lock (&boot_lock); -spin_unlock (&boot_lock); +raw_spin_lock (&boot_lock); +raw_spin_unlock (&boot_lock); }int __cpuinit boot_secondary (unsigned int cpu,struct task_struct *idle)
@@ -89,7 +89,7 @@ int __cpuinit boot_secondary(unsigned in* set synchronisation state between this boot processor * and the secondary one */ -spin_lock (&boot_lock); +raw_spin_lock (&boot_lock);/* * The secondary processor is waiting to be released from
@@ -110,7 +110,7 @@ int __cpuinit boot_secondary(unsigned in* now the secondary core is starting up let it run its * calibrations, then wait for it to finish */ -spin_unlock (&boot_lock); +raw_spin_unlock (&boot_lock);return pen_release !=-1 ? -ENOSYS :0 ; }
include/linux/workqueue.h +3 -2
@@ -254,9 +254,10 @@ enum {WQ_MEM_RECLAIM =1 <<3 ,/* may be used for memory reclaim */ WQ_HIGHPRI =1 <<4 ,/* high priority */ WQ_CPU_INTENSIVE =1 <<5 ,/* cpu instensive workqueue */ +WQ_NON_AFFINE =1 <<6 ,/* free to move works around cpus */ -WQ_DYING =1 <<6 ,/* internal: workqueue is dying */ -WQ_RESCUER =1 <<7 ,/* internal: workqueue has rescuer */ +WQ_DYING =1 <<7 ,/* internal: workqueue is dying */ +WQ_RESCUER =1 <<8 ,/* internal: workqueue has rescuer */ WQ_MAX_ACTIVE =512 ,/* I like 512, better ideas? */ WQ_MAX_UNBOUND_PER_CPU = 4, /* 4 * #cpus for unbound wq */
drivers/tty/serial/cpm_uart/cpm_uart_core.c +1 -1
@@ -1225,7 +1225,7 @@ static void cpm_uart_console_write(struc {struct uart_cpm_port *pinfo = &cpm_uart_ports[co->index];unsigned long flags; -int nolock = oops_in_progress; +int nolock = oops_in_progress || sysrq_in_progress;if (unlikely (nolock)) {local_irq_save (flags);
drivers/tty/sysrq.c +23 -0
@@ -492,6 +492,23 @@ static void __sysrq_put_key_op(int key, sysrq_key_table[i] = op_p; } +#ifdef CONFIG_MAGIC_SYSRQ_FORCE_PRINTK + +int sysrq_in_progress; + +static void set_sysrq_in_progress (int value) +{ + sysrq_in_progress = value; +} + +#else + +static void set_sysrq_in_progress (int value) +{ +} + +#endif +void __handle_sysrq (int key,bool check_mask) {struct sysrq_key_op *op_p;
@@ -500,6 +517,9 @@ void __handle_sysrq(int key, bool check_unsigned long flags;spin_lock_irqsave (&sysrq_key_table_lock, flags); + +set_sysrq_in_progress (1 ); +/* * Raise the apparent loglevel to maximum so that the sysrq header * is shown to provide the user with positive feedback. We do not
@@ -541,6 +561,9 @@ void __handle_sysrq(int key, bool check_printk ("\n" ); console_loglevel = orig_log_level; } + +set_sysrq_in_progress (0 ); +spin_unlock_irqrestore (&sysrq_key_table_lock, flags); }
include/linux/sysrq.h +5 -0
@@ -38,6 +38,11 @@ struct sysrq_key_op {int enable_mask; }; +#ifdef CONFIG_MAGIC_SYSRQ_FORCE_PRINTK +extern int sysrq_in_progress; +#else +#define sysrq_in_progress 0 +#endif #ifdef CONFIG_MAGIC_SYSRQ /* Generic SysRq interface -- you may call it from any device driver, supplying
Quoted 3 lines · Thomas Gleixner
Dear RT Folks,
I'm pleased to announce the 3.0.6-rt16 release.
Fix compile error for non-SMP.
Can be folded into rt-sched-postpone-actual-migration-disalbe-to-schedule.patch
---
kernel/sched.c | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)
kernel/sched.c +1 -1
@@ -4207,7 +4207,7 @@ static inline void schedule_debug(structschedstat_inc (this_rq (), sched_count); } -#ifdef CONFIG_PREEMPT_RT_FULL +#if defined(CONFIG_PREEMPT_RT_FULL ) && defined(CONFIG_SMP )#define MIGRATE_DISABLE_SET_AFFIN (1<<30)/* Can't make a negative */ #define migrate_disabled_updated (p) ((p)->migrate_disable & MIGRATE_DISABLE_SET_AFFIN)#define migrate_disable_count (p) ((p)->migrate_disable & ~MIGRATE_DISABLE_SET_AFFIN)
Quoted 3 lines · Thomas Gleixner
Dear RT Folks,
I'm pleased to announce the 3.0.6-rt16 release.
Thanks!!
Still seeing some problems:
[ 92.591009] ------------[ cut here ]------------ [ 92.591022] WARNING: at kernel/hrtimer.c:391 hrtimer_fixup_activate+0x41/0x45() [ 92.591025] Hardware name: 6463CTO [ 92.591028] Modules linked in: fuse ppdev parport_pc lp parport sunrpc rfcomm bnep ip6t_REJECT nf_conntrack_ipv4 nf_defrag_ipv4 nf_conntrack_ipv6 nf_defrag_ipv6 xt_state nf_conntrack ip6table_filter ip6_tables snd_hda_codec_analog arc4 snd_hda_intel snd_hda_codec snd_hwdep r852 sm_common snd_seq snd_seq_device iwl3945 iwl_legacy btusb nand nand_ids snd_pcm mac80211 cfg80211 r592 snd_timer nand_ecc thinkpad_acpi bluetooth snd i2c_i801 mtd iTCO_wdt memstick joydev microcode snd_page_alloc rfkill iTCO_vendor_support soundcore e1000e binfmt_misc sdhci_pci sdhci firewire_ohci mmc_core firewire_core yenta_socket crc_itu_t i915 drm_kms_helper drm i2c_algo_bit i2c_core video [last unloaded: scsi_wait_scan] [ 92.591097] Pid: 0, comm: kworker/0:0 Tainted: G W 3.0.6-1.rt16.1.fc15.ccrma.i686.rtPAE #1 [ 92.591099] Call Trace: [ 92.591106] [<c085ac69>] ? printk+0x2d/0x2f [ 92.591111] [<c0447cb7>] warn_slowpath_common+0x7c/0x91 [ 92.591115] [<c046642f>] ? hrtimer_fixup_activate+0x41/0x45 [ 92.591119] [<c046642f>] ? hrtimer_fixup_activate+0x41/0x45 [ 92.591122] [<c04663ee>] ? hrtimer_init_on_stack+0x2d/0x2d [ 92.591126] [<c0447cee>] warn_slowpath_null+0x22/0x24 [ 92.591130] [<c046642f>] hrtimer_fixup_activate+0x41/0x45 [ 92.591135] [<c060086d>] debug_object_fixup+0x17/0x23 [ 92.591140] [<c0600e1d>] debug_object_activate+0xc5/0xcc [ 92.591143] [<c046649e>] enqueue_hrtimer+0x19/0xa0 [ 92.591148] [<c046714b>] __hrtimer_start_range_ns+0x1b2/0x253 [ 92.591153] [<c046723f>] hrtimer_start_range_ns+0x26/0x2c [ 92.591158] [<c0472dee>] hrtimer_start_expires.constprop.1+0x28/0x2e [ 92.591163] [<c04732b8>] tick_nohz_restart_sched_tick+0x109/0x148 [ 92.591167] [<c04085d2>] cpu_idle+0x90/0x97 [ 92.591172] [<c08540e1>] start_secondary+0x250/0x252 [ 92.591175] ---[ end trace 000000000000006f ]--- [ 93.288005] ------------[ cut here ]------------
Full dmesg and complete config attached.
Regretfully it does not stay up and running for long. Eventually the whole machine freezes and has to be power cycled (a T61 laptop, used to work with previous 3.x rty releases - sorry, don't know when it broke).
-- Fernando