alternative.h (8be98d2f2a0a262f8bf8a0bc1fdf522b3c7aab17) alternative.h (e64f737ad70fee4a3c57d147fc511e5d5014b5dd)
1/* SPDX-License-Identifier: GPL-2.0-only */
2/*
3 * Copyright (C) 2021 Sifive.
4 */
5
6#ifndef __ASM_ALTERNATIVE_H
7#define __ASM_ALTERNATIVE_H
8
9#define ERRATA_STRING_LENGTH_MAX 32
10
11#include <asm/alternative-macros.h>
12
13#ifndef __ASSEMBLY__
14
1/* SPDX-License-Identifier: GPL-2.0-only */
2/*
3 * Copyright (C) 2021 Sifive.
4 */
5
6#ifndef __ASM_ALTERNATIVE_H
7#define __ASM_ALTERNATIVE_H
8
9#define ERRATA_STRING_LENGTH_MAX 32
10
11#include <asm/alternative-macros.h>
12
13#ifndef __ASSEMBLY__
14
15#ifdef CONFIG_RISCV_ALTERNATIVE
16
15#include <linux/init.h>
16#include <linux/types.h>
17#include <linux/stddef.h>
18#include <asm/hwcap.h>
19
20void __init apply_boot_alternatives(void);
21
22struct alt_entry {

--- 7 unchanged lines hidden (view full) ---

30struct errata_checkfunc_id {
31 unsigned long vendor_id;
32 bool (*func)(struct alt_entry *alt);
33};
34
35void sifive_errata_patch_func(struct alt_entry *begin, struct alt_entry *end,
36 unsigned long archid, unsigned long impid);
37
17#include <linux/init.h>
18#include <linux/types.h>
19#include <linux/stddef.h>
20#include <asm/hwcap.h>
21
22void __init apply_boot_alternatives(void);
23
24struct alt_entry {

--- 7 unchanged lines hidden (view full) ---

32struct errata_checkfunc_id {
33 unsigned long vendor_id;
34 bool (*func)(struct alt_entry *alt);
35};
36
37void sifive_errata_patch_func(struct alt_entry *begin, struct alt_entry *end,
38 unsigned long archid, unsigned long impid);
39
40#else /* CONFIG_RISCV_ALTERNATIVE */
41
42static inline void apply_boot_alternatives(void) { }
43
44#endif /* CONFIG_RISCV_ALTERNATIVE */
45
38#endif
39#endif
46#endif
47#endif