From owner-svn-src-head@freebsd.org Fri Feb 19 09:23:34 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B38C3AAC260; Fri, 19 Feb 2016 09:23:34 +0000 (UTC) (envelope-from skra@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 75F02157B; Fri, 19 Feb 2016 09:23:34 +0000 (UTC) (envelope-from skra@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u1J9NXRw027534; Fri, 19 Feb 2016 09:23:33 GMT (envelope-from skra@FreeBSD.org) Received: (from skra@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u1J9NWma027527; Fri, 19 Feb 2016 09:23:32 GMT (envelope-from skra@FreeBSD.org) Message-Id: <201602190923.u1J9NWma027527@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: skra set sender to skra@FreeBSD.org using -f From: Svatopluk Kraus Date: Fri, 19 Feb 2016 09:23:32 +0000 (UTC) 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 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2016 09:23:34 -0000 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 -#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 +#if __ARM_ARCH >= 6 +#include +#else +#include +#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 #include #include -#include +#include #include #include 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 #include #include -#include +#include __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 #include #include -#include +#include __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 +#include #include /* * 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 -#if __ARM_ARCH >= 6 -#include -#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_ */