mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* RE: [patch 41/44] make thread_info.flags an unsigned long
@ 2006-02-01 18:17 Luck, Tony
  2006-02-02  1:37 ` Akinobu Mita
  0 siblings, 1 reply; 3+ messages in thread
From: Luck, Tony @ 2006-02-01 18:17 UTC (permalink / raw)
  To: Akinobu Mita, linux-kernel
  Cc: Richard Henderson, Ivan Kokshaysky, linux-ia64, linuxsh-dev, Andi Kleen

 
--- 2.6-git.orig/include/asm-ia64/thread_info.h
+++ 2.6-git/include/asm-ia64/thread_info.h
@@ -24,7 +24,7 @@
 struct thread_info {
 	struct task_struct *task;	/* XXX not really needed, except for dup_task_struct() */
 	struct exec_domain *exec_domain;/* execution domain */
-	__u32 flags;			/* thread_info flags (see TIF_*) */
+	unsigned long flags;		/* thread_info flags (see TIF_*) */
 	__u32 cpu;			/* current CPU */
 	mm_segment_t addr_limit;	/* user-level address space limit */
 	int preempt_count;		/* 0=premptable, <0=BUG; will also serve as bh-counter */

This leaves a useless hole in the structure.  Tell me again why
this is a good thing?

-Tony

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [patch 41/44] make thread_info.flags an unsigned long
  2006-02-01 18:17 [patch 41/44] make thread_info.flags an unsigned long Luck, Tony
@ 2006-02-02  1:37 ` Akinobu Mita
  0 siblings, 0 replies; 3+ messages in thread
From: Akinobu Mita @ 2006-02-02  1:37 UTC (permalink / raw)
  To: Luck, Tony
  Cc: linux-kernel, Richard Henderson, Ivan Kokshaysky, linux-ia64,
	linuxsh-dev, Andi Kleen

On Wed, Feb 01, 2006 at 10:17:43AM -0800, Luck, Tony wrote:
>  
> --- 2.6-git.orig/include/asm-ia64/thread_info.h
> +++ 2.6-git/include/asm-ia64/thread_info.h
> @@ -24,7 +24,7 @@
>  struct thread_info {
>  	struct task_struct *task;	/* XXX not really needed, except for dup_task_struct() */
>  	struct exec_domain *exec_domain;/* execution domain */
> -	__u32 flags;			/* thread_info flags (see TIF_*) */
> +	unsigned long flags;		/* thread_info flags (see TIF_*) */
>  	__u32 cpu;			/* current CPU */
>  	mm_segment_t addr_limit;	/* user-level address space limit */
>  	int preempt_count;		/* 0=premptable, <0=BUG; will also serve as bh-counter */
> 
> This leaves a useless hole in the structure.  Tell me again why
> this is a good thing?

This patch stops warning message introduced by the "[patch 25/44]
ia64: use generic bitops" which replaces __set_bit() family to
generic one.

But I realize that I can't replace to generic one for ia64.
Because __set_bit() family are using the pointer to __u32, but
generic __set_bit() family are using the pointer to unsigned long.

So the patch 25/44 is wrong and the change above is unnessesary.
Thanks

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [patch 41/44] make thread_info.flags an unsigned long
  2006-02-01  9:02 [patch 00/44] generic bitops Akinobu Mita
@ 2006-02-01  9:03 ` Akinobu Mita
  0 siblings, 0 replies; 3+ messages in thread
From: Akinobu Mita @ 2006-02-01  9:03 UTC (permalink / raw)
  To: linux-kernel
  Cc: Richard Henderson, Ivan Kokshaysky, linux-ia64, linuxsh-dev,
	Andi Kleen, Akinobu Mita

[-- Attachment #1: thread_info-flags.patch --]
[-- Type: text/plain, Size: 3129 bytes --]

The *_bit() routines are defined to work on a pointer to unsigned long.
And the thread_info.flags is passed to *_bit() routines in
include/linux/thread_info.h. But

 - alpha: flags is unsigned int
 - ia64, sh, x86_64: flags is __u32

So flags should be changed to unsigned long instead.

The only affected 64-platforms are little endian, so it will work
without this change. But it's better to change it before people copy the
code to a big endian platform.

Signed-off-by: Akinobu Mita <mita@miraclelinux.com>
 include/asm-alpha/thread_info.h  |    2 +-
 include/asm-ia64/thread_info.h   |    2 +-
 include/asm-sh/thread_info.h     |    2 +-
 include/asm-x86_64/thread_info.h |    2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

Index: 2.6-git/include/asm-alpha/thread_info.h
===================================================================
--- 2.6-git.orig/include/asm-alpha/thread_info.h
+++ 2.6-git/include/asm-alpha/thread_info.h
@@ -14,7 +14,7 @@ struct thread_info {
 	struct pcb_struct	pcb;		/* palcode state */
 
 	struct task_struct	*task;		/* main task structure */
-	unsigned int		flags;		/* low level flags */
+	unsigned long		flags;		/* low level flags */
 	unsigned int		ieee_state;	/* see fpu.h */
 
 	struct exec_domain	*exec_domain;	/* execution domain */
Index: 2.6-git/include/asm-ia64/thread_info.h
===================================================================
--- 2.6-git.orig/include/asm-ia64/thread_info.h
+++ 2.6-git/include/asm-ia64/thread_info.h
@@ -24,7 +24,7 @@
 struct thread_info {
 	struct task_struct *task;	/* XXX not really needed, except for dup_task_struct() */
 	struct exec_domain *exec_domain;/* execution domain */
-	__u32 flags;			/* thread_info flags (see TIF_*) */
+	unsigned long flags;		/* thread_info flags (see TIF_*) */
 	__u32 cpu;			/* current CPU */
 	mm_segment_t addr_limit;	/* user-level address space limit */
 	int preempt_count;		/* 0=premptable, <0=BUG; will also serve as bh-counter */
Index: 2.6-git/include/asm-sh/thread_info.h
===================================================================
--- 2.6-git.orig/include/asm-sh/thread_info.h
+++ 2.6-git/include/asm-sh/thread_info.h
@@ -18,7 +18,7 @@
 struct thread_info {
 	struct task_struct	*task;		/* main task structure */
 	struct exec_domain	*exec_domain;	/* execution domain */
-	__u32			flags;		/* low level flags */
+	unsigned long		flags;		/* low level flags */
 	__u32			cpu;
 	int			preempt_count; /* 0 => preemptable, <0 => BUG */
 	struct restart_block	restart_block;
Index: 2.6-git/include/asm-x86_64/thread_info.h
===================================================================
--- 2.6-git.orig/include/asm-x86_64/thread_info.h
+++ 2.6-git/include/asm-x86_64/thread_info.h
@@ -26,7 +26,7 @@ struct exec_domain;
 struct thread_info {
 	struct task_struct	*task;		/* main task structure */
 	struct exec_domain	*exec_domain;	/* execution domain */
-	__u32			flags;		/* low level flags */
+	unsigned long		flags;		/* low level flags */
 	__u32			status;		/* thread synchronous flags */
 	__u32			cpu;		/* current CPU */
 	int 			preempt_count;	/* 0 => preemptable, <0 => BUG */

--

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-02-02  1:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-01 18:17 [patch 41/44] make thread_info.flags an unsigned long Luck, Tony
2006-02-02  1:37 ` Akinobu Mita
  -- strict thread matches above, loose matches on Subject: below --
2006-02-01  9:02 [patch 00/44] generic bitops Akinobu Mita
2006-02-01  9:03 ` [patch 41/44] make thread_info.flags an unsigned long Akinobu Mita

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome