[PW_SID:971515] RISC-V: turn sbi_ecall into a variadic macro#519
[PW_SID:971515] RISC-V: turn sbi_ecall into a variadic macro#519linux-riscv-bot wants to merge 2 commits into
Conversation
Counting the arguments to sbi_ecall() and padding with zeros gets old pretty quick. It's also harder to distinguish a tailing 0 argument and the padding. The patch changes sbi_ecall() to accept anything between 1 and 8 integer arguments. Those who can count are also given sbi_ecall1() to sbi_ecall8(), which the variadic magic uses under the hood. The error messages upon a programmer error are a bit hairy, as expected of macros, and the static_assert is there to improve them a bit. The final goal would be avoid clobbering registers that are not used in the ecall, but we first have to fix the code generation around tracepoints if sbi_ecall is expected to be used in paths where performance is critical. Signed-off-by: Radim Krčmář <rkrcmar@ventanamicro.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
The new sbi_ecall doesn't have to list all 8 arguments anymore, so only pass the actual numbers of arguments for each SBI function. Trailing 0 is sometimes intentional. Signed-off-by: Radim Krčmář <rkrcmar@ventanamicro.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
|
Patch 1: "[1/2] RISC-V: sbi: turn sbi_ecall into variadic macro" |
|
Patch 1: "[1/2] RISC-V: sbi: turn sbi_ecall into variadic macro" |
|
Patch 1: "[1/2] RISC-V: sbi: turn sbi_ecall into variadic macro" |
|
Patch 1: "[1/2] RISC-V: sbi: turn sbi_ecall into variadic macro" |
|
Patch 1: "[1/2] RISC-V: sbi: turn sbi_ecall into variadic macro" |
|
Patch 1: "[1/2] RISC-V: sbi: turn sbi_ecall into variadic macro" |
|
Patch 1: "[1/2] RISC-V: sbi: turn sbi_ecall into variadic macro" |
|
Patch 1: "[1/2] RISC-V: sbi: turn sbi_ecall into variadic macro" |
|
Patch 1: "[1/2] RISC-V: sbi: turn sbi_ecall into variadic macro" |
|
Patch 1: "[1/2] RISC-V: sbi: turn sbi_ecall into variadic macro" |
|
Patch 1: "[1/2] RISC-V: sbi: turn sbi_ecall into variadic macro" |
|
Patch 1: "[1/2] RISC-V: sbi: turn sbi_ecall into variadic macro" |
|
Patch 2: "[2/2] RISC-V: make use of variadic sbi_ecall" |
|
Patch 2: "[2/2] RISC-V: make use of variadic sbi_ecall" |
|
Patch 2: "[2/2] RISC-V: make use of variadic sbi_ecall" |
|
Patch 2: "[2/2] RISC-V: make use of variadic sbi_ecall" |
|
Patch 2: "[2/2] RISC-V: make use of variadic sbi_ecall" |
|
Patch 2: "[2/2] RISC-V: make use of variadic sbi_ecall" |
|
Patch 2: "[2/2] RISC-V: make use of variadic sbi_ecall" |
|
Patch 2: "[2/2] RISC-V: make use of variadic sbi_ecall" |
|
Patch 2: "[2/2] RISC-V: make use of variadic sbi_ecall" |
|
Patch 2: "[2/2] RISC-V: make use of variadic sbi_ecall" |
|
Patch 2: "[2/2] RISC-V: make use of variadic sbi_ecall" |
|
Patch 2: "[2/2] RISC-V: make use of variadic sbi_ecall" |
PR for series 971515 applied to workflow__riscv__fixes
Name: RISC-V: turn sbi_ecall into a variadic macro
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=971515
Version: 1