[PW_SID:993555] riscv: Add helpers use_alternative_{likely,unlikely} - #811
[PW_SID:993555] riscv: Add helpers use_alternative_{likely,unlikely}#811linux-riscv-bot wants to merge 6 commits into
Conversation
Introduce convenience helpers use_alternative_likely() and
use_alternative_unlikely() to implement the pattern of using asm goto to
check if an alternative is selected. Existing code will be converted in
subsequent patches.
Similar to arm64 alternative_has_cap_{likely,unlikely}, but for riscv,
alternatives are not all CPU capabilities.
Suggested-by: Aydın Mercan <aydin@mercan.dev>
Signed-off-by: Vivian Wang <wangruikang@iscas.ac.cn>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Use use_alternative_unlikely() to check for RISCV_ISA_EXT_SVVPTC,
replacing the use of asm goto with ALTERNATIVE.
The "unlikely" variant is used to match the behavior of the original
implementation using ALTERNATIVE("nop", "j %l[svvptc]", ...).
Signed-off-by: Vivian Wang <wangruikang@iscas.ac.cn>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Use use_alternative_likely() to check for RISCV_ISA_EXT_ZBB, replacing
the use of asm goto with ALTERNATIVE.
The "likely" variant is used to match the behavior of the original
implementation using ALTERNATIVE("j %l[no_zbb]", "nop", ...).
Signed-off-by: Vivian Wang <wangruikang@iscas.ac.cn>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Use use_alternative_likely() to check for RISCV_ISA_EXT_ZBB, replacing
the use of asm goto with ALTERNATIVE.
The "likely" variant is used to match the behavior of the original
implementation using ALTERNATIVE("j %l[legacy]", "nop", ...).
Signed-off-by: Vivian Wang <wangruikang@iscas.ac.cn>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Use use_alternative_likely() to check for RISCV_ISA_EXT_ZBB, replacing
the use of asm goto with ALTERNATIVE.
The "likely" variant is used to match the behavior of the original
implementation using ALTERNATIVE("j %l[legacy]", "nop", ...).
Signed-off-by: Vivian Wang <wangruikang@iscas.ac.cn>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Use use_alternative_likely() to check for RISCV_ISA_EXT_ZAWRS, replacing
the use of asm goto with ALTERNATIVE.
The "likely" variant is used to match the behavior of the original
implementation using ALTERNATIVE("j %l[no_zawrs]", "nop", ...).
Signed-off-by: Vivian Wang <wangruikang@iscas.ac.cn>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
|
Patch 1: "[1/6] riscv: Introduce use_alternative_{likely,unlikely}" |
|
Patch 1: "[1/6] riscv: Introduce use_alternative_{likely,unlikely}" |
|
Patch 1: "[1/6] riscv: Introduce use_alternative_{likely,unlikely}" |
|
Patch 1: "[1/6] riscv: Introduce use_alternative_{likely,unlikely}" |
|
Patch 1: "[1/6] riscv: Introduce use_alternative_{likely,unlikely}" |
|
Patch 1: "[1/6] riscv: Introduce use_alternative_{likely,unlikely}" |
|
Patch 1: "[1/6] riscv: Introduce use_alternative_{likely,unlikely}" |
|
Patch 1: "[1/6] riscv: Introduce use_alternative_{likely,unlikely}" |
|
Patch 1: "[1/6] riscv: Introduce use_alternative_{likely,unlikely}" |
|
Patch 1: "[1/6] riscv: Introduce use_alternative_{likely,unlikely}" |
|
Patch 1: "[1/6] riscv: Introduce use_alternative_{likely,unlikely}" |
|
Patch 1: "[1/6] riscv: Introduce use_alternative_{likely,unlikely}" |
|
Patch 2: "[2/6] riscv: pgtable: Convert to use_alternative_unlikely" |
|
Patch 2: "[2/6] riscv: pgtable: Convert to use_alternative_unlikely" |
|
Patch 2: "[2/6] riscv: pgtable: Convert to use_alternative_unlikely" |
|
Patch 2: "[2/6] riscv: pgtable: Convert to use_alternative_unlikely" |
|
Patch 2: "[2/6] riscv: pgtable: Convert to use_alternative_unlikely" |
|
Patch 2: "[2/6] riscv: pgtable: Convert to use_alternative_unlikely" |
|
Patch 2: "[2/6] riscv: pgtable: Convert to use_alternative_unlikely" |
|
Patch 2: "[2/6] riscv: pgtable: Convert to use_alternative_unlikely" |
|
Patch 2: "[2/6] riscv: pgtable: Convert to use_alternative_unlikely" |
|
Patch 2: "[2/6] riscv: pgtable: Convert to use_alternative_unlikely" |
|
Patch 2: "[2/6] riscv: pgtable: Convert to use_alternative_unlikely" |
|
Patch 2: "[2/6] riscv: pgtable: Convert to use_alternative_unlikely" |
|
Patch 4: "[4/6] riscv: hweight: Convert to use_alternative_likely" |
|
Patch 4: "[4/6] riscv: hweight: Convert to use_alternative_likely" |
|
Patch 4: "[4/6] riscv: hweight: Convert to use_alternative_likely" |
|
Patch 4: "[4/6] riscv: hweight: Convert to use_alternative_likely" |
|
Patch 5: "[5/6] riscv: bitops: Convert to use_alternative_likely" |
|
Patch 5: "[5/6] riscv: bitops: Convert to use_alternative_likely" |
|
Patch 5: "[5/6] riscv: bitops: Convert to use_alternative_likely" |
|
Patch 5: "[5/6] riscv: bitops: Convert to use_alternative_likely" |
|
Patch 5: "[5/6] riscv: bitops: Convert to use_alternative_likely" |
|
Patch 5: "[5/6] riscv: bitops: Convert to use_alternative_likely" |
|
Patch 5: "[5/6] riscv: bitops: Convert to use_alternative_likely" |
|
Patch 5: "[5/6] riscv: bitops: Convert to use_alternative_likely" |
|
Patch 5: "[5/6] riscv: bitops: Convert to use_alternative_likely" |
|
Patch 5: "[5/6] riscv: bitops: Convert to use_alternative_likely" |
|
Patch 5: "[5/6] riscv: bitops: Convert to use_alternative_likely" |
|
Patch 5: "[5/6] riscv: bitops: Convert to use_alternative_likely" |
|
Patch 6: "[6/6] riscv: cmpxchg: Convert to use_alternative_likely" |
|
Patch 6: "[6/6] riscv: cmpxchg: Convert to use_alternative_likely" |
|
Patch 6: "[6/6] riscv: cmpxchg: Convert to use_alternative_likely" |
|
Patch 6: "[6/6] riscv: cmpxchg: Convert to use_alternative_likely" |
|
Patch 6: "[6/6] riscv: cmpxchg: Convert to use_alternative_likely" |
|
Patch 6: "[6/6] riscv: cmpxchg: Convert to use_alternative_likely" |
|
Patch 6: "[6/6] riscv: cmpxchg: Convert to use_alternative_likely" |
|
Patch 6: "[6/6] riscv: cmpxchg: Convert to use_alternative_likely" |
|
Patch 6: "[6/6] riscv: cmpxchg: Convert to use_alternative_likely" |
|
Patch 6: "[6/6] riscv: cmpxchg: Convert to use_alternative_likely" |
|
Patch 6: "[6/6] riscv: cmpxchg: Convert to use_alternative_likely" |
|
Patch 6: "[6/6] riscv: cmpxchg: Convert to use_alternative_likely" |
PR for series 993555 applied to workflow__riscv__fixes
Name: riscv: Add helpers use_alternative_{likely,unlikely}
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=993555
Version: 1