浏览代码

sched: clean up, move __sched_text_start/end to sched.h

move __sched_text_start/end to sched.h. No code changed:

   text    data     bss     dec     hex filename
  26582    2310      28   28920    70f8 sched.o.before
  26582    2310      28   28920    70f8 sched.o.after

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Ingo Molnar 17 年之前
父节点
当前提交
deaf2227dd
共有 2 个文件被更改,包括 4 次插入3 次删除
  1. 4 0
      include/linux/sched.h
  2. 0 3
      kernel/sched.c

+ 4 - 0
include/linux/sched.h

@@ -282,6 +282,10 @@ static inline void touch_all_softlockup_watchdogs(void)
 
 
 /* Attach to any functions which should be ignored in wchan output. */
 /* Attach to any functions which should be ignored in wchan output. */
 #define __sched		__attribute__((__section__(".sched.text")))
 #define __sched		__attribute__((__section__(".sched.text")))
+
+/* Linker adds these: start and end of __sched functions */
+extern char __sched_text_start[], __sched_text_end[];
+
 /* Is this address in the __sched functions? */
 /* Is this address in the __sched functions? */
 extern int in_sched_functions(unsigned long addr);
 extern int in_sched_functions(unsigned long addr);
 
 

+ 0 - 3
kernel/sched.c

@@ -6708,9 +6708,6 @@ void __init sched_init_smp(void)
 
 
 int in_sched_functions(unsigned long addr)
 int in_sched_functions(unsigned long addr)
 {
 {
-	/* Linker adds these: start and end of __sched functions */
-	extern char __sched_text_start[], __sched_text_end[];
-
 	return in_lock_functions(addr) ||
 	return in_lock_functions(addr) ||
 		(addr >= (unsigned long)__sched_text_start
 		(addr >= (unsigned long)__sched_text_start
 		&& addr < (unsigned long)__sched_text_end);
 		&& addr < (unsigned long)__sched_text_end);