Re: CVS commit: src/sys/arch/arm/sa11x0

2021-11-08 Thread Rin Okuyama

On 2021/11/09 8:57, Rin Okuyama wrote:

Module Name:src
Committed By:   rin
Date:   Mon Nov  8 23:57:23 UTC 2021

Modified Files:
src/sys/arch/arm/sa11x0: sa11x0_irq.S

Log Message:
irq_entry(): Do not clobber fp (= r11), in order not to confuse DDB.


(snip)


XXX
Rewrite this function by C. There seems no particular reason to
use assembler, and no major performance regression is expected.


No reason to use assembler, if converted to use arm/arm32/irq_dispatch.S.

Thanks,
rin


CVS commit: src/sys/arch/arm/sa11x0

2021-11-08 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Nov  8 23:57:23 UTC 2021

Modified Files:
src/sys/arch/arm/sa11x0: sa11x0_irq.S

Log Message:
irq_entry(): Do not clobber fp (= r11), in order not to confuse DDB.

Use r10 instead; no need to preserve saipic_base, previous content of
r10, throughout this function, except for the case of INTR_DEBUG.

For INTR_DEBUG, load saipic_base to scratch register every time it
becomes necessary. This is no performance penalty compared with
subsequent printf() calls.

XXX
Rewrite this function by C. There seems no particular reason to
use assembler, and no major performance regression is expected.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/arm/sa11x0/sa11x0_irq.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/arm/sa11x0/sa11x0_irq.S
diff -u src/sys/arch/arm/sa11x0/sa11x0_irq.S:1.20 src/sys/arch/arm/sa11x0/sa11x0_irq.S:1.21
--- src/sys/arch/arm/sa11x0/sa11x0_irq.S:1.20	Sat Nov 21 19:59:10 2020
+++ src/sys/arch/arm/sa11x0/sa11x0_irq.S	Mon Nov  8 23:57:23 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: sa11x0_irq.S,v 1.20 2020/11/21 19:59:10 skrll Exp $	*/
+/*	$NetBSD: sa11x0_irq.S,v 1.21 2021/11/08 23:57:23 rin Exp $	*/
 
 /*
  * Copyright (c) 1998 Mark Brinicombe.
@@ -78,8 +78,7 @@ AST_ALIGNMENT_FAULT_LOCALS
  *  r7	- pspr mode
  *  r8  - Current IRQ requests.
  *  r9  - Used to count through possible IRQ bits.
- *  r10 - Base address of SAIP
- *  r11 - Pointer to handler pointer list
+ *  r10 - Pointer to handler pointer list
  */
 
 ASENTRY_NP(irq_entry)
@@ -90,13 +89,14 @@ ASENTRY_NP(irq_entry)
 
 	/* Load r8 with the SAIPIC interrupt requests */
 
-	ldr	r10, _C_LABEL(saipic_base)
-	ldr	r8, [r10, #(SAIPIC_IP)]	/* Load IRQ pending register */
+	ldr	r8, _C_LABEL(saipic_base)
+	ldr	r8, [r8, #(SAIPIC_IP)]	/* Load IRQ pending register */
 
 #ifdef INTR_DEBUG
-	ldr	r2, [r10, #(SAIPIC_MR)]
 	adr	r0, Ldbg_str
 	mov	r1, r8
+	ldr	r2, _C_LABEL(saipic_base)
+	ldr	r2, [r2, #(SAIPIC_MR)]
 	bl	_C_LABEL(printf)
 #endif
 	/*
@@ -124,17 +124,17 @@ ASENTRY_NP(irq_entry)
 	 */
 
 	mov	r9, #(NIPL - 1)
-	ldr	r11, Lspl_masks
+	ldr	r10, Lspl_masks
 
 Lfind_highest_ipl:
-	ldr	r2, [r11, r9, lsl #2]
+	ldr	r2, [r10, r9, lsl #2]
 	tst	r8, r2
 	subeq	r9, r9, #1
 	beq	Lfind_highest_ipl
 
 	/* r9 = SPL level of highest priority interrupt */
 	add	r9, r9, #1
-	ldr	r2, [r11, r9, lsl #2]
+	ldr	r2, [r10, r9, lsl #2]
 
 	ldr	r1, [r4, #CI_CPL]
 	str	r9, [r4, #CI_CPL]
@@ -155,7 +155,7 @@ Lfind_highest_ipl:
 	bic	r0, r0, #I32_bit
 	msr	cpsr_all, r0
 
-	ldr	r11, Lirqhandlers
+	ldr	r10, Lirqhandlers
 mov	r9, #0x0001
 
 irqloop:
@@ -163,7 +163,7 @@ irqloop:
 	tst	r8, r9			/* Is a bit set ? */
 	beq	nextirq			/* No ? try next bit */
 
-	ldr	r6, [r11]		/* Get address of first handler structure */
+	ldr	r6, [r10]		/* Get address of first handler structure */
 
 	teq	r6, #0x		/* Do we have a handler */
 	moveq	r0, r8			/* IRQ requests as arg 0 */
@@ -219,7 +219,7 @@ irqchainloop:
 
 irqdone:
 nextirq:
-	add	r11, r11, #0x0004	/* update pointer to handlers */
+	add	r10, r10, #0x0004	/* update pointer to handlers */
 	mov	r9, r9, lsl #1		/* move on to next bit */
 	teq	r9, #(1 << 31)		/* done the last bit ? */
 	bne	irqloop			/* no - loop back. */
@@ -238,7 +238,8 @@ nextirq:
 #ifdef INTR_DEBUG
 	adr	r0, Ldbg_str
 	mov	r1, #3
-	ldr	r2, [r10, #(SAIPIC_MR)]
+	ldr	r2, _C_LABEL(saipic_base)
+	ldr	r2, [r2, #(SAIPIC_MR)]
 	bl	_C_LABEL(printf)
 #endif
 



CVS commit: src/sys/arch/arm/sa11x0

2021-11-08 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Nov  8 23:57:23 UTC 2021

Modified Files:
src/sys/arch/arm/sa11x0: sa11x0_irq.S

Log Message:
irq_entry(): Do not clobber fp (= r11), in order not to confuse DDB.

Use r10 instead; no need to preserve saipic_base, previous content of
r10, throughout this function, except for the case of INTR_DEBUG.

For INTR_DEBUG, load saipic_base to scratch register every time it
becomes necessary. This is no performance penalty compared with
subsequent printf() calls.

XXX
Rewrite this function by C. There seems no particular reason to
use assembler, and no major performance regression is expected.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/arm/sa11x0/sa11x0_irq.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

2021-11-08 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Nov  8 23:35:43 UTC 2021

Modified Files:
src/sys/arch/acorn32/conf: Makefile.acorn32
src/sys/arch/hpcarm/conf: Makefile.hpcarm

Log Message:
For DDB, generate APCS stack frame so that db_stack_trace_print() works.

XXX
Copy-paste from arm/conf/Makefile.arm.
Convert to ${MACHINE}/conf/Makefile.${MACHINE}.inc.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/acorn32/conf/Makefile.acorn32
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/hpcarm/conf/Makefile.hpcarm

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/acorn32/conf/Makefile.acorn32
diff -u src/sys/arch/acorn32/conf/Makefile.acorn32:1.24 src/sys/arch/acorn32/conf/Makefile.acorn32:1.25
--- src/sys/arch/acorn32/conf/Makefile.acorn32:1.24	Sat Sep 22 12:24:01 2018
+++ src/sys/arch/acorn32/conf/Makefile.acorn32	Mon Nov  8 23:35:43 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.acorn32,v 1.24 2018/09/22 12:24:01 rin Exp $
+#	$NetBSD: Makefile.acorn32,v 1.25 2021/11/08 23:35:43 rin Exp $
 
 # Makefile for NetBSD
 #
@@ -36,6 +36,11 @@ CPPFLAGS+=	-Darm32
 CWARNFLAGS+=	-Wcomment
 AFLAGS+=	-x assembler-with-cpp
 
+OPT_DDB=	%DDB%
+.if !empty(OPT_DDB) && ${HAVE_GCC:U0} > 0
+CFLAGS+=	-mapcs-frame
+.endif
+
 ##
 ## (3) libkern and compat
 ##

Index: src/sys/arch/hpcarm/conf/Makefile.hpcarm
diff -u src/sys/arch/hpcarm/conf/Makefile.hpcarm:1.19 src/sys/arch/hpcarm/conf/Makefile.hpcarm:1.20
--- src/sys/arch/hpcarm/conf/Makefile.hpcarm:1.19	Sat Sep 22 12:24:02 2018
+++ src/sys/arch/hpcarm/conf/Makefile.hpcarm	Mon Nov  8 23:35:43 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.hpcarm,v 1.19 2018/09/22 12:24:02 rin Exp $
+#	$NetBSD: Makefile.hpcarm,v 1.20 2021/11/08 23:35:43 rin Exp $
 
 # Makefile for NetBSD
 #
@@ -36,6 +36,11 @@ CPPFLAGS+=	-Dhpcarm -Darm32
 CWARNFLAGS+=	-Wcomment
 AFLAGS+=	-x assembler-with-cpp
 
+OPT_DDB=	%DDB%
+.if !empty(OPT_DDB) && ${HAVE_GCC:U0} > 0
+CFLAGS+=	-mapcs-frame
+.endif
+
 ##
 ## (3) libkern and compat
 ##



CVS commit: src/sys/arch

2021-11-08 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Nov  8 23:35:43 UTC 2021

Modified Files:
src/sys/arch/acorn32/conf: Makefile.acorn32
src/sys/arch/hpcarm/conf: Makefile.hpcarm

Log Message:
For DDB, generate APCS stack frame so that db_stack_trace_print() works.

XXX
Copy-paste from arm/conf/Makefile.arm.
Convert to ${MACHINE}/conf/Makefile.${MACHINE}.inc.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/acorn32/conf/Makefile.acorn32
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/hpcarm/conf/Makefile.hpcarm

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



CVS commit: src/sys/arch/arm/sunxi

2021-11-08 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Mon Nov  8 17:58:27 UTC 2021

Modified Files:
src/sys/arch/arm/sunxi: sun50i_h6_gpio.c

Log Message:
This H6 pin (PL9) function is called s_cir_rx, not s_cir.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/sunxi/sun50i_h6_gpio.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/arm/sunxi/sun50i_h6_gpio.c
diff -u src/sys/arch/arm/sunxi/sun50i_h6_gpio.c:1.2 src/sys/arch/arm/sunxi/sun50i_h6_gpio.c:1.3
--- src/sys/arch/arm/sunxi/sun50i_h6_gpio.c:1.2	Tue Apr  3 16:01:25 2018
+++ src/sys/arch/arm/sunxi/sun50i_h6_gpio.c	Mon Nov  8 17:58:27 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: sun50i_h6_gpio.c,v 1.2 2018/04/03 16:01:25 bouyer Exp $ */
+/* $NetBSD: sun50i_h6_gpio.c,v 1.3 2021/11/08 17:58:27 jakllsch Exp $ */
 
 /*-
  * Copyright (c) 2016 Jared McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sun50i_h6_gpio.c,v 1.2 2018/04/03 16:01:25 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sun50i_h6_gpio.c,v 1.3 2021/11/08 17:58:27 jakllsch Exp $");
 
 #include 
 #include 
@@ -130,7 +130,7 @@ static const struct sunxi_gpio_pins h6_r
 	{ "PL6",   0, 6,  { "gpio_in", "gpio_out", "s_jtag", NULL, NULL, NULL, "irq" }, 6, 6 },
 	{ "PL7",   0, 7,  { "gpio_in", "gpio_out", "s_jtag", NULL, NULL, NULL, "irq" }, 6, 7 },
 	{ "PL8",   0, 8,  { "gpio_in", "gpio_out", "s_i2s", NULL, NULL, NULL, "irq" }, 6, 8 },
-	{ "PL9",   0, 9,  { "gpio_in", "gpio_out", "s_cir", NULL, NULL, NULL, "irq" }, 6, 9 },
+	{ "PL9",   0, 9,  { "gpio_in", "gpio_out", "s_cir_rx", NULL, NULL, NULL, "irq" }, 6, 9 },
 	{ "PL10",  0, 10, { "gpio_in", "gpio_out", "s_spdif", NULL, NULL, NULL, "irq" }, 6, 10 },
 
 	{ "PM0",   1, 0,  { "gpio_in", "gpio_out", NULL, NULL, NULL, NULL, "irq" }, 6, 0 },



CVS commit: src/sys/arch/arm/sunxi

2021-11-08 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Mon Nov  8 17:58:27 UTC 2021

Modified Files:
src/sys/arch/arm/sunxi: sun50i_h6_gpio.c

Log Message:
This H6 pin (PL9) function is called s_cir_rx, not s_cir.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/sunxi/sun50i_h6_gpio.c

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



CVS commit: src/sys/net

2021-11-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Nov  8 16:50:06 UTC 2021

Modified Files:
src/sys/net: if_ethersubr.c

Log Message:
Don't classify dropped packets that we don't understand as errors, for
example etype 0x88CA (TIPC (Transparent Inter Process Communication,)
or 0x893A (IEEE 1905).
Classify them as dropped like Linux does (FreeBSD just ignores them). From RVP.


To generate a diff of this commit:
cvs rdiff -u -r1.302 -r1.303 src/sys/net/if_ethersubr.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/net/if_ethersubr.c
diff -u src/sys/net/if_ethersubr.c:1.302 src/sys/net/if_ethersubr.c:1.303
--- src/sys/net/if_ethersubr.c:1.302	Mon Oct 25 13:05:43 2021
+++ src/sys/net/if_ethersubr.c	Mon Nov  8 11:50:05 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_ethersubr.c,v 1.302 2021/10/25 17:05:43 ryo Exp $	*/
+/*	$NetBSD: if_ethersubr.c,v 1.303 2021/11/08 16:50:05 christos Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -61,7 +61,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.302 2021/10/25 17:05:43 ryo Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.303 2021/11/08 16:50:05 christos Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -668,8 +668,10 @@ ether_input(struct ifnet *ifp, struct mb
 #endif
 
 	if (__predict_false(m->m_len < sizeof(*eh))) {
-		if ((m = m_pullup(m, sizeof(*eh))) == NULL)
-			goto dropped;
+		if ((m = m_pullup(m, sizeof(*eh))) == NULL) {
+			if_statinc(ifp, if_ierrors);
+			return;
+		}
 	}
 
 	eh = mtod(m, struct ether_header *);
@@ -870,7 +872,7 @@ ether_input(struct ifnet *ifp, struct mb
 		default:
 			if (subtype == 0 || subtype > 10) {
 /* illegal value */
-goto drop;
+goto error;
 			}
 			/* unknown subtype */
 			break;
@@ -895,7 +897,7 @@ ether_input(struct ifnet *ifp, struct mb
 		ether_input_llc(ifp, m, eh);
 		return;
 #else
-		goto drop;
+		goto error;
 #endif
 	}
 
@@ -966,7 +968,7 @@ ether_input(struct ifnet *ifp, struct mb
 
 	if (__predict_false(!inq)) {
 		/* Should not happen. */
-		goto drop;
+		goto error;
 	}
 
 	IFQ_ENQUEUE_ISR(inq, m, isr);
@@ -974,8 +976,12 @@ ether_input(struct ifnet *ifp, struct mb
 
 drop:
 	m_freem(m);
-dropped:
+	if_statinc(ifp, if_iqdrops); /* XXX should have a dedicated counter? */
+	return;
+error:
+	m_freem(m);
 	if_statinc(ifp, if_ierrors); /* XXX should have a dedicated counter? */
+	return;
 }
 
 /*



CVS commit: src/sys/net

2021-11-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Nov  8 16:50:06 UTC 2021

Modified Files:
src/sys/net: if_ethersubr.c

Log Message:
Don't classify dropped packets that we don't understand as errors, for
example etype 0x88CA (TIPC (Transparent Inter Process Communication,)
or 0x893A (IEEE 1905).
Classify them as dropped like Linux does (FreeBSD just ignores them). From RVP.


To generate a diff of this commit:
cvs rdiff -u -r1.302 -r1.303 src/sys/net/if_ethersubr.c

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



CVS commit: src/sys/dev/pci

2021-11-08 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Nov  8 11:01:52 UTC 2021

Modified Files:
src/sys/dev/pci: ahcisata_pci.c

Log Message:
Group quirks by vendors. No functional changes.


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/dev/pci/ahcisata_pci.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/ahcisata_pci.c
diff -u src/sys/dev/pci/ahcisata_pci.c:1.58 src/sys/dev/pci/ahcisata_pci.c:1.59
--- src/sys/dev/pci/ahcisata_pci.c:1.58	Mon Dec 28 20:01:46 2020
+++ src/sys/dev/pci/ahcisata_pci.c	Mon Nov  8 11:01:51 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: ahcisata_pci.c,v 1.58 2020/12/28 20:01:46 jmcneill Exp $	*/
+/*	$NetBSD: ahcisata_pci.c,v 1.59 2021/11/08 11:01:51 rin Exp $	*/
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ahcisata_pci.c,v 1.58 2020/12/28 20:01:46 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ahcisata_pci.c,v 1.59 2021/11/08 11:01:51 rin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ahcisata_pci.h"
@@ -200,10 +200,10 @@ static const struct ahci_pci_quirk ahci_
 	AHCI_PCI_QUIRK_FORCE },
 	{ PCI_VENDOR_AMD, PCI_PRODUCT_AMD_HUDSON_SATA,
 	AHCI_PCI_QUIRK_FORCE },
-	{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801JI_SATA_AHCI,
-	AHCI_QUIRK_BADPMP },
 	{ PCI_VENDOR_AMD, PCI_PRODUCT_AMD_HUDSON_SATA_AHCI,
 	AHCI_QUIRK_BADPMP },
+	{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801JI_SATA_AHCI,
+	AHCI_QUIRK_BADPMP },
 };
 
 struct ahci_pci_softc {



CVS commit: src/sys/dev/pci

2021-11-08 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Nov  8 11:01:52 UTC 2021

Modified Files:
src/sys/dev/pci: ahcisata_pci.c

Log Message:
Group quirks by vendors. No functional changes.


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/dev/pci/ahcisata_pci.c

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



CVS commit: src/tests/net/net

2021-11-08 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Nov  8 10:57:09 UTC 2021

Modified Files:
src/tests/net/net: t_tcp.c

Log Message:
Fix (a kind of) violation of strict aliasing rule.

Due to the rule, "sin" and "sin6" can be treated as restrict pointers.
Compilers seem to be confused by structure copy for those pointed by
them before assignments.

For aarch64eb, GCC 9 and 10 compile t_tcp.c rev 1.11 into a code, where
fetch for "sin6->sin6_port" is preceding the structure copy "ss = bs".
This results in failure of connect(2) with EADDRNOOTAVAIL.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/tests/net/net/t_tcp.c

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



CVS commit: src/tests/net/net

2021-11-08 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Nov  8 10:57:09 UTC 2021

Modified Files:
src/tests/net/net: t_tcp.c

Log Message:
Fix (a kind of) violation of strict aliasing rule.

Due to the rule, "sin" and "sin6" can be treated as restrict pointers.
Compilers seem to be confused by structure copy for those pointed by
them before assignments.

For aarch64eb, GCC 9 and 10 compile t_tcp.c rev 1.11 into a code, where
fetch for "sin6->sin6_port" is preceding the structure copy "ss = bs".
This results in failure of connect(2) with EADDRNOOTAVAIL.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/tests/net/net/t_tcp.c

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

Modified files:

Index: src/tests/net/net/t_tcp.c
diff -u src/tests/net/net/t_tcp.c:1.11 src/tests/net/net/t_tcp.c:1.12
--- src/tests/net/net/t_tcp.c:1.11	Sat Oct 26 23:08:27 2019
+++ src/tests/net/net/t_tcp.c	Mon Nov  8 10:57:09 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_tcp.c,v 1.11 2019/10/26 23:08:27 christos Exp $	*/
+/*	$NetBSD: t_tcp.c,v 1.12 2021/11/08 10:57:09 rin Exp $	*/
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
 
 #include 
 #ifdef __RCSID
-__RCSID("$Id: t_tcp.c,v 1.11 2019/10/26 23:08:27 christos Exp $");
+__RCSID("$Id: t_tcp.c,v 1.12 2021/11/08 10:57:09 rin Exp $");
 #endif
 
 /* Example code. Should block; does with accept not accept4_. */
@@ -139,15 +139,14 @@ accept_test(sa_family_t sfamily, sa_fami
 		FAIL("socket");
 
 	if (sfamily == AF_INET6 && cfamily == AF_INET) {
-		ss = bs;
-		sin6 = (void *)
+		in_port_t port = ((struct sockaddr_in6 *))->sin6_port;
 		sin = (void *)
 		addrlen = sizeof(*sin);
 #ifdef BSD4_4
 		sin->sin_len = sizeof(*sin);
 #endif
 		sin->sin_family = AF_INET;
-		sin->sin_port = sin6->sin6_port;
+		sin->sin_port = port;
 		sin->sin_addr.s_addr = htonl(INADDR_LOOPBACK);
 	}
 



CVS commit: src/usr.sbin/acpitools/acpidump

2021-11-08 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon Nov  8 10:19:42 UTC 2021

Modified Files:
src/usr.sbin/acpitools/acpidump: acpi.c

Log Message:
acpi_print_gicc_flags: print {en,dis}abled


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 src/usr.sbin/acpitools/acpidump/acpi.c

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

Modified files:

Index: src/usr.sbin/acpitools/acpidump/acpi.c
diff -u src/usr.sbin/acpitools/acpidump/acpi.c:1.52 src/usr.sbin/acpitools/acpidump/acpi.c:1.53
--- src/usr.sbin/acpitools/acpidump/acpi.c:1.52	Sun Sep 19 10:34:10 2021
+++ src/usr.sbin/acpitools/acpidump/acpi.c	Mon Nov  8 10:19:42 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi.c,v 1.52 2021/09/19 10:34:10 andvar Exp $ */
+/* $NetBSD: acpi.c,v 1.53 2021/11/08 10:19:42 skrll Exp $ */
 
 /*-
  * Copyright (c) 1998 Doug Rabson
@@ -30,7 +30,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: acpi.c,v 1.52 2021/09/19 10:34:10 andvar Exp $");
+__RCSID("$NetBSD: acpi.c,v 1.53 2021/11/08 10:19:42 skrll Exp $");
 
 #include 
 #include 
@@ -979,7 +979,12 @@ static void
 acpi_print_gicc_flags(uint32_t flags)
 {
 
-	printf("\tFlags={Performance intr=");
+	printf("\tFlags={");
+	if (flags & ACPI_MADT_ENABLED)
+		printf("enabled");
+	else
+		printf("disabled");
+	printf(", Performance intr=");
 	if (flags & ACPI_MADT_PERFORMANCE_IRQ_MODE)
 		printf("edge");
 	else



CVS commit: src/usr.sbin/acpitools/acpidump

2021-11-08 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon Nov  8 10:19:42 UTC 2021

Modified Files:
src/usr.sbin/acpitools/acpidump: acpi.c

Log Message:
acpi_print_gicc_flags: print {en,dis}abled


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 src/usr.sbin/acpitools/acpidump/acpi.c

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