CVS commit: src/sys/arch/powerpc/include

2024-04-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Apr  2 14:21:29 UTC 2024

Modified Files:
src/sys/arch/powerpc/include: limits.h

Log Message:
harmonize with the rest of MD limits files.


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

2024-04-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Apr  2 14:21:29 UTC 2024

Modified Files:
src/sys/arch/powerpc/include: limits.h

Log Message:
harmonize with the rest of MD limits files.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/powerpc/include/limits.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/powerpc/include/limits.h
diff -u src/sys/arch/powerpc/include/limits.h:1.20 src/sys/arch/powerpc/include/limits.h:1.21
--- src/sys/arch/powerpc/include/limits.h:1.20	Mon Jan 21 15:28:18 2019
+++ src/sys/arch/powerpc/include/limits.h	Tue Apr  2 10:21:29 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: limits.h,v 1.20 2019/01/21 20:28:18 dholland Exp $	*/
+/*	$NetBSD: limits.h,v 1.21 2024/04/02 14:21:29 christos Exp $	*/
 
 /*
  * Copyright (c) 1988, 1993
@@ -94,18 +94,9 @@
 #define	SIZE_T_MAX	UINT_MAX	/* max value for a size_t */
 #endif
 
-#ifdef _LP64
-/* Quads and longs are the same on LP64. */
-#define	UQUAD_MAX	(ULONG_MAX)
-#define	QUAD_MAX	(LONG_MAX)
-#define	QUAD_MIN	(LONG_MIN)
-#else
-/* GCC requires that quad constants be written as expressions. */
-#define	UQUAD_MAX	((u_quad_t)0-1)	/* max value for a uquad_t */
-	/* max value for a quad_t */
-#define	QUAD_MAX	((quad_t)(UQUAD_MAX >> 1))
-#define	QUAD_MIN	(-QUAD_MAX-1)	/* min value for a quad_t */
-#endif
+#define	UQUAD_MAX	0xULL		/* max unsigned quad */
+#define	QUAD_MAX	0x7fffLL		/* max signed quad */
+#define	QUAD_MIN	(-0x7fffLL-1)	/* min signed quad */
 
 #endif /* _NETBSD_SOURCE */
 #endif /* _POSIX_C_SOURCE || _XOPEN_SOURCE || _NETBSD_SOURCE */



CVS commit: src/sys/arch/powerpc/include/oea

2024-03-10 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Mar 10 17:07:31 UTC 2024

Modified Files:
src/sys/arch/powerpc/include/oea: hid.h

Log Message:
powerpc/hid: fix snprintb format for HID0_970_BITMASK_U


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/powerpc/include/oea/hid.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/powerpc/include/oea/hid.h
diff -u src/sys/arch/powerpc/include/oea/hid.h:1.14 src/sys/arch/powerpc/include/oea/hid.h:1.15
--- src/sys/arch/powerpc/include/oea/hid.h:1.14	Sat Jan 20 09:47:35 2024
+++ src/sys/arch/powerpc/include/oea/hid.h	Sun Mar 10 17:07:31 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: hid.h,v 1.14 2024/01/20 09:47:35 jmcneill Exp $	*/
+/*	$NetBSD: hid.h,v 1.15 2024/03/10 17:07:31 rillig Exp $	*/
 
 /*-
  * Copyright (c) 2000 Tsubai Masanari.  All rights reserved.
@@ -112,7 +112,7 @@
 "\040EMCP"
 
 #define HID0_970_BITMASK_U "\020" \
-"\040ONEPPC\036DOSNGL\036ISYNCSC\035SERGP\034res\033res\032res\031DEEPNAP" \
+"\040ONEPPC\037DOSNGL\036ISYNCSC\035SERGP\034res\033res\032res\031DEEPNAP" \
 "\030DOZE\027NAP\026res\025DPM\024res\023TG\022HNGDIS\021NHR" \
 "\020INORDER\017res\016TBCTRL\015EXTBEN\014res\013res\012CIABREN\011HDICEEN" \
 "\001ENATTN"



CVS commit: src/sys/arch/powerpc/include/oea

2024-03-10 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Mar 10 17:07:31 UTC 2024

Modified Files:
src/sys/arch/powerpc/include/oea: hid.h

Log Message:
powerpc/hid: fix snprintb format for HID0_970_BITMASK_U


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/powerpc/include/oea/hid.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/powerpc/include

2024-01-22 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Tue Jan 23 04:15:54 UTC 2024

Modified Files:
src/sys/arch/powerpc/include: ieee.h

Log Message:
powerpc/ieee.h: Protect from multiple includes

Fix build failure triggered by import of libm long-double functions.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/powerpc/include/ieee.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/powerpc/include

2024-01-22 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Tue Jan 23 04:15:54 UTC 2024

Modified Files:
src/sys/arch/powerpc/include: ieee.h

Log Message:
powerpc/ieee.h: Protect from multiple includes

Fix build failure triggered by import of libm long-double functions.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/powerpc/include/ieee.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/powerpc/include/ieee.h
diff -u src/sys/arch/powerpc/include/ieee.h:1.6 src/sys/arch/powerpc/include/ieee.h:1.7
--- src/sys/arch/powerpc/include/ieee.h:1.6	Wed Oct 22 10:32:50 2014
+++ src/sys/arch/powerpc/include/ieee.h	Tue Jan 23 04:15:54 2024
@@ -1,4 +1,7 @@
-/*	$NetBSD: ieee.h,v 1.6 2014/10/22 10:32:50 joerg Exp $	*/
+/*	$NetBSD: ieee.h,v 1.7 2024/01/23 04:15:54 rin Exp $	*/
+
+#ifndef _POWERPC_IEEE_H_
+#define _POWERPC_IEEE_H_
 
 #include 
 
@@ -16,3 +19,5 @@ union ldbl_u {
 	long double	ldblu_ld;
 	double		ldblu_d[2];
 };
+
+#endif /* !_POWERPC_IEEE_H_ */



CVS commit: src/sys/arch/powerpc/include/oea

2024-01-20 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat Jan 20 09:47:35 UTC 2024

Modified Files:
src/sys/arch/powerpc/include/oea: hid.h

Log Message:
fix comments: HID0 ICFI/DCFI are "flash invalidate", not "flush invalidate"


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/powerpc/include/oea/hid.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/powerpc/include/oea/hid.h
diff -u src/sys/arch/powerpc/include/oea/hid.h:1.13 src/sys/arch/powerpc/include/oea/hid.h:1.14
--- src/sys/arch/powerpc/include/oea/hid.h:1.13	Mon Jul  6 10:31:23 2020
+++ src/sys/arch/powerpc/include/oea/hid.h	Sat Jan 20 09:47:35 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: hid.h,v 1.13 2020/07/06 10:31:23 rin Exp $	*/
+/*	$NetBSD: hid.h,v 1.14 2024/01/20 09:47:35 jmcneill Exp $	*/
 
 /*-
  * Copyright (c) 2000 Tsubai Masanari.  All rights reserved.
@@ -81,8 +81,8 @@
 #define HID0_DCE	0x4000  /* Enable d-cache */
 #define HID0_ILOCK	0x2000  /* i-cache lock */
 #define HID0_DLOCK	0x1000  /* d-cache lock */
-#define HID0_ICFI	0x0800  /* i-cache flush invalidate */
-#define HID0_DCFI	0x0400  /* d-cache flush invalidate */
+#define HID0_ICFI	0x0800  /* i-cache flash invalidate */
+#define HID0_DCFI	0x0400  /* d-cache flash invalidate */
 #define HID0_SPD	0x0200  /* Disable speculative cache access */
 #define HID0_IFEM	0x0100  /* Enable M-bit for I-fetch */
 #define HID0_XBSEN	0x0100  /* Extended BAT block size enable (7455+) */



CVS commit: src/sys/arch/powerpc/include/oea

2024-01-20 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat Jan 20 09:47:35 UTC 2024

Modified Files:
src/sys/arch/powerpc/include/oea: hid.h

Log Message:
fix comments: HID0 ICFI/DCFI are "flash invalidate", not "flush invalidate"


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/powerpc/include/oea/hid.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/powerpc/include/booke

2023-09-28 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Sep 28 06:24:37 UTC 2023

Modified Files:
src/sys/arch/powerpc/include/booke: pmap.h

Log Message:
#define -> #define for consistency


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/powerpc/include/booke/pmap.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/powerpc/include/booke/pmap.h
diff -u src/sys/arch/powerpc/include/booke/pmap.h:1.24 src/sys/arch/powerpc/include/booke/pmap.h:1.25
--- src/sys/arch/powerpc/include/booke/pmap.h:1.24	Sun Dec 20 16:38:25 2020
+++ src/sys/arch/powerpc/include/booke/pmap.h	Thu Sep 28 06:24:37 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.h,v 1.24 2020/12/20 16:38:25 skrll Exp $	*/
+/*	$NetBSD: pmap.h,v 1.25 2023/09/28 06:24:37 skrll Exp $	*/
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -66,8 +66,8 @@
 
 #define	NBSEG		(NBPG*NPTEPG)
 #define	SEGSHIFT	(PGSHIFT + PGSHIFT - 2)
-#define SEGOFSET	((1 << SEGSHIFT) - 1)
-#define PMAP_SEGTABSIZE	(1 << (32 - SEGSHIFT))
+#define	SEGOFSET	((1 << SEGSHIFT) - 1)
+#define	PMAP_SEGTABSIZE	(1 << (32 - SEGSHIFT))
 #define	NPTEPG		(NBPG >> 2)
 
 #define	KERNEL_PID	0



CVS commit: src/sys/arch/powerpc/include/booke

2023-09-28 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Sep 28 06:24:37 UTC 2023

Modified Files:
src/sys/arch/powerpc/include/booke: pmap.h

Log Message:
#define -> #define for consistency


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/powerpc/include/booke/pmap.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/powerpc/include

2023-09-28 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Sep 28 06:19:19 UTC 2023

Modified Files:
src/sys/arch/powerpc/include/ibm4xx: pmap.h
src/sys/arch/powerpc/include/oea: pmap.h

Log Message:
Trailing whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/powerpc/include/ibm4xx/pmap.h
cvs rdiff -u -r1.37 -r1.38 src/sys/arch/powerpc/include/oea/pmap.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/powerpc/include/ibm4xx/pmap.h
diff -u src/sys/arch/powerpc/include/ibm4xx/pmap.h:1.21 src/sys/arch/powerpc/include/ibm4xx/pmap.h:1.22
--- src/sys/arch/powerpc/include/ibm4xx/pmap.h:1.21	Sat Mar 14 14:05:43 2020
+++ src/sys/arch/powerpc/include/ibm4xx/pmap.h	Thu Sep 28 06:19:19 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.h,v 1.21 2020/03/14 14:05:43 ad Exp $	*/
+/*	$NetBSD: pmap.h,v 1.22 2023/09/28 06:19:19 skrll Exp $	*/
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -69,7 +69,7 @@
 #ifndef	_IBM4XX_PMAP_H_
 #define	_IBM4XX_PMAP_H_
 
-#ifdef _LOCORE  
+#ifdef _LOCORE
 #error use assym.h instead
 #endif
 
@@ -132,7 +132,7 @@
 #define	STIDX(v)	((v) >> (PGSHIFT + 12))
 
 
-/* 
+/*
  * Extra flags to pass to pmap_enter() -- make sure they don't conflict
  * w/PMAP_CANFAIL or PMAP_WIRED
  */

Index: src/sys/arch/powerpc/include/oea/pmap.h
diff -u src/sys/arch/powerpc/include/oea/pmap.h:1.37 src/sys/arch/powerpc/include/oea/pmap.h:1.38
--- src/sys/arch/powerpc/include/oea/pmap.h:1.37	Sat May  7 07:10:46 2022
+++ src/sys/arch/powerpc/include/oea/pmap.h	Thu Sep 28 06:19:19 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.h,v 1.37 2022/05/07 07:10:46 rin Exp $	*/
+/*	$NetBSD: pmap.h,v 1.38 2023/09/28 06:19:19 skrll Exp $	*/
 
 /*-
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -34,7 +34,7 @@
 #ifndef	_POWERPC_OEA_PMAP_H_
 #define	_POWERPC_OEA_PMAP_H_
 
-#ifdef _LOCORE  
+#ifdef _LOCORE
 #error use assym.h instead
 #endif
 



CVS commit: src/sys/arch/powerpc/include

2023-09-28 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Sep 28 06:19:19 UTC 2023

Modified Files:
src/sys/arch/powerpc/include/ibm4xx: pmap.h
src/sys/arch/powerpc/include/oea: pmap.h

Log Message:
Trailing whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/powerpc/include/ibm4xx/pmap.h
cvs rdiff -u -r1.37 -r1.38 src/sys/arch/powerpc/include/oea/pmap.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/powerpc/include

2023-07-26 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Jul 26 06:36:20 UTC 2023

Modified Files:
src/sys/arch/powerpc/include: cpu.h

Log Message:
Trailing whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.123 -r1.124 src/sys/arch/powerpc/include/cpu.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/powerpc/include/cpu.h
diff -u src/sys/arch/powerpc/include/cpu.h:1.123 src/sys/arch/powerpc/include/cpu.h:1.124
--- src/sys/arch/powerpc/include/cpu.h:1.123	Tue Nov 15 12:43:14 2022
+++ src/sys/arch/powerpc/include/cpu.h	Wed Jul 26 06:36:20 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.123 2022/11/15 12:43:14 macallan Exp $	*/
+/*	$NetBSD: cpu.h,v 1.124 2023/07/26 06:36:20 skrll Exp $	*/
 
 /*
  * Copyright (C) 1999 Wolfgang Solfrank.
@@ -134,7 +134,7 @@ struct cpu_info {
 #define	ci_pmap_user_segtab	ci_pmap_segtabs[1]
 	struct pmap_tlb_info *ci_tlb_info;
 #endif /* PPC_BOOKE || ((MODULAR || _MODULE) && !_LP64) */
-	struct cache_info ci_ci;		
+	struct cache_info ci_ci;
 	void *ci_sysmon_cookie;
 	void (*ci_idlespin)(void);
 	uint32_t ci_khz;
@@ -341,7 +341,7 @@ mfrtc(uint32_t *rtcp)
 static __inline uint64_t
 rtc_nanosecs(void)
 {
-/* 
+/*
  * 601 RTC/DEC registers share clock of 7.8125 MHz, 128 ns per tick.
  * DEC has max of 25 bits, FF => 2.14748352 seconds.
  * RTCU is seconds, 32 bits.



CVS commit: src/sys/arch/powerpc/include

2023-07-26 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Jul 26 06:36:20 UTC 2023

Modified Files:
src/sys/arch/powerpc/include: cpu.h

Log Message:
Trailing whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.123 -r1.124 src/sys/arch/powerpc/include/cpu.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/powerpc/include

2022-11-15 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Tue Nov 15 12:43:14 UTC 2022

Modified Files:
src/sys/arch/powerpc/include: cpu.h

Log Message:
remove workaround for old clang - it's not needed anymore and caused problems
elsewhere


To generate a diff of this commit:
cvs rdiff -u -r1.122 -r1.123 src/sys/arch/powerpc/include/cpu.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/powerpc/include/cpu.h
diff -u src/sys/arch/powerpc/include/cpu.h:1.122 src/sys/arch/powerpc/include/cpu.h:1.123
--- src/sys/arch/powerpc/include/cpu.h:1.122	Mon May 30 14:48:08 2022
+++ src/sys/arch/powerpc/include/cpu.h	Tue Nov 15 12:43:14 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.122 2022/05/30 14:48:08 rin Exp $	*/
+/*	$NetBSD: cpu.h,v 1.123 2022/11/15 12:43:14 macallan Exp $	*/
 
 /*
  * Copyright (C) 1999 Wolfgang Solfrank.
@@ -240,12 +240,8 @@ curcpu(void)
 	return ci;
 }
 
-#ifdef __clang__
-#define	curlwp			(curcpu()->ci_curlwp)
-#else
 register struct lwp *powerpc_curlwp __asm("r13");
 #define	curlwp			powerpc_curlwp
-#endif
 #define curpcb			(curcpu()->ci_curpcb)
 #define curpm			(curcpu()->ci_curpm)
 



CVS commit: src/sys/arch/powerpc/include

2022-11-15 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Tue Nov 15 12:43:14 UTC 2022

Modified Files:
src/sys/arch/powerpc/include: cpu.h

Log Message:
remove workaround for old clang - it's not needed anymore and caused problems
elsewhere


To generate a diff of this commit:
cvs rdiff -u -r1.122 -r1.123 src/sys/arch/powerpc/include/cpu.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/powerpc/include

2022-09-12 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Tue Sep 13 01:22:12 UTC 2022

Modified Files:
src/sys/arch/powerpc/include: fenv.h

Log Message:
fesetexceptflag(): Set FE_ALL_INVALID instead of FE_ALL_EXCEPT for
FE_INVALID. Taken from FreeBSD:

https://cgit.freebsd.org/src/commit/lib/msun/powerpc/fenv.h?id=e7bd4f846f0c9185aebfd3d116bb78ab137280fa

> [POWERPC] msun: fix incorrect flag in fesetexceptflag
> Fix incorrect mask being used when FE_INVALID bit is wanted by user.
> The problem was noticed thanks to msun fenv tests.
>
> Reviewed by:  jhibbits, luporl
> Sponsored by: Eldorado Research Institute (eldorado.org.br)
> Differential Revision:https://reviews.freebsd.org/D27201

No regression for full ATF on both real and emulated FPU.

XXX
Import some tests from FreeBSD's lib/msun/tests.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/powerpc/include/fenv.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/powerpc/include/fenv.h
diff -u src/sys/arch/powerpc/include/fenv.h:1.6 src/sys/arch/powerpc/include/fenv.h:1.7
--- src/sys/arch/powerpc/include/fenv.h:1.6	Wed Oct 30 02:44:29 2019
+++ src/sys/arch/powerpc/include/fenv.h	Tue Sep 13 01:22:12 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: fenv.h,v 1.6 2019/10/30 02:44:29 christos Exp $	*/
+/*	$NetBSD: fenv.h,v 1.7 2022/09/13 01:22:12 rin Exp $	*/
 
 /*-
  * Copyright (c) 2004-2005 David Schultz 
@@ -177,7 +177,7 @@ fesetexceptflag(const fexcept_t *__flagp
 	union __fpscr __r;
 
 	if (__excepts & FE_INVALID)
-		__excepts |= FE_ALL_EXCEPT;
+		__excepts |= FE_ALL_INVALID;
 	__mffs(&__r.__d);
 	__r.__bits.__reg &= ~__excepts;
 	__r.__bits.__reg |= *__flagp & __excepts;



CVS commit: src/sys/arch/powerpc/include

2022-09-12 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Tue Sep 13 01:22:12 UTC 2022

Modified Files:
src/sys/arch/powerpc/include: fenv.h

Log Message:
fesetexceptflag(): Set FE_ALL_INVALID instead of FE_ALL_EXCEPT for
FE_INVALID. Taken from FreeBSD:

https://cgit.freebsd.org/src/commit/lib/msun/powerpc/fenv.h?id=e7bd4f846f0c9185aebfd3d116bb78ab137280fa

> [POWERPC] msun: fix incorrect flag in fesetexceptflag
> Fix incorrect mask being used when FE_INVALID bit is wanted by user.
> The problem was noticed thanks to msun fenv tests.
>
> Reviewed by:  jhibbits, luporl
> Sponsored by: Eldorado Research Institute (eldorado.org.br)
> Differential Revision:https://reviews.freebsd.org/D27201

No regression for full ATF on both real and emulated FPU.

XXX
Import some tests from FreeBSD's lib/msun/tests.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/powerpc/include/fenv.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/powerpc/include/booke

2022-09-12 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Sep 12 08:14:55 UTC 2022

Modified Files:
src/sys/arch/powerpc/include/booke: intr.h

Log Message:
PR port-powerpc/56922

__HAVE_FAST_SOFTINTS is broken for powerpc.
Disable it temporarily also for booke.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/powerpc/include/booke/intr.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/powerpc/include/booke/intr.h
diff -u src/sys/arch/powerpc/include/booke/intr.h:1.12 src/sys/arch/powerpc/include/booke/intr.h:1.13
--- src/sys/arch/powerpc/include/booke/intr.h:1.12	Sat Nov 23 19:40:36 2019
+++ src/sys/arch/powerpc/include/booke/intr.h	Mon Sep 12 08:14:55 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.h,v 1.12 2019/11/23 19:40:36 ad Exp $	*/
+/*	$NetBSD: intr.h,v 1.13 2022/09/12 08:14:55 rin Exp $	*/
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -77,7 +77,9 @@
 #define IPI_SUSPEND	0x0020
 #define IPI_AST		0x0040
 
+#if 0	/* PR port-powerpc/56922: fast softints are broken on powerpc */
 #define	__HAVE_FAST_SOFTINTS	1
+#endif
 #define	SOFTINT_KPREEMPT	SOFTINT_COUNT
 
 #ifndef _LOCORE



CVS commit: src/sys/arch/powerpc/include/booke

2022-09-12 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Sep 12 08:14:55 UTC 2022

Modified Files:
src/sys/arch/powerpc/include/booke: intr.h

Log Message:
PR port-powerpc/56922

__HAVE_FAST_SOFTINTS is broken for powerpc.
Disable it temporarily also for booke.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/powerpc/include/booke/intr.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/powerpc/include

2022-07-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Jul 11 09:39:10 UTC 2022

Modified Files:
src/sys/arch/powerpc/include: intr.h

Log Message:
PR 56922: disabel fast softints for powerpc for now.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/powerpc/include/intr.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/powerpc/include

2022-07-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Jul 11 09:39:10 UTC 2022

Modified Files:
src/sys/arch/powerpc/include: intr.h

Log Message:
PR 56922: disabel fast softints for powerpc for now.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/powerpc/include/intr.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/powerpc/include/intr.h
diff -u src/sys/arch/powerpc/include/intr.h:1.18 src/sys/arch/powerpc/include/intr.h:1.19
--- src/sys/arch/powerpc/include/intr.h:1.18	Tue Mar  2 07:37:27 2021
+++ src/sys/arch/powerpc/include/intr.h	Mon Jul 11 09:39:10 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.h,v 1.18 2021/03/02 07:37:27 rin Exp $ */
+/*	$NetBSD: intr.h,v 1.19 2022/07/11 09:39:10 martin Exp $ */
 
 /*-
  * Copyright (c) 2007 Michael Lorenz
@@ -28,13 +28,15 @@
 
 #ifndef _LOCORE
 #include 
-__KERNEL_RCSID(0, "$NetBSD: intr.h,v 1.18 2021/03/02 07:37:27 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intr.h,v 1.19 2022/07/11 09:39:10 martin Exp $");
 #endif
 
 #ifndef _POWERPC_INTR_MACHDEP_H_
 #define _POWERPC_INTR_MACHDEP_H_
 
+#if 0	/* PR port-powerpc/56922: fast softints are broken on powerpc */
 #define	__HAVE_FAST_SOFTINTS	1
+#endif
 
 
 /* Interrupt priority `levels'. */



CVS commit: src/sys/arch/powerpc/include

2022-05-29 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sun May 29 11:55:05 UTC 2022

Modified Files:
src/sys/arch/powerpc/include: instr.h

Log Message:
Fix insn field definitions for MD and MDS formats.

No one uses these yet.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/powerpc/include/instr.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/powerpc/include/instr.h
diff -u src/sys/arch/powerpc/include/instr.h:1.9 src/sys/arch/powerpc/include/instr.h:1.10
--- src/sys/arch/powerpc/include/instr.h:1.9	Wed Jul 15 08:58:51 2020
+++ src/sys/arch/powerpc/include/instr.h	Sun May 29 11:55:05 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: instr.h,v 1.9 2020/07/15 08:58:51 rin Exp $ */
+/*	$NetBSD: instr.h,v 1.10 2022/05/29 11:55:05 rin Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -135,11 +135,10 @@ union instr {
 		u_int	i_opcd:6;
 		u_int	i_rs:5;
 		u_int	i_ra:5;
-		u_int	i_rb:5;
 		int	i_sh1_5:5;
 		int	i_mb:6;
 		u_int	i_xo:3;
-		int	i_sh0:2;
+		int	i_sh0:1;
 		u_int	i_rc:1;
 	} i_md;
 
@@ -151,7 +150,6 @@ union instr {
 		u_int	i_rs:5;
 		u_int	i_ra:5;
 		u_int	i_rb:5;
-		int	i_sh:5;
 		int	i_mb:6;
 		u_int	i_xo:4;
 		u_int	i_rc:1;



CVS commit: src/sys/arch/powerpc/include

2022-05-29 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sun May 29 11:55:05 UTC 2022

Modified Files:
src/sys/arch/powerpc/include: instr.h

Log Message:
Fix insn field definitions for MD and MDS formats.

No one uses these yet.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/powerpc/include/instr.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/powerpc/include

2022-05-11 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Wed May 11 13:58:43 UTC 2022

Modified Files:
src/sys/arch/powerpc/include: vmparam.h

Log Message:
s/varible/variable/


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/powerpc/include/vmparam.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/powerpc/include

2022-05-11 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Wed May 11 13:58:43 UTC 2022

Modified Files:
src/sys/arch/powerpc/include: vmparam.h

Log Message:
s/varible/variable/


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/powerpc/include/vmparam.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/powerpc/include/vmparam.h
diff -u src/sys/arch/powerpc/include/vmparam.h:1.25 src/sys/arch/powerpc/include/vmparam.h:1.26
--- src/sys/arch/powerpc/include/vmparam.h:1.25	Wed Jan  6 08:17:46 2021
+++ src/sys/arch/powerpc/include/vmparam.h	Wed May 11 13:58:43 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: vmparam.h,v 1.25 2021/01/06 08:17:46 rin Exp $	*/
+/*	$NetBSD: vmparam.h,v 1.26 2022/05/11 13:58:43 andvar Exp $	*/
 
 #ifndef _POWERPC_VMPARAM_H_
 #define _POWERPC_VMPARAM_H_
@@ -30,7 +30,7 @@
 #if defined(MODULAR) || defined(_MODULE) || !defined(_KERNEL)
 /*
  * If we are a module or a modular kernel, then we need to defined the range
- * of our varible page sizes since BOOKE and OEA use 4KB pages while IBM4XX
+ * of our variable page sizes since BOOKE and OEA use 4KB pages while IBM4XX
  * use 16KB pages.
  * This is also required for userland by jemalloc.
  */



CVS commit: src/sys/arch/powerpc/include

2022-05-07 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat May  7 09:02:19 UTC 2022

Modified Files:
src/sys/arch/powerpc/include: spr.h

Log Message:
Remove SPR_CCR0 from ; we already have it in
, together with other 4xx-specific SPRs.

Thanks uwe@ for pointing out.


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/sys/arch/powerpc/include/spr.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/powerpc/include

2022-05-07 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat May  7 09:02:19 UTC 2022

Modified Files:
src/sys/arch/powerpc/include: spr.h

Log Message:
Remove SPR_CCR0 from ; we already have it in
, together with other 4xx-specific SPRs.

Thanks uwe@ for pointing out.


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/sys/arch/powerpc/include/spr.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/powerpc/include/spr.h
diff -u src/sys/arch/powerpc/include/spr.h:1.55 src/sys/arch/powerpc/include/spr.h:1.56
--- src/sys/arch/powerpc/include/spr.h:1.55	Sat May  7 04:12:54 2022
+++ src/sys/arch/powerpc/include/spr.h	Sat May  7 09:02:19 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: spr.h,v 1.55 2022/05/07 04:12:54 rin Exp $	*/
+/*	$NetBSD: spr.h,v 1.56 2022/05/07 09:02:19 rin Exp $	*/
 
 /*
  * Copyright (c) 2001, The NetBSD Foundation, Inc.
@@ -144,7 +144,6 @@ mfspr(int reg)
 #define	SPR_TBL			0x11c	/* E468 Time Base Lower */
 #define	SPR_TBU			0x11d	/* E468 Time Base Upper */
 #define	SPR_PVR			0x11f	/* E468 Processor Version Register */
-#define	SPR_CCR0		0x3b3	/* .4.. Core Configuration Register */
 
 /* Time Base Register declarations */
 #define	TBR_TBL			0x10c	/* E468 Time Base Lower */



CVS commit: src/sys/arch/powerpc/include/oea

2022-02-03 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Thu Feb  3 17:23:50 UTC 2022

Modified Files:
src/sys/arch/powerpc/include/oea: vmparam.h

Log Message:
bump MAXTSIZ
now clang runs again


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/powerpc/include/oea/vmparam.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/powerpc/include/oea

2022-02-03 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Thu Feb  3 17:23:50 UTC 2022

Modified Files:
src/sys/arch/powerpc/include/oea: vmparam.h

Log Message:
bump MAXTSIZ
now clang runs again


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/powerpc/include/oea/vmparam.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/powerpc/include/oea/vmparam.h
diff -u src/sys/arch/powerpc/include/oea/vmparam.h:1.22 src/sys/arch/powerpc/include/oea/vmparam.h:1.23
--- src/sys/arch/powerpc/include/oea/vmparam.h:1.22	Sat Sep 11 20:28:05 2021
+++ src/sys/arch/powerpc/include/oea/vmparam.h	Thu Feb  3 17:23:50 2022
@@ -55,7 +55,7 @@
 #endif
 
 #ifndef	MAXTSIZ
-#define	MAXTSIZ		(128*1024*1024)		/* maximum text size */
+#define	MAXTSIZ		(256*1024*1024)		/* maximum text size */
 #endif
 
 #ifndef	MAXDSIZ



CVS commit: src/sys/arch/powerpc/include

2021-11-02 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Tue Nov  2 11:22:03 UTC 2021

Modified Files:
src/sys/arch/powerpc/include: profile.h

Log Message:
fix profiling kernel build


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/powerpc/include/profile.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/powerpc/include/profile.h
diff -u src/sys/arch/powerpc/include/profile.h:1.9 src/sys/arch/powerpc/include/profile.h:1.10
--- src/sys/arch/powerpc/include/profile.h:1.9	Thu Sep 12 15:36:17 2013
+++ src/sys/arch/powerpc/include/profile.h	Tue Nov  2 11:22:03 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: profile.h,v 1.9 2013/09/12 15:36:17 joerg Exp $	*/
+/*	$NetBSD: profile.h,v 1.10 2021/11/02 11:22:03 ryo Exp $	*/
 
 /*-
  * Copyright (c) 2000 Tsubai Masanari.  All rights reserved.
@@ -132,6 +132,7 @@ __asm("	.globl	_mcount			\n" \
 #define MCOUNT_ENTER	do s = wrtee(0); while (/*CONSTCOND*/ 0)
 #define MCOUNT_EXIT	wrtee(s)
 #else
+#include 
 #define MCOUNT_ENTER		\
 	__asm volatile("mfmsr %0" : "=r"(s));			\
 	if ((s & (PSL_IR | PSL_DR)) != (PSL_IR | PSL_DR))	\



CVS commit: src/sys/arch/powerpc/include

2021-11-02 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Tue Nov  2 11:22:03 UTC 2021

Modified Files:
src/sys/arch/powerpc/include: profile.h

Log Message:
fix profiling kernel build


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/powerpc/include/profile.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/powerpc/include

2021-11-02 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Tue Nov  2 11:21:24 UTC 2021

Modified Files:
src/sys/arch/powerpc/include: spr.h
src/sys/arch/powerpc/include/ibm4xx: cpu.h

Log Message:
fix build with COPTS=-O0


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/sys/arch/powerpc/include/spr.h
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/powerpc/include/ibm4xx/cpu.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/powerpc/include/spr.h
diff -u src/sys/arch/powerpc/include/spr.h:1.53 src/sys/arch/powerpc/include/spr.h:1.54
--- src/sys/arch/powerpc/include/spr.h:1.53	Mon Jul  6 10:31:23 2020
+++ src/sys/arch/powerpc/include/spr.h	Tue Nov  2 11:21:24 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: spr.h,v 1.53 2020/07/06 10:31:23 rin Exp $	*/
+/*	$NetBSD: spr.h,v 1.54 2021/11/02 11:21:24 ryo Exp $	*/
 
 /*
  * Copyright (c) 2001, The NetBSD Foundation, Inc.
@@ -72,8 +72,8 @@ mfspr64(int reg)
 } )
 #endif /* PPC_OEA64_BRIDGE || _ARCH_PPC64 */
 
-static __inline uint64_t
-mfspr32(int reg)
+static __inline __always_inline uint64_t
+mfspr32(const int reg)
 {
 	register_t val;
 
@@ -81,8 +81,8 @@ mfspr32(int reg)
 	return val;
 }
 
-static __inline void
-mtspr32(int reg, uint32_t val)
+static __inline __always_inline void
+mtspr32(const int reg, uint32_t val)
 {
 
 	__asm volatile("mtspr %0,%1" : : "K"(reg), "r"(val));

Index: src/sys/arch/powerpc/include/ibm4xx/cpu.h
diff -u src/sys/arch/powerpc/include/ibm4xx/cpu.h:1.26 src/sys/arch/powerpc/include/ibm4xx/cpu.h:1.27
--- src/sys/arch/powerpc/include/ibm4xx/cpu.h:1.26	Mon May 31 14:38:56 2021
+++ src/sys/arch/powerpc/include/ibm4xx/cpu.h	Tue Nov  2 11:21:24 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.26 2021/05/31 14:38:56 simonb Exp $	*/
+/*	$NetBSD: cpu.h,v 1.27 2021/11/02 11:21:24 ryo Exp $	*/
 
 /*
  * Copyright 2002 Wasabi Systems, Inc.
@@ -90,14 +90,14 @@ extern void intr_init(void);
  * macros because register address is encoded as immediate
  * operand.
  */
-static __inline void
-mtdcr(int reg, uint32_t val)
+static __inline __always_inline void
+mtdcr(const int reg, uint32_t val)
 {
 	__asm volatile("mtdcr %0,%1" : : "K"(reg), "r"(val));
 }
 
-static __inline uint32_t
-mfdcr(int reg)
+static __inline __always_inline uint32_t
+mfdcr(const int reg)
 {
 	uint32_t val;	
 	



CVS commit: src/sys/arch/powerpc/include

2021-11-02 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Tue Nov  2 11:21:24 UTC 2021

Modified Files:
src/sys/arch/powerpc/include: spr.h
src/sys/arch/powerpc/include/ibm4xx: cpu.h

Log Message:
fix build with COPTS=-O0


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/sys/arch/powerpc/include/spr.h
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/powerpc/include/ibm4xx/cpu.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/powerpc/include

2021-10-29 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Fri Oct 29 21:42:02 UTC 2021

Modified Files:
src/sys/arch/powerpc/include: signal.h

Log Message:
Define __HAVE_STRUCT_SIGCONTEXT regardless of its current visibility.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/powerpc/include/signal.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/powerpc/include/signal.h
diff -u src/sys/arch/powerpc/include/signal.h:1.25 src/sys/arch/powerpc/include/signal.h:1.26
--- src/sys/arch/powerpc/include/signal.h:1.25	Wed Oct 27 18:20:08 2021
+++ src/sys/arch/powerpc/include/signal.h	Fri Oct 29 21:42:02 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: signal.h,v 1.25 2021/10/27 18:20:08 christos Exp $	*/
+/*	$NetBSD: signal.h,v 1.26 2021/10/29 21:42:02 thorpej Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -37,6 +37,14 @@
 #ifndef _LOCORE
 #include 
 
+/*
+ * This is needed natively for 32-bit, and for 32-bit compatibility only
+ * in the 64-bit environment.
+ */
+#if !defined(__LP64__) || defined(_KERNEL)
+#define	__HAVE_STRUCT_SIGCONTEXT
+#endif
+
 typedef int sig_atomic_t;
 
 #ifndef __LP64__
@@ -56,7 +64,6 @@ struct sigcontext13 {
 /*
  * struct sigcontext introduced in NetBSD 1.4
  */
-#define	__HAVE_STRUCT_SIGCONTEXT
 struct sigcontext {
 	int sc_onstack;			/* saved onstack flag */
 	int __sc_mask13;		/* saved signal mask (old style) */



CVS commit: src/sys/arch/powerpc/include

2021-10-29 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Fri Oct 29 21:42:02 UTC 2021

Modified Files:
src/sys/arch/powerpc/include: signal.h

Log Message:
Define __HAVE_STRUCT_SIGCONTEXT regardless of its current visibility.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/powerpc/include/signal.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/powerpc/include

2021-10-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Oct 27 18:20:23 UTC 2021

Modified Files:
src/sys/arch/powerpc/include: pcb.h

Log Message:
Need frame.h


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/powerpc/include/pcb.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/powerpc/include

2021-10-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Oct 27 18:20:23 UTC 2021

Modified Files:
src/sys/arch/powerpc/include: pcb.h

Log Message:
Need frame.h


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/powerpc/include/pcb.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/powerpc/include/pcb.h
diff -u src/sys/arch/powerpc/include/pcb.h:1.22 src/sys/arch/powerpc/include/pcb.h:1.23
--- src/sys/arch/powerpc/include/pcb.h:1.22	Mon Jan 17 20:02:54 2011
+++ src/sys/arch/powerpc/include/pcb.h	Wed Oct 27 14:20:23 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: pcb.h,v 1.22 2011/01/18 01:02:54 matt Exp $	*/
+/*	$NetBSD: pcb.h,v 1.23 2021/10/27 18:20:23 christos Exp $	*/
 
 /*-
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -34,6 +34,7 @@
 #define	_POWERPC_PCB_H_
 
 #include 
+#include 
 
 struct faultbuf {
 	register_t fb_sp;		/* R1 */



CVS commit: src/sys/arch/powerpc/include

2021-10-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Oct 27 18:20:08 UTC 2021

Modified Files:
src/sys/arch/powerpc/include: signal.h

Log Message:
There is no sigcontext in ppc64


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/powerpc/include/signal.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/powerpc/include/signal.h
diff -u src/sys/arch/powerpc/include/signal.h:1.24 src/sys/arch/powerpc/include/signal.h:1.25
--- src/sys/arch/powerpc/include/signal.h:1.24	Tue Oct 26 21:11:03 2021
+++ src/sys/arch/powerpc/include/signal.h	Wed Oct 27 14:20:08 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: signal.h,v 1.24 2021/10/27 01:11:03 thorpej Exp $	*/
+/*	$NetBSD: signal.h,v 1.25 2021/10/27 18:20:08 christos Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -39,6 +39,7 @@
 
 typedef int sig_atomic_t;
 
+#ifndef __LP64__
 #if defined(_NETBSD_SOURCE)
 #include 
 #include 
@@ -65,5 +66,6 @@ struct sigcontext {
 #endif /* _LIBC || _KERNEL */
 
 #endif	/* _NETBSD_SOURCE */
+#endif /* __LP64__ */
 #endif	/* !_LOCORE */
 #endif	/* !_POWERPC_SIGNAL_H_ */



CVS commit: src/sys/arch/powerpc/include

2021-10-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Oct 27 18:20:08 UTC 2021

Modified Files:
src/sys/arch/powerpc/include: signal.h

Log Message:
There is no sigcontext in ppc64


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/powerpc/include/signal.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/powerpc/include

2021-10-26 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed Oct 27 01:11:03 UTC 2021

Modified Files:
src/sys/arch/powerpc/include: signal.h

Log Message:
Make sigcontext13 visible only to _KERNEL.  Make sigcontext visible only
to _LIBC and _KERNEL.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/powerpc/include/signal.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/powerpc/include/signal.h
diff -u src/sys/arch/powerpc/include/signal.h:1.23 src/sys/arch/powerpc/include/signal.h:1.24
--- src/sys/arch/powerpc/include/signal.h:1.23	Tue Oct 26 16:16:35 2021
+++ src/sys/arch/powerpc/include/signal.h	Wed Oct 27 01:11:03 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: signal.h,v 1.23 2021/10/26 16:16:35 christos Exp $	*/
+/*	$NetBSD: signal.h,v 1.24 2021/10/27 01:11:03 thorpej Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -43,14 +43,15 @@ typedef int sig_atomic_t;
 #include 
 #include 
 
-#if defined(__LIBC12_SOURCE__) || defined(_KERNEL)
+#if defined(_KERNEL)
 struct sigcontext13 {
 	int sc_onstack;			/* saved onstack flag */
 	int sc_mask;			/* saved signal mask (old style) */
 	struct utrapframe sc_frame;	/* saved registers */
 };
-#endif /* __LIBC12_SOURCE__ || _KERNEL */
+#endif /* _KERNEL */
 
+#if defined(_LIBC) || defined(_KERNEL)
 /*
  * struct sigcontext introduced in NetBSD 1.4
  */
@@ -61,6 +62,7 @@ struct sigcontext {
 	struct utrapframe sc_frame;	/* saved registers */
 	sigset_t sc_mask;		/* saved signal mask (new style) */
 };
+#endif /* _LIBC || _KERNEL */
 
 #endif	/* _NETBSD_SOURCE */
 #endif	/* !_LOCORE */



CVS commit: src/sys/arch/powerpc/include

2021-10-26 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed Oct 27 01:11:03 UTC 2021

Modified Files:
src/sys/arch/powerpc/include: signal.h

Log Message:
Make sigcontext13 visible only to _KERNEL.  Make sigcontext visible only
to _LIBC and _KERNEL.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/powerpc/include/signal.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/powerpc/include

2021-09-13 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Sep 13 11:54:42 UTC 2021

Modified Files:
src/sys/arch/powerpc/include: lock.h

Log Message:
Fix IBM405 errata 77 workaround for __cpu_simple_lock{,_try}();
adjust labels so that dcbt is executed before stwcx. insn.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/powerpc/include/lock.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/powerpc/include/lock.h
diff -u src/sys/arch/powerpc/include/lock.h:1.15 src/sys/arch/powerpc/include/lock.h:1.16
--- src/sys/arch/powerpc/include/lock.h:1.15	Sun Mar  1 23:23:36 2020
+++ src/sys/arch/powerpc/include/lock.h	Mon Sep 13 11:54:42 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: lock.h,v 1.15 2020/03/01 23:23:36 rin Exp $	*/
+/*	$NetBSD: lock.h,v 1.16 2021/09/13 11:54:42 rin Exp $	*/
 
 /*-
  * Copyright (c) 2000, 2007 The NetBSD Foundation, Inc.
@@ -80,12 +80,12 @@ __cpu_simple_lock(__cpu_simple_lock_t *a
 2:	lwzx	%0,0,%1		\n\
 	cmpwi	%0,%2		\n\
 	beq+	1b		\n\
-	b	2b		\n"
+	b	2b		\n\
+3:\n"
 #ifdef IBM405_ERRATA77
 	"dcbt	0,%1		\n"
 #endif
-"\
-3:	stwcx.	%3,0,%1		\n\
+	"stwcx.	%3,0,%1		\n\
 	bne-	1b		\n\
 	isync			\n\
 \n"
@@ -108,12 +108,12 @@ __cpu_simple_lock_try(__cpu_simple_lock_
 	"dcbt	0,%1		\n"
 #endif
 	"stwcx.	%3,0,%1		\n\
-	bne-	1b		\n"
+	bne-	1b		\n\
+2:\n"
 #ifdef IBM405_ERRATA77
 	"dcbt	0,%4		\n"
 #endif
-"\
-2:	stwcx.	%3,0,%4		\n\
+	"stwcx.	%3,0,%4		\n\
 	isync			\n\
 \n"
 	: "="(old)



CVS commit: src/sys/arch/powerpc/include

2021-09-13 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Sep 13 11:54:42 UTC 2021

Modified Files:
src/sys/arch/powerpc/include: lock.h

Log Message:
Fix IBM405 errata 77 workaround for __cpu_simple_lock{,_try}();
adjust labels so that dcbt is executed before stwcx. insn.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/powerpc/include/lock.h

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/powerpc/include/booke

2021-04-21 Thread Rin Okuyama

On 2021/04/18 0:38, Joerg Sonnenberger wrote:

On Sat, Apr 17, 2021 at 01:25:57PM +, Rin Okuyama wrote:

Module Name:src
Committed By:   rin
Date:   Sat Apr 17 13:25:57 UTC 2021

Modified Files:
src/sys/arch/powerpc/include/booke: vmparam.h

Log Message:
Sync MAXfoo params with oea:

   MAXTSIZ: 512MB -> 128MB
   MAXDSIZ: 3.25GB -> 1GB

There should be no particular reasons for having different values.


Is there an architectural reason for MAXTSIZ to be 128MB? Because we
have seen binaries larger than that.

Ah, I just forgot recent discussion on MAXTSIZ.

There's no limitation due to architecture. I've confirmed binary just
works fine, whose text is larger than 256MB segment on oea. It works
on booke and ibm4xx also.

Maybe we can leave MAXTSIZ undefined for powerpc.

Thanks,
rin


Re: CVS commit: src/sys/arch/powerpc/include/booke

2021-04-17 Thread Joerg Sonnenberger
On Sat, Apr 17, 2021 at 01:25:57PM +, Rin Okuyama wrote:
> Module Name:  src
> Committed By: rin
> Date: Sat Apr 17 13:25:57 UTC 2021
> 
> Modified Files:
>   src/sys/arch/powerpc/include/booke: vmparam.h
> 
> Log Message:
> Sync MAXfoo params with oea:
> 
>   MAXTSIZ: 512MB -> 128MB
>   MAXDSIZ: 3.25GB -> 1GB
> 
> There should be no particular reasons for having different values.

Is there an architectural reason for MAXTSIZ to be 128MB? Because we
have seen binaries larger than that.

Joerg


CVS commit: src/sys/arch/powerpc/include/booke

2021-04-17 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Apr 17 13:25:57 UTC 2021

Modified Files:
src/sys/arch/powerpc/include/booke: vmparam.h

Log Message:
Sync MAXfoo params with oea:

  MAXTSIZ: 512MB -> 128MB
  MAXDSIZ: 3.25GB -> 1GB

There should be no particular reasons for having different values.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/powerpc/include/booke/vmparam.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/powerpc/include/booke/vmparam.h
diff -u src/sys/arch/powerpc/include/booke/vmparam.h:1.8 src/sys/arch/powerpc/include/booke/vmparam.h:1.9
--- src/sys/arch/powerpc/include/booke/vmparam.h:1.8	Sat Apr 17 13:23:24 2021
+++ src/sys/arch/powerpc/include/booke/vmparam.h	Sat Apr 17 13:25:57 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: vmparam.h,v 1.8 2021/04/17 13:23:24 rin Exp $	*/
+/*	$NetBSD: vmparam.h,v 1.9 2021/04/17 13:25:57 rin Exp $	*/
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -56,11 +56,11 @@
 #endif
 
 #ifndef	MAXTSIZ
-#define	MAXTSIZ		(2*256*1024*1024)	/* maximum text size */
+#define	MAXTSIZ		(128*1024*1024)		/* maximum text size */
 #endif
 
 #ifndef	MAXDSIZ
-#define	MAXDSIZ		(13*256*1024*1024U)	/* maximum data size */
+#define	MAXDSIZ		(1024*1024*1024)	/* maximum data size */
 #endif
 
 #ifndef	MAXSSIZ



CVS commit: src/sys/arch/powerpc/include/booke

2021-04-17 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Apr 17 13:25:57 UTC 2021

Modified Files:
src/sys/arch/powerpc/include/booke: vmparam.h

Log Message:
Sync MAXfoo params with oea:

  MAXTSIZ: 512MB -> 128MB
  MAXDSIZ: 3.25GB -> 1GB

There should be no particular reasons for having different values.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/powerpc/include/booke/vmparam.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/powerpc/include/booke

2021-04-17 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Apr 17 13:23:24 UTC 2021

Modified Files:
src/sys/arch/powerpc/include/booke: vmparam.h

Log Message:
PR port-powerpc/56107

Decrease MAXSSIZ from ~256MB to 32MB (same as oea).

This fixes tests in /usr/tests/usr.bin/make, that run with "ulimit -v 20",
fail with "Cannot map anonymous memory".

Although I'm not fully convinced whether this limit is reasonable or not,
old MAXSSIZ of ~256MB is too much anyway.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/powerpc/include/booke/vmparam.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/powerpc/include/booke/vmparam.h
diff -u src/sys/arch/powerpc/include/booke/vmparam.h:1.7 src/sys/arch/powerpc/include/booke/vmparam.h:1.8
--- src/sys/arch/powerpc/include/booke/vmparam.h:1.7	Tue Oct  2 23:51:39 2012
+++ src/sys/arch/powerpc/include/booke/vmparam.h	Sat Apr 17 13:23:24 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: vmparam.h,v 1.7 2012/10/02 23:51:39 christos Exp $	*/
+/*	$NetBSD: vmparam.h,v 1.8 2021/04/17 13:23:24 rin Exp $	*/
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -64,7 +64,7 @@
 #endif
 
 #ifndef	MAXSSIZ
-#define	MAXSSIZ		(1*256*1024*1024-PAGE_SIZE) /* maximum stack size */
+#define	MAXSSIZ		(32*1024*1024)		/* maximum stack size */
 #endif
 
 #ifndef	DFLDSIZ



CVS commit: src/sys/arch/powerpc/include/booke

2021-04-17 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Apr 17 13:23:24 UTC 2021

Modified Files:
src/sys/arch/powerpc/include/booke: vmparam.h

Log Message:
PR port-powerpc/56107

Decrease MAXSSIZ from ~256MB to 32MB (same as oea).

This fixes tests in /usr/tests/usr.bin/make, that run with "ulimit -v 20",
fail with "Cannot map anonymous memory".

Although I'm not fully convinced whether this limit is reasonable or not,
old MAXSSIZ of ~256MB is too much anyway.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/powerpc/include/booke/vmparam.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/powerpc/include/oea

2021-04-17 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Apr 17 09:22:29 UTC 2021

Modified Files:
src/sys/arch/powerpc/include/oea: vmparam.h

Log Message:
Adjust TABs. No functional changes.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/powerpc/include/oea/vmparam.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/powerpc/include/oea

2021-04-17 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Apr 17 09:22:29 UTC 2021

Modified Files:
src/sys/arch/powerpc/include/oea: vmparam.h

Log Message:
Adjust TABs. No functional changes.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/powerpc/include/oea/vmparam.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/powerpc/include/oea/vmparam.h
diff -u src/sys/arch/powerpc/include/oea/vmparam.h:1.20 src/sys/arch/powerpc/include/oea/vmparam.h:1.21
--- src/sys/arch/powerpc/include/oea/vmparam.h:1.20	Thu Aug 17 22:55:47 2017
+++ src/sys/arch/powerpc/include/oea/vmparam.h	Sat Apr 17 09:22:28 2021
@@ -47,54 +47,54 @@
 #define	PAGE_MASK	(PAGE_SIZE - 1)
 
 #ifndef	USRSTACK
-#define	USRSTACK		VM_MAXUSER_ADDRESS
+#define	USRSTACK	VM_MAXUSER_ADDRESS
 #endif
 
 #ifndef	USRSTACK32
-#define	USRSTACK32		VM_MAXUSER_ADDRESS32
+#define	USRSTACK32	VM_MAXUSER_ADDRESS32
 #endif
 
 #ifndef	MAXTSIZ
-#define	MAXTSIZ			(128*1024*1024)		/* maximum text size */
+#define	MAXTSIZ		(128*1024*1024)		/* maximum text size */
 #endif
 
 #ifndef	MAXDSIZ
-#define	MAXDSIZ			(1024*1024*1024)	/* maximum data size */
+#define	MAXDSIZ		(1024*1024*1024)	/* maximum data size */
 #endif
 
 #ifndef	MAXDSIZ32
-#define	MAXDSIZ32		(1024*1024*1024)	/* maximum data size */
+#define	MAXDSIZ32	(1024*1024*1024)	/* maximum data size */
 #endif
 
 #ifndef	MAXSSIZ
-#define	MAXSSIZ			(32*1024*1024)		/* maximum stack size */
+#define	MAXSSIZ		(32*1024*1024)		/* maximum stack size */
 #endif
 
 #ifndef	MAXSSIZ32
-#define	MAXSSIZ32		(32*1024*1024)		/* maximum stack size */
+#define	MAXSSIZ32	(32*1024*1024)		/* maximum stack size */
 #endif
 
 #ifndef	DFLDSIZ
-#define	DFLDSIZ			(256*1024*1024)		/* default data size */
+#define	DFLDSIZ		(256*1024*1024)		/* default data size */
 #endif
 
 #ifndef	DFLDSIZ32
-#define	DFLSSIZ32		(256*1024*1024)
+#define	DFLSSIZ32	(256*1024*1024)
 #endif
 
 #ifndef	DFLSSIZ
-#define	DFLSSIZ			(2*1024*1024)		/* default stack size */
+#define	DFLSSIZ		(2*1024*1024)		/* default stack size */
 #endif
 
 #ifndef	DFLSSIZ32
-#define	DFLSSIZ32		(2*1024*1024)		/* default stack size */
+#define	DFLSSIZ32	(2*1024*1024)		/* default stack size */
 #endif
 
 /*
  * Default number of pages in the user raw I/O map.
  */
 #ifndef USRIOSIZE
-#define	USRIOSIZE		1024
+#define	USRIOSIZE	1024
 #endif
 
 /*
@@ -102,7 +102,7 @@
  * considered very swappable.
  */
 #ifndef MAXSLP
-#define	MAXSLP			20
+#define	MAXSLP		20
 #endif
 
 /*



CVS commit: src/sys/arch/powerpc/include/ibm4xx

2021-04-01 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Fri Apr  2 03:20:54 UTC 2021

Modified Files:
src/sys/arch/powerpc/include/ibm4xx: dcr4xx.h

Log Message:
Add bit-field definitions for DCR_SDRAM0_B[0-3]CR registers.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/powerpc/include/ibm4xx/dcr4xx.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/powerpc/include/ibm4xx/dcr4xx.h
diff -u src/sys/arch/powerpc/include/ibm4xx/dcr4xx.h:1.3 src/sys/arch/powerpc/include/ibm4xx/dcr4xx.h:1.4
--- src/sys/arch/powerpc/include/ibm4xx/dcr4xx.h:1.3	Thu Nov 21 13:33:15 2013
+++ src/sys/arch/powerpc/include/ibm4xx/dcr4xx.h	Fri Apr  2 03:20:53 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: dcr4xx.h,v 1.3 2013/11/21 13:33:15 kiyohara Exp $	*/
+/*	$NetBSD: dcr4xx.h,v 1.4 2021/04/02 03:20:53 rin Exp $	*/
 
 /*
  * Copyright 2002 Wasabi Systems, Inc.
@@ -303,6 +303,8 @@
 #define DCR_SDRAM0_B1CR		0x44
 #define DCR_SDRAM0_B2CR		0x48
 #define DCR_SDRAM0_B3CR		0x4c
+#define   SDRAM0_BnCR_EN	  0x0001
+#define   SDRAM0_BnCR_SZ(n)	  (1 << n) >> 17) & 7) + 22))
 #define DCR_SDRAM0_TR		0x80
 #define DCR_SDRAM0_ECCCFG	0x94
 #define DCR_SDRAM0_ECCESR	0x98



CVS commit: src/sys/arch/powerpc/include/ibm4xx

2021-04-01 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Fri Apr  2 03:20:54 UTC 2021

Modified Files:
src/sys/arch/powerpc/include/ibm4xx: dcr4xx.h

Log Message:
Add bit-field definitions for DCR_SDRAM0_B[0-3]CR registers.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/powerpc/include/ibm4xx/dcr4xx.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/powerpc/include

2021-03-11 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Thu Mar 11 08:33:34 UTC 2021

Modified Files:
src/sys/arch/powerpc/include: db_machdep.h

Log Message:
Use ifdef _KERNEL_OPT instead of ifdef _KERNEL before including
"opt_ppcarch.h".


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/powerpc/include/db_machdep.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/powerpc/include/db_machdep.h
diff -u src/sys/arch/powerpc/include/db_machdep.h:1.29 src/sys/arch/powerpc/include/db_machdep.h:1.30
--- src/sys/arch/powerpc/include/db_machdep.h:1.29	Wed Jan  6 08:14:34 2021
+++ src/sys/arch/powerpc/include/db_machdep.h	Thu Mar 11 08:33:34 2021
@@ -1,5 +1,5 @@
 /*	$OpenBSD: db_machdep.h,v 1.2 1997/03/21 00:48:48 niklas Exp $	*/
-/*	$NetBSD: db_machdep.h,v 1.29 2021/01/06 08:14:34 rin Exp $	*/
+/*	$NetBSD: db_machdep.h,v 1.30 2021/03/11 08:33:34 simonb Exp $	*/
 
 /* 
  * Mach Operating System
@@ -33,7 +33,7 @@
 #ifndef	_PPC_DB_MACHDEP_H_
 #define	_PPC_DB_MACHDEP_H_
 
-#ifdef _KERNEL
+#if defined(_KERNEL_OPT)
 #include "opt_ppcarch.h"
 #endif
 



CVS commit: src/sys/arch/powerpc/include

2021-03-11 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Thu Mar 11 08:33:34 UTC 2021

Modified Files:
src/sys/arch/powerpc/include: db_machdep.h

Log Message:
Use ifdef _KERNEL_OPT instead of ifdef _KERNEL before including
"opt_ppcarch.h".


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/powerpc/include/db_machdep.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/powerpc/include

2021-03-07 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sun Mar  7 14:42:53 UTC 2021

Modified Files:
src/sys/arch/powerpc/include: cpu.h

Log Message:
For LP64, remove members of struct cpu_info that exist just for
compatible with booke or ibm4xx. Even if MODULAR || _MODULE,
these members are useless for powerpc64.


To generate a diff of this commit:
cvs rdiff -u -r1.117 -r1.118 src/sys/arch/powerpc/include/cpu.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/powerpc/include/cpu.h
diff -u src/sys/arch/powerpc/include/cpu.h:1.117 src/sys/arch/powerpc/include/cpu.h:1.118
--- src/sys/arch/powerpc/include/cpu.h:1.117	Wed Feb 24 16:42:38 2021
+++ src/sys/arch/powerpc/include/cpu.h	Sun Mar  7 14:42:53 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.117 2021/02/24 16:42:38 thorpej Exp $	*/
+/*	$NetBSD: cpu.h,v 1.118 2021/03/07 14:42:53 rin Exp $	*/
 
 /*
  * Copyright (C) 1999 Wolfgang Solfrank.
@@ -118,18 +118,20 @@ struct cpu_info {
 	volatile uint32_t ci_pending_ipis;
 	int ci_mtx_oldspl;
 	int ci_mtx_count;
-#if defined(PPC_IBM4XX) || defined(MODULAR) || defined(_MODULE)
+#if defined(PPC_IBM4XX) || \
+((defined(MODULAR) || defined(_MODULE)) && !defined(_LP64))
 	char *ci_intstk;
 #endif
 
 	register_t ci_savearea[CPUSAVE_SIZE];
-#if defined(PPC_BOOKE) || defined(MODULAR) || defined(_MODULE)
+#if defined(PPC_BOOKE) || \
+((defined(MODULAR) || defined(_MODULE)) && !defined(_LP64))
 	uint32_t ci_pmap_asid_cur;
 	union pmap_segtab *ci_pmap_segtabs[2];
 #define	ci_pmap_kern_segtab	ci_pmap_segtabs[0]
 #define	ci_pmap_user_segtab	ci_pmap_segtabs[1]
 	struct pmap_tlb_info *ci_tlb_info;
-#endif /* PPC_BOOKE || MODULAR || _MODULE */
+#endif /* PPC_BOOKE || ((MODULAR || _MODULE) && !_LP64) */
 	struct cache_info ci_ci;		
 	void *ci_sysmon_cookie;
 	void (*ci_idlespin)(void);



CVS commit: src/sys/arch/powerpc/include

2021-03-07 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sun Mar  7 14:42:53 UTC 2021

Modified Files:
src/sys/arch/powerpc/include: cpu.h

Log Message:
For LP64, remove members of struct cpu_info that exist just for
compatible with booke or ibm4xx. Even if MODULAR || _MODULE,
these members are useless for powerpc64.


To generate a diff of this commit:
cvs rdiff -u -r1.117 -r1.118 src/sys/arch/powerpc/include/cpu.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/powerpc/include

2021-03-07 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sun Mar  7 14:31:53 UTC 2021

Modified Files:
src/sys/arch/powerpc/include: proc.h

Log Message:
For _LP64, disable members of struct mdproc just for compatible with
booke and ibm4xx, even if MODULAR or _MODULE is defined.

Fix build failure for evbppc64 due to CTASSERT in COND_SET_STRUCT,
which restricts sizeof(struct mdproc) < 31 for unknown reason...


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/powerpc/include/proc.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/powerpc/include/proc.h
diff -u src/sys/arch/powerpc/include/proc.h:1.14 src/sys/arch/powerpc/include/proc.h:1.15
--- src/sys/arch/powerpc/include/proc.h:1.14	Sat Mar  6 08:08:19 2021
+++ src/sys/arch/powerpc/include/proc.h	Sun Mar  7 14:31:53 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: proc.h,v 1.14 2021/03/06 08:08:19 rin Exp $	*/
+/*	$NetBSD: proc.h,v 1.15 2021/03/07 14:31:53 rin Exp $	*/
 
 /*-
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -53,7 +53,7 @@ struct trapframe;
 struct mdproc {
 	void (*md_syscall)(struct trapframe *);
 #if defined(PPC_BOOKE) || defined(PPC_IBM4XX) || \
-defined(MODULAR) || defined(_MODULE)
+((defined(MODULAR) || defined(_MODULE)) && !defined(_LP64))
 	vaddr_t md_ss_addr[2];
 	uint32_t md_ss_insn[2];
 #endif



CVS commit: src/sys/arch/powerpc/include

2021-03-07 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sun Mar  7 14:31:53 UTC 2021

Modified Files:
src/sys/arch/powerpc/include: proc.h

Log Message:
For _LP64, disable members of struct mdproc just for compatible with
booke and ibm4xx, even if MODULAR or _MODULE is defined.

Fix build failure for evbppc64 due to CTASSERT in COND_SET_STRUCT,
which restricts sizeof(struct mdproc) < 31 for unknown reason...


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/powerpc/include/proc.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/powerpc/include

2021-02-28 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sun Feb 28 20:31:33 UTC 2021

Modified Files:
src/sys/arch/powerpc/include: ofw_machdep.h

Log Message:
Bump OFW_MAX_TRANSLATIONS from 32 -> 48.  32 was already tight (at least
on my Macs), and having having translations for the kernel itself present
in the firmware's translation table bumped it over the 32-entry limit.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/powerpc/include/ofw_machdep.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/powerpc/include/ofw_machdep.h
diff -u src/sys/arch/powerpc/include/ofw_machdep.h:1.2 src/sys/arch/powerpc/include/ofw_machdep.h:1.3
--- src/sys/arch/powerpc/include/ofw_machdep.h:1.2	Fri Feb 19 05:21:39 2021
+++ src/sys/arch/powerpc/include/ofw_machdep.h	Sun Feb 28 20:31:32 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: ofw_machdep.h,v 1.2 2021/02/19 05:21:39 thorpej Exp $ */
+/* $NetBSD: ofw_machdep.h,v 1.3 2021/02/28 20:31:32 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2021 The NetBSD Foundation, Inc.
@@ -52,7 +52,7 @@ struct OF_translation {
 	uint32_t	mode;
 };
 
-#define	OFW_MAX_TRANSLATIONS	32
+#define	OFW_MAX_TRANSLATIONS	48
 
 extern int ofw_chosen;		/* cached handle for "/chosen" */
 extern struct OF_translation ofw_translations[OFW_MAX_TRANSLATIONS];



CVS commit: src/sys/arch/powerpc/include

2021-02-28 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sun Feb 28 20:31:33 UTC 2021

Modified Files:
src/sys/arch/powerpc/include: ofw_machdep.h

Log Message:
Bump OFW_MAX_TRANSLATIONS from 32 -> 48.  32 was already tight (at least
on my Macs), and having having translations for the kernel itself present
in the firmware's translation table bumped it over the 32-entry limit.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/powerpc/include/ofw_machdep.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/powerpc/include

2021-02-03 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Feb  3 10:37:05 UTC 2021

Modified Files:
src/sys/arch/powerpc/include: cpu.h

Log Message:
Pull out constant definitions inside struct declaration.

Enable CTASSERT(9) for CPUSAVE_SIZE.


To generate a diff of this commit:
cvs rdiff -u -r1.115 -r1.116 src/sys/arch/powerpc/include/cpu.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/powerpc/include/cpu.h
diff -u src/sys/arch/powerpc/include/cpu.h:1.115 src/sys/arch/powerpc/include/cpu.h:1.116
--- src/sys/arch/powerpc/include/cpu.h:1.115	Wed Jul 15 08:58:51 2020
+++ src/sys/arch/powerpc/include/cpu.h	Wed Feb  3 10:37:05 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.115 2020/07/15 08:58:51 rin Exp $	*/
+/*	$NetBSD: cpu.h,v 1.116 2021/02/03 10:37:05 rin Exp $	*/
 
 /*
  * Copyright (C) 1999 Wolfgang Solfrank.
@@ -60,6 +60,31 @@ struct cache_info {
 
 #include 
 
+#ifdef _KERNEL
+#define	CI_SAVETEMP	(0*CPUSAVE_LEN)
+#define	CI_SAVEDDB	(1*CPUSAVE_LEN)
+#define	CI_SAVEIPKDB	(2*CPUSAVE_LEN)	/* obsolete */
+#define	CI_SAVEMMU	(3*CPUSAVE_LEN)
+#define	CI_SAVEMAX	(4*CPUSAVE_LEN)
+#define	CPUSAVE_LEN	8
+#if defined(PPC_BOOKE) && !defined(MODULAR) && !defined(_MODULE)
+#define	CPUSAVE_SIZE	128
+#else
+#define	CPUSAVE_SIZE	(CI_SAVEMAX*CPUSAVE_LEN)
+CTASSERT(CPUSAVE_SIZE >= 128);
+#endif
+#define	CPUSAVE_R28	0		/* where r28 gets saved */
+#define	CPUSAVE_R29	1		/* where r29 gets saved */
+#define	CPUSAVE_R30	2		/* where r30 gets saved */
+#define	CPUSAVE_R31	3		/* where r31 gets saved */
+#define	CPUSAVE_DEAR	4		/* where IBM4XX SPR_DEAR gets saved */
+#define	CPUSAVE_DAR	4		/* where OEA SPR_DAR gets saved */
+#define	CPUSAVE_ESR	5		/* where IBM4XX SPR_ESR gets saved */
+#define	CPUSAVE_DSISR	5		/* where OEA SPR_DSISR gets saved */
+#define	CPUSAVE_SRR0	6		/* where SRR0 gets saved */
+#define	CPUSAVE_SRR1	7		/* where SRR1 gets saved */
+#endif /* _KERNEL */
+
 struct cpu_info {
 	struct cpu_data ci_data;	/* MI per-cpu data */
 #ifdef _KERNEL
@@ -92,28 +117,7 @@ struct cpu_info {
 #if defined(PPC_IBM4XX) || defined(MODULAR) || defined(_MODULE)
 	char *ci_intstk;
 #endif
-#define	CI_SAVETEMP	(0*CPUSAVE_LEN)
-#define	CI_SAVEDDB	(1*CPUSAVE_LEN)
-#define	CI_SAVEIPKDB	(2*CPUSAVE_LEN)	/* obsolete */
-#define	CI_SAVEMMU	(3*CPUSAVE_LEN)
-#define	CI_SAVEMAX	(4*CPUSAVE_LEN)
-#define	CPUSAVE_LEN	8
-#if defined(PPC_BOOKE) && !defined(MODULAR) && !defined(_MODULE)
-#define	CPUSAVE_SIZE	128
-#else
-#define	CPUSAVE_SIZE	(CI_SAVEMAX*CPUSAVE_LEN)
-// XXX CTASSERT(CPUSAVE_SIZE >= 128);
-#endif
-#define	CPUSAVE_R28	0		/* where r28 gets saved */
-#define	CPUSAVE_R29	1		/* where r29 gets saved */
-#define	CPUSAVE_R30	2		/* where r30 gets saved */
-#define	CPUSAVE_R31	3		/* where r31 gets saved */
-#define	CPUSAVE_DEAR	4		/* where IBM4XX SPR_DEAR gets saved */
-#define	CPUSAVE_DAR	4		/* where OEA SPR_DAR gets saved */
-#define	CPUSAVE_ESR	5		/* where IBM4XX SPR_ESR gets saved */
-#define	CPUSAVE_DSISR	5		/* where OEA SPR_DSISR gets saved */
-#define	CPUSAVE_SRR0	6		/* where SRR0 gets saved */
-#define	CPUSAVE_SRR1	7		/* where SRR1 gets saved */
+
 	register_t ci_savearea[CPUSAVE_SIZE];
 #if defined(PPC_BOOKE) || defined(MODULAR) || defined(_MODULE)
 	uint32_t ci_pmap_asid_cur;



CVS commit: src/sys/arch/powerpc/include

2021-02-03 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Feb  3 10:37:05 UTC 2021

Modified Files:
src/sys/arch/powerpc/include: cpu.h

Log Message:
Pull out constant definitions inside struct declaration.

Enable CTASSERT(9) for CPUSAVE_SIZE.


To generate a diff of this commit:
cvs rdiff -u -r1.115 -r1.116 src/sys/arch/powerpc/include/cpu.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/powerpc/include

2021-01-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Jan  6 08:14:35 UTC 2021

Modified Files:
src/sys/arch/powerpc/include: db_machdep.h

Log Message:
Switch DDB for powerpc/booke into SOFTWARE_SSTEP.

SR_SINGLESTEP aka PSL_SE bit in MSR is only available for oea, and HW
debug facilities for booke are significantly different from oea.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/powerpc/include/db_machdep.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/powerpc/include/db_machdep.h
diff -u src/sys/arch/powerpc/include/db_machdep.h:1.28 src/sys/arch/powerpc/include/db_machdep.h:1.29
--- src/sys/arch/powerpc/include/db_machdep.h:1.28	Mon Jul  6 09:34:17 2020
+++ src/sys/arch/powerpc/include/db_machdep.h	Wed Jan  6 08:14:34 2021
@@ -1,5 +1,5 @@
 /*	$OpenBSD: db_machdep.h,v 1.2 1997/03/21 00:48:48 niklas Exp $	*/
-/*	$NetBSD: db_machdep.h,v 1.28 2020/07/06 09:34:17 rin Exp $	*/
+/*	$NetBSD: db_machdep.h,v 1.29 2021/01/06 08:14:34 rin Exp $	*/
 
 /* 
  * Mach Operating System
@@ -71,8 +71,8 @@ extern	db_regs_t	ddb_regs;		/* register 
 #define	BKPT_SIZE	(4)		/* size of breakpoint inst */
 #define	BKPT_SET(inst, addr)	(BKPT_INST)
 
-#ifndef PPC_IBM4XX
-#define SR_SINGLESTEP	0x400
+#if !defined(PPC_BOOKE) && !defined(PPC_IBM4XX)
+#define	SR_SINGLESTEP	0x400		/* PSL_SE, available only for oea */
 #define	db_clear_single_step(regs)	((regs)->msr &= ~SR_SINGLESTEP)
 #define	db_set_single_step(regs)	((regs)->msr |=  SR_SINGLESTEP)
 #else



CVS commit: src/sys/arch/powerpc/include

2021-01-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Jan  6 08:14:35 UTC 2021

Modified Files:
src/sys/arch/powerpc/include: db_machdep.h

Log Message:
Switch DDB for powerpc/booke into SOFTWARE_SSTEP.

SR_SINGLESTEP aka PSL_SE bit in MSR is only available for oea, and HW
debug facilities for booke are significantly different from oea.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/powerpc/include/db_machdep.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/powerpc/include

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 13:20:55 UTC 2020

Modified Files:
src/sys/arch/powerpc/include: cpu.h

Log Message:
Use (CI_SAVEMAX*CPUSAVE_LEN) as CPUSAVE_SIZE for MODULAR || _MODULE,
since it exceeds 128 (256 for now).

XXX
We should use CTASSERT here, but it conflicts with genassym...


To generate a diff of this commit:
cvs rdiff -u -r1.112 -r1.113 src/sys/arch/powerpc/include/cpu.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/powerpc/include/cpu.h
diff -u src/sys/arch/powerpc/include/cpu.h:1.112 src/sys/arch/powerpc/include/cpu.h:1.113
--- src/sys/arch/powerpc/include/cpu.h:1.112	Mon Jul  6 10:50:32 2020
+++ src/sys/arch/powerpc/include/cpu.h	Mon Jul  6 13:20:55 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.112 2020/07/06 10:50:32 rin Exp $	*/
+/*	$NetBSD: cpu.h,v 1.113 2020/07/06 13:20:55 rin Exp $	*/
 
 /*
  * Copyright (C) 1999 Wolfgang Solfrank.
@@ -98,10 +98,11 @@ struct cpu_info {
 #define	CI_SAVEMMU	(3*CPUSAVE_LEN)
 #define	CI_SAVEMAX	(4*CPUSAVE_LEN)
 #define	CPUSAVE_LEN	8
-#if !defined(PPC_BOOKE) && !defined(MODULAR) && !defined(_MODULE)
-#define	CPUSAVE_SIZE	(CI_SAVEMAX*CPUSAVE_LEN)
-#else
+#if defined(PPC_BOOKE) && !defined(MODULAR) && !defined(_MODULE)
 #define	CPUSAVE_SIZE	128
+#else
+#define	CPUSAVE_SIZE	(CI_SAVEMAX*CPUSAVE_LEN)
+// XXX CTASSERT(CPUSAVE_SIZE >= 128);
 #endif
 #define	CPUSAVE_R28	0		/* where r28 gets saved */
 #define	CPUSAVE_R29	1		/* where r29 gets saved */



CVS commit: src/sys/arch/powerpc/include

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 13:20:55 UTC 2020

Modified Files:
src/sys/arch/powerpc/include: cpu.h

Log Message:
Use (CI_SAVEMAX*CPUSAVE_LEN) as CPUSAVE_SIZE for MODULAR || _MODULE,
since it exceeds 128 (256 for now).

XXX
We should use CTASSERT here, but it conflicts with genassym...


To generate a diff of this commit:
cvs rdiff -u -r1.112 -r1.113 src/sys/arch/powerpc/include/cpu.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/powerpc/include/oea

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 10:57:03 UTC 2020

Modified Files:
src/sys/arch/powerpc/include/oea: pmap.h

Log Message:
Include missing opt_modular.h so that struct vm_page_md is compatible to
that for booke.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/powerpc/include/oea/pmap.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/powerpc/include/oea/pmap.h
diff -u src/sys/arch/powerpc/include/oea/pmap.h:1.31 src/sys/arch/powerpc/include/oea/pmap.h:1.32
--- src/sys/arch/powerpc/include/oea/pmap.h:1.31	Mon Jul  6 09:10:02 2020
+++ src/sys/arch/powerpc/include/oea/pmap.h	Mon Jul  6 10:57:03 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.h,v 1.31 2020/07/06 09:10:02 rin Exp $	*/
+/*	$NetBSD: pmap.h,v 1.32 2020/07/06 10:57:03 rin Exp $	*/
 
 /*-
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -44,6 +44,7 @@
 
 #ifdef _KERNEL_OPT
 #include "opt_ppcarch.h"
+#include "opt_modular.h"
 #endif
 #include 
 



CVS commit: src/sys/arch/powerpc/include/oea

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 10:57:03 UTC 2020

Modified Files:
src/sys/arch/powerpc/include/oea: pmap.h

Log Message:
Include missing opt_modular.h so that struct vm_page_md is compatible to
that for booke.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/powerpc/include/oea/pmap.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/powerpc/include

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 10:50:32 UTC 2020

Modified Files:
src/sys/arch/powerpc/include: cpu.h

Log Message:
Drop unused opt_lockdebug.h.


To generate a diff of this commit:
cvs rdiff -u -r1.111 -r1.112 src/sys/arch/powerpc/include/cpu.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/powerpc/include/cpu.h
diff -u src/sys/arch/powerpc/include/cpu.h:1.111 src/sys/arch/powerpc/include/cpu.h:1.112
--- src/sys/arch/powerpc/include/cpu.h:1.111	Sat Jun 27 07:33:51 2020
+++ src/sys/arch/powerpc/include/cpu.h	Mon Jul  6 10:50:32 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.111 2020/06/27 07:33:51 macallan Exp $	*/
+/*	$NetBSD: cpu.h,v 1.112 2020/07/06 10:50:32 rin Exp $	*/
 
 /*
  * Copyright (C) 1999 Wolfgang Solfrank.
@@ -45,7 +45,6 @@ struct cache_info {
 
 #if defined(_KERNEL) || defined(_KMEMUSER)
 #if defined(_KERNEL_OPT)
-#include "opt_lockdebug.h"
 #include "opt_modular.h"
 #include "opt_multiprocessor.h"
 #include "opt_ppcarch.h"



CVS commit: src/sys/arch/powerpc/include

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 10:50:32 UTC 2020

Modified Files:
src/sys/arch/powerpc/include: cpu.h

Log Message:
Drop unused opt_lockdebug.h.


To generate a diff of this commit:
cvs rdiff -u -r1.111 -r1.112 src/sys/arch/powerpc/include/cpu.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/powerpc/include/oea

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 09:10:02 UTC 2020

Modified Files:
src/sys/arch/powerpc/include/oea: pmap.h

Log Message:
LKM was gone.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/powerpc/include/oea/pmap.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/powerpc/include/oea/pmap.h
diff -u src/sys/arch/powerpc/include/oea/pmap.h:1.30 src/sys/arch/powerpc/include/oea/pmap.h:1.31
--- src/sys/arch/powerpc/include/oea/pmap.h:1.30	Sat Mar 14 14:05:43 2020
+++ src/sys/arch/powerpc/include/oea/pmap.h	Mon Jul  6 09:10:02 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.h,v 1.30 2020/03/14 14:05:43 ad Exp $	*/
+/*	$NetBSD: pmap.h,v 1.31 2020/07/06 09:10:02 rin Exp $	*/
 
 /*-
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -38,7 +38,7 @@
 #error use assym.h instead
 #endif
 
-#if defined(_LKM) || defined(_MODULE)
+#ifdef _MODULE
 #error this file should not be included by loadable kernel modules
 #endif
 



CVS commit: src/sys/arch/powerpc/include/oea

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 09:10:02 UTC 2020

Modified Files:
src/sys/arch/powerpc/include/oea: pmap.h

Log Message:
LKM was gone.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/powerpc/include/oea/pmap.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/powerpc/include

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 08:26:10 UTC 2020

Modified Files:
src/sys/arch/powerpc/include: vmparam.h

Log Message:
Correct #ifdef; _MODULE not _MODULAR here.

Now __HAVE_PMAP_PHYSSEG is defined correctly for modules, which was
missing accidentally.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/powerpc/include/vmparam.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/powerpc/include/vmparam.h
diff -u src/sys/arch/powerpc/include/vmparam.h:1.23 src/sys/arch/powerpc/include/vmparam.h:1.24
--- src/sys/arch/powerpc/include/vmparam.h:1.23	Sat Jun 27 02:51:23 2020
+++ src/sys/arch/powerpc/include/vmparam.h	Mon Jul  6 08:26:10 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: vmparam.h,v 1.23 2020/06/27 02:51:23 rin Exp $	*/
+/*	$NetBSD: vmparam.h,v 1.24 2020/07/06 08:26:10 rin Exp $	*/
 
 #ifndef _POWERPC_VMPARAM_H_
 #define _POWERPC_VMPARAM_H_
@@ -77,7 +77,7 @@ extern const char __USRSTACK;		/* let th
 
 #endif /* !_MODULE */
 
-#if defined(MODULAR) || defined(_MODULAR)
+#if defined(MODULAR) || defined(_MODULE)
 /*
  * If we are a module or support modules, we need to define a compatible
  * pmap_physseg since IBM4XX uses one.  This will waste a tiny of space



CVS commit: src/sys/arch/powerpc/include

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 08:26:10 UTC 2020

Modified Files:
src/sys/arch/powerpc/include: vmparam.h

Log Message:
Correct #ifdef; _MODULE not _MODULAR here.

Now __HAVE_PMAP_PHYSSEG is defined correctly for modules, which was
missing accidentally.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/powerpc/include/vmparam.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/powerpc/include

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 08:20:40 UTC 2020

Modified Files:
src/sys/arch/powerpc/include: asm.h

Log Message:
Consistently use _LP64 instead of __LP64__, although both are defined for
powerpc64.

No binary changes intended.


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/sys/arch/powerpc/include/asm.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/powerpc/include

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 08:20:40 UTC 2020

Modified Files:
src/sys/arch/powerpc/include: asm.h

Log Message:
Consistently use _LP64 instead of __LP64__, although both are defined for
powerpc64.

No binary changes intended.


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/sys/arch/powerpc/include/asm.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/powerpc/include/asm.h
diff -u src/sys/arch/powerpc/include/asm.h:1.51 src/sys/arch/powerpc/include/asm.h:1.52
--- src/sys/arch/powerpc/include/asm.h:1.51	Sat Apr 18 10:37:37 2020
+++ src/sys/arch/powerpc/include/asm.h	Mon Jul  6 08:20:40 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: asm.h,v 1.51 2020/04/18 10:37:37 joerg Exp $	*/
+/*	$NetBSD: asm.h,v 1.52 2020/07/06 08:20:40 rin Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -81,7 +81,7 @@
 #  define PIC_TOCSETUP(n, r)
 # endif /* __PIC__ */
 
-#endif /* __LP64__ */
+#endif /* _LP64 */
 
 #define	_C_LABEL(x)	x
 #define	_ASM_LABEL(x)	x
@@ -148,7 +148,7 @@ y:	.quad	.##y,.TOC.@tocbase,0;	\
 
 # define ENTRY_NOPROFILE(y) _ENTRY(_C_LABEL(y))
 # define ASENTRY(y)	_ENTRY(_ASM_LABEL(y)); _PROF_PROLOGUE
-#endif /* __LP64__ */
+#endif /* _LP64 */
 
 #define	GLOBAL(y)	_GLOBAL(_C_LABEL(y))
 
@@ -369,7 +369,7 @@ y:	.quad	.##y,.TOC.@tocbase,0;	\
 # define cmplongli	cmplwi
 # define cmpregli	cmplwi
 
-#else /* __LP64__ */
+#else /* _LP64 */
 
 # define ldlong		ld	/* load "C" long */
 # define ldlongu	ldu	/* load "C" long with update */
@@ -414,7 +414,7 @@ y:	.quad	.##y,.TOC.@tocbase,0;	\
 # define cmplongli	cmpldi
 # define cmpregli	cmpldi
 
-#endif /* __LP64__ */
+#endif /* _LP64 */
 
 #ifdef _LOCORE
 .macro	stmd	r,dst
@@ -435,7 +435,7 @@ y:	.quad	.##y,.TOC.@tocbase,0;	\
 #endif /* _LOCORE */
 
 #if defined(IBM405_ERRATA77) || \
-((defined(_MODULE) || !defined(_KERNEL)) && !defined(__LP64__))
+((defined(_MODULE) || !defined(_KERNEL)) && !defined(_LP64))
 /*
  * Workaround for IBM405 Errata 77 (CPU_210): interrupted stwcx. may
  * errantly write data to memory



CVS commit: src/sys/arch/powerpc/include

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 08:18:57 UTC 2020

Modified Files:
src/sys/arch/powerpc/include: frame.h

Log Message:
LKM was gone. _KERNEL is always defined for module.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/powerpc/include/frame.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/powerpc/include

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 08:18:57 UTC 2020

Modified Files:
src/sys/arch/powerpc/include: frame.h

Log Message:
LKM was gone. _KERNEL is always defined for module.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/powerpc/include/frame.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/powerpc/include/frame.h
diff -u src/sys/arch/powerpc/include/frame.h:1.27 src/sys/arch/powerpc/include/frame.h:1.28
--- src/sys/arch/powerpc/include/frame.h:1.27	Sun Jan 24 19:49:35 2016
+++ src/sys/arch/powerpc/include/frame.h	Mon Jul  6 08:18:57 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: frame.h,v 1.27 2016/01/24 19:49:35 christos Exp $	*/
+/*	$NetBSD: frame.h,v 1.28 2020/07/06 08:18:57 rin Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -159,7 +159,7 @@ struct ktrapframe {
 	__register_t ktf_cframe_lr;	/* for DDB */
 };
 
-#if defined(_KERNEL) || defined(_LKM)
+#if defined(_KERNEL)
 #ifdef _LP64
 struct utrapframe32 {
 	__register32_t fixreg[32];
@@ -174,7 +174,7 @@ struct utrapframe32 {
 	int spare;
 };
 #endif
-#endif /* _KERNEL || _LKM */
+#endif /* _KERNEL */
 
 /*
  * This is to ensure alignment of the stackpointer



CVS commit: src/sys/arch/powerpc/include

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 08:17:01 UTC 2020

Modified Files:
src/sys/arch/powerpc/include: pmap.h
src/sys/arch/powerpc/include/oea: pte.h

Log Message:
Fix comments. No binary changes.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/powerpc/include/pmap.h
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/powerpc/include/oea/pte.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/powerpc/include/pmap.h
diff -u src/sys/arch/powerpc/include/pmap.h:1.39 src/sys/arch/powerpc/include/pmap.h:1.40
--- src/sys/arch/powerpc/include/pmap.h:1.39	Sat Jun 27 02:40:24 2020
+++ src/sys/arch/powerpc/include/pmap.h	Mon Jul  6 08:17:01 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.h,v 1.39 2020/06/27 02:40:24 rin Exp $	*/
+/*	$NetBSD: pmap.h,v 1.40 2020/07/06 08:17:01 rin Exp $	*/
 
 #ifndef _POWERPC_PMAP_H_
 #define _POWERPC_PMAP_H_
@@ -35,7 +35,7 @@
 struct vm_page_md {
 	uintptr_t mdpg_dummy[5];
 };
-#endif /* !__HVE_VM_PAGE_MD */
+#endif /* !__HAVE_VM_PAGE_MD */
 
 __CTASSERT(sizeof(struct vm_page_md) == sizeof(uintptr_t)*5);
 

Index: src/sys/arch/powerpc/include/oea/pte.h
diff -u src/sys/arch/powerpc/include/oea/pte.h:1.9 src/sys/arch/powerpc/include/oea/pte.h:1.10
--- src/sys/arch/powerpc/include/oea/pte.h:1.9	Tue Feb  5 18:10:47 2008
+++ src/sys/arch/powerpc/include/oea/pte.h	Mon Jul  6 08:17:01 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: pte.h,v 1.9 2008/02/05 18:10:47 garbled Exp $	*/
+/*	$NetBSD: pte.h,v 1.10 2020/07/06 08:17:01 rin Exp $	*/
 
 /*-
  * Copyright (C) 2003 Matt Thomas
@@ -46,7 +46,7 @@ struct pte {
 	register64_t pte_hi;
 	register64_t pte_lo;
 };
-#else	/* PPC_OEA || PPC_OEA64 */
+#else	/* PMAP_OEA */
 struct pte {
 	register_t pte_hi;
 	register_t pte_lo;



CVS commit: src/sys/arch/powerpc/include

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 08:17:01 UTC 2020

Modified Files:
src/sys/arch/powerpc/include: pmap.h
src/sys/arch/powerpc/include/oea: pte.h

Log Message:
Fix comments. No binary changes.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/powerpc/include/pmap.h
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/powerpc/include/oea/pte.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/powerpc/include/booke

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 08:14:54 UTC 2020

Modified Files:
src/sys/arch/powerpc/include/booke: e500var.h

Log Message:
e500_cpunode_submatch() should be declared regardless of _KERNEL_OPT.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/powerpc/include/booke/e500var.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/powerpc/include/booke

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 08:14:54 UTC 2020

Modified Files:
src/sys/arch/powerpc/include/booke: e500var.h

Log Message:
e500_cpunode_submatch() should be declared regardless of _KERNEL_OPT.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/powerpc/include/booke/e500var.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/powerpc/include/booke/e500var.h
diff -u src/sys/arch/powerpc/include/booke/e500var.h:1.7 src/sys/arch/powerpc/include/booke/e500var.h:1.8
--- src/sys/arch/powerpc/include/booke/e500var.h:1.7	Tue Nov 27 19:24:47 2012
+++ src/sys/arch/powerpc/include/booke/e500var.h	Mon Jul  6 08:14:54 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: e500var.h,v 1.7 2012/11/27 19:24:47 matt Exp $	*/
+/*	$NetBSD: e500var.h,v 1.8 2020/07/06 08:14:54 rin Exp $	*/
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -78,9 +78,7 @@ struct e500_truthtab {
 u_int	e500_truth_decode(u_int, uint32_t, const struct e500_truthtab *,
 	size_t, u_int);
 uint16_t e500_get_svr(void);
-#ifdef _KERNEL_OPT
 int	e500_cpunode_submatch(device_t, cfdata_t, const char *, void *);
-#endif
 
 /*
  * Used by MP hatch code to fetch the TLB1 entries so they be setup on the



Re: CVS commit: src/sys/arch/powerpc/include

2020-06-27 Thread Rin Okuyama

Perhaps yes, but I'm not sure. How do you mips guys think?

Thanks,
rin

On 2020/06/27 19:08, Jaromír Doleček wrote:

Perhaps we can use a similar technique for mips too? There also the
kernel actually always uses a compile-time fixed page size AFAICS.

Jaromir

Le sam. 27 juin 2020 à 04:51, Rin Okuyama  a écrit :


Module Name:src
Committed By:   rin
Date:   Sat Jun 27 02:51:23 UTC 2020

Modified Files:
 src/sys/arch/powerpc/include: vmparam.h

Log Message:
Restrict {MIN,MAX}_PAGE_SIZE for MODULAR || _MODULE, which makes
non-MODULAR kernel a little bit efficient.

They are also exposed to userland for jemalloc.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/powerpc/include/vmparam.h

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/powerpc/include

2020-06-27 Thread Jaromír Doleček
Perhaps we can use a similar technique for mips too? There also the
kernel actually always uses a compile-time fixed page size AFAICS.

Jaromir

Le sam. 27 juin 2020 à 04:51, Rin Okuyama  a écrit :
>
> Module Name:src
> Committed By:   rin
> Date:   Sat Jun 27 02:51:23 UTC 2020
>
> Modified Files:
> src/sys/arch/powerpc/include: vmparam.h
>
> Log Message:
> Restrict {MIN,MAX}_PAGE_SIZE for MODULAR || _MODULE, which makes
> non-MODULAR kernel a little bit efficient.
>
> They are also exposed to userland for jemalloc.
>
>
> To generate a diff of this commit:
> cvs rdiff -u -r1.22 -r1.23 src/sys/arch/powerpc/include/vmparam.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/powerpc/include

2020-06-27 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Sat Jun 27 07:33:51 UTC 2020

Modified Files:
src/sys/arch/powerpc/include: cpu.h

Log Message:
apply __HIDE_DELAY so zfs and friends at least compile


To generate a diff of this commit:
cvs rdiff -u -r1.110 -r1.111 src/sys/arch/powerpc/include/cpu.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/powerpc/include/cpu.h
diff -u src/sys/arch/powerpc/include/cpu.h:1.110 src/sys/arch/powerpc/include/cpu.h:1.111
--- src/sys/arch/powerpc/include/cpu.h:1.110	Sun Dec  1 15:34:45 2019
+++ src/sys/arch/powerpc/include/cpu.h	Sat Jun 27 07:33:51 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.110 2019/12/01 15:34:45 ad Exp $	*/
+/*	$NetBSD: cpu.h,v 1.111 2020/06/27 07:33:51 macallan Exp $	*/
 
 /*
  * Copyright (C) 1999 Wolfgang Solfrank.
@@ -416,8 +416,10 @@ void	cpu_debug_dump(void);
 
 #define	cpu_proc_fork(p1, p2)
 
+#ifndef __HIDE_DELAY
 #define	DELAY(n)		delay(n)
 void	delay(unsigned int);
+#endif /* __HIDE_DELAY */
 
 #define	CLKF_USERMODE(cf)	cpu_clkf_usermode(cf)
 #define	CLKF_PC(cf)		cpu_clkf_pc(cf)



CVS commit: src/sys/arch/powerpc/include

2020-06-27 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Sat Jun 27 07:33:51 UTC 2020

Modified Files:
src/sys/arch/powerpc/include: cpu.h

Log Message:
apply __HIDE_DELAY so zfs and friends at least compile


To generate a diff of this commit:
cvs rdiff -u -r1.110 -r1.111 src/sys/arch/powerpc/include/cpu.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/powerpc/include

2020-06-26 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Jun 27 02:51:23 UTC 2020

Modified Files:
src/sys/arch/powerpc/include: vmparam.h

Log Message:
Restrict {MIN,MAX}_PAGE_SIZE for MODULAR || _MODULE, which makes
non-MODULAR kernel a little bit efficient.

They are also exposed to userland for jemalloc.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/powerpc/include/vmparam.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/powerpc/include/vmparam.h
diff -u src/sys/arch/powerpc/include/vmparam.h:1.22 src/sys/arch/powerpc/include/vmparam.h:1.23
--- src/sys/arch/powerpc/include/vmparam.h:1.22	Fri Mar 29 12:51:15 2019
+++ src/sys/arch/powerpc/include/vmparam.h	Sat Jun 27 02:51:23 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: vmparam.h,v 1.22 2019/03/29 12:51:15 christos Exp $	*/
+/*	$NetBSD: vmparam.h,v 1.23 2020/06/27 02:51:23 rin Exp $	*/
 
 #ifndef _POWERPC_VMPARAM_H_
 #define _POWERPC_VMPARAM_H_
@@ -28,15 +28,18 @@
 #define VM_DEFAULT_ADDRESS_BOTTOMUP(da, sz) \
 round_page((vaddr_t)(da) + (vsize_t)maxdmap)
 
+#if defined(MODULAR) || defined(_MODULE) || !defined(_KERNEL)
 /*
  * If we are a module or a modular kernel, then we need to defined the range
  * of our varible page sizes since BOOKE and OEA use 4KB pages while IBM4XX
  * use 16KB pages.
+ * This is also required for userland by jemalloc.
  */
 #define MIN_PAGE_SHIFT	12			/* BOOKE/OEA */
 #define MAX_PAGE_SHIFT	14			/* IBM4XX */
 #define	MIN_PAGE_SIZE	(1 << MIN_PAGE_SHIFT)
 #define	MAX_PAGE_SIZE	(1 << MAX_PAGE_SHIFT)
+#endif /* MODULAR || _MODULE || !_KERNEL */
 
 #if defined(_MODULE)
 #if defined(_RUMPKERNEL)



CVS commit: src/sys/arch/powerpc/include

2020-06-26 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Jun 27 02:51:23 UTC 2020

Modified Files:
src/sys/arch/powerpc/include: vmparam.h

Log Message:
Restrict {MIN,MAX}_PAGE_SIZE for MODULAR || _MODULE, which makes
non-MODULAR kernel a little bit efficient.

They are also exposed to userland for jemalloc.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/powerpc/include/vmparam.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/powerpc/include

2020-06-26 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Jun 27 02:40:24 UTC 2020

Modified Files:
src/sys/arch/powerpc/include: pmap.h

Log Message:
Fix MODULAR support for ibm4xx by providing __nothing as VM_MDPAGE_INIT().


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

2020-06-26 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Jun 27 02:40:24 UTC 2020

Modified Files:
src/sys/arch/powerpc/include: pmap.h

Log Message:
Fix MODULAR support for ibm4xx by providing __nothing as VM_MDPAGE_INIT().


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/sys/arch/powerpc/include/pmap.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/powerpc/include/pmap.h
diff -u src/sys/arch/powerpc/include/pmap.h:1.38 src/sys/arch/powerpc/include/pmap.h:1.39
--- src/sys/arch/powerpc/include/pmap.h:1.38	Mon Jun 20 21:45:16 2011
+++ src/sys/arch/powerpc/include/pmap.h	Sat Jun 27 02:40:24 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.h,v 1.38 2011/06/20 21:45:16 matt Exp $	*/
+/*	$NetBSD: pmap.h,v 1.39 2020/06/27 02:40:24 rin Exp $	*/
 
 #ifndef _POWERPC_PMAP_H_
 #define _POWERPC_PMAP_H_
@@ -30,6 +30,7 @@
  */
 #ifndef __HAVE_VM_PAGE_MD
 #define __HAVE_VM_PAGE_MD
+#define VM_MDPAGE_INIT(pg) __nothing
 
 struct vm_page_md {
 	uintptr_t mdpg_dummy[5];



CVS commit: src/sys/arch/powerpc/include

2020-04-18 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sat Apr 18 10:37:37 UTC 2020

Modified Files:
src/sys/arch/powerpc/include: asm.h

Log Message:
It's __RCSID for an extra level of indirection on PPC


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/sys/arch/powerpc/include/asm.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/powerpc/include

2020-04-18 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sat Apr 18 10:37:37 UTC 2020

Modified Files:
src/sys/arch/powerpc/include: asm.h

Log Message:
It's __RCSID for an extra level of indirection on PPC


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/sys/arch/powerpc/include/asm.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/powerpc/include/asm.h
diff -u src/sys/arch/powerpc/include/asm.h:1.50 src/sys/arch/powerpc/include/asm.h:1.51
--- src/sys/arch/powerpc/include/asm.h:1.50	Fri Apr 17 14:19:44 2020
+++ src/sys/arch/powerpc/include/asm.h	Sat Apr 18 10:37:37 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: asm.h,v 1.50 2020/04/17 14:19:44 joerg Exp $	*/
+/*	$NetBSD: asm.h,v 1.51 2020/04/18 10:37:37 joerg Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -156,7 +156,7 @@ y:	.quad	.##y,.TOC.@tocbase,0;	\
 
 #undef __RCSID
 #define RCSID(x)	__RCSID(x)
-#define RCSID(x)	.pushsection ".ident","MS",@progbits,1;		\
+#define __RCSID(x)	.pushsection ".ident","MS",@progbits,1;		\
 			.asciz x;	\
 			.popsection
 



CVS commit: src/sys/arch/powerpc/include

2020-04-16 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Thu Apr 16 22:11:12 UTC 2020

Modified Files:
src/sys/arch/powerpc/include: types.h

Log Message:
Discard __HAVE_UNLOCKED_PMAP for 4xx; 4xx is uniprocessor architecture,
and everything gets more than 10 times slower by __HAVE_UNLOCKED_PMAP.

Note that we support three supervisor-level architectures for powerpc:
oea, booke, and 4xx. We have three different implementations of pmap as
a result. Whereas oea and booke support multiprocessor, 4xx does not.


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/sys/arch/powerpc/include/types.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/powerpc/include/types.h
diff -u src/sys/arch/powerpc/include/types.h:1.61 src/sys/arch/powerpc/include/types.h:1.62
--- src/sys/arch/powerpc/include/types.h:1.61	Sun Mar 22 17:33:58 2020
+++ src/sys/arch/powerpc/include/types.h	Thu Apr 16 22:11:12 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: types.h,v 1.61 2020/03/22 17:33:58 ad Exp $	*/
+/*	$NetBSD: types.h,v 1.62 2020/04/16 22:11:12 rin Exp $	*/
 
 /*-
  * Copyright (C) 1995 Wolfgang Solfrank.
@@ -34,6 +34,10 @@
 #ifndef	_POWERPC_TYPES_H_
 #define	_POWERPC_TYPES_H_
 
+#ifdef _KERNEL_OPT
+#include "opt_ppcarch.h"
+#endif
+
 #include 
 #include 
 #include 
@@ -103,7 +107,9 @@ typedef __uint32_t tlb_asid_t;		/* for b
 #define	__HAVE_RAS
 #endif
 
+#ifndef PPC_IBM4XX
 /* XXX temporary */
 #define	__HAVE_UNLOCKED_PMAP
+#endif
 
 #endif	/* _POWERPC_TYPES_H_ */



CVS commit: src/sys/arch/powerpc/include

2020-04-16 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Thu Apr 16 22:11:12 UTC 2020

Modified Files:
src/sys/arch/powerpc/include: types.h

Log Message:
Discard __HAVE_UNLOCKED_PMAP for 4xx; 4xx is uniprocessor architecture,
and everything gets more than 10 times slower by __HAVE_UNLOCKED_PMAP.

Note that we support three supervisor-level architectures for powerpc:
oea, booke, and 4xx. We have three different implementations of pmap as
a result. Whereas oea and booke support multiprocessor, 4xx does not.


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/sys/arch/powerpc/include/types.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/powerpc/include/booke

2020-04-08 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Apr  8 10:57:16 UTC 2020

Modified Files:
src/sys/arch/powerpc/include/booke: pmap.h

Log Message:
Simplify #ifdefs


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/powerpc/include/booke/pmap.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/powerpc/include/booke/pmap.h
diff -u src/sys/arch/powerpc/include/booke/pmap.h:1.20 src/sys/arch/powerpc/include/booke/pmap.h:1.21
--- src/sys/arch/powerpc/include/booke/pmap.h:1.20	Thu Mar 12 23:09:59 2020
+++ src/sys/arch/powerpc/include/booke/pmap.h	Wed Apr  8 10:57:16 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.h,v 1.20 2020/03/12 23:09:59 thorpej Exp $	*/
+/*	$NetBSD: pmap.h,v 1.21 2020/04/08 10:57:16 skrll Exp $	*/
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -140,9 +140,7 @@ static __inline void
 pmap_md_vca_clean(struct vm_page *pg, vaddr_t va, int op)
 {
 }
-#endif
 
-#ifdef __PMAP_PRIVATE
 static __inline size_t
 pmap_md_tlb_asid_max(void)
 {



CVS commit: src/sys/arch/powerpc/include/booke

2020-04-08 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Apr  8 10:57:16 UTC 2020

Modified Files:
src/sys/arch/powerpc/include/booke: pmap.h

Log Message:
Simplify #ifdefs


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/powerpc/include/booke/pmap.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/powerpc/include/booke

2020-03-12 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Thu Mar 12 23:09:59 UTC 2020

Modified Files:
src/sys/arch/powerpc/include/booke: pmap.h

Log Message:
If we're going to consult the MULTIPROCESSOR option, we should pull in
"opt_multiprocessor.h".


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/powerpc/include/booke/pmap.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/powerpc/include/booke/pmap.h
diff -u src/sys/arch/powerpc/include/booke/pmap.h:1.19 src/sys/arch/powerpc/include/booke/pmap.h:1.20
--- src/sys/arch/powerpc/include/booke/pmap.h:1.19	Wed Mar 11 13:30:31 2020
+++ src/sys/arch/powerpc/include/booke/pmap.h	Thu Mar 12 23:09:59 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.h,v 1.19 2020/03/11 13:30:31 thorpej Exp $	*/
+/*	$NetBSD: pmap.h,v 1.20 2020/03/12 23:09:59 thorpej Exp $	*/
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -45,6 +45,7 @@
 #endif
 
 #ifdef _KERNEL_OPT
+#include "opt_multiprocessor.h"
 #include "opt_pmap.h"
 #endif
 



CVS commit: src/sys/arch/powerpc/include/booke

2020-03-12 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Thu Mar 12 23:09:59 UTC 2020

Modified Files:
src/sys/arch/powerpc/include/booke: pmap.h

Log Message:
If we're going to consult the MULTIPROCESSOR option, we should pull in
"opt_multiprocessor.h".


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/powerpc/include/booke/pmap.h

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



  1   2   3   4   5   >