Message ID | 20200925112914.725846-13-anup.patel@wdc.com |
---|---|
State | Superseded |
Headers | show
Return-Path: <opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org> 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=<UNKNOWN>) 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=fZk7b1xO; dkim=permerror header.d=wdc.com header.i=@wdc.com header.a=rsa-sha1 header.s=dkim.wdc.com header.b=GIQAMc6E; 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=ALW6XtAk; 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 4ByV8L39RDz9sSf for <incoming@patchwork.ozlabs.org>; Fri, 25 Sep 2020 21:30:26 +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=YRE6Pv3x5Qr9F97gQUoPmae1nTZvyg3J/R53D44l2g0=; b=fZk7b1xO1kjPvMLvFY5lDAkQe jVsDeoBMG3FVtZExe6NP69pmRq5ETevol8MvI6B/f18tVe/VN48YNIMBeA7qOtygXRiJUDp0bEg4A S6MbRnnC4HzCkLluL8kvbTdfw7M1BnBDzBsAbC0EXrIk7VJiYdmCxTIOV5ILEYUN3CvSQyD7y7jUN bM5aSekL3wRCJe6kqNnIaNQ21liuCCVK6J3hSrDf18iQJP+rXCtX+oUQcMZEB5Y3pq/zXrPPsRCjk 3bpTqpj9e2i1ZuaCznsd2vQHzvQNy5+DLbcbxY2y2wIB3X2p3n+BwV/rHopuT+MaiYwIytHcjrCZH sYWlMLxfw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kLlve-0004PG-Mv; Fri, 25 Sep 2020 11:30:18 +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 1kLlva-0004Kl-1w for opensbi@lists.infradead.org; Fri, 25 Sep 2020 11:30:15 +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=1601034573; x=1632570573; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=p9RqhbxP8nRbEujzLDj2a+0gNVkVZdckGh7nfKbI1Qk=; b=GIQAMc6EMw67XuiWvzHZoBz4yOcDLAETN17qx9iQYjn/z4JeLV6FFAQh IN593hEBu5t/Pw/SO6jKUvdeMDTVpeDTi1NMIDGGFEga4/SoHhc4h3tcR mpAks7Ke2LpC2vPAy2k7YAv5YEMgEhrtptCuxz8B0R//VH3m/ql3TQzqF k5yhUSel89rD5kQG9/Z7WdOHTeaHDaArOHGvp+cvaDEWXNI8WueVTJJwm mDx86Y5aBNwhNR5UZaxNQAsT3TfEtse0/+qe7/gjC6eEOLLznt420RF8Q WAqGLYmd+o4tA9iaourDSAS2Cyvoz4QiAE2HYptC/fLs30yGeec+kZYTk w==; IronPort-SDR: avMqBLX9DcNp/Fii81JN7EF8Rt3RRB5/+BD3Zy0GxYldpCiXTymhkpQLqEzslcZxxdMCDIHQLs hi0vVuly2LZzIL3Mh3bDhe2n14+cUK9Qgp2Aau2JmqW7m1W8qBGOWwT5kEKLh4RfegR40twm13 KopPvo16t5bxAr+lxYPDcpH36rPuw5CcAaEC6SD8MG2RiQ7HnOdAVnTJq8pwR48DlMcfIlhupM HDjXJAeAVDilpsGetXHF3cpG/++7Io+AP+2sFfr9l6FrfMi/MPI/xzQIGtn3qizrWFZiPGbOD9 CXw= X-IronPort-AV: E=Sophos;i="5.77,301,1596470400"; d="scan'208";a="251658602" Received: from mail-co1nam04lp2053.outbound.protection.outlook.com (HELO NAM04-CO1-obe.outbound.protection.outlook.com) ([104.47.45.53]) by ob1.hgst.iphmx.com with ESMTP; 25 Sep 2020 19:49:32 +0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EeT0/1acMG/slXJAtCjvEKcFXyROflN3G3UZ2CrRx3xZ708X/QYxlLhjDhN1ak7LHqVA1VhZYwctQau2IuIOJZ/Y7XuzscTMepgMfiZUucLWlVPrZGFv5Col/+Ry//nqW7SkfpZi7ob5mVwXGd8xafwV7pAZdpLQDDn1qYsQ3i54txjJRahxRFaZ3u3Jv3sF0PjmUCYTnpL1jVVgXkIpzNHISFLi7U3c90qJW+GHAolwWJIn0HBFbnYaOEmRLl5+7MM8DRiwNPeghWg4CgoTrOvvX/bvnmHxuRkLwP2s75CCQBKDvyclfOD7340HJxy1Cm84Mp6jippcao8IhbbkzA== 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=E9AK56gSw40VE/GmHRyt+sVZ7DdhOlvKQOiACdq4Lho=; b=MC1ThRHdAFTdXuyAs4+Yf+Ci3k4ShbTtvyIl+mefFpxfP68RbKkc/qbYnMRSTrcCaR/7l/dXullmUiLTcTkJyLmjEFiicNWLyhSpWjn+kYoLhbq0+1oqo+xtKjdaRAnSjz+Qb1sUE3DYZ/sG5tWY6fdMW1KXaCBj6wpO53L+S7u/Ds8mFoO+ONuJWPXAnlXW+wxek1t39l20rp6P8qOUli6tEMIXsuZ95mU6HmyyLF3X9Pc/sDObqKJZLYJbquJpvvv5R8ASsHwO4SBIDZyruReZoFW+lvfgXPW4LKQHvM4PbRi4l5rqP1tUgsEcFcNfYEIwZ76M6FnmMGOV9FEYsQ== 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=E9AK56gSw40VE/GmHRyt+sVZ7DdhOlvKQOiACdq4Lho=; b=ALW6XtAkvHBR0rh0D649dNNrO0jRCaEiQ2uk/8jM+QSH1XLedqqQQyh8t5nMLMV617rrDWcgoCDiM59PwQGMld6uyDIeVT5yNIUvevlddW00En355pg7+e4CMCpvB7Mbp+tCnWY2qMQSte4kRgja/OCn+GZ8TiCTCXXCEvY2Nro= 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:30:12 +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:30:12 +0000 From: Anup Patel <anup.patel@wdc.com> To: Atish Patra <atish.patra@wdc.com>, Alistair Francis <Alistair.Francis@wdc.com> Subject: [PATCH 12/16] lib: utils: Update fdt_cpu_fixup() to use current domain Date: Fri, 25 Sep 2020 16:59:10 +0530 Message-Id: <20200925112914.725846-13-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:30:10 +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: ead49df8-b83d-4fb2-040d-08d861465dfa X-MS-TrafficTypeDiagnostic: DM6PR04MB6778: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: <DM6PR04MB6778C6956838F06DB255D26A8D360@DM6PR04MB6778.namprd04.prod.outlook.com> WDCIPOUTBOUND: EOP-TRUE X-MS-Oob-TLC-OOBClassifiers: OLM:6430; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 3HyrerMI+dLQm/rrf6VsOeplp6fqTQgAJyU+/iFKXT5WFxyq5irWjuhaI3Uprx3fYEDfvV8XR01AvEXvHhuvuAmswVw7Efkx58tkpj3gB5bnr9e4bJX4jqv8iOy08djtjyWoY0mNDLcakXJZFlgGlkRupZ44wWi097Nfp+LpgEEtVwLcES++NtDMdYpBFFlUKKsAlbY1BAajMuv5OxDfpUqBV2kUs7gfB8urZnyBDPKMjYYTVSZn4zw4uy0xljr35i+jVgILaPlaZzqdo3gy7T0/cLrDKpdnXawAvoAahLdbC/23ptabx1gvkdHFDovUlaQ9K+EYZwEOaIf/3hjsNGa+LaAILcyLWwaBzzxg9nDxe9TlDoXj3DZY1t4fP5oC 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)(376002)(39860400002)(396003)(136003)(346002)(66556008)(66476007)(16526019)(8886007)(8676002)(2906002)(15650500001)(5660300002)(52116002)(7696005)(54906003)(36756003)(8936002)(86362001)(26005)(1076003)(316002)(6636002)(55016002)(66946007)(478600001)(956004)(110136005)(44832011)(2616005)(83380400001)(4326008)(186003); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: +kfYQWUtQkMR/MzdqDtrtCum9X6ooUweVFYETteyzj615HYgSIT2fN2Ki/7VnsedcWN/GkYZZ6fDJ5YcJoHDmmIKZcZ0SHDbX6bIimP9tQfa9CWOqPloepFOu6jeuftE4CeaxVlFiuN6rtW9UrPsEhzKYLHmpJHBsE++YrEv/v8t9L15k2c5Knvz0WYCrwo7hrGkv5OaVEDSfCpHHrwftpyHNwNDvpGpFoy1jjLt3xUxnTJ05yMA8kYje20MSNehcevzw1SVrVSYoKAG7uoT2J8mi278XhVYGS/nqQx/llB3rA/ejiw01L4uMA+47l3h2ozppQ+f9yWmrdlm7YKkh6Aqk1b9hCBBxwckK39xcMWVK5IVtYuQpwGhC/2CI2/PNon6/+dY/6fQLG71xM8PyneFs2jWSzFiXyai30f01mnOMba+HdGrGNHlSQzu/QeWUxkEdYy+q4FWFWWNy7wVo/kwLPCfjYMdm+Lz4u0tKeQlW9ci1gFjY8IUBEjfgoDONc28uyS1jNsm0bZJ5hLHmPyPcJOHacIqIJrFDnjdh+UETeLdDHCI3xmI4FxmdLmRGAd+jD5wXd2LsFPvK0NiNtPwuhqoysF1IA4HmqVlOnfR1IoyP0Ghp8KMJQoMVaMmL/bGeR0Tc6Rg0z34Td0F8Q== X-OriginatorOrg: wdc.com X-MS-Exchange-CrossTenant-Network-Message-Id: ead49df8-b83d-4fb2-040d-08d861465dfa 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:30:12.7264 (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: Jqyl/KVZncMFVR0wLj7OgMSvza+FLn2KZF7q7wZWKLuvj2+4zLoNxY73CAbzNKqFBJ2YZs1pYdOl4aiRJtG9wg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR04MB6778 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200925_073014_325699_8F536DA5 X-CRM114-Status: GOOD ( 16.86 ) 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_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: <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> Cc: Anup Patel <anup@brainfault.org>, Anup Patel <anup.patel@wdc.com>, opensbi@lists.infradead.org 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 |
OpenSBI domain support
|
expand
|
diff --git a/lib/utils/fdt/fdt_fixup.c b/lib/utils/fdt/fdt_fixup.c index e9e1dff..436179a 100644 --- a/lib/utils/fdt/fdt_fixup.c +++ b/lib/utils/fdt/fdt_fixup.c @@ -12,7 +12,6 @@ #include <sbi/sbi_domain.h> #include <sbi/sbi_math.h> #include <sbi/sbi_hart.h> -#include <sbi/sbi_platform.h> #include <sbi/sbi_scratch.h> #include <sbi/sbi_string.h> #include <sbi_utils/fdt/fdt_fixup.h> @@ -20,8 +19,7 @@ void fdt_cpu_fixup(void *fdt) { - struct sbi_scratch *scratch = sbi_scratch_thishart_ptr(); - const struct sbi_platform *plat = sbi_platform_ptr(scratch); + struct sbi_domain *dom = sbi_domain_thishart_ptr(); int err, cpu_offset, cpus_offset, len; const char *mmu_type; u32 hartid; @@ -41,12 +39,12 @@ void fdt_cpu_fixup(void *fdt) /* * Disable a HART DT node if one of the following is true: - * 1. The HART is marked invalid by platform support + * 1. The HART is not assigned to the current domain * 2. MMU is not available for the HART */ mmu_type = fdt_getprop(fdt, cpu_offset, "mmu-type", &len); - if (sbi_platform_hart_invalid(plat, hartid) || + if (!sbi_domain_assigned_hart(dom, hartid) || !mmu_type || !len) fdt_setprop_string(fdt, cpu_offset, "status", "disabled");
The fdt_cpu_fixup() should disable a HART in DT if the HART is not assigned to the current HART domain. This patch updates fdt_cpu_fixup() accordingly. Signed-off-by: Anup Patel <anup.patel@wdc.com> --- lib/utils/fdt/fdt_fixup.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)