Re: Faster M operation for the swapper to be great again

2022-06-30 Thread Mark Kettenis
Makes sense to. ok kettenis@ > On 06/30/2022 4:05 PM Martin Pieuchot wrote: > > > Diff below uses two tricks to make uvm_pagermapin/out() faster and less > likely to fail in OOM situations. > > These functions are used to map buffers when swapping pages in/out and > when faulting on mmaped

Re: amd64 serial console changes

2022-06-30 Thread Mark Kettenis
Forget about efi32 and efi64 (I just got permission from mlarkin to remove those). The efiboot and stand/libsa bits are ok kettenis@ > Op 30-06-2022 15:14 schreef Anton Lindqvist : > > > On Thu, Jun 30, 2022 at 01:07:46PM +0200, Mark Kettenis wrote: > > Ah right. Please c

Re: amd64 serial console changes

2022-06-30 Thread Mark Kettenis
Ah right. Please commit! > Op 30-06-2022 11:55 schreef Anton Lindqvist : > > > On Thu, Jun 30, 2022 at 08:52:33AM +0200, Hrvoje Popovski wrote: > > On 27.6.2022. 23:44, Mark Kettenis wrote: > > > The Ryzen Embedded V1000 processors have an arm64-style Synposys &g

Re: Simplify aiodone daemon

2022-06-30 Thread Mark Kettenis
> Op 29-06-2022 16:17 schreef Martin Pieuchot : > > > The aiodone daemon accounts for and frees/releases pages they were > written to swap. It is only used for asynchronous write. The diff > below uses this knowledge to: > > - Stop suggesting that uvm_swap_get() can be asynchronous.

Re: amd64 serial console changes

2022-06-30 Thread Mark Kettenis
Hi Hrvoje, I assume it was faster before? What hardware are you seeing this on? Thanks, Mark > Op 30-06-2022 08:52 schreef Hrvoje Popovski : > > > On 27.6.2022. 23:44, Mark Kettenis wrote: > > The Ryzen Embedded V1000 processors have an arm64-style Synposys > >

Re: Unlocking pledge(2)

2022-06-29 Thread Mark Kettenis
Looks mostly good to me, except for one little nit and one question mark... > Op 28-06-2022 23:12 schreef Jeremie Courreges-Anglas : > > > On Tue, Jun 28 2022, Martin Pieuchot wrote: > > On 28/06/22(Tue) 18:17, Jeremie Courreges-Anglas wrote: > >> > >> Initially I just wandered in

Re: bcmdmac: minor nit

2022-06-28 Thread Mark Kettenis
ok kettenis@ > Op 28-06-2022 07:20 schreef Anton Lindqvist : > > > Hi, > No need to pass a copy of the bcmdmac_channel structure to predicate > routines. > > Comments? OK? > > diff --git sys/dev/fdt/bcm2835_dmac.c sys/dev/fdt/bcm2835_dmac.c > index 145810dd7af..e9b31af568c 100644 > ---

Re: com at acpi: minor nit

2022-06-28 Thread Mark Kettenis
meh not really worth fixing, but since you already wrote the diff ok kettenis@ > Op 28-06-2022 07:23 schreef Anton Lindqvist : > > > Hi, > A com_acpi_softc pointer is used as the interrupt callback cookie which > is later on interpreted as a com_softc pointer. This is not a problem in >

amd64 serial console changes

2022-06-27 Thread Mark Kettenis
The Ryzen Embedded V1000 processors have an arm64-style Synposys DesignWare UART instead if a PC-compatible NS16x50 UART. To make this UART work as a serial console, we need to pass some more information from the bootloader to the kernel. This diff adds the logic to handle that information to

xhci@acpi

2022-06-27 Thread Mark Kettenis
So ACPI uses separate HIDs/CIDs for xhci(4) with and without debug support. PNP0D15 is the one without. Seen on the Lenovo x13s. ok? Index: xhci_acpi.c === RCS file: /cvs/src/sys/dev/acpi/xhci_acpi.c,v retrieving revision 1.6

The notch

2022-06-26 Thread Mark Kettenis
The framebuffer on the 14" and 16" macbook pro is special. The screen is a little bit taller than the standard 16:10 ratio. And the top of the display is partly covered by "the notch" that integrates the camera. The pixels behind the notch exist as far as the framebuffer is considered, but

Re: Only scan device 0 on pcie downstream ports

2022-06-17 Thread Mark Kettenis
> Date: Fri, 17 Jun 2022 17:22:58 +1000 > From: Jonathan Gray > > On Fri, Jun 17, 2022 at 12:33:47AM +0200, Mark Kettenis wrote: > > On the Ampere Altra machines, some PCIe devices show up 32 times; once > > for each possible PCI device number. This is a hardware bug

Only scan device 0 on pcie downstream ports

2022-06-16 Thread Mark Kettenis
On the Ampere Altra machines, some PCIe devices show up 32 times; once for each possible PCI device number. This is a hardware bug, since a downstream switch port (or root port) is supposed to terminate configuration request targeted at device numbers 1-31. But it is a somewhat common bug since

Re: selecting proper GOP when there are multiple GOPs

2022-06-16 Thread Mark Kettenis
> Date: Thu, 16 Jun 2022 23:49:05 +0900 (JST) > From: YASUOKA Masahiko > > On Thu, 16 Jun 2022 15:52:41 +0300 > Nick Henderson wrote: > > Any updates on this patch? Would love to see it included in the next > > release. > > Yes. > > I'll commit this this weekend even if I don't get no ok. >

Re: start unlocking kbind(2)

2022-06-15 Thread Mark Kettenis
> From: Philip Guenther > Date: Wed, 15 Jun 2022 10:07:06 -0900 > > On Mon, 13 Jun 2022, Theo de Raadt wrote: > > Scott Cheloha wrote: > > > > Am I wrong that kbind is never called twice in the same address space? > > > > > > Isn't this exactly what happened the last time we tried this? > > >

Apple M1 & macOS 13

2022-06-11 Thread Mark Kettenis
c diff -N arch/arm64/dev/aplsart.c --- /dev/null 1 Jan 1970 00:00:00 - +++ arch/arm64/dev/aplsart.c11 Jun 2022 19:27:57 - @@ -0,0 +1,166 @@ +/* $OpenBSD$ */ +/* + * Copyright (c) 2022 Mark Kettenis + * + * Permission to use, copy, modify, and distribute this s

Re: mvsw(4): present each port as a separate interface

2022-05-30 Thread Mark Kettenis
> Date: Sat, 28 May 2022 15:08:49 +1000 > From: David Gwynne > > the espressobin is the least worst thing ive settled on. it's not > too expensive, it has a case, it has multiple interfaces, and > kettenis and patrick have already worked on the platform stuff. the > only problem with it was that

Re: powerpc64: do tc_init(9) before cpu_startclock()

2022-05-26 Thread Mark Kettenis
> From: Scott Cheloha > Date: Thu, 26 May 2022 08:51:22 -0500 > > > On May 24, 2022, at 7:12 PM, Scott Cheloha wrote: > > > > In the future, the clock interrupt will need a working timecounter to > > accurately reschedule itself. > > > > Move tc_init(9) up before cpu_startclock(). > > > > (I

Re: Call uvm_vnp_uncache() before VOP_RENAME()

2022-05-24 Thread Mark Kettenis
> Date: Tue, 24 May 2022 14:23:46 +0200 > From: Martin Pieuchot > > On 17/05/22(Tue) 16:55, Martin Pieuchot wrote: > > nfsrv_rename() should behave like dorenameat() and tell UVM to "flush" a > > possibly mmap'ed file before calling VOP_RENAME(). > > > > ok? > > Anyone? Makes sense to me. ok

Re: ffs_truncate: Missing uvm_vnp_uncache() w/ softdep

2022-05-24 Thread Mark Kettenis
> Date: Tue, 24 May 2022 14:28:39 +0200 > From: Martin Pieuchot > > The softdep code path is missing a UVM cache invalidation compared to > the !softdep one. This is necessary to flush pages of a persisting > vnode. > > Since uvm_vnp_setsize() is also called later in this function for the >

Re: start unlocking kbind(2)

2022-05-18 Thread Mark Kettenis
> From: "Theo de Raadt" > Date: Wed, 18 May 2022 10:48:01 -0600 > > Mark Kettenis wrote: > > > > I guess there is another question -- should the ps_kbind_* variables > > > be stored inside the uvmspace, rather than inside pr? > > > > I

Re: powerpc*: make EXC_LAST less awkward

2022-05-18 Thread Mark Kettenis
> Date: Wed, 18 May 2022 21:43:29 +0200 > From: Alexander Bluhm > > On Tue, May 17, 2022 at 07:20:49PM +, Miod Vallat wrote: > > As seen in sys/arch/powerpc64/include/trap.h, not-so-ancient PowerPC and > > POWER processors define exception addresses past EXC_LAST. > > > > The following diff

Re: start unlocking kbind(2)

2022-05-18 Thread Mark Kettenis
> From: "Theo de Raadt" > Date: Wed, 18 May 2022 10:09:38 -0600 > > I guess there is another question -- should the ps_kbind_* variables > be stored inside the uvmspace, rather than inside pr? I think there are arguments for both. But I don't think moving it makes things easier.

Re: start unlocking kbind(2)

2022-05-18 Thread Mark Kettenis
> From: "Theo de Raadt" > Date: Wed, 18 May 2022 10:05:03 -0600 > > David Gwynne wrote: > > > from yet another perspective, broad use of a common lock can end up > > hurting in the long run because you may end up where everything is > > serialised and you have to go back and do a ton of work

Re: powerpc*: make EXC_LAST less awkward

2022-05-17 Thread Mark Kettenis
> Date: Tue, 17 May 2022 19:20:49 + > From: Miod Vallat > > As seen in sys/arch/powerpc64/include/trap.h, not-so-ancient PowerPC and > POWER processors define exception addresses past EXC_LAST. Erh, wait, not really. EXC_AST is "fake" and EXC_USER is a flag that indicates we came from

Re: use cpu sensor for cpuspeed

2022-05-15 Thread Mark Kettenis
> From: "Ted Unangst" > Date: Sat, 14 May 2022 20:23:39 -0400 > > The cpu hz sensor is more accurate and updates faster than than the value > currently used for hw.cpuspeed. So return that value (scaled). > > This doesn't set cpuspeed directly because the acpi does that and it's hard > to

Re: uvm_pagedequeue()

2022-05-10 Thread Mark Kettenis
> Date: Tue, 10 May 2022 18:45:21 +0200 > From: Martin Pieuchot > > On 05/05/22(Thu) 14:54, Martin Pieuchot wrote: > > Diff below introduces a new wrapper to manipulate active/inactive page > > queues. > > > > ok? > > Anyone? Sorry I started looking at this and got distracted. I'm not sure

Re: [patch] CPU frequency scheduler change proposal

2022-05-08 Thread Mark Kettenis
> Date: Sun, 20 Mar 2022 18:13:16 +0100 > From: Solene Rapenne > > I'm proposing a very simple change to the automatic policy of the CPU > frequency scheduler. > > Currently, every 100ms the scheduler is doing this: > > - when the CPU load exceeds the threshold, CPU frequency is set to the >

Re: divert packet kernel lock

2022-05-06 Thread Mark Kettenis
> Date: Fri, 6 May 2022 14:48:59 +0200 > From: Alexander Bluhm > > On Thu, May 05, 2022 at 11:10:54PM +0200, Mark Kettenis wrote: > > > Date: Thu, 5 May 2022 22:41:01 +0200 > > > From: Alexander Bluhm > > > > > > Hi, > > > >

Re: divert packet kernel lock

2022-05-05 Thread Mark Kettenis
> Date: Thu, 5 May 2022 22:41:01 +0200 > From: Alexander Bluhm > > Hi, > > The easiest way to make divert_packet() MP safe for now, is to > protect sbappendaddr() with kernel lock. All other invocations of sbappendaddr() run with the kernel lock held? If so, maybe that should be asserted

Re: Merge swap-backed and object-backed inactive lists

2022-05-02 Thread Mark Kettenis
> Date: Mon, 2 May 2022 18:39:17 +0200 > From: Martin Pieuchot > > Let's simplify the existing logic and use a single list for inactive > pages. uvmpd_scan_inactive() already does a lot of check if it finds > a page which is swap-backed. This will be improved in a next change. So NetBSD did

Re: NETGEAR RAX200 support

2022-05-01 Thread Mark Kettenis
> Date: Sun, 1 May 2022 13:46:05 +0200 > From: "Johannes (krjdev) Krottmayer" > > Hi Mark! > > On 5/1/22 12:27, Mark Kettenis wrote: > >> Date: Sun, 1 May 2022 11:13:13 +0200 > >> From: "Johannes (krjdev) Krottmayer" > >> >

Re: NETGEAR RAX200 support

2022-05-01 Thread Mark Kettenis
> Date: Sun, 1 May 2022 11:13:13 +0200 > From: "Johannes (krjdev) Krottmayer" > > Hi, Hi Johannes, > > Exists there an official support for this router? > > Here the official product page: > https://www.netgear.com/home/wifi/routers/rax200/ > > If there is no official support for the SoC

Re: pluart(4): fifo support

2022-04-30 Thread Mark Kettenis
> Date: Sat, 30 Apr 2022 09:40:24 +0200 > From: Anton Lindqvist > > On Sun, Mar 13, 2022 at 04:17:07PM +0100, Mark Kettenis wrote: > > > Date: Fri, 11 Mar 2022 07:53:13 +0100 > > > From: Anton Lindqvist > > > > > > On Tue, Mar 08, 2022 at 01:4

Re: speaker(4): unhook driver and manpage from build

2022-04-29 Thread Mark Kettenis
> From: Scott Cheloha > Date: Fri, 29 Apr 2022 11:13:19 -0500 > > > On Apr 29, 2022, at 09:33, Angelo wrote: > > > > Hello > > > >> On Thu, Apr 28, 2022 at 06:34:00AM -0500, Scott Cheloha wrote: > >> speaker(4) is a whimsical thing, but I don't think we should have a > >> dedicated chiptune

Re: btrace hist printing large numbers

2022-04-27 Thread Mark Kettenis
> From: "Ted Unangst" > Date: Wed, 27 Apr 2022 04:07:24 -0400 > > btrace needs a little more help printing very large numbers. If you > have something like 2^61 in your histogram, it gets printed as 1K > because that's what's left over after dividing by G and M. Add some > more units, and it

Re: Call uvm_pageactivate() from uvm_pageunwire()

2022-04-26 Thread Mark Kettenis
> Date: Tue, 26 Apr 2022 14:19:32 +0200 > From: Martin Pieuchot > > I'd like to use a proper interface to add/remove pages on the > active/inactive queues. This will help for lock assertions and help > improving the existing LRU limitations. > > Diff below makes uvm_pageunwire() call

Re: Decrement uvmexp.swpgonly

2022-04-26 Thread Mark Kettenis
> Date: Tue, 26 Apr 2022 14:09:36 +0200 > From: Martin Pieuchot > > Small diff to decrement the counter only if the I/O succeed. This > prevent a false positive if a check is performed before an error is > returned. > > ok? yes that should be fine ok kettenis@ > Index: uvm/uvm_swap.c >

Re: more generic cpu freq reporting

2022-04-25 Thread Mark Kettenis
> Date: Mon, 25 Apr 2022 16:19:45 +0200 > From: Claudio Jeker > > After I sent out my ksmn(4) diff to include cpu frequency sensors dlg@ > told me that this is a generic way to find the cpu frequency on modern x86 > cpus (both intel and amd support it). > > So this diff cleans up the CPU

Re: DPTF sensors driver

2022-04-25 Thread Mark Kettenis
> Date: Sun, 24 Apr 2022 20:00:50 -0500 > From: joshua stein > > Any interest in this? > > acpidptfs0 at acpi0: SEN2, sensor "Sensor 2 USB2" > acpidptfs1 at acpi0: SEN4, sensor "Sensor 4 Ambience" > acpidptfs2 at acpi0: SEN1, sensor "Thermistor CPU SOC" > acpidptfs3 at acpi0: SEN3, sensor

Re: rpki-client: TZ=UTC + localtime -> gmtime?

2022-04-22 Thread Mark Kettenis
> Date: Fri, 22 Apr 2022 00:28:21 +0200 > From: Sebastian Benoit > > Claudio Jeker(cje...@diehard.n-r-g.com) on 2022.04.20 15:12:57 +0200: > > On Wed, Apr 20, 2022 at 03:00:15PM +0200, Theo Buehler wrote: > > > Found this when looking at the timezone issue a couple of weeks back and > > > then

Re: Provide memory barriers in refcnt_rele() and refcnt_finalize()

2022-04-21 Thread Mark Kettenis
> Date: Thu, 21 Apr 2022 22:17:31 +0200 > From: Alexander Bluhm > > On Mon, Apr 18, 2022 at 08:33:06AM +, Visa Hankala wrote: > > I think the sanest solution is to add the release and acquire barriers > > in refcnt_rele(). > > Getting memory barriers right is too complicated for developers

Re: xenodm and login_fbtab

2022-04-21 Thread Mark Kettenis
> Date: Thu, 21 Apr 2022 11:49:45 +1000 > From: Jonathan Gray > > On Wed, Apr 20, 2022 at 05:17:58PM -0500, joshua stein wrote: > > xenodm supports login_fbtab(3) to chown devices but it currently > > doesn't do anything because /etc/fbtab does not list /dev/ttyC4. It > > uses the GiveConsole

Re: amdgpio(4) : preserve pin configuration on resume

2022-04-20 Thread Mark Kettenis
> Date: Tue, 19 Apr 2022 22:02:00 -0700 > From: Mike Larkin > > On at least the Asus ROG Zephyrus 14 (2020), the trackpad fails to generate > any interrupts after resume. I tracked this down to amdgpio(4) not generating > interrupts after resume, and started looking at missing soft state. > >

Re: dwctwo(4) fix panic

2022-04-14 Thread Mark Kettenis
> Date: Thu, 14 Apr 2022 20:16:13 +0200 > From: Marcus Glocker > > I did hit this panic when trying to stream audio through > uaudio(4) / dwctwo(4): > > panic: _dmamap_sync: ran off map! > Stopped at panic+0x160:cmp w21, #0x0 > TIDPIDUID PRFLAGS

Re: ure(4): add support for RTL8156B

2022-04-02 Thread Mark Kettenis
> Date: Sat, 2 Apr 2022 15:47:17 +0100 > From: Stuart Henderson > > On 2022/04/02 18:14, Kevin Lo wrote: > > On Fri, Apr 01, 2022 at 06:09:26PM +0100, Stuart Henderson wrote: > > > > > > On 2022/04/01 17:13, Stuart Henderson wrote: > > > > On 2022/04/01 10:26, Gerhard Roth wrote: > > > > > On

Re: Security support status of xnf(4) and xbf(4)

2022-03-28 Thread Mark Kettenis
> Date: Mon, 28 Mar 2022 09:51:22 -0400 > From: Demi Marie Obenour > > On 3/27/22 21:45, Damien Miller wrote: > > On Fri, 25 Mar 2022, Demi Marie Obenour wrote: > > > >> Linux’s netfront and blkfront drivers recently had a security > >> vulnerability (XSA-396) that allowed a malicious backend

Re: riscv64: simplify

2022-03-22 Thread Mark Kettenis
> Date: Tue, 22 Mar 2022 14:25:38 +1100 > From: Jonathan Gray > > On Mon, Mar 21, 2022 at 07:51:25PM +, Miod Vallat wrote: > > The riscv64 was likely copied from an architecture > > providing optimized byte-swapping code (I'd bet arm64), but doesn't have > > any such optimization, and

Re: riscv64: faster setregs()

2022-03-22 Thread Mark Kettenis
> Date: Tue, 22 Mar 2022 13:35:00 +1100 > From: Jonathan Gray > > On Mon, Mar 21, 2022 at 08:00:56PM +, Miod Vallat wrote: > > The current state of the kernel starts userland processes with register > > a0 pointing to the stack, with a comment mentioning this is copied from > > FreeBSD. > >

Re: riscv64: adjust VM_MIN_ADDRESS

2022-03-21 Thread Mark Kettenis
> Date: Mon, 21 Mar 2022 19:56:14 + > From: Miod Vallat > > A long, long time ago (I think it was late 2003), OpenBSD/i386 was > vulnerable to a trusted-yet-NULL pointer dereference in the agp code. > The attack involved using mmap(2) with MAP_FIXED and a hint of zero. > > Shortly

Re: fix multiple iwm/iwx interfaces

2022-03-19 Thread Mark Kettenis
> Date: Sat, 19 Mar 2022 14:18:14 +0100 > From: Stefan Sperling > > On Wed, Mar 16, 2022 at 10:03:36PM +0100, Stefan Sperling wrote: > > On Wed, Mar 16, 2022 at 08:46:01PM +0100, Jeremie Courreges-Anglas wrote: > > > On Mon, Mar 14 2022, Stefan Sperling wrote: > > > > It is currently impossible

OpenBSD/arm64 on Apple M1 systems

2022-03-19 Thread Mark Kettenis
It has taken a while, but I'm pleased to announce that OpenBSD/arm64 works well enough on Apple M1 systems for some wider testing. A major milestone was reached with the release of the Asahi Linux installer: https://asahilinux.org/2022/03/asahi-linux-alpha-release/ This provides an easy way

Re: pcb mutex userland

2022-03-18 Thread Mark Kettenis
> Date: Thu, 17 Mar 2022 15:14:51 +0100 > From: Alexander Bluhm > > On Thu, Mar 17, 2022 at 02:09:39PM +0100, Mark Kettenis wrote: > > I fear the fundamental problem is that we should not expose data > > structures internal to the kernel to userland. What I don't >

Re: pcb mutex userland

2022-03-18 Thread Mark Kettenis
> From: "Ted Unangst" > Date: Fri, 18 Mar 2022 05:04:23 -0400 > > On 2022-03-17, Alexander Bluhm wrote: > > On Thu, Mar 17, 2022 at 01:07:12AM +0100, Mark Kettenis wrote: > > > > Date: Thu, 17 Mar 2022 01:01:46 +0100 (CET) > > > > From: Mark Ke

Re: pcb mutex userland

2022-03-17 Thread Mark Kettenis
> Date: Thu, 17 Mar 2022 13:24:24 +0100 > From: Alexander Bluhm > > On Thu, Mar 17, 2022 at 08:24:10AM +0100, Claudio Jeker wrote: > > On Thu, Mar 17, 2022 at 12:47:15AM +0100, Alexander Bluhm wrote: > > > Hi, > > > > > > My previous atempt to add a mutex to in_pcb.h was reverted as it > > >

Re: fix boot timeout on arm64

2022-03-17 Thread Mark Kettenis
> Date: Thu, 17 Mar 2022 11:02:00 + > From: Miod Vallat > > By default (with no override in /etc/boot.conf), the arm64 boot loader > will attempt to boot the kernel after a 5 second timeout. > > On the RPi 4b here, it will indeed boot the kernel, but after about 80 > seconds. > > The

Re: pcb mutex userland

2022-03-16 Thread Mark Kettenis
> Date: Thu, 17 Mar 2022 01:01:46 +0100 (CET) > From: Mark Kettenis > > > Date: Thu, 17 Mar 2022 00:47:15 +0100 > > From: Alexander Bluhm > > > > Hi, > > > > My previous atempt to add a mutex to in_pcb.h was reverted as it > > broke userlan

Re: pcb mutex userland

2022-03-16 Thread Mark Kettenis
> Date: Thu, 17 Mar 2022 00:47:15 +0100 > From: Alexander Bluhm > > Hi, > > My previous atempt to add a mutex to in_pcb.h was reverted as it > broke userland build. > > Is the correct fix to include sys/mutex.h in every .c file that > includes netinet/in_pcb.h ? I made a release with it. > Or

Re: xlocale/ctypes again

2022-03-15 Thread Mark Kettenis
> Date: Tue, 15 Mar 2022 20:59:07 + > From: Stuart Henderson > > Rather out of my depth but I ran into another instance of the problem > that's come up before with ctypes/C++ headers/xlocale (see also > https://marc.info/?l=openbsd-bugs=157758838031146=2 and >

Re: document membar atomic

2022-03-13 Thread Mark Kettenis
> Date: Sun, 13 Mar 2022 22:59:36 +0100 > From: Alexander Bluhm > > On Sun, Mar 13, 2022 at 10:55:51PM +0100, Mark Kettenis wrote: > > You missed atomic_cas. > > Fixed. ok kettenis@ > Index: s

Re: document membar atomic

2022-03-13 Thread Mark Kettenis
> Date: Sun, 13 Mar 2022 22:43:56 +0100 > From: Alexander Bluhm > > On Thu, Mar 10, 2022 at 10:12:40PM +0100, Mark Kettenis wrote: > > > Date: Thu, 10 Mar 2022 21:53:13 +0100 > > > From: Alexander Bluhm > > > > > > Hi, &

Re: Swap encrypt under memory pressure

2022-03-13 Thread Mark Kettenis
> Date: Sat, 12 Mar 2022 11:35:09 +0100 > From: Martin Pieuchot > > Try to allocate the buffer before doing the encryption, if it fails we > do not spend time doing the encryption. This reduce the pressure when > swapping with low memory. > > ok? Makes sense to me; ok kettenis@ > Index:

Re: Provide memory barriers in refcnt_rele() and refcnt_finalize()

2022-03-13 Thread Mark Kettenis
> Date: Sun, 13 Mar 2022 12:47:13 + > From: Visa Hankala > > This makes the refcnt implementation issue memory barriers when > releasing references, splitting memory activity cleanly into preceding > and succeeding stages around refcnt 1->0 transition. > > I think the while loop could be

Re: pluart(4): fifo support

2022-03-13 Thread Mark Kettenis
> Date: Fri, 11 Mar 2022 07:53:13 +0100 > From: Anton Lindqvist > > On Tue, Mar 08, 2022 at 01:44:47PM +, Visa Hankala wrote: > > On Tue, Mar 08, 2022 at 08:04:36AM +0100, Anton Lindqvist wrote: > > > On Mon, Mar 07, 2022 at 07:36:35AM +, Visa Hankala wrote: > > > > I still think that

Re: atomic read write

2022-03-11 Thread Mark Kettenis
> Date: Thu, 10 Mar 2022 23:09:59 + > From: Laurence Tratt > > On Fri, Mar 11, 2022 at 09:00:57AM +1000, David Gwynne wrote: > > Hello David, > > >> Unfortunately this transformation almost certainly isn't safe: for > >> example, the non-atomic load can return values that were never

Re: riscv64: ld.lld is too picky on ABI mismatch

2022-03-10 Thread Mark Kettenis
> From: Jeremie Courreges-Anglas > Cc: Mark Kettenis , Patrick Wildt > Date: Thu, 10 Mar 2022 02:03:10 +0100 > Content-Type: text/plain > > On Mon, Oct 25 2021, Jeremie Courreges-Anglas wrote: > > On Mon, Oct 25 2021, Patrick Wildt wrote: > >> Am Mon, Oct 25,

Re: document membar atomic

2022-03-10 Thread Mark Kettenis
> Date: Thu, 10 Mar 2022 21:53:13 +0100 > From: Alexander Bluhm > > Hi, > > claudio@ mentioned that documentation for membar_enter_after_atomic > and membar_exit_before_atomic is missing. > > ok? I think this is fine, although it doesn't actually define what an "atomic operation" is in this

Re: atomic read write

2022-03-10 Thread Mark Kettenis
> Date: Thu, 10 Mar 2022 21:43:02 +0100 > From: Alexander Bluhm > > On Thu, Mar 10, 2022 at 07:47:16PM +0100, Mark Kettenis wrote: > > > In general, atomic_* functions have not provided implicit memory > > > barriers on OpenBSD. > > > > > > I am n

Re: atomic read write

2022-03-10 Thread Mark Kettenis
> Date: Thu, 10 Mar 2022 09:05:54 + > From: Visa Hankala > > On Wed, Mar 09, 2022 at 08:45:35PM +0100, Alexander Bluhm wrote: > > On Tue, Mar 08, 2022 at 04:55:56PM +0100, Alexander Bluhm wrote: > > > Once we had the discussion where we need the READ_ONCE() macro. As > > > modern C compiler

Re: More pchgpio(4)

2022-03-07 Thread Mark Kettenis
> From: James Hastings > Date: Sun, 27 Feb 2022 05:45:48 -0500 (EST) > > On Sun, Oct 10, 2021 at 11:42:31PM +0200, Mark Kettenis wrote: > > > Date: Sat, 9 Oct 2021 22:27:52 +0200 (CEST) > > > From: Mark Kettenis > > > > > > > Date: Sat,

Re: Fix deadlock in cad_down()

2022-03-02 Thread Mark Kettenis
> Date: Wed, 2 Mar 2022 10:53:54 + > From: Visa Hankala > > Holding NET_LOCK() while invoking a taskq barrier can result in > a deadlock because the lock can prevent the taskq from making progress. > Avoid this problem in cad_down() by serializing the driver's ioctl > handler with an rwlock

Re: More pchgpio(4)

2022-02-27 Thread Mark Kettenis
> From: Dave Voutila > Date: Sun, 27 Feb 2022 17:57:17 -0500 > > Mark Kettenis writes: > > >> From: Dave Voutila > >> Date: Sun, 27 Feb 2022 07:41:47 -0500 > >> > >> James Hastings writes: > >> > >> > On Sun, Oct 10, 2

Re: pluart(4): fifo support

2022-02-27 Thread Mark Kettenis
> Date: Sun, 27 Feb 2022 16:01:25 +0100 > From: Anton Lindqvist > > On Sun, Feb 27, 2022 at 11:08:14AM +0100, Mark Kettenis wrote: > > > Date: Sun, 27 Feb 2022 09:56:38 +0100 > > > From: Anton Lindqvist > > > > > > On Sun, Feb 27, 2022 at 06:1

Re: More pchgpio(4)

2022-02-27 Thread Mark Kettenis
> From: Dave Voutila > Date: Sun, 27 Feb 2022 07:41:47 -0500 > > James Hastings writes: > > > On Sun, Oct 10, 2021 at 11:42:31PM +0200, Mark Kettenis wrote: > >> > Date: Sat, 9 Oct 2021 22:27:52 +0200 (CEST) > >> > From: Mark Kettenis > >>

Re: pluart(4): fifo support

2022-02-27 Thread Mark Kettenis
> Date: Sun, 27 Feb 2022 09:56:38 +0100 > From: Anton Lindqvist > > On Sun, Feb 27, 2022 at 06:19:02AM +, Visa Hankala wrote: > > On Sat, Feb 26, 2022 at 08:40:25AM +0100, Anton Lindqvist wrote: > > > Hi, > > > This enables fifo support in pluart(4). While here, I changed the > > >

Re: Fix kernel stack alignment on riscv64

2022-02-23 Thread Mark Kettenis
> Date: Wed, 23 Feb 2022 14:18:40 + > From: Visa Hankala > > So far this patch has worked fine on my test system. Cool. I'm a little bit bothered by that 0x10 in the calculation, and maybe that can go now. But that is cleanup for later. Making the allocation explicit is progress. ok

Re: Fix kernel stack alignment on riscv64

2022-02-22 Thread Mark Kettenis
> Date: Tue, 22 Feb 2022 17:45:26 + > From: Visa Hankala > > On Tue, Feb 22, 2022 at 06:13:54PM +0100, Mark Kettenis wrote: > > > Date: Tue, 22 Feb 2022 16:59:24 + > > > From: Visa Hankala > > > > > > On Tue, Feb 22, 2022 at 05:31:31PM

Re: Fix kernel stack alignment on riscv64

2022-02-22 Thread Mark Kettenis
> Date: Tue, 22 Feb 2022 16:59:24 + > From: Visa Hankala > > On Tue, Feb 22, 2022 at 05:31:31PM +0100, Mark Kettenis wrote: > > > Date: Tue, 22 Feb 2022 15:58:31 + > > > From: Visa Hankala > > > > > > The standard RISC-V calling conventio

Re: Fix kernel stack alignment on riscv64

2022-02-22 Thread Mark Kettenis
> Date: Tue, 22 Feb 2022 15:58:31 + > From: Visa Hankala > > The standard RISC-V calling convention says that the stack pointer > should be 16-byte aligned. > > The patch below corrects the alignment of the kernel stack in context > switching and exception handling. > > OK? Is there a

Re: Improve ddb's stack trace printing on riscv64

2022-02-21 Thread Mark Kettenis
> Date: Mon, 21 Feb 2022 17:34:14 + > From: Visa Hankala > > On riscv64, ddb's stack unwinder performs poorly. The main problem is > that the exception handlers use a frame structure (trapframe) that > differs from the typical call frame. > > The following patch does several adjustments,

Re: Zero frame pointer in cpu_fork() on riscv64

2022-02-21 Thread Mark Kettenis
> Date: Mon, 21 Feb 2022 17:37:22 + > From: Visa Hankala > > When setting up the stack for a (kernel) thread on riscv64, zero the > frame pointer in switchframe so that the frame chain terminates cleanly. > At the moment, the unwinding of kernel thread stacks stops to "bad frame > pointer"

Re: Use installboot(8) in armv7 install.md

2022-02-18 Thread Mark Kettenis
> Date: Fri, 18 Feb 2022 14:20:03 + > From: Visa Hankala > > Use installboot(8) in armv7 install.md. > > OK? ok kettenis@ > Index: distrib/armv7/ramdisk/install.md > === > RCS file: src/distrib/armv7/ramdisk/install.md,v >

Re: Driver for PolarFire SoC MSS GPIO controller

2022-02-17 Thread Mark Kettenis
> From: "Theo de Raadt" > Date: Thu, 17 Feb 2022 09:23:14 -0700 > > I am terrified by existance of the userland gpio interface, basically > the concept that users should be able to change some pin is more than > suspect, it is crazy. It completely violates the Unix principle of > mapping

Re: Driver for PolarFire SoC MSS GPIO controller

2022-02-17 Thread Mark Kettenis
> Date: Thu, 17 Feb 2022 16:16:30 + > From: Visa Hankala > > On Thu, Feb 17, 2022 at 03:38:05PM +0100, Mark Kettenis wrote: > > > Date: Thu, 17 Feb 2022 13:52:39 + > > > From: Visa Hankala > > > > > > This patch adds a

Re: Driver for PolarFire SoC MSS GPIO controller

2022-02-17 Thread Mark Kettenis
> Date: Thu, 17 Feb 2022 13:52:39 + > From: Visa Hankala > > This patch adds a driver for the PolarFire SoC MSS GPIO controller. > > The driver provides a gpio(4) interface, so the patch also enables > gpioctl(8) on riscv64. The MAKEDEV script already creates gpio nodes. > > OK? So on

Re: Driver for PolarFire SoC MSS I2C controller

2022-02-15 Thread Mark Kettenis
> Date: Mon, 14 Feb 2022 17:50:55 + > From: Visa Hankala > > This patch adds a basic driver for the PolarFire SoC MSS I2C controller. > > OK? Small not below, Otherwise ok kettenis@ > Index: share/man/man4/iic.4 > === > RCS

Re: mvdog(4): add support for armada-380-wdg

2022-02-15 Thread Mark Kettenis
> Date: Mon, 14 Feb 2022 00:04:50 +0100 > From: Tobias Heider > > On Sun, Feb 13, 2022 at 03:47:28PM +0100, Mark Kettenis wrote: > > > > I'm not sure this code should share a driver with the A3700 code. The > > hardware doesn't seem to share any commonalities e

Re: testers needed: MSFT Surface thermal zones

2022-02-15 Thread Mark Kettenis
> From: Dave Voutila > Date: Tue, 15 Feb 2022 09:11:54 -0500 > Content-Type: text/plain > > My Microsoft Surface Go 3 is full of lovely oddities where Microsoft > decided to ignore using standard ACPI paradigms. One is the way thermal > zones and trip points are exposed: acpitz(4) can read

Re: Power-up cc --print-file-name for .so names

2022-02-14 Thread Mark Kettenis
> From: "Theo de Raadt" > Date: Mon, 14 Feb 2022 00:34:53 -0700 > > > The solution would be to add symlinks like all the other OSes do. But > > Theo doesn't like that. > > No, the problem is you add symbolic links, how long before software > ecosystems in ports choose the short names in

Re: Power-up cc --print-file-name for .so names

2022-02-14 Thread Mark Kettenis
> From: Philip Guenther > Date: Sun, 13 Feb 2022 23:29:06 -0800 > > On Sun, Feb 13, 2022 at 11:18 PM Mark Kettenis > wrote: > > > From: Greg Steuck > > Date: Sun, 13 Feb 2022 22:37:13 -0800 > > > > To give a sense of the kind of change re

Re: Power-up cc --print-file-name for .so names

2022-02-13 Thread Mark Kettenis
> From: Greg Steuck > Date: Sun, 13 Feb 2022 22:37:13 -0800 > > To give a sense of the kind of change required to get the feature I > want, see the patch at the end. The change in DriverUtils.cpp is just to > show that the same function is hiding in there. > > If this looks like a good

Re: mvpcie(4): fix panic if "reset-gpios" is not available

2022-02-13 Thread Mark Kettenis
> Date: Mon, 14 Feb 2022 01:41:45 +1100 > From: Jonathan Gray > > On Mon, Feb 14, 2022 at 01:31:57AM +1100, Jonathan Gray wrote: > > On Sun, Feb 13, 2022 at 03:17:27PM +0100, Theo Buehler wrote: > > > On Sun, Feb 13, 2022 at 02:30:21PM +0100, Tobias Heider wrote: > > > > OF_getproplen() will

Re: mvpcie(4): fix panic if "reset-gpios" is not available

2022-02-13 Thread Mark Kettenis
> Date: Mon, 14 Feb 2022 01:31:57 +1100 > From: Jonathan Gray > > On Sun, Feb 13, 2022 at 03:17:27PM +0100, Theo Buehler wrote: > > On Sun, Feb 13, 2022 at 02:30:21PM +0100, Tobias Heider wrote: > > > OF_getproplen() will return -1 if "reset-gpios" is not found which > > > currently causes a

Re: mvdog(4): add support for armada-380-wdg

2022-02-13 Thread Mark Kettenis
> Date: Sun, 13 Feb 2022 14:56:11 +0100 > From: Patrick Wildt > > Am Sun, Feb 13, 2022 at 02:22:53PM +0100 schrieb Tobias Heider: > > Hey, > > > > I'm trying to get the Turris Omnia running and one thing missing > > is a driver for the armada-380-wdg. We already have a similar driver > >

Re: mvpcie(4): fix panic if "reset-gpios" is not available

2022-02-13 Thread Mark Kettenis
> Date: Sun, 13 Feb 2022 14:30:21 +0100 > From: Tobias Heider > > OF_getproplen() will return -1 if "reset-gpios" is not found which > currently causes a panic: > > panic: malloc: allocation too large, type = 2, size = 4294967295 > > Below is a fix. > > ok? ok kettenis@ > Index: mvpcie.c >

Re: unlock mmap(2) for anonymous mappings

2022-02-10 Thread Mark Kettenis
> Date: Thu, 10 Feb 2022 10:19:20 + > From: Klemens Nanni > > On Mon, Feb 07, 2022 at 02:12:52PM +0100, Mark Kettenis wrote: > > > Date: Mon, 7 Feb 2022 12:11:42 + > > > From: Klemens Nanni > > > > > > On Mon, Feb 07, 2022 at 12:4

Re: add Surface GO3 hid to acpibat(4)

2022-02-09 Thread Mark Kettenis
> From: Dave Voutila > Date: Wed, 09 Feb 2022 10:28:48 -0500 > > I believe I got this from mlarkin@. Realized I've been carrying it in my > local tree. > > Microsoft decided to do all sorts of atypical things with the Go3 in > ACPI. One is the battery. > > ok? Funny how even Microsoft manages

Re: Embed klist head in acpi_softc

2022-02-09 Thread Mark Kettenis
> Date: Wed, 9 Feb 2022 15:24:19 + > From: Visa Hankala > > This embeds klist head in struct acpi_softc so that explicit malloc is > not needed. The head is initialized as part of acpi_softc allocation. > > OK? ok kettenis@ > Index: dev/acpi/acpi.c >

Re: fix active scan on iwm and iwx

2022-02-08 Thread Mark Kettenis
> Date: Tue, 8 Feb 2022 14:21:52 +0100 > From: Stefan Sperling > > On Tue, Jan 25, 2022 at 11:22:45AM +0100, Mark Kettenis wrote: > > > The KASSERT triggers but for the wrong reason: We don't have outstanding > > > tasks, we have a bad reference counter. Onl

Re: Increase armv7 ramdisk size

2022-02-07 Thread Mark Kettenis
> Date: Mon, 7 Feb 2022 12:49:40 + > From: Visa Hankala > > armv7 ramdisk is very low on space. Building the ramdisk succeeds, > but the installer prints errors: > > uid 0 on /: file system full > > /: write failed, file system is full > sed: stdout: No space left on device > > OK to

  1   2   3   4   5   6   7   8   9   10   >