Compile fixes for disabled config opts.
Subsystems (2)
cover Compile fixes for disabled config opts.
The following patches fix some basic compile failures that appear when you change the kernel configuration to disable various options that would be normally enabled by most folks using the preempt_rt patch set (26rt9).
However, it may be useful in some situations to be able to ask people to turn off "X" and recompile to try and get better data on a certain bug/problem, so having the ability to compile with different configs disabled is probably worthwhile.
Within each patch, I've listed the parent patch of the broken out series in which it would make sense to fold the fix in, should that be what you want to do with these. If that is what you want to do, then feel free to toss the patch headers/SOB line from these stand alone patches.
Thanks,
Paul.
---
0001-compat_rwsem-fix-compile-failure-for-when-PREEMPT_R.patch
b/include/asm-x86/rwsem.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
0002-rt-bit-spinlocks-fix-compile-failure-for-CONFIG_PR.patch
b/include/linux/bit_spinlock.h | 2 +- b/include/linux/spinlock.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-)
0003-rt-sysctl-compile-fix-for-when-profiling-is-off.patch
b/kernel/sysctl.c | 2 ++ 1 file changed, 2 insertions(+)
PATCH 1/3 compat_rwsem: fix compile failure for when PREEMPT_RT is disabled.
If you disable PRREMPT_RT, you will get a compile failure on a missing compat prototype. This change should be considered for folding into rt-mutex-i386.patch
--- include/asm-x86/rwsem.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
include/asm-x86/rwsem.h +1 -1
@@ -257,7 +257,7 @@ static inline int rwsem_atomic_update(int delta, struct compat_rw_semaphore *semreturn tmp + delta; } -static inline int rwsem_is_locked (struct compat_rw_semaphore *sem) +static inline int compat_rwsem_is_locked (struct compat_rw_semaphore *sem) {return (sem->count !=0 ); }
Signature · 1 line
1.6.0
PATCH 2/3 rt bit spinlocks: fix compile failure for !CONFIG_PREEMPT_RT
The RT patches disable the existing bit_spinlock.h defns with an "#if 0" in favour of re-stating its own within spinlock.h itself. But the latter are incomplete when PREEMPT_RT is not set.
The smallest footprint change to work around this is to simply use CONFIG_PREEMPT_RT as a trigger to choose between the new spinlock.h definitions, or the older/existing definitions. This change should be considered for folding into the rt-mutex-core.patch.
--- include/linux/bit_spinlock.h | 2 +- include/linux/spinlock.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletions(-)
include/linux/bit_spinlock.h +1 -1
@@ -1,7 +1,7 @@#ifndef __LINUX_BIT_SPINLOCK_H#define __LINUX_BIT_SPINLOCK_H -#if 0 +#ifndef CONFIG_PREEMPT_RT /* * bit-based spin_lock()
include/linux/spinlock.h +2 -0
@@ -509,6 +509,7 @@ do { \__cond_lock (lock,PICK_SPIN_OP_RET (__spin_trylock_irqsave, \ _spin_trylock_irqsave, lock, &flags)) +#ifdef CONFIG_PREEMPT_RT /* * bit-based spin_lock() *
@@ -569,6 +570,7 @@ static inline int bit_spin_is_locked(int bitnum, unsigned long *addr)return 1 ; #endif } +#endif /* CONFIG_PREEMPT_RT */ /** * __raw_spin_can_lock - would __raw_spin_trylock() succeed?
Signature · 1 line
1.6.0
PATCH 3/3 rt: sysctl compile fix for when profiling is off
prof_pid will be an unresolved symbol if you don't enable profiling, and the final link of the kernel will fail. Make the sysctl entry conditional on the appropriate Kconfig option.
This patch should be considered for merge into the existing preempt-realtime-debug-sysctl.patch.
--- kernel/sysctl.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
kernel/sysctl.c +2 -0
@@ -366,6 +366,7 @@ static struct ctl_table kern_table[] = { .proc_handler = &proc_dointvec, },#endif +#ifdef CONFIG_PROFILING { .ctl_name = CTL_UNNUMBERED, .procname = "prof_pid",
@@ -374,6 +375,7 @@ static struct ctl_table kern_table[] = { .mode = 0644, .proc_handler = &proc_dointvec, }, +#endif #ifdef CONFIG_PREEMPT { .ctl_name = CTL_UNNUMBERED,
Signature · 1 line
1.6.0