Date: Fri, 19 Feb 2016 09:23:32 +0000 (UTC) From: Svatopluk Kraus <skra@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295801 - in head: lib/libkvm sys/arm/arm sys/arm/include Message-ID: <201602190923.u1J9NWma027527@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: skra Date: Fri Feb 19 09:23:32 2016 New Revision: 295801 URL: https://svnweb.freebsd.org/changeset/base/295801 Log: Rename pte.h to pte-v4.h and start including directly either pte-v4.h or pte-v6.h in files which needs it. There are quite internal definitions in pte-v4.h and pte-v6.h headers specific for corresponding pmap implementation. These headers should be included only in very few files and an intention is to not hide for which implementation such files are. Further, sys/arm/arm/elf_trampoline.c is an example of file which uses armv4 like pmap implementation for both armv4 and armv6 platforms. This is another reason why pte.h which includes specific header according to __ARM_ARCH is not created. Added: head/sys/arm/include/pte-v4.h - copied, changed from r295800, head/sys/arm/include/pte.h Deleted: head/sys/arm/include/pte.h Modified: head/lib/libkvm/kvm_arm.h head/sys/arm/arm/elf_trampoline.c head/sys/arm/arm/locore-v4.S head/sys/arm/arm/locore-v6.S head/sys/arm/include/pmap-v4.h head/sys/arm/include/pte-v6.h Modified: head/lib/libkvm/kvm_arm.h ============================================================================== --- head/lib/libkvm/kvm_arm.h Fri Feb 19 08:42:13 2016 (r295800) +++ head/lib/libkvm/kvm_arm.h Fri Feb 19 09:23:32 2016 (r295801) @@ -29,10 +29,6 @@ #ifndef __KVM_ARM_H__ #define __KVM_ARM_H__ -#ifdef __arm__ -#include <machine/pte.h> -#endif - typedef uint32_t arm_physaddr_t; typedef uint32_t arm_pd_entry_t; typedef uint32_t arm_pt_entry_t; @@ -75,6 +71,12 @@ typedef uint32_t arm_pt_entry_t; #ifdef __arm__ #include <machine/acle-compat.h> +#if __ARM_ARCH >= 6 +#include <machine/pte-v6.h> +#else +#include <machine/pte-v4.h> +#endif + _Static_assert(PAGE_SHIFT == ARM_PAGE_SHIFT, "PAGE_SHIFT mismatch"); _Static_assert(PAGE_SIZE == ARM_PAGE_SIZE, "PAGE_SIZE mismatch"); _Static_assert(PAGE_MASK == ARM_PAGE_MASK, "PAGE_MASK mismatch"); Modified: head/sys/arm/arm/elf_trampoline.c ============================================================================== --- head/sys/arm/arm/elf_trampoline.c Fri Feb 19 08:42:13 2016 (r295800) +++ head/sys/arm/arm/elf_trampoline.c Fri Feb 19 09:23:32 2016 (r295801) @@ -36,7 +36,7 @@ __FBSDID("$FreeBSD$"); #include <sys/elf32.h> #include <sys/inflate.h> #include <machine/elf.h> -#include <machine/pte.h> +#include <machine/pte-v4.h> #include <machine/cpufunc.h> #include <machine/armreg.h> Modified: head/sys/arm/arm/locore-v4.S ============================================================================== --- head/sys/arm/arm/locore-v4.S Fri Feb 19 08:42:13 2016 (r295800) +++ head/sys/arm/arm/locore-v4.S Fri Feb 19 09:23:32 2016 (r295801) @@ -38,7 +38,7 @@ #include <machine/asm.h> #include <machine/armreg.h> #include <machine/cpuconf.h> -#include <machine/pte.h> +#include <machine/pte-v4.h> __FBSDID("$FreeBSD$"); Modified: head/sys/arm/arm/locore-v6.S ============================================================================== --- head/sys/arm/arm/locore-v6.S Fri Feb 19 08:42:13 2016 (r295800) +++ head/sys/arm/arm/locore-v6.S Fri Feb 19 09:23:32 2016 (r295801) @@ -36,7 +36,7 @@ #include <machine/armreg.h> #include <machine/sysreg.h> #include <machine/cpuconf.h> -#include <machine/pte.h> +#include <machine/pte-v6.h> __FBSDID("$FreeBSD$"); Modified: head/sys/arm/include/pmap-v4.h ============================================================================== --- head/sys/arm/include/pmap-v4.h Fri Feb 19 08:42:13 2016 (r295800) +++ head/sys/arm/include/pmap-v4.h Fri Feb 19 09:23:32 2016 (r295801) @@ -50,7 +50,7 @@ #ifndef _MACHINE_PMAP_V4_H_ #define _MACHINE_PMAP_V4_H_ -#include <machine/pte.h> +#include <machine/pte-v4.h> #include <machine/cpuconf.h> /* * Pte related macros Copied and modified: head/sys/arm/include/pte-v4.h (from r295800, head/sys/arm/include/pte.h) ============================================================================== --- head/sys/arm/include/pte.h Fri Feb 19 08:42:13 2016 (r295800, copy source) +++ head/sys/arm/include/pte-v4.h Fri Feb 19 09:23:32 2016 (r295801) @@ -33,14 +33,9 @@ * * $FreeBSD$ */ -#include <machine/acle-compat.h> -#if __ARM_ARCH >= 6 -#include <machine/pte-v6.h> -#else /* __ARM_ARCH >= 6 */ - -#ifndef _MACHINE_PTE_H_ -#define _MACHINE_PTE_H_ +#ifndef _MACHINE_PTE_V4_H_ +#define _MACHINE_PTE_V4_H_ #ifndef LOCORE typedef uint32_t pd_entry_t; /* page directory entry */ @@ -350,7 +345,6 @@ typedef pt_entry_t pt2_entry_t; /* comp * 1 X 1 1 0 Y Y WT Y Y * 1 X 1 1 1 Y Y WT Y Y */ -#endif /* !_MACHINE_PTE_H_ */ -#endif /* __ARM_ARCH >= 6 */ +#endif /* !_MACHINE_PTE_V4_H_ */ /* End of pte.h */ Modified: head/sys/arm/include/pte-v6.h ============================================================================== --- head/sys/arm/include/pte-v6.h Fri Feb 19 08:42:13 2016 (r295800) +++ head/sys/arm/include/pte-v6.h Fri Feb 19 09:23:32 2016 (r295801) @@ -27,8 +27,8 @@ * $FreeBSD$ */ -#ifndef _MACHINE_PTE_H_ -#define _MACHINE_PTE_H_ +#ifndef _MACHINE_PTE_V6_H_ +#define _MACHINE_PTE_V6_H_ /* * Domain Types for the Domain Access Control Register. @@ -298,4 +298,4 @@ // ----------------------------------------------------------------------------- -#endif /* !_MACHINE_PTE_H_ */ +#endif /* !_MACHINE_PTE_V6_H_ */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201602190923.u1J9NWma027527>