Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4068017pxu; Wed, 9 Dec 2020 07:36:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJx/aKx1D860r+G/0Vm/r9remCTWUkXiGUaRabq5MOgeIA261eRqXeqfdMD7PwXBtcWAE5t/ X-Received: by 2002:a17:906:3553:: with SMTP id s19mr2458447eja.95.1607528209629; Wed, 09 Dec 2020 07:36:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607528209; cv=none; d=google.com; s=arc-20160816; b=rA74sKXsCSc1KMlEwkmz8gzfuC72pGgV364PYOMXHS+9OrgTnNDW0v4FvGV07VfNNo 3i35U+8Q481RiBTAcW1ur3ySOEuA8sDwpzhqFxWOFht0fXxNRF8aoLRtNxZO+CgOKbJw DAnkw4hARf2Qml33FbA0n8KNG/7sS2oM7YbSvuvtlxJzljnX5Y0B4oCpBUu/eRMY/fDi f+mJP1kCKES4lgSpcGJ10Lshr+cKhFsgzyluLFzTPQAasvK1AUxICAlLRUckBMkB8fh5 wnqNx8A9ttyAhNV8/bukJ0Je1hXGqE0ML354qMOc7tnm5vDhO2T0nbE3KO2Q7qgPz5iV 5UBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=79/2jrypfqHh2ex0HWeRFQIgc+5jz50G2Xkqb1V3C4s=; b=uBOjWzazctovHdz+C9XdhmhyxioXXokf2QRTyv40GdZXuS1PFNMYI9BVZg/j7hE4os 7Mo3pB7PYElaiXz73HR4dbr+w1JxnCuwANwZcCMt7InjQQZ1Zg3IIwI5MbliNWUaxU1c 7br7XVWJ1ATJGz6UaJoCzlaeVfJqpJasM7TlvrCDQGOV5GkQcK9fteAs1ex/DIRpCxKd qNC8mcPD2R+xZXU6eZIYA0+Weul5uMfJO74Bvv2P57NOQ+9zdb4YMcyYdCiDg0IpJ6pN LkdGQZBHIP+SBaVjMr7IdVQ4r8vPNXJCMqqPXZKZo2TXkHOpmgTqZ9ZjeYbA6qCS58m9 Pn7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="AxsF0AS/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c23si1013770edv.521.2020.12.09.07.36.25; Wed, 09 Dec 2020 07:36:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="AxsF0AS/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730549AbgLIPJy (ORCPT + 99 others); Wed, 9 Dec 2020 10:09:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42648 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729941AbgLIPJq (ORCPT ); Wed, 9 Dec 2020 10:09:46 -0500 Received: from mail-ej1-x644.google.com (mail-ej1-x644.google.com [IPv6:2a00:1450:4864:20::644]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7C232C061794 for ; Wed, 9 Dec 2020 07:09:06 -0800 (PST) Received: by mail-ej1-x644.google.com with SMTP id f23so2609969ejk.2 for ; Wed, 09 Dec 2020 07:09:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=79/2jrypfqHh2ex0HWeRFQIgc+5jz50G2Xkqb1V3C4s=; b=AxsF0AS/C2w6AQnjQjWH1ODawHIswlZmOmW8/ig0ZhTpPtMMgmL5hT7o1UGDZnchpX QaTx7l01DuBOK+09rpybArRBMOGjKkESF80bpdK6JfIwi55OZ6njUkp4wBzgGnDG/5/N qc0XQ2iWIPYp0KWmSdfnnD8MGqLYI6/lDaO5xqqwtFcdt2hvczUG5VLSN9CkoPkf11FK CdonBLwwb3BUH07KlgXKfzWJmSDlaYpimyI3PNTAp8nXIMIdv4ggVIkDMYDDhJGNPe78 mZTFMjLIr6/DGPW0qb+/p7DDhKWneMGpo13QOWjieOWcwgry5lXfYFrzm2xiXkyZNaXv oCIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=79/2jrypfqHh2ex0HWeRFQIgc+5jz50G2Xkqb1V3C4s=; b=rbb2bAmNq2ETnWz0caUiQpK02nIXf3KusIdJGLf2oCDOLTfdDk4ZleiSSpZgQNP9fk EhQdTozPdXGxnve50200hcMwr4M4IhZ/ph/XVMiArHnEF1PmAfF+fxXcPCBB7OnGWgjv OecCaeqRpj6niqgz4DtcT5KZcedT9HUKMa/K5YUbP0pCE2L3F9KWAyj8d16x2GJZGfQ6 uvY92F7Lh1AUDtIbwP5+ZtjlDvHlLSb3uxHFHRVQm3aVfHJeKsnKr3MfZ6ZPzldRZbX+ qLt4MsdQBMCZJl23wHQkKHtkNMABTE0+cQwdcCw6bFt63KYMAd4OXC27jqQ4nM7goTzZ rCLw== X-Gm-Message-State: AOAM531mPUWdt0k2kBnO0bkT7nSxiCc2B161DZmpTCWgzop0x155/qCJ e42b1wjVPs65zk+CJExTZsLEKiLxzFJR/JO2bZbkMQ== X-Received: by 2002:a17:906:4c85:: with SMTP id q5mr2386437eju.375.1607526544599; Wed, 09 Dec 2020 07:09:04 -0800 (PST) MIME-Version: 1.0 References: <1606410037-11436-1-git-send-email-agordeev@linux.ibm.com> In-Reply-To: <1606410037-11436-1-git-send-email-agordeev@linux.ibm.com> From: Naresh Kamboju Date: Wed, 9 Dec 2020 20:38:52 +0530 Message-ID: Subject: Re: [PATCH v3] s390/pci: fix CPU address in MSI for directed IRQ To: Alexander Gordeev Cc: Niklas Schnelle , linux-s390@vger.kernel.org, open list , Halil Pasic , linux-stable , lkft-triage@lists.linaro.org, Greg Kroah-Hartman , Sasha Levin Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 26 Nov 2020 at 22:32, Alexander Gordeev wrote: > > The directed MSIs are delivered to CPUs whose address is > written to the MSI message data. The current code assumes > that a CPU logical number (as it is seen by the kernel) > is also that CPU address. > > The above assumption is not correct, as the CPU address > is rather the value returned by STAP instruction. That > value does not necessarily match the kernel logical CPU > number. > > Fixes: e979ce7bced2 ("s390/pci: provide support for CPU directed interrupts") > Signed-off-by: Alexander Gordeev > --- > arch/s390/pci/pci_irq.c | 14 +++++++++++--- > 1 file changed, 11 insertions(+), 3 deletions(-) > > diff --git a/arch/s390/pci/pci_irq.c b/arch/s390/pci/pci_irq.c > index 743f257cf2cb..75217fb63d7b 100644 > --- a/arch/s390/pci/pci_irq.c > +++ b/arch/s390/pci/pci_irq.c > @@ -103,9 +103,10 @@ static int zpci_set_irq_affinity(struct irq_data *data, const struct cpumask *de > { > struct msi_desc *entry = irq_get_msi_desc(data->irq); > struct msi_msg msg = entry->msg; > + int cpu_addr = smp_cpu_get_cpu_address(cpumask_first(dest)); While building S390 the following kernel warning / error noticed on stable -rc 5.4 branch with gcc-8, gcc-9 and gcc-10 and defconfig make --silent --keep-going --jobs=8 O=/home/tuxbuild/.cache/tuxmake/builds/6/tmp ARCH=s390 CROSS_COMPILE=s390x-linux-gnu- 'CC=sccache s390x-linux-gnu-gcc' 'HOSTCC=sccache gcc' vmlinux arch/s390/pci/pci_irq.c: In function 'zpci_set_irq_affinity': arch/s390/pci/pci_irq.c:106:17: error: implicit declaration of function 'smp_cpu_get_cpu_address' [-Werror=implicit-function-declaration] 106 | int cpu_addr = smp_cpu_get_cpu_address(cpumask_first(dest)); | ^~~~~~~~~~~~~~~~~~~~~~~ Reported-by: Naresh Kamboju steps to reproduce: -------------------------- # TuxMake is a command line tool and Python library that provides # portable and repeatable Linux kernel builds across a variety of # architectures, toolchains, kernel configurations, and make targets. # # TuxMake supports the concept of runtimes. # See https://docs.tuxmake.org/runtimes/, for that to work it requires # that you install podman or docker on your system. # # To install tuxmake on your system globally: # sudo pip3 install -U tuxmake # # See https://docs.tuxmake.org/ for complete documentation. tuxmake --runtime docker --target-arch s390 --toolchain gcc-9 --kconfig defconfig metadata: git_repo: https://gitlab.com/Linaro/lkft/mirrors/stable/linux-stable-rc target_arch: s390 toolchain: gcc-9 git_describe: v5.4.82-36-gc45075765dae kernel_version: 5.4.83-rc1 full build log link, https://gitlab.com/Linaro/lkft/mirrors/stable/linux-stable-rc/-/jobs/899272224 -- Linaro LKFT https://lkft.linaro.org