Re: Implement Event()/Signal()/Wait() AML operations

2019-01-10 Thread Mark Kettenis
> From: "Theo de Raadt" > Date: Thu, 10 Jan 2019 10:23:27 -0700 > > Ted Unangst wrote: > > > Ted Unangst wrote: > > > > > > Does 0x come from ACPI? Can we give that a name? > > > > > > I thought sleeping for one tick is kinda weird, but I see what > > > it's doing with the acpi_dotask loo

Re: Implement Event()/Signal()/Wait() AML operations

2019-01-10 Thread Mark Kettenis
> From: "Ted Unangst" > Date: Wed, 09 Jan 2019 19:01:09 -0500 > > Mark Kettenis wrote: > > Index: dev/acpi/dsdt.c > > === > > RCS file: /cvs/src/sys/dev/acpi/dsdt.c,v > > retrieving revision 1.243 > > diff -u -p -r1.243 dsdt.c > > --

Re: Implement Event()/Signal()/Wait() AML operations

2019-01-10 Thread Theo de Raadt
Ted Unangst wrote: > Ted Unangst wrote: > > > > Does 0x come from ACPI? Can we give that a name? > > > > I thought sleeping for one tick is kinda weird, but I see what it's doing > > with > > the acpi_dotask loop. This feels precarious, but whatever. > > So upon further thought, this is p

Re: Implement Event()/Signal()/Wait() AML operations

2019-01-09 Thread Ted Unangst
Ted Unangst wrote: > > Does 0x come from ACPI? Can we give that a name? > > I thought sleeping for one tick is kinda weird, but I see what it's doing with > the acpi_dotask loop. This feels precarious, but whatever. So upon further thought, this is pretty bad. If the new task also calls sem

Re: Implement Event()/Signal()/Wait() AML operations

2019-01-09 Thread Ted Unangst
Mark Kettenis wrote: > Index: dev/acpi/dsdt.c > === > RCS file: /cvs/src/sys/dev/acpi/dsdt.c,v > retrieving revision 1.243 > diff -u -p -r1.243 dsdt.c > --- dev/acpi/dsdt.c 19 Aug 2018 08:23:47 - 1.243 > +++ dev/acpi/dsdt.c

Re: Implement Event()/Signal()/Wait() AML operations

2019-01-08 Thread Mark Kettenis
> Date: Tue, 8 Jan 2019 18:02:27 +0100 (CET) > From: Mark Kettenis > > > Date: Tue, 8 Jan 2019 17:46:37 +0100 (CET) > > From: Mark Kettenis > > > > I have a Shuttle NC02U "nano" PC that ends up with the the acpi0 > > kernel thread blocked on the "acpievt" wait channel. I tracked this > > down

Re: Implement Event()/Signal()/Wait() AML operations

2019-01-08 Thread Mark Kettenis
> Date: Tue, 8 Jan 2019 17:46:37 +0100 (CET) > From: Mark Kettenis > > I have a Shuttle NC02U "nano" PC that ends up with the the acpi0 > kernel thread blocked on the "acpievt" wait channel. I tracked this > down to an incorrect implementation of the Signal() and Wait() > operations. > > This c

Implement Event()/Signal()/Wait() AML operations

2019-01-08 Thread Mark Kettenis
I have a Shuttle NC02U "nano" PC that ends up with the the acpi0 kernel thread blocked on the "acpievt" wait channel. I tracked this down to an incorrect implementation of the Signal() and Wait() operations. This changes the implementation to be a proper semaphore. It also releases the acpi inte