Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp580887ybg; Wed, 3 Jun 2020 08:21:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzonEM0m7jgdTUoo/SxX/aHtGo6mX9Y9U/LqZfbB5e91tPT5kYQQfhRoMHdmH2WVzOnbUom X-Received: by 2002:a50:a68f:: with SMTP id e15mr32769377edc.285.1591197665285; Wed, 03 Jun 2020 08:21:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591197665; cv=none; d=google.com; s=arc-20160816; b=qMrvx7DOU6cLvP24kUSMphydMOYrTzAi0i+XZSjefJPWIfl6m6Hj7lZt87uo6aeZO+ pI9qKCq1VkSJVkTV15auV1Jx4eNawTlRuPBqkZ7mVVQgGFtV8/DM8PzGYP/bx9Eh1ksi Bdad/VyabDuWzB0hyvOtkOhruAqPyxNvABkWX1M3+o40Tklw1iX81zAVjnBCvVUvO4Fi 2rJE/3aZD44NzVb/GWVP7bifYVMY5RLraaPoiJG33CRriViU42ALonsnvIr0s56Who19 TCMJ/n1qeGHmIIo8GGKSFcUFCtZR90Xiuk0Vy3G6mfO9K4XVHfbqIrT9MEgXwGHH51HX VE+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:user-agent:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature; bh=oPs2Er23+e5li+5wLX+IZhlwDZpR8CcjMqaf2/wJI14=; b=ps27sx6SRhv52zR1LTq85HCYpMPoThod+vxNaoNi8ikXAfNh9yOHVEZ4kJI3OaiKaI nW1HjUSHccy0YpHLuTgFWODDw6CtA66DbspPJ5xFBLAnW+SevJrm9YH6TsmJk/GAEnQ9 ApcOsb0WgLkMO5gMHf63Bo7LvHzNdHRTQIJnwantiV0FvzB6EeDK+SncNvXGkQCx3JzH LNO9VfWZitTgKy8Fb6K8WWLRYWjsCij6PwDzZaWxC32thO5dPmCNKF2IpaMUBwfjxsWY a/E0a9RbZdcpaoitEbPI1c2KNlCc73QmpwWVsyuou2l3bRqw5Iu/1o9PZ7IWPO1fJfhJ 6J/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=m3jJeo6l; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g14si1331602edl.432.2020.06.03.08.20.42; Wed, 03 Jun 2020 08:21:05 -0700 (PDT) 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=@kernel.org header.s=default header.b=m3jJeo6l; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726166AbgFCPQu (ORCPT + 99 others); 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...