Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3280343imu; Fri, 18 Jan 2019 07:47:21 -0800 (PST) X-Google-Smtp-Source: ALg8bN46wulGHmj4ucuWMTPaaHPg4yqHHU9Gl6SXlMuLl1M6+AzANXHStJfswwEeIRm56iUYvmY7 X-Received: by 2002:a17:902:8d95:: with SMTP id v21mr19691272plo.162.1547826441185; Fri, 18 Jan 2019 07:47:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547826441; cv=none; d=google.com; s=arc-20160816; b=jS/AqJSyiTN7sEyS0yDvb9lXrEphzwykTY/S/8a0YxBlndCMh9ys41+t2Aipk9HWZA bW5OR3BW4QTL5iMNnvXofefhATTYUFrTmpMIsi7UqR7ArIL/sKhqSEWnQcVya1I7Mn8I w81qKhTHZcdhtNqM03LLaaxLR1DgCIZcUEcKG/t/uDhGe6j2/TZbzYIhXKSkXn0X+vUn QJ4RUGefpWkW530o2EaQKU4LFTxoDfi09l4dEfonmm3KPNrft8WIFqaqO+PasXOg6kUV 0ffrXOQMz0P54BXf+cuxBZPdUms/Gz4ayBBUu6ajU3jTc2PHxbm1/9HD/6ReDYWMBaE4 zWdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature; bh=TZkMRhCoCqusqJqwcuVH0wDyfIDkueVB6AfkeOJHqZ0=; b=kFkNcyFbjxf2koT+mM8/zomZFjz/jvYlNHOYI1lnrPaxRQVnhbWQ2e/pVz+rp3OkIE nnUm/XbGd6DcH/jQH+Vi0GmmXEztra0870OXUQNm1VqUJ+XorPt6Ge5drA9nCRLqn+ty o9EAr44ANI6x29sttjO1pKt78rg7PtzFpYK7b/tx4mWbxOdV1PZjPe4ooCDdFKC99wAk yj477zUAItsHPR0ZOGNk84XhM+CtURh6i70HT/5Ot+SRrk+LcL+YaG06tEQWfgeKR9jC +yQIHrqLLEXmlVreap+SbyHDTDbsJCpNPebtRFqnjZQVwt4glOthE4bKpEzG5ahA39t6 i+wg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@agner.ch header.s=dkim header.b=qjBI+XXD; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v16si5091120pgg.290.2019.01.18.07.47.04; Fri, 18 Jan 2019 07:47:21 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@agner.ch header.s=dkim header.b=qjBI+XXD; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727672AbfARPlx (ORCPT + 99 others); Fri, 18 Jan 2019 10:41:53 -0500 Received: from mail.kmu-office.ch ([178.209.48.109]:38348 "EHLO mail.kmu-office.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727324AbfARPlw (ORCPT ); Fri, 18 Jan 2019 10:41:52 -0500 Received: from webmail.kmu-office.ch (unknown [IPv6:2a02:418:6a02::a3]) by mail.kmu-office.ch (Postfix) with ESMTPSA id B8CDA5C0690; Fri, 18 Jan 2019 16:41:50 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=agner.ch; s=dkim; t=1547826110; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TZkMRhCoCqusqJqwcuVH0wDyfIDkueVB6AfkeOJHqZ0=; b=qjBI+XXDH1TeGKdZ4x3+5QCq6IY3+ueuLMPt66uDNS/S8PsuD11NHmamHR3Fm7SRVxETEZ UG7/a5+4RmF7T63Ks+VCe2YRWzGRjE8a5pBiJLOjdv7pB85b5dSxlCnIjFNwLz0pI+zs1w fT1IxwN9Lz5jyWHM5Xrk5rgK93kmz/Q= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Date: Fri, 18 Jan 2019 16:41:50 +0100 From: Stefan Agner To: Lucas Stach Cc: shawnguo@kernel.org, s.hauer@pengutronix.de, max.krummenacher@toradex.com, marcel.ziswiler@toradex.com, linux-kernel@vger.kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, fabio.estevam@nxp.com, dev@pschenker.ch, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 1/2] ARM: dts: imx6q: add pmu interrupt-affinity In-Reply-To: <1547820733.2626.11.camel@pengutronix.de> References: <20190118135907.2336-1-stefan@agner.ch> <1547820733.2626.11.camel@pengutronix.de> Message-ID: <6e4fe68ec80926b4292ce786c6737182@agner.ch> X-Sender: stefan@agner.ch User-Agent: Roundcube Webmail/1.3.7 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 18.01.2019 15:12, Lucas Stach wrote: > Am Freitag, den 18.01.2019, 14:59 +0100 schrieb Stefan Agner: >> Explicitly specify interrupt affinity to avoid HW perfevents >> need to guess. This avoids the following error upon boot: >>   hw perfevents: no interrupt-affinity property for /pmu, guessing. >> > But then it isn't correct either AFAICS. On i.MX6 all the PMU IRQs are > ORed together into a single SPI, instead of each core dealing with its > own PPI. So pretending that there are more IRQs with affinity to each > core isn't the right thing to do, no? > Oh I see, we only have a single interrupt in the i.MX 6 case. I agree, this patches are wrong. Hm, but why does hw perf then think it needs to guess? Doesn't seem hard to guess right if there is only one choice... We probably need to do something like this? --- a/drivers/perf/arm_pmu_platform.c +++ b/drivers/perf/arm_pmu_platform.c @@ -122,7 +122,8 @@ static int pmu_parse_irqs(struct arm_pmu *pmu) return pmu_parse_percpu_irq(pmu, irq); } - if (nr_cpu_ids != 1 && !pmu_has_irq_affinity(pdev->dev.of_node)) { + if ((nr_cpu_ids != 1 || num_irqs != 1) && + !pmu_has_irq_affinity(pdev->dev.of_node)) { pr_warn("no interrupt-affinity property for %pOF, guessing.\n", pdev->dev.of_node); } -- Stefan > Regards, > Lucas > >> Specifying all four CPUs shows no aversive effects on i.MX 6Dual >> SoCs. >> >> > Signed-off-by: Stefan Agner >> --- >>  arch/arm/boot/dts/imx6q.dtsi | 7 +++++++ >>  1 file changed, 7 insertions(+) >> >> diff --git a/arch/arm/boot/dts/imx6q.dtsi b/arch/arm/boot/dts/imx6q.dtsi >> index 8381d24eff7d..d2c1977c8b16 100644 >> --- a/arch/arm/boot/dts/imx6q.dtsi >> +++ b/arch/arm/boot/dts/imx6q.dtsi >> @@ -537,6 +537,13 @@ >> >   <0x28 0x0000000c>; /* DCIC2_MUX_CTL */ >>  }; >>   >> +&pmu { >> > > + interrupt-affinity = <&{/cpus/cpu@0}>, >> > > +      <&{/cpus/cpu@1}>, >> > > +      <&{/cpus/cpu@2}>, >> > > +      <&{/cpus/cpu@3}>; >> +}; >> + >>  &vpu { >> >   compatible = "fsl,imx6q-vpu", "cnm,coda960"; >>  };