Received: by 2002:a25:d783:0:0:0:0:0 with SMTP id o125csp817916ybg; Thu, 19 Mar 2020 09:16:29 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuYskOJYWS6rKOEatE+qV50ZcxjQNVfZf7htTNzRcE6y5k9mrG4MVvvHwpWInEJ+WIYVpZi X-Received: by 2002:aca:3b41:: with SMTP id i62mr2870170oia.55.1584634589429; Thu, 19 Mar 2020 09:16:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584634589; cv=none; d=google.com; s=arc-20160816; b=c+MoU8hhu3NyU0yJJ8oWp/TQ7huMS+z1O1MNLyf8xN29qUcwT4s0J836v2xQsdaF1n HDPsa8ZhrYDc4sttM2m85wg9xQXfVEcg1PCnvjEz/0NRVIEFF6o4s3qoKPpxXXyJnqxo pZ6OnrPmCk76vGoK3HXO4X2tVNc0oHJWzRkKKQ2fdiLAXpZ8+zkRPUHLBWzz3v/lNkO0 1tRCeTCKgIWE+ls4AtyZR+S/BmtPSam6SDo59OzOfnEoMl4/ysB4NVbrNHI59KE/yGAA QxEe67y/jktP8NhsZvfOBPQk/QlnmmYPd+w0mvNt9+dZjeHvMOm8D7sC1Vw0ZbkdNJGM A9yA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=q3My5gP6aoCh4nJ49CSUscFkHqO9lmIDHvANWpP/m+4=; b=cNfW/W68Etdkcw2l1Yq9Y+qprebD8o4dgqQq0S6u2Ep+qsTuE4t/e/C/X/v7h/tmCS 5SD9VOyH40Tsj9r6iMizK+qPiZuYTtJcNvoGHa2nvhjnB8sT0UMrc/kany+ZONIhI9zh 39NuOyr4Q1A+QSl8ZzHnoJJb1JVtNelhY32t6OfoywEeF7JyuICpeM/z1W1mVPKxTXo8 wcE7TS4strYtPFYavb4S6yx/3OGsbRl7sUhM2VTw96XmFRfc7mdIwzi9mfMRW+2mhEUj 2mSlmeb5fV/E1R7mzMnmXBcV8QNzMMaPBnPDJlqj9NFwbrg87zSXRretDLASmHi8uuIC fUzQ== 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 v126si1283914oia.106.2020.03.19.09.16.08; Thu, 19 Mar 2020 09:16:29 -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 S1728224AbgCSQMw (ORCPT + 99 others); Thu, 19 Mar 2020 12:12:52 -0400 Received: from foss.arm.com ([217.140.110.172]:38336 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726912AbgCSQMv (ORCPT ); Thu, 19 Mar 2020 12:12:51 -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 6677330E; Thu, 19 Mar 2020 09:12:51 -0700 (PDT) Received: from [192.168.1.123] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 5A75F3F52E; Thu, 19 Mar 2020 09:12:47 -0700 (PDT) Subject: Re: [PATCH 1/2] perf: dsu: Allow multiple devices share same IRQ. To: Mark Rutland , Tuan Phan Cc: patches@amperecomputing.com, Will Deacon , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org References: <1584491176-31358-1-git-send-email-tuanphan@os.amperecomputing.com> <20200319143250.GA4876@lakrids.cambridge.arm.com> <20200319143510.GB4876@lakrids.cambridge.arm.com> From: Robin Murphy Message-ID: <5c1e81ff-467c-f2dc-4d92-f60117f67b40@arm.com> Date: Thu, 19 Mar 2020 16:12:43 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <20200319143510.GB4876@lakrids.cambridge.arm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020-03-19 2:35 pm, Mark Rutland wrote: > On Thu, Mar 19, 2020 at 02:32:51PM +0000, Mark Rutland wrote: >> 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. > > Sorry, I misread dsu_pmu_get_online_cpu_any_but(), multiple instances > are handled already. Oh, so either way it's effectively a rerun of the U8500 problem of having no guarantee that the interrupt will be taken on an appropriate CPU, and losing genuine events as apparently spurious if it isn't. Yeah, that's really really bad... :( >> So NAK to this patch, given the above. > > Regardless, this NAK stands. Agreed, pretending that this might work without significantly more invasive workarounds does more harm than good. Robin.