s:aarch64/cpufunc.h:arm/cpufunc.h:

a baby step in the grand arm header unification challenge
This commit is contained in:
skrll 2020-12-11 18:03:33 +00:00
parent d00c08ec75
commit cde0ef3d27
17 changed files with 62 additions and 45 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: aarch64_reboot.c,v 1.3 2018/11/09 04:05:27 mrg Exp $ */
/* $NetBSD: aarch64_reboot.c,v 1.4 2020/12/11 18:03:33 skrll Exp $ */
/*
* Copyright (c) 2002, 2003, 2005 Genetec Corporation. All rights reserved.
@ -122,7 +122,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: aarch64_reboot.c,v 1.3 2018/11/09 04:05:27 mrg Exp $");
__KERNEL_RCSID(0, "$NetBSD: aarch64_reboot.c,v 1.4 2020/12/11 18:03:33 skrll Exp $");
#include <sys/param.h>
#include <sys/device.h>
@ -136,7 +136,8 @@ __KERNEL_RCSID(0, "$NetBSD: aarch64_reboot.c,v 1.3 2018/11/09 04:05:27 mrg Exp $
#include <aarch64/machdep.h>
#include <aarch64/armreg.h>
#include <aarch64/locore.h>
#include <aarch64/cpufunc.h>
#include <arm/cpufunc.h>
void (*cpu_reset_address0)(void);
void (*cpu_reset_address)(void);

View File

@ -1,4 +1,4 @@
/* $NetBSD: cpu.c,v 1.56 2020/10/10 08:22:57 jmcneill Exp $ */
/* $NetBSD: cpu.c,v 1.57 2020/12/11 18:03:33 skrll Exp $ */
/*
* Copyright (c) 2017 Ryo Shimizu <ryo@nerv.org>
@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(1, "$NetBSD: cpu.c,v 1.56 2020/10/10 08:22:57 jmcneill Exp $");
__KERNEL_RCSID(1, "$NetBSD: cpu.c,v 1.57 2020/12/11 18:03:33 skrll Exp $");
#include "locators.h"
#include "opt_arm_debug.h"
@ -52,10 +52,10 @@ __KERNEL_RCSID(1, "$NetBSD: cpu.c,v 1.56 2020/10/10 08:22:57 jmcneill Exp $");
#include <aarch64/armreg.h>
#include <aarch64/cpu.h>
#include <aarch64/cpufunc.h>
#include <aarch64/cpu_counter.h>
#include <aarch64/machdep.h>
#include <arm/cpufunc.h>
#include <arm/cpu_topology.h>
#ifdef FDT
#include <arm/fdt/arm_fdtvar.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: db_disasm.c,v 1.10 2020/07/09 23:43:41 ryo Exp $ */
/* $NetBSD: db_disasm.c,v 1.11 2020/12/11 18:03:33 skrll Exp $ */
/*
* Copyright (c) 2017 Ryo Shimizu <ryo@nerv.org>
@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: db_disasm.c,v 1.10 2020/07/09 23:43:41 ryo Exp $");
__KERNEL_RCSID(0, "$NetBSD: db_disasm.c,v 1.11 2020/12/11 18:03:33 skrll Exp $");
#ifdef _KERNEL_OPT
#include "opt_compat_netbsd32.h"
@ -41,10 +41,11 @@ __KERNEL_RCSID(0, "$NetBSD: db_disasm.c,v 1.10 2020/07/09 23:43:41 ryo Exp $");
#include <ddb/db_access.h>
#include <ddb/db_user.h>
#include <aarch64/cpufunc.h>
#include <aarch64/machdep.h>
#include <arch/aarch64/aarch64/disasm.h>
#include <arm/cpufunc.h>
static uint32_t
db_disasm_readword(uintptr_t address)
{

View File

@ -1,4 +1,4 @@
/* $NetBSD: db_interface.c,v 1.10 2020/09/14 10:53:02 ryo Exp $ */
/* $NetBSD: db_interface.c,v 1.11 2020/12/11 18:03:33 skrll Exp $ */
/*
* Copyright (c) 2017 Ryo Shimizu <ryo@nerv.org>
@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.10 2020/09/14 10:53:02 ryo Exp $");
__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.11 2020/12/11 18:03:33 skrll Exp $");
#include <sys/param.h>
#include <sys/types.h>
@ -38,7 +38,8 @@ __KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.10 2020/09/14 10:53:02 ryo Exp $"
#include <aarch64/db_machdep.h>
#include <aarch64/machdep.h>
#include <aarch64/pmap.h>
#include <aarch64/cpufunc.h>
#include <arm/cpufunc.h>
#include <ddb/db_access.h>
#include <ddb/db_command.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: db_machdep.c,v 1.29 2020/12/03 07:45:51 skrll Exp $ */
/* $NetBSD: db_machdep.c,v 1.30 2020/12/11 18:03:33 skrll Exp $ */
/*-
* Copyright (c) 2014 The NetBSD Foundation, Inc.
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: db_machdep.c,v 1.29 2020/12/03 07:45:51 skrll Exp $");
__KERNEL_RCSID(0, "$NetBSD: db_machdep.c,v 1.30 2020/12/11 18:03:33 skrll Exp $");
#ifdef _KERNEL_OPT
#include "opt_compat_netbsd32.h"
@ -52,6 +52,8 @@ __KERNEL_RCSID(0, "$NetBSD: db_machdep.c,v 1.29 2020/12/03 07:45:51 skrll Exp $"
#include <aarch64/locore.h>
#include <aarch64/pmap.h>
#include <arm/cpufunc.h>
#include <ddb/db_access.h>
#include <ddb/db_command.h>
#include <ddb/db_output.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: db_trace.c,v 1.12 2020/06/27 00:43:38 rin Exp $ */
/* $NetBSD: db_trace.c,v 1.13 2020/12/11 18:03:33 skrll Exp $ */
/*
* Copyright (c) 2017 Ryo Shimizu <ryo@nerv.org>
@ -28,17 +28,18 @@
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.12 2020/06/27 00:43:38 rin Exp $");
__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.13 2020/12/11 18:03:33 skrll Exp $");
#include <sys/param.h>
#include <sys/proc.h>
#include <aarch64/cpufunc.h>
#include <aarch64/db_machdep.h>
#include <aarch64/machdep.h>
#include <aarch64/armreg.h>
#include <aarch64/vmparam.h>
#include <arm/cpufunc.h>
#include <uvm/uvm_extern.h>
#include <ddb/db_access.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: exec_machdep.c,v 1.8 2020/10/13 07:04:49 rin Exp $ */
/* $NetBSD: exec_machdep.c,v 1.9 2020/12/11 18:03:33 skrll Exp $ */
/*-
* Copyright (c) 2014 The NetBSD Foundation, Inc.
@ -31,7 +31,7 @@
#include <sys/cdefs.h>
__KERNEL_RCSID(1, "$NetBSD: exec_machdep.c,v 1.8 2020/10/13 07:04:49 rin Exp $");
__KERNEL_RCSID(1, "$NetBSD: exec_machdep.c,v 1.9 2020/12/11 18:03:33 skrll Exp $");
#include "opt_compat_netbsd.h"
#include "opt_compat_netbsd32.h"
@ -52,10 +52,11 @@ __KERNEL_RCSID(1, "$NetBSD: exec_machdep.c,v 1.8 2020/10/13 07:04:49 rin Exp $")
#endif
#include <aarch64/armreg.h>
#include <aarch64/cpufunc.h>
#include <aarch64/frame.h>
#include <aarch64/machdep.h>
#include <arm/cpufunc.h>
#if EXEC_ELF64
int
aarch64_netbsd_elf64_probe(struct lwp *l, struct exec_package *epp, void *eh0,

View File

@ -1,4 +1,4 @@
/* $NetBSD: fault.c,v 1.20 2020/10/15 22:30:34 rin Exp $ */
/* $NetBSD: fault.c,v 1.21 2020/12/11 18:03:33 skrll Exp $ */
/*
* Copyright (c) 2017 Ryo Shimizu <ryo@nerv.org>
@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: fault.c,v 1.20 2020/10/15 22:30:34 rin Exp $");
__KERNEL_RCSID(0, "$NetBSD: fault.c,v 1.21 2020/12/11 18:03:33 skrll Exp $");
#include "opt_compat_netbsd32.h"
#include "opt_ddb.h"
@ -40,12 +40,13 @@ __KERNEL_RCSID(0, "$NetBSD: fault.c,v 1.20 2020/10/15 22:30:34 rin Exp $");
#include <uvm/uvm.h>
#include <aarch64/cpufunc.h>
#include <aarch64/frame.h>
#include <aarch64/machdep.h>
#include <aarch64/armreg.h>
#include <aarch64/db_machdep.h>
#include <arm/cpufunc.h>
UVMHIST_DECL(pmaphist);
const char * const fault_status_code[] = {

View File

@ -1,4 +1,4 @@
/* $NetBSD: fpu.c,v 1.10 2020/10/22 07:31:15 skrll Exp $ */
/* $NetBSD: fpu.c,v 1.11 2020/12/11 18:03:33 skrll Exp $ */
/*-
* Copyright (c) 2014 The NetBSD Foundation, Inc.
@ -31,7 +31,7 @@
#include <sys/cdefs.h>
__KERNEL_RCSID(1, "$NetBSD: fpu.c,v 1.10 2020/10/22 07:31:15 skrll Exp $");
__KERNEL_RCSID(1, "$NetBSD: fpu.c,v 1.11 2020/12/11 18:03:33 skrll Exp $");
#include <sys/param.h>
#include <sys/types.h>
@ -40,6 +40,7 @@ __KERNEL_RCSID(1, "$NetBSD: fpu.c,v 1.10 2020/10/22 07:31:15 skrll Exp $");
#include <sys/lwp.h>
#include <sys/evcnt.h>
#include <arm/cpufunc.h>
#include <arm/fpu.h>
#include <arm/cpufunc.h>

View File

@ -1,4 +1,4 @@
# $NetBSD: genassym.cf,v 1.32 2020/11/10 07:51:19 skrll Exp $
# $NetBSD: genassym.cf,v 1.33 2020/12/11 18:03:33 skrll Exp $
#-
# Copyright (c) 2014 The NetBSD Foundation, Inc.
# All rights reserved.
@ -56,9 +56,10 @@ include <arm/bus_defs.h>
include <aarch64/vmparam.h>
include <aarch64/frame.h>
include <aarch64/armreg.h>
include <aarch64/cpufunc.h>
include <aarch64/pte.h>
include <arm/cpufunc.h>
define __HAVE_FAST_SOFTINTS 1
#ifdef __HAVE_PIC_FAST_SOFTINTS

View File

@ -1,4 +1,4 @@
/* $NetBSD: kobj_machdep.c,v 1.5 2020/09/14 17:14:12 ryo Exp $ */
/* $NetBSD: kobj_machdep.c,v 1.6 2020/12/11 18:03:33 skrll Exp $ */
/*
* Copyright (c) 2018 Ryo Shimizu <ryo@nerv.org>
@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: kobj_machdep.c,v 1.5 2020/09/14 17:14:12 ryo Exp $");
__KERNEL_RCSID(0, "$NetBSD: kobj_machdep.c,v 1.6 2020/12/11 18:03:33 skrll Exp $");
#define ELFSIZE ARCH_ELFSIZE
@ -43,7 +43,7 @@ __KERNEL_RCSID(0, "$NetBSD: kobj_machdep.c,v 1.5 2020/09/14 17:14:12 ryo Exp $")
#include <sys/tree.h>
#include <sys/xcall.h>
#include <aarch64/cpufunc.h>
#include <arm/cpufunc.h>
/* #define KOBJ_MACHDEP_DEBUG */

View File

@ -1,4 +1,4 @@
/* $NetBSD: netbsd32_machdep.c,v 1.16 2020/10/15 23:10:06 rin Exp $ */
/* $NetBSD: netbsd32_machdep.c,v 1.17 2020/12/11 18:03:33 skrll Exp $ */
/*
* Copyright (c) 2018 Ryo Shimizu <ryo@nerv.org>
@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.16 2020/10/15 23:10:06 rin Exp $");
__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.17 2020/12/11 18:03:33 skrll Exp $");
#if defined(_KERNEL_OPT)
#include "opt_compat_netbsd.h"
@ -50,11 +50,12 @@ __KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.16 2020/10/15 23:10:06 rin Ex
#include <compat/netbsd32/netbsd32_syscallargs.h>
#include <aarch64/armreg.h>
#include <aarch64/cpufunc.h>
#include <aarch64/frame.h>
#include <aarch64/machdep.h>
#include <aarch64/userret.h>
#include <arm/cpufunc.h>
const char machine32[] = MACHINE;
const char machine_arch32[] = MACHINE32_ARCH;

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmap.c,v 1.96 2020/11/10 07:51:19 skrll Exp $ */
/* $NetBSD: pmap.c,v 1.97 2020/12/11 18:03:33 skrll Exp $ */
/*
* Copyright (c) 2017 Ryo Shimizu <ryo@nerv.org>
@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.96 2020/11/10 07:51:19 skrll Exp $");
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.97 2020/12/11 18:03:33 skrll Exp $");
#include "opt_arm_debug.h"
#include "opt_ddb.h"
@ -51,7 +51,6 @@ __KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.96 2020/11/10 07:51:19 skrll Exp $");
#include <aarch64/pmap.h>
#include <aarch64/pte.h>
#include <aarch64/armreg.h>
#include <aarch64/cpufunc.h>
#include <aarch64/locore.h>
#include <aarch64/machdep.h>
#ifdef DDB
@ -59,6 +58,8 @@ __KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.96 2020/11/10 07:51:19 skrll Exp $");
#include <ddb/db_access.h>
#endif
#include <arm/cpufunc.h>
//#define PMAP_PV_DEBUG
#ifdef VERBOSE_INIT_ARM

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmapboot.c,v 1.13 2020/12/04 08:24:41 skrll Exp $ */
/* $NetBSD: pmapboot.c,v 1.14 2020/12/11 18:03:33 skrll Exp $ */
/*
* Copyright (c) 2018 Ryo Shimizu <ryo@nerv.org>
@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: pmapboot.c,v 1.13 2020/12/04 08:24:41 skrll Exp $");
__KERNEL_RCSID(0, "$NetBSD: pmapboot.c,v 1.14 2020/12/11 18:03:33 skrll Exp $");
#include "opt_arm_debug.h"
#include "opt_ddb.h"
@ -43,11 +43,12 @@ __KERNEL_RCSID(0, "$NetBSD: pmapboot.c,v 1.13 2020/12/04 08:24:41 skrll Exp $");
#include <arm/cpufunc.h>
#include <aarch64/armreg.h>
#include <aarch64/cpufunc.h>
#include <aarch64/machdep.h>
#include <aarch64/pmap.h>
#include <aarch64/pte.h>
#include <arm/cpufunc.h>
#define OPTIMIZE_TLB_CONTIG
static void

View File

@ -1,4 +1,4 @@
/* $NetBSD: trap.c,v 1.40 2020/10/22 07:31:15 skrll Exp $ */
/* $NetBSD: trap.c,v 1.41 2020/12/11 18:03:33 skrll Exp $ */
/*-
* Copyright (c) 2014 The NetBSD Foundation, Inc.
@ -31,7 +31,7 @@
#include <sys/cdefs.h>
__KERNEL_RCSID(1, "$NetBSD: trap.c,v 1.40 2020/10/22 07:31:15 skrll Exp $");
__KERNEL_RCSID(1, "$NetBSD: trap.c,v 1.41 2020/12/11 18:03:33 skrll Exp $");
#include "opt_arm_intr_impl.h"
#include "opt_compat_netbsd32.h"
@ -71,6 +71,8 @@ __KERNEL_RCSID(1, "$NetBSD: trap.c,v 1.40 2020/10/22 07:31:15 skrll Exp $");
#include <aarch64/armreg.h>
#include <aarch64/locore.h>
#include <arm/cpufunc.h>
#ifdef KDB
#include <machine/db_machdep.h>
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: asan.h,v 1.15 2020/11/26 08:25:01 skrll Exp $ */
/* $NetBSD: asan.h,v 1.16 2020/12/11 18:03:33 skrll Exp $ */
/*
* Copyright (c) 2018-2020 Maxime Villard, m00nbsd.net
@ -35,10 +35,11 @@
#include <aarch64/pmap.h>
#include <aarch64/vmparam.h>
#include <aarch64/cpufunc.h>
#include <aarch64/armreg.h>
#include <aarch64/machdep.h>
#include <arm/cpufunc.h>
#define __MD_VIRTUAL_SHIFT 48 /* 49bit address space, cut half */
#define __MD_KERNMEM_BASE 0xFFFF000000000000 /* kern mem base address */

View File

@ -1,4 +1,4 @@
/* $NetBSD: sljit_machdep.h,v 1.2 2018/12/02 20:54:44 alnsn Exp $ */
/* $NetBSD: sljit_machdep.h,v 1.3 2020/12/11 18:03:33 skrll Exp $ */
/*-
* Copyright (c) 2014 Alexander Nasonov.
@ -33,7 +33,8 @@
#ifdef _KERNEL
#include <machine/types.h>
#include <aarch64/cpufunc.h>
#include <arm/cpufunc.h>
#else
#include <stddef.h>
#include <stdint.h>