All of lore.kernel.org
 help / color / mirror / Atom feed
* [asahilinux:cpufreq/wip 16/16] drivers/clk/clk-apple-cluster.c:62:23: error: implicit declaration of function 'readq_relaxed'; did you mean 'readw_relaxed'?
@ 2021-10-02 18:27 ` kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-10-02 18:27 UTC (permalink / raw)
  To: Hector Martin; +Cc: kbuild-all, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 4944 bytes --]

tree:   https://github.com/AsahiLinux/linux cpufreq/wip
head:   e44f8c4999018e6bbbf00e94afe4b35809aa1248
commit: e44f8c4999018e6bbbf00e94afe4b35809aa1248 [16/16] cpufreq/mcc wip
config: arc-allyesconfig (attached as .config)
compiler: arceb-elf-gcc (GCC) 11.2.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/AsahiLinux/linux/commit/e44f8c4999018e6bbbf00e94afe4b35809aa1248
        git remote add asahilinux https://github.com/AsahiLinux/linux
        git fetch --no-tags asahilinux cpufreq/wip
        git checkout e44f8c4999018e6bbbf00e94afe4b35809aa1248
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=arc 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   drivers/clk/clk-apple-cluster.c: In function 'apple_cluster_clk_set_rate':
>> drivers/clk/clk-apple-cluster.c:62:23: error: implicit declaration of function 'readq_relaxed'; did you mean 'readw_relaxed'? [-Werror=implicit-function-declaration]
      62 |                 reg = readq_relaxed(cluster->reg_base + APPLE_CLUSTER_PSTATE);
         |                       ^~~~~~~~~~~~~
         |                       readw_relaxed
>> drivers/clk/clk-apple-cluster.c:78:9: error: implicit declaration of function 'writeq_relaxed'; did you mean 'writel_relaxed'? [-Werror=implicit-function-declaration]
      78 |         writeq_relaxed(reg, cluster->reg_base + APPLE_CLUSTER_PSTATE);
         |         ^~~~~~~~~~~~~~
         |         writel_relaxed
   In file included from include/linux/bits.h:6,
                    from include/linux/bitops.h:6,
                    from drivers/clk/clk-apple-cluster.c:9:
   drivers/clk/clk-apple-cluster.c: In function 'apple_cluster_clk_init':
   include/vdso/bits.h:7:40: warning: left shift count >= width of type [-Wshift-count-overflow]
       7 | #define BIT(nr)                 (UL(1) << (nr))
         |                                        ^~
   drivers/clk/clk-apple-cluster.c:28:41: note: in expansion of macro 'BIT'
      28 | #define APPLE_CLUSTER_CONFIG_ENABLE     BIT(63)
         |                                         ^~~
   drivers/clk/clk-apple-cluster.c:133:21: note: in expansion of macro 'APPLE_CLUSTER_CONFIG_ENABLE'
     133 |         new = reg | APPLE_CLUSTER_CONFIG_ENABLE;
         |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/vdso/bits.h:7:40: warning: left shift count >= width of type [-Wshift-count-overflow]
       7 | #define BIT(nr)                 (UL(1) << (nr))
         |                                        ^~
   drivers/clk/clk-apple-cluster.c:29:41: note: in expansion of macro 'BIT'
      29 | #define APPLE_CLUSTER_CONFIG_DVMR1      BIT(32)
         |                                         ^~~
   drivers/clk/clk-apple-cluster.c:135:24: note: in expansion of macro 'APPLE_CLUSTER_CONFIG_DVMR1'
     135 |                 new |= APPLE_CLUSTER_CONFIG_DVMR1 | APPLE_CLUSTER_CONFIG_DVMR2;
         |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors


vim +62 drivers/clk/clk-apple-cluster.c

    42	
    43	static int apple_cluster_clk_set_rate(struct clk_hw *hw, unsigned long rate,
    44						 unsigned long parent_rate)
    45	{
    46		struct apple_cluster_clk *cluster = to_apple_cluster_clk(hw);
    47		struct dev_pm_opp *opp;
    48		unsigned int level;
    49		u64 reg;
    50		int timeout = APPLE_CLUSTER_SWITCH_TIMEOUT;
    51	
    52		opp = dev_pm_opp_find_freq_floor(cluster->dev, &rate);
    53	
    54		if (IS_ERR(opp))
    55			return PTR_ERR(opp);
    56	
    57		level = dev_pm_opp_get_level(opp);
    58	
    59		dev_dbg(cluster->dev, "set_rate: %ld -> %d\n", rate, level);
    60	
    61		do {
  > 62			reg = readq_relaxed(cluster->reg_base + APPLE_CLUSTER_PSTATE);
    63			if (!(reg & APPLE_CLUSTER_PSTATE_BUSY))
    64				break;
    65			usleep_range(1, 2);
    66		} while (--timeout);
    67	
    68		if (!timeout) {
    69			dev_err(cluster->dev, "timed out waiting for busy flag\n");
    70			return -EIO;
    71		}
    72	
    73		reg &= ~(APPLE_CLUSTER_PSTATE_DESIRED1 | APPLE_CLUSTER_PSTATE_DESIRED2);
    74		reg |= FIELD_PREP(APPLE_CLUSTER_PSTATE_DESIRED1, level);
    75		reg |= FIELD_PREP(APPLE_CLUSTER_PSTATE_DESIRED2, level);
    76		reg |= APPLE_CLUSTER_PSTATE_SET;
    77	
  > 78		writeq_relaxed(reg, cluster->reg_base + APPLE_CLUSTER_PSTATE);
    79	
    80		if (cluster->has_pd)
    81			dev_pm_genpd_set_performance_state(cluster->dev,
    82							   dev_pm_opp_get_required_pstate(opp, 0));
    83	
    84		return 0;
    85	}
    86	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 68467 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [asahilinux:cpufreq/wip 16/16] drivers/clk/clk-apple-cluster.c:62:23: error: implicit declaration of function 'readq_relaxed'; did you mean 'readw_relaxed'?
@ 2021-10-02 18:27 ` kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-10-02 18:27 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 5051 bytes --]

tree:   https://github.com/AsahiLinux/linux cpufreq/wip
head:   e44f8c4999018e6bbbf00e94afe4b35809aa1248
commit: e44f8c4999018e6bbbf00e94afe4b35809aa1248 [16/16] cpufreq/mcc wip
config: arc-allyesconfig (attached as .config)
compiler: arceb-elf-gcc (GCC) 11.2.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/AsahiLinux/linux/commit/e44f8c4999018e6bbbf00e94afe4b35809aa1248
        git remote add asahilinux https://github.com/AsahiLinux/linux
        git fetch --no-tags asahilinux cpufreq/wip
        git checkout e44f8c4999018e6bbbf00e94afe4b35809aa1248
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=arc 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   drivers/clk/clk-apple-cluster.c: In function 'apple_cluster_clk_set_rate':
>> drivers/clk/clk-apple-cluster.c:62:23: error: implicit declaration of function 'readq_relaxed'; did you mean 'readw_relaxed'? [-Werror=implicit-function-declaration]
      62 |                 reg = readq_relaxed(cluster->reg_base + APPLE_CLUSTER_PSTATE);
         |                       ^~~~~~~~~~~~~
         |                       readw_relaxed
>> drivers/clk/clk-apple-cluster.c:78:9: error: implicit declaration of function 'writeq_relaxed'; did you mean 'writel_relaxed'? [-Werror=implicit-function-declaration]
      78 |         writeq_relaxed(reg, cluster->reg_base + APPLE_CLUSTER_PSTATE);
         |         ^~~~~~~~~~~~~~
         |         writel_relaxed
   In file included from include/linux/bits.h:6,
                    from include/linux/bitops.h:6,
                    from drivers/clk/clk-apple-cluster.c:9:
   drivers/clk/clk-apple-cluster.c: In function 'apple_cluster_clk_init':
   include/vdso/bits.h:7:40: warning: left shift count >= width of type [-Wshift-count-overflow]
       7 | #define BIT(nr)                 (UL(1) << (nr))
         |                                        ^~
   drivers/clk/clk-apple-cluster.c:28:41: note: in expansion of macro 'BIT'
      28 | #define APPLE_CLUSTER_CONFIG_ENABLE     BIT(63)
         |                                         ^~~
   drivers/clk/clk-apple-cluster.c:133:21: note: in expansion of macro 'APPLE_CLUSTER_CONFIG_ENABLE'
     133 |         new = reg | APPLE_CLUSTER_CONFIG_ENABLE;
         |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/vdso/bits.h:7:40: warning: left shift count >= width of type [-Wshift-count-overflow]
       7 | #define BIT(nr)                 (UL(1) << (nr))
         |                                        ^~
   drivers/clk/clk-apple-cluster.c:29:41: note: in expansion of macro 'BIT'
      29 | #define APPLE_CLUSTER_CONFIG_DVMR1      BIT(32)
         |                                         ^~~
   drivers/clk/clk-apple-cluster.c:135:24: note: in expansion of macro 'APPLE_CLUSTER_CONFIG_DVMR1'
     135 |                 new |= APPLE_CLUSTER_CONFIG_DVMR1 | APPLE_CLUSTER_CONFIG_DVMR2;
         |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors


vim +62 drivers/clk/clk-apple-cluster.c

    42	
    43	static int apple_cluster_clk_set_rate(struct clk_hw *hw, unsigned long rate,
    44						 unsigned long parent_rate)
    45	{
    46		struct apple_cluster_clk *cluster = to_apple_cluster_clk(hw);
    47		struct dev_pm_opp *opp;
    48		unsigned int level;
    49		u64 reg;
    50		int timeout = APPLE_CLUSTER_SWITCH_TIMEOUT;
    51	
    52		opp = dev_pm_opp_find_freq_floor(cluster->dev, &rate);
    53	
    54		if (IS_ERR(opp))
    55			return PTR_ERR(opp);
    56	
    57		level = dev_pm_opp_get_level(opp);
    58	
    59		dev_dbg(cluster->dev, "set_rate: %ld -> %d\n", rate, level);
    60	
    61		do {
  > 62			reg = readq_relaxed(cluster->reg_base + APPLE_CLUSTER_PSTATE);
    63			if (!(reg & APPLE_CLUSTER_PSTATE_BUSY))
    64				break;
    65			usleep_range(1, 2);
    66		} while (--timeout);
    67	
    68		if (!timeout) {
    69			dev_err(cluster->dev, "timed out waiting for busy flag\n");
    70			return -EIO;
    71		}
    72	
    73		reg &= ~(APPLE_CLUSTER_PSTATE_DESIRED1 | APPLE_CLUSTER_PSTATE_DESIRED2);
    74		reg |= FIELD_PREP(APPLE_CLUSTER_PSTATE_DESIRED1, level);
    75		reg |= FIELD_PREP(APPLE_CLUSTER_PSTATE_DESIRED2, level);
    76		reg |= APPLE_CLUSTER_PSTATE_SET;
    77	
  > 78		writeq_relaxed(reg, cluster->reg_base + APPLE_CLUSTER_PSTATE);
    79	
    80		if (cluster->has_pd)
    81			dev_pm_genpd_set_performance_state(cluster->dev,
    82							   dev_pm_opp_get_required_pstate(opp, 0));
    83	
    84		return 0;
    85	}
    86	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 68467 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-10-02 18:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-02 18:27 [asahilinux:cpufreq/wip 16/16] drivers/clk/clk-apple-cluster.c:62:23: error: implicit declaration of function 'readq_relaxed'; did you mean 'readw_relaxed'? kernel test robot
2021-10-02 18:27 ` kernel test robot

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.