!666 将preempt-RT补丁rt62增加到5.10.0-99.0.0内核
From: @kylin-mayukun Reviewed-by: @zhengzengkai, @xiexiuqi Signed-off-by: @xiexiuqi
This commit is contained in:
commit
1046ed282f
26092
0000-kernel-5.10.0-99.0.0-rt62.patch
Normal file
26092
0000-kernel-5.10.0-99.0.0-rt62.patch
Normal file
File diff suppressed because it is too large
Load Diff
145
0001-modify-openeuler_defconfig-for-rt62.patch
Normal file
145
0001-modify-openeuler_defconfig-for-rt62.patch
Normal file
@ -0,0 +1,145 @@
|
||||
diff --git a/arch/arm64/configs/openeuler_defconfig b/arch/arm64/configs/openeuler_defconfig
|
||||
index 78a63cbc3..124f3e929 100644
|
||||
--- a/arch/arm64/configs/openeuler_defconfig
|
||||
+++ b/arch/arm64/configs/openeuler_defconfig
|
||||
@@ -73,6 +73,7 @@ CONFIG_HIGH_RES_TIMERS=y
|
||||
CONFIG_PREEMPT_NONE=y
|
||||
# CONFIG_PREEMPT_VOLUNTARY is not set
|
||||
# CONFIG_PREEMPT is not set
|
||||
+CONFIG_PREEMPT_RT=y
|
||||
|
||||
#
|
||||
# CPU/Task time and stats accounting
|
||||
@@ -725,7 +726,7 @@ CONFIG_ACPI_MPAM=y
|
||||
CONFIG_ACPI_PPTT=y
|
||||
# CONFIG_PMIC_OPREGION is not set
|
||||
CONFIG_IRQ_BYPASS_MANAGER=y
|
||||
-CONFIG_VIRTUALIZATION=y
|
||||
+# CONFIG_VIRTUALIZATION is not set
|
||||
CONFIG_KVM=y
|
||||
CONFIG_HAVE_KVM_IRQCHIP=y
|
||||
CONFIG_HAVE_KVM_IRQFD=y
|
||||
@@ -1107,7 +1108,7 @@ CONFIG_ARCH_USES_HIGH_VMA_FLAGS=y
|
||||
# CONFIG_GUP_BENCHMARK is not set
|
||||
# CONFIG_READ_ONLY_THP_FOR_FS is not set
|
||||
CONFIG_ARCH_HAS_PTE_SPECIAL=y
|
||||
-CONFIG_PIN_MEMORY=y
|
||||
+# CONFIG_PIN_MEMORY is not set
|
||||
CONFIG_PID_RESERVE=y
|
||||
CONFIG_MEMORY_RELIABLE=y
|
||||
|
||||
diff --git a/arch/arm64/kernel/fpsimd.c b/arch/arm64/kernel/fpsimd.c
|
||||
index 84520f116..aa631771e 100644
|
||||
--- a/arch/arm64/kernel/fpsimd.c
|
||||
+++ b/arch/arm64/kernel/fpsimd.c
|
||||
@@ -180,7 +180,7 @@ static void __get_cpu_fpsimd_context(void)
|
||||
*/
|
||||
static void get_cpu_fpsimd_context(void)
|
||||
{
|
||||
- local_bh_disable();
|
||||
+ preempt_disable();
|
||||
__get_cpu_fpsimd_context();
|
||||
}
|
||||
|
||||
@@ -201,7 +201,7 @@ static void __put_cpu_fpsimd_context(void)
|
||||
static void put_cpu_fpsimd_context(void)
|
||||
{
|
||||
__put_cpu_fpsimd_context();
|
||||
- local_bh_enable();
|
||||
+ preempt_enable();
|
||||
}
|
||||
|
||||
static bool have_cpu_fpsimd_context(void)
|
||||
diff --git a/arch/x86/configs/openeuler_defconfig b/arch/x86/configs/openeuler_defconfig
|
||||
index f9c94b618..fdba98e7a 100644
|
||||
--- a/arch/x86/configs/openeuler_defconfig
|
||||
+++ b/arch/x86/configs/openeuler_defconfig
|
||||
@@ -88,9 +88,10 @@ CONFIG_NO_HZ=y
|
||||
CONFIG_HIGH_RES_TIMERS=y
|
||||
# end of Timers subsystem
|
||||
|
||||
-CONFIG_PREEMPT_NONE=y
|
||||
+# CONFIG_PREEMPT_NONE is not set
|
||||
# CONFIG_PREEMPT_VOLUNTARY is not set
|
||||
# CONFIG_PREEMPT is not set
|
||||
+CONFIG_PREEMPT_RT=y
|
||||
|
||||
#
|
||||
# CPU/Task time and stats accounting
|
||||
@@ -205,7 +206,7 @@ CONFIG_HAVE_UID16=y
|
||||
CONFIG_SYSCTL_EXCEPTION_TRACE=y
|
||||
CONFIG_HAVE_PCSPKR_PLATFORM=y
|
||||
CONFIG_BPF=y
|
||||
-# CONFIG_EXPERT is not set
|
||||
+CONFIG_EXPERT=y
|
||||
CONFIG_UID16=y
|
||||
CONFIG_MULTIUSER=y
|
||||
CONFIG_SGETMASK_SYSCALL=y
|
||||
@@ -724,7 +725,7 @@ CONFIG_KVM_COMPAT=y
|
||||
CONFIG_HAVE_KVM_IRQ_BYPASS=y
|
||||
CONFIG_HAVE_KVM_NO_POLL=y
|
||||
CONFIG_KVM_XFER_TO_GUEST_WORK=y
|
||||
-CONFIG_VIRTUALIZATION=y
|
||||
+# CONFIG_VIRTUALIZATION is not set
|
||||
CONFIG_KVM=m
|
||||
CONFIG_KVM_INTEL=m
|
||||
CONFIG_KVM_AMD=m
|
||||
diff --git a/arch/x86/include/asm/preempt.h b/arch/x86/include/asm/preempt.h
|
||||
index a3b73de27..dda9ec24f 100644
|
||||
--- a/arch/x86/include/asm/preempt.h
|
||||
+++ b/arch/x86/include/asm/preempt.h
|
||||
@@ -134,10 +134,8 @@ static __always_inline bool should_resched(int preempt_offset)
|
||||
#endif
|
||||
}
|
||||
|
||||
+#ifndef CONFIG_PREEMPT_RT
|
||||
#ifdef CONFIG_PREEMPTION
|
||||
-#ifdef CONFIG_PREEMPT_RT
|
||||
- extern void preempt_schedule_lock(void);
|
||||
-#endif
|
||||
extern asmlinkage void preempt_schedule(void);
|
||||
extern asmlinkage void preempt_schedule_thunk(void);
|
||||
|
||||
@@ -166,4 +164,16 @@ do { \
|
||||
|
||||
#endif
|
||||
|
||||
+#else
|
||||
+#ifdef CONFIG_PREEMPTION
|
||||
+#ifdef CONFIG_PREEMPT_RT
|
||||
+extern void preempt_schedule_lock(void);
|
||||
+#endif
|
||||
+extern asmlinkage void preempt_schedule(void);
|
||||
+#define __preempt_schedule() preempt_schedule()
|
||||
+extern asmlinkage void preempt_schedule_notrace(void);
|
||||
+#define __preempt_schedule_notrace() preempt_schedule_notrace()
|
||||
+#endif /* CONFIG_PREEMPTION */
|
||||
+#endif
|
||||
+
|
||||
#endif /* __ASM_PREEMPT_H */
|
||||
diff --git a/include/linux/printk.h b/include/linux/printk.h
|
||||
index 9331b131b..23946f482 100644
|
||||
--- a/include/linux/printk.h
|
||||
+++ b/include/linux/printk.h
|
||||
@@ -241,7 +241,7 @@ __printf(1, 2) void dump_stack_set_arch_desc(const char *fmt, ...);
|
||||
void dump_stack_print_info(const char *log_lvl);
|
||||
void show_regs_print_info(const char *log_lvl);
|
||||
extern asmlinkage void dump_stack(void) __cold;
|
||||
-#if defined(CONFIG_X86) || defined(CONFIG_ARM64_PSEUDO_NMI)
|
||||
+#if (defined(CONFIG_X86) || defined(CONFIG_ARM64_PSEUDO_NMI)) && !defined(CONFIG_PREEMPT_RT)
|
||||
extern void zap_locks(void);
|
||||
#else
|
||||
static inline void zap_locks(void) { }
|
||||
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
|
||||
index eeeb590e1..d6fc0ae57 100644
|
||||
--- a/kernel/printk/printk.c
|
||||
+++ b/kernel/printk/printk.c
|
||||
@@ -1811,7 +1811,7 @@ static void print_sync_until(struct console *con, u64 seq)
|
||||
console_atomic_unlock(flags);
|
||||
}
|
||||
|
||||
-#if defined(CONFIG_X86) || defined(CONFIG_ARM64_PSEUDO_NMI)
|
||||
+#if (defined(CONFIG_X86) || defined(CONFIG_ARM64_PSEUDO_NMI)) && !defined(CONFIG_PREEMPT_RT)
|
||||
void zap_locks(void)
|
||||
{
|
||||
if (raw_spin_is_locked(&logbuf_lock)) {
|
||||
@ -1,3 +1,4 @@
|
||||
<multibuild>
|
||||
<flavor>raspberrypi-kernel</flavor>
|
||||
</multibuild>
|
||||
<flavor>kernel-rt</flavor>
|
||||
</multibuild>
|
||||
|
||||
17393
kernel-rt.spec
Normal file
17393
kernel-rt.spec
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user