Re: [PATCH] clocksource: Ingenic: Add SMP/SMT support for sysost driver.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi "周琰杰,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on tip/timers/core]
[also build test WARNING on linux/master linus/master v5.13-rc3 next-20210526]
[cannot apply to daniel.lezcano/clockevents/next]
[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]

url:    https://github.com/0day-ci/linux/commits/Zhou-Yanjie/clocksource-Ingenic-Add-SMP-SMT-support-for-sysost-driver/20210526-012925
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git 8ac91e6c6033ebc12c5c1e4aa171b81a662bd70f
config: microblaze-randconfig-s031-20210526 (attached as .config)
compiler: microblaze-linux-gcc (GCC) 9.3.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.3-341-g8af24329-dirty
        # https://github.com/0day-ci/linux/commit/d613686c302a63ea0ed3a0b42f89401483642689
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Zhou-Yanjie/clocksource-Ingenic-Add-SMP-SMT-support-for-sysost-driver/20210526-012925
        git checkout d613686c302a63ea0ed3a0b42f89401483642689
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' W=1 ARCH=microblaze 

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


sparse warnings: (new ones prefixed by >>)
>> drivers/clocksource/ingenic-sysost.c:676:58: sparse: sparse: incorrect type in argument 5 (different address spaces) @@     expected void *dev @@     got struct ingenic_ost_timer [noderef] __percpu *timers @@
   drivers/clocksource/ingenic-sysost.c:676:58: sparse:     expected void *dev
   drivers/clocksource/ingenic-sysost.c:676:58: sparse:     got struct ingenic_ost_timer [noderef] __percpu *timers

vim +676 drivers/clocksource/ingenic-sysost.c

   646	
   647	static int __init ingenic_ost_init(struct device_node *np)
   648	{
   649		struct ingenic_ost *ost;
   650		unsigned long rate;
   651		int ret;
   652	
   653		ret = ingenic_ost_probe(np);
   654		if (ret) {
   655			pr_crit("%s: Failed to initialize OST clocks: %d\n", __func__, ret);
   656			return ret;
   657		}
   658	
   659		of_node_clear_flag(np, OF_POPULATED);
   660	
   661		ost = ingenic_ost;
   662		if (IS_ERR(ost))
   663			return PTR_ERR(ost);
   664	
   665		ret = ingenic_ost_global_timer_init(np, ost);
   666		if (ret) {
   667			pr_crit("%s: Unable to init global timer: %x\n", __func__, ret);
   668			goto err_free_ingenic_ost;
   669		}
   670	
   671		if (ost->soc_info->version >= ID_X2000)
   672			ret = request_percpu_irq(ost->irq, ingenic_ost_cevt_cb,
   673					  "OST percpu timer", ost->timers);
   674		else
   675			ret = request_irq(ost->irq, ingenic_ost_cevt_cb, IRQF_TIMER,
 > 676					  "OST percpu timer", ost->timers);
   677	
   678		if (ret) {
   679			pr_crit("%s: Unable to request percpu IRQ: %x\n", __func__, ret);
   680			goto err_ost_global_timer_cleanup;
   681		}
   682	
   683		/* Setup clock events on each CPU core */
   684		ret = cpuhp_setup_state(CPUHP_AP_ONLINE_DYN, "Ingenic XBurst: online",
   685					ingenic_ost_setup_cevt, NULL);
   686		if (ret < 0) {
   687			pr_crit("%s: Unable to init percpu timers: %x\n", __func__, ret);
   688			goto err_ost_global_timer_cleanup;
   689		}
   690	
   691		/* Register the sched_clock at the end as there's no way to undo it */
   692		rate = clk_get_rate(ost->global_timer_clk);
   693		sched_clock_register(ingenic_ost_global_timer_read_cntl, 32, rate);
   694	
   695		return 0;
   696	
   697	err_ost_global_timer_cleanup:
   698		clocksource_unregister(&ost->cs);
   699		clk_disable_unprepare(ost->global_timer_clk);
   700		clk_put(ost->global_timer_clk);
   701	err_free_ingenic_ost:
   702		kfree(ost);
   703		return ret;
   704	}
   705	

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

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux