Re: CVS commit: src/sys/netinet6

2017-12-29 Thread Roy Marples

On 27/12/2017 09:08, Ryota Ozaki wrote:

There are other paths. nd6_dad_stop is called from in6_purgeaddr,
in6_if_link_down and nd6_ioctl. nd6_dad_duplicated is called nd6_dad_timer,
nd6_dad_ns_input and nd6_dad_na_input.


I added the below assertion in my local repository and found
arp_dad_stoptimer is the same situation as nd6_dad_stoptimer :-/


Probably because I based the arp code on the nd6 code :)
As it was ancient, I assumed it Just Worked.

Roy


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

2017-12-29 Thread Manuel Bouyer
On Mon, Dec 11, 2017 at 12:22:56AM +0100, Jaromír Dole?ek wrote:
[in response to acpi_intr_establish() introduction]
> Can we have acpi_intr_establish() accept the xname? It's very useful to
> have the driver name registered for "intrctl list".

The attached patch does it.
AcpiOsInstallInterruptHandler(), part of ACPICA API, doesn't allow passing
the xname. I extend the API with AcpiOsInstallInterruptHandler_xname()
for this purpose, and change acpi_md_OsInstallInterruptHandler() to
accept and use the xname (ia64 doens't use it).
The xname was hardcoded to "acpi SCI" in the
x86 acpi_md_OsInstallInterruptHandler(), so I make
AcpiOsInstallInterruptHandler() call
AcpiOsInstallInterruptHandler_xname with xname = "acpi SCI".

On my laptop I had before the change:
>intrctl list
interrupt idCPU0  CPU1  CPU2  CPU3  device name(s)
ioapic0 pin 9  29928*0 0 0  acpi SCI
msi0 vec 0  3388*0 0 0  xhci0
ioapic0 pin 16 0*0 0 0  unknown, ahcisata0, ichsmb0
ioapic0 pin 17 0*0 0 0  unknown
ioapic0 pin 51 0*0 0 0  acpi SCI
msi1 vec 0   394*0 0 0  iwm0
msix2 vec 00*0 0 0  nvme0 adminq
msix2 vec 1 1652*0 0 0  nvme0 ioq1
msix2 vec 20  1915*0 0  nvme0 ioq2
msix2 vec 30 0   104*0  nvme0 ioq3
msix2 vec 40 0 0   426* nvme0 ioq4
msi3 vec 0 0*0 0 0  hdaudio0
ioapic0 pin 1  0*0 0 0  unknown
ioapic0 pin 12 0*0 0 0  unknown

and after:
>intrctl list
interrupt id   CPU0  CPU1  CPU2  CPU3  device name(s)
ioapic0 pin 9  7130*0 0 0  acpi SCI
msi0 vec 0  920*0 0 0  xhci0
ioapic0 pin 160*0 0 0  unknown, ahcisata0, ichsmb0
ioapic0 pin 170*0 0 0  unknown
ioapic0 pin 510*0 0 0  ihidev0
msi1 vec 0  617*0 0 0  iwm0
msix2 vec 0   0*0 0 0  nvme0 adminq
msix2 vec 12531*0 0 0  nvme0 ioq1
msix2 vec 2   0   911*0 0  nvme0 ioq2
msix2 vec 3   0 095*0  nvme0 ioq3
msix2 vec 4   0 0 0   407* nvme0 ioq4
msi3 vec 00*0 0 0  hdaudio0
ioapic0 pin 1 0*0 0 0  unknown
ioapic0 pin 120*0 0 0  unknown

any objection to this change ?

-- 
Manuel Bouyer 
 NetBSD: 26 ans d'experience feront toujours la difference
--
Index: sys/arch/ia64/acpi/acpi_machdep.c
===
RCS file: /cvsroot/src/sys/arch/ia64/acpi/acpi_machdep.c,v
retrieving revision 1.6
diff -u -p -u -r1.6 acpi_machdep.c
--- sys/arch/ia64/acpi/acpi_machdep.c   23 Sep 2012 00:31:05 -  1.6
+++ sys/arch/ia64/acpi/acpi_machdep.c   28 Dec 2017 14:32:18 -
@@ -77,7 +77,8 @@ acpi_md_OsGetRootPointer(void)
 ACPI_STATUS
 acpi_md_OsInstallInterruptHandler(UINT32 InterruptNumber,
  ACPI_OSD_HANDLER ServiceRoutine,
- void *Context, void **cookiep)
+ void *Context, void **cookiep,
+ const char *xname)
 {
static int isa_irq_to_vector_map[16] = {
/* i8259 IRQ translation, first 16 entries */
Index: sys/arch/ia64/include/acpi_machdep.h
===
RCS file: /cvsroot/src/sys/arch/ia64/include/acpi_machdep.h,v
retrieving revision 1.6
diff -u -p -u -r1.6 acpi_machdep.h
--- sys/arch/ia64/include/acpi_machdep.h23 Sep 2012 00:31:05 -  
1.6
+++ sys/arch/ia64/include/acpi_machdep.h28 Dec 2017 14:32:18 -
@@ -12,7 +12,7 @@ ACPI_PHYSICAL_ADDRESS acpi_md_OsGetRootP
 #define acpi_md_OsOut32(x, v)  outl((x), (v))
 
 ACPI_STATUS acpi_md_OsInstallInterruptHandler(UINT32, ACPI_OSD_HANDLER,
- void *, void **);
+ void *, void **, const char *);
 void acpi_md_OsRemoveInterruptHandler(void *);
 
 ACPI_STATUS acpi_md_OsMapMemory(ACPI_PHYSICAL_ADDRESS, UINT32, void **);
Index: sys/arch/x86/acpi/acpi_machdep.c
===
RCS file: /cvsroot/src/sys/arch/x86/acpi/acpi_machdep.c,v
retrieving revision 1.18
diff -u -p -u -r1.18 acpi_machdep.c
--- sys/arch/x86/acpi/acpi_machdep.c14 Feb 2017 13:29:09 -  1.18
+++ sys/arch/x86/acpi/acpi_machdep.c28 Dec 2017 14:32:19 -
@@ -147,7 +147,8 @@ acpi_md_findoverride(ACPI_SUBTABLE_HEADE
 
 ACPI_STATUS
 acpi_md_OsInstallInterruptHandler(uint32_t InterruptNumber,
-ACPI_OSD_HANDLER ServiceRoutine, void *Context, void **cookiep)
+ACPI_OSD_HANDLER ServiceRoutine, void *Context, void **cookiep,
+const char *xname)
 {
void *ih;
struct pic *pic;
@@ -242,7 +243,7 @@ acpi_md_OsInstallInterruptHandler(uint32
 * XXX probably, IPL_BIO is enough.
 */
ih