提交 7299fdc1 编写于 作者: J Jiucheng Xu 提交者: Will Deacon

perf/amlogic: Fix build error for x86_64 allmodconfig

The driver misses including <linux/io.h>, which causes a compilation
error with x86_64 'allmodconfig':

drivers/perf/amlogic/meson_g12_ddr_pmu.c: In function 'dmc_g12_get_freq_quick':
drivers/perf/amlogic/meson_g12_ddr_pmu.c:135:15: error: implicit declaration of function 'readl' [-Werror=implicit-function-declaration]
  135 |         val = readl(info->pll_reg);
      |               ^~~~~
drivers/perf/amlogic/meson_g12_ddr_pmu.c: In function 'dmc_g12_counter_enable':
drivers/perf/amlogic/meson_g12_ddr_pmu.c:204:9: error: implicit declaration of function 'writel' [-Werror=implicit-function-declaration]
  204 |         writel(clock_count, info->ddr_reg[0] + DMC_MON_G12_TIMER);
      |         ^~~~~~

Add the missing header to fix the build.

Fixes: 2016e211 ("perf/amlogic: Add support for Amlogic meson G12 SoC DDR PMU driver")
Reported-by: NStephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: NJiucheng Xu <jiucheng.xu@amlogic.com>
Reviewed-by: NNeil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20221122084028.572494-1-jiucheng.xu@amlogic.comSigned-off-by: NWill Deacon <will@kernel.org>
上级 fd9678d3
......@@ -4,6 +4,7 @@
*/
#include <linux/err.h>
#include <linux/io.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/of.h>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册