diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2008-12-18 14:13:22 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2008-12-20 22:21:15 -0500 |
commit | 6d2170be4561293a6aa821c773687bd3f18e8206 (patch) | |
tree | b267fb2405c6029dcc7958c5786699741064e43f /arch/powerpc/sysdev/dcr-low.S | |
parent | fecba96268fc48ab9b4a016356a8f2371df25e64 (diff) |
powerpc/4xx: Extended DCR support v2
This adds supports to the "extended" DCR addressing via the indirect
mfdcrx/mtdcrx instructions supported by some 4xx cores (440H6 and
later).
I enabled the feature for now only on AMCC 460 chips.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Acked-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/sysdev/dcr-low.S')
-rw-r--r-- | arch/powerpc/sysdev/dcr-low.S | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/powerpc/sysdev/dcr-low.S b/arch/powerpc/sysdev/dcr-low.S index 2078f39e2f17..d3098ef1404a 100644 --- a/arch/powerpc/sysdev/dcr-low.S +++ b/arch/powerpc/sysdev/dcr-low.S | |||
@@ -11,14 +11,20 @@ | |||
11 | 11 | ||
12 | #include <asm/ppc_asm.h> | 12 | #include <asm/ppc_asm.h> |
13 | #include <asm/processor.h> | 13 | #include <asm/processor.h> |
14 | #include <asm/bug.h> | ||
14 | 15 | ||
15 | #define DCR_ACCESS_PROLOG(table) \ | 16 | #define DCR_ACCESS_PROLOG(table) \ |
17 | cmpli cr0,r3,1024; \ | ||
16 | rlwinm r3,r3,4,18,27; \ | 18 | rlwinm r3,r3,4,18,27; \ |
17 | lis r5,table@h; \ | 19 | lis r5,table@h; \ |
18 | ori r5,r5,table@l; \ | 20 | ori r5,r5,table@l; \ |
19 | add r3,r3,r5; \ | 21 | add r3,r3,r5; \ |
22 | bge- 1f; \ | ||
20 | mtctr r3; \ | 23 | mtctr r3; \ |
21 | bctr | 24 | bctr; \ |
25 | 1: trap; \ | ||
26 | EMIT_BUG_ENTRY 1b,__FILE__,__LINE__,0; \ | ||
27 | blr | ||
22 | 28 | ||
23 | _GLOBAL(__mfdcr) | 29 | _GLOBAL(__mfdcr) |
24 | DCR_ACCESS_PROLOG(__mfdcr_table) | 30 | DCR_ACCESS_PROLOG(__mfdcr_table) |