···2222#include <asm/page.h>2323#include <asm/mipsregs.h>2424#include <asm/stackframe.h>2525-#ifdef CONFIG_SGI_IP272626-#include <asm/sn/addrs.h>2727-#include <asm/sn/sn0/hubni.h>2828-#include <asm/sn/klkernvars.h>2929-#endif2525+2626+#include <kernel-entry-init.h>30273128 .macro ARC64_TWIDDLE_PC3229#if defined(CONFIG_ARC64) || defined(CONFIG_MAPPED_KERNEL)···3437\@:3538#endif3639 .endm3737-3838-#ifdef CONFIG_SGI_IP273939- /*4040- * outputs the local nasid into res. IP27 stuff.4141- */4242- .macro GET_NASID_ASM res4343- dli \res, LOCAL_HUB_ADDR(NI_STATUS_REV_ID)4444- ld \res, (\res)4545- and \res, NSRI_NODEID_MASK4646- dsrl \res, NSRI_NODEID_SHFT4747- .endm4848-#endif /* CONFIG_SGI_IP27 */49405041 /*5142 * inputs are the text nasid in t1, data nasid in t2.···127142 __INIT128143129144NESTED(kernel_entry, 16, sp) # kernel entry point130130- setup_c0_status_pri131145132132-#ifdef CONFIG_SGI_IP27133133- GET_NASID_ASM t1134134- move t2, t1 # text and data are here135135- MAPPED_KERNEL_SETUP_TLB136136-#endif /* IP27 */146146+ kernel_entry_setup # cpu specific setup147147+148148+ setup_c0_status_pri137149138150 ARC64_TWIDDLE_PC139151···167185 */168186NESTED(smp_bootstrap, 16, sp)169187 setup_c0_status_sec170170-171171-#ifdef CONFIG_SGI_IP27172172- GET_NASID_ASM t1173173- dli t0, KLDIR_OFFSET + (KLI_KERN_VARS * KLDIR_ENT_SIZE) + \174174- KLDIR_OFF_POINTER + CAC_BASE175175- dsll t1, NASID_SHFT176176- or t0, t0, t1177177- ld t0, 0(t0) # t0 points to kern_vars struct178178- lh t1, KV_RO_NASID_OFFSET(t0)179179- lh t2, KV_RW_NASID_OFFSET(t0)180180- MAPPED_KERNEL_SETUP_TLB181181- ARC64_TWIDDLE_PC182182-#endif /* CONFIG_SGI_IP27 */183183-188188+ smp_slave_setup184189 j start_secondary185190 END(smp_bootstrap)186191#endif /* CONFIG_SMP */
+25
include/asm-mips/mach-generic/kernel-entry-init.h
···11+/*22+ * This file is subject to the terms and conditions of the GNU General Public33+ * License. See the file "COPYING" in the main directory of this archive44+ * for more details.55+ *66+ * Copyright (C) 2005 Embedded Alley Solutions, Inc77+ * Copyright (C) 2005 Ralf Baechle (ralf@linux-mips.org)88+ */99+#ifndef __ASM_MACH_GENERIC_KERNEL_ENTRY_H1010+#define __ASM_MACH_GENERIC_KERNEL_ENTRY_H1111+1212+/* Intentionally empty macro, used in head.S. Override in1313+ * arch/mips/mach-xxx/kernel-entry-init.h when necessary.1414+ */1515+.macro kernel_entry_setup1616+.endm1717+1818+/*1919+ * Do SMP slave processor setup necessary before we can savely execute C code.2020+ */2121+ .macro smp_slave_setup2222+ .endm2323+2424+2525+#endif /* __ASM_MACH_GENERIC_KERNEL_ENTRY_H */
+52
include/asm-mips/mach-ip27/kernel-entry-init.h
···11+/*22+ * This file is subject to the terms and conditions of the GNU General Public33+ * License. See the file "COPYING" in the main directory of this archive44+ * for more details.55+ *66+ * Copyright (C) 2000 Silicon Graphics, Inc.77+ * Copyright (C) 2005 Ralf Baechle <ralf@linux-mips.org>88+ */99+#ifndef __ASM_MACH_IP27_KERNEL_ENTRY_H1010+#define __ASM_MACH_IP27_KERNEL_ENTRY_H1111+1212+#include <asm/sn/addrs.h>1313+#include <asm/sn/sn0/hubni.h>1414+#include <asm/sn/klkernvars.h>1515+1616+/*1717+ * Returns the local nasid into res.1818+ */1919+ .macro GET_NASID_ASM res2020+ dli \res, LOCAL_HUB_ADDR(NI_STATUS_REV_ID)2121+ ld \res, (\res)2222+ and \res, NSRI_NODEID_MASK2323+ dsrl \res, NSRI_NODEID_SHFT2424+ .endm2525+2626+/*2727+ * Intentionally empty macro, used in head.S. Override in2828+ * arch/mips/mach-xxx/kernel-entry-init.h when necessary.2929+ */3030+ .macro kernel_entry_setup3131+ GET_NASID_ASM t13232+ move t2, t1 # text and data are here3333+ MAPPED_KERNEL_SETUP_TLB3434+ .endm3535+3636+/*3737+ * Do SMP slave processor setup necessary before we can savely execute C code.3838+ */3939+ .macro smp_slave_setup4040+ GET_NASID_ASM t14141+ dli t0, KLDIR_OFFSET + (KLI_KERN_VARS * KLDIR_ENT_SIZE) + \4242+ KLDIR_OFF_POINTER + CAC_BASE4343+ dsll t1, NASID_SHFT4444+ or t0, t0, t14545+ ld t0, 0(t0) # t0 points to kern_vars struct4646+ lh t1, KV_RO_NASID_OFFSET(t0)4747+ lh t2, KV_RW_NASID_OFFSET(t0)4848+ MAPPED_KERNEL_SETUP_TLB4949+ ARC64_TWIDDLE_PC5050+ .endm5151+5252+#endif /* __ASM_MACH_IP27_KERNEL_ENTRY_H */