public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86: Change thread_info's flag field back to 32 bits
@ 2008-12-03 23:58 Joe Korty
  2008-12-04 10:06 ` Ingo Molnar
  0 siblings, 1 reply; 2+ messages in thread
From: Joe Korty @ 2008-12-03 23:58 UTC (permalink / raw)
  To: mingo; +Cc: linux-kernel

Change x86_64's thread_info 'flags' field back to __u32.

This was changed to 'unsigned long' when the thread_info*.h
for i386 and x86_64 were merged.  Change it back.  We can
do this as only 27 bits of 'flags' are actually used.

This change actually packs down thread_info by 64 bits:
32 bits are saved by the smaller flags, and 32 bits are
saved by the following 'mm_segment_t field' becoming
naturally 64-bit aligned.

Signed-off-by: Joe Korty <joe.korty@ccur.com>

Index: 2.6.28-rc7/arch/x86/include/asm/thread_info.h
===================================================================
--- 2.6.28-rc7.orig/arch/x86/include/asm/thread_info.h	2008-12-03 17:53:10.000000000 -0500
+++ 2.6.28-rc7/arch/x86/include/asm/thread_info.h	2008-12-03 18:31:40.000000000 -0500
@@ -24,7 +24,7 @@
 struct thread_info {
 	struct task_struct	*task;		/* main task structure */
 	struct exec_domain	*exec_domain;	/* execution domain */
-	unsigned long		flags;		/* low level flags */
+	__u32			flags;		/* low level flags */
 	__u32			status;		/* thread synchronous flags */
 	__u32			cpu;		/* current CPU */
 	int			preempt_count;	/* 0 => preemptable,

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

* Re: [PATCH] x86: Change thread_info's flag field back to 32 bits
  2008-12-03 23:58 [PATCH] x86: Change thread_info's flag field back to 32 bits Joe Korty
@ 2008-12-04 10:06 ` Ingo Molnar
  0 siblings, 0 replies; 2+ messages in thread
From: Ingo Molnar @ 2008-12-04 10:06 UTC (permalink / raw)
  To: Joe Korty; +Cc: linux-kernel, the arch/x86 maintainers


* Joe Korty <joe.korty@ccur.com> wrote:

> Change x86_64's thread_info 'flags' field back to __u32.
> 
> This was changed to 'unsigned long' when the thread_info*.h
> for i386 and x86_64 were merged.  Change it back.  We can
> do this as only 27 bits of 'flags' are actually used.
> 
> This change actually packs down thread_info by 64 bits:
> 32 bits are saved by the smaller flags, and 32 bits are
> saved by the following 'mm_segment_t field' becoming
> naturally 64-bit aligned.
> 
> Signed-off-by: Joe Korty <joe.korty@ccur.com>

applied, thanks Joe!

	Ingo

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

end of thread, other threads:[~2008-12-04 10:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-03 23:58 [PATCH] x86: Change thread_info's flag field back to 32 bits Joe Korty
2008-12-04 10:06 ` Ingo Molnar

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