diff options
author | Paul Mackerras <paulus@samba.org> | 2005-10-19 19:23:26 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2005-10-19 19:23:26 -0400 |
commit | f2783c15007468c14972e2617db51e9affc7fad9 (patch) | |
tree | 6c8f57ee8e5cdaeb810a3ccf7f697576a7df7615 /arch/powerpc/kernel/misc_32.S | |
parent | 03f88e9f7145b03fd0d855918d54a3bf5342ac5e (diff) |
powerpc: Merge time.c and asm/time.h.
We now use the merged time.c for both 32-bit and 64-bit compilation
with ARCH=powerpc, and for ARCH=ppc64, but not for ARCH=ppc32.
This removes setup_default_decr (folds its function into time_init)
and moves wakeup_decrementer into time.c. This also makes an
asm-powerpc/rtc.h.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/misc_32.S')
-rw-r--r-- | arch/powerpc/kernel/misc_32.S | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/misc_32.S b/arch/powerpc/kernel/misc_32.S index 0b0e908b5065..303229b090b8 100644 --- a/arch/powerpc/kernel/misc_32.S +++ b/arch/powerpc/kernel/misc_32.S | |||
@@ -36,6 +36,33 @@ _GLOBAL(__delay) | |||
36 | blr | 36 | blr |
37 | 37 | ||
38 | /* | 38 | /* |
39 | * This returns the high 64 bits of the product of two 64-bit numbers. | ||
40 | */ | ||
41 | _GLOBAL(mulhdu) | ||
42 | cmpwi r6,0 | ||
43 | cmpwi cr1,r3,0 | ||
44 | mr r10,r4 | ||
45 | mulhwu r4,r4,r5 | ||
46 | beq 1f | ||
47 | mulhwu r0,r10,r6 | ||
48 | mullw r7,r10,r5 | ||
49 | addc r7,r0,r7 | ||
50 | addze r4,r4 | ||
51 | 1: beqlr cr1 /* all done if high part of A is 0 */ | ||
52 | mr r10,r3 | ||
53 | mullw r9,r3,r5 | ||
54 | mulhwu r3,r3,r5 | ||
55 | beq 2f | ||
56 | mullw r0,r10,r6 | ||
57 | mulhwu r8,r10,r6 | ||
58 | addc r7,r0,r7 | ||
59 | adde r4,r4,r8 | ||
60 | addze r3,r3 | ||
61 | 2: addc r4,r4,r9 | ||
62 | addze r3,r3 | ||
63 | blr | ||
64 | |||
65 | /* | ||
39 | * Returns (address we're running at) - (address we were linked at) | 66 | * Returns (address we're running at) - (address we were linked at) |
40 | * for use before the text and data are mapped to KERNELBASE. | 67 | * for use before the text and data are mapped to KERNELBASE. |
41 | */ | 68 | */ |