From patchwork Mon Oct 19 12:54:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anup Patel X-Patchwork-Id: 1384282 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=cHY7cs4f; dkim=permerror header.d=wdc.com header.i=@wdc.com header.a=rsa-sha1 header.s=dkim.wdc.com header.b=OC+SmETo; 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=LN5tgyVI; 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 4CFGvj09vFz9sVH for ; Mon, 19 Oct 2020 23:55:45 +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=i49LTs0ecrNWvsS1yCBDvVfKXyVwMgppluJHm8GT8YY=; b=cHY7cs4fYcDr2zWBZn2m6xbNq bvZXpCSUqKQMVvqozRR8weWRLve3ZAqJklIs1UChh7CaC/Zx6m1VbCVIrHmNvseelrk8tBDDnMzvG x2wpOK5+KXCI53FSjb3xMBY07CH5TywoqSrDtj8m4ksr5HB6ZZzYSYYMWkAScQLCk9tn8OILdU8kP AgYseZvcOv0IEspaeRdIa/9xDR5WAVQjkqC6G3gYPG4Q6NfMn5/p+G4aFEHb3/QyPx0eW3yefXCI/ zTVRaft1iCLUJNOmOYPYgc3EwWnl7lBpcTt+9uIrU/USnWMijvHZMi+wThK9fLS7/5LLIG/smHXxB KmleQRUXg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kUUhN-0004tn-8A; Mon, 19 Oct 2020 12:55:37 +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 1kUUhK-0004rH-30 for opensbi@lists.infradead.org; Mon, 19 Oct 2020 12:55:35 +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=1603112804; x=1634648804; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=ZGt5gKZWU9O+BjNh47hkqqg1k7HEfTLRWbx/XTiDs+A=; b=OC+SmETofAmc6Z78gN3xJJ35kSbw4QH5IbDOZn2VkHRARmuWGfzzsipz lgNGOz9gvt/5SkiBZWpqoIgRFmjRgg03b/LikYSsu5wfhW9eU+5qYlozp ListZgfjG6zhrm5BAVkPQnJSvOY8sMSOrrFu686va3NfDL6Zf1c0o1mW6 30H8BtshHb9AouoQ48py19N1KNaSeNhHqUpWmBFk5kh6Gr8PkrPqqoupj Nxk0zGb/eikQ9GkX2KbmtJBZEsDfm655U2TtlKgFqoXxjZ9PbYcM8Ut0A uZNu3vxz0cQIqX+1zhuk+yIbxkTLcpU02iuJmHXviyyXxK5Co70RytiYL A==; IronPort-SDR: aEtG+uJxv9zzajEZ0rOwrQ/3rn4T4j2zj4cV2rF7si0ZgDL/CQxlNGM4M89bPUOoCSCCWsNX0r zb+325P3WBKR/j6QGXd+trTtuvDd2pHIJlSdLVJdBUnKFy2IaLs2JmxVazkYuv9aWEBAc48BaD AhoasbiSrXMpAgLuPyOJmE2AZ3heEFmvCcV91b5CpQ09Q/SmApBX/kPIsFVyp2qAKGdhemoSUN ciqSf/0VF8qq5qf4OoeYaHpTMXBszMIvpNmqafVc99tIKOH6UcJ6s6Q4Os+xZwnAo8t8eXsN+W lPM= X-IronPort-AV: E=Sophos;i="5.77,394,1596470400"; d="scan'208";a="253808593" Received: from mail-cys01nam02lp2050.outbound.protection.outlook.com (HELO NAM02-CY1-obe.outbound.protection.outlook.com) ([104.47.37.50]) by ob1.hgst.iphmx.com with ESMTP; 19 Oct 2020 21:06:43 +0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iSkjm7yPihG+b9ke25O3Y/szQiK5iYYYKU7io96IUcvoHRO/xuFfdAK57dQXgqRcFp80ywZmRDs2HbWW4wDzeN/fesfAcKta/W5060eCxeN5KjROXwJNTKgVJqrJMKd7Fk/kAr7ytG94NuC0K2r/tVMcjY3oKW/8HJe60pvy0T1vJAS/Qox+UzaZ0scjUhyY2kyskSRiyz//+OGLFd+Yl9S3IUDLxerOGu08KDFeWfDfRWObNOZJuEALBiNZEyLbbjfCdPXqhb3/D+oJ65teACww+YoND2Vt+ysIkTparEESKVew4M15sVPeABCnxyCYYlFLACvyftyUlwQA4xRqYA== 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=6NoDu+zgTmcKnGteg5I8gRopdVVC5+Li12esk1ZA6/M=; b=FsObMKKnp95QatrH0tYDmGjkns2I/tLTsbttdlBldnoIGRisHK3FtSqqKzP34e5ov1+gpzHU6w5WbS2LVtmOf1oxKWO4t4M2XWz+xFw5Fo+0f2tZhHUK+TTsF2gSKUkt3YHBxXTbXmmOV4QKuk4z97x+QKp7DSBZSNtexY8CFEYL+bDQJUovvUAFGh+SRUKgKhtGUEApeKb/Bzf5lsFf6QUS7dhn4jM0pguoyUuvT6ZU8N1WkTOf8QKZ6dxSHu+vRdOqxjMEyiagGGmY6+hfUQ54vEeXszYMkVZS5/Z+xW3uwM3lf0TpXr4dqVPfPkMu5l5myPOnBMjsp0a/CWDZNA== 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=6NoDu+zgTmcKnGteg5I8gRopdVVC5+Li12esk1ZA6/M=; b=LN5tgyVIRO3+eF7MtLNta3ywoLunlqfOqQUPJX59Isf2fX2Fesoh8rXfGmd8Y1BmKwoHTLNCSC3iXN4aRnv7iDUKZ+UBCg2HIH9IVA+F0rLKJOPHUXC9UuQq1hlQEnSCtj8XaYfSq+hHmzkoooXOLubrD0dh6irQhjAjRfOxw30= 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 DM6PR04MB5548.namprd04.prod.outlook.com (2603:10b6:5:12a::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.27; Mon, 19 Oct 2020 12:55:31 +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; Mon, 19 Oct 2020 12:55:31 +0000 From: Anup Patel To: Atish Patra , Alistair Francis Subject: [PATCH v3 04/16] lib: sbi: Remove redundant hartid parameter from sbi_hart_init() Date: Mon, 19 Oct 2020 18:24:41 +0530 Message-Id: <20201019125453.2460105-5-anup.patel@wdc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201019125453.2460105-1-anup.patel@wdc.com> References: <20201019125453.2460105-1-anup.patel@wdc.com> X-Originating-IP: [122.172.253.92] X-ClientProxiedBy: MAXPR0101CA0060.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:e::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.172.253.92) by MAXPR0101CA0060.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:e::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.21 via Frontend Transport; Mon, 19 Oct 2020 12:55:29 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 8bbfc341-8507-4092-bb11-08d8742e42e9 X-MS-TrafficTypeDiagnostic: DM6PR04MB5548: 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: qhFVc+/DwWqgz2WTgIlKMbarEbKzQZ9tyPLSuIYp6vzRtSKwHooxCRmTmBrNgXj9i3WFt3uPP0YJsuFlZ0Hux4ZysLEZtVGr7Gtl1uVbB9AbcghHVGW8F3flDgjXwJx3/Yilsg5NLyIetTC61SmljbLz3PPhKwCdArzp1FIzhICPUpLkIq8wuh18DZrMEchB6dtdElNftwxpRvuQ7fzaHVeGmlDBoEDE7NtX1gOVs8vA1ICnkFxFYNeE66TU+mtbwE4YShSgrfwEdZ06rsjrkhSA9V8SmiksV2SqyZzZ44HOtOxxbe6wmHiTcuOOKODhhm4xQ+KZ0xR607FEPo+Zqw== 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)(366004)(136003)(396003)(376002)(346002)(39860400002)(6636002)(55016002)(6666004)(8886007)(66946007)(66476007)(8936002)(8676002)(66556008)(2906002)(86362001)(44832011)(83380400001)(2616005)(956004)(16526019)(5660300002)(186003)(54906003)(110136005)(52116002)(7696005)(55236004)(1076003)(4326008)(478600001)(316002)(36756003)(26005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: eLb/dyhA7JCqlKxUgyCKGVvt2dhvLZgNR8lKC6/MvzBM1D8q5ZGfWryGBLGdHnbNN9vQhQ19JAEV2KWQ7iEXY262JIJ1X7X/zFW0BKhKaNqpiLk0PPGPMr1ritAmrbJqccAyTrn9rn25HSJNdbXC340VV6BiIG3qMbQfIxkf6aTxtfZh0JEM+Oiy8BKnPvJNf3/fKXNJOuByAs9pL6c0sbyh/KJXOJWPokqNBZzf5G5LR6Y+4ras9zzNWqP1nQXi+CrYJx8PUY8EHWq+6pTGDVjFnLWOglsjwOopb27xDcC9z5dvWpADxcAJGtZvJ5AvKj1BqJaeehbWFlcdyBZPeYGi8/Qz/NxaxeGkome27dUzycL+ZP1uvttM4BgHDVMjrabzzMyPnMFBHMHdcsjawsEMUnwp8VilpP7H449GV3rF71GbpkDmq7e2IBQkcGpQB2aQ54KC+1uYfHLC7z88zi3/yq8ktXlUlFMOSWHoOjAcXtXPRrG7O5Q/sZtSXFDG3r8NSe1jbtH7NJ6mMT1ASwJRWPOw4+0GWXE01Z+OmDLaBrq5K5puUnp3/a6VrCkCdhiGVqSLf+X0VVdfhzFovii76s0FvShgpJVJJsh/Hc/KprcIr/2jnXDluQYUU/jyGRjDeE6VMd3vE9yAAq3sXQ== X-OriginatorOrg: wdc.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8bbfc341-8507-4092-bb11-08d8742e42e9 X-MS-Exchange-CrossTenant-AuthSource: DM6PR04MB6201.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Oct 2020 12:55:31.4915 (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: Qs0ghZmNEU0NE3k4t7L6Rw7jtDVX7JCBqxNj4GjdO68kwRAmnniBnRZHPo02TibK3zjWWzpQMKvHmshiWYg7dw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR04MB5548 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201019_085534_318698_20F47E0D X-CRM114-Status: GOOD ( 15.65 ) 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 , 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();