* [PATCH -next] cpuidle: riscv: support non-SMP config
@ 2022-04-03 3:13 ` Randy Dunlap
0 siblings, 0 replies; 10+ messages in thread
From: Randy Dunlap @ 2022-04-03 3:13 UTC (permalink / raw)
To: linux-kernel
Cc: Randy Dunlap, kernel test robot, Anup Patel, Anup Patel,
Anup Patel, Atish Patra, Daniel Lezcano, Rafael J. Wysocki,
linux-pm, linux-riscv, Palmer Dabbelt, Paul Walmsley, Albert Ou
Add <asm/smp.h> for cpuid_to_hartid_map etc.
This is needed for both SMP and non-SMP builds, but not having it
causes a build error for non-SMP:
drivers/cpuidle/cpuidle-riscv-sbi.c: In function 'sbi_cpuidle_init_cpu':
drivers/cpuidle/cpuidle-riscv-sbi.c:350:26: error: implicit declaration of function 'cpuid_to_hartid_map' [-Werror=implicit-function-declaration]
Fixes: 6abf32f1d9c5 ("cpuidle: Add RISC-V SBI CPU idle driver")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: kernel test robot <lkp@intel.com>
Cc: Anup Patel <anup.patel@wdc.com>
Cc: Anup Patel <anup@brainfault.org>
Cc: Anup Patel <apatel@ventanamicro.com>
Cc: Atish Patra <atishp@rivosinc.com>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: linux-pm@vger.kernel.org
Cc: linux-riscv@lists.infradead.org
Cc: Palmer Dabbelt <palmer@rivosinc.com>
Cc: Paul Walmsley <paul.walmsley@sifive.com>
Cc: Albert Ou <aou@eecs.berkeley.edu>
---
drivers/cpuidle/cpuidle-riscv-sbi.c | 1 +
1 file changed, 1 insertion(+)
--- linux-next-20220401.orig/drivers/cpuidle/cpuidle-riscv-sbi.c
+++ linux-next-20220401/drivers/cpuidle/cpuidle-riscv-sbi.c
@@ -22,6 +22,7 @@
#include <linux/pm_runtime.h>
#include <asm/cpuidle.h>
#include <asm/sbi.h>
+#include <asm/smp.h>
#include <asm/suspend.h>
#include "dt_idle_states.h"
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH -next] cpuidle: riscv: support non-SMP config
@ 2022-04-03 3:13 ` Randy Dunlap
0 siblings, 0 replies; 10+ messages in thread
From: Randy Dunlap @ 2022-04-03 3:13 UTC (permalink / raw)
To: linux-kernel
Cc: Randy Dunlap, kernel test robot, Anup Patel, Anup Patel,
Anup Patel, Atish Patra, Daniel Lezcano, Rafael J. Wysocki,
linux-pm, linux-riscv, Palmer Dabbelt, Paul Walmsley, Albert Ou
Add <asm/smp.h> for cpuid_to_hartid_map etc.
This is needed for both SMP and non-SMP builds, but not having it
causes a build error for non-SMP:
drivers/cpuidle/cpuidle-riscv-sbi.c: In function 'sbi_cpuidle_init_cpu':
drivers/cpuidle/cpuidle-riscv-sbi.c:350:26: error: implicit declaration of function 'cpuid_to_hartid_map' [-Werror=implicit-function-declaration]
Fixes: 6abf32f1d9c5 ("cpuidle: Add RISC-V SBI CPU idle driver")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: kernel test robot <lkp@intel.com>
Cc: Anup Patel <anup.patel@wdc.com>
Cc: Anup Patel <anup@brainfault.org>
Cc: Anup Patel <apatel@ventanamicro.com>
Cc: Atish Patra <atishp@rivosinc.com>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: linux-pm@vger.kernel.org
Cc: linux-riscv@lists.infradead.org
Cc: Palmer Dabbelt <palmer@rivosinc.com>
Cc: Paul Walmsley <paul.walmsley@sifive.com>
Cc: Albert Ou <aou@eecs.berkeley.edu>
---
drivers/cpuidle/cpuidle-riscv-sbi.c | 1 +
1 file changed, 1 insertion(+)
--- linux-next-20220401.orig/drivers/cpuidle/cpuidle-riscv-sbi.c
+++ linux-next-20220401/drivers/cpuidle/cpuidle-riscv-sbi.c
@@ -22,6 +22,7 @@
#include <linux/pm_runtime.h>
#include <asm/cpuidle.h>
#include <asm/sbi.h>
+#include <asm/smp.h>
#include <asm/suspend.h>
#include "dt_idle_states.h"
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH -next] cpuidle: riscv: support non-SMP config
2022-04-03 3:13 ` Randy Dunlap
@ 2022-04-04 3:05 ` Anup Patel
-1 siblings, 0 replies; 10+ messages in thread
From: Anup Patel @ 2022-04-04 3:05 UTC (permalink / raw)
To: Randy Dunlap
Cc: linux-kernel@vger.kernel.org List, kernel test robot, Anup Patel,
Atish Patra, Daniel Lezcano, Rafael J. Wysocki,
open list:THERMAL, linux-riscv, Palmer Dabbelt, Paul Walmsley,
Albert Ou
(Removed my WDC email because it does not exist anymore)
On Sun, Apr 3, 2022 at 8:44 AM Randy Dunlap <rdunlap@infradead.org> wrote:
>
> Add <asm/smp.h> for cpuid_to_hartid_map etc.
> This is needed for both SMP and non-SMP builds, but not having it
> causes a build error for non-SMP:
>
> drivers/cpuidle/cpuidle-riscv-sbi.c: In function 'sbi_cpuidle_init_cpu':
> drivers/cpuidle/cpuidle-riscv-sbi.c:350:26: error: implicit declaration of function 'cpuid_to_hartid_map' [-Werror=implicit-function-declaration]
>
> Fixes: 6abf32f1d9c5 ("cpuidle: Add RISC-V SBI CPU idle driver")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Reported-by: kernel test robot <lkp@intel.com>
> Cc: Anup Patel <anup.patel@wdc.com>
> Cc: Anup Patel <anup@brainfault.org>
> Cc: Anup Patel <apatel@ventanamicro.com>
> Cc: Atish Patra <atishp@rivosinc.com>
> Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
> Cc: "Rafael J. Wysocki" <rafael@kernel.org>
> Cc: linux-pm@vger.kernel.org
> Cc: linux-riscv@lists.infradead.org
> Cc: Palmer Dabbelt <palmer@rivosinc.com>
> Cc: Paul Walmsley <paul.walmsley@sifive.com>
> Cc: Albert Ou <aou@eecs.berkeley.edu>
> ---
> drivers/cpuidle/cpuidle-riscv-sbi.c | 1 +
> 1 file changed, 1 insertion(+)
>
> --- linux-next-20220401.orig/drivers/cpuidle/cpuidle-riscv-sbi.c
> +++ linux-next-20220401/drivers/cpuidle/cpuidle-riscv-sbi.c
> @@ -22,6 +22,7 @@
> #include <linux/pm_runtime.h>
> #include <asm/cpuidle.h>
> #include <asm/sbi.h>
> +#include <asm/smp.h>
I suggest include linux/smp.h here instead of asm/smp.h
Otherwise it looks good to me.
Reviewed-by: Anup Patel <anup@brainfault.org>
Regards,
Anup
> #include <asm/suspend.h>
>
> #include "dt_idle_states.h"
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH -next] cpuidle: riscv: support non-SMP config
@ 2022-04-04 3:05 ` Anup Patel
0 siblings, 0 replies; 10+ messages in thread
From: Anup Patel @ 2022-04-04 3:05 UTC (permalink / raw)
To: Randy Dunlap
Cc: linux-kernel@vger.kernel.org List, kernel test robot, Anup Patel,
Atish Patra, Daniel Lezcano, Rafael J. Wysocki,
open list:THERMAL, linux-riscv, Palmer Dabbelt, Paul Walmsley,
Albert Ou
(Removed my WDC email because it does not exist anymore)
On Sun, Apr 3, 2022 at 8:44 AM Randy Dunlap <rdunlap@infradead.org> wrote:
>
> Add <asm/smp.h> for cpuid_to_hartid_map etc.
> This is needed for both SMP and non-SMP builds, but not having it
> causes a build error for non-SMP:
>
> drivers/cpuidle/cpuidle-riscv-sbi.c: In function 'sbi_cpuidle_init_cpu':
> drivers/cpuidle/cpuidle-riscv-sbi.c:350:26: error: implicit declaration of function 'cpuid_to_hartid_map' [-Werror=implicit-function-declaration]
>
> Fixes: 6abf32f1d9c5 ("cpuidle: Add RISC-V SBI CPU idle driver")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Reported-by: kernel test robot <lkp@intel.com>
> Cc: Anup Patel <anup.patel@wdc.com>
> Cc: Anup Patel <anup@brainfault.org>
> Cc: Anup Patel <apatel@ventanamicro.com>
> Cc: Atish Patra <atishp@rivosinc.com>
> Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
> Cc: "Rafael J. Wysocki" <rafael@kernel.org>
> Cc: linux-pm@vger.kernel.org
> Cc: linux-riscv@lists.infradead.org
> Cc: Palmer Dabbelt <palmer@rivosinc.com>
> Cc: Paul Walmsley <paul.walmsley@sifive.com>
> Cc: Albert Ou <aou@eecs.berkeley.edu>
> ---
> drivers/cpuidle/cpuidle-riscv-sbi.c | 1 +
> 1 file changed, 1 insertion(+)
>
> --- linux-next-20220401.orig/drivers/cpuidle/cpuidle-riscv-sbi.c
> +++ linux-next-20220401/drivers/cpuidle/cpuidle-riscv-sbi.c
> @@ -22,6 +22,7 @@
> #include <linux/pm_runtime.h>
> #include <asm/cpuidle.h>
> #include <asm/sbi.h>
> +#include <asm/smp.h>
I suggest include linux/smp.h here instead of asm/smp.h
Otherwise it looks good to me.
Reviewed-by: Anup Patel <anup@brainfault.org>
Regards,
Anup
> #include <asm/suspend.h>
>
> #include "dt_idle_states.h"
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH -next] cpuidle: riscv: support non-SMP config
2022-04-04 3:05 ` Anup Patel
@ 2022-04-04 3:36 ` Randy Dunlap
-1 siblings, 0 replies; 10+ messages in thread
From: Randy Dunlap @ 2022-04-04 3:36 UTC (permalink / raw)
To: Anup Patel
Cc: linux-kernel@vger.kernel.org List, kernel test robot, Anup Patel,
Atish Patra, Daniel Lezcano, Rafael J. Wysocki,
open list:THERMAL, linux-riscv, Palmer Dabbelt, Paul Walmsley,
Albert Ou
On 4/3/22 20:05, Anup Patel wrote:
> (Removed my WDC email because it does not exist anymore)
>
> On Sun, Apr 3, 2022 at 8:44 AM Randy Dunlap <rdunlap@infradead.org> wrote:
>>
>> Add <asm/smp.h> for cpuid_to_hartid_map etc.
>> This is needed for both SMP and non-SMP builds, but not having it
>> causes a build error for non-SMP:
>>
>> drivers/cpuidle/cpuidle-riscv-sbi.c: In function 'sbi_cpuidle_init_cpu':
>> drivers/cpuidle/cpuidle-riscv-sbi.c:350:26: error: implicit declaration of function 'cpuid_to_hartid_map' [-Werror=implicit-function-declaration]
>>
>> Fixes: 6abf32f1d9c5 ("cpuidle: Add RISC-V SBI CPU idle driver")
>> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
>> Reported-by: kernel test robot <lkp@intel.com>
>> Cc: Anup Patel <anup.patel@wdc.com>
>> Cc: Anup Patel <anup@brainfault.org>
>> Cc: Anup Patel <apatel@ventanamicro.com>
>> Cc: Atish Patra <atishp@rivosinc.com>
>> Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
>> Cc: "Rafael J. Wysocki" <rafael@kernel.org>
>> Cc: linux-pm@vger.kernel.org
>> Cc: linux-riscv@lists.infradead.org
>> Cc: Palmer Dabbelt <palmer@rivosinc.com>
>> Cc: Paul Walmsley <paul.walmsley@sifive.com>
>> Cc: Albert Ou <aou@eecs.berkeley.edu>
>> ---
>> drivers/cpuidle/cpuidle-riscv-sbi.c | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> --- linux-next-20220401.orig/drivers/cpuidle/cpuidle-riscv-sbi.c
>> +++ linux-next-20220401/drivers/cpuidle/cpuidle-riscv-sbi.c
>> @@ -22,6 +22,7 @@
>> #include <linux/pm_runtime.h>
>> #include <asm/cpuidle.h>
>> #include <asm/sbi.h>
>> +#include <asm/smp.h>
>
> I suggest include linux/smp.h here instead of asm/smp.h
>
> Otherwise it looks good to me.
>
> Reviewed-by: Anup Patel <anup@brainfault.org>
>
Yeah, checkpatch also suggested that but it does not work.
Yes, I tested it.
linux/smp.h only #includes <asm/smp.h> if CONFIG_SMP is enabled,
and this patch needs <asm/smp.h> for the non-SMP case.
>
>> #include <asm/suspend.h>
>>
>> #include "dt_idle_states.h"
thanks.
--
~Randy
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH -next] cpuidle: riscv: support non-SMP config
@ 2022-04-04 3:36 ` Randy Dunlap
0 siblings, 0 replies; 10+ messages in thread
From: Randy Dunlap @ 2022-04-04 3:36 UTC (permalink / raw)
To: Anup Patel
Cc: linux-kernel@vger.kernel.org List, kernel test robot, Anup Patel,
Atish Patra, Daniel Lezcano, Rafael J. Wysocki,
open list:THERMAL, linux-riscv, Palmer Dabbelt, Paul Walmsley,
Albert Ou
On 4/3/22 20:05, Anup Patel wrote:
> (Removed my WDC email because it does not exist anymore)
>
> On Sun, Apr 3, 2022 at 8:44 AM Randy Dunlap <rdunlap@infradead.org> wrote:
>>
>> Add <asm/smp.h> for cpuid_to_hartid_map etc.
>> This is needed for both SMP and non-SMP builds, but not having it
>> causes a build error for non-SMP:
>>
>> drivers/cpuidle/cpuidle-riscv-sbi.c: In function 'sbi_cpuidle_init_cpu':
>> drivers/cpuidle/cpuidle-riscv-sbi.c:350:26: error: implicit declaration of function 'cpuid_to_hartid_map' [-Werror=implicit-function-declaration]
>>
>> Fixes: 6abf32f1d9c5 ("cpuidle: Add RISC-V SBI CPU idle driver")
>> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
>> Reported-by: kernel test robot <lkp@intel.com>
>> Cc: Anup Patel <anup.patel@wdc.com>
>> Cc: Anup Patel <anup@brainfault.org>
>> Cc: Anup Patel <apatel@ventanamicro.com>
>> Cc: Atish Patra <atishp@rivosinc.com>
>> Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
>> Cc: "Rafael J. Wysocki" <rafael@kernel.org>
>> Cc: linux-pm@vger.kernel.org
>> Cc: linux-riscv@lists.infradead.org
>> Cc: Palmer Dabbelt <palmer@rivosinc.com>
>> Cc: Paul Walmsley <paul.walmsley@sifive.com>
>> Cc: Albert Ou <aou@eecs.berkeley.edu>
>> ---
>> drivers/cpuidle/cpuidle-riscv-sbi.c | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> --- linux-next-20220401.orig/drivers/cpuidle/cpuidle-riscv-sbi.c
>> +++ linux-next-20220401/drivers/cpuidle/cpuidle-riscv-sbi.c
>> @@ -22,6 +22,7 @@
>> #include <linux/pm_runtime.h>
>> #include <asm/cpuidle.h>
>> #include <asm/sbi.h>
>> +#include <asm/smp.h>
>
> I suggest include linux/smp.h here instead of asm/smp.h
>
> Otherwise it looks good to me.
>
> Reviewed-by: Anup Patel <anup@brainfault.org>
>
Yeah, checkpatch also suggested that but it does not work.
Yes, I tested it.
linux/smp.h only #includes <asm/smp.h> if CONFIG_SMP is enabled,
and this patch needs <asm/smp.h> for the non-SMP case.
>
>> #include <asm/suspend.h>
>>
>> #include "dt_idle_states.h"
thanks.
--
~Randy
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH -next] cpuidle: riscv: support non-SMP config
2022-04-04 3:36 ` Randy Dunlap
@ 2022-04-04 3:38 ` Anup Patel
-1 siblings, 0 replies; 10+ messages in thread
From: Anup Patel @ 2022-04-04 3:38 UTC (permalink / raw)
To: Randy Dunlap
Cc: linux-kernel@vger.kernel.org List, kernel test robot, Anup Patel,
Atish Patra, Daniel Lezcano, Rafael J. Wysocki,
open list:THERMAL, linux-riscv, Palmer Dabbelt, Paul Walmsley,
Albert Ou
On Mon, Apr 4, 2022 at 9:07 AM Randy Dunlap <rdunlap@infradead.org> wrote:
>
>
>
> On 4/3/22 20:05, Anup Patel wrote:
> > (Removed my WDC email because it does not exist anymore)
> >
> > On Sun, Apr 3, 2022 at 8:44 AM Randy Dunlap <rdunlap@infradead.org> wrote:
> >>
> >> Add <asm/smp.h> for cpuid_to_hartid_map etc.
> >> This is needed for both SMP and non-SMP builds, but not having it
> >> causes a build error for non-SMP:
> >>
> >> drivers/cpuidle/cpuidle-riscv-sbi.c: In function 'sbi_cpuidle_init_cpu':
> >> drivers/cpuidle/cpuidle-riscv-sbi.c:350:26: error: implicit declaration of function 'cpuid_to_hartid_map' [-Werror=implicit-function-declaration]
> >>
> >> Fixes: 6abf32f1d9c5 ("cpuidle: Add RISC-V SBI CPU idle driver")
> >> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> >> Reported-by: kernel test robot <lkp@intel.com>
> >> Cc: Anup Patel <anup.patel@wdc.com>
> >> Cc: Anup Patel <anup@brainfault.org>
> >> Cc: Anup Patel <apatel@ventanamicro.com>
> >> Cc: Atish Patra <atishp@rivosinc.com>
> >> Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
> >> Cc: "Rafael J. Wysocki" <rafael@kernel.org>
> >> Cc: linux-pm@vger.kernel.org
> >> Cc: linux-riscv@lists.infradead.org
> >> Cc: Palmer Dabbelt <palmer@rivosinc.com>
> >> Cc: Paul Walmsley <paul.walmsley@sifive.com>
> >> Cc: Albert Ou <aou@eecs.berkeley.edu>
> >> ---
> >> drivers/cpuidle/cpuidle-riscv-sbi.c | 1 +
> >> 1 file changed, 1 insertion(+)
> >>
> >> --- linux-next-20220401.orig/drivers/cpuidle/cpuidle-riscv-sbi.c
> >> +++ linux-next-20220401/drivers/cpuidle/cpuidle-riscv-sbi.c
> >> @@ -22,6 +22,7 @@
> >> #include <linux/pm_runtime.h>
> >> #include <asm/cpuidle.h>
> >> #include <asm/sbi.h>
> >> +#include <asm/smp.h>
> >
> > I suggest include linux/smp.h here instead of asm/smp.h
> >
> > Otherwise it looks good to me.
> >
> > Reviewed-by: Anup Patel <anup@brainfault.org>
> >
>
> Yeah, checkpatch also suggested that but it does not work.
> Yes, I tested it.
>
> linux/smp.h only #includes <asm/smp.h> if CONFIG_SMP is enabled,
> and this patch needs <asm/smp.h> for the non-SMP case.
Okay, sounds good to me.
No changes needed in this patch.
Regards,
Anup
>
> >
> >> #include <asm/suspend.h>
> >>
> >> #include "dt_idle_states.h"
>
> thanks.
> --
> ~Randy
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH -next] cpuidle: riscv: support non-SMP config
@ 2022-04-04 3:38 ` Anup Patel
0 siblings, 0 replies; 10+ messages in thread
From: Anup Patel @ 2022-04-04 3:38 UTC (permalink / raw)
To: Randy Dunlap
Cc: linux-kernel@vger.kernel.org List, kernel test robot, Anup Patel,
Atish Patra, Daniel Lezcano, Rafael J. Wysocki,
open list:THERMAL, linux-riscv, Palmer Dabbelt, Paul Walmsley,
Albert Ou
On Mon, Apr 4, 2022 at 9:07 AM Randy Dunlap <rdunlap@infradead.org> wrote:
>
>
>
> On 4/3/22 20:05, Anup Patel wrote:
> > (Removed my WDC email because it does not exist anymore)
> >
> > On Sun, Apr 3, 2022 at 8:44 AM Randy Dunlap <rdunlap@infradead.org> wrote:
> >>
> >> Add <asm/smp.h> for cpuid_to_hartid_map etc.
> >> This is needed for both SMP and non-SMP builds, but not having it
> >> causes a build error for non-SMP:
> >>
> >> drivers/cpuidle/cpuidle-riscv-sbi.c: In function 'sbi_cpuidle_init_cpu':
> >> drivers/cpuidle/cpuidle-riscv-sbi.c:350:26: error: implicit declaration of function 'cpuid_to_hartid_map' [-Werror=implicit-function-declaration]
> >>
> >> Fixes: 6abf32f1d9c5 ("cpuidle: Add RISC-V SBI CPU idle driver")
> >> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> >> Reported-by: kernel test robot <lkp@intel.com>
> >> Cc: Anup Patel <anup.patel@wdc.com>
> >> Cc: Anup Patel <anup@brainfault.org>
> >> Cc: Anup Patel <apatel@ventanamicro.com>
> >> Cc: Atish Patra <atishp@rivosinc.com>
> >> Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
> >> Cc: "Rafael J. Wysocki" <rafael@kernel.org>
> >> Cc: linux-pm@vger.kernel.org
> >> Cc: linux-riscv@lists.infradead.org
> >> Cc: Palmer Dabbelt <palmer@rivosinc.com>
> >> Cc: Paul Walmsley <paul.walmsley@sifive.com>
> >> Cc: Albert Ou <aou@eecs.berkeley.edu>
> >> ---
> >> drivers/cpuidle/cpuidle-riscv-sbi.c | 1 +
> >> 1 file changed, 1 insertion(+)
> >>
> >> --- linux-next-20220401.orig/drivers/cpuidle/cpuidle-riscv-sbi.c
> >> +++ linux-next-20220401/drivers/cpuidle/cpuidle-riscv-sbi.c
> >> @@ -22,6 +22,7 @@
> >> #include <linux/pm_runtime.h>
> >> #include <asm/cpuidle.h>
> >> #include <asm/sbi.h>
> >> +#include <asm/smp.h>
> >
> > I suggest include linux/smp.h here instead of asm/smp.h
> >
> > Otherwise it looks good to me.
> >
> > Reviewed-by: Anup Patel <anup@brainfault.org>
> >
>
> Yeah, checkpatch also suggested that but it does not work.
> Yes, I tested it.
>
> linux/smp.h only #includes <asm/smp.h> if CONFIG_SMP is enabled,
> and this patch needs <asm/smp.h> for the non-SMP case.
Okay, sounds good to me.
No changes needed in this patch.
Regards,
Anup
>
> >
> >> #include <asm/suspend.h>
> >>
> >> #include "dt_idle_states.h"
>
> thanks.
> --
> ~Randy
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH -next] cpuidle: riscv: support non-SMP config
2022-04-03 3:13 ` Randy Dunlap
@ 2022-04-20 1:07 ` Palmer Dabbelt
-1 siblings, 0 replies; 10+ messages in thread
From: Palmer Dabbelt @ 2022-04-20 1:07 UTC (permalink / raw)
To: rdunlap
Cc: linux-kernel, rdunlap, lkp, anup, anup, apatel, Atish Patra,
daniel.lezcano, rafael, linux-pm, linux-riscv, Paul Walmsley,
aou
On Sat, 02 Apr 2022 20:13:55 PDT (-0700), rdunlap@infradead.org wrote:
> Add <asm/smp.h> for cpuid_to_hartid_map etc.
> This is needed for both SMP and non-SMP builds, but not having it
> causes a build error for non-SMP:
>
> drivers/cpuidle/cpuidle-riscv-sbi.c: In function 'sbi_cpuidle_init_cpu':
> drivers/cpuidle/cpuidle-riscv-sbi.c:350:26: error: implicit declaration of function 'cpuid_to_hartid_map' [-Werror=implicit-function-declaration]
>
> Fixes: 6abf32f1d9c5 ("cpuidle: Add RISC-V SBI CPU idle driver")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Reported-by: kernel test robot <lkp@intel.com>
> Cc: Anup Patel <anup.patel@wdc.com>
> Cc: Anup Patel <anup@brainfault.org>
> Cc: Anup Patel <apatel@ventanamicro.com>
> Cc: Atish Patra <atishp@rivosinc.com>
> Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
> Cc: "Rafael J. Wysocki" <rafael@kernel.org>
> Cc: linux-pm@vger.kernel.org
> Cc: linux-riscv@lists.infradead.org
> Cc: Palmer Dabbelt <palmer@rivosinc.com>
> Cc: Paul Walmsley <paul.walmsley@sifive.com>
> Cc: Albert Ou <aou@eecs.berkeley.edu>
> ---
> drivers/cpuidle/cpuidle-riscv-sbi.c | 1 +
> 1 file changed, 1 insertion(+)
>
> --- linux-next-20220401.orig/drivers/cpuidle/cpuidle-riscv-sbi.c
> +++ linux-next-20220401/drivers/cpuidle/cpuidle-riscv-sbi.c
> @@ -22,6 +22,7 @@
> #include <linux/pm_runtime.h>
> #include <asm/cpuidle.h>
> #include <asm/sbi.h>
> +#include <asm/smp.h>
> #include <asm/suspend.h>
>
> #include "dt_idle_states.h"
Thanks, this is on fixes.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH -next] cpuidle: riscv: support non-SMP config
@ 2022-04-20 1:07 ` Palmer Dabbelt
0 siblings, 0 replies; 10+ messages in thread
From: Palmer Dabbelt @ 2022-04-20 1:07 UTC (permalink / raw)
To: rdunlap
Cc: linux-kernel, rdunlap, lkp, anup, anup, apatel, Atish Patra,
daniel.lezcano, rafael, linux-pm, linux-riscv, Paul Walmsley,
aou
On Sat, 02 Apr 2022 20:13:55 PDT (-0700), rdunlap@infradead.org wrote:
> Add <asm/smp.h> for cpuid_to_hartid_map etc.
> This is needed for both SMP and non-SMP builds, but not having it
> causes a build error for non-SMP:
>
> drivers/cpuidle/cpuidle-riscv-sbi.c: In function 'sbi_cpuidle_init_cpu':
> drivers/cpuidle/cpuidle-riscv-sbi.c:350:26: error: implicit declaration of function 'cpuid_to_hartid_map' [-Werror=implicit-function-declaration]
>
> Fixes: 6abf32f1d9c5 ("cpuidle: Add RISC-V SBI CPU idle driver")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Reported-by: kernel test robot <lkp@intel.com>
> Cc: Anup Patel <anup.patel@wdc.com>
> Cc: Anup Patel <anup@brainfault.org>
> Cc: Anup Patel <apatel@ventanamicro.com>
> Cc: Atish Patra <atishp@rivosinc.com>
> Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
> Cc: "Rafael J. Wysocki" <rafael@kernel.org>
> Cc: linux-pm@vger.kernel.org
> Cc: linux-riscv@lists.infradead.org
> Cc: Palmer Dabbelt <palmer@rivosinc.com>
> Cc: Paul Walmsley <paul.walmsley@sifive.com>
> Cc: Albert Ou <aou@eecs.berkeley.edu>
> ---
> drivers/cpuidle/cpuidle-riscv-sbi.c | 1 +
> 1 file changed, 1 insertion(+)
>
> --- linux-next-20220401.orig/drivers/cpuidle/cpuidle-riscv-sbi.c
> +++ linux-next-20220401/drivers/cpuidle/cpuidle-riscv-sbi.c
> @@ -22,6 +22,7 @@
> #include <linux/pm_runtime.h>
> #include <asm/cpuidle.h>
> #include <asm/sbi.h>
> +#include <asm/smp.h>
> #include <asm/suspend.h>
>
> #include "dt_idle_states.h"
Thanks, this is on fixes.
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2022-04-20 1:07 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-03 3:13 [PATCH -next] cpuidle: riscv: support non-SMP config Randy Dunlap
2022-04-03 3:13 ` Randy Dunlap
2022-04-04 3:05 ` Anup Patel
2022-04-04 3:05 ` Anup Patel
2022-04-04 3:36 ` Randy Dunlap
2022-04-04 3:36 ` Randy Dunlap
2022-04-04 3:38 ` Anup Patel
2022-04-04 3:38 ` Anup Patel
2022-04-20 1:07 ` Palmer Dabbelt
2022-04-20 1:07 ` Palmer Dabbelt
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.