Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp2023867lqa; Tue, 30 Apr 2024 06:30:16 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWYhc/SzFVV1p6/8AnGO+pISo3pfQwSXb5Xew/Ly0bVVs9zcJoUfcKIuCPYjKgG4s+fPZXpe9J13BRh7dHTnMktw9BwXh/etLoJPnA2zA== X-Google-Smtp-Source: AGHT+IEJvm+rV5+ZRCJiw1/yEHCjOfZv3rwP3VsPLyyO5VPaCl/haNTPWLdlbTW2pikjj0rdOQ0l X-Received: by 2002:a37:e110:0:b0:790:95ad:a688 with SMTP id c16-20020a37e110000000b0079095ada688mr11181174qkm.2.1714483816387; Tue, 30 Apr 2024 06:30:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714483816; cv=pass; d=google.com; s=arc-20160816; b=hy7Yz2f9VXa21bjiiNrwuXvwLbuJBVfy6f5/LQUybZrnXe7qpC5ILW6BWgv+awG1kp x7GJuHPiWDe+RytSctyHPG3jfVokJ/AlWHdu0cAI8ngzLPlyiVRBSk61hZMwzIc6PT9V yNVvQ+Cg0N81wTxrW/fm+cWRR86WcIS+W5zHLhu5Pj1bbBEz+AmBXv8J6krTXW7UYSql vuuWb+OKf/G++aFlqSHS5a0cg9eiTUcI5hY0oHOCKP2slMS2VuhQwN47r84CYOdIeG/z IVwEi9ux/UrUrVjuC/pbwGd0LZk3DXijOVVqcQauvhePZmrkHpc3v6gHOr1md2BlXVLV SprA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:precedence:robot-unsubscribe:robot-id :message-id:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:references:in-reply-to:cc:subject:to:reply-to:sender :from:dkim-signature:dkim-signature:date; bh=VH0v4JhvxE7rVEa7z71kqkDFLVc/B4oco1ir7/ngxVs=; fh=R7LqAt/jSCi02Q5rwNYol6TuujP5ISPK9p+EdW5x3xs=; b=z+BDEbWnpy1WOx5neN0FJHmf7Ps+VilqyEPQnwPAdWEpczfwDUBfEDEbRuXEHcmYt2 UBrfSwPPo1btZAEPbgnzU9mAe0F4HZ+8GeEp/4QcW7WIhrIJkWu9OX/JfjJuXAaGoQax SI0d4W5l22vv502gBb5t7Pfcl0/cqZQf1S48c8X8+PAiG/ZgFNp37354DO5bQm1baCRx omXSe3VX0qg0tCsf4bp38CuRY8cTfoK7qllET2Q1/m3c+GpFVC1mcp5BC3gc+aOiF9sA kUr6b8pKJSY6mSWNBeoUf3OrgIOnDnS7YL8pRg/dPyWFR1F5DikGT4EMAFJVkekMT+DO fNfA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="t7xMqOa/"; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-164006-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-164006-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id wl24-20020a05620a57d800b0078ed995de4dsi28556764qkn.12.2024.04.30.06.30.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 06:30:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-164006-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="t7xMqOa/"; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-164006-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-164006-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 226B11C21BF9 for ; Tue, 30 Apr 2024 13:30:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1DF36175560; Tue, 30 Apr 2024 13:28:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="t7xMqOa/"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="nLf5OIOZ" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 62D68172769; Tue, 30 Apr 2024 13:28:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714483727; cv=none; b=hjqi809OpmVTjBkz3QxJDjpq5eHFdzIfWHlk5oXDdrINa9HHwMymGWuzzlr6T9ENw3WgIn48UpCOaLEW6J5hXCQ5rh6eydbsc+L2qJh+czBnUPJgYnbxLvCldNphfwB0+rhwggVGsuBLDFJxLi8duNmun6gOk3RT0MvxzfAkvIU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714483727; c=relaxed/simple; bh=/aljL3+AtwmpxpEZSh5KoiMlKYLkCtK1Se8fSfzjaZE=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=AMV1cwLofgLG9kf4TFtHbDkte8aoFhWYKV2fMHaKNNPvPmgZtShqeMPbl+vEBHCi0zSxiWyP2iNdhFLe7EUS/UnX4eIHaa+yAJZawnaSPxZw0l4W1WN0puwuIrsB1PwJYYAiyeu/LG4pnsVd9M7Hw9dqRVp4MoZvBBnzdc4713I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=t7xMqOa/; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=nLf5OIOZ; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Date: Tue, 30 Apr 2024 13:28:41 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1714483722; h=from:from:sender:sender:reply-to: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=VH0v4JhvxE7rVEa7z71kqkDFLVc/B4oco1ir7/ngxVs=; b=t7xMqOa/crKzsfVG92fgn5yn8r+4ogYUn66ffaxL+2gUJfT2Eq+VpylOqo0iAKmith5QYp gSvRmrP5D7D+10p9vuaQ5m4adV669me1RycNAzLV75WSM7xVHUFDDC5hSKuh+jTo/JOg4c Eft2cFk2GfesKVRwL9BY3HYvaP0u92wGmHTN5OTB9QGLiyLtHDyi3BQ1AZukjJ8Pe1VZ3B lx6cUAHXQ9MWFGM/CblVx/3atMinMSIlOhIWCi0wpXBkIVilLOBvpDlSdavG0Syqt8ppfQ xDblBFcClKIgfgTxy3yLSLRAZ96RddjhDKTLyto94Ut9hJcjNUEqdijTCOO43Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1714483722; h=from:from:sender:sender:reply-to: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=VH0v4JhvxE7rVEa7z71kqkDFLVc/B4oco1ir7/ngxVs=; b=nLf5OIOZOa+ur56Zym/xnljgmGxUHKFEqBlZHUjptSyqfxhy7bkbUPKDJhhcWNALeTfPen VVzwtGXY6/AXiCCg== From: "tip-bot2 for Jacob Pan" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/irq] x86/irq: Factor out handler invocation from common_interrupt() Cc: Jacob Pan , Thomas Gleixner , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20240423174114.526704-8-jacob.jun.pan@linux.intel.com> References: <20240423174114.526704-8-jacob.jun.pan@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <171448372181.10875.14546521952533857737.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit The following commit has been merged into the x86/irq branch of tip: Commit-ID: 6087c7f36ab293a06bc0bcf3857ed4d7eb1f9905 Gitweb: https://git.kernel.org/tip/6087c7f36ab293a06bc0bcf3857ed4d7eb1f9905 Author: Jacob Pan AuthorDate: Tue, 23 Apr 2024 10:41:09 -07:00 Committer: Thomas Gleixner CommitterDate: Tue, 30 Apr 2024 00:54:42 +02:00 x86/irq: Factor out handler invocation from common_interrupt() Prepare for calling external interrupt handlers directly from the posted MSI demultiplexing loop. Extract the common code from common_interrupt() to avoid code duplication. Signed-off-by: Jacob Pan Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240423174114.526704-8-jacob.jun.pan@linux.intel.com --- arch/x86/kernel/irq.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/arch/x86/kernel/irq.c b/arch/x86/kernel/irq.c index dbb3a19..d652b04 100644 --- a/arch/x86/kernel/irq.c +++ b/arch/x86/kernel/irq.c @@ -242,18 +242,10 @@ static __always_inline void handle_irq(struct irq_desc *desc, __handle_irq(desc, regs); } -/* - * common_interrupt() handles all normal device IRQ's (the special SMP - * cross-CPU interrupts have their own entry points). - */ -DEFINE_IDTENTRY_IRQ(common_interrupt) +static __always_inline void call_irq_handler(int vector, struct pt_regs *regs) { - struct pt_regs *old_regs = set_irq_regs(regs); struct irq_desc *desc; - /* entry code tells RCU that we're not quiescent. Check it. */ - RCU_LOCKDEP_WARN(!rcu_is_watching(), "IRQ failed to wake up RCU"); - desc = __this_cpu_read(vector_irq[vector]); if (likely(!IS_ERR_OR_NULL(desc))) { handle_irq(desc, regs); @@ -268,7 +260,20 @@ DEFINE_IDTENTRY_IRQ(common_interrupt) __this_cpu_write(vector_irq[vector], VECTOR_UNUSED); } } +} + +/* + * common_interrupt() handles all normal device IRQ's (the special SMP + * cross-CPU interrupts have their own entry points). + */ +DEFINE_IDTENTRY_IRQ(common_interrupt) +{ + struct pt_regs *old_regs = set_irq_regs(regs); + + /* entry code tells RCU that we're not quiescent. Check it. */ + RCU_LOCKDEP_WARN(!rcu_is_watching(), "IRQ failed to wake up RCU"); + call_irq_handler(vector, regs); set_irq_regs(old_regs); }