Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/evbarm/marvell Use armreg_ttbr_read() instead of __...
details: https://anonhg.NetBSD.org/src/rev/4519ce6049c1
branches: trunk
changeset: 331904:4519ce6049c1
user: kiyohara <kiyohara%NetBSD.org@localhost>
date: Sat Aug 30 13:15:52 2014 +0000
description:
Use armreg_ttbr_read() instead of __asm("mrc ...").
diffstat:
sys/arch/evbarm/marvell/marvell_machdep.c | 12 ++++--------
1 files changed, 4 insertions(+), 8 deletions(-)
diffs (36 lines):
diff -r 152e35e46451 -r 4519ce6049c1 sys/arch/evbarm/marvell/marvell_machdep.c
--- a/sys/arch/evbarm/marvell/marvell_machdep.c Sat Aug 30 13:09:27 2014 +0000
+++ b/sys/arch/evbarm/marvell/marvell_machdep.c Sat Aug 30 13:15:52 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: marvell_machdep.c,v 1.28 2014/03/15 13:48:44 kiyohara Exp $ */
+/* $NetBSD: marvell_machdep.c,v 1.29 2014/08/30 13:15:52 kiyohara Exp $ */
/*
* Copyright (c) 2007, 2008, 2010 KIYOHARA Takashi
* All rights reserved.
@@ -25,7 +25,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: marvell_machdep.c,v 1.28 2014/03/15 13:48:44 kiyohara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: marvell_machdep.c,v 1.29 2014/08/30 13:15:52 kiyohara Exp $");
#include "opt_evbarm_boardtype.h"
#include "opt_ddb.h"
@@ -171,15 +171,11 @@
#endif
-static inline
-pd_entry_t *
+static inline pd_entry_t *
read_ttb(void)
{
- long ttb;
- __asm volatile("mrc p15, 0, %0, c2, c0, 0" : "=r" (ttb));
-
- return (pd_entry_t *)(ttb & ~((1<<14)-1));
+ return (pd_entry_t *)(armreg_ttbr_read() & ~((1<<14)-1));
}
/*
Home |
Main Index |
Thread Index |
Old Index