Skip to contentSkip to conversation

x86: Change thread_info's flag field back to 32 bits

PATCH Applied Joe Korty 2 participants 2 messages Dec 3, 2008 – Dec 4, 2008 x86

lore
Share & tools
lore

Joe Korty

author
#0 lore raw

PATCH 1/1 x86: Change thread_info's flag field back to 32 bits

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.

arch/x86/include/asm/thread_info.h +1 -1
Index: 2.6.28-rc7/arch/x86/include/asm/thread_info.h
===================================================================
@@ -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,
Applied
#1 lore raw
Quoted 6 lines · Joe Korty

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.

Quoted 6 lines

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.

applied, thanks Joe!

Ingo