mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 2/14] i386 / Remove ugly tls code
@ 2005-08-11  4:53 zach
  0 siblings, 0 replies; only message in thread
From: zach @ 2005-08-11  4:53 UTC (permalink / raw)
  To: akpm, chrisl, chrisw, hpa, Keir.Fraser, linux-kernel,
	m+Ian.Pratt, mbligh, pratap, virtualization, zach, zwame

Got too many complaints that this code is ugly.  It is.  Fix it.

Patch-base: 2.6.13-rc5-mm1
Patch-keys: i386 desc cleanup
Signed-off-by: Zachary Amsden <zach@vmware.com>
Index: linux-2.6.13/include/asm-i386/mach-default/mach_desc.h
===================================================================
--- linux-2.6.13.orig/include/asm-i386/mach-default/mach_desc.h	2005-08-09 18:37:58.000000000 -0700
+++ linux-2.6.13/include/asm-i386/mach-default/mach_desc.h	2005-08-10 20:44:46.000000000 -0700
@@ -70,15 +70,9 @@
 	return 0;
 }
 
-#if TLS_SIZE != 24
-# error update this code.
-#endif
-
 static inline void load_TLS(struct thread_struct *t, unsigned int cpu)
 {
-#define C(i) per_cpu(cpu_gdt_table, cpu)[GDT_ENTRY_TLS_MIN + i] = t->tls_array[i]
-	C(0); C(1); C(2);
-#undef C
+	memcpy(&per_cpu(cpu_gdt_table, cpu)[GDT_ENTRY_TLS_MIN], t->tls_array, TLS_SIZE);
 }
-
+  
 #endif

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

only message in thread, other threads:[~2005-08-11  4:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-11  4:53 [PATCH 2/14] i386 / Remove ugly tls code zach

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

all inboxes | Powered by JetHome®