All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@domain.hid>
To: xenomai-core <xenomai@xenomai.org>
Subject: [Xenomai-core] [PATCH] use task_thread_info over 2.6.x
Date: Tue, 19 Jun 2007 12:32:43 +0200	[thread overview]
Message-ID: <4677B0CB.30802@domain.hid> (raw)

[-- 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 --]

                 reply	other threads:[~2007-06-19 10:32 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4677B0CB.30802@domain.hid \
    --to=jan.kiszka@domain.hid \
    --cc=xenomai@xenomai.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.