devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Sebastian Ene <sebastianene@google.com>,
	arnd@arndb.de, gregkh@linuxfoundation.org, will@kernel.org,
	maz@kernel.org, Rob Herring <robh+dt@kernel.org>,
	Dragan Cvetic <dragan.cvetic@xilinx.com>,
	Guenter Roeck <linux@roeck-us.net>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
	devicetree@vger.kernel.org, kernel-team@android.com,
	Sebastian Ene <sebastianene@google.com>
Subject: Re: [PATCH v2 2/2] misc: Register a PPI for the vcpu stall detection virtual device
Date: Thu, 13 Jun 2024 21:12:23 +0800	[thread overview]
Message-ID: <202406132132.FBKSWFav-lkp@intel.com> (raw)
In-Reply-To: <20240611110136.2003137-4-sebastianene@google.com>

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@intel.com/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@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202406132132.FBKSWFav-lkp@intel.com/

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

  reply	other threads:[~2024-06-13 13:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-11 11:01 [PATCH v2 0/2] misc: vcpu_stall_detector: Add a PPI interrupt Sebastian Ene
2024-06-11 11:01 ` [PATCH v2 1/2] dt-bindings: vcpu_stall_detector: Add a PPI interrupt to the virtual device Sebastian Ene
2024-06-11 11:01 ` [PATCH v2 2/2] misc: Register a PPI for the vcpu stall detection " Sebastian Ene
2024-06-13 13:12   ` kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-06-13 14:13 [PATCH v2 0/2] misc: vcpu_stall_detector: Add a PPI interrupt Sebastian Ene
2024-06-13 14:13 ` [PATCH v2 2/2] misc: Register a PPI for the vcpu stall detection virtual device Sebastian Ene

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=202406132132.FBKSWFav-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=arnd@arndb.de \
    --cc=devicetree@vger.kernel.org \
    --cc=dragan.cvetic@xilinx.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kernel-team@android.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=maz@kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=robh+dt@kernel.org \
    --cc=sebastianene@google.com \
    --cc=will@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).