Port-powerpc archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

re: unifdef MODULAR for powerpc



Rin Okuyama writes:
> Hi,
> 
> There are a lot of ``#ifdef MODULAR'' in sys/arch/powerpc, in order to
> provide ABI compatibility between oea/booke/ibm4xx kernels. However,
> since 2011, we provide different kernel modules in /stand/modules for
> the three architectures on evbppc. Therefore, I'd like to propose,
> 
> (1)  Unifdef MODULAR in sys/arch/powerpc.
> (1') Expose {MIN,MAX}_PAGE_SIZE only for userland.
> (2)  Provide kernel modules for three different archs also in /usr/tests.
> 
> Objections? And can you suggest any convenient method to realize (2)?
> 
> (a) How to build three different module binaries?
> (b) How to select module binary in /usr/tests?
> 
> I will consider about it...

the multiple ABI modules were a workaround to enable the ability
on all these platforms with the current issues in the platform
code itself -- that a kernel can only run on one system.

the current state is really a workaround for the fact that the
majority of the ABI is not stable across different cpu families
inside powerpc.  long ago, x86 had problems with modules in
DEBUG or LOCKDEBUG and sometimes DIAGNOSTIC kernels, but ad and
others changed a lot of things such that the same module can work
there, regardless of kernel build options.  ideally, this would
also be true for xen, but we have the same workaround instead.

what this mostly means is making structures not change size or
layout across due to build/cpu options, and avoiding using macros
that expose these details.

i'm not objecting to (2) but i would much rather you worked on
fixing this better.  for (1) be careful not to include dead code
in !MODULAR kernels please.

for (a), see how src/compat works.  let me know if you need more
info than it has.  no idea on (b) off hand, is there a sysctl or
similar to known?

thanks for fixing this all up.


.mrg.


Home | Main Index | Thread Index | Old Index