diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2005-07-14 05:42:32 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2005-10-29 14:31:52 -0400 |
commit | 7e35952baa9d7424dfb95ca8aff7239a1f6ec011 (patch) | |
tree | 6412561c7dddfcc903491be1d6bb784646e2e3a6 /include/asm-mips | |
parent | a0c3a5b5a84df11cf6a44fc04cb6f7c0525123a8 (diff) |
Move Origin crapola into a machine-specific header file.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'include/asm-mips')
-rw-r--r-- | include/asm-mips/mach-generic/kernel-entry-init.h | 25 | ||||
-rw-r--r-- | include/asm-mips/mach-ip27/kernel-entry-init.h | 52 |
2 files changed, 77 insertions, 0 deletions
diff --git a/include/asm-mips/mach-generic/kernel-entry-init.h b/include/asm-mips/mach-generic/kernel-entry-init.h new file mode 100644 index 000000000000..7e66505fa574 --- /dev/null +++ b/include/asm-mips/mach-generic/kernel-entry-init.h | |||
@@ -0,0 +1,25 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * Copyright (C) 2005 Embedded Alley Solutions, Inc | ||
7 | * Copyright (C) 2005 Ralf Baechle (ralf@linux-mips.org) | ||
8 | */ | ||
9 | #ifndef __ASM_MACH_GENERIC_KERNEL_ENTRY_H | ||
10 | #define __ASM_MACH_GENERIC_KERNEL_ENTRY_H | ||
11 | |||
12 | /* Intentionally empty macro, used in head.S. Override in | ||
13 | * arch/mips/mach-xxx/kernel-entry-init.h when necessary. | ||
14 | */ | ||
15 | .macro kernel_entry_setup | ||
16 | .endm | ||
17 | |||
18 | /* | ||
19 | * Do SMP slave processor setup necessary before we can savely execute C code. | ||
20 | */ | ||
21 | .macro smp_slave_setup | ||
22 | .endm | ||
23 | |||
24 | |||
25 | #endif /* __ASM_MACH_GENERIC_KERNEL_ENTRY_H */ | ||
diff --git a/include/asm-mips/mach-ip27/kernel-entry-init.h b/include/asm-mips/mach-ip27/kernel-entry-init.h new file mode 100644 index 000000000000..c1a10314b317 --- /dev/null +++ b/include/asm-mips/mach-ip27/kernel-entry-init.h | |||
@@ -0,0 +1,52 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * Copyright (C) 2000 Silicon Graphics, Inc. | ||
7 | * Copyright (C) 2005 Ralf Baechle <ralf@linux-mips.org> | ||
8 | */ | ||
9 | #ifndef __ASM_MACH_IP27_KERNEL_ENTRY_H | ||
10 | #define __ASM_MACH_IP27_KERNEL_ENTRY_H | ||
11 | |||
12 | #include <asm/sn/addrs.h> | ||
13 | #include <asm/sn/sn0/hubni.h> | ||
14 | #include <asm/sn/klkernvars.h> | ||
15 | |||
16 | /* | ||
17 | * Returns the local nasid into res. | ||
18 | */ | ||
19 | .macro GET_NASID_ASM res | ||
20 | dli \res, LOCAL_HUB_ADDR(NI_STATUS_REV_ID) | ||
21 | ld \res, (\res) | ||
22 | and \res, NSRI_NODEID_MASK | ||
23 | dsrl \res, NSRI_NODEID_SHFT | ||
24 | .endm | ||
25 | |||
26 | /* | ||
27 | * Intentionally empty macro, used in head.S. Override in | ||
28 | * arch/mips/mach-xxx/kernel-entry-init.h when necessary. | ||
29 | */ | ||
30 | .macro kernel_entry_setup | ||
31 | GET_NASID_ASM t1 | ||
32 | move t2, t1 # text and data are here | ||
33 | MAPPED_KERNEL_SETUP_TLB | ||
34 | .endm | ||
35 | |||
36 | /* | ||
37 | * Do SMP slave processor setup necessary before we can savely execute C code. | ||
38 | */ | ||
39 | .macro smp_slave_setup | ||
40 | GET_NASID_ASM t1 | ||
41 | dli t0, KLDIR_OFFSET + (KLI_KERN_VARS * KLDIR_ENT_SIZE) + \ | ||
42 | KLDIR_OFF_POINTER + CAC_BASE | ||
43 | dsll t1, NASID_SHFT | ||
44 | or t0, t0, t1 | ||
45 | ld t0, 0(t0) # t0 points to kern_vars struct | ||
46 | lh t1, KV_RO_NASID_OFFSET(t0) | ||
47 | lh t2, KV_RW_NASID_OFFSET(t0) | ||
48 | MAPPED_KERNEL_SETUP_TLB | ||
49 | ARC64_TWIDDLE_PC | ||
50 | .endm | ||
51 | |||
52 | #endif /* __ASM_MACH_IP27_KERNEL_ENTRY_H */ | ||