Ignore:
Timestamp:
Apr 14, 2017, 9:41:36 PM (11 days ago)
Author:
brainslayer
Message:

kernel update

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/linux/universal/linux-4.9/include/linux/arm-smccc.h

    r31574 r31859  
    1414#ifndef __LINUX_ARM_SMCCC_H
    1515#define __LINUX_ARM_SMCCC_H
    16 
    17 #include <linux/linkage.h>
    18 #include <linux/types.h>
    1916
    2017/*
     
    6158#define ARM_SMCCC_OWNER_TRUSTED_OS_END  63
    6259
     60#define ARM_SMCCC_QUIRK_NONE            0
     61#define ARM_SMCCC_QUIRK_QCOM_A6         1 /* Save/restore register a6 */
     62
     63#ifndef __ASSEMBLY__
     64
     65#include <linux/linkage.h>
     66#include <linux/types.h>
    6367/**
    6468 * struct arm_smccc_res - Result from SMC/HVC call
     
    7377
    7478/**
    75  * arm_smccc_smc() - make SMC calls
     79 * struct arm_smccc_quirk - Contains quirk information
     80 * @id: quirk identification
     81 * @state: quirk specific information
     82 * @a6: Qualcomm quirk entry for returning post-smc call contents of a6
     83 */
     84struct arm_smccc_quirk {
     85        int     id;
     86        union {
     87                unsigned long a6;
     88        } state;
     89};
     90
     91/**
     92 * __arm_smccc_smc() - make SMC calls
    7693 * @a0-a7: arguments passed in registers 0 to 7
    7794 * @res: result values from registers 0 to 3
     95 * @quirk: points to an arm_smccc_quirk, or NULL when no quirks are required.
    7896 *
    7997 * This function is used to make SMC calls following SMC Calling Convention.
    8098 * The content of the supplied param are copied to registers 0 to 7 prior
    8199 * to the SMC instruction. The return values are updated with the content
    82  * from register 0 to 3 on return from the SMC instruction.
     100 * from register 0 to 3 on return from the SMC instruction.  An optional
     101 * quirk structure provides vendor specific behavior.
    83102 */
    84 asmlinkage void arm_smccc_smc(unsigned long a0, unsigned long a1,
     103asmlinkage void __arm_smccc_smc(unsigned long a0, unsigned long a1,
    85104                        unsigned long a2, unsigned long a3, unsigned long a4,
    86105                        unsigned long a5, unsigned long a6, unsigned long a7,
    87                         struct arm_smccc_res *res);
     106                        struct arm_smccc_res *res, struct arm_smccc_quirk *quirk);
    88107
    89108/**
    90  * arm_smccc_hvc() - make HVC calls
     109 * __arm_smccc_hvc() - make HVC calls
    91110 * @a0-a7: arguments passed in registers 0 to 7
    92111 * @res: result values from registers 0 to 3
     112 * @quirk: points to an arm_smccc_quirk, or NULL when no quirks are required.
    93113 *
    94114 * This function is used to make HVC calls following SMC Calling
    95115 * Convention.  The content of the supplied param are copied to registers 0
    96116 * to 7 prior to the HVC instruction. The return values are updated with
    97  * the content from register 0 to 3 on return from the HVC instruction.
     117 * the content from register 0 to 3 on return from the HVC instruction.  An
     118 * optional quirk structure provides vendor specific behavior.
    98119 */
    99 asmlinkage void arm_smccc_hvc(unsigned long a0, unsigned long a1,
     120asmlinkage void __arm_smccc_hvc(unsigned long a0, unsigned long a1,
    100121                        unsigned long a2, unsigned long a3, unsigned long a4,
    101122                        unsigned long a5, unsigned long a6, unsigned long a7,
    102                         struct arm_smccc_res *res);
     123                        struct arm_smccc_res *res, struct arm_smccc_quirk *quirk);
    103124
     125#define arm_smccc_smc(...) __arm_smccc_smc(__VA_ARGS__, NULL)
     126
     127#define arm_smccc_smc_quirk(...) __arm_smccc_smc(__VA_ARGS__)
     128
     129#define arm_smccc_hvc(...) __arm_smccc_hvc(__VA_ARGS__, NULL)
     130
     131#define arm_smccc_hvc_quirk(...) __arm_smccc_hvc(__VA_ARGS__)
     132
     133#endif /*__ASSEMBLY__*/
    104134#endif /*__LINUX_ARM_SMCCC_H*/
Note: See TracChangeset for help on using the changeset viewer.