forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-09-20 cf4ce59b3b70238352c7f1729f0f7223214828ad
kernel/arch/powerpc/kernel/epapr_paravirt.c
....@@ -1,18 +1,6 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * ePAPR para-virtualization support.
3
- *
4
- * This program is free software; you can redistribute it and/or modify
5
- * it under the terms of the GNU General Public License, version 2, as
6
- * published by the Free Software Foundation.
7
- *
8
- * This program is distributed in the hope that it will be useful,
9
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
10
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
- * GNU General Public License for more details.
12
- *
13
- * You should have received a copy of the GNU General Public License
14
- * along with this program; if not, write to the Free Software
15
- * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
164 *
175 * Copyright (C) 2012 Freescale Semiconductor, Inc.
186 */
....@@ -23,6 +11,7 @@
2311 #include <asm/cacheflush.h>
2412 #include <asm/code-patching.h>
2513 #include <asm/machdep.h>
14
+#include <asm/inst.h>
2615
2716 #if !defined(CONFIG_64BIT) || defined(CONFIG_PPC_BOOK3E_64)
2817 extern void epapr_ev_idle(void);
....@@ -48,10 +37,10 @@
4837 return -1;
4938
5039 for (i = 0; i < (len / 4); i++) {
51
- u32 inst = be32_to_cpu(insts[i]);
52
- patch_instruction(epapr_hypercall_start + i, inst);
40
+ struct ppc_inst inst = ppc_inst(be32_to_cpu(insts[i]));
41
+ patch_instruction((struct ppc_inst *)(epapr_hypercall_start + i), inst);
5342 #if !defined(CONFIG_64BIT) || defined(CONFIG_PPC_BOOK3E_64)
54
- patch_instruction(epapr_ev_idle_start + i, inst);
43
+ patch_instruction((struct ppc_inst *)(epapr_ev_idle_start + i), inst);
5544 #endif
5645 }
5746