From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B46F5C433DF for ; Wed, 3 Jun 2020 15:16:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9138220738 for ; Wed, 3 Jun 2020 15:16:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591197411; bh=8vfgBSrae1Sl/Co8GuGiBgYLsvF7HA7YclCM8lPnj00=; h=Date:From:To:Cc:Subject:In-Reply-To:References:List-ID:From; b=lbhCDS+F3QydRaKE8BWPdh42s6ciTQjJKafrzN61nyzd2dIdakVOlTkxfQZJRKjEq D7CE3LbqEmG7w30QYxKB7LZ6y2EqDkOzO0iw4s/YqDqqMtDS43HbRfi9DPUDZBGKfp 9G0VClA4+mUbMQ935jznenzMHYq6LMqI9qDm42qU= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726182AbgFCPQu (ORCPT ); Wed, 3 Jun 2020 11:16:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:34856 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726066AbgFCPQu (ORCPT ); Wed, 3 Jun 2020 11:16:50 -0400 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CA17D206E6; Wed, 3 Jun 2020 15:16:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591197409; bh=8vfgBSrae1Sl/Co8GuGiBgYLsvF7HA7YclCM8lPnj00=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=m3jJeo6lRuQ/vrRynASEprCi/bRIUGaRSPi5aAhrtSctPEaYpqEArdFme9bVSBOEJ w4UTYgt9Ysw8WAI1PfQNDp5kCgvW93kVXGqin/tZ0rkMeOAeQJmH6wQ+A1RfXlL5nV mmiINRD+WgMbVywc7EV4SJqSkJ6deRbaX1mIS4sI= Received: from disco-boy.misterjones.org ([51.254.78.96] helo=www.loen.fr) by disco-boy.misterjones.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jgV8K-00HUXD-7G; Wed, 03 Jun 2020 16:16:48 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Wed, 03 Jun 2020 16:16:48 +0100 From: Marc Zyngier To: "Saidi, Ali" Cc: "Herrenschmidt, Benjamin" , tglx@linutronix.de, jason@lakedaemon.net, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, "Woodhouse, David" , "Zilberman, Zeev" , "Machulsky, Zorik" Subject: Re: [PATCH] irqchip/gic-v3-its: Don't try to move a disabled irq In-Reply-To: References: User-Agent: Roundcube Webmail/1.4.4 Message-ID: <622fb6be108e894ee365d6b213535c8b@kernel.org> X-Sender: maz@kernel.org X-SA-Exim-Connect-IP: 51.254.78.96 X-SA-Exim-Rcpt-To: alisaidi@amazon.com, benh@amazon.com, tglx@linutronix.de, jason@lakedaemon.net, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, dwmw@amazon.co.uk, zeev@amazon.com, zorik@amazon.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020-06-02 19:47, Saidi, Ali wrote: [...] > Looks like the x86 apic set_affinity call explicitly checks for if > it’s activated in the managed case which makes sense given the code > Ben posted above: > /* > * Core code can call here for inactive interrupts. For > inactive > * interrupts which use managed or reservation mode there is > no > * point in going through the vector assignment right now as > the > * activation will assign a vector which fits the destination > * cpumask. Let the core code store the destination mask and > be > * done with it. > */ > if (!irqd_is_activated(irqd) && > (apicd->is_managed || apicd->can_reserve)) > > My original patch should certain check activated and not disabled. > With that do you still have reservations Marc? I'd still prefer it if we could do something in core code, rather than spreading these checks in the individual drivers. If we can't, fair enough. But it feels like the core set_affinity function could just do the same thing in a single place (although the started vs activated is yet another piece of the puzzle I didn't consider, and the ITS doesn't need the "can_reserve" thing). Thanks, M. -- Jazz is not dead. It just smells funny... From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3F651C433E0 for ; Wed, 3 Jun 2020 15:17:01 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0F6BC206E6 for ; Wed, 3 Jun 2020 15:17:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="pLXXB38z"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="m3jJeo6l" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0F6BC206E6 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-ID:References:In-Reply-To:Subject:To:From: Date:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=APGMYSnTZXZJj3VLdZVJ9Jd3EeKAxjBqaOYCs2IkxvI=; b=pLXXB38zr9+p4d0RvagOZGcP3 YjjDUWZkMPXtLnpJte2owboH/IXwuNvT+ZCD/fKrEyWVWDdTmpLm7TZhiLJWNaM69KUzvjeVD2TVK lHqE58SjEAp1MsCEBKwjzQ2Y0KWSV8yGxq5o26B76ZA23jg+J8adqPoKySuYaBaydTZuMcG6RmbZF QxJMUCiQp7BHDQilYscjNTrKtrhvRqvjNbtpGMPfHHkFe2mzBa3XIHAjNZC106ujKDvF5QthZXTmf BEi72aBt3WtNG/yCNtBpC3KcLcVJ4hj+3ClrzNwtFVPkxWfBtRHFPqsGIEXJZFiYnPjxdjgA1aSCj w6syGLZIQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jgV8P-00065i-1V; Wed, 03 Jun 2020 15:16:53 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jgV8M-000650-7y for linux-arm-kernel@lists.infradead.org; Wed, 03 Jun 2020 15:16:51 +0000 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CA17D206E6; Wed, 3 Jun 2020 15:16:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591197409; bh=8vfgBSrae1Sl/Co8GuGiBgYLsvF7HA7YclCM8lPnj00=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=m3jJeo6lRuQ/vrRynASEprCi/bRIUGaRSPi5aAhrtSctPEaYpqEArdFme9bVSBOEJ w4UTYgt9Ysw8WAI1PfQNDp5kCgvW93kVXGqin/tZ0rkMeOAeQJmH6wQ+A1RfXlL5nV mmiINRD+WgMbVywc7EV4SJqSkJ6deRbaX1mIS4sI= Received: from disco-boy.misterjones.org ([51.254.78.96] helo=www.loen.fr) by disco-boy.misterjones.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jgV8K-00HUXD-7G; Wed, 03 Jun 2020 16:16:48 +0100 MIME-Version: 1.0 Date: Wed, 03 Jun 2020 16:16:48 +0100 From: Marc Zyngier To: "Saidi, Ali" Subject: Re: [PATCH] irqchip/gic-v3-its: Don't try to move a disabled irq In-Reply-To: References: User-Agent: Roundcube Webmail/1.4.4 Message-ID: <622fb6be108e894ee365d6b213535c8b@kernel.org> X-Sender: maz@kernel.org X-SA-Exim-Connect-IP: 51.254.78.96 X-SA-Exim-Rcpt-To: alisaidi@amazon.com, benh@amazon.com, tglx@linutronix.de, jason@lakedaemon.net, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, dwmw@amazon.co.uk, zeev@amazon.com, zorik@amazon.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200603_081650_305221_F9F5E75C X-CRM114-Status: GOOD ( 12.63 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Herrenschmidt, Benjamin" , jason@lakedaemon.net, "Machulsky, Zorik" , linux-kernel@vger.kernel.org, "Zilberman, Zeev" , linux-arm-kernel@lists.infradead.org, tglx@linutronix.de, "Woodhouse, David" Content-Transfer-Encoding: base64 Content-Type: text/plain; charset="utf-8"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org T24gMjAyMC0wNi0wMiAxOTo0NywgU2FpZGksIEFsaSB3cm90ZToKClsuLi5dCgo+IExvb2tzIGxp a2UgdGhlIHg4NiBhcGljIHNldF9hZmZpbml0eSBjYWxsIGV4cGxpY2l0bHkgY2hlY2tzIGZvciBp Zgo+IGl04oCZcyBhY3RpdmF0ZWQgaW4gdGhlIG1hbmFnZWQgY2FzZSB3aGljaCBtYWtlcyBzZW5z ZSBnaXZlbiB0aGUgY29kZQo+IEJlbiBwb3N0ZWQgYWJvdmU6Cj4gICAgICAgICAgIC8qCj4gICAg ICAgICAgICAqIENvcmUgY29kZSBjYW4gY2FsbCBoZXJlIGZvciBpbmFjdGl2ZSBpbnRlcnJ1cHRz LiBGb3IgCj4gaW5hY3RpdmUKPiAgICAgICAgICAgICogaW50ZXJydXB0cyB3aGljaCB1c2UgbWFu YWdlZCBvciByZXNlcnZhdGlvbiBtb2RlIHRoZXJlIGlzIAo+IG5vCj4gICAgICAgICAgICAqIHBv aW50IGluIGdvaW5nIHRocm91Z2ggdGhlIHZlY3RvciBhc3NpZ25tZW50IHJpZ2h0IG5vdy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