File manager - Edit - /home/newsbmcs.com/public_html/static/img/logo/alternative.h.tar
Back
usr/src/linux-headers-5.15.0-133/arch/parisc/include/asm/alternative.h 0000644 00000003642 15030344533 0021041 0 ustar 00 /* SPDX-License-Identifier: GPL-2.0 */ #ifndef __ASM_PARISC_ALTERNATIVE_H #define __ASM_PARISC_ALTERNATIVE_H #define ALT_COND_ALWAYS 0x80 /* always replace instruction */ #define ALT_COND_NO_SMP 0x01 /* when running UP instead of SMP */ #define ALT_COND_NO_DCACHE 0x02 /* if system has no d-cache */ #define ALT_COND_NO_ICACHE 0x04 /* if system has no i-cache */ #define ALT_COND_NO_SPLIT_TLB 0x08 /* if split_tlb == 0 */ #define ALT_COND_NO_IOC_FDC 0x10 /* if I/O cache does not need flushes */ #define ALT_COND_RUN_ON_QEMU 0x20 /* if running on QEMU */ #define INSN_PxTLB 0x02 /* modify pdtlb, pitlb */ #define INSN_NOP 0x08000240 /* nop */ #ifndef __ASSEMBLY__ #include <linux/init.h> #include <linux/types.h> #include <linux/stddef.h> #include <linux/stringify.h> struct alt_instr { s32 orig_offset; /* offset to original instructions */ s32 len; /* end of original instructions */ u32 cond; /* see ALT_COND_XXX */ u32 replacement; /* replacement instruction or code */ }; void set_kernel_text_rw(int enable_read_write); void apply_alternatives_all(void); void apply_alternatives(struct alt_instr *start, struct alt_instr *end, const char *module_name); /* Alternative SMP implementation. */ #define ALTERNATIVE(cond, replacement) "!0:" \ ".section .altinstructions, \"aw\" !" \ ".word (0b-4-.), 1, " __stringify(cond) "," \ __stringify(replacement) " !" \ ".previous" #else /* to replace one single instructions by a new instruction */ #define ALTERNATIVE(from, to, cond, replacement)\ .section .altinstructions, "aw" ! \ .word (from - .), (to - from)/4 ! \ .word cond, replacement ! \ .previous /* to replace multiple instructions by new code */ #define ALTERNATIVE_CODE(from, num_instructions, cond, new_instr_ptr)\ .section .altinstructions, "aw" ! \ .word (from - .), -num_instructions ! \ .word cond, (new_instr_ptr - .) ! \ .previous #endif /* __ASSEMBLY__ */ #endif /* __ASM_PARISC_ALTERNATIVE_H */ usr/src/linux-headers-5.15.0-133/arch/arm64/include/asm/alternative.h 0000644 00000001765 15030351770 0020516 0 ustar 00 /* SPDX-License-Identifier: GPL-2.0 */ #ifndef __ASM_ALTERNATIVE_H #define __ASM_ALTERNATIVE_H #include <asm/alternative-macros.h> #ifndef __ASSEMBLY__ #include <linux/init.h> #include <linux/types.h> #include <linux/stddef.h> struct alt_instr { s32 orig_offset; /* offset to original instruction */ s32 alt_offset; /* offset to replacement instruction */ u16 cpufeature; /* cpufeature bit set for replacement */ u8 orig_len; /* size of original instruction(s) */ u8 alt_len; /* size of new instruction(s), <= orig_len */ }; typedef void (*alternative_cb_t)(struct alt_instr *alt, __le32 *origptr, __le32 *updptr, int nr_inst); void __init apply_boot_alternatives(void); void __init apply_alternatives_all(void); bool alternative_is_applied(u16 cpufeature); #ifdef CONFIG_MODULES void apply_alternatives_module(void *start, size_t length); #else static inline void apply_alternatives_module(void *start, size_t length) { } #endif #endif /* __ASSEMBLY__ */ #endif /* __ASM_ALTERNATIVE_H */ usr/src/linux-headers-5.15.0-142/arch/riscv/include/asm/alternative.h 0000644 00000001642 15030522316 0020701 0 ustar 00 /* SPDX-License-Identifier: GPL-2.0-only */ /* * Copyright (C) 2021 Sifive. */ #ifndef __ASM_ALTERNATIVE_H #define __ASM_ALTERNATIVE_H #define ERRATA_STRING_LENGTH_MAX 32 #include <asm/alternative-macros.h> #ifndef __ASSEMBLY__ #include <linux/init.h> #include <linux/types.h> #include <linux/stddef.h> #include <asm/hwcap.h> void __init apply_boot_alternatives(void); struct alt_entry { void *old_ptr; /* address of original instruciton or data */ void *alt_ptr; /* address of replacement instruction or data */ unsigned long vendor_id; /* cpu vendor id */ unsigned long alt_len; /* The replacement size */ unsigned int errata_id; /* The errata id */ } __packed; struct errata_checkfunc_id { unsigned long vendor_id; bool (*func)(struct alt_entry *alt); }; void sifive_errata_patch_func(struct alt_entry *begin, struct alt_entry *end, unsigned long archid, unsigned long impid); #endif #endif usr/src/linux-headers-5.15.0-133/arch/riscv/include/asm/alternative.h 0000644 00000001642 15030564640 0020707 0 ustar 00 /* SPDX-License-Identifier: GPL-2.0-only */ /* * Copyright (C) 2021 Sifive. */ #ifndef __ASM_ALTERNATIVE_H #define __ASM_ALTERNATIVE_H #define ERRATA_STRING_LENGTH_MAX 32 #include <asm/alternative-macros.h> #ifndef __ASSEMBLY__ #include <linux/init.h> #include <linux/types.h> #include <linux/stddef.h> #include <asm/hwcap.h> void __init apply_boot_alternatives(void); struct alt_entry { void *old_ptr; /* address of original instruciton or data */ void *alt_ptr; /* address of replacement instruction or data */ unsigned long vendor_id; /* cpu vendor id */ unsigned long alt_len; /* The replacement size */ unsigned int errata_id; /* The errata id */ } __packed; struct errata_checkfunc_id { unsigned long vendor_id; bool (*func)(struct alt_entry *alt); }; void sifive_errata_patch_func(struct alt_entry *begin, struct alt_entry *end, unsigned long archid, unsigned long impid); #endif #endif usr/src/linux-headers-5.15.0-142/arch/arm64/include/asm/alternative.h 0000644 00000001765 15030566100 0020511 0 ustar 00 /* SPDX-License-Identifier: GPL-2.0 */ #ifndef __ASM_ALTERNATIVE_H #define __ASM_ALTERNATIVE_H #include <asm/alternative-macros.h> #ifndef __ASSEMBLY__ #include <linux/init.h> #include <linux/types.h> #include <linux/stddef.h> struct alt_instr { s32 orig_offset; /* offset to original instruction */ s32 alt_offset; /* offset to replacement instruction */ u16 cpufeature; /* cpufeature bit set for replacement */ u8 orig_len; /* size of original instruction(s) */ u8 alt_len; /* size of new instruction(s), <= orig_len */ }; typedef void (*alternative_cb_t)(struct alt_instr *alt, __le32 *origptr, __le32 *updptr, int nr_inst); void __init apply_boot_alternatives(void); void __init apply_alternatives_all(void); bool alternative_is_applied(u16 cpufeature); #ifdef CONFIG_MODULES void apply_alternatives_module(void *start, size_t length); #else static inline void apply_alternatives_module(void *start, size_t length) { } #endif #endif /* __ASSEMBLY__ */ #endif /* __ASM_ALTERNATIVE_H */
| ver. 1.4 |
Github
|
.
| PHP 8.2.28 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings