| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Copyright (c) 2015, Linaro Limited |
|---|
| 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 | 4 | */ |
|---|
| 14 | 5 | #include <linux/linkage.h> |
|---|
| 15 | 6 | #include <linux/arm-smccc.h> |
|---|
| 7 | + |
|---|
| 16 | 8 | #include <asm/asm-offsets.h> |
|---|
| 9 | +#include <asm/assembler.h> |
|---|
| 17 | 10 | |
|---|
| 18 | 11 | .macro SMCCC instr |
|---|
| 19 | | - .cfi_startproc |
|---|
| 20 | 12 | \instr #0 |
|---|
| 21 | 13 | ldr x4, [sp] |
|---|
| 22 | 14 | stp x0, x1, [x4, #ARM_SMCCC_RES_X0_OFFS] |
|---|
| .. | .. |
|---|
| 28 | 20 | b.ne 1f |
|---|
| 29 | 21 | str x6, [x4, ARM_SMCCC_QUIRK_STATE_OFFS] |
|---|
| 30 | 22 | 1: ret |
|---|
| 31 | | - .cfi_endproc |
|---|
| 32 | 23 | .endm |
|---|
| 33 | 24 | |
|---|
| 34 | 25 | /* |
|---|
| .. | .. |
|---|
| 37 | 28 | * unsigned long a6, unsigned long a7, struct arm_smccc_res *res, |
|---|
| 38 | 29 | * struct arm_smccc_quirk *quirk) |
|---|
| 39 | 30 | */ |
|---|
| 40 | | -ENTRY(__arm_smccc_smc) |
|---|
| 31 | +SYM_FUNC_START(__arm_smccc_smc) |
|---|
| 41 | 32 | SMCCC smc |
|---|
| 42 | | -ENDPROC(__arm_smccc_smc) |
|---|
| 33 | +SYM_FUNC_END(__arm_smccc_smc) |
|---|
| 34 | +EXPORT_SYMBOL(__arm_smccc_smc) |
|---|
| 43 | 35 | |
|---|
| 44 | 36 | /* |
|---|
| 45 | 37 | * void arm_smccc_hvc(unsigned long a0, unsigned long a1, unsigned long a2, |
|---|
| .. | .. |
|---|
| 47 | 39 | * unsigned long a6, unsigned long a7, struct arm_smccc_res *res, |
|---|
| 48 | 40 | * struct arm_smccc_quirk *quirk) |
|---|
| 49 | 41 | */ |
|---|
| 50 | | -ENTRY(__arm_smccc_hvc) |
|---|
| 42 | +SYM_FUNC_START(__arm_smccc_hvc) |
|---|
| 51 | 43 | SMCCC hvc |
|---|
| 52 | | -ENDPROC(__arm_smccc_hvc) |
|---|
| 44 | +SYM_FUNC_END(__arm_smccc_hvc) |
|---|
| 45 | +EXPORT_SYMBOL(__arm_smccc_hvc) |
|---|