Received: by 2002:a17:90a:1609:0:0:0:0 with SMTP id n9csp563593pja; Thu, 19 Mar 2020 07:33:44 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtSigro8Nwy1DcOCqq+6jXIfMR9m9RAj99AAbfRSDZgnEhwYEvXbmjPqMtlT6Kg02zavmfr X-Received: by 2002:a05:6830:403d:: with SMTP id i29mr2366242ots.353.1584628423860; Thu, 19 Mar 2020 07:33:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584628423; cv=none; d=google.com; s=arc-20160816; b=nJEPlkl1FV9sO6sj+EVwBcEUoCN5ErIKX5AHL1HueNCOKPBzRae1QAfliTsixT3uKt HFTdJNNuvIf9qjyRHcemsnixgmqB0G/B2RJpqC5qEfMOj81/hZT2UrM3Uoa9Xdf/JxC/ claadqTEvm4XbEoET96eMwli3XomhNbMGDij8AiRAw99Dl40BlZ9/qSvPn7+lbnKhCCI 3qoZ55j5uIdqE2y0u61kSgVb61WaK6Esm3S8TykuU5L7NRyRRwt+56JSOt9eOzXlsH4Q cOa7VdHxLY78T6yqeKpRL5Ytp7WwlN25dWlAwLTehqFucwMtO/SFy10snM7+TjyoimiQ 7wMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=3PcdDwLXol4CJr6fBtYY2dAJZrwPHsxS7RAtLTrihco=; b=enaxJfg/rM9xynmQ7OVphcyyRYjiju8hTzpK9bmsxOPY2S2r9paSzN5nVb2criL9/d CJiLxCxAis+wgZWhphEzuvU+YTqHgB/PnMFrmhgkPqOMiLXyk9REUbGtPTKP64sHVtvd oGRzOKElI1M3NrHD3q3yv8WgtOkMeqyS6jk18HbjVAbB6gPDuhUrwh9S/WAo3XMqmrfo NHpqNSHDnxhOzq/T4NLKkxcb8R+wn2Cmt9wvCOywAGjbVpqj6U+PEHFx+SvTc4rZfkk+ wY36sms4FU4au7LDCP3hcmGXoyCS9zysddCLi/YrvGMvsmrbAds6H4puS243skI3YjBL 7dQg== ARC-Authentication-Results: i=1; mx.google.com; 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 d75si1139198oib.22.2020.03.19.07.33.30; Thu, 19 Mar 2020 07:33:43 -0700 (PDT) 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; 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 S1727389AbgCSOc5 (ORCPT + 99 others); Thu, 19 Mar 2020 10:32:57 -0400 Received: from foss.arm.com ([217.140.110.172]:36998 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726795AbgCSOc5 (ORCPT ); Thu, 19 Mar 2020 10:32:57 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E5F1130E; Thu, 19 Mar 2020 07:32:56 -0700 (PDT) Received: from lakrids.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 274703F52E; Thu, 19 Mar 2020 07:32:56 -0700 (PDT) Date: Thu, 19 Mar 2020 14:32:51 +0000 From: Mark Rutland To: Tuan Phan Cc: patches@amperecomputing.com, Will Deacon , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] perf: dsu: Allow multiple devices share same IRQ. Message-ID: <20200319143250.GA4876@lakrids.cambridge.arm.com> References: <1584491176-31358-1-git-send-email-tuanphan@os.amperecomputing.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1584491176-31358-1-git-send-email-tuanphan@os.amperecomputing.com> User-Agent: Mutt/1.11.1+11 (2f07cb52) (2018-12-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 17, 2020 at 05:26:15PM -0700, Tuan Phan wrote: > Add IRQF_SHARED flag when register IRQ such that multiple dsu > devices can share same IRQ. > > Signed-off-by: Tuan Phan I don't think that this makes sense; further I think that this highlights that the current driver doesn't support such a configuration for other reasons. A DSU instance can only be accessed from a CPU associated with it, since it's accessed via sysregs. The IRQ handler must run on one of those CPUs. To handle that, the DSU PMU driver will need to gain an understanding of which CPUs are associated with the instance. As it stands the driver seems to assume that there's a single DSU instance, and that all CPUs are affine to that same instance. So NAK to this patch, given the above. Thanks, Mark. > --- > drivers/perf/arm_dsu_pmu.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/perf/arm_dsu_pmu.c b/drivers/perf/arm_dsu_pmu.c > index 70968c8..2622900 100644 > --- a/drivers/perf/arm_dsu_pmu.c > +++ b/drivers/perf/arm_dsu_pmu.c > @@ -700,7 +700,7 @@ static int dsu_pmu_device_probe(struct platform_device *pdev) > if (!name) > return -ENOMEM; > rc = devm_request_irq(&pdev->dev, irq, dsu_pmu_handle_irq, > - IRQF_NOBALANCING, name, dsu_pmu); > + IRQF_NOBALANCING | IRQF_SHARED, name, dsu_pmu); > if (rc) { > dev_warn(&pdev->dev, "Failed to request IRQ %d\n", irq); > return rc; > -- > 2.7.4 >