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.
This commit is contained in:
Svatopluk Kraus 2016-02-19 09:23:32 +00:00
parent 2919c53c63
commit 08674c4573
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=295801
7 changed files with 16 additions and 20 deletions

View file

@ -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");

View file

@ -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>

View file

@ -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$");

View file

@ -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$");

View file

@ -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

View file

@ -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; /* compatibility with v6 */
* 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 */

View file

@ -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_ */