Module Name: src Committed By: christos Date: Sun Jan 24 19:49:35 UTC 2016
Modified Files: src/sys/arch/powerpc/include: frame.h types.h Log Message: expose __register32_t for frame.h To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/arch/powerpc/include/frame.h cvs rdiff -u -r1.53 -r1.54 src/sys/arch/powerpc/include/types.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/powerpc/include/frame.h diff -u src/sys/arch/powerpc/include/frame.h:1.26 src/sys/arch/powerpc/include/frame.h:1.27 --- src/sys/arch/powerpc/include/frame.h:1.26 Fri Feb 28 00:30:24 2014 +++ src/sys/arch/powerpc/include/frame.h Sun Jan 24 14:49:35 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: frame.h,v 1.26 2014/02/28 05:30:24 matt Exp $ */ +/* $NetBSD: frame.h,v 1.27 2016/01/24 19:49:35 christos Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -52,46 +52,46 @@ * Change ordering to cluster together these register_t's. XXX */ struct reg_sans_pc { - register_t r_fixreg[32]; - register_t r_lr; + __register_t r_fixreg[32]; + __register_t r_lr; uint32_t r_cr; uint32_t r_xer; - register_t r_ctr; + __register_t r_ctr; }; #ifdef _LP64 struct reg_sans_pc32 { - register32_t r_fixreg[32]; - register32_t r_lr; + __register32_t r_fixreg[32]; + __register32_t r_lr; uint32_t r_cr; uint32_t r_xer; - register32_t r_ctr; + __register32_t r_ctr; }; #endif struct utrapframe { - register_t fixreg[32]; - register_t lr; + __register_t fixreg[32]; + __register_t lr; int cr; int xer; - register_t ctr; - register_t srr0; - register_t srr1; + __register_t ctr; + __register_t srr0; + __register_t srr1; int vrsave; int mq; int spare; }; struct clockframe { - register_t cf_srr0; - register_t cf_srr1; + __register_t cf_srr0; + __register_t cf_srr1; int cf_idepth; }; #ifdef _LP64 struct clockframe32 { - register32_t cf_srr0; - register32_t cf_srr1; + __register32_t cf_srr0; + __register32_t cf_srr1; int cf_idepth; }; #endif @@ -101,17 +101,17 @@ struct trapframe { struct clockframe tf_cf; uint32_t tf_exc; #if defined(PPC_OEA) || defined(PPC_OEA64) || defined(PPC_OEA64_BRIDGE) - register_t tf_dar; - register_t tf_pad0[2]; + __register_t tf_dar; + __register_t tf_pad0[2]; uint32_t tf_dsisr; uint32_t tf_vrsave; uint32_t tf_mq; uint32_t tf_pad1[1]; #endif #if defined(PPC_BOOKE) || defined(PPC_IBM4XX) - register_t tf_dear; - register_t tf_mcar; - register_t tf_sprg1; + __register_t tf_dear; + __register_t tf_mcar; + __register_t tf_sprg1; uint32_t tf_esr; uint32_t tf_mcsr; uint32_t tf_pid; @@ -125,17 +125,17 @@ struct trapframe32 { struct clockframe32 tf_cf; uint32_t tf_exc; #if defined(PPC_OEA) || defined(PPC_OEA64) || defined(PPC_OEA64_BRIDGE) - register32_t tf_dar; - register32_t tf_pad0[2]; + __register32_t tf_dar; + __register32_t tf_pad0[2]; uint32_t tf_dsisr; uint32_t tf_vrsave; uint32_t tf_mq; uint32_t tf_pad1[1]; #endif #if defined(PPC_BOOKE) || defined(PPC_IBM4XX) - register32_t tf_dear; - register32_t tf_mcar; - register32_t tf_sprg1; + __register32_t tf_dear; + __register32_t tf_mcar; + __register32_t tf_sprg1; uint32_t tf_esr; uint32_t tf_mcsr; uint32_t tf_pid; @@ -153,22 +153,22 @@ struct trapframe32 { #define tf_idepth tf_cf.cf_idepth struct ktrapframe { - register_t ktf_sp; - register_t ktf_lr; + __register_t ktf_sp; + __register_t ktf_lr; struct trapframe ktf_tf; - register_t ktf_cframe_lr; /* for DDB */ + __register_t ktf_cframe_lr; /* for DDB */ }; #if defined(_KERNEL) || defined(_LKM) #ifdef _LP64 struct utrapframe32 { - register32_t fixreg[32]; - register32_t lr; + __register32_t fixreg[32]; + __register32_t lr; int cr; int xer; - register32_t ctr; - register32_t srr0; - register32_t srr1; + __register32_t ctr; + __register32_t srr0; + __register32_t srr1; int vrsave; int mq; int spare; @@ -185,12 +185,12 @@ struct utrapframe32 { #define SFRAMELEN roundup(sizeof(struct switchframe), CALLFRAMELEN) struct switchframe { - register_t sf_sp; - register_t sf_lr; - register_t sf_user_sr; /* VSID on IBM4XX */ - register_t sf_cr; /* why? CR is volatile. */ - register_t sf_fixreg2; - register_t sf_fixreg[19]; /* R13-R31 */ + __register_t sf_sp; + __register_t sf_lr; + __register_t sf_user_sr; /* VSID on IBM4XX */ + __register_t sf_cr; /* why? CR is volatile. */ + __register_t sf_fixreg2; + __register_t sf_fixreg[19]; /* R13-R31 */ }; /* @@ -198,10 +198,10 @@ struct switchframe { */ #define CALLFRAMELEN sizeof(struct callframe) struct callframe { - register_t cf_sp; - register_t cf_lr; - register_t cf_r30; - register_t cf_r31; + __register_t cf_sp; + __register_t cf_lr; + __register_t cf_r30; + __register_t cf_r31; }; #endif /* _POWERPC_FRAME_H_ */ Index: src/sys/arch/powerpc/include/types.h diff -u src/sys/arch/powerpc/include/types.h:1.53 src/sys/arch/powerpc/include/types.h:1.54 --- src/sys/arch/powerpc/include/types.h:1.53 Sat Jan 23 17:31:20 2016 +++ src/sys/arch/powerpc/include/types.h Sun Jan 24 14:49:35 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: types.h,v 1.53 2016/01/23 22:31:20 christos Exp $ */ +/* $NetBSD: types.h,v 1.54 2016/01/24 19:49:35 christos Exp $ */ /*- * Copyright (C) 1995 Wolfgang Solfrank. @@ -38,6 +38,10 @@ #include <sys/featuretest.h> #include <powerpc/int_types.h> +typedef int __cpu_simple_lock_nv_t; +typedef unsigned long __register_t; /* frame.h */ +typedef __uint32_t __register32_t; /* frame.h */ + #if defined(_KERNEL) || defined(_KMEMUSER) || defined(_KERNTYPES) || defined(_STANDALONE) typedef unsigned long paddr_t, vaddr_t; typedef unsigned long psize_t, vsize_t; @@ -51,9 +55,9 @@ typedef unsigned long psize_t, vsize_t; /* * Because lwz etal don't sign extend, it's best to make registers unsigned. */ -typedef unsigned long register_t; +typedef __register_t register_t; +typedef __register32_t register32_t; typedef __uint64_t register64_t; -typedef __uint32_t register32_t; #define PRIxREGISTER "lx" #define PRIxREGISTER64 PRIx64 #define PRIxREGISTER32 PRIx32 @@ -67,9 +71,6 @@ typedef struct label_t { typedef __uint32_t tlb_asid_t; /* for booke */ #endif -typedef int __cpu_simple_lock_nv_t; -typedef unsigned long __register_t; - #define __SIMPLELOCK_LOCKED 1 #define __SIMPLELOCK_UNLOCKED 0