/linux/arch/s390/include/asm/ |
H A D | alternative.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 6 * Each alternative comes with a 32 bit feature field: 16 * @ctx is a bitfield, where only one bit must be set. Each bit defines 17 * in which context an alternative is supposed to be applied to the 20 * - from the decompressor before the kernel itself is executed 21 * - from early kernel code from within the kernel 23 * @type is a number which defines the type and with that the type 24 * specific alternative patching. 27 * alternative should be applied. 66 u32 type : 8; /* type of alternative */ [all …]
|
/linux/arch/arm64/include/asm/ |
H A D | alternative-macros.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 9 #include <asm/insn-def.h> 12 * Binutils 2.27.0 can't handle a 'UL' suffix on constants, so for the assembly 27 " .word 661b - .\n" /* label */ \ 28 " .word 663f - .\n" /* new instruction */ \ 30 " .byte 662b-661b\n" /* source len */ \ 31 " .byte 664f-663f\n" /* replacement len */ 34 " .word 661b - .\n" /* label */ \ 35 " .word " __stringify(cb) "- .\n" /* callback */ \ 37 " .byte 662b-661b\n" /* source len */ \ [all …]
|
H A D | io.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 5 * Copyright (C) 1996-2000 Russell King 18 #include <asm/alternative.h> 23 * Generic IO read/write. These perform native-endian accesses. 57 asm volatile(ALTERNATIVE("ldrb %w0, [%1]", in __raw_readb() 69 asm volatile(ALTERNATIVE("ldrh %w0, [%1]", in __raw_readw() 80 asm volatile(ALTERNATIVE("ldr %w0, [%1]", in __raw_readl() 91 asm volatile(ALTERNATIVE("ldr %0, [%1]", in __raw_readq() 106 * Create a dummy control dependency from the IO read to any \ 107 * later instructions. This ensures that a subsequent call to \ [all …]
|
/linux/arch/x86/include/asm/ |
H A D | smap.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 14 #include <asm/alternative.h> 23 ALTERNATIVE "", __ASM_CLAC, X86_FEATURE_SMAP 26 ALTERNATIVE "", __ASM_STAC, X86_FEATURE_SMAP 32 /* Note: a barrier is implicit in alternative() */ in clac() 33 alternative("", __ASM_CLAC, X86_FEATURE_SMAP); in clac() 38 /* Note: a barrier is implicit in alternative() */ in stac() 39 alternative("", __ASM_STAC, X86_FEATURE_SMAP); in stac() 47 ALTERNATIVE("", "pushf; pop %0; " __ASM_CLAC "\n\t", in smap_save() 57 ALTERNATIVE("", "push %0; popf\n\t", in smap_restore() [all …]
|
H A D | nospec-branch.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 10 #include <asm/alternative.h> 12 #include <asm/msr-index.h> 21 * The tracking does not use a counter. It uses uses arithmetic shift 36 * After a return buffer fill the depth is credited 12 calls before the 39 * There is a inaccuracy for situations like this: 49 * but there is still a cushion vs. the RSB depth. The algorithm does not 78 #include <asm/asm-offsets.h> 81 movq $-1, PER_CPU_VAR(pcpu_hot + X86_call_depth); 108 * Each entry in the RSB, if used for a speculative 'ret', contains an [all …]
|
H A D | uaccess_64.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 10 #include <linux/kasan-checks.h> 11 #include <asm/alternative.h> 15 #include <asm/runtime-const.h> 29 asm (ALTERNATIVE("", in __untagged_addr() 46 return addr & (mm)->context.untag_mask; in __untagged_addr_remote() 60 * Masking the user address is an alternative to a conditional 80 * User pointers can have tag bits on x86-64. This scheme tolerates 88 * max user address and the non-canonical gap, allowing us to 95 * That's a separate optimization, for now just handle the small [all …]
|
H A D | arch_hweight.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 9 #define REG_OUT "a" 11 #define REG_IN "a" 12 #define REG_OUT "a" 19 asm (ALTERNATIVE("call __sw_hweight32", "popcntl %1, %0", X86_FEATURE_POPCNT) in __arch_hweight32() 47 asm (ALTERNATIVE("call __sw_hweight64", "popcntq %1, %0", X86_FEATURE_POPCNT) in __arch_hweight64()
|
/linux/Documentation/networking/pse-pd/ |
H A D | pse-pi.rst | 1 .. SPDX-License-Identifier: GPL-2.0 6 The Power Sourcing Equipment Power Interface (PSE PI) plays a pivotal role in 7 the architecture of Power over Ethernet (PoE) systems. It is essentially a 9 eight-pin modular jack, commonly known as the Ethernet RJ45 port. This 14 --------------------------- 19 - Section "33.2.3 PI pin assignments" covers the pin assignments for PoE 21 - Section "145.2.4 PSE PI" addresses the configuration for PoE systems that 25 ------------------------------- 27 Single Pair Ethernet (SPE) represents a different approach to Ethernet 31 two pairs of wires, SPE operates on a simpler model due to its single-pair [all …]
|
/linux/arch/loongarch/include/asm/ |
H A D | alternative.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 21 * Debug flag that can be tested to see whether alternative 34 #define alt_slen "662b-661b" 35 #define alt_total_slen alt_end_marker"b-661b" 36 #define alt_rlen(num) e_replacement(num)"f-"b_replacement(num)"f" 40 ".fill -(((" alt_rlen(num) ")-(" alt_slen ")) > 0) * " \ 41 "((" alt_rlen(num) ")-(" alt_slen ")) / 4, 4, 0x03400000\n" 47 #define alt_max_short(a, b) "((" a ") ^ (((" a ") ^ (" b ")) & -(-((" a ") < (" b ")))))" argument 50 * Pad the second replacement alternative with additional NOPs if it is 51 * additionally longer than the first replacement alternative. [all …]
|
H A D | alternative-asm.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 16 .long \orig - . 17 .long \alt - . 24 * Define an alternative between two instructions. If @feature is 29 .macro ALTERNATIVE oldinstr, newinstr, feature 33 .fill - (((144f-143f)-(141b-140b)) > 0) * ((144f-143f)-(141b-140b)) / 4, 4, 0x03400000 36 .pushsection .altinstructions, "a" 37 altinstruction_entry 140b, 143f, \feature, 142b-140b, 144f-143f 47 #define old_len (141b-140b) 48 #define new_len1 (144f-143f) [all …]
|
/linux/Documentation/devicetree/bindings/net/pse-pd/ |
H A D | pse-controller.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/net/pse-pd/pse-controller.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 11 power over twisted pair/ethernet cable. The ethernet-pse nodes should be 12 used to describe PSE controller and referenced by the ethernet-phy node. 15 - Oleksij Rempel <o.rempel@pengutronix.de> 16 - Kory Maincent <kory.maincent@bootlin.com> 20 pattern: "^ethernet-pse(@.*|-([0-9]|[1-9][0-9]+))?$" 22 "#pse-cells": [all …]
|
H A D | ti,tps23881.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/net/pse-pd/ti,tps23881.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Kory Maincent <kory.maincent@bootlin.com> 13 - $ref: pse-controller.yaml# 18 - ti,tps23881 23 '#pse-cells': 26 reset-gpios: 38 "#address-cells": [all …]
|
/linux/arch/riscv/include/asm/ |
H A D | alternative-macros.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 10 .4byte \oldptr - . 11 .4byte \newptr - . 19 .pushsection .alternative, "a" 20 ALT_ENTRY 886b, 888f, \vendor_id, \patch_id, 889f - 888f 30 .org . - (889b - 888b) + (887b - 886b) 31 .org . - (887b - 886b) + (889b - 888b) 62 ".4byte ((" oldptr ") - .) \n" \ 63 ".4byte ((" newptr ") - .) \n" \ 70 ".pushsection .alternative, \"a\"\n" \ [all …]
|
H A D | bitops.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 19 #include <asm-generic/bitops/__ffs.h> 20 #include <asm-generic/bitops/__fls.h> 21 #include <asm-generic/bitops/ffs.h> 22 #include <asm-generic/bitops/fls.h> 30 #include <asm-generic/bitops/__ffs.h> 31 #include <asm-generic/bitops/__fls.h> 32 #include <asm-generic/bitops/ffs.h> 33 #include <asm-generic/bitops/fls.h> 35 #include <asm/alternative-macros.h> [all …]
|
/linux/arch/x86/entry/ |
H A D | calling.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 7 #include <asm/asm-offsets.h> 8 #include <asm/processor-flags.h> 9 #include <asm/ptrace-abi.h> 11 #include <asm/nospec-branch.h> 15 x86 function call convention, 64-bit: 16 ------------------------------------- 17 arguments | callee-saved | extra caller-saved | return 18 [callee-clobbered] | | [callee-clobbered] | 19 --------------------------------------------------------------------------- [all …]
|
/linux/arch/s390/kernel/ |
H A D | alternative.c | 1 // SPDX-License-Identifier: GPL-2.0 4 #include <asm/nospec-branch.h> 6 #include <asm/alternative.h> 12 struct alt_instr *a; in __apply_alternatives() local 16 * The scan order should be from start to end. A later scanned in __apply_alternatives() 17 * alternative code can overwrite previously scanned alternative code. in __apply_alternatives() 19 for (a = start; a < end; a++) { in __apply_alternatives() 20 if (!(a->ctx & ctx)) in __apply_alternatives() 22 switch (a->type) { in __apply_alternatives() 24 replace = test_facility(a->data); in __apply_alternatives() [all …]
|
/linux/arch/parisc/include/asm/ |
H A D | alternative.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 7 #define ALT_COND_NO_DCACHE 0x02 /* if system has no d-cache */ 8 #define ALT_COND_NO_ICACHE 0x04 /* if system has no i-cache */ 35 /* Alternative SMP implementation. */ 36 #define ALTERNATIVE(cond, replacement) "!0:" \ macro 37 ".section .altinstructions, \"a\" !" \ 39 ".word (0b-4-.) !" \ 46 /* to replace one single instructions by a new instruction */ 47 #define ALTERNATIVE(from, to, cond, replacement)\ macro 48 .section .altinstructions, "a" ! \ [all …]
|
/linux/include/linux/pse-pd/ |
H A D | pse.h | 1 // SPDX-License-Identifier: GPL-2.0-only 12 /* Maximum current in uA according to IEEE 802.3-2022 Table 145-1 */ 19 * struct pse_control_config - PSE control/channel configuration. 22 * IEEE 802.3-2018 30.15.1.2.1 acPoDLPSEAdminControl 24 * IEEE 802.3-2022 30.9.1.2.1 acPSEAdminControl 32 * struct pse_control_status - PSE control/channel status. 35 * functions. IEEE 802.3-2018 30.15.1.1.2 aPoDLPSEAdminState 37 * IEEE 802.3-2018 30.15.1.1.3 aPoDLPSEPowerDetectionStatus: 39 * functions. IEEE 802.3-2022 30.9.1.1.2 aPSEAdminState 41 * IEEE 802.3-2022 30.9.1.1.5 aPSEPowerDetectionStatus: [all …]
|
/linux/arch/parisc/kernel/ |
H A D | pacache.S | 1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 4 * Copyright (C) 2000-2001 Hewlett-Packard (John Marvin) 5 * Copyright (C) 2001 Matthew Wilcox (willy at parisc-linux.org) 6 * Copyright (C) 2002 Richard Hirst (rhirst with parisc-linux.org) 26 #include <asm/alternative.h> 42 /* pcxt_ssm_bug - relied upon translation! PA 2.0 Arch. F-4 and F-5 */ 43 rsm PSW_SM_I, %r19 /* save I-bit state */ 74 addib,COND(=) -1, %arg3, fitoneloop /* Preadjust and test */ 84 addib,COND(>) -1, %r31, fitmanymiddle /* Adjusted inner loop decr */ 87 addib,COND(>) -1, %r29, fitmanymiddle /* Middle loop decr */ [all …]
|
H A D | alternative.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Alternative live-patching for parisc. 10 #include <asm/alternative.h> 21 __setup("no-alternatives", setup_no_alternatives); 38 * If the PDC_MODEL capabilities has Non-coherent IO-PDIR bit in apply_alternatives() 40 * time IO-PDIR is changed in Ike/Astro. in apply_alternatives() 52 from = (u32 *)((ulong)&entry->orig_offset + entry->orig_offset); in apply_alternatives() 53 len = entry->len; in apply_alternatives() 54 cond = entry->cond; in apply_alternatives() 55 replacement = entry->replacement; in apply_alternatives() [all …]
|
/linux/arch/x86/lib/ |
H A D | retpoline.S | 1 /* SPDX-License-Identifier: GPL-2.0 */ 8 #include <asm/alternative.h> 9 #include <asm/asm-offsets.h> 10 #include <asm/nospec-branch.h> 53 * Worse, you can only have a single EXPORT_SYMBOL per line, 64 #include <asm/GEN-for-each-reg.h> 71 #include <asm/GEN-for-each-reg.h> 93 #include <asm/GEN-for-each-reg.h> 100 #include <asm/GEN-for-each-reg.h> 119 #include <asm/GEN-for-each-reg.h> [all …]
|
H A D | memset_64.S | 1 /* SPDX-License-Identifier: GPL-2.0 */ 7 #include <asm/alternative.h> 12 * ISO C memset - set a memory block to a byte value. This function uses fast 22 * The FSRS alternative should be done inline (avoiding the call and 32 ALTERNATIVE "jmp memset_orig", "", X86_FEATURE_FSRS
|
/linux/arch/loongarch/kernel/ |
H A D | alternative.c | 1 // SPDX-License-Identifier: GPL-2.0-only 4 #include <asm/alternative.h> 13 #define MAX_PATCH_SIZE (((u8)(-1)) / LOONGARCH_INSN_SIZE) 22 __setup("debug-alternative", debug_alt); 40 for (_j = 0; _j < count - 1; _j++) \ 46 /* Use this to add nops to a buffer, then text_poke the whole buffer. */ 49 while (count--) { in add_nops() 50 insn->word = INSN_NOP; in add_nops() 72 si_l = src->reg0i26_format.immediate_l; in recompute_jump() 73 si_h = src->reg0i26_format.immediate_h; in recompute_jump() [all …]
|
/linux/tools/arch/x86/lib/ |
H A D | memset_64.S | 1 /* SPDX-License-Identifier: GPL-2.0 */ 7 #include <asm/alternative.h> 12 * ISO C memset - set a memory block to a byte value. This function uses fast 22 * The FSRS alternative should be done inline (avoiding the call and 32 ALTERNATIVE "jmp memset_orig", "", X86_FEATURE_FSRS
|
/linux/tools/objtool/arch/x86/ |
H A D | special.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 15 * Recompute orig_len for nested ALTERNATIVE()s. in arch_handle_alternative() 17 if (group && group->orig_sec == alt->orig_sec && in arch_handle_alternative() 18 group->orig_off == alt->orig_off) { in arch_handle_alternative() 22 unsigned int len = max(iter->orig_len, alt->orig_len); in arch_handle_alternative() 23 iter->orig_len = alt->orig_len = len; in arch_handle_alternative() 38 * If UACCESS validation is enabled; force that alternative; in arch_handle_alternative() 42 * alternative code flow at the same time, in that case we can in arch_handle_alternative() 47 alt->skip_orig = true; in arch_handle_alternative() 49 alt->skip_alt = true; in arch_handle_alternative() [all …]
|