Devicetree
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: "周琰杰 (Zhou Yanjie)" <zhouyanjie@wanyeetech.com>,
	linux-mips@vger.kernel.org
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	devicetree@vger.kernel.org, tsbogend@alpha.franken.de,
	paulburton@kernel.org, jiaxun.yang@flygoat.com,
	chenhc@lemote.com, tglx@linutronix.de, robh+dt@kernel.org,
	daniel.lezcano@linaro.org
Subject: Re: [PATCH v7 3/6] clocksource: Ingenic: Add high resolution timer support for SMP.
Date: Thu, 14 May 2020 22:10:54 +0800	[thread overview]
Message-ID: <202005142242.wJMOQBA7%lkp@intel.com> (raw)
In-Reply-To: <1589395578-87441-5-git-send-email-zhouyanjie@wanyeetech.com>

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

Hi "周琰杰,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on robh/for-next]
[also build test WARNING on tip/timers/core linus/master v5.7-rc5]
[cannot apply to linux/master next-20200512]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Zhou-Yanjie/Introduce-SMP-support-for-CI20-based-on-JZ4780/20200514-171836
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: i386-allyesconfig (attached as .config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

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

All warnings (new ones prefixed by >>, old ones prefixed by <<):

In file included from include/linux/bitops.h:5:0,
from drivers/clocksource/ingenic-timer.c:8:
drivers/clocksource/ingenic-timer.c: In function 'ingenic_tcu_init':
>> include/linux/bits.h:36:22: warning: left shift count >= width of type [-Wshift-count-overflow]
(((~UL(0)) - (UL(1) << (l)) + 1) &                          ^
>> include/linux/bits.h:39:31: note: in expansion of macro '__GENMASK'
(GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
^~~~~~~~~
>> drivers/clocksource/ingenic-timer.c:313:27: note: in expansion of macro 'GENMASK'
tcu->pwm_channels_mask = GENMASK(soc_info->num_channels - 1,
^~~~~~~

vim +/GENMASK +313 drivers/clocksource/ingenic-timer.c

   288	
   289	static int __init ingenic_tcu_init(struct device_node *np)
   290	{
   291		const struct of_device_id *id = of_match_node(ingenic_tcu_of_match, np);
   292		const struct ingenic_soc_info *soc_info = id->data;
   293		struct ingenic_tcu *tcu;
   294		struct regmap *map;
   295		unsigned cpu = 0;
   296		long rate;
   297		int ret;
   298	
   299		of_node_clear_flag(np, OF_POPULATED);
   300	
   301		map = device_node_to_regmap(np);
   302		if (IS_ERR(map))
   303			return PTR_ERR(map);
   304	
   305		tcu = kzalloc(sizeof(*tcu), GFP_KERNEL);
   306		if (!tcu)
   307			return -ENOMEM;
   308	
   309		/*
   310		 * Enable all TCU channels for PWM use by default except channels 0/1,
   311		 * and channel 2 if target CPU is JZ4780 and SMP is selected.
   312		 */
 > 313		tcu->pwm_channels_mask = GENMASK(soc_info->num_channels - 1,
   314									NR_CPUS + 1);
   315		of_property_read_u32(np, "ingenic,pwm-channels-mask",
   316				     (u32 *)&tcu->pwm_channels_mask);
   317	
   318		/* Verify that we have at least NR_CPUS + 1 free channels */
   319		if (hweight8(tcu->pwm_channels_mask) >
   320				soc_info->num_channels - NR_CPUS + 1) {
   321			pr_crit("%s: Invalid PWM channel mask: 0x%02lx\n", __func__,
   322				tcu->pwm_channels_mask);
   323			ret = -EINVAL;
   324			goto err_free_ingenic_tcu;
   325		}
   326	
   327		tcu->map = map;
   328		tcu->np = np;
   329		ingenic_tcu = tcu;
   330	
   331		tcu->timer_local[cpu] = find_first_zero_bit(&tcu->pwm_channels_mask,
   332							 soc_info->num_channels);
   333	
   334		for (cpu = 1; cpu < NR_CPUS; cpu++)
   335			tcu->timer_local[cpu] = find_next_zero_bit(
   336					&tcu->pwm_channels_mask, soc_info->num_channels,
   337					tcu->timer_local[cpu - 1] + 1);
   338	
   339		tcu->cs_channel = find_next_zero_bit(&tcu->pwm_channels_mask,
   340				soc_info->num_channels, tcu->timer_local[cpu - 1] + 1);
   341	
   342		ret = ingenic_tcu_clocksource_init(np, tcu);
   343		if (ret) {
   344			pr_crit("%s: Unable to init clocksource: %d\n", __func__, ret);
   345			goto err_free_ingenic_tcu;
   346		}
   347	
   348		/* Setup clock events on each CPU core */
   349		ret = cpuhp_setup_state(CPUHP_AP_ONLINE_DYN, "Ingenic XBurst: online",
   350					ingenic_tcu_setup_cevt, NULL);
   351		WARN_ON(ret < 0);
   352	
   353		/* Register the sched_clock at the end as there's no way to undo it */
   354		rate = clk_get_rate(tcu->cs_clk);
   355		sched_clock_register(ingenic_tcu_timer_read, 16, rate);
   356	
   357		return 0;
   358	
   359	err_free_ingenic_tcu:
   360		kfree(tcu);
   361		return ret;
   362	}
   363	

---
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: 72336 bytes --]

  reply	other threads:[~2020-05-14 14:11 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-13 18:46 Introduce SMP support for CI20 (based on JZ4780) v7 周琰杰 (Zhou Yanjie)
2020-05-13 18:46 ` [PATCH v7 0/6] Introduce SMP support for CI20 (based on JZ4780) 周琰杰 (Zhou Yanjie)
2020-05-13 18:46 ` [PATCH v7 1/6] MIPS: JZ4780: Introduce SMP support 周琰杰 (Zhou Yanjie)
2020-05-13 18:46 ` [PATCH v7 2/6] MIPS: CI20: Modify DTS to support high resolution timer for SMP 周琰杰 (Zhou Yanjie)
2020-05-13 18:46 ` [PATCH v7 3/6] clocksource: Ingenic: Add high resolution timer support " 周琰杰 (Zhou Yanjie)
2020-05-14 14:10   ` kbuild test robot [this message]
2020-05-13 18:46 ` [PATCH v7 4/6] dt-bindings: MIPS: Document Ingenic SoCs binding 周琰杰 (Zhou Yanjie)
2020-05-13 18:46 ` [PATCH v7 5/6] MIPS: Ingenic: Add 'cpus' node for Ingenic SoCs 周琰杰 (Zhou Yanjie)
2020-05-13 18:46 ` [PATCH v7 6/6] MIPS: CI20: Update defconfig to support SMP 周琰杰 (Zhou Yanjie)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202005142242.wJMOQBA7%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=chenhc@lemote.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jiaxun.yang@flygoat.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=paulburton@kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=tsbogend@alpha.franken.de \
    --cc=zhouyanjie@wanyeetech.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox