Port-m68k archive

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

Re: diffs around makeiplcookie()



isaki%pastel-flower.jp@localhost wrote:

> 3) According to the discussion before
>    (http://mail-index.netbsd.org/tech-kern/2006/07/01/0000.html
>    by yamt-san and tsutsui-san),  The conversion by ipl2XXX_table[]
>    should be in makeiplcookie() than splraiseipl() ?
> 
>       used in makeiplcookie(): atari, luna68k, hp300, mvme68k,
>                                news68k, next68k, sun68k, x68k
>       used in splraiseipl():   amiga, cesfic, mac68k

Ah, now I realize why ipl2XXX_table[] is used in splraiseipl()
in those ports.

If ipl2XXX_table[] could be updated during cpu_configure(9),
we can't use an ipl2XXX_table[IPL_FOO] value as a cookie
because it could have a different value after cpu_configure(9)
if makeiplcookie(9) is called before cpu_configure(9).

On cesfic (and hp300), it could be rewriten to use static IPL values
in ipl2psl_table[]. (I'll fix them by myself)

On mac68k, ipl2psl_table[] is initialized in machdep.c:mac68k_init()
so it may be safe.

On amiga, I'm not sure if we can put ipl2psl_table[] conversion
into makeiplcookie(9).

I wrote:
> (though -current hp300 and news68k kernels without DIAGNOSTIC get panic
>  in pmap_ptpage_addref() even without this patch)

The following patch could be a workaround:
---
Index: lib/libkern/Makefile
===================================================================
RCS file: /cvsroot/src/sys/lib/libkern/Makefile,v
retrieving revision 1.88
diff -u -r1.88 Makefile
--- lib/libkern/Makefile        15 Jun 2008 20:34:18 -0000      1.88
+++ lib/libkern/Makefile        21 Jun 2008 18:44:47 -0000
@@ -57,6 +57,9 @@
 
 SRCS+= rb.c
 COPTS.rb.c+=   -Wno-missing-field-initializers
+.if ${MACHINE_ARCH} == "m68k"
+COPTS.rb.c+=   -fno-gcse
+.endif
 
 # Files to clean up
 CLEANFILES+= lib${LIB}.o lib${LIB}.po

---
Izumi Tsutsui


Home | Main Index | Thread Index | Old Index