Re: CVS commit: [netbsd-9] src/doc

2020-08-17 Thread Izumi Tsutsui
> Module Name:  src
> Committed By: martin
> Date: Mon Aug 17 11:31:07 UTC 2020
> 
> Modified Files:
>   src/doc [netbsd-9]: CHANGES-9.1
> 
> Log Message:
> Tickets #1050 - #1054
> 
> 
> To generate a diff of this commit:
> cvs rdiff -u -r1.1.2.95 -r1.1.2.96 src/doc/CHANGES-9.1

>> +xsrc/external/mit/xorg-server/dist/fb/fb.h  1.3
>> +xsrc/external/mit/xorg-server/dist/fb/fbfill.c  1.2,1.3

This should be only 1.2 (no 1.3 yet).

>> +xsrc/external/mit/xorg-server/dist/fb/fbtile.c  1.1-1.3

Maybe only 1.3 is enough (1.2 was file removal).

>> +xsrc/external/mit/xorg-server/dist/fb/wfbrename.h   1.2
>> +external/mit/xorg/server/xorg-server/fb/Makefile.fb 1.12

---
Izumi Tsutsui


Re: CVS commit: src/external/mit/xorg/server/xorg-server/hw/sun

2020-07-23 Thread Izumi Tsutsui
> Module Name:  src
> Committed By: mrg
> Date: Thu Jul 23 09:59:36 UTC 2020
> 
> Modified Files:
>   src/external/mit/xorg/server/xorg-server/hw/sun: Makefile.Xsun
> 
> Log Message:
> fix build:
> - add .../xorg subdir to the path
> - add dbe and present extensions, both wanted via linkage

This is caused by the following .if clause in bsd.x11.mk:

---
.if !(${MACHINE} == "acorn32"   || \
${MACHINE} == "amiga"   || \
${MACHINE} == "pmax"|| \
${MACHINE} == "sun3"|| \
${MACHINE} == "x68k"|| \
${MACHINE} == "vax")
#   EXT_DEFINES
X11FLAGS.EXTENSION+=-DXF86VIDMODE

X11FLAGS.DIX+=  -DDBE -DXRECORD -DPRESENT
---

Maybe disabling these DIX flags is enough to avoid errors.

I'm not sure what is the intention of the above MACHINE list,
but it should be ${MKXORG_SERVER} == "yes" instead?

> .. but maybe these shouldn't be built?  they're not in sets.

I've already disabled them for sparc and sparc64.
They have been enabled in Makefile.common since initial import..
(to prepare future porting work?)

---
Izumi Tsutsui


Re: CVS commit: src/usr.bin/make

2020-07-19 Thread Izumi Tsutsui
kardel@ wrote:

> nbmake currently fails to build the tree.
> 
> config.status: creating buildmake.sh
>  compile  arch.c
>  compile  buf.c
>  compile  compat.c
>  compile  cond.c
>  compile  dir.c
>  compile  for.c
>  compile  hash.c
>  compile  job.c
>  compile  main.c
>  compile  make.c
>  compile  make_malloc.c
>  compile  meta.c
>  compile  metachar.c
>  compile  parse.c
>  compile  str.c
>  compile  strlist.c
>  compile  suff.c
>  compile  targ.c
>  compile  trace.c
>  compile  util.c
>  compile  var.c
>  compile  lstAppend.c
>  compile  lstAtEnd.c
>  compile  lstAtFront.c
>  compile  lstClose.c
>  compile  lstConcat.c
>  compile  lstDatum.c
>  compile  lstDeQueue.c
>  compile  lstDestroy.c
>  compile  lstDupl.c
>  compile  lstEnQueue.c
>  compile  lstFind.c
>  compile  lstFindFrom.c
>  compile  lstFirst.c
>  compile  lstForEach.c
>  compile  lstForEachFrom.c
>  compile  lstInit.c
>  compile  lstInsert.c
>  compile  lstIsAtEnd.c
>  compile  lstIsEmpty.c
>  compile  lstLast.c
>  compile  lstMember.c
>  compile  lstNext.c
>  compile  lstOpen.c
>  compile  lstPrev.c
>  compile  lstRemove.c
>  compile  lstReplace.c
>  compile  lstSucc.c
> link  nbmake
> ===> MAKECONF file:   /etc/mk.conf
>   objdir  /src/NetBSD/native/src/obj.evbarm/tools
> nbmake: "/src/NetBSD/native/src/share/mk/bsd.nls.mk" line 18: Unknown 
> directive
> nbmake: "/src/NetBSD/native/src/share/mk/bsd.nls.mk" line 19: Unknown 
> directive
> nbmake: Fatal errors encountered -- cannot continue
> ERROR: bomb_getmakevar TOOLDIR: /tmp/nbbuild851/nbmake failed

Also reported:
 https://mail-index.netbsd.org/current-users/2020/07/19/msg039168.html
 https://releng.netbsd.org/builds/HEAD/202007191220Z/
and still broken here.

Could you please fix or revert changes?

Thanks,
---
Izumi Tsutsui


Re: CVS commit: src/sys/arch/mips/mips

2020-06-09 Thread Izumi Tsutsui
ommon/lib/libc/string 
-I/s/cvs/src/sys/lib/libkern/../../../common/lib/libc/arch/mips/string 
-I/s/cvs/src/sys/lib/libkern/../../../common/lib/libc/hash/sha3 
-I/s/cvs/src/sys/external/bsd/libnv/dist -c 
/s/cvs/src/sys/arch/mips/mips/mips_machdep.c -o mips_machdep.o && :
*** Error code 1
---

"#if (MIPS32 + MIPS32R2 + MIPS64 + MIPS64R2) > 0" is necessary?

---
Izumi Tsutsui


Re: CVS commit: src/distrib/common/bootimage

2020-05-29 Thread Izumi Tsutsui
> Makefile.installimage refers to it before including Makefile.bootimage and 
> this test was causing make to throw an error:
> 
>
> https://nxr.netbsd.org/xref/src/distrib/common/bootimage/Makefile.installimage#41
> 
> All other users (i386, amd64) of Makefile.installimage explicitly set 
> USE_MBR=yes. That's why it wasn't an issue before now.

Ah, I see.  Sorry for a stupid question.

---
Izumi Tsutsui


Re: CVS commit: src/distrib/common/bootimage

2020-05-28 Thread Izumi Tsutsui
> Modified Files:
>   src/distrib/common/bootimage: Makefile.installimage
> 
> Log Message:
> Default USE_MBR to no

Is this necessary?

src/distrib/common/bootimage/Makefile.bootimage (included from
Makefile.installimage) already has "USE_MBR?= no" line.

---
Izumi Tsutsui


Re: CVS commit: src/sys/external/bsd/drm2/dist/drm/radeon

2020-04-27 Thread Izumi Tsutsui
> Module Name:  src
> Committed By: tsutsui
> Date: Mon Apr 27 16:57:31 UTC 2020
> 
> Modified Files:
>   src/sys/external/bsd/drm2/dist/drm/radeon: radeon_ttm.c
> 
> Log Message:
> Fix possible bus_dmamap_load(9) leak.  PR/55127
> 
> "Looks good to me" from riastradh@.
> Note it was also commented "that code path is likely to be reached"

Mis-quoted, it should be "not likely".

> so maybe pullups are not necessary.

---
Izumi Tsutsui


Re: CVS commit: src/distrib/utils/libhack

2020-04-17 Thread Izumi Tsutsui
jdolecek@ wrote:

> Module Name:  src
> Committed By: jdolecek
> Date: Fri Apr 17 14:55:24 UTC 2020
> 
> Modified Files:
>   src/distrib/utils/libhack: Makefile.inc
> 
> Log Message:
> include aligned_alloc(3), now needed for newfs and fsck_ffs

Could you consider to disable such extra futures in SMALL case,
i.e. in src/distrib/utils/x_newfs and src/distrib/utils/x_fsck_ffs,
to avoid another overflow on several install media?

Thanks,
---
Izumi Tsutsui


Re: CVS commit: src/sys/dev/pckbport

2020-02-26 Thread Izumi Tsutsui
> Modified Files:
>   src/sys/dev/pckbport: synaptics.c
> 
> Log Message:
> Messages in pms_synaptics_input() should not start with "pms_input"
> 
> Use "pms_synaptics_input" instead.

Maybe it's better to use ("%s", __func__) C99 predefined identifier.

---
Izumi Tsutsui


Re: MAX_PAGE_SIZE for m68k (Re: CVScommit:src/sys/arch/arm/include/arm32)

2020-01-15 Thread Izumi Tsutsui
Override the PAGE_* definitions to be compile-time constants.
+ * Use common m68k definitions to define PAGE_SIZE and related constants.
  */
-#definePAGE_SHIFT  PGSHIFT
-#definePAGE_SIZE   (1 << PAGE_SHIFT)
-#definePAGE_MASK   (PAGE_SIZE - 1)
+#include 
 
 /*
  * USRSTACK is the top (end) of the user stack.
Index: sys/arch/mvme68k/include/vmparam.h
===
RCS file: /cvsroot/src/sys/arch/mvme68k/include/vmparam.h,v
retrieving revision 1.37
diff -u -p -d -r1.37 vmparam.h
--- sys/arch/mvme68k/include/vmparam.h  28 Jun 2019 15:17:44 -  1.37
+++ sys/arch/mvme68k/include/vmparam.h  15 Jan 2020 17:13:02 -
@@ -46,13 +46,9 @@
  */
 
 /*
- * hp300 pmap derived m68k ports can use 4K or 8K pages.
- * The page size is specified by PGSHIFT in .
- * Override the PAGE_* definitions to be compile-time constants.
+ * Use common m68k definitions to define PAGE_SIZE and related constants.
  */
-#definePAGE_SHIFT  PGSHIFT
-#definePAGE_SIZE   (1 << PAGE_SHIFT)
-#definePAGE_MASK   (PAGE_SIZE - 1)
+#include 
 
 /*
  * USRSTACK is the top (end) of the user stack.
Index: sys/arch/news68k/include/vmparam.h
===
RCS file: /cvsroot/src/sys/arch/news68k/include/vmparam.h,v
retrieving revision 1.22
diff -u -p -d -r1.22 vmparam.h
--- sys/arch/news68k/include/vmparam.h  28 Jun 2019 15:17:44 -  1.22
+++ sys/arch/news68k/include/vmparam.h  15 Jan 2020 17:13:02 -
@@ -46,13 +46,9 @@
  */
 
 /*
- * hp300 pmap derived m68k ports can use 4K or 8K pages.
- * The page size is specified by PGSHIFT in .
- * Override the PAGE_* definitions to be compile-time constants.
+ * Use common m68k definitions to define PAGE_SIZE and related constants.
  */
-#definePAGE_SHIFT  PGSHIFT
-#definePAGE_SIZE   (1 << PAGE_SHIFT)
-#definePAGE_MASK   (PAGE_SIZE - 1)
+#include 
 
 /*
  * USRSTACK is the top (end) of the user stack.
Index: sys/arch/next68k/include/vmparam.h
===
RCS file: /cvsroot/src/sys/arch/next68k/include/vmparam.h,v
retrieving revision 1.26
diff -u -p -d -r1.26 vmparam.h
--- sys/arch/next68k/include/vmparam.h  28 Jun 2019 15:17:44 -  1.26
+++ sys/arch/next68k/include/vmparam.h  15 Jan 2020 17:13:02 -
@@ -53,13 +53,9 @@
  */
 
 /*
- * hp300 pmap derived m68k ports can use 4K or 8K pages.
- * The page size is specified by PGSHIFT in .
- * Override the PAGE_* definitions to be compile-time constants.
+ * Use common m68k definitions to define PAGE_SIZE and related constants.
  */
-#definePAGE_SHIFT  PGSHIFT
-#definePAGE_SIZE   (1 << PAGE_SHIFT)
-#definePAGE_MASK   (PAGE_SIZE - 1)
+#include 
 
 /*
  * USRSTACK is the top (end) of the user stack.
Index: sys/arch/sun3/include/vmparam.h
===
RCS file: /cvsroot/src/sys/arch/sun3/include/vmparam.h,v
retrieving revision 1.37
diff -u -p -d -r1.37 vmparam.h
--- sys/arch/sun3/include/vmparam.h 7 Jan 2013 16:58:09 -   1.37
+++ sys/arch/sun3/include/vmparam.h 15 Jan 2020 17:13:03 -
@@ -32,12 +32,9 @@
 #define __USE_TOPDOWN_VM
 
 /*
- * We use 8K pages on both the sun3 and sun3x.  Override PAGE_*
- * to be compile-time constants.
+ * Use common m68k definitions to define PAGE_SIZE and related constants.
  */
-#definePAGE_SHIFT  13
-#definePAGE_SIZE   (1 << PAGE_SHIFT)
-#definePAGE_MASK   (PAGE_SIZE - 1)
+#include 
 
 #defineUSRSTACKkernbase/* for modules */
 #defineUSRSTACK3   KERNBASE3   /* for asm not in modules */
Index: sys/arch/x68k/include/vmparam.h
===
RCS file: /cvsroot/src/sys/arch/x68k/include/vmparam.h,v
retrieving revision 1.39
diff -u -p -d -r1.39 vmparam.h
--- sys/arch/x68k/include/vmparam.h 28 Jun 2019 15:17:44 -  1.39
+++ sys/arch/x68k/include/vmparam.h 15 Jan 2020 17:13:03 -
@@ -46,13 +46,9 @@
  */
 
 /*
- * hp300 pmap derived m68k ports can use 4K or 8K pages.
- * The page size is specified by PGSHIFT in .
- * Override the PAGE_* definitions to be compile-time constants.
+ * Use common m68k definitions to define PAGE_SIZE and related constants.
  */
-#definePAGE_SHIFT  PGSHIFT
-#definePAGE_SIZE   (1 << PAGE_SHIFT)
-#definePAGE_MASK   (PAGE_SIZE - 1)
+#include 
 
 /*
  * USRSTACK is the top (end) of the user stack.

---
Izumi Tsutsui


Re: MAX_PAGE_SIZE for m68k (Re: CVS commit:src/sys/arch/arm/include/arm32)

2020-01-14 Thread Izumi Tsutsui
> > The arm PAGE_SIZE_{MIN,MAX} should go away after nick eliminates the
> > need for the 8K pages. This leaves us with m68k to deal with...
> > Do modules work on m68k?

Yes, at least on NetBSD/news68k 9.0_RC1:
(though something wrong in modunload(8))
---
# uname -a
NetBSD  9.0_RC1 NetBSD 9.0_RC1 (GENERIC) #0: Wed Nov 27 16:14:52 UTC 2019  
mkre...@mkrepro.netbsd.org:/usr/src/sys/arch/news68k/compile/GENERIC news68k
# modstat | grep ext2fs
# modload ext2fs
# modstat | grep ext2fs
ext2fs  vfs  filesys  -0   47856 ufs
# dd if=/dev/zero of=/tmp/img bs=1m count=1
1+0 records in
1+0 records out
1048576 bytes transferred in 1.260 secs (832203 bytes/sec)
# vnconfig vnd0 /tmp/img
 newfs_ext2fs -I /dev/rvnd0c
/dev/rvnd0c: 1.0MB (2048 sectors) block size 1024, fragment size 1024
using 1 block groups of 8.0MB, 8192 blks, 128 inodes.
super-block backups (for fsck_ext2fs -b #) at:
# mount_ext2fs /dev/vnd0a /mnt
# mount 
/dev/sd0a on / type ffs (log, local)
/dev/sd0g on /usr type ffs (log, local)
/dev/vnd0a on /mnt type ext2fs (local)
# umount /mnt
# modunload ext2fs
# mount_ext2fs /dev/vnd0a /mnt
# umount /mnt
# modunload ext2fs
[ 853.1800080] WARNING: module error: module `ext2fs' not found
modunload: ext2fs: No such file or directory
# mount_ext2fs /dev/vnd0a /mnt
# mount
/dev/sd0a on / type ffs (log, local)
/dev/sd0g on /usr type ffs (log, local)
/dev/vnd0a on /mnt type ext2fs (local)
# ls -l /mnt
total 12
drwx--  2 root  wheel  12288 Jan 14 16:10 lost+found
# 
---

Note there is something wrong around ksyms(4) on NetBSD/sun3 9.0_RC1...
---
# uname -a
NetBSD  9.0_RC1 NetBSD 9.0_RC1 (MODULAR) #0: Tue Jan 14 23:20:20 JST 2020  
tsutsui@mirage:/s/netbsd-9/src/sys/arch/sun3/compile/MODULAR sun3
# modload ext2fs
[  50.9300220] kobj_checksyms, 988: [ext2fs]: linker error: symbol `memcpy' not 
found
[  50.9700220] kobj_checksyms, 988: [ext2fs]: linker error: symbol `memcmp' not 
found
[  51.0200220] WARNING: module error: unable to affix module `ext2fs', error 8
modload: ext2fs: Exec format error
# savecore
savecore: (null): _version not in namelist
# 
---
(IIRC it worked when I tweaked symbols to share module binaries
 between sun3 and sun3x...)

> > Should modules be shared between kernels with
> > different page sizes? Then perhaps we don't need a new constant?
> 
> On m68k, I think the following two statements are true:
> 
> a) The platform should use a constant PAGE_SIZE to the extent possible
> because it's a slow platform.

Yes, and this is already true.

> b) Modules should be built such that they can use a non-fixed PAGE_SIZE.

No, this is not necessary, because modules are built for each $MACHINE
and (a) each $MACHINE has fixed PAGE_SIZE.

> But (b) also requires that all of the OTHER non-same constants on m68k
> are avoided (take a closer look at  for example).
> Those probably should be properly hidden from module builds so that
> we can at least *catch* such cases.

(b) is not necessary, so it's simply okay to have a macro that represents
"maximum page size for the ${MACHINE_ARCH}" for jemalloc(3), isn't it?

---
Izumi Tsutsui


Re: MAX_PAGE_SIZE for m68k (Re: CVS commit: src/sys/arch/arm/include/arm32)

2020-01-13 Thread Izumi Tsutsui
christos@ wrote:

> >Now I get the following erro during local tests of
> >"build.sh -U -m hp300 release" on NetBSD/i386 9.0_RC1 host:
> >
> >---
> >#create  compat_util/compat_exec.d
 :
> >In file included from /s/cvs/src/sys/sys/param.h:149:0,
> > from /s/cvs/src/sys/compat/common/compat_exec.c:41:
> >./m68k/pmap_motorola.h:165:5: error: operator '*' has no left operand
> > #if PAGE_SIZE == 8192 /* NBPG / (SG4_LEV1SIZE * sizeof(st_entry_t)) */
> > ^
> >nbmkdep: compile failed.
> >*** [compat_exec.d] Error code 1
> 
> try cc -E?

It turns out the problem is more complicated.

 has the following definitions:

https://nxr.netbsd.org/xref/src/sys/uvm/uvm_param.h?r=1.38#135
---
135  * If MIN_PAGE_SIZE and MAX_PAGE_SIZE are not equal, then we must use
136  * non-constant PAGE_SIZE, et al for LKMs.
137  */
138 #if (MIN_PAGE_SIZE != MAX_PAGE_SIZE)
139 #define __uvmexp_pagesize
140 #if defined(_LKM) || defined(_MODULE)
141 #undef PAGE_SIZE
142 #undef PAGE_MASK
143 #undef PAGE_SHIFT
144 #endif
145 #endif
146 
147 /*
148  * Now provide PAGE_SIZE, PAGE_MASK, and PAGE_SHIFT if we do not
149  * have ones that are compile-time constants.
150  */
151 #if !defined(PAGE_SIZE)
152 extern const int *const uvmexp_pagesize;
153 extern const int *const uvmexp_pagemask;
154 extern const int *const uvmexp_pageshift;
155 #define PAGE_SIZE   (*uvmexp_pagesize)  /* size of page */
156 #define PAGE_MASK   (*uvmexp_pagemask)  /* size of page - 1 */
157 #define PAGE_SHIFT  (*uvmexp_pageshift) /* bits to shift for 
pages */
158 #endif /* PAGE_SIZE */
---

I.e.  assumes PAGE_SIZE is not compile time constant
for MODULEs if (MIN_PAGE_SIZE != MAX_PAGE_SIZE).

Probably this is the same reason of recent arm build failures:
 https://releng.netbsd.org/builds/HEAD/202001130720Z/
 https://releng.netbsd.org/builds/HEAD/202001130720Z/evbarm-earm.build.failed
---
/tmp/genassym.Lq8h9d/assym.c:57:1: error: asm operand 0 probably doesn't match 
constraints [-Werror]
 __asm("XYZZY VM_MIN_ADDRESS %0" : : "n" (VM_MIN_ADDRESS));
 ^
/tmp/genassym.Lq8h9d/assym.c:58:1: error: asm operand 0 probably doesn't match 
constraints [-Werror]
 __asm("XYZZY VM_MAXUSER_ADDRESS %0" : : "n" (VM_MAXUSER_ADDRESS));
 ^
/tmp/genassym.Lq8h9d/assym.c:97:1: error: asm operand 0 probably doesn't match 
constraints [-Werror]
 __asm("XYZZY PAGE_MASK %0" : : "n" (PAGE_MASK));
 ^
/tmp/genassym.Lq8h9d/assym.c:98:1: error: asm operand 0 probably doesn't match 
constraints [-Werror]
 __asm("XYZZY PAGE_SIZE %0" : : "n" (PAGE_SIZE));
 ^
---

Should we prepare independent constant for
"possible pagesize value among different MACHINE with the same MACHINE_ARCH"
for jemalloc(3)?

---
Izumi Tsutsui


MAX_PAGE_SIZE for m68k (Re: CVS commit: src/sys/arch/arm/include/arm32)

2020-01-13 Thread Izumi Tsutsui
christos@ wrote:

> LGTM too.

> >> thorpej@ wrote:
 :
> >> How about the attached diff? (untested, just for review)
> > 
> > This looks good to me.

Now I get the following erro during local tests of
"build.sh -U -m hp300 release" on NetBSD/i386 9.0_RC1 host:

---
#create  compat_util/compat_exec.d
CC=/s/cvs/src/obj.hp300/tooldir.NetBSD-9.0_RC1-i386/bin/m68k--netbsdelf-gcc 
/s/cvs/src/obj.hp300/tooldir.NetBSD-9.0_RC1-i386/bin/nbmkdep -f 
compat_exec.d.tmp  --   -std=gnu99   -I/s/cvs/src/common/include -DDIAGNOSTIC 
--sysroot=/s/cvs/src/obj.hp300/destdir.hp300 -I/s/cvs/src/common/include 
-DDIAGNOSTIC -nostdinc -I. -I/s/cvs/src/sys/modules/compat_util -isystem 
/s/cvs/src/sys -isystem /s/cvs/src/sys/arch -isystem 
/s/cvs/src/sys/../common/include -D_KERNEL -D_LKM -D_MODULE 
-DSYSCTL_INCLUDE_DESCR /s/cvs/src/sys/compat/common/compat_exec.c &&  mv -f 
compat_exec.d.tmp compat_exec.d
In file included from /s/cvs/src/sys/sys/param.h:149:0,
 from /s/cvs/src/sys/compat/common/compat_exec.c:41:
./m68k/pmap_motorola.h:165:5: error: operator '*' has no left operand
 #if PAGE_SIZE == 8192 /* NBPG / (SG4_LEV1SIZE * sizeof(st_entry_t)) */
 ^
nbmkdep: compile failed.
*** [compat_exec.d] Error code 1

---

I'm not sure why my  change causes this error,
but I also wonder if we should use "PGSHIFT == 13" rather than
"PAGE_SIZE == 8192" in ..

---
Izumi Tsutsui


Re: CVS commit: src/sys/arch/arm/include/arm32

2020-01-11 Thread Izumi Tsutsui
PAGE_SIZE - 1)
+#include 
 
 /*
  * USRSTACK is the top (end) of the user stack.
Index: next68k/include/vmparam.h
===
RCS file: /cvsroot/src/sys/arch/next68k/include/vmparam.h,v
retrieving revision 1.26
diff -u -p -d -r1.26 vmparam.h
--- next68k/include/vmparam.h   28 Jun 2019 15:17:44 -  1.26
+++ next68k/include/vmparam.h   12 Jan 2020 06:29:56 -
@@ -53,13 +53,9 @@
  */
 
 /*
- * hp300 pmap derived m68k ports can use 4K or 8K pages.
- * The page size is specified by PGSHIFT in .
- * Override the PAGE_* definitions to be compile-time constants.
+ * Use common m68k definitions to define PAGE_SIZE and related constants.
  */
-#definePAGE_SHIFT  PGSHIFT
-#definePAGE_SIZE   (1 << PAGE_SHIFT)
-#definePAGE_MASK   (PAGE_SIZE - 1)
+#include 
 
 /*
  * USRSTACK is the top (end) of the user stack.
Index: sun3/include/vmparam.h
===
RCS file: /cvsroot/src/sys/arch/sun3/include/vmparam.h,v
retrieving revision 1.37
diff -u -p -d -r1.37 vmparam.h
--- sun3/include/vmparam.h  7 Jan 2013 16:58:09 -   1.37
+++ sun3/include/vmparam.h  12 Jan 2020 06:29:56 -
@@ -32,12 +32,9 @@
 #define __USE_TOPDOWN_VM
 
 /*
- * We use 8K pages on both the sun3 and sun3x.  Override PAGE_*
- * to be compile-time constants.
+ * Use common m68k definitions to define PAGE_SIZE and related constants.
  */
-#definePAGE_SHIFT  13
-#definePAGE_SIZE   (1 << PAGE_SHIFT)
-#definePAGE_MASK   (PAGE_SIZE - 1)
+#include 
 
 #defineUSRSTACKkernbase/* for modules */
 #defineUSRSTACK3   KERNBASE3   /* for asm not in modules */
Index: x68k/include/vmparam.h
===
RCS file: /cvsroot/src/sys/arch/x68k/include/vmparam.h,v
retrieving revision 1.39
diff -u -p -d -r1.39 vmparam.h
--- x68k/include/vmparam.h  28 Jun 2019 15:17:44 -  1.39
+++ x68k/include/vmparam.h  12 Jan 2020 06:29:56 -
@@ -46,13 +46,9 @@
  */
 
 /*
- * hp300 pmap derived m68k ports can use 4K or 8K pages.
- * The page size is specified by PGSHIFT in .
- * Override the PAGE_* definitions to be compile-time constants.
+ * Use common m68k definitions to define PAGE_SIZE and related constants.
  */
-#definePAGE_SHIFT  PGSHIFT
-#definePAGE_SIZE   (1 << PAGE_SHIFT)
-#definePAGE_MASK   (PAGE_SIZE - 1)
+#include 
 
 /*
  * USRSTACK is the top (end) of the user stack.

---
Izumi Tsutsui


Re: CVS commit: src/sys/arch/arm/include/arm32

2020-01-11 Thread Izumi Tsutsui
> >m68k also needs this? (currently no common  though)
> 
> Good catch. Yup, looks like it:
 :
> 
> #define   MIN_PAGE_SHIFT  11  /* sun2 */
> #define   MAX_PAGE_SHIFT  13  /* amiga,atari,sun3 */
> #define   MIN_PAGE_SIZE   (1 << MIN_PAGE_SHIFT)
> #define   MAX_PAGE_SIZE   (1 << MAX_PAGE_SHIFT)

sun2 is different MACHINE_ARCH (m68000) from other m68k ports,
so MIN_PAGE_SHIFT should be 12.

> Should I take care of it or can you?

I just wonder which header file these definitions should be in.
Is  ok?

PGSHIFT is defined in  and
PAGE_SHIFT and PAGE_SIZE is in ,
but there is no common .

---
Izumi Tsutsui


Re: CVS commit: src/sys/arch/arm/include/arm32

2020-01-11 Thread Izumi Tsutsui
> Module Name:  src
> Committed By: christos
> Date: Sat Jan 11 19:06:35 UTC 2020
> 
> Modified Files:
>   src/sys/arch/arm/include/arm32: vmparam.h
> 
> Log Message:
> Define the min and max page size supported for the benefit of jemalloc
> 
> 
> To generate a diff of this commit:
> cvs rdiff -u -r1.45 -r1.46 src/sys/arch/arm/include/arm32/vmparam.h

--- src/sys/arch/arm/include/arm32/vmparam.h:1.45   Wed Jun 19 09:54:42 2019
+++ src/sys/arch/arm/include/arm32/vmparam.hSat Jan 11 19:06:34 2020
@@ -84,6 +84,11 @@
 #definePAGE_SIZE   (1 << PAGE_SHIFT)
 #definePAGE_MASK   (PAGE_SIZE - 1)
 
+#defineMIN_PAGE_SHIFT  12  /* normal */
+#defineMAX_PAGE_SHIFT  13  /* _ARM_ARCH_6 */
+#defineMIN_PAGE_SIZE   (1 << MIN_PAGE_SHIFT)
+#defineMAX_PAGE_SIZE   (1 << MAX_PAGE_SHIFT)
+
 /*
  * Mach derived constants
  */

---

m68k also needs this? (currently no common  though)

---
Izumi Tsutsui


Re: CVS commit: src/sys/arch/zaurus/conf

2020-01-05 Thread Izumi Tsutsui
> >> I don't see how as sys/arch/zaurus/conf/INSTALL doesn't define DDB.
> >
> > On zaurus GENERIC also has a size restriction (due to bootloader).
> 
> Yes, I understand that. What I don't understand is how my
> sys/arch/arm/conf/Makefile.arm change affects the zaurus INSTALL kernel
> size because INSTALL specifically disables DDB and my patch is
> conditional on DDB

As martin wrote, the problem is not INSTALL but GENERIC
because zaurus GENERIC is large (~5MB) enough.

> My patch allows COPTS to be overridden as
> 
> 
> http://src.illumos.org/source/xref/netbsd-src/sys/conf/Makefile.kern.inc#69
> 
> has
> 
> 69 DEFCOPTS?= -O2
> 70 COPTS?=${DEFCOPTS}
> 
> which I believe allows COPTS to be overridden by
> 
> makeoptions COPTS="..."

If it's users' responsibility to explicitly add "-mapcs-frame" in COPTS 
when they want to build a kernel with both COPTS="-Os" and options DDB,
it's okay for me.  (I'm afraid zaurus GENERIC needs -Os in near future)

---
Izumi Tsutsui


Re: CVS commit: src/sys/arch/zaurus/conf

2020-01-04 Thread Izumi Tsutsui
> > The problem is caused by sys/arch/arm/conf/Makefile.arm.
> > It defines "COPTS+= -mapcs-frame" in recent rev 1.52
> >   
> > http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/arch/arm/conf/Makefile.arm#rev1.52
> > but MI sys/conf/Makefile.kern.inc defines COPTS+=-O2
> > only if COPTS is empty.
> 
> I don't see how as sys/arch/zaurus/conf/INSTALL doesn't define DDB.

On zaurus GENERIC also has a size restriction (due to bootloader).

> > This affects not only zaurus but all arm ports?
> 
> Maybe this patch is better?

I wonder if it will work as expected if COPTS+="-Os" is
already specified with options DDB, if -mapcs-frame
is mandatory for DDB. But if -fno-omit-frame-pointer
in Makefile.amd64 may have the similar problem,
it's also okay for arm, IMO.

Maybe it's less probematic to add a new option (COPTS_MD etc.)
and add it to COPTS after including Makefile.kern.inc,
i.e. in "(11) Appending make options." in Makefile.arm?

---
Izumi Tsutsui


Re: CVS commit: src/sys/arch/zaurus/conf

2020-01-03 Thread Izumi Tsutsui
I wrote:
> > The missing COPTS was an accident or fallout from some other changes?
> 
> Isn't it specified in -current?

The problem is caused by sys/arch/arm/conf/Makefile.arm.
It defines "COPTS+= -mapcs-frame" in recent rev 1.52
 http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/arch/arm/conf/Makefile.arm#rev1.52
but MI sys/conf/Makefile.kern.inc defines COPTS+=-O2
only if COPTS is empty.
 
This affects not only zaurus but all arm ports?

---
Index: sys/arch/arm/conf/Makefile.arm
===
RCS file: /cvsroot/src/sys/arch/arm/conf/Makefile.arm,v
retrieving revision 1.52
diff -u -p -d -r1.52 Makefile.arm
--- sys/arch/arm/conf/Makefile.arm  2 Jan 2020 14:33:55 -   1.52
+++ sys/arch/arm/conf/Makefile.arm  3 Jan 2020 18:35:36 -
@@ -78,7 +78,7 @@ CFLAGS+=  -mno-unaligned-access
 
 OPT_DDB=   %DDB%
 .if !empty(OPT_DDB) && ${HAVE_GCC:U0} > 0
-COPTS+=-mapcs-frame
+CFLAGS+=   -mapcs-frame
 .endif
 
 ##

---
Izumi Tsutsui
 


Re: CVS commit: src/sys/arch/zaurus/conf

2020-01-03 Thread Izumi Tsutsui
> > - zbsdmod.o has 5MB buffers to store a copied kernel binary
> > - zbsdmod.o reads a kernel from the 5MB buffer and loads sections
> >   into the target addresses
> >  
> > https://nxr.netbsd.org/xref/src/sys/arch/zaurus/stand/zbsdmod/zbsdmod.c?r=1.12#94
> 
> Ah ok - thanks for explanation. So the dropping of ctf sections makes sense.

Yes.

> The missing COPTS was an accident or fallout from some other changes?

Isn't it specified in -current?
I think -O2 comes from MI src/sys/conf/Makefile.kern.inc:
 https://nxr.netbsd.org/xref/src/sys/conf/Makefile.kern.inc?r=1.268#69

On netbsd-9, GENERIC build uses -O2:
---
% /s/netbsd-9/src/obj.zaurus/tooldir.NetBSD-9.0_RC1-i386/bin/nbmake-zaurus 
init_main.o
#   compile  GENERIC/init_main.o
/s/netbsd-9/src/obj.zaurus/tooldir.NetBSD-9.0_RC1-i386/bin/arm--netbsdelf-eabi-gcc
 -mfloat-abi=soft -ffreestanding -fno-zero-initialized-in-bss 
-fno-delete-null-pointer-checks -O2 -msoft-float -fno-strict-aliasing 
-fno-common -std=gnu99 -Werror -Wall -Wno-main -Wno-format-zero-length 
-Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes -Wold-style-definition 
-Wswitch -Wshadow -Wcast-qual -Wwrite-strings -Wno-unreachable-code 
-Wno-pointer-sign -Wno-attributes -Wno-sign-compare -mcpu=xscale 
--sysroot=/s/netbsd-9/src/obj.zaurus/destdir.zaurus -Dzaurus -I. 
-I../../../../external/bsd/libnv/dist -I../../../../../common/lib/libx86emu 
-I../../../../../common/lib/libc/misc -I../../../../../common/include 
-I../../../../arch -I../../../.. -nostdinc -DCOMPAT_UTILS -DCOMPAT_44 
-DDIAGNOSTIC -DW100_LCD_WRITETHROUGH -D_KERNEL -D_KERNEL_OPT -std=gnu99 
-I../../../../lib/libkern/../../../common/lib/libc/quad 
-I../../../../lib/libkern/../../../common/lib/libc/string 
-I../../../../lib/libker!
 n/../../../common/lib/libc/arch/arm/string -c ../../../../kern/init_main.c -o 
init_main.o
/s/netbsd-9/src/obj.zaurus/tooldir.NetBSD-9.0_RC1-i386/bin/nbctfconvert -g -L 
VERSION init_main.o
---

zaurus/conf/INSTALL has COPTS="-Os" in its config, though.

---
Izumi Tsutsui


Re: CVS commit: src/sys/arch/zaurus/conf

2020-01-03 Thread Izumi Tsutsui
martin@ wrote:

> Module Name:  src
> Committed By: martin
> Date: Fri Jan  3 10:01:07 UTC 2020
> 
> Modified Files:
>   src/sys/arch/zaurus/conf: Makefile.zaurus.inc ldscript.zaurus
> 
> Log Message:
> Drop CTF sections from this size restricted kernel (especially as the
> size check is on the total size of the binary, not any content/sections -
> is this a bug?)

No, it (checking the total size of the binary) is by design.

- a kernel binary is loaded by a Linux kernel module (named zbsdmod.o)
  on the native Zaurus Linux
- to load a NetBSD kernel, the whole binary is copied into /proc/zboot
  node, created by the zbsdmod.o module
- zbsdmod.o has 5MB buffers to store a copied kernel binary
- zbsdmod.o reads a kernel from the 5MB buffer and loads sections
  into the target addresses
 
https://nxr.netbsd.org/xref/src/sys/arch/zaurus/stand/zbsdmod/zbsdmod.c?r=1.12#94

---
Izumi Tsutsui


Re: CVS commit: src/usr.sbin/postinstall

2020-01-02 Thread Izumi Tsutsui
(Cc'ed to source-changed-d@, not source-changes@)
m...@eterna.com.au wrote:

> "Izumi Tsutsui" writes:
> > Module Name:src
> > Committed By:   tsutsui
> > Date:   Sun Dec 29 22:19:13 UTC 2019
> > 
> > Modified Files:
> > src/usr.sbin/postinstall: postinstall.in
> > 
> > Log Message:
> > Make sure rc, rc.subr, and rc.shutdown are properly updated.
> > 
> > Currently there is no info which rc* files should be updated
> > or not on upgrade (at least rc.conf and rc.local shouldn't),
> > so put back an explicit list in the postinstall script.
> > "Go for it" by christos@ in PR/54741.
> > 
> > Should be pulled up to netbsd-9.
> 
> thanks for making this less bad.
> 
> i wonder if we can have some system in place where we will
> only update these files if we can check they're unmodified,
> eg, each file would have some hash(es) of known versions,
> and if they're found not to match, fail the 'fix' operation
> and allow the user to update manually.  (this will make it
> trip every time, unfortunately, but this seems less bad 
> than overriding local changes - i've been known to change
> rc and rc.subr for various reasons..)

Maybe we should define which files can be configurable or not
in rc(8) man page?

The visible problem is checkyesnox() in rc.subr was added
in netbsd-8 and src/etc/rc.d/network requires checkyesnox().
I.e. rc.d scripts and rc.subr need to be sync'ed on upgrade.

Anyway maybe we need another PR for this.
---
Izumi Tsutsui


Re: CVS commit: src/distrib/notes/common

2019-12-02 Thread Izumi Tsutsui
> Module Name:  src
> Committed By: uwe
> Date: Mon Dec  2 17:28:36 UTC 2019
> 
> Modified Files:
>   src/distrib/notes/common: legal.common
> 
> Log Message:
> Drop entries for "K. Kobayashi" and "K. Kobayashi and H. Shimokawa"
> that are no longer referenced in tree.

http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/dev/ieee1394/fwohci.c?rev=1.144=text/x-cvsweb-markup
 etc.

---
Izumi Tsutsui


Re: CVS commit: src/distrib/notes/common

2019-12-02 Thread Izumi Tsutsui
> Module Name:  src
> Committed By: uwe
> Date: Mon Dec  2 20:57:17 UTC 2019
> 
> Modified Files:
>   src/distrib/notes/common: legal.common
> 
> Log Message:
> Drop the entry for Yasushi Yamasaki.  Nothing in the tree requires it.

X68k Xserver sources do:
 
http://cvsweb.netbsd.org/bsdweb.cgi/xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k/x68kFb.c?rev=1.2=text/x-cvsweb-markup

---
Izumi Tsutsui


CVS commit: src/sys/arch/zaurus

2019-11-13 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Wed Nov 13 17:59:57 UTC 2019

Modified Files:
src/sys/arch/zaurus/conf: GENERIC INSTALL
src/sys/arch/zaurus/stand/zbsdmod: zbsdmod.c
src/sys/arch/zaurus/zaurus: machdep.c

Log Message:
Make zaurus kernels use symbol tables loaded by the bootloader.

Now COPY_SYMTAB is no longer necessary and it saves ~500kbytes of
GENERIC, so re-enable options DDB (i.e. revert GENERIC rev 1.85).

Also fix zbsdmod.o (a kernel loader for Zaurus Linux) to load symbols
at a proper address as the MI sys/lib/libsa/loadfile_elf32.c does.

No particular comment on port-zaurus@:
 https://mail-index.netbsd.org/port-zaurus/2019/11/11/msg86.html

Note zbsdmod.c (derived from OpenBSD/zaurus) assumed that the loaded
kernels had "esym" variable at the top of its data section and
implicitly overwrote it with the address of loaded symbol tables.
OpenBSD/zaurus kernels used the esym value written by the zbsdmod.o
to initialize ksyms(4) on startup, but we will avoid such implicit
MD interface between the bootloader and kernels (though we don't
bother to add a symbol address value into bootinfo but just assume
symbols are loaded at end[] of a loaded kernel, as per the MI
libsa loadfile() implementation).

Worth to pullup to both netbsd-8 and netbsd-9.


To generate a diff of this commit:
cvs rdiff -u -r1.88 -r1.89 src/sys/arch/zaurus/conf/GENERIC
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/zaurus/conf/INSTALL
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/zaurus/stand/zbsdmod/zbsdmod.c
cvs rdiff -u -r1.44 -r1.45 src/sys/arch/zaurus/zaurus/machdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/zaurus

2019-11-13 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Wed Nov 13 17:59:57 UTC 2019

Modified Files:
src/sys/arch/zaurus/conf: GENERIC INSTALL
src/sys/arch/zaurus/stand/zbsdmod: zbsdmod.c
src/sys/arch/zaurus/zaurus: machdep.c

Log Message:
Make zaurus kernels use symbol tables loaded by the bootloader.

Now COPY_SYMTAB is no longer necessary and it saves ~500kbytes of
GENERIC, so re-enable options DDB (i.e. revert GENERIC rev 1.85).

Also fix zbsdmod.o (a kernel loader for Zaurus Linux) to load symbols
at a proper address as the MI sys/lib/libsa/loadfile_elf32.c does.

No particular comment on port-zaurus@:
 https://mail-index.netbsd.org/port-zaurus/2019/11/11/msg86.html

Note zbsdmod.c (derived from OpenBSD/zaurus) assumed that the loaded
kernels had "esym" variable at the top of its data section and
implicitly overwrote it with the address of loaded symbol tables.
OpenBSD/zaurus kernels used the esym value written by the zbsdmod.o
to initialize ksyms(4) on startup, but we will avoid such implicit
MD interface between the bootloader and kernels (though we don't
bother to add a symbol address value into bootinfo but just assume
symbols are loaded at end[] of a loaded kernel, as per the MI
libsa loadfile() implementation).

Worth to pullup to both netbsd-8 and netbsd-9.


To generate a diff of this commit:
cvs rdiff -u -r1.88 -r1.89 src/sys/arch/zaurus/conf/GENERIC
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/zaurus/conf/INSTALL
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/zaurus/stand/zbsdmod/zbsdmod.c
cvs rdiff -u -r1.44 -r1.45 src/sys/arch/zaurus/zaurus/machdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/zaurus/conf/GENERIC
diff -u src/sys/arch/zaurus/conf/GENERIC:1.88 src/sys/arch/zaurus/conf/GENERIC:1.89
--- src/sys/arch/zaurus/conf/GENERIC:1.88	Sat Nov  2 23:13:00 2019
+++ src/sys/arch/zaurus/conf/GENERIC	Wed Nov 13 17:59:56 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: GENERIC,v 1.88 2019/11/02 23:13:00 tsutsui Exp $
+#	$NetBSD: GENERIC,v 1.89 2019/11/13 17:59:56 tsutsui Exp $
 #
 # GENERIC machine description file
 #
@@ -150,11 +150,10 @@ options 	WSDISPLAY_COMPAT_RAWKBD		# can 
 options 	DIAGNOSTIC		# internal consistency checks
 #options 	DEBUG
 #options 	VERBOSE_INIT_ARM	# verbose bootstraping messages
-#options 	DDB			# in-kernel debugger
-#options 	DDB_HISTORY_SIZE=100	# Enable history editing in DDB
+options 	DDB			# in-kernel debugger
+options 	DDB_HISTORY_SIZE=100	# Enable history editing in DDB
 #options 	KGDB
 #makeoptions 	DEBUG="-g"		# compile full symbol table
-makeoptions	COPY_SYMTAB=1
 
 
 # Kernel root file system and dump configuration.

Index: src/sys/arch/zaurus/conf/INSTALL
diff -u src/sys/arch/zaurus/conf/INSTALL:1.39 src/sys/arch/zaurus/conf/INSTALL:1.40
--- src/sys/arch/zaurus/conf/INSTALL:1.39	Thu Feb  7 20:56:27 2019
+++ src/sys/arch/zaurus/conf/INSTALL	Wed Nov 13 17:59:56 2019
@@ -1,4 +1,4 @@
-# $NetBSD: INSTALL,v 1.39 2019/02/07 20:56:27 rin Exp $
+# $NetBSD: INSTALL,v 1.40 2019/11/13 17:59:56 tsutsui Exp $
 #
 # INSTALL config file (GENERIC with memory disk root)
 #
@@ -59,7 +59,6 @@ options 		RASOPS_SMALL
 no options 		DIAGNOSTIC
 no options 		DDB
 no options 		DDB_HISTORY_SIZE
-no makeoptions	COPY_SYMTAB
 
 no options 		PXA2X0_DMAC_DMOVER_CONCURRENCY
 

Index: src/sys/arch/zaurus/stand/zbsdmod/zbsdmod.c
diff -u src/sys/arch/zaurus/stand/zbsdmod/zbsdmod.c:1.11 src/sys/arch/zaurus/stand/zbsdmod/zbsdmod.c:1.12
--- src/sys/arch/zaurus/stand/zbsdmod/zbsdmod.c:1.11	Mon Oct 28 15:26:09 2019
+++ src/sys/arch/zaurus/stand/zbsdmod/zbsdmod.c	Wed Nov 13 17:59:56 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: zbsdmod.c,v 1.11 2019/10/28 15:26:09 tsutsui Exp $	*/
+/*	$NetBSD: zbsdmod.c,v 1.12 2019/11/13 17:59:56 tsutsui Exp $	*/
 /*	$OpenBSD: zbsdmod.c,v 1.7 2005/05/02 02:45:29 uwe Exp $	*/
 
 /*
@@ -139,8 +139,8 @@ elf32bsdboot(void)
 			if (maxv < posv)
 maxv = posv;
 		}
-		if (IS_DATA(phdr[i]) && IS_BSS(phdr[i])) {
-			posv += phdr[i].p_memsz;
+		if (IS_BSS(phdr[i])) {
+			posv += phdr[i].p_memsz - phdr[i].p_filesz;
 			if (maxv < posv)
 maxv = posv;
 		}

Index: src/sys/arch/zaurus/zaurus/machdep.c
diff -u src/sys/arch/zaurus/zaurus/machdep.c:1.44 src/sys/arch/zaurus/zaurus/machdep.c:1.45
--- src/sys/arch/zaurus/zaurus/machdep.c:1.44	Mon Nov  4 10:36:18 2019
+++ src/sys/arch/zaurus/zaurus/machdep.c	Wed Nov 13 17:59:56 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.44 2019/11/04 10:36:18 tsutsui Exp $	*/
+/*	$NetBSD: machdep.c,v 1.45 2019/11/13 17:59:56 tsutsui Exp $	*/
 /*	$OpenBSD: zaurus_machdep.c,v 1.25 2006/06/20 18:24:04 todd Exp $	*/
 
 /*
@@ -107,7 +107,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.44 2019/11/04 10:36:18 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.45 2019/11/13 17:59:56 tsutsui Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -247,6 +247,12 @@ struct bootinfo _bootinfo;
 struct bootinfo *bootinfo;

CVS commit: src/sys/arch/arm/sa11x0

2019-11-13 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Wed Nov 13 17:52:12 UTC 2019

Modified Files:
src/sys/arch/arm/sa11x0: sa11x0_ost.c

Log Message:
Fix another attach failure of zaudio(4) WM8731 on Zaurus SL-C7x0/860.

When kernels were configured for both CPU_XSCALE_PXA270 and
CPU_XSCALE_PXA250, the OST freq value was not set until tc_init(9)
then all delay(9) during configure(9) returned immediately.
While here, use proper macro with description for readability.

Should be pulled up to netbsd-8 and netbsd-9.
(though zaudio(4) won't work on netbsd-8)


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/arm/sa11x0/sa11x0_ost.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/sa11x0/sa11x0_ost.c
diff -u src/sys/arch/arm/sa11x0/sa11x0_ost.c:1.32 src/sys/arch/arm/sa11x0/sa11x0_ost.c:1.33
--- src/sys/arch/arm/sa11x0/sa11x0_ost.c:1.32	Sun Oct  9 14:43:17 2016
+++ src/sys/arch/arm/sa11x0/sa11x0_ost.c	Wed Nov 13 17:52:12 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: sa11x0_ost.c,v 1.32 2016/10/09 14:43:17 christos Exp $	*/
+/*	$NetBSD: sa11x0_ost.c,v 1.33 2019/11/13 17:52:12 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1997 Mark Brinicombe.
@@ -38,7 +38,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sa11x0_ost.c,v 1.32 2016/10/09 14:43:17 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sa11x0_ost.c,v 1.33 2019/11/13 17:52:12 tsutsui Exp $");
 
 #include 
 #include 
@@ -80,14 +80,23 @@ struct saost_softc {
 
 static struct saost_softc *saost_sc = NULL;
 
+#define PXA270_OST_FREQ		325		/* PXA270 uses 3.25MHz */
+#define SAOST_FREQ		3686400		/* Others use 3.6864MHz */
+#define SAOST_MAXFREQ		SAOST_FREQ
+
 #if defined(CPU_XSCALE_PXA270) && defined(CPU_XSCALE_PXA250)
+/*
+ * On dynamic configuration, assume fastest frequency for early delay(9)
+ * before tc_init(9), because longer delay(9) is almost harmless during
+ * device probe and initialization.
+ */
 #include  
-static uint32_t freq;
-#define TIMER_FREQUENCY freq
+static uint32_t saost_freq = SAOST_MAXFREQ;
+#define TIMER_FREQUENCY		saost_freq
 #elif defined(CPU_XSCALE_PXA270)
-#define TIMER_FREQUENCY 325 /* PXA270 uses 3.25MHz */
+#define TIMER_FREQUENCY		PXA270_OST_FREQ
 #else
-#define TIMER_FREQUENCY 3686400 /* 3.6864MHz */
+#define TIMER_FREQUENCY		SAOST_FREQ
 #endif
 
 #ifndef STATHZ
@@ -230,7 +239,7 @@ cpu_initclocks(void)
 	stathz = STATHZ;
 	profhz = stathz;
 #if defined(CPU_XSCALE_PXA270) && defined(CPU_XSCALE_PXA250)
-	TIMER_FREQUENCY = (CPU_IS_PXA250) ? 3686400 : 325;
+	TIMER_FREQUENCY = (CPU_IS_PXA270) ? PXA270_OST_FREQ : SAOST_FREQ;
 #endif
 	sc->sc_statclock_step = TIMER_FREQUENCY / stathz;
 



CVS commit: src/sys/arch/arm/sa11x0

2019-11-13 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Wed Nov 13 17:52:12 UTC 2019

Modified Files:
src/sys/arch/arm/sa11x0: sa11x0_ost.c

Log Message:
Fix another attach failure of zaudio(4) WM8731 on Zaurus SL-C7x0/860.

When kernels were configured for both CPU_XSCALE_PXA270 and
CPU_XSCALE_PXA250, the OST freq value was not set until tc_init(9)
then all delay(9) during configure(9) returned immediately.
While here, use proper macro with description for readability.

Should be pulled up to netbsd-8 and netbsd-9.
(though zaudio(4) won't work on netbsd-8)


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/arm/sa11x0/sa11x0_ost.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/zaurus/zaurus

2019-11-13 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Wed Nov 13 17:48:03 UTC 2019

Modified Files:
src/sys/arch/zaurus/zaurus: autoconf.c

Log Message:
Fix attach failure of zaudio(4) WM8731 (C7x0/860) and WM8750 (C1000/3x00).

The new MI iic(4) layer requires an explicit quirk info of PROBE_STRATEGY
via device properties.  Fixes PR kern/54658.

Should be pulled up to netbsd-9.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/zaurus/zaurus/autoconf.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/zaurus/zaurus

2019-11-13 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Wed Nov 13 17:48:03 UTC 2019

Modified Files:
src/sys/arch/zaurus/zaurus: autoconf.c

Log Message:
Fix attach failure of zaudio(4) WM8731 (C7x0/860) and WM8750 (C1000/3x00).

The new MI iic(4) layer requires an explicit quirk info of PROBE_STRATEGY
via device properties.  Fixes PR kern/54658.

Should be pulled up to netbsd-9.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/zaurus/zaurus/autoconf.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/zaurus/zaurus/autoconf.c
diff -u src/sys/arch/zaurus/zaurus/autoconf.c:1.12 src/sys/arch/zaurus/zaurus/autoconf.c:1.13
--- src/sys/arch/zaurus/zaurus/autoconf.c:1.12	Sun Jul 29 18:05:47 2012
+++ src/sys/arch/zaurus/zaurus/autoconf.c	Wed Nov 13 17:48:03 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: autoconf.c,v 1.12 2012/07/29 18:05:47 mlelstv Exp $	*/
+/*	$NetBSD: autoconf.c,v 1.13 2019/11/13 17:48:03 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.12 2012/07/29 18:05:47 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.13 2019/11/13 17:48:03 tsutsui Exp $");
 
 #include "opt_md.h"
 
@@ -43,6 +43,8 @@ __KERNEL_RCSID(0, "$NetBSD: autoconf.c,v
 #include 
 #include 
 
+#include 
+
 #include 
 #include 
 #include 
@@ -219,5 +221,13 @@ void
 device_register(device_t dev, void *aux)
 {
 
-	/* Nothing to do */
+	/*
+	 * I2C bus conntected to pxaiic(4) for zaudio(4) devices has
+	 * limited capabilities.
+	 */
+	if (device_is_a(dev, "iic") &&
+	device_is_a(dev->dv_parent, "ziic")) {
+		(void)prop_dictionary_set_cstring_nocopy(device_properties(dev),
+		I2C_PROP_INDIRECT_PROBE_STRATEGY, I2C_PROBE_STRATEGY_NONE);
+	}
 }



CVS commit: src/sys/arch/zaurus/zaurus

2019-11-04 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Mon Nov  4 10:36:18 UTC 2019

Modified Files:
src/sys/arch/zaurus/zaurus: machdep.c

Log Message:
Fix build with VERBOSE_INIT_ARM without DIAGNOSTIC.


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/sys/arch/zaurus/zaurus/machdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/zaurus/zaurus/machdep.c
diff -u src/sys/arch/zaurus/zaurus/machdep.c:1.43 src/sys/arch/zaurus/zaurus/machdep.c:1.44
--- src/sys/arch/zaurus/zaurus/machdep.c:1.43	Sat Oct 19 14:42:30 2019
+++ src/sys/arch/zaurus/zaurus/machdep.c	Mon Nov  4 10:36:18 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.43 2019/10/19 14:42:30 tsutsui Exp $	*/
+/*	$NetBSD: machdep.c,v 1.44 2019/11/04 10:36:18 tsutsui Exp $	*/
 /*	$OpenBSD: zaurus_machdep.c,v 1.25 2006/06/20 18:24:04 todd Exp $	*/
 
 /*
@@ -107,7 +107,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.43 2019/10/19 14:42:30 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.44 2019/11/04 10:36:18 tsutsui Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -635,7 +635,7 @@ hw_isc1000(void)
 vaddr_t
 initarm(void *arg)
 {
-#ifdef DIAGNOSTIC
+#if defined(DIAGNOSTIC) || defined(VERBOSE_INIT_ARM)
 	extern vsize_t xscale_minidata_clean_size; /* used in KASSERT */
 #endif
 	extern vaddr_t xscale_cache_clean_addr;



CVS commit: src/sys/arch/zaurus/zaurus

2019-11-04 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Mon Nov  4 10:36:18 UTC 2019

Modified Files:
src/sys/arch/zaurus/zaurus: machdep.c

Log Message:
Fix build with VERBOSE_INIT_ARM without DIAGNOSTIC.


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/sys/arch/zaurus/zaurus/machdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/zaurus/conf

2019-11-02 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Nov  2 23:13:00 UTC 2019

Modified Files:
src/sys/arch/zaurus/conf: GENERIC

Log Message:
Put back options WSDISPLAY_COMPAT_RAWKBD. It's required by Xorg server.

Should be pulled up to netbsd-9.


To generate a diff of this commit:
cvs rdiff -u -r1.87 -r1.88 src/sys/arch/zaurus/conf/GENERIC

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/zaurus/conf/GENERIC
diff -u src/sys/arch/zaurus/conf/GENERIC:1.87 src/sys/arch/zaurus/conf/GENERIC:1.88
--- src/sys/arch/zaurus/conf/GENERIC:1.87	Wed Aug 21 04:17:41 2019
+++ src/sys/arch/zaurus/conf/GENERIC	Sat Nov  2 23:13:00 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: GENERIC,v 1.87 2019/08/21 04:17:41 msaitoh Exp $
+#	$NetBSD: GENERIC,v 1.88 2019/11/02 23:13:00 tsutsui Exp $
 #
 # GENERIC machine description file
 #
@@ -143,7 +143,7 @@ options 	WS_KERNEL_FG=WSCOL_GREEN
 # compatibility to other console drivers
 options 	WSDISPLAY_COMPAT_PCVT		# emulate some ioctls
 options 	WSDISPLAY_COMPAT_USL		# wsconscfg VT handling
-# options 	WSDISPLAY_COMPAT_RAWKBD		# can get raw scancodes
+options 	WSDISPLAY_COMPAT_RAWKBD		# can get raw scancodes
 
 # Development and Debugging options
 



CVS commit: src/sys/arch/zaurus/conf

2019-11-02 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Nov  2 23:13:00 UTC 2019

Modified Files:
src/sys/arch/zaurus/conf: GENERIC

Log Message:
Put back options WSDISPLAY_COMPAT_RAWKBD. It's required by Xorg server.

Should be pulled up to netbsd-9.


To generate a diff of this commit:
cvs rdiff -u -r1.87 -r1.88 src/sys/arch/zaurus/conf/GENERIC

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/zaurus/dev

2019-11-02 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Nov  2 23:03:53 UTC 2019

Modified Files:
src/sys/arch/zaurus/dev: zrc.c

Log Message:
Fix build errors with options WSDISPLAY_COMPAT_RAWKBD.

- Add missing RAWKEY_* macro definitions (taken from OpenBSD)
- Explicitly include "opt_wsdisplay_compat.h" for
  #ifdef WSDISPLAY_COMPAT_RAWKBD conditionals.
  (it is not properly pulled at least in netbsd-8)
 https://mail-index.netbsd.org/port-zaurus/2019/11/02/msg83.html

Should be pulled up to netbsd-8 and netbsd-9.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/zaurus/dev/zrc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/zaurus/dev

2019-11-02 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Nov  2 23:03:53 UTC 2019

Modified Files:
src/sys/arch/zaurus/dev: zrc.c

Log Message:
Fix build errors with options WSDISPLAY_COMPAT_RAWKBD.

- Add missing RAWKEY_* macro definitions (taken from OpenBSD)
- Explicitly include "opt_wsdisplay_compat.h" for
  #ifdef WSDISPLAY_COMPAT_RAWKBD conditionals.
  (it is not properly pulled at least in netbsd-8)
 https://mail-index.netbsd.org/port-zaurus/2019/11/02/msg83.html

Should be pulled up to netbsd-8 and netbsd-9.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/zaurus/dev/zrc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/zaurus/dev/zrc.c
diff -u src/sys/arch/zaurus/dev/zrc.c:1.9 src/sys/arch/zaurus/dev/zrc.c:1.10
--- src/sys/arch/zaurus/dev/zrc.c:1.9	Sat Oct 27 17:18:14 2012
+++ src/sys/arch/zaurus/dev/zrc.c	Sat Nov  2 23:03:53 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: zrc.c,v 1.9 2012/10/27 17:18:14 chs Exp $	*/
+/*	$NetBSD: zrc.c,v 1.10 2019/11/02 23:03:53 tsutsui Exp $	*/
 /*	$OpenBSD: zaurus_remote.c,v 1.1 2005/11/17 05:26:31 uwe Exp $	*/
 
 /*
@@ -17,8 +17,10 @@
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
+#include "opt_wsdisplay_compat.h"
+
 #include 
-__KERNEL_RCSID(0, "$NetBSD: zrc.c,v 1.9 2012/10/27 17:18:14 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: zrc.c,v 1.10 2019/11/02 23:03:53 tsutsui Exp $");
 
 #include 
 #include 
@@ -131,6 +133,11 @@ static const keysym_t zrc_keydesc[] = {
 };
 
 #ifdef WSDISPLAY_COMPAT_RAWKBD
+/* XXX see OpenBSD's  */
+#define	RAWKEY_Null		0x00
+#define	RAWKEY_AudioMute	0x85
+#define	RAWKEY_AudioLower	0x86
+#define	RAWKEY_AudioRaise 	0x87
 #define	RAWKEY_AudioRewind	0xa0
 #define	RAWKEY_AudioForward	0xa1
 #define	RAWKEY_AudioPlay	0xa2



CVS commit: src/sys/dev/rasops

2019-11-01 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Nov  2 01:14:57 UTC 2019

Modified Files:
src/sys/dev/rasops: rasops.h

Log Message:
Fix "Alignment Fault 3" kernel failure of NetBSD/zaurus 8.1 GENERIC.

#ifdef switch per kernel config options in definition of device driver
structure in header files could be problematic.

See my post in port-zaurus@ for details:
 https://mail-index.netbsd.org/port-zaurus/2019/10/31/msg79.html

Should be pulled up to netbsd-8 and netbsd-9.


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/sys/dev/rasops/rasops.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/rasops

2019-11-01 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Nov  2 01:14:57 UTC 2019

Modified Files:
src/sys/dev/rasops: rasops.h

Log Message:
Fix "Alignment Fault 3" kernel failure of NetBSD/zaurus 8.1 GENERIC.

#ifdef switch per kernel config options in definition of device driver
structure in header files could be problematic.

See my post in port-zaurus@ for details:
 https://mail-index.netbsd.org/port-zaurus/2019/10/31/msg79.html

Should be pulled up to netbsd-8 and netbsd-9.


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/sys/dev/rasops/rasops.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/rasops/rasops.h
diff -u src/sys/dev/rasops/rasops.h:1.48 src/sys/dev/rasops/rasops.h:1.49
--- src/sys/dev/rasops/rasops.h:1.48	Wed Aug 14 00:51:10 2019
+++ src/sys/dev/rasops/rasops.h	Sat Nov  2 01:14:57 2019
@@ -1,4 +1,4 @@
-/* 	$NetBSD: rasops.h,v 1.48 2019/08/14 00:51:10 rin Exp $ */
+/* 	$NetBSD: rasops.h,v 1.49 2019/11/02 01:14:57 tsutsui Exp $ */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -149,10 +149,8 @@ struct rasops_info {
 	/* Callbacks so we can share some code */
 	void	(*ri_do_cursor)(struct rasops_info *);
 
-#if NRASOPS_ROTATION > 0
 	/* Used to intercept putchar to permit display rotation */
 	struct	wsdisplay_emulops ri_real_ops;
-#endif
 };
 
 #define CHAR_IN_FONT(c, font)		\



CVS commit: src/sys/arch/zaurus/stand/zbsdmod

2019-10-28 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Mon Oct 28 15:26:09 UTC 2019

Modified Files:
src/sys/arch/zaurus/stand/zbsdmod: compat_linux.h zbsdmod.c

Log Message:
Make sure to clear bss before jumping to a kernel copied from load buffer.

This will fix yet another boot failure issue
"screen white-out after loading a kernel"
 https://mail-index.netbsd.org/port-zaurus/2019/10/26/msg72.html

Should be pulled up to netbsd-8 and netbsd-9.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/zaurus/stand/zbsdmod/compat_linux.h
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/zaurus/stand/zbsdmod/zbsdmod.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/zaurus/stand/zbsdmod

2019-10-28 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Mon Oct 28 15:26:09 UTC 2019

Modified Files:
src/sys/arch/zaurus/stand/zbsdmod: compat_linux.h zbsdmod.c

Log Message:
Make sure to clear bss before jumping to a kernel copied from load buffer.

This will fix yet another boot failure issue
"screen white-out after loading a kernel"
 https://mail-index.netbsd.org/port-zaurus/2019/10/26/msg72.html

Should be pulled up to netbsd-8 and netbsd-9.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/zaurus/stand/zbsdmod/compat_linux.h
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/zaurus/stand/zbsdmod/zbsdmod.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/zaurus/stand/zbsdmod/compat_linux.h
diff -u src/sys/arch/zaurus/stand/zbsdmod/compat_linux.h:1.6 src/sys/arch/zaurus/stand/zbsdmod/compat_linux.h:1.7
--- src/sys/arch/zaurus/stand/zbsdmod/compat_linux.h:1.6	Sun Dec 11 14:05:39 2011
+++ src/sys/arch/zaurus/stand/zbsdmod/compat_linux.h	Mon Oct 28 15:26:09 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_linux.h,v 1.6 2011/12/11 14:05:39 nonaka Exp $	*/
+/*	$NetBSD: compat_linux.h,v 1.7 2019/10/28 15:26:09 tsutsui Exp $	*/
 /*	$OpenBSD: compat_linux.h,v 1.5 2006/01/15 17:58:27 deraadt Exp $	*/
 
 /*
@@ -64,6 +64,7 @@ extern	int register_chrdev(unsigned int,
 extern	int unregister_chrdev(unsigned int, const char *);
 extern	void printk(const char *, ...) __printflike(1, 2);
 extern	void *memcpy(void *, const void *, size_t);
+extern	void *memset(void *, int, size_t);
 
 /* procfs support */
 struct proc_dir_entry {

Index: src/sys/arch/zaurus/stand/zbsdmod/zbsdmod.c
diff -u src/sys/arch/zaurus/stand/zbsdmod/zbsdmod.c:1.10 src/sys/arch/zaurus/stand/zbsdmod/zbsdmod.c:1.11
--- src/sys/arch/zaurus/stand/zbsdmod/zbsdmod.c:1.10	Sat Oct 26 09:58:40 2019
+++ src/sys/arch/zaurus/stand/zbsdmod/zbsdmod.c	Mon Oct 28 15:26:09 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: zbsdmod.c,v 1.10 2019/10/26 09:58:40 tsutsui Exp $	*/
+/*	$NetBSD: zbsdmod.c,v 1.11 2019/10/28 15:26:09 tsutsui Exp $	*/
 /*	$OpenBSD: zbsdmod.c,v 1.7 2005/05/02 02:45:29 uwe Exp $	*/
 
 /*
@@ -262,6 +262,10 @@ elf32bsdboot(void)
 (((char *)elf) + phdr[i].p_offset)[sz];
 			}
 		}
+		if (IS_BSS(phdr[i])) {
+			memset((void *)(phdr[i].p_vaddr + phdr[i].p_filesz), 0,
+			phdr[i].p_memsz - phdr[i].p_filesz);
+		}
 	}
 
 	addr = (int *)(elf->e_entry);



CVS commit: src/sys/arch/zaurus/stand/zbsdmod

2019-10-26 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Oct 26 10:10:14 UTC 2019

Modified Files:
src/sys/arch/zaurus/stand/zbsdmod: Makefile

Log Message:
Misc cleanup to avoid future confusion.

- Remove more unnecessary debug sections
- Use DBG instead of COPTS to specify -Os as defined in bsd.prog.mk
- Use CFLAGS and CPPFLAGS correctly
- Explicitly set -ffreestanding


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/zaurus/stand/zbsdmod/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/zaurus/stand/zbsdmod

2019-10-26 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Oct 26 10:10:14 UTC 2019

Modified Files:
src/sys/arch/zaurus/stand/zbsdmod: Makefile

Log Message:
Misc cleanup to avoid future confusion.

- Remove more unnecessary debug sections
- Use DBG instead of COPTS to specify -Os as defined in bsd.prog.mk
- Use CFLAGS and CPPFLAGS correctly
- Explicitly set -ffreestanding


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/zaurus/stand/zbsdmod/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/zaurus/stand/zbsdmod/Makefile
diff -u src/sys/arch/zaurus/stand/zbsdmod/Makefile:1.11 src/sys/arch/zaurus/stand/zbsdmod/Makefile:1.12
--- src/sys/arch/zaurus/stand/zbsdmod/Makefile:1.11	Mon Sep 23 13:42:37 2019
+++ src/sys/arch/zaurus/stand/zbsdmod/Makefile	Sat Oct 26 10:10:14 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.11 2019/09/23 13:42:37 christos Exp $
+#	$NetBSD: Makefile,v 1.12 2019/10/26 10:10:14 tsutsui Exp $
 
 WARNS?=	4
 
@@ -10,8 +10,18 @@ OBJS=	zbsdmod.o
 SRCS=	zbsdmod.c
 NOMAN=	# defined
 
+OBJCOPY_FLAGS=			\
+	-R .debug_abbrev	\
+	-R .debug_aranges	\
+	-R .debug_info		\
+	-R .debug_line		\
+	-R .debug_loc		\
+	-R .debug_ranges	\
+	-R .debug_str		\
+	-R .eh_frame
+
 realall: ${OBJS}
-	${OBJCOPY} -R .eh_frame ${.OBJDIR}/zbsdmod.o
+	${OBJCOPY} ${OBJCOPY_FLAGS} ${.OBJDIR}/zbsdmod.o
 
 .include 
 .include 
@@ -21,11 +31,12 @@ afterinstall:
 		${OBJS} ${DESTDIR}/${BINDIR}
 
 CPUFLAGS=
-COPTS=		-Os
+DBG=		-Os
 CFLAGS+=	-fno-strict-aliasing
-CFLAGS+=	-DMACHINE=\"${MACHINE}\" -DUTS_RELEASE=\"2.4.20\"
-CPPFLAGS+=	${ARM_APCS_FLAGS} -mcpu=xscale
-CPPFLAGS+=  -nostdinc -D_STANDALONE
+CFLAGS+=	-ffreestanding -nostdinc
+CFLAGS+=	${ARM_APCS_FLAGS} -mcpu=xscale
+CPPFLAGS+=	-DMACHINE=\"${MACHINE}\" -DUTS_RELEASE=\"2.4.20\"
+CPPFLAGS+=	-D_STANDALONE
 CPPFLAGS+=	-I${.OBJDIR} -I${S}
 
 release: check_RELEASEDIR



CVS commit: src/sys/arch/zaurus/stand/zbsdmod

2019-10-26 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Oct 26 09:58:40 UTC 2019

Modified Files:
src/sys/arch/zaurus/stand/zbsdmod: zbsdmod.c

Log Message:
Fix another boot failure issue of NetBSD/zaurus 8.x and later.

It looks some cacheline alignment restriction so that zbsdmod.o in
NetBSD/zaurus 8.x release cannot jump to a loaded kernel properly.
Adding an explicit alingment pseudo op to put all instructions
between I-cache flush and jumping to the loaded kernel into the
same cacheline solves the issue.

See my post in port-zaurus@ for details:
 https://mail-index.netbsd.org/port-zaurus/2019/10/22/msg69.html

Should be pulled up to netbsd-8 and netbsd-9.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/zaurus/stand/zbsdmod/zbsdmod.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/zaurus/stand/zbsdmod/zbsdmod.c
diff -u src/sys/arch/zaurus/stand/zbsdmod/zbsdmod.c:1.9 src/sys/arch/zaurus/stand/zbsdmod/zbsdmod.c:1.10
--- src/sys/arch/zaurus/stand/zbsdmod/zbsdmod.c:1.9	Mon Dec  2 18:36:11 2013
+++ src/sys/arch/zaurus/stand/zbsdmod/zbsdmod.c	Sat Oct 26 09:58:40 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: zbsdmod.c,v 1.9 2013/12/02 18:36:11 joerg Exp $	*/
+/*	$NetBSD: zbsdmod.c,v 1.10 2019/10/26 09:58:40 tsutsui Exp $	*/
 /*	$OpenBSD: zbsdmod.c,v 1.7 2005/05/02 02:45:29 uwe Exp $	*/
 
 /*
@@ -284,6 +284,13 @@ elf32bsdboot(void)
 		"mov	r1, r1;"
 		"sub	pc, pc, #4;"
 		"mov	r1, #(0x0010 | 0x0020);"
+		/*
+		 * Put the rest of instructions into the same cacheline
+		 * to make sure no I$ refill after invalidation.
+		 */
+		"b	2f;"
+		".align 5;"
+		"2:"
 		"mcr	p15, 0, r1, c1, c0, 0;" /* Write new control register */
 		"mcr	p15, 0, r1, c8, c7, 0;" /* invalidate I+D TLB */
 		"mcr	p15, 0, r1, c7, c5, 0;" /* invalidate I$ and BTB */



CVS commit: src/sys/arch/zaurus/stand/zbsdmod

2019-10-26 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Oct 26 09:58:40 UTC 2019

Modified Files:
src/sys/arch/zaurus/stand/zbsdmod: zbsdmod.c

Log Message:
Fix another boot failure issue of NetBSD/zaurus 8.x and later.

It looks some cacheline alignment restriction so that zbsdmod.o in
NetBSD/zaurus 8.x release cannot jump to a loaded kernel properly.
Adding an explicit alingment pseudo op to put all instructions
between I-cache flush and jumping to the loaded kernel into the
same cacheline solves the issue.

See my post in port-zaurus@ for details:
 https://mail-index.netbsd.org/port-zaurus/2019/10/22/msg69.html

Should be pulled up to netbsd-8 and netbsd-9.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/zaurus/stand/zbsdmod/zbsdmod.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/zaurus/conf

2019-10-26 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Oct 26 09:49:14 UTC 2019

Modified Files:
src/sys/arch/zaurus/conf: Makefile.zaurus.inc

Log Message:
Explicitly set empty LINKENTRY to keep ENTRY address specified in ldscript.

This fixes kernel boot failures of NetBSD/zaurus 8.x and later.
While here, also set empty TEXTADDR also specified in ldscript.

See my post in port-zaurus@ for details:
 https://mail-index.netbsd.org/port-zaurus/2019/10/22/msg69.html

Should be pulled up to netbsd-8 and netbsd-9.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/zaurus/conf/Makefile.zaurus.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/zaurus/conf/Makefile.zaurus.inc
diff -u src/sys/arch/zaurus/conf/Makefile.zaurus.inc:1.9 src/sys/arch/zaurus/conf/Makefile.zaurus.inc:1.10
--- src/sys/arch/zaurus/conf/Makefile.zaurus.inc:1.9	Tue Aug 25 02:38:15 2015
+++ src/sys/arch/zaurus/conf/Makefile.zaurus.inc	Sat Oct 26 09:49:13 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.zaurus.inc,v 1.9 2015/08/25 02:38:15 uebayasi Exp $
+#	$NetBSD: Makefile.zaurus.inc,v 1.10 2019/10/26 09:49:13 tsutsui Exp $
 
 MACHINE_ARCH?=		arm
 CPPFLAGS+=		-D${MACHINE}
@@ -20,6 +20,8 @@ SYSTEM_LD_TAIL_EXTRA+=; \
 KERNEL_BASE_VIRT=	$(LOADADDRESS)
 
 KERNLDSCRIPT=		ldscript
+TEXTADDR=		# defined in ldscript
+LINKENTRY=		# defined in ldscript
 
 EXTRA_CLEAN+=		netbsd.map assym.d ldscript tmp
 



CVS commit: src/sys/arch/zaurus/conf

2019-10-26 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Oct 26 09:49:14 UTC 2019

Modified Files:
src/sys/arch/zaurus/conf: Makefile.zaurus.inc

Log Message:
Explicitly set empty LINKENTRY to keep ENTRY address specified in ldscript.

This fixes kernel boot failures of NetBSD/zaurus 8.x and later.
While here, also set empty TEXTADDR also specified in ldscript.

See my post in port-zaurus@ for details:
 https://mail-index.netbsd.org/port-zaurus/2019/10/22/msg69.html

Should be pulled up to netbsd-8 and netbsd-9.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/zaurus/conf/Makefile.zaurus.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/zaurus/zaurus

2019-10-19 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Oct 19 14:42:30 UTC 2019

Modified Files:
src/sys/arch/zaurus/zaurus: machdep.c

Log Message:
Fix a build error with options VERBOSE_INIT_ARM.


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/sys/arch/zaurus/zaurus/machdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/zaurus/zaurus

2019-10-19 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Oct 19 14:42:30 UTC 2019

Modified Files:
src/sys/arch/zaurus/zaurus: machdep.c

Log Message:
Fix a build error with options VERBOSE_INIT_ARM.


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/sys/arch/zaurus/zaurus/machdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/zaurus/zaurus/machdep.c
diff -u src/sys/arch/zaurus/zaurus/machdep.c:1.42 src/sys/arch/zaurus/zaurus/machdep.c:1.43
--- src/sys/arch/zaurus/zaurus/machdep.c:1.42	Tue Jul 16 14:41:49 2019
+++ src/sys/arch/zaurus/zaurus/machdep.c	Sat Oct 19 14:42:30 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.42 2019/07/16 14:41:49 skrll Exp $	*/
+/*	$NetBSD: machdep.c,v 1.43 2019/10/19 14:42:30 tsutsui Exp $	*/
 /*	$OpenBSD: zaurus_machdep.c,v 1.25 2006/06/20 18:24:04 todd Exp $	*/
 
 /*
@@ -107,7 +107,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.42 2019/07/16 14:41:49 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.43 2019/10/19 14:42:30 tsutsui Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -772,7 +772,7 @@ initarm(void *arg)
 
 #ifdef VERBOSE_INIT_ARM
 	/* Tell the user about the memory */
-	printf("physmemory: %d pages at 0x%08lx -> 0x%08lx\n", physmem,
+	printf("physmemory: %lu pages at 0x%08lx -> 0x%08lx\n", physmem,
 	physical_start, physical_end - 1);
 #endif
 



CVS commit: src/sys

2019-09-14 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Sep 14 17:11:39 UTC 2019

Modified Files:
src/sys/arch/dreamcast/dev/g1: wdc_g1.c
src/sys/dev/ic: wdc.c wdcvar.h

Log Message:
Restore interface to pass a MD reset function to MI wdcprobe().

Fixes silent hang on G1IDE on Dreamcast. PR kern/54538
Should be pulled up to netbsd-9 with the previous changes.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/dreamcast/dev/g1/wdc_g1.c
cvs rdiff -u -r1.291 -r1.292 src/sys/dev/ic/wdc.c
cvs rdiff -u -r1.98 -r1.99 src/sys/dev/ic/wdcvar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys

2019-09-14 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Sep 14 17:11:39 UTC 2019

Modified Files:
src/sys/arch/dreamcast/dev/g1: wdc_g1.c
src/sys/dev/ic: wdc.c wdcvar.h

Log Message:
Restore interface to pass a MD reset function to MI wdcprobe().

Fixes silent hang on G1IDE on Dreamcast. PR kern/54538
Should be pulled up to netbsd-9 with the previous changes.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/dreamcast/dev/g1/wdc_g1.c
cvs rdiff -u -r1.291 -r1.292 src/sys/dev/ic/wdc.c
cvs rdiff -u -r1.98 -r1.99 src/sys/dev/ic/wdcvar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/dreamcast/dev/g1/wdc_g1.c
diff -u src/sys/arch/dreamcast/dev/g1/wdc_g1.c:1.4 src/sys/arch/dreamcast/dev/g1/wdc_g1.c:1.5
--- src/sys/arch/dreamcast/dev/g1/wdc_g1.c:1.4	Mon Sep  9 22:01:23 2019
+++ src/sys/arch/dreamcast/dev/g1/wdc_g1.c	Sat Sep 14 17:11:39 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: wdc_g1.c,v 1.4 2019/09/09 22:01:23 jdolecek Exp $ */
+/* $NetBSD: wdc_g1.c,v 1.5 2019/09/14 17:11:39 tsutsui Exp $ */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -62,9 +62,7 @@ struct wdc_g1_softc {
 
 static int	wdc_g1_probe(device_t, cfdata_t, void *);
 static void	wdc_g1_attach(device_t, device_t, void *);
-#if 0
 static void	wdc_g1_do_reset(struct ata_channel *, int);
-#endif
 static int	wdc_g1_intr(void *);
 
 CFATTACH_DECL_NEW(wdc_g1bus, sizeof(struct wdc_g1_softc),
@@ -76,18 +74,11 @@ wdc_g1_probe(device_t parent, cfdata_t c
 	struct g1bus_attach_args *ga = aux;
 	struct wdc_regs wdr;
 	int result = 0, i;
-#ifdef ATADEBUG
-	struct device dev;
-#endif
 
 	*((volatile uint32_t *)0xa05f74e4) = 0x1f;
 	for (i = 0; i < 0x20 / 4; i++)
 		(void)((volatile uint32_t *)0xa000)[i];
 
-#if 0
-	wdc.reset = wdc_g1_do_reset;
-#endif
-
 	wdr.cmd_iot = ga->ga_memt;
 	if (bus_space_map(wdr.cmd_iot, WDC_G1_CMD_ADDR,
 	WDC_G1_REG_NPORTS * 4, 0, _baseioh))
@@ -106,12 +97,7 @@ wdc_g1_probe(device_t parent, cfdata_t c
 	WDC_G1_AUXREG_NPORTS, 0, _ioh))
 	  goto outunmap;
 
-#ifdef ATADEBUG
-	/* fake up device name for ATADEBUG_PRINT() with DEBUG_PROBE */
-	memset(, 0, sizeof(dev));
-	strncat(dev.dv_xname, "wdc(g1probe)", sizeof(dev.dv_xname));
-#endif
-	result = wdcprobe();
+	result = wdcprobe_with_reset(, wdc_g1_do_reset);
 	
 	bus_space_unmap(wdr.ctl_iot, wdr.ctl_ioh, WDC_G1_AUXREG_NPORTS);
  outunmap:
@@ -157,9 +143,7 @@ wdc_g1_attach(struct device *parent, str
 	sc->sc_wdcdev.sc_atac.atac_channels = sc->wdc_chanlist;
 	sc->sc_wdcdev.sc_atac.atac_nchannels = 1;
 	sc->sc_wdcdev.wdc_maxdrives = 2;
-#if 0
 	sc->sc_wdcdev.reset = wdc_g1_do_reset;
-#endif
 	sc->ata_channel.ch_channel = 0;
 	sc->ata_channel.ch_atac = >sc_wdcdev.sc_atac;
 
@@ -180,12 +164,11 @@ wdc_g1_intr(void *arg)
 	return wdcintr(arg);
 }
 
-#if 0
 /*
- * This does what the generic wdc_do_reset() does, only with unnecessary
- * additional GD-ROM reset. Keep code around in case this turns out to be
- * actually useful/necessary. ATAPI code should do it's own reset in either
- * case anyway.
+ * This does what the generic wdc_do_reset() does, with additional
+ * GD-ROM reset. GD-ROM is a very early ATAPI device appeared in 1998
+ * and it doesn't reset itself by the WDCTL_RST in AUX_CTLR but requires
+ * ATAPI_SOFT_RESET command to reset whole device as a master.
  */
 static void
 wdc_g1_do_reset(struct ata_channel *chp, int poll)
@@ -220,4 +203,3 @@ wdc_g1_do_reset(struct ata_channel *chp,
 	if (poll != 0)
 		splx(s);
 }
-#endif

Index: src/sys/dev/ic/wdc.c
diff -u src/sys/dev/ic/wdc.c:1.291 src/sys/dev/ic/wdc.c:1.292
--- src/sys/dev/ic/wdc.c:1.291	Sat Oct 27 05:38:08 2018
+++ src/sys/dev/ic/wdc.c	Sat Sep 14 17:11:39 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: wdc.c,v 1.291 2018/10/27 05:38:08 maya Exp $ */
+/*	$NetBSD: wdc.c,v 1.292 2019/09/14 17:11:39 tsutsui Exp $ */
 
 /*
  * Copyright (c) 1998, 2001, 2003 Manuel Bouyer.  All rights reserved.
@@ -58,7 +58,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: wdc.c,v 1.291 2018/10/27 05:38:08 maya Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wdc.c,v 1.292 2019/09/14 17:11:39 tsutsui Exp $");
 
 #include "opt_ata.h"
 #include "opt_wdc.h"
@@ -477,6 +477,14 @@ wdc_drvprobe(struct ata_channel *chp)
 int
 wdcprobe(struct wdc_regs *wdr)
 {
+
+	return wdcprobe_with_reset(wdr, NULL);
+}
+
+int
+wdcprobe_with_reset(struct wdc_regs *wdr,
+void (*do_reset)(struct ata_channel *, int))
+{
 	struct wdc_softc wdc;
 	struct ata_channel ch;
 	int rv;
@@ -487,9 +495,8 @@ wdcprobe(struct wdc_regs *wdr)
 	ch.ch_atac = _atac;
 	wdc.regs = wdr;
 
-	/* default reset method */
-	if (wdc.reset == NULL)
-		wdc.reset = wdc_do_reset;
+	/* check the MD reset method */
+	wdc.reset = (do_reset != NULL) ? do_reset : wdc_do_reset;
 
 	rv = wdcprobe1(, 1);
 

Index: src/sys/dev/ic/wdcvar.h
diff -u src/sys/dev/ic/wdcvar.h:1.98 src/sys/dev/ic/wdcvar.h:1.99
--- src/sys/dev/ic/wdcvar.h:1.98	Sat Oct  7 16:05:32 

CVS commit: src/sys/arch/luna68k

2019-06-29 Thread Izumi Tsutsui
The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include 			/* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: lunafb.c,v 1.38 2019/06/30 02:11:56 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lunafb.c,v 1.39 2019/06/30 05:04:48 tsutsui Exp $");
 
 #include 
 #include 
@@ -74,10 +74,10 @@ struct bt458 {
 	uint8_t  pad3[3];
 };
 
-#define	OMFB_RFCNT	0xB100	/* video h-origin/v-origin */
-#define	OMFB_RAMDAC	0xC110	/* Bt454/Bt458 RAMDAC */
+#define	OMFB_RFCNT	BMAP_RFCNT	/* video h-origin/v-origin */
+#define	OMFB_RAMDAC	BMAP_PALLET2	/* Bt454/Bt458 RAMDAC */
 
-#define	OMFB_SIZE	(0xB130 - 0xB108 + PAGE_SIZE)
+#define	OMFB_SIZE	(BMAP_FN0 - BMAP_BMP + PAGE_SIZE)
 
 struct hwcmap {
 #define CMAP_SIZE 256

Index: src/sys/arch/luna68k/dev/omrasopsvar.h
diff -u src/sys/arch/luna68k/dev/omrasopsvar.h:1.3 src/sys/arch/luna68k/dev/omrasopsvar.h:1.4
--- src/sys/arch/luna68k/dev/omrasopsvar.h:1.3	Sat Oct  4 16:58:17 2014
+++ src/sys/arch/luna68k/dev/omrasopsvar.h	Sun Jun 30 05:04:48 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: omrasopsvar.h,v 1.3 2014/10/04 16:58:17 tsutsui Exp $ */
+/* $NetBSD: omrasopsvar.h,v 1.4 2019/06/30 05:04:48 tsutsui Exp $ */
 /*
  * Copyright (c) 2013 Kenji Aoyama
  *
@@ -20,10 +20,12 @@
  * XXX: We consider only 1bpp and 4bpp for now
  */
 
-#define OMFB_PLANEMASK	0xB104	/* BMSEL register */
-#define OMFB_FB_WADDR	0xB1080008	/* common plane */
-#define OMFB_FB_RADDR	0xB10C0008	/* plane #0 */
-#define OMFB_ROPFUNC	0xB12C	/* common ROP function */
+#include 
+
+#define OMFB_PLANEMASK	BMAP_BMSEL	/* BMSEL register */
+#define OMFB_FB_WADDR	(BMAP_BMP + 8)	/* common plane */
+#define OMFB_FB_RADDR	(BMAP_BMAP0 + 8)/* plane #0 */
+#define OMFB_ROPFUNC	BMAP_FN		/* common ROP function */
 
 /*
  * Helper macros

Index: src/sys/arch/luna68k/dev/xp.c
diff -u src/sys/arch/luna68k/dev/xp.c:1.4 src/sys/arch/luna68k/dev/xp.c:1.5
--- src/sys/arch/luna68k/dev/xp.c:1.4	Thu Jun  1 02:45:06 2017
+++ src/sys/arch/luna68k/dev/xp.c	Sun Jun 30 05:04:48 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: xp.c,v 1.4 2017/06/01 02:45:06 chs Exp $ */
+/* $NetBSD: xp.c,v 1.5 2019/06/30 05:04:48 tsutsui Exp $ */
 
 /*-
  * Copyright (c) 2016 Izumi Tsutsui.  All rights reserved.
@@ -29,7 +29,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: xp.c,v 1.4 2017/06/01 02:45:06 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xp.c,v 1.5 2019/06/30 05:04:48 tsutsui Exp $");
 
 #include 
 #include 
@@ -42,13 +42,16 @@ __KERNEL_RCSID(0, "$NetBSD: xp.c,v 1.4 2
 #include 
 
 #include 
+#include 
 #include 
 
 #include "ioconf.h"
 
-#define XP_SHM_BASE	0x7100
+#define TRI_PORT_RAM_XP_OFFSET	0x0
+
+#define XP_SHM_BASE	(TRI_PORT_RAM + TRI_PORT_RAM_XP_OFFSET)
 #define XP_SHM_SIZE	0x0001	/* 64KB for XP; rest 64KB for lance */
-#define XP_TAS_ADDR	0x6100
+#define XP_TAS_ADDR	OBIO_TAS
 
 struct xp_softc {
 	device_t	sc_dev;
@@ -105,7 +108,7 @@ static bool xp_matched;
  *
  * XXX: PIO port functions should be shared with machdep.c for DIP SWs
  */
-#define PIO_ADDR	0x4900
+#define PIO_ADDR	OBIO_PIO0_BASE
 #define PORT_A		0
 #define PORT_B		1
 #define PORT_C		2

Index: src/sys/arch/luna68k/luna68k/locore.s
diff -u src/sys/arch/luna68k/luna68k/locore.s:1.63 src/sys/arch/luna68k/luna68k/locore.s:1.64
--- src/sys/arch/luna68k/luna68k/locore.s:1.63	Wed Dec 19 13:57:47 2018
+++ src/sys/arch/luna68k/luna68k/locore.s	Sun Jun 30 05:04:49 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.s,v 1.63 2018/12/19 13:57:47 maxv Exp $ */
+/* $NetBSD: locore.s,v 1.64 2019/06/30 05:04:49 tsutsui Exp $ */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -50,6 +50,7 @@
 #include "assym.h"
 #include 
 #include 
+#include 
 
 #include "ksyms.h"
 
@@ -116,13 +117,13 @@ ASENTRY_NOPROFILE(start)
 	RELOC(lowram,%a0)
 	movl	%a5,%a0@		| store start of physical memory
 
-	movl	#0x4100,%a0		| available memory in bytes
+	movl	#PROM_ADDR,%a0		| available memory in bytes
 	movl	%a0@(12),%a0		| (int *)base[3])
 	movl	%a0@,%d5
 	RELOC(memavail,%a0)
 	movl	%d5,%a0@		| save memavail
 
-	movl	#0x4100,%a0		| planemask; 0x0f or 0xff
+	movl	#PROM_ADDR,%a0		| planemask; 0x0f or 0xff
 	movl	%a0@(184),%a0		| (int *)base[46]
 	movl	%a0@,%d5
 	RELOC(hwplanemask,%a0)
@@ -157,7 +158,7 @@ Lstart0:
 	 * save argument of 'x' command on boot per machine type
 	 * XXX: assume CPU_68040 is LUNA-II
 	 */
-	movl	#0x4100,%a0
+	movl	#PROM_ADDR,%a0
 	cmpl	#CPU_68040,%d0		| 68040?
 	jne	1f			| no, assume 68030 LUNA
 	movl	%a0@(8),%a0		| arg at (char *)base[2] on LUNA-II
@@ -644,9 +645,9 @@ ENTRY_NOPROFILE(intrhand_vectored)
 #if 1	/* XXX wild timer -- how can I disable/enable the interrupt? */
 ENTRY_NOPROFILE(lev5intr)
 	addql	#1,_C_LABEL(idepth)
-	btst	#7,0x6300		| check whether system clock
+	btst	#7,OBIO_CLOCK		| check whether system clock
 	beq	1f
-	movb	#1,0x6300		| clear the interrupt
+	movb	#1,OBIO_CLOCK		| clear the interrupt
 	tstl	_C_LABEL(clock_enable)	| is hardclock()

CVS commit: src/sys/arch/luna68k

2019-06-29 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Jun 30 05:04:49 UTC 2019

Modified Files:
src/sys/arch/luna68k/dev: if_le.c lcd.c lunafb.c omrasopsvar.h xp.c
src/sys/arch/luna68k/luna68k: locore.s machdep.c
src/sys/arch/luna68k/stand/boot: autoconf.c bmd.c getsecs.c if_le.c
sio.c
Added Files:
src/sys/arch/luna68k/include: board.h

Log Message:
Pull OpenBSD/luna88k board.h to define SX9100 board device addresses.

Also replace magic addresses with macro where appropriate.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/luna68k/dev/if_le.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/luna68k/dev/lcd.c
cvs rdiff -u -r1.38 -r1.39 src/sys/arch/luna68k/dev/lunafb.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/luna68k/dev/omrasopsvar.h
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/luna68k/dev/xp.c
cvs rdiff -u -r0 -r1.1 src/sys/arch/luna68k/include/board.h
cvs rdiff -u -r1.63 -r1.64 src/sys/arch/luna68k/luna68k/locore.s
cvs rdiff -u -r1.102 -r1.103 src/sys/arch/luna68k/luna68k/machdep.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/luna68k/stand/boot/autoconf.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/luna68k/stand/boot/bmd.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/luna68k/stand/boot/getsecs.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/luna68k/stand/boot/if_le.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/luna68k/stand/boot/sio.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/luna68k/dev

2019-06-29 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Jun 30 02:11:56 UTC 2019

Modified Files:
src/sys/arch/luna68k/dev: if_le.c lcd.c lunafb.c siotty.c

Log Message:
Misc KNF.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/luna68k/dev/if_le.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/luna68k/dev/lcd.c
cvs rdiff -u -r1.37 -r1.38 src/sys/arch/luna68k/dev/lunafb.c
cvs rdiff -u -r1.44 -r1.45 src/sys/arch/luna68k/dev/siotty.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/luna68k/dev/if_le.c
diff -u src/sys/arch/luna68k/dev/if_le.c:1.7 src/sys/arch/luna68k/dev/if_le.c:1.8
--- src/sys/arch/luna68k/dev/if_le.c:1.7	Mon Sep 23 17:27:09 2013
+++ src/sys/arch/luna68k/dev/if_le.c	Sun Jun 30 02:11:56 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: if_le.c,v 1.7 2013/09/23 17:27:09 tsutsui Exp $ */
+/* $NetBSD: if_le.c,v 1.8 2019/06/30 02:11:56 tsutsui Exp $ */
 
 /*-
  * Copyright (c) 1992, 1993
@@ -73,7 +73,7 @@
 
 #include 			/* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: if_le.c,v 1.7 2013/09/23 17:27:09 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_le.c,v 1.8 2019/06/30 02:11:56 tsutsui Exp $");
 
 #include "opt_inet.h"
 
@@ -152,7 +152,7 @@ lerdcsr(struct lance_softc *sc, uint16_t
 
 	ler1->ler1_rap = port;
 	val = ler1->ler1_rdp;
-	return (val);
+	return val;
 }
 
 static int
@@ -161,9 +161,9 @@ le_match(device_t parent, cfdata_t cf, v
 	struct mainbus_attach_args *ma = aux;
 
 	if (strcmp(ma->ma_name, le_cd.cd_name))
-		return (0);
+		return 0;
 
-	return (1);
+	return 1;
 }
 
 void

Index: src/sys/arch/luna68k/dev/lcd.c
diff -u src/sys/arch/luna68k/dev/lcd.c:1.9 src/sys/arch/luna68k/dev/lcd.c:1.10
--- src/sys/arch/luna68k/dev/lcd.c:1.9	Thu Mar  8 03:12:02 2018
+++ src/sys/arch/luna68k/dev/lcd.c	Sun Jun 30 02:11:56 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: lcd.c,v 1.9 2018/03/08 03:12:02 mrg Exp $ */
+/* $NetBSD: lcd.c,v 1.10 2019/06/30 02:11:56 tsutsui Exp $ */
 /* $OpenBSD: lcd.c,v 1.7 2015/02/10 22:42:35 miod Exp $ */
 
 /*-
@@ -32,7 +32,7 @@
 
 #include 		/* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: lcd.c,v 1.9 2018/03/08 03:12:02 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lcd.c,v 1.10 2019/06/30 02:11:56 tsutsui Exp $");
 
 #include 
 #include 
@@ -71,10 +71,10 @@ __KERNEL_RCSID(0, "$NetBSD: lcd.c,v 1.9 
 #define LCD_MAXBUFLEN	80
 
 struct pio {
-	volatile u_int8_t portA;
-	volatile u_int8_t portB;
-	volatile u_int8_t portC;
-	volatile u_int8_t cntrl;
+	volatile uint8_t portA;
+	volatile uint8_t portB;
+	volatile uint8_t portC;
+	volatile uint8_t cntrl;
 };
 
 /* Autoconf stuff */
@@ -344,6 +344,7 @@ lcdshow(char *s)
 void
 greeting(void)
 {
+
 	lcdctrl(LCD_INIT);
 	lcdctrl(LCD_ENTRY);
 	lcdctrl(LCD_ON);

Index: src/sys/arch/luna68k/dev/lunafb.c
diff -u src/sys/arch/luna68k/dev/lunafb.c:1.37 src/sys/arch/luna68k/dev/lunafb.c:1.38
--- src/sys/arch/luna68k/dev/lunafb.c:1.37	Wed Jan 24 05:35:58 2018
+++ src/sys/arch/luna68k/dev/lunafb.c	Sun Jun 30 02:11:56 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: lunafb.c,v 1.37 2018/01/24 05:35:58 riastradh Exp $ */
+/* $NetBSD: lunafb.c,v 1.38 2019/06/30 02:11:56 tsutsui Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include 			/* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: lunafb.c,v 1.37 2018/01/24 05:35:58 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lunafb.c,v 1.38 2019/06/30 02:11:56 tsutsui Exp $");
 
 #include 
 #include 
@@ -346,7 +346,7 @@ omsetcmap(struct omfb_softc *sc, struct 
 
 	cmsize = sc->sc_dc->dc_cmsize;
 	if (index >= cmsize || count > cmsize - index)
-		return (EINVAL);
+		return EINVAL;
 
 	error = copyin(p->red, [index], count);
 	if (error)

Index: src/sys/arch/luna68k/dev/siotty.c
diff -u src/sys/arch/luna68k/dev/siotty.c:1.44 src/sys/arch/luna68k/dev/siotty.c:1.45
--- src/sys/arch/luna68k/dev/siotty.c:1.44	Fri Aug 21 10:48:06 2015
+++ src/sys/arch/luna68k/dev/siotty.c	Sun Jun 30 02:11:56 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: siotty.c,v 1.44 2015/08/21 10:48:06 christos Exp $ */
+/* $NetBSD: siotty.c,v 1.45 2019/06/30 02:11:56 tsutsui Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include 			/* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: siotty.c,v 1.44 2015/08/21 10:48:06 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: siotty.c,v 1.45 2019/06/30 02:11:56 tsutsui Exp $");
 
 #include "opt_ddb.h"
 
@@ -602,7 +602,7 @@ siopoll(dev_t dev, int events, struct lw
 
 	sc = device_lookup_private(_cd, minor(dev));
 	tp = sc->sc_tty;
-	return ((*tp->t_linesw->l_poll)(tp, events, l));
+	return (*tp->t_linesw->l_poll)(tp, events, l);
 }
 
 int



CVS commit: src/sys/arch/luna68k/dev

2019-06-29 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Jun 30 02:11:56 UTC 2019

Modified Files:
src/sys/arch/luna68k/dev: if_le.c lcd.c lunafb.c siotty.c

Log Message:
Misc KNF.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/luna68k/dev/if_le.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/luna68k/dev/lcd.c
cvs rdiff -u -r1.37 -r1.38 src/sys/arch/luna68k/dev/lunafb.c
cvs rdiff -u -r1.44 -r1.45 src/sys/arch/luna68k/dev/siotty.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/atari

2019-06-29 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Jun 29 16:41:19 UTC 2019

Modified Files:
src/sys/arch/atari/atari: autoconf.c
src/sys/arch/atari/dev: grf.c hdfd.c ite.c ite_cc.c ite_et.c ncr5380.c
wdc_mb.c
src/sys/arch/atari/isa: fdcisa.c

Log Message:
Make local functions static.


To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.67 src/sys/arch/atari/atari/autoconf.c
cvs rdiff -u -r1.49 -r1.50 src/sys/arch/atari/dev/grf.c
cvs rdiff -u -r1.84 -r1.85 src/sys/arch/atari/dev/hdfd.c
cvs rdiff -u -r1.78 -r1.79 src/sys/arch/atari/dev/ite.c
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/atari/dev/ite_cc.c
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/atari/dev/ite_et.c
cvs rdiff -u -r1.72 -r1.73 src/sys/arch/atari/dev/ncr5380.c
cvs rdiff -u -r1.40 -r1.41 src/sys/arch/atari/dev/wdc_mb.c
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/atari/isa/fdcisa.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/atari

2019-06-29 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Jun 29 16:41:19 UTC 2019

Modified Files:
src/sys/arch/atari/atari: autoconf.c
src/sys/arch/atari/dev: grf.c hdfd.c ite.c ite_cc.c ite_et.c ncr5380.c
wdc_mb.c
src/sys/arch/atari/isa: fdcisa.c

Log Message:
Make local functions static.


To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.67 src/sys/arch/atari/atari/autoconf.c
cvs rdiff -u -r1.49 -r1.50 src/sys/arch/atari/dev/grf.c
cvs rdiff -u -r1.84 -r1.85 src/sys/arch/atari/dev/hdfd.c
cvs rdiff -u -r1.78 -r1.79 src/sys/arch/atari/dev/ite.c
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/atari/dev/ite_cc.c
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/atari/dev/ite_et.c
cvs rdiff -u -r1.72 -r1.73 src/sys/arch/atari/dev/ncr5380.c
cvs rdiff -u -r1.40 -r1.41 src/sys/arch/atari/dev/wdc_mb.c
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/atari/isa/fdcisa.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/atari/atari/autoconf.c
diff -u src/sys/arch/atari/atari/autoconf.c:1.66 src/sys/arch/atari/atari/autoconf.c:1.67
--- src/sys/arch/atari/atari/autoconf.c:1.66	Fri May  3 01:08:28 2019
+++ src/sys/arch/atari/atari/autoconf.c	Sat Jun 29 16:41:18 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: autoconf.c,v 1.66 2019/05/03 01:08:28 tsutsui Exp $	*/
+/*	$NetBSD: autoconf.c,v 1.67 2019/06/29 16:41:18 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1995 Leo Weppelman
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.66 2019/05/03 01:08:28 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.67 2019/06/29 16:41:18 tsutsui Exp $");
 
 #include "opt_md.h"
 
@@ -55,10 +55,10 @@ __KERNEL_RCSID(0, "$NetBSD: autoconf.c,v
 #include "ioconf.h"
 
 static void findroot(void);
-int mbmatch(device_t, cfdata_t, void *);
-void mbattach(device_t, device_t, void *);
+static int mbmatch(device_t, cfdata_t, void *);
+static void mbattach(device_t, device_t, void *);
 #if 0
-int mbprint(void *, const char *);
+static int mbprint(void *, const char *);
 #endif
 
 int atari_realconfig;
@@ -293,7 +293,7 @@ CFATTACH_DECL_NEW(mainbus, 0,
 
 static int mb_attached;
 
-int
+static int
 mbmatch(device_t parent, cfdata_t cf, void *aux)
 {
 
@@ -308,7 +308,7 @@ mbmatch(device_t parent, cfdata_t cf, vo
 /*
  * "find" all the things that should be there.
  */
-void
+static void
 mbattach(device_t parent, device_t self, void *aux)
 {
 
@@ -332,7 +332,7 @@ mbattach(device_t parent, device_t self,
 }
 
 #if 0
-int
+static int
 mbprint(void *aux, const char *pnp)
 {
 

Index: src/sys/arch/atari/dev/grf.c
diff -u src/sys/arch/atari/dev/grf.c:1.49 src/sys/arch/atari/dev/grf.c:1.50
--- src/sys/arch/atari/dev/grf.c:1.49	Fri Jul 25 08:10:32 2014
+++ src/sys/arch/atari/dev/grf.c	Sat Jun 29 16:41:18 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: grf.c,v 1.49 2014/07/25 08:10:32 dholland Exp $	*/
+/*	$NetBSD: grf.c,v 1.50 2019/06/29 16:41:18 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1995 Leo Weppelman
@@ -46,7 +46,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: grf.c,v 1.49 2014/07/25 08:10:32 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: grf.c,v 1.50 2019/06/29 16:41:18 tsutsui Exp $");
 
 #include 
 #include 
@@ -90,9 +90,9 @@ int grfon(dev_t);
 int grfoff(dev_t);
 int grfsinfo(dev_t, struct grfdyninfo *);
 
-int grfbusprint(void *, const char *);
-int grfbusmatch(device_t, cfdata_t, void *);
-void grfbusattach(device_t, device_t, void *);
+static int grfbusprint(void *, const char *);
+static int grfbusmatch(device_t, cfdata_t, void *);
+static void grfbusattach(device_t, device_t, void *);
 
 /*
  * pointers to grf drivers device structs 
@@ -127,7 +127,7 @@ const struct cdevsw grf_cdevsw = {
  */
 static cfdata_t cfdata_gbus  = NULL;
 
-int
+static int
 grfbusmatch(device_t parent, cfdata_t cf, void *aux)
 {
 
@@ -139,7 +139,7 @@ grfbusmatch(device_t parent, cfdata_t cf
 	return 1;	/* Always there	*/
 }
 
-void
+static void
 grfbusattach(device_t parent, device_t self, void *aux)
 {
 	grf_auxp_t	grf_auxp;
@@ -155,7 +155,7 @@ grfbusattach(device_t parent, device_t s
 	}
 }
 
-int
+static int
 grfbusprint(void *aux, const char *name)
 {
 

Index: src/sys/arch/atari/dev/hdfd.c
diff -u src/sys/arch/atari/dev/hdfd.c:1.84 src/sys/arch/atari/dev/hdfd.c:1.85
--- src/sys/arch/atari/dev/hdfd.c:1.84	Fri Feb  8 08:47:35 2019
+++ src/sys/arch/atari/dev/hdfd.c	Sat Jun 29 16:41:18 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: hdfd.c,v 1.84 2019/02/08 08:47:35 mrg Exp $	*/
+/*	$NetBSD: hdfd.c,v 1.85 2019/06/29 16:41:18 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1996 Leo Weppelman
@@ -91,7 +91,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: hdfd.c,v 1.84 2019/02/08 08:47:35 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hdfd.c,v 1.85 2019/06/29 16:41:18 tsutsui Exp $");
 
 #include "opt_ddb.h"
 
@@ -202,9 +202,9 @@ struct fdc_softc {
 };
 
 /* controller driver configuration */
-int	fdcprobe(device_t, cfdata_t, void *);
-int	fdprint(void *, 

CVS commit: src/sys/arch/atari/dev

2019-06-29 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Jun 29 16:37:49 UTC 2019

Modified Files:
src/sys/arch/atari/dev: clock.c

Log Message:
Misc cosmetics and cleanup.


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 src/sys/arch/atari/dev/clock.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/atari/dev/clock.c
diff -u src/sys/arch/atari/dev/clock.c:1.59 src/sys/arch/atari/dev/clock.c:1.60
--- src/sys/arch/atari/dev/clock.c:1.59	Fri Jul 25 08:10:32 2014
+++ src/sys/arch/atari/dev/clock.c	Sat Jun 29 16:37:49 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: clock.c,v 1.59 2014/07/25 08:10:32 dholland Exp $	*/
+/*	$NetBSD: clock.c,v 1.60 2019/06/29 16:37:49 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.59 2014/07/25 08:10:32 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.60 2019/06/29 16:37:49 tsutsui Exp $");
 
 #include 
 #include 
@@ -157,7 +157,7 @@ static int	profmin;	/* profclock divisor
 static int	clk2min;	/* current, from above choices		*/
 #endif
 
-int
+static int
 clockmatch(device_t parent, cfdata_t cf, void *aux)
 {
 
@@ -169,7 +169,8 @@ clockmatch(device_t parent, cfdata_t cf,
 /*
  * Start the real-time clock.
  */
-void clockattach(device_t parent, device_t self, void *aux)
+static void
+clockattach(device_t parent, device_t self, void *aux)
 {
 	struct clock_softc *sc = device_private(self);
 	struct todr_chip_handle	*tch;
@@ -221,7 +222,8 @@ void clockattach(device_t parent, device
 #endif /* STATCLOCK */
 }
 
-void cpu_initclocks(void)
+void
+cpu_initclocks(void)
 {
 
 	MFP->mf_tacr  = T_Q200;		/* Start timer			*/
@@ -316,7 +318,7 @@ init_delay(void)
 	 */
 	MFP->mf_tbcr  = 0;		/* Stop timer			*/
 	MFP->mf_iera &= ~IA_TIMB;	/* Disable timer interrupts	*/
-	MFP->mf_tbdr  = 0;	
+	MFP->mf_tbdr  = 0;
 	MFP->mf_tbcr  = T_Q004;	/* Start timer			*/
 }
 
@@ -559,9 +561,9 @@ rtcwrite(dev_t dev, struct uio *uio, int
 	 */
 	length = uio->uio_resid;
 	if (uio->uio_offset || (length != sizeof(buffer)
-	  && length != sizeof(buffer) - 1))
+	&& length != sizeof(buffer) - 1))
 		return EINVAL;
-	
+
 	if ((error = uiomove((void *)buffer, sizeof(buffer), uio)))
 		return error;
 
@@ -580,7 +582,7 @@ rtcwrite(dev_t dev, struct uio *uio, int
 	clkregs[MC_DOM]   = twodigits(buffer, 6);
 	clkregs[MC_MONTH] = twodigits(buffer, 4);
 	s = twodigits(buffer, 0) * 100 + twodigits(buffer, 2);
-	clkregs[MC_YEAR]  = s - GEMSTARTOFTIME; 
+	clkregs[MC_YEAR]  = s - GEMSTARTOFTIME;
 
 	s = splclock();
 	MC146818_PUTTOD(RTC, );



CVS commit: src/sys/arch/atari/dev

2019-06-29 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Jun 29 16:37:49 UTC 2019

Modified Files:
src/sys/arch/atari/dev: clock.c

Log Message:
Misc cosmetics and cleanup.


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 src/sys/arch/atari/dev/clock.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/atari/stand/loadkmap

2019-06-29 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Jun 29 16:29:24 UTC 2019

Modified Files:
src/sys/arch/atari/stand/loadkmap: loadkmap.c

Log Message:
Misc KNF and cleanup.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/atari/stand/loadkmap/loadkmap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/atari/stand/loadkmap

2019-06-29 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Jun 29 16:29:24 UTC 2019

Modified Files:
src/sys/arch/atari/stand/loadkmap: loadkmap.c

Log Message:
Misc KNF and cleanup.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/atari/stand/loadkmap/loadkmap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/atari/stand/loadkmap/loadkmap.c
diff -u src/sys/arch/atari/stand/loadkmap/loadkmap.c:1.11 src/sys/arch/atari/stand/loadkmap/loadkmap.c:1.12
--- src/sys/arch/atari/stand/loadkmap/loadkmap.c:1.11	Wed Aug 12 17:53:03 2015
+++ src/sys/arch/atari/stand/loadkmap/loadkmap.c	Sat Jun 29 16:29:24 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: loadkmap.c,v 1.11 2015/08/12 17:53:03 tsutsui Exp $	*/
+/*	$NetBSD: loadkmap.c,v 1.12 2019/06/29 16:29:24 tsutsui Exp $	*/
 
 #include 
 #include 
@@ -25,19 +25,19 @@ main(int argc, char *argv[])
 		if ((argc == 3) && !strcmp(argv[1], "-f")) {
 			mapfile = argv[2];
 			set_sysmap = 1;
-		}
-		else {
+		} else {
 			fprintf(stderr, "%s [-f] keymap\n", argv[0]);
 			exit(1);
 		}
-	}
-	else mapfile = argv[1];
+	} else
+		mapfile = argv[1];
 
 	if (argc == 1)
 		rc = dump_kmap();
-	else rc = load_kmap(mapfile, set_sysmap);
+	else
+		rc = load_kmap(mapfile, set_sysmap);
 
-	exit (rc);
+	exit(rc);
 }
 
 
@@ -45,36 +45,36 @@ static int
 load_kmap(const char *file, int set_sysmap)
 {
 	int	fd;
-	char	buf[sizeof (struct kbdmap)];
+	char	buf[sizeof(struct kbdmap)];
 	int	ioc;
 
 	ioc = set_sysmap ? ITEIOCSSKMAP : ITEIOCSKMAP;
 	
-	if ((fd = open (file, 0)) >= 0) {
-		if (read (fd, buf, sizeof (buf)) == sizeof (buf)) {
-			if (ioctl (0, ioc, buf) == 0) {
+	if ((fd = open(file, 0)) >= 0) {
+		if (read(fd, buf, sizeof(buf)) == sizeof(buf)) {
+			if (ioctl(0, ioc, buf) == 0) {
 close(fd);
 return 0;
-			}
-			else perror("ITEIOCSKMAP");
-		}
-		else perror("read kmap");
+			} else
+perror("ITEIOCSKMAP");
+		} else
+			perror("read kmap");
 
 		close(fd);
-	}
-	else perror("open kmap");
+	} else
+		perror("open kmap");
 	return 1;
 }
 
 static int
 dump_kmap(void)
 {
-	char buf[sizeof (struct kbdmap)];
+	char buf[sizeof(struct kbdmap)];
 
-	if (ioctl (0, ITEIOCGKMAP, buf) == 0) {
-		write (1, buf, sizeof (buf));
+	if (ioctl(0, ITEIOCGKMAP, buf) == 0) {
+		write(1, buf, sizeof(buf));
 		return 0;
 	}
-	perror ("ITEIOCGKMAP");
+	perror("ITEIOCGKMAP");
 	return 1;
 }



CVS commit: src/sys/arch/atari/atari

2019-06-28 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Jun 29 03:22:53 UTC 2019

Modified Files:
src/sys/arch/atari/atari: machdep.c

Log Message:
Remove obsolete stuff.


To generate a diff of this commit:
cvs rdiff -u -r1.179 -r1.180 src/sys/arch/atari/atari/machdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/atari/atari/machdep.c
diff -u src/sys/arch/atari/atari/machdep.c:1.179 src/sys/arch/atari/atari/machdep.c:1.180
--- src/sys/arch/atari/atari/machdep.c:1.179	Sat Jun 29 03:19:49 2019
+++ src/sys/arch/atari/atari/machdep.c	Sat Jun 29 03:22:52 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.179 2019/06/29 03:19:49 tsutsui Exp $	*/
+/*	$NetBSD: machdep.c,v 1.180 2019/06/29 03:22:52 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.179 2019/06/29 03:19:49 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.180 2019/06/29 03:22:52 tsutsui Exp $");
 
 #include "opt_ddb.h"
 #include "opt_compat_netbsd.h"
@@ -70,13 +70,8 @@ __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 
 #include 
 #include 
 #include 
-#if defined(DDB) && defined(__ELF__)
 #include 
-#endif
-
-#undef PS	/* XXX netccitt/pk.h conflict with machine/reg.h? */
 
-#define	MAXMEM	64*1024	/* XXX - from cmap.h */
 #include 
 
 #include 
@@ -163,12 +158,8 @@ consinit(void)
 		extern int end;
 		extern int *esym;
 
-#ifndef __ELF__
-		ksyms_addsyms_elf(*(int *), ((int *)) + 1, esym);
-#else
 		ksyms_addsyms_elf((int)esym - (int) - sizeof(Elf32_Ehdr),
 		(void *), esym);
-#endif
 	}
 #endif
 #if defined (DDB)



CVS commit: src/sys/arch/atari/atari

2019-06-28 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Jun 29 03:19:49 UTC 2019

Modified Files:
src/sys/arch/atari/atari: machdep.c

Log Message:
Fix PR/54325 (use of dangling pointer).


To generate a diff of this commit:
cvs rdiff -u -r1.178 -r1.179 src/sys/arch/atari/atari/machdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/atari/atari/machdep.c
diff -u src/sys/arch/atari/atari/machdep.c:1.178 src/sys/arch/atari/atari/machdep.c:1.179
--- src/sys/arch/atari/atari/machdep.c:1.178	Sat Jun 29 03:10:51 2019
+++ src/sys/arch/atari/atari/machdep.c	Sat Jun 29 03:19:49 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.178 2019/06/29 03:10:51 tsutsui Exp $	*/
+/*	$NetBSD: machdep.c,v 1.179 2019/06/29 03:19:49 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.178 2019/06/29 03:10:51 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.179 2019/06/29 03:19:49 tsutsui Exp $");
 
 #include "opt_ddb.h"
 #include "opt_compat_netbsd.h"
@@ -236,6 +236,8 @@ static void
 identifycpu(void)
 {
 	const char *mach, *mmu, *fpu, *cpu;
+	uint32_t pcr;
+	char cputxt[30];
 
 	switch (machineid & ATARI_ANYMACH) {
 	case ATARI_TT:
@@ -261,17 +263,12 @@ identifycpu(void)
 
 	switch (cputype) {
 	case CPU_68060:
-		{
-			uint32_t	pcr;
-			char		cputxt[30];
-
-			__asm(".word 0x4e7a,0x0808;"
-			"movl %%d0,%0" : "=d"(pcr) : : "d0");
-			snprintf(cputxt, sizeof(cputxt), "68%s060 rev.%d",
-			pcr & 0x1 ? "LC/EC" : "", (pcr >> 8) & 0xff);
-			cpu = cputxt;
-			mmu = "/MMU";
-		}
+		__asm(".word 0x4e7a,0x0808;"
+		"movl %%d0,%0" : "=d"(pcr) : : "d0");
+		snprintf(cputxt, sizeof(cputxt), "68%s060 rev.%d",
+		pcr & 0x1 ? "LC/EC" : "", (pcr >> 8) & 0xff);
+		cpu = cputxt;
+		mmu = "/MMU";
 		break;
 	case CPU_68040:
 		cpu = "m68040";



CVS commit: src/sys/arch/atari/atari

2019-06-28 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Jun 29 03:19:49 UTC 2019

Modified Files:
src/sys/arch/atari/atari: machdep.c

Log Message:
Fix PR/54325 (use of dangling pointer).


To generate a diff of this commit:
cvs rdiff -u -r1.178 -r1.179 src/sys/arch/atari/atari/machdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/atari/atari

2019-06-28 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Jun 29 03:10:51 UTC 2019

Modified Files:
src/sys/arch/atari/atari: machdep.c

Log Message:
TAB/space cleanup.


To generate a diff of this commit:
cvs rdiff -u -r1.177 -r1.178 src/sys/arch/atari/atari/machdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/atari/atari/machdep.c
diff -u src/sys/arch/atari/atari/machdep.c:1.177 src/sys/arch/atari/atari/machdep.c:1.178
--- src/sys/arch/atari/atari/machdep.c:1.177	Wed Mar 26 18:04:33 2014
+++ src/sys/arch/atari/atari/machdep.c	Sat Jun 29 03:10:51 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.177 2014/03/26 18:04:33 christos Exp $	*/
+/*	$NetBSD: machdep.c,v 1.178 2019/06/29 03:10:51 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.177 2014/03/26 18:04:33 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.178 2019/06/29 03:10:51 tsutsui Exp $");
 
 #include "opt_ddb.h"
 #include "opt_compat_netbsd.h"
@@ -172,8 +172,8 @@ consinit(void)
 	}
 #endif
 #if defined (DDB)
-if (boothowto & RB_KDB)
-Debugger();
+	if (boothowto & RB_KDB)
+		Debugger();
 #endif
 }
 
@@ -235,7 +235,7 @@ cpu_startup(void)
 static void
 identifycpu(void)
 {
-   const char *mach, *mmu, *fpu, *cpu;
+	const char *mach, *mmu, *fpu, *cpu;
 
 	switch (machineid & ATARI_ANYMACH) {
 	case ATARI_TT:
@@ -260,7 +260,6 @@ identifycpu(void)
 	fpu = fpu_describe(fputype);
 
 	switch (cputype) {
- 
 	case CPU_68060:
 		{
 			uint32_t	pcr;
@@ -597,7 +596,7 @@ badbaddr(void *addr, int size)
 /*
  * this is a handy package to have asynchronously executed
  * function calls executed at very low interrupt priority.
- * Example for use is keyboard repeat, where the repeat 
+ * Example for use is keyboard repeat, where the repeat
  * handler running at splclock() triggers such a (hardware
  * aided) software interrupt.
  * Note: the installed functions are currently called in a



CVS commit: src/sys/arch/atari/atari

2019-06-28 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Jun 29 03:10:51 UTC 2019

Modified Files:
src/sys/arch/atari/atari: machdep.c

Log Message:
TAB/space cleanup.


To generate a diff of this commit:
cvs rdiff -u -r1.177 -r1.178 src/sys/arch/atari/atari/machdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/hp300/hp300

2019-06-28 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Jun 29 02:41:17 UTC 2019

Modified Files:
src/sys/arch/hp300/hp300: autoconf.c

Log Message:
Handle sti(4) graphics at sgc on HP9000/425t properly.  PR port-hp300/54255

Should be pulled up to netbsd-8.


To generate a diff of this commit:
cvs rdiff -u -r1.105 -r1.106 src/sys/arch/hp300/hp300/autoconf.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/hp300/hp300

2019-06-28 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Jun 29 02:41:17 UTC 2019

Modified Files:
src/sys/arch/hp300/hp300: autoconf.c

Log Message:
Handle sti(4) graphics at sgc on HP9000/425t properly.  PR port-hp300/54255

Should be pulled up to netbsd-8.


To generate a diff of this commit:
cvs rdiff -u -r1.105 -r1.106 src/sys/arch/hp300/hp300/autoconf.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/hp300/hp300/autoconf.c
diff -u src/sys/arch/hp300/hp300/autoconf.c:1.105 src/sys/arch/hp300/hp300/autoconf.c:1.106
--- src/sys/arch/hp300/hp300/autoconf.c:1.105	Sun Apr 20 04:12:54 2014
+++ src/sys/arch/hp300/hp300/autoconf.c	Sat Jun 29 02:41:17 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: autoconf.c,v 1.105 2014/04/20 04:12:54 tsutsui Exp $	*/
+/*	$NetBSD: autoconf.c,v 1.106 2019/06/29 02:41:17 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 2002 The NetBSD Foundation, Inc.
@@ -88,7 +88,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.105 2014/04/20 04:12:54 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.106 2019/06/29 02:41:17 tsutsui Exp $");
 
 #include "dvbox.h"
 #include "gbox.h"
@@ -152,6 +152,7 @@ __KERNEL_RCSID(0, "$NetBSD: autoconf.c,v
 #endif
 
 #if NSTI_SGC > 0
+#include 
 #include 
 #include 
 #endif
@@ -751,6 +752,9 @@ int conscode;
 void *conaddr;
 
 static bool cninit_deferred;
+#if NSTI_SGC > 0
+static int consslot = -1;
+#endif
 
 void
 hp300_cninit(void)
@@ -838,13 +842,18 @@ hp300_cninit(void)
 	machineid == HP_433) {
 		struct bus_space_tag sgc_tag;
 		bus_space_tag_t sgc_bst;
+		u_int slot;
 
 		sgc_bst = _tag;
 		memset(sgc_bst, 0, sizeof(struct bus_space_tag));
 		sgc_bst->bustype = HP300_BUS_SPACE_SGC;
-		if (sti_sgc_cnprobe(sgc_bst, sgc_slottopa(0), 0)) {
-			cninit_deferred = true;
-			goto find_kbd;
+		for (slot = 0; slot < SGC_NSLOTS; slot++) {
+			if (sti_sgc_cnprobe(sgc_bst, sgc_slottopa(slot),
+			slot)) {
+cninit_deferred = true;
+consslot = slot;
+goto find_kbd;
+			}
 		}
 	}
 #endif
@@ -926,8 +935,7 @@ hp300_cninit_deferred(void)
 		sgc_bst = _tag;
 		memset(sgc_bst, 0, sizeof(struct bus_space_tag));
 		sgc_bst->bustype = HP300_BUS_SPACE_SGC;
-		if (sti_sgc_cnprobe(sgc_bst, sgc_slottopa(0), 0))
-			sti_sgc_cnattach(sgc_bst, sgc_slottopa(0), 0);
+		sti_sgc_cnattach(sgc_bst, sgc_slottopa(consslot), consslot);
 	}
 #endif
 }



CVS commit: src/sys/arch

2019-06-28 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Jun 28 15:17:44 UTC 2019

Modified Files:
src/sys/arch/cesfic/include: vmparam.h
src/sys/arch/hp300/include: vmparam.h
src/sys/arch/luna68k/include: vmparam.h
src/sys/arch/mac68k/include: vmparam.h
src/sys/arch/mvme68k/include: vmparam.h
src/sys/arch/news68k/include: vmparam.h
src/sys/arch/next68k/include: vmparam.h
src/sys/arch/x68k/include: vmparam.h

Log Message:
Fix lingering page size comments.

Pointed out by christos@ on port-m68k@:
http://mail-index.netbsd.org/port-m68k/2019/06/06/msg000726.html

XXX: we also need MAX_PAGE_SIZE in somewhere for newer jemalloc?


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/cesfic/include/vmparam.h
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/hp300/include/vmparam.h
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/luna68k/include/vmparam.h
cvs rdiff -u -r1.44 -r1.45 src/sys/arch/mac68k/include/vmparam.h
cvs rdiff -u -r1.36 -r1.37 src/sys/arch/mvme68k/include/vmparam.h
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/news68k/include/vmparam.h
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/next68k/include/vmparam.h
cvs rdiff -u -r1.38 -r1.39 src/sys/arch/x68k/include/vmparam.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch

2019-06-28 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Jun 28 15:17:44 UTC 2019

Modified Files:
src/sys/arch/cesfic/include: vmparam.h
src/sys/arch/hp300/include: vmparam.h
src/sys/arch/luna68k/include: vmparam.h
src/sys/arch/mac68k/include: vmparam.h
src/sys/arch/mvme68k/include: vmparam.h
src/sys/arch/news68k/include: vmparam.h
src/sys/arch/next68k/include: vmparam.h
src/sys/arch/x68k/include: vmparam.h

Log Message:
Fix lingering page size comments.

Pointed out by christos@ on port-m68k@:
http://mail-index.netbsd.org/port-m68k/2019/06/06/msg000726.html

XXX: we also need MAX_PAGE_SIZE in somewhere for newer jemalloc?


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/cesfic/include/vmparam.h
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/hp300/include/vmparam.h
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/luna68k/include/vmparam.h
cvs rdiff -u -r1.44 -r1.45 src/sys/arch/mac68k/include/vmparam.h
cvs rdiff -u -r1.36 -r1.37 src/sys/arch/mvme68k/include/vmparam.h
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/news68k/include/vmparam.h
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/next68k/include/vmparam.h
cvs rdiff -u -r1.38 -r1.39 src/sys/arch/x68k/include/vmparam.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/cesfic/include/vmparam.h
diff -u src/sys/arch/cesfic/include/vmparam.h:1.17 src/sys/arch/cesfic/include/vmparam.h:1.18
--- src/sys/arch/cesfic/include/vmparam.h:1.17	Thu Feb  2 21:53:54 2017
+++ src/sys/arch/cesfic/include/vmparam.h	Fri Jun 28 15:17:43 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: vmparam.h,v 1.17 2017/02/02 21:53:54 rin Exp $	*/
+/*	$NetBSD: vmparam.h,v 1.18 2019/06/28 15:17:43 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -46,8 +46,9 @@
  */
 
 /*
- * We use 4K pages on the cesfic.  Override the PAGE_* definitions
- * to be compile-time constants.
+ * hp300 pmap derived m68k ports can use 4K or 8K pages.
+ * The page size is specified by PGSHIFT in .
+ * Override the PAGE_* definitions to be compile-time constants.
  */
 #define	PAGE_SHIFT	PGSHIFT
 #define	PAGE_SIZE	(1 << PAGE_SHIFT)

Index: src/sys/arch/hp300/include/vmparam.h
diff -u src/sys/arch/hp300/include/vmparam.h:1.39 src/sys/arch/hp300/include/vmparam.h:1.40
--- src/sys/arch/hp300/include/vmparam.h:1.39	Thu Feb  2 21:53:54 2017
+++ src/sys/arch/hp300/include/vmparam.h	Fri Jun 28 15:17:43 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: vmparam.h,v 1.39 2017/02/02 21:53:54 rin Exp $	*/
+/*	$NetBSD: vmparam.h,v 1.40 2019/06/28 15:17:43 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -46,8 +46,10 @@
  */
 
 /*
- * We use 4K pages on the hp300.  Override the PAGE_* definitions
- * to be compile-time constants.
+ * hp300 pmap derived m68k ports can use 4K or 8K pages.
+ * (except HPMMU machines)
+ * The page size is specified by PGSHIFT in .
+ * Override the PAGE_* definitions to be compile-time constants.
  */
 #define	PAGE_SHIFT	PGSHIFT
 #define	PAGE_SIZE	(1 << PAGE_SHIFT)

Index: src/sys/arch/luna68k/include/vmparam.h
diff -u src/sys/arch/luna68k/include/vmparam.h:1.21 src/sys/arch/luna68k/include/vmparam.h:1.22
--- src/sys/arch/luna68k/include/vmparam.h:1.21	Thu Feb  2 21:53:54 2017
+++ src/sys/arch/luna68k/include/vmparam.h	Fri Jun 28 15:17:43 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: vmparam.h,v 1.21 2017/02/02 21:53:54 rin Exp $	*/
+/*	$NetBSD: vmparam.h,v 1.22 2019/06/28 15:17:43 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -42,8 +42,9 @@
 #define _MACHINE_VMPARAM_H_
 
 /*
- * We use 4K pages on the luna68k.  Override the PAGE_* definitions
- * to be compile-time constants.
+ * hp300 pmap derived m68k ports can use 4K or 8K pages.
+ * The page size is specified by PGSHIFT in .
+ * Override the PAGE_* definitions to be compile-time constants.
  */
 #define	PAGE_SHIFT	PGSHIFT
 #define	PAGE_SIZE	(1 << PAGE_SHIFT)

Index: src/sys/arch/mac68k/include/vmparam.h
diff -u src/sys/arch/mac68k/include/vmparam.h:1.44 src/sys/arch/mac68k/include/vmparam.h:1.45
--- src/sys/arch/mac68k/include/vmparam.h:1.44	Thu Feb  2 21:53:54 2017
+++ src/sys/arch/mac68k/include/vmparam.h	Fri Jun 28 15:17:43 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: vmparam.h,v 1.44 2017/02/02 21:53:54 rin Exp $	*/
+/*	$NetBSD: vmparam.h,v 1.45 2019/06/28 15:17:43 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -81,8 +81,9 @@
  */
 
 /*
- * We use 4K pages on the mac68k.  Override the PAGE_* definitions
- * to be compile-time constants.
+ * hp300 pmap derived m68k ports can use 4K or 8K pages.
+ * The page size is specified by PGSHIFT in .
+ * Override the PAGE_* definitions to be compile-time constants.
  */
 #define	PAGE_SHIFT	PGSHIFT
 #define	PAGE_SIZE	(1 << PAGE_SHIFT)

Index: src/sys/arch/mvme68k/include/vmparam.h
diff -u src/sys/arch/mvme68k/include/vmparam.h:1.36 src/sys/arch/mvme68k/include/vmparam.h:1.37
--- 

CVS commit: src/sys/dev/ic

2019-06-23 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Jun 23 06:33:17 UTC 2019

Modified Files:
src/sys/dev/ic: mvsata.c

Log Message:
Add a missing newline in an error message.  Noticed in PR/54205


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/sys/dev/ic/mvsata.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/ic/mvsata.c
diff -u src/sys/dev/ic/mvsata.c:1.47 src/sys/dev/ic/mvsata.c:1.48
--- src/sys/dev/ic/mvsata.c:1.47	Sun Jun 23 06:29:22 2019
+++ src/sys/dev/ic/mvsata.c	Sun Jun 23 06:33:17 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: mvsata.c,v 1.47 2019/06/23 06:29:22 tsutsui Exp $	*/
+/*	$NetBSD: mvsata.c,v 1.48 2019/06/23 06:33:17 tsutsui Exp $	*/
 /*
  * Copyright (c) 2008 KIYOHARA Takashi
  * All rights reserved.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: mvsata.c,v 1.47 2019/06/23 06:29:22 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mvsata.c,v 1.48 2019/06/23 06:33:17 tsutsui Exp $");
 
 #include "opt_mvsata.h"
 
@@ -3283,7 +3283,7 @@ mvsata_dma_bufload(struct mvsata_port *m
 	rv = bus_dmamap_load(mvport->port_dmat, data_dmamap, databuf, datalen,
 	NULL, BUS_DMA_NOWAIT | lop);
 	if (rv) {
-		aprint_error("%s:%d:%d: buffer load failed: error=%d",
+		aprint_error("%s:%d:%d: buffer load failed: error=%d\n",
 		device_xname(MVSATA_DEV2(mvport)), mvport->port_hc->hc,
 		mvport->port, rv);
 		return rv;



CVS commit: src/sys/dev/ic

2019-06-23 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Jun 23 06:33:17 UTC 2019

Modified Files:
src/sys/dev/ic: mvsata.c

Log Message:
Add a missing newline in an error message.  Noticed in PR/54205


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/sys/dev/ic/mvsata.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/ic

2019-06-23 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Jun 23 06:29:22 UTC 2019

Modified Files:
src/sys/dev/ic: mvsata.c

Log Message:
Fix "mvsata:0:0:1: buffer load failed: error=27" failure.  PR/54205

Ok'ed by jdolecek@.
Should be pulled up to netbsd-8.


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/sys/dev/ic/mvsata.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/ic/mvsata.c
diff -u src/sys/dev/ic/mvsata.c:1.46 src/sys/dev/ic/mvsata.c:1.47
--- src/sys/dev/ic/mvsata.c:1.46	Mon Nov 12 20:54:03 2018
+++ src/sys/dev/ic/mvsata.c	Sun Jun 23 06:29:22 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: mvsata.c,v 1.46 2018/11/12 20:54:03 jdolecek Exp $	*/
+/*	$NetBSD: mvsata.c,v 1.47 2019/06/23 06:29:22 tsutsui Exp $	*/
 /*
  * Copyright (c) 2008 KIYOHARA Takashi
  * All rights reserved.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: mvsata.c,v 1.46 2018/11/12 20:54:03 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mvsata.c,v 1.47 2019/06/23 06:29:22 tsutsui Exp $");
 
 #include "opt_mvsata.h"
 
@@ -113,7 +113,8 @@ int	mvsata_debug = 0;
 	   sending a cmd */
 #define ATAPI_MODE_DELAY	1000	/* 1s, timeout for SET_FEATURE cmds */
 
-#define MVSATA_EPRD_MAX_SIZE	(sizeof(struct eprd) * (MAXPHYS / PAGE_SIZE))
+#define MVSATA_MAX_SEGS		(MAXPHYS / PAGE_SIZE + 1)
+#define MVSATA_EPRD_MAX_SIZE	(sizeof(struct eprd) * MVSATA_MAX_SEGS)
 
 
 static void mvsata_probe_drive(struct ata_channel *);
@@ -3110,7 +3111,7 @@ mvsata_port_init(struct mvsata_hc *mvhc,
 	}
 	for (i = 0; i < MVSATA_EDMAQ_LEN; i++) {
 		rv = bus_dmamap_create(mvport->port_dmat, MAXPHYS,
-		MAXPHYS / PAGE_SIZE, MAXPHYS, 0, BUS_DMA_NOWAIT,
+		MVSATA_MAX_SEGS, MAXPHYS, 0, BUS_DMA_NOWAIT,
 		>port_reqtbl[i].data_dmamap);
 		if (rv != 0) {
 			aprint_error("%s:%d:%d:"



CVS commit: src/sys/dev/ic

2019-06-23 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Jun 23 06:29:22 UTC 2019

Modified Files:
src/sys/dev/ic: mvsata.c

Log Message:
Fix "mvsata:0:0:1: buffer load failed: error=27" failure.  PR/54205

Ok'ed by jdolecek@.
Should be pulled up to netbsd-8.


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/sys/dev/ic/mvsata.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



Re: CVS commit: src

2019-06-07 Thread Izumi Tsutsui
> Module Name:  src
> Committed By: sborrill
> Date: Fri Jun  7 15:49:20 UTC 2019
> 
> Modified Files:
>   src: build.sh
> 
> Log Message:
> Fix long-term broken pattern match when determining if uname -p output is
> valid. [^a-z] syntax isn't valid.

Does this fix PR toolchain/54100?
http://gnats.netbsd.org/54100

---
Izumi Tsutsui


CVS commit: src/sys/arch/luna68k/stand/boot

2019-05-24 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri May 24 15:52:36 UTC 2019

Modified Files:
src/sys/arch/luna68k/stand/boot: Makefile

Log Message:
LUNA's firmware requires OMAGIC a.out.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/luna68k/stand/boot/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/luna68k/stand/boot/Makefile
diff -u src/sys/arch/luna68k/stand/boot/Makefile:1.16 src/sys/arch/luna68k/stand/boot/Makefile:1.17
--- src/sys/arch/luna68k/stand/boot/Makefile:1.16	Wed Jan  2 00:50:02 2019
+++ src/sys/arch/luna68k/stand/boot/Makefile	Fri May 24 15:52:35 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.16 2019/01/02 00:50:02 christos Exp $
+#	$NetBSD: Makefile,v 1.17 2019/05/24 15:52:35 tsutsui Exp $
 #	@(#)Makefile	8.2 (Berkeley) 8/15/93
 
 NOMAN= # defined
@@ -32,6 +32,8 @@ TEXTADDR=	70
 LDSCRIPT=	${.CURDIR}/boot.ldscript
 LINKFORMAT=	-static -N -Ttext ${TEXTADDR} -T ${LDSCRIPT}
 
+ELF2AOUT_OPTS=	-O	# LUNA's firmware requires OMAGIC a.out
+
 SRCS=	locore.S
 SRCS+=	init_main.c autoconf.c
 SRCS+=	trap.c
@@ -80,7 +82,7 @@ LIBS=	${SALIB} ${ZLIB} ${KERNLIB}
 ${PROG}: ${LDSCRIPT} ${OBJS} ${LIBS}
 	${_MKTARGET_LINK}
 	${LD} ${LINKFORMAT} -x -o ${PROG}.elf ${OBJS} ${LIBS}
-	${M68K_ELF2AOUT} ${PROG}.elf ${PROG}.aout
+	${M68K_ELF2AOUT} ${ELF2AOUT_OPTS} ${PROG}.elf ${PROG}.aout
 	mv ${PROG}.aout ${PROG}
 
 CLEANFILES+=	${PROG}.aout ${PROG}.elf



CVS commit: src/sys/arch/luna68k/stand/boot

2019-05-24 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri May 24 15:52:36 UTC 2019

Modified Files:
src/sys/arch/luna68k/stand/boot: Makefile

Log Message:
LUNA's firmware requires OMAGIC a.out.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/luna68k/stand/boot/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



Re: CVS commit: src/usr.bin/elf2aout

2019-05-17 Thread Izumi Tsutsui
> >> Modified Files:
> >>src/usr.bin/elf2aout: elf2aout.c
> >>
> >> Log Message:
> >> A couple of fixes so that NetBSD/cats builds (on linux), works, and
> >> produces a symbol table that is readable (by 4.4BSD nm(1) at least)
> >>
> >> - Change from OMAGIC to ZMAGIC
> > Is it necessary for cats?
> Yes. The cyclone firmware requires ZMAGIC.
> > (Maybe I should check if luna68k's firmware recognize ZMAGIC)
> 
> 
> Please do.

It turns out LUNA's firmware does not recognize ZMAGIC.
(it complains "file not bootable" for ZMAGIC)

Can we have options to specify OMAGIC/ZMAGIC as ld(1)?

Thanks,
---
Izumi Tsutsui


Re: CVS commit: src/usr.bin/elf2aout

2019-04-27 Thread Izumi Tsutsui
> Module Name:  src
> Committed By: skrll
> Date: Fri Apr 26 07:35:21 UTC 2019
> 
> Modified Files:
>   src/usr.bin/elf2aout: elf2aout.c
> 
> Log Message:
> A couple of fixes so that NetBSD/cats builds (on linux), works, and
> produces a symbol table that is readable (by 4.4BSD nm(1) at least)
> 
> - Change from OMAGIC to ZMAGIC

Is it necessary for cats?
(Maybe I should check if luna68k's firmware recognize ZMAGIC)

---
Izumi Tsutsui


Re: CVS import: xsrc/external/mit/xorg-server/dist

2019-01-01 Thread Izumi Tsutsui
mrg@ wrote:

> Log Message:
> initial import of xorg-server-1.20.3

Is there some summary of API changes between 1.18 and 1.20?

I'm afraid this update also affects X68k server
in xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k/
as the previous update  (I'll also changes against Xnest).

Thanks,

---
Izumi Tsutsui


Re: CVS commit: src/sys/conf

2019-01-01 Thread Izumi Tsutsui
> Module Name:  src
> Committed By: jnemeth
> Date: Tue Jan  1 01:52:40 UTC 2019
> 
> Modified Files:
>   src/sys/conf: copyright
> 
> Log Message:
> Welcome to 2019!

Could you please send pullup requests for netbsd-7 and netbsd-8?

Thanks,

---
Izumi Tsutsui


Re: CVS commit: src/sys/arch/macppc/stand/ofwboot

2018-11-16 Thread Izumi Tsutsui
> Module Name:  src
> Committed By: tsutsui
> Date: Fri Nov 16 14:58:54 UTC 2018
> 
> Modified Files:
>   src/sys/arch/macppc/stand/ofwboot: ofdev.c version
> 
> Log Message:
> Fix boot failure from installation floppies.  PR port-macppc/53103

Ugh, this should be PR port-macppc/53727

---
Izumi Tsutsui


Re: CVS commit: src/sbin/mount_cd9660

2018-06-29 Thread Izumi Tsutsui
> Modified Files:
>   src/sbin/mount_cd9660: mount_cd9660.8
> 
> Log Message:
> Note vnconfig(8) may be of interest, especially when looking to mount an iso 
> via
> loopback.

Nowadays it should be vndconfig(8)?
 http://netbsd.gw.com/cgi-bin/man-cgi?vnconfig++NetBSD-current

---
Izumi Tsutsui


Re: CVS commit: src/sys

2018-02-22 Thread Izumi Tsutsui
mrg@ wrote:

> Module Name:  src
> Committed By: mrg
> Date: Thu Feb 22 07:30:43 UTC 2018
> 
> Modified Files:
>   src/sys/arch/alpha/conf: files.alpha
>   src/sys/conf: files
> 
> Log Message:
> move "define tcbus {}" into files.alpha.  it isn't wanted for general
> ports, and generates an unused symbol for pmax.  with this both alpha
> and pmax kernel work with gcc 5 and 6.

This reminds me of this problem:
 http://mail-index.netbsd.org/source-changes/2011/06/04/msg022854.html

>> XXX: alpha/tc/tcasic.c calls tcattach() via config_found(9), but
>> XXX: pmax/tc/tcbus.c and vax/vsa/tc_vsbus.c calls tcattach() directly.
>> XXX: It looks horrible...

---
Izumi Tsutsui


Re: CVS commit: src

2017-08-29 Thread Izumi Tsutsui
> Module Name:  src
> Committed By: mrg
> Date: Tue Aug 29 07:53:54 UTC 2017
> 
> Modified Files:
>   src/distrib/sets/lists/xbase: mi
>   src/etc/mtree: NetBSD.dist.Xorg
>   src/external/mit/xorg/lib/xkeyboard-config/geometry: Makefile
>   src/external/mit/xorg/lib/xkeyboard-config/symbols: Makefile
> 
> Log Message:
> update for xkeyboard-config 2.21.
> prepare for libdrm data files.

src/external/mit/xorg/lib/xkeyboard-config/rules/base etc.
should also be regen (as Makefile says)?

---
Izumi Tsutsui


Re: CVS commit: src/etc/etc.next68k

2017-07-07 Thread Izumi Tsutsui
> | The PR says:
> | > This information should be fixed to reflect reality, or 
> etc/etc.next68k/MAKEDEV.conf should build tty[ab] as done on e.g. sparc.
> | 
> | What makes you choose the latter?
> 
> That every arch except alpha uses ttya and ttyb for zstty?

In which file? zs(4) man page?

---
Izumi Tsutsui


Re: CVS commit: src/etc/etc.next68k

2017-07-07 Thread Izumi Tsutsui
The PR says:
> This information should be fixed to reflect reality, or 
> etc/etc.next68k/MAKEDEV.conf should build tty[ab] as done on e.g. sparc.

What makes you choose the latter?

---
Izumi Tsutsui


Re: CVS commit: src/etc/etc.next68k

2017-07-07 Thread Izumi Tsutsui
> Module Name:  src
> Committed By: christos
> Date: Fri Jul  7 23:48:34 UTC 2017
> 
> Modified Files:
>   src/etc/etc.next68k: MAKEDEV.conf
> 
> Log Message:
> PR/52377: Miod Vallat: Provide links to ttya and ttyb as mentioned in zs(4)

IMO man page should be updated to mention "ttyZ[01]",
as MI src/etc/MAKEDEV.tmpl does.

tty[ab] were derived from sun3 and sparc, which followed SunOS ones.

Other ports used tty0[01] etc. but IIRC it caused conflicts with tty0?
of com(4) on ports which has both zs(4) and com(4) when MI MAKEDEV.tmpl
was introduced.  Then there was discussion to use ttyC? for com(4) and
ttyZ? for zs(4) if there was no histrical restrictions.

---
Izumi Tsutsui


Re: CVS commit: src/distrib/dreamcast/ramdisk

2016-09-18 Thread Izumi Tsutsui
christos@ wrote:

> On Sep 18,  8:12pm, a...@absd.org (David Brownlee) wrote:
> -- Subject: Re: CVS commit: src/distrib/dreamcast/ramdisk
> 
> | Last I checked dmesg was smaller than options KERNFS (that would have
> | been on an m68k port tho' :)
> 
> I am not sure; this is how other ports do it.

Well, I (and other guys) have replaced most use of
KERNFS + mount_kernfs(8) with dmesg(8) >10 years ago...
(after dmesg(8) was changed to use sysctl instead of kvm)

Anyway, it's much better to file PRs for tier-II ports,
rather than put untested changes without announcements,
as I asked you every time.

---
Izumi Tsutsui


Re: CVS commit: src/distrib/dreamcast/ramdisk

2016-09-18 Thread Izumi Tsutsui
christos@ wrote:

> | - dmesg(8) is so useful for everyone
> | - why drop swapctl(8) but keep disklabel(8)?
> |   (both are useful for me for wd support though)
> 
> Don't we have kernfs and cat /kern/msgbuf?

It won't work without mount_kernfs(8) (and /kern dir)
in root ramdisk.

Anyway, dreamcast doesn't have sysinst so simple commands
are better for new users and demonstrations.

---
Izumi Tsutsui


Re: CVS commit: src/distrib/atari/floppies

2016-09-18 Thread Izumi Tsutsui
> Module Name:  src
> Committed By: christos
> Date: Sun Sep 18 16:36:02 UTC 2016
> 
> Modified Files:
>   src/distrib/atari/floppies/install: list
>   src/distrib/atari/floppies/prepare: list
> 
> Log Message:
> remove more stuff.

src/distrib/atari/floppies/prepare/install.sh requires expr and pwd.

---
Izumi Tsutsui


Re: CVS commit: src/distrib/dreamcast/ramdisk

2016-09-18 Thread Izumi Tsutsui
christos@ wrote:

> Module Name:  src
> Committed By: christos
> Date: Sun Sep 18 15:38:05 UTC 2016
> 
> Modified Files:
>   src/distrib/dreamcast/ramdisk: list
> 
> Log Message:
> kill some useless programs (it is not like the dreamcast has a tape drive)

- dmesg(8) is so useful for everyone
- why drop swapctl(8) but keep disklabel(8)?
  (both are useful for me for wd support though)

---
Izumi Tsutsui


Re: CVS commit: src/sys/arch/mips/mips

2016-06-30 Thread Izumi Tsutsui
skrll@ wrote:

> > (i.e. reverting removed lines is not "fix" but workaround).
> 
> Not sure what you mean here, but as bad cache aliases can happen my 
> change is valid.

Well, I have been waitng proper description about the new UVM design
for VIPT cache systems (i.e. what's the "right" thing) for >5 years,
as mentioned in the PR...

If it doesn't work as expected, I think it would be better to remove
all useless COLORMATCH code.

---
Izumi Tsutsui


Re: CVS commit: src/sys/arch/mips/mips

2016-06-30 Thread Izumi Tsutsui
skrll@ wrote:

> Module Name:  src
> Committed By: skrll
> Date: Thu Jun 30 12:57:35 UTC 2016
> 
> Modified Files:
>   src/sys/arch/mips/mips: pmap.c
> 
> Log Message:
> Fix MIPS3_NO_PV_UNCACHED alias handling by looping through the pv_list
> looking for bad aliases and removing the bad entries.  That is, revert
> to the code before the matt-mips64 merge.
 :
> Fixes the following two PRs
 :

Hmm.

This means current implementation of UVM_KMF_COLORMATCH
and UVM_FLAG_COLORMATCH is completely broken
(i.e. reverting removed lines is not "fix" but workaround).

See PR/45746

---
Izumi Tsutsui


Re: CVS commit: src/distrib/cdrom/macppc_installboot

2016-03-11 Thread Izumi Tsutsui
christos@ wrote:

> There is one more spurious fp++ I removed, can you please take a look?

This one?
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/fs/cd9660/cd9660_util.c#rev1.11

> | Note it looks the following awful include no longer necessary.
> | > #include "installboot.h"
> | 
> | (I don't remember why I added it though)
> 
> I will take a look!

Probably just for a prototype declaration of isofncmp().

---
Izumi Tsutsui


Re: CVS commit: src/distrib/cdrom/macppc_installboot

2016-03-09 Thread Izumi Tsutsui
christos@ wrote:

> On Mar 9, 10:22pm, tsut...@ceres.dti.ne.jp (Izumi Tsutsui) wrote:
> -- Subject: Re: CVS commit: src/distrib/cdrom/macppc_installboot
> 
> | Could you please rather sync it with the original kernel part source?
> | http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/fs/cd9660/cd9660_util.c#rev1.7
> 
> I merged them instead.

Thanks.

Note it looks the following awful include no longer necessary.
> #include "installboot.h"

(I don't remember why I added it though)
---
Izumi Tsutsui


Re: CVS commit: src/distrib/cdrom/macppc_installboot

2016-03-09 Thread Izumi Tsutsui
> Module Name:  src
> Committed By: christos
> Date: Tue Mar  8 20:16:56 UTC 2016
> 
> Modified Files:
>   src/distrib/cdrom/macppc_installboot: cd9660_util.c
> 
> Log Message:
> PR/50915: David Binderman: Fix infinite loop and printf format.

Could you please rather sync it with the original kernel part source?
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/fs/cd9660/cd9660_util.c#rev1.7

---
Izumi Tsutsui


Re: CVS commit: src/sys/arch/amd64/conf

2016-01-09 Thread Izumi Tsutsui
christos@ wrote:

> Modified Files:
>   src/sys/arch/amd64/conf: GENERIC
> 
> Log Message:
> PR/50636: Ryo ONODERA: Add scsibus to vioscsi

>> +#mos*   at uhub? port ? # Moschip MCS7730/MCS7830/MCS7832 based 
>> adapters

What's this one?

>> +scsibus* at vioscsi?

Why the existing common "scsibus* at scsi" doesn't work for vioscsi?

---
Izumi Tsutsui


Re: CVS commit: src/sys/arch/sun68k/stand/netboot

2015-07-29 Thread Izumi Tsutsui
 A good portmaster would be watching his ports and keep them building
 and running.

I already said:
 http://mail-index.netbsd.org/source-changes-d/2015/04/26/msg007717.html

 |  Having the build broken for weeks is not acceptable. I've added the PR.
 | 
 | You always forget your own words.
 | http://mail-index.netbsd.org/source-changes-d/2015/04/26/msg007718.html
 
 I don't forget; it is even unclear that the fix is breaking the bootblocks.

It actually broke netboot.

 You are keeping the build broken out of spite at this point. Please
 keep your personal feelings out of this. Having the build work and
 having a PR to remind us to fix the build is the best solution. What's
 the reason to keep the build broken? So that it bitrots more in other
 places?

I'm not asking keep build broken.

I'm asking file PR if you notice any problem, before commiting kludge.
What's wrong?

I also asked for build but no answer.
http://mail-index.netbsd.org/source-changes-d/2015/04/26/msg007726.html

---
Izumi Tsutsui


Re: CVS commit: src/sys/arch/sun68k/stand/netboot

2015-07-29 Thread Izumi Tsutsui
christos@ wrote:

 Module Name:  src
 Committed By: christos
 Date: Wed Jul 29 08:52:22 UTC 2015
 
 Modified Files:
   src/sys/arch/sun68k/stand/netboot: conf.c
 
 Log Message:
 XXX: add missing symbols.

Please don't put kludge to hide problem. File a PR instead.

---
Izumi Tsutsui


Re: CVS commit: src/sys/arch/sun68k/stand/netboot

2015-07-29 Thread Izumi Tsutsui
christos@ wrote:

 | Please don't put kludge to hide problem. File a PR instead.
 
 Having the build broken for weeks is not acceptable. I've added the PR.

You always forget your own words.
http://mail-index.netbsd.org/source-changes-d/2015/04/26/msg007718.html

---
Izumi Tsutsui


  1   2   3   4   5   >