HiFive Unmatched clean poweroff using the power button

2022-08-17 Thread Jeremie Courreges-Anglas
Some time ago I wanted to get a clean poweroff from the power button on my Unmatched, so that I don't get fsck at reboot the morning after someone sleeps in the room where the machine lives. kettenis kindly provided sfgpio(4) to get interrupts working on dapmic(4) instead of my initial hack that

Re: mips64: trigger deferred timer interrupt from splx(9)

2022-08-17 Thread Scott Cheloha
On Wed, Aug 17, 2022 at 01:30:29PM +, Visa Hankala wrote: > On Tue, Aug 09, 2022 at 09:54:02AM -0500, Scott Cheloha wrote: > > On Tue, Aug 09, 2022 at 02:03:31PM +, Visa Hankala wrote: > > > On Mon, Aug 08, 2022 at 02:52:37AM -0500, Scott Cheloha wrote: > > > > One thing I'm still uncertain

Re: fix i386 cpu classnames

2022-08-17 Thread Mike Larkin
On Wed, Aug 17, 2022 at 03:27:51PM +1000, Jonathan Gray wrote: > broken after rev 1.652 of machdep.c > > cpu0: Intel(R) Pentium(R) M processor 1200MHz ("GenuineIntel" 686-class) 1.20 > GHz, 06-09-05 > cpu0: Intel(R) Pentium(R) M processor 1200MHz ("GenuineIntel" -class) 1.20 > GHz, 06-09-05 > > C

Re: bgpd switch to memxyz() from bxyz()

2022-08-17 Thread Theo Buehler
On Wed, Aug 17, 2022 at 04:04:26PM +0200, Claudio Jeker wrote: > I did switch to memset from bzero and from bcopy to memcpy whenever I > touched the code but now I just decided to change all users of bcopy(), > bzero() and bcmp() to use memcpy(), memset() and memcmp(). > > None of the bcopy() user

bgpd switch to memxyz() from bxyz()

2022-08-17 Thread Claudio Jeker
I did switch to memset from bzero and from bcopy to memcpy whenever I touched the code but now I just decided to change all users of bcopy(), bzero() and bcmp() to use memcpy(), memset() and memcmp(). None of the bcopy() users had overlapping memory regions so memcpy() should be fine. -- :wq Cla

Re: mips64: trigger deferred timer interrupt from splx(9)

2022-08-17 Thread Visa Hankala
On Tue, Aug 09, 2022 at 09:54:02AM -0500, Scott Cheloha wrote: > On Tue, Aug 09, 2022 at 02:03:31PM +, Visa Hankala wrote: > > On Mon, Aug 08, 2022 at 02:52:37AM -0500, Scott Cheloha wrote: > > > One thing I'm still uncertain about is how glxclk fits into the > > > loongson picture. It's an in

Re: bgpd kroute includes cleanup

2022-08-17 Thread Claudio Jeker
On Wed, Aug 17, 2022 at 02:48:42PM +0200, Theo Buehler wrote: > On Wed, Aug 17, 2022 at 02:25:51PM +0200, Claudio Jeker wrote: > > Remove some unneeded headers from kroute.c > > Also move sys/tree.h up above the other sys includes. > > err.h was never used, fcntl.h was used for a bit more than two

Re: uvm_swap: introduce uvm_swap_data_lock

2022-08-17 Thread Martin Pieuchot
On 16/01/22(Sun) 15:35, Martin Pieuchot wrote: > On 30/12/21(Thu) 23:38, Theo Buehler wrote: > > The diff below does two things: it adds a uvm_swap_data_lock mutex and > > trades it for the KERNEL_LOCK in uvm_swapisfull() and uvm_swap_markbad() > > Why is it enough? Which fields is the lock prote

Re: bgpd kroute includes cleanup

2022-08-17 Thread Theo Buehler
On Wed, Aug 17, 2022 at 02:25:51PM +0200, Claudio Jeker wrote: > Remove some unneeded headers from kroute.c > Also move sys/tree.h up above the other sys includes. err.h was never used, fcntl.h was used for a bit more than two days after import, so these can definitely go. arpa/inet.h is used for

bgpd kroute includes cleanup

2022-08-17 Thread Claudio Jeker
Remove some unneeded headers from kroute.c Also move sys/tree.h up above the other sys includes. -- :wq Claudio Index: kroute.c === RCS file: /cvs/src/usr.sbin/bgpd/kroute.c,v retrieving revision 1.291 diff -u -p -r1.291 kroute.c --

Re: [RFC] acpi: add acpitimer_delay(), acpihpet_delay()

2022-08-17 Thread Jonathan Gray
On Wed, Aug 17, 2022 at 04:53:20PM +1000, Jonathan Gray wrote: > > It seems to me it would be cleaner if the decision of what to use for > delay could be moved into an md file. > > Or abstract it by having a numeric weight like timecounters or driver > match return numbers. diff against your pre

pcidevs: PM991_NVME: add 980 name

2022-08-17 Thread Klemens Nanni
SSD 980 is matched as PM991 but as far as I can tell from research, those are two different products with different product/model codes using the same PCI product id. nvme0 at pci4 dev 0 function 0 "Samsung PM991 NVMe" rev 0x00: msix, NVMe 1.4 nvme0: Samsung SSD 980 500GB, firmware 1B4QFXO7, seria

Re: bgpd unroll struct kif_node into struct kif

2022-08-17 Thread Theo Buehler
On Wed, Aug 17, 2022 at 12:18:05PM +0200, Claudio Jeker wrote: > The same thing was done for kroute and knexthop. kif can benefit from the > same. Diff is mostly mechanical. ok

bgpd unroll struct kif_node into struct kif

2022-08-17 Thread Claudio Jeker
The same thing was done for kroute and knexthop. kif can benefit from the same. Diff is mostly mechanical. -- :wq Claudio Index: kroute.c === RCS file: /cvs/src/usr.sbin/bgpd/kroute.c,v retrieving revision 1.290 diff -u -p -r1.290 k

Re: Race in disk_attach_callback?

2022-08-17 Thread Miod Vallat
> What is the result if root runs disklabel, and forces it to all zeros? If the root duid is all zeroes, then the only way to refer to the root disk is to use its /dev/{s,w}d* device name, as zero duids are ignored. If you set a zero duid in disklabel(8), setdisklabel() in the kernel will compute