lkml.org 
[lkml]   [1997]   [Jul]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Kernel cpu selection + other platforms?
On Tue, 22 Jul 1997, Richard B. Johnson wrote:

> So with Intel, we have to make a kernel which will run with anything, then
> rebuild the sources to take advantage of the platform's latest CPU
> advances.

An option is to identify critical functions, like the scheduler or
memory management, which stand to win most by processor-specific
optimizations, and build a handfull of architecture-dependent
variants of each.

As soon as architecture is detected, the unneeded functions become
eligible to be discarded just as if they were _initfunc's. In many
cases, ensuring that the correct 'variant' is called at run-time
could be handled by modifying the initialization code for the
relevant function pointer - or mucking with the syscall tables.

The cleanest way to do this is to place these architecture-variable
functions one each in their own .c file, and have the Makefile loop
through all relevant architecture-specific #define's and recompile
them. Either do a little name mangling (i.e. schedule_amdk6,
schedule_ppro etc.) or emit them into special per-architecture
segments. Their ought do be a clean way to do the late binding.

,_
/_) /| /
/ i e t e r / |/ a g e l

PGP: finger pnagel@epiuse.co.za


\
 
 \ /
  Last update: 2005-03-22 13:39    [W:0.043 / U:0.836 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site