Message ID | 20201019125453.2460105-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=El6hJMol; 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=ha4eE3yj; 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=tqSy6p+2; 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 4CFGwK1gRxz9sVH for <incoming@patchwork.ozlabs.org>; Mon, 19 Oct 2020 23:56:17 +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=s9tiTXq6WnlIjz7NRnvFCHUtX9TbnUAZp5YbSB2iuZA=; b=El6hJMolRP05NiLddJ+qu9n8H zOlyfPDwzoWsMv7pL3D6tSayjabfGCmCd/6kdaWEqFtQ/yGimF4/b+YL3zLsUli2kb5u0SHMGfOHU TCY6foTuwKLKMwTGaYiob9i3k9opNk9bX+9M/QN2m+pdnlvoasTieXwvmNjiKY6ROQ4OCB7WjX1m9 nmiwLwKFDKJftdXm1kaWMtU3syhacbByTTr5Oq7+2X5PN9XMhQsbmNiwOy3opiEpw0bXlm1MyIzQF Rs8QqYdwruiVyFmLLVzeX0pl//jVSwNzskOyA3LloKd8ZYUBiKQtUShYx8frI8wblOvRxA7yy+Hws xt0Z7+RXw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kUUhs-00058d-Io; Mon, 19 Oct 2020 12:56:08 +0000 Received: from esa3.hgst.iphmx.com ([216.71.153.141]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kUUhh-000540-45 for opensbi@lists.infradead.org; Mon, 19 Oct 2020 12:56:04 +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=1603112157; x=1634648157; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=TaVZytoMYVkEuuEbohi2kA4ftvdYVZyesNhvshC7NRc=; b=ha4eE3yjCzgIv5sWp6unqCxWF8VncMufn1L04f3LO8zkRDUCAqWPviyw ZpoPw7r5t328h+24GSSMMnwLZacqzKE7sfFRRjOwdTNH6gzMO8shwNJdC uNW5d0fNmlEhDK2E1iLkWlSi7eOMLGDH+ld8AYJ1b2Hm3uisCstrMVuNP PMx7cShiVlEe+lT6DzTDPz+dwoJS9AAwjMK+tdoH5B5hQteS73CZDNh2P Pb72Xtt694P0j78oq6C3fQPNkzo10Q/NMYTir3NHwU9u1AaoU0ymc9Kqq dVsZEUJo1Kulxbor2jtdDrakzSv5to+RiuililGDb15mu1UPvHht0hS1V g==; IronPort-SDR: W9eXrzqwPp3+SB6POHdyyHOOmMbXPYx8pR4eu/O4nPpRLl5pCR6y8Te7yXMn3yXENZ/OlvnU4v GlzZzpUdR4nRKywNrxntAOCefrRvFvEf4cjVpEDKOv5F4FQQNnyUVZ24mC0WTN1IXnHFxDiGSe fOYjJGLcMw+4b5vsX719TCddnjALiAAmzXL8wvnWnfTj9jKxERqqIzlzzoXIgScx9JHevQZcmf EI8SZVZZtkd6kn7KDtQAPM0fcJvnQpEiTrfjV4WM8i2LDyyjkfXx1lLMwuM7xlOcTptLQ9GebA hmI= X-IronPort-AV: E=Sophos;i="5.77,394,1596470400"; d="scan'208";a="154752571" 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 20:55:56 +0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OBUY69VcHoISvEXPZ8QlWoo3XolDWea3iWfTyqmg3K+EJMDMFclAGQz6G30aMTOGxufiZk4l7coTT1zrmnHLzmAXY0jMev+Dj7492+RpaGYEDj9N+aSPwFJWWE7ZgyeiTDx1/AiRnkcjidvTP0mgqEfQYZgdS+y/zog/mZXPr7ArCBwI0Bs+1Q5ijFTZrLNdrSLEd5Z3L4N4TlwUiAqu3hGOA5OgCnplwVsvu3kTKMX5UcpYW6JFMEmqpVaWZ3GRFyXhAGIZ9rRpTK+hvBeJ+jmH46SY/HZM+Z/m4mqZ+rr8bUGo/QttjQ+G4z+SIlLgo17pVJg6tDumKxus+5mfOA== 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=gindXPU/K7H2wP84aVGfgjndkajjNRbzix45/qm5Aa4=; b=imWN5vRJ9qT3WcSSduLLrdcclYcmny1pk3NYrEAfb3TIb8BcT6xy250cuGaPGE7kRzKp6f8t0Q9e6UyKzG96FaIcVKdtiqQDhtgOtonwolLHVJ6KAIYhemZ5iWAgJENwrmQrQN16LrqWONBjJbJK8/fRyX7MuPrAhhFfLLESmgZIhlNEHTmstXqE1yCRO6Wi/f3fi8LM+Tejgmqb7aakdbYXjhq/Acz7U47cQxH2fymMCGhCdgR9VkfXZkTroXmnIxegVrkwpTlIgf4tycpB7YXQP8//+9FMFdAjEQHPJIeaAEGRdZdQ9UHGDo2uszGovxRfwo73pVGmFsOpZxDMMg== 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=gindXPU/K7H2wP84aVGfgjndkajjNRbzix45/qm5Aa4=; b=tqSy6p+2lrAgZtMrh5BDTpVZZdEKD+ZD2cwDYdbp/JP7jJd/kPH6w3+qFvf3F5yCngWSxVLCU46RGBHffeYtuuslarAj+Ju2q61izXE/3QFavntJf16OkmHemTOp2uKu/DyQ3HnT1lY/6WznTEwlkrvgw5/Oz7fbB/nFHgV86n4= 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:55 +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:55 +0000 From: Anup Patel <anup.patel@wdc.com> To: Atish Patra <atish.patra@wdc.com>, Alistair Francis <Alistair.Francis@wdc.com> Subject: [PATCH v3 12/16] lib: utils: Update fdt_cpu_fixup() to use current domain Date: Mon, 19 Oct 2020 18:24:49 +0530 Message-Id: <20201019125453.2460105-13-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:52 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: fb054953-e2b1-43ef-fe17-08d8742e50fd X-MS-TrafficTypeDiagnostic: DM6PR04MB5548: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: <DM6PR04MB55482BB3850F4D70669E1DE38D1E0@DM6PR04MB5548.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: SZxB0vs7HhlAGjP1Ai/A8EF6CPKcrNELX+nFOynlEQ17ItDOADHOakDWeoJN57ri4BzWcq1y/ScOBTI2hDbnLc2wLHTAkQcKwmHszy+KugttmCBQ7/HRTrU0f1FrjLXZfgt2J18mphpaYOb0RLyl+Y6GiB547dG8Saq3HpvJnumljqxeAQQh60Lw1J+3ZXG/MCbApeGzuvpV2N+3mAKyRxt4xLZDFwqhn0ZwHCupS2bWNqORKuRfgVYEDZHrKKbuGankY1S7VTczmm4cztzPt/RKXAZXwqC48yq/1pdGU288P7dwCUJ9h27FYlzdaZzcnoaA/K9WiDBDuFvc2MMAlw== 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)(15650500001)(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: jVko38GWG+QrQquOx3h0m6VS/HUNmf1fqGG1B9KOYRAmbYkOfGYCsz2fZfUy7S+Jc5frZdgBJn80V0HybcTQ9FbeJV8Fk9PJwQNKwXHKCsNTGZvKb+dxbCgVyTQKthQyaRuHtn6xJeLHbY2AEC6kO0p8ZzdPeAfEcZBhtUnqpg2+T0w8duVYKaCS1FH3QYmzqVF1C4XSwTw/gzsjkk1ZaxbPHIenVLaPcvJRPnT16Y6YPwxxI4Ge0OPhLgeaHQ+/rZ1YoURF4U/ncPgG5MRWi30UG4qvD4sKrBOXLLvnrq5gonmUTGmUJkr4obkRIq6u9j0DZB8rFaBU+f87c4OlgwpYr/dSzBEnL7MSvNza0xHdWPomHVQg19Vh8iZNVw3g7CNLhGzGV48ljfbVgvshWYqC0r3ATL+92O6IH9+BUhnjZR4qPGoBk5v2S6DNoB3pirCyioO/4ZCKAb2VQYu5a7+cb2y1HpYInBi3keQtzD39HCsoku0vn8lPfAkrlD7eBo4EvbcWWzKilQw7a0VzZA58fHzKzcvYt35SEJiq1LQrrB1nT1DjIfXfKYVFRNpzwLoxCMGNXo0VoshhEh4X9EbPYHtYIGMeK7CmOLojJi4ZQ+icJLAkK1Vq9aB0lsjiLAZcEFY13UVikatFOSKclA== X-OriginatorOrg: wdc.com X-MS-Exchange-CrossTenant-Network-Message-Id: fb054953-e2b1-43ef-fe17-08d8742e50fd 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:55.1794 (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: IdiRS5lgFRuKuVNzuqlETZJR9LzlCcApWm124jfkw1p4GmLqCYzPMLxN/nyFYuSoiv6XWTc3zYcad/YjSHB4Ug== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR04MB5548 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201019_085558_317354_F0C99A27 X-CRM114-Status: GOOD ( 17.85 ) 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.153.141 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: <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..eea450d 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_is_assigned_hart(dom, hartid) || !mmu_type || !len) fdt_setprop_string(fdt, cpu_offset, "status", "disabled");