.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * 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. |
---|
16 | 4 | * |
---|
17 | 5 | * Copyright (C) 2012 Freescale Semiconductor, Inc. |
---|
18 | 6 | */ |
---|
.. | .. |
---|
23 | 11 | #include <asm/cacheflush.h> |
---|
24 | 12 | #include <asm/code-patching.h> |
---|
25 | 13 | #include <asm/machdep.h> |
---|
| 14 | +#include <asm/inst.h> |
---|
26 | 15 | |
---|
27 | 16 | #if !defined(CONFIG_64BIT) || defined(CONFIG_PPC_BOOK3E_64) |
---|
28 | 17 | extern void epapr_ev_idle(void); |
---|
.. | .. |
---|
48 | 37 | return -1; |
---|
49 | 38 | |
---|
50 | 39 | 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); |
---|
53 | 42 | #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); |
---|
55 | 44 | #endif |
---|
56 | 45 | } |
---|
57 | 46 | |
---|