login
Header Space

 
 

Re: Patches for REALLY TINY 386 kernels

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Jonathan Campbell <jon@...>
Cc: <linux-kernel@...>, <torvalds@...>
Date: Sunday, July 15, 2007 - 7:08 pm

Jonathan Campbell wrote:

These should all probably depend on EMBEDDED (which is the "allow
features to be disabled which would be dangerous for most people".)

CONFIG_X86_TSC, however, would be cleaner implemented by something like:

#ifdef CONFIG_X86_TSC
int disable_tsc;
#else
#define disable_tsc 1
#endif

... then gcc will optimize out the rest of the code.

The CPUID stuff hacks up the code quite a bt which makes it hard to
read.  Can you abstract any of that code so it doesn't get so ugly?

Stuff like:

+#ifndef CONFIG_X86_DONT_CPUID
 	if (cpu_has_fxsr) {
 		/*
 		 * Verify that the FXSAVE/FXRSTOR data will be 16-byte aligned.
@@ -1177,6 +1178,7 @@
 		set_in_cr4(X86_CR4_OSXMMEXCPT);
 		printk("done.\n");
 	}
+#endif

... is much better handled by forcing the value of the cpu_has_* macros
to zero, in which case gcc optimizes out the if clause.  The current git
HEAD has handling of constant cpu_* going the other way, but it should
be easy enough to extend.

	-hpa
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Patches for REALLY TINY 386 kernels, Jonathan Campbell, (Sun Jul 15, 5:00 pm)
Re: Patches for REALLY TINY 386 kernels, Jan Engelhardt, (Tue Jul 17, 6:59 am)
Re: Patches for REALLY TINY 386 kernels, Matt Mackall, (Tue Jul 17, 3:30 pm)
Re: Patches for REALLY TINY 386 kernels, Andi Kleen, (Tue Jul 17, 10:33 pm)
Re: Patches for REALLY TINY 386 kernels, H. Peter Anvin, (Wed Jul 18, 11:55 am)
Re: Patches for REALLY TINY 386 kernels, Willy Tarreau, (Tue Jul 24, 6:45 pm)
Re: Patches for REALLY TINY 386 kernels, Matt Mackall, (Wed Jul 18, 3:41 pm)
Re: Patches for REALLY TINY 386 kernels, H. Peter Anvin, (Wed Jul 18, 3:50 pm)
Re: Patches for REALLY TINY 386 kernels, Andi Kleen, (Wed Jul 18, 4:10 pm)
Re: Patches for REALLY TINY 386 kernels, H. Peter Anvin, (Wed Jul 18, 4:24 pm)
Re: Patches for REALLY TINY 386 kernels, Andi Kleen, (Wed Jul 18, 5:04 pm)
Re: Patches for REALLY TINY 386 kernels, Denis Vlasenko, (Mon Jul 30, 1:59 pm)
Re: Patches for REALLY TINY 386 kernels, H. Peter Anvin, (Wed Jul 18, 6:17 pm)
Re: Patches for REALLY TINY 386 kernels, Matt Mackall, (Wed Jul 18, 4:41 pm)
Re: Patches for REALLY TINY 386 kernels, Uwe Hermann, (Fri Jul 20, 3:27 am)
Re: Patches for REALLY TINY 386 kernels, Andi Kleen, (Fri Jul 20, 3:35 am)
Re: Patches for REALLY TINY 386 kernels, Helge Hafting, (Tue Jul 24, 10:49 am)
Re: Patches for REALLY TINY 386 kernels, Yinghai Lu, (Tue Jul 24, 4:50 pm)
Re: Patches for REALLY TINY 386 kernels, Adrian Bunk, (Tue Jul 24, 6:56 pm)
Re: Patches for REALLY TINY 386 kernels, Yinghai Lu, (Tue Jul 24, 8:55 pm)
Re: Patches for REALLY TINY 386 kernels, Adrian Bunk, (Wed Jul 18, 2:33 pm)
Re: Patches for REALLY TINY 386 kernels, Jan Engelhardt, (Wed Jul 18, 2:42 pm)
Re: Patches for REALLY TINY 386 kernels, H. Peter Anvin, (Wed Jul 18, 3:00 pm)
Re: Patches for REALLY TINY 386 kernels, Oleg Verych, (Sat Jul 21, 6:09 am)
Re: Patches for REALLY TINY 386 kernels, Andi Kleen, (Wed Jul 18, 2:44 pm)
Re: Patches for REALLY TINY 386 kernels, Andi Kleen, (Wed Jul 18, 2:20 pm)
Re: Patches for REALLY TINY 386 kernels, Jan Engelhardt, (Wed Jul 18, 2:29 pm)
Re: Patches for REALLY TINY 386 kernels, Andi Kleen, (Wed Jul 18, 2:38 pm)
Re: Patches for REALLY TINY 386 kernels, Jan Engelhardt, (Wed Jul 18, 2:45 pm)
Re: Patches for REALLY TINY 386 kernels, Andi Kleen, (Wed Jul 18, 2:47 pm)
Re: Patches for REALLY TINY 386 kernels, John Stoffel, (Wed Jul 18, 4:24 pm)
Re: Patches for REALLY TINY 386 kernels, H. Peter Anvin, (Sun Jul 15, 7:08 pm)
Re: Patches for REALLY TINY 386 kernels, Nigel Cunningham, (Sun Jul 15, 5:42 pm)
Re: Patches for REALLY TINY 386 kernels, Alan Cox, (Sun Jul 15, 6:45 pm)
Re: Patches for REALLY TINY 386 kernels, Nigel Cunningham, (Sun Jul 15, 7:12 pm)
Re: Patches for REALLY TINY 386 kernels, Satyam Sharma, (Sun Jul 15, 7:14 pm)
Re: Patches for REALLY TINY 386 kernels, Arnd Bergmann, (Sun Jul 15, 7:13 pm)
Re: Patches for REALLY TINY 386 kernels, Satyam Sharma, (Sun Jul 15, 7:28 pm)
Re: Patches for REALLY TINY 386 kernels, Adrian Bunk, (Sun Jul 15, 7:05 pm)
speck-geostationary