Skip to contentSkip to conversation

arm: include linux/sched.h in syscall.h

PATCH New Wade Farnsworth 3 participants 7 messages Oct 1, 2012 – Oct 5, 2012 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm: include linux/sched.h in syscall.h

task_thread_info() is defined in linux/sched.h. Explicitly include this file in arch/arm/include/asm/syscall.h. This fixes an lttng-modules compile error.

---
 arch/arm/include/asm/syscall.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
arch/arm/include/asm/syscall.h +1 -0
index c334a23..fce38a6 100644
@@ -8,6 +8,7 @@
 #define _ASM_ARM_SYSCALL_H
 
 #include <linux/err.h>
+#include <linux/sched.h>
 
 extern const unsigned long sys_call_table[];
 
Signature · 1 line
1.7.0.4
#1 lore raw

PATCH 1/1 arm: include linux/sched.h in syscall.h

Hi Wade,

Quoted 2 lines · Wade Farnsworth

task_thread_info() is defined in linux/sched.h. Explicitly include this file in arch/arm/include/asm/syscall.h. This fixes an lttng-modules compile error.

Can you be more specific about the error? From your description, it sounds like it should be fixed in lttng rather than here.

Cheers,

Will

Quoted 26 lines
---
 arch/arm/include/asm/syscall.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
arch/arm/include/asm/syscall.h +1 -0
index c334a23..fce38a6 100644
@@ -8,6 +8,7 @@
 #define _ASM_ARM_SYSCALL_H
 
 #include <linux/err.h>
+#include <linux/sched.h>
 
 extern const unsigned long sys_call_table[];
 
Signature · 7 lines
1.7.0.4


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#2 lore raw

PATCH 1/1 arm: include linux/sched.h in syscall.h

Hi Will,

Quoted 6 lines · Will Deacon

Hi Wade,

Quoted 2 lines · Wade Farnsworth

task_thread_info() is defined in linux/sched.h. Explicitly include this file in arch/arm/include/asm/syscall.h. This fixes an lttng-modules compile error.

Quoted 6 lines

Can you be more specific about the error? From your description, it sounds like it should be fixed in lttng rather than here.

Cheers,

Will

My apologies for the lack of clarity.

My syscall tracing patch introduces a compile bug in lttng-modules when the latter calls syscall_get_nr(), similar to the following:

<path-to-linux>/arch/arm/include/asm/syscall.h:21:2: error: implicit declaration of function 'task_thread_info' [-Werror=implicit-function-declaration]

The issue is that we are using task_thread_info() in the syscall_get_nr() function in asm/syscall.h, but not explicitly including sched.h from this file, so we can expect this bug might surface any time that syscall_get_nr() is called.

Hopefully that clarifies things somewhat.

Thanks,

Wade

Quoted 27 lines
Quoted 27 lines
---
  arch/arm/include/asm/syscall.h |    1 +
  1 files changed, 1 insertions(+), 0 deletions(-)
arch/arm/include/asm/syscall.h +1 -1
index c334a23..fce38a6 100644
@@ -8,6 +8,7 @@
  #define _ASM_ARM_SYSCALL_H
 
  #include<linux/err.h>
+#include<linux/sched.h>
 
  extern const unsigned long sys_call_table[];
 
--

1.7.0.4

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#3 lore raw

PATCH 1/1 arm: include linux/sched.h in syscall.h

Quoted 16 lines · Wade Farnsworth
Quoted 7 lines · Wade Farnsworth
Quoted 2 lines

task_thread_info() is defined in linux/sched.h. Explicitly include this file in arch/arm/include/asm/syscall.h. This fixes an lttng-modules compile error.

Can you be more specific about the error? From your description, it sounds like it should be fixed in lttng rather than here.

My apologies for the lack of clarity.

My syscall tracing patch introduces a compile bug in lttng-modules when the latter calls syscall_get_nr(), similar to the following:

<path-to-linux>/arch/arm/include/asm/syscall.h:21:2: error: implicit declaration of function 'task_thread_info' [-Werror=implicit-function-declaration]

Quoted 6 lines

The issue is that we are using task_thread_info() in the syscall_get_nr() function in asm/syscall.h, but not explicitly including sched.h from this file, so we can expect this bug might surface any time that syscall_get_nr() is called.

Hopefully that clarifies things somewhat.

Yep, thanks. Your patch sounds like the right thing to do, but please include the compiler error in your commit log.

Will

#4 lore raw

PATCH 1/1 arm: include linux/sched.h in syscall.h

Quoted 22 lines · Will Deacon
Quoted 21 lines · Wade Farnsworth
Quoted 7 lines · Wade Farnsworth
Quoted 2 lines

task_thread_info() is defined in linux/sched.h. Explicitly include this file in arch/arm/include/asm/syscall.h. This fixes an lttng-modules compile error.

Can you be more specific about the error? From your description, it sounds like it should be fixed in lttng rather than here.

My apologies for the lack of clarity.

My syscall tracing patch introduces a compile bug in lttng-modules when the latter calls syscall_get_nr(), similar to the following:

<path-to-linux>/arch/arm/include/asm/syscall.h:21:2: error: implicit declaration of function 'task_thread_info' [-Werror=implicit-function-declaration]

The issue is that we are using task_thread_info() in the syscall_get_nr() function in asm/syscall.h, but not explicitly including sched.h from this file, so we can expect this bug might surface any time that syscall_get_nr() is called.

Quoted 8 lines
Quoted 1 line

Hopefully that clarifies things somewhat.

Yep, thanks. Your patch sounds like the right thing to do, but please include the compiler error in your commit log.

From what I can tell, the original commit went in during the 3.4..3.5

timeframe, so doesn't this patch need to be applied to v3.5-stable as well as 3.6-stable and for 3.7 ?

#5 lore raw

PATCH 1/1 arm: include linux/sched.h in syscall.h

Quoted 10 lines · Russell King - ARM Linux
Quoted 5 lines · Will Deacon

Yep, thanks. Your patch sounds like the right thing to do, but please include the compiler error in your commit log.

From what I can tell, the original commit went in during the 3.4..3.5 timeframe, so doesn't this patch need to be applied to v3.5-stable as well as 3.6-stable and for 3.7 ?

I guess so, although it only seems to be affecting lttng which is still out-of-tree. Depends how kind you're feeling!

Will

#6 lore raw

PATCH 1/1 arm: include linux/sched.h in syscall.h

Quoted 6 lines · Will Deacon
Quoted 5 lines · Russell King - ARM Linux
Quoted 4 lines · Will Deacon

Yep, thanks. Your patch sounds like the right thing to do, but please include the compiler error in your commit log.

Quoted 8 lines
Quoted 5 lines
Quoted 1 line

From what I can tell, the original commit went in during the 3.4..3.5 timeframe, so doesn't this patch need to be applied to v3.5-stable as well as 3.6-stable and for 3.7 ?

I guess so, although it only seems to be affecting lttng which is still out-of-tree. Depends how kind you're feeling!

Well, it's simple enough. I'll add the Cc, and I'll also fix the commit log so that the compiler error message isn't wrapped.