Skip to content

Commit 010089e

Browse files
arndbctmarinas
authored andcommitted
arm64: spectre: provide prototypes for internal functions
The helpers in proton-pack.c are called from assembler and have no prototype in a header, which causes a W=1 warning: arch/arm64/kernel/proton-pack.c:568:13: error: no previous prototype for 'spectre_v4_patch_fw_mitigation_enable' [-Werror=missing-prototypes] arch/arm64/kernel/proton-pack.c:588:13: error: no previous prototype for 'smccc_patch_fw_mitigation_conduit' [-Werror=missing-prototypes] arch/arm64/kernel/proton-pack.c:1064:14: error: no previous prototype for 'spectre_bhb_patch_loop_mitigation_enable' [-Werror=missing-prototypes] arch/arm64/kernel/proton-pack.c:1075:14: error: no previous prototype for 'spectre_bhb_patch_fw_mitigation_enabled' [-Werror=missing-prototypes] Add these to asm/spectre.h, which contains related declarations already. Signed-off-by: Arnd Bergmann <[email protected]> Reviewed-by: Kees Cook <[email protected]> Acked-by: Ard Biesheuvel <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Catalin Marinas <[email protected]>
1 parent ec3a3db commit 010089e

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

arch/arm64/include/asm/spectre.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,5 +100,21 @@ bool is_spectre_bhb_affected(const struct arm64_cpu_capabilities *entry, int sco
100100
u8 spectre_bhb_loop_affected(int scope);
101101
void spectre_bhb_enable_mitigation(const struct arm64_cpu_capabilities *__unused);
102102
bool try_emulate_el1_ssbs(struct pt_regs *regs, u32 instr);
103+
104+
void spectre_v4_patch_fw_mitigation_enable(struct alt_instr *alt, __le32 *origptr,
105+
__le32 *updptr, int nr_inst);
106+
void smccc_patch_fw_mitigation_conduit(struct alt_instr *alt, __le32 *origptr,
107+
__le32 *updptr, int nr_inst);
108+
void spectre_bhb_patch_loop_mitigation_enable(struct alt_instr *alt, __le32 *origptr,
109+
__le32 *updptr, int nr_inst);
110+
void spectre_bhb_patch_fw_mitigation_enabled(struct alt_instr *alt, __le32 *origptr,
111+
__le32 *updptr, int nr_inst);
112+
void spectre_bhb_patch_loop_iter(struct alt_instr *alt,
113+
__le32 *origptr, __le32 *updptr, int nr_inst);
114+
void spectre_bhb_patch_wa3(struct alt_instr *alt,
115+
__le32 *origptr, __le32 *updptr, int nr_inst);
116+
void spectre_bhb_patch_clearbhb(struct alt_instr *alt,
117+
__le32 *origptr, __le32 *updptr, int nr_inst);
118+
103119
#endif /* __ASSEMBLY__ */
104120
#endif /* __ASM_SPECTRE_H */

0 commit comments

Comments
 (0)