From: Atish Patra <atish.patra@linux.dev>
To: Anup Patel <apatel@ventanamicro.com>,
Sunil V L <sunilvl@ventanamicro.com>,
"Rafael J . Wysocki" <rafael@kernel.org>
Cc: Palmer Dabbelt <palmer@dabbelt.com>,
Paul Walmsley <paul.walmsley@sifive.com>,
Alexandre Ghiti <alex@ghiti.fr>, Len Brown <lenb@kernel.org>,
Andrew Jones <ajones@ventanamicro.com>,
Anup Patel <anup@brainfault.org>, Will Deacon <will@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
linux-acpi@vger.kernel.org, linux-riscv@lists.infradead.org,
linux-kernel@vger.kernel.org,
Troy Mitchell <troy.mitchell@linux.dev>
Subject: Re: [PATCH v2 1/2] ACPI: RISC-V: Fix FFH_CPPC_CSR error handling
Date: Mon, 18 Aug 2025 12:26:13 -0700 [thread overview]
Message-ID: <2a7e2450-5e31-40d6-bca4-ccc2c1d60b72@linux.dev> (raw)
In-Reply-To: <20250818143600.894385-2-apatel@ventanamicro.com>
On 8/18/25 7:35 AM, Anup Patel wrote:
> The cppc_ffh_csr_read() and cppc_ffh_csr_write() returns Linux error
> code in "data->ret.error" so cpc_read_ffh() and cpc_write_ffh() must
> not use sbi_err_map_linux_errno() for FFH_CPPC_CSR.
>
> Fixes: 30f3ffbee86b ("ACPI: RISC-V: Add CPPC driver")
> Signed-off-by: Anup Patel <apatel@ventanamicro.com>
> Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
> Reviewed-by: Troy Mitchell <troy.mitchell@linux.dev>
> ---
> drivers/acpi/riscv/cppc.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/acpi/riscv/cppc.c b/drivers/acpi/riscv/cppc.c
> index 440cf9fb91aa..42c1a9052470 100644
> --- a/drivers/acpi/riscv/cppc.c
> +++ b/drivers/acpi/riscv/cppc.c
> @@ -119,7 +119,7 @@ int cpc_read_ffh(int cpu, struct cpc_reg *reg, u64 *val)
>
> *val = data.ret.value;
>
> - return (data.ret.error) ? sbi_err_map_linux_errno(data.ret.error) : 0;
> + return data.ret.error;
> }
>
> return -EINVAL;
> @@ -148,7 +148,7 @@ int cpc_write_ffh(int cpu, struct cpc_reg *reg, u64 val)
>
> smp_call_function_single(cpu, cppc_ffh_csr_write, &data, 1);
>
> - return (data.ret.error) ? sbi_err_map_linux_errno(data.ret.error) : 0;
> + return data.ret.error;
> }
>
> return -EINVAL;
Reviewed-by: Atish Patra <atishp@rivosinc.com>
WARNING: multiple messages have this Message-ID (diff)
From: Atish Patra <atish.patra@linux.dev>
To: Anup Patel <apatel@ventanamicro.com>,
Sunil V L <sunilvl@ventanamicro.com>,
"Rafael J . Wysocki" <rafael@kernel.org>
Cc: Palmer Dabbelt <palmer@dabbelt.com>,
Paul Walmsley <paul.walmsley@sifive.com>,
Alexandre Ghiti <alex@ghiti.fr>, Len Brown <lenb@kernel.org>,
Andrew Jones <ajones@ventanamicro.com>,
Anup Patel <anup@brainfault.org>, Will Deacon <will@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
linux-acpi@vger.kernel.org, linux-riscv@lists.infradead.org,
linux-kernel@vger.kernel.org,
Troy Mitchell <troy.mitchell@linux.dev>
Subject: Re: [PATCH v2 1/2] ACPI: RISC-V: Fix FFH_CPPC_CSR error handling
Date: Mon, 18 Aug 2025 12:26:13 -0700 [thread overview]
Message-ID: <2a7e2450-5e31-40d6-bca4-ccc2c1d60b72@linux.dev> (raw)
In-Reply-To: <20250818143600.894385-2-apatel@ventanamicro.com>
On 8/18/25 7:35 AM, Anup Patel wrote:
> The cppc_ffh_csr_read() and cppc_ffh_csr_write() returns Linux error
> code in "data->ret.error" so cpc_read_ffh() and cpc_write_ffh() must
> not use sbi_err_map_linux_errno() for FFH_CPPC_CSR.
>
> Fixes: 30f3ffbee86b ("ACPI: RISC-V: Add CPPC driver")
> Signed-off-by: Anup Patel <apatel@ventanamicro.com>
> Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
> Reviewed-by: Troy Mitchell <troy.mitchell@linux.dev>
> ---
> drivers/acpi/riscv/cppc.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/acpi/riscv/cppc.c b/drivers/acpi/riscv/cppc.c
> index 440cf9fb91aa..42c1a9052470 100644
> --- a/drivers/acpi/riscv/cppc.c
> +++ b/drivers/acpi/riscv/cppc.c
> @@ -119,7 +119,7 @@ int cpc_read_ffh(int cpu, struct cpc_reg *reg, u64 *val)
>
> *val = data.ret.value;
>
> - return (data.ret.error) ? sbi_err_map_linux_errno(data.ret.error) : 0;
> + return data.ret.error;
> }
>
> return -EINVAL;
> @@ -148,7 +148,7 @@ int cpc_write_ffh(int cpu, struct cpc_reg *reg, u64 val)
>
> smp_call_function_single(cpu, cppc_ffh_csr_write, &data, 1);
>
> - return (data.ret.error) ? sbi_err_map_linux_errno(data.ret.error) : 0;
> + return data.ret.error;
> }
>
> return -EINVAL;
Reviewed-by: Atish Patra <atishp@rivosinc.com>
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2025-08-18 19:26 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-18 14:35 [PATCH v2 0/2] Common csr_read_num() and csr_write_num() for RISC-V Anup Patel
2025-08-18 14:35 ` Anup Patel
2025-08-18 14:35 ` [PATCH v2 1/2] ACPI: RISC-V: Fix FFH_CPPC_CSR error handling Anup Patel
2025-08-18 14:35 ` Anup Patel
2025-08-18 19:26 ` Atish Patra [this message]
2025-08-18 19:26 ` Atish Patra
2025-08-19 4:02 ` Nutty.Liu
2025-08-19 4:02 ` Nutty.Liu
2025-08-19 4:25 ` Sunil V L
2025-08-19 4:25 ` Sunil V L
2025-08-20 7:12 ` Alexandre Ghiti
2025-08-20 7:12 ` Alexandre Ghiti
2025-08-18 14:36 ` [PATCH v2 2/2] RISC-V: Add common csr_read_num() and csr_write_num() functions Anup Patel
2025-08-18 14:36 ` Anup Patel
2025-08-18 14:56 ` Andrew Jones
2025-08-18 14:56 ` Andrew Jones
2025-08-18 19:29 ` Atish Patra
2025-08-18 19:29 ` Atish Patra
2025-08-19 3:26 ` Yao Zi
2025-08-19 3:26 ` Yao Zi
2025-08-19 3:30 ` Anup Patel
2025-08-19 3:30 ` Anup Patel
2025-08-19 4:13 ` Yao Zi
2025-08-19 4:13 ` Yao Zi
2025-08-19 11:01 ` Anup Patel
2025-08-19 11:01 ` Anup Patel
2025-08-19 4:04 ` Nutty.Liu
2025-08-19 4:04 ` Nutty.Liu
2025-09-17 2:40 ` [PATCH v2 0/2] Common csr_read_num() and csr_write_num() for RISC-V patchwork-bot+linux-riscv
2025-09-17 2:40 ` patchwork-bot+linux-riscv
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2a7e2450-5e31-40d6-bca4-ccc2c1d60b72@linux.dev \
--to=atish.patra@linux.dev \
--cc=ajones@ventanamicro.com \
--cc=alex@ghiti.fr \
--cc=anup@brainfault.org \
--cc=apatel@ventanamicro.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=mark.rutland@arm.com \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=rafael@kernel.org \
--cc=sunilvl@ventanamicro.com \
--cc=troy.mitchell@linux.dev \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.