Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm Centralise defines for DEVMAP_{ALIGN, SIZE, ENTRY...
details: https://anonhg.NetBSD.org/src/rev/0454c2b407bc
branches: trunk
changeset: 356986:0454c2b407bc
user: skrll <skrll%NetBSD.org@localhost>
date: Sun Oct 22 20:35:32 2017 +0000
description:
Centralise defines for DEVMAP_{ALIGN,SIZE,ENTRY,ENTRY_END}
diffstat:
sys/arch/arm/include/arm32/pmap.h | 14 +++++++++++++-
sys/arch/arm/nvidia/tegra_platform.c | 16 ++--------------
sys/arch/arm/samsung/exynos_platform.c | 16 ++--------------
sys/arch/arm/sunxi/sunxi_platform.c | 17 ++---------------
sys/arch/arm/vexpress/vexpress_platform.c | 16 ++--------------
5 files changed, 21 insertions(+), 58 deletions(-)
diffs (177 lines):
diff -r 087f9b1fb924 -r 0454c2b407bc sys/arch/arm/include/arm32/pmap.h
--- a/sys/arch/arm/include/arm32/pmap.h Sun Oct 22 18:37:01 2017 +0000
+++ b/sys/arch/arm/include/arm32/pmap.h Sun Oct 22 20:35:32 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.h,v 1.152 2017/08/29 06:28:26 skrll Exp $ */
+/* $NetBSD: pmap.h,v 1.153 2017/10/22 20:35:32 skrll Exp $ */
/*
* Copyright (c) 2002, 2003 Wasabi Systems, Inc.
@@ -213,6 +213,18 @@
int pd_cache; /* cache attributes */
};
+#define DEVMAP_ALIGN(a) ((a) & ~L1_S_OFFSET)
+#define DEVMAP_SIZE(s) roundup2((s), L1_S_SIZE)
+#define DEVMAP_ENTRY(va, pa, sz) \
+ { \
+ .pd_va = DEVMAP_ALIGN(va), \
+ .pd_pa = DEVMAP_ALIGN(pa), \
+ .pd_size = DEVMAP_SIZE(sz), \
+ .pd_prot = VM_PROT_READ|VM_PROT_WRITE, \
+ .pd_cache = PTE_NOCACHE \
+ }
+#define DEVMAP_ENTRY_END { 0 }
+
/*
* The pmap structure itself
*/
diff -r 087f9b1fb924 -r 0454c2b407bc sys/arch/arm/nvidia/tegra_platform.c
--- a/sys/arch/arm/nvidia/tegra_platform.c Sun Oct 22 18:37:01 2017 +0000
+++ b/sys/arch/arm/nvidia/tegra_platform.c Sun Oct 22 20:35:32 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_platform.c,v 1.7 2017/07/20 01:46:15 jmcneill Exp $ */
+/* $NetBSD: tegra_platform.c,v 1.8 2017/10/22 20:35:32 skrll Exp $ */
/*-
* Copyright (c) 2017 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -33,7 +33,7 @@
#include "ukbd.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tegra_platform.c,v 1.7 2017/07/20 01:46:15 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tegra_platform.c,v 1.8 2017/10/22 20:35:32 skrll Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -62,18 +62,6 @@
#define PLLP_OUT0_FREQ 408000000
-#define DEVMAP_ALIGN(a) ((a) & ~L1_S_OFFSET)
-#define DEVMAP_SIZE(s) roundup2((s), L1_S_SIZE)
-#define DEVMAP_ENTRY(va, pa, sz) \
- { \
- .pd_va = DEVMAP_ALIGN(va), \
- .pd_pa = DEVMAP_ALIGN(pa), \
- .pd_size = DEVMAP_SIZE(sz), \
- .pd_prot = VM_PROT_READ|VM_PROT_WRITE, \
- .pd_cache = PTE_NOCACHE \
- }
-#define DEVMAP_ENTRY_END { 0 }
-
static const struct pmap_devmap *
tegra_platform_devmap(void)
{
diff -r 087f9b1fb924 -r 0454c2b407bc sys/arch/arm/samsung/exynos_platform.c
--- a/sys/arch/arm/samsung/exynos_platform.c Sun Oct 22 18:37:01 2017 +0000
+++ b/sys/arch/arm/samsung/exynos_platform.c Sun Oct 22 20:35:32 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: exynos_platform.c,v 1.6 2017/06/20 19:13:34 jmcneill Exp $ */
+/* $NetBSD: exynos_platform.c,v 1.7 2017/10/22 20:35:32 skrll Exp $ */
/*-
* Copyright (c) 2017 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -33,7 +33,7 @@
#include "ukbd.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: exynos_platform.c,v 1.6 2017/06/20 19:13:34 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: exynos_platform.c,v 1.7 2017/10/22 20:35:32 skrll Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -59,18 +59,6 @@
#define EXYNOS5_SWRESET_REG 0x10040400
-#define DEVMAP_ALIGN(a) ((a) & ~L1_S_OFFSET)
-#define DEVMAP_SIZE(s) roundup2((s), L1_S_SIZE)
-#define DEVMAP_ENTRY(va, pa, sz) \
- { \
- .pd_va = DEVMAP_ALIGN(va), \
- .pd_pa = DEVMAP_ALIGN(pa), \
- .pd_size = DEVMAP_SIZE(sz), \
- .pd_prot = VM_PROT_READ|VM_PROT_WRITE, \
- .pd_cache = PTE_NOCACHE \
- }
-#define DEVMAP_ENTRY_END { 0 }
-
static const struct pmap_devmap *
exynos_platform_devmap(void)
{
diff -r 087f9b1fb924 -r 0454c2b407bc sys/arch/arm/sunxi/sunxi_platform.c
--- a/sys/arch/arm/sunxi/sunxi_platform.c Sun Oct 22 18:37:01 2017 +0000
+++ b/sys/arch/arm/sunxi/sunxi_platform.c Sun Oct 22 20:35:32 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sunxi_platform.c,v 1.12 2017/10/21 02:21:30 jmcneill Exp $ */
+/* $NetBSD: sunxi_platform.c,v 1.13 2017/10/22 20:35:32 skrll Exp $ */
/*-
* Copyright (c) 2017 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -31,7 +31,7 @@
#include "opt_fdt_arm.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sunxi_platform.c,v 1.12 2017/10/21 02:21:30 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunxi_platform.c,v 1.13 2017/10/22 20:35:32 skrll Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -89,19 +89,6 @@
#define SUN9I_WDT_MODE 0x18
#define SUN9I_WDT_MODE_EN __BIT(0)
-
-#define DEVMAP_ALIGN(a) ((a) & ~L1_S_OFFSET)
-#define DEVMAP_SIZE(s) roundup2((s), L1_S_SIZE)
-#define DEVMAP_ENTRY(va, pa, sz) \
- { \
- .pd_va = DEVMAP_ALIGN(va), \
- .pd_pa = DEVMAP_ALIGN(pa), \
- .pd_size = DEVMAP_SIZE(sz), \
- .pd_prot = VM_PROT_READ|VM_PROT_WRITE, \
- .pd_cache = PTE_NOCACHE \
- }
-#define DEVMAP_ENTRY_END { 0 }
-
extern struct bus_space armv7_generic_bs_tag;
extern struct bus_space armv7_generic_a4x_bs_tag;
extern struct arm32_bus_dma_tag armv7_generic_dma_tag;
diff -r 087f9b1fb924 -r 0454c2b407bc sys/arch/arm/vexpress/vexpress_platform.c
--- a/sys/arch/arm/vexpress/vexpress_platform.c Sun Oct 22 18:37:01 2017 +0000
+++ b/sys/arch/arm/vexpress/vexpress_platform.c Sun Oct 22 20:35:32 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vexpress_platform.c,v 1.3 2017/06/06 09:56:57 jmcneill Exp $ */
+/* $NetBSD: vexpress_platform.c,v 1.4 2017/10/22 20:35:32 skrll Exp $ */
/*-
* Copyright (c) 2017 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -30,7 +30,7 @@
#include "opt_fdt_arm.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vexpress_platform.c,v 1.3 2017/06/06 09:56:57 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vexpress_platform.c,v 1.4 2017/10/22 20:35:32 skrll Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -61,18 +61,6 @@
"/smb@08000000/motherboard/iofpga@3,00000000/clcd@1f0000"
#define VEXPRESS_REF_FREQ 24000000
-#define DEVMAP_ALIGN(a) ((a) & ~L1_S_OFFSET)
-#define DEVMAP_SIZE(s) roundup2((s), L1_S_SIZE)
-#define DEVMAP_ENTRY(va, pa, sz) \
- { \
- .pd_va = DEVMAP_ALIGN(va), \
- .pd_pa = DEVMAP_ALIGN(pa), \
- .pd_size = DEVMAP_SIZE(sz), \
- .pd_prot = VM_PROT_READ|VM_PROT_WRITE, \
- .pd_cache = PTE_NOCACHE \
- }
-#define DEVMAP_ENTRY_END { 0 }
-
extern struct bus_space armv7_generic_bs_tag;
extern struct bus_space armv7_generic_a4x_bs_tag;
extern struct arm32_bus_dma_tag armv7_generic_dma_tag;
Home |
Main Index |
Thread Index |
Old Index