hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/arch/powerpc/platforms/86xx/mpc86xx_smp.c
....@@ -1,26 +1,23 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Author: Xianghua Xiao <x.xiao@freescale.com>
34 * Zhang Wei <wei.zhang@freescale.com>
45 *
56 * Copyright 2006 Freescale Semiconductor Inc.
6
- *
7
- * This program is free software; you can redistribute it and/or modify it
8
- * under the terms of the GNU General Public License as published by the
9
- * Free Software Foundation; either version 2 of the License, or (at your
10
- * option) any later version.
117 */
128
139 #include <linux/stddef.h>
1410 #include <linux/kernel.h>
1511 #include <linux/init.h>
1612 #include <linux/delay.h>
13
+#include <linux/pgtable.h>
1714
1815 #include <asm/code-patching.h>
1916 #include <asm/page.h>
20
-#include <asm/pgtable.h>
2117 #include <asm/pci-bridge.h>
2218 #include <asm/mpic.h>
2319 #include <asm/cacheflush.h>
20
+#include <asm/inst.h>
2421
2522 #include <sysdev/fsl_soc.h>
2623
....@@ -76,7 +73,7 @@
7673
7774 /* Setup fake reset vector to call __secondary_start_mpc86xx. */
7875 target = (unsigned long) __secondary_start_mpc86xx;
79
- patch_branch(vector, target, BRANCH_SET_LINK);
76
+ patch_branch((struct ppc_inst *)vector, target, BRANCH_SET_LINK);
8077
8178 /* Kick that CPU */
8279 smp_86xx_release_core(nr);
....@@ -86,8 +83,7 @@
8683 mdelay(1);
8784
8885 /* Restore the exception vector */
89
- *vector = save_vector;
90
- flush_icache_range((unsigned long) vector, (unsigned long) vector + 4);
86
+ patch_instruction((struct ppc_inst *)vector, ppc_inst(save_vector));
9187
9288 local_irq_restore(flags);
9389