[PATCH 1/3] soc: sifive: Add SiFive private L2 cache support
Christophe JAILLET
christophe.jaillet at wanadoo.fr
Fri Jun 16 12:02:09 PDT 2023
Le 16/06/2023 à 08:32, Eric Lin a écrit :
> This adds SiFive private L2 cache driver which will show
> cache config information when booting and add cpu hotplug
> callback functions.
>
> Signed-off-by: Eric Lin <eric.lin-SpMDHPYPyPbQT0dZR+AlfA at public.gmane.org>
> Signed-off-by: Nick Hu <nick.hu-SpMDHPYPyPbQT0dZR+AlfA at public.gmane.org>
> Reviewed-by: Zong Li <zong.li-SpMDHPYPyPbQT0dZR+AlfA at public.gmane.org>
[...]
> +static int __init sifive_pl2_cache_init(void)
> +{
> + int ret;
> +
> + ret = cpuhp_setup_state(CPUHP_AP_RISCV_SIFIVE_PL2_ONLINE,
> + "soc/sifive/pl2:online",
> + sifive_pl2_online_cpu,
> + sifive_pl2_offline_cpu);
> + if (ret < 0) {
> + pr_err("Failed to register CPU hotplug notifier %d\n", ret);
> + return ret;
> + }
> +
> + ret = platform_driver_register(&sifive_pl2_cache_driver);
> + if (ret) {
> + pr_err("Failed to register sifive_pl2_cache_driver: %d\n", ret);
Blind guess: does cpuhp_remove_state() needs to be called?
> + return ret;
> + }
> +
> + sifive_pl2_pm_init();
> +
> + return ret;
If you send a v2, return 0; would be slighly nicer here.
CJ
> +}
[...]
More information about the linux-riscv
mailing list