From patchwork Tue Oct 20 09:39:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anup Patel X-Patchwork-Id: 1384755 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=wdc.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=dPBZYifk; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=wdc.com header.i=@wdc.com header.a=rsa-sha256 header.s=dkim.wdc.com header.b=LFlcvJl4; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=sharedspace.onmicrosoft.com header.i=@sharedspace.onmicrosoft.com header.a=rsa-sha256 header.s=selector2-sharedspace-onmicrosoft-com header.b=jI50KGSE; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CFpfC5WK4z9ryj for ; Tue, 20 Oct 2020 20:45:55 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=KCxTXYr9+eKSiuFEVioQnlzUIZunnTyfRTr65r5L/p4=; b=dPBZYifkyVNbWRULH7nsLZ9Ji Uy50xLgThlYjBx/c/f5aE80I3pnnWl4WdBLaLKwr+h+/DKkNwNyX/trxfl3/Uq4XwYjqe2g0KYS4W yLEKBF7aZbjjNvx7DL8tns1/ffj0M6TOhXLkOUm5U8uyKpKO7gUaObP4MqAeyi+7wR+lnREsEsT20 XJdh44AL2EDbhT0bnhx0qOIvuKR+bYIW3AToMKqPS7zv1X+mE8oGx8syW/V4rFAE2uDEUmU/GlKGd wJ6dQgfSJlQuGgG5S+i7yggbsypC+I3ogz0SgDyLY+FJijQICPjLf/2MNvH2Prt74r2OBhziOJxsQ niUwCZ9OQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kUoDG-0002mZ-QS; Tue, 20 Oct 2020 09:45:50 +0000 Received: from esa2.hgst.iphmx.com ([68.232.143.124]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kUoDD-0002iv-Gm for opensbi@lists.infradead.org; Tue, 20 Oct 2020 09:45:48 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1603187195; x=1634723195; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=b2kX72qOkvK4jRJzcrj23g1t0wnalNcdWJqwxtm9Kbc=; b=LFlcvJl4tsgrYkMtPoMZkflrgpDlOcOHYQ3DFZzBtUmR57xUiQc0KxqI JAjyTUdYpkpa3C6ihHmkmXk6BiIv84o2zsdUH2w2cVzA0Bv86afRcWhHM WBQ8jGj93O7EEDyJkuXO9MYNnvRV8RS4mULOjNCBkMpSQxcfz7C3a2tf7 G2+3oH2dZMX7A7DrwTe+KYT2jPU6W+Y/aLR3iWMwr7VmOZRre4Nl8b3Iz 6d5+LXqpiAbgGkho5n3BkMQqrHFa3go1XEqhsPuBhtjrPiGI6uOU0SKax oVsTzfypWLiSte9MKrPIwMFa5f0Vgt9JZy5x9c4q5tDpM8mguiZHoJglh g==; IronPort-SDR: aUNIuou2ZZkF9YtVYE+M4+uNGgLDVxvAJD+0r2BzcsApDBOU8GfVDJ2n96daMGmiUL3fNIcr/O yc/qBqBQOCfvz1essoziOsN2OApNn5RhCnskYIFFkt5woB8SbEAdADRXXSz6UjYNQpYWljDWFu hQqjF3aNZWsdspU6WLstSfF8Y7wRwtKRI1Rxr+9YGoDc0kpEVfJkI0IjcjcE/eUVsd+SdGvtku xnMcRBIsOos4ZkHdBzl8xNBg3Ud4rdMe6sFMe0HQg/VSQIRg8KYMxVUExsE3gdXmjo4Bpv27+C /3Q= X-IronPort-AV: E=Sophos;i="5.77,396,1596470400"; d="scan'208";a="253896137" Received: from mail-mw2nam10lp2106.outbound.protection.outlook.com (HELO NAM10-MW2-obe.outbound.protection.outlook.com) ([104.47.55.106]) by ob1.hgst.iphmx.com with ESMTP; 20 Oct 2020 17:46:34 +0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PLxzhhFYrbxe2AEsuwviQSUQX/0mhbBXEpDRNk1piTDjKycIBtFi4ky3WzatW6mAYVO/QEHGFOMlcKjqGTuyscib97gFzE7GKrndrIsMp1K43HEIYdhTSjbuCj1QQGQnxyKStrRxaKYWZxnVEP91aRI+4BxpW9qaQ00eSyNuOyVZhWCRw4mKX8Q4Djkt/yZOVwvYQeQWQiwWOQACvaBmd7GfJX8S4r+9GCZSuVM7Sve9W/g5Cphncdy6Sfb2lIIc9JpygfsDMaIclAU5aRf0OOf/kH3SEdXZk95tVCqNYlJAmsYRoD/MDSfZFKrQpJBw9lUG4dF+qncOCOd6uaawyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RvmyFJzyG9DcKQ95XfHsfYzmVWYqNfkLGVblEcLMLVw=; b=UZgGc/FxlOG758snMBvkEzCMjj9X4NwdOYBR7mN14OIM/QHaed84MFLe4NDDPwoFhrfTYqfdApegWJsjQ9bFSHp+hythQ6A0hoBQ1Jh/0N0FC2PSw40eQ1MHUCr0bxUIdJlOwdzMqJvCB5TGGf4gPs/uxq7lMN01KmqQL/gEcPWBIZU7nhe7/gScHK8rkFefAeC4PovnfKel9TYvxlpL+eitTs1fD1MyYNs8GkkPsm/e5/bAIRelzUbbakk019KrPKbNHagtGM/2tFJokKXGdvf+1iUvqw4RLfNx4PdQlEfvcsMkQa2D3DOjJo9SceR+2+EAxJVUDh3IGA3R6dkOWg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wdc.com; dmarc=pass action=none header.from=wdc.com; dkim=pass header.d=wdc.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sharedspace.onmicrosoft.com; s=selector2-sharedspace-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RvmyFJzyG9DcKQ95XfHsfYzmVWYqNfkLGVblEcLMLVw=; b=jI50KGSESrgwFfLdWqcOmZeAhBYJImUdB23k+t3fHvMEAv1n9DBLfwd8udC8iaiVoEtgZRZak+MftO0TGLzAtiAaM50T4+HlKfDdgdFGWJlZjOsdJHHAtLab9DWWkHowfk+obKyqwfs7YlofhPnLKk1ezGkA5Hjb4jN4hDomX3k= Authentication-Results: wdc.com; dkim=none (message not signed) header.d=none;wdc.com; dmarc=none action=none header.from=wdc.com; Received: from DM6PR04MB6201.namprd04.prod.outlook.com (2603:10b6:5:127::32) by DM6PR04MB5833.namprd04.prod.outlook.com (2603:10b6:5:16d::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.20; Tue, 20 Oct 2020 09:45:45 +0000 Received: from DM6PR04MB6201.namprd04.prod.outlook.com ([fe80::d035:e2c6:c11:51dd]) by DM6PR04MB6201.namprd04.prod.outlook.com ([fe80::d035:e2c6:c11:51dd%6]) with mapi id 15.20.3477.028; Tue, 20 Oct 2020 09:45:45 +0000 From: Anup Patel To: Atish Patra , Alistair Francis Subject: [PATCH v4 04/16] lib: sbi: Remove redundant hartid parameter from sbi_hart_init() Date: Tue, 20 Oct 2020 15:09:18 +0530 Message-Id: <20201020093930.2551352-5-anup.patel@wdc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201020093930.2551352-1-anup.patel@wdc.com> References: <20201020093930.2551352-1-anup.patel@wdc.com> X-Originating-IP: [122.172.254.103] X-ClientProxiedBy: MAXPR0101CA0031.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:d::17) To DM6PR04MB6201.namprd04.prod.outlook.com (2603:10b6:5:127::32) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from wdc.com (122.172.254.103) by MAXPR0101CA0031.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:d::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.21 via Frontend Transport; Tue, 20 Oct 2020 09:45:43 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 425cc8e4-12bc-4f71-93b6-08d874dceac0 X-MS-TrafficTypeDiagnostic: DM6PR04MB5833: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: WDCIPOUTBOUND: EOP-TRUE X-MS-Oob-TLC-OOBClassifiers: OLM:2512; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: fJ+/1uup0iAxunzjuoKoxd59i2AhpruLwJ8lY1CkvaK0ycr43G1pmxciR7ao7udZRepOLsBD6NrKx/KOu8854Qc8hvLlKuEaBHezytXEUw5kNzcxavoFqVxaecSp41QL8eMfA0DN18Wp3wR4ui+KHe9GnPmYdcWuA1z6qE5IQcUBQAzK49FCQ86Uqvdm+UaSnJZwyitePvfpMAydBbizTlmW2EBCiPg1K569WbQBNGHECZ2poMdzUc+Q5aEGYe2yT3nESWphXhQWP/rYIrPc69nFHL24pJsztxEm3qSC86sVbkz2ER1OzH5cW080OU/G98r7qbpuwjdgnj6cmPKzyQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR04MB6201.namprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(376002)(396003)(346002)(39860400002)(136003)(366004)(6666004)(2616005)(2906002)(956004)(1076003)(55016002)(8886007)(478600001)(44832011)(66476007)(66556008)(5660300002)(66946007)(8676002)(54906003)(316002)(83380400001)(16526019)(186003)(110136005)(26005)(6636002)(55236004)(8936002)(52116002)(4326008)(7696005)(86362001)(36756003); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: JfVVwSs7IAWgoF5qQKnDo99a4bT6AkuZDHCrHIijqlVlQDNUAtr6bJOYbONkNB+ebSuSBhsJ3zr5rt6I/5zGjb553kBjZOgdl8XK9po6SxyqaqdJ4BpDi3hDgp3B86XiO4d/5a/pNCY502MwlTwuuV0Y7Us8w5KUSYx6/Ihy0dozdJrNUerFQIoAJHl53xY93RKTBpxj89lvXRpB5YN2MbpKy9PgE7jwrYdDGuv0n9vkITIT2moR5bN+k31fYwaIJhc1sFIXlw4fw8RPvIzs3GXMjPJOH8iB88/ExR4t7t80fJybhbxFTYi0QpCReJD3c98jMrbuWNx2LylCJi7TMNTSTh/V5i0k9XUkIvkABTQKqd0Tocx33pe4NivRqs2zKUyMhRxeTl1YlzVWbea6nW8Xb4NQ8141dojijaQ8sda4zE1guR+ms/V/jYStqAaYquAZ7hhMfgeTgC2dHaDFiXPZApe30REoJvItPC1Wtc4ASQMVVFKQga2w5mlH8Ho3tGS3itZnxC9Zplqad6wKwQo8dXzywZRkG1jIyidltZ6lrc7SgoRFLBXaGosRwVQu6R6xGaEXP9zyqs0zKRWgcvqWuFFmp25AMxlPycI/xDd+W8k97wYisL3l+Rip9p0H6TvRR2nCTcSsxnBynOp7hA== X-OriginatorOrg: wdc.com X-MS-Exchange-CrossTenant-Network-Message-Id: 425cc8e4-12bc-4f71-93b6-08d874dceac0 X-MS-Exchange-CrossTenant-AuthSource: DM6PR04MB6201.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Oct 2020 09:45:45.7178 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: b61c8803-16f3-4c35-9b17-6f65f441df86 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 8bOJPtmIEx2OlhB1emvYLqHlfmGkVuY1vBk5U+sE//DfnomFWyfkni2iI0GjNelQmV/SCqpyK4s+C0JAi3cXVg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR04MB5833 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201020_054547_721332_DCA5CCE1 X-CRM114-Status: GOOD ( 15.08 ) X-Spam-Score: -2.5 (--) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-2.5 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [68.232.143.124 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from 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_AU Message has a valid DKIM or DK signature from author's domain 0.0 MSGID_FROM_MTA_HEADER Message-Id was added by a relay X-BeenThere: opensbi@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Anup Patel , Anup Patel , Alistair Francis , opensbi@lists.infradead.org Sender: "opensbi" Errors-To: opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org The hartid parameter of sbi_hart_init() is not used anywhere in sbi_hart_init() implementation so let's remove it. Signed-off-by: Anup Patel Reviewed-by: Atish Patra Reviewed-by: Alistair Francis --- include/sbi/sbi_hart.h | 2 +- lib/sbi/sbi_hart.c | 14 +++++++------- lib/sbi/sbi_init.c | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/include/sbi/sbi_hart.h b/include/sbi/sbi_hart.h index 9207f4c..2efe44d 100644 --- a/include/sbi/sbi_hart.h +++ b/include/sbi/sbi_hart.h @@ -27,7 +27,7 @@ enum sbi_hart_features { struct sbi_scratch; -int sbi_hart_init(struct sbi_scratch *scratch, u32 hartid, bool cold_boot); +int sbi_hart_init(struct sbi_scratch *scratch, bool cold_boot); extern void (*sbi_hart_expected_trap)(void); static inline ulong sbi_hart_expected_trap_addr(void) diff --git a/lib/sbi/sbi_hart.c b/lib/sbi/sbi_hart.c index 7244f1c..88ffab0 100644 --- a/lib/sbi/sbi_hart.c +++ b/lib/sbi/sbi_hart.c @@ -33,7 +33,7 @@ struct hart_features { }; static unsigned long hart_features_offset; -static void mstatus_init(struct sbi_scratch *scratch, u32 hartid) +static void mstatus_init(struct sbi_scratch *scratch) { unsigned long mstatus_val = 0; @@ -62,7 +62,7 @@ static void mstatus_init(struct sbi_scratch *scratch, u32 hartid) csr_write(CSR_SATP, 0); } -static int fp_init(u32 hartid) +static int fp_init(struct sbi_scratch *scratch) { #ifdef __riscv_flen int i; @@ -83,7 +83,7 @@ static int fp_init(u32 hartid) return 0; } -static int delegate_traps(struct sbi_scratch *scratch, u32 hartid) +static int delegate_traps(struct sbi_scratch *scratch) { const struct sbi_platform *plat = sbi_platform_ptr(scratch); unsigned long interrupts, exceptions; @@ -435,7 +435,7 @@ __mhpm_skip: hfeatures->features |= SBI_HART_HAS_TIME; } -int sbi_hart_init(struct sbi_scratch *scratch, u32 hartid, bool cold_boot) +int sbi_hart_init(struct sbi_scratch *scratch, bool cold_boot) { int rc; @@ -452,13 +452,13 @@ int sbi_hart_init(struct sbi_scratch *scratch, u32 hartid, bool cold_boot) hart_detect_features(scratch); - mstatus_init(scratch, hartid); + mstatus_init(scratch); - rc = fp_init(hartid); + rc = fp_init(scratch); if (rc) return rc; - rc = delegate_traps(scratch, hartid); + rc = delegate_traps(scratch); if (rc) return rc; diff --git a/lib/sbi/sbi_init.c b/lib/sbi/sbi_init.c index 85a5f13..5cedb15 100644 --- a/lib/sbi/sbi_init.c +++ b/lib/sbi/sbi_init.c @@ -182,7 +182,7 @@ static void __noreturn init_coldboot(struct sbi_scratch *scratch, u32 hartid) if (rc) sbi_hart_hang(); - rc = sbi_hart_init(scratch, hartid, TRUE); + rc = sbi_hart_init(scratch, TRUE); if (rc) sbi_hart_hang(); @@ -250,7 +250,7 @@ static void __noreturn init_warmboot(struct sbi_scratch *scratch, u32 hartid) if (rc) sbi_hart_hang(); - rc = sbi_hart_init(scratch, hartid, FALSE); + rc = sbi_hart_init(scratch, FALSE); if (rc) sbi_hart_hang();