Message ID | 20230605113749.230696-18-apatel@ventanamicro.com |
---|---|
State | Accepted |
Headers | show
Return-Path: <opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org 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=<UNKNOWN>) 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=UtyXuGOU; 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=jRhOmx7q; dkim-atps=neutral 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 (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QZWpl4rqkz20QH for <incoming@patchwork.ozlabs.org>; Mon, 5 Jun 2023 21:39:11 +1000 (AEST) 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=6Lx7PtR/bOYl2648xLfs0yTiiccQsMxAJQ1H7Z/AHTg=; b=UtyXuGOUjQLJLk Ru9Xowlv5PTYtEXEMwCVspuVOU/pzbl4S/Y0KTj9Zvug4wtxk1O10UeUeFUUPz9Klcs3wBz2dttZ+ D7/CDxd6/kDlS8/8xZGYwFStEOiVrgoRu7zAM5N6/jB1EPs75chkQdCEgSYFIeQeLrcLKd6HwOnv0 TJrLc6B7DAsq1pjOmrNKdOcjCaq0vN+7+HK9BYUlbLlmiTtb7qVVdlIViP8iznnL+15w7xt54OuAM I1giibm3RJxgifTblEQxcSiMzWDPvjx+w18gY9u4M2gYewU9c2VUku71zowGoBxqGkE1sLqZr/Pxi Y9npLABzrPFufWfsdCLw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q68Y7-00FJKa-26; Mon, 05 Jun 2023 11:38:59 +0000 Received: from mail-oi1-x233.google.com ([2607:f8b0:4864:20::233]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q68Y5-00FJ3k-2d for opensbi@lists.infradead.org; Mon, 05 Jun 2023 11:38:58 +0000 Received: by mail-oi1-x233.google.com with SMTP id 5614622812f47-39a55e706deso1712204b6e.3 for <opensbi@lists.infradead.org>; Mon, 05 Jun 2023 04:38:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1685965137; x=1688557137; 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=1xY+w1bFVANLKfy5fUgkH5grPzFElBaml7or/LAxB1o=; b=jRhOmx7qsXqnR4xbVeHYmsbP+AxETaQz+wAPErE4e5f2VSLxsjzsKGhWqoOiyjUMiP BB0mLiVssTjqc+wAeObMc1+OWGYQq8i3hUJ/De7ykG5Bt77G6NRUUZFQIjTv7Mah1Tih 3shKMtg+bQvFvXltpgYXgrKwdC9jtUxmBs+CxRstg9jRGUFpwPnKqsZB1Of+gcpJ2rui AX2a8xATU/b/pTr1bzWikWhQ2ocv5Pl9naEPyZeMH1cmCaUzKXiqJl1JNvxYzsxdZ+qY RaHEf5ayEgKMfrNPR5WV5pBO9WjNTIawo2FibxqkvD0uO6z6Dv6x10xpDWeLPsJIEmzA s/Cw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685965137; x=1688557137; 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=1xY+w1bFVANLKfy5fUgkH5grPzFElBaml7or/LAxB1o=; b=EKwYz/6i/jAxZZuoKcl5AusPZHnH9sqhNWwodfGnWGlfj0xojZ00mZhEqda/ERR0jT nrdu3GqKUTnztnGpqCFkbxzfvx3Bb6b//g/mpe29zWdmjAa/qQDk+Prtu6TMwQX1hRIK npzH/ANQ03eeN8gwU++umLtGxkeDqdG7D7st7gm9g/x2/LsjP+IcIy8Vd/PAfN1Kdj+b PSBPbjDBuh5J2QA4ybahNTIq0zyF7BW3Fi+jTjRJHKtbsg5fGVQ4hn8M1zDdj0j0e8NG yaD5r7y81j0zN94sKcvpoSv024xx698mjz40UE1fs8NNjXWjU1LW25sjBWz4X/QbWpRw 385Q== X-Gm-Message-State: AC+VfDygkW4LadRUXFFPjDedVTJBRzQQuSO0FafCciQLhYCl5iToN7AI qxlx2hGgBWTDotl8RySBuc2hTg== X-Google-Smtp-Source: ACHHUZ4dpS02XyYjOD56ODDj2wmesbVsV9QbxojvFlkKifyFiU2/S0rUr/Kc90296YSQbt5m5al0OQ== X-Received: by 2002:a05:6808:2ce:b0:39a:a19a:3207 with SMTP id a14-20020a05680802ce00b0039aa19a3207mr1687898oid.18.1685965137261; Mon, 05 Jun 2023 04:38:57 -0700 (PDT) Received: from anup-ubuntu-vm.localdomain ([103.97.165.210]) by smtp.gmail.com with ESMTPSA id p10-20020a54460a000000b00396324838e7sm3155301oip.10.2023.06.05.04.38.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Jun 2023 04:38:57 -0700 (PDT) From: Anup Patel <apatel@ventanamicro.com> To: Atish Patra <atishp@atishpatra.org>, Alistair Francis <Alistair.Francis@wdc.com> Cc: Anup Patel <anup@brainfault.org>, opensbi@lists.infradead.org, Anup Patel <apatel@ventanamicro.com>, Andrew Jones <ajones@ventanamicro.com> Subject: [PATCH v2 17/18] lib: utils/irqchip: Don't check hartid in imsic_update_hartid_table() Date: Mon, 5 Jun 2023 17:07:48 +0530 Message-Id: <20230605113749.230696-18-apatel@ventanamicro.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230605113749.230696-1-apatel@ventanamicro.com> References: <20230605113749.230696-1-apatel@ventanamicro.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230605_043857_864922_333979B0 X-CRM114-Status: UNSURE ( 8.59 ) X-CRM114-Notice: Please train this message. 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 imsic_map_hartid_to_data() already checks hartid before using so we don't need to check in imsic_update_hartid_table(). Signed-off-by: Anup Patel <apatel@ventanamicro.com> Reviewed-by: Andrew Jones <ajones@ventanamicro.com> --- lib/utils/irqchip/fdt_irqchip_imsic.c | 3 --- 1 file changed, 3 deletions(-) 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:233 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 X-BeenThere: opensbi@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <opensbi.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/opensbi>, <mailto:opensbi-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/opensbi/> List-Post: <mailto:opensbi@lists.infradead.org> List-Help: <mailto:opensbi-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/opensbi>, <mailto:opensbi-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "opensbi" <opensbi-bounces@lists.infradead.org> Errors-To: opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org |
Series |
Introduce and use simple heap allocator
|
expand
|
diff --git a/lib/utils/irqchip/fdt_irqchip_imsic.c b/lib/utils/irqchip/fdt_irqchip_imsic.c index 590b202..d032ac8 100644 --- a/lib/utils/irqchip/fdt_irqchip_imsic.c +++ b/lib/utils/irqchip/fdt_irqchip_imsic.c @@ -12,7 +12,6 @@ #include <sbi/riscv_asm.h> #include <sbi/sbi_error.h> #include <sbi/sbi_heap.h> -#include <sbi/sbi_hartmask.h> #include <sbi_utils/fdt/fdt_helper.h> #include <sbi_utils/irqchip/fdt_irqchip.h> #include <sbi_utils/irqchip/imsic.h> @@ -44,8 +43,6 @@ static int irqchip_imsic_update_hartid_table(void *fdt, int nodeoff, err = fdt_parse_hart_id(fdt, cpu_offset, &hartid); if (err) return SBI_EINVAL; - if (SBI_HARTMASK_MAX_BITS <= hartid) - return SBI_EINVAL; switch (hwirq) { case IRQ_M_EXT: