CVS commit: src/sys/arch/alpha/include
Module Name:src Committed By: thorpej Date: Thu Jul 22 01:31:55 UTC 2021 Modified Files: src/sys/arch/alpha/include: proc.h Log Message: Use __BITS() to define MDLWP_FP_C. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/sys/arch/alpha/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/alpha/include/proc.h diff -u src/sys/arch/alpha/include/proc.h:1.22 src/sys/arch/alpha/include/proc.h:1.23 --- src/sys/arch/alpha/include/proc.h:1.22 Fri May 16 19:18:21 2014 +++ src/sys/arch/alpha/include/proc.h Thu Jul 22 01:31:55 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: proc.h,v 1.22 2014/05/16 19:18:21 matt Exp $ */ +/* $NetBSD: proc.h,v 1.23 2021/07/22 01:31:55 thorpej Exp $ */ /* * Copyright (c) 1994, 1995 Carnegie-Mellon University. @@ -61,7 +61,7 @@ struct mdlwp { * C99 API's, the use of the MDLWP_FP_C bits is defined variously in * ieeefp.h and fpu.h. */ -#define MDLWP_FP_C 0x007e /* Extended FP_C Quadword bits */ +#define MDLWP_FP_C __BITS(1,22) /* Extended FP_C Quadword bits */ #define MDLWP_FPACTIVE __BIT(63) /* FPU is active on LWP's PCU CPU */ /*
CVS commit: src/sys/arch/alpha/include
Module Name:src Committed By: thorpej Date: Tue Jul 20 05:43:10 UTC 2021 Modified Files: src/sys/arch/alpha/include: alpha.h Log Message: Define the f_float in-memory format. Line of the fields in s_float and t_float. To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/sys/arch/alpha/include/alpha.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/alpha/include/alpha.h diff -u src/sys/arch/alpha/include/alpha.h:1.45 src/sys/arch/alpha/include/alpha.h:1.46 --- src/sys/arch/alpha/include/alpha.h:1.45 Wed May 5 15:36:17 2021 +++ src/sys/arch/alpha/include/alpha.h Tue Jul 20 05:43:10 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: alpha.h,v 1.45 2021/05/05 15:36:17 thorpej Exp $ */ +/* $NetBSD: alpha.h,v 1.46 2021/07/20 05:43:10 thorpej Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -41,18 +41,26 @@ #ifndef _ALPHA_H_ #define _ALPHA_H_ +typedef union alpha_f_float { + uint32_t i; + uint32_t frac_hi: 7, + exp: 8, + sign: 1, + frac_lo: 16; +} f_float; + typedef union alpha_s_float { uint32_t i; uint32_t frac: 23, - exp: 8, - sign: 1; + exp: 8, + sign: 1; } s_float; typedef union alpha_t_float { uint64_t i; uint64_t frac: 52, - exp: 11, - sign: 1; + exp: 11, + sign: 1; } t_float; #ifdef _KERNEL @@ -73,6 +81,7 @@ extern u_long cpu_implver; /* from IMPL extern u_long cpu_amask; /* from AMASK instruction */ extern int bootdev_debug; extern int alpha_fp_sync_complete; +extern int alpha_fp_complete_debug; extern int alpha_unaligned_print, alpha_unaligned_fix, alpha_unaligned_sigbus; extern void (*alpha_delay_fn)(unsigned long);
CVS commit: src/sys/arch/alpha/include
Module Name:src Committed By: skrll Date: Sat Jun 26 15:02:19 UTC 2021 Modified Files: src/sys/arch/alpha/include: cpu.h Log Message: Fix typo in comment To generate a diff of this commit: cvs rdiff -u -r1.101 -r1.102 src/sys/arch/alpha/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/alpha/include/cpu.h diff -u src/sys/arch/alpha/include/cpu.h:1.101 src/sys/arch/alpha/include/cpu.h:1.102 --- src/sys/arch/alpha/include/cpu.h:1.101 Tue Apr 20 00:09:45 2021 +++ src/sys/arch/alpha/include/cpu.h Sat Jun 26 15:02:19 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.101 2021/04/20 00:09:45 thorpej Exp $ */ +/* $NetBSD: cpu.h,v 1.102 2021/06/26 15:02:19 skrll Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc. @@ -203,7 +203,7 @@ struct clockframe { /* * This isn't perfect; if the clock interrupt comes in before the * r/m/w cycle is complete, we won't be counted... but it's not - * like this stastic has to be extremely accurate. + * like this statistic has to be extremely accurate. */ #define CLKF_INTR(framep) \ ((curcpu()->ci_intrdepth & 0xf) != 0) /* see interrupt() */
CVS commit: src/sys/arch/alpha/include
Module Name:src Committed By: thorpej Date: Mon May 31 17:22:45 UTC 2021 Modified Files: src/sys/arch/alpha/include: pmap.h Log Message: Additional comment about the range (0-1025) that's needed for the PT page reference count, and thus now many bits we need to scare up. To generate a diff of this commit: cvs rdiff -u -r1.97 -r1.98 src/sys/arch/alpha/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/alpha/include/pmap.h diff -u src/sys/arch/alpha/include/pmap.h:1.97 src/sys/arch/alpha/include/pmap.h:1.98 --- src/sys/arch/alpha/include/pmap.h:1.97 Mon May 31 17:16:05 2021 +++ src/sys/arch/alpha/include/pmap.h Mon May 31 17:22:44 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.97 2021/05/31 17:16:05 thorpej Exp $ */ +/* $NetBSD: pmap.h,v 1.98 2021/05/31 17:22:44 thorpej Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2001, 2007 The NetBSD Foundation, Inc. @@ -360,6 +360,10 @@ struct vm_page_md { * XXX These fields are only needed for pages that are used * as PT pages. It would be nice to find safely-unused fields * in the vm_page structure that could be used instead. + * + * (Only 11 bits are needed ... we need to be able to count from + * 0-1025 ... 1025 because sometimes we need to take an extra + * reference temporarily in pmap_enter().) */ unsigned int pvh_physpgrefs; /* # refs as a PT page */ unsigned int pvh_spare0; /* XXX spare field */
CVS commit: src/sys/arch/alpha/include
Module Name:src Committed By: thorpej Date: Thu May 27 22:05:25 UTC 2021 Modified Files: src/sys/arch/alpha/include: alpha_cpu.h Log Message: Define the arithmetic exception summary bits passed in a0 to entArith. To generate a diff of this commit: cvs rdiff -u -r1.53 -r1.54 src/sys/arch/alpha/include/alpha_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/alpha/include/alpha_cpu.h diff -u src/sys/arch/alpha/include/alpha_cpu.h:1.53 src/sys/arch/alpha/include/alpha_cpu.h:1.54 --- src/sys/arch/alpha/include/alpha_cpu.h:1.53 Thu Oct 15 00:55:09 2020 +++ src/sys/arch/alpha/include/alpha_cpu.h Thu May 27 22:05:24 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: alpha_cpu.h,v 1.53 2020/10/15 00:55:09 thorpej Exp $ */ +/* $NetBSD: alpha_cpu.h,v 1.54 2021/05/27 22:05:24 thorpej Exp $ */ /* * Copyright (c) 1996 Carnegie-Mellon University. @@ -44,6 +44,7 @@ * Virtual Memory Management * Kernel Entry Vectors * MMCSR Fault Type Codes + * AESR Fault Code bits * Translation Buffer Invalidation * * and miscellaneous PALcode operations. @@ -265,6 +266,18 @@ typedef unsigned long alpha_pt_entry_t; #define ALPHA_KENTRY_SYS 5 /* + * Arithmetic Exception Summary Register. [OSF/1 PALcode Specific] + */ + +#define ALPHA_AESR_SWC __BIT(0) /* software completion */ +#define ALPHA_AESR_INV __BIT(1) /* invalid operation */ +#define ALPHA_AESR_DZE __BIT(2) /* division by zero */ +#define ALPHA_AESR_OVF __BIT(3) /* overflow */ +#define ALPHA_AESR_UNF __BIT(4) /* underflow */ +#define ALPHA_AESR_INE __BIT(5) /* inexact result */ +#define ALPHA_AESR_IOV __BIT(6) /* integer overflow */ + +/* * MMCSR Fault Type Codes. [OSF/1 PALcode Specific] */
CVS commit: src/sys/arch/alpha/include
Module Name:src Committed By: thorpej Date: Sat May 1 13:23:07 UTC 2021 Modified Files: src/sys/arch/alpha/include: userret.h Log Message: Make sure preemption is disabled around PMAP_USERRET(); it uses per-cpu information. XXX mi_userret() also internally disables preemption. Should restructure these to remove redundancies. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/arch/alpha/include/userret.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/alpha/include/userret.h diff -u src/sys/arch/alpha/include/userret.h:1.10 src/sys/arch/alpha/include/userret.h:1.11 --- src/sys/arch/alpha/include/userret.h:1.10 Mon Feb 6 02:14:13 2012 +++ src/sys/arch/alpha/include/userret.h Sat May 1 13:23:07 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: userret.h,v 1.10 2012/02/06 02:14:13 matt Exp $ */ +/* $NetBSD: userret.h,v 1.11 2021/05/01 13:23:07 thorpej Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -103,7 +103,9 @@ userret(struct lwp *l) struct proc *p = l->l_proc; /* Do any deferred user pmap operations. */ + KPREEMPT_DISABLE(l); PMAP_USERRET(vm_map_pmap(>p_vmspace->vm_map)); + KPREEMPT_ENABLE(l); /* Invoke MI userret code */ mi_userret(l);
CVS commit: src/sys/arch/alpha/include
Module Name:src Committed By: rin Date: Thu Apr 15 08:23:24 UTC 2021 Modified Files: src/sys/arch/alpha/include: cpu.h Log Message: Fix fallout from alpha/interrupt.c rev 1.93: http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/arch/alpha/alpha/interrupt.c#rev1.93 by which interrupts *seem* to occupy 100% CPU time. Now, we bump ci_intrdepth for clock interrupt. Therefore, if ci_intrdepth > 1 is observed in statclock(), CPU is actually occupied by interrupts. Thanks jklos and thorpej for notice! To generate a diff of this commit: cvs rdiff -u -r1.99 -r1.100 src/sys/arch/alpha/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/alpha/include/cpu.h diff -u src/sys/arch/alpha/include/cpu.h:1.99 src/sys/arch/alpha/include/cpu.h:1.100 --- src/sys/arch/alpha/include/cpu.h:1.99 Thu Oct 15 01:00:01 2020 +++ src/sys/arch/alpha/include/cpu.h Thu Apr 15 08:23:24 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.99 2020/10/15 01:00:01 thorpej Exp $ */ +/* $NetBSD: cpu.h,v 1.100 2021/04/15 08:23:24 rin Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc. @@ -205,7 +205,8 @@ struct clockframe { * r/m/w cycle is complete, we won't be counted... but it's not * like this stastic has to be extremely accurate. */ -#define CLKF_INTR(framep) (curcpu()->ci_intrdepth) +#define CLKF_INTR(framep) \ + (curcpu()->ci_intrdepth > 1) /* one for clock interrupt itself */ /* * This is used during profiling to integrate system time. It can safely
CVS commit: src/sys/arch/alpha/include
Module Name:src Committed By: thorpej Date: Thu Oct 15 00:55:09 UTC 2020 Modified Files: src/sys/arch/alpha/include: alpha_cpu.h Log Message: Fix the bit position for the PMI bit in ALPHA_AMASK_BITS. To generate a diff of this commit: cvs rdiff -u -r1.52 -r1.53 src/sys/arch/alpha/include/alpha_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/alpha/include/alpha_cpu.h diff -u src/sys/arch/alpha/include/alpha_cpu.h:1.52 src/sys/arch/alpha/include/alpha_cpu.h:1.53 --- src/sys/arch/alpha/include/alpha_cpu.h:1.52 Tue Sep 29 01:17:22 2020 +++ src/sys/arch/alpha/include/alpha_cpu.h Thu Oct 15 00:55:09 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: alpha_cpu.h,v 1.52 2020/09/29 01:17:22 thorpej Exp $ */ +/* $NetBSD: alpha_cpu.h,v 1.53 2020/10/15 00:55:09 thorpej Exp $ */ /* * Copyright (c) 1996 Carnegie-Mellon University. @@ -314,7 +314,7 @@ typedef unsigned long alpha_pt_entry_t; ALPHA_AMASK_PAT|ALPHA_AMASK_PMI) #define ALPHA_AMASK_BITS \ -"\20\17PMI\12PAT\11MVI\3CIX\2FIX\1BWX" +"\20\15PMI\12PAT\11MVI\3CIX\2FIX\1BWX" /* * Chip family IDs returned by implver instruction
CVS commit: src/sys/arch/alpha/include
Module Name:src Committed By: thorpej Date: Sat Oct 3 17:33:23 UTC 2020 Modified Files: src/sys/arch/alpha/include: rpb.h Log Message: Add a comment describing the rpb::rpb_vptb field. To generate a diff of this commit: cvs rdiff -u -r1.43 -r1.44 src/sys/arch/alpha/include/rpb.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/alpha/include/rpb.h diff -u src/sys/arch/alpha/include/rpb.h:1.43 src/sys/arch/alpha/include/rpb.h:1.44 --- src/sys/arch/alpha/include/rpb.h:1.43 Mon Apr 8 00:47:21 2019 +++ src/sys/arch/alpha/include/rpb.h Sat Oct 3 17:33:23 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: rpb.h,v 1.43 2019/04/08 00:47:21 thorpej Exp $ */ +/* $NetBSD: rpb.h,v 1.44 2020/10/03 17:33:23 thorpej Exp $ */ /* * Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University. @@ -190,7 +190,7 @@ struct rpb { char rpb_revision[8]; /* 60; only first 4 valid */ uint64_t rpb_intr_freq; /* 68; scaled by 4096 */ uint64_t rpb_cc_freq; /* 70: cycle cntr frequency */ - u_long rpb_vptb; /* 78: */ + u_long rpb_vptb; /* 78: virtual page tbl base */ uint64_t rpb_reserved_arch; /* 80: */ u_long rpb_tbhint_off; /* 88: */ uint64_t rpb_pcs_cnt; /* 90: */
CVS commit: src/sys/arch/alpha/include
Module Name:src Committed By: thorpej Date: Mon Sep 28 16:27:47 UTC 2020 Modified Files: src/sys/arch/alpha/include: cpuconf.h Log Message: Remove a no-longer-accurate comment. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/arch/alpha/include/cpuconf.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/alpha/include/cpuconf.h diff -u src/sys/arch/alpha/include/cpuconf.h:1.15 src/sys/arch/alpha/include/cpuconf.h:1.16 --- src/sys/arch/alpha/include/cpuconf.h:1.15 Mon Feb 6 02:14:13 2012 +++ src/sys/arch/alpha/include/cpuconf.h Mon Sep 28 16:27:47 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: cpuconf.h,v 1.15 2012/02/06 02:14:13 matt Exp $ */ +/* $NetBSD: cpuconf.h,v 1.16 2020/09/28 16:27:47 thorpej Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All rights reserved. @@ -79,7 +79,6 @@ struct platform { * tags. It may optionally fill in the cons_init, device_register and * mcheck_handler tags. * - * The iointr tag is filled in by set_iointr (in interrupt.c). * The clockintr tag is filled in by cpu_initclocks (in clock.c). * * nocpu is function to call when you can't figure what platform you're on.
CVS commit: src/sys/arch/alpha/include
Module Name:src Committed By: thorpej Date: Wed Sep 23 18:47:21 UTC 2020 Modified Files: src/sys/arch/alpha/include: intr.h Log Message: Use a wrapper to acquire the kernel lock for non-MPSAFE interrupts, rather than doing it in alpha_shared_intr_establish() directly. To generate a diff of this commit: cvs rdiff -u -r1.79 -r1.80 src/sys/arch/alpha/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/alpha/include/intr.h diff -u src/sys/arch/alpha/include/intr.h:1.79 src/sys/arch/alpha/include/intr.h:1.80 --- src/sys/arch/alpha/include/intr.h:1.79 Tue Sep 22 15:24:01 2020 +++ src/sys/arch/alpha/include/intr.h Wed Sep 23 18:47:21 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: intr.h,v 1.79 2020/09/22 15:24:01 thorpej Exp $ */ +/* $NetBSD: intr.h,v 1.80 2020/09/23 18:47:21 thorpej Exp $ */ /*- * Copyright (c) 2000, 2001, 2002 The NetBSD Foundation, Inc. @@ -203,9 +203,10 @@ struct alpha_shared_intrhand { struct alpha_shared_intr *ih_intrhead; int (*ih_fn)(void *); void *ih_arg; + int (*ih_real_fn)(void *); + void *ih_real_arg; int ih_level; unsigned int ih_num; - int ih_mpsafe; }; struct alpha_shared_intr {
CVS commit: src/sys/arch/alpha/include
Module Name:src Committed By: thorpej Date: Wed Sep 23 00:52:49 UTC 2020 Modified Files: src/sys/arch/alpha/include: mutex.h Log Message: Move the compile-time assert outside of the __MUTEX_PRIVATE guard. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/alpha/include/mutex.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/alpha/include/mutex.h diff -u src/sys/arch/alpha/include/mutex.h:1.7 src/sys/arch/alpha/include/mutex.h:1.8 --- src/sys/arch/alpha/include/mutex.h:1.7 Wed Sep 23 00:51:59 2020 +++ src/sys/arch/alpha/include/mutex.h Wed Sep 23 00:52:49 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: mutex.h,v 1.7 2020/09/23 00:51:59 thorpej Exp $ */ +/* $NetBSD: mutex.h,v 1.8 2020/09/23 00:52:49 thorpej Exp $ */ /*- * Copyright (c) 2002, 2006, 2007 The NetBSD Foundation, Inc. @@ -52,8 +52,6 @@ struct kmutex { } u; }; -__CTASSERT(sizeof(struct kmutex) == sizeof(uintptr_t)); - #define mtx_owner u.mtxa_owner #define mtx_flags u.s.mtxs_flags #define mtx_ipl u.s.mtxs_ipl @@ -68,4 +66,6 @@ int _lock_cas(volatile uintptr_t *, uint #endif /* __MUTEX_PRIVATE */ +__CTASSERT(sizeof(struct kmutex) == sizeof(uintptr_t)); + #endif /* _ALPHA_MUTEX_H_ */
CVS commit: src/sys/arch/alpha/include
Module Name:src Committed By: thorpej Date: Wed Sep 23 00:51:59 UTC 2020 Modified Files: src/sys/arch/alpha/include: mutex.h Log Message: Move the simple lock used for spin mutexes into the sub-structure that contains the spin lock IPL field. This shrinks kmutex_t to sizeof(uintptr_t) on Alpha. This should have been done in rev 1.3 when the lock ID field was removed, but better late than never, I guess. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/alpha/include/mutex.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/alpha/include/mutex.h diff -u src/sys/arch/alpha/include/mutex.h:1.6 src/sys/arch/alpha/include/mutex.h:1.7 --- src/sys/arch/alpha/include/mutex.h:1.6 Fri Nov 29 22:55:33 2019 +++ src/sys/arch/alpha/include/mutex.h Wed Sep 23 00:51:59 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: mutex.h,v 1.6 2019/11/29 22:55:33 riastradh Exp $ */ +/* $NetBSD: mutex.h,v 1.7 2020/09/23 00:51:59 thorpej Exp $ */ /*- * Copyright (c) 2002, 2006, 2007 The NetBSD Foundation, Inc. @@ -36,7 +36,6 @@ struct kmutex { uintptr_t mtx_pad1; - uint32_t mtx_pad2; }; #else /* __MUTEX_PRIVATE */ @@ -48,14 +47,17 @@ struct kmutex { volatile uint8_t mtxs_flags; ipl_cookie_t mtxs_ipl; volatile uint16_t mtxs_unused; + __cpu_simple_lock_t mtxs_lock; } s; } u; - __cpu_simple_lock_t mtx_lock; }; +__CTASSERT(sizeof(struct kmutex) == sizeof(uintptr_t)); + #define mtx_owner u.mtxa_owner #define mtx_flags u.s.mtxs_flags #define mtx_ipl u.s.mtxs_ipl +#define mtx_lock u.s.mtxs_lock #define __HAVE_SIMPLE_MUTEXES 1 #define __HAVE_MUTEX_STUBS 1
CVS commit: src/sys/arch/alpha/include
Module Name:src Committed By: thorpej Date: Fri Sep 18 00:07:22 UTC 2020 Modified Files: src/sys/arch/alpha/include: alpha.h Log Message: Rather than having exception_return() at the root of the call graph for kernel threads, provide a backstop that will prevent them from ever accidentally trying to return to user space. To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/sys/arch/alpha/include/alpha.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/alpha/include/alpha.h diff -u src/sys/arch/alpha/include/alpha.h:1.39 src/sys/arch/alpha/include/alpha.h:1.40 --- src/sys/arch/alpha/include/alpha.h:1.39 Thu Sep 3 02:09:09 2020 +++ src/sys/arch/alpha/include/alpha.h Fri Sep 18 00:07:22 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: alpha.h,v 1.39 2020/09/03 02:09:09 thorpej Exp $ */ +/* $NetBSD: alpha.h,v 1.40 2020/09/18 00:07:22 thorpej Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -73,11 +73,11 @@ extern int bootdev_debug; extern int alpha_fp_sync_complete; extern int alpha_unaligned_print, alpha_unaligned_fix, alpha_unaligned_sigbus; -void XentArith(uint64_t, uint64_t, uint64_t); /* MAGIC */ +void XentArith(uint64_t, uint64_t, uint64_t); /* MAGIC */ void XentIF(uint64_t, uint64_t, uint64_t); /* MAGIC */ void XentInt(uint64_t, uint64_t, uint64_t); /* MAGIC */ void XentMM(uint64_t, uint64_t, uint64_t); /* MAGIC */ -void XentRestart(void); /* MAGIC */ +void XentRestart(void);/* MAGIC */ void XentSys(uint64_t, uint64_t, uint64_t); /* MAGIC */ void XentUna(uint64_t, uint64_t, uint64_t); /* MAGIC */ void alpha_init(u_long, u_long, u_long, u_long, u_long); @@ -86,7 +86,8 @@ int badaddr(void *, size_t); int badaddr_read(void *, size_t, void *); uint64_t console_restart(struct trapframe *); void do_sir(void); -void exception_return(void); /* MAGIC */ +void exception_return(void);/* MAGIC */ +void alpha_kthread_backstop(void); /* MAGIC */ void frametoreg(const struct trapframe *, struct reg *); void init_bootstrap_console(void); void init_prom_interface(unsigned long, struct rpb *);
CVS commit: src/sys/arch/alpha/include
Module Name:src Committed By: thorpej Date: Fri Sep 4 15:50:10 UTC 2020 Modified Files: src/sys/arch/alpha/include: cpu.h types.h Log Message: Put the MI cpu_data at the beginning of cpu_info so that it is cache line aligned. To generate a diff of this commit: cvs rdiff -u -r1.93 -r1.94 src/sys/arch/alpha/include/cpu.h cvs rdiff -u -r1.56 -r1.57 src/sys/arch/alpha/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/alpha/include/cpu.h diff -u src/sys/arch/alpha/include/cpu.h:1.93 src/sys/arch/alpha/include/cpu.h:1.94 --- src/sys/arch/alpha/include/cpu.h:1.93 Fri Sep 4 03:53:12 2020 +++ src/sys/arch/alpha/include/cpu.h Fri Sep 4 15:50:09 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.93 2020/09/04 03:53:12 thorpej Exp $ */ +/* $NetBSD: cpu.h,v 1.94 2020/09/04 15:50:09 thorpej Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc. @@ -99,9 +99,9 @@ struct mchkinfo { * Per-cpu information. Data accessed by MI code is marked [MI]. */ struct cpu_info { + struct cpu_data ci_data; /* [MI] general per-cpu data */ struct lwp *ci_curlwp; /* [MI] current owner of the cpu */ struct lwp *ci_onproc; /* [MI] current user LWP / kthread */ - struct cpu_data ci_data; /* [MI] general per-cpu data */ struct cctr_state ci_cc; /* [MI] cycle counter state */ volatile int ci_mtx_count; /* [MI] neg count of spin mutexes */ Index: src/sys/arch/alpha/include/types.h diff -u src/sys/arch/alpha/include/types.h:1.56 src/sys/arch/alpha/include/types.h:1.57 --- src/sys/arch/alpha/include/types.h:1.56 Thu Apr 30 20:48:10 2020 +++ src/sys/arch/alpha/include/types.h Fri Sep 4 15:50:09 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: types.h,v 1.56 2020/04/30 20:48:10 skrll Exp $ */ +/* $NetBSD: types.h,v 1.57 2020/09/04 15:50:09 thorpej Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -77,6 +77,7 @@ typedef __register_t register_t; #define __HAVE_ATOMIC64_OPS #define __HAVE_MM_MD_DIRECT_MAPPED_IO #define __HAVE_MM_MD_DIRECT_MAPPED_PHYS +#define __HAVE_CPU_DATA_FIRST #define __HAVE_CPU_UAREA_ROUTINES #define __HAVE_CPU_LWP_SETPRIVATE #define __HAVE___LWP_GETPRIVATE_FAST
CVS commit: src/sys/arch/alpha/include
Module Name:src Committed By: thorpej Date: Fri Sep 4 02:59:44 UTC 2020 Modified Files: src/sys/arch/alpha/include: asm.h Log Message: Missed one in last change. To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/sys/arch/alpha/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/alpha/include/asm.h diff -u src/sys/arch/alpha/include/asm.h:1.42 src/sys/arch/alpha/include/asm.h:1.43 --- src/sys/arch/alpha/include/asm.h:1.42 Fri Sep 4 02:58:18 2020 +++ src/sys/arch/alpha/include/asm.h Fri Sep 4 02:59:44 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: asm.h,v 1.42 2020/09/04 02:58:18 thorpej Exp $ */ +/* $NetBSD: asm.h,v 1.43 2020/09/04 02:59:44 thorpej Exp $ */ /* * Copyright (c) 1991,1990,1989,1994,1995,1996 Carnegie Mellon University @@ -673,10 +673,6 @@ label: ASCIZ msg; \ call_pal PAL_OSF1_rdval ; \ stq r, CPU_INFO_CURLWP(v0) -#define GET_FPCURLWP \ - call_pal PAL_OSF1_rdval ; \ - addq v0, CPU_INFO_FPCURLWP, v0 - #else /* if not MULTIPROCESSOR... */ IMPORT(cpu_info_primary, CPU_INFO_SIZEOF)
CVS commit: src/sys/arch/alpha/include
Module Name:src Committed By: thorpej Date: Fri Sep 4 02:58:19 UTC 2020 Modified Files: src/sys/arch/alpha/include: asm.h Log Message: Garbage-collect GET_CPUINFO; it's no longer used. To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.42 src/sys/arch/alpha/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/alpha/include/asm.h diff -u src/sys/arch/alpha/include/asm.h:1.41 src/sys/arch/alpha/include/asm.h:1.42 --- src/sys/arch/alpha/include/asm.h:1.41 Fri Sep 4 02:54:56 2020 +++ src/sys/arch/alpha/include/asm.h Fri Sep 4 02:58:18 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: asm.h,v 1.41 2020/09/04 02:54:56 thorpej Exp $ */ +/* $NetBSD: asm.h,v 1.42 2020/09/04 02:58:18 thorpej Exp $ */ /* * Copyright (c) 1991,1990,1989,1994,1995,1996 Carnegie Mellon University @@ -665,8 +665,6 @@ label: ASCIZ msg; \ * * All return values are in v0. */ -#define GET_CPUINFO call_pal PAL_OSF1_rdval - #define GET_CURLWP \ call_pal PAL_OSF1_rdval ; \ ldq v0, CPU_INFO_CURLWP(v0) @@ -683,8 +681,6 @@ label: ASCIZ msg; \ IMPORT(cpu_info_primary, CPU_INFO_SIZEOF) -#define GET_CPUINFO lda v0, cpu_info_primary - #define GET_CURLWP lda v0, cpu_info_primary ; \ ldq v0, CPU_INFO_CURLWP(v0)
CVS commit: src/sys/arch/alpha/include
Module Name:src Committed By: thorpej Date: Fri Sep 4 01:57:29 UTC 2020 Modified Files: src/sys/arch/alpha/include: cpu.h Log Message: Shuffle fields in cpu_info for better cache behavior. XXX More changes to come after curlwp is overhauled. To generate a diff of this commit: cvs rdiff -u -r1.91 -r1.92 src/sys/arch/alpha/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/alpha/include/cpu.h diff -u src/sys/arch/alpha/include/cpu.h:1.91 src/sys/arch/alpha/include/cpu.h:1.92 --- src/sys/arch/alpha/include/cpu.h:1.91 Thu Sep 3 14:27:47 2020 +++ src/sys/arch/alpha/include/cpu.h Fri Sep 4 01:57:29 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.91 2020/09/03 14:27:47 thorpej Exp $ */ +/* $NetBSD: cpu.h,v 1.92 2020/09/04 01:57:29 thorpej Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc. @@ -84,10 +84,8 @@ #if defined(_KERNEL) || defined(_KMEMUSER) #include -#ifndef _KMEMUSER #include #include -#endif /* * Machine check information. @@ -97,42 +95,51 @@ struct mchkinfo { volatile int mc_received; /* machine check was received */ }; +/* + * Per-cpu information. Data accessed by MI code is marked [MI]. + */ struct cpu_info { - /* - * Public members. - */ - struct lwp *ci_curlwp; /* current owner of the processor */ - struct lwp *ci_onproc; /* current user LWP / kthread */ - struct cpu_data ci_data; /* MI per-cpu data */ -#if !defined(_KMEMUSER) - struct cctr_state ci_cc; /* cycle counter state */ - struct cpu_info *ci_next; /* next cpu_info structure */ - int ci_mtx_count; - int ci_mtx_oldspl; + struct lwp *ci_curlwp; /* [MI] current owner of the cpu */ + struct lwp *ci_onproc; /* [MI] current user LWP / kthread */ + struct cpu_data ci_data; /* [MI] general per-cpu data */ + struct cctr_state ci_cc; /* [MI] cycle counter state */ + + volatile int ci_mtx_count; /* [MI] neg count of spin mutexes */ + volatile int ci_mtx_oldspl; /* [MI] for spin mutex splx() */ - /* - * Private members. - */ - struct mchkinfo ci_mcinfo; /* machine check info */ - cpuid_t ci_cpuid; /* our CPU ID */ - struct cpu_softc *ci_softc; /* pointer to our device */ - u_int ci_want_resched; /* preempt current process */ - u_int ci_unused; /* unused */ u_long ci_intrdepth; /* interrupt trap depth */ - struct trapframe *ci_db_regs; /* registers for debuggers */ - uint64_t ci_pcc_freq; /* cpu cycles/second */ + struct cpu_softc *ci_softc; /* pointer to our device */ struct pmap *ci_pmap; /* currently-activated pmap */ u_int ci_next_asn; /* next ASN to assign */ u_long ci_asn_gen; /* current ASN generation */ -#if defined(MULTIPROCESSOR) + struct mchkinfo ci_mcinfo; /* machine check info */ + + /* + * The following must be in their own cache line, as they are + * stored to regularly by remote CPUs. + */ + volatile u_long ci_ipis /* interprocessor interrupts pending */ + __aligned(64); + u_int ci_want_resched; /* [MI] preempt current process */ + + /* + * These are largely static, and will frequently be fetched + * by other CPUs. For that reason, they get their own cache + * line, too. + */ + struct cpu_info *ci_next /* next cpu_info structure */ + __aligned(64); + cpuid_t ci_cpuid; /* [MI] our CPU ID */ volatile u_long ci_flags; /* flags; see below */ - volatile u_long ci_ipis; /* interprocessor interrupts pending */ -#endif -#endif /* !_KMEMUSER */ + uint64_t ci_pcc_freq; /* cpu cycles/second */ + struct trapframe *ci_db_regs; /* registers for debuggers */ }; +/* Ensure cpu_info::ci_curlwp is within the signed 16-bit displacement. */ +__CTASSERT(offsetof(struct cpu_info, ci_curlwp) <= 0x7ff0); + #endif /* _KERNEL || _KMEMUSER */ #if defined(_KERNEL) @@ -141,7 +148,6 @@ struct cpu_info { #define CPUF_PRESENT 0x02 /* CPU is present */ #define CPUF_RUNNING 0x04 /* CPU is running */ #define CPUF_PAUSED 0x08 /* CPU is paused */ -#define CPUF_FPUSAVE 0x10 /* CPU is currently in fpusave_cpu() */ extern struct cpu_info cpu_info_primary; extern struct cpu_info *cpu_info_list;
CVS commit: src/sys/arch/alpha/include
Module Name:src Committed By: thorpej Date: Thu Sep 3 22:56:11 UTC 2020 Modified Files: src/sys/arch/alpha/include: param.h Log Message: Define COHERENCY_UNIT and CACHE_LINE_SIZE as 64, which is the primary cache line size on EV6 / EV7. This is also the default MI fallback definition, but now we're not relying on that value. To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/sys/arch/alpha/include/param.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/alpha/include/param.h diff -u src/sys/arch/alpha/include/param.h:1.45 src/sys/arch/alpha/include/param.h:1.46 --- src/sys/arch/alpha/include/param.h:1.45 Mon Jan 7 22:00:30 2019 +++ src/sys/arch/alpha/include/param.h Thu Sep 3 22:56:11 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.45 2019/01/07 22:00:30 jdolecek Exp $ */ +/* $NetBSD: param.h,v 1.46 2020/09/03 22:56:11 thorpej Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -71,6 +71,13 @@ #endif /* + * EV4 (21064) and EV5 (21164) have a 32-byte cache line size. + * EV6 (21264) and EV7 (21364) have a 64-byte cache line size. + */ +#define COHERENCY_UNIT 64 +#define CACHE_LINE_SIZE 64 + +/* * Constants related to network buffer management. * MCLBYTES must be no larger than NBPG (the software page size), and, * on machines that exchange pages of input or output buffers with mbuf
CVS commit: src/sys/arch/alpha/include
Module Name:src Committed By: thorpej Date: Thu Sep 3 14:27:47 UTC 2020 Modified Files: src/sys/arch/alpha/include: cpu.h Log Message: Garbage-collect fpcurlwp -- it has been obsolete since FPU tracking was converted over to PCU. To generate a diff of this commit: cvs rdiff -u -r1.90 -r1.91 src/sys/arch/alpha/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/alpha/include/cpu.h diff -u src/sys/arch/alpha/include/cpu.h:1.90 src/sys/arch/alpha/include/cpu.h:1.91 --- src/sys/arch/alpha/include/cpu.h:1.90 Thu Sep 3 04:20:54 2020 +++ src/sys/arch/alpha/include/cpu.h Thu Sep 3 14:27:47 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.90 2020/09/03 04:20:54 thorpej Exp $ */ +/* $NetBSD: cpu.h,v 1.91 2020/09/03 14:27:47 thorpej Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc. @@ -99,11 +99,6 @@ struct mchkinfo { struct cpu_info { /* - * Private members accessed in assembly with 8 bit offsets. - */ - struct lwp *ci_fpcurlwp; /* current owner of the FPU */ - - /* * Public members. */ struct lwp *ci_curlwp; /* current owner of the processor */ @@ -172,7 +167,6 @@ void cpu_pause_resume_all(int); #endif /* MULTIPROCESSOR */ #define curlwp curcpu()->ci_curlwp -#define fpcurlwp curcpu()->ci_fpcurlwp /* * definitions of cpu-dependent requirements
CVS commit: src/sys/arch/alpha/include
Module Name:src Committed By: thorpej Date: Thu Sep 3 04:20:54 UTC 2020 Modified Files: src/sys/arch/alpha/include: cpu.h Log Message: Garabage-collect curpcb / cpu_info::ci_curpcb. To generate a diff of this commit: cvs rdiff -u -r1.89 -r1.90 src/sys/arch/alpha/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/alpha/include/cpu.h diff -u src/sys/arch/alpha/include/cpu.h:1.89 src/sys/arch/alpha/include/cpu.h:1.90 --- src/sys/arch/alpha/include/cpu.h:1.89 Sat Aug 29 20:07:00 2020 +++ src/sys/arch/alpha/include/cpu.h Thu Sep 3 04:20:54 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.89 2020/08/29 20:07:00 thorpej Exp $ */ +/* $NetBSD: cpu.h,v 1.90 2020/09/03 04:20:54 thorpej Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc. @@ -102,7 +102,6 @@ struct cpu_info { * Private members accessed in assembly with 8 bit offsets. */ struct lwp *ci_fpcurlwp; /* current owner of the FPU */ - paddr_t ci_curpcb; /* PA of current HW PCB */ /* * Public members. @@ -174,7 +173,6 @@ void cpu_pause_resume_all(int); #define curlwp curcpu()->ci_curlwp #define fpcurlwp curcpu()->ci_fpcurlwp -#define curpcb curcpu()->ci_curpcb /* * definitions of cpu-dependent requirements
CVS commit: src/sys/arch/alpha/include
Module Name:src Committed By: thorpej Date: Sat Aug 29 22:50:27 UTC 2020 Modified Files: src/sys/arch/alpha/include: asm.h Log Message: G/C GET_IDLE_PCB -- it hasn't been used for some time. To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/sys/arch/alpha/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/alpha/include/asm.h diff -u src/sys/arch/alpha/include/asm.h:1.38 src/sys/arch/alpha/include/asm.h:1.39 --- src/sys/arch/alpha/include/asm.h:1.38 Sat Apr 18 10:30:49 2020 +++ src/sys/arch/alpha/include/asm.h Sat Aug 29 22:50:27 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: asm.h,v 1.38 2020/04/18 10:30:49 martin Exp $ */ +/* $NetBSD: asm.h,v 1.39 2020/08/29 22:50:27 thorpej Exp $ */ /* * Copyright (c) 1991,1990,1989,1994,1995,1996 Carnegie Mellon University @@ -679,10 +679,6 @@ label: ASCIZ msg; \ call_pal PAL_OSF1_rdval ; \ addq v0, CPU_INFO_CURPCB, v0 -#define GET_IDLE_PCB(reg) \ - call_pal PAL_OSF1_rdval ; \ - ldq reg, CPU_INFO_IDLE_PCB_PADDR(v0) - #else /* if not MULTIPROCESSOR... */ IMPORT(cpu_info_primary, CPU_INFO_SIZEOF) @@ -694,10 +690,6 @@ IMPORT(cpu_info_primary, CPU_INFO_SIZEOF #define GET_FPCURLWP lda v0, cpu_info_primary + CPU_INFO_FPCURLWP #define GET_CURPCB lda v0, cpu_info_primary + CPU_INFO_CURPCB - -#define GET_IDLE_PCB(reg) \ - lda reg, cpu_info_primary; \ - ldq reg, CPU_INFO_IDLE_PCB_PADDR(reg) #endif /* MULTIPROCESSOR */ #else #define RCSID(_s) __SECTIONSTRING(.ident, _s)
CVS commit: src/sys/arch/alpha/include
Module Name:src Committed By: thorpej Date: Sat Aug 29 20:08:08 UTC 2020 Modified Files: src/sys/arch/alpha/include: vmparam.h Log Message: Bump UBC_WINSHIFT to 16 (64KB), and UBC_NWINS to 4096 (256MB total). Alpha has plenty of KVA to use for this. To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/sys/arch/alpha/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/alpha/include/vmparam.h diff -u src/sys/arch/alpha/include/vmparam.h:1.38 src/sys/arch/alpha/include/vmparam.h:1.39 --- src/sys/arch/alpha/include/vmparam.h:1.38 Mon Dec 10 16:12:19 2012 +++ src/sys/arch/alpha/include/vmparam.h Sat Aug 29 20:08:08 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: vmparam.h,v 1.38 2012/12/10 16:12:19 chs Exp $ */ +/* $NetBSD: vmparam.h,v 1.39 2020/08/29 20:08:08 thorpej Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -58,6 +58,17 @@ #define PAGE_MASK (PAGE_SIZE - 1) /* + * Defaults for Unified Buffer Cache parameters. + */ + +#ifndef UBC_WINSHIFT +#define UBC_WINSHIFT 16 /* 64KB */ +#endif +#ifndef UBC_NWINS +#define UBC_NWINS 4096 /* for a total of 256MB */ +#endif + +/* * USRSTACK is the top (end) of the user stack. * * Digital UNIX (formerly DEC OSF/1) places the stack below the
CVS commit: src/sys/arch/alpha/include
Module Name:src Committed By: skrll Date: Thu Jul 23 19:23:27 UTC 2020 Modified Files: src/sys/arch/alpha/include: pmap.h Log Message: unifdef -U_LKM To generate a diff of this commit: cvs rdiff -u -r1.81 -r1.82 src/sys/arch/alpha/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/alpha/include/pmap.h diff -u src/sys/arch/alpha/include/pmap.h:1.81 src/sys/arch/alpha/include/pmap.h:1.82 --- src/sys/arch/alpha/include/pmap.h:1.81 Sat Mar 14 14:05:42 2020 +++ src/sys/arch/alpha/include/pmap.h Thu Jul 23 19:23:27 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.81 2020/03/14 14:05:42 ad Exp $ */ +/* $NetBSD: pmap.h,v 1.82 2020/07/23 19:23:27 skrll Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2001, 2007 The NetBSD Foundation, Inc. @@ -188,7 +188,6 @@ typedef struct pv_entry { #define _PMAP_MAY_USE_PROM_CONSOLE #endif -#ifndef _LKM #if defined(MULTIPROCESSOR) struct cpu_info; struct trapframe; @@ -206,7 +205,6 @@ void pmap_do_tlb_shootdown(struct cpu_in #define PMAP_TLB_SHOOTDOWN(pm, va, pte) /* nothing */ #define PMAP_TLB_SHOOTNOW() /* nothing */ #endif /* MULTIPROCESSOR */ -#endif /* _LKM */ #define pmap_resident_count(pmap) ((pmap)->pm_stats.resident_count) #define pmap_wired_count(pmap) ((pmap)->pm_stats.wired_count)
CVS commit: src/sys/arch/alpha/include
Module Name:src Committed By: martin Date: Sat Apr 18 10:30:49 UTC 2020 Modified Files: src/sys/arch/alpha/include: asm.h Log Message: Fix copy & pasto in previous (to fix the build) To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/sys/arch/alpha/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/alpha/include/asm.h diff -u src/sys/arch/alpha/include/asm.h:1.37 src/sys/arch/alpha/include/asm.h:1.38 --- src/sys/arch/alpha/include/asm.h:1.37 Fri Apr 17 14:19:43 2020 +++ src/sys/arch/alpha/include/asm.h Sat Apr 18 10:30:49 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: asm.h,v 1.37 2020/04/17 14:19:43 joerg Exp $ */ +/* $NetBSD: asm.h,v 1.38 2020/04/18 10:30:49 martin Exp $ */ /* * Copyright (c) 1991,1990,1989,1994,1995,1996 Carnegie Mellon University @@ -644,7 +644,7 @@ label: ASCIZ msg; \ */ #define __SECTIONSTRING(_sec, _str)\ .pushsection _sec,"MS",@progbits,1; \ - .asciz x; \ + .asciz _str; \ .popsection #ifdef _KERNEL
CVS commit: src/sys/arch/alpha/include
Module Name:src Committed By: thorpej Date: Mon Apr 8 14:08:16 UTC 2019 Modified Files: src/sys/arch/alpha/include: elf_machdep.h Log Message: Add the R_ALPHA_BRSGP relocation type. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/arch/alpha/include/elf_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/alpha/include/elf_machdep.h diff -u src/sys/arch/alpha/include/elf_machdep.h:1.13 src/sys/arch/alpha/include/elf_machdep.h:1.14 --- src/sys/arch/alpha/include/elf_machdep.h:1.13 Mon Nov 6 03:47:45 2017 +++ src/sys/arch/alpha/include/elf_machdep.h Mon Apr 8 14:08:16 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: elf_machdep.h,v 1.13 2017/11/06 03:47:45 christos Exp $ */ +/* $NetBSD: elf_machdep.h,v 1.14 2019/04/08 14:08:16 thorpej Exp $ */ #ifndef _ALPHA_ELF_MACHDEP_H_ #define _ALPHA_ELF_MACHDEP_H_ @@ -55,6 +55,7 @@ #define R_ALPHA_GLOB_DAT 25 /* Create GOT entry */ #define R_ALPHA_JMP_SLOT 26 /* Create PLT entry */ #define R_ALPHA_RELATIVE 27 /* Adjust by program base */ +#define R_ALPHA_BRSGP 28 /* TLS relocations */ #define R_ALPHA_TLS_GD 29
CVS commit: src/sys/arch/alpha/include
Module Name:src Committed By: thorpej Date: Sat May 19 20:04:41 UTC 2018 Modified Files: src/sys/arch/alpha/include: pmap.h Log Message: Implement PMAP_DIRECT / pmap_direct_process() in support of experimental UBC optimizations. To generate a diff of this commit: cvs rdiff -u -r1.79 -r1.80 src/sys/arch/alpha/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/alpha/include/pmap.h diff -u src/sys/arch/alpha/include/pmap.h:1.79 src/sys/arch/alpha/include/pmap.h:1.80 --- src/sys/arch/alpha/include/pmap.h:1.79 Wed Jan 1 16:09:04 2014 +++ src/sys/arch/alpha/include/pmap.h Sat May 19 20:04:41 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.79 2014/01/01 16:09:04 matt Exp $ */ +/* $NetBSD: pmap.h,v 1.80 2018/05/19 20:04:41 thorpej Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2001, 2007 The NetBSD Foundation, Inc. @@ -228,11 +228,24 @@ pmap_remove_all(struct pmap *pmap) #define PMAP_STEAL_MEMORY /* enable pmap_steal_memory() */ #define PMAP_GROWKERNEL /* enable pmap_growkernel() */ +#define PMAP_DIRECT +#define PMAP_DIRECT_MAP(pa) ALPHA_PHYS_TO_K0SEG((pa)) +#define PMAP_DIRECT_UNMAP(va) ALPHA_K0SEG_TO_PHYS((va)) + +static __inline int +pmap_direct_process(paddr_t pa, voff_t pgoff, size_t len, +int (*process)(void *, size_t, void *), void *arg) +{ + vaddr_t va = PMAP_DIRECT_MAP(pa); + + return process((void *)(va + pgoff), len, arg); +} + /* * Alternate mapping hooks for pool pages. Avoids thrashing the TLB. */ -#define PMAP_MAP_POOLPAGE(pa) ALPHA_PHYS_TO_K0SEG((pa)) -#define PMAP_UNMAP_POOLPAGE(va) ALPHA_K0SEG_TO_PHYS((va)) +#define PMAP_MAP_POOLPAGE(pa) PMAP_DIRECT_MAP(pa) +#define PMAP_UNMAP_POOLPAGE(va) PMAP_DIRECT_UNMAP(va) /* * Other hooks for the pool allocator.
CVS commit: src/sys/arch/alpha/include
Module Name:src Committed By: maya Date: Tue Oct 17 00:26:35 UTC 2017 Modified Files: src/sys/arch/alpha/include: fpu.h Log Message: Explain our implementation choice for implementation-defined values To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/alpha/include/fpu.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/alpha/include/fpu.h diff -u src/sys/arch/alpha/include/fpu.h:1.6 src/sys/arch/alpha/include/fpu.h:1.7 --- src/sys/arch/alpha/include/fpu.h:1.6 Sat May 10 15:31:04 2008 +++ src/sys/arch/alpha/include/fpu.h Tue Oct 17 00:26:35 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: fpu.h,v 1.6 2008/05/10 15:31:04 martin Exp $ */ +/* $NetBSD: fpu.h,v 1.7 2017/10/17 00:26:35 maya Exp $ */ /*- * Copyright (c) 2001 Ross Harvey @@ -91,8 +91,8 @@ #define IEEE_TRAP_ENABLE_INV _FP_C_DEF(1) #define IEEE_INHERIT _FP_C_DEF(14) -#define IEEE_MAP_UMZ _FP_C_DEF(13) -#define IEEE_MAP_DMZ _FP_C_DEF(12) +#define IEEE_MAP_UMZ _FP_C_DEF(13) /* Map underflowed outputs to zero */ +#define IEEE_MAP_DMZ _FP_C_DEF(12) /* Map denormal inputs to zero */ #define FP_C_MIRRORED (IEEE_STATUS_INE | IEEE_STATUS_UNF | IEEE_STATUS_OVF\ | IEEE_STATUS_DZE | IEEE_STATUS_INV)
CVS commit: src/sys/arch/alpha/include
Module Name:src Committed By: christos Date: Sat Jan 14 21:58:17 UTC 2017 Modified Files: src/sys/arch/alpha/include: asm.h Log Message: Undo; the correct fix was applied in csu/arch/alpha/crtbegin.h To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/sys/arch/alpha/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/alpha/include/asm.h diff -u src/sys/arch/alpha/include/asm.h:1.35 src/sys/arch/alpha/include/asm.h:1.36 --- src/sys/arch/alpha/include/asm.h:1.35 Sat Jan 14 11:15:10 2017 +++ src/sys/arch/alpha/include/asm.h Sat Jan 14 16:58:17 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: asm.h,v 1.35 2017/01/14 16:15:10 martin Exp $ */ +/* $NetBSD: asm.h,v 1.36 2017/01/14 21:58:17 christos Exp $ */ /* * Copyright (c) 1991,1990,1989,1994,1995,1996 Carnegie Mellon University @@ -133,7 +133,6 @@ /* * Useful stuff. */ -#undef __CONCAT #ifdef __STDC__ #define __CONCAT(a,b) a ## b #else @@ -643,7 +642,6 @@ label: ASCIZ msg; \ /* * Kernel RCS ID tag and copyright macros */ -#undef __SECTIONSTRING #define __SECTIONSTRING(_sec, _str)\ .pushsection _sec ; .asciz _str ; .popsection
CVS commit: src/sys/arch/alpha/include
Module Name:src Committed By: martin Date: Sat Jan 14 16:15:10 UTC 2017 Modified Files: src/sys/arch/alpha/include: asm.h Log Message: Avoid stupid gcc redefinition warnings by #undef before redefine. To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/sys/arch/alpha/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/alpha/include/asm.h diff -u src/sys/arch/alpha/include/asm.h:1.34 src/sys/arch/alpha/include/asm.h:1.35 --- src/sys/arch/alpha/include/asm.h:1.34 Thu Jul 11 19:50:55 2013 +++ src/sys/arch/alpha/include/asm.h Sat Jan 14 16:15:10 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: asm.h,v 1.34 2013/07/11 19:50:55 matt Exp $ */ +/* $NetBSD: asm.h,v 1.35 2017/01/14 16:15:10 martin Exp $ */ /* * Copyright (c) 1991,1990,1989,1994,1995,1996 Carnegie Mellon University @@ -133,6 +133,7 @@ /* * Useful stuff. */ +#undef __CONCAT #ifdef __STDC__ #define __CONCAT(a,b) a ## b #else @@ -642,6 +643,7 @@ label: ASCIZ msg; \ /* * Kernel RCS ID tag and copyright macros */ +#undef __SECTIONSTRING #define __SECTIONSTRING(_sec, _str)\ .pushsection _sec ; .asciz _str ; .popsection
CVS commit: src/sys/arch/alpha/include
Module Name:src Committed By: christos Date: Sat Jan 14 00:35:37 UTC 2017 Modified Files: src/sys/arch/alpha/include: intr.h Log Message: fix types. To generate a diff of this commit: cvs rdiff -u -r1.71 -r1.72 src/sys/arch/alpha/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/alpha/include/intr.h diff -u src/sys/arch/alpha/include/intr.h:1.71 src/sys/arch/alpha/include/intr.h:1.72 --- src/sys/arch/alpha/include/intr.h:1.71 Mon May 19 18:47:53 2014 +++ src/sys/arch/alpha/include/intr.h Fri Jan 13 19:35:37 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: intr.h,v 1.71 2014/05/19 22:47:53 rmind Exp $ */ +/* $NetBSD: intr.h,v 1.72 2017/01/14 00:35:37 christos Exp $ */ /*- * Copyright (c) 2000, 2001, 2002 The NetBSD Foundation, Inc. @@ -147,7 +147,7 @@ static __inline int _splraise(int s) { int cur = alpha_pal_rdps() & ALPHA_PSL_IPL_MASK; - return (s > cur ? alpha_pal_swpipl(s) : cur); + return (s > cur ? (int)alpha_pal_swpipl(s) : cur); } #define splraiseipl(icookie) _splraise((icookie)._psl)
CVS commit: src/sys/arch/alpha/include
Module Name:src Committed By: christos Date: Thu Aug 25 07:39:55 UTC 2016 Modified Files: src/sys/arch/alpha/include: ieeefp.h Log Message: match the name with the FE_ constant from fenv.h To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/alpha/include/ieeefp.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/alpha/include/ieeefp.h diff -u src/sys/arch/alpha/include/ieeefp.h:1.9 src/sys/arch/alpha/include/ieeefp.h:1.10 --- src/sys/arch/alpha/include/ieeefp.h:1.9 Tue Aug 23 05:59:26 2016 +++ src/sys/arch/alpha/include/ieeefp.h Thu Aug 25 03:39:55 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: ieeefp.h,v 1.9 2016/08/23 09:59:26 christos Exp $ */ +/* $NetBSD: ieeefp.h,v 1.10 2016/08/25 07:39:55 christos Exp $ */ /* * Written by J.T. Conklin, Apr 28, 1995 @@ -44,7 +44,7 @@ typedef int fp_except; #define FP_X_OFL FE_OVERFLOW /* overflow exception */ #define FP_X_UFL FE_UNDERFLOW /* underflow exception */ #define FP_X_IMP FE_INEXACT /* imprecise (prec. loss; "inexact") */ -#define FP_X_IOV FE_IOVERFLOW /* integer overflow */ +#define FP_X_IOV FE_INTOVF /* integer overflow */ /* * fp_rnd bits match the fpcr, below, as well as bits 12:11
CVS commit: src/sys/arch/alpha/include
Module Name:src Committed By: christos Date: Wed Aug 24 06:22:20 UTC 2016 Modified Files: src/sys/arch/alpha/include: fenv.h Log Message: restore the constants to the old values to match what the kernel expects internally. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/alpha/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/alpha/include/fenv.h diff -u src/sys/arch/alpha/include/fenv.h:1.1 src/sys/arch/alpha/include/fenv.h:1.2 --- src/sys/arch/alpha/include/fenv.h:1.1 Tue Aug 23 05:59:26 2016 +++ src/sys/arch/alpha/include/fenv.h Wed Aug 24 02:22:20 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: fenv.h,v 1.1 2016/08/23 09:59:26 christos Exp $ */ +/* $NetBSD: fenv.h,v 1.2 2016/08/24 06:22:20 christos Exp $ */ /*- * Copyright (c) 2004-2005 David Schultz@@ -37,12 +37,12 @@ typedef __uint64_t fenv_t; typedef __uint16_t fexcept_t; /* Exception flags */ -#define FE_INVALID 0x02 -#define FE_DIVBYZERO 0x04 -#define FE_OVERFLOW 0x08 -#define FE_UNDERFLOW 0x10 -#define FE_INEXACT 0x20 -#define FE_INTOVF 0x40 /* not maskable */ +#define FE_INVALID 0x01 +#define FE_DIVBYZERO 0x02 +#define FE_OVERFLOW 0x04 +#define FE_UNDERFLOW 0x08 +#define FE_INEXACT 0x10 +#define FE_INTOVF 0x20 /* not maskable */ #define FE_ALL_EXCEPT (FE_DIVBYZERO | FE_INEXACT | FE_INTOVF | \ FE_INVALID | FE_OVERFLOW | FE_UNDERFLOW) @@ -55,7 +55,7 @@ typedef __uint16_t fexcept_t; FE_UPWARD | FE_TOWARDZERO) #define _ROUND_SHIFT 58 -#define _FPUSW_SHIFT 51 +#define _FPUSW_SHIFT 52 #define __excb() __asm __volatile("excb") #define __mf_fpcr(__cw) __asm __volatile("mf_fpcr %0" : "=f" (*(__cw)))
CVS commit: src/sys/arch/alpha/include
Module Name:src Committed By: christos Date: Tue Aug 23 09:59:26 UTC 2016 Modified Files: src/sys/arch/alpha/include: Makefile ieeefp.h Added Files: src/sys/arch/alpha/include: fenv.h Log Message: fenv.h for alpha To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/sys/arch/alpha/include/Makefile cvs rdiff -u -r0 -r1.1 src/sys/arch/alpha/include/fenv.h cvs rdiff -u -r1.8 -r1.9 src/sys/arch/alpha/include/ieeefp.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/alpha/include/Makefile diff -u src/sys/arch/alpha/include/Makefile:1.32 src/sys/arch/alpha/include/Makefile:1.33 --- src/sys/arch/alpha/include/Makefile:1.32 Fri Aug 12 18:22:49 2011 +++ src/sys/arch/alpha/include/Makefile Tue Aug 23 05:59:26 2016 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.32 2011/08/12 22:22:49 dyoung Exp $ +# $NetBSD: Makefile,v 1.33 2016/08/23 09:59:26 christos Exp $ INCSDIR= /usr/include/alpha @@ -7,7 +7,7 @@ INCS= alpha_cpu.h ansi.h aout_machdep.h cdefs.h cfbreg.h cpu.h cpuconf.h \ disklabel.h \ ecoff_machdep.h elf_machdep.h endian.h endian_machdep.h \ - float.h fpu.h frame.h \ + fenv.h float.h fpu.h frame.h \ ieee.h ieeefp.h \ int_const.h int_fmtio.h int_limits.h int_mwgwtypes.h int_types.h \ intr.h \ Index: src/sys/arch/alpha/include/ieeefp.h diff -u src/sys/arch/alpha/include/ieeefp.h:1.8 src/sys/arch/alpha/include/ieeefp.h:1.9 --- src/sys/arch/alpha/include/ieeefp.h:1.8 Sun Feb 5 21:14:13 2012 +++ src/sys/arch/alpha/include/ieeefp.h Tue Aug 23 05:59:26 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: ieeefp.h,v 1.8 2012/02/06 02:14:13 matt Exp $ */ +/* $NetBSD: ieeefp.h,v 1.9 2016/08/23 09:59:26 christos Exp $ */ /* * Written by J.T. Conklin, Apr 28, 1995 @@ -12,26 +12,7 @@ #if defined(_NETBSD_SOURCE) || defined(_ISOC99_SOURCE) -typedef int fenv_t; -typedef int fexcept_t; - -#define FE_INVALID 0x01 /* invalid operation exception */ -#define FE_DIVBYZERO 0x02 /* divide-by-zero exception */ -#define FE_OVERFLOW 0x04 /* overflow exception */ -#define FE_UNDERFLOW 0x08 /* underflow exception */ -#define FE_INEXACT 0x10 /* imprecise (loss of precision; "inexact") */ -#define FE_IOVERFLOW 0x20/* integer overflow */ - -#define FE_ALL_EXCEPT 0x3f - -/* - * These bits match the fpcr as well as bits 12:11 - * in fp operate instructions - */ -#define FE_TOWARDZERO 0 /* round to zero (truncate) */ -#define FE_DOWNWARD 1 /* round toward negative infinity */ -#define FE_TONEAREST 2 /* round to nearest representable number */ -#define FE_UPWARD 3 /* round toward positive infinity */ +#include #if !defined(_ISOC99_SOURCE) Added files: Index: src/sys/arch/alpha/include/fenv.h diff -u /dev/null src/sys/arch/alpha/include/fenv.h:1.1 --- /dev/null Tue Aug 23 05:59:26 2016 +++ src/sys/arch/alpha/include/fenv.h Tue Aug 23 05:59:26 2016 @@ -0,0 +1,186 @@ +/* $NetBSD: fenv.h,v 1.1 2016/08/23 09:59:26 christos Exp $ */ + +/*- + * Copyright (c) 2004-2005 David Schultz+ * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD: src/lib/msun/alpha/fenv.h,v 1.3 2005/03/16 19:03:44 das Exp $ + */ + +#ifndef _ALPHA_FENV_H_ +#define _ALPHA_FENV_H_ + +#include + +typedef __uint64_t fenv_t; +typedef __uint16_t fexcept_t; + +/* Exception flags */ +#define FE_INVALID 0x02 +#define FE_DIVBYZERO 0x04 +#define FE_OVERFLOW 0x08 +#define FE_UNDERFLOW 0x10 +#define FE_INEXACT 0x20 +#define FE_INTOVF 0x40 /* not maskable */ +#define FE_ALL_EXCEPT (FE_DIVBYZERO | FE_INEXACT | FE_INTOVF | \ + FE_INVALID | FE_OVERFLOW | FE_UNDERFLOW) + +/* Rounding modes */ +#define FE_TOWARDZERO 0x00 +#define FE_DOWNWARD
CVS commit: src/sys/arch/alpha/include
Module Name:src Committed By: christos Date: Sun Jan 24 16:47:50 UTC 2016 Modified Files: src/sys/arch/alpha/include: bus_user.h types.h Log Message: use __paddr_t since this is a userland API. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/alpha/include/bus_user.h cvs rdiff -u -r1.53 -r1.54 src/sys/arch/alpha/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/alpha/include/bus_user.h diff -u src/sys/arch/alpha/include/bus_user.h:1.1 src/sys/arch/alpha/include/bus_user.h:1.2 --- src/sys/arch/alpha/include/bus_user.h:1.1 Fri Aug 12 18:23:12 2011 +++ src/sys/arch/alpha/include/bus_user.h Sun Jan 24 11:47:50 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: bus_user.h,v 1.1 2011/08/12 22:23:12 dyoung Exp $ */ +/* $NetBSD: bus_user.h,v 1.2 2016/01/24 16:47:50 christos Exp $ */ /* * XXX This file is a stopgap intended to keep NetBSD/alpha buildable * XXX while developers figure out whether/how to expose to userland @@ -24,8 +24,8 @@ typedef u_long bus_size_t; struct alpha_bus_space_translation { bus_addr_t abst_bus_start; /* start of bus window */ bus_addr_t abst_bus_end; /* end of bus window */ - paddr_t abst_sys_start; /* start of sysBus window */ - paddr_t abst_sys_end; /* end of sysBus window */ + __paddr_t abst_sys_start; /* start of sysBus window */ + __paddr_t abst_sys_end; /* end of sysBus window */ int abst_addr_shift;/* address shift */ int abst_size_shift;/* size shift */ int abst_flags; /* flags; see below */ Index: src/sys/arch/alpha/include/types.h diff -u src/sys/arch/alpha/include/types.h:1.53 src/sys/arch/alpha/include/types.h:1.54 --- src/sys/arch/alpha/include/types.h:1.53 Sat Jan 23 17:31:19 2016 +++ src/sys/arch/alpha/include/types.h Sun Jan 24 11:47:50 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: types.h,v 1.53 2016/01/23 22:31:19 christos Exp $ */ +/* $NetBSD: types.h,v 1.54 2016/01/24 16:47:50 christos Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -44,8 +44,13 @@ typedef struct label_t { } label_t; #endif +typedef int __cpu_simple_lock_nv_t; +typedef long int __register_t; +typedef unsigned long __paddr_t; /* XXX: For bus_user.h */ + + #if defined(_KERNEL) || defined(_KMEMUSER) || defined(_KERNTYPES) || defined(_STANDALONE) -typedef unsigned long paddr_t; +typedef __paddr_t paddr_t; typedef unsigned long psize_t; typedef unsigned long vaddr_t; typedef unsigned long vsize_t; @@ -56,13 +61,10 @@ typedef unsigned long vsize_t; #define PRIxVSIZE "lx" #define PRIuVSIZE "lu" -typedef long int register_t; +typedef __register_t register_t; #define PRIxREGISTER "lx" #endif -typedef int __cpu_simple_lock_nv_t; -typedef long int __register_t; - #define __SIMPLELOCK_LOCKED 1 #define __SIMPLELOCK_UNLOCKED 0
CVS commit: src/sys/arch/alpha/include
Module Name:src Committed By: pooka Date: Fri Aug 28 09:30:01 UTC 2015 Modified Files: src/sys/arch/alpha/include: types.h Log Message: Convert to __cpu_simple_lock_nv_t. Somehow missed alpha in the earlier commit. Thanks to uebs for pointing it out. To generate a diff of this commit: cvs rdiff -u -r1.50 -r1.51 src/sys/arch/alpha/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/alpha/include/types.h diff -u src/sys/arch/alpha/include/types.h:1.50 src/sys/arch/alpha/include/types.h:1.51 --- src/sys/arch/alpha/include/types.h:1.50 Thu Jan 8 22:27:17 2015 +++ src/sys/arch/alpha/include/types.h Fri Aug 28 09:30:01 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: types.h,v 1.50 2015/01/08 22:27:17 riastradh Exp $ */ +/* $NetBSD: types.h,v 1.51 2015/08/28 09:30:01 pooka Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -63,7 +63,7 @@ typedef long int register_t; #define PRIxREGISTER lx #endif -typedef volatile int __cpu_simple_lock_t; +typedef int __cpu_simple_lock_nv_t; #define __SIMPLELOCK_LOCKED 1 #define __SIMPLELOCK_UNLOCKED 0
CVS commit: src/sys/arch/alpha/include
Module Name:src Committed By: christos Date: Tue Jan 21 20:18:46 UTC 2014 Modified Files: src/sys/arch/alpha/include: cpu.h Log Message: rumpkernel needs ci_pcc_freq To generate a diff of this commit: cvs rdiff -u -r1.80 -r1.81 src/sys/arch/alpha/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/alpha/include/cpu.h diff -u src/sys/arch/alpha/include/cpu.h:1.80 src/sys/arch/alpha/include/cpu.h:1.81 --- src/sys/arch/alpha/include/cpu.h:1.80 Sat Nov 9 19:50:13 2013 +++ src/sys/arch/alpha/include/cpu.h Tue Jan 21 15:18:46 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.80 2013/11/10 00:50:13 christos Exp $ */ +/* $NetBSD: cpu.h,v 1.81 2014/01/21 20:18:46 christos Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc. @@ -109,7 +109,7 @@ struct cpu_info { */ struct lwp *ci_curlwp; /* current owner of the processor */ struct cpu_data ci_data; /* MI per-cpu data */ -#ifndef _KMEMUSER +#if !defined(_KMEMUSER) || defined(_RUMPKERNEL) struct cctr_state ci_cc; /* cycle counter state */ struct cpu_info *ci_next; /* next cpu_info structure */ int ci_mtx_count; @@ -130,7 +130,7 @@ struct cpu_info { volatile u_long ci_flags; /* flags; see below */ volatile u_long ci_ipis; /* interprocessor interrupts pending */ #endif -#endif /* _KMEMUSER */ +#endif /* !_KMEMUSER || _RUMPKERNEL */ }; #endif /* _KERNEL || _KMEMUSER */
CVS commit: src/sys/arch/alpha/include
Module Name:src Committed By: christos Date: Mon Nov 4 16:56:50 UTC 2013 Modified Files: src/sys/arch/alpha/include: tc_machdep.h Log Message: make volatile variable as __USED() To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/alpha/include/tc_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/alpha/include/tc_machdep.h diff -u src/sys/arch/alpha/include/tc_machdep.h:1.5 src/sys/arch/alpha/include/tc_machdep.h:1.6 --- src/sys/arch/alpha/include/tc_machdep.h:1.5 Sun Feb 5 21:14:13 2012 +++ src/sys/arch/alpha/include/tc_machdep.h Mon Nov 4 11:56:50 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: tc_machdep.h,v 1.5 2012/02/06 02:14:13 matt Exp $ */ +/* $NetBSD: tc_machdep.h,v 1.6 2013/11/04 16:56:50 christos Exp $ */ /* * Copyright (c) 1994, 1995 Carnegie-Mellon University. @@ -73,7 +73,8 @@ typedef int32_t tc_offset_t; volatile uint32_t no_optimize; \ no_optimize = \ *(volatile uint32_t *)ALPHA_PHYS_TO_K0SEG(0x0001f0080220); \ -} while (0) + __USE(no_optimize); \ +} while (/*CONSTCOND*/0) #define tc_badaddr(tcaddr) \ badaddr((void *)(tcaddr), sizeof (uint32_t))
CVS commit: src/sys/arch/alpha/include
Module Name:src Committed By: christos Date: Mon Nov 4 19:57:29 UTC 2013 Modified Files: src/sys/arch/alpha/include: pmap.h Log Message: convert to flex array To generate a diff of this commit: cvs rdiff -u -r1.77 -r1.78 src/sys/arch/alpha/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/alpha/include/pmap.h diff -u src/sys/arch/alpha/include/pmap.h:1.77 src/sys/arch/alpha/include/pmap.h:1.78 --- src/sys/arch/alpha/include/pmap.h:1.77 Sun Feb 5 21:14:13 2012 +++ src/sys/arch/alpha/include/pmap.h Mon Nov 4 14:57:29 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.77 2012/02/06 02:14:13 matt Exp $ */ +/* $NetBSD: pmap.h,v 1.78 2013/11/04 19:57:29 christos Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2001, 2007 The NetBSD Foundation, Inc. @@ -141,7 +141,7 @@ struct pmap { struct pmap_statistics pm_stats; /* pmap statistics */ unsigned long pm_cpus; /* mask of CPUs using pmap */ unsigned long pm_needisync; /* mask of CPUs needing isync */ - struct pmap_asn_info pm_asni[1]; /* ASN information */ + struct pmap_asn_info pm_asni[]; /* ASN information */ /* variable length */ };
CVS commit: src/sys/arch/alpha/include
Module Name:src Committed By: christos Date: Sun Nov 3 01:12:16 UTC 2013 Modified Files: src/sys/arch/alpha/include: cpu.h Log Message: use __USE() in the iterator variable To generate a diff of this commit: cvs rdiff -u -r1.78 -r1.79 src/sys/arch/alpha/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/alpha/include/cpu.h diff -u src/sys/arch/alpha/include/cpu.h:1.78 src/sys/arch/alpha/include/cpu.h:1.79 --- src/sys/arch/alpha/include/cpu.h:1.78 Sat Jan 21 16:49:50 2012 +++ src/sys/arch/alpha/include/cpu.h Sat Nov 2 21:12:16 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.78 2012/01/21 21:49:50 matt Exp $ */ +/* $NetBSD: cpu.h,v 1.79 2013/11/03 01:12:16 christos Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc. @@ -147,7 +147,8 @@ extern struct cpu_info cpu_info_primary; extern struct cpu_info *cpu_info_list; #define CPU_INFO_ITERATOR int -#define CPU_INFO_FOREACH(cii, ci) cii = 0, ci = cpu_info_list; \ +#define CPU_INFO_FOREACH(cii, ci) cii = 0, __USE(cii), \ + ci = cpu_info_list; \ ci != NULL; ci = ci-ci_next #if defined(MULTIPROCESSOR)
CVS commit: src/sys/arch/alpha/include
Module Name:src Committed By: matt Date: Thu Jul 11 19:50:55 UTC 2013 Modified Files: src/sys/arch/alpha/include: asm.h Log Message: Add a RCSID macro for non _KERNEL use To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/sys/arch/alpha/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/alpha/include/asm.h diff -u src/sys/arch/alpha/include/asm.h:1.33 src/sys/arch/alpha/include/asm.h:1.34 --- src/sys/arch/alpha/include/asm.h:1.33 Mon Feb 6 02:14:13 2012 +++ src/sys/arch/alpha/include/asm.h Thu Jul 11 19:50:55 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: asm.h,v 1.33 2012/02/06 02:14:13 matt Exp $ */ +/* $NetBSD: asm.h,v 1.34 2013/07/11 19:50:55 matt Exp $ */ /* * Copyright (c) 1991,1990,1989,1994,1995,1996 Carnegie Mellon University @@ -642,14 +642,13 @@ label: ASCIZ msg; \ /* * Kernel RCS ID tag and copyright macros */ +#define __SECTIONSTRING(_sec, _str)\ + .pushsection _sec ; .asciz _str ; .popsection #ifdef _KERNEL -#define __KERNEL_SECTIONSTRING(_sec, _str)\ - .pushsection _sec ; .asciz _str ; .popsection - -#define __KERNEL_RCSID(_n, _s) __KERNEL_SECTIONSTRING(.ident, _s) -#define __KERNEL_COPYRIGHT(_n, _s) __KERNEL_SECTIONSTRING(.copyright, _s) +#define __KERNEL_RCSID(_n, _s) __SECTIONSTRING(.ident, _s) +#define __KERNEL_COPYRIGHT(_n, _s) __SECTIONSTRING(.copyright, _s) #ifdef NO_KERNEL_RCSIDS #undef __KERNEL_RCSID @@ -697,6 +696,8 @@ IMPORT(cpu_info_primary, CPU_INFO_SIZEOF #define GET_IDLE_PCB(reg) \ lda reg, cpu_info_primary; \ ldq reg, CPU_INFO_IDLE_PCB_PADDR(reg) -#endif +#endif /* MULTIPROCESSOR */ +#else +#define RCSID(_s) __SECTIONSTRING(.ident, _s) #endif /* _KERNEL */
CVS commit: src/sys/arch/alpha/include
Module Name:src Committed By: he Date: Mon Jan 14 10:46:14 UTC 2013 Modified Files: src/sys/arch/alpha/include: param.h Log Message: Copy the ALPHA_PGSHIFT value into the non-_KERNEL branch. Fixes the build. To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/sys/arch/alpha/include/param.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/alpha/include/param.h diff -u src/sys/arch/alpha/include/param.h:1.42 src/sys/arch/alpha/include/param.h:1.43 --- src/sys/arch/alpha/include/param.h:1.42 Mon Jan 7 23:40:52 2013 +++ src/sys/arch/alpha/include/param.h Mon Jan 14 10:46:14 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.42 2013/01/07 23:40:52 dsl Exp $ */ +/* $NetBSD: param.h,v 1.43 2013/01/14 10:46:14 he Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -49,6 +49,8 @@ #ifdef _KERNEL #include machine/cpu.h +#else +#define ALPHA_PGSHIFT 13 #endif #define NBPG (1 ALPHA_PGSHIFT) /* bytes/page */
CVS commit: src/sys/arch/alpha/include
Module Name:src Committed By: dsl Date: Mon Jan 7 23:40:53 UTC 2013 Modified Files: src/sys/arch/alpha/include: param.h Log Message: Only include machine/cpu.h if _KERNEL is defined. Fixes alpha userspace build (esp. pstat). NFI why it worked before at all. To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.42 src/sys/arch/alpha/include/param.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/alpha/include/param.h diff -u src/sys/arch/alpha/include/param.h:1.41 src/sys/arch/alpha/include/param.h:1.42 --- src/sys/arch/alpha/include/param.h:1.41 Fri Feb 10 17:35:50 2012 +++ src/sys/arch/alpha/include/param.h Mon Jan 7 23:40:52 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.41 2012/02/10 17:35:50 para Exp $ */ +/* $NetBSD: param.h,v 1.42 2013/01/07 23:40:52 dsl Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -47,7 +47,9 @@ #define MACHINE_ARCH alpha #define MID_MACHINE MID_ALPHA +#ifdef _KERNEL #include machine/cpu.h +#endif #define NBPG (1 ALPHA_PGSHIFT) /* bytes/page */ #define PGOFSET (NBPG-1) /* byte off. into pg */
CVS commit: src/sys/arch/alpha/include
Module Name:src Committed By: chs Date: Mon Dec 10 16:12:20 UTC 2012 Modified Files: src/sys/arch/alpha/include: vmparam.h Log Message: enable __USE_TOPDOWN_VM. To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/sys/arch/alpha/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/alpha/include/vmparam.h diff -u src/sys/arch/alpha/include/vmparam.h:1.37 src/sys/arch/alpha/include/vmparam.h:1.38 --- src/sys/arch/alpha/include/vmparam.h:1.37 Mon Sep 10 07:47:07 2012 +++ src/sys/arch/alpha/include/vmparam.h Mon Dec 10 16:12:19 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: vmparam.h,v 1.37 2012/09/10 07:47:07 martin Exp $ */ +/* $NetBSD: vmparam.h,v 1.38 2012/12/10 16:12:19 chs Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -43,6 +43,8 @@ #include machine/alpha_cpu.h +#define __USE_TOPDOWN_VM + /* * Machine dependent constants for Alpha. */
CVS commit: src/sys/arch/alpha/include
Module Name:src Committed By: martin Date: Mon Sep 10 07:47:07 UTC 2012 Modified Files: src/sys/arch/alpha/include: vmparam.h Log Message: Make this file idempotent To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 src/sys/arch/alpha/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/alpha/include/vmparam.h diff -u src/sys/arch/alpha/include/vmparam.h:1.36 src/sys/arch/alpha/include/vmparam.h:1.37 --- src/sys/arch/alpha/include/vmparam.h:1.36 Tue Feb 8 20:20:07 2011 +++ src/sys/arch/alpha/include/vmparam.h Mon Sep 10 07:47:07 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: vmparam.h,v 1.36 2011/02/08 20:20:07 rmind Exp $ */ +/* $NetBSD: vmparam.h,v 1.37 2012/09/10 07:47:07 martin Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -41,6 +41,8 @@ #ifndef _ALPHA_VMPARAM_H_ #define _ALPHA_VMPARAM_H_ +#include machine/alpha_cpu.h + /* * Machine dependent constants for Alpha. */
CVS commit: src/sys/arch/alpha/include
Module Name:src Committed By: matt Date: Wed Jan 25 18:09:13 UTC 2012 Modified Files: src/sys/arch/alpha/include: types.h Log Message: Enable direct-mapped uareas for alpha. To generate a diff of this commit: cvs rdiff -u -r1.48 -r1.49 src/sys/arch/alpha/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/alpha/include/types.h diff -u src/sys/arch/alpha/include/types.h:1.48 src/sys/arch/alpha/include/types.h:1.49 --- src/sys/arch/alpha/include/types.h:1.48 Wed Jul 13 04:48:18 2011 +++ src/sys/arch/alpha/include/types.h Wed Jan 25 18:09:13 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: types.h,v 1.48 2011/07/13 04:48:18 dyoung Exp $ */ +/* $NetBSD: types.h,v 1.49 2012/01/25 18:09:13 matt Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -77,6 +77,7 @@ typedef volatile int __cpu_simple_lock_ #define __HAVE_ATOMIC64_OPS #define __HAVE_MM_MD_DIRECT_MAPPED_IO #define __HAVE_MM_MD_DIRECT_MAPPED_PHYS +#define __HAVE_CPU_UAREA_ROUTINES #define __HAVE_CPU_LWP_SETPRIVATE #define __HAVE___LWP_GETPRIVATE_FAST #define __HAVE_COMMON___TLS_GET_ADDR
CVS commit: src/sys/arch/alpha/include
Module Name:src Committed By: matt Date: Sat Jan 21 21:49:50 UTC 2012 Modified Files: src/sys/arch/alpha/include: cpu.h Log Message: cpu_uarea_free returns bool, not void To generate a diff of this commit: cvs rdiff -u -r1.77 -r1.78 src/sys/arch/alpha/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/alpha/include/cpu.h diff -u src/sys/arch/alpha/include/cpu.h:1.77 src/sys/arch/alpha/include/cpu.h:1.78 --- src/sys/arch/alpha/include/cpu.h:1.77 Tue Jun 14 07:53:29 2011 +++ src/sys/arch/alpha/include/cpu.h Sat Jan 21 21:49:50 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.77 2011/06/14 07:53:29 matt Exp $ */ +/* $NetBSD: cpu.h,v 1.78 2012/01/21 21:49:50 matt Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc. @@ -250,7 +250,7 @@ struct trapframe; int badaddr(void *, size_t); void * cpu_uarea_alloc(bool); -void cpu_uarea_free(void *); +bool cpu_uarea_free(void *); #define cpu_idle() /* nothing */
CVS commit: src/sys/arch/alpha/include
Module Name:src Committed By: dyoung Date: Fri Aug 12 22:23:12 UTC 2011 Added Files: src/sys/arch/alpha/include: bus_user.h Log Message: Straggler from last: add bus_user.h to the repository. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/arch/alpha/include/bus_user.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/sys/arch/alpha/include/bus_user.h diff -u /dev/null src/sys/arch/alpha/include/bus_user.h:1.1 --- /dev/null Fri Aug 12 22:23:12 2011 +++ src/sys/arch/alpha/include/bus_user.h Fri Aug 12 22:23:12 2011 @@ -0,0 +1,40 @@ +/* $NetBSD: bus_user.h,v 1.1 2011/08/12 22:23:12 dyoung Exp $ */ +/* + * XXX This file is a stopgap intended to keep NetBSD/alpha buildable + * XXX while developers figure out whether/how to expose to userland + * XXX the bus_space(9) and pci(9) facilities used by libalpha (which + * XXX is used by X11). + * XXX + * XXX Do NOT add new definitions to this file. + */ +#ifndef _ALPHA_BUS_USER_H_ +#define _ALPHA_BUS_USER_H_ + +#include sys/types.h + +/* + * Addresses (in bus space). + */ +typedef u_long bus_addr_t; +typedef u_long bus_size_t; + +/* + * Translation of an Alpha bus address; INTERNAL USE ONLY. + */ +struct alpha_bus_space_translation { + bus_addr_t abst_bus_start; /* start of bus window */ + bus_addr_t abst_bus_end; /* end of bus window */ + paddr_t abst_sys_start; /* start of sysBus window */ + paddr_t abst_sys_end; /* end of sysBus window */ + int abst_addr_shift;/* address shift */ + int abst_size_shift;/* size shift */ + int abst_flags; /* flags; see below */ +}; + +#define ABST_BWX 0x01 /* use BWX to access the bus */ +#define ABST_DENSE 0x02 /* space is dense */ + +#define BUS_SPACE_MAP_LINEAR 0x02 +#define BUS_SPACE_MAP_PREFETCHABLE 0x04 + +#endif /* _ALPHA_BUS_USER_H_ */
CVS commit: src/sys/arch/alpha/include
Module Name:src Committed By: uebayasi Date: Tue Aug 2 04:45:10 UTC 2011 Modified Files: src/sys/arch/alpha/include: sysarch.h Log Message: Define struct alpha_pci_conf_readwrite_args only once; fix build. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/arch/alpha/include/sysarch.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/alpha/include/sysarch.h diff -u src/sys/arch/alpha/include/sysarch.h:1.17 src/sys/arch/alpha/include/sysarch.h:1.18 --- src/sys/arch/alpha/include/sysarch.h:1.17 Thu Jul 28 20:30:06 2011 +++ src/sys/arch/alpha/include/sysarch.h Tue Aug 2 04:45:10 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: sysarch.h,v 1.17 2011/07/28 20:30:06 dyoung Exp $ */ +/* $NetBSD: sysarch.h,v 1.18 2011/08/02 04:45:10 uebayasi Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -81,15 +81,6 @@ u_int32_t val; }; -struct alpha_pci_conf_readwrite_args { - int write; - u_int bus; - u_int device; - u_int function; - u_int reg; - u_int32_t val; -}; - #ifdef _KERNEL extern u_int alpha_bus_window_count[]; extern int (*alpha_bus_get_window)(int, int,
CVS commit: src/sys/arch/alpha/include
Module Name:src Committed By: dyoung Date: Sun Jul 17 01:08:12 UTC 2011 Modified Files: src/sys/arch/alpha/include: sysarch.h Log Message: Don't #include machine/bus_defs.h from this header unless _KERNEL is #defined. While this header is installed in the alpha userland, however, machine/bus_defs.h is not. Don't declare any of the alpha_bus_ or alpha_pci_ symbols unless _KERNEL is #defined. I cannot find anything but libarch in the base system that uses the symbols. Anything using alpha_pci_ symbols ought to use pci(3), instead. Up next: don't use those symbols in libarch. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/arch/alpha/include/sysarch.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/alpha/include/sysarch.h diff -u src/sys/arch/alpha/include/sysarch.h:1.14 src/sys/arch/alpha/include/sysarch.h:1.15 --- src/sys/arch/alpha/include/sysarch.h:1.14 Wed Jul 13 04:47:16 2011 +++ src/sys/arch/alpha/include/sysarch.h Sun Jul 17 01:08:12 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: sysarch.h,v 1.14 2011/07/13 04:47:16 dyoung Exp $ */ +/* $NetBSD: sysarch.h,v 1.15 2011/07/17 01:08:12 dyoung Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -32,7 +32,9 @@ #ifndef _ALPHA_SYSARCH_H_ #define _ALPHA_SYSARCH_H_ -#include machine/bus_defs.h +#include sys/types.h +#include sys/stdint.h + #include machine/ieeefp.h /* @@ -42,9 +44,6 @@ #define ALPHA_FPGETMASK 0 #define ALPHA_FPSETMASK 1 #define ALPHA_FPSETSTICKY 2 -#define ALPHA_BUS_GET_WINDOW_COUNT 3 -#define ALPHA_BUS_GET_WINDOW 4 -#define ALPHA_PCI_CONF_READWRITE 5 #define ALPHA_FPGETSTICKY 6 #define ALPHA_GET_FP_C 7 #define ALPHA_SET_FP_C 8 @@ -57,6 +56,12 @@ uint64_t fp_c; }; +#ifdef _KERNEL +#include machine/bus_defs.h + +#define ALPHA_BUS_GET_WINDOW_COUNT 3 +#define ALPHA_BUS_GET_WINDOW 4 +#define ALPHA_PCI_CONF_READWRITE 5 struct alpha_bus_get_window_count_args { u_int type; u_int count; /* output */ @@ -72,16 +77,6 @@ #define ALPHA_BUS_TYPE_PCI_MEM 1 #define ALPHA_BUS_TYPE_MAX 1 -struct alpha_pci_conf_readwrite_args { - int write; - u_int bus; - u_int device; - u_int function; - u_int reg; - u_int32_t val; -}; - -#ifdef _KERNEL extern u_int alpha_bus_window_count[]; extern int (*alpha_bus_get_window)(int, int, struct alpha_bus_space_translation *); @@ -89,25 +84,7 @@ #else #include sys/cdefs.h -struct alpha_bus_window { - void * abw_addr; - size_t abw_size; - struct alpha_bus_space_translation abw_abst; -}; - __BEGIN_DECLS -int alpha_bus_getwindows(int, struct alpha_bus_window **); -int alpha_bus_mapwindow(struct alpha_bus_window *); -void alpha_bus_unmapwindow(struct alpha_bus_window *); - -void *alpha_pci_mem_map(bus_addr_t, bus_size_t, int, - struct alpha_bus_space_translation *); -void alpha_pci_mem_unmap(struct alpha_bus_space_translation *, - void *addr, bus_size_t); - -u_int32_t alpha_pci_conf_read(u_int, u_int, u_int, u_int); -void alpha_pci_conf_write(u_int, u_int, u_int, u_int, u_int32_t); - int sysarch(int, void *); __END_DECLS #endif /* _KERNEL */
CVS commit: src/sys/arch/alpha/include
Module Name:src Committed By: dyoung Date: Sun Jul 17 04:30:56 UTC 2011 Modified Files: src/sys/arch/alpha/include: sysarch.h Log Message: Oops, add back struct alpha_pci_conf_readwrite_args. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/arch/alpha/include/sysarch.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/alpha/include/sysarch.h diff -u src/sys/arch/alpha/include/sysarch.h:1.15 src/sys/arch/alpha/include/sysarch.h:1.16 --- src/sys/arch/alpha/include/sysarch.h:1.15 Sun Jul 17 01:08:12 2011 +++ src/sys/arch/alpha/include/sysarch.h Sun Jul 17 04:30:56 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: sysarch.h,v 1.15 2011/07/17 01:08:12 dyoung Exp $ */ +/* $NetBSD: sysarch.h,v 1.16 2011/07/17 04:30:56 dyoung Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -77,6 +77,15 @@ #define ALPHA_BUS_TYPE_PCI_MEM 1 #define ALPHA_BUS_TYPE_MAX 1 +struct alpha_pci_conf_readwrite_args { + int write; + u_int bus; + u_int device; + u_int function; + u_int reg; + u_int32_t val; +}; + extern u_int alpha_bus_window_count[]; extern int (*alpha_bus_get_window)(int, int, struct alpha_bus_space_translation *);
CVS commit: src/sys/arch/alpha/include
Module Name:src Committed By: dyoung Date: Wed Jul 13 04:47:16 UTC 2011 Modified Files: src/sys/arch/alpha/include: pio.h sysarch.h Log Message: #include machine/bus_defs.h instead of machine/bus.h. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/alpha/include/pio.h cvs rdiff -u -r1.13 -r1.14 src/sys/arch/alpha/include/sysarch.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/alpha/include/pio.h diff -u src/sys/arch/alpha/include/pio.h:1.7 src/sys/arch/alpha/include/pio.h:1.8 --- src/sys/arch/alpha/include/pio.h:1.7 Mon Apr 28 20:23:11 2008 +++ src/sys/arch/alpha/include/pio.h Wed Jul 13 04:47:16 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: pio.h,v 1.7 2008/04/28 20:23:11 martin Exp $ */ +/* $NetBSD: pio.h,v 1.8 2011/07/13 04:47:16 dyoung Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -33,7 +33,7 @@ #define _ALPHA_PIO_H_ #include sys/cdefs.h -#include machine/bus.h +#include machine/bus_defs.h #ifdef _KERNEL #error This file is for userspace only. Index: src/sys/arch/alpha/include/sysarch.h diff -u src/sys/arch/alpha/include/sysarch.h:1.13 src/sys/arch/alpha/include/sysarch.h:1.14 --- src/sys/arch/alpha/include/sysarch.h:1.13 Mon Apr 28 20:23:11 2008 +++ src/sys/arch/alpha/include/sysarch.h Wed Jul 13 04:47:16 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: sysarch.h,v 1.13 2008/04/28 20:23:11 martin Exp $ */ +/* $NetBSD: sysarch.h,v 1.14 2011/07/13 04:47:16 dyoung Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ #ifndef _ALPHA_SYSARCH_H_ #define _ALPHA_SYSARCH_H_ -#include machine/bus.h +#include machine/bus_defs.h #include machine/ieeefp.h /*
CVS commit: src/sys/arch/alpha/include
Module Name:src Committed By: dyoung Date: Wed Jul 13 04:48:18 UTC 2011 Modified Files: src/sys/arch/alpha/include: types.h Log Message: Switch alpha to new-style sys/bus.h. While I'm here, get rid of outdated __HAVE_DEVICE_REGISTER. To generate a diff of this commit: cvs rdiff -u -r1.47 -r1.48 src/sys/arch/alpha/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/alpha/include/types.h diff -u src/sys/arch/alpha/include/types.h:1.47 src/sys/arch/alpha/include/types.h:1.48 --- src/sys/arch/alpha/include/types.h:1.47 Sun Jun 12 03:35:37 2011 +++ src/sys/arch/alpha/include/types.h Wed Jul 13 04:48:18 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: types.h,v 1.47 2011/06/12 03:35:37 rmind Exp $ */ +/* $NetBSD: types.h,v 1.48 2011/07/13 04:48:18 dyoung Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -68,7 +68,7 @@ #define __SIMPLELOCK_LOCKED 1 #define __SIMPLELOCK_UNLOCKED 0 -#define __HAVE_DEVICE_REGISTER +#define __HAVE_NEW_STYLE_BUS_H #define __HAVE_ATOMIC_OPERATIONS #define __HAVE_CPU_COUNTER #define __HAVE_SYSCALL_INTERN
CVS commit: src/sys/arch/alpha/include
Module Name:src Committed By: dyoung Date: Wed Jul 13 04:50:19 UTC 2011 Removed Files: src/sys/arch/alpha/include: bus.h Log Message: On alpha, good-bye machine/bus.h. To generate a diff of this commit: cvs rdiff -u -r1.54 -r0 src/sys/arch/alpha/include/bus.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/alpha/include
Module Name:src Committed By: dyoung Date: Wed Jul 6 20:44:47 UTC 2011 Modified Files: src/sys/arch/alpha/include: alpha.h Log Message: Oops, missed one: #include sys/bus.h instead of machine/bus.h. To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/sys/arch/alpha/include/alpha.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/alpha/include/alpha.h diff -u src/sys/arch/alpha/include/alpha.h:1.27 src/sys/arch/alpha/include/alpha.h:1.28 --- src/sys/arch/alpha/include/alpha.h:1.27 Sun Jun 12 03:35:37 2011 +++ src/sys/arch/alpha/include/alpha.h Wed Jul 6 20:44:47 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: alpha.h,v 1.27 2011/06/12 03:35:37 rmind Exp $ */ +/* $NetBSD: alpha.h,v 1.28 2011/07/06 20:44:47 dyoung Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -57,7 +57,7 @@ #ifdef _KERNEL -#include machine/bus.h +#include sys/bus.h #include machine/stdarg.h #include sys/pcu.h
CVS commit: src/sys/arch/alpha/include
Module Name:src Committed By: matt Date: Tue Jun 14 06:47:53 UTC 2011 Modified Files: src/sys/arch/alpha/include: eisa_machdep.h isa_machdep.h pci_machdep.h Log Message: struct device * - device_t To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/alpha/include/eisa_machdep.h cvs rdiff -u -r1.12 -r1.13 src/sys/arch/alpha/include/isa_machdep.h cvs rdiff -u -r1.13 -r1.14 src/sys/arch/alpha/include/pci_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/alpha/include/eisa_machdep.h diff -u src/sys/arch/alpha/include/eisa_machdep.h:1.9 src/sys/arch/alpha/include/eisa_machdep.h:1.10 --- src/sys/arch/alpha/include/eisa_machdep.h:1.9 Wed Oct 17 19:52:58 2007 +++ src/sys/arch/alpha/include/eisa_machdep.h Tue Jun 14 06:47:52 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: eisa_machdep.h,v 1.9 2007/10/17 19:52:58 garbled Exp $ */ +/* $NetBSD: eisa_machdep.h,v 1.10 2011/06/14 06:47:52 matt Exp $ */ /* * Copyright (c) 1996 Carnegie-Mellon University. @@ -36,7 +36,7 @@ struct alpha_eisa_chipset { void *ec_v; - void (*ec_attach_hook)(struct device *, struct device *, + void (*ec_attach_hook)(device_t, device_t, struct eisabus_attach_args *); int (*ec_maxslots)(void *); int (*ec_intr_map)(void *, u_int, eisa_intr_handle_t *); Index: src/sys/arch/alpha/include/isa_machdep.h diff -u src/sys/arch/alpha/include/isa_machdep.h:1.12 src/sys/arch/alpha/include/isa_machdep.h:1.13 --- src/sys/arch/alpha/include/isa_machdep.h:1.12 Wed Aug 19 15:09:56 2009 +++ src/sys/arch/alpha/include/isa_machdep.h Tue Jun 14 06:47:52 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: isa_machdep.h,v 1.12 2009/08/19 15:09:56 dyoung Exp $ */ +/* $NetBSD: isa_machdep.h,v 1.13 2011/06/14 06:47:52 matt Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -68,7 +68,7 @@ struct isa_dma_state ic_dmastate; - void (*ic_attach_hook)(struct device *, struct device *, + void (*ic_attach_hook)(device_t, device_t, struct isabus_attach_args *); const struct evcnt *(*ic_intr_evcnt)(void *, int); void *(*ic_intr_establish)(void *, int, int, int, Index: src/sys/arch/alpha/include/pci_machdep.h diff -u src/sys/arch/alpha/include/pci_machdep.h:1.13 src/sys/arch/alpha/include/pci_machdep.h:1.14 --- src/sys/arch/alpha/include/pci_machdep.h:1.13 Mon Apr 4 20:37:44 2011 +++ src/sys/arch/alpha/include/pci_machdep.h Tue Jun 14 06:47:53 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: pci_machdep.h,v 1.13 2011/04/04 20:37:44 dyoung Exp $ */ +/* $NetBSD: pci_machdep.h,v 1.14 2011/06/14 06:47:53 matt Exp $ */ /* * Copyright (c) 1996 Carnegie-Mellon University. @@ -50,8 +50,8 @@ */ struct alpha_pci_chipset { void *pc_conf_v; - void (*pc_attach_hook)(struct device *, - struct device *, struct pcibus_attach_args *); + void (*pc_attach_hook)(device_t, device_t, + struct pcibus_attach_args *); int (*pc_bus_maxdevs)(void *, int); pcitag_t (*pc_make_tag)(void *, int, int, int); void (*pc_decompose_tag)(void *, pcitag_t, int *, @@ -68,9 +68,9 @@ int, int (*)(void *), void *); void (*pc_intr_disestablish)(void *, void *); - void *(*pc_pciide_compat_intr_establish)(void *, - struct device *, const struct pci_attach_args *, - int, int (*)(void *), void *); + void *(*pc_pciide_compat_intr_establish)(void *, device_t, + const struct pci_attach_args *, int, + int (*)(void *), void *); }; /*
CVS commit: src/sys/arch/alpha/include
Module Name:src Committed By: matt Date: Tue Jun 14 06:49:31 UTC 2011 Modified Files: src/sys/arch/alpha/include: cpuconf.h Log Message: struct device * - device_t To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/arch/alpha/include/cpuconf.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/alpha/include/cpuconf.h diff -u src/sys/arch/alpha/include/cpuconf.h:1.13 src/sys/arch/alpha/include/cpuconf.h:1.14 --- src/sys/arch/alpha/include/cpuconf.h:1.13 Fri Jul 27 00:25:19 2001 +++ src/sys/arch/alpha/include/cpuconf.h Tue Jun 14 06:49:31 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: cpuconf.h,v 1.13 2001/07/27 00:25:19 thorpej Exp $ */ +/* $NetBSD: cpuconf.h,v 1.14 2011/06/14 06:49:31 matt Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All rights reserved. @@ -65,7 +65,7 @@ * mcheck_handler - Platform Specific Machine Check Handler */ void (*cons_init)(void); - void (*device_register)(struct device *, void *); + void (*device_register)(device_t, void *); void (*clockintr)(struct clockframe *); void (*mcheck_handler)(unsigned long, struct trapframe *, unsigned long, unsigned long);
CVS commit: src/sys/arch/alpha/include
Module Name:src Committed By: he Date: Sun Dec 26 18:00:42 UTC 2010 Modified Files: src/sys/arch/alpha/include: cpu.h Log Message: Since struct cpu_data isn't the first member in struct cpu_info, instead expose the initial portion of struct cpu_info if _KMEMUSER is defined. To generate a diff of this commit: cvs rdiff -u -r1.74 -r1.75 src/sys/arch/alpha/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/alpha/include/cpu.h diff -u src/sys/arch/alpha/include/cpu.h:1.74 src/sys/arch/alpha/include/cpu.h:1.75 --- src/sys/arch/alpha/include/cpu.h:1.74 Mon Apr 28 20:23:11 2008 +++ src/sys/arch/alpha/include/cpu.h Sun Dec 26 18:00:41 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.74 2008/04/28 20:23:11 martin Exp $ */ +/* $NetBSD: cpu.h,v 1.75 2010/12/26 18:00:41 he Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc. @@ -120,10 +120,12 @@ #include machine/alpha_cpu.h -#ifdef _KERNEL +#if defined(_KERNEL) || defined(_KMEMUSER) #include sys/cpu_data.h +#ifndef _KMEMUSER #include sys/cctr.h #include machine/frame.h +#endif /* * Machine check information. @@ -145,6 +147,7 @@ */ struct lwp *ci_curlwp; /* current owner of the processor */ struct cpu_data ci_data; /* MI per-cpu data */ +#ifndef _KMEMUSER struct cctr_state ci_cc; /* cycle counter state */ struct cpu_info *ci_next; /* next cpu_info structure */ int ci_mtx_count; @@ -165,8 +168,13 @@ volatile u_long ci_flags; /* flags; see below */ volatile u_long ci_ipis; /* interprocessor interrupts pending */ #endif +#endif /* _KMEMUSER */ }; +#endif /* _KERNEL || _KMEMUSER */ + +#if defined(_KERNEL) + #define CPUF_PRIMARY 0x01 /* CPU is primary CPU */ #define CPUF_PRESENT 0x02 /* CPU is present */ #define CPUF_RUNNING 0x04 /* CPU is running */