CVS commit: src/sys/arch/hppa/hppa

2024-04-17 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Wed Apr 17 07:47:48 UTC 2024

Modified Files:
src/sys/arch/hppa/hppa: machdep.c

Log Message:
turn LEDs off when shutting down


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/hppa/hppa/machdep.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/hppa/hppa/machdep.c
diff -u src/sys/arch/hppa/hppa/machdep.c:1.20 src/sys/arch/hppa/hppa/machdep.c:1.21
--- src/sys/arch/hppa/hppa/machdep.c:1.20	Tue Mar  5 14:15:32 2024
+++ src/sys/arch/hppa/hppa/machdep.c	Wed Apr 17 07:47:48 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.20 2024/03/05 14:15:32 thorpej Exp $	*/
+/*	$NetBSD: machdep.c,v 1.21 2024/04/17 07:47:48 macallan Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.20 2024/03/05 14:15:32 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.21 2024/04/17 07:47:48 macallan Exp $");
 
 #include "opt_cputype.h"
 #include "opt_ddb.h"
@@ -1415,6 +1415,8 @@ cpu_reboot(int howto, char *user_boot_st
 	if (cold_hook)
 		(*cold_hook)(HPPA_COLD_COLD);
 
+	hppa_led_ctl(0xf, 0, 0);
+
 	if (howto & RB_HALT) {
 		if ((howto & RB_POWERDOWN) == RB_POWERDOWN && cold_hook) {
 			printf("Powering off...");



CVS commit: src/sys/arch/hppa/hppa

2024-04-17 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Wed Apr 17 07:47:48 UTC 2024

Modified Files:
src/sys/arch/hppa/hppa: machdep.c

Log Message:
turn LEDs off when shutting down


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/hppa/hppa/machdep.c

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



CVS commit: src/sys/arch/hppa/hppa

2024-01-21 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon Jan 22 07:15:25 UTC 2024

Modified Files:
src/sys/arch/hppa/hppa: machdep.c

Log Message:
Don't duplicate PIM_CPU_BITS in one printf.

PIM_CPU_HPMC_BITS already includes PIM_CPU_HPMC_BITS


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/hppa/hppa/machdep.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/hppa/hppa/machdep.c
diff -u src/sys/arch/hppa/hppa/machdep.c:1.18 src/sys/arch/hppa/hppa/machdep.c:1.19
--- src/sys/arch/hppa/hppa/machdep.c:1.18	Thu Sep 29 06:39:59 2022
+++ src/sys/arch/hppa/hppa/machdep.c	Mon Jan 22 07:15:25 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.18 2022/09/29 06:39:59 skrll Exp $	*/
+/*	$NetBSD: machdep.c,v 1.19 2024/01/22 07:15:25 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.18 2022/09/29 06:39:59 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.19 2024/01/22 07:15:25 skrll Exp $");
 
 #include "opt_cputype.h"
 #include "opt_ddb.h"
@@ -1563,7 +1563,7 @@ hppa_pim_dump(int check_type, void *data
 		PIM_WORD("\n\n\tCheck Type", checks->pim_check_type,
 			PIM_CHECK_BITS);
 		PIM_WORD("\n\tCPU State", checks->pim_check_cpu_state,
-			PIM_CPU_BITS PIM_CPU_HPMC_BITS);
+			PIM_CPU_HPMC_BITS);
 		PIM_WORD("\n\tCache Check", checks->pim_check_cache,
 			PIM_CACHE_BITS);
 		PIM_WORD("\n\tTLB Check", checks->pim_check_tlb,



CVS commit: src/sys/arch/hppa/hppa

2024-01-21 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon Jan 22 07:15:25 UTC 2024

Modified Files:
src/sys/arch/hppa/hppa: machdep.c

Log Message:
Don't duplicate PIM_CPU_BITS in one printf.

PIM_CPU_HPMC_BITS already includes PIM_CPU_HPMC_BITS


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/hppa/hppa/machdep.c

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



CVS commit: src/sys/arch/hppa/hppa

2024-01-21 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon Jan 22 07:10:54 UTC 2024

Modified Files:
src/sys/arch/hppa/hppa: pim.h

Log Message:
Fix one by one bugs I committed back in 2009.  Spotted by rillig@.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/hppa/hppa/pim.h

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



CVS commit: src/sys/arch/hppa/hppa

2024-01-21 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon Jan 22 07:10:54 UTC 2024

Modified Files:
src/sys/arch/hppa/hppa: pim.h

Log Message:
Fix one by one bugs I committed back in 2009.  Spotted by rillig@.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/hppa/hppa/pim.h

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/hppa/hppa/pim.h
diff -u src/sys/arch/hppa/hppa/pim.h:1.2 src/sys/arch/hppa/hppa/pim.h:1.3
--- src/sys/arch/hppa/hppa/pim.h:1.2	Mon Apr 15 20:45:08 2019
+++ src/sys/arch/hppa/hppa/pim.h	Mon Jan 22 07:10:54 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: pim.h,v 1.2 2019/04/15 20:45:08 skrll Exp $	*/
+/*	$NetBSD: pim.h,v 1.3 2024/01/22 07:10:54 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -138,10 +138,10 @@ struct hppa_pim_checks {
 #define	PIM_CHECK_ASSISTS	(1 << 28)
 #define	PIM_CHECK_BITS		\
 	"\177\020"		/* New bitmask format */	\
-	"b\040cache\0"		/* bit 31 */			\
-	"b\037tlb\0"		/* bit 30 */			\
-	"b\036bus\0"		/* bit 29 */			\
-	"b\035assists\0"	/* bit 28 */
+	"b\037cache\0"		/* bit 31 */			\
+	"b\036tlb\0"		/* bit 30 */			\
+	"b\035bus\0"		/* bit 29 */			\
+	"b\034assists\0"	/* bit 28 */
 
 	/*
 	 * The CPU State.  In addition to the common PIM_CPU_
@@ -157,13 +157,13 @@ struct hppa_pim_checks {
 #define	PIM_CPU_TRV	(1 << 25)
 #define	PIM_CPU_BITS		\
 	"\177\020"		/* New bitmask format */	\
-	"b\040iqv\0"		/* bit 31 */			\
-	"b\037iqf\0"		/* bit 30 */			\
-	"b\036ipv\0"		/* bit 29 */			\
-	"b\035grv\0"		/* bit 28 */			\
-	"b\034crv\0"		/* bit 27 */			\
-	"b\033srv\0"		/* bit 26 */			\
-	"b\032trv\0"		/* bit 25 */
+	"b\037iqv\0"		/* bit 31 */			\
+	"b\036iqf\0"		/* bit 30 */			\
+	"b\035ipv\0"		/* bit 29 */			\
+	"b\034grv\0"		/* bit 28 */			\
+	"b\033crv\0"		/* bit 27 */			\
+	"b\032srv\0"		/* bit 26 */			\
+	"b\031trv\0"		/* bit 25 */
 #define	PIM_CPU_HPMC_TL(cs)	(((cs) >> 4) & 0x3)
 #define	PIM_CPU_HPMC_HD		(1 << 3)
 #define	PIM_CPU_HPMC_SIS	(1 << 2)
@@ -189,14 +189,14 @@ struct hppa_pim_checks {
 #define	PIM_CACHE_PADD(cc)	((cc) & 0x000f)
 #define	PIM_CACHE_BITS		\
 	"\177\020"		/* New bitmask format */	\
-	"b\040icc\0"		/* bit 31 */			\
-	"b\039dcc\0"		/* bit 30 */			\
-	"b\038tc\0"		/* bit 29 */			\
-	"b\037dc\0"		/* bit 28 */			\
-	"b\036crg\0"		/* bit 27 */			\
-	"b\035lc\0"		/* bit 26 */			\
-	"b\034rcc\0"		/* bit 25 */			\
-	"f\000\032paddr\0"	/* bit 0 .. 23 */
+	"b\037icc\0"		/* bit 31 */			\
+	"b\036dcc\0"		/* bit 30 */			\
+	"b\035tc\0"		/* bit 29 */			\
+	"b\034dc\0"		/* bit 28 */			\
+	"b\033crg\0"		/* bit 27 */			\
+	"b\032lc\0"		/* bit 26 */			\
+	"b\031rcc\0"		/* bit 25 */			\
+	"f\000\030paddr\0"	/* bit 0 .. 23 */
 
 	/* The TLB Check word. */
 	uint32_t	pim_check_tlb;
@@ -207,11 +207,11 @@ struct hppa_pim_checks {
 #define	PIM_TLB_TNF	(1 << 27)
 #define	PIM_TLB_BITS		\
 	"\177\020"		/* New bitmask format */	\
-	"b\040itc\0"		/* bit 31 */			\
-	"b\039dtc\0"		/* bit 30 */			\
-	"b\038trg\0"		/* bit 29 */			\
-	"b\037tuc\0"		/* bit 28 */			\
-	"b\036tnf\0"		/* bit 27 */			\
+	"b\037itc\0"		/* bit 31 */			\
+	"b\036dtc\0"		/* bit 30 */			\
+	"b\035trg\0"		/* bit 29 */			\
+	"b\034tuc\0"		/* bit 28 */			\
+	"b\033tnf\0"		/* bit 27 */			\
 
 	/* The Bus Check word. */
 	uint32_t	pim_check_bus;
@@ -238,7 +238,7 @@ struct hppa_pim_checks {
 	uint32_t	pim_check_assist;
 #define	PIM_ASSIST_COC		(1 << 31)
 #define	PIM_ASSIST_SC		(1 << 30)
-#define	PIM_ASSIST_BITS		"\020\040COC\037SC"
+#define	PIM_ASSIST_BITS		"\020\037COC\036SC"
 
 	uint32_t	pim_check_reserved_1;
 



CVS commit: src/sys/arch/hppa/hppa

2024-01-18 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Thu Jan 18 10:34:29 UTC 2024

Modified Files:
src/sys/arch/hppa/hppa: mainbus.c

Log Message:
rearrange things so we:
- find machine_ledaddr on Cxxx and the like without lcd at mainbus
- build without options USELEDS


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/hppa/hppa/mainbus.c

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



CVS commit: src/sys/arch/hppa/hppa

2024-01-18 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Thu Jan 18 10:34:29 UTC 2024

Modified Files:
src/sys/arch/hppa/hppa: mainbus.c

Log Message:
rearrange things so we:
- find machine_ledaddr on Cxxx and the like without lcd at mainbus
- build without options USELEDS


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/hppa/hppa/mainbus.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/hppa/hppa/mainbus.c
diff -u src/sys/arch/hppa/hppa/mainbus.c:1.11 src/sys/arch/hppa/hppa/mainbus.c:1.12
--- src/sys/arch/hppa/hppa/mainbus.c:1.11	Tue Oct 11 22:03:37 2022
+++ src/sys/arch/hppa/hppa/mainbus.c	Thu Jan 18 10:34:29 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: mainbus.c,v 1.11 2022/10/11 22:03:37 andvar Exp $	*/
+/*	$NetBSD: mainbus.c,v 1.12 2024/01/18 10:34:29 macallan Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -58,11 +58,12 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.11 2022/10/11 22:03:37 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.12 2024/01/18 10:34:29 macallan Exp $");
 
 #include "locators.h"
 #include "power.h"
 #include "lcd.h"
+#include "opt_useleds.h"
 
 #include 
 #include 
@@ -83,9 +84,7 @@ __KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 
 #include 
 #include 
 
-#if NLCD > 0
 static struct pdc_chassis_info pdc_chassis_info;
-#endif
 
 #ifdef MBUSDEBUG
 
@@ -1362,9 +1361,7 @@ mbattach(device_t parent, device_t self,
 	struct mainbus_softc *sc = device_private(self);
 	struct confargs nca;
 	bus_space_handle_t ioh;
-#if NLCD > 0
 	int err;
-#endif
 
 	sc->sc_dv = self;
 	mb_attached = 1;
@@ -1409,11 +1406,11 @@ mbattach(device_t parent, device_t self,
 	config_found(self, , mbprint, CFARGS_NONE);
 #endif
 
-#if NLCD > 0
 	memset(, 0, sizeof(nca));
 	err = pdcproc_chassis_info(_chassis_info, _pcl);
 	if (!err) {
 		if (nca.ca_pcl.enabled) {
+#if NLCD > 0
 			nca.ca_name = "lcd";
 			nca.ca_dp.dp_bc[0] = nca.ca_dp.dp_bc[1] = nca.ca_dp.dp_bc[2] =
 			nca.ca_dp.dp_bc[3] = nca.ca_dp.dp_bc[4] = nca.ca_dp.dp_bc[5] = -1;
@@ -1423,13 +1420,15 @@ mbattach(device_t parent, device_t self,
 			nca.ca_hpa = nca.ca_pcl.cmd_addr;
 
 			config_found(self, , mbprint, CFARGS_NONE);
+#endif
 		} else if (nca.ca_pcl.model == 2) {
+#ifdef USELEDS
 			bus_space_map(_bustag, nca.ca_pcl.cmd_addr,
 		  	  4, 0, (bus_space_handle_t *)_ledaddr);
 		  	machine_ledword = 1;
+#endif
 		}
 	}
-#endif
 
 	hppa_modules_scan();
 



CVS commit: src/sys/arch/hppa/hppa

2023-08-02 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Wed Aug  2 09:18:14 UTC 2023

Modified Files:
src/sys/arch/hppa/hppa: pmap.c

Log Message:
check for empty ranges in pmap_page_physload() itself


To generate a diff of this commit:
cvs rdiff -u -r1.121 -r1.122 src/sys/arch/hppa/hppa/pmap.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/hppa/hppa/pmap.c
diff -u src/sys/arch/hppa/hppa/pmap.c:1.121 src/sys/arch/hppa/hppa/pmap.c:1.122
--- src/sys/arch/hppa/hppa/pmap.c:1.121	Wed Aug  2 08:54:42 2023
+++ src/sys/arch/hppa/hppa/pmap.c	Wed Aug  2 09:18:14 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.121 2023/08/02 08:54:42 macallan Exp $	*/
+/*	$NetBSD: pmap.c,v 1.122 2023/08/02 09:18:14 macallan Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002, 2020 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.121 2023/08/02 08:54:42 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.122 2023/08/02 09:18:14 macallan Exp $");
 
 #include "opt_cputype.h"
 
@@ -767,6 +767,9 @@ static void
 pmap_page_physload(paddr_t spa, paddr_t epa)
 {
 
+	if (spa == epa)
+		return;
+
 	if (spa < FIRST_16M && epa <= FIRST_16M) {
 		uvm_page_physload(spa, epa, spa, epa, VM_FREELIST_ISADMA);
 	} else if (spa < FIRST_16M && epa > FIRST_16M) {
@@ -1090,8 +1093,7 @@ pmap_bootstrap(vaddr_t vstart)
 	availphysmem = 0;
 
 	pmap_page_physload(resvmem, atop(ksrx));
-	if (atop(kero) != atop(ksrw))
-		pmap_page_physload(atop(kero), atop(ksrw));
+	pmap_page_physload(atop(kero), atop(ksrw));
 	pmap_page_physload(atop(kerw), physmem);
 
 	mutex_init(_lock, MUTEX_DEFAULT, IPL_NONE);



CVS commit: src/sys/arch/hppa/hppa

2023-08-02 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Wed Aug  2 09:18:14 UTC 2023

Modified Files:
src/sys/arch/hppa/hppa: pmap.c

Log Message:
check for empty ranges in pmap_page_physload() itself


To generate a diff of this commit:
cvs rdiff -u -r1.121 -r1.122 src/sys/arch/hppa/hppa/pmap.c

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



CVS commit: src/sys/arch/hppa/hppa

2023-08-02 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Wed Aug  2 08:54:42 UTC 2023

Modified Files:
src/sys/arch/hppa/hppa: pmap.c

Log Message:
avoid calling pmap_page_physload() with an empty range
this avoids a panic in uvm_pmap_physload()
now my C360 boots again


To generate a diff of this commit:
cvs rdiff -u -r1.120 -r1.121 src/sys/arch/hppa/hppa/pmap.c

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



CVS commit: src/sys/arch/hppa/hppa

2023-08-02 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Wed Aug  2 08:54:42 UTC 2023

Modified Files:
src/sys/arch/hppa/hppa: pmap.c

Log Message:
avoid calling pmap_page_physload() with an empty range
this avoids a panic in uvm_pmap_physload()
now my C360 boots again


To generate a diff of this commit:
cvs rdiff -u -r1.120 -r1.121 src/sys/arch/hppa/hppa/pmap.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/hppa/hppa/pmap.c
diff -u src/sys/arch/hppa/hppa/pmap.c:1.120 src/sys/arch/hppa/hppa/pmap.c:1.121
--- src/sys/arch/hppa/hppa/pmap.c:1.120	Thu Jun 16 06:25:42 2022
+++ src/sys/arch/hppa/hppa/pmap.c	Wed Aug  2 08:54:42 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.120 2022/06/16 06:25:42 skrll Exp $	*/
+/*	$NetBSD: pmap.c,v 1.121 2023/08/02 08:54:42 macallan Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002, 2020 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.120 2022/06/16 06:25:42 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.121 2023/08/02 08:54:42 macallan Exp $");
 
 #include "opt_cputype.h"
 
@@ -1090,7 +1090,8 @@ pmap_bootstrap(vaddr_t vstart)
 	availphysmem = 0;
 
 	pmap_page_physload(resvmem, atop(ksrx));
-	pmap_page_physload(atop(kero), atop(ksrw));
+	if (atop(kero) != atop(ksrw))
+		pmap_page_physload(atop(kero), atop(ksrw));
 	pmap_page_physload(atop(kerw), physmem);
 
 	mutex_init(_lock, MUTEX_DEFAULT, IPL_NONE);



CVS commit: src/sys/arch/hppa/hppa

2023-02-25 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Feb 25 08:30:31 UTC 2023

Modified Files:
src/sys/arch/hppa/hppa: vm_machdep.c

Log Message:
Convert some assignments into KASSERTs.

l_md is zeroised by lwp_create with

 memset(>l_startzero, 0, sizeof(*l2) -
offsetof(lwp_t, l_startzero));


To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.58 src/sys/arch/hppa/hppa/vm_machdep.c

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



CVS commit: src/sys/arch/hppa/hppa

2023-02-25 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Feb 25 08:30:31 UTC 2023

Modified Files:
src/sys/arch/hppa/hppa: vm_machdep.c

Log Message:
Convert some assignments into KASSERTs.

l_md is zeroised by lwp_create with

 memset(>l_startzero, 0, sizeof(*l2) -
offsetof(lwp_t, l_startzero));


To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.58 src/sys/arch/hppa/hppa/vm_machdep.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/hppa/hppa/vm_machdep.c
diff -u src/sys/arch/hppa/hppa/vm_machdep.c:1.57 src/sys/arch/hppa/hppa/vm_machdep.c:1.58
--- src/sys/arch/hppa/hppa/vm_machdep.c:1.57	Thu Sep 29 06:39:59 2022
+++ src/sys/arch/hppa/hppa/vm_machdep.c	Sat Feb 25 08:30:31 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: vm_machdep.c,v 1.57 2022/09/29 06:39:59 skrll Exp $	*/
+/*	$NetBSD: vm_machdep.c,v 1.58 2023/02/25 08:30:31 skrll Exp $	*/
 
 /*	$OpenBSD: vm_machdep.c,v 1.64 2008/09/30 18:54:26 miod Exp $	*/
 
@@ -29,7 +29,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.57 2022/09/29 06:39:59 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.58 2023/02/25 08:30:31 skrll Exp $");
 
 #include 
 #include 
@@ -96,8 +96,8 @@ cpu_lwp_fork(struct lwp *l1, struct lwp 
 	pcb1 = lwp_getpcb(l1);
 	pcb2 = lwp_getpcb(l2);
 
-	l2->l_md.md_astpending = 0;
-	l2->l_md.md_flags = 0;
+	KASSERT(l2->l_md.md_astpending == 0);
+	KASSERT(l2->l_md.md_flags == 0);
 
 	/* Flush the parent LWP out of the FPU. */
 	hppa_fpu_flush(l1);



CVS commit: src/sys/arch/hppa/hppa

2022-06-16 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Jun 16 06:25:42 UTC 2022

Modified Files:
src/sys/arch/hppa/hppa: pmap.c

Log Message:
Re-reading the PA2.0 Cache Move-In rules tells me we do indeed need to
purge the translations from the TLBs in pmap_procwr.

PR/56867: hppa: intermittent SIGSEGV reports in t_ptrace_wait's stepN and 
setstepN test cases


To generate a diff of this commit:
cvs rdiff -u -r1.119 -r1.120 src/sys/arch/hppa/hppa/pmap.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/hppa/hppa/pmap.c
diff -u src/sys/arch/hppa/hppa/pmap.c:1.119 src/sys/arch/hppa/hppa/pmap.c:1.120
--- src/sys/arch/hppa/hppa/pmap.c:1.119	Thu Jun  9 16:41:25 2022
+++ src/sys/arch/hppa/hppa/pmap.c	Thu Jun 16 06:25:42 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.119 2022/06/09 16:41:25 skrll Exp $	*/
+/*	$NetBSD: pmap.c,v 1.120 2022/06/16 06:25:42 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002, 2020 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.119 2022/06/09 16:41:25 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.120 2022/06/16 06:25:42 skrll Exp $");
 
 #include "opt_cputype.h"
 
@@ -1873,10 +1873,13 @@ pmap_activate(struct lwp *l)
 void
 pmap_procwr(struct proc *p, vaddr_t va, size_t len)
 {
-	pmap_t pmap = p->p_vmspace->vm_map.pmap;
+	const pmap_t pmap = p->p_vmspace->vm_map.pmap;
+	const pa_space_t space = pmap->pm_space;
 
-	fdcache(pmap->pm_space, va, len);
-	ficache(pmap->pm_space, va, len);
+	fdcache(space, va, len);
+	ficache(space, va, len);
+	pdtlb(space, va);
+	pitlb(space, va);
 }
 
 static inline void



CVS commit: src/sys/arch/hppa/hppa

2022-06-16 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Jun 16 06:25:42 UTC 2022

Modified Files:
src/sys/arch/hppa/hppa: pmap.c

Log Message:
Re-reading the PA2.0 Cache Move-In rules tells me we do indeed need to
purge the translations from the TLBs in pmap_procwr.

PR/56867: hppa: intermittent SIGSEGV reports in t_ptrace_wait's stepN and 
setstepN test cases


To generate a diff of this commit:
cvs rdiff -u -r1.119 -r1.120 src/sys/arch/hppa/hppa/pmap.c

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



CVS commit: src/sys/arch/hppa/hppa

2022-06-09 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Jun  9 16:45:38 UTC 2022

Modified Files:
src/sys/arch/hppa/hppa: trap.c

Log Message:
Only report the SSBREAKPOINT break instruction as SIGTRAP/TRAP_TRACE. All
other break instructions will be reported as SIGTRAP/TRAP_BRKPT

This fixes a mistake I made back in 2008.

PR/56866: hppa: kernel gets confused between actual breakpoints and single-step 
breakpoints


To generate a diff of this commit:
cvs rdiff -u -r1.119 -r1.120 src/sys/arch/hppa/hppa/trap.c

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



CVS commit: src/sys/arch/hppa/hppa

2022-06-09 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Jun  9 16:45:38 UTC 2022

Modified Files:
src/sys/arch/hppa/hppa: trap.c

Log Message:
Only report the SSBREAKPOINT break instruction as SIGTRAP/TRAP_TRACE. All
other break instructions will be reported as SIGTRAP/TRAP_BRKPT

This fixes a mistake I made back in 2008.

PR/56866: hppa: kernel gets confused between actual breakpoints and single-step 
breakpoints


To generate a diff of this commit:
cvs rdiff -u -r1.119 -r1.120 src/sys/arch/hppa/hppa/trap.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/hppa/hppa/trap.c
diff -u src/sys/arch/hppa/hppa/trap.c:1.119 src/sys/arch/hppa/hppa/trap.c:1.120
--- src/sys/arch/hppa/hppa/trap.c:1.119	Thu Jun  9 16:38:23 2022
+++ src/sys/arch/hppa/hppa/trap.c	Thu Jun  9 16:45:38 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap.c,v 1.119 2022/06/09 16:38:23 skrll Exp $	*/
+/*	$NetBSD: trap.c,v 1.120 2022/06/09 16:45:38 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.119 2022/06/09 16:38:23 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.120 2022/06/09 16:45:38 skrll Exp $");
 
 /* #define INTRDEBUG */
 /* #define TRAPDEBUG */
@@ -773,13 +773,13 @@ do_onfault:
 	case T_DBREAK | T_USER:
 		KSI_INIT_TRAP();
 		ksi.ksi_signo = SIGTRAP;
-		ksi.ksi_code = TRAP_TRACE;
+		ksi.ksi_code = TRAP_BRKPT;
 		ksi.ksi_trap = trapnum;
 		ksi.ksi_addr = (void *)(frame->tf_iioq_head & ~HPPA_PC_PRIV_MASK);
 #ifdef PTRACE
 		ss_clear_breakpoints(l);
 		if (opcode == SSBREAKPOINT)
-			ksi.ksi_code = TRAP_BRKPT;
+			ksi.ksi_code = TRAP_TRACE;
 #endif
 		/* pass to user debugger */
 		trapsignal(l, );



CVS commit: src/sys/arch/hppa/hppa

2022-06-09 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Jun  9 16:41:25 UTC 2022

Modified Files:
src/sys/arch/hppa/hppa: pmap.c

Log Message:
Oops... revert commit mistake


To generate a diff of this commit:
cvs rdiff -u -r1.118 -r1.119 src/sys/arch/hppa/hppa/pmap.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/hppa/hppa/pmap.c
diff -u src/sys/arch/hppa/hppa/pmap.c:1.118 src/sys/arch/hppa/hppa/pmap.c:1.119
--- src/sys/arch/hppa/hppa/pmap.c:1.118	Thu Jun  9 16:38:23 2022
+++ src/sys/arch/hppa/hppa/pmap.c	Thu Jun  9 16:41:25 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.118 2022/06/09 16:38:23 skrll Exp $	*/
+/*	$NetBSD: pmap.c,v 1.119 2022/06/09 16:41:25 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002, 2020 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.118 2022/06/09 16:38:23 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.119 2022/06/09 16:41:25 skrll Exp $");
 
 #include "opt_cputype.h"
 
@@ -1501,7 +1501,6 @@ pmap_remove(pmap_t pmap, vaddr_t sva, va
 		}
 		batch = pdemask == sva && sva + PDE_SIZE <= eva;
 
-//XXXNH valid check?
 		if ((pte = pmap_pte_get(pde, sva))) {
 
 			/* TODO measure here the speed tradeoff
@@ -1511,8 +1510,6 @@ pmap_remove(pmap_t pmap, vaddr_t sva, va
 			pmap_pte_flush(pmap, sva, pte);
 			if (pte & PTE_PROT(TLB_WIRED))
 pmap->pm_stats.wired_count--;
-
-//XXXNH move to pmap_pv_remove?
 			pmap->pm_stats.resident_count--;
 
 			/* iff properly accounted pde will be dropped anyway */



CVS commit: src/sys/arch/hppa/hppa

2022-06-09 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Jun  9 16:41:25 UTC 2022

Modified Files:
src/sys/arch/hppa/hppa: pmap.c

Log Message:
Oops... revert commit mistake


To generate a diff of this commit:
cvs rdiff -u -r1.118 -r1.119 src/sys/arch/hppa/hppa/pmap.c

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



CVS commit: src/sys/arch/hppa/hppa

2022-06-09 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Jun  9 16:38:23 UTC 2022

Modified Files:
src/sys/arch/hppa/hppa: pmap.c trap.c

Log Message:
Handle 'NA' (non-access) traps for the lpa and probe instructions.  The
change is inspired by OpenBSD with a bunch of my own, mainly stylistic,
changes.

Thanks to Tom Lane for the analysis.

PR/56118: sporadic app crashes in HPPA -current


To generate a diff of this commit:
cvs rdiff -u -r1.117 -r1.118 src/sys/arch/hppa/hppa/pmap.c
cvs rdiff -u -r1.118 -r1.119 src/sys/arch/hppa/hppa/trap.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/hppa/hppa/pmap.c
diff -u src/sys/arch/hppa/hppa/pmap.c:1.117 src/sys/arch/hppa/hppa/pmap.c:1.118
--- src/sys/arch/hppa/hppa/pmap.c:1.117	Thu May 26 05:34:04 2022
+++ src/sys/arch/hppa/hppa/pmap.c	Thu Jun  9 16:38:23 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.117 2022/05/26 05:34:04 skrll Exp $	*/
+/*	$NetBSD: pmap.c,v 1.118 2022/06/09 16:38:23 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002, 2020 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.117 2022/05/26 05:34:04 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.118 2022/06/09 16:38:23 skrll Exp $");
 
 #include "opt_cputype.h"
 
@@ -1501,6 +1501,7 @@ pmap_remove(pmap_t pmap, vaddr_t sva, va
 		}
 		batch = pdemask == sva && sva + PDE_SIZE <= eva;
 
+//XXXNH valid check?
 		if ((pte = pmap_pte_get(pde, sva))) {
 
 			/* TODO measure here the speed tradeoff
@@ -1510,6 +1511,8 @@ pmap_remove(pmap_t pmap, vaddr_t sva, va
 			pmap_pte_flush(pmap, sva, pte);
 			if (pte & PTE_PROT(TLB_WIRED))
 pmap->pm_stats.wired_count--;
+
+//XXXNH move to pmap_pv_remove?
 			pmap->pm_stats.resident_count--;
 
 			/* iff properly accounted pde will be dropped anyway */

Index: src/sys/arch/hppa/hppa/trap.c
diff -u src/sys/arch/hppa/hppa/trap.c:1.118 src/sys/arch/hppa/hppa/trap.c:1.119
--- src/sys/arch/hppa/hppa/trap.c:1.118	Tue Jun  7 06:06:46 2022
+++ src/sys/arch/hppa/hppa/trap.c	Thu Jun  9 16:38:23 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap.c,v 1.118 2022/06/07 06:06:46 skrll Exp $	*/
+/*	$NetBSD: trap.c,v 1.119 2022/06/09 16:38:23 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.118 2022/06/07 06:06:46 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.119 2022/06/09 16:38:23 skrll Exp $");
 
 /* #define INTRDEBUG */
 /* #define TRAPDEBUG */
@@ -478,6 +478,93 @@ out:
 }
 #endif /* DEBUG */
 
+
+#define __PABITS(x, y)		__BITS(31 - (x), 31 - (y))
+#define __PABIT(x)		__BIT(31 - (x))
+
+#define LPA_MASK \
+ (  __PABITS(0, 5) | \
+__PABITS(18, 25))
+#define LPA	 \
+ (__SHIFTIN(1,  __PABITS(0, 5))| \
+  __SHIFTIN(0x4d, __PABITS(18, 25)))
+
+
+#define PROBE_ENCS	(0x46 | 0xc6 | 0x47 | 0xc7)
+#define PROBE_PL	__PABITS(14, 15)
+#define PROBE_IMMED	__PABIT(18)
+#define PROBE_RW	__PABIT(25)
+
+#define PROBE_MASK   \
+((  __PABITS(0, 5) | \
+__PABITS(18, 25)   | \
+__PABIT(26))   ^ \
+ (PROBE_IMMED | PROBE_RW))
+
+#define PROBE	 \
+((__SHIFTIN(1,  __PABITS(0, 5))| \
+  __SHIFTIN(PROBE_ENCS, __PABITS(18, 25))  | \
+  __SHIFTIN(0,  __PABIT(26)))  ^ \
+ (PROBE_IMMED | PROBE_RW))
+
+/* for hppa64 */
+CTASSERT(sizeof(register_t) == sizeof(u_int));
+size_t hppa_regmap[] = {
+	0,	/* r0 is special case */
+	offsetof(struct trapframe, tf_r1  ) / sizeof(register_t),
+	offsetof(struct trapframe, tf_rp  ) / sizeof(register_t),
+	offsetof(struct trapframe, tf_r3  ) / sizeof(register_t),
+	offsetof(struct trapframe, tf_r4  ) / sizeof(register_t),
+	offsetof(struct trapframe, tf_r5  ) / sizeof(register_t),
+	offsetof(struct trapframe, tf_r6  ) / sizeof(register_t),
+	offsetof(struct trapframe, tf_r7  ) / sizeof(register_t),
+	offsetof(struct trapframe, tf_r8  ) / sizeof(register_t),
+	offsetof(struct trapframe, tf_r9  ) / sizeof(register_t),
+	offsetof(struct trapframe, tf_r10 ) / sizeof(register_t),
+	offsetof(struct trapframe, tf_r11 ) / sizeof(register_t),
+	offsetof(struct trapframe, tf_r12 ) / sizeof(register_t),
+	offsetof(struct trapframe, tf_r13 ) / sizeof(register_t),
+	offsetof(struct trapframe, tf_r14 ) / sizeof(register_t),
+	offsetof(struct trapframe, tf_r15 ) / sizeof(register_t),
+	offsetof(struct trapframe, tf_r16 ) / sizeof(register_t),
+	offsetof(struct trapframe, tf_r17 ) / sizeof(register_t),
+	offsetof(struct trapframe, tf_r18 ) / sizeof(register_t),
+	offsetof(struct trapframe, tf_t4  ) / sizeof(register_t),
+	offsetof(struct trapframe, tf_t3  ) / sizeof(register_t),
+	offsetof(struct trapframe, tf_t2  ) / sizeof(register_t),
+	offsetof(struct trapframe, tf_t1  

CVS commit: src/sys/arch/hppa/hppa

2022-06-09 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Jun  9 16:38:23 UTC 2022

Modified Files:
src/sys/arch/hppa/hppa: pmap.c trap.c

Log Message:
Handle 'NA' (non-access) traps for the lpa and probe instructions.  The
change is inspired by OpenBSD with a bunch of my own, mainly stylistic,
changes.

Thanks to Tom Lane for the analysis.

PR/56118: sporadic app crashes in HPPA -current


To generate a diff of this commit:
cvs rdiff -u -r1.117 -r1.118 src/sys/arch/hppa/hppa/pmap.c
cvs rdiff -u -r1.118 -r1.119 src/sys/arch/hppa/hppa/trap.c

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



CVS commit: src/sys/arch/hppa/hppa

2022-06-07 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Jun  7 06:06:47 UTC 2022

Modified Files:
src/sys/arch/hppa/hppa: trap.c

Log Message:
Whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.117 -r1.118 src/sys/arch/hppa/hppa/trap.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/hppa/hppa/trap.c
diff -u src/sys/arch/hppa/hppa/trap.c:1.117 src/sys/arch/hppa/hppa/trap.c:1.118
--- src/sys/arch/hppa/hppa/trap.c:1.117	Sat May 28 21:14:56 2022
+++ src/sys/arch/hppa/hppa/trap.c	Tue Jun  7 06:06:46 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap.c,v 1.117 2022/05/28 21:14:56 andvar Exp $	*/
+/*	$NetBSD: trap.c,v 1.118 2022/06/07 06:06:46 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.117 2022/05/28 21:14:56 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.118 2022/06/07 06:06:46 skrll Exp $");
 
 /* #define INTRDEBUG */
 /* #define TRAPDEBUG */
@@ -593,7 +593,7 @@ trap(int type, struct trapframe *frame)
 
 	switch (type) {
 	case T_NONEXIST:
-	case T_NONEXIST|T_USER:
+	case T_NONEXIST | T_USER:
 #if !defined(DDB) && !defined(KGDB)
 		/* we've got screwed up by the central scrutinizer */
 		panic ("trap: elvis has just left the building!");
@@ -601,7 +601,7 @@ trap(int type, struct trapframe *frame)
 #else
 		goto dead_end;
 #endif
-	case T_RECOVERY|T_USER:
+	case T_RECOVERY | T_USER:
 #ifdef USERTRACE
 		for (;;) {
 			if (frame->tf_iioq_head != rctr_next_iioq)
@@ -932,7 +932,7 @@ do_onfault:
 		break;
 
 	case T_INTERRUPT:
-	case T_INTERRUPT|T_USER:
+	case T_INTERRUPT | T_USER:
 		hppa_intr(frame);
 		mtctl(frame->tf_eiem, CR_EIEM);
 		break;



CVS commit: src/sys/arch/hppa/hppa

2022-06-07 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Jun  7 06:06:47 UTC 2022

Modified Files:
src/sys/arch/hppa/hppa: trap.c

Log Message:
Whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.117 -r1.118 src/sys/arch/hppa/hppa/trap.c

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



CVS commit: src/sys/arch/hppa/hppa

2022-05-19 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu May 19 06:41:45 UTC 2022

Modified Files:
src/sys/arch/hppa/hppa: intr.c lock_stubs.S

Log Message:
port-hppa/56837: RAS support is slightly incorrect within hppa kernel, too

While there isn't a bug here (the tf_iioq_tail handling is correct) apply
the change to make the conditional / ras symbols consistent with hppa_ras


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/hppa/hppa/intr.c
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/hppa/hppa/lock_stubs.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/hppa/hppa/intr.c
diff -u src/sys/arch/hppa/hppa/intr.c:1.6 src/sys/arch/hppa/hppa/intr.c:1.7
--- src/sys/arch/hppa/hppa/intr.c:1.6	Sat Feb 26 03:02:25 2022
+++ src/sys/arch/hppa/hppa/intr.c	Thu May 19 06:41:45 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.c,v 1.6 2022/02/26 03:02:25 macallan Exp $	*/
+/*	$NetBSD: intr.c,v 1.7 2022/05/19 06:41:45 skrll Exp $	*/
 /*	$OpenBSD: intr.c,v 1.27 2009/12/31 12:52:35 jsing Exp $	*/
 
 /*
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.6 2022/02/26 03:02:25 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.7 2022/05/19 06:41:45 skrll Exp $");
 
 #define __MUTEX_PRIVATE
 
@@ -339,8 +339,8 @@ hppa_intr(struct trapframe *frame)
 	extern char _lock_cas_ras_end[];
 
 	if (frame->tf_iisq_head == HPPA_SID_KERNEL &&
-	frame->tf_iioq_head >= (u_int)_lock_cas_ras_start &&
-	frame->tf_iioq_head <= (u_int)_lock_cas_ras_end) {
+	frame->tf_iioq_head > (u_int)_lock_cas_ras_start &&
+	frame->tf_iioq_head < (u_int)_lock_cas_ras_end) {
 		frame->tf_iioq_head = (u_int)_lock_cas_ras_start;
 		frame->tf_iioq_tail = (u_int)_lock_cas_ras_start + 4;
 	}
@@ -353,8 +353,8 @@ hppa_intr(struct trapframe *frame)
 	 * the owner value is left unset.
 	 */
 	if (frame->tf_iisq_head == HPPA_SID_KERNEL &&
-	frame->tf_iioq_head >= (u_int)mutex_enter_crit_start &&
-	frame->tf_iioq_head <= (u_int)mutex_enter_crit_end &&
+	frame->tf_iioq_head > (u_int)mutex_enter_crit_start &&
+	frame->tf_iioq_head < (u_int)mutex_enter_crit_end &&
 	frame->tf_ret0 != 0)
 		((kmutex_t *)frame->tf_arg0)->mtx_owner = (uintptr_t)curlwp;
 #endif

Index: src/sys/arch/hppa/hppa/lock_stubs.S
diff -u src/sys/arch/hppa/hppa/lock_stubs.S:1.28 src/sys/arch/hppa/hppa/lock_stubs.S:1.29
--- src/sys/arch/hppa/hppa/lock_stubs.S:1.28	Sun Mar 20 20:19:34 2022
+++ src/sys/arch/hppa/hppa/lock_stubs.S	Thu May 19 06:41:45 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: lock_stubs.S,v 1.28 2022/03/20 20:19:34 andvar Exp $	*/
+/*	$NetBSD: lock_stubs.S,v 1.29 2022/05/19 06:41:45 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2006, 2007 The NetBSD Foundation, Inc.
@@ -155,8 +155,8 @@ mutex_enter_crit_start:
 	GET_CURLWP(%t2)
 
 	bv	%r0(%rp)
-mutex_enter_crit_end:
 	 stw	%t2, MTX_OWNER(%arg0)
+mutex_enter_crit_end:
 EXIT(mutex_enter)
 
 #endif	/* !LOCKDEBUG */
@@ -171,8 +171,8 @@ _lock_cas_ras_start:
 	ldw	0(%arg0),%t1
 	comb,<>	%arg1, %t1, 1f
 	 copy	%t1,%ret0
-_lock_cas_ras_end:
 	stw	%arg2,0(%arg0)
+_lock_cas_ras_end:
 	copy	%arg1,%ret0
 1:
 	bv,n	%r0(%rp)



CVS commit: src/sys/arch/hppa/hppa

2022-05-19 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu May 19 06:41:45 UTC 2022

Modified Files:
src/sys/arch/hppa/hppa: intr.c lock_stubs.S

Log Message:
port-hppa/56837: RAS support is slightly incorrect within hppa kernel, too

While there isn't a bug here (the tf_iioq_tail handling is correct) apply
the change to make the conditional / ras symbols consistent with hppa_ras


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/hppa/hppa/intr.c
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/hppa/hppa/lock_stubs.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/hppa/hppa

2022-05-14 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat May 14 06:07:53 UTC 2022

Modified Files:
src/sys/arch/hppa/hppa: idle_machdep.c machdep.c

Log Message:
Add some special NOPs to help qemu.

thanks to Helge Deller for the heads-up.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/hppa/hppa/idle_machdep.c
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/hppa/hppa/machdep.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/hppa/hppa/idle_machdep.c
diff -u src/sys/arch/hppa/hppa/idle_machdep.c:1.3 src/sys/arch/hppa/hppa/idle_machdep.c:1.4
--- src/sys/arch/hppa/hppa/idle_machdep.c:1.3	Mon Apr 15 20:45:08 2019
+++ src/sys/arch/hppa/hppa/idle_machdep.c	Sat May 14 06:07:53 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: idle_machdep.c,v 1.3 2019/04/15 20:45:08 skrll Exp $	*/
+/*	$NetBSD: idle_machdep.c,v 1.4 2022/05/14 06:07:53 skrll Exp $	*/
 
 /*
  * Copyright (c) 2002, 2006, 2007 YAMAMOTO Takashi,
@@ -28,7 +28,7 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: idle_machdep.c,v 1.3 2019/04/15 20:45:08 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: idle_machdep.c,v 1.4 2022/05/14 06:07:53 skrll Exp $");
 
 #include 
 #include 
@@ -36,5 +36,8 @@ __KERNEL_RCSID(0, "$NetBSD: idle_machdep
 void
 cpu_idle(void)
 {
-	/* do nothing */
+/*
+	 * This NOP instruction is used by qemu to detect the idle loop.
+	 */
+	__asm volatile("or	%%r10,%%r10,%%r10" ::: "memory");
 }

Index: src/sys/arch/hppa/hppa/machdep.c
diff -u src/sys/arch/hppa/hppa/machdep.c:1.16 src/sys/arch/hppa/hppa/machdep.c:1.17
--- src/sys/arch/hppa/hppa/machdep.c:1.16	Mon Sep 14 16:11:32 2020
+++ src/sys/arch/hppa/hppa/machdep.c	Sat May 14 06:07:53 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.16 2020/09/14 16:11:32 skrll Exp $	*/
+/*	$NetBSD: machdep.c,v 1.17 2022/05/14 06:07:53 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.16 2020/09/14 16:11:32 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.17 2022/05/14 06:07:53 skrll Exp $");
 
 #include "opt_cputype.h"
 #include "opt_ddb.h"
@@ -1447,8 +1447,13 @@ cpu_reboot(int howto, char *user_boot_st
 		:: "r" (CMD_RESET), "r" (HPPA_LBCAST + iomod_command));
 	}
 
-	for (;;)
-		/* loop while bus reset is coming up */ ;
+	for (;;) {
+		/*
+		 * loop while bus reset is coming up.  This NOP instruction
+		 * is used by qemu to detect the 'death loop'.
+		 */
+		__asm volatile("or %%r31, %%r31, %%r31" ::: "memory");
+	}
 	/* NOTREACHED */
 }
 



CVS commit: src/sys/arch/hppa/hppa

2022-05-14 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat May 14 06:07:53 UTC 2022

Modified Files:
src/sys/arch/hppa/hppa: idle_machdep.c machdep.c

Log Message:
Add some special NOPs to help qemu.

thanks to Helge Deller for the heads-up.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/hppa/hppa/idle_machdep.c
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/hppa/hppa/machdep.c

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



CVS commit: src/sys/arch/hppa/hppa

2022-05-13 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri May 13 18:40:03 UTC 2022

Modified Files:
src/sys/arch/hppa/hppa: hppa_machdep.c

Log Message:
port-hppa/56830: RAS support is slightly incorrect on hppa

When searching for RAS use tf_iioq_head without the HPPA_PC_PRIV_MASK bits
set.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/hppa/hppa/hppa_machdep.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/hppa/hppa/hppa_machdep.c
diff -u src/sys/arch/hppa/hppa/hppa_machdep.c:1.32 src/sys/arch/hppa/hppa/hppa_machdep.c:1.33
--- src/sys/arch/hppa/hppa/hppa_machdep.c:1.32	Sun Aug 22 20:18:39 2021
+++ src/sys/arch/hppa/hppa/hppa_machdep.c	Fri May 13 18:40:02 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: hppa_machdep.c,v 1.32 2021/08/22 20:18:39 andvar Exp $	*/
+/*	$NetBSD: hppa_machdep.c,v 1.33 2022/05/13 18:40:02 skrll Exp $	*/
 
 /*-
  * Copyright (c) 1997, 2019 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: hppa_machdep.c,v 1.32 2021/08/22 20:18:39 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hppa_machdep.c,v 1.33 2022/05/13 18:40:02 skrll Exp $");
 
 #include 
 #include 
@@ -279,7 +279,9 @@ hppa_ras(struct lwp *l)
 
 	p = l->l_proc;
 	tf = l->l_md.md_regs;
-	rasaddr = (intptr_t)ras_lookup(p, (void *)tf->tf_iioq_head);
+
+	rasaddr = (intptr_t)ras_lookup(p,
+	(void *)(tf->tf_iioq_head & ~HPPA_PC_PRIV_MASK));
 	if (rasaddr != -1) {
 		rasaddr |= HPPA_PC_PRIV_USER;
 		tf->tf_iioq_head = rasaddr;



CVS commit: src/sys/arch/hppa/hppa

2022-05-13 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri May 13 18:40:03 UTC 2022

Modified Files:
src/sys/arch/hppa/hppa: hppa_machdep.c

Log Message:
port-hppa/56830: RAS support is slightly incorrect on hppa

When searching for RAS use tf_iioq_head without the HPPA_PC_PRIV_MASK bits
set.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/hppa/hppa/hppa_machdep.c

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



CVS commit: src/sys/arch/hppa/hppa

2022-04-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Apr  9 23:43:12 UTC 2022

Modified Files:
src/sys/arch/hppa/hppa: ipifuncs.c

Log Message:
hppa: Convert ipiuncs.c to membar_release/acquire.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/hppa/hppa/ipifuncs.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/hppa/hppa/ipifuncs.c
diff -u src/sys/arch/hppa/hppa/ipifuncs.c:1.6 src/sys/arch/hppa/hppa/ipifuncs.c:1.7
--- src/sys/arch/hppa/hppa/ipifuncs.c:1.6	Sat Feb 12 17:09:07 2022
+++ src/sys/arch/hppa/hppa/ipifuncs.c	Sat Apr  9 23:43:12 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: ipifuncs.c,v 1.6 2022/02/12 17:09:07 riastradh Exp $	*/
+/*	$NetBSD: ipifuncs.c,v 1.7 2022/04/09 23:43:12 riastradh Exp $	*/
 /*	$OpenBSD: ipi.c,v 1.4 2011/01/14 13:20:06 jsing Exp $	*/
 
 /*
@@ -83,7 +83,7 @@ hppa_ipi_intr(void *arg)
 
 	/* Handle an IPI. */
 	ipi_pending = atomic_swap_ulong(>ci_ipi, 0);
-	membar_enter();	/* matches membar_exit in xc_send_ipi, cpu_ipi */
+	membar_acquire(); /* matches membar_release in xc_send_ipi, cpu_ipi */
 
 	KASSERT(ipi_pending);
 
@@ -169,7 +169,7 @@ xc_send_ipi(struct cpu_info *ci)
 	KASSERT(kpreempt_disabled());
 	KASSERT(curcpu() != ci);
 
-	membar_exit();		/* matches membar_enter in hppa_ipi_intr */
+	membar_release();	/* matches membar_acquire in hppa_ipi_intr */
 	if (ci) {
 		/* Unicast: remote CPU. */
 		hppa_ipi_send(ci, HPPA_IPI_XCALL);
@@ -185,7 +185,7 @@ cpu_ipi(struct cpu_info *ci)
 	KASSERT(kpreempt_disabled());
 	KASSERT(curcpu() != ci);
 
-	membar_exit();		/* matches membar_enter in hppa_ipi_intr */
+	membar_release();	/* matches membar_acquire in hppa_ipi_intr */
 	if (ci) {
 		/* Unicast: remote CPU. */
 		hppa_ipi_send(ci, HPPA_IPI_GENERIC);



CVS commit: src/sys/arch/hppa/hppa

2022-04-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Apr  9 23:43:12 UTC 2022

Modified Files:
src/sys/arch/hppa/hppa: ipifuncs.c

Log Message:
hppa: Convert ipiuncs.c to membar_release/acquire.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/hppa/hppa/ipifuncs.c

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



CVS commit: src/sys/arch/hppa/hppa

2022-03-30 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Wed Mar 30 22:34:48 UTC 2022

Modified Files:
src/sys/arch/hppa/hppa: mainbus.c

Log Message:
get machine_ledaddr from PDC if we find one
now USELEDS works on my c360


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/hppa/hppa/mainbus.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/hppa/hppa/mainbus.c
diff -u src/sys/arch/hppa/hppa/mainbus.c:1.8 src/sys/arch/hppa/hppa/mainbus.c:1.9
--- src/sys/arch/hppa/hppa/mainbus.c:1.8	Sat Aug  7 16:18:55 2021
+++ src/sys/arch/hppa/hppa/mainbus.c	Wed Mar 30 22:34:48 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: mainbus.c,v 1.8 2021/08/07 16:18:55 thorpej Exp $	*/
+/*	$NetBSD: mainbus.c,v 1.9 2022/03/30 22:34:48 macallan Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.8 2021/08/07 16:18:55 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.9 2022/03/30 22:34:48 macallan Exp $");
 
 #include "locators.h"
 #include "power.h"
@@ -1412,16 +1412,22 @@ mbattach(device_t parent, device_t self,
 #if NLCD > 0
 	memset(, 0, sizeof(nca));
 	err = pdcproc_chassis_info(_chassis_info, _pcl);
-	if (!err && nca.ca_pcl.enabled) {
-		nca.ca_name = "lcd";
-		nca.ca_dp.dp_bc[0] = nca.ca_dp.dp_bc[1] = nca.ca_dp.dp_bc[2] =
-		nca.ca_dp.dp_bc[3] = nca.ca_dp.dp_bc[4] = nca.ca_dp.dp_bc[5] = -1;
-		nca.ca_dp.dp_mod = -1;
-		nca.ca_irq = HPPACF_IRQ_UNDEF;
-		nca.ca_iot = _bustag;
-		nca.ca_hpa = nca.ca_pcl.cmd_addr;
-
-		config_found(self, , mbprint, CFARGS_NONE);
+	if (!err) {
+		if (nca.ca_pcl.enabled) {
+			nca.ca_name = "lcd";
+			nca.ca_dp.dp_bc[0] = nca.ca_dp.dp_bc[1] = nca.ca_dp.dp_bc[2] =
+			nca.ca_dp.dp_bc[3] = nca.ca_dp.dp_bc[4] = nca.ca_dp.dp_bc[5] = -1;
+			nca.ca_dp.dp_mod = -1;
+			nca.ca_irq = HPPACF_IRQ_UNDEF;
+			nca.ca_iot = _bustag;
+			nca.ca_hpa = nca.ca_pcl.cmd_addr;
+
+			config_found(self, , mbprint, CFARGS_NONE);
+		} else if (nca.ca_pcl.model == 2) {
+			bus_space_map(_bustag, nca.ca_pcl.cmd_addr,
+		  	  4, 0, (bus_space_handle_t *)_ledaddr);
+		  	machine_ledword = 1;
+		}
 	}
 #endif
 



CVS commit: src/sys/arch/hppa/hppa

2022-03-30 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Wed Mar 30 22:34:48 UTC 2022

Modified Files:
src/sys/arch/hppa/hppa: mainbus.c

Log Message:
get machine_ledaddr from PDC if we find one
now USELEDS works on my c360


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/hppa/hppa/mainbus.c

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



CVS commit: src/sys/arch/hppa/hppa

2022-02-24 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Feb 24 08:06:41 UTC 2022

Modified Files:
src/sys/arch/hppa/hppa: db_machdep.c

Log Message:
whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/hppa/hppa/db_machdep.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/hppa/hppa/db_machdep.c
diff -u src/sys/arch/hppa/hppa/db_machdep.c:1.9 src/sys/arch/hppa/hppa/db_machdep.c:1.10
--- src/sys/arch/hppa/hppa/db_machdep.c:1.9	Tue Feb 23 07:13:52 2021
+++ src/sys/arch/hppa/hppa/db_machdep.c	Thu Feb 24 08:06:41 2022
@@ -1,4 +1,4 @@
- /*	$NetBSD: db_machdep.c,v 1.9 2021/02/23 07:13:52 mrg Exp $	*/
+/*	$NetBSD: db_machdep.c,v 1.10 2022/02/24 08:06:41 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: db_machdep.c,v 1.9 2021/02/23 07:13:52 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_machdep.c,v 1.10 2022/02/24 08:06:41 skrll Exp $");
 
 #include 
 #include 



CVS commit: src/sys/arch/hppa/hppa

2022-02-24 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Feb 24 08:06:41 UTC 2022

Modified Files:
src/sys/arch/hppa/hppa: db_machdep.c

Log Message:
whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/hppa/hppa/db_machdep.c

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



CVS commit: src/sys/arch/hppa/hppa

2022-02-12 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Feb 12 17:09:07 UTC 2022

Modified Files:
src/sys/arch/hppa/hppa: ipifuncs.c

Log Message:
hppa: Membar audit in ipifuncs.c.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/hppa/hppa/ipifuncs.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/hppa/hppa/ipifuncs.c
diff -u src/sys/arch/hppa/hppa/ipifuncs.c:1.5 src/sys/arch/hppa/hppa/ipifuncs.c:1.6
--- src/sys/arch/hppa/hppa/ipifuncs.c:1.5	Mon Apr 15 20:45:08 2019
+++ src/sys/arch/hppa/hppa/ipifuncs.c	Sat Feb 12 17:09:07 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: ipifuncs.c,v 1.5 2019/04/15 20:45:08 skrll Exp $	*/
+/*	$NetBSD: ipifuncs.c,v 1.6 2022/02/12 17:09:07 riastradh Exp $	*/
 /*	$OpenBSD: ipi.c,v 1.4 2011/01/14 13:20:06 jsing Exp $	*/
 
 /*
@@ -83,6 +83,7 @@ hppa_ipi_intr(void *arg)
 
 	/* Handle an IPI. */
 	ipi_pending = atomic_swap_ulong(>ci_ipi, 0);
+	membar_enter();	/* matches membar_exit in xc_send_ipi, cpu_ipi */
 
 	KASSERT(ipi_pending);
 
@@ -108,10 +109,22 @@ hppa_ipi_send(struct cpu_info *ci, u_lon
 
 	atomic_or_ulong(>ci_ipi, (1L << ipi));
 
-	/* Send an IPI to the specified CPU by triggering EIR{1} (irq 30). */
+	/*
+	 * Send an IPI to the specified CPU by triggering EIR{1} (irq 30).
+	 *
+	 * The `load-acquire operation' matching this store-release is
+	 * somewhere inside the silicon or firmware -- the point is
+	 * that the store to ci->ci_ipi above must happen before
+	 * writing to EIR{1}; there is conceptually some magic inside
+	 * the silicon or firmware on the target CPU that effectively
+	 * does
+	 *
+	 *	if (atomic_load_acquire(>io_eir)) {
+	 *		enter_interrupt_vector();
+	 *	}
+	 */
 	cpu = (struct iomod *)(ci->ci_hpa);
-	cpu->io_eir = 1;
-	membar_sync();
+	atomic_store_release(>io_eir, 1);
 
 	return 0;
 }
@@ -156,6 +169,7 @@ xc_send_ipi(struct cpu_info *ci)
 	KASSERT(kpreempt_disabled());
 	KASSERT(curcpu() != ci);
 
+	membar_exit();		/* matches membar_enter in hppa_ipi_intr */
 	if (ci) {
 		/* Unicast: remote CPU. */
 		hppa_ipi_send(ci, HPPA_IPI_XCALL);
@@ -171,6 +185,7 @@ cpu_ipi(struct cpu_info *ci)
 	KASSERT(kpreempt_disabled());
 	KASSERT(curcpu() != ci);
 
+	membar_exit();		/* matches membar_enter in hppa_ipi_intr */
 	if (ci) {
 		/* Unicast: remote CPU. */
 		hppa_ipi_send(ci, HPPA_IPI_GENERIC);



CVS commit: src/sys/arch/hppa/hppa

2022-02-12 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Feb 12 17:09:07 UTC 2022

Modified Files:
src/sys/arch/hppa/hppa: ipifuncs.c

Log Message:
hppa: Membar audit in ipifuncs.c.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/hppa/hppa/ipifuncs.c

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



CVS commit: src/sys/arch/hppa/hppa

2021-12-31 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Sat Jan  1 01:03:50 UTC 2022

Modified Files:
src/sys/arch/hppa/hppa: vm_machdep.c

Log Message:
make this compile again by moving a KASSERT into the #ifdef DIAGNOSTIC block
it depends on


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/sys/arch/hppa/hppa/vm_machdep.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/hppa/hppa/vm_machdep.c
diff -u src/sys/arch/hppa/hppa/vm_machdep.c:1.55 src/sys/arch/hppa/hppa/vm_machdep.c:1.56
--- src/sys/arch/hppa/hppa/vm_machdep.c:1.55	Mon Apr 15 06:16:42 2019
+++ src/sys/arch/hppa/hppa/vm_machdep.c	Sat Jan  1 01:03:50 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: vm_machdep.c,v 1.55 2019/04/15 06:16:42 skrll Exp $	*/
+/*	$NetBSD: vm_machdep.c,v 1.56 2022/01/01 01:03:50 macallan Exp $	*/
 
 /*	$OpenBSD: vm_machdep.c,v 1.64 2008/09/30 18:54:26 miod Exp $	*/
 
@@ -29,7 +29,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.55 2019/04/15 06:16:42 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.56 2022/01/01 01:03:50 macallan Exp $");
 
 #include 
 #include 
@@ -62,9 +62,8 @@ cpu_activate_pcb(struct lwp *l)
 #ifdef DIAGNOSTIC
 	vaddr_t uarea = (vaddr_t)pcb;
 	vaddr_t maxsp = uarea + USPACE;
-#endif
 	KASSERT(tf == (void *)(uarea + PAGE_SIZE));
-
+#endif
 	/*
 	 * Stash the physical address of FP regs for later perusal
 	 */



CVS commit: src/sys/arch/hppa/hppa

2021-12-31 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Sat Jan  1 01:03:50 UTC 2022

Modified Files:
src/sys/arch/hppa/hppa: vm_machdep.c

Log Message:
make this compile again by moving a KASSERT into the #ifdef DIAGNOSTIC block
it depends on


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/sys/arch/hppa/hppa/vm_machdep.c

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



CVS commit: src/sys/arch/hppa/hppa

2021-10-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Oct 28 11:11:11 UTC 2021

Modified Files:
src/sys/arch/hppa/hppa: locore.S
Added Files:
src/sys/arch/hppa/hppa: sigcode.S

Log Message:
put back the compat signal code; still have the stubs for it in libc


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/hppa/hppa/locore.S
cvs rdiff -u -r0 -r1.10 src/sys/arch/hppa/hppa/sigcode.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/hppa/hppa/locore.S
diff -u src/sys/arch/hppa/hppa/locore.S:1.5 src/sys/arch/hppa/hppa/locore.S:1.6
--- src/sys/arch/hppa/hppa/locore.S:1.5	Wed Oct 27 17:42:58 2021
+++ src/sys/arch/hppa/hppa/locore.S	Thu Oct 28 07:11:11 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.S,v 1.5 2021/10/27 21:42:58 christos Exp $	*/
+/*	$NetBSD: locore.S,v 1.6 2021/10/28 11:11:11 christos Exp $	*/
 /*	$OpenBSD: locore.S,v 1.158 2008/07/28 19:08:46 miod Exp $	*/
 
 /*
@@ -1000,4 +1000,7 @@ ENTRY_NOPROFILE(lwp_trampoline,HPPA_FRAM
 	ldw	L_MD(%t2), %t3
 EXIT(lwp_trampoline)
 
+/* Include the signal code, used in compat code */
+#include 
+
 	.end

Added files:

Index: src/sys/arch/hppa/hppa/sigcode.S
diff -u /dev/null src/sys/arch/hppa/hppa/sigcode.S:1.10
--- /dev/null	Thu Oct 28 07:11:11 2021
+++ src/sys/arch/hppa/hppa/sigcode.S	Thu Oct 28 07:11:11 2021
@@ -0,0 +1,118 @@
+/*	$NetBSD: sigcode.S,v 1.10 2021/10/28 11:11:11 christos Exp $	*/
+
+/*	$OpenBSD: locore.S,v 1.46 2001/09/20 18:33:03 mickey Exp $	*/
+
+/*
+ * Copyright (c) 1998-2004 Michael Shalayeff
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR OR HIS RELATIVES BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF MIND, USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * Portitions of this file are derived from other sources, see
+ * the copyrights and acknowledgements below.
+ */
+/*
+ * Copyright (c) 1990,1991,1992,1994 The University of Utah and
+ * the Computer Systems Laboratory (CSL).  All rights reserved.
+ *
+ * THE UNIVERSITY OF UTAH AND CSL PROVIDE THIS SOFTWARE IN ITS "AS IS"
+ * CONDITION, AND DISCLAIM ANY LIABILITY OF ANY KIND FOR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM ITS USE.
+ *
+ * CSL requests users of this software to return to csl-d...@cs.utah.edu any
+ * improvements that they make and grant CSL redistribution rights.
+ *
+ *	Utah $Hdr: locore.s 1.62 94/12/15$
+ */
+/*
+ *  (c) Copyright 1988 HEWLETT-PACKARD COMPANY
+ *
+ *  To anyone who acknowledges that this file is provided "AS IS"
+ *  without any express or implied warranty:
+ *  permission to use, copy, modify, and distribute this file
+ *  for any purpose is hereby granted without fee, provided that
+ *  the above copyright notice and this notice appears in all
+ *  copies, and that the name of Hewlett-Packard Company not be
+ *  used in advertising or publicity pertaining to distribution
+ *  of the software without specific, written prior permission.
+ *  Hewlett-Packard Company makes no representations about the
+ *  suitability of this software for any purpose.
+ */
+
+/*
+ * NOTICE: This is not a standalone file.  To use it, #include it in
+ * your port's locore.S, like so:
+ *
+ *	#include 
+ */
+
+/*
+ * Signal "trampoline" code. Invoked from RTE setup by sendsig().
+ */
+ENTRY_NOPROFILE(sigcode,0)
+	.call
+	/*
+	 * Our sendsig() places the address of the signal handler
+	 * in %arg3.  It may actually be a PLABEL.
+	 */
+	bb,>=,n	%arg3, 30, L$sigcode_bounce	; branch if not a PLABEL
+	depi	0, 31, 2, %arg3			; zero L bit in PLABEL pointer
+	ldw	4(%arg3), %r19			; load shared library linkage
+	ldw	0(%arg3), %arg3			; load real catcher address
+L$sigcode_bounce:
+	/*
+	 * This blr puts the address of the following nop in rp.
+	 * It also schedules the nop for execution, which is why

CVS commit: src/sys/arch/hppa/hppa

2021-10-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Oct 28 11:11:11 UTC 2021

Modified Files:
src/sys/arch/hppa/hppa: locore.S
Added Files:
src/sys/arch/hppa/hppa: sigcode.S

Log Message:
put back the compat signal code; still have the stubs for it in libc


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/hppa/hppa/locore.S
cvs rdiff -u -r0 -r1.10 src/sys/arch/hppa/hppa/sigcode.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/hppa/hppa

2021-10-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Oct 27 21:42:58 UTC 2021

Modified Files:
src/sys/arch/hppa/hppa: locore.S
Removed Files:
src/sys/arch/hppa/hppa: sigcode.S

Log Message:
@thorpej wrote that sigcontext was never used on hppa; remove kernel handling
signal code. discussed also with @skrll


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/hppa/hppa/locore.S
cvs rdiff -u -r1.8 -r0 src/sys/arch/hppa/hppa/sigcode.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/hppa/hppa/locore.S
diff -u src/sys/arch/hppa/hppa/locore.S:1.4 src/sys/arch/hppa/hppa/locore.S:1.5
--- src/sys/arch/hppa/hppa/locore.S:1.4	Wed Jan  8 15:59:18 2020
+++ src/sys/arch/hppa/hppa/locore.S	Wed Oct 27 17:42:58 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.S,v 1.4 2020/01/08 20:59:18 skrll Exp $	*/
+/*	$NetBSD: locore.S,v 1.5 2021/10/27 21:42:58 christos Exp $	*/
 /*	$OpenBSD: locore.S,v 1.158 2008/07/28 19:08:46 miod Exp $	*/
 
 /*
@@ -1000,7 +1000,4 @@ ENTRY_NOPROFILE(lwp_trampoline,HPPA_FRAM
 	ldw	L_MD(%t2), %t3
 EXIT(lwp_trampoline)
 
-/* Include the signal code. */
-#include 
-
 	.end



CVS commit: src/sys/arch/hppa/hppa

2021-10-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Oct 27 21:42:58 UTC 2021

Modified Files:
src/sys/arch/hppa/hppa: locore.S
Removed Files:
src/sys/arch/hppa/hppa: sigcode.S

Log Message:
@thorpej wrote that sigcontext was never used on hppa; remove kernel handling
signal code. discussed also with @skrll


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/hppa/hppa/locore.S
cvs rdiff -u -r1.8 -r0 src/sys/arch/hppa/hppa/sigcode.S

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



Re: CVS commit: src/sys/arch/hppa/hppa

2010-04-26 Thread Nick Hudson
On Monday 26 April 2010 13:10:52 Nick Hudson wrote:
 Module Name:  src
 Committed By: skrll
 Date: Mon Apr 26 12:10:51 UTC 2010
 
 Modified Files:
   src/sys/arch/hppa/hppa: trap.S
 
 Log Message:
 Remove used BSS allocation.

s/used/un/

DOH!

Fix in repo.

Nick


CVS commit: src/sys/arch/hppa/hppa

2010-03-10 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Mar 10 18:17:42 UTC 2010

Modified Files:
src/sys/arch/hppa/hppa: trap.S

Log Message:
Comment improvements.


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/sys/arch/hppa/hppa/trap.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/hppa/hppa

2010-03-10 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Mar 10 18:53:40 UTC 2010

Modified Files:
src/sys/arch/hppa/hppa: trap.S

Log Message:
More comment improvement.


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/sys/arch/hppa/hppa/trap.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/hppa/hppa

2010-03-10 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Mar 10 18:53:40 UTC 2010

Modified Files:
src/sys/arch/hppa/hppa: trap.S

Log Message:
More comment improvement.


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/sys/arch/hppa/hppa/trap.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/hppa/hppa/trap.S
diff -u src/sys/arch/hppa/hppa/trap.S:1.42 src/sys/arch/hppa/hppa/trap.S:1.43
--- src/sys/arch/hppa/hppa/trap.S:1.42	Wed Mar 10 18:17:42 2010
+++ src/sys/arch/hppa/hppa/trap.S	Wed Mar 10 18:53:40 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap.S,v 1.42 2010/03/10 18:17:42 skrll Exp $	*/
+/*	$NetBSD: trap.S,v 1.43 2010/03/10 18:53:40 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -125,9 +125,8 @@
  * Kernel Gateway Page (must be at known address)
  *	System Call Gate
  *
- * GATEway instructions have to be at a fixed known locations
- * because their addresses are hard coded in routines such as
- * those in the C library.
+ * GATEway instructions have to be at a fixed known locations because their
+ * addresses are hard coded in routines such as those in the C library.
  */
 
 	.align	NBPG
@@ -169,8 +168,8 @@
 
 bsd_syscall:
 	/*
-	 * set up a space register and a protection id so that
-	 * we can access kernel memory
+	 * Set up a space register and a protection id so that we can access
+	 * kernel memory.
 	 */
 	mfctl	%eiem, %r1
 	mtctl	%r0, %eiem
@@ -212,16 +211,16 @@
 	ldw	L_PCB(%sr1, %t3), %t2			/* XXX can use ,sl */
 
 	/*
-	 * NB: Even though t4 is a caller-saved register, we
-	 * save it anyways, as a convenience to __vfork14 and
-	 * any other syscalls that absolutely must have a 
-	 * register that is saved for it.
+	 * NB: Even though t4 is a caller-saved register, we save it anyways, as
+	 * a convenience to __vfork14 and any other syscalls that absolutely
+	 * must have a register that is saved for it.
 	 */
+
 	/* calculate kernel sp, load, create kernel stack frame */
-	ldo	NBPG+TRAPFRAME_SIZEOF(%t2), %t3	/* see cpu_lwp_fork */
+	ldo	NBPG+TRAPFRAME_SIZEOF(%t2), %t3		/* see cpu_lwp_fork */
 
-	stw	%t4, TF_R19 -TRAPFRAME_SIZEOF(%sr1, %t3)/* t4 for vfork */
-	stw	%t1, TF_R22 -TRAPFRAME_SIZEOF(%sr1, %t3)/* syscall # */
+	stw	%t4, TF_R19-TRAPFRAME_SIZEOF(%sr1, %t3)	/* t4 for vfork */
+	stw	%t1, TF_R22-TRAPFRAME_SIZEOF(%sr1, %t3)	/* syscall # */
 	copy	%sp, %t4
 
 	/* gotta save the args, in case we gonna restart */
@@ -235,8 +234,8 @@
 	/*
 	 * Make space for the syscall arguments.
 	 *
-	 * Match the offset from %sp to the trapframe with the
-	 * offset in TLABEL(all) for the benefit of ddb.
+	 * Match the offset from %sp to the trapframe with the offset in
+	 * TLABEL(all) for the benefit of ddb.
 	 */
 	stwm	%r0, HPPA_FRAME_SIZE+HPPA_FRAME_MAXARGS(%sr1, %sp)
 
@@ -259,11 +258,11 @@
 	mtctl	%r1, %eiem
 
 	/*
-	 * Normally, we only have to save the caller-saved registers,
-	 * because the callee-saved registers will be naturally
-	 * saved and restored by our callee(s).  However, see the
-	 * longer comment in the trap handling code below for the
-	 * reasons why we need to save and restore all of them.
+	 * Normally, we only have to save the caller-saved registers, because
+	 * the callee-saved registers will be naturally saved and restored by
+	 * our callee(s).  However, see the longer comment in the trap handling
+	 * code below for the reasons why we need to save and restore all of
+	 * them.
 	 */
 	stw	%r2 , TF_R2 -TRAPFRAME_SIZEOF(%sr1, %t3)
 	stw	%r3 , TF_R3 -TRAPFRAME_SIZEOF(%sr1, %t3)
@@ -294,15 +293,13 @@
 	stw	%r0, HPPA_FRAME_CRP(%sr1, %sp)
 
 	/*
-	 * Is this copying required... OpenBSD doesn't do it!
-	 *
 	 * Copy Arguments
-	 * unfortunately mmap() under bsd requires 7 words;
-	 * linux is confined to 5, and hpux to 6.
-	 * assuming the `long' syscall it gives us the maximum
-	 * 9 words, which very much overkill for an average of 3.
-	 * we keep it at 10, since bundling will keep it
-	 * at the same speed as 9 anyway.
+	 *
+	 * Unfortunately mmap() under bsd requires 7 words; linux is confined to
+	 * 5, and hpux to 6.  Assuming the `long' syscall it gives us the
+	 * maximum 9 words, which very much overkill for an average of 3.  We
+	 * keep it at 10, since bundling will keep it at the same speed as 9
+	 * anyway.
 	 */
 	/*
 	 * XXX fredette - possible security hole here.
@@ -448,9 +445,8 @@
 	ldw	TF_R2(%t3), %r2
 	ldw	TF_R3(%t3), %r3
 	/*
-	 * See the comment in the trap handling code below
-	 * about why we need to save and restore all general
-	 * registers under these cases.
+	 * See the comment in the trap handling code below about why we need to
+	 * save and restore all general registers under these cases.
 	 */
 #if defined(DDB) || defined(KGDB) || defined(FPEMUL)
 	ldw	TF_R4(%t3), %r4
@@ -516,10 +512,10 @@
 	mtctl	%t1, CR_UPADDR
 
 	/*
-	 * clear the system mask, this puts us back into physical mode.
-	

CVS commit: src/sys/arch/hppa/hppa

2010-03-08 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon Mar  8 14:52:29 UTC 2010

Modified Files:
src/sys/arch/hppa/hppa: vm_machdep.c

Log Message:
Set the frame pointer of newly created and function changing LWPs to 0
for the benefit of DDB.


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/sys/arch/hppa/hppa/vm_machdep.c

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



CVS commit: src/sys/arch/hppa/hppa

2010-02-23 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Feb 24 06:38:53 UTC 2010

Modified Files:
src/sys/arch/hppa/hppa: pmap.c

Log Message:
s/printf/db_printf/ in a few places.


To generate a diff of this commit:
cvs rdiff -u -r1.68 -r1.69 src/sys/arch/hppa/hppa/pmap.c

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



CVS commit: src/sys/arch/hppa/hppa

2010-02-13 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Feb 13 10:38:55 UTC 2010

Modified Files:
src/sys/arch/hppa/hppa: trap.S

Log Message:
Whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/sys/arch/hppa/hppa/trap.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/hppa/hppa

2010-02-13 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Feb 13 10:39:39 UTC 2010

Modified Files:
src/sys/arch/hppa/hppa: trap.S

Log Message:
Remove unnecessary comment.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/hppa/hppa/trap.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/hppa/hppa

2010-02-10 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Feb 10 20:49:58 UTC 2010

Modified Files:
src/sys/arch/hppa/hppa: trap.c

Log Message:
Minor tweaks.


To generate a diff of this commit:
cvs rdiff -u -r1.72 -r1.73 src/sys/arch/hppa/hppa/trap.c

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



CVS commit: src/sys/arch/hppa/hppa

2010-02-10 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Feb 10 20:51:23 UTC 2010

Modified Files:
src/sys/arch/hppa/hppa: trap.c

Log Message:
Reformat a comment.


To generate a diff of this commit:
cvs rdiff -u -r1.73 -r1.74 src/sys/arch/hppa/hppa/trap.c

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



CVS commit: src/sys/arch/hppa/hppa

2010-02-10 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Feb 10 20:52:35 UTC 2010

Modified Files:
src/sys/arch/hppa/hppa: trap.c

Log Message:
Remove a cast by fixing a printf format.


To generate a diff of this commit:
cvs rdiff -u -r1.74 -r1.75 src/sys/arch/hppa/hppa/trap.c

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



CVS commit: src/sys/arch/hppa/hppa

2010-01-17 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Jan 17 08:50:04 UTC 2010

Modified Files:
src/sys/arch/hppa/hppa: trap.c vm_machdep.c

Log Message:
Use pmap_extract instead of kvtop.


To generate a diff of this commit:
cvs rdiff -u -r1.70 -r1.71 src/sys/arch/hppa/hppa/trap.c
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/hppa/hppa/vm_machdep.c

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



CVS commit: src/sys/arch/hppa/hppa

2010-01-16 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Jan 16 13:53:59 UTC 2010

Modified Files:
src/sys/arch/hppa/hppa: trap.S

Log Message:
Tweak comment. From OpenBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sys/arch/hppa/hppa/trap.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/hppa/hppa

2010-01-15 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Jan 16 07:37:21 UTC 2010

Modified Files:
src/sys/arch/hppa/hppa: trap.c

Log Message:
Rename type_raw to trapnum and use in a couple more places.

Reduces diff to OpenBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.67 src/sys/arch/hppa/hppa/trap.c

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



CVS commit: src/sys/arch/hppa/hppa

2010-01-15 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Jan 16 07:45:53 UTC 2010

Modified Files:
src/sys/arch/hppa/hppa: trap.c

Log Message:
Add a comment.


To generate a diff of this commit:
cvs rdiff -u -r1.67 -r1.68 src/sys/arch/hppa/hppa/trap.c

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



CVS commit: src/sys/arch/hppa/hppa

2010-01-15 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Jan 16 07:56:16 UTC 2010

Modified Files:
src/sys/arch/hppa/hppa: trap.c

Log Message:
Check cpl level has returned to entry value when leaving trap/syscall.

From OpenBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.68 -r1.69 src/sys/arch/hppa/hppa/trap.c

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