Subject: Superfluous code in mch_xxx.s (#62) Index: sys/pdp/mch_xxx.s 2.11BSD Description: The "spl" routines in mch_xxx.s are not needed because (as the comment says) the :splfix scripts replace the calls at compile time with inline instructions. Also the spl routines in mch_xxx.s are only included when creating either a GENERIC or 11/40 kernel. The latter will likely never run 2.11BSD and the former is handled by the :splfix script. Repeat-By: Examine the code. Fix: Apply the patch below to /sys/pdp/mch_xxx.s No need to recompile anything unless you keep a GENERIC kernel around for good luck, in this case you will save some I space. ------------------------------------------------------------------------ *** /sys/pdp/mch_xxx.s.old Wed Oct 23 05:25:34 1991 --- /sys/pdp/mch_xxx.s Wed Jan 8 22:46:23 1992 *************** *** 181,261 **** mov $1,r0 / to setjmp return with a return jmp *(r1)+ / value of 1 - - #if PDP11 == GENERIC || PDP11 == 40 - /* - * s = spl() - * int s; - * - * spl's for machines (like 11/40) without spl or m[tf]ps instructions. - * - * Note that in the Berkeley system, calls to spl's except splx are - * substituted in line in the assembly code on machines with the spl - * instruction or mtps/mfps. Splx is done by macros in param.h. See the - * makefile, :splfix.spl, :splfix.mtps, :splfix.movb and param.h. Calls - * to __spl# (_spl# in C) are always expanded in-line and do not return - * the previous priority. - */ - ENTRY(spl0) - movb PS,r0 - clrb PS - rts pc - - ENTRY(spl1) - ENTRY(splsoftclock) - movb PS,r0 - movb $40,PS - rts pc - - ENTRY(spl2) - ENTRY(splnet) - movb PS,r0 - movb $100,PS - rts pc - - ENTRY(spl3) - movb PS,r0 - movb $140,PS - rts pc - - ENTRY(spl4) - movb PS,r0 - movb $200,PS - rts pc - - /* - * splimp() needs to be spl6 if the 3com ethernet board is present, - * as it interrupts at 6. - */ - #include "ec.h" - - ENTRY(spl5) - ENTRY(splbio) - ENTRY(spltty) - #if NEC == 0 - ENTRY(splimp) - #endif - movb PS,r0 - movb $240,PS - rts pc - - ENTRY(spl6) - ENTRY(splclock) - #if NEC != 0 - ENTRY(splimp) - #endif - movb PS,r0 - movb $300,PS - rts pc - - ENTRY(spl7) - ENTRY(splhigh) - movb PS,r0 - movb $HIPRI,PS - rts pc - #endif - - /* * struct uprof { / profile arguments * short *pr_base; / buffer base --- 181,186 ----