From nobody Sun Nov 24 15:37:25 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1717094458; cv=none; d=zohomail.com; s=zohoarc; b=THmQ9iblmVqFC/0E7Qpl9APwS/wEyAyT3odwKGx3moHSS4TZBbLib5FC1fsTqvdFih8qhniplxVBlHhCXxmF2ejSA1mvzymqfkv4YNi2LYbdW6o9LohuK1Bt2ztIeyV28nKvnMwptDuYXqqv5kU3ZMh6BNAvayqgBjDR/GEzWbs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1717094458; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=/5QMwuJU8AJ5lyqy+M0BkxbHCvu9t37ti0og1vGBBFw=; b=U14yqcRdy5lYEyfkkYSJbHmaaUtMdtCyneNN1H3AbeyzVk7sd+CmUo8ivbTLqj/Zp7CZK6X8yuDRKAInJAyZHdZCPqMQnV8E4xBr6YqE3beb1L38D23uBfne5TIuTWvyXp6fyYlsAP8GIvMMNyO84QIxDn0aE0YWyWxuP5trTSA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1717094458001721.5436065509524; Thu, 30 May 2024 11:40:58 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.732958.1139025 (Exim 4.92) (envelope-from ) id 1sCkhZ-0004rK-1q; Thu, 30 May 2024 18:40:37 +0000 Received: by outflank-mailman (output) from mailman id 732958.1139025; Thu, 30 May 2024 18:40:37 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sCkhY-0004rD-Ty; Thu, 30 May 2024 18:40:36 +0000 Received: by outflank-mailman (input) for mailman id 732958; Thu, 30 May 2024 18:40:35 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sCkhX-0004ea-6x for xen-devel@lists.xenproject.org; Thu, 30 May 2024 18:40:35 +0000 Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [2a00:1450:4864:20::52d]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 18b2f88d-1eb4-11ef-b4bb-af5377834399; Thu, 30 May 2024 20:40:33 +0200 (CEST) Received: by mail-ed1-x52d.google.com with SMTP id 4fb4d7f45d1cf-57a30dbdb7fso218522a12.3 for ; Thu, 30 May 2024 11:40:33 -0700 (PDT) Received: from andrew-laptop.citrite.net ([217.156.233.157]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a67e6f02d29sm4086666b.14.2024.05.30.11.40.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 May 2024 11:40:31 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 18b2f88d-1eb4-11ef-b4bb-af5377834399 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.com; s=google; t=1717094432; x=1717699232; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=/5QMwuJU8AJ5lyqy+M0BkxbHCvu9t37ti0og1vGBBFw=; b=RPST3wXfWYZSMbmtGkpA+4O4NhPDK+Z3gVW/vdGO3z7JQEonVDnKO5IprFrQtLFphD neve3yJnhkQtxRHMbcNhLNdy69OaULi1QDXIhMqjHqJbWkNIZUgrKEiqdQ+IpV9oxikS fzM//Xs8iuUr9gaEkfEQGzqn9tv1IJuwpJALA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717094432; x=1717699232; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/5QMwuJU8AJ5lyqy+M0BkxbHCvu9t37ti0og1vGBBFw=; b=PUJ39ZjnySZx7F3WSbsvlLqAR/K2BGFcUHl84C21HQM27/4aRvBG+xCDfHTXprla7E AUGHxGkL1veELJTjTJ+avw65cxVW0pyyfPz9nTDTQIctrCHSA8oNn1ro5DDhQ0xQYFmy lqpn4Pijudf5UriSA+a8uru8Tf/NBUtZ2qJKsxkImWL+FO/ZPRjsThFjRYwG+Lvvljda c8xzHsFjuAcMLIssOxDf1wp4Se9/n1txKnNbEz9VrMNz9RYlmQFQ96FA5HruJT8XH1HW 27y+fOUdAAAD0+5iDNQB3R8pX/02MlYen3ml9kDpJKq8+8SWIwwZCqXworf/8sLgzjKD lnjg== X-Gm-Message-State: AOJu0YzvS2mLynBZyE3INJstX7i0vYor1Ava9dkVo0FEP6RW3yPpXdzI kR9olxlPqeOGbjN4L9At77l57VcOzLfvuTefdpAxhwI0exAf7ZAbkfC8A/iGDqej86qbgQxkAzk d X-Google-Smtp-Source: AGHT+IETGLUBFNDb8N54iW+kGM7XqF5hjLpboxoNZIpw3z1Xr11N+iJwjq9qdxtheDVhcDAuuhaTOA== X-Received: by 2002:a17:906:4f8c:b0:a59:a18e:3fda with SMTP id a640c23a62f3a-a65e92152e1mr208527366b.68.1717094432361; Thu, 30 May 2024 11:40:32 -0700 (PDT) From: Andrew Cooper To: Xen-devel Cc: Andrew Cooper , Jan Beulich , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Stefano Stabellini , Julien Grall , Volodymyr Babchuk , Bertrand Marquis , Oleksii Kurochko , Shawn Anastasio Subject: [PATCH 1/2] arch/irq: Make irq_ack_none() mandatory Date: Thu, 30 May 2024 19:40:26 +0100 Message-Id: <20240530184027.44609-2-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240530184027.44609-1-andrew.cooper3@citrix.com> References: <20240530184027.44609-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1717094459513100003 Any non-stub implementation of these is going to have to do something here. irq_end_none() is more complicated and has arch-specific interactions with irq_ack_none(), so make it optional. For PPC, introduce a stub irq_ack_none(). For ARM and x86, export the existing {ack,end}_none() helpers, gaining an i= rq_ prefix for consisntency with everything else in no_irq_type. No functional change. Signed-off-by: Andrew Cooper Acked-by: Julien Grall Acked-by: Shawn Anastasio a Reviewed-by: Jan Beulich --- CC: Jan Beulich CC: Roger Pau Monn=C3=A9 CC: Stefano Stabellini CC: Julien Grall CC: Volodymyr Babchuk CC: Bertrand Marquis CC: Oleksii Kurochko CC: Shawn Anastasio --- xen/arch/arm/include/asm/irq.h | 3 +++ xen/arch/arm/irq.c | 8 ++++---- xen/arch/ppc/stubs.c | 6 ++++++ xen/arch/x86/irq.c | 4 ++-- xen/include/xen/irq.h | 6 ++++++ 5 files changed, 21 insertions(+), 6 deletions(-) diff --git a/xen/arch/arm/include/asm/irq.h b/xen/arch/arm/include/asm/irq.h index 1bae5388878e..ec437add0971 100644 --- a/xen/arch/arm/include/asm/irq.h +++ b/xen/arch/arm/include/asm/irq.h @@ -98,6 +98,9 @@ void irq_set_affinity(struct irq_desc *desc, const cpumas= k_t *mask); */ bool irq_type_set_by_domain(const struct domain *d); =20 +void irq_end_none(struct irq_desc *irq); +#define irq_end_none irq_end_none + #endif /* _ASM_HW_IRQ_H */ /* * Local variables: diff --git a/xen/arch/arm/irq.c b/xen/arch/arm/irq.c index bcce80a4d624..7138f9e7c283 100644 --- a/xen/arch/arm/irq.c +++ b/xen/arch/arm/irq.c @@ -31,12 +31,12 @@ struct irq_guest unsigned int virq; }; =20 -static void ack_none(struct irq_desc *irq) +void irq_ack_none(struct irq_desc *irq) { printk("unexpected IRQ trap at irq %02x\n", irq->irq); } =20 -static void end_none(struct irq_desc *irq) +void irq_end_none(struct irq_desc *irq) { /* * Still allow a CPU to end an interrupt if we receive a spurious @@ -51,8 +51,8 @@ hw_irq_controller no_irq_type =3D { .shutdown =3D irq_shutdown_none, .enable =3D irq_enable_none, .disable =3D irq_disable_none, - .ack =3D ack_none, - .end =3D end_none + .ack =3D irq_ack_none, + .end =3D irq_end_none }; =20 static irq_desc_t irq_desc[NR_IRQS]; diff --git a/xen/arch/ppc/stubs.c b/xen/arch/ppc/stubs.c index da193839bd09..4e03428e071a 100644 --- a/xen/arch/ppc/stubs.c +++ b/xen/arch/ppc/stubs.c @@ -134,12 +134,18 @@ void pirq_set_affinity(struct domain *d, int pirq, co= nst cpumask_t *mask) BUG_ON("unimplemented"); } =20 +void irq_ack_none(struct irq_desc *desc) +{ + BUG_ON("unimplemented"); +} + hw_irq_controller no_irq_type =3D { .typename =3D "none", .startup =3D irq_startup_none, .shutdown =3D irq_shutdown_none, .enable =3D irq_enable_none, .disable =3D irq_disable_none, + .ack =3D irq_ack_none, }; =20 int arch_init_one_irq_desc(struct irq_desc *desc) diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c index c16205a9beb6..cfd7a08479d2 100644 --- a/xen/arch/x86/irq.c +++ b/xen/arch/x86/irq.c @@ -467,7 +467,7 @@ int __init init_irq_data(void) return 0; } =20 -static void cf_check ack_none(struct irq_desc *desc) +void cf_check irq_ack_none(struct irq_desc *desc) { ack_bad_irq(desc->irq); } @@ -478,7 +478,7 @@ hw_irq_controller no_irq_type =3D { irq_shutdown_none, irq_enable_none, irq_disable_none, - ack_none, + irq_ack_none, }; =20 static vmask_t *irq_get_used_vector_mask(int irq) diff --git a/xen/include/xen/irq.h b/xen/include/xen/irq.h index 89f7a8317a87..b71f65db8621 100644 --- a/xen/include/xen/irq.h +++ b/xen/include/xen/irq.h @@ -130,6 +130,12 @@ void cf_check irq_actor_none(struct irq_desc *desc); #define irq_disable_none irq_actor_none #define irq_enable_none irq_actor_none =20 +/* + * irq_ack_none() must be provided by the architecture. + * irq_end_none() is optional, and opted into using a define. + */ +void irq_ack_none(struct irq_desc *irq); + /* * Per-cpu interrupted context register state - the inner-most interrupt f= rame * on the stack. --=20 2.30.2 From nobody Sun Nov 24 15:37:25 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1717094455; cv=none; d=zohomail.com; s=zohoarc; b=IRJUhIkCNmmQhp0ZqXiTljfWCNqYRG0IfSxAB+SqqE1fvdZOI0a7cGwPrPSK2HHu36QlmwuhF2tpxMyVbFLZAfXvI9uG3mH1xbC5xTLSUdQWaWiTDgdn1UZgb6w0KeF/nWu+E805WYjxXOAR3TvZTfLa5VO3Z7QFcnOoxjB6EnI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1717094455; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=JuATIEzMZcMO0sma4DN6PPyKFK9rWyN48A84jE2N8B4=; b=bmNu+L9sw0Ajsg6Xau1xGo9RudlkHAMt209JPTtJglLYU3E7D7GhQ1cpAm56HDVSUp/qesJs3xnUkMmdzCKhhTYx56/dSPFvhTQ+kAdHYOms4fHCaC9lpzS8FuBpWkbG1bgALE2w5UgDoN9AuR0qowrndIguJxRiGXI3EeVzFkg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1717094455545216.43162516604434; Thu, 30 May 2024 11:40:55 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.732959.1139032 (Exim 4.92) (envelope-from ) id 1sCkhZ-0004v6-C0; Thu, 30 May 2024 18:40:37 +0000 Received: by outflank-mailman (output) from mailman id 732959.1139032; Thu, 30 May 2024 18:40:37 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sCkhZ-0004tc-57; Thu, 30 May 2024 18:40:37 +0000 Received: by outflank-mailman (input) for mailman id 732959; Thu, 30 May 2024 18:40:35 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sCkhX-0004ea-TO for xen-devel@lists.xenproject.org; Thu, 30 May 2024 18:40:35 +0000 Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [2a00:1450:4864:20::634]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 195f3364-1eb4-11ef-b4bb-af5377834399; Thu, 30 May 2024 20:40:34 +0200 (CEST) Received: by mail-ej1-x634.google.com with SMTP id a640c23a62f3a-a6266ffdba8so94041966b.1 for ; Thu, 30 May 2024 11:40:34 -0700 (PDT) Received: from andrew-laptop.citrite.net ([217.156.233.157]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a67e6f02d29sm4086666b.14.2024.05.30.11.40.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 May 2024 11:40:32 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 195f3364-1eb4-11ef-b4bb-af5377834399 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.com; s=google; t=1717094433; x=1717699233; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=JuATIEzMZcMO0sma4DN6PPyKFK9rWyN48A84jE2N8B4=; b=dVMD198jeziMqpU+HVNRBi0zdyMUDQ/QNvF11a0Pi/xmoTFpXHcy13BZdMwjToKyP/ ITiJ9AxlN3Beub9z4ZMv384DzTuqls09lAFw5ydb8vawHnrk/ct6ZPjK+Y71iM7BgN1j hB5SrCLNCtgFCdvbupmH1tF4orj7znBaEUaRA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717094433; x=1717699233; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JuATIEzMZcMO0sma4DN6PPyKFK9rWyN48A84jE2N8B4=; b=H37o9fCFKDHEuRErTBIhpDKDrNQhukbW3UWe3zUrSCjMTfEfmvNgp6JTaw3GfADMqi SrOfrTqa343BhA8zW52pBB0ME1Fcj+tdZ4yavdwdrvnEq8QPgTwxhb/D05KDDGwT/MQT VLPvjClc+uBBrCJd0xNFtaE8qjUYR3uEdWa8FJj37LvQV9aBJVw7tQX4tgqBGQgPWGB9 Ad449JJxiH6MVS/cqYBAArLI+hMlkICEk4Fo/1AfI91A7r5EHbuwx8GZLR5GhOF6v8bU Hd1lgEi+yEEMvqXyli8UsoCCLnCmdQ0LvAd9xJ6uHbnFespUWA9Ova5+cJMVt/8/ux0x SbPw== X-Gm-Message-State: AOJu0YzxupP51+uTbcgrPBEYTWOU/q7WtqYbyNpo4Nsk3c6EzrFBDRc8 1f809OjIZWUW2lNE2mZQGrNHsoDn1qEXips5mzdyBIDlivtrPC8JsgUl6T6rKC+5NLPvP1KrCzY T X-Google-Smtp-Source: AGHT+IHI7hSinh5KOPtR5MaVfNKKi6KsCTPQWGoxfcps63uJaoA2hCPyH6LCOpUNr5QWhTyaxvVRbw== X-Received: by 2002:a17:906:7f8e:b0:a62:a63c:18f0 with SMTP id a640c23a62f3a-a65e8d12070mr192357266b.1.1717094433363; Thu, 30 May 2024 11:40:33 -0700 (PDT) From: Andrew Cooper To: Xen-devel Cc: Andrew Cooper , Jan Beulich , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Stefano Stabellini , Julien Grall , Volodymyr Babchuk , Bertrand Marquis , Oleksii Kurochko , Shawn Anastasio Subject: [PATCH 2/2] arch/irq: Centralise no_irq_type Date: Thu, 30 May 2024 19:40:27 +0100 Message-Id: <20240530184027.44609-3-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240530184027.44609-1-andrew.cooper3@citrix.com> References: <20240530184027.44609-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1717094457655100001 Having no_irq_type defined per arch, but using common callbacks is a mess, = and particualrly hard to bootstrap a new architecture with. Now that the ack()/end() hooks have been exported suitably, move the definition of no_irq_type into common/irq.c, and into .rodata for good measure. No functional change, but a whole lot less tangled. Signed-off-by: Andrew Cooper Acked-by: Julien Grall Acked-by: Shawn Anastasio --- CC: Jan Beulich CC: Roger Pau Monn=C3=A9 CC: Stefano Stabellini CC: Julien Grall CC: Volodymyr Babchuk CC: Bertrand Marquis CC: Oleksii Kurochko CC: Shawn Anastasio Oleksii: For RISC-V, you should only need to provide a irq_ack_none() stub = now. --- xen/arch/arm/irq.c | 10 ---------- xen/arch/ppc/stubs.c | 9 --------- xen/arch/x86/irq.c | 9 --------- xen/common/irq.c | 13 +++++++++++++ xen/include/xen/irq.h | 2 +- 5 files changed, 14 insertions(+), 29 deletions(-) diff --git a/xen/arch/arm/irq.c b/xen/arch/arm/irq.c index 7138f9e7c283..e5fb26a3de2d 100644 --- a/xen/arch/arm/irq.c +++ b/xen/arch/arm/irq.c @@ -45,16 +45,6 @@ void irq_end_none(struct irq_desc *irq) gic_hw_ops->gic_host_irq_type->end(irq); } =20 -hw_irq_controller no_irq_type =3D { - .typename =3D "none", - .startup =3D irq_startup_none, - .shutdown =3D irq_shutdown_none, - .enable =3D irq_enable_none, - .disable =3D irq_disable_none, - .ack =3D irq_ack_none, - .end =3D irq_end_none -}; - static irq_desc_t irq_desc[NR_IRQS]; static DEFINE_PER_CPU(irq_desc_t[NR_LOCAL_IRQS], local_irq_desc); =20 diff --git a/xen/arch/ppc/stubs.c b/xen/arch/ppc/stubs.c index 4e03428e071a..923f0e7b2095 100644 --- a/xen/arch/ppc/stubs.c +++ b/xen/arch/ppc/stubs.c @@ -139,15 +139,6 @@ void irq_ack_none(struct irq_desc *desc) BUG_ON("unimplemented"); } =20 -hw_irq_controller no_irq_type =3D { - .typename =3D "none", - .startup =3D irq_startup_none, - .shutdown =3D irq_shutdown_none, - .enable =3D irq_enable_none, - .disable =3D irq_disable_none, - .ack =3D irq_ack_none, -}; - int arch_init_one_irq_desc(struct irq_desc *desc) { BUG_ON("unimplemented"); diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c index cfd7a08479d2..e36e06deaa68 100644 --- a/xen/arch/x86/irq.c +++ b/xen/arch/x86/irq.c @@ -472,15 +472,6 @@ void cf_check irq_ack_none(struct irq_desc *desc) ack_bad_irq(desc->irq); } =20 -hw_irq_controller no_irq_type =3D { - "none", - irq_startup_none, - irq_shutdown_none, - irq_enable_none, - irq_disable_none, - irq_ack_none, -}; - static vmask_t *irq_get_used_vector_mask(int irq) { vmask_t *ret =3D NULL; diff --git a/xen/common/irq.c b/xen/common/irq.c index 7225b4637486..29729349a6f2 100644 --- a/xen/common/irq.c +++ b/xen/common/irq.c @@ -3,6 +3,19 @@ =20 DEFINE_PER_CPU(const struct cpu_user_regs *, irq_regs); =20 +const hw_irq_controller no_irq_type =3D { + .typename =3D "none", + .startup =3D irq_startup_none, + .shutdown =3D irq_shutdown_none, + .enable =3D irq_enable_none, + .disable =3D irq_disable_none, + .ack =3D irq_ack_none, + +#ifdef irq_end_none /* Hook is optional per arch */ + .end =3D irq_end_none, +#endif +}; + int init_one_irq_desc(struct irq_desc *desc) { int err; diff --git a/xen/include/xen/irq.h b/xen/include/xen/irq.h index b71f65db8621..327cd2217c7e 100644 --- a/xen/include/xen/irq.h +++ b/xen/include/xen/irq.h @@ -122,7 +122,7 @@ extern int request_irq(unsigned int irq, unsigned int i= rqflags, void (*handler)(int irq, void *dev_id), const char *devname, void *dev_id); =20 -extern hw_irq_controller no_irq_type; +extern const hw_irq_controller no_irq_type; void cf_check no_action(int cpl, void *dev_id); unsigned int cf_check irq_startup_none(struct irq_desc *desc); void cf_check irq_actor_none(struct irq_desc *desc); --=20 2.30.2