mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 01:32:21 +02:00
riscv/purgatory: add asm/purgatory.h
Add arch/riscv/include/asm/purgatory.h and provide the purgatory() prototype via the architecture header, mirroring the x86 layout. Remove the workaround from arch/riscv/purgatory/purgatory.c. Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Link: https://patch.msgid.link/20260509073850.44595-4-thorsten.blum@linux.dev [pjw@kernel.org: drop superfluous extern in header file] Signed-off-by: Paul Walmsley <pjw@kernel.org>
This commit is contained in:
parent
1e01a786a9
commit
a24c7f3523
11
arch/riscv/include/asm/purgatory.h
Normal file
11
arch/riscv/include/asm/purgatory.h
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#ifndef _ASM_RISCV_PURGATORY_H
|
||||
#define _ASM_RISCV_PURGATORY_H
|
||||
|
||||
#ifndef __ASSEMBLER__
|
||||
#include <linux/purgatory.h>
|
||||
|
||||
void purgatory(void);
|
||||
#endif /* __ASSEMBLER__ */
|
||||
|
||||
#endif /* _ASM_RISCV_PURGATORY_H */
|
||||
|
|
@ -8,9 +8,9 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include <linux/purgatory.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/string.h>
|
||||
#include <asm/purgatory.h>
|
||||
#include <asm/string.h>
|
||||
|
||||
u8 purgatory_sha256_digest[SHA256_DIGEST_SIZE] __section(".kexec-purgatory");
|
||||
|
|
@ -32,9 +32,6 @@ static bool verify_sha256_digest(void)
|
|||
return memcmp(digest, purgatory_sha256_digest, sizeof(digest)) == 0;
|
||||
}
|
||||
|
||||
/* workaround for a warning with -Wmissing-prototypes */
|
||||
void purgatory(void);
|
||||
|
||||
void purgatory(void)
|
||||
{
|
||||
if (!verify_sha256_digest())
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user