| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Author: Xianghua Xiao <x.xiao@freescale.com> |
|---|
| 3 | 4 | * Zhang Wei <wei.zhang@freescale.com> |
|---|
| 4 | 5 | * |
|---|
| 5 | 6 | * 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. |
|---|
| 11 | 7 | */ |
|---|
| 12 | 8 | |
|---|
| 13 | 9 | #include <linux/stddef.h> |
|---|
| 14 | 10 | #include <linux/kernel.h> |
|---|
| 15 | 11 | #include <linux/init.h> |
|---|
| 16 | 12 | #include <linux/delay.h> |
|---|
| 13 | +#include <linux/pgtable.h> |
|---|
| 17 | 14 | |
|---|
| 18 | 15 | #include <asm/code-patching.h> |
|---|
| 19 | 16 | #include <asm/page.h> |
|---|
| 20 | | -#include <asm/pgtable.h> |
|---|
| 21 | 17 | #include <asm/pci-bridge.h> |
|---|
| 22 | 18 | #include <asm/mpic.h> |
|---|
| 23 | 19 | #include <asm/cacheflush.h> |
|---|
| 20 | +#include <asm/inst.h> |
|---|
| 24 | 21 | |
|---|
| 25 | 22 | #include <sysdev/fsl_soc.h> |
|---|
| 26 | 23 | |
|---|
| .. | .. |
|---|
| 76 | 73 | |
|---|
| 77 | 74 | /* Setup fake reset vector to call __secondary_start_mpc86xx. */ |
|---|
| 78 | 75 | 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); |
|---|
| 80 | 77 | |
|---|
| 81 | 78 | /* Kick that CPU */ |
|---|
| 82 | 79 | smp_86xx_release_core(nr); |
|---|
| .. | .. |
|---|
| 86 | 83 | mdelay(1); |
|---|
| 87 | 84 | |
|---|
| 88 | 85 | /* 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)); |
|---|
| 91 | 87 | |
|---|
| 92 | 88 | local_irq_restore(flags); |
|---|
| 93 | 89 | |
|---|