]> git.hungrycats.org Git - linux/commit
[PATCH] ppc32: add "indirect" DCR access, pass 2
authorAndrew Morton <akpm@osdl.org>
Thu, 3 Jun 2004 00:58:14 +0000 (17:58 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Thu, 3 Jun 2004 00:58:14 +0000 (17:58 -0700)
commitb5f6a5b134c00cebfcf6916fd34561e7814fa956
tree059f39ad1699c0d1b01494f3013b29ab17ffd1c8
parent114b0865dff32dd82a73d345a3c1907015d08d1f
[PATCH] ppc32: add "indirect" DCR access, pass 2

From: Matt Porter <mporter@kernel.crashing.org>

DCR number is encoded in mfdcr/mtdcr command itself and this prevents easy
DCR access when register number is not known on compile time.  This patch
adds __mfdcr & __mtdcr helpers which use pre-generated mfdcr/mtdcr
sequences for all possible DCR numbers.  We also use GCC extension
__builtin_constant_p to optimize cases when DCR number is in fact known
during compilation.

Signed-off-by: Eugene Surovegin <ebs@ebshome.net>
Signed-off-by: Matt Porter <mporter@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/ppc/syslib/Makefile
arch/ppc/syslib/dcr.S [new file with mode: 0644]
include/asm-ppc/reg_booke.h