From patchwork Fri Sep 25 11:29:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anup Patel X-Patchwork-Id: 1371186 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=uVk7J1cz; 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=bqGaFLIu; 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=E9N106wZ; 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 4ByV7w704Dz9sSf for ; Fri, 25 Sep 2020 21:30:04 +1000 (AEST) 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=iV8Drwi/ztBSY8E/+ucEBT68fK1a5hYbdYq+M7BkASU=; b=uVk7J1czLeOXdRKKsCStpFLk9 W+qrCiclPQdni+DUaeNzCuFfufBRwM7Qlmj2ClTTjIEyJNCyd9LlDdcHtaJjJEmHoTwzb8sSx8ZEm fctjyZSTTnUB/tovY5MsEjY+R1skvBPG3Uop8fhY0qYZpYSkTIRNYXWLGCU21sa/8Cxlp1E9Uvpeo ZU+ZzMRfPplTCXMibOt9KCFiKvuHcVeJB0r8Okj95q0TgkpUb12sSJI3M0n2iOaTdYR4g3yJwS4Hd hk6Ras3IZJH5Mv++mCElInJHXfWuCY3QIJoHzGvAL3hE8Avyj0qriKgYnShfc4wPQIQlKqo0ULBWy wMrGhXVnA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kLlvJ-0004Cq-W8; Fri, 25 Sep 2020 11:29:58 +0000 Received: from esa4.hgst.iphmx.com ([216.71.154.42]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kLlvE-00046H-Oc for opensbi@lists.infradead.org; Fri, 25 Sep 2020 11:29:55 +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=1601033392; x=1632569392; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=9gL85DLUJAO4aeyPKupvV++nCR6k5/EeIx4NwFreYoo=; b=bqGaFLIuGhpdCJpVNyJ6Ti+sXGztavGy0oZFbsJDXkgPHDDpBMZaCfJq JNVxGov0dPteOBg2shgWPPvpOujuZAzD9c4eth3974EO/+GK4Ac2pk+dn foHXt/jx5Q/Bp5vrCF7XrpbHGuRCm9Ii0yMeMaCUc5cAYjBxh2b6VvvrV G/71HEh1rj8uBpIglK3kq6If/jIVm9/A1uiQLkU0hx7CLChYUFr7pU5UE ES50R5MioQhX+jzno67g2mHkPoNG4JpC/qmXXbaK0amdcRV7Fu1c4r6ww Lj4pvtXJht0iCo8Fk+JDlMwCBbbi/r02MLvyEz6JW+GYoMAroR4Q77qBy g==; IronPort-SDR: SCPtzPcXUIAYe8ziiEJm7T4pGyiJClN27yzLxoDXpR7kEWXiailzK3EJcBMyUg3L6zoyiyziGT qNTeGlpIXKgocajPZqi1IXH+dConEqc5HjEBfBl5ihUs52DAz3znbRfvIXfOL0adSaOC9o0ZAb 2Hr+hC1l5NMXP1ICQ/HTmIDV0yrT6FpmZ/usRZN+ZPc629aeiMSjyWSOBSuovU9GULhDMNY4rh vy19xzZ0PRGNZNj1MMqERXwVe3+t9GOx5RrH8hsCgIhxLIoVLwAxEyhQuyM0JGdR5WxcwurPd5 zVM= X-IronPort-AV: E=Sophos;i="5.77,301,1596470400"; d="scan'208";a="148192089" Received: from mail-co1nam04lp2051.outbound.protection.outlook.com (HELO NAM04-CO1-obe.outbound.protection.outlook.com) ([104.47.45.51]) by ob1.hgst.iphmx.com with ESMTP; 25 Sep 2020 19:29:52 +0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SVS1IhqrToXS6t08iT69nGEGbA+rHQ6oJqGquoUZV3XrTfULZYjNL1Yvwf0EohoBNKUAaUjzD2AhdHdPYPwHJhiz3P5rNL91uTqs3nLmKGVYC7lbrB+73Sk/5Oq+Df9l7ppUnlwlYcn5/Mzkkneh02/0nJ4BpvjrbWQxfW0lrAcKdw3f6Ny9k/2peNBnxfmZ8epYsADjAOjtl27YBXYBKgfB6rT0eOc15NTwvQ1QcEXf5x0rDdfulb7VkVWHCoUK2nQ2uZpfX9jAG7NMD67WGO96wMph09/S6N36efW2Lof7tD9h4KmYBlM2es5mphpLUPArWKNBDN+LZ2qx0jI4hA== 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=amb9bbexjCb+mwYdNsw/7GcnU+rUPxyOB1+B+Y7UXPc=; b=jjDezf21Vc1VxxFb0Lx241AEfkHtsZeW5v9/SCAGc8FV0FG9PYHjH8MhS8wnWrXcPj3WRaPkZ0PhE8cwNHWTTbDBsR4f/ZV9sNu0Pi1MrZTggeEMHD6GfL/mZFOrACWvnPiVMBvcACLsGv2mvQcYBE7o2es+04q4DAIYSCySm9sK9Ez57Evlopv/pwAW3Q2OvWnSeBbzwB9m8A4SkVYC7CPsELoErB4t95wvg2ihBkqkgLRh3ARVY45BPp99EIgw8qWnUxia0oPtFtHEU08wJQ8F261flkvw4tAuMQsik0KP95V1YvyXb+wbKKCpgWAANiF+PaNU8mtjUWRaqICO3w== 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=amb9bbexjCb+mwYdNsw/7GcnU+rUPxyOB1+B+Y7UXPc=; b=E9N106wZbl0/+qwKVo1Q7EMyrZhm5uOHqEWIhR1r2yZr3mkhDjLmBhF4REz/Pr6uuzpl7HsAfw7OMFCqqlBrmRtPUXru830ZdxyapnQHYkfaxXlv+9Wg5YFtn/rAHLzvrU/spHk+yOktAMmIW47IG7eq+6cJVPQcNACgMv6GNJY= 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 DM6PR04MB6778.namprd04.prod.outlook.com (2603:10b6:5:24c::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3412.20; Fri, 25 Sep 2020 11:29:51 +0000 Received: from DM6PR04MB6201.namprd04.prod.outlook.com ([fe80::607a:44ed:1477:83e]) by DM6PR04MB6201.namprd04.prod.outlook.com ([fe80::607a:44ed:1477:83e%7]) with mapi id 15.20.3391.020; Fri, 25 Sep 2020 11:29:51 +0000 From: Anup Patel To: Atish Patra , Alistair Francis Subject: [PATCH 04/16] lib: sbi: Remove redundant hartid parameter from sbi_hart_init() Date: Fri, 25 Sep 2020 16:59:02 +0530 Message-Id: <20200925112914.725846-5-anup.patel@wdc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200925112914.725846-1-anup.patel@wdc.com> References: <20200925112914.725846-1-anup.patel@wdc.com> X-ClientProxiedBy: MA1PR01CA0152.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:71::22) 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.179.69.106) by MA1PR01CA0152.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:71::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3412.20 via Frontend Transport; Fri, 25 Sep 2020 11:29:49 +0000 X-Mailer: git-send-email 2.25.1 X-Originating-IP: [122.179.69.106] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 054a1c61-8119-4939-8a7e-08d86146513e X-MS-TrafficTypeDiagnostic: DM6PR04MB6778: 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: shA9FuZXlpWJYEzy2ZwhnvLBOozapYOaidQp4yhhLbwjlNJlNE1yF/Zm0cJg6ih8/H26a9Qqo6udiGNFMyEs19jDMQZcBW0cLKlDOSx82IomObbUL8V0n5XBRkx6eNywJ6eLOa+WMau3Tgf9nf5zaT7Ie6CGO5XwziszDh3pIWh4hUsj0C0OXOOx4bRUKMTcomxcXXeOdoWgPrp1PS74Hf+qFUruFpCmLE4oxkjf+fQvsyYr0nZX/Zp27ARfu5iDbvAUeSFye2z3AAsnH1RcOW3cTJmOXvpjBcjEXznnnQjga7rCsszSc6pOgFTiIyYxgmNjA2vUDZEEsiLaWwdTeg2MabMFdOD6uIP9Bgi2Z/Gxtan1LTN7sllehxq3VAh+ 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)(346002)(136003)(366004)(39860400002)(396003)(376002)(6636002)(6666004)(55016002)(66946007)(86362001)(26005)(1076003)(316002)(4326008)(2616005)(110136005)(44832011)(83380400001)(186003)(956004)(478600001)(52116002)(7696005)(66476007)(66556008)(16526019)(8886007)(2906002)(5660300002)(8676002)(36756003)(8936002)(54906003); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: 0H/fOELeg1y9bOFmsDcReK8wXSfyXLCQA3eQViS3Y/Cgri5UaidBV3qylE7wm9WunQIIVxtNHbpHsVEZfafln/bSDT4qjCsTxl3rWwVWPq4D5u2M+/B20HVWPhsRI7JWmNxGqKd9tXkFWWsb+Lk05aZT9mNXKO5vuHPcIASKrZ9jCHwLwOccsLk7+vOCFNam+ssJCY6mcDpppsIRTYjU4z4Tlv4d3bM07keqb5Mzy4MBTbiM4p5dhwpt7eyRxKJ0FyvrRR40FlG3yiJMHV3eBN+t0IWt9BkBRok9pQpI9qH1v4jiiVrst2Wnkm8/MB5rYmnJPHbauoT4uwpr4byaBhu8odMLGyGy+A1ca6npiewRFg59K5wMJ3sZKxdpV9XFllLZ0IjCNHPmL+c6/T0WjQYJnyXOA5vfyXTG+SohQdT58Td7y1M1Z4cEl3t8p3QJ0wiiSOk1Jhq1p1vJLncWZJw9VdH82daeJnZ0wR1DMA8R8FtXthqkwbtWyufycqPJQMyxDxrQ5QiZn8+D1cWJMGjSIsRyiFO94ivgnotprjZeRdNpFi1TKqBy3KEHzjHLMk7TbPSnsbezfgrmT3+hxol9Iv7u9uuM71vYouhT9c7Q5WMtK8xzwszb3v8MZyDZjWc9m4uGtWtCWQRjbt4Zgw== X-OriginatorOrg: wdc.com X-MS-Exchange-CrossTenant-Network-Message-Id: 054a1c61-8119-4939-8a7e-08d86146513e X-MS-Exchange-CrossTenant-AuthSource: DM6PR04MB6201.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Sep 2020 11:29:51.3741 (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: qka0mNhpdTUK/0YxZ8mKHhzzodg+7Ic993BP4at/pT8/dsK0MzIoqCzWdlaniXw2lmEMTNwUAJaX3HzgOqXa9A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR04MB6778 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200925_072952_966520_3C00C9A5 X-CRM114-Status: GOOD ( 14.72 ) 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 [216.71.154.42 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches 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 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 , 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 --- 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();