Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/arm/arm32 Use the armreg_pfr?_read inlines.



details:   https://anonhg.NetBSD.org/src/rev/4f56d8869a3b
branches:  trunk
changeset: 787340:4f56d8869a3b
user:      matt <matt%NetBSD.org@localhost>
date:      Wed Jun 12 00:44:39 2013 +0000

description:
Use the armreg_pfr?_read inlines.

diffstat:

 sys/arch/arm/arm32/cpu.c |  15 ++++++---------
 1 files changed, 6 insertions(+), 9 deletions(-)

diffs (41 lines):

diff -r 9459c8f186f2 -r 4f56d8869a3b sys/arch/arm/arm32/cpu.c
--- a/sys/arch/arm/arm32/cpu.c  Wed Jun 12 00:35:34 2013 +0000
+++ b/sys/arch/arm/arm32/cpu.c  Wed Jun 12 00:44:39 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.c,v 1.94 2013/05/19 15:42:23 rkujawa Exp $ */
+/*     $NetBSD: cpu.c,v 1.95 2013/06/12 00:44:39 matt Exp $    */
 
 /*
  * Copyright (c) 1995 Mark Brinicombe.
@@ -46,7 +46,7 @@
 
 #include <sys/param.h>
 
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.94 2013/05/19 15:42:23 rkujawa Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.95 2013/06/12 00:44:39 matt Exp $");
 
 #include <sys/systm.h>
 #include <sys/conf.h>
@@ -579,18 +579,15 @@
        }
 }
 
-u_int cpu_pfr(int num)
+u_int
+cpu_pfr(int num)
 {
        u_int feat;
 
        switch (num) {
-       case 0:
-               __asm __volatile("mrc p15, 0, %0, c0, c1, 0"
-                   : "=r" (feat));
+       case 0: feat = armreg_pfr0_read();
                break;
-       case 1:
-               __asm __volatile("mrc p15, 0, %0, c0, c1, 1"
-                  : "=r" (feat));
+       case 1: feat = armreg_pfr1_read();
                break;
        default:
                panic("Processor Feature Register %d not implemented", num);



Home | Main Index | Thread Index | Old Index