In article <pine.neb.4.64.1511050834200.7...@vps1.whooppee.com>, Paul Goyette <p...@whooppee.com> wrote: >On Thu, 5 Nov 2015, Paul Goyette wrote: > >> Following up on my earlier modularization of the SYSV IPC code, I have >> discovered that mips's pmap.c includes some SYSVSHM size in the calcs >> for the system map sizes. At line 516 in arch/mips/mips/pmap.c we have >> >> #ifdef SYSVSHM >> Sysmapsize += shminfo.shmall; >> #endif >> >> In arch/alpha/alpha/pmap.c we have at line 781 >> >> #ifdef SYSVSHM >> lev3mapsize += shminfo.shmall; >> #endif > >We also have the following code in arch/powerpc/booke/booke_pmap.c at >line 199 > >#ifdef SYSVSHM > + NBPG * shminfo.shmall >#endif
This is called at pmap_bootstrap() so it is too late because by the time you've loaded them module this code has ran. If you look in sysv_ipc.c the shminfo member shmall was 0. pmap_bootstrap() is called via init_$MACHINE() from locore.S just before main() is called. The shminit() code is called from main. So this code has been a no-op for a long time, just remove it. We should also fix things so that we don't need to call the init functions in init_main.c when they are built-in... All these ifdefs need to go... christos