Re: [PATCH v2 2/2] misc: Register a PPI for the vcpu stall detection virtual device

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

 



Hi Sebastian,

kernel test robot noticed the following build errors:

[auto build test ERROR on robh/for-next]
[also build test ERROR on soc/for-next char-misc/char-misc-testing char-misc/char-misc-next char-misc/char-misc-linus linus/master v6.10-rc3 next-20240613]
[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/Sebastian-Ene/dt-bindings-vcpu_stall_detector-Add-a-PPI-interrupt-to-the-virtual-device/20240611-190759
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
patch link:    https://lore.kernel.org/r/20240611110136.2003137-4-sebastianene%40google.com
patch subject: [PATCH v2 2/2] misc: Register a PPI for the vcpu stall detection virtual device
config: s390-randconfig-r112-20240613 (https://download.01.org/0day-ci/archive/20240613/202406132132.FBKSWFav-lkp@xxxxxxxxx/config)
compiler: clang version 15.0.7 (https://github.com/llvm/llvm-project 8dfdcc7b7bf66834a761bd8de445840ef68e4d1a)
reproduce: (https://download.01.org/0day-ci/archive/20240613/202406132132.FBKSWFav-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202406132132.FBKSWFav-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

   In file included from drivers/misc/vcpu_stall_detector.c:8:
   In file included from include/linux/io.h:14:
   In file included from arch/s390/include/asm/io.h:93:
   include/asm-generic/io.h:548:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __raw_readb(PCI_IOBASE + addr);
                             ~~~~~~~~~~ ^
   include/asm-generic/io.h:561:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
                                                           ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/big_endian.h:37:59: note: expanded from macro '__le16_to_cpu'
   #define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x))
                                                             ^
   include/uapi/linux/swab.h:102:54: note: expanded from macro '__swab16'
   #define __swab16(x) (__u16)__builtin_bswap16((__u16)(x))
                                                        ^
   In file included from drivers/misc/vcpu_stall_detector.c:8:
   In file included from include/linux/io.h:14:
   In file included from arch/s390/include/asm/io.h:93:
   include/asm-generic/io.h:574:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
                                                           ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/big_endian.h:35:59: note: expanded from macro '__le32_to_cpu'
   #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
                                                             ^
   include/uapi/linux/swab.h:115:54: note: expanded from macro '__swab32'
   #define __swab32(x) (__u32)__builtin_bswap32((__u32)(x))
                                                        ^
   In file included from drivers/misc/vcpu_stall_detector.c:8:
   In file included from include/linux/io.h:14:
   In file included from arch/s390/include/asm/io.h:93:
   include/asm-generic/io.h:585:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           __raw_writeb(value, PCI_IOBASE + addr);
                               ~~~~~~~~~~ ^
   include/asm-generic/io.h:595:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
                                                         ~~~~~~~~~~ ^
   include/asm-generic/io.h:605:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
                                                         ~~~~~~~~~~ ^
   include/asm-generic/io.h:693:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           readsb(PCI_IOBASE + addr, buffer, count);
                  ~~~~~~~~~~ ^
   include/asm-generic/io.h:701:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           readsw(PCI_IOBASE + addr, buffer, count);
                  ~~~~~~~~~~ ^
   include/asm-generic/io.h:709:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           readsl(PCI_IOBASE + addr, buffer, count);
                  ~~~~~~~~~~ ^
   include/asm-generic/io.h:718:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           writesb(PCI_IOBASE + addr, buffer, count);
                   ~~~~~~~~~~ ^
   include/asm-generic/io.h:727:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           writesw(PCI_IOBASE + addr, buffer, count);
                   ~~~~~~~~~~ ^
   include/asm-generic/io.h:736:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           writesl(PCI_IOBASE + addr, buffer, count);
                   ~~~~~~~~~~ ^
>> drivers/misc/vcpu_stall_detector.c:184:17: error: call to undeclared function 'irq_is_percpu_devid'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration]
           if (irq > 0 && irq_is_percpu_devid(irq)) {
                          ^
   12 warnings and 1 error generated.


vim +/irq_is_percpu_devid +184 drivers/misc/vcpu_stall_detector.c

   139	
   140	static int vcpu_stall_detect_probe(struct platform_device *pdev)
   141	{
   142		int ret, irq;
   143		struct resource *r;
   144		void __iomem *membase;
   145		u32 clock_freq_hz = VCPU_STALL_DEFAULT_CLOCK_HZ;
   146		u32 stall_timeout_sec = VCPU_STALL_DEFAULT_TIMEOUT_SEC;
   147		struct device_node *np = pdev->dev.of_node;
   148	
   149		vcpu_stall_detectors = devm_alloc_percpu(&pdev->dev,
   150							 typeof(struct vcpu_stall_priv));
   151		if (!vcpu_stall_detectors)
   152			return -ENOMEM;
   153	
   154		membase = devm_platform_get_and_ioremap_resource(pdev, 0, &r);
   155		if (IS_ERR(membase)) {
   156			dev_err(&pdev->dev, "Failed to get memory resource\n");
   157			return PTR_ERR(membase);
   158		}
   159	
   160		if (!of_property_read_u32(np, "clock-frequency", &clock_freq_hz)) {
   161			if (!(clock_freq_hz > 0 &&
   162			      clock_freq_hz < VCPU_STALL_MAX_CLOCK_HZ)) {
   163				dev_warn(&pdev->dev, "clk out of range\n");
   164				clock_freq_hz = VCPU_STALL_DEFAULT_CLOCK_HZ;
   165			}
   166		}
   167	
   168		if (!of_property_read_u32(np, "timeout-sec", &stall_timeout_sec)) {
   169			if (!(stall_timeout_sec > 0 &&
   170			      stall_timeout_sec < VCPU_STALL_MAX_TIMEOUT_SEC)) {
   171				dev_warn(&pdev->dev, "stall timeout out of range\n");
   172				stall_timeout_sec = VCPU_STALL_DEFAULT_TIMEOUT_SEC;
   173			}
   174		}
   175	
   176		vcpu_stall_config = (struct vcpu_stall_detect_config) {
   177			.membase		= membase,
   178			.clock_freq_hz		= clock_freq_hz,
   179			.stall_timeout_sec	= stall_timeout_sec,
   180			.ppi_irq		= -1,
   181		};
   182	
   183		irq = platform_get_irq_optional(pdev, 0);
 > 184		if (irq > 0 && irq_is_percpu_devid(irq)) {
   185			ret = request_percpu_irq(irq,
   186						 vcpu_stall_detector_irq,
   187						 "vcpu_stall_detector",
   188						 vcpu_stall_detectors);
   189			if (ret)
   190				goto err;
   191	
   192			vcpu_stall_config.ppi_irq = irq;
   193		}
   194	
   195		ret = cpuhp_setup_state(CPUHP_AP_ONLINE_DYN,
   196					"virt/vcpu_stall_detector:online",
   197					start_stall_detector_cpu,
   198					stop_stall_detector_cpu);
   199		if (ret < 0) {
   200			dev_err(&pdev->dev, "failed to install cpu hotplug");
   201			goto err;
   202		}
   203	
   204		vcpu_stall_config.hp_online = ret;
   205		return 0;
   206	err:
   207		if (vcpu_stall_config.ppi_irq > 0)
   208			free_percpu_irq(vcpu_stall_config.ppi_irq,
   209					vcpu_stall_detectors);
   210		return ret;
   211	}
   212	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux