Re: CVS commit: src/sys/sys

2012-03-17 Thread Ryo ONODERA
Hi,

From: Christos Zoulas chris...@netbsd.org, Date: Wed, 14 Mar 2012 20:09:08 
-0400

 Module Name:  src
 Committed By: christos
 Date: Thu Mar 15 00:09:08 UTC 2012
 
 Modified Files:
   src/sys/sys: cdefs.h
 
 Log Message:
 - this file is still used from assembly. protect inlines against __ASSEMBLER__
 - rename __zero - __zeroll, __negative - __negative_p
 
 
 To generate a diff of this commit:
 cvs rdiff -u -r1.93 -r1.94 src/sys/sys/cdefs.h
 
 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

It seems that this change cause PR pkg/46206.
Can anyone investigate this?

-- 
Ryo ONODERA // ryo...@yk.rim.or.jp
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3




Re: CVS commit: src/lib/libm/src

2013-01-28 Thread Ryo ONODERA
Hi,

From: Matt Thomas m...@netbsd.org, Date: Mon, 28 Jan 2013 06:34:10 +

 Module Name:  src
 Committed By: matt
 Date: Mon Jan 28 06:34:09 UTC 2013
 
 Modified Files:
   src/lib/libm/src: s_scalbn.c s_scalbnf.c s_scalbnl.c
 
 Log Message:
 Deal with _LP64 properly.
 
 
 To generate a diff of this commit:
 cvs rdiff -u -r1.15 -r1.16 src/lib/libm/src/s_scalbn.c
 cvs rdiff -u -r1.9 -r1.10 src/lib/libm/src/s_scalbnf.c
 cvs rdiff -u -r1.1 -r1.2 src/lib/libm/src/s_scalbnl.c
 
 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.
 

This commit lacks ;, and breaks build.

Index: s_scalbnl.c
===
RCS file: /cvsroot/src/lib/libm/src/s_scalbnl.c,v
retrieving revision 1.2
diff -u -r1.2 s_scalbnl.c
--- s_scalbnl.c 28 Jan 2013 06:34:09 -  1.2
+++ s_scalbnl.c 28 Jan 2013 10:55:45 -
@@ -61,7 +61,7 @@
 long double
 scalbnl(long double x, int n)
 {
-   return scalblnl(x, n)
+   return scalblnl(x, n);
 }
 #endif
 

--
Ryo ONODERA // ryo...@yk.rim.or.jp
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


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

2013-07-10 Thread Ryo ONODERA
From: chris...@astron.com (Christos Zoulas), Date: Wed, 10 Jul 2013 13:08:49 
+ (UTC)

 In article krbu04$2j1$1...@ger.gmane.org,
 Christos Zoulas chris...@astron.com wrote:
Module Name: src
Committed By:sjg
Date:Sat Jul  6 18:19:17 UTC 2013

Modified Files:
 src/usr.bin/make: main.c var.c

Log Message:
If using gmake's MAKELEVEL; use it the same way

Now you put it back the way it was before which is wrong. Gmake does not
behave this way. Before your change the following Makefile printed:
 
 This is still broken. Renaming the variable is not a fix either.
 Consider the case where we switched from bmake to gmake as the
 pkgsrc wrapper. The packages that depend on $MAKELEVEL being 0 or
 unset would still break. So the proper fix for the 2 packages that
 broke is to make pkgsrc unset MAKELEVEL before invoking gmake.
 
 So to fix those:
 - revert the changes so that MAKELEVEL again works the same way as in gmake.
 - add glue to invoke gmake with MAKELEVEL unset.

Hi,

I feel second idea is not so good.
Because pkgsrc creates symlink, work/.tools/bin/make, for our make and gmake.
So with gmake in USE_TOOLS, it is symlink for /usr/pkg/bin/gmake,
and without gmake in USE_TOOLS, it is for /usr/bin/make.
I cannot distinguish them with filename.

Thank you.

--
Ryo ONODERA // ryo...@yk.rim.or.jp
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


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

2013-07-10 Thread Ryo ONODERA
From: chris...@astron.com (Christos Zoulas), Date: Wed, 10 Jul 2013 15:08:39 
+ (UTC)

 In article 20130710.232445.202823964487691297.ryo...@yk.rim.or.jp,
 Ryo ONODERA  ryo...@yk.rim.or.jp wrote:
From: chris...@astron.com (Christos Zoulas), Date: Wed, 10 Jul 2013
13:08:49 + (UTC)

 In article krbu04$2j1$1...@ger.gmane.org,
 Christos Zoulas chris...@astron.com wrote:
Module Name:   src
Committed By:  sjg
Date:  Sat Jul  6 18:19:17 UTC 2013

Modified Files:
   src/usr.bin/make: main.c var.c

Log Message:
If using gmake's MAKELEVEL; use it the same way

Now you put it back the way it was before which is wrong. Gmake does not
behave this way. Before your change the following Makefile printed:
 
 This is still broken. Renaming the variable is not a fix either.
 Consider the case where we switched from bmake to gmake as the
 pkgsrc wrapper. The packages that depend on $MAKELEVEL being 0 or
 unset would still break. So the proper fix for the 2 packages that
 broke is to make pkgsrc unset MAKELEVEL before invoking gmake.
 
 So to fix those:
 - revert the changes so that MAKELEVEL again works the same way as in gmake.
 - add glue to invoke gmake with MAKELEVEL unset.

Hi,

I feel second idea is not so good.
Because pkgsrc creates symlink, work/.tools/bin/make, for our make and gmake.
So with gmake in USE_TOOLS, it is symlink for /usr/pkg/bin/gmake,
and without gmake in USE_TOOLS, it is for /usr/bin/make.
I cannot distinguish them with filename.
 
 It is simple:
 
 1. You unset it for all (easiest+safest)
 2. You create a shell script instead of a symlink that does:
 unset MAKELEVEL  exec /usr/pkg/bin/gmake $@

Thanks for your explanation.

In pkgsrc case, shell script may work.
Outside pkgsrc, some program may be broken by this make(1) change.
I vote to revert the changes so that MAKELEVEL again works
the same way as in gmake.

Thank you.

--
Ryo ONODERA // ryo...@yk.rim.or.jp
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


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

2013-07-16 Thread Ryo ONODERA
Hi,

From: Christos Zoulas chris...@netbsd.org, Date: Tue, 16 Jul 2013 10:00:53 
-0400

 Module Name:  src
 Committed By: christos
 Date: Tue Jul 16 14:00:53 UTC 2013
 
 Modified Files:
   src/usr.bin/make: main.c make.1 var.c
 
 Log Message:
 More gmake compatibility:
 1. add -w flag to print Entering and Leaving directory name the the beginning
and the end of processing.
 2. export MAKELEVEL=$((MAKELEVEL + 1)) only in the child environment.
 3. when printing error messages, prefix them with the program name 
 [$MAKELEVEL]
for $MAKELEVEL  0
 4. if $MAKEFLAGS consists only of letters assume it is a set of flags (as
allowed by posix), convert them to -f -l -a -g -s, so that they get parsed
properly.
 With those fixes gmake - bmake - gmake - bmake etc. works as expected.
 
 
 To generate a diff of this commit:
 cvs rdiff -u -r1.219 -r1.220 src/usr.bin/make/main.c
 cvs rdiff -u -r1.218 -r1.219 src/usr.bin/make/make.1
 cvs rdiff -u -r1.181 -r1.182 src/usr.bin/make/var.c
 
 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.
 

With this change, I have gotten following errors.
I think -lutil is needed.

cc  -O -DDEFSHELL_CUSTOM=/bin/sh -DHAVE_SETENV=1 -DHAVE_STRDUP=1 
-DHAVE_STRERROR=1 -DHAVE_STRFTIME=1 -DHAVE_VSNPRINTF=1  -c 
/usr/src/tools/make/../../usr.bin/make/lst.lib/lstReplace.c
cc  -O -DDEFSHELL_CUSTOM=/bin/sh -DHAVE_SETENV=1 -DHAVE_STRDUP=1 
-DHAVE_STRERROR=1 -DHAVE_STRFTIME=1 -DHAVE_VSNPRINTF=1  -c 
/usr/src/tools/make/../../usr.bin/make/lst.lib/lstSucc.c
cc  -O -o nbmake *.o
main.o: In function `main':
main.c:(.text+0x2362): undefined reference to `estrdup'
main.c:(.text+0x23ca): undefined reference to `estrdup'
main.c:(.text+0x2d6d): undefined reference to `emalloc'

ERROR: Build of nbmake failed
*** BUILD ABORTED ***
r

--
Ryo ONODERA // ryo...@yk.rim.or.jp
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


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

2013-07-16 Thread Ryo ONODERA
From: chris...@zoulas.com (Christos Zoulas), Date: Tue, 16 Jul 2013 10:23:04 
-0400

 On Jul 16, 11:20pm, ryo...@yk.rim.or.jp (Ryo ONODERA) wrote:
 -- Subject: Re: CVS commit: src/usr.bin/make
 
 | With this change, I have gotten following errors.
 | I think -lutil is needed.
 
 No, I fixed it... I was supposed to use bmake_foo() not efoo().

Thank you very much!

--
Ryo ONODERA // ryo...@yk.rim.or.jp
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


Re: CVS commit: src/sys/external/bsd/acpica/dist/namespace

2014-04-04 Thread Ryo ONODERA
From: Chuck Silvers c...@chuq.com, Date: Fri, 4 Apr 2014 20:00:19 -0700

 hi christos,
 
 this change breaks the SATA controller on one of my boxes.
 this change doesn't look at all right to me,
 how about we revert it and fix the macbook problem a better way?

I feel that MacBook Air mid-2012's problem should be fixed
in another way. But I have no idea...

 
 
 On Sun, Jan 05, 2014 at 10:45:43AM -0500, Christos Zoulas wrote:
 Module Name: src
 Committed By:christos
 Date:Sun Jan  5 15:45:43 UTC 2014
 
 Modified Files:
  src/sys/external/bsd/acpica/dist/namespace: nsinit.c
 
 Log Message:
 PR/48494: Ryo Onodera: After ACPICA 20131218 update, uhub topology is
 misanderstood on macbook air. Ryo by bisection found that the following
 commit causes the problem: https://github.com/acpica/acpica/commit/\
 637accd073a205eb4acac935f34d0eaee0c301a8. This is tracked in:
 https://bugs.acpica.org/show_bug.cgi?id=1016
 
 
 To generate a diff of this commit:
 cvs rdiff -u -r1.4 -r1.5 src/sys/external/bsd/acpica/dist/namespace/nsinit.c
 
 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

--
Ryo ONODERA // ryo...@yk.rim.or.jp
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


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

2014-05-26 Thread Ryo ONODERA
Hi,

My change breaks if_upgt.
PRISM_GT_* should be CONEXANT.

I will commit a fix after cvs server is recovered.

Thank you.

From: Nick Hudson sk...@netbsd.org, Date: Sun, 25 May 2014 07:28:11 +0100

 On 05/25/14 07:10, Ryo ONODERA wrote:
 Module Name: src
 Committed By:ryoon
 Date:Sun May 25 06:10:25 UTC 2014

 Modified Files:
  src/sys/dev/usb: usbdevs

 Log Message:
 PR kern/48533
 Fix USB vendor ID for Conexant.

 
 -vendor XYRATEX  0x0572  Xyratex
 +vendor CONEXANT 0x0572  Conexant
 
 Doesn't this break if_upgt.c product matching?
 
 zoom$ grep -r  VENDOR_XYRATEX .
 ./if_upgt.c: { USB_VENDOR_XYRATEX, USB_PRODUCT_XYRATEX_PRISM_GT_1 },
 ./if_upgt.c: { USB_VENDOR_XYRATEX, USB_PRODUCT_XYRATEX_PRISM_GT_2 },
 zoom$
 
 Nick

--
Ryo ONODERA // ryo...@yk.rim.or.jp
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


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

2014-06-07 Thread Ryo ONODERA
Hi,

This change breaks many pkgsrc packages.
Please take a look at PR bin/48880.

Thank you.

From: Christos Zoulas chris...@netbsd.org, Date: Thu, 5 Jun 2014 20:13:13 
-0400

 Module Name:  src
 Committed By: christos
 Date: Fri Jun  6 00:13:13 UTC 2014
 
 Modified Files:
   src/usr.bin/sed: Makefile POSIX compile.c defs.h extern.h main.c misc.c
   process.c sed.1
 
 Log Message:
 Merge our changes.
 
 
 To generate a diff of this commit:
 cvs rdiff -u -r1.14 -r1.15 src/usr.bin/sed/Makefile
 cvs rdiff -u -r1.4 -r1.5 src/usr.bin/sed/POSIX
 cvs rdiff -u -r1.40 -r1.41 src/usr.bin/sed/compile.c
 cvs rdiff -u -r1.10 -r1.11 src/usr.bin/sed/defs.h
 cvs rdiff -u -r1.11 -r1.12 src/usr.bin/sed/extern.h src/usr.bin/sed/misc.c
 cvs rdiff -u -r1.21 -r1.22 src/usr.bin/sed/main.c
 cvs rdiff -u -r1.39 -r1.40 src/usr.bin/sed/process.c
 cvs rdiff -u -r1.32 -r1.33 src/usr.bin/sed/sed.1
 
 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.
 

--
Ryo ONODERA // ryo...@yk.rim.or.jp
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


Re: Wrong PR e-mails

2015-05-13 Thread Ryo ONODERA
From: chris...@astron.com (Christos Zoulas), Date: Wed, 13 May 2015 14:16:00 
+ (UTC)

 In article 20150513.225456.981040990877913520.ryo...@yk.rim.or.jp,
 Ryo ONODERA  ryo...@yk.rim.or.jp wrote:
Hi,

Sorry for my wrong PR e-mails.
I have removed all my bads from gnats.

Sorry again.
 
 No, I feel sorry for you. Perhaps we should modify the script so that
 if it finds more than 2 PR matches it makes the commit fail, or it does
 not add anymore...

Thanks for your support.
Such script may help me.

Thank you very much.

 christos
 

--
Ryo ONODERA // ryo...@yk.rim.or.jp
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


Wrong PR e-mails

2015-05-13 Thread Ryo ONODERA
Hi,

Sorry for my wrong PR e-mails.
I have removed all my bads from gnats.

Sorry again.

--
Ryo ONODERA // ryo...@yk.rim.or.jp
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


Re: Wrong PR e-mails

2015-05-16 Thread Ryo ONODERA
From: Thomas Klausner t...@giga.or.at, Date: Thu, 14 May 2015 22:45:27 +0200

 On Thu, May 14, 2015 at 07:53:23PM +0200, Thomas Klausner wrote:
 On Wed, May 13, 2015 at 02:16:00PM +, Christos Zoulas wrote:
  No, I feel sorry for you. Perhaps we should modify the script so that
  if it finds more than 2 PR matches it makes the commit fail, or it does
  not add anymore...
 
 I suggest the attached patch (with more than 3 PRs, but you can
 easily change it to more than 2).
 
 Ok, this is committed now.

Thank you very much.
I will help me (and other developers).

--
Ryo ONODERA // ryo...@yk.rim.or.jp
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


Re: CVS commit: src

2015-12-06 Thread Ryo ONODERA
Hi,

This breaks the kernel build as follows.

/usr/src/sys/dev/clockctl.c:155:1: error: no previous prototype for 
'clockctl_init' [-Werror=missing-prototypes]
 clockctl_init(void)
 ^
cc1: all warnings being treated as errors
*** [clockctl.o] Error code 1


Lacking like this?

Index: sys/sys/clockctl.h
===
RCS file: /cvsroot/src/sys/sys/clockctl.h,v
retrieving revision 1.16
diff -u -r1.16 clockctl.h
--- sys/sys/clockctl.h  6 Sep 2015 06:01:02 -   1.16
+++ sys/sys/clockctl.h  7 Dec 2015 05:00:06 -
@@ -71,6 +71,7 @@
 voidclockctlattach(int);
 int clockctlopen(dev_t, int, int, struct lwp *);
 int clockctlclose(dev_t, int, int, struct lwp *);
+int clockctl_init(void);
 int clockctlioctl(dev_t, u_long, void *, int, struct lwp *);
 #endif
 

From: "Paul Goyette" <pgoye...@netbsd.org>, Date: Mon, 7 Dec 2015 03:25:58 +

> Module Name:  src
> Committed By: pgoyette
> Date: Mon Dec  7 03:25:58 UTC 2015
> 
> Modified Files:
>   src/distrib/sets/lists/modules: mi
>   src/sys/compat/common: kern_time_50.c
>   src/sys/dev: clockctl.c
>   src/sys/modules: Makefile
> Added Files:
>   src/sys/modules/clockctl: Makefile clockctl.ioconf
> 
> Log Message:
> Modularize the clockctl pseudo-device and link to the build.
> 
> 
> To generate a diff of this commit:
> cvs rdiff -u -r1.80 -r1.81 src/distrib/sets/lists/modules/mi
> cvs rdiff -u -r1.29 -r1.30 src/sys/compat/common/kern_time_50.c
> cvs rdiff -u -r1.32 -r1.33 src/sys/dev/clockctl.c
> cvs rdiff -u -r1.162 -r1.163 src/sys/modules/Makefile
> cvs rdiff -u -r0 -r1.1 src/sys/modules/clockctl/Makefile \
> src/sys/modules/clockctl/clockctl.ioconf
> 
> Please note that diffs are not public domain; they are subject to the
> copyright notices on the relevant files.
> 

--
Ryo ONODERA // ryo...@yk.rim.or.jp
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


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

2016-01-09 Thread Ryo ONODERA
Hi,

From: chris...@zoulas.com (Christos Zoulas), Date: Sat, 9 Jan 2016 23:01:25 
-0500

> On Jan 10, 12:57pm, tsut...@ceres.dti.ne.jp (Izumi Tsutsui) wrote:
> -- Subject: Re: CVS commit: src/sys/arch/amd64/conf
> 
> | 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?
> 
> I don't know; that's what he reported. I did not need it.

I will check again whether it is really needed or not.

--
Ryo ONODERA // ryo...@yk.rim.or.jp
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


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

2016-01-09 Thread Ryo ONODERA
From: Ryo ONODERA <ryo...@yk.rim.or.jp>, Date: Sun, 10 Jan 2016 13:04:07 +0900 
(JST)

> Hi,
> 
> From: chris...@zoulas.com (Christos Zoulas), Date: Sat, 9 Jan 2016 23:01:25 
> -0500
> 
>> On Jan 10, 12:57pm, tsut...@ceres.dti.ne.jp (Izumi Tsutsui) wrote:
>> -- Subject: Re: CVS commit: src/sys/arch/amd64/conf
>> 
>> | 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?
>> 
>> I don't know; that's what he reported. I did not need it.
> 
> I will check again whether it is really needed or not.

It is not needed.
Sorry.

--
Ryo ONODERA // ryo...@yk.rim.or.jp
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


Re: CVS commit: src/sys/dev

2017-02-24 Thread Ryo ONODERA
Hi,

https://mail-index.netbsd.org/source-changes/2017/02/24/msg082342.html
fixes my kernel panic.

However, PR kern/51999 is not resolved yet.
http://gnats.netbsd.org/51999

Thank you.

From: Ryo ONODERA <ryo...@yk.rim.or.jp>, Date: Fri, 24 Feb 2017 21:49:12 +0900 
(JST)

> Hi,
> 
> After this commit, audio playback causes kernel panic.
> The following is kernel panic message from LOCKDEBUG kernel
> (manually rewritten).
> 
> 
> Mutex error: mutex_vector_exit,717: exiting unheld spin mutex
> 
> lock address : 0xfe810fc11010 type:  spin
> ininialized  : 0x80733860
> shared holds :  0 exclusive:0
> shares wanted:0 exclusive:  0
> current cpu  :0 last held:  2
> current lwp  : 0xfe821eae1000 last held: 00
> last locked  : 0x8072440b unlocked*: 0x808ca55d
> owner field  : 0x0700 wait/spin:0/1
> 
> panic: LOCKDEBUG: Mutex error: mutex_vector_exit,717: exiting unheld spin 
> mutex
> fatal breakpoint trap in supervisor mode
> trap type 1 code 0 rip 80215365 cs 8 rflags 246 cr2 7e01df80e010 
> ilevel 8 rsp fe8110371c40
> curlwp 0xfe821eae1000 pid 41.2 lowest kstack 0xfe811036f2c0
> Stopped in pid 41.2 (pulseaudio) at netbsd:breakpoint:0x5: leave
> db{0}>
> 
> 
> 
> From: "Nathanial Sloss" <n...@netbsd.org>, Date: Fri, 24 Feb 2017 09:49:49 
> +
> 
>> Module Name: src
>> Committed By:nat
>> Date:Fri Feb 24 09:49:49 UTC 2017
>> 
>> Modified Files:
>>  src/sys/dev: audio.c
>> 
>> Log Message:
>> Simplify locking.  Hold intr lock only when dealing with sc_pr (mix ring)
>> or virtual channel 0 (hardware).
>> 
>> 
>> To generate a diff of this commit:
>> cvs rdiff -u -r1.309 -r1.310 src/sys/dev/audio.c
>> 
>> Please note that diffs are not public domain; they are subject to the
>> copyright notices on the relevant files.
>> 
> 
> --
> Ryo ONODERA // ryo...@yk.rim.or.jp
> PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3

--
Ryo ONODERA // ryo...@yk.rim.or.jp
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


Re: CVS commit: src/sys/dev

2017-02-24 Thread Ryo ONODERA
Hi,

From: Taylor R Campbell <campbell+netbsd-source-change...@mumble.net>, Date: 
Fri, 24 Feb 2017 14:13:11 +

>> Date: Fri, 24 Feb 2017 21:49:12 +0900 (JST)
>> From: Ryo ONODERA <ryo...@yk.rim.or.jp>
>> 
>> panic: LOCKDEBUG: Mutex error: mutex_vector_exit,717: exiting unheld spin 
>> mutex
>> fatal breakpoint trap in supervisor mode
>> trap type 1 code 0 rip 80215365 cs 8 rflags 246 cr2 7e01df80e010 
>> ilevel 8 rsp fe8110371c40
>> curlwp 0xfe821eae1000 pid 41.2 lowest kstack 0xfe811036f2c0
>> Stopped in pid 41.2 (pulseaudio) at netbsd:breakpoint:0x5: leave
>> db{0}>
> 
> I know ten-fingered copypasta is always a pain, but can you run `bt'
> and transcribe at least the names in the resulting stack trace?  That
> would be helpful for finding this.

I will include a result from bt.

Thank you.

> (We also need a few more eyeballs on nat's new audio code!  Maybe I
> can try to make some time this weekend...)

--
Ryo ONODERA // ryo...@yk.rim.or.jp
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


Re: CVS commit: src/lib/libc/net

2016-09-21 Thread Ryo ONODERA
Hi,

Adding ifa_addrflags definition to src/include/ifaddrs.h is required?

From: "Roy Marples" <r...@netbsd.org>, Date: Wed, 21 Sep 2016 10:53:24 +

> Module Name:  src
> Committed By: roy
> Date: Wed Sep 21 10:53:24 UTC 2016
> 
> Modified Files:
>   src/lib/libc/net: getifaddrs.3 getifaddrs.c
> 
> Log Message:
> Add ifa_addrflags to ifaddrs.
> 
> 
> To generate a diff of this commit:
> cvs rdiff -u -r1.16 -r1.17 src/lib/libc/net/getifaddrs.3
> cvs rdiff -u -r1.15 -r1.16 src/lib/libc/net/getifaddrs.c
> 
> Please note that diffs are not public domain; they are subject to the
> copyright notices on the relevant files.
> 

--
Ryo ONODERA // ryo...@yk.rim.or.jp
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


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

2016-09-18 Thread Ryo ONODERA
Hi,

With this change, the following wm(4) device links in 10BASE-T when it
is connected to 100BASE or 1000BASE hub.


From: "SAITOH Masanobu" <msai...@netbsd.org>, Date: Fri, 9 Sep 2016 06:34:10 
+

> Module Name:  src
> Committed By: msaitoh
> Date: Fri Sep  9 06:34:10 UTC 2016
> 
> Modified Files:
>   src/sys/dev/mii: inbmphyreg.h
> 
> Log Message:
>  HV_OEM_BITS is not page 0 but page 768.
> 
> 
> To generate a diff of this commit:
> cvs rdiff -u -r1.3 -r1.4 src/sys/dev/mii/inbmphyreg.h
> 
> Please note that diffs are not public domain; they are subject to the
> copyright notices on the relevant files.
> 

--
Ryo ONODERA // ryo...@yk.rim.or.jp
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


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

2016-09-20 Thread Ryo ONODERA
Hi,

From: Masanobu SAITOH <msai...@execsw.org>, Date: Tue, 20 Sep 2016 14:02:37 
+0900

> On 2016/09/19 11:00, Ryo ONODERA wrote:
>> Hi,
>>
>> With this change, the following wm(4) device links in 10BASE-T when it
>> is connected to 100BASE or 1000BASE hub.
> 
> Could you show me the dmesg of wm and *phy?

Here is wm0 and ihphy0 from dmesg with inbmphyreg.h rev. 1.5:
wm0 at pci0 dev 25 function 0: I218 V Ethernet Connection (rev. 0x03)
wm0: interrupting at msi1 vec 0
wm0: PCI-Express bus
wm0: 2048 words FLASH
wm0: Ethernet address b8:6b:23:86:df:bb
ihphy0 at wm0 phy 2: i217 10/100/1000 media interface, rev. 5
ihphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 
1000baseT-FDX, auto

Thank you.

> Thanks in advance.
> 
> 
> 
>>
>> From: "SAITOH Masanobu" <msai...@netbsd.org>, Date: Fri, 9 Sep 2016
>> 06:34:10 +
>>
>>> Module Name:src
>>> Committed By:   msaitoh
>>> Date:   Fri Sep  9 06:34:10 UTC 2016
>>>
>>> Modified Files:
>>> src/sys/dev/mii: inbmphyreg.h
>>>
>>> Log Message:
>>>  HV_OEM_BITS is not page 0 but page 768.
>>>
>>>
>>> To generate a diff of this commit:
>>> cvs rdiff -u -r1.3 -r1.4 src/sys/dev/mii/inbmphyreg.h
>>>
>>> Please note that diffs are not public domain; they are subject to the
>>> copyright notices on the relevant files.
>>>
>>
>> --
>> Ryo ONODERA // ryo...@yk.rim.or.jp
>> PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3
>>
> 
> 
> -- 
> ---
> SAITOH Masanobu (msai...@execsw.org
>  msai...@netbsd.org)


Re: CVS commit: src

2016-09-16 Thread Ryo ONODERA
Hi,

On my amd64 laptop with xf86-video-intel, XFree86LOADER macro should be
defined in src/external/mit/xorg/server/drivers/Makefile.xf86-driver
or somewhere like xorg-server.old.
Without XFree86LOADER, startx always fails.

From: Thomas Klausner <t...@giga.or.at>, Date: Fri, 16 Sep 2016 13:46:34 +0200

> On Thu, Sep 15, 2016 at 07:49:08AM +, matthew green wrote:
>> Module Name: src
>> Committed By:mrg
>> Date:Thu Sep 15 07:49:08 UTC 2016
>> 
>> Modified Files:
>>  src/UPDATING
>>  src/share/mk/bsd.own.mk
>> 
>> Log Message:
>> switch amd64, i386, shark, ofppc and macppc to xorg-server 1.18.
>> 
>> add a note to UPDATING about needing a clean objdir and destdir.
> 
> Please fix the set lists so they remove obsolete files.
> 
> /usr/X11R7/include/xorg/bt829.h
> /usr/X11R7/include/xorg/fi1236.h
> /usr/X11R7/include/xorg/mibstore.h
> /usr/X11R7/include/xorg/mifillarc.h
> /usr/X11R7/include/xorg/mifpoly.h
> /usr/X11R7/include/xorg/mispans.h
> /usr/X11R7/include/xorg/miwideline.h
> /usr/X11R7/include/xorg/msp3430.h
> /usr/X11R7/include/xorg/swaprep.h
> /usr/X11R7/include/xorg/swapreq.h
> /usr/X11R7/include/xorg/tda8425.h
> /usr/X11R7/include/xorg/tda9850.h
> /usr/X11R7/include/xorg/tda9885.h
> /usr/X11R7/include/xorg/uda1380.h
> /usr/X11R7/include/xorg/xaa.h
> /usr/X11R7/include/xorg/xaalocal.h
> /usr/X11R7/include/xorg/xf86Rename.h
> /usr/X11R7/lib/modules/drivers/apm_drv.so
> /usr/X11R7/lib/modules/drivers/apm_drv.so.1
> /usr/X11R7/lib/modules/drivers/ark_drv.so
> /usr/X11R7/lib/modules/drivers/ark_drv.so.0
> /usr/X11R7/lib/modules/drivers/ch7017_drv.so
> /usr/X11R7/lib/modules/drivers/ch7017_drv.so.2
> /usr/X11R7/lib/modules/drivers/ch7xxx_drv.so
> /usr/X11R7/lib/modules/drivers/ch7xxx_drv.so.2
> /usr/X11R7/lib/modules/drivers/glint_drv.so
> /usr/X11R7/lib/modules/drivers/glint_drv.so.1
> /usr/X11R7/lib/modules/drivers/intel_drv_old.so
> /usr/X11R7/lib/modules/drivers/intel_drv_old.so.2
> /usr/X11R7/lib/modules/drivers/ivch_drv.so
> /usr/X11R7/lib/modules/drivers/ivch_drv.so.2
> /usr/X11R7/lib/modules/drivers/sil164_drv.so
> /usr/X11R7/lib/modules/drivers/sil164_drv.so.2
> /usr/X11R7/lib/modules/drivers/tfp410_drv.so
> /usr/X11R7/lib/modules/drivers/tfp410_drv.so.2
> /usr/X11R7/lib/modules/drivers/xgi_drv.so
> /usr/X11R7/lib/modules/drivers/xgi_drv.so.1
> /usr/X11R7/lib/modules/extensions/libdbe.so
> /usr/X11R7/lib/modules/extensions/libdbe.so.0
> /usr/X11R7/lib/modules/extensions/libextmod.so
> /usr/X11R7/lib/modules/extensions/libextmod.so.0
> /usr/X11R7/lib/modules/extensions/librecord.so
> /usr/X11R7/lib/modules/extensions/librecord.so.0
> /usr/X11R7/lib/modules/libxaa.so
> /usr/X11R7/lib/modules/libxaa.so.0
> /usr/X11R7/man/html4/apm.html
> /usr/X11R7/man/html4/glint.html
> /usr/X11R7/man/html4/intel_old.html
> /usr/X11R7/man/html4/xgi.html
> /usr/X11R7/man/man4/apm.4
> /usr/X11R7/man/man4/glint.4
> /usr/X11R7/man/man4/intel_old.4
> /usr/X11R7/man/man4/xgi.4
> /usr/libdata/debug/usr/X11R7/lib/modules/drivers/apm_drv.so.1.debug
> /usr/libdata/debug/usr/X11R7/lib/modules/drivers/ark_drv.so.0.debug
> /usr/libdata/debug/usr/X11R7/lib/modules/drivers/ch7017_drv.so.2.debug
> /usr/libdata/debug/usr/X11R7/lib/modules/drivers/ch7xxx_drv.so.2.debug
> /usr/libdata/debug/usr/X11R7/lib/modules/drivers/glint_drv.so.1.debug
> /usr/libdata/debug/usr/X11R7/lib/modules/drivers/intel_drv_old.so.2.debug
> /usr/libdata/debug/usr/X11R7/lib/modules/drivers/ivch_drv.so.2.debug
> /usr/libdata/debug/usr/X11R7/lib/modules/drivers/sil164_drv.so.2.debug
> /usr/libdata/debug/usr/X11R7/lib/modules/drivers/tfp410_drv.so.2.debug
> /usr/libdata/debug/usr/X11R7/lib/modules/drivers/xgi_drv.so.1.debug
> /usr/libdata/debug/usr/X11R7/lib/modules/extensions/libdbe.so.0.debug
> /usr/libdata/debug/usr/X11R7/lib/modules/extensions/libextmod.so.0.debug
> /usr/libdata/debug/usr/X11R7/lib/modules/extensions/librecord.so.0.debug
> /usr/libdata/debug/usr/X11R7/lib/modules/libxaa.so.0.debug
> 
>  Thomas

--
Ryo ONODERA // ryo...@yk.rim.or.jp
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


Re: CVS commit: src

2016-09-27 Thread Ryo ONODERA
Hi,

I have gotten an error related to dri2.c.
See the following.

--- dependall-modesetting ---
dependall ===> 
external/mit/xorg/server/xorg-server/hw/xfree86/drivers/modesetting
nbmake[12]: nbmake[12]: don't know how to make dri2.c. Stop
nbmake[12]: stopped in 
/usr/src/external/mit/xorg/server/xorg-server/hw/xfree86/drivers/modesetting
*** [dependall-modesetting] Error code 2


From: "matthew green" , Date: Mon, 26 Sep 2016 22:37:32 +

> Module Name:  src
> Committed By: mrg
> Date: Mon Sep 26 22:37:32 UTC 2016
> 
> Modified Files:
>   src/distrib/sets/lists/xdebug: md.amd64 md.i386
>   src/distrib/sets/lists/xserver: md.amd64 md.i386
>   src/external/mit/xorg/server/drivers: Makefile Makefile.xf86-driver
>   src/external/mit/xorg/server/xorg-server/hw/xfree86: Makefile
> Added Files:
>   src/external/mit/xorg/server/xorg-server/hw/xfree86/drivers: Makefile
>   src/external/mit/xorg/server/xorg-server/hw/xfree86/drivers/modesetting:
>   Makefile
> 
> Log Message:
> build the modesetting driver on x86.
> build the modesetting driver for xorg-server 1.18.4.  it has moved
> into the xorg-server tree itself, and changed significantly.
> 
> 
> To generate a diff of this commit:
> cvs rdiff -u -r1.36 -r1.37 src/distrib/sets/lists/xdebug/md.amd64
> cvs rdiff -u -r1.33 -r1.34 src/distrib/sets/lists/xdebug/md.i386
> cvs rdiff -u -r1.97 -r1.98 src/distrib/sets/lists/xserver/md.amd64
> cvs rdiff -u -r1.114 -r1.115 src/distrib/sets/lists/xserver/md.i386
> cvs rdiff -u -r1.87 -r1.88 src/external/mit/xorg/server/drivers/Makefile
> cvs rdiff -u -r1.22 -r1.23 \
> src/external/mit/xorg/server/drivers/Makefile.xf86-driver
> cvs rdiff -u -r1.34 -r1.35 \
> src/external/mit/xorg/server/xorg-server/hw/xfree86/Makefile
> cvs rdiff -u -r0 -r1.1 \
> src/external/mit/xorg/server/xorg-server/hw/xfree86/drivers/Makefile
> cvs rdiff -u -r0 -r1.1 \
> 
> src/external/mit/xorg/server/xorg-server/hw/xfree86/drivers/modesetting/Makefile
> 
> Please note that diffs are not public domain; they are subject to the
> copyright notices on the relevant files.
> 


Re: CVS commit: src

2016-09-28 Thread Ryo ONODERA
Hi,

From: matthew green <m...@eterna.com.au>, Date: Wed, 28 Sep 2016 02:47:27 +1000

> ah, sorry about that.  i forgot to commit bsd.own.mk.  see rev 1.963.

Thank you very much.
My build completed and it works fine.

> thanks.
> 
> 
> .mrg.
> 
> Ryo ONODERA writes:
>> Hi,
>> 
>> I have gotten an error related to dri2.c.
>> See the following.
>> 
>> --- dependall-modesetting ---
>> dependall ===> 
>> external/mit/xorg/server/xorg-server/hw/xfree86/drivers/modesetting
>> nbmake[12]: nbmake[12]: don't know how to make dri2.c. Stop
>> nbmake[12]: stopped in 
>> /usr/src/external/mit/xorg/server/xorg-server/hw/xfree86/drivers/modesetting
>> *** [dependall-modesetting] Error code 2
>> 
>> 
>> From: "matthew green" <m...@netbsd.org>, Date: Mon, 26 Sep 2016 22:37:32 
>> +
>> 
>> > Module Name:   src
>> > Committed By:  mrg
>> > Date:  Mon Sep 26 22:37:32 UTC 2016
>> > 
>> > Modified Files:
>> >src/distrib/sets/lists/xdebug: md.amd64 md.i386
>> >src/distrib/sets/lists/xserver: md.amd64 md.i386
>> >src/external/mit/xorg/server/drivers: Makefile Makefile.xf86-driver
>> >src/external/mit/xorg/server/xorg-server/hw/xfree86: Makefile
>> > Added Files:
>> >src/external/mit/xorg/server/xorg-server/hw/xfree86/drivers: Makefile
>> >src/external/mit/xorg/server/xorg-server/hw/xfree86/drivers/modesetting:
>> >Makefile
>> > 
>> > Log Message:
>> > build the modesetting driver on x86.
>> > build the modesetting driver for xorg-server 1.18.4.  it has moved
>> > into the xorg-server tree itself, and changed significantly.
>> > 
>> > 
>> > To generate a diff of this commit:
>> > cvs rdiff -u -r1.36 -r1.37 src/distrib/sets/lists/xdebug/md.amd64
>> > cvs rdiff -u -r1.33 -r1.34 src/distrib/sets/lists/xdebug/md.i386
>> > cvs rdiff -u -r1.97 -r1.98 src/distrib/sets/lists/xserver/md.amd64
>> > cvs rdiff -u -r1.114 -r1.115 src/distrib/sets/lists/xserver/md.i386
>> > cvs rdiff -u -r1.87 -r1.88 src/external/mit/xorg/server/drivers/Makefile
>> > cvs rdiff -u -r1.22 -r1.23 \
>> > src/external/mit/xorg/server/drivers/Makefile.xf86-driver
>> > cvs rdiff -u -r1.34 -r1.35 \
>> > src/external/mit/xorg/server/xorg-server/hw/xfree86/Makefile
>> > cvs rdiff -u -r0 -r1.1 \
>> > src/external/mit/xorg/server/xorg-server/hw/xfree86/drivers/Makefile
>> > cvs rdiff -u -r0 -r1.1 \
>> > 
>> > src/external/mit/xorg/server/xorg-server/hw/xfree86/drivers/modesetting/Makefile
>> > 
>> > Please note that diffs are not public domain; they are subject to the
>> > copyright notices on the relevant files.
>> > 
>> 

--
Ryo ONODERA // ryo...@yk.rim.or.jp
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


Re: CVS commit: src/sys/compat/linux/arch

2017-01-03 Thread Ryo ONODERA
From: m...@netbsd.org (Emmanuel Dreyfus), Date: Tue, 3 Jan 2017 02:30:17 +0100

> Ryo ONODERA <ryo...@yk.rim.or.jp> wrote:
> 
>> This commit breaks my kernel build.
>> It seems that this commit does not fit with -current's format.
>> Could you regenerate these files again?
> 
> What error do you get?

Here is typical errors. Anyway these are fixed already.
Thank you.

/usr/src/sys/compat/linux/arch/amd64/linux_sysent.c:1088:6: error: missing initi
alizer for field 'sy_entry' of 'struct sysent' [-Werror=missing-field-initialize
rs]
  linux_sys_nosys },   /* 503 = filler */
  ^
In file included from /usr/src/sys/sys/timevar.h:66:0,
 from /usr/src/sys/sys/time.h:296,
 from /usr/src/sys/sys/param.h:145,
 from /usr/src/sys/compat/linux/arch/amd64/linux_sysent.c:18:
/usr/src/sys/sys/systm.h:125:11: note: 'sy_entry' declared here
  uint32_t sy_entry; /* DTrace entry ID for systrace. */
   ^
/usr/src/sys/compat/linux/arch/amd64/linux_sysent.c:1090:6: error: missing initi
alizer for field 'sy_entry' of 'struct sysent' [-Werror=missing-field-initialize
rs]
  linux_sys_nosys },   /* 504 = filler */
  ^
In file included from /usr/src/sys/sys/timevar.h:66:0,
 from /usr/src/sys/sys/time.h:296,
 from /usr/src/sys/sys/param.h:145,
 from /usr/src/sys/compat/linux/arch/amd64/linux_sysent.c:18:
/usr/src/sys/sys/systm.h:125:11: note: 'sy_entry' declared here
  uint32_t sy_entry; /* DTrace entry ID for systrace. */
   ^
/usr/src/sys/compat/linux/arch/amd64/linux_sysent.c:1092:6: error: missing initi
alizer for field 'sy_entry' of 'struct sysent' [-Werror=missing-field-initialize
rs]
  linux_sys_nosys },   /* 505 = filler */
  ^
In file included from /usr/src/sys/sys/timevar.h:66:0,
 from /usr/src/sys/sys/time.h:296,
 from /usr/src/sys/sys/param.h:145,
 from /usr/src/sys/compat/linux/arch/amd64/linux_sysent.c:18:
/usr/src/sys/sys/systm.h:125:11: note: 'sy_entry' declared here
  uint32_t sy_entry; /* DTrace entry ID for systrace. */
   ^


> -- 
> Emmanuel Dreyfus
> http://hcpnet.free.fr/pubz
> m...@netbsd.org

--
Ryo ONODERA // ryo...@yk.rim.or.jp
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


Re: CVS commit: src/sys/compat/linux/arch

2017-01-02 Thread Ryo ONODERA
Hi,

This commit breaks my kernel build.
It seems that this commit does not fit with -current's format.
Could you regenerate these files again?

Thank you.

From: "Emmanuel Dreyfus" <m...@netbsd.org>, Date: Mon, 2 Jan 2017 16:32:39 +

> Module Name:  src
> Committed By: manu
> Date: Mon Jan  2 16:32:39 UTC 2017
> 
> Modified Files:
>   src/sys/compat/linux/arch/alpha: linux_syscall.h linux_syscallargs.h
>   linux_syscalls.c linux_sysent.c
>   src/sys/compat/linux/arch/amd64: linux_syscall.h linux_syscallargs.h
>   linux_syscalls.c linux_sysent.c
>   src/sys/compat/linux/arch/arm: linux_syscall.h linux_syscallargs.h
>   linux_syscalls.c linux_sysent.c
>   src/sys/compat/linux/arch/i386: linux_syscall.h linux_syscallargs.h
>   linux_syscalls.c linux_sysent.c
>   src/sys/compat/linux/arch/m68k: linux_syscall.h linux_syscallargs.h
>   linux_syscalls.c linux_sysent.c
>   src/sys/compat/linux/arch/mips: linux_syscall.h linux_syscallargs.h
>   linux_syscalls.c linux_sysent.c
>   src/sys/compat/linux/arch/powerpc: linux_syscall.h linux_syscallargs.h
>   linux_syscalls.c linux_sysent.c
> 
> Log Message:
> Regen
> 
> 
> To generate a diff of this commit:
> cvs rdiff -u -r1.99 -r1.100 src/sys/compat/linux/arch/alpha/linux_syscall.h \
> src/sys/compat/linux/arch/alpha/linux_sysent.c
> cvs rdiff -u -r1.98 -r1.99 \
> src/sys/compat/linux/arch/alpha/linux_syscallargs.h
> cvs rdiff -u -r1.100 -r1.101 src/sys/compat/linux/arch/alpha/linux_syscalls.c
> cvs rdiff -u -r1.60 -r1.61 src/sys/compat/linux/arch/amd64/linux_syscall.h \
> src/sys/compat/linux/arch/amd64/linux_syscallargs.h \
> src/sys/compat/linux/arch/amd64/linux_syscalls.c \
> src/sys/compat/linux/arch/amd64/linux_sysent.c
> cvs rdiff -u -r1.69 -r1.70 src/sys/compat/linux/arch/arm/linux_syscall.h \
> src/sys/compat/linux/arch/arm/linux_syscallargs.h \
> src/sys/compat/linux/arch/arm/linux_syscalls.c \
> src/sys/compat/linux/arch/arm/linux_sysent.c
> cvs rdiff -u -r1.108 -r1.109 src/sys/compat/linux/arch/i386/linux_syscall.h \
> src/sys/compat/linux/arch/i386/linux_syscallargs.h \
> src/sys/compat/linux/arch/i386/linux_sysent.c
> cvs rdiff -u -r1.109 -r1.110 src/sys/compat/linux/arch/i386/linux_syscalls.c
> cvs rdiff -u -r1.98 -r1.99 src/sys/compat/linux/arch/m68k/linux_syscall.h \
> src/sys/compat/linux/arch/m68k/linux_syscalls.c \
> src/sys/compat/linux/arch/m68k/linux_sysent.c
> cvs rdiff -u -r1.97 -r1.98 src/sys/compat/linux/arch/m68k/linux_syscallargs.h
> cvs rdiff -u -r1.67 -r1.68 src/sys/compat/linux/arch/mips/linux_syscall.h
> cvs rdiff -u -r1.66 -r1.67 src/sys/compat/linux/arch/mips/linux_syscallargs.h 
> \
> src/sys/compat/linux/arch/mips/linux_syscalls.c \
> src/sys/compat/linux/arch/mips/linux_sysent.c
> cvs rdiff -u -r1.76 -r1.77 src/sys/compat/linux/arch/powerpc/linux_syscall.h \
> src/sys/compat/linux/arch/powerpc/linux_sysent.c
> cvs rdiff -u -r1.75 -r1.76 \
> src/sys/compat/linux/arch/powerpc/linux_syscallargs.h \
> src/sys/compat/linux/arch/powerpc/linux_syscalls.c
> 
> Please note that diffs are not public domain; they are subject to the
> copyright notices on the relevant files.
> 

--
Ryo ONODERA // ryo...@yk.rim.or.jp
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


Re: CVS commit: src/sys

2017-11-29 Thread Ryo ONODERA
Hi,

From: Robert Elz <k...@munnari.oz.au>, Date: Sat, 25 Nov 2017 21:16:56 +0700

> Date:Sat, 25 Nov 2017 18:11:22 +0900 (JST)
> From:    Ryo ONODERA <r...@tetera.org>
> Message-ID:  <20171125.181122.805047996391646417@tetera.org>
> 
>   | After the following commit, my IPv6 network does not work at all.
>   | What information is required to investigate my problem?
> 
> I believe this might be fixed now - at least IPv6 seems to be
> back working again.
> 
> I still don't believe that the way it works is the way it should,
> but that's a topic for another day.

Thank you very much.
My environment works fine now.

Thanks again.

> kre
> 

--
Ryo ONODERA // r...@tetera.org
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


Re: CVS commit: src/sys

2017-11-25 Thread Ryo ONODERA
Hi,

After the following commit, my IPv6 network does not work at all.
What information is required to investigate my problem?

A output of ifconfig(8) is here. I am using dhcpcd(8) from NetBSD/amd64
-current of today to get IPv4 and IPv6 addresses.

$ ifconfig wm0
wm0: flags=0x8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
capabilities=7ff80<TSO4,IP4CSUM_Rx,IP4CSUM_Tx,TCP4CSUM_Rx>
capabilities=7ff80<TCP4CSUM_Tx,UDP4CSUM_Rx,UDP4CSUM_Tx,TCP6CSUM_Rx>
capabilities=7ff80<TCP6CSUM_Tx,UDP6CSUM_Rx,UDP6CSUM_Tx,TSO6>
enabled=0
ec_capabilities=7<VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU>
ec_enabled=0
address: b8:6b:23:86:df:bb
media: Ethernet autoselect (1000baseT 
full-duplex,flowcontrol,rxpause,txpause)
status: active
inet 10.81.0.2/16 broadcast 10.81.255.255 flags 0x0
inet6 fd00::1/16 flags 0x0
inet6 fe80::ba6b:23ff:fe86:dfbb%wm0/64 flags 0x0 scopeid 0x1
inet6 2400:402e:a64d:8b00:bbce:414:c001:ac58/64 flags 0x0

Thank you.

From: "Roy Marples" <r...@netbsd.org>, Date: Fri, 24 Nov 2017 14:03:25 +

> Module Name:  src
> Committed By: roy
> Date: Fri Nov 24 14:03:25 UTC 2017
> 
> Modified Files:
>   src/sys/netinet: ip_input.c
>   src/sys/netinet6: in6_src.c ip6_input.c ip6_output.c
> 
> Log Message:
> Allow local communication over DETACHED addresses.
> Allow binding to DETACHED or TENTATIVE addresses as we deny
> sending upstream from them anyway.
> Prefer non DETACHED or TENTATIVE addresses.
> 
> 
> To generate a diff of this commit:
> cvs rdiff -u -r1.362 -r1.363 src/sys/netinet/ip_input.c
> cvs rdiff -u -r1.82 -r1.83 src/sys/netinet6/in6_src.c
> cvs rdiff -u -r1.183 -r1.184 src/sys/netinet6/ip6_input.c
> cvs rdiff -u -r1.193 -r1.194 src/sys/netinet6/ip6_output.c
> 
> Please note that diffs are not public domain; they are subject to the
> copyright notices on the relevant files.
> 

--
Ryo ONODERA // r...@tetera.org
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


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

2018-06-08 Thread Ryo ONODERA
Hi,

From: Kengo NAKAHARA , Date: Fri, 8 Jun 2018 20:20:03 
+0900

> Hi,
> 
> Sorry, I checked it fixed panic only. iwm.c:r1.81 and r1.82 fix this problem
> at my environment.
> 
> Could you try latest kernel with these commits?

Thank you very much for your quick fix.
It works fine now.

> Thanks,
> 
> On 2018/06/09 3:14, Ryo ONODERA wrote:
>> Hi,
>> 
>> This change causes the following error and I cannot use iwm(4) device
>> anymore.
>> Could you take a look at my problem?
>> 
>> $ ifconfig iwm0
>> ifconfig: SIOCGIFFLAGS iwm0: Device not configured
>> 
>> dmesg is here:
>> (snip)
>> iwm0 at pci2 dev 0 function 0: vendor 8086 product 24fd (rev. 0x78)
>> iwm0: interrupting at msi2 vec 0
>> (snip)
>> iwm0: hw rev 0x230, fw ver 22.361476.0, address 74:e5:f9:69:6c:bb
>> iwm0: 11a rates: 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
>> iwm0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
>> iwm0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 
>> 36Mbps 48Mbps 54Mbps
>> 
>> 
>> From: "Kengo NAKAHARA" , Date: Tue, 5 Jun 2018 
>> 12:17:18 +
>> 
>>> Module Name:src
>>> Committed By:   knakahara
>>> Date:   Tue Jun  5 12:17:18 UTC 2018
>>>
>>> Modified Files:
>>> src/sys/dev/pci: if_iwm.c
>>>
>>> Log Message:
>>> Fix panic on boot with iwm(4). Advised by nonaka@n.o, thanks.
>>>
>>> XXX pullup-8
>>>
>>>
>>> To generate a diff of this commit:
>>> cvs rdiff -u -r1.78 -r1.79 src/sys/dev/pci/if_iwm.c
>>>
>>> Please note that diffs are not public domain; they are subject to the
>>> copyright notices on the relevant files.
>>>
>> 
>> --
>> Ryo ONODERA // r...@tetera.org
>> PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3
>> 
> 
> -- 
> //
> Internet Initiative Japan Inc.
> 
> Device Engineering Section,
> IoT Platform Development Department,
> Network Division,
> Technology Unit
> 
> Kengo NAKAHARA 

--
Ryo ONODERA // r...@tetera.org
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


Re: CVS commit: src

2018-09-25 Thread Ryo ONODERA
Hi,

I have gotten the following error in "build.sh tools".
I think that you have forgotten to add src/tools/xz-include/Makefile.inc.

Thank you.

--- obj-xz-include ---
nbmake[3]: "/usr/src/tools/xz-include/Makefile" line 9: Could not find 
Makefile.inc


From: "Joerg Sonnenberger" , Date: Tue, 25 Sep 2018 05:42:09 
+

> Module Name:  src
> Committed By: joerg
> Date: Tue Sep 25 05:42:08 UTC 2018
> 
> Modified Files:
>   src/external/public-domain/xz: Makefile Makefile.inc
>   src/external/public-domain/xz/bin/xz: Makefile
>   src/external/public-domain/xz/include: config.h
>   src/external/public-domain/xz/lib: Makefile
>   src/tools: Makefile
> Added Files:
>   src/tools/xz-bin: Makefile
>   src/tools/xz-include: Makefile
>   src/tools/xz-lib: Makefile
> 
> Log Message:
> Update build glue for xz-5.2.4. Hook up tools version.
> 
> 
> To generate a diff of this commit:
> cvs rdiff -u -r1.1 -r1.2 src/external/public-domain/xz/Makefile
> cvs rdiff -u -r1.3 -r1.4 src/external/public-domain/xz/Makefile.inc
> cvs rdiff -u -r1.3 -r1.4 src/external/public-domain/xz/bin/xz/Makefile
> cvs rdiff -u -r1.8 -r1.9 src/external/public-domain/xz/include/config.h
> cvs rdiff -u -r1.9 -r1.10 src/external/public-domain/xz/lib/Makefile
> cvs rdiff -u -r1.195 -r1.196 src/tools/Makefile
> cvs rdiff -u -r0 -r1.1 src/tools/xz-bin/Makefile
> cvs rdiff -u -r0 -r1.1 src/tools/xz-include/Makefile
> cvs rdiff -u -r0 -r1.1 src/tools/xz-lib/Makefile
> 
> Please note that diffs are not public domain; they are subject to the
> copyright notices on the relevant files.
> 

--
Ryo ONODERA // r...@tetera.org
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


Re: CVS commit: src/tools/xz-include

2018-09-25 Thread Ryo ONODERA
Hi,

From: "Joerg Sonnenberger" , Date: Tue, 25 Sep 2018 11:41:35 
+

> Module Name:  src
> Committed By: joerg
> Date: Tue Sep 25 11:41:35 UTC 2018
> 
> Modified Files:
>   src/tools/xz-include: Makefile
> 
> Log Message:
> Don't include NLS for the tools build of xz.
> 
> 
> To generate a diff of this commit:
> cvs rdiff -u -r1.1 -r1.2 src/tools/xz-include/Makefile
> 
> Please note that diffs are not public domain; they are subject to the
> copyright notices on the relevant files.
> 

The following patch may be useful to fix build.sh tools failure.
Your change will also fix the failure.
ENABLE_NLS should be removed?

Index: external/public-domain/xz/bin/xz/Makefile
===
RCS file: /cvsroot/src/external/public-domain/xz/bin/xz/Makefile,v
retrieving revision 1.4
diff -u -r1.4 Makefile
--- external/public-domain/xz/bin/xz/Makefile   25 Sep 2018 05:42:08 -  
1.4
+++ external/public-domain/xz/bin/xz/Makefile   25 Sep 2018 11:49:43 -
@@ -13,7 +13,7 @@
 .include 
 
 CPPFLAGS+= -DPACKAGE=\"xz\"
-.if !defined(HOST_PROG)
+.if !defined(HOSTPROG)
 CPPFLAGS+= -DENABLE_NLS -DLOCALEDIR=\"/usr/share/locale\"
 .endif
 
Thank you.

--
Ryo ONODERA // r...@tetera.org
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


CVS commit: src/share/man/man4

2019-05-26 Thread Ryo ONODERA
Module Name:src
Committed By:   ryoon
Date:   Sun May 26 19:34:57 UTC 2019

Modified Files:
src/share/man/man4: acpiwmi.4

Log Message:
Add <> to e-mail address


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/share/man/man4/acpiwmi.4

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

Modified files:

Index: src/share/man/man4/acpiwmi.4
diff -u src/share/man/man4/acpiwmi.4:1.8 src/share/man/man4/acpiwmi.4:1.9
--- src/share/man/man4/acpiwmi.4:1.8	Thu Nov  1 11:33:34 2012
+++ src/share/man/man4/acpiwmi.4	Sun May 26 19:34:57 2019
@@ -1,4 +1,4 @@
-.\" $NetBSD: acpiwmi.4,v 1.8 2012/11/01 11:33:34 jruoho Exp $
+.\" $NetBSD: acpiwmi.4,v 1.9 2019/05/26 19:34:57 ryoon Exp $
 .\"
 .\" Copyright (c) 2010 Jukka Ruohonen 
 .\" All rights reserved.
@@ -24,7 +24,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd November 1, 2012
+.Dd May 27, 2019
 .Dt ACPIWMI 4
 .Os
 .Sh NAME
@@ -83,7 +83,7 @@ device driver appeared in
 .Nx 6.0 .
 .Sh AUTHORS
 .An Jukka Ruohonen
-.Aq jruoho...@iki.fi
+.Aq Mt jruoho...@iki.fi
 wrote
 .Nm
 and most of the mappings.



CVS commit: src/share/man/man4

2019-05-26 Thread Ryo ONODERA
Module Name:src
Committed By:   ryoon
Date:   Sun May 26 19:36:22 UTC 2019

Modified Files:
src/share/man/man4: rgephy.4

Log Message:
ure(4) also uses rgephy(4)


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/share/man/man4/rgephy.4

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



CVS commit: src/share/man/man4

2019-05-26 Thread Ryo ONODERA
Module Name:src
Committed By:   ryoon
Date:   Sun May 26 19:36:22 UTC 2019

Modified Files:
src/share/man/man4: rgephy.4

Log Message:
ure(4) also uses rgephy(4)


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/share/man/man4/rgephy.4

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

Modified files:

Index: src/share/man/man4/rgephy.4
diff -u src/share/man/man4/rgephy.4:1.4 src/share/man/man4/rgephy.4:1.5
--- src/share/man/man4/rgephy.4:1.4	Sat Feb  9 08:08:32 2019
+++ src/share/man/man4/rgephy.4	Sun May 26 19:36:22 2019
@@ -1,6 +1,6 @@
 .\"	$OpenBSD: rgephy.4,v 1.3 2004/09/30 19:59:25 mickey Exp $
 .\"
-.\"	$NetBSD: rgephy.4,v 1.4 2019/02/09 08:08:32 rin Exp $
+.\"	$NetBSD: rgephy.4,v 1.5 2019/05/26 19:36:22 ryoon Exp $
 .\"
 .\" Copyright (c) 2004 Peter Valchev 
 .\"
@@ -16,7 +16,7 @@
 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 .\"
-.Dd February 9, 2019
+.Dd May 27, 2019
 .Dt RGEPHY 4
 .Os
 .Sh NAME
@@ -35,4 +35,5 @@ Ethernet adapters.
 .Xr intro 4 ,
 .Xr mii 4 ,
 .Xr re 4 ,
+.Xr ure 4 ,
 .Xr ifconfig 8



CVS commit: src/share/man/man4

2019-05-26 Thread Ryo ONODERA
Module Name:src
Committed By:   ryoon
Date:   Sun May 26 19:34:57 UTC 2019

Modified Files:
src/share/man/man4: acpiwmi.4

Log Message:
Add <> to e-mail address


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/share/man/man4/acpiwmi.4

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



CVS commit: src/share/man/man4

2019-05-26 Thread Ryo ONODERA
Module Name:src
Committed By:   ryoon
Date:   Sun May 26 22:30:23 UTC 2019

Modified Files:
src/share/man/man4: vioscsi.4

Log Message:
Set nosplit to suppress newline in AUTHORS


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/share/man/man4/vioscsi.4

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



CVS commit: src/share/man/man4

2019-05-26 Thread Ryo ONODERA
Module Name:src
Committed By:   ryoon
Date:   Sun May 26 22:30:23 UTC 2019

Modified Files:
src/share/man/man4: vioscsi.4

Log Message:
Set nosplit to suppress newline in AUTHORS


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/share/man/man4/vioscsi.4

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

Modified files:

Index: src/share/man/man4/vioscsi.4
diff -u src/share/man/man4/vioscsi.4:1.2 src/share/man/man4/vioscsi.4:1.3
--- src/share/man/man4/vioscsi.4:1.2	Wed May 17 09:03:12 2017
+++ src/share/man/man4/vioscsi.4	Sun May 26 22:30:23 2019
@@ -1,4 +1,4 @@
-.\" $NetBSD: vioscsi.4,v 1.2 2017/05/17 09:03:12 wiz Exp $
+.\" $NetBSD: vioscsi.4,v 1.3 2019/05/26 22:30:23 ryoon Exp $
 .\"
 .\" Copyright (c) 2017 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -24,7 +24,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd May 17, 2017
+.Dd May 27, 2019
 .Dt VIOSCSI 4
 .Os
 .Sh NAME
@@ -52,6 +52,7 @@ It first appeared in
 with further stabilization in
 .Nx 8.0 .
 .Sh AUTHORS
+.An -nosplit
 The
 .Nm
 driver was written by



Re: CVS commit: src/sys/conf

2019-06-18 Thread Ryo ONODERA
Hi,

chris...@zoulas.com (Christos Zoulas) writes:

> On Jun 18,  9:37pm, r...@tetera.org (Ryo ONODERA) wrote:
> -- Subject: Re: CVS commit: src/sys/conf
>
> | chris...@astron.com (Christos Zoulas) writes:
> | 
> | > Yes, the question becomes should be part of the default GENERIC build?
> | > I think not (like before).
> | 
> | I feel that chfs should be disabled by default.
> | And hopefully it should be documented that flash(4) is required
> | in filesystems.config or similar place.
>
> Yes, I agree. Can you supply a patch (documentation)?
> - there is no nand9 man page?

I will try to write the man page.

Thank you.

> christos

-- 
Ryo ONODERA // r...@tetera.org
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


Re: CVS commit: src/sys/conf

2019-06-17 Thread Ryo ONODERA
Hi,

"Christos Zoulas"  writes:

> Module Name:  src
> Committed By: christos
> Date: Mon Jun 17 17:06:39 UTC 2019
>
> Modified Files:
>   src/sys/conf: filesystems.config
>
> Log Message:
> comment out CHFS to fix build issues

I have the following lines in my local kernel config file
and it fixes the build issue.

+# Flash subsystem
+flash* at flashbus?
+
+# NAND subsystem
+nand* at nandbus?
+
+pseudo-device  nandemulator

dmesg -t:
nandemulator0: NAND emulator
nand0 at nandemulator0: ONFI NAND Flash
nand0: vendor: NETBSD, model: NANDEMULATOR
nand0: manufacturer id: 0x00 (Unknown), device id: 0x00
nand0: page size: 2048 bytes, spare size: 64 bytes, block size: 131072 bytes
nand0: LUN size: 256 blocks, LUNs: 1, total storage size: 32 MB
nand0: column cycles: 2, row cycles: 3, width: x16
flash0 at nand0: partition, size 32 MB, offset 0
flash0: erase size 128 KB, page size 2048 bytes, write size 2048 bytes

So it seems that chfs requires flash(4) device.

Thank you.

> To generate a diff of this commit:
> cvs rdiff -u -r1.12 -r1.13 src/sys/conf/filesystems.config
>
> Please note that diffs are not public domain; they are subject to the
> copyright notices on the relevant files.
>
> Modified files:
>
> Index: src/sys/conf/filesystems.config
> diff -u src/sys/conf/filesystems.config:1.12 
> src/sys/conf/filesystems.config:1.13
> --- src/sys/conf/filesystems.config:1.12  Sun Jun 16 23:34:01 2019
> +++ src/sys/conf/filesystems.config   Mon Jun 17 13:06:39 2019
> @@ -1,10 +1,10 @@
> -# $NetBSD: filesystems.config,v 1.12 2019/06/17 03:34:01 christos Exp $
> +# $NetBSD: filesystems.config,v 1.13 2019/06/17 17:06:39 christos Exp $
>  #file-system ADOSFS  # AmigaDOS-compatible file system
>  #options APPLE_UFS   # Apple UFS support in FFS
>  #file-system AUTOFS  # Automounter Filesystem
>  #pseudo-device   autofs  # experimental - AUTOFS
>  file-system  CD9660  # ISO 9660 + Rock Ridge file system
> -file-system  CHFS# Chip File System
> +#file-system CHFS# Chip File System
>  file-system  CODA# Coda File System; also needs vcoda (below)
>  pseudo-devicevcoda   # coda minicache <-> venus comm.
>  file-system  EFS # Silicon Graphics Extent File System
>

-- 
Ryo ONODERA // r...@tetera.org
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


CVS commit: src/sys/ufs/chfs

2019-06-17 Thread Ryo ONODERA
Module Name:src
Committed By:   ryoon
Date:   Mon Jun 17 17:14:56 UTC 2019

Modified Files:
src/sys/ufs/chfs: chfs_malloc.c chfs_pool.c chfs_scan.c chfs_vnops.c

Log Message:
Fix build without DIAGNOSTIC


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/ufs/chfs/chfs_malloc.c
cvs rdiff -u -r1.3 -r1.4 src/sys/ufs/chfs/chfs_pool.c
cvs rdiff -u -r1.7 -r1.8 src/sys/ufs/chfs/chfs_scan.c
cvs rdiff -u -r1.33 -r1.34 src/sys/ufs/chfs/chfs_vnops.c

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



CVS commit: src/sys/ufs/chfs

2019-06-17 Thread Ryo ONODERA
Module Name:src
Committed By:   ryoon
Date:   Mon Jun 17 17:14:56 UTC 2019

Modified Files:
src/sys/ufs/chfs: chfs_malloc.c chfs_pool.c chfs_scan.c chfs_vnops.c

Log Message:
Fix build without DIAGNOSTIC


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/ufs/chfs/chfs_malloc.c
cvs rdiff -u -r1.3 -r1.4 src/sys/ufs/chfs/chfs_pool.c
cvs rdiff -u -r1.7 -r1.8 src/sys/ufs/chfs/chfs_scan.c
cvs rdiff -u -r1.33 -r1.34 src/sys/ufs/chfs/chfs_vnops.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/ufs/chfs/chfs_malloc.c
diff -u src/sys/ufs/chfs/chfs_malloc.c:1.5 src/sys/ufs/chfs/chfs_malloc.c:1.6
--- src/sys/ufs/chfs/chfs_malloc.c:1.5	Thu Nov  9 22:16:38 2017
+++ src/sys/ufs/chfs/chfs_malloc.c	Mon Jun 17 17:14:56 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: chfs_malloc.c,v 1.5 2017/11/09 22:16:38 christos Exp $	*/
+/*	$NetBSD: chfs_malloc.c,v 1.6 2019/06/17 17:14:56 ryoon Exp $	*/
 
 /*-
  * Copyright (c) 2010 Department of Software Engineering,
@@ -218,7 +218,7 @@ chfs_free_refblock(struct chfs_node_ref 
 struct chfs_node_ref*
 chfs_alloc_node_ref(struct chfs_eraseblock *cheb)
 {
-	struct chfs_node_ref *nref, *new, *old;
+	struct chfs_node_ref *nref, *new, *old __diagused;
 	old = cheb->last_node;
 	nref = cheb->last_node;
 

Index: src/sys/ufs/chfs/chfs_pool.c
diff -u src/sys/ufs/chfs/chfs_pool.c:1.3 src/sys/ufs/chfs/chfs_pool.c:1.4
--- src/sys/ufs/chfs/chfs_pool.c:1.3	Mon Jan 29 15:48:50 2018
+++ src/sys/ufs/chfs/chfs_pool.c	Mon Jun 17 17:14:56 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: chfs_pool.c,v 1.3 2018/01/29 15:48:50 sevan Exp $	*/
+/*	$NetBSD: chfs_pool.c,v 1.4 2019/06/17 17:14:56 ryoon Exp $	*/
 
 /*-
  * Copyright (c) 2010 Department of Software Engineering,
@@ -62,7 +62,7 @@ void
 chfs_pool_init(struct chfs_pool *chpp, size_t size, const char *what,
 struct chfs_mount *chmp)
 {
-	int cnt;
+	int cnt __diagused;
 
 	cnt = snprintf(chpp->chp_name, sizeof(chpp->chp_name),
 	"%s_chfs_%p", what, chmp);

Index: src/sys/ufs/chfs/chfs_scan.c
diff -u src/sys/ufs/chfs/chfs_scan.c:1.7 src/sys/ufs/chfs/chfs_scan.c:1.8
--- src/sys/ufs/chfs/chfs_scan.c:1.7	Thu Jun  1 02:45:15 2017
+++ src/sys/ufs/chfs/chfs_scan.c	Mon Jun 17 17:14:56 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: chfs_scan.c,v 1.7 2017/06/01 02:45:15 chs Exp $	*/
+/*	$NetBSD: chfs_scan.c,v 1.8 2019/06/17 17:14:56 ryoon Exp $	*/
 
 /*-
  * Copyright (c) 2010 Department of Software Engineering,
@@ -178,7 +178,7 @@ int
 chfs_scan_mark_dirent_obsolete(struct chfs_mount *chmp,
 struct chfs_vnode_cache *vc, struct chfs_dirent *fd)
 {
-	struct chfs_eraseblock *cheb;
+	struct chfs_eraseblock *cheb __diagused;
 	struct chfs_node_ref *prev, *nref;
 
 	nref = fd->nref;

Index: src/sys/ufs/chfs/chfs_vnops.c
diff -u src/sys/ufs/chfs/chfs_vnops.c:1.33 src/sys/ufs/chfs/chfs_vnops.c:1.34
--- src/sys/ufs/chfs/chfs_vnops.c:1.33	Fri May 26 14:21:02 2017
+++ src/sys/ufs/chfs/chfs_vnops.c	Mon Jun 17 17:14:56 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: chfs_vnops.c,v 1.33 2017/05/26 14:21:02 riastradh Exp $	*/
+/*	$NetBSD: chfs_vnops.c,v 1.34 2019/06/17 17:14:56 ryoon Exp $	*/
 
 /*-
  * Copyright (c) 2010 Department of Software Engineering,
@@ -60,7 +60,7 @@ chfs_lookup(void *v)
 	struct chfs_inode* ip;
 	struct ufsmount* ump;
 	struct chfs_mount* chmp;
-	struct chfs_vnode_cache* chvc;
+	struct chfs_vnode_cache* chvc __diagused;
 	struct chfs_dirent* fd;
 
 	dbg("lookup(): %s\n", cnp->cn_nameptr);



Re: CVS commit: src/sys/conf

2019-06-18 Thread Ryo ONODERA
chris...@astron.com (Christos Zoulas) writes:

> Yes, the question becomes should be part of the default GENERIC build?
> I think not (like before).

I feel that chfs should be disabled by default.
And hopefully it should be documented that flash(4) is required
in filesystems.config or similar place.

Thank you.

> christos
>

-- 
Ryo ONODERA // r...@tetera.org
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


CVS commit: src/share/man/man3

2019-05-24 Thread Ryo ONODERA
Module Name:src
Committed By:   ryoon
Date:   Fri May 24 15:51:00 UTC 2019

Modified Files:
src/share/man/man3: tree.3

Log Message:
Add rbtree(3) to SEE ALSO


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/share/man/man3/tree.3

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



CVS commit: src/share/man/man3

2019-05-24 Thread Ryo ONODERA
Module Name:src
Committed By:   ryoon
Date:   Fri May 24 15:51:00 UTC 2019

Modified Files:
src/share/man/man3: tree.3

Log Message:
Add rbtree(3) to SEE ALSO


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/share/man/man3/tree.3

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

Modified files:

Index: src/share/man/man3/tree.3
diff -u src/share/man/man3/tree.3:1.12 src/share/man/man3/tree.3:1.13
--- src/share/man/man3/tree.3:1.12	Mon Jul  3 21:30:58 2017
+++ src/share/man/man3/tree.3	Fri May 24 15:50:59 2019
@@ -1,4 +1,4 @@
-.\"	$NetBSD: tree.3,v 1.12 2017/07/03 21:30:58 wiz Exp $
+.\"	$NetBSD: tree.3,v 1.13 2019/05/24 15:50:59 ryoon Exp $
 .\"	$OpenBSD: tree.3,v 1.23 2011/07/09 08:43:01 jmc Exp $
 .\"/*
 .\" * Copyright 2002 Niels Provos 
@@ -24,7 +24,7 @@
 .\" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 .\" * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\" */
-.Dd July 9, 2011
+.Dd May 25, 2019
 .Dt TREE 3
 .Os
 .Sh NAME
@@ -603,6 +603,9 @@ for (var = SPLAY_MIN(NAME, ); var !
 .\"return the pointer to the removed element, otherwise they return
 .\".Dv NULL
 .\"to indicate an error.
+.Sh SEE ALSO
+.Xr rbtree 3
+
 .Sh AUTHORS
 The author of the tree macros is
 .An Niels Provos .



CVS commit: src/share/man/man4

2019-05-24 Thread Ryo ONODERA
Module Name:src
Committed By:   ryoon
Date:   Fri May 24 16:02:08 UTC 2019

Modified Files:
src/share/man/man4: acpipmtr.4

Log Message:
Add <> for e-mail address


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/share/man/man4/acpipmtr.4

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



CVS commit: src/share/man/man4

2019-05-24 Thread Ryo ONODERA
Module Name:src
Committed By:   ryoon
Date:   Fri May 24 16:02:08 UTC 2019

Modified Files:
src/share/man/man4: acpipmtr.4

Log Message:
Add <> for e-mail address


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/share/man/man4/acpipmtr.4

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

Modified files:

Index: src/share/man/man4/acpipmtr.4
diff -u src/share/man/man4/acpipmtr.4:1.1 src/share/man/man4/acpipmtr.4:1.2
--- src/share/man/man4/acpipmtr.4:1.1	Wed Jan  5 20:08:13 2011
+++ src/share/man/man4/acpipmtr.4	Fri May 24 16:02:08 2019
@@ -1,4 +1,4 @@
-.\" $NetBSD: acpipmtr.4,v 1.1 2011/01/05 20:08:13 jruoho Exp $
+.\" $NetBSD: acpipmtr.4,v 1.2 2019/05/24 16:02:08 ryoon Exp $
 .\"
 .\" Copyright (c) 2010 Jukka Ruohonen 
 .\" All rights reserved.
@@ -24,7 +24,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd December 22, 2010
+.Dd May 25, 2019
 .Dt ACPIPMTR 4
 .Os
 .Sh NAME
@@ -59,7 +59,7 @@ device driver appeared in
 .Nx 6.0 .
 .Sh AUTHORS
 .An Jukka Ruohonen
-.Aq jruoho...@iki.fi
+.Aq Mt jruoho...@iki.fi
 .Sh CAVEATS
 The
 .Nm



CVS commit: src/sys/dev

2019-07-09 Thread Ryo ONODERA
Module Name:src
Committed By:   ryoon
Date:   Tue Jul  9 12:52:51 UTC 2019

Modified Files:
src/sys/dev/hid: hidms.c hidms.h
src/sys/dev/i2c: ims.c

Log Message:
Add tpcalib, touch panel calibration to ims(4)

Suggested by ryo@ at Japan NetBSD Users' Group BOF 2019-07-06.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/hid/hidms.c
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/hid/hidms.h
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/i2c/ims.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/hid/hidms.c
diff -u src/sys/dev/hid/hidms.c:1.2 src/sys/dev/hid/hidms.c:1.3
--- src/sys/dev/hid/hidms.c:1.2	Fri May 25 15:52:45 2018
+++ src/sys/dev/hid/hidms.c	Tue Jul  9 12:52:51 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: hidms.c,v 1.2 2018/05/25 15:52:45 ryoon Exp $	*/
+/*	$NetBSD: hidms.c,v 1.3 2019/07/09 12:52:51 ryoon Exp $	*/
 
 /*
  * Copyright (c) 1998, 2017 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: hidms.c,v 1.2 2018/05/25 15:52:45 ryoon Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hidms.c,v 1.3 2019/07/09 12:52:51 ryoon Exp $");
 
 #include 
 #include 
@@ -267,6 +267,7 @@ hidms_intr(struct hidms *ms, void *ibuf,
 	if (ms->flags & HIDMS_ABS) {
 		flags |= (WSMOUSE_INPUT_ABSOLUTE_X | WSMOUSE_INPUT_ABSOLUTE_Y);
 		dy = hid_get_data(ibuf, >hidms_loc_y);
+		tpcalib_trans(>sc_tpcalib, dx, dy, , );
 	} else
 		dy = -hid_get_data(ibuf, >hidms_loc_y);
 	dz =  hid_get_data(ibuf, >hidms_loc_z);

Index: src/sys/dev/hid/hidms.h
diff -u src/sys/dev/hid/hidms.h:1.1 src/sys/dev/hid/hidms.h:1.2
--- src/sys/dev/hid/hidms.h:1.1	Sun Dec 10 17:03:07 2017
+++ src/sys/dev/hid/hidms.h	Tue Jul  9 12:52:51 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: hidms.h,v 1.1 2017/12/10 17:03:07 bouyer Exp $	*/
+/*	$NetBSD: hidms.h,v 1.2 2019/07/09 12:52:51 ryoon Exp $	*/
 
 /*
  * Copyright (c) 1998, 2017 The NetBSD Foundation, Inc.
@@ -32,6 +32,7 @@
 
 #include 
 #include 
+#include 
 
 #define MAX_BUTTONS	31	/* must not exceed size of sc_buttons */
 
@@ -55,6 +56,9 @@ struct hidms {
 
 	uint32_t hidms_buttons;	/* mouse button status */
 	device_t hidms_wsmousedev;
+
+	struct tpcalib_softc sc_tpcalib; /* calibration */
+	struct wsmouse_calibcoords sc_calibcoords;
 };
 
 bool hidms_setup(device_t, struct hidms *, int, void *, int);

Index: src/sys/dev/i2c/ims.c
diff -u src/sys/dev/i2c/ims.c:1.1 src/sys/dev/i2c/ims.c:1.2
--- src/sys/dev/i2c/ims.c:1.1	Sun Dec 10 17:05:54 2017
+++ src/sys/dev/i2c/ims.c	Tue Jul  9 12:52:51 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: ims.c,v 1.1 2017/12/10 17:05:54 bouyer Exp $ */
+/* $NetBSD: ims.c,v 1.2 2019/07/09 12:52:51 ryoon Exp $ */
 /* $OpenBSD ims.c,v 1.1 2016/01/12 01:11:15 jcs Exp $ */
 
 /*
@@ -20,7 +20,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ims.c,v 1.1 2017/12/10 17:05:54 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ims.c,v 1.2 2019/07/09 12:52:51 ryoon Exp $");
 
 #include 
 #include 
@@ -92,6 +92,8 @@ ims_attach(device_t parent, device_t sel
 	struct ihidev_attach_arg *iha = (struct ihidev_attach_arg *)aux;
 	int size, repid;
 	void *desc;
+	struct hid_data * d __debugused;
+	struct hid_item item __debugused;
 
 	sc->sc_hdev.sc_idev = self;
 	sc->sc_hdev.sc_intr = ims_intr;
@@ -110,6 +112,30 @@ ims_attach(device_t parent, device_t sel
 	if (!hidms_setup(self, ms, iha->reportid, desc, size) != 0)
 		return;
 
+#if defined(DEBUG)
+	/* calibrate the touchscreen */
+	memset(>sc_ms.sc_calibcoords, 0, sizeof(sc->sc_ms.sc_calibcoords));
+	d = hid_start_parse(desc, size, hid_input);
+	if (d != NULL) {
+		while (hid_get_item(d, )) {
+			if (item.kind != hid_input
+			|| HID_GET_USAGE_PAGE(item.usage) != HUP_GENERIC_DESKTOP
+			|| item.report_ID != sc->sc_hdev.sc_report_id)
+continue;
+			if (HID_GET_USAGE(item.usage) == HUG_X) {
+aprint_normal("X range: %d - %d\n", item.logical_minimum, item.logical_maximum);
+			}
+			if (HID_GET_USAGE(item.usage) == HUG_Y) {
+aprint_normal("Y range: %d - %d\n", item.logical_minimum, item.logical_maximum);
+			}
+		}
+		hid_end_parse(d);
+	}
+#endif
+	tpcalib_init(>sc_ms.sc_tpcalib);
+	tpcalib_ioctl(>sc_ms.sc_tpcalib, WSMOUSEIO_SCALIBCOORDS,
+	(void *)>sc_ms.sc_calibcoords, 0, 0);
+
 	hidms_attach(self, ms, _accessops);
 }
 
@@ -199,6 +225,9 @@ ims_ioctl(void *v, u_long cmd, void *dat
 			*(u_int *)data = WSMOUSE_TYPE_USB;
 		}
 		return 0;
+	case WSMOUSEIO_SCALIBCOORDS:
+	case WSMOUSEIO_GCALIBCOORDS:
+		return tpcalib_ioctl(>sc_ms.sc_tpcalib, cmd, data, flag, l);
 	}
 	return EPASSTHROUGH;
 }



CVS commit: src/sys/dev

2019-07-09 Thread Ryo ONODERA
Module Name:src
Committed By:   ryoon
Date:   Tue Jul  9 12:52:51 UTC 2019

Modified Files:
src/sys/dev/hid: hidms.c hidms.h
src/sys/dev/i2c: ims.c

Log Message:
Add tpcalib, touch panel calibration to ims(4)

Suggested by ryo@ at Japan NetBSD Users' Group BOF 2019-07-06.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/hid/hidms.c
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/hid/hidms.h
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/i2c/ims.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

2019-07-09 Thread Ryo ONODERA
Module Name:src
Committed By:   ryoon
Date:   Tue Jul  9 12:56:30 UTC 2019

Modified Files:
src/sys/dev/hid: hidms.c
src/sys/dev/i2c: ims.c

Log Message:
Enable finger touch panel of HP Spectre x360 13-inch ae019TU


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/hid/hidms.c
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/i2c/ims.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/hid/hidms.c
diff -u src/sys/dev/hid/hidms.c:1.3 src/sys/dev/hid/hidms.c:1.4
--- src/sys/dev/hid/hidms.c:1.3	Tue Jul  9 12:52:51 2019
+++ src/sys/dev/hid/hidms.c	Tue Jul  9 12:56:30 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: hidms.c,v 1.3 2019/07/09 12:52:51 ryoon Exp $	*/
+/*	$NetBSD: hidms.c,v 1.4 2019/07/09 12:56:30 ryoon Exp $	*/
 
 /*
  * Copyright (c) 1998, 2017 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: hidms.c,v 1.3 2019/07/09 12:52:51 ryoon Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hidms.c,v 1.4 2019/07/09 12:56:30 ryoon Exp $");
 
 #include 
 #include 
@@ -81,8 +81,11 @@ hidms_setup(device_t self, struct hidms 
 	bool isdigitizer;
 	int i, hl;
 
+	/* Sync with ims_match() */
 	isdigitizer = hid_is_collection(desc, size, id,
-	HID_USAGE2(HUP_DIGITIZERS, 0x0002));
+	HID_USAGE2(HUP_DIGITIZERS, HUD_PEN)) ||
+hid_is_collection(desc, size, id,
+		HID_USAGE2(HUP_DIGITIZERS, HUD_TOUCH_SCREEN));
 
 	if (!hid_locate(desc, size, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_X),
 	   id, hid_input, >hidms_loc_x, )) {

Index: src/sys/dev/i2c/ims.c
diff -u src/sys/dev/i2c/ims.c:1.2 src/sys/dev/i2c/ims.c:1.3
--- src/sys/dev/i2c/ims.c:1.2	Tue Jul  9 12:52:51 2019
+++ src/sys/dev/i2c/ims.c	Tue Jul  9 12:56:30 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: ims.c,v 1.2 2019/07/09 12:52:51 ryoon Exp $ */
+/* $NetBSD: ims.c,v 1.3 2019/07/09 12:56:30 ryoon Exp $ */
 /* $OpenBSD ims.c,v 1.1 2016/01/12 01:11:15 jcs Exp $ */
 
 /*
@@ -20,7 +20,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ims.c,v 1.2 2019/07/09 12:52:51 ryoon Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ims.c,v 1.3 2019/07/09 12:56:30 ryoon Exp $");
 
 #include 
 #include 
@@ -81,6 +81,10 @@ ims_match(device_t parent, cfdata_t matc
 	HID_USAGE2(HUP_DIGITIZERS, HUD_PEN)))
 		return (IMATCH_IFACECLASS);
 
+	if (hid_is_collection(desc, size, iha->reportid,
+	HID_USAGE2(HUP_DIGITIZERS, HUD_TOUCH_SCREEN)))
+		return (IMATCH_IFACECLASS);
+
 	return (IMATCH_NONE);
 }
 



CVS commit: src/sys/dev/wscons

2019-07-09 Thread Ryo ONODERA
Module Name:src
Committed By:   ryoon
Date:   Tue Jul  9 12:55:46 UTC 2019

Modified Files:
src/sys/dev/wscons: tpcalib.c

Log Message:
Do not overflow int64_t on HP Spectre x360 13-inch ae019TU

The machine has pen touch panel with (18344, 10544) -> (3840, 2160)
conversion.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/wscons/tpcalib.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/wscons

2019-07-09 Thread Ryo ONODERA
Module Name:src
Committed By:   ryoon
Date:   Tue Jul  9 12:55:46 UTC 2019

Modified Files:
src/sys/dev/wscons: tpcalib.c

Log Message:
Do not overflow int64_t on HP Spectre x360 13-inch ae019TU

The machine has pen touch panel with (18344, 10544) -> (3840, 2160)
conversion.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/wscons/tpcalib.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/wscons/tpcalib.c
diff -u src/sys/dev/wscons/tpcalib.c:1.12 src/sys/dev/wscons/tpcalib.c:1.13
--- src/sys/dev/wscons/tpcalib.c:1.12	Thu Apr  6 20:44:39 2017
+++ src/sys/dev/wscons/tpcalib.c	Tue Jul  9 12:55:45 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: tpcalib.c,v 1.12 2017/04/06 20:44:39 macallan Exp $	*/
+/*	$NetBSD: tpcalib.c,v 1.13 2019/07/09 12:55:45 ryoon Exp $	*/
 
 /*
  * Copyright (c) 1999-2003 TAKEMURA Shin All rights reserved.
@@ -28,7 +28,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tpcalib.c,v 1.12 2017/04/06 20:44:39 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tpcalib.c,v 1.13 2019/07/09 12:55:45 ryoon Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_tpcalib.h"
@@ -53,7 +53,7 @@ extern int mra_Y_AX1_BX2_C(const int *, 
 			   const int *, int, const int *, int, int, int,
 			   int *, int *, int *);
 
-#define SCALE	(1024*256)
+#define SCALE	(1024)
 
 int
 tpcalib_init(struct tpcalib_softc *sc)



CVS commit: src/sys/dev

2019-07-09 Thread Ryo ONODERA
Module Name:src
Committed By:   ryoon
Date:   Tue Jul  9 12:56:30 UTC 2019

Modified Files:
src/sys/dev/hid: hidms.c
src/sys/dev/i2c: ims.c

Log Message:
Enable finger touch panel of HP Spectre x360 13-inch ae019TU


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/hid/hidms.c
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/i2c/ims.c

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



CVS commit: src/etc

2019-09-15 Thread Ryo ONODERA
Module Name:src
Committed By:   ryoon
Date:   Sun Sep 15 12:54:21 UTC 2019

Modified Files:
src/etc: MAKEDEV.tmpl

Log Message:
Replace major number in MAKEDEV for vhci


To generate a diff of this commit:
cvs rdiff -u -r1.206 -r1.207 src/etc/MAKEDEV.tmpl

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

Modified files:

Index: src/etc/MAKEDEV.tmpl
diff -u src/etc/MAKEDEV.tmpl:1.206 src/etc/MAKEDEV.tmpl:1.207
--- src/etc/MAKEDEV.tmpl:1.206	Sat Sep 14 06:57:52 2019
+++ src/etc/MAKEDEV.tmpl	Sun Sep 15 12:54:21 2019
@@ -1,5 +1,5 @@
 #!/bin/sh -
-#	$NetBSD: MAKEDEV.tmpl,v 1.206 2019/09/14 06:57:52 maxv Exp $
+#	$NetBSD: MAKEDEV.tmpl,v 1.207 2019/09/15 12:54:21 ryoon Exp $
 #
 # Copyright (c) 2003,2007,2008 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -1794,7 +1794,7 @@ veriexec)
 	;;
 
 vhci)
-	mkdev vhci c %vhci% 0
+	mkdev vhci c %vhci_chr% 0
 	;;
 
 ttyv[0-9]*)



CVS commit: src/etc

2019-09-15 Thread Ryo ONODERA
Module Name:src
Committed By:   ryoon
Date:   Sun Sep 15 12:54:21 UTC 2019

Modified Files:
src/etc: MAKEDEV.tmpl

Log Message:
Replace major number in MAKEDEV for vhci


To generate a diff of this commit:
cvs rdiff -u -r1.206 -r1.207 src/etc/MAKEDEV.tmpl

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



Re: CVS commit: src/external/gpl3/gcc/dist/libstdc++-v3

2019-07-31 Thread Ryo ONODERA
Hi,

"Christos Zoulas"  writes:

> Module Name:  src
> Committed By: christos
> Date: Wed Jul 31 16:40:26 UTC 2019
>
> Modified Files:
>   src/external/gpl3/gcc/dist/libstdc++-v3: configure
>
> Log Message:
> Manually patch the locale configuration to use the dragonfly code instead
> of generic.
>
>
> To generate a diff of this commit:
> cvs rdiff -u -r1.11 -r1.12 src/external/gpl3/gcc/dist/libstdc++-v3/configure
>
> Please note that diffs are not public domain; they are subject to the
> copyright notices on the relevant files.

Some other changes in your g++locale.diff are required to
enable DragonFly code.
Are there any plans to commit the others?

Thanks for your great works.

-- 
Ryo ONODERA // r...@tetera.org
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


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

2019-07-29 Thread Ryo ONODERA
Hi,

Rin Okuyama  writes:

> I committed a (possible) fix:
> http://mail-index.netbsd.org/source-changes/2019/07/29/msg107649.html
>
> Could you try rasops_putchar_width.h 1.8?

With rasops_putchar_width.h 1.8, NetBSD/amd64-current on
my laptop works fine again.

Thanks for your quick fix.

> Thanks,
> rin

-- 
Ryo ONODERA // r...@tetera.org
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


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

2019-07-29 Thread Ryo ONODERA
rror: CommandComplete opcode (003|0003) failed 
(status=0x01)
dwiic0: timed out waiting for stop intr
dwiic0: timed out waiting for stop intr
dwiic0: timed out waiting for stop intr
dwiic0: timed out waiting for stop intr


Thank you.

-- 
Ryo ONODERA // r...@tetera.org
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


CVS commit: src/share/man/man4

2019-08-05 Thread Ryo ONODERA
Module Name:src
Committed By:   ryoon
Date:   Mon Aug  5 15:06:47 UTC 2019

Modified Files:
src/share/man/man4: sb.4

Log Message:
pnpbios.4 is in i386


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/share/man/man4/sb.4

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



Re: CVS commit: src/external/gpl3/gcc/dist/libstdc++-v3

2019-08-01 Thread Ryo ONODERA
Hi,

Christos Zoulas  writes:

> Thank you. What's left now is to re-run mknative to regenerate the defs.mk 
> file for libstdc++.
> mrg@ is going to do it for all archs at once because it will require an 
> UPDATING entry to
> mention to clean in /usr/src/external/gpl3/lib/libstdc++. Once that is done 
> and all the archs
> are building, I will issue pull-ups for -9.

Thanks for your explanation.
I am waiting the fix.
And I am happy to hear the fix will be included in netbsd-9.

> Best,
>
> christos
>
>> On Aug 1, 2019, at 3:30 AM, Ryo ONODERA  wrote:
>> 
>> Hi,
>> 
>> "Christos Zoulas"  writes:
>> 
>>> Module Name:src
>>> Committed By:   christos
>>> Date:   Wed Jul 31 16:40:26 UTC 2019
>>> 
>>> Modified Files:
>>> src/external/gpl3/gcc/dist/libstdc++-v3: configure
>>> 
>>> Log Message:
>>> Manually patch the locale configuration to use the dragonfly code instead
>>> of generic.
>>> 
>>> 
>>> To generate a diff of this commit:
>>> cvs rdiff -u -r1.11 -r1.12 src/external/gpl3/gcc/dist/libstdc++-v3/configure
>>> 
>>> Please note that diffs are not public domain; they are subject to the
>>> copyright notices on the relevant files.
>> 
>> Some other changes in your g++locale.diff are required to
>> enable DragonFly code.
>> Are there any plans to commit the others?
>> 
>> Thanks for your great works.
>> 
>> -- 
>> Ryo ONODERA // r...@tetera.org
>> PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3
>

-- 
Ryo ONODERA // r...@tetera.org
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


Re: CVS commit: src/sys/dev

2019-07-24 Thread Ryo ONODERA
Hi,

Yorick Hardy  writes:

> Dear Ryo,
>
> On 2019-07-09, Ryo ONODERA wrote:
>> Module Name: src
>> Committed By:ryoon
>> Date:Tue Jul  9 12:52:51 UTC 2019
>> 
>> Modified Files:
>>  src/sys/dev/hid: hidms.c hidms.h
>>  src/sys/dev/i2c: ims.c
>> 
>> Log Message:
>> Add tpcalib, touch panel calibration to ims(4)
>> 
>> Suggested by ryo@ at Japan NetBSD Users' Group BOF 2019-07-06.
>> 
>> 
>> To generate a diff of this commit:
>> cvs rdiff -u -r1.2 -r1.3 src/sys/dev/hid/hidms.c
>> cvs rdiff -u -r1.1 -r1.2 src/sys/dev/hid/hidms.h
>> cvs rdiff -u -r1.1 -r1.2 src/sys/dev/i2c/ims.c
>> 
>> Please note that diffs are not public domain; they are subject to the
>> copyright notices on the relevant files.
>
> I think this change has the side effect that ums(4) devices which
> report absolute coordinates seem to stop "moving" because
> tcpalib_init is never called for these devices.
>
> Is the patch below okay? Or, should hidms call tcpalib_init?
> (I tested the patch with an ACECAD digimemo.)

Sorry for breakage.
It looks good to me.
And I feel tpcalib_init should be called from ums.c like your patch.
Could you commit it?

Thank you.

> -- 
> Kind regards,
>
> Yorick Hardy
>
> Index: sys/dev/usb/ums.c
> ===
> RCS file: /cvsroot/src/sys/dev/usb/ums.c,v
> retrieving revision 1.93
> diff -u -r1.93 ums.c
> --- sys/dev/usb/ums.c 5 May 2019 03:17:54 -   1.93
> +++ sys/dev/usb/ums.c 24 Jul 2019 21:29:35 -
> @@ -192,6 +192,7 @@
>   }
>   }
>  
> + tpcalib_init(>sc_ms.sc_tpcalib);
>   hidms_attach(self, >sc_ms, _accessops);
>  }
>  

-- 
Ryo ONODERA // r...@tetera.org
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


Re: CVS commit: src/sys/dev

2019-07-25 Thread Ryo ONODERA
Hi,

O.k.
I will commit your fix later.

Thank you.

Yorick Hardy  writes:

> Dear Ryo,
>
> On 2019-07-25, Ryo ONODERA wrote:
>> Hi,
>> 
>> Yorick Hardy  writes:
>> 
>> > Dear Ryo,
>> >
>> > On 2019-07-09, Ryo ONODERA wrote:
>> >> Module Name:  src
>> >> Committed By: ryoon
>> >> Date: Tue Jul  9 12:52:51 UTC 2019
>> >> 
>> >> Modified Files:
>> >>   src/sys/dev/hid: hidms.c hidms.h
>> >>   src/sys/dev/i2c: ims.c
>> >> 
>> >> Log Message:
>> >> Add tpcalib, touch panel calibration to ims(4)
>> >> 
>> >> Suggested by ryo@ at Japan NetBSD Users' Group BOF 2019-07-06.
>> >> 
>> >> 
>> >> To generate a diff of this commit:
>> >> cvs rdiff -u -r1.2 -r1.3 src/sys/dev/hid/hidms.c
>> >> cvs rdiff -u -r1.1 -r1.2 src/sys/dev/hid/hidms.h
>> >> cvs rdiff -u -r1.1 -r1.2 src/sys/dev/i2c/ims.c
>> >> 
>> >> Please note that diffs are not public domain; they are subject to the
>> >> copyright notices on the relevant files.
>> >
>> > I think this change has the side effect that ums(4) devices which
>> > report absolute coordinates seem to stop "moving" because
>> > tcpalib_init is never called for these devices.
>> >
>> > Is the patch below okay? Or, should hidms call tcpalib_init?
>> > (I tested the patch with an ACECAD digimemo.)
>> 
>> Sorry for breakage.
>> It looks good to me.
>> And I feel tpcalib_init should be called from ums.c like your patch.
>> Could you commit it?
>
> I am very sorry, but I retired my commit privilege because I was
> contributing very little to NetBSD. Otherwise I would be happy to do so!
>
>> Thank you.
>> 
>> > -- 
>> > Kind regards,
>> >
>> > Yorick Hardy
>> >
>> > Index: sys/dev/usb/ums.c
>> > ===
>> > RCS file: /cvsroot/src/sys/dev/usb/ums.c,v
>> > retrieving revision 1.93
>> > diff -u -r1.93 ums.c
>> > --- sys/dev/usb/ums.c  5 May 2019 03:17:54 -   1.93
>> > +++ sys/dev/usb/ums.c  24 Jul 2019 21:29:35 -
>> > @@ -192,6 +192,7 @@
>> >}
>> >}
>> >  
>> > +  tpcalib_init(>sc_ms.sc_tpcalib);
>> >hidms_attach(self, >sc_ms, _accessops);
>> >  }
>> >  
>> 
>> -- 
>> Ryo ONODERA // r...@tetera.org
>> PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3
>
> -- 
> Kind regards,
>
> Yorick Hardy

-- 
Ryo ONODERA // r...@tetera.org
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


Re: CVS commit: src

2019-10-28 Thread Ryo ONODERA
oto err_dmamap;
> + }
> + error = bus_dmamap_load(virtio_dmat(vsc), sc->sc_dmamap_rx,
> + sc->sc_buf_rx, VIO9P_MAX_REQLEN, NULL, BUS_DMA_WAITOK | 
> BUS_DMA_READ);
> + if (error != 0) {
> + aprint_error_dev(sc->sc_dev, "bus_dmamap_load failed: %d\n",
> + error);
> + goto err_dmamap;
> + }
> +
> + sc->sc_state = VIO9P_S_INIT;
> + mutex_init(>sc_lock, MUTEX_DEFAULT, IPL_NONE);
> + cv_init(>sc_wait, "vio9p");
> +
> + vio9p_read_config(sc);
> + aprint_normal_dev(self, "tagged as %s\n", sc->sc_tag);
> +
> + error = virtio_child_attach_finish(vsc);
> + if (error != 0)
> + goto err_mutex;
> +
> + return;
> +
> +err_mutex:
> + cv_destroy(>sc_wait);
> + mutex_destroy(>sc_lock);
> +err_dmamap:
> + bus_dmamap_destroy(virtio_dmat(vsc), sc->sc_dmamap_tx);
> + bus_dmamap_destroy(virtio_dmat(vsc), sc->sc_dmamap_rx);
> +err_vq:
> + virtio_free_vq(vsc, >sc_vq[0]);
> +err_none:
> + virtio_child_attach_failed(vsc);
> + return;
> +}
> +
> +static void
> +vio9p_read_config(struct vio9p_softc *sc)
> +{
> + device_t dev = sc->sc_dev;
> + uint8_t reg;
> + int i;
> +
> + /* these values are explicitly specified as little-endian */
> + reg = virtio_read_device_config_2(sc->sc_virtio, VIO9P_CONFIG_TAG_LEN);
> + sc->sc_taglen = le16toh(reg);
> +
> + if (sc->sc_taglen > P9_MAX_TAG_LEN) {
> + aprint_error_dev(dev, "warning: tag is trimmed from %u to %u\n",
> + sc->sc_taglen, P9_MAX_TAG_LEN);
> + sc->sc_taglen = P9_MAX_TAG_LEN;
> + }
> +
> + for (i = 0; i < sc->sc_taglen; i++) {
> + reg = virtio_read_device_config_1(sc->sc_virtio,
> + VIO9P_CONFIG_TAG + i);
> + sc->sc_tag[i] = reg;
> + }
> + sc->sc_tag[i] = '\0';
> +}
> +
> +static int
> +vio9p_request_done(struct virtqueue *vq)
> +{
> + struct virtio_softc *vsc = vq->vq_owner;
> + struct vio9p_softc *sc = device_private(virtio_child(vsc));
> +
> + DLOG("enter");
> +
> + mutex_enter(>sc_lock);
> + sc->sc_state = VIO9P_S_REPLIED;
> + cv_broadcast(>sc_wait);
> + selnotify(>sc_sel, 0, 1);
> + mutex_exit(>sc_lock);
> +
> + return 1;
> +}
> +
> +MODULE(MODULE_CLASS_DRIVER, vio9p, "virtio");
> +
> +#ifdef _MODULE
> +#include "ioconf.c"
> +#endif
> +
> +static int
> +vio9p_modcmd(modcmd_t cmd, void *opaque)
> +{
> +#ifdef _MODULE
> + devmajor_t bmajor = NODEVMAJOR, cmajor = NODEVMAJOR;
> +#endif
> + int error = 0;
> +
> +#ifdef _MODULE
> + switch (cmd) {
> + case MODULE_CMD_INIT:
> + error = config_init_component(cfdriver_ioconf_vio9p,
> + cfattach_ioconf_vio9p, cfdata_ioconf_vio9p);
> + devsw_attach(vio9p_cd.cd_name, NULL, ,
> + _cdevsw, );
> + break;
> + case MODULE_CMD_FINI:
> + error = config_fini_component(cfdriver_ioconf_vio9p,
> + cfattach_ioconf_vio9p, cfdata_ioconf_vio9p);
> + break;
> + default:
> + error = ENOTTY;
> + break;
> + }
> +#endif
> +
> + return error;
> +}
>
> Index: src/sys/modules/vio9p/Makefile
> diff -u /dev/null src/sys/modules/vio9p/Makefile:1.1
> --- /dev/null Mon Oct 28 02:56:41 2019
> +++ src/sys/modules/vio9p/MakefileMon Oct 28 02:56:40 2019
> @@ -0,0 +1,12 @@
> +#$NetBSD: Makefile,v 1.1 2019/10/28 02:56:40 ozaki-r Exp $
> +
> +.include "../Makefile.inc"
> +
> +.PATH:   ${S}/dev/pci
> +
> +KMOD=vio9p
> +IOCONF=  vio9p.ioconf
> +
> +SRCS+=   vio9p.c
> +
> +.include 
> Index: src/sys/modules/vio9p/vio9p.ioconf
> diff -u /dev/null src/sys/modules/vio9p/vio9p.ioconf:1.1
> --- /dev/null Mon Oct 28 02:56:41 2019
> +++ src/sys/modules/vio9p/vio9p.ioconfMon Oct 28 02:56:40 2019
> @@ -0,0 +1,10 @@
> +#   $NetBSD: vio9p.ioconf,v 1.1 2019/10/28 02:56:40 ozaki-r Exp $
> +
> +ioconf vio9p
> +
> +include "conf/files"
> +include "dev/pci/files.pci"
> +
> +pseudo-root virtio*
> +
> +vio9p* at virtio?
>

-- 
Ryo ONODERA // r...@tetera.org
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


CVS commit: src/share/man/man4

2019-10-15 Thread Ryo ONODERA
Module Name:src
Committed By:   ryoon
Date:   Tue Oct 15 13:21:19 UTC 2019

Modified Files:
src/share/man/man4: bge.4

Log Message:
Add Apple adapter, A1433


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/share/man/man4/bge.4

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

Modified files:

Index: src/share/man/man4/bge.4
diff -u src/share/man/man4/bge.4:1.16 src/share/man/man4/bge.4:1.17
--- src/share/man/man4/bge.4:1.16	Wed Feb 20 17:00:20 2019
+++ src/share/man/man4/bge.4	Tue Oct 15 13:21:19 2019
@@ -1,4 +1,4 @@
-.\"	$NetBSD: bge.4,v 1.16 2019/02/20 17:00:20 msaitoh Exp $
+.\"	$NetBSD: bge.4,v 1.17 2019/10/15 13:21:19 ryoon Exp $
 .\"
 .\" Copyright (c) 2003 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd February 20, 2019
+.Dd October 15, 2019
 .Dt BGE 4
 .Os
 .Sh NAME
@@ -57,6 +57,8 @@ including the following:
 .It
 Allied-Telesis AT-2972LX10/LC
 .It
+Apple Thunderbolt to Gigabit Ethernet adapter A1433 (10/100/1000baseT)
+.It
 Dell PowerEdge 1750 integrated BCM5704C NIC (10/100/1000baseT)
 .It
 Dell PowerEdge 2550 integrated BCM5700 NIC (10/100/1000baseT)



CVS commit: src/share/man/man4

2019-10-15 Thread Ryo ONODERA
Module Name:src
Committed By:   ryoon
Date:   Tue Oct 15 13:21:19 UTC 2019

Modified Files:
src/share/man/man4: bge.4

Log Message:
Add Apple adapter, A1433


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/share/man/man4/bge.4

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



CVS commit: src/share/man/man4

2019-10-05 Thread Ryo ONODERA
Module Name:src
Committed By:   ryoon
Date:   Sat Oct  5 06:28:50 UTC 2019

Modified Files:
src/share/man/man4: ihidev.4

Log Message:
Fix a pasto, uhdiev, bump date


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/share/man/man4/ihidev.4

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

Modified files:

Index: src/share/man/man4/ihidev.4
diff -u src/share/man/man4/ihidev.4:1.2 src/share/man/man4/ihidev.4:1.3
--- src/share/man/man4/ihidev.4:1.2	Mon Dec 11 23:06:35 2017
+++ src/share/man/man4/ihidev.4	Sat Oct  5 06:28:50 2019
@@ -1,4 +1,4 @@
-.\" $NetBSD: ihidev.4,v 1.2 2017/12/11 23:06:35 wiz Exp $
+.\" $NetBSD: ihidev.4,v 1.3 2019/10/05 06:28:50 ryoon Exp $
 .\"
 .\" Copyright (c) 2001,2017 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd December 10, 2017
+.Dd October 5, 2019
 .Dt IHIDEV 4
 .Os
 .Sh NAME
@@ -35,7 +35,7 @@
 .Nd I2C Human Interface Device support
 .Sh SYNOPSIS
 .Cd "ihidev* at iic?"
-.Cd "ims*at uhidev? reportid ?"
+.Cd "ims*at ihidev? reportid ?"
 .Sh DESCRIPTION
 The
 .Nm



CVS commit: src/share/man/man4

2019-10-05 Thread Ryo ONODERA
Module Name:src
Committed By:   ryoon
Date:   Sat Oct  5 06:28:50 UTC 2019

Modified Files:
src/share/man/man4: ihidev.4

Log Message:
Fix a pasto, uhdiev, bump date


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/share/man/man4/ihidev.4

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



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

2019-12-25 Thread Ryo ONODERA
Hi,

Emmanuel Dreyfus  writes:

> On Tue, Dec 24, 2019 at 05:50:00PM +0900, Ryo ONODERA wrote:
>> After this change, amd64 kernel does not boot on my HP Spectre x360
>> 13-inch ae019TU laptop with pure UEFI boot mode.
>
> Hello
>
> Does the attached patch (crafted for port-amd64/54775) fix the
> problem?

Without your patch, the kernel does not boot at all,
so after the kernel is loaded, only "_" character is displayed.

And your patch still does not work properly, so the kernel hangs
after cpu0 (as same as msaitoh@'s however it hits 100% for my
laptop).

The attached patch works for me.
However I have no idea about the meaning.

Index: sys/arch/amd64/amd64/locore.S
===
RCS file: /cvsroot/src/sys/arch/amd64/amd64/locore.S,v
retrieving revision 1.195
diff -u -r1.195 locore.S
--- sys/arch/amd64/amd64/locore.S	15 Dec 2019 02:58:21 -	1.195
+++ sys/arch/amd64/amd64/locore.S	25 Dec 2019 10:36:18 -
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.S,v 1.195 2019/12/15 02:58:21 manu Exp $	*/
+/*	$NetBSD: locore.S,v 1.193 2019/12/10 02:06:07 manu Exp $	*/
 
 /*
  * Copyright-o-rama!
@@ -432,9 +432,9 @@
 	.space	512
 tmpstk:
 
-.section multiboot,"a"
-#if defined(MULTIBOOT)
+.section multiboot,"ax",@progbits
 	.align	8
+#if defined(MULTIBOOT)
 	.globl	Multiboot2_Header
 _C_LABEL(Multiboot2_Header):
 	.int	MULTIBOOT2_HEADER_MAGIC
@@ -474,6 +474,9 @@
 	.align	8
 	.globl	Multiboot2_Header_end
 _C_LABEL(Multiboot2_Header_end):
+#else /* MULTIBOOT */
+	.int	0xdeadbeef	/* have some non empty content */
+	.align	8
 #endif	/* MULTIBOOT */
 
 /*

Thank you.

> -- 
> Emmanuel Dreyfus
> m...@netbsd.org
> Index: sys/arch/amd64/amd64/locore.S
> ===
> RCS file: /cvsroot/src/sys/arch/amd64/amd64/locore.S,v
> retrieving revision 1.195
> diff -U4 -r1.195 locore.S
> --- sys/arch/amd64/amd64/locore.S 15 Dec 2019 02:58:21 -  1.195
> +++ sys/arch/amd64/amd64/locore.S 22 Dec 2019 02:23:11 -
> @@ -432,10 +432,10 @@
>   .space  512
>  tmpstk:
>  
>  .section multiboot,"a"
> -#if defined(MULTIBOOT)
>   .align  8
> +#if defined(MULTIBOOT)
>   .globl  Multiboot2_Header
>  _C_LABEL(Multiboot2_Header):
>   .intMULTIBOOT2_HEADER_MAGIC
>   .intMULTIBOOT2_ARCHITECTURE_I386
> @@ -473,8 +473,11 @@
>   .int8   /* sizeof(struct multiboot_tag) */
>   .align  8
>   .globl  Multiboot2_Header_end
>  _C_LABEL(Multiboot2_Header_end):
> +#else /* MULTIBOOT */
> + .int0xdeadbeef  /* have some non empty content */
> + .align  8
>  #endif   /* MULTIBOOT */
>  
>  /*
>   * Some hackage to deal with 64bit symbols in 32 bit mode.

-- 
Ryo ONODERA // r...@tetera.org
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


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

2019-12-25 Thread Ryo ONODERA
Hi,

Sorry I have accidentally reverted kern.ldscript.
With current kern.ldscript, it stalls after cpu0.

Thank you.

Ryo ONODERA  writes:

> Hi,
>
> Emmanuel Dreyfus  writes:
>
>> On Tue, Dec 24, 2019 at 05:50:00PM +0900, Ryo ONODERA wrote:
>>> After this change, amd64 kernel does not boot on my HP Spectre x360
>>> 13-inch ae019TU laptop with pure UEFI boot mode.
>>
>> Hello
>>
>> Does the attached patch (crafted for port-amd64/54775) fix the
>> problem?
>
> Without your patch, the kernel does not boot at all,
> so after the kernel is loaded, only "_" character is displayed.
>
> And your patch still does not work properly, so the kernel hangs
> after cpu0 (as same as msaitoh@'s however it hits 100% for my
> laptop).
>
> The attached patch works for me.
> However I have no idea about the meaning.
>
> Index: sys/arch/amd64/amd64/locore.S
> ===
> RCS file: /cvsroot/src/sys/arch/amd64/amd64/locore.S,v
> retrieving revision 1.195
> diff -u -r1.195 locore.S
> --- sys/arch/amd64/amd64/locore.S 15 Dec 2019 02:58:21 -  1.195
> +++ sys/arch/amd64/amd64/locore.S 25 Dec 2019 10:36:18 -
> @@ -1,4 +1,4 @@
> -/*   $NetBSD: locore.S,v 1.195 2019/12/15 02:58:21 manu Exp $*/
> +/*   $NetBSD: locore.S,v 1.193 2019/12/10 02:06:07 manu Exp $*/
>  
>  /*
>   * Copyright-o-rama!
> @@ -432,9 +432,9 @@
>   .space  512
>  tmpstk:
>  
> -.section multiboot,"a"
> -#if defined(MULTIBOOT)
> +.section multiboot,"ax",@progbits
>   .align  8
> +#if defined(MULTIBOOT)
>   .globl  Multiboot2_Header
>  _C_LABEL(Multiboot2_Header):
>   .intMULTIBOOT2_HEADER_MAGIC
> @@ -474,6 +474,9 @@
>   .align  8
>   .globl  Multiboot2_Header_end
>  _C_LABEL(Multiboot2_Header_end):
> +#else /* MULTIBOOT */
> + .int0xdeadbeef  /* have some non empty content */
> + .align  8
>  #endif   /* MULTIBOOT */
>  
>  /*
>
> Thank you.
>
>> -- 
>> Emmanuel Dreyfus
>> m...@netbsd.org
>> Index: sys/arch/amd64/amd64/locore.S
>> ===
>> RCS file: /cvsroot/src/sys/arch/amd64/amd64/locore.S,v
>> retrieving revision 1.195
>> diff -U4 -r1.195 locore.S
>> --- sys/arch/amd64/amd64/locore.S15 Dec 2019 02:58:21 -  1.195
>> +++ sys/arch/amd64/amd64/locore.S22 Dec 2019 02:23:11 -
>> @@ -432,10 +432,10 @@
>>  .space  512
>>  tmpstk:
>>  
>>  .section multiboot,"a"
>> -#if defined(MULTIBOOT)
>>  .align  8
>> +#if defined(MULTIBOOT)
>>  .globl  Multiboot2_Header
>>  _C_LABEL(Multiboot2_Header):
>>  .intMULTIBOOT2_HEADER_MAGIC
>>  .intMULTIBOOT2_ARCHITECTURE_I386
>> @@ -473,8 +473,11 @@
>>  .int8   /* sizeof(struct multiboot_tag) */
>>  .align  8
>>  .globl  Multiboot2_Header_end
>>  _C_LABEL(Multiboot2_Header_end):
>> +#else /* MULTIBOOT */
>> +.int0xdeadbeef  /* have some non empty content */
>> +.align  8
>>  #endif  /* MULTIBOOT */
>>  
>>  /*
>>   * Some hackage to deal with 64bit symbols in 32 bit mode.
>
> -- 
> Ryo ONODERA // r...@tetera.org
> PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3

-- 
Ryo ONODERA // r...@tetera.org
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


Re: CVS commit: src/lib/libpthread

2020-02-12 Thread Ryo ONODERA
Hi,

I have two problematic pkgsrc packages at least.
Of course these programs have misuses and/or bugs, however I feel that
dealing pt_magic in pthread_equal() is too hasty for pkgsrc.

multimedia/handbrake (internal libbluray):
The invalid thread pointer is not NULL.
pthread_equal t1: 0x
pthread_equal t2: 0x7073b25e2000

Another one is lang/mono6:
The invalid thread pointer is not 0x.
pthread_equal t1: 0x7b066d4d7800
pthread_equal t2: 0x60f5f000

Of course, it is desirable to fix every misuses and bugs in pkgsrc.
However it is impossible for now (at least for me).

"Kamil Rytarowski"  writes:

> Module Name:  src
> Committed By: kamil
> Date: Sat Feb  8 17:06:03 UTC 2020
>
> Modified Files:
>   src/lib/libpthread: pthread.c
>
> Log Message:
> Change the behavior of pthread_equal()
>
> On error when not aborting, do not return EINVAL as it has a side effect
> of being interpreted as matching threads. For invalid threads return
> unmatched.
>
> Check pthreads for NULL, before accessing pt_magic field. This avoids
> faults on comparision with a NULL pointer.
>
> This behavior is in the scope of UB, but should be easier to deal with
> buggy software.
>
>
> To generate a diff of this commit:
> cvs rdiff -u -r1.163 -r1.164 src/lib/libpthread/pthread.c
>
> Please note that diffs are not public domain; they are subject to the
> copyright notices on the relevant files.
>
> Modified files:
>
> Index: src/lib/libpthread/pthread.c
> diff -u src/lib/libpthread/pthread.c:1.163 src/lib/libpthread/pthread.c:1.164
> --- src/lib/libpthread/pthread.c:1.163Wed Feb  5 14:56:04 2020
> +++ src/lib/libpthread/pthread.c  Sat Feb  8 17:06:03 2020
> @@ -1,4 +1,4 @@
> -/*   $NetBSD: pthread.c,v 1.163 2020/02/05 14:56:04 ryoon Exp $  */
> +/*   $NetBSD: pthread.c,v 1.164 2020/02/08 17:06:03 kamil Exp $  */
>  
>  /*-
>   * Copyright (c) 2001, 2002, 2003, 2006, 2007, 2008, 2020
> @@ -31,7 +31,7 @@
>   */
>  
>  #include 
> -__RCSID("$NetBSD: pthread.c,v 1.163 2020/02/05 14:56:04 ryoon Exp $");
> +__RCSID("$NetBSD: pthread.c,v 1.164 2020/02/08 17:06:03 kamil Exp $");
>  
>  #define  __EXPOSE_STACK  1
>  
> @@ -770,11 +770,11 @@ pthread_equal(pthread_t t1, pthread_t t2
>   if (__predict_false(__uselibcstub))
>   return __libc_thr_equal_stub(t1, t2);
>  
> - pthread__error(EINVAL, "Invalid thread",
> - t1->pt_magic == PT_MAGIC);
> + pthread__error(0, "Invalid thread",
> + (t1 != NULL) && (t1->pt_magic == PT_MAGIC));
>  
> - pthread__error(EINVAL, "Invalid thread",
> - t2->pt_magic == PT_MAGIC);
> + pthread__error(0, "Invalid thread",
> + (t2 != NULL) && (t2->pt_magic == PT_MAGIC));
>  
>   /* Nothing special here. */
>   return (t1 == t2);
>

-- 
Ryo ONODERA // r...@tetera.org
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


Re: CVS commit: src/lib/libpthread

2020-02-12 Thread Ryo ONODERA
Hi,

Kamil Rytarowski  writes:

> Please apple workaround (same like in NSPR) for now if fixing is difficult.
>
> Such bugs can have security implications.

Adding workarounds will not improve security problems.
And I feel that such workarounds will not be accepted by upstream.
I will add workarounds to some packages.
However I feel that it is not meaningful...

> On 12.02.2020 09:49, Ryo ONODERA wrote:
>> Hi,
>> 
>> I have two problematic pkgsrc packages at least.
>> Of course these programs have misuses and/or bugs, however I feel that
>> dealing pt_magic in pthread_equal() is too hasty for pkgsrc.
>> 
>> multimedia/handbrake (internal libbluray):
>> The invalid thread pointer is not NULL.
>> pthread_equal t1: 0x
>> pthread_equal t2: 0x7073b25e2000
>> 
>> Another one is lang/mono6:
>> The invalid thread pointer is not 0x.
>> pthread_equal t1: 0x7b066d4d7800
>> pthread_equal t2: 0x60f5f000
>> 
>> Of course, it is desirable to fix every misuses and bugs in pkgsrc.
>> However it is impossible for now (at least for me).
>> 
>> "Kamil Rytarowski"  writes:
>> 
>>> Module Name:src
>>> Committed By:   kamil
>>> Date:   Sat Feb  8 17:06:03 UTC 2020
>>>
>>> Modified Files:
>>> src/lib/libpthread: pthread.c
>>>
>>> Log Message:
>>> Change the behavior of pthread_equal()
>>>
>>> On error when not aborting, do not return EINVAL as it has a side effect
>>> of being interpreted as matching threads. For invalid threads return
>>> unmatched.
>>>
>>> Check pthreads for NULL, before accessing pt_magic field. This avoids
>>> faults on comparision with a NULL pointer.
>>>
>>> This behavior is in the scope of UB, but should be easier to deal with
>>> buggy software.
>>>
>>>
>>> To generate a diff of this commit:
>>> cvs rdiff -u -r1.163 -r1.164 src/lib/libpthread/pthread.c
>>>
>>> Please note that diffs are not public domain; they are subject to the
>>> copyright notices on the relevant files.
>>>
>>> Modified files:
>>>
>>> Index: src/lib/libpthread/pthread.c
>>> diff -u src/lib/libpthread/pthread.c:1.163 
>>> src/lib/libpthread/pthread.c:1.164
>>> --- src/lib/libpthread/pthread.c:1.163  Wed Feb  5 14:56:04 2020
>>> +++ src/lib/libpthread/pthread.cSat Feb  8 17:06:03 2020
>>> @@ -1,4 +1,4 @@
>>> -/* $NetBSD: pthread.c,v 1.163 2020/02/05 14:56:04 ryoon Exp $  */
>>> +/* $NetBSD: pthread.c,v 1.164 2020/02/08 17:06:03 kamil Exp $  */
>>>  
>>>  /*-
>>>   * Copyright (c) 2001, 2002, 2003, 2006, 2007, 2008, 2020
>>> @@ -31,7 +31,7 @@
>>>   */
>>>  
>>>  #include 
>>> -__RCSID("$NetBSD: pthread.c,v 1.163 2020/02/05 14:56:04 ryoon Exp $");
>>> +__RCSID("$NetBSD: pthread.c,v 1.164 2020/02/08 17:06:03 kamil Exp $");
>>>  
>>>  #define__EXPOSE_STACK  1
>>>  
>>> @@ -770,11 +770,11 @@ pthread_equal(pthread_t t1, pthread_t t2
>>> if (__predict_false(__uselibcstub))
>>> return __libc_thr_equal_stub(t1, t2);
>>>  
>>> -   pthread__error(EINVAL, "Invalid thread",
>>> -   t1->pt_magic == PT_MAGIC);
>>> +   pthread__error(0, "Invalid thread",
>>> +   (t1 != NULL) && (t1->pt_magic == PT_MAGIC));
>>>  
>>> -   pthread__error(EINVAL, "Invalid thread",
>>> -   t2->pt_magic == PT_MAGIC);
>>> +   pthread__error(0, "Invalid thread",
>>> +   (t2 != NULL) && (t2->pt_magic == PT_MAGIC));
>>>  
>>> /* Nothing special here. */
>>> return (t1 == t2);
>>>
>> 
>
>

-- 
Ryo ONODERA // r...@tetera.org
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


Re: CVS commit: src/lib/libpthread

2020-02-12 Thread Ryo ONODERA
Hi,

Kamil Rytarowski  writes:

> Hello,
>
> I will have a look at them.

Thank you.
Real fix is welcome.

And multimedia/handbrake has workaround already.
I have workaround patches for lang/mono6 (like your nspr patch).
I will commit them after some tests.

> On 12.02.2020 14:02, Ryo ONODERA wrote:
>> Hi,
>> 
>> Kamil Rytarowski  writes:
>> 
>>> Please apple workaround (same like in NSPR) for now if fixing is difficult.
>>>
>>> Such bugs can have security implications.
>> 
>> Adding workarounds will not improve security problems.
>> And I feel that such workarounds will not be accepted by upstream.
>> I will add workarounds to some packages.
>> However I feel that it is not meaningful...
>> 
>>> On 12.02.2020 09:49, Ryo ONODERA wrote:
>>>> Hi,
>>>>
>>>> I have two problematic pkgsrc packages at least.
>>>> Of course these programs have misuses and/or bugs, however I feel that
>>>> dealing pt_magic in pthread_equal() is too hasty for pkgsrc.
>>>>
>>>> multimedia/handbrake (internal libbluray):
>>>> The invalid thread pointer is not NULL.
>>>> pthread_equal t1: 0x
>>>> pthread_equal t2: 0x7073b25e2000
>>>>
>>>> Another one is lang/mono6:
>>>> The invalid thread pointer is not 0x.
>>>> pthread_equal t1: 0x7b066d4d7800
>>>> pthread_equal t2: 0x60f5f000
>>>>
>>>> Of course, it is desirable to fix every misuses and bugs in pkgsrc.
>>>> However it is impossible for now (at least for me).
>>>>
>>>> "Kamil Rytarowski"  writes:
>>>>
>>>>> Module Name:  src
>>>>> Committed By: kamil
>>>>> Date: Sat Feb  8 17:06:03 UTC 2020
>>>>>
>>>>> Modified Files:
>>>>>   src/lib/libpthread: pthread.c
>>>>>
>>>>> Log Message:
>>>>> Change the behavior of pthread_equal()
>>>>>
>>>>> On error when not aborting, do not return EINVAL as it has a side effect
>>>>> of being interpreted as matching threads. For invalid threads return
>>>>> unmatched.
>>>>>
>>>>> Check pthreads for NULL, before accessing pt_magic field. This avoids
>>>>> faults on comparision with a NULL pointer.
>>>>>
>>>>> This behavior is in the scope of UB, but should be easier to deal with
>>>>> buggy software.
>>>>>
>>>>>
>>>>> To generate a diff of this commit:
>>>>> cvs rdiff -u -r1.163 -r1.164 src/lib/libpthread/pthread.c
>>>>>
>>>>> Please note that diffs are not public domain; they are subject to the
>>>>> copyright notices on the relevant files.
>>>>>
>>>>> Modified files:
>>>>>
>>>>> Index: src/lib/libpthread/pthread.c
>>>>> diff -u src/lib/libpthread/pthread.c:1.163 
>>>>> src/lib/libpthread/pthread.c:1.164
>>>>> --- src/lib/libpthread/pthread.c:1.163Wed Feb  5 14:56:04 2020
>>>>> +++ src/lib/libpthread/pthread.c  Sat Feb  8 17:06:03 2020
>>>>> @@ -1,4 +1,4 @@
>>>>> -/*   $NetBSD: pthread.c,v 1.163 2020/02/05 14:56:04 ryoon Exp $  
>>>>> */
>>>>> +/*   $NetBSD: pthread.c,v 1.164 2020/02/08 17:06:03 kamil Exp $  
>>>>> */
>>>>>  
>>>>>  /*-
>>>>>   * Copyright (c) 2001, 2002, 2003, 2006, 2007, 2008, 2020
>>>>> @@ -31,7 +31,7 @@
>>>>>   */
>>>>>  
>>>>>  #include 
>>>>> -__RCSID("$NetBSD: pthread.c,v 1.163 2020/02/05 14:56:04 ryoon Exp $");
>>>>> +__RCSID("$NetBSD: pthread.c,v 1.164 2020/02/08 17:06:03 kamil Exp $");
>>>>>  
>>>>>  #define  __EXPOSE_STACK  1
>>>>>  
>>>>> @@ -770,11 +770,11 @@ pthread_equal(pthread_t t1, pthread_t t2
>>>>>   if (__predict_false(__uselibcstub))
>>>>>   return __libc_thr_equal_stub(t1, t2);
>>>>>  
>>>>> - pthread__error(EINVAL, "Invalid thread",
>>>>> - t1->pt_magic == PT_MAGIC);
>>>>> + pthread__error(0, "Invalid thread",
>>>>> + (t1 != NULL) && (t1->pt_magic == PT_MAGIC));
>>>>>  
>>>>> - pthread__error(EINVAL, "Invalid thread",
>>>>> - t2->pt_magic == PT_MAGIC);
>>>>> + pthread__error(0, "Invalid thread",
>>>>> + (t2 != NULL) && (t2->pt_magic == PT_MAGIC));
>>>>>  
>>>>>   /* Nothing special here. */
>>>>>   return (t1 == t2);
>>>>>
>>>>
>>>
>>>
>> 
>
>

-- 
Ryo ONODERA // r...@tetera.org
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


Re: CVS commit: src/lib/libpthread

2020-02-13 Thread Ryo ONODERA
Hi,

Kamil Rytarowski  writes:

> On 12.02.2020 15:01, Ryo ONODERA wrote:
>> Hi,
>> 
>> Kamil Rytarowski  writes:
>> 
>>> Hello,
>>>
>>> I will have a look at them.
>> 
>> Thank you.
>> Real fix is welcome.
>> 
>> And multimedia/handbrake has workaround already.
>> I have workaround patches for lang/mono6 (like your nspr patch).
>> I will commit them after some tests.
>> 
>
> libblueray real fix patch is pending upstream.
>
> https://code.videolan.org/videolan/libbluray/merge_requests/17

Thank you very much!
I will apply this to multimedia/handbrake too.

> I will look into mono next.

Excellent.

>
>>> On 12.02.2020 14:02, Ryo ONODERA wrote:
>>>> Hi,
>>>>
>>>> Kamil Rytarowski  writes:
>>>>
>>>>> Please apple workaround (same like in NSPR) for now if fixing is 
>>>>> difficult.
>>>>>
>>>>> Such bugs can have security implications.
>>>>
>>>> Adding workarounds will not improve security problems.
>>>> And I feel that such workarounds will not be accepted by upstream.
>>>> I will add workarounds to some packages.
>>>> However I feel that it is not meaningful...
>>>>
>>>>> On 12.02.2020 09:49, Ryo ONODERA wrote:
>>>>>> Hi,
>>>>>>
>>>>>> I have two problematic pkgsrc packages at least.
>>>>>> Of course these programs have misuses and/or bugs, however I feel that
>>>>>> dealing pt_magic in pthread_equal() is too hasty for pkgsrc.
>>>>>>
>>>>>> multimedia/handbrake (internal libbluray):
>>>>>> The invalid thread pointer is not NULL.
>>>>>> pthread_equal t1: 0x
>>>>>> pthread_equal t2: 0x7073b25e2000
>>>>>>
>>>>>> Another one is lang/mono6:
>>>>>> The invalid thread pointer is not 0x.
>>>>>> pthread_equal t1: 0x7b066d4d7800
>>>>>> pthread_equal t2: 0x60f5f000
>>>>>>
>>>>>> Of course, it is desirable to fix every misuses and bugs in pkgsrc.
>>>>>> However it is impossible for now (at least for me).
>>>>>>
>>>>>> "Kamil Rytarowski"  writes:
>>>>>>
>>>>>>> Module Name:src
>>>>>>> Committed By:   kamil
>>>>>>> Date:   Sat Feb  8 17:06:03 UTC 2020
>>>>>>>
>>>>>>> Modified Files:
>>>>>>> src/lib/libpthread: pthread.c
>>>>>>>
>>>>>>> Log Message:
>>>>>>> Change the behavior of pthread_equal()
>>>>>>>
>>>>>>> On error when not aborting, do not return EINVAL as it has a side effect
>>>>>>> of being interpreted as matching threads. For invalid threads return
>>>>>>> unmatched.
>>>>>>>
>>>>>>> Check pthreads for NULL, before accessing pt_magic field. This avoids
>>>>>>> faults on comparision with a NULL pointer.
>>>>>>>
>>>>>>> This behavior is in the scope of UB, but should be easier to deal with
>>>>>>> buggy software.
>>>>>>>
>>>>>>>
>>>>>>> To generate a diff of this commit:
>>>>>>> cvs rdiff -u -r1.163 -r1.164 src/lib/libpthread/pthread.c
>>>>>>>
>>>>>>> Please note that diffs are not public domain; they are subject to the
>>>>>>> copyright notices on the relevant files.
>>>>>>>
>>>>>>> Modified files:
>>>>>>>
>>>>>>> Index: src/lib/libpthread/pthread.c
>>>>>>> diff -u src/lib/libpthread/pthread.c:1.163 
>>>>>>> src/lib/libpthread/pthread.c:1.164
>>>>>>> --- src/lib/libpthread/pthread.c:1.163  Wed Feb  5 14:56:04 2020
>>>>>>> +++ src/lib/libpthread/pthread.cSat Feb  8 17:06:03 2020
>>>>>>> @@ -1,4 +1,4 @@
>>>>>>> -/* $NetBSD: pthread.c,v 1.163 2020/02/05 14:56:04 ryoon Exp $  
>>>>>>> */
>>>>>>> +/* $NetBSD: pthread.c,v 1.164 2020/02/08 17:06:03 kamil Exp $  
>>>>>>> */
>>>>>>>  
>>>>>>>  /*-
>>>>>>>   * Copyright (c) 2001, 2002, 2003, 2006, 2007, 2008, 2020
>>>>>>> @@ -31,7 +31,7 @@
>>>>>>>   */
>>>>>>>  
>>>>>>>  #include 
>>>>>>> -__RCSID("$NetBSD: pthread.c,v 1.163 2020/02/05 14:56:04 ryoon Exp $");
>>>>>>> +__RCSID("$NetBSD: pthread.c,v 1.164 2020/02/08 17:06:03 kamil Exp $");
>>>>>>>  
>>>>>>>  #define__EXPOSE_STACK  1
>>>>>>>  
>>>>>>> @@ -770,11 +770,11 @@ pthread_equal(pthread_t t1, pthread_t t2
>>>>>>> if (__predict_false(__uselibcstub))
>>>>>>> return __libc_thr_equal_stub(t1, t2);
>>>>>>>  
>>>>>>> -   pthread__error(EINVAL, "Invalid thread",
>>>>>>> -   t1->pt_magic == PT_MAGIC);
>>>>>>> +   pthread__error(0, "Invalid thread",
>>>>>>> +   (t1 != NULL) && (t1->pt_magic == PT_MAGIC));
>>>>>>>  
>>>>>>> -   pthread__error(EINVAL, "Invalid thread",
>>>>>>> -   t2->pt_magic == PT_MAGIC);
>>>>>>> +   pthread__error(0, "Invalid thread",
>>>>>>> +   (t2 != NULL) && (t2->pt_magic == PT_MAGIC));
>>>>>>>  
>>>>>>> /* Nothing special here. */
>>>>>>> return (t1 == t2);
>>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>
>>>
>> 
>
>

-- 
Ryo ONODERA // r...@tetera.org
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


Re: CVS commit: src/lib/libpthread

2020-02-01 Thread Ryo ONODERA
Kamil Rytarowski  writes:

> On 01.02.2020 17:01, Ryo ONODERA wrote:
>> Hi,
>> 
>> pthread__error()s in pthread_equal() cause segfault
>> during start of pkgsrc/www/firefox-72.0.2.
>> 
>> Without pthread__error()s, www/firefox works fine
>> like as follows.
>> However I have no idea why I get segfaults.
>> 
>> Could you take a look at this problem?
>> 
>> Index: lib/libpthread/pthread.c
>> ===
>> RCS file: /cvsroot/src/lib/libpthread/pthread.c,v
>> retrieving revision 1.162
>> diff -u -r1.162 pthread.c
>> --- lib/libpthread/pthread.c 29 Jan 2020 17:11:57 -  1.162
>> +++ lib/libpthread/pthread.c 1 Feb 2020 15:58:03 -
>> @@ -770,11 +770,13 @@
>>  if (__predict_false(__uselibcstub))
>>  return __libc_thr_equal_stub(t1, t2);
>>  
>> +#if 0
>>  pthread__error(EINVAL, "Invalid thread",
>>  t1->pt_magic == PT_MAGIC);
>>  
>>  pthread__error(EINVAL, "Invalid thread",
>>  t2->pt_magic == PT_MAGIC);
>> +#endif
>>  
>>  /* Nothing special here. */
>>  return (t1 == t2);
>> @@ -1108,7 +1110,7 @@
>>  {
>>  char buf[1024];
>>  size_t len;
>> -
>> +
>>  if (pthread__diagassert == 0)
>>  return;
>>  
>> 
>> 
>> "Kamil Rytarowski"  writes:
>> 
>>> Module Name:src
>>> Committed By:   kamil
>>> Date:   Wed Jan 29 16:03:44 UTC 2020
>>>
>>> Modified Files:
>>> src/lib/libpthread: pthread.c pthread_getcpuclockid.c
>>>
>>> Log Message:
>>> Chack thread->pt_magic with PT_MAGIC promptly
>>>
>>> Rearrange some checks to avoid verifying pthread_t after using it.
>>>
>>>
>>> To generate a diff of this commit:
>>> cvs rdiff -u -r1.160 -r1.161 src/lib/libpthread/pthread.c
>>> cvs rdiff -u -r1.2 -r1.3 src/lib/libpthread/pthread_getcpuclockid.c
>>>
>>> Please note that diffs are not public domain; they are subject to the
>>> copyright notices on the relevant files.
>>>
>> 
>
> I will have a look, but it will take a while to build firefox for me.

Thank you.
Of course I can wait.

-- 
Ryo ONODERA // r...@tetera.org
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


Re: CVS commit: src/lib/libpthread

2020-02-01 Thread Ryo ONODERA
Hi,

pthread__error()s in pthread_equal() cause segfault
during start of pkgsrc/www/firefox-72.0.2.

Without pthread__error()s, www/firefox works fine
like as follows.
However I have no idea why I get segfaults.

Could you take a look at this problem?

Index: lib/libpthread/pthread.c
===
RCS file: /cvsroot/src/lib/libpthread/pthread.c,v
retrieving revision 1.162
diff -u -r1.162 pthread.c
--- lib/libpthread/pthread.c29 Jan 2020 17:11:57 -  1.162
+++ lib/libpthread/pthread.c1 Feb 2020 15:58:03 -
@@ -770,11 +770,13 @@
if (__predict_false(__uselibcstub))
return __libc_thr_equal_stub(t1, t2);
 
+#if 0
pthread__error(EINVAL, "Invalid thread",
t1->pt_magic == PT_MAGIC);
 
pthread__error(EINVAL, "Invalid thread",
t2->pt_magic == PT_MAGIC);
+#endif
 
/* Nothing special here. */
return (t1 == t2);
@@ -1108,7 +1110,7 @@
 {
char buf[1024];
size_t len;
-   
+
if (pthread__diagassert == 0)
return;
 


"Kamil Rytarowski"  writes:

> Module Name:  src
> Committed By: kamil
> Date: Wed Jan 29 16:03:44 UTC 2020
>
> Modified Files:
>   src/lib/libpthread: pthread.c pthread_getcpuclockid.c
>
> Log Message:
> Chack thread->pt_magic with PT_MAGIC promptly
>
> Rearrange some checks to avoid verifying pthread_t after using it.
>
>
> To generate a diff of this commit:
> cvs rdiff -u -r1.160 -r1.161 src/lib/libpthread/pthread.c
> cvs rdiff -u -r1.2 -r1.3 src/lib/libpthread/pthread_getcpuclockid.c
>
> Please note that diffs are not public domain; they are subject to the
> copyright notices on the relevant files.
>

-- 
Ryo ONODERA // r...@tetera.org
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


Re: CVS commit: src/lib/libpthread

2020-02-03 Thread Ryo ONODERA
Hi,

Ryo ONODERA  writes:

> Hi,
>
> I had tested with PTHREAD_DIAGASSERT however it did not produce any output.
>
> I am building current and pkgsrc packages from scratch now.
>
> I will reply my situation after this rebuild.
>
> Thank you.

With latest toolchain, kernel and userland,
my firefox gets sefgault every run.

The core dump generated from PTHREAD_DIAGASSERT=ae does not show
any useful things.
See:
Core was generated by `firefox'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x743cb39860ca in _lwp_kill () from /usr/lib/libc.so.12
[Current thread is 1 (process 4)]
(gdb) bt
#0  0x743cb39860ca in _lwp_kill () from /usr/lib/libc.so.12
#1  0x743ca1943721 in ?? () from /usr/pkg/lib/firefox/libxul.so
#2  0x743ca2172bee in ?? () from /usr/pkg/lib/firefox/libxul.so
#3  0x743cb38b0140 in opendir () from /usr/lib/libc.so.12
#4  0x0001000b in ?? ()
#5  0x in ?? ()


And I cannot get any text output to stdout.
As far as I understand correctly, PTHREAD_DIAGASSERT=e enables the output
to stdout.


Still I feel that pthread_equal() is cause of my segfault.
$ gdb /usr/pkg/lib/firefox/firefox
GNU gdb (GDB) 8.3
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64--netbsd".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/pkg/lib/firefox/firefox...
(No debugging symbols found in /usr/pkg/lib/firefox/firefox)
(gdb) r
Starting program: /usr/pkg/lib/firefox/firefox
[New process 18477]
[Detaching after fork from child process 17695]
[New LWP 2 of process 18477]
[New LWP 3 of process 18477]
[New LWP 4 of process 18477]
[New LWP 5 of process 18477]
[New LWP 6 of process 18477]
[New LWP 7 of process 18477]
[New LWP 8 of process 18477]
[New LWP 9 of process 18477]
[New LWP 10 of process 18477]
[New LWP 11 of process 18477]
[New LWP 12 of process 18477]
[New LWP 13 of process 18477]
[New LWP 14 of process 18477]
[New LWP 15 of process 18477]
[New LWP 16 of process 18477]
JavaScript error: , line 0: UnknownError: The operation failed for reasons 
unrelated to the database itself and not covered by any other error code.
process 18477 is executing new program: /usr/pkg/lib/firefox/firefox
[New process 18477]
[Detaching after fork from child process 17526]
[New LWP 2 of process 18477]
[New LWP 3 of process 18477]
[New LWP 4 of process 18477]
[New LWP 5 of process 18477]
[New LWP 6 of process 18477]
[New LWP 7 of process 18477]
[New LWP 8 of process 18477]
[New LWP 9 of process 18477]
[New LWP 10 of process 18477]
[New LWP 11 of process 18477]
[New LWP 12 of process 18477]
[New LWP 13 of process 18477]
[New LWP 14 of process 18477]
[New LWP 15 of process 18477]
[New LWP 16 of process 18477]
[New LWP 17 of process 18477]
[New LWP 18 of process 18477]
[New LWP 19 of process 18477]
[New LWP 20 of process 18477]
[New LWP 21 of process 18477]
[New LWP 22 of process 18477]
[New LWP 23 of process 18477]
[New LWP 24 of process 18477]
[New LWP 25 of process 18477]
[New LWP 26 of process 18477]
[New LWP 27 of process 18477]
[New LWP 28 of process 18477]
[New LWP 29 of process 18477]
[New LWP 14 of process 18477]
[New LWP 30 of process 18477]
[New LWP 31 of process 18477]
[New LWP 32 of process 18477]
[New LWP 33 of process 18477]
[New LWP 34 of process 18477]
[New LWP 35 of process 18477]
[New LWP 36 of process 18477]
[New LWP 37 of process 18477]
[New LWP 38 of process 18477]
[New LWP 39 of process 18477]
[New process 18477]
[Detaching after fork from child process 17454]
[New LWP 39 of process 18477]
[New LWP 41 of process 18477]
[New LWP 42 of process 18477]
[New LWP 43 of process 18477]
[New LWP 44 of process 18477]
[New LWP 45 of process 18477]
[New process 18477]
[Detaching after fork from child process 15097]
[New LWP 47 of process 18477]
[New LWP 48 of process 18477]
[New LWP 49 of process 18477]
[New LWP 50 of process 18477]
[New LWP 51 of process 18477]
[New LWP 45 of process 18477]
[New LWP 52 of process 18477]
[New LWP 53 of process 18477]
[New LWP 54 of process 18477]
[New LWP 55 of process 18477]
[New LWP 56 of process 18477]
[New LWP 57 of process 18477]
[New LWP 58 of process 18477]
[New LWP 59 of process 18477]
[New LWP 60 of process 18477]

Thread 21 "Socket Thread" received signal SIGSEGV, Segmentation fault.
[Switching to LWP 4 of process

Re: CVS commit: src/lib/libpthread

2020-02-03 Thread Ryo ONODERA
Hi,

Kamil Rytarowski  writes:

> On 03.02.2020 17:10, Ryo ONODERA wrote:
>> Hi,
>> 
>> Kamil Rytarowski  writes:
>> 
>>> Please check this workaround:
>>>
>>> http://netbsd.org/~kamil/patch-00224-firefox-pthread_equal.txt
>>>
>>> It has to be applied on firefox's package.
>> 
>> Thank you very much.
>> 
>> This should be applied to pkgsrc/devel/nspr with slight change.
>> (devel/nspr's C files cannot accept // comment.)
>> This eliminates segfaults.
>> 
>> For the record, pthread_equal()'s first thread pointer, mon->owner, is
>> invalid in PR_GetMonitorEntryCount() in nspr/pr/src/pthreads/ptsynch.c
>> of devel/nspr.
>> 
>
> Please patch all affected packages in pkgsrc.

I will commit this patch to devwl/nspr.

>>>
>>> The problem has to be reported upstream as a real bug.
>> 
>> Please file the bug report to Mozilla's bugzilla.
>> 
>
> I don't have a direct reproducer as of now myself. Please report a bug.

O.k. I will submit this to Mozilla.

Thank you very much.

>> Thank you very much.
>> 
>
>

-- 
Ryo ONODERA // r...@tetera.org
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


Re: CVS commit: src/lib/libpthread

2020-02-03 Thread Ryo ONODERA
Hi,

Kamil Rytarowski  writes:

> Please check this workaround:
>
> http://netbsd.org/~kamil/patch-00224-firefox-pthread_equal.txt
>
> It has to be applied on firefox's package.

Thank you very much.

This should be applied to pkgsrc/devel/nspr with slight change.
(devel/nspr's C files cannot accept // comment.)
This eliminates segfaults.

For the record, pthread_equal()'s first thread pointer, mon->owner, is
invalid in PR_GetMonitorEntryCount() in nspr/pr/src/pthreads/ptsynch.c
of devel/nspr.

>
> The problem has to be reported upstream as a real bug.

Please file the bug report to Mozilla's bugzilla.

Thank you very much.

-- 
Ryo ONODERA // r...@tetera.org
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


Re: CVS commit: src/lib/libpthread

2020-02-02 Thread Ryo ONODERA
Hi,

I had tested with PTHREAD_DIAGASSERT however it did not produce any output.

I am building current and pkgsrc packages from scratch now.

I will reply my situation after this rebuild.

Thank you.

On February 3, 2020 7:23:33 AM GMT+09:00, Kamil Rytarowski  wrote:
>Hello,
>
>I've checked with NetBSD-current from today (2020-02-02) and
>pkgsrc-current (2020-02-02) and package firefox-72.0.2.
>
>I'm not reproducing any crash due to pthread_equal(3) misuse.
>Everything
>I tested, worked for me.
>
>Please try PTHREAD_DIAGASSERT=ae and debug the culprit crash with a
>core(5) file.
>
>On 01.02.2020 22:20, Kamil Rytarowski wrote:
>> Good idea. It could be checked quicker... however I presume that
>> t1->pt_magic + t1->pt_magic already crash on invalid t1/t2 pointers
>as
>> the argument with condition is evaluated.
>> 
>> Ryo, you might check:
>> $ export PTHREAD_DIAGASSERT=ae
>> $ firefox
>> 
>> It should create a coredump for investigation.
>> 
>> According to POSIX
>>
>(https://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_equal.html)
>> passing invalid parameters is UB.
>> 
>> GLIBC, Illumos and all other BSDs (+ older NetBSD) have no sanity
>check
>> in pthread_equal(3). Apparently we are the first ones to notice the
>bug.
>> 
>> On 01.02.2020 21:18, Andrew Doran wrote:
>>> Hmm.  Was there not originally an environment variable to control
>this
>>> behaviour, since many applications are buggy?
>>>
>>> Andrew
>>>
>>> On Sun, Feb 02, 2020 at 01:01:49AM +0900, Ryo ONODERA wrote:
>>>> Hi,
>>>>
>>>> pthread__error()s in pthread_equal() cause segfault
>>>> during start of pkgsrc/www/firefox-72.0.2.
>>>>
>>>> Without pthread__error()s, www/firefox works fine
>>>> like as follows.
>>>> However I have no idea why I get segfaults.
>>>>
>>>> Could you take a look at this problem?
>>>>
>>>> Index: lib/libpthread/pthread.c
>>>> ===
>>>> RCS file: /cvsroot/src/lib/libpthread/pthread.c,v
>>>> retrieving revision 1.162
>>>> diff -u -r1.162 pthread.c
>>>> --- lib/libpthread/pthread.c   29 Jan 2020 17:11:57 -  1.162
>>>> +++ lib/libpthread/pthread.c   1 Feb 2020 15:58:03 -
>>>> @@ -770,11 +770,13 @@
>>>>if (__predict_false(__uselibcstub))
>>>>return __libc_thr_equal_stub(t1, t2);
>>>>  
>>>> +#if 0
>>>>pthread__error(EINVAL, "Invalid thread",
>>>>t1->pt_magic == PT_MAGIC);
>>>>  
>>>>pthread__error(EINVAL, "Invalid thread",
>>>>t2->pt_magic == PT_MAGIC);
>>>> +#endif
>>>>  
>>>>/* Nothing special here. */
>>>>return (t1 == t2);
>>>> @@ -1108,7 +1110,7 @@
>>>>  {
>>>>char buf[1024];
>>>>size_t len;
>>>> -  
>>>> +
>>>>if (pthread__diagassert == 0)
>>>>return;
>>>>  
>>>>
>>>>
>>>> "Kamil Rytarowski"  writes:
>>>>
>>>>> Module Name:      src
>>>>> Committed By: kamil
>>>>> Date: Wed Jan 29 16:03:44 UTC 2020
>>>>>
>>>>> Modified Files:
>>>>>   src/lib/libpthread: pthread.c pthread_getcpuclockid.c
>>>>>
>>>>> Log Message:
>>>>> Chack thread->pt_magic with PT_MAGIC promptly
>>>>>
>>>>> Rearrange some checks to avoid verifying pthread_t after using it.
>>>>>
>>>>>
>>>>> To generate a diff of this commit:
>>>>> cvs rdiff -u -r1.160 -r1.161 src/lib/libpthread/pthread.c
>>>>> cvs rdiff -u -r1.2 -r1.3
>src/lib/libpthread/pthread_getcpuclockid.c
>>>>>
>>>>> Please note that diffs are not public domain; they are subject to
>the
>>>>> copyright notices on the relevant files.
>>>>>
>>>>
>>>> -- 
>>>> Ryo ONODERA // r...@tetera.org
>>>> PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1
>15F3
>> 
>> 

-- 
Ryo ONODERA // r...@tetera.org
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB FD1B F404 27FA C7D1 15F3


Re: CVS commit: src/lib/libpthread

2020-02-19 Thread Ryo ONODERA
Hi,

Kamil Rytarowski  writes:

> On 13.02.2020 20:03, Ryo ONODERA wrote:
>> Hi,
>> 
>> Kamil Rytarowski  writes:
>> 
>>> On 12.02.2020 15:01, Ryo ONODERA wrote:
>>>> Hi,
>>>>
>>>> Kamil Rytarowski  writes:
>>>>
>>>>> Hello,
>>>>>
>>>>> I will have a look at them.
>>>>
>>>> Thank you.
>>>> Real fix is welcome.
>>>>
>>>> And multimedia/handbrake has workaround already.
>>>> I have workaround patches for lang/mono6 (like your nspr patch).
>>>> I will commit them after some tests.
>>>>
>>>
>>> libblueray real fix patch is pending upstream.
>>>
>>> https://code.videolan.org/videolan/libbluray/merge_requests/17
>> 
>> Thank you very much!
>> I will apply this to multimedia/handbrake too.
>> 
>
> HandBrake is now patched upstream:
>
> https://github.com/HandBrake/HandBrake/commit/73e958d198aba4cab8f434be6cf0661da1a2f91b
>
>>> I will look into mono next.
>> 
>> Excellent.
>> 
> What is the reproducer for mono?
>

Remove the folowing patches:
lang/mono6/patches/patch-external_corert_src_Native_gc_env_gcenv.structs.h
lang/mono6/patches/patch-mono_metadata_w32mutex-unix.
lang/mono6/patches/patch-libgc_pthread__stop__world.c
lang/mono6/patches/patch-libgc_pthread__support.c
lang/mono6/patches/patch-mono_utils_mono-threads-posix.c

And run "make" in your pkgsrc/lang/mono6 directory.
During build, you will get SIGSEGVs.

Thank you.

-- 
Ryo ONODERA // r...@tetera.org
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


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

2020-01-08 Thread Ryo ONODERA
ude "opt_multiboot.h"
>  #include "opt_user_ldt.h"
>  #include "opt_ddb.h"
>  #include "opt_kgdb.h"
> @@ -185,8 +184,6 @@ __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 
>  #include 
>  #include 
>  
> -#include 
> -
>  #include 
>  
>  #include 
> @@ -374,10 +371,6 @@ cpu_startup(void)
>  
>   initmsgbuf((void *)msgbuf_vaddr, round_page(sz));
>  
> -#ifdef MULTIBOOT
> - multiboot2_print_info();
> -#endif
> -
>   minaddr = 0;
>  
>   /*
> @@ -1511,11 +1504,6 @@ init_x86_64_ksyms(void)
>   db_machine_init();
>  #endif
>  
> -#if defined(MULTIBOOT)
> - if (multiboot2_ksyms_addsyms_elf())
> - return;
> -#endif
> -
>  #ifndef XENPV
>   symtab = lookup_bootinfo(BTINFO_SYMTAB);
>   if (symtab) {
>
> Index: src/sys/arch/amd64/conf/GENERIC
> diff -u src/sys/arch/amd64/conf/GENERIC:1.553 
> src/sys/arch/amd64/conf/GENERIC:1.554
> --- src/sys/arch/amd64/conf/GENERIC:1.553 Wed Jan  1 10:36:43 2020
> +++ src/sys/arch/amd64/conf/GENERIC   Thu Jan  9 00:42:24 2020
> @@ -1,4 +1,4 @@
> -# $NetBSD: GENERIC,v 1.553 2020/01/01 10:36:43 ryo Exp $
> +# $NetBSD: GENERIC,v 1.554 2020/01/09 00:42:24 manu Exp $
>  #
>  # GENERIC machine description file
>  #
> @@ -22,12 +22,10 @@ include   "arch/amd64/conf/std.amd64"
>  
>  options  INCLUDE_CONFIG_FILE # embed config file in kernel binary
>  
> -#ident   "GENERIC-$Revision: 1.553 $"
> +#ident   "GENERIC-$Revision: 1.554 $"
>  
>  maxusers 64  # estimated number of users
>  
> -#options MULTIBOOT   # Multiboot support (see multiboot(8)) 
> -
>  # delay between "rebooting ..." message and hardware reset, in milliseconds
>  #options CPURESET_DELAY=2000
>  
>
> Index: src/sys/arch/amd64/conf/files.amd64
> diff -u src/sys/arch/amd64/conf/files.amd64:1.114 
> src/sys/arch/amd64/conf/files.amd64:1.115
> --- src/sys/arch/amd64/conf/files.amd64:1.114 Tue Dec 10 02:06:07 2019
> +++ src/sys/arch/amd64/conf/files.amd64   Thu Jan  9 00:42:24 2020
> @@ -1,4 +1,4 @@
> -#$NetBSD: files.amd64,v 1.114 2019/12/10 02:06:07 manu Exp $
> +#$NetBSD: files.amd64,v 1.115 2020/01/09 00:42:24 manu Exp $
>  #
>  # new style config file for amd64 architecture
>  #
> @@ -30,10 +30,6 @@ defflag opt_spectre.h  SPECTRE_V2_GCC_MIT
>  defflag  USER_LDT
>  defflag eisa.h   EISA
>  
> -# Multiboot support
> -defflag  opt_multiboot.h MULTIBOOT
> -file arch/x86/x86/multiboot2.c   multiboot
> -
>  # Start code
>  file arch/amd64/amd64/locore.S   machdep
>  file arch/amd64/amd64/vector.S   machdep
>
> Index: src/sys/arch/amd64/conf/kern.ldscript
> diff -u src/sys/arch/amd64/conf/kern.ldscript:1.30 
> src/sys/arch/amd64/conf/kern.ldscript:1.31
> --- src/sys/arch/amd64/conf/kern.ldscript:1.30Sun Dec 15 02:56:40 2019
> +++ src/sys/arch/amd64/conf/kern.ldscript Thu Jan  9 00:42:24 2020
> @@ -1,4 +1,4 @@
> -/*   $NetBSD: kern.ldscript,v 1.30 2019/12/15 02:56:40 manu Exp $*/
> +/*   $NetBSD: kern.ldscript,v 1.31 2020/01/09 00:42:24 manu Exp $*/
>  
>  #include "assym.h"
>  
> @@ -13,17 +13,7 @@ __LARGE_PAGE_SIZE = 0x20 ;
>  ENTRY(_start)
>  SECTIONS
>  {
> - /*
> -  * multiboot (file_offset) : AT (load_address) 
> -  * file_offset must be below 32k for multiboot 2 specification
> -  * BIOS boot requires load_address above 0x20
> -  */
> - multiboot 0x1000 : AT (0x20)
> - {
> - . = ALIGN(8);
> - KEEP(*(multiboot));
> - }
> - .text : AT (0x20 + SIZEOF(multiboot))
> + .text : AT (ADDR(.text) & 0x0fff)
>   {
>   . = ALIGN(__PAGE_SIZE);
>   __text_user_start = . ;
>

-- 
Ryo ONODERA // r...@tetera.org
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


Re: CVS commit: src/common/lib/libc/arch/x86_64/string

2020-01-16 Thread Ryo ONODERA
Hi,

pkgsrc/www/firefox and mail/notmuch are also
broken after this commit.


On January 16, 2020 5:23:47 PM GMT+09:00, Kamil Rytarowski  wrote:
>On 15.01.2020 11:56, Andrew Doran wrote:
>> Module Name: src
>> Committed By:ad
>> Date:Wed Jan 15 10:56:49 UTC 2020
>> 
>> Modified Files:
>>  src/common/lib/libc/arch/x86_64/string: bcmp.S memcmp.S
>> 
>> Log Message:
>> Rewrite bcmp() & memcmp() to not use REP CMPS.  Seems about 5-10x
>faster for
>> small strings on modern hardware.
>> 
>> 
>> To generate a diff of this commit:
>> cvs rdiff -u -r1.3 -r1.4
>src/common/lib/libc/arch/x86_64/string/bcmp.S \
>> src/common/lib/libc/arch/x86_64/string/memcmp.S
>> 
>> Please note that diffs are not public domain; they are subject to the
>> copyright notices on the relevant files.
>> 
>
>This exact change broke git:
>
>$ git clone g...@github.com:anphsw/memtest86.git
>Cloning into 'memtest86'...
>remote: Enumerating objects: 3, done.
>remote: Counting objects: 100% (3/3), done.
>remote: Compressing objects: 100% (3/3), done.
>remote: Total 477 (delta 0), reused 1 (delta 0), pack-reused 474
>Receiving objects: 100% (477/477), 312.55 KiB | 984.00 KiB/s, done.
>Resolving deltas: 100% (290/290), done.
>error: wrong index v2 file size in
>/public/memtest86/.git/objects/pack/pack-3baed7d30e4536c1173b6c083d81de217e9c829a.idx
>error: wrong index v2 file size in
>/public/memtest86/.git/objects/pack/pack-3baed7d30e4536c1173b6c083d81de217e9c829a.idx
>error: wrong index v2 file size in
>/public/memtest86/.git/objects/pack/pack-3baed7d30e4536c1173b6c083d81de217e9c829a.idx
>error: wrong index v2 file size in
>/public/memtest86/.git/objects/pack/pack-3baed7d30e4536c1173b6c083d81de217e9c829a.idx
>error: wrong index v2 file size in
>/public/memtest86/.git/objects/pack/pack-3baed7d30e4536c1173b6c083d81de217e9c829a.idx
>error: wrong index v2 file size in
>/public/memtest86/.git/objects/pack/pack-3baed7d30e4536c1173b6c083d81de217e9c829a.idx
>error: wrong index v2 file size in
>/public/memtest86/.git/objects/pack/pack-3baed7d30e4536c1173b6c083d81de217e9c829a.idx
>error: wrong index v2 file size in
>/public/memtest86/.git/objects/pack/pack-3baed7d30e4536c1173b6c083d81de217e9c829a.idx
>fatal: bad object 9da11d5d7eaa9f1a6a26c04c22b5422c886699a0
>fatal: remote did not send all necessary objects
>
>Userland is now broken.
>
>Please fix.

-- 
Ryo ONODERA // r...@tetera.org
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB FD1B F404 27FA C7D1 15F3


Re: CVS commit: src/common/lib/libc/arch/x86_64/string

2020-01-16 Thread Ryo ONODERA
Hi,

Andrew Doran  writes:

> Hi,
>
> Change backed out.  Sorry about the disruption.

Thank you.
The back-out works fine for me.

> Andrew
>
> On Thu, Jan 16, 2020 at 05:30:20PM +0900, Ryo ONODERA wrote:
>> Hi,
>> 
>> pkgsrc/www/firefox and mail/notmuch are also
>> broken after this commit.
>> 
>> 
>> On January 16, 2020 5:23:47 PM GMT+09:00, Kamil Rytarowski  
>> wrote:
>> >On 15.01.2020 11:56, Andrew Doran wrote:
>> >> Module Name:  src
>> >> Committed By: ad
>> >> Date: Wed Jan 15 10:56:49 UTC 2020
>> >> 
>> >> Modified Files:
>> >>   src/common/lib/libc/arch/x86_64/string: bcmp.S memcmp.S
>> >> 
>> >> Log Message:
>> >> Rewrite bcmp() & memcmp() to not use REP CMPS.  Seems about 5-10x
>> >faster for
>> >> small strings on modern hardware.
>> >> 
>> >> 
>> >> To generate a diff of this commit:
>> >> cvs rdiff -u -r1.3 -r1.4
>> >src/common/lib/libc/arch/x86_64/string/bcmp.S \
>> >> src/common/lib/libc/arch/x86_64/string/memcmp.S
>> >> 
>> >> Please note that diffs are not public domain; they are subject to the
>> >> copyright notices on the relevant files.
>> >> 
>> >
>> >This exact change broke git:
>> >
>> >$ git clone g...@github.com:anphsw/memtest86.git
>> >Cloning into 'memtest86'...
>> >remote: Enumerating objects: 3, done.
>> >remote: Counting objects: 100% (3/3), done.
>> >remote: Compressing objects: 100% (3/3), done.
>> >remote: Total 477 (delta 0), reused 1 (delta 0), pack-reused 474
>> >Receiving objects: 100% (477/477), 312.55 KiB | 984.00 KiB/s, done.
>> >Resolving deltas: 100% (290/290), done.
>> >error: wrong index v2 file size in
>> >/public/memtest86/.git/objects/pack/pack-3baed7d30e4536c1173b6c083d81de217e9c829a.idx
>> >error: wrong index v2 file size in
>> >/public/memtest86/.git/objects/pack/pack-3baed7d30e4536c1173b6c083d81de217e9c829a.idx
>> >error: wrong index v2 file size in
>> >/public/memtest86/.git/objects/pack/pack-3baed7d30e4536c1173b6c083d81de217e9c829a.idx
>> >error: wrong index v2 file size in
>> >/public/memtest86/.git/objects/pack/pack-3baed7d30e4536c1173b6c083d81de217e9c829a.idx
>> >error: wrong index v2 file size in
>> >/public/memtest86/.git/objects/pack/pack-3baed7d30e4536c1173b6c083d81de217e9c829a.idx
>> >error: wrong index v2 file size in
>> >/public/memtest86/.git/objects/pack/pack-3baed7d30e4536c1173b6c083d81de217e9c829a.idx
>> >error: wrong index v2 file size in
>> >/public/memtest86/.git/objects/pack/pack-3baed7d30e4536c1173b6c083d81de217e9c829a.idx
>> >error: wrong index v2 file size in
>> >/public/memtest86/.git/objects/pack/pack-3baed7d30e4536c1173b6c083d81de217e9c829a.idx
>> >fatal: bad object 9da11d5d7eaa9f1a6a26c04c22b5422c886699a0
>> >fatal: remote did not send all necessary objects
>> >
>> >Userland is now broken.
>> >
>> >Please fix.
>> 
>> -- 
>> Ryo ONODERA // r...@tetera.org
>> PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB FD1B F404 27FA C7D1 15F3

-- 
Ryo ONODERA // r...@tetera.org
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


Re: CVS commit: src/sys

2020-01-19 Thread Ryo ONODERA
Sorry I have note sent this e-mail to you.

Ryo ONODERA  writes:

> Hi,
>
> After this commit, the kernel stalls just before root file system
> will be found on my NetBSD/amd64 laptop.
>
> Reverting
> src/sys/kern/kern_rwlock.c to r1.60
> and
> src/sys/sys/rwlock.h to r1.12
> in latest -current tree and I can get the kernel that works like
> before.
>
> And on another laptop, the problematic kernel stalls before root file
> system detection like my laptop.
>
> It may be universal problem.
>
> Could you take a look at this problem?
>
> Thank you.
>
> "Andrew Doran"  writes:
>
>> Module Name: src
>> Committed By:ad
>> Date:Sun Jan 19 18:34:24 UTC 2020
>>
>> Modified Files:
>>  src/sys/kern: kern_rwlock.c
>>  src/sys/sys: rwlock.h
>>
>> Log Message:
>> Tidy rwlocks a bit, no functional change intended.  Mainly:
>>
>> - rw_downgrade(): do it in a for () loop like all the others.
>> - Explicitly carry around RW_NODEBUG - don't be lazy.
>> - Remove pointless macros.
>> - Don't make assertions conditional on LOCKDEBUG, there's no reason.
>> - Make space for a new flag bit (not added yet).
>>
>>
>> To generate a diff of this commit:
>> cvs rdiff -u -r1.60 -r1.61 src/sys/kern/kern_rwlock.c
>> cvs rdiff -u -r1.12 -r1.13 src/sys/sys/rwlock.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/kern/kern_rwlock.c
>> diff -u src/sys/kern/kern_rwlock.c:1.60 src/sys/kern/kern_rwlock.c:1.61
>> --- src/sys/kern/kern_rwlock.c:1.60  Sun Jan 12 18:37:10 2020
>> +++ src/sys/kern/kern_rwlock.c   Sun Jan 19 18:34:24 2020
>> @@ -1,4 +1,4 @@
>> -/*  $NetBSD: kern_rwlock.c,v 1.60 2020/01/12 18:37:10 ad Exp $  */
>> +/*  $NetBSD: kern_rwlock.c,v 1.61 2020/01/19 18:34:24 ad Exp $  */
>>  
>>  /*-
>>   * Copyright (c) 2002, 2006, 2007, 2008, 2009, 2019, 2020
>> @@ -39,7 +39,9 @@
>>   */
>>  
>>  #include 
>> -__KERNEL_RCSID(0, "$NetBSD: kern_rwlock.c,v 1.60 2020/01/12 18:37:10 ad Exp 
>> $");
>> +__KERNEL_RCSID(0, "$NetBSD: kern_rwlock.c,v 1.61 2020/01/19 18:34:24 ad Exp 
>> $");
>> +
>> +#include "opt_lockdebug.h"
>>  
>>  #define __RWLOCK_PRIVATE
>>  
>> @@ -63,58 +65,32 @@ __KERNEL_RCSID(0, "$NetBSD: kern_rwlock.
>>   * LOCKDEBUG
>>   */
>>  
>> -#if defined(LOCKDEBUG)
>> -
>> -#define RW_WANTLOCK(rw, op) 
>> \
>> -LOCKDEBUG_WANTLOCK(RW_DEBUG_P(rw), (rw),\
>> -(uintptr_t)__builtin_return_address(0), op == RW_READER);
>> -#define RW_LOCKED(rw, op)   
>> \
>> -LOCKDEBUG_LOCKED(RW_DEBUG_P(rw), (rw), NULL,\
>> -(uintptr_t)__builtin_return_address(0), op == RW_READER);
>> -#define RW_UNLOCKED(rw, op) 
>> \
>> -LOCKDEBUG_UNLOCKED(RW_DEBUG_P(rw), (rw),\
>> -(uintptr_t)__builtin_return_address(0), op == RW_READER);
>> -#define RW_DASSERT(rw, cond)
>> \
>> -do {
>> \
>> -if (__predict_false(!(cond)))   \
>> -rw_abort(__func__, __LINE__, rw, "assertion failed: " #cond);\
>> -} while (/* CONSTCOND */ 0);
>> -
>> -#else   /* LOCKDEBUG */
>> -
>> -#define RW_WANTLOCK(rw, op) /* nothing */
>> -#define RW_LOCKED(rw, op)   /* nothing */
>> -#define RW_UNLOCKED(rw, op) /* nothing */
>> -#define RW_DASSERT(rw, cond)/* nothing */
>> +#define RW_DEBUG_P(rw)  (((rw)->rw_owner & RW_NODEBUG) == 0)
>>  
>> -#endif  /* LOCKDEBUG */
>> +#define RW_WANTLOCK(rw, op) \
>> +LOCKDEBUG_WANTLOCK(RW_DEBUG_P(rw), (rw), \
>> +(uintptr_t)__builtin_return_address(0), op == RW_READER);
>> +#define RW_LOCKED(rw, op) \
>> +LOCKDEBUG_LOCKED(RW_DEBUG_P(rw), (rw), NULL, \
>> +(uintptr_t)__builtin_return_address(0), op == RW_READER);
>> +#define RW_UNLOCKED(rw, op) \
>> +LOCKDEBUG_UNLOCKED(RW_DEBUG_P(rw), (rw), \
>> +(uintptr_t)__builtin_return_address(0), op == RW_READER);
>>  
>>  /*
>>   * DIAGNOSTIC
&

Re: CVS commit: src/sys

2020-01-19 Thread Ryo ONODERA
ITE_WANTED;
>  
> @@ -673,22 +675,24 @@ rw_downgrade(krwlock_t *rw)
>  
>   RW_WANTLOCK(rw, RW_READER);
>   RW_LOCKED(rw, RW_READER);
> - RW_DASSERT(rw, (rw->rw_owner & RW_WRITE_LOCKED) == 0);
> - RW_DASSERT(rw, RW_COUNT(rw) != 0);
> + RW_ASSERT(rw, (rw->rw_owner & RW_WRITE_LOCKED) == 0);
> + RW_ASSERT(rw, RW_COUNT(rw) != 0);
>  }
>  
>  /*
>   * rw_tryupgrade:
>   *
>   *   Try to upgrade a read lock to a write lock.  We must be the only
> - *   reader.  Optimise memory accesses for the uncontended case.
> + *   reader.
>   */
>  int
>  rw_tryupgrade(krwlock_t *rw)
>  {
>   uintptr_t owner, curthread, newown, next;
> + struct lwp *l;
>  
> - curthread = (uintptr_t)curlwp;
> + l = curlwp;
> + curthread = (uintptr_t)l;
>   RW_ASSERT(rw, curthread != 0);
>   RW_ASSERT(rw, rw_read_held(rw));
>  
> @@ -709,8 +713,8 @@ rw_tryupgrade(krwlock_t *rw)
>   RW_UNLOCKED(rw, RW_READER);
>   RW_WANTLOCK(rw, RW_WRITER);
>   RW_LOCKED(rw, RW_WRITER);
> - RW_DASSERT(rw, rw->rw_owner & RW_WRITE_LOCKED);
> - RW_DASSERT(rw, RW_OWNER(rw) == curthread);
> + RW_ASSERT(rw, rw->rw_owner & RW_WRITE_LOCKED);
> + RW_ASSERT(rw, RW_OWNER(rw) == curthread);
>  
>   return 1;
>  }
>
> Index: src/sys/sys/rwlock.h
> diff -u src/sys/sys/rwlock.h:1.12 src/sys/sys/rwlock.h:1.13
> --- src/sys/sys/rwlock.h:1.12 Wed Jan  1 21:34:39 2020
> +++ src/sys/sys/rwlock.h  Sun Jan 19 18:34:24 2020
> @@ -1,7 +1,7 @@
> -/*   $NetBSD: rwlock.h,v 1.12 2020/01/01 21:34:39 ad Exp $   */
> +/*   $NetBSD: rwlock.h,v 1.13 2020/01/19 18:34:24 ad Exp $   */
>  
>  /*-
> - * Copyright (c) 2002, 2006, 2007, 2008, 2019 The NetBSD Foundation, Inc.
> + * Copyright (c) 2002, 2006, 2007, 2008, 2019, 2020 The NetBSD Foundation, 
> Inc.
>   * All rights reserved.
>   *
>   * This code is derived from software contributed to The NetBSD Foundation
> @@ -45,10 +45,6 @@
>   *   rw_tryenter()
>   */
>  
> -#if defined(_KERNEL_OPT)
> -#include "opt_lockdebug.h"
> -#endif
> -
>  #if !defined(_KERNEL)
>  #include 
>  #include 
> @@ -75,13 +71,9 @@ typedef struct krwlock krwlock_t;
>  #define  RW_HAS_WAITERS  0x01UL  /* lock has waiters */
>  #define  RW_WRITE_WANTED 0x02UL  /* >= 1 waiter is a writer */
>  #define  RW_WRITE_LOCKED 0x04UL  /* lock is currently write 
> locked */
> -#if defined(LOCKDEBUG)
> -#define  RW_NODEBUG  0x08UL  /* LOCKDEBUG disabled */
> -#else
> -#define  RW_NODEBUG  0x00UL  /* do nothing */
> -#endif   /* LOCKDEBUG */
> +#define  RW_NODEBUG  0x10UL  /* LOCKDEBUG disabled */
>  
> -#define  RW_READ_COUNT_SHIFT 4
> +#define  RW_READ_COUNT_SHIFT 5
>  #define  RW_READ_INCR(1UL << RW_READ_COUNT_SHIFT)
>  #define  RW_THREAD   ((uintptr_t)-RW_READ_INCR)
>  #define  RW_OWNER(rw)((rw)->rw_owner & RW_THREAD)
> @@ -91,6 +83,7 @@ typedef struct krwlock krwlock_t;
>  void rw_vector_enter(krwlock_t *, const krw_t);
>  void rw_vector_exit(krwlock_t *);
>  int  rw_vector_tryenter(krwlock_t *, const krw_t);
> +void _rw_init(krwlock_t *, uintptr_t);
>  #endif   /* __RWLOCK_PRIVATE */
>  
>  struct krwlock {
>

-- 
Ryo ONODERA // r...@tetera.org
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


Re: CVS commit: src/sys [freeze on boot]

2020-01-20 Thread Ryo ONODERA
Ryo ONODERA  writes:

> Hi,
>
> Andrew Doran  writes:
>
>> Hi,
>>
>> This also happened the last time I touched rw_downgrade(), and I backed out
>> the change then, but both times I don't see the bug.  I have some questions:
>>
>> - Are you running DIAGNOSTIC and/or LOCKDEBUG?  I would be very interested
>>   to see what happens with a LOCKDEBUG kernel here.
>
> I will enable LOCKDEBUG and DIAGNOSTIC soon.

Sadly DIAGNOSTIC and LOCKDEBUG with i915drmkms(4) makes my LCD black
and I cannot see any messages.
When i915drmkms is disabled, the kernel boots without freeze in
DIAGNOSTIC and LOCKDEBUG case.

However ioctl(2) to ims(4) causes kernel panic.
I feel that this panic is not related to the boot freeze.
See:
$ crash -M netbsd.10.core -N netbsd.10
Crash version 9.99.39, image version 9.99.39.
System panicked: kernel diagnostic assertion "ci->ci_mtx_count == -1" failed: 
file "/usr/src/sys/kern/kern_synch.c", line 676 mi_switch: cpu0: ci_mtx_count 
(-2) != -1 (block with spin-mutex held)
Backtrace from time of crash is available.
crash> bt
_KERNEL_OPT_NARCNET() at 0
_KERNEL_OPT_ACPI_SCANPCI() at _KERNEL_OPT_ACPI_SCANPCI
sys_reboot() at sys_reboot
vpanic() at vpanic+0x181
kern_assert() at kern_assert+0x48
mi_switch() at mi_switch+0x9b8
sleepq_block() at sleepq_block+0x1cb
turnstile_block() at turnstile_block+0x5bd
mutex_enter() at mutex_enter+0x31d
iic_acquire_bus() at iic_acquire_bus+0x2a
ihidev_softintr() at ihidev_softintr+0x27
softint_dispatch() at softint_dispatch+0xdb
DDB lost frame for Xsoftintr+0x4f, trying 0xda8138ef00f0
Xsoftintr() at Xsoftintr+0x4f
--- interrupt ---
1c6f7f77b9463525:
crash>

>> - Do you have an ATI Radeon graphics chip?
>> - Are you using ZFS?
>
> My GPU is in Intel CPU (KabyLake Refresh).
> And I do not use ZFS at all. All partitions are FFSv2 with WAPBL.
>
>> Thanks,
>> Andrew
>>
>>
>> On Mon, Jan 20, 2020 at 12:41:37PM +0900, Ryo ONODERA wrote:
>>> Hi,
>>> 
>>> After this commit, the kernel stalls just before root file system
>>> will be found on my NetBSD/amd64 laptop.
>>> 
>>> Reverting
>>> src/sys/kern/kern_rwlock.c to r1.60
>>> and
>>> src/sys/sys/rwlock.h to r1.12
>>> in latest -current tree and I can get the kernel that works like
>>> before.
>>> 
>>> And on another laptop, the problematic kernel stalls before root file
>>> system detection like my laptop.
>>> 
>>> It may be universal problem.
>>> 
>>> Could you take a look at this problem?
>>> 
>>> Thank you.
>>> 
>>> "Andrew Doran"  writes:
>>> 
>>> > Module Name:  src
>>> > Committed By: ad
>>> > Date: Sun Jan 19 18:34:24 UTC 2020
>>> >
>>> > Modified Files:
>>> >   src/sys/kern: kern_rwlock.c
>>> >   src/sys/sys: rwlock.h
>>> >
>>> > Log Message:
>>> > Tidy rwlocks a bit, no functional change intended.  Mainly:
>>> >
>>> > - rw_downgrade(): do it in a for () loop like all the others.
>>> > - Explicitly carry around RW_NODEBUG - don't be lazy.
>>> > - Remove pointless macros.
>>> > - Don't make assertions conditional on LOCKDEBUG, there's no reason.
>>> > - Make space for a new flag bit (not added yet).
>>> >
>>> >
>>> > To generate a diff of this commit:
>>> > cvs rdiff -u -r1.60 -r1.61 src/sys/kern/kern_rwlock.c
>>> > cvs rdiff -u -r1.12 -r1.13 src/sys/sys/rwlock.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/kern/kern_rwlock.c
>>> > diff -u src/sys/kern/kern_rwlock.c:1.60 src/sys/kern/kern_rwlock.c:1.61
>>> > --- src/sys/kern/kern_rwlock.c:1.60   Sun Jan 12 18:37:10 2020
>>> > +++ src/sys/kern/kern_rwlock.cSun Jan 19 18:34:24 2020
>>> > @@ -1,4 +1,4 @@
>>> > -/*   $NetBSD: kern_rwlock.c,v 1.60 2020/01/12 18:37:10 ad Exp $  
>>> > */
>>> > +/*   $NetBSD: kern_rwlock.c,v 1.61 2020/01/19 18:34:24 ad Exp $  
>>> > */
>>> >  
>>> >  /*-
>>> >   * Copyright (c) 2002, 2006, 2007, 2008, 2009, 2019, 2020
>>> > @@ -39,7 +39,9 @@
>>> >   */
>>> >  
>>> >  #include 
>>> > -__KERNEL_RCSID(0, "$NetBS

Re: CVS commit: src/sys [freeze on boot]

2020-01-20 Thread Ryo ONODERA
Hi,

Andrew Doran  writes:

> Hi,
>
> This also happened the last time I touched rw_downgrade(), and I backed out
> the change then, but both times I don't see the bug.  I have some questions:
>
> - Are you running DIAGNOSTIC and/or LOCKDEBUG?  I would be very interested
>   to see what happens with a LOCKDEBUG kernel here.

I will enable LOCKDEBUG and DIAGNOSTIC soon.

> - Do you have an ATI Radeon graphics chip?
> - Are you using ZFS?

My GPU is in Intel CPU (KabyLake Refresh).
And I do not use ZFS at all. All partitions are FFSv2 with WAPBL.

> Thanks,
> Andrew
>
>
> On Mon, Jan 20, 2020 at 12:41:37PM +0900, Ryo ONODERA wrote:
>> Hi,
>> 
>> After this commit, the kernel stalls just before root file system
>> will be found on my NetBSD/amd64 laptop.
>> 
>> Reverting
>> src/sys/kern/kern_rwlock.c to r1.60
>> and
>> src/sys/sys/rwlock.h to r1.12
>> in latest -current tree and I can get the kernel that works like
>> before.
>> 
>> And on another laptop, the problematic kernel stalls before root file
>> system detection like my laptop.
>> 
>> It may be universal problem.
>> 
>> Could you take a look at this problem?
>> 
>> Thank you.
>> 
>> "Andrew Doran"  writes:
>> 
>> > Module Name:   src
>> > Committed By:  ad
>> > Date:  Sun Jan 19 18:34:24 UTC 2020
>> >
>> > Modified Files:
>> >src/sys/kern: kern_rwlock.c
>> >src/sys/sys: rwlock.h
>> >
>> > Log Message:
>> > Tidy rwlocks a bit, no functional change intended.  Mainly:
>> >
>> > - rw_downgrade(): do it in a for () loop like all the others.
>> > - Explicitly carry around RW_NODEBUG - don't be lazy.
>> > - Remove pointless macros.
>> > - Don't make assertions conditional on LOCKDEBUG, there's no reason.
>> > - Make space for a new flag bit (not added yet).
>> >
>> >
>> > To generate a diff of this commit:
>> > cvs rdiff -u -r1.60 -r1.61 src/sys/kern/kern_rwlock.c
>> > cvs rdiff -u -r1.12 -r1.13 src/sys/sys/rwlock.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/kern/kern_rwlock.c
>> > diff -u src/sys/kern/kern_rwlock.c:1.60 src/sys/kern/kern_rwlock.c:1.61
>> > --- src/sys/kern/kern_rwlock.c:1.60Sun Jan 12 18:37:10 2020
>> > +++ src/sys/kern/kern_rwlock.c Sun Jan 19 18:34:24 2020
>> > @@ -1,4 +1,4 @@
>> > -/*$NetBSD: kern_rwlock.c,v 1.60 2020/01/12 18:37:10 ad Exp $  
>> > */
>> > +/*$NetBSD: kern_rwlock.c,v 1.61 2020/01/19 18:34:24 ad Exp $  
>> > */
>> >  
>> >  /*-
>> >   * Copyright (c) 2002, 2006, 2007, 2008, 2009, 2019, 2020
>> > @@ -39,7 +39,9 @@
>> >   */
>> >  
>> >  #include 
>> > -__KERNEL_RCSID(0, "$NetBSD: kern_rwlock.c,v 1.60 2020/01/12 18:37:10 ad 
>> > Exp $");
>> > +__KERNEL_RCSID(0, "$NetBSD: kern_rwlock.c,v 1.61 2020/01/19 18:34:24 ad 
>> > Exp $");
>> > +
>> > +#include "opt_lockdebug.h"
>> >  
>> >  #define   __RWLOCK_PRIVATE
>> >  
>> > @@ -63,58 +65,32 @@ __KERNEL_RCSID(0, "$NetBSD: kern_rwlock.
>> >   * LOCKDEBUG
>> >   */
>> >  
>> > -#if defined(LOCKDEBUG)
>> > -
>> > -#define   RW_WANTLOCK(rw, op) 
>> > \
>> > -  LOCKDEBUG_WANTLOCK(RW_DEBUG_P(rw), (rw),\
>> > -  (uintptr_t)__builtin_return_address(0), op == RW_READER);
>> > -#define   RW_LOCKED(rw, op)   
>> > \
>> > -  LOCKDEBUG_LOCKED(RW_DEBUG_P(rw), (rw), NULL,\
>> > -  (uintptr_t)__builtin_return_address(0), op == RW_READER);
>> > -#define   RW_UNLOCKED(rw, op) 
>> > \
>> > -  LOCKDEBUG_UNLOCKED(RW_DEBUG_P(rw), (rw),\
>> > -  (uintptr_t)__builtin_return_address(0), op == RW_READER);
>> > -#define   RW_DASSERT(rw, cond)
>> > \
>> > -do {  
>> > \
>> > -  if (__predict_false(!(cond)))   \
>> > -  rw_abort(__func__, __LINE__, rw, "ass

Re: CVS commit: src/sys [freeze on boot]

2020-01-20 Thread Ryo ONODERA
Ryo ONODERA  writes:

> Ryo ONODERA  writes:
>
>> Hi,
>>
>> Andrew Doran  writes:
>>
>>> Hi,
>>>
>>> This also happened the last time I touched rw_downgrade(), and I backed out
>>> the change then, but both times I don't see the bug.  I have some questions:
>>>
>>> - Are you running DIAGNOSTIC and/or LOCKDEBUG?  I would be very interested
>>>   to see what happens with a LOCKDEBUG kernel here.
>>
>> I will enable LOCKDEBUG and DIAGNOSTIC soon.
>
> Sadly DIAGNOSTIC and LOCKDEBUG with i915drmkms(4) makes my LCD black
> and I cannot see any messages.
> When i915drmkms is disabled, the kernel boots without freeze in
> DIAGNOSTIC and LOCKDEBUG case.
>
> However ioctl(2) to ims(4) causes kernel panic.
> I feel that this panic is not related to the boot freeze.
> See:
> $ crash -M netbsd.10.core -N netbsd.10
> Crash version 9.99.39, image version 9.99.39.
> System panicked: kernel diagnostic assertion "ci->ci_mtx_count == -1" failed: 
> file "/usr/src/sys/kern/kern_synch.c", line 676 mi_switch: cpu0: ci_mtx_count 
> (-2) != -1 (block with spin-mutex held)
> Backtrace from time of crash is available.
> crash> bt
> _KERNEL_OPT_NARCNET() at 0
> _KERNEL_OPT_ACPI_SCANPCI() at _KERNEL_OPT_ACPI_SCANPCI
> sys_reboot() at sys_reboot
> vpanic() at vpanic+0x181
> kern_assert() at kern_assert+0x48
> mi_switch() at mi_switch+0x9b8
> sleepq_block() at sleepq_block+0x1cb
> turnstile_block() at turnstile_block+0x5bd
> mutex_enter() at mutex_enter+0x31d
> iic_acquire_bus() at iic_acquire_bus+0x2a
> ihidev_softintr() at ihidev_softintr+0x27
> softint_dispatch() at softint_dispatch+0xdb
> DDB lost frame for Xsoftintr+0x4f, trying 0xda8138ef00f0
> Xsoftintr() at Xsoftintr+0x4f
> --- interrupt ---
> 1c6f7f77b9463525:
> crash>

The black screen and ims(4) panic are not related to your change.
Older src tree with LOCKDEBUG reproduces these problem.

Thank you.

>>> - Do you have an ATI Radeon graphics chip?
>>> - Are you using ZFS?
>>
>> My GPU is in Intel CPU (KabyLake Refresh).
>> And I do not use ZFS at all. All partitions are FFSv2 with WAPBL.
>>
>>> Thanks,
>>> Andrew
>>>
>>>
>>> On Mon, Jan 20, 2020 at 12:41:37PM +0900, Ryo ONODERA wrote:
>>>> Hi,
>>>> 
>>>> After this commit, the kernel stalls just before root file system
>>>> will be found on my NetBSD/amd64 laptop.
>>>> 
>>>> Reverting
>>>> src/sys/kern/kern_rwlock.c to r1.60
>>>> and
>>>> src/sys/sys/rwlock.h to r1.12
>>>> in latest -current tree and I can get the kernel that works like
>>>> before.
>>>> 
>>>> And on another laptop, the problematic kernel stalls before root file
>>>> system detection like my laptop.
>>>> 
>>>> It may be universal problem.
>>>> 
>>>> Could you take a look at this problem?
>>>> 
>>>> Thank you.
>>>> 
-- 
Ryo ONODERA // r...@tetera.org
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


Re: CVS commit: src/sys [freeze on boot]

2020-01-20 Thread Ryo ONODERA
Hi,

Jason Thorpe  writes:

>> On Jan 20, 2020, at 6:48 AM, Ryo ONODERA  wrote:
>> 
>> The black screen and ims(4) panic are not related to your change.
>> Older src tree with LOCKDEBUG reproduces these problem.
>
> I'll look at the ims(4) issuer.

Thank you very much.
I can test any patch.

> -- thorpej
>

-- 
Ryo ONODERA // r...@tetera.org
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


Re: CVS commit: src/sys [freeze on boot]

2020-01-20 Thread Ryo ONODERA
Hi,

Thanks for your quick fix.
It works fine for my laptop now.


On January 21, 2020 3:50:23 AM GMT+09:00, Andrew Doran  wrote:
>Fix committed with sys/kern/kern_rwlock.c rev 1.62.  I didn't see the
>problem as I am running with LOCKDEBUG.
>
>Apologies for the disruption.
>
>Andrew

-- 
Ryo ONODERA // r...@tetera.org
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB FD1B F404 27FA C7D1 15F3


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

2019-12-24 Thread Ryo ONODERA
Hi,

"Emmanuel Dreyfus"  writes:

> Module Name:  src
> Committed By: manu
> Date: Sun Dec 15 02:56:40 UTC 2019
>
> Modified Files:
>   src/sys/arch/amd64/amd64: locore.S
>   src/sys/arch/amd64/conf: kern.ldscript
>
> Log Message:
> Restore multiboot 2 header in amd64 kernel
>
> The header must appear below 32k offset in the kernel file, but we
> have to make sure it does not load at low addresses, otherwise we
> break BIOS boot.
>
> .text section used to load at 0x20, we just load multiboot section
> there, and have .text loaded just after.

After this change, amd64 kernel does not boot on my HP Spectre x360
13-inch ae019TU laptop with pure UEFI boot mode.

Reverting this change on 2019-12-23T08:00 (UTC) enables pure UEFI boot.

On another laptop, VAIO S13, the same kernel boots fine in UEFI mode.

I want to continue to use my HP Spectre x360.
Could you take a look at my problem?

Thank you.

> To generate a diff of this commit:
> cvs rdiff -u -r1.193 -r1.194 src/sys/arch/amd64/amd64/locore.S
> cvs rdiff -u -r1.29 -r1.30 src/sys/arch/amd64/conf/kern.ldscript
>
> 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/amd64/amd64/locore.S
> diff -u src/sys/arch/amd64/amd64/locore.S:1.193 
> src/sys/arch/amd64/amd64/locore.S:1.194
> --- src/sys/arch/amd64/amd64/locore.S:1.193   Tue Dec 10 02:06:07 2019
> +++ src/sys/arch/amd64/amd64/locore.S Sun Dec 15 02:56:40 2019
> @@ -1,4 +1,4 @@
> -/*   $NetBSD: locore.S,v 1.193 2019/12/10 02:06:07 manu Exp $*/
> +/*   $NetBSD: locore.S,v 1.194 2019/12/15 02:56:40 manu Exp $*/
>  
>  /*
>   * Copyright-o-rama!
> @@ -432,7 +432,7 @@ END(farjmp64)
>   .space  512
>  tmpstk:
>  
> -.section multiboot,"ax",@progbits
> +.section multiboot,"a"
>  #if defined(MULTIBOOT)
>   .align  8
>   .globl  Multiboot2_Header
>
> Index: src/sys/arch/amd64/conf/kern.ldscript
> diff -u src/sys/arch/amd64/conf/kern.ldscript:1.29 
> src/sys/arch/amd64/conf/kern.ldscript:1.30
> --- src/sys/arch/amd64/conf/kern.ldscript:1.29Wed Dec 11 02:31:44 2019
> +++ src/sys/arch/amd64/conf/kern.ldscript Sun Dec 15 02:56:40 2019
> @@ -1,4 +1,4 @@
> -/*   $NetBSD: kern.ldscript,v 1.29 2019/12/11 02:31:44 manu Exp $*/
> +/*   $NetBSD: kern.ldscript,v 1.30 2019/12/15 02:56:40 manu Exp $*/
>  
>  #include "assym.h"
>  
> @@ -13,7 +13,17 @@ __LARGE_PAGE_SIZE = 0x20 ;
>  ENTRY(_start)
>  SECTIONS
>  {
> - .text : AT (ADDR(.text) & 0x0fff)
> + /*
> +  * multiboot (file_offset) : AT (load_address) 
> +  * file_offset must be below 32k for multiboot 2 specification
> +  * BIOS boot requires load_address above 0x20
> +  */
> + multiboot 0x1000 : AT (0x20)
> + {
> + . = ALIGN(8);
> + KEEP(*(multiboot));
> + }
> + .text : AT (0x20 + SIZEOF(multiboot))
>   {
>   . = ALIGN(__PAGE_SIZE);
>   __text_user_start = . ;
>

-- 
Ryo ONODERA // r...@tetera.org
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


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

2019-12-24 Thread Ryo ONODERA
f[100];
> +
> + rv = acpi_resource_parse(sc->sc_dev, hdl, "_CRS", ,
> + _resource_parse_ops_quiet);
> + if (ACPI_FAILURE(rv)) {
> + aprint_error_dev(sc->sc_dev, "can't parse '_CRS'\n");
> + return false;
> + }
> +
> + const struct acpi_irq * const irq = acpi_res_irq(, 0);
> + if (irq == NULL) {
> + aprint_error_dev(sc->sc_dev, "no IRQ resource\n");
> + acpi_resource_cleanup();
> + return false;
> + }
> +
> + sc->sc_intr_type =
> + irq->ar_type == ACPI_EDGE_SENSITIVE ? IST_EDGE : IST_LEVEL;
> +
> + acpi_resource_cleanup();
> +
> + sc->sc_ih = acpi_intr_establish(sc->sc_dev, sc->sc_phandle, IPL_TTY,
> + false, ihidev_intr, sc, device_xname(sc->sc_dev));
> + if (sc->sc_ih == NULL) {
> + aprint_error_dev(sc->sc_dev, "can't establish interrupt\n");
> + return false;
> + }
> + aprint_normal_dev(sc->sc_dev, "interrupting at %s\n",
> + acpi_intr_string(sc->sc_ih, buf, sizeof(buf)));
> +
> + sc->sc_sih = softint_establish(SOFTINT_SERIAL, ihidev_softintr, sc);
> + if (sc->sc_sih == NULL) {
> + aprint_error_dev(sc->sc_dev,
> + "can't establish soft interrupt\n");
> + return false;
> + }
> +
> + return true;
> +#else
> + aprint_error_dev(sc->sc_dev, "can't establish interrupt\n");
> + return false;
> +#endif
> +}
> +
> +static void
> +ihiddev_intr_fini(struct ihidev_softc *sc)
> +{
> +#if NACPICA > 0
> + if (sc->sc_ih != NULL) {
> + acpi_intr_disestablish(sc->sc_ih);
> + }
> + if (sc->sc_sih != NULL) {
> + softint_disestablish(sc->sc_sih);
> + }
> +#endif
> +}
> +
>  static int
>  ihidev_intr(void *arg)
>  {
> - struct ihidev_softc *sc = arg;
> + struct ihidev_softc * const sc = arg;
> +
> + mutex_enter(>sc_intr_lock);
> +
> + /*
> +  * Schedule our soft interrupt handler.  If we're using a level-
> +  * triggered interrupt, we have to mask it off while we wait
> +  * for service.
> +  */
> + softint_schedule(sc->sc_sih);
> + if (sc->sc_intr_type == IST_LEVEL) {
> +#if NACPICA > 0
> + acpi_intr_mask(sc->sc_ih);
> +#endif
> + }
> +
> + mutex_exit(>sc_intr_lock);
> +
> + return 1;
> +}
> +
> +static void
> +ihidev_softintr(void *arg)
> +{
> + struct ihidev_softc * const sc = arg;
>   struct ihidev *scd;
>   u_int psize;
>   int res, i;
>   u_char *p;
>   u_int rep = 0;
>  
> - /*
> -  * XXX: force I2C_F_POLL for now to avoid dwiic interrupting
> -  * while we are interrupting
> -  */
> -
> - mutex_enter(>sc_intr_lock);
> - iic_acquire_bus(sc->sc_tag, I2C_F_POLL);
> -
> + iic_acquire_bus(sc->sc_tag, 0);
>   res = iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP, sc->sc_addr, NULL, 0,
> - sc->sc_ibuf, sc->sc_isize, I2C_F_POLL);
> -
> - iic_release_bus(sc->sc_tag, I2C_F_POLL);
> - mutex_exit(>sc_intr_lock);
> + sc->sc_ibuf, sc->sc_isize, 0);
> + iic_release_bus(sc->sc_tag, 0);
>   if (res != 0)
> - return 1;
> + goto out;
>  
>   /*
>* 6.1.1 - First two bytes are the packet length, which must be less
> @@ -683,7 +753,7 @@ ihidev_intr(void *arg)
>   if (!psize || psize > sc->sc_isize) {
>   DPRINTF(("%s: %s: invalid packet size (%d vs. %d)\n",
>   sc->sc_dev.dv_xname, __func__, psize, sc->sc_isize));
> - return (1);
> + goto out;
>   }
>  
>   /* 3rd byte is the report id */
> @@ -695,22 +765,30 @@ ihidev_intr(void *arg)
>   if (rep >= sc->sc_nrepid) {
>   aprint_error_dev(sc->sc_dev, "%s: bad report id %d\n",
>   __func__, rep);
> - return (1);
> + goto out;
>   }
>  
> - DPRINTF(("%s: ihidev_intr: hid input (rep %d):", sc->sc_dev.dv_xname,
> - rep));
> + DPRINTF(("%s: %s: hid input (rep %d):", sc->sc_dev.dv_xname,
> + __func__, rep));
>   for (i = 0; i < sc->sc_isize; i++)
>   DPRINTF((" %.2x", sc->sc_ibuf[i]));
>   DPRINTF(("\n"));
>  
>   scd = sc->sc_subdevs[rep];
>   if (scd == NULL || !(scd->sc_state & IHIDEV_OPEN))

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

2019-12-25 Thread Ryo ONODERA
Sorry for confusing.

My attached patch does not improve my situation.
My mail is mistake. Sorry.

Reverting linker script fixes the kernel boot.

Thank you.

On December 26, 2019 1:23:34 AM GMT+09:00, Emmanuel Dreyfus  
wrote:
>On Wed, Dec 25, 2019 at 07:42:47PM +0900, Ryo ONODERA wrote:
>> The attached patch works for me.
>> However I have no idea about the meaning.
>
>It changes the multiboot section from DATA to CODE, which is
>odd but perfectly fine. I cannot understand how it can change
>the situation, though. Did it really fix the problem? Your 
>next message about reverted kern.ldscript  confuses me.

-- 
Ryo ONODERA // r...@tetera.org
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB FD1B F404 27FA C7D1 15F3


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

2019-12-27 Thread Ryo ONODERA
Hi,

Your patch works fine for my laptop too.

Thank you.

Masanobu SAITOH  writes:

> On 2019/12/27 1:55, Emmanuel Dreyfus wrote:
>> On Wed, Dec 25, 2019 at 05:05:11PM +0900, Masanobu SAITOH wrote:
>>>>> After this change, amd64 kernel does not boot on my HP Spectre x360
>>>>> 13-inch ae019TU laptop with pure UEFI boot mode.
>>>  I have a UEFI boot machine and it also doesn't boot well.
>> 
>> Please try the attached patch.
>> 
>> It adds the -n flag to ld, which disable auto-alignment of sections
>> in the file. I undestand alignement is highly desirable for userland
>> programs that may be mapped from file, but useless for the kernel,
>> which is just readen once by the bootloader.
>> 
>> Without auto-alignement, the .text segment starts right after the
>> ELF headers. This means the multiboot header can go in .text and
>> stay below 32k (as required by the multiboot specification). There
>> is no need for a multiboot section for that, and therefore no 
>> need to modify the linker script.
>> 
>> A side effect is that the kernel file shrinks of 2 MB, because there
>> is not an alignement hole between ELF headers and the .text section
>> anymore.
>> 
>> My patch also enable the MULTIBOOT option so that we can check
>> nothing gets broken with it. You can also try with the option
>> disabled, of course.
>> 
>
> Both with and without MULTIBOOT works fine. No any hangup/panic.
>
>  Thanks.
>
> -- 
> ---
> SAITOH Masanobu (msai...@execsw.org
>  msai...@netbsd.org)

-- 
Ryo ONODERA // r...@tetera.org
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


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

2020-04-27 Thread Ryo ONODERA
Hi,

After this commit, NetBSD/amd64-current on my HP Spectre x360
freezes after acpiacad0 detection (before ld0 detection).
Reverting this commit in latest tree fixes my freeze problem.

Could you take a look at my problem?

Thank you.

=== === ===
cpu7: CPU max freq 40 Hz
cpu7: TSC freq 199200 Hz
timecounter: Timecounter "TSC" frequency 199200 Hz quality 3000
uhub0 at usb0: NetBSD (0x) xHCI root hub (0x), class 9/0, rev 3.00/1.00,
 addr 0
uhub0: 6 ports with 6 removable, self powered
uhub1 at usb1: NetBSD (0x) xHCI root hub (0x), class 9/0, rev 2.00/1.00,
 addr 0
uhub1: 12 ports with 12 removable, self powered
acpiacad0: AC adapter online.

(With this commit, freeze here)

ld0: GPT GUID: 3fda58df-424f-4b48-9fb9-b4c5c037379e
dk0 at ld0: "EFI", 262144 blocks at 2048, type: ntfs
dk1 at ld0: "ROOT", 66955885 blocks at 266240, type: ffs
=== === ===

"Jason R Thorpe"  writes:

> Module Name:  src
> Committed By: thorpej
> Date: Sat Apr 25 00:07:27 UTC 2020
>
> Modified Files:
>   src/sys/dev/ata: ata.c ata_subr.c atavar.h
>
> Log Message:
> Rather than creating a kthread-per-channel, use a threadpool and a
> threadpool-job-per-channel for the in-thread-context work that needs
> to be done (which is rare).
>
> On one of my test systems, this results in the total number of LWPs
> after multi-user boot dropping from 116 to 78.
>
>
> To generate a diff of this commit:
> cvs rdiff -u -r1.155 -r1.156 src/sys/dev/ata/ata.c
> cvs rdiff -u -r1.9 -r1.10 src/sys/dev/ata/ata_subr.c
> cvs rdiff -u -r1.105 -r1.106 src/sys/dev/ata/atavar.h
>
> Please note that diffs are not public domain; they are subject to the
> copyright notices on the relevant files.
>

-- 
Ryo ONODERA // r...@tetera.org
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


Freeze or panic during boot was: Re: CVS commit: src/sys/dev/ata

2020-05-01 Thread Ryo ONODERA
Hi,

Have you missed this thread?

If the problem requires more time to investigate,
could you consider to revert ata change for a while?

Thank you.

Alexander Nasonov  writes:

> David Brownlee wrote:
>> Just another data point - seeing this same panic on a T480 with the
>> latest kernel from nyftp
>
> Same problem on T470.
>
> -- 
> Alex

-- 
Ryo ONODERA // r...@tetera.org
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


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

2020-04-27 Thread Ryo ONODERA
Ryo ONODERA  writes:

> Hi,
>
> After this commit, NetBSD/amd64-current on my HP Spectre x360
> freezes after acpiacad0 detection (before ld0 detection).
> Reverting this commit in latest tree fixes my freeze problem.
>
> Could you take a look at my problem?
>
> Thank you.
>
> === === ===
> cpu7: CPU max freq 40 Hz
> cpu7: TSC freq 199200 Hz
> timecounter: Timecounter "TSC" frequency 199200 Hz quality 3000
> uhub0 at usb0: NetBSD (0x) xHCI root hub (0x), class 9/0, rev 
> 3.00/1.00,
>  addr 0
> uhub0: 6 ports with 6 removable, self powered
> uhub1 at usb1: NetBSD (0x) xHCI root hub (0x), class 9/0, rev 
> 2.00/1.00,
>  addr 0
> uhub1: 12 ports with 12 removable, self powered
> acpiacad0: AC adapter online.
>
> (With this commit, freeze here)
>
> ld0: GPT GUID: 3fda58df-424f-4b48-9fb9-b4c5c037379e
> dk0 at ld0: "EFI", 262144 blocks at 2048, type: ntfs
> dk1 at ld0: "ROOT", 66955885 blocks at 266240, type: ffs
> === === ===

With LOCKDEBUG option,
I have gotten the following panic messages:

panic: TAILQ_INSERT_TAIL 0xd305ab82ae0 
/usr/src/sys/dev/pckbport/pckbport.c:531
cpu0: Begin traceback...
vpanic() at netbsd:vpanic+0x178
snprintf() at netbsd:snprintf
pckbport_enqueue_cmd() at netbsd:pckbport_enqueue_cmd+0x3c0
pms_reset_thread() at netbsd:pms_reset_thread+0x94
cpu0: End traceback...

Thank you.

-- 
Ryo ONODERA // r...@tetera.org
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


Re: CVS import: src/external/bsd/dhcpcd/dist

2020-10-14 Thread Ryo ONODERA
Hi,

dhcpcd-9.3.1 do not detect carrier with cdce(4) and urndis(4) devices.
dhcpcd-9.2.0 from pkgsrc-2020Q3 branch works without problems.
(Maybe 9.3.0 in NetBSD base worked for me.)

cdce and urndis have no "status" line in ifconfig command output.
Is this related to my problem?

"Roy Marples"  writes:

> Module Name:  src
> Committed By: roy
> Date: Mon Oct 12 14:07:56 UTC 2020
>
> Update of /cvsroot/src/external/bsd/dhcpcd/dist
> In directory ivanova.netbsd.org:/tmp/cvs-serv8895
>
> Log Message:
> Update to dhcpcd-9.3.1 with the following changes:
>  * dhcpcd: carrier handling issue fixed from 9.3.0
>  * dhcpcd: log if interface type is unsupported in debug
>  * duid: memory leak fixed if UUID wanted but none available
>  * privsep: fix receiving inet and no BPF running
>  * privsep: allow gettimeofday for SECCOMP
>  * privsep: fix stderr redirection again
>
> Status:
>
> Vendor Tag:   ROY
> Release Tags: dhcpcd-9_3_1
>   
> U src/external/bsd/dhcpcd/dist/LICENSE
> U src/external/bsd/dhcpcd/dist/README.md
> U src/external/bsd/dhcpcd/dist/src/defs.h
> U src/external/bsd/dhcpcd/dist/src/common.c
> U src/external/bsd/dhcpcd/dist/src/control.c
> C src/external/bsd/dhcpcd/dist/src/dhcpcd.c
> U src/external/bsd/dhcpcd/dist/src/duid.c
> U src/external/bsd/dhcpcd/dist/src/eloop.c
> C src/external/bsd/dhcpcd/dist/src/logerr.c
> U src/external/bsd/dhcpcd/dist/src/if.c
> U src/external/bsd/dhcpcd/dist/src/if-options.c
> U src/external/bsd/dhcpcd/dist/src/sa.c
> U src/external/bsd/dhcpcd/dist/src/route.c
> U src/external/bsd/dhcpcd/dist/src/dhcp-common.c
> C src/external/bsd/dhcpcd/dist/src/script.c
> U src/external/bsd/dhcpcd/dist/src/auth.c
> C src/external/bsd/dhcpcd/dist/src/if-bsd.c
> C src/external/bsd/dhcpcd/dist/src/dhcp.c
> U src/external/bsd/dhcpcd/dist/src/ipv4.c
> U src/external/bsd/dhcpcd/dist/src/bpf.c
> U src/external/bsd/dhcpcd/dist/src/arp.c
> U src/external/bsd/dhcpcd/dist/src/ipv4ll.c
> C src/external/bsd/dhcpcd/dist/src/ipv6.c
> C src/external/bsd/dhcpcd/dist/src/ipv6nd.c
> C src/external/bsd/dhcpcd/dist/src/dhcp6.c
> U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.c
> C src/external/bsd/dhcpcd/dist/src/privsep.c
> U src/external/bsd/dhcpcd/dist/src/privsep-root.c
> U src/external/bsd/dhcpcd/dist/src/privsep-control.c
> U src/external/bsd/dhcpcd/dist/src/privsep-inet.c
> U src/external/bsd/dhcpcd/dist/src/privsep-bpf.c
> U src/external/bsd/dhcpcd/dist/src/privsep-bsd.c
> U src/external/bsd/dhcpcd/dist/src/common.h
> U src/external/bsd/dhcpcd/dist/src/control.h
> U src/external/bsd/dhcpcd/dist/src/dhcpcd.h
> U src/external/bsd/dhcpcd/dist/src/duid.h
> U src/external/bsd/dhcpcd/dist/src/eloop.h
> U src/external/bsd/dhcpcd/dist/src/logerr.h
> U src/external/bsd/dhcpcd/dist/src/if.h
> U src/external/bsd/dhcpcd/dist/src/if-options.h
> U src/external/bsd/dhcpcd/dist/src/sa.h
> U src/external/bsd/dhcpcd/dist/src/route.h
> U src/external/bsd/dhcpcd/dist/src/dhcp-common.h
> U src/external/bsd/dhcpcd/dist/src/script.h
> U src/external/bsd/dhcpcd/dist/src/auth.h
> U src/external/bsd/dhcpcd/dist/src/dhcp.h
> U src/external/bsd/dhcpcd/dist/src/ipv4.h
> U src/external/bsd/dhcpcd/dist/src/bpf.h
> U src/external/bsd/dhcpcd/dist/src/arp.h
> U src/external/bsd/dhcpcd/dist/src/ipv4ll.h
> U src/external/bsd/dhcpcd/dist/src/ipv6.h
> U src/external/bsd/dhcpcd/dist/src/ipv6nd.h
> U src/external/bsd/dhcpcd/dist/src/dhcp6.h
> U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.h
> U src/external/bsd/dhcpcd/dist/src/privsep.h
> U src/external/bsd/dhcpcd/dist/src/privsep-root.h
> U src/external/bsd/dhcpcd/dist/src/privsep-control.h
> U src/external/bsd/dhcpcd/dist/src/privsep-inet.h
> U src/external/bsd/dhcpcd/dist/src/privsep-bpf.h
> U src/external/bsd/dhcpcd/dist/src/dev.h
> U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf.5.in
> U src/external/bsd/dhcpcd/dist/src/dhcpcd.8.in
> U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf
> U src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks.in
> U src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks.8.in
> U src/external/bsd/dhcpcd/dist/hooks/01-test
> U src/external/bsd/dhcpcd/dist/hooks/10-wpa_supplicant
> U src/external/bsd/dhcpcd/dist/hooks/15-timezone
> U src/external/bsd/dhcpcd/dist/hooks/20-resolv.conf
> U src/external/bsd/dhcpcd/dist/hooks/29-lookup-hostname
> U src/external/bsd/dhcpcd/dist/hooks/30-hostname.in
> U src/external/bsd/dhcpcd/dist/hooks/50-ntp.conf
> U src/external/bsd/dhcpcd/dist/hooks/50-ypbind.in
>
> 9 conflicts created by this import.
> Use the following command to help the merge:
>
>   cvs checkout -jROY:yesterday -jROY src/external/bsd/dhcpcd/dist
>

-- 
Ryo ONODERA // r...@tetera.org
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


Re: CVS import: src/external/bsd/dhcpcd/dist

2020-10-16 Thread Ryo ONODERA
Hi,

Roy Marples  writes:

> Hi Ryo
>
> On 15/10/2020 02:23, Ryo ONODERA wrote:
>> dhcpcd-9.3.1 do not detect carrier with cdce(4) and urndis(4) devices.
>> dhcpcd-9.2.0 from pkgsrc-2020Q3 branch works without problems.
>> (Maybe 9.3.0 in NetBSD base worked for me.)
>> 
>> cdce and urndis have no "status" line in ifconfig command output.
>> Is this related to my problem?
>
> Does this fix it?

This patch fixes my problem.

Thank you very much!

> diff --git a/src/if.c b/src/if.c
> index 5f4edb86..deb5280b 100644
> --- a/src/if.c
> +++ b/src/if.c
> @@ -198,10 +198,8 @@ if_is_link_up(const struct interface *ifp)
>   {
>
>   return ifp->flags & IFF_UP &&
> - (ifp->carrier == LINK_UP ||
> -  (ifp->carrier == LINK_UNKNOWN &&
> -   !(ifp->options == NULL ||
> - ifp->options->options & DHCPCD_LINK)));
> +     (ifp->carrier != LINK_DOWN ||
> +  (ifp->options != NULL && !(ifp->options->options & DHCPCD_LINK)));
>   }
>
>   int

-- 
Ryo ONODERA // r...@tetera.org
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


Re: CVS commit: src/share/man/man4

2020-08-24 Thread Ryo ONODERA
Hi,

Valery Ushakov  writes:

> On Mon, Aug 24, 2020 at 19:27:36 +0000, Ryo ONODERA wrote:
>
>> Module Name: src
>> Committed By:ryoon
>> Date:Mon Aug 24 19:27:36 UTC 2020
>> 
>> Modified Files:
>>  src/share/man/man4: viomb.4
>> 
>> Log Message:
>> Add a missing comma
>> 
>> And bump date.
>
> I don't think minor edits like this require a date bump.
>
> I'd say, the date bump is needed only for significant changes like
> adding or removing an option, or may be doing a large edit that
> changes the way the information is presented.

Sorry.
It makes sense.
Should I revert the date changes?

> -uwe

-- 
Ryo ONODERA // r...@tetera.org
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


Re: CVS commit: src/sys

2020-08-14 Thread Ryo ONODERA
Hi,

"Chuck Silvers"  writes:

> Module Name:  src
> Committed By: chs
> Date: Fri Aug 14 09:06:15 UTC 2020
>
> Modified Files:
>   src/sys/miscfs/genfs: genfs_io.c
>   src/sys/uvm: uvm_extern.h uvm_object.c uvm_object.h uvm_page.c
>   uvm_page_status.c uvm_pager.c uvm_vnode.c
>
> Log Message:
> centralize calls from UVM to radixtree into a few functions.
> in those functions, assert that the object lock is held in
> the correct mode.
>
>
> To generate a diff of this commit:
> cvs rdiff -u -r1.99 -r1.100 src/sys/miscfs/genfs/genfs_io.c
> cvs rdiff -u -r1.230 -r1.231 src/sys/uvm/uvm_extern.h
> cvs rdiff -u -r1.23 -r1.24 src/sys/uvm/uvm_object.c
> cvs rdiff -u -r1.38 -r1.39 src/sys/uvm/uvm_object.h
> cvs rdiff -u -r1.244 -r1.245 src/sys/uvm/uvm_page.c
> cvs rdiff -u -r1.5 -r1.6 src/sys/uvm/uvm_page_status.c
> cvs rdiff -u -r1.128 -r1.129 src/sys/uvm/uvm_pager.c
> cvs rdiff -u -r1.115 -r1.116 src/sys/uvm/uvm_vnode.c

This change assets after every shutdown or sync command
invocation on my two amd64 laptops at least.
Both laptop uses mount -o log (WAPBL).

The backtrace is as follows.
This is result of LOCKDEBUG enabled kernel.
I can get same result from DIAGNOSTICS kernel too.
Could you take a look at my problem?

$ crash -N netbsd.33 -M netbsd.33.core
Crash version 9.99.70, image version 9.99.70.
System panicked: kernel diagnostic assertion "uvm_pagelookup(uobj, offset) == 
NULL || ((a->ar_flags & UVM_PAGE_ARRAY_FILL_DIRTY) != 0 && 
!uvm_obj_page_dirty_p(pg))" failed: file "/usr/src/sys/uvm/uvm_vnode.c", line 
321
Backtrace from time of crash is available.
crash> bt
_KERNEL_OPT_NARCNET() at 0
?() at 87814aa72cb0
sys_reboot() at sys_reboot
vpanic() at vpanic+0x15b
__x86_indirect_thunk_rax() at __x86_indirect_thunk_rax
uvn_findpage() at uvn_findpage+0xf9
uvn_findpages() at uvn_findpages+0xcd
genfs_do_putpages() at genfs_do_putpages+0xc17
VOP_PUTPAGES() at VOP_PUTPAGES+0x43
ffs_full_fsync() at ffs_full_fsync+0x1b4
ffs_fsync() at ffs_fsync+0xef
VOP_FSYNC() at VOP_FSYNC+0x47
sched_sync() at sched_sync+0x168
crash>

Thank you.

-- 
Ryo ONODERA // r...@tetera.org
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


Re: CVS commit: src/sys/uvm

2020-09-22 Thread Ryo ONODERA
Hi,

Chuck Silvers  writes:

> On Tue, Sep 22, 2020 at 01:51:33AM +0900, Ryo ONODERA wrote:
>> Hi,
>> 
>> It seems that r1.124 of uvm_amap.c causes random userland segfaults
>> on my NetBSD/amd64.
>
> this should be fixed now, could you try again?
>
> this was another case of my usual trick "test a change well, modify
> the change at the last minute, re-test only minimally, commit".
> sorry about that.

Your commit fixes the random segfaults.

Thank you very much for your quick fix.

> -Chuck

-- 
Ryo ONODERA // r...@tetera.org
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


  1   2   >