mirror of
https://github.com/torvalds/linux.git
synced 2024-12-27 05:11:48 +00:00
23fe04c0c5
For a while now it's been possible to use EXPORT_SYMBOL() in assembly files, which allows us to place exports immediately after assembly functions, as we do for C functions. As a step towards removing arm64ksyms.c, let's move the SMCCC exports to the assembly file the functions are defined in. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland <mark.rutland@arm.com> Cc: Will Deacon <will.deacon@arm.com> Cc: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
57 lines
1.6 KiB
ArmAsm
57 lines
1.6 KiB
ArmAsm
/*
|
|
* Copyright (c) 2015, Linaro Limited
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License Version 2 as
|
|
* published by the Free Software Foundation.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
*/
|
|
#include <linux/linkage.h>
|
|
#include <linux/arm-smccc.h>
|
|
|
|
#include <asm/asm-offsets.h>
|
|
#include <asm/assembler.h>
|
|
|
|
.macro SMCCC instr
|
|
.cfi_startproc
|
|
\instr #0
|
|
ldr x4, [sp]
|
|
stp x0, x1, [x4, #ARM_SMCCC_RES_X0_OFFS]
|
|
stp x2, x3, [x4, #ARM_SMCCC_RES_X2_OFFS]
|
|
ldr x4, [sp, #8]
|
|
cbz x4, 1f /* no quirk structure */
|
|
ldr x9, [x4, #ARM_SMCCC_QUIRK_ID_OFFS]
|
|
cmp x9, #ARM_SMCCC_QUIRK_QCOM_A6
|
|
b.ne 1f
|
|
str x6, [x4, ARM_SMCCC_QUIRK_STATE_OFFS]
|
|
1: ret
|
|
.cfi_endproc
|
|
.endm
|
|
|
|
/*
|
|
* void arm_smccc_smc(unsigned long a0, unsigned long a1, unsigned long a2,
|
|
* unsigned long a3, unsigned long a4, unsigned long a5,
|
|
* unsigned long a6, unsigned long a7, struct arm_smccc_res *res,
|
|
* struct arm_smccc_quirk *quirk)
|
|
*/
|
|
ENTRY(__arm_smccc_smc)
|
|
SMCCC smc
|
|
ENDPROC(__arm_smccc_smc)
|
|
EXPORT_SYMBOL(__arm_smccc_smc)
|
|
|
|
/*
|
|
* void arm_smccc_hvc(unsigned long a0, unsigned long a1, unsigned long a2,
|
|
* unsigned long a3, unsigned long a4, unsigned long a5,
|
|
* unsigned long a6, unsigned long a7, struct arm_smccc_res *res,
|
|
* struct arm_smccc_quirk *quirk)
|
|
*/
|
|
ENTRY(__arm_smccc_hvc)
|
|
SMCCC hvc
|
|
ENDPROC(__arm_smccc_hvc)
|
|
EXPORT_SYMBOL(__arm_smccc_hvc)
|