All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-core] [PATCH] use task_thread_info over 2.6.x
@ 2007-06-19 10:32 Jan Kiszka
  0 siblings, 0 replies; only message in thread
From: Jan Kiszka @ 2007-06-19 10:32 UTC (permalink / raw)
  To: xenomai-core

[-- Attachment #1: Type: text/plain, Size: 2545 bytes --]

Hi,

with 2.6.22, task_struct no longer contains thread_info. Users should
have migrated to task_thread_info() already, Xenomai did not yet. This
patch performs this for i386, x86_64, and ia64. ARM still needs to be fixed.

Jan


Index: include/asm-ia64/wrappers.h
===================================================================
--- include/asm-ia64/wrappers.h	(Revision 2609)
+++ include/asm-ia64/wrappers.h	(Arbeitskopie)
@@ -33,7 +33,7 @@
 
 #else /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)  */
 
-#define wrap_access_ok(task,addr,size) __access_ok((addr),(size),(task)->thread_info->addr_limit)
+#define wrap_access_ok(task,addr,size) __access_ok((addr),(size),task_thread_info(task)->addr_limit)
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,16)
 #define task_pt_regs(t)  ia64_task_regs(t)
Index: include/asm-i386/wrappers.h
===================================================================
--- include/asm-i386/wrappers.h	(Revision 2609)
+++ include/asm-i386/wrappers.h	(Arbeitskopie)
@@ -61,18 +61,18 @@ do {				  \
 	unsigned long flag,sum; \
 	asm("addl %3,%1 ; sbbl %0,%0; cmpl %1,%4; sbbl $0,%0" \
 		:"=&r" (flag), "=r" (sum) \
-	        :"1" (addr),"g" ((int)(size)),"g" ((task)->thread_info->addr_limit.seg)); \
+	        :"1" (addr),"g" ((int)(size)),"g" (task_thread_info(task)->addr_limit.seg)); \
 	flag == 0; })
 
 #define wrap_test_fpu_used(task)  \
-   ((task)->thread_info->status & TS_USEDFPU)
+   (task_thread_info(task)->status & TS_USEDFPU)
 #define wrap_set_fpu_used(task)   \
 do { \
-   (task)->thread_info->status |= TS_USEDFPU; \
+   task_thread_info(task)->status |= TS_USEDFPU; \
 } while(0)
 #define wrap_clear_fpu_used(task) \
 do { \
-   (task)->thread_info->status &= ~TS_USEDFPU; \
+   task_thread_info(task)->status &= ~TS_USEDFPU; \
 } while(0)
 
 static inline void wrap_switch_iobitmap (struct task_struct *p, int cpu)
Index: include/asm-x86_64/syscall.h
===================================================================
--- include/asm-x86_64/syscall.h	(Revision 2609)
+++ include/asm-x86_64/syscall.h	(Arbeitskopie)
@@ -61,7 +61,7 @@
 	unsigned long flag,sum; \
 	asm("addq %3,%1 ; sbbq %0,%0; cmpq %1,%4; sbbq $0,%0" \
 		:"=&r" (flag), "=r" (sum) \
-	        :"1" (addr),"g" ((long)(size)),"g" ((task)->thread_info->addr_limit.seg)); \
+	        :"1" (addr),"g" ((long)(size)),"g" (task_thread_info(task)->addr_limit.seg)); \
 	flag == 0; })
 
 #define __xn_access_ok(task,type,addr,size)	(__xn_range_ok(task,addr,size)) 


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-06-19 10:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-19 10:32 [Xenomai-core] [PATCH] use task_thread_info over 2.6.x Jan Kiszka

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.