2022-11-25 03:03:32

by Wang Honghui

[permalink] [raw]
Subject: [PATCH] clk-scpi: Modify to recall scpi_clocks_probe

Modify to recall scpi_clocks_probe
and add to support Phytium FT2000/4 CPUs

Signed-off-by: Wang Honghui <[email protected]>
---
drivers/clk/clk-scpi.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/drivers/clk/clk-scpi.c b/drivers/clk/clk-scpi.c
index a39af7616b13..fbc624c5a94a 100644
--- a/drivers/clk/clk-scpi.c
+++ b/drivers/clk/clk-scpi.c
@@ -268,8 +268,10 @@ static int scpi_clocks_probe(struct platform_device *pdev)
struct device_node *child, *np = dev->of_node;
const struct of_device_id *match;

+ /* Wang Honghui modified, the func will not be recalled
+ * if return -EIO, but will if return -EPROBE_DEFER */
if (!get_scpi_ops())
- return -ENXIO;
+ return -EPROBE_DEFER;

for_each_available_child_of_node(np, child) {
match = of_match_node(scpi_clk_match, child);
@@ -299,10 +301,18 @@ static const struct of_device_id scpi_clocks_ids[] = {
};
MODULE_DEVICE_TABLE(of, scpi_clocks_ids);

+/* Wang Honghui add to support Phytium FT2000/4 CPUs */
+static const struct acpi_device_id scpi_cpufreq_acpi_match[] = {
+ { .id = "PHYT8001" },
+ { }
+};
+MODULE_DEVICE_TABLE(acpi, scpi_clock_acpi_match);
+
static struct platform_driver scpi_clocks_driver = {
.driver = {
.name = "scpi_clocks",
.of_match_table = scpi_clocks_ids,
+ .acpi_match_table = scpi_cpufreq_acpi_match,
},
.probe = scpi_clocks_probe,
.remove = scpi_clocks_remove,
--
2.34.1


2022-11-25 10:05:05

by Sudeep Holla

[permalink] [raw]
Subject: Re: [PATCH] clk-scpi: Modify to recall scpi_clocks_probe

On Fri, Nov 25, 2022 at 10:35:41AM +0800, Wang Honghui wrote:
> Modify to recall scpi_clocks_probe
> and add to support Phytium FT2000/4 CPUs
>


*NACK*

Please stop this getting SCPI and custom mailbox in ACPI madness.
You seem to have missed reading all the information provided on PCC
and PCC OpRegion to get these working in ACPI.

--
Regards,
Sudeep

2022-11-25 19:23:41

by kernel test robot

[permalink] [raw]
Subject: Re: [PATCH] clk-scpi: Modify to recall scpi_clocks_probe

Hi Wang,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on clk/clk-next]
[also build test ERROR on linus/master v6.1-rc6 next-20221125]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url: https://github.com/intel-lab-lkp/linux/commits/Wang-Honghui/clk-scpi-Modify-to-recall-scpi_clocks_probe/20221125-103824
base: https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git clk-next
patch link: https://lore.kernel.org/r/950BEC68ABB5129B%2BY4Ap%2FWUNrJ2BTmYD%40TP-P15V.lan
patch subject: [PATCH] clk-scpi: Modify to recall scpi_clocks_probe
config: riscv-allmodconfig
compiler: riscv64-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/87a5d40d3d7e214f24c6c95af7d8f381cfe83bdc
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Wang-Honghui/clk-scpi-Modify-to-recall-scpi_clocks_probe/20221125-103824
git checkout 87a5d40d3d7e214f24c6c95af7d8f381cfe83bdc
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash drivers/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <[email protected]>

All errors (new ones prefixed by >>):

In file included from include/linux/device/driver.h:21,
from include/linux/device.h:32,
from drivers/clk/clk-scpi.c:9:
>> drivers/clk/clk-scpi.c:309:27: error: 'scpi_clock_acpi_match' undeclared here (not in a function); did you mean 'scpi_cpufreq_acpi_match'?
309 | MODULE_DEVICE_TABLE(acpi, scpi_clock_acpi_match);
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/module.h:243:15: note: in definition of macro 'MODULE_DEVICE_TABLE'
243 | extern typeof(name) __mod_##type##__##name##_device_table \
| ^~~~
>> include/linux/module.h:243:21: error: '__mod_acpi__scpi_clock_acpi_match_device_table' aliased to undefined symbol 'scpi_clock_acpi_match'
243 | extern typeof(name) __mod_##type##__##name##_device_table \
| ^~~~~~
drivers/clk/clk-scpi.c:309:1: note: in expansion of macro 'MODULE_DEVICE_TABLE'
309 | MODULE_DEVICE_TABLE(acpi, scpi_clock_acpi_match);
| ^~~~~~~~~~~~~~~~~~~


vim +309 drivers/clk/clk-scpi.c

303
304 /* Wang Honghui add to support Phytium FT2000/4 CPUs */
305 static const struct acpi_device_id scpi_cpufreq_acpi_match[] = {
306 { .id = "PHYT8001" },
307 { }
308 };
> 309 MODULE_DEVICE_TABLE(acpi, scpi_clock_acpi_match);
310

--
0-DAY CI Kernel Test Service
https://01.org/lkp


Attachments:
(No filename) (3.11 kB)
config (327.20 kB)
Download all attachments