From patchwork Mon Mar 11 16:09:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anup Patel X-Patchwork-Id: 1910509 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=BB2uqzh3; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ventanamicro.com header.i=@ventanamicro.com header.a=rsa-sha256 header.s=google header.b=myg7gnZn; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4TthZd6FDMz1yWy for ; Tue, 12 Mar 2024 03:10:33 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=WaUoru4ORr3336geUlWT6x6J1DoYFOBhf1x49iL4sBo=; b=BB2uqzh3ilfKEq 0FyljdDq6dliRLll5jqUnPB1VGvlc1gwTB+E7E35xKX2zT6QOwZNjBff2j2Ll4O57yUzstUAb1D6c pPnLjQ5AaMLme6+1IvZmR/BvE4lyHxGTaU1Z2i1JVU4sKW5bSmMK9kt5JS+96BTgWGcaPZhhxZUjr ZGqr0Fj4OLU/HMmbIZYHAUw2A4zjeA5AH9M2t97Jjy4YtlnPwteuUaof+LAan27hHjAZCIqw0ElaK TNJsF4/Nwuk3DC3YL44upt7o60q3grE0wst11cFiQjSexS8XzxK2ffMyM2uhuWUmZ9rC48Wh91M9N j+qt7auXP1uykFatpPzA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rjiEM-00000002E65-02ju; Mon, 11 Mar 2024 16:10:26 +0000 Received: from mail-oo1-xc33.google.com ([2607:f8b0:4864:20::c33]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rjiEF-00000002E24-49JO for opensbi@lists.infradead.org; Mon, 11 Mar 2024 16:10:21 +0000 Received: by mail-oo1-xc33.google.com with SMTP id 006d021491bc7-5a1d1a28da2so663354eaf.1 for ; Mon, 11 Mar 2024 09:10:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1710173418; x=1710778218; darn=lists.infradead.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=pHP3dbIt68KQ6+EVMVR8WxSQiD4adlYZW9e38uiAQQM=; b=myg7gnZnbLnh4k7qf5AeDfTw88aSosJAcjl9sbrEByLsiUnMgda+j6cYKqsU7fGtCt 0JXZwbZ7jMB5fV7UOZkXJnBZmyw6R8fOqxN3wv25ywHnUy6Jd/VBkTjcMm9Z7UtUTsO9 uZq1wNcxRxGpi/I5Pw2n62BkuM/yFGiz2Gfg3egNEecfn11SAa/D+ZgEbYvg+EBOHAkw Vo4QGC61lXTzz142USmOkkBU6AJ5D6azQDXE6N6i13nFfsyAt7iw7r2wJ+NwBtp0MAuA pR07C4L/NL4Va3Z6tnFeHZ2ncVutDtanKTJCKv9TZWMBFYmYPEcT5lpi6bnQfpWfxHtm Xc8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710173418; x=1710778218; 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=pHP3dbIt68KQ6+EVMVR8WxSQiD4adlYZW9e38uiAQQM=; b=XISxzcTExWzN0ZRwCcvml/3KrxTWvsNKIioZXEyOnyMlC87SINeLn65DcYiDwzdAz2 0tncB9nvWe7HNFaearP61RIicCEt9eI6Pt0n2jEsexNjxo46BHVFzhBCo36R2zdo1RPs tGRsomSsSvM60FRBzVlzZOjM8ZapAfYET2vecMBwGfAafE/KyVTrzBIatGsFjySRhltQ KX8CZ4egkJuBD23uWRBM3nisai7km/tVcDJoMEYFJZyMQ4QW8FP6hIAIVjxbBHnAwPJl X+9h/myHhFVZ5Y3+BXWxohjXu0uu+cUI3KU0t8ESKbaANwgZOFkt6AAJ3rCx7crput2R aiIw== X-Forwarded-Encrypted: i=1; AJvYcCXAJDfzfTkh1QEOZWLyWsDAJL4pOBs9NOykwiVPaTTyieHuButG4IYgJ6eNBoqNcBpUwr3DM7mNBCIkysKZT9WaHu/jAr5fECxXviE= X-Gm-Message-State: AOJu0YwBedA3t7uXGssWSg0E3ApbEB9MpqvczlbnaA8bjChatrqG33d8 TlzotCtwHrRCsFsWOOEsTx5eD4AGk39NUw8EO3XXXF0qvIqWxHbBHpT9Mm1IAcqOtPnVr/kGKuh 1lyA= X-Google-Smtp-Source: AGHT+IGlbsmLrkDdYymR936xlhrPMuO0DJNQLTfdJjernDVVk+L5j6aNC5RUFNIaHI7cSh+U2jJz8Q== X-Received: by 2002:a05:6820:813:b0:5a1:dd31:a38d with SMTP id bg19-20020a056820081300b005a1dd31a38dmr5970634oob.6.1710173418276; Mon, 11 Mar 2024 09:10:18 -0700 (PDT) Received: from anup-ubuntu-vm.localdomain ([103.97.165.210]) by smtp.gmail.com with ESMTPSA id dc5-20020a056820278500b005a1ec8e04a7sm856912oob.25.2024.03.11.09.10.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Mar 2024 09:10:17 -0700 (PDT) From: Anup Patel To: Atish Patra Cc: Andrew Jones , Anup Patel , opensbi@lists.infradead.org, Anup Patel Subject: [PATCH 6/9] lib: sbi: Remove regs paramter of sbi_irqchip_process() Date: Mon, 11 Mar 2024 21:39:41 +0530 Message-Id: <20240311160944.1233523-7-apatel@ventanamicro.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240311160944.1233523-1-apatel@ventanamicro.com> References: <20240311160944.1233523-1-apatel@ventanamicro.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240311_091020_146345_0EAAD424 X-CRM114-Status: GOOD ( 12.54 ) X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: The irqchip handlers will typically not need pointer to trap registers so remove regs paramter of sbi_irqchip_process(). Signed-off-by: Anup Patel --- include/sbi/sbi_irqchip.h | 5 ++--- lib/sbi/sbi_irqchip.c | 10 +++++----- lib/sbi/sbi_trap.c | 4 ++-- lib/utils/irqchip/imsic.c | 2 +- 4 files c [...] Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:c33 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.0 T_SCC_BODY_TEXT_LINE No description available. X-BeenThere: opensbi@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "opensbi" Errors-To: opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org The irqchip handlers will typically not need pointer to trap registers so remove regs paramter of sbi_irqchip_process(). Signed-off-by: Anup Patel --- include/sbi/sbi_irqchip.h | 5 ++--- lib/sbi/sbi_irqchip.c | 10 +++++----- lib/sbi/sbi_trap.c | 4 ++-- lib/utils/irqchip/imsic.c | 2 +- 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/include/sbi/sbi_irqchip.h b/include/sbi/sbi_irqchip.h index 6acc6e3..0ed02eb 100644 --- a/include/sbi/sbi_irqchip.h +++ b/include/sbi/sbi_irqchip.h @@ -13,7 +13,6 @@ #include struct sbi_scratch; -struct sbi_trap_regs; /** * Set external interrupt handling function @@ -23,7 +22,7 @@ struct sbi_trap_regs; * * @param fn function pointer for handling external irqs */ -void sbi_irqchip_set_irqfn(int (*fn)(struct sbi_trap_regs *regs)); +void sbi_irqchip_set_irqfn(int (*fn)(void)); /** * Process external interrupts @@ -33,7 +32,7 @@ void sbi_irqchip_set_irqfn(int (*fn)(struct sbi_trap_regs *regs)); * * @param regs pointer for trap registers */ -int sbi_irqchip_process(struct sbi_trap_regs *regs); +int sbi_irqchip_process(void); /** Initialize interrupt controllers */ int sbi_irqchip_init(struct sbi_scratch *scratch, bool cold_boot); diff --git a/lib/sbi/sbi_irqchip.c b/lib/sbi/sbi_irqchip.c index 24128be..0ae604a 100644 --- a/lib/sbi/sbi_irqchip.c +++ b/lib/sbi/sbi_irqchip.c @@ -10,22 +10,22 @@ #include #include -static int default_irqfn(struct sbi_trap_regs *regs) +static int default_irqfn(void) { return SBI_ENODEV; } -static int (*ext_irqfn)(struct sbi_trap_regs *regs) = default_irqfn; +static int (*ext_irqfn)(void) = default_irqfn; -void sbi_irqchip_set_irqfn(int (*fn)(struct sbi_trap_regs *regs)) +void sbi_irqchip_set_irqfn(int (*fn)(void)) { if (fn) ext_irqfn = fn; } -int sbi_irqchip_process(struct sbi_trap_regs *regs) +int sbi_irqchip_process(void) { - return ext_irqfn(regs); + return ext_irqfn(); } int sbi_irqchip_init(struct sbi_scratch *scratch, bool cold_boot) diff --git a/lib/sbi/sbi_trap.c b/lib/sbi/sbi_trap.c index 3d300c3..e6ef6d1 100644 --- a/lib/sbi/sbi_trap.c +++ b/lib/sbi/sbi_trap.c @@ -209,7 +209,7 @@ static int sbi_trap_nonaia_irq(struct sbi_trap_regs *regs, ulong mcause) sbi_ipi_process(); break; case IRQ_M_EXT: - return sbi_irqchip_process(regs); + return sbi_irqchip_process(); default: return SBI_ENOENT; } @@ -232,7 +232,7 @@ static int sbi_trap_aia_irq(struct sbi_trap_regs *regs, ulong mcause) sbi_ipi_process(); break; case IRQ_M_EXT: - rc = sbi_irqchip_process(regs); + rc = sbi_irqchip_process(); if (rc) return rc; break; diff --git a/lib/utils/irqchip/imsic.c b/lib/utils/irqchip/imsic.c index 36ef66c..f2a35c6 100644 --- a/lib/utils/irqchip/imsic.c +++ b/lib/utils/irqchip/imsic.c @@ -140,7 +140,7 @@ int imsic_get_target_file(u32 hartid) return imsic_get_hart_file(scratch); } -static int imsic_external_irqfn(struct sbi_trap_regs *regs) +static int imsic_external_irqfn(void) { ulong mirq;