Re: GCC TSan (Re: CVS commit: src/tests/usr.bin)

2020-09-15 Thread Martin Husemann
On Tue, Sep 15, 2020 at 03:32:25PM +0200, Kamil Rytarowski wrote:
> I've tried to mark the TSan parts that need porting as explicit failure,
> soo we can reduce the risk of shipping unported runtime.

That risc is quite low as currently the runtime is apparently not buildable
on anything but amd64 ;-)

Indeed once we are able to build runtime components we should also
adjust the tested architectures. Would be great if we could easily query
such things, but it is not even easy to conditionalize the tests on gcc
9 or newer.

Martin


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

2020-09-14 Thread Martin Husemann
On Mon, Sep 14, 2020 at 03:17:53PM +, Kamil Rytarowski wrote:
> Enable TSan tests for GCC and >32bit address space environments

Since tsan does not work on all architectures, this is not a good idea.
It would be better to code it with an explicit list of architectures
supported.

Martin


Re: CVS commit: src

2020-09-08 Thread Martin Husemann
On Tue, Sep 08, 2020 at 09:40:47AM -0300, Jared McNeill wrote:
> This causes issues with the source tree on case insensitive file-systems :(

Sorry, should be fixed.

Martin


Re: CVS commit: src/sys/dev/mii (PR/kern 55538)

2020-08-27 Thread Martin Husemann
On Mon, Aug 24, 2020 at 12:46:04PM +, Frank Kardel wrote:
> Module Name:  src
> Committed By: kardel
> Date: Mon Aug 24 12:46:04 UTC 2020
> 
> Modified Files:
>   src/sys/dev/mii: mii_physubr.c
> 
> Log Message:
> Keep the change check invariant intact. The previous code could miss
> status updates by picking up a new status different from the tested
> status. This left addresses in the DETACHED state although the
> link status is already UP again.
> 
> addresses PR/kern 55538
> 
> 
> To generate a diff of this commit:
> cvs rdiff -u -r1.92 -r1.93 src/sys/dev/mii/mii_physubr.c

Hi Frank,

this change breaks the network on my macppc, with r1.93 it only seems to be
able to send packets, but never receives answers (ARP does not complete,
but other hosts see the ARP requests).

gem0 at pci2 dev 15 function 0: Apple Computer GMAC Ethernet (rev. 0x01)
gem0: interrupting at irq 41
brgphy0 at gem0 phy 0: BCM5411 1000BASE-T media interface, rev. 1
brgphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 
1000baseT-FDX, auto
gem0: Ethernet address 00:03:93:71:ff:cc, 10KB RX fifo, 4KB TX fifo

It is connected to a gige switch:

media: Ethernet autoselect (1000baseT full-duplex,master)
status: active

(which looks the same in the non-working kernel).

Any ideas how to debug?

Martin


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

2020-08-17 Thread Martin Husemann
On Mon, Aug 17, 2020 at 11:10:39PM +0900, Izumi Tsutsui wrote:
> >> +xsrc/external/mit/xorg-server/dist/fb/fb.h1.3
> >> +xsrc/external/mit/xorg-server/dist/fb/fbfill.c1.2,1.3
> 
> This should be only 1.2 (no 1.3 yet).
> 
> >> +xsrc/external/mit/xorg-server/dist/fb/fbtile.c1.1-1.3
> 
> Maybe only 1.3 is enough (1.2 was file removal).

Both adjusted, thanks!

(The scripts deal not very well with vendor branches or source changes mails
referenced in commit messages)

Martin


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

2020-08-16 Thread Martin Husemann
On Sat, Aug 15, 2020 at 04:12:40PM +0200, Leonardo Taccari wrote:
> Can this use cdn.NetBSD.org and made a bit more general instead of
> hardcoding version/port please?

Maybe create a distinct "manually install pkgin" landing page with
enough magic/ links to guide the user to the "best" repo on our web
site and point the man page to that static url?

Martin


Re: CVS commit: src

2020-08-16 Thread Martin Husemann
Hi Nia,

I think you are mixing a few issues here into one discussion - which might
make sense from a user perspective, but does not help us to get forward.

>From my POV the interacting-but-need-to-be-solved-individually issues
are:

 - The libc or kernel<->userland API. This is what the core decision was
   about. The API is well (enough) defined, same on multiple OSes,
   and provides all the flexibility we need.

 - Making entropy available "early enough" during the boot process. This
   is a hard problem on *many* machines, but no big deal at all on modern
   x86 and a few modern aarch64.
   For me this is looks like still work in progress with no "good enough"
   solution yet. I understood Taylor would like to improve this next.
   I personally would define "early enough" as "during rc.d" and this makes
   the problem relatively easily solvable for "real installations" (see
   below) by just manually (or "someway") seeding the individual installations
   entropy file.
   IIUC Taylor would like to also enhance/add kernel parts providing entropy.

 - Related to above: how to deal with one-off setups like first boots of
   install images or clones of virtual machines.
   This will be solvable (probably by a combination of better scripting
   and/or documented "best practices") once the point above is more or
   less settled.

 - Finaly the grey area of "which variant of our API should applications
   use" (and even more complex: libraries). This needs individual answers
   on a case by case basis and might need some upstream battle - but we
   should be able to give good guidance and clear rules once the items
   above are cleared.

Martin


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

2020-07-11 Thread Martin Husemann
On Sat, Jul 11, 2020 at 06:24:51PM +0300, Kimmo Suominen wrote:
> I think all real SCSI hardware I've had has always just only had LUN 0,
> and each disk has been on its own SCSI ID (target).

Yes, I confused ID and LUN here - just ignore me.

Martin


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

2020-07-11 Thread Martin Husemann
On Sat, Jul 11, 2020 at 05:57:46PM +0300, Kimmo Suominen wrote:
> On Sat, Jul 11, 2020 at 05:47:34PM +0300, Jukka Ruohonen wrote:
> > I'd reckon a pullup to NetBSD 9 would be in order?
> 
> Yes, I was just waiting to be able to link to mail-index.  I had
> already checked that the patch applies cleanly to both netbsd-9
> and netbsd-8.

I don't understand the change. When was this broken? This has always worked
for me e.g. with the sd0 at LUN 3 and the controller at 6 or 7.

Or is there something special in your setup?

Martin


Re: CVS commit: src/sys

2020-07-08 Thread Martin Husemann
On Tue, Jul 07, 2020 at 03:38:49AM +, Jason R Thorpe wrote:
>   Provide a new resource provider API:

This is *extremly* verbose and overflows message buffer, can you move the
new messages to aprint_debug or ifdef with some proper DEBUG_* please?

Martin


Re: CVS commit: src/sys/arch/ia64/stand/ia64/efi

2020-07-02 Thread Martin Husemann
On Thu, Jul 02, 2020 at 08:03:09AM -0700, scole_mail wrote:
> That change didn't work:
> 
> http://releng.netbsd.org/builds/HEAD/202007020210Z/ia64.build.failed
>  ...
>  nbmake[10]: nbmake[10]: don't know how to make loader.efi.c. Stop


That build pre-dates Luke's fix.

Martin


Re: CVS commit: src/tests/lib/libarchive

2020-06-16 Thread Martin Husemann
On Tue, Jun 16, 2020 at 09:12:40AM -0700, Paul Goyette wrote:
> It might be better to run the test in a rump-kernel rather than in a
> "live" environment

The test this is about is a plain userland test:

it extracts/compresses/decompresses various archive formats and compares
results.

Only thing "special" is that it is in big parts cpu bound, and multi-threaded.

If NetBSD can not gracefully deal with that, something is very wrong
(which since about a month it is). This PR is on the "must be fixed before
branching netbsd-10" list, and I hope it will be fixed quickly.

Martin


Re: CVS commit: src/tests/lib/libarchive

2020-06-16 Thread Martin Husemann
On Tue, Jun 16, 2020 at 03:38:26PM -, Christos Zoulas wrote:
> So we are saying that it is ok for process running with regular priority,
> to be able to starve another process at the same priority from getting
> any runtime for 21 seconds in a uniprocessor kernel, and this does not
> indicate any problem with the scheduler implementation? This would mean
> that for a HZ=100 kernel in 2100 rescheduling opportunities, the watchdog
> thread was never selected to run?

No, that is definitively not OK, which is what the PR is about.

It is not OK for a regular atf run to cause a reboot of the test machine
though, so this is a temporary hack around the issue (and admitedly a very
ugly hack).

Martin


Re: CVS commit: src/lib/libpthread

2020-06-04 Thread Martin Husemann
On Wed, Jun 03, 2020 at 10:10:24PM +, Andrew Doran wrote:
> Module Name:  src
> Committed By: ad
> Date: Wed Jun  3 22:10:24 UTC 2020
> 
> Modified Files:
>   src/lib/libpthread: pthread.c pthread_cond.c pthread_mutex.c
> 
> Log Message:
> Deal with a couple of problems with threads being awoken early due to
> timeouts or cancellation where:

Not sure if it is caused by this commit or joergs TSD/malloc, but today
most of the libpthread tests time out on aarch64, while everything but
a few minor nits was fine on May 30.

Martin

(this is on a hummingboard pulse 4-core board)
lib/libpthread/t_barrier (398/848): 1 test cases
barrier: [300.034098s] Failed: Test case timed out after 300 seconds
[300.034568s]

lib/libpthread/t_cond (399/848): 9 test cases
bogus_timedwaits: [300.016677s] Failed: Test case timed out after 300 
seconds
broadcast: [300.023040s] Failed: Test case timed out after 300 seconds
cond_timedwait_race: [300.034567s] Failed: Test case timed out after 300 
seconds
condattr: [0.013756s] Passed.
destroy_after_cancel: [300.025649s] Failed: Test case timed out after 300 
seconds
signal_before_unlock: [300.023630s] Failed: Test case timed out after 300 
seconds
signal_before_unlock_static_init: [300.022909s] Failed: Test case timed out 
after 300 seconds
signal_delay_wait: [300.031310s] Failed: Test case timed out after 300 
seconds
signal_wait_race: [300.025552s] Failed: Test case timed out after 300 
seconds
[2400.221956s]

lib/libpthread/t_condwait (400/848): 2 test cases
cond_wait_mono: [2.023083s] Passed.
cond_wait_real: [2.017972s] Passed.
[4.042078s]

lib/libpthread/t_detach (401/848): 1 test cases
pthread_detach: [300.021242s] Failed: Test case timed out after 300 seconds
[300.021708s]

lib/libpthread/t_equal (402/848): 1 test cases
pthread_equal: [300.027646s] Failed: Test case timed out after 300 seconds
[300.028295s]

lib/libpthread/t_fork (403/848): 1 test cases
fork: [300.018077s] Failed: Test case timed out after 300 seconds
[300.018975s]

lib/libpthread/t_fpu (404/848): 1 test cases
fpu: [0.020578s] Passed.
[0.021314s]

lib/libpthread/t_join (405/848): 1 test cases
pthread_join: [0.021632s] Passed.
[0.022411s]

lib/libpthread/t_kill (406/848): 1 test cases
simple: [300.033759s] Failed: Test case timed out after 300 seconds
[300.034528s]

lib/libpthread/t_mutex (407/848): 7 test cases
mutex1: [300.017542s] Failed: Test case timed out after 300 seconds
mutex2: [300.023064s] Failed: Test case timed out after 300 seconds
mutex3: [300.023259s] Failed: Test case timed out after 300 seconds
mutex4: [300.023015s] Failed: Test case timed out after 300 seconds
mutex5: [300.023495s] Failed: Test case timed out after 300 seconds
mutexattr1: [0.013769s] Passed.
mutexattr2: [0.025483s] Passed.
[1500.154160s]

lib/libpthread/t_name (408/848): 1 test cases
name: [0.014262s] Passed.
[0.014951s]

...


Re: CVS commit: src

2020-05-10 Thread Martin Husemann
On Sun, May 10, 2020 at 04:18:54PM +0200, Yorick Hardy wrote:
> I think it may be better in the Makefile, since the test for amd64 already
> happens there and because the libi386 directory could conceivably
> also contain i386/non-amd64 tests.
> 
> I successfully completed a build with MKCOMPAT=no, using the patch below.
> Is it okay to commit?

Looks good to me, thanks!

Martin


Re: CVS commit: src

2020-05-07 Thread Martin Husemann
On Thu, May 07, 2020 at 10:52:26PM +0200, Yorick Hardy wrote:
> Thanks! It took a while for this to sink in ...
> 
> So I think the test should only be built if MKCOMPAT=yes ?
> (It does fail to build for me, because I usually have MKCOMPAT=no).

Yes, either the Makefile needs a conditional, or the SUBDIR+= in the
makefile above.

Martin


Re: CVS commit: src

2020-05-06 Thread Martin Husemann
On Thu, May 07, 2020 at 12:31:12AM +0200, Yorick Hardy wrote:
> I think this test depends on MKCOMPAT=yes. Does the attached the patch
> below look reasonable?
[..]
> -.if ${MACHINE} == "amd64"
> +.if ${MACHINE} == "amd64" && ${MKCOMPATTESTS} == "yes"

MKCOMPATTESTS is something slightly different. It is used to build e.g. the
"native" i386 tests (as 32bit binaries) when building an amd64 distribution.

This is usually set to "no".

MKCOMPAT=yes means to build i386 libraries, so you can build 32bit binaries
on amd64 with -m32. It is usually set to "yes".

Martin


Re: CVS commit: src/sys

2020-04-07 Thread Martin Husemann
On Tue, Apr 07, 2020 at 02:50:25PM +0900, Tetsuya Isaki wrote:
> In this case, yds(4) is attached at 5msec automatically.
> When attaching, audio layer calculates the blocksize from
> AUDI_BLK_MS etc and query it to MD driver (this is round_blocksize
> in audio(9)).  If the requested size is too small (or too large)
> for the MD driver, it will return alternative blocksize.  If audio
> layer can accept it, then use it.
> Is this right?

Yes, that sounds good.

Martin


Re: CVS commit: src/sys

2020-04-03 Thread Martin Husemann
On Fri, Apr 03, 2020 at 11:40:08PM +0900, Tetsuya Isaki wrote:
> I don't think so.  Each driver/hardware may have their specific
> restrictions.  Some driver/hardware may be able to set at 1msec
> but others may not.  It's nature.  And this is also why we
> should not be eager to reduce default blk_ms.

What I meant is that the generic audio system may have a way to query
the concrete driver(s) in use for a minimum value they support, and then
auto-scales the blk_ms appropriately.

Martin


Re: CVS commit: src/sys

2020-04-03 Thread Martin Husemann
On Fri, Apr 03, 2020 at 09:45:20PM +0900, Tetsuya Isaki wrote:
>  [*] On my alpha (500MHz), wss(4)/ISA works even on blk_ms=1.
>  But I was not able to set 1msec on yds(4) PCI sound card on
>  the same machine.  Its lower limit was 5msec (due to driver's
>  or hardware's restriction, I don't know details though).

Should we allow the driver to set a lower minimum for this?
Then all m68k and vax drivers could just request (say) 100ms and we are 
done?

Martin


Re: CVS commit: src/external/gpl3

2020-03-28 Thread Martin Husemann
On Sat, Mar 28, 2020 at 03:39:34PM +1100, matthew green wrote:
> we want both changes (libiberty, and my stdio.h/P_tmpdir
> change.)  we want to support old netbsd, non-netbsd, ..
> whatever build hosts.

Can we have them in 8.2 please?

Martin


Re: CVS commit: src/sys

2020-03-28 Thread Martin Husemann
On Sat, Mar 28, 2020 at 09:34:11AM +, nia wrote:
> > - It's not good idea to set such parameter in individual GENERICs.
> 
> It's not a good idea to punish the majority of NetBSD users because m68k
> is incredibly slow.

Both statements are true, and the latter is based on a misunderstanding.

It would be good to have a file somewhere in the audio code where the
default is selected based on some ifdefs - if we don't have anything
better something like:

#if defined(__m68k__) || defined(__vax__) || \
(defined(__sparc__) && !defined(_LP64)

#else
... 4ms
#endif

Or create (if we don't have yet) a  and define it there.

You can make it overridabel in individual kernel config files - but the
default should be sane.

Martin


Re: CVS commit: src/external/gpl3

2020-03-27 Thread Martin Husemann
On Fri, Mar 27, 2020 at 02:11:36PM -0400, Greg Troxel wrote:
> I don't see why we don't care about 8.  Given our release policy, that
> is supported until 10 is released.

It didn't have the local patch that Kamil wants to remove, so no change
there - but if we can fix it there too that would be a plus.

Martin


Re: CVS commit: src/external/gpl3

2020-03-27 Thread Martin Husemann
On Fri, Mar 27, 2020 at 06:36:29PM +0100, Kamil Rytarowski wrote:
> I tested the code without our local patch as mentioned in my commit,
> even in the snapshot 1 commit before jak@'s change.
> 
> In all the cases I get P_tmpdir defined and pointing to "/tmp/".
> 
> I have not tested it on NetBSD-8 as host. All my tests were with NetBSD
> 9.99.51 as host with GCC style distribution.

We do not care that much for -8 (even not enough to have that patch you are
backing out pulled up). I only used it to test as that was what I had at hand
w/o the "force /tmp" commit.

If libiberty has been fixed upstream and the fix is not needed any more: great!

>From your description it was not clear to me if you did a native gcc build
(./configure && make or something) or used our in-tree reachover infrastructure
(which might be what was causing the bug).

Martin


Re: CVS commit: src/external/gpl3

2020-03-27 Thread Martin Husemann
On Fri, Mar 27, 2020 at 06:14:24PM +0100, Kamil Rytarowski wrote:
> On 27.03.2020 16:01, Martin Husemann wrote:
> > Which compiler version did you test?
> >
> 
> I tested on NetBSD HEAD GCC style distribution as host.

Not sure I understand. You need to test the in-tree build with the change
backed out, but maybe that is what you did?

Martin


Re: CVS commit: src/external/gpl3

2020-03-27 Thread Martin Husemann
Which compiler version did you test?

I see this on netbsd-8:

> echo $TMPDIR
TMPDIR: Undefined variable.
> ktrace -i $TOOLDIR/bin/x86_64--netbsd-gcc base64.c
[..]
> kdump | fgrep tmp
[..]
 19418  1 collect2 NAMI  "/var/tmp//ccs9D5nv.le"
 19418  1 collect2 NAMI  "/var/tmp//ccs9D5nv.le"
  8963  1 x86_64--netbsd-g NAMI  "/var/tmp//ccrQ0mcM.res"
  8963  1 x86_64--netbsd-g NAMI  "/var/tmp//ccrQ0mcM.res"
[..]


Martin


Re: CVS commit: src/external/gpl3

2020-03-26 Thread Martin Husemann
On Thu, Mar 26, 2020 at 02:57:40PM +0100, Kamil Rytarowski wrote:
> The build of tools could be fixed independently.
The problem is that we build the whole system with the tools gcc, and that
gcc misbehaves (or so I understood).

So pointing TMPDIR anywhere does not help.

Martin


Re: CVS commit: src/external/gpl3

2020-03-26 Thread Martin Husemann
On Thu, Mar 26, 2020 at 12:51:24AM +, Taylor R Campbell wrote:
> We should keep the change.  There is no semantic justification for
> putting build-time temporary files in the directory for temporary
> files that are meant to persist across reboot.  These temporary files
> _cannot_ be used if interrupted -- let alone by a reboot.

The original bug is somewhere else though: it seems (for reasons not well
understood) that the NetBSD tools build of gcc (contrary to the installed
one and all native build gcc) does *NOT* honour $TMPDIR in env. (Somthing
broken in the ifdef maze in libberty?)

We should fix that. My local build scripts (and the build cluster) properly
sets TMPDIR, so if that worked, the default would not matter.

Martin


Re: CVS commit: src/sys/arch/x86/acpi

2020-03-18 Thread Martin Husemann
On Wed, Mar 18, 2020 at 09:44:03PM +0200, Yorick Hardy wrote:
> Dear Andrew,
> 
> On 2020-03-14, Andrew Doran wrote:
> > Module Name:src
> > Committed By:   ad
> > Date:   Sat Mar 14 13:50:46 UTC 2020
> > 
> > Modified Files:
> > src/sys/arch/x86/acpi: acpi_cpu_md.c
> > 
> > Log Message:
> > Put ACPI idle under ACPICPU_ENABLE_C3 until the wrinkles are ironed out.
> > This seems well written and basically all good, but currently doesn't enter
> > a low power state, and imposes a big performance penalty.  Proposed on
> > port-i386 & port-amd64.
> > 
> > 
> > To generate a diff of this commit:
> > cvs rdiff -u -r1.81 -r1.82 src/sys/arch/x86/acpi/acpi_cpu_md.c
> > 
> > Please note that diffs are not public domain; they are subject to the
> > copyright notices on the relevant files.
> 
> This change seems to cause my machine to hang while booting. Reverting
> the change seems to fix the problem. Here are the details:

Same here, see kern/55080.

Martin


Re: CVS commit: src/lib/libcurses

2020-03-13 Thread Martin Husemann
On Fri, Mar 13, 2020 at 04:09:25PM -, Christos Zoulas wrote:
> Sorry I don't understand this change? How is that different than using
> 
>   err(EXIT_FAILURE, "initscr");

For crunched install media the older variant seems to pull in lots of libc
(libhack has a simple perror but no err/errx) and all the locale support.

Martin


Re: CVS commit: src/external/cddl/osnet/dist/uts/common/fs/zfs

2020-03-11 Thread Martin Husemann
On Wed, Mar 11, 2020 at 08:22:26AM -0400, Greg Troxel wrote:
> This seems to be hard to figure out.  Is there someplace in the tree
> that says what our upsream is, and what theirs is, and how all of the
> various trees out there relate?  And how we should be sending things,
> and getting things?

doc/3RDPARTY - but zfs is missing there.

Martin


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

2020-03-09 Thread Martin Husemann
On Mon, Mar 09, 2020 at 02:22:26PM +0100, Tobias Nygren wrote:
> /usr/src/sys/arch/amd64/amd64/trap.c: In function 'trap':
> /usr/src/sys/arch/amd64/amd64/trap.c:360:2: error: expected expression before 
> '}' token
> 
> 1.107 christos  356:
> 1.121.2.1! martin   357:
> MODULE_HOOK_CALL(amd64_oosyscall_hook, (p, frame),
> !   358:ENOSYS, hook_ret);
> !   359:if (hook_ret == 0)
> 1.107 christos  360:}
> 1.116 mrg   361:/* FALLTHROUGH */
> 

Yes, I fixed it a few minutes ago.

Martin


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

2020-03-08 Thread Martin Husemann
On Sun, Mar 08, 2020 at 02:16:00PM -, Christos Zoulas wrote:
> >Log Message:
> >Use unsigned to avoid undefined behavior. Found by kUBSan.
> 
> I think it is better to add U to all the HUP_ constants for consistency.
> It looks funny this way.

Yes, please keep it consistent.

Martin


Re: CVS commit: src/sys/dev

2020-03-02 Thread Martin Husemann
On Tue, Mar 03, 2020 at 03:26:47PM +1100, matthew green wrote:
> without really understanding, it seems that there should be
> a uhid ioctl to enable this mode, and then your userland code
> sets it, instead of this hack.

Or make uhid not attach at all on FIDO devices and instead use ugen from
userland?

Or solve the long standing "every usb devices should be able to eject
its driver and be used as ugen instead" problem, see also the various
JTAG devices showing up as dual uftdi and you need to override in your
kernel config like:

# GuruPlug JTAG debug interface
ugenif* at uhub? vendor 0x9e88 product 0x9e8f interface 0 flags 1


Most devices go via uhid to make userland access easy on windows, but for us
it makes no real difference.

Martin


Re: CVS commit: src/doc

2020-02-29 Thread Martin Husemann
On Sat, Feb 29, 2020 at 06:00:29PM +, Taylor R Campbell wrote:
> > Module Name:src
> > Committed By:   kamil
> > Date:   Sat Feb 29 04:27:01 UTC 2020
> > 
> > Modified Files:
> > src/doc: CHANGES
> > 
> > Log Message:
> > ld.elf_so(1): Implement DT_GNU_HASH
> 
> Was this discussed anywhere?  What are the advantages and drawbacks of
> this over what we were doing before?  What other toolchain changes are
> involved in using it?  What maintenance burden does it put on us for
> compatibility?  What's the impact on systems that prioritize size over
> speed?

It also does not compile on most architectures.

Martin


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

2020-02-22 Thread Martin Husemann
On Sun, Feb 23, 2020 at 03:35:19AM +0100, Kamil Rytarowski wrote:
> Algorithm would be changed from calculating on 32bit numbers with signed
> integer overflows to an algorithm calculating on 64bit numbers. The
> __dorand48() function truncates the result to least significant 16bits
> only so it does not matter. I retained operations on 32bits avoiding
> changes of types for stylistic reasons.

I am with uwe here - either it would not make any difference at all (on
32bit architectures) or it would end up with the same results and would
make no performance difference (on 64 bit architectures), so going with
the consistent (unsigned long) would have been fine.

Even better would be a cleanup to make it (uint32_t) everwhere, but of
course only after carefull examination.

Source code consistency is a very important stylistic plus, every break of
that should be accompanied by a comment.

Martin


Re: CVS commit: src/external/apache2/llvm/config/llvm/Config

2020-02-20 Thread Martin Husemann
On Fri, Feb 21, 2020 at 03:01:45AM +0100, Kamil Rytarowski wrote:
> I consider calling ncurses-dev essential as a bug.

My knee jerk reaction was: if a unix compiler needs terminfo (especially
when it only does that to create coloured unreadable messages) it needs
to be moved to pkgsrc. Same goes for a command line debugger.

But if I understood Joerg's (extremely terse) objection:
there should be logic in the tools build dealing with missing terminfo
libs and this case needs more analyzis to understand why it fails.

Martin


Re: CVS commit: src/usr.sbin/sysinst/arch

2020-02-03 Thread Martin Husemann
On Mon, Feb 03, 2020 at 05:45:29PM -, Christos Zoulas wrote:
> Write a function perhaps instead of open-coding it in 3 places?

I'm more inclined to completely remove it as I think it never can
happen with the current editing frontend and disklabel backend, but
going for minimal changes right now as this needs to go into 9.0 and I
can't test localy.

Martin


Re: Gallium build broken on evbarm...

2020-01-06 Thread Martin Husemann
On Mon, Jan 06, 2020 at 10:09:25AM +, Martin Husemann wrote:
> > Log Message:
> > Build fix.  Add back inclusion of , which was previously
> > included via .

Ah - easy one: the  include was in a

#if defined(_KERNEL) || defined(_KMEMUSER)

section - will fix.

Martin


Gallium build broken on evbarm...

2020-01-06 Thread Martin Husemann
On Mon, Jan 06, 2020 at 01:37:57AM +, Greg Oster wrote:
> Module Name:  src
> Committed By: oster
> Date: Mon Jan  6 01:37:57 UTC 2020
> 
> Modified Files:
>   src/sys/sys: sched.h
> 
> Log Message:
> Build fix.  Add back inclusion of , which was previously
> included via .
> 
> 
> To generate a diff of this commit:
> cvs rdiff -u -r1.83 -r1.84 src/sys/sys/sched.h

Either this or the previous commit break the build - not sure how it got
lucky before:

#   compile  gallium/api_exec.pico
/work/tools/bin/arm--netbsdelf-eabi-gcc -O2 -pipe -std=gnu11 -pthread 
-fvisibility=hidden -fno-strict-aliasing -fno-builtin-memcmp   -std=gnu99   
-Werror -Wno-error=stack-protector   -fPIE  -msoft-float  -fno-strict-aliasing  
 --sysroot=/work/hosts/evbarm -I/work/hosts/evbarm/usr/X11R7/include/libdrm  
-I/work/src/external/apache2/llvm/dist/llvm/include  
-I/work/src/external/apache2/llvm/include 
-I/work/src/external/apache2/llvm/config -DGALLIUM_SOFTPIPE  
-DGALLIUM_STATIC_TARGETS=1  -DMESA_EGL_NO_X11_HEADERS 
-I/work/xsrc/external/mit/MesaLib/dist/include 
-I/work/xsrc/external/mit/MesaLib/dist/src 
-I/work/xsrc/external/mit/MesaLib/dist/src/mesa 
-I/work/xsrc/external/mit/MesaLib/dist/src/mapi 
-I/work/xsrc/external/mit/MesaLib/dist/src/gallium/include 
-I/work/xsrc/external/mit/MesaLib/dist/../src/mapi/glapi 
-I/work/xsrc/external/mit/MesaLib/dist/../src/mesa 
-I/work/xsrc/external/mit/MesaLib/dist/../src/mesa/main 
-I/work/xsrc/external/mit/MesaLib/dist/src/mesa/drivers/dri/common 
-DPACKAGE_NAME=\"Mesa\"  -DPACKAGE_TARNAME=\"mesa\"  
-DPACKAGE_VERSION=\"19.1.17\"  -DPACKAGE_STRING=\"Mesa\ 19.1.17\"  
-DVERSION=\"19.1.17\"  
-DPACKAGE_BUGREPORT=\"https://bugs.freedesktop.org/enter_bug.cgi\?product=Mesa\;
  -DPACKAGE_URL=\"\"  -DPACKAGE=\"mesa\" -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 
-DHAVE_MEMORY_H=1  -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1  
-DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1  -DHAVE___BUILTIN_BSWAP32=1 
-DHAVE___BUILTIN_BSWAP64=1  -DHAVE___BUILTIN_CLZ=1 -DHAVE___BUILTIN_CLZLL=1  
-DHAVE___BUILTIN_CTZ=1 -DHAVE___BUILTIN_EXPECT=1  -DHAVE___BUILTIN_FFS=1 
-DHAVE___BUILTIN_FFSLL=1  -DHAVE___BUILTIN_POPCOUNT=1 
-DHAVE___BUILTIN_POPCOUNTLL=1  -DHAVE___BUILTIN_UNREACHABLE=1 
-DHAVE_FUNC_ATTRIBUTE_CONST=1  -DHAVE_FUNC_ATTRIBUTE_FLATTEN=1 
-DHAVE_FUNC_ATTRIBUTE_FORMAT=1  -DHAVE_FUNC_ATTRIBUTE_MALLOC=1 
-DHAVE_FUNC_ATTRIBUTE_PACKED=1  -DHAVE_FUNC_ATTRIBUTE_PURE=1 
-DHAVE_FUNC_ATTRIBUTE_RETURNS_NONNULL=1  -DHAVE_FUNC_ATTRIBUTE_UNUSED=1 
-DHAVE_FUNC_ATTRIBUTE_VISIBILITY=1  -DHAVE_FUNC_ATTRIBUTE_WARN_UNUSED_RESULT=1  
-DHAVE_FUNC_ATTRIBUTE_WEAK=1 -DHAVE_FUNC_ATTRIBUTE_ALIAS=1  
-DHAVE_FUNC_ATTRIBUTE_NORETURN=1 -DHAVE_ENDIAN_H=1 -DHAVE_DLADDR=1  
-DHAVE_CLOCK_GETTIME=1 -DHAVE_PTHREAD_PRIO_INHERIT=1  -DHAVE_PTHREAD=1  
-D__STDC_CONSTANT_MACROS  -D__STDC_FORMAT_MACROS  -D__STDC_LIMIT_MACROS  
-DUSE_GCC_ATOMIC_BUILTINS  -DNDEBUG  -DHAVE_SYS_SYSCTL_H  -DHAVE_DLFCN_H  
-DHAVE_STRTOF  -DHAVE_MKOSTEMP  -DHAVE_TIMESPEC_GET  -DHAVE_STRTOD_L  
-DHAVE_DL_ITERATE_PHDR  -DHAVE_POSIX_MEMALIGN  -DHAVE_ZLIB  -DHAVE_LIBDRM 
-DGLX_USE_DRM  -DGLX_INDIRECT_RENDERING  -DGLX_DIRECT_RENDERING  -DGLX_USE_TLS  
-DHAVE_X11_PLATFORM  -DHAVE_DRM_PLATFORM  -DENABLE_SHADER_CACHE  -DHAVE_MINCORE 
 -DHAVE_LIBDRM -DGLX_USE_DRM -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING 
-DHAVE_ALIAS -DMESA_EGL_NO_X11_HEADERS -DYYTEXT_POINTER=1 
-I/work/xsrc/external/mit/MesaLib/dist/src/compiler  
-I/work/xsrc/external/mit/MesaLib/dist/../src/compiler  
-I/work/xsrc/external/mit/MesaLib/dist/src/compiler/nir  
-I/work/xsrc/external/mit/MesaLib/dist/../src/compiler/nir  
-I/work/xsrc/external/mit/MesaLib/dist/src/compiler/glsl  
-I/work/xsrc/external/mit/MesaLib/dist/../src/compiler/glsl  
-I/work/xsrc/external/mit/MesaLib/dist/src/compiler/glsl/glcpp  
-I/work/xsrc/external/mit/MesaLib/dist/../src/compiler/glsl/glcpp  
-I/work/xsrc/external/mit/MesaLib/dist/src/compiler/spirv  
-I/work/xsrc/external/mit/MesaLib/dist/src/gallium/include  
-I/work/xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary  
-I/work/xsrc/external/mit/MesaLib/dist/src/gallium/drivers  
-I/work/xsrc/external/mit/MesaLib/dist/../src/mesa/drivers/dri/common  
-DCSRG_BASED -DFUNCPROTO=15 -DNARROWPROTO 
-I/work/hosts/evbarm/usr/X11R7/include -c   
-I/work/xsrc/external/mit/MesaLib/dist/src/glsl 
-I/work/xsrc/external/mit/MesaLib/dist/src/mesa/main 
-I/work/xsrc/external/mit/MesaLib/dist/src/../../src/compiler/nir -fPIC   -g 
/work/xsrc/external/mit/MesaLib/dist/src/../../src/mapi/glapi/api_exec.c -o 
api_exec.pico
In file included from 
/work/xsrc/external/mit/MesaLib/dist/src/compiler/nir/nir.h:34,
 from 
/work/xsrc/external/mit/MesaLib/dist/src/mesa/main/glspirv.h:27,
 from 
/work/xsrc/external/mit/MesaLib/dist/src/../../src/mapi/glapi/api_exec.c:68:
/work/xsrc/external/mit/MesaLib/dist/src/util/list.h:159: error: "LIST_REPLACE" 
redefined [-Werror]
 #define LIST_REPLACE(__from, __to) list_replace(__from, __to)
 
In file included from 

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

2020-01-05 Thread Martin Husemann
On Sun, Jan 05, 2020 at 01:21:46PM +, Nick Hudson wrote:
> Yes, I understand that. What I don't understand is how my
> sys/arch/arm/conf/Makefile.arm change affects the zaurus INSTALL kernel
> size because INSTALL specifically disables DDB and my patch is
> conditional on DDB

It did only break GENERIC in the releng builds (AFAICT).

Martin


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

2020-01-04 Thread Martin Husemann
On Sat, Jan 04, 2020 at 08:43:16AM +0100, Maxime Villard wrote:
> As said repeatedly, the option should be enabled only _after_ the garbage
> has been cleaned up.

This is not easy if you just call it that. To me it looks like Emanuel
is trying very hard to address all technical issues brought up explicitly
and clear. If this patch does not totaly "clean up the garbage", it would
help if you raise specific issues. If it does, why not include the re-enabling
in the patch?

Martin



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

2020-01-03 Thread Martin Husemann
On Sat, Jan 04, 2020 at 03:42:20AM +0900, Izumi Tsutsui wrote:
> The problem is caused by sys/arch/arm/conf/Makefile.arm.
> It defines "COPTS+= -mapcs-frame" in recent rev 1.52
>  
> http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/arch/arm/conf/Makefile.arm#rev1.52
> but MI sys/conf/Makefile.kern.inc defines COPTS+=-O2
> only if COPTS is empty.
>  
> This affects not only zaurus but all arm ports?

Yes! But only zaurus caused a build failure due to it.

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

I wonder if we should make the handling in sys/conf/Makefile.kern.inc
"better" and avoid this dance. If anyone fixes it, please feel free to
back out my bandaid in sys/arch/zaurus/conf/Makefile.zaurus.

Martin


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

2020-01-03 Thread Martin Husemann
On Fri, Jan 03, 2020 at 07:36:34PM +0900, Izumi Tsutsui wrote:
> - zbsdmod.o has 5MB buffers to store a copied kernel binary
> - zbsdmod.o reads a kernel from the 5MB buffer and loads sections
>   into the target addresses
>  
> https://nxr.netbsd.org/xref/src/sys/arch/zaurus/stand/zbsdmod/zbsdmod.c?r=1.12#94

Ah ok - thanks for explanation. So the dropping of ctf sections makes sense.

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

Martin


Re: CVS commit: src/sys/sys

2019-12-23 Thread Martin Husemann
On Mon, Dec 23, 2019 at 09:02:50AM -0500, Greg Troxel wrote:
> Well, we are coming up on a year since netbsd-9 was branched, or at
> least will arrive there before this discussion resolves.   So cutting
> -10 before we hit 100 works for me :-)

Nitpicking (and I don't know for the discussion resolving), but netbsd-9
was branched on 2019-07-30 (so not even 1/2 a year yes).

The branch for netbsd-10 can happen soon after Andrew is done (we need
10.0 on the build cluster ASAP).

Martin


Re: CVS commit: src

2019-12-20 Thread Martin Husemann
On Fri, Dec 20, 2019 at 07:54:36PM +0100, Maxime Villard wrote:
> Alright, fair enough. I will revert my removal over the week-end, because it
> hasn't received sufficient public discussion.

Thank you!

> As well, I will revert secteam's
> killing of the feature, because there has been no public discussion on that at
> all.

Please do not. You *do* have a point here, but:

 1) public discussion upfront for a security issue is not always possible,
as you are well aware
 2) there has been a public security advisory which assumes this change
and would need to be revised in case of reversal
 3) formally backing out other developers changes requires core approval

Thanks!

Martin


Re: CVS commit: src/sys/kern

2019-12-08 Thread Martin Husemann
On Sun, Dec 08, 2019 at 12:58:20PM +0100, Maxime Villard wrote:
> kMSan has special constraints which, in this specific case, come down to: each
> function called from a KCOV instrumentation callback must be a static inline
> tagged with __nomsan.
> 
> This was not the case with the updated in_interrupt(), but also still isn't 
> the
> case with the lwp_getspecific() call, which will have to be dropped.

This does not sound like a good reason to introduce MD code in sys/kern to
me. Could should not be made worse to deal with sanitizer restrictions.

Are there any alternatives?

Martin


Re: CVS commit: src/sys/arch

2019-12-06 Thread Martin Husemann
On Sat, Dec 07, 2019 at 06:30:55AM +1100, matthew green wrote:
> > Why? I consider this totaly useless bloat, what was wrong with the boot.cfg
> > solution?
> 
> policy:  no default modules in the installation unless licenses
> issues force such, until module+kernel solution.

OK, but this is gone awry. The boot.cfg solution is great if anoyne
really needs this dmesg sugar, everyone else can go on using pcictl 
later instead.

So now the (reasonable) policy forces a (relatively harmless, as easily
overidable but still useless) change into bloat for everyone. Can we
just revert to the state before the initial boot.cfg change instead?

Martin


Re: CVS commit: src/sys/arch

2019-12-06 Thread Martin Husemann
On Thu, Dec 05, 2019 at 10:05:05PM +, Sevan Janiyan wrote:
> Module Name:  src
> Committed By: sevan
> Date: Thu Dec  5 22:05:05 UTC 2019
> 
> Modified Files:
>   src/sys/arch/amd64/conf: GENERIC
>   src/sys/arch/i386/conf: GENERIC
> 
> Log Message:
> Enable pciverbose option to make use of the pcidevs database by default.

Why? I consider this totaly useless bloat, what was wrong with the boot.cfg
solution?

Martin


CVS commit: src/sys/arch/powerpc/include

2019-11-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Nov 29 12:04:32 UTC 2019

Modified Files:
src/sys/arch/powerpc/include: ptrace.h

Log Message:
Add illegal asm and breakpoint


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/powerpc/include/ptrace.h

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



CVS commit: src/sys/arch/powerpc/include

2019-11-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Nov 29 12:04:32 UTC 2019

Modified Files:
src/sys/arch/powerpc/include: ptrace.h

Log Message:
Add illegal asm and breakpoint


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/powerpc/include/ptrace.h

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

Modified files:

Index: src/sys/arch/powerpc/include/ptrace.h
diff -u src/sys/arch/powerpc/include/ptrace.h:1.14 src/sys/arch/powerpc/include/ptrace.h:1.15
--- src/sys/arch/powerpc/include/ptrace.h:1.14	Tue Jun 18 21:18:12 2019
+++ src/sys/arch/powerpc/include/ptrace.h	Fri Nov 29 12:04:32 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: ptrace.h,v 1.14 2019/06/18 21:18:12 kamil Exp $	*/
+/*	$NetBSD: ptrace.h,v 1.15 2019/11/29 12:04:32 martin Exp $	*/
 
 #ifndef _POWERPC_PTRACE_H
 #define	_POWERPC_PTRACE_H
@@ -71,4 +71,10 @@ int procfs_machdep_validvecregs(struct l
 #endif /* ALTIVEC || PPC_HAVE_SPE */
 #endif /* _KERNEL */
 
+#define PTRACE_ILLEGAL_ASM	__asm __volatile (".long 0" : : : "memory")
+
+#define PTRACE_BREAKPOINT	((const uint8_t[]) { 0x7f, 0xe0, 0x00, 0x08 })
+#define PTRACE_BREAKPOINT_ASM	__asm __volatile("trap")
+#define PTRACE_BREAKPOINT_SIZE	4
+
 #endif /* _POWERPC_PTRACE_H */



CVS commit: src/sys/arch/sparc/stand/ofwboot

2019-11-28 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Nov 28 14:21:25 UTC 2019

Modified Files:
src/sys/arch/sparc/stand/ofwboot: srt0.s

Log Message:
Provide a mostly-zeroed page at the start of the text segment, to work around
an OpenBIOS bug, see PR port-sparc64/54719 for details.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/sparc/stand/ofwboot/srt0.s

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



CVS commit: src/sys/arch/sparc/stand/ofwboot

2019-11-28 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Nov 28 14:21:25 UTC 2019

Modified Files:
src/sys/arch/sparc/stand/ofwboot: srt0.s

Log Message:
Provide a mostly-zeroed page at the start of the text segment, to work around
an OpenBIOS bug, see PR port-sparc64/54719 for details.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/sparc/stand/ofwboot/srt0.s

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/sparc/stand/ofwboot/srt0.s
diff -u src/sys/arch/sparc/stand/ofwboot/srt0.s:1.7 src/sys/arch/sparc/stand/ofwboot/srt0.s:1.8
--- src/sys/arch/sparc/stand/ofwboot/srt0.s:1.7	Sun Aug 23 10:59:15 2015
+++ src/sys/arch/sparc/stand/ofwboot/srt0.s	Thu Nov 28 14:21:25 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: srt0.s,v 1.7 2015/08/23 10:59:15 joerg Exp $	*/
+/*	$NetBSD: srt0.s,v 1.8 2019/11/28 14:21:25 martin Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -63,7 +63,10 @@ _esym:	.word	0			/* end of symbol table 
 	_C_LABEL(kernel_text) = _start
 _start:
 	nop			! For some reason this is needed to fixup the text section
-
+	b 1f
+	 nop
+	.zero 8192-(.-_start)	/* hack for OpenBIOS, see port-sparc64/54719 */
+1:
 	/*
 	 * Start by creating a stack for ourselves.
 	 */



CVS commit: [netbsd-9] src/doc

2019-11-27 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Nov 27 16:14:53 UTC 2019

Modified Files:
src/doc [netbsd-9]: CHANGES-9.0

Log Message:
Fix editor mishap, note chanes to distrib/notes/common/Makefile.inc


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.125 -r1.1.2.126 src/doc/CHANGES-9.0

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

Modified files:

Index: src/doc/CHANGES-9.0
diff -u src/doc/CHANGES-9.0:1.1.2.125 src/doc/CHANGES-9.0:1.1.2.126
--- src/doc/CHANGES-9.0:1.1.2.125	Wed Nov 27 14:34:31 2019
+++ src/doc/CHANGES-9.0	Wed Nov 27 16:14:52 2019
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.0,v 1.1.2.125 2019/11/27 14:34:31 martin Exp $
+# $NetBSD: CHANGES-9.0,v 1.1.2.126 2019/11/27 16:14:52 martin Exp $
 
 A complete list of changes from the initial NetBSD 9.0 branch on 2019-07-30
 until the 9.0 release:
@@ -6615,7 +6615,7 @@ sys/dev/pci/esm.c1.64
 	add missing break.
 	[msaitoh, ticket #493]
 
-istrib/notes/common/main			(edited manually)
+distrib/notes/common/main			(edited manually)
 
 	Note sysinst changes.
 
@@ -6623,3 +6623,9 @@ external/gpl2/groff/tmac/mdoc.local		(ed
 sys/sys/param.h	(edited manually)
 
 	Welcome to 9.0_RC1 !
+
+distrib/notes/common/Makefile.inc		1.47
+
+	Fix generation of non-HTML ToC.
+	(9.0_RC1 tag moved)
+



CVS commit: [netbsd-9] src/doc

2019-11-27 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Nov 27 16:14:53 UTC 2019

Modified Files:
src/doc [netbsd-9]: CHANGES-9.0

Log Message:
Fix editor mishap, note chanes to distrib/notes/common/Makefile.inc


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.125 -r1.1.2.126 src/doc/CHANGES-9.0

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



CVS commit: [netbsd-9] src/distrib/notes

2019-11-27 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Nov 27 16:07:30 UTC 2019

Modified Files:
src/distrib/notes [netbsd-9]: Makefile.inc

Log Message:
Pull up the following revision:

distrib/notes/Makefile.inc  1.47

When creating the TOC file, strip all incoming double quotes, but output
quotes around the third arg of the generated Ti macro invocation.
This fixes the TOC in non-html output. Pointed out by kre.


To generate a diff of this commit:
cvs rdiff -u -r1.43.18.3 -r1.43.18.4 src/distrib/notes/Makefile.inc

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



CVS commit: [netbsd-9] src/distrib/notes

2019-11-27 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Nov 27 16:07:30 UTC 2019

Modified Files:
src/distrib/notes [netbsd-9]: Makefile.inc

Log Message:
Pull up the following revision:

distrib/notes/Makefile.inc  1.47

When creating the TOC file, strip all incoming double quotes, but output
quotes around the third arg of the generated Ti macro invocation.
This fixes the TOC in non-html output. Pointed out by kre.


To generate a diff of this commit:
cvs rdiff -u -r1.43.18.3 -r1.43.18.4 src/distrib/notes/Makefile.inc

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

Modified files:

Index: src/distrib/notes/Makefile.inc
diff -u src/distrib/notes/Makefile.inc:1.43.18.3 src/distrib/notes/Makefile.inc:1.43.18.4
--- src/distrib/notes/Makefile.inc:1.43.18.3	Wed Nov 27 13:36:55 2019
+++ src/distrib/notes/Makefile.inc	Wed Nov 27 16:07:30 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.43.18.3 2019/11/27 13:36:55 msaitoh Exp $
+#	$NetBSD: Makefile.inc,v 1.43.18.4 2019/11/27 16:07:30 martin Exp $
 #
 
 # Ross Harvey 
@@ -107,7 +107,9 @@ ${TARG}.more: ${SRCS} ${TOC.more} ${DIST
 # space taken by the TOC itself.
 #
 
-TOCPROC=	   2>&1 >/dev/null | ${TOOL_GREP} -e '^\.Ti '
+TOCPROC=	  2>&1 >/dev/null |\
+	   ${TOOL_SED} -n -e 's/"//g' \
+	   -e '/^\.Ti/{s/ \([A-Za-z]\)/ "\1/; s/ *$$/"/; p; }'
 
 ${TARG}.PostScript.toc: ${SRCS}
 	${TOOL_GROFF} -dTOC=1 ${ARGS_PS} -mdoc ${MAIN} ${TOCPROC} > $@.tmp



CVS commit: src/distrib/notes

2019-11-27 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Nov 27 15:58:12 UTC 2019

Modified Files:
src/distrib/notes: Makefile.inc

Log Message:
When creating the TOC file, strip all incoming double quotes, but output
quotes around the third arg of the generated Ti macro invocation.
This fixes the TOC in non-html output. Pointed out by kre.


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/distrib/notes/Makefile.inc

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

Modified files:

Index: src/distrib/notes/Makefile.inc
diff -u src/distrib/notes/Makefile.inc:1.46 src/distrib/notes/Makefile.inc:1.47
--- src/distrib/notes/Makefile.inc:1.46	Wed Nov 27 09:29:25 2019
+++ src/distrib/notes/Makefile.inc	Wed Nov 27 15:58:12 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.46 2019/11/27 09:29:25 martin Exp $
+#	$NetBSD: Makefile.inc,v 1.47 2019/11/27 15:58:12 martin Exp $
 #
 
 # Ross Harvey 
@@ -107,7 +107,9 @@ ${TARG}.more: ${SRCS} ${TOC.more} ${DIST
 # space taken by the TOC itself.
 #
 
-TOCPROC=	   2>&1 >/dev/null | ${TOOL_GREP} -e '^\.Ti '
+TOCPROC=	  2>&1 >/dev/null |\
+	   ${TOOL_SED} -n -e 's/"//g' \
+	   -e '/^\.Ti/{s/ \([A-Za-z]\)/ "\1/; s/ *$$/"/; p; }'
 
 ${TARG}.PostScript.toc: ${SRCS}
 	${TOOL_GROFF} -dTOC=1 ${ARGS_PS} -mdoc ${MAIN} ${TOCPROC} > $@.tmp



CVS commit: src/distrib/notes

2019-11-27 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Nov 27 15:58:12 UTC 2019

Modified Files:
src/distrib/notes: Makefile.inc

Log Message:
When creating the TOC file, strip all incoming double quotes, but output
quotes around the third arg of the generated Ti macro invocation.
This fixes the TOC in non-html output. Pointed out by kre.


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/distrib/notes/Makefile.inc

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



CVS commit: [netbsd-9] src

2019-11-27 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Nov 27 14:34:31 UTC 2019

Modified Files:
src/doc [netbsd-9]: CHANGES-9.0
src/external/gpl2/groff/tmac [netbsd-9]: mdoc.local
src/sys/sys [netbsd-9]: param.h

Log Message:
Welcome to 9.0_RC1


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.124 -r1.1.2.125 src/doc/CHANGES-9.0
cvs rdiff -u -r1.5.6.1 -r1.5.6.2 src/external/gpl2/groff/tmac/mdoc.local
cvs rdiff -u -r1.599.2.1 -r1.599.2.2 src/sys/sys/param.h

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



CVS commit: [netbsd-9] src

2019-11-27 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Nov 27 14:34:31 UTC 2019

Modified Files:
src/doc [netbsd-9]: CHANGES-9.0
src/external/gpl2/groff/tmac [netbsd-9]: mdoc.local
src/sys/sys [netbsd-9]: param.h

Log Message:
Welcome to 9.0_RC1


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.124 -r1.1.2.125 src/doc/CHANGES-9.0
cvs rdiff -u -r1.5.6.1 -r1.5.6.2 src/external/gpl2/groff/tmac/mdoc.local
cvs rdiff -u -r1.599.2.1 -r1.599.2.2 src/sys/sys/param.h

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

Modified files:

Index: src/doc/CHANGES-9.0
diff -u src/doc/CHANGES-9.0:1.1.2.124 src/doc/CHANGES-9.0:1.1.2.125
--- src/doc/CHANGES-9.0:1.1.2.124	Wed Nov 27 14:06:12 2019
+++ src/doc/CHANGES-9.0	Wed Nov 27 14:34:31 2019
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.0,v 1.1.2.124 2019/11/27 14:06:12 martin Exp $
+# $NetBSD: CHANGES-9.0,v 1.1.2.125 2019/11/27 14:34:31 martin Exp $
 
 A complete list of changes from the initial NetBSD 9.0 branch on 2019-07-30
 until the 9.0 release:
@@ -6615,3 +6615,11 @@ sys/dev/pci/esm.c1.64
 	add missing break.
 	[msaitoh, ticket #493]
 
+istrib/notes/common/main			(edited manually)
+
+	Note sysinst changes.
+
+external/gpl2/groff/tmac/mdoc.local		(edited manually)
+sys/sys/param.h	(edited manually)
+
+	Welcome to 9.0_RC1 !

Index: src/external/gpl2/groff/tmac/mdoc.local
diff -u src/external/gpl2/groff/tmac/mdoc.local:1.5.6.1 src/external/gpl2/groff/tmac/mdoc.local:1.5.6.2
--- src/external/gpl2/groff/tmac/mdoc.local:1.5.6.1	Tue Jul 30 16:52:10 2019
+++ src/external/gpl2/groff/tmac/mdoc.local	Wed Nov 27 14:34:31 2019
@@ -1,4 +1,4 @@
-.\" $NetBSD: mdoc.local,v 1.5.6.1 2019/07/30 16:52:10 martin Exp $
+.\" $NetBSD: mdoc.local,v 1.5.6.2 2019/11/27 14:34:31 martin Exp $
 .\"
 .\" Copyright (c) 2003, 2004 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -44,9 +44,9 @@
 .as doc-str-St--ieee1275-94 " (\*[Lq]\*[doc-Tn-font-size]Open Firmware\*[doc-str-St]\*[Rq])
 .
 .\" Default .Os value
-.ds doc-operating-system NetBSD\~9.0_BETA
+.ds doc-operating-system NetBSD\~9.0_RC1
 .\" Default footer operating system value
-.ds doc-default-operating-system NetBSD\~9.0_BETA
+.ds doc-default-operating-system NetBSD\~9.0_RC1
 .\" Other known versions, not yet in groff distribution
 .ds doc-operating-system-NetBSD-1.3.3  1.3.3
 .ds doc-operating-system-NetBSD-1.6.3  1.6.3

Index: src/sys/sys/param.h
diff -u src/sys/sys/param.h:1.599.2.1 src/sys/sys/param.h:1.599.2.2
--- src/sys/sys/param.h:1.599.2.1	Tue Jul 30 16:52:10 2019
+++ src/sys/sys/param.h	Wed Nov 27 14:34:31 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.599.2.1 2019/07/30 16:52:10 martin Exp $	*/
+/*	$NetBSD: param.h,v 1.599.2.2 2019/11/27 14:34:31 martin Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -67,7 +67,7 @@
  *	2.99.9		(299000900)
  */
 
-#define	__NetBSD_Version__	9	/* NetBSD 9.0_BETA */
+#define	__NetBSD_Version__	9	/* NetBSD 9.0_RC1 */
 
 #define __NetBSD_Prereq__(M,m,p) (M) * 1) + \
 (m) * 100) + (p) * 100) <= __NetBSD_Version__)



CVS commit: [netbsd-9] src/distrib/notes/common

2019-11-27 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Nov 27 14:28:40 UTC 2019

Modified Files:
src/distrib/notes/common [netbsd-9]: main

Log Message:
Special hint for new sysinst and possible installation fallout.


To generate a diff of this commit:
cvs rdiff -u -r1.551.2.3 -r1.551.2.4 src/distrib/notes/common/main

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



CVS commit: [netbsd-9] src/distrib/notes/common

2019-11-27 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Nov 27 14:28:40 UTC 2019

Modified Files:
src/distrib/notes/common [netbsd-9]: main

Log Message:
Special hint for new sysinst and possible installation fallout.


To generate a diff of this commit:
cvs rdiff -u -r1.551.2.3 -r1.551.2.4 src/distrib/notes/common/main

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

Modified files:

Index: src/distrib/notes/common/main
diff -u src/distrib/notes/common/main:1.551.2.3 src/distrib/notes/common/main:1.551.2.4
--- src/distrib/notes/common/main:1.551.2.3	Wed Nov 27 13:36:55 2019
+++ src/distrib/notes/common/main	Wed Nov 27 14:28:40 2019
@@ -1,4 +1,4 @@
-.\"	$NetBSD: main,v 1.551.2.3 2019/11/27 13:36:55 msaitoh Exp $
+.\"	$NetBSD: main,v 1.551.2.4 2019/11/27 14:28:40 martin Exp $
 .\"
 .\" Copyright (c) 1999-2012 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -559,6 +559,19 @@ The complete list of changes can be foun
 .Lk \*[RELEASE_URL]/CHANGES.prev CHANGES.prev
 .\} \" !\n[RELEASE_BRANCH]
 .
+.Ss2 Installation and Partitioning Changes
+The sysinst installation program has been reworked for this release.
+.Pp
+It now supports arbitrary big disks and offers GPT partitions as alternative
+to MBR/fdisk partitions on a lot architectures.
+.Pp
+Unfortunately it has not been tested on all hardware supported by
+.Nx .
+If you have problems partitioning the target disk or installing the system,
+please report bugs with as much details as possible.
+See the Administrivia section below on how to report bugs or contact
+other users and ask for support.
+.
 .Ss "Features to be removed in a later release"
 The following features are to be removed from
 .Nx



CVS commit: [netbsd-9] src/doc

2019-11-27 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Nov 27 14:06:12 UTC 2019

Modified Files:
src/doc [netbsd-9]: CHANGES-9.0

Log Message:
Tickets #491 - #493


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.123 -r1.1.2.124 src/doc/CHANGES-9.0

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

Modified files:

Index: src/doc/CHANGES-9.0
diff -u src/doc/CHANGES-9.0:1.1.2.123 src/doc/CHANGES-9.0:1.1.2.124
--- src/doc/CHANGES-9.0:1.1.2.123	Wed Nov 27 13:40:18 2019
+++ src/doc/CHANGES-9.0	Wed Nov 27 14:06:12 2019
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.0,v 1.1.2.123 2019/11/27 13:40:18 msaitoh Exp $
+# $NetBSD: CHANGES-9.0,v 1.1.2.124 2019/11/27 14:06:12 martin Exp $
 
 A complete list of changes from the initial NetBSD 9.0 branch on 2019-07-30
 until the 9.0 release:
@@ -6510,3 +6510,108 @@ distrib/notes/sparc64/prep			1.16
 	- Add "Oxford comma".
 	- Improve heading a bit.
 	[martin, ticket #489]
+
+distrib/utils/embedded/conf/armv7.conf		1.36,1.37,1.39
+distrib/utils/embedded/files/armv7_boot.cmd	1.15
+distrib/utils/embedded/files/armv7_boot_nonefi.cmd 1.2
+etc/etc.evbarm/Makefile.inc			1.108-1.114
+sys/arch/arm/dts/omap3-beagle-xm.dts		1.1
+sys/arch/arm/dts/omap3-beagle.dts		1.1
+sys/arch/arm/dts/omap3-n900.dts			1.1
+sys/arch/arm/fdt/smsh_fdt.c			1.2
+sys/arch/arm/ti/am3_platform.c			1.1
+sys/arch/arm/ti/am3_prcm.c			1.2-1.10
+sys/arch/arm/ti/files.ti			1.5-1.20
+sys/arch/arm/ti/if_cpsw.c			1.7,1.8
+sys/arch/arm/ti/if_cpswreg.h			1.1
+sys/arch/arm/ti/omap2_gpmcreg.h			1.1
+sys/arch/arm/ti/omap2_nand.c			1.1,1.2
+sys/arch/arm/ti/omap3_cm.c			1.1-1.4
+sys/arch/arm/ti/omap3_dss.c			1.1
+sys/arch/arm/ti/omap3_dssreg.h			1.1
+sys/arch/arm/ti/omap3_platform.c		1.1,1.2
+sys/arch/arm/ti/omap3_prm.c			1.1
+sys/arch/arm/ti/ti_com.c			1.6-1.8
+sys/arch/arm/ti/ti_cpufreq.c			1.1
+sys/arch/arm/ti/ti_cpufreq.c			1.2
+sys/arch/arm/ti/ti_div_clock.c			1.1
+sys/arch/arm/ti/ti_dpll_clock.c			1.1,1.2
+sys/arch/arm/ti/ti_edma.c			1.1
+sys/arch/arm/ti/ti_edma.h			1.1
+sys/arch/arm/ti/ti_ehci.c			1.1
+sys/arch/arm/ti/ti_fb.c1.1
+sys/arch/arm/ti/ti_gpio.c			1.1-1.3
+sys/arch/arm/ti/ti_gpmc.c			1.1
+sys/arch/arm/ti/ti_iic.c			1.1-1.4
+sys/arch/arm/ti/ti_iicreg.h			1.1-1.3
+sys/arch/arm/ti/ti_lcdc.c			1.1
+sys/arch/arm/ti/ti_lcdc.c			1.2,1.3
+sys/arch/arm/ti/ti_lcdc.h			1.1
+sys/arch/arm/ti/ti_lcdcreg.h			1.1
+sys/arch/arm/ti/ti_motg.c			1.1
+sys/arch/arm/ti/ti_mux_clock.c			1.1
+sys/arch/arm/ti/ti_omapintc.c			1.2
+sys/arch/arm/ti/ti_omaptimer.c			1.2-1.4
+sys/arch/arm/ti/ti_otg.c			1.1
+sys/arch/arm/ti/ti_otgreg.h			1.1
+sys/arch/arm/ti/ti_platform.c			delete
+sys/arch/arm/ti/ti_platform.h			delete
+sys/arch/arm/ti/ti_prcm.c			1.2,1.3
+sys/arch/arm/ti/ti_prcm.h			1.2-1.4
+sys/arch/arm/ti/ti_rng.c			1.1,1.2
+sys/arch/arm/ti/ti_rngreg.h			1.1
+sys/arch/arm/ti/ti_sdhc.c			1.1-1.3
+sys/arch/arm/ti/ti_sdhcreg.h			1.1,1.2
+sys/arch/arm/ti/ti_sysc.c			1.1
+sys/arch/arm/ti/ti_tptc.c			1.1
+sys/arch/arm/ti/ti_usb.c			1.1
+sys/arch/arm/ti/ti_usbtll.c			1.1
+sys/arch/evbarm/conf/BEAGLEBOARD		delete
+sys/arch/evbarm/conf/BEAGLEBOARDXM		delete
+sys/arch/evbarm/conf/BEAGLEBOARDXM_INSTALL	delete
+sys/arch/evbarm/conf/BEAGLEBOARD_INSTALL	delete
+sys/arch/evbarm/conf/BEAGLEBONE			delete
+sys/arch/evbarm/conf/BEAGLEBONE_INSTALL		delete
+sys/arch/evbarm/conf/DEVKIT8000			delete
+sys/arch/evbarm/conf/GENERIC			1.55-1.67
+sys/arch/evbarm/conf/IGEPV2			delete
+sys/arch/evbarm/conf/N900			1.32,1.33
+sys/arch/evbarm/conf/OVERO			delete
+sys/arch/evbarm/conf/OVERO_INSTALL		delete
+sys/arch/evbarm/conf/README.evbarm		1.22-1.27
+sys/arch/evbarm/conf/TIdelete
+sys/arch/evbarm/conf/files.generic		1.9
+sys/arch/evbarm/conf/files.ti			delete
+sys/arch/evbarm/conf/std.igepv2			delete
+sys/arch/evbarm/conf/std.ti			delete
+sys/dev/fdt/cpufreq_dt.c			1.11-1.13
+sys/dev/fdt/fdt_clock.c1.9
+sys/dev/fdt/fdt_phy.c1.6
+sys/dev/fdt/fdtvar.h1.55,1.56
+sys/dev/fdt/files.fdt1.46
+sys/dev/fdt/files.fdt1.47
+sys/dev/fdt/pinctrl_single.c			1.1
+sys/dev/fdt/syscon.c1.4
+sys/dev/fdt/usbnopphy.c1.1
+sys/dev/i2c/at24cxx.c1.32
+sys/dev/i2c/files.i2c1.101-1.104
+sys/dev/i2c/tda19988.c1.1-1.3
+sys/dev/i2c/tps65217pmic.c			1.13,1.14
+sys/dev/i2c/tps65950.cdelete
+sys/dev/i2c/twl4030.c1.1-1.3
+
+	arm: switch am335x and omap3 to FDT support.
+	[jmcneill, ticket #491]
+
+sys/dev/ieee1394/fwohci.c			1.144
+sys/dev/pci/eso.c1.72
+sys/dev/pci/sv.c1.57
+
+	Fix operand priority of bit op vs ternary operator.
+	[msaitoh, ticket #492]
+
+sys/dev/pci/esm.c1.64
+
+	add missing break.
+	[msaitoh, ticket #493]
+



CVS commit: [netbsd-9] src/doc

2019-11-27 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Nov 27 14:06:12 UTC 2019

Modified Files:
src/doc [netbsd-9]: CHANGES-9.0

Log Message:
Tickets #491 - #493


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.123 -r1.1.2.124 src/doc/CHANGES-9.0

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



CVS commit: [netbsd-9] src/sys/dev/pci

2019-11-27 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Nov 27 14:04:38 UTC 2019

Modified Files:
src/sys/dev/pci [netbsd-9]: esm.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #493):

sys/dev/pci/esm.c: revision 1.64

add missing break.


To generate a diff of this commit:
cvs rdiff -u -r1.63 -r1.63.2.1 src/sys/dev/pci/esm.c

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



CVS commit: [netbsd-9] src/sys/dev/pci

2019-11-27 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Nov 27 14:04:38 UTC 2019

Modified Files:
src/sys/dev/pci [netbsd-9]: esm.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #493):

sys/dev/pci/esm.c: revision 1.64

add missing break.


To generate a diff of this commit:
cvs rdiff -u -r1.63 -r1.63.2.1 src/sys/dev/pci/esm.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/pci/esm.c
diff -u src/sys/dev/pci/esm.c:1.63 src/sys/dev/pci/esm.c:1.63.2.1
--- src/sys/dev/pci/esm.c:1.63	Sat Jun  8 08:02:38 2019
+++ src/sys/dev/pci/esm.c	Wed Nov 27 14:04:38 2019
@@ -1,4 +1,4 @@
-/*  $NetBSD: esm.c,v 1.63 2019/06/08 08:02:38 isaki Exp $  */
+/*  $NetBSD: esm.c,v 1.63.2.1 2019/11/27 14:04:38 martin Exp $  */
 
 /*-
  * Copyright (c) 2002, 2003 Matt Fredette
@@ -66,7 +66,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: esm.c,v 1.63 2019/06/08 08:02:38 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: esm.c,v 1.63.2.1 2019/11/27 14:04:38 martin Exp $");
 
 #include 
 #include 
@@ -1482,6 +1482,7 @@ esm_match(device_t dev, cfdata_t match, 
 		case PCI_PRODUCT_ESSTECH_MAESTRO2E:
 			return 1;
 		}
+		break;
 
 	case PCI_VENDOR_ESSTECH2:
 		switch (PCI_PRODUCT(pa->pa_id)) {



CVS commit: [netbsd-9] src/sys/dev

2019-11-27 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Nov 27 14:03:14 UTC 2019

Modified Files:
src/sys/dev/ieee1394 [netbsd-9]: fwohci.c
src/sys/dev/pci [netbsd-9]: eso.c sv.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #492):

sys/dev/pci/sv.c: revision 1.57
sys/dev/pci/eso.c: revision 1.72
sys/dev/ieee1394/fwohci.c: revision 1.144

Fix operand priority of bit op vs ternary operator.


To generate a diff of this commit:
cvs rdiff -u -r1.142 -r1.142.2.1 src/sys/dev/ieee1394/fwohci.c
cvs rdiff -u -r1.71 -r1.71.2.1 src/sys/dev/pci/eso.c
cvs rdiff -u -r1.56 -r1.56.2.1 src/sys/dev/pci/sv.c

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



CVS commit: [netbsd-9] src/sys/dev

2019-11-27 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Nov 27 14:03:14 UTC 2019

Modified Files:
src/sys/dev/ieee1394 [netbsd-9]: fwohci.c
src/sys/dev/pci [netbsd-9]: eso.c sv.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #492):

sys/dev/pci/sv.c: revision 1.57
sys/dev/pci/eso.c: revision 1.72
sys/dev/ieee1394/fwohci.c: revision 1.144

Fix operand priority of bit op vs ternary operator.


To generate a diff of this commit:
cvs rdiff -u -r1.142 -r1.142.2.1 src/sys/dev/ieee1394/fwohci.c
cvs rdiff -u -r1.71 -r1.71.2.1 src/sys/dev/pci/eso.c
cvs rdiff -u -r1.56 -r1.56.2.1 src/sys/dev/pci/sv.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/ieee1394/fwohci.c
diff -u src/sys/dev/ieee1394/fwohci.c:1.142 src/sys/dev/ieee1394/fwohci.c:1.142.2.1
--- src/sys/dev/ieee1394/fwohci.c:1.142	Tue May 28 08:59:34 2019
+++ src/sys/dev/ieee1394/fwohci.c	Wed Nov 27 14:03:14 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: fwohci.c,v 1.142 2019/05/28 08:59:34 msaitoh Exp $	*/
+/*	$NetBSD: fwohci.c,v 1.142.2.1 2019/11/27 14:03:14 martin Exp $	*/
 
 /*-
  * Copyright (c) 2003 Hidetoshi Shimokawa
@@ -37,7 +37,7 @@
  *
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: fwohci.c,v 1.142 2019/05/28 08:59:34 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fwohci.c,v 1.142.2.1 2019/11/27 14:03:14 martin Exp $");
 
 #include 
 #include 
@@ -1746,8 +1746,8 @@ fwohci_db_init(struct fwohci_softc *sc, 
 	dbch->ndb, BUS_DMA_WAITOK);
 #else	/* Ooops, debugging now... */
 	dbch->ndb, BUS_DMA_WAITOK |
-		(dbch->off == OHCI_ARQOFF || dbch->off == OHCI_ARSOFF) ?
-			BUS_DMA_COHERENT : 0);
+		((dbch->off == OHCI_ARQOFF || dbch->off == OHCI_ARSOFF) ?
+			BUS_DMA_COHERENT : 0));
 #endif
 	if (dbch->am == NULL) {
 		aprint_error_dev(fc->dev, "fwdma_malloc_multiseg failed\n");

Index: src/sys/dev/pci/eso.c
diff -u src/sys/dev/pci/eso.c:1.71 src/sys/dev/pci/eso.c:1.71.2.1
--- src/sys/dev/pci/eso.c:1.71	Sat Jun  8 08:02:38 2019
+++ src/sys/dev/pci/eso.c	Wed Nov 27 14:03:14 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: eso.c,v 1.71 2019/06/08 08:02:38 isaki Exp $	*/
+/*	$NetBSD: eso.c,v 1.71.2.1 2019/11/27 14:03:14 martin Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: eso.c,v 1.71 2019/06/08 08:02:38 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: eso.c,v 1.71.2.1 2019/11/27 14:03:14 martin Exp $");
 
 #include "mpu.h"
 
@@ -1489,7 +1489,7 @@ eso_allocmem(struct eso_softc *sc, size_
 
 	error = bus_dmamap_load(ed->ed_dmat, ed->ed_map, ed->ed_kva,
 	ed->ed_size, NULL, BUS_DMA_WAITOK |
-	(direction == AUMODE_RECORD) ? BUS_DMA_READ : BUS_DMA_WRITE);
+	((direction == AUMODE_RECORD) ? BUS_DMA_READ : BUS_DMA_WRITE));
 	if (error)
 		goto destroy;
 

Index: src/sys/dev/pci/sv.c
diff -u src/sys/dev/pci/sv.c:1.56 src/sys/dev/pci/sv.c:1.56.2.1
--- src/sys/dev/pci/sv.c:1.56	Sat Jun  8 08:02:38 2019
+++ src/sys/dev/pci/sv.c	Wed Nov 27 14:03:14 2019
@@ -1,4 +1,4 @@
-/*  $NetBSD: sv.c,v 1.56 2019/06/08 08:02:38 isaki Exp $ */
+/*  $NetBSD: sv.c,v 1.56.2.1 2019/11/27 14:03:14 martin Exp $ */
 /*  $OpenBSD: sv.c,v 1.2 1998/07/13 01:50:15 csapuntz Exp $ */
 
 /*
@@ -67,7 +67,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sv.c,v 1.56 2019/06/08 08:02:38 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sv.c,v 1.56.2.1 2019/11/27 14:03:14 martin Exp $");
 
 #include 
 #include 
@@ -530,7 +530,7 @@ sv_allocmem(struct sv_softc *sc, size_t 
 		goto unmap;
 
 	error = bus_dmamap_load(sc->sc_dmatag, p->map, p->addr, p->size, NULL,
-	BUS_DMA_WAITOK | (direction == AUMODE_RECORD) ? BUS_DMA_READ : BUS_DMA_WRITE);
+	BUS_DMA_WAITOK | ((direction == AUMODE_RECORD) ? BUS_DMA_READ : BUS_DMA_WRITE));
 	if (error)
 		goto destroy;
 	DPRINTF(("sv_allocmem: pa=%lx va=%lx pba=%lx\n",



CVS commit: [netbsd-9] src

2019-11-27 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Nov 27 13:46:46 UTC 2019

Modified Files:
src/distrib/utils/embedded/conf [netbsd-9]: armv7.conf
src/distrib/utils/embedded/files [netbsd-9]: armv7_boot.cmd
armv7_boot_nonefi.cmd
src/etc/etc.evbarm [netbsd-9]: Makefile.inc
src/sys/arch/arm/fdt [netbsd-9]: smsh_fdt.c
src/sys/arch/arm/ti [netbsd-9]: am3_prcm.c files.ti if_cpsw.c ti_com.c
ti_omapintc.c ti_omaptimer.c ti_prcm.c ti_prcm.h
src/sys/arch/evbarm/conf [netbsd-9]: GENERIC N900 README.evbarm
files.generic
src/sys/dev/fdt [netbsd-9]: cpufreq_dt.c fdt_clock.c fdt_phy.c fdtvar.h
files.fdt syscon.c
src/sys/dev/i2c [netbsd-9]: at24cxx.c files.i2c tps65217pmic.c
Added Files:
src/sys/arch/arm/dts [netbsd-9]: omap3-beagle-xm.dts omap3-beagle.dts
omap3-n900.dts
src/sys/arch/arm/ti [netbsd-9]: am3_platform.c if_cpswreg.h
omap2_gpmcreg.h omap2_nand.c omap3_cm.c omap3_dss.c omap3_dssreg.h
omap3_platform.c omap3_prm.c ti_cpufreq.c ti_div_clock.c
ti_dpll_clock.c ti_edma.c ti_edma.h ti_ehci.c ti_fb.c ti_gpio.c
ti_gpmc.c ti_iic.c ti_iicreg.h ti_lcdc.c ti_lcdc.h ti_lcdcreg.h
ti_motg.c ti_mux_clock.c ti_otg.c ti_otgreg.h ti_rng.c ti_rngreg.h
ti_sdhc.c ti_sdhcreg.h ti_sysc.c ti_tptc.c ti_usb.c ti_usbtll.c
src/sys/dev/fdt [netbsd-9]: pinctrl_single.c usbnopphy.c
src/sys/dev/i2c [netbsd-9]: tda19988.c twl4030.c
Removed Files:
src/sys/arch/arm/ti [netbsd-9]: ti_platform.c ti_platform.h
src/sys/arch/evbarm/conf [netbsd-9]: BEAGLEBOARD BEAGLEBOARDXM
BEAGLEBOARDXM_INSTALL BEAGLEBOARD_INSTALL BEAGLEBONE
BEAGLEBONE_INSTALL DEVKIT8000 IGEPV2 OVERO OVERO_INSTALL TI
files.ti std.igepv2 std.ti
src/sys/dev/i2c [netbsd-9]: tps65950.c

Log Message:
Pull up following revision(s) (requested by jmcneill in ticket #491):

sys/arch/evbarm/conf/BEAGLEBOARD_INSTALL: file removal
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.2
sys/arch/arm/ti/ti_sysc.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.2
sys/dev/i2c/tps65950.c: file removal
sys/arch/evbarm/conf/std.ti: file removal
sys/dev/i2c/files.i2c: revision 1.101
sys/dev/i2c/files.i2c: revision 1.102
sys/dev/i2c/at24cxx.c: revision 1.32
sys/dev/i2c/files.i2c: revision 1.103
sys/dev/i2c/twl4030.c: revision 1.1
sys/dev/i2c/files.i2c: revision 1.104
sys/dev/i2c/twl4030.c: revision 1.2
sys/dev/i2c/twl4030.c: revision 1.3
sys/arch/arm/ti/ti_com.c: revision 1.6
sys/arch/arm/ti/ti_com.c: revision 1.7
sys/arch/arm/ti/ti_com.c: revision 1.8
sys/dev/fdt/cpufreq_dt.c: revision 1.11
sys/arch/arm/ti/ti_iic.c: revision 1.1
sys/dev/fdt/cpufreq_dt.c: revision 1.12
sys/arch/arm/ti/ti_usb.c: revision 1.1
sys/arch/arm/ti/ti_iic.c: revision 1.2
sys/dev/fdt/cpufreq_dt.c: revision 1.13
sys/arch/arm/ti/ti_iic.c: revision 1.3
sys/arch/arm/ti/ti_iic.c: revision 1.4
sys/arch/evbarm/conf/files.ti: file removal
sys/arch/evbarm/conf/BEAGLEBOARDXM: file removal
sys/arch/arm/dts/omap3-n900.dts: revision 1.1
sys/arch/arm/ti/ti_edma.h: revision 1.1
sys/arch/evbarm/conf/OVERO_INSTALL: file removal
sys/arch/arm/ti/ti_usbtll.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.5
etc/etc.evbarm/Makefile.inc: revision 1.108
sys/arch/arm/ti/files.ti: revision 1.6
sys/dev/i2c/tps65217pmic.c: revision 1.13
etc/etc.evbarm/Makefile.inc: revision 1.109
sys/arch/arm/ti/files.ti: revision 1.7
sys/dev/i2c/tps65217pmic.c: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.8
sys/arch/arm/ti/files.ti: revision 1.9
sys/dev/fdt/usbnopphy.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.55
sys/arch/evbarm/conf/GENERIC: revision 1.56
sys/arch/evbarm/conf/GENERIC: revision 1.57
sys/arch/evbarm/conf/GENERIC: revision 1.58
sys/arch/evbarm/conf/GENERIC: revision 1.59
sys/arch/evbarm/conf/BEAGLEBONE: file removal
sys/arch/arm/ti/omap2_gpmcreg.h: revision 1.1
sys/arch/arm/ti/ti_otgreg.h: revision 1.1
sys/arch/arm/ti/ti_tptc.c: revision 1.1
sys/arch/evbarm/conf/IGEPV2: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.10
sys/dev/i2c/tda19988.c: revision 1.1
sys/arch/evbarm/conf/OVERO: file removal
sys/dev/i2c/tda19988.c: revision 1.2
sys/dev/i2c/tda19988.c: revision 1.3
sys/arch/arm/ti/omap3_dss.c: revision 1.1
sys/arch/evbarm/conf/BEAGLEBONE_INSTALL: file removal
sys/arch/arm/ti/ti_omapintc.c: revision 1.2

CVS commit: [netbsd-9] src/doc

2019-11-27 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Nov 27 11:22:13 UTC 2019

Modified Files:
src/doc [netbsd-9]: CHANGES-9.0

Log Message:
Tickets #487, #488, and #490


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.121 -r1.1.2.122 src/doc/CHANGES-9.0

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

Modified files:

Index: src/doc/CHANGES-9.0
diff -u src/doc/CHANGES-9.0:1.1.2.121 src/doc/CHANGES-9.0:1.1.2.122
--- src/doc/CHANGES-9.0:1.1.2.121	Tue Nov 26 18:31:55 2019
+++ src/doc/CHANGES-9.0	Wed Nov 27 11:22:13 2019
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.0,v 1.1.2.121 2019/11/26 18:31:55 martin Exp $
+# $NetBSD: CHANGES-9.0,v 1.1.2.122 2019/11/27 11:22:13 martin Exp $
 
 A complete list of changes from the initial NetBSD 9.0 branch on 2019-07-30
 until the 9.0 release:
@@ -6467,3 +6467,27 @@ sys/dev/pci/if_mcx.c1.7
 	mcx(4): fix IFF_ALLMULTI handling.
 	[jmcneill, ticket #486]
 
+sys/dev/pci/if_bge.c1.336,1.340-1.342
+
+	- Avoid undefined behavior in bge_setmulti().
+	- Avoid undefined behavior when setting the MAC address in
+	  bge_init().
+	- Fix a bug that SK-9D41 can't detect fiber media.
+	- Use *_FLUSH() more. The main purpose is to wait following 
+	  delay() correctly.
+	- Add missing DELAY(80) after writing BGE_MI_MODE register.
+	- Modify PHY initialization code to fix a bug that SK-9D21
+	  doesn't detect MII PHY.
+	[msaitoh, ticket #487]
+
+sys/arch/amd64/amd64/netbsd32_machdep.c		1.126
+
+	Don't depend on #ifdef USER_LDT in cpu_mcontext32_validate(), but
+	rather on whether the proc uses a user-set LDT.
+	[maxv, ticket #488]
+
+sys/dev/mii/ipgphy.c1.7
+
+	Print dmesg correctly.
+	[msaitoh, ticket #490]
+



CVS commit: [netbsd-9] src/doc

2019-11-27 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Nov 27 11:22:13 UTC 2019

Modified Files:
src/doc [netbsd-9]: CHANGES-9.0

Log Message:
Tickets #487, #488, and #490


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.121 -r1.1.2.122 src/doc/CHANGES-9.0

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



CVS commit: [netbsd-9] src/sys/dev/mii

2019-11-27 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Nov 27 11:19:46 UTC 2019

Modified Files:
src/sys/dev/mii [netbsd-9]: ipgphy.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #490):

sys/dev/mii/ipgphy.c: revision 1.7

Print dmesg correctly.


To generate a diff of this commit:
cvs rdiff -u -r1.6.2.2 -r1.6.2.3 src/sys/dev/mii/ipgphy.c

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



CVS commit: [netbsd-9] src/sys/dev/mii

2019-11-27 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Nov 27 11:19:46 UTC 2019

Modified Files:
src/sys/dev/mii [netbsd-9]: ipgphy.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #490):

sys/dev/mii/ipgphy.c: revision 1.7

Print dmesg correctly.


To generate a diff of this commit:
cvs rdiff -u -r1.6.2.2 -r1.6.2.3 src/sys/dev/mii/ipgphy.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/mii/ipgphy.c
diff -u src/sys/dev/mii/ipgphy.c:1.6.2.2 src/sys/dev/mii/ipgphy.c:1.6.2.3
--- src/sys/dev/mii/ipgphy.c:1.6.2.2	Mon Nov 25 16:44:31 2019
+++ src/sys/dev/mii/ipgphy.c	Wed Nov 27 11:19:46 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: ipgphy.c,v 1.6.2.2 2019/11/25 16:44:31 martin Exp $ */
+/*	$NetBSD: ipgphy.c,v 1.6.2.3 2019/11/27 11:19:46 martin Exp $ */
 /*	$OpenBSD: ipgphy.c,v 1.19 2015/07/19 06:28:12 yuo Exp $	*/
 
 /*-
@@ -33,7 +33,7 @@
  * Driver for the IC Plus IP1000A/IP1001 10/100/1000 PHY.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ipgphy.c,v 1.6.2.2 2019/11/25 16:44:31 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ipgphy.c,v 1.6.2.3 2019/11/27 11:19:46 martin Exp $");
 
 #include 
 #include 
@@ -118,7 +118,8 @@ ipgphy_attach(device_t parent, device_t 
 	//sc->mii_capabilities &= ~BMSR_ANEG;
 	if (sc->mii_capabilities & BMSR_EXTSTAT)
 		PHY_READ(sc, MII_EXTSR, >mii_extcapabilities);
- 
+
+	aprint_normal_dev(self, "");
 	mii_phy_add_media(sc);
 	aprint_normal("\n");
 }



CVS commit: [netbsd-9] src/sys/arch/amd64/amd64

2019-11-27 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Nov 27 11:11:17 UTC 2019

Modified Files:
src/sys/arch/amd64/amd64 [netbsd-9]: netbsd32_machdep.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #488):

sys/arch/amd64/amd64/netbsd32_machdep.c: revision 1.126

Don't depend on #ifdef USER_LDT in cpu_mcontext32_validate(), but rather on
whether the proc uses a user-set LDT. Same as check_sigcontext32().


To generate a diff of this commit:
cvs rdiff -u -r1.125.2.1 -r1.125.2.2 \
src/sys/arch/amd64/amd64/netbsd32_machdep.c

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

Modified files:

Index: src/sys/arch/amd64/amd64/netbsd32_machdep.c
diff -u src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.125.2.1 src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.125.2.2
--- src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.125.2.1	Thu Nov 21 14:02:33 2019
+++ src/sys/arch/amd64/amd64/netbsd32_machdep.c	Wed Nov 27 11:11:17 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_machdep.c,v 1.125.2.1 2019/11/21 14:02:33 martin Exp $	*/
+/*	$NetBSD: netbsd32_machdep.c,v 1.125.2.2 2019/11/27 11:11:17 martin Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.125.2.1 2019/11/21 14:02:33 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.125.2.2 2019/11/27 11:11:17 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -905,12 +905,6 @@ startlwp32(void *arg)
 	userret(l);
 }
 
-/*
- * For various reasons, the amd64 port can't do what the i386 port does,
- * and relies on catching invalid user contexts on exit from the kernel.
- * These functions perform the needed checks.
- */
-
 int
 check_sigcontext32(struct lwp *l, const struct netbsd32_sigcontext *scp)
 {
@@ -925,21 +919,22 @@ check_sigcontext32(struct lwp *l, const 
 		return EINVAL;
 
 	if (__predict_false(pmap->pm_ldt != NULL)) {
-		/* Only when the LDT is user-set (with USER_LDT) */
+		/* Allow unfamiliar segment register values (USER_LDT). */
 		if (!USERMODE(scp->sc_cs))
 			return EINVAL;
 	} else {
 		if (!VALID_USER_CSEL32(scp->sc_cs))
 			return EINVAL;
 		if (scp->sc_fs != 0 && !VALID_USER_DSEL32(scp->sc_fs) &&
-			!(VALID_USER_FSEL32(scp->sc_fs) && pcb->pcb_fs != 0))
+		!(VALID_USER_FSEL32(scp->sc_fs) && pcb->pcb_fs != 0))
 			return EINVAL;
 		if (scp->sc_gs != 0 && !VALID_USER_DSEL32(scp->sc_gs) &&
-			!(VALID_USER_GSEL32(scp->sc_gs) && pcb->pcb_gs != 0))
+		!(VALID_USER_GSEL32(scp->sc_gs) && pcb->pcb_gs != 0))
 			return EINVAL;
 		if (scp->sc_es != 0 && !VALID_USER_DSEL32(scp->sc_es))
 			return EINVAL;
-		if (!VALID_USER_DSEL32(scp->sc_ds) || !VALID_USER_DSEL32(scp->sc_ss))
+		if (!VALID_USER_DSEL32(scp->sc_ds) ||
+		!VALID_USER_DSEL32(scp->sc_ss))
 			return EINVAL;
 	}
 
@@ -952,36 +947,37 @@ check_sigcontext32(struct lwp *l, const 
 int
 cpu_mcontext32_validate(struct lwp *l, const mcontext32_t *mcp)
 {
+	struct pmap *pmap = l->l_proc->p_vmspace->vm_map.pmap;
 	const __greg32_t *gr;
 	struct trapframe *tf;
+	struct pcb *pcb;
 
 	gr = mcp->__gregs;
 	tf = l->l_md.md_regs;
+	pcb = lwp_getpcb(l);
 
 	if (((gr[_REG32_EFL] ^ tf->tf_rflags) & PSL_USERSTATIC) != 0)
 		return EINVAL;
 
-#ifdef USER_LDT
-	/* Userland is allowed to have unfamiliar segment register values */
-	if (!USERMODE(gr[_REG32_CS]))
-		return EINVAL;
-#else
-	struct pcb *pcb = lwp_getpcb(l);
-
-	if (!VALID_USER_CSEL32(gr[_REG32_CS]))
-		return EINVAL;
-	if (gr[_REG32_FS] != 0 && !VALID_USER_DSEL32(gr[_REG32_FS]) &&
-	!(VALID_USER_FSEL32(gr[_REG32_FS]) && pcb->pcb_fs != 0))
-		return EINVAL;
-	if (gr[_REG32_GS] != 0 && !VALID_USER_DSEL32(gr[_REG32_GS]) &&
-	!(VALID_USER_GSEL32(gr[_REG32_GS]) && pcb->pcb_gs != 0))
-		return EINVAL;
-	if (gr[_REG32_ES] != 0 && !VALID_USER_DSEL32(gr[_REG32_ES]))
-		return EINVAL;
-	if (!VALID_USER_DSEL32(gr[_REG32_DS]) ||
-	!VALID_USER_DSEL32(gr[_REG32_SS]))
-		return EINVAL;
-#endif
+	if (__predict_false(pmap->pm_ldt != NULL)) {
+		/* Allow unfamiliar segment register values (USER_LDT). */
+		if (!USERMODE(gr[_REG32_CS]))
+			return EINVAL;
+	} else {
+		if (!VALID_USER_CSEL32(gr[_REG32_CS]))
+			return EINVAL;
+		if (gr[_REG32_FS] != 0 && !VALID_USER_DSEL32(gr[_REG32_FS]) &&
+		!(VALID_USER_FSEL32(gr[_REG32_FS]) && pcb->pcb_fs != 0))
+			return EINVAL;
+		if (gr[_REG32_GS] != 0 && !VALID_USER_DSEL32(gr[_REG32_GS]) &&
+		!(VALID_USER_GSEL32(gr[_REG32_GS]) && pcb->pcb_gs != 0))
+			return EINVAL;
+		if (gr[_REG32_ES] != 0 && !VALID_USER_DSEL32(gr[_REG32_ES]))
+			return EINVAL;
+		if (!VALID_USER_DSEL32(gr[_REG32_DS]) ||
+		!VALID_USER_DSEL32(gr[_REG32_SS]))
+			return EINVAL;
+	}
 
 	if (gr[_REG32_EIP] >= VM_MAXUSER_ADDRESS32)
 		return EINVAL;



CVS commit: [netbsd-9] src/sys/arch/amd64/amd64

2019-11-27 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Nov 27 11:11:17 UTC 2019

Modified Files:
src/sys/arch/amd64/amd64 [netbsd-9]: netbsd32_machdep.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #488):

sys/arch/amd64/amd64/netbsd32_machdep.c: revision 1.126

Don't depend on #ifdef USER_LDT in cpu_mcontext32_validate(), but rather on
whether the proc uses a user-set LDT. Same as check_sigcontext32().


To generate a diff of this commit:
cvs rdiff -u -r1.125.2.1 -r1.125.2.2 \
src/sys/arch/amd64/amd64/netbsd32_machdep.c

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



CVS commit: [netbsd-9] src/sys/dev/pci

2019-11-27 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Nov 27 11:08:24 UTC 2019

Modified Files:
src/sys/dev/pci [netbsd-9]: if_bge.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #487):

sys/dev/pci/if_bge.c: revision 1.340
sys/dev/pci/if_bge.c: revision 1.341
sys/dev/pci/if_bge.c: revision 1.342
sys/dev/pci/if_bge.c: revision 1.336

- Avoid undefined behavior in bge_setmulti(). found by kUBSan.
- Avoid undefined behavior when setting the MAC address in bge_init().
  found by kUBSan.

 Fix a bug that SK-9D41 can't detect fiber media. Check the subsystem ID
correctly. This bug was added in if_bge.c rev. 1.161.

- Use *_FLUSH() more. The main purpose is to wait following delay() correctly.
- Add missing DELAY(80) after writing BGE_MI_MODE register.

 Modify PHY initialization code. This change fix a bug that SK-9D21 doesn't
detect MII PHY.
 - Add error check to bge_miibus_writereg().
 - Change return value of bge_miibus_readreg() when a read error occurred.
   It also add error message using with aprint_debug_dev(). This error occurs
   on some devices while detecting MII devices.
 - Move the location of BGE_MI_MODE register's initialization to next to
   bge_chipinit().
 - Set BGE_MAC_MODE before calling ifmedia_init() and/or mii_attach().
 - Add retry code for mii_attach() failed. Same as FreeBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.335 -r1.335.2.1 src/sys/dev/pci/if_bge.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/pci/if_bge.c
diff -u src/sys/dev/pci/if_bge.c:1.335 src/sys/dev/pci/if_bge.c:1.335.2.1
--- src/sys/dev/pci/if_bge.c:1.335	Tue Jul  9 08:46:58 2019
+++ src/sys/dev/pci/if_bge.c	Wed Nov 27 11:08:24 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_bge.c,v 1.335 2019/07/09 08:46:58 msaitoh Exp $	*/
+/*	$NetBSD: if_bge.c,v 1.335.2.1 2019/11/27 11:08:24 martin Exp $	*/
 
 /*
  * Copyright (c) 2001 Wind River Systems
@@ -79,7 +79,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.335 2019/07/09 08:46:58 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.335.2.1 2019/11/27 11:08:24 martin Exp $");
 
 #include 
 #include 
@@ -1027,10 +1027,10 @@ bge_eeprom_getbyte(struct bge_softc *sc,
 	 * Enable use of auto EEPROM access so we can avoid
 	 * having to use the bitbang method.
 	 */
-	BGE_SETBIT(sc, BGE_MISC_LOCAL_CTL, BGE_MLC_AUTO_EEPROM);
+	BGE_SETBIT_FLUSH(sc, BGE_MISC_LOCAL_CTL, BGE_MLC_AUTO_EEPROM);
 
 	/* Reset the EEPROM, load the clock period. */
-	CSR_WRITE_4(sc, BGE_EE_ADDR,
+	CSR_WRITE_4_FLUSH(sc, BGE_EE_ADDR,
 	BGE_EEADDR_RESET | BGE_EEHALFCLK(BGE_HALFCLK_384SCL));
 	DELAY(20);
 
@@ -1113,9 +1113,11 @@ bge_miibus_readreg(device_t dev, int phy
 	if (i == BGE_TIMEOUT) {
 		aprint_error_dev(sc->bge_dev, "PHY read timed out\n");
 		rv = ETIMEDOUT;
-	} else if ((data & BGE_MICOMM_READFAIL) != 0)
-		rv = -1;
-	else
+	} else if ((data & BGE_MICOMM_READFAIL) != 0) {
+		/* XXX This error occurs on some devices while attaching. */
+		aprint_debug_dev(sc->bge_dev, "PHY read I/O error\n");
+		rv = EIO;
+	} else
 		*val = data & BGE_MICOMM_DATA;
 
 	if (autopoll & BGE_MIMODE_AUTOPOLL) {
@@ -1133,7 +1135,8 @@ static int
 bge_miibus_writereg(device_t dev, int phy, int reg, uint16_t val)
 {
 	struct bge_softc *sc = device_private(dev);
-	uint32_t autopoll;
+	uint32_t data, autopoll;
+	int rv = 0;
 	int i;
 
 	if (BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5906 &&
@@ -1156,13 +1159,22 @@ bge_miibus_writereg(device_t dev, int ph
 
 	for (i = 0; i < BGE_TIMEOUT; i++) {
 		delay(10);
-		if (!(CSR_READ_4(sc, BGE_MI_COMM) & BGE_MICOMM_BUSY)) {
+		data = CSR_READ_4(sc, BGE_MI_COMM);
+		if (!(data & BGE_MICOMM_BUSY)) {
 			delay(5);
-			CSR_READ_4(sc, BGE_MI_COMM);
+			data = CSR_READ_4(sc, BGE_MI_COMM);
 			break;
 		}
 	}
 
+	if (i == BGE_TIMEOUT) {
+		aprint_error_dev(sc->bge_dev, "PHY write timed out\n");
+		rv = ETIMEDOUT;
+	} else if ((data & BGE_MICOMM_READFAIL) != 0) {
+		aprint_error_dev(sc->bge_dev, "PHY write I/O error\n");
+		rv = EIO;
+	}
+
 	if (autopoll & BGE_MIMODE_AUTOPOLL) {
 		BGE_STS_SETBIT(sc, BGE_STS_AUTOPOLL);
 		BGE_SETBIT_FLUSH(sc, BGE_MI_MODE, BGE_MIMODE_AUTOPOLL);
@@ -1176,7 +1188,7 @@ bge_miibus_writereg(device_t dev, int ph
 		return ETIMEDOUT;
 	}
 
-	return 0;
+	return rv;
 }
 
 static void
@@ -1827,7 +1839,7 @@ bge_setmulti(struct bge_softc *sc)
 		/* Just want the 7 least-significant bits. */
 		h &= 0x7f;
 
-		hashes[(h & 0x60) >> 5] |= 1 << (h & 0x1F);
+		hashes[(h & 0x60) >> 5] |= 1U << (h & 0x1F);
 		ETHER_NEXT_MULTI(step, enm);
 	}
 	ETHER_UNLOCK(ec);
@@ -2286,7 +2298,7 @@ bge_chipinit(struct bge_softc *sc)
 #endif
 
 	/* Set the timer prescaler (always 66MHz) */
-	CSR_WRITE_4(sc, BGE_MISC_CFG, BGE_32BITTIME_66MHZ);
+	CSR_WRITE_4_FLUSH(sc, BGE_MISC_CFG, BGE_32BITTIME_66MHZ);
 
 	if (BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5906) {
 		DELAY(40);	/* XXX */
@@ 

CVS commit: src/distrib/notes

2019-11-27 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Nov 27 09:29:26 UTC 2019

Modified Files:
src/distrib/notes: Makefile.inc
src/distrib/notes/common: macros main netboot postinstall sysinst
src/distrib/notes/sparc: prep
src/distrib/notes/sparc64: prep

Log Message:
More cleanup:
 - simplify TOC handling and remove arg limit (from uwe)
 - use Lk with explicit anchor text in some places
 - do not allow official release builds when we can not derive the
   proper date from the buildid


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/distrib/notes/Makefile.inc
cvs rdiff -u -r1.43 -r1.44 src/distrib/notes/common/macros
cvs rdiff -u -r1.556 -r1.557 src/distrib/notes/common/main
cvs rdiff -u -r1.37 -r1.38 src/distrib/notes/common/netboot
cvs rdiff -u -r1.85 -r1.86 src/distrib/notes/common/postinstall
cvs rdiff -u -r1.109 -r1.110 src/distrib/notes/common/sysinst
cvs rdiff -u -r1.28 -r1.29 src/distrib/notes/sparc/prep
cvs rdiff -u -r1.15 -r1.16 src/distrib/notes/sparc64/prep

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

Modified files:

Index: src/distrib/notes/Makefile.inc
diff -u src/distrib/notes/Makefile.inc:1.45 src/distrib/notes/Makefile.inc:1.46
--- src/distrib/notes/Makefile.inc:1.45	Sun Nov 24 11:15:31 2019
+++ src/distrib/notes/Makefile.inc	Wed Nov 27 09:29:25 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.45 2019/11/24 11:15:31 martin Exp $
+#	$NetBSD: Makefile.inc,v 1.46 2019/11/27 09:29:25 martin Exp $
 #
 
 # Ross Harvey 
@@ -51,8 +51,12 @@ PRESET+=	-rnextminor=${nextmin}
 .if defined(BUILDID) && "${BUILDID:M20*Z}" != ""
 curdate!=	env LANG="C" date -d "${BUILDID:C/[0-9][0-9][0-9][0-9]Z$//}" "+%b %d, %Y"
 .else
+.if ${NETBSD_OFFICIAL_RELEASE:Uno} == "yes"
+.error "No release date could be derived from BUILDID"
+.else
 curdate!=	env LANG="C" date "+%b %d, %Y"
 .endif
+.endif
 PRESET+=	-dcur_date="${curdate}"
 
 POST_PLAIN= -P-b -P-u -P-o
@@ -103,8 +107,7 @@ ${TARG}.more: ${SRCS} ${TOC.more} ${DIST
 # space taken by the TOC itself.
 #
 
-TOCPROC=	   2>&1 >/dev/null |\
-   ${TOOL_SED} -n '/^\.Ti/{s/ \([A-Za-z]\)/ "\1/; s/ *$$/"/; p; }'
+TOCPROC=	   2>&1 >/dev/null | ${TOOL_GREP} -e '^\.Ti '
 
 ${TARG}.PostScript.toc: ${SRCS}
 	${TOOL_GROFF} -dTOC=1 ${ARGS_PS} -mdoc ${MAIN} ${TOCPROC} > $@.tmp
@@ -121,8 +124,6 @@ ${TARG}.ASCII.toc: ${SRCS}
 ${TARG}.HTML.toc: ${SRCS}
 	${TOOL_GROFF} -dTOC=1 ${ARGS_HTML} -mdoc ${MAIN} ${TOCPROC} > $@.tmp
 	mv -f $@.tmp $@
-	${TOOL_GROFF} -dTOC=1 ${ARGS_HTML} -mdoc ${MAIN} ${TOCPROC} > $@.tmp
-	mv -f $@.tmp $@
 
 ${TARG}.more.toc: ${SRCS}
 	${TOOL_GROFF} -dTOC=1 ${ARGS_MORE} -mdoc ${MAIN} ${TOCPROC} > $@.tmp

Index: src/distrib/notes/common/macros
diff -u src/distrib/notes/common/macros:1.43 src/distrib/notes/common/macros:1.44
--- src/distrib/notes/common/macros:1.43	Wed Jan 24 09:04:41 2018
+++ src/distrib/notes/common/macros	Wed Nov 27 09:29:25 2019
@@ -1,4 +1,4 @@
-.\"	$NetBSD: macros,v 1.43 2018/01/24 09:04:41 skrll Exp $
+.\"	$NetBSD: macros,v 1.44 2019/11/27 09:29:25 martin Exp $
 .\"
 .\" Copyright (c) 1999-2004 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -312,13 +312,13 @@
 .if dTOC \{
 .rn Ss Ss-toc
 .de Ss
-.Ss-toc \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-\.tm .Ti 0 \\n% \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
+.Ss-toc \\$@
+.tm .Ti 0 \\n% "\\$*"
 ..
 .rn Ss2 Ss2-toc
 .de Ss2
-.Ss2-toc \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-\.tm .Ti 1 \\n% \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
+.Ss2-toc \\$@
+.tm .Ti 1 \\n% "\\$*"
 ..
 .\}
 .de Te

Index: src/distrib/notes/common/main
diff -u src/distrib/notes/common/main:1.556 src/distrib/notes/common/main:1.557
--- src/distrib/notes/common/main:1.556	Mon Nov 25 15:40:18 2019
+++ src/distrib/notes/common/main	Wed Nov 27 09:29:25 2019
@@ -1,4 +1,4 @@
-.\"	$NetBSD: main,v 1.556 2019/11/25 15:40:18 pgoyette Exp $
+.\"	$NetBSD: main,v 1.557 2019/11/27 09:29:25 martin Exp $
 .\"
 .\" Copyright (c) 1999-2012 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -145,8 +145,7 @@ on an FTP site near you, usually located
 directory.
 Check the list of
 .Nx
-mirrors at
-.Lk https://www.NetBSD.org/mirrors
+.Lk https://www.NetBSD.org/mirrors mirrors
 for details.
 .Pp
 Option 2: bootable CD-ROM images from
@@ -275,12 +274,10 @@ replacing
 .Pa /dev/rsd0d
 with the appropriate device for your system:
 .Dl # Ic "dd if=NetBSD-\*V-\*M-install.img of=/dev/rsd0d bs=32k"
-On Windows, you will need to use a program such as Win32 Disk Imager,
-which can be found at
-.Lk http://sourceforge.net/projects/win32diskimager/
+On Windows, you will need to use a program such as
+.Lk http://sourceforge.net/projects/win32diskimager/ "Win32 Disk Imager" ,
 or
-Rawrite32 which can be found at
-.Lk https://www.NetBSD.org/~martin/rawrite32 .
+.Lk https://www.NetBSD.org/~martin/rawrite32 Rawrite32 .
 .if \n[amd64]:\n[i386] \{\
 If you have problems writing a raw image to a floppy,
 the

CVS commit: src/distrib/notes

2019-11-27 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Nov 27 09:29:26 UTC 2019

Modified Files:
src/distrib/notes: Makefile.inc
src/distrib/notes/common: macros main netboot postinstall sysinst
src/distrib/notes/sparc: prep
src/distrib/notes/sparc64: prep

Log Message:
More cleanup:
 - simplify TOC handling and remove arg limit (from uwe)
 - use Lk with explicit anchor text in some places
 - do not allow official release builds when we can not derive the
   proper date from the buildid


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/distrib/notes/Makefile.inc
cvs rdiff -u -r1.43 -r1.44 src/distrib/notes/common/macros
cvs rdiff -u -r1.556 -r1.557 src/distrib/notes/common/main
cvs rdiff -u -r1.37 -r1.38 src/distrib/notes/common/netboot
cvs rdiff -u -r1.85 -r1.86 src/distrib/notes/common/postinstall
cvs rdiff -u -r1.109 -r1.110 src/distrib/notes/common/sysinst
cvs rdiff -u -r1.28 -r1.29 src/distrib/notes/sparc/prep
cvs rdiff -u -r1.15 -r1.16 src/distrib/notes/sparc64/prep

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



CVS commit: [netbsd-9] src/doc

2019-11-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Nov 26 18:31:55 UTC 2019

Modified Files:
src/doc [netbsd-9]: CHANGES-9.0

Log Message:
Ticket #486


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.120 -r1.1.2.121 src/doc/CHANGES-9.0

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



CVS commit: [netbsd-9] src/sys/dev/pci

2019-11-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Nov 26 18:30:57 UTC 2019

Modified Files:
src/sys/dev/pci [netbsd-9]: if_mcx.c

Log Message:
Pull up following revision(s) (requested by jmcneill in ticket #486):

sys/dev/pci/if_mcx.c: revision 1.7

Fix IFF_ALLMULTI handling.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.5 -r1.1.2.6 src/sys/dev/pci/if_mcx.c

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



CVS commit: [netbsd-9] src/sys/dev/pci

2019-11-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Nov 26 18:30:57 UTC 2019

Modified Files:
src/sys/dev/pci [netbsd-9]: if_mcx.c

Log Message:
Pull up following revision(s) (requested by jmcneill in ticket #486):

sys/dev/pci/if_mcx.c: revision 1.7

Fix IFF_ALLMULTI handling.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.5 -r1.1.2.6 src/sys/dev/pci/if_mcx.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/pci/if_mcx.c
diff -u src/sys/dev/pci/if_mcx.c:1.1.2.5 src/sys/dev/pci/if_mcx.c:1.1.2.6
--- src/sys/dev/pci/if_mcx.c:1.1.2.5	Mon Nov 18 19:46:33 2019
+++ src/sys/dev/pci/if_mcx.c	Tue Nov 26 18:30:57 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_mcx.c,v 1.1.2.5 2019/11/18 19:46:33 martin Exp $ */
+/*	$NetBSD: if_mcx.c,v 1.1.2.6 2019/11/26 18:30:57 martin Exp $ */
 /*	$OpenBSD: if_mcx.c,v 1.33 2019/09/12 04:23:59 jmatthew Exp $ */
 
 /*
@@ -6205,8 +6205,11 @@ mcx_ioctl(struct ifnet *ifp, u_long cmd,
 {
 	struct mcx_softc *sc = (struct mcx_softc *)ifp->if_softc;
 	struct ifreq *ifr = (struct ifreq *)data;
+	struct ethercom *ec = >sc_ec;
 	uint8_t addrhi[ETHER_ADDR_LEN], addrlo[ETHER_ADDR_LEN];
-	int s, i, error = 0;
+	struct ether_multi *enm;
+	struct ether_multistep step;
+	int s, i, flags, error = 0;
 
 	s = splnet();
 	switch (cmd) {
@@ -6214,8 +6217,10 @@ mcx_ioctl(struct ifnet *ifp, u_long cmd,
 	case SIOCADDMULTI:
 		if (ether_addmulti(ifreq_getaddr(cmd, ifr), >sc_ec) == ENETRESET) {
 			error = ether_multiaddr(>ifr_addr, addrlo, addrhi);
-			if (error != 0)
+			if (error != 0) {
+splx(s);
 return (error);
+			}
 
 			for (i = 0; i < MCX_NUM_MCAST_FLOWS; i++) {
 if (sc->sc_mcast_flows[i][0] == 0) {
@@ -6238,7 +6243,7 @@ mcx_ioctl(struct ifnet *ifp, u_long cmd,
 	error = ENETRESET;
 }
 
-if (sc->sc_ec.ec_multicnt > 0) {
+if (memcmp(addrlo, addrhi, ETHER_ADDR_LEN)) {
 	SET(ifp->if_flags, IFF_ALLMULTI);
 	error = ENETRESET;
 }
@@ -6249,8 +6254,10 @@ mcx_ioctl(struct ifnet *ifp, u_long cmd,
 	case SIOCDELMULTI:
 		if (ether_delmulti(ifreq_getaddr(cmd, ifr), >sc_ec) == ENETRESET) {
 			error = ether_multiaddr(>ifr_addr, addrlo, addrhi);
-			if (error != 0)
+			if (error != 0) {
+splx(s);
 return (error);
+			}
 
 			for (i = 0; i < MCX_NUM_MCAST_FLOWS; i++) {
 if (memcmp(sc->sc_mcast_flows[i], addrlo,
@@ -6269,10 +6276,23 @@ mcx_ioctl(struct ifnet *ifp, u_long cmd,
 sc->sc_extra_mcast--;
 
 			if (ISSET(ifp->if_flags, IFF_ALLMULTI) &&
-			(sc->sc_extra_mcast == 0) &&
-			(sc->sc_ec.ec_multicnt == 0)) {
-CLR(ifp->if_flags, IFF_ALLMULTI);
-error = ENETRESET;
+			sc->sc_extra_mcast == 0) {
+flags = 0;
+ETHER_LOCK(ec);
+ETHER_FIRST_MULTI(step, ec, enm);
+while (enm != NULL) {
+	if (memcmp(enm->enm_addrlo,
+	enm->enm_addrhi, ETHER_ADDR_LEN)) {
+		SET(flags, IFF_ALLMULTI);
+		break;
+	}
+	ETHER_NEXT_MULTI(step, enm);
+}
+ETHER_UNLOCK(ec);
+if (!ISSET(flags, IFF_ALLMULTI)) {
+	CLR(ifp->if_flags, IFF_ALLMULTI);
+	error = ENETRESET;
+}
 			}
 		}
 		break;



CVS commit: [netbsd-8] src/doc

2019-11-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Nov 26 09:00:55 UTC 2019

Modified Files:
src/doc [netbsd-8]: CHANGES-8.2

Log Message:
Ticket #1461


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.73 -r1.1.2.74 src/doc/CHANGES-8.2

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

Modified files:

Index: src/doc/CHANGES-8.2
diff -u src/doc/CHANGES-8.2:1.1.2.73 src/doc/CHANGES-8.2:1.1.2.74
--- src/doc/CHANGES-8.2:1.1.2.73	Tue Nov 26 08:26:19 2019
+++ src/doc/CHANGES-8.2	Tue Nov 26 09:00:55 2019
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-8.2,v 1.1.2.73 2019/11/26 08:26:19 martin Exp $
+# $NetBSD: CHANGES-8.2,v 1.1.2.74 2019/11/26 09:00:55 martin Exp $
 
 A complete list of changes from the NetBSD 8.1 release to the NetBSD 8.2
 release:
@@ -1717,3 +1717,9 @@ sys/dev/hyperv/if_hvn.c1.11
 	hvn(4): Fix incorrect ident when waiting for NVS command response.
 	[nonaka, ticket #1460]
 
+share/tmac/doc2html1.68
+
+	PR toolchain/54715: Remove duplicate (incorrect) version of
+	the .Lk macro.
+	[kre, ticket #1461]
+



CVS commit: [netbsd-8] src/doc

2019-11-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Nov 26 09:00:55 UTC 2019

Modified Files:
src/doc [netbsd-8]: CHANGES-8.2

Log Message:
Ticket #1461


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.73 -r1.1.2.74 src/doc/CHANGES-8.2

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



CVS commit: [netbsd-8] src/share/tmac

2019-11-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Nov 26 08:59:41 UTC 2019

Modified Files:
src/share/tmac [netbsd-8]: doc2html

Log Message:
Pull up following revision(s) (requested by kre in ticket #1461):

share/tmac/doc2html: revision 1.68

PR toolchain/54715

Remove duplicate (incorrect) version of the .Lk macro, so the
earlier (fancier and functional) definition survives.

For now simply comment it out.  Sometime later this one should be
removed - but the two have been present since these macros were
first imported (1999) so leaving this visible (but removed) a
little longer shouldn't hurt.

I (believe) this one is the only duplicate of this form.
With this change the Lk macro in doc2html should work as it is designed
(but does not call other macros, and can only have punctuation following
the URL and (optional) anchor args (2nd arg is the anchor if it isn't
punctuation).

Tested by martin@


To generate a diff of this commit:
cvs rdiff -u -r1.67 -r1.67.6.1 src/share/tmac/doc2html

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



CVS commit: [netbsd-8] src/share/tmac

2019-11-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Nov 26 08:59:41 UTC 2019

Modified Files:
src/share/tmac [netbsd-8]: doc2html

Log Message:
Pull up following revision(s) (requested by kre in ticket #1461):

share/tmac/doc2html: revision 1.68

PR toolchain/54715

Remove duplicate (incorrect) version of the .Lk macro, so the
earlier (fancier and functional) definition survives.

For now simply comment it out.  Sometime later this one should be
removed - but the two have been present since these macros were
first imported (1999) so leaving this visible (but removed) a
little longer shouldn't hurt.

I (believe) this one is the only duplicate of this form.
With this change the Lk macro in doc2html should work as it is designed
(but does not call other macros, and can only have punctuation following
the URL and (optional) anchor args (2nd arg is the anchor if it isn't
punctuation).

Tested by martin@


To generate a diff of this commit:
cvs rdiff -u -r1.67 -r1.67.6.1 src/share/tmac/doc2html

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

Modified files:

Index: src/share/tmac/doc2html
diff -u src/share/tmac/doc2html:1.67 src/share/tmac/doc2html:1.67.6.1
--- src/share/tmac/doc2html:1.67	Tue Nov 22 00:36:49 2016
+++ src/share/tmac/doc2html	Tue Nov 26 08:59:41 2019
@@ -1,4 +1,4 @@
-.\" $NetBSD: doc2html,v 1.67 2016/11/22 00:36:49 kamil Exp $
+.\" $NetBSD: doc2html,v 1.67.6.1 2019/11/26 08:59:41 martin Exp $
 .\"
 .\" Copyright (c) 1998, 1999, 2008 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -788,12 +788,12 @@ AT UNIX\\$*
 .	as doc-pcresult \\*[an-eol]
 .	pc-fin
 ..
-.de Lk
-.	as doc-pcresult \\$1
-.	shift
-.	recurse \\$@
-.	pc-fin
-..
+.\".de Lk
+.\".	as doc-pcresult \\$1
+.\".	shift
+.\".	recurse \\$@
+.\".	pc-fin
+.\"..
 .de Mt
 .	as doc-pcresult \\$1
 .	shift



CVS commit: [netbsd-9] src/doc

2019-11-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Nov 26 08:57:49 UTC 2019

Modified Files:
src/doc [netbsd-9]: CHANGES-9.0

Log Message:
Ticket #485


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.119 -r1.1.2.120 src/doc/CHANGES-9.0

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

Modified files:

Index: src/doc/CHANGES-9.0
diff -u src/doc/CHANGES-9.0:1.1.2.119 src/doc/CHANGES-9.0:1.1.2.120
--- src/doc/CHANGES-9.0:1.1.2.119	Tue Nov 26 08:24:43 2019
+++ src/doc/CHANGES-9.0	Tue Nov 26 08:57:49 2019
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.0,v 1.1.2.119 2019/11/26 08:24:43 martin Exp $
+# $NetBSD: CHANGES-9.0,v 1.1.2.120 2019/11/26 08:57:49 martin Exp $
 
 A complete list of changes from the initial NetBSD 9.0 branch on 2019-07-30
 until the 9.0 release:
@@ -6456,3 +6456,9 @@ sys/dev/hyperv/if_hvn.c1.11
 	hvn(4): Fix incorrect ident when waiting for NVS command response.
 	[nonaka, ticket #484]
 
+share/tmac/doc2html1.68
+
+	PR toolchain/54715: Remove duplicate (incorrect) version of
+	the .Lk macro.
+	[kre, ticket #485]
+



CVS commit: [netbsd-9] src/doc

2019-11-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Nov 26 08:57:49 UTC 2019

Modified Files:
src/doc [netbsd-9]: CHANGES-9.0

Log Message:
Ticket #485


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.119 -r1.1.2.120 src/doc/CHANGES-9.0

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



CVS commit: [netbsd-9] src/share/tmac

2019-11-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Nov 26 08:56:51 UTC 2019

Modified Files:
src/share/tmac [netbsd-9]: doc2html

Log Message:
Pull up following revision(s) (requested by kre in ticket #485):

share/tmac/doc2html: revision 1.68

PR toolchain/54715

Remove duplicate (incorrect) version of the .Lk macro, so the
earlier (fancier and functional) definition survives.

For now simply comment it out.  Sometime later this one should be
removed - but the two have been present since these macros were
first imported (1999) so leaving this visible (but removed) a
little longer shouldn't hurt.

I (believe) this one is the only duplicate of this form.
With this change the Lk macro in doc2html should work as it is designed
(but does not call other macros, and can only have punctuation following
the URL and (optional) anchor args (2nd arg is the anchor if it isn't
punctuation).

Tested by martin@


To generate a diff of this commit:
cvs rdiff -u -r1.67 -r1.67.16.1 src/share/tmac/doc2html

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



CVS commit: [netbsd-9] src/share/tmac

2019-11-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Nov 26 08:56:51 UTC 2019

Modified Files:
src/share/tmac [netbsd-9]: doc2html

Log Message:
Pull up following revision(s) (requested by kre in ticket #485):

share/tmac/doc2html: revision 1.68

PR toolchain/54715

Remove duplicate (incorrect) version of the .Lk macro, so the
earlier (fancier and functional) definition survives.

For now simply comment it out.  Sometime later this one should be
removed - but the two have been present since these macros were
first imported (1999) so leaving this visible (but removed) a
little longer shouldn't hurt.

I (believe) this one is the only duplicate of this form.
With this change the Lk macro in doc2html should work as it is designed
(but does not call other macros, and can only have punctuation following
the URL and (optional) anchor args (2nd arg is the anchor if it isn't
punctuation).

Tested by martin@


To generate a diff of this commit:
cvs rdiff -u -r1.67 -r1.67.16.1 src/share/tmac/doc2html

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

Modified files:

Index: src/share/tmac/doc2html
diff -u src/share/tmac/doc2html:1.67 src/share/tmac/doc2html:1.67.16.1
--- src/share/tmac/doc2html:1.67	Tue Nov 22 00:36:49 2016
+++ src/share/tmac/doc2html	Tue Nov 26 08:56:51 2019
@@ -1,4 +1,4 @@
-.\" $NetBSD: doc2html,v 1.67 2016/11/22 00:36:49 kamil Exp $
+.\" $NetBSD: doc2html,v 1.67.16.1 2019/11/26 08:56:51 martin Exp $
 .\"
 .\" Copyright (c) 1998, 1999, 2008 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -788,12 +788,12 @@ AT UNIX\\$*
 .	as doc-pcresult \\*[an-eol]
 .	pc-fin
 ..
-.de Lk
-.	as doc-pcresult \\$1
-.	shift
-.	recurse \\$@
-.	pc-fin
-..
+.\".de Lk
+.\".	as doc-pcresult \\$1
+.\".	shift
+.\".	recurse \\$@
+.\".	pc-fin
+.\"..
 .de Mt
 .	as doc-pcresult \\$1
 .	shift



CVS commit: [netbsd-8] src/doc

2019-11-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Nov 26 08:26:19 UTC 2019

Modified Files:
src/doc [netbsd-8]: CHANGES-8.2

Log Message:
Ticket #1460


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.72 -r1.1.2.73 src/doc/CHANGES-8.2

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

Modified files:

Index: src/doc/CHANGES-8.2
diff -u src/doc/CHANGES-8.2:1.1.2.72 src/doc/CHANGES-8.2:1.1.2.73
--- src/doc/CHANGES-8.2:1.1.2.72	Mon Nov 25 16:04:46 2019
+++ src/doc/CHANGES-8.2	Tue Nov 26 08:26:19 2019
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-8.2,v 1.1.2.72 2019/11/25 16:04:46 martin Exp $
+# $NetBSD: CHANGES-8.2,v 1.1.2.73 2019/11/26 08:26:19 martin Exp $
 
 A complete list of changes from the NetBSD 8.1 release to the NetBSD 8.2
 release:
@@ -1712,3 +1712,8 @@ sys/kern/subr_cprng.c1.33
 	Use cprng_strong, not cprng_fast, for sysctl kern.arnd.
 	[riastradh, ticket #1459]
 
+sys/dev/hyperv/if_hvn.c1.11
+
+	hvn(4): Fix incorrect ident when waiting for NVS command response.
+	[nonaka, ticket #1460]
+



CVS commit: [netbsd-8] src/doc

2019-11-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Nov 26 08:26:19 UTC 2019

Modified Files:
src/doc [netbsd-8]: CHANGES-8.2

Log Message:
Ticket #1460


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.72 -r1.1.2.73 src/doc/CHANGES-8.2

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



CVS commit: [netbsd-8] src/sys/dev/hyperv

2019-11-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Nov 26 08:25:28 UTC 2019

Modified Files:
src/sys/dev/hyperv [netbsd-8]: if_hvn.c

Log Message:
Pull up following revision(s) (requested by nonaka in ticket #1460):

sys/dev/hyperv/if_hvn.c: revision 1.11

hvn(4): Fix incorrect ident when waiting for NVS command response.


To generate a diff of this commit:
cvs rdiff -u -r1.2.2.6 -r1.2.2.7 src/sys/dev/hyperv/if_hvn.c

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



CVS commit: [netbsd-8] src/sys/dev/hyperv

2019-11-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Nov 26 08:25:28 UTC 2019

Modified Files:
src/sys/dev/hyperv [netbsd-8]: if_hvn.c

Log Message:
Pull up following revision(s) (requested by nonaka in ticket #1460):

sys/dev/hyperv/if_hvn.c: revision 1.11

hvn(4): Fix incorrect ident when waiting for NVS command response.


To generate a diff of this commit:
cvs rdiff -u -r1.2.2.6 -r1.2.2.7 src/sys/dev/hyperv/if_hvn.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/hyperv/if_hvn.c
diff -u src/sys/dev/hyperv/if_hvn.c:1.2.2.6 src/sys/dev/hyperv/if_hvn.c:1.2.2.7
--- src/sys/dev/hyperv/if_hvn.c:1.2.2.6	Mon Nov 25 16:01:25 2019
+++ src/sys/dev/hyperv/if_hvn.c	Tue Nov 26 08:25:28 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_hvn.c,v 1.2.2.6 2019/11/25 16:01:25 martin Exp $	*/
+/*	$NetBSD: if_hvn.c,v 1.2.2.7 2019/11/26 08:25:28 martin Exp $	*/
 /*	$OpenBSD: if_hvn.c,v 1.39 2018/03/11 14:31:34 mikeb Exp $	*/
 
 /*-
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_hvn.c,v 1.2.2.6 2019/11/25 16:01:25 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_hvn.c,v 1.2.2.7 2019/11/26 08:25:28 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -1103,7 +1103,8 @@ hvn_nvs_cmd(struct hvn_softc *sc, void *
 			hvn_nvs_intr(sc);
 			splx(s);
 		} else
-			tsleep(sc, PRIBIO | PCATCH, "nvscmd", mstohz(1));
+			tsleep(sc->sc_nvsrsp, PRIBIO | PCATCH, "nvscmd",
+			mstohz(1));
 	} while (--timo > 0 && sc->sc_nvsdone != 1);
 
 	if (timo == 0 && sc->sc_nvsdone != 1) {



CVS commit: [netbsd-9] src/doc

2019-11-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Nov 26 08:24:43 UTC 2019

Modified Files:
src/doc [netbsd-9]: CHANGES-9.0

Log Message:
Tickets #469, #482 - #484


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.118 -r1.1.2.119 src/doc/CHANGES-9.0

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

Modified files:

Index: src/doc/CHANGES-9.0
diff -u src/doc/CHANGES-9.0:1.1.2.118 src/doc/CHANGES-9.0:1.1.2.119
--- src/doc/CHANGES-9.0:1.1.2.118	Mon Nov 25 17:03:50 2019
+++ src/doc/CHANGES-9.0	Tue Nov 26 08:24:43 2019
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.0,v 1.1.2.118 2019/11/25 17:03:50 martin Exp $
+# $NetBSD: CHANGES-9.0,v 1.1.2.119 2019/11/26 08:24:43 martin Exp $
 
 A complete list of changes from the initial NetBSD 9.0 branch on 2019-07-30
 until the 9.0 release:
@@ -6429,3 +6429,30 @@ sys/kern/subr_cprng.c1.33
 	Use cprng_strong, not cprng_fast, for sysctl kern.arnd.
 	[riastradh, ticket #481]
 
+lib/libc/tls/Makefile.inc			1.3
+lib/libc/tls/tls.c1.10-1.13
+libexec/ld.elf_so/Makefile			1.142
+libexec/ld.elf_so/tls.c1.13,1.14
+usr.bin/ldd/Makefile.elf			1.6
+
+	PR/54074 and PR/54093: fix static TLS allocation properly aligned.
+	[nakayama, ticket #469]
+
+sys/dev/pci/if_age.c1.63
+
+	Fix multicast handling.
+	[msaitoh, ticket #482]
+
+sys/dev/pci/if_age.c1.64
+sys/dev/pci/if_alc.c1.44
+sys/dev/pci/if_ale.c1.35,1.36
+sys/dev/pci/if_cas.c1.36
+
+	Fix a bug that IFF_ALLMULTI is almost always set.
+	[msaitoh, ticket #483]
+
+sys/dev/hyperv/if_hvn.c1.11
+
+	hvn(4): Fix incorrect ident when waiting for NVS command response.
+	[nonaka, ticket #484]
+



CVS commit: [netbsd-9] src/doc

2019-11-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Nov 26 08:24:43 UTC 2019

Modified Files:
src/doc [netbsd-9]: CHANGES-9.0

Log Message:
Tickets #469, #482 - #484


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.118 -r1.1.2.119 src/doc/CHANGES-9.0

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



CVS commit: [netbsd-9] src/sys/dev/hyperv

2019-11-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Nov 26 08:22:51 UTC 2019

Modified Files:
src/sys/dev/hyperv [netbsd-9]: if_hvn.c

Log Message:
Pull up following revision(s) (requested by nonaka in ticket #484):

sys/dev/hyperv/if_hvn.c: revision 1.11

hvn(4): Fix incorrect ident when waiting for NVS command response.


To generate a diff of this commit:
cvs rdiff -u -r1.4.2.4 -r1.4.2.5 src/sys/dev/hyperv/if_hvn.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/hyperv/if_hvn.c
diff -u src/sys/dev/hyperv/if_hvn.c:1.4.2.4 src/sys/dev/hyperv/if_hvn.c:1.4.2.5
--- src/sys/dev/hyperv/if_hvn.c:1.4.2.4	Mon Nov 25 16:58:54 2019
+++ src/sys/dev/hyperv/if_hvn.c	Tue Nov 26 08:22:51 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_hvn.c,v 1.4.2.4 2019/11/25 16:58:54 martin Exp $	*/
+/*	$NetBSD: if_hvn.c,v 1.4.2.5 2019/11/26 08:22:51 martin Exp $	*/
 /*	$OpenBSD: if_hvn.c,v 1.39 2018/03/11 14:31:34 mikeb Exp $	*/
 
 /*-
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_hvn.c,v 1.4.2.4 2019/11/25 16:58:54 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_hvn.c,v 1.4.2.5 2019/11/26 08:22:51 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -1097,7 +1097,8 @@ hvn_nvs_cmd(struct hvn_softc *sc, void *
 			hvn_nvs_intr(sc);
 			splx(s);
 		} else
-			tsleep(sc, PRIBIO | PCATCH, "nvscmd", mstohz(1));
+			tsleep(sc->sc_nvsrsp, PRIBIO | PCATCH, "nvscmd",
+			mstohz(1));
 	} while (--timo > 0 && sc->sc_nvsdone != 1);
 
 	if (timo == 0 && sc->sc_nvsdone != 1) {



CVS commit: [netbsd-9] src/sys/dev/hyperv

2019-11-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Nov 26 08:22:51 UTC 2019

Modified Files:
src/sys/dev/hyperv [netbsd-9]: if_hvn.c

Log Message:
Pull up following revision(s) (requested by nonaka in ticket #484):

sys/dev/hyperv/if_hvn.c: revision 1.11

hvn(4): Fix incorrect ident when waiting for NVS command response.


To generate a diff of this commit:
cvs rdiff -u -r1.4.2.4 -r1.4.2.5 src/sys/dev/hyperv/if_hvn.c

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



CVS commit: [netbsd-9] src/sys/dev/pci

2019-11-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Nov 26 08:20:47 UTC 2019

Modified Files:
src/sys/dev/pci [netbsd-9]: if_age.c if_alc.c if_ale.c if_cas.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #483):

sys/dev/pci/if_cas.c: revision 1.36
sys/dev/pci/if_alc.c: revision 1.44
sys/dev/pci/if_ale.c: revision 1.35
sys/dev/pci/if_ale.c: revision 1.36
sys/dev/pci/if_age.c: revision 1.64

Fix a bug that IFF_ALLMULTI is almost always set.
 OpenBSD's ac_multirangecnt is not NetBSD's ec_multicnt.

 Remove accidentally committed debug code. Sorry.


To generate a diff of this commit:
cvs rdiff -u -r1.60.2.3 -r1.60.2.4 src/sys/dev/pci/if_age.c
cvs rdiff -u -r1.38.2.2 -r1.38.2.3 src/sys/dev/pci/if_alc.c
cvs rdiff -u -r1.33.2.1 -r1.33.2.2 src/sys/dev/pci/if_ale.c
cvs rdiff -u -r1.35 -r1.35.2.1 src/sys/dev/pci/if_cas.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/pci/if_age.c
diff -u src/sys/dev/pci/if_age.c:1.60.2.3 src/sys/dev/pci/if_age.c:1.60.2.4
--- src/sys/dev/pci/if_age.c:1.60.2.3	Tue Nov 26 08:18:40 2019
+++ src/sys/dev/pci/if_age.c	Tue Nov 26 08:20:47 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_age.c,v 1.60.2.3 2019/11/26 08:18:40 martin Exp $ */
+/*	$NetBSD: if_age.c,v 1.60.2.4 2019/11/26 08:20:47 martin Exp $ */
 /*	$OpenBSD: if_age.c,v 1.1 2009/01/16 05:00:34 kevlo Exp $	*/
 
 /*-
@@ -31,7 +31,7 @@
 /* Driver for Attansic Technology Corp. L1 Gigabit Ethernet. */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_age.c,v 1.60.2.3 2019/11/26 08:18:40 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_age.c,v 1.60.2.4 2019/11/26 08:20:47 martin Exp $");
 
 #include "vlan.h"
 
@@ -2275,27 +2275,37 @@ age_rxfilter(struct age_softc *sc)
 	 */
 	rxcfg |= MAC_CFG_BCAST;
 
-	if (ifp->if_flags & IFF_PROMISC || ec->ec_multicnt > 0) {
-		ifp->if_flags |= IFF_ALLMULTI;
-		if (ifp->if_flags & IFF_PROMISC)
+	/* Program new filter. */
+	if ((ifp->if_flags & IFF_PROMISC) != 0)
+		goto update;
+
+	memset(mchash, 0, sizeof(mchash));
+
+	ETHER_LOCK(ec);
+	ETHER_FIRST_MULTI(step, ec, enm);
+	while (enm != NULL) {
+		if (memcmp(enm->enm_addrlo, enm->enm_addrhi, ETHER_ADDR_LEN)) {
+			/* XXX Use ETHER_F_ALLMULTI in future. */
+			ifp->if_flags |= IFF_ALLMULTI;
+			ETHER_UNLOCK(ec);
+			goto update;
+		}
+		crc = ether_crc32_be(enm->enm_addrlo, ETHER_ADDR_LEN);
+		mchash[crc >> 31] |= 1 << ((crc >> 26) & 0x1f);
+		ETHER_NEXT_MULTI(step, enm);
+	}
+	ETHER_UNLOCK(ec);
+
+update:
+	if ((ifp->if_flags & (IFF_PROMISC | IFF_ALLMULTI)) != 0) {
+		if (ifp->if_flags & IFF_PROMISC) {
 			rxcfg |= MAC_CFG_PROMISC;
-		else
+			/* XXX Use ETHER_F_ALLMULTI in future. */
+			ifp->if_flags |= IFF_ALLMULTI;
+		} else
 			rxcfg |= MAC_CFG_ALLMULTI;
 		mchash[0] = mchash[1] = 0x;
-	} else {
-		/* Program new filter. */
-		memset(mchash, 0, sizeof(mchash));
-
-		ETHER_LOCK(ec);
-		ETHER_FIRST_MULTI(step, ec, enm);
-		while (enm != NULL) {
-			crc = ether_crc32_be(enm->enm_addrlo, ETHER_ADDR_LEN);
-			mchash[crc >> 31] |= 1 << ((crc >> 26) & 0x1f);
-			ETHER_NEXT_MULTI(step, enm);
-		}
-		ETHER_UNLOCK(ec);
 	}
-
 	CSR_WRITE_4(sc, AGE_MAR0, mchash[0]);
 	CSR_WRITE_4(sc, AGE_MAR1, mchash[1]);
 	CSR_WRITE_4(sc, AGE_MAC_CFG, rxcfg);

Index: src/sys/dev/pci/if_alc.c
diff -u src/sys/dev/pci/if_alc.c:1.38.2.2 src/sys/dev/pci/if_alc.c:1.38.2.3
--- src/sys/dev/pci/if_alc.c:1.38.2.2	Wed Nov  6 09:59:38 2019
+++ src/sys/dev/pci/if_alc.c	Tue Nov 26 08:20:47 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_alc.c,v 1.38.2.2 2019/11/06 09:59:38 martin Exp $	*/
+/*	$NetBSD: if_alc.c,v 1.38.2.3 2019/11/26 08:20:47 martin Exp $	*/
 /*	$OpenBSD: if_alc.c,v 1.1 2009/08/08 09:31:13 kevlo Exp $	*/
 /*-
  * Copyright (c) 2009, Pyun YongHyeon 
@@ -3443,27 +3443,37 @@ alc_iff(struct alc_softc *sc)
 	 */
 	rxcfg |= MAC_CFG_BCAST;
 
-	if (ifp->if_flags & IFF_PROMISC || ec->ec_multicnt > 0) {
-		ifp->if_flags |= IFF_ALLMULTI;
-		if (ifp->if_flags & IFF_PROMISC)
+	/* Program new filter. */
+	if ((ifp->if_flags & IFF_PROMISC) != 0)
+		goto update;
+
+	memset(mchash, 0, sizeof(mchash));
+
+	ETHER_LOCK(ec);
+	ETHER_FIRST_MULTI(step, ec, enm);
+	while (enm != NULL) {
+		if (memcmp(enm->enm_addrlo, enm->enm_addrhi, ETHER_ADDR_LEN)) {
+			/* XXX Use ETHER_F_ALLMULTI in future. */
+			ifp->if_flags |= IFF_ALLMULTI;
+			ETHER_UNLOCK(ec);
+			goto update;
+		}
+		crc = ether_crc32_be(enm->enm_addrlo, ETHER_ADDR_LEN);
+		mchash[crc >> 31] |= 1 << ((crc >> 26) & 0x1f);
+		ETHER_NEXT_MULTI(step, enm);
+	}
+	ETHER_UNLOCK(ec);
+
+update:
+	if ((ifp->if_flags & (IFF_PROMISC | IFF_ALLMULTI)) != 0) {
+		if (ifp->if_flags & IFF_PROMISC) {
 			rxcfg |= MAC_CFG_PROMISC;
-		else
+			/* XXX Use ETHER_F_ALLMULTI in future. */
+			ifp->if_flags |= IFF_ALLMULTI;
+		} else
 			rxcfg |= MAC_CFG_ALLMULTI;
 		mchash[0] = mchash[1] = 0x;
-	} else {
-		/* Program new filter. */
-		memset(mchash, 0, sizeof(mchash));
-
-		

CVS commit: [netbsd-9] src/sys/dev/pci

2019-11-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Nov 26 08:20:47 UTC 2019

Modified Files:
src/sys/dev/pci [netbsd-9]: if_age.c if_alc.c if_ale.c if_cas.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #483):

sys/dev/pci/if_cas.c: revision 1.36
sys/dev/pci/if_alc.c: revision 1.44
sys/dev/pci/if_ale.c: revision 1.35
sys/dev/pci/if_ale.c: revision 1.36
sys/dev/pci/if_age.c: revision 1.64

Fix a bug that IFF_ALLMULTI is almost always set.
 OpenBSD's ac_multirangecnt is not NetBSD's ec_multicnt.

 Remove accidentally committed debug code. Sorry.


To generate a diff of this commit:
cvs rdiff -u -r1.60.2.3 -r1.60.2.4 src/sys/dev/pci/if_age.c
cvs rdiff -u -r1.38.2.2 -r1.38.2.3 src/sys/dev/pci/if_alc.c
cvs rdiff -u -r1.33.2.1 -r1.33.2.2 src/sys/dev/pci/if_ale.c
cvs rdiff -u -r1.35 -r1.35.2.1 src/sys/dev/pci/if_cas.c

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



  1   2   3   4   5   6   7   8   9   10   >