From patchwork Sat Nov 21 09:47:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anup Patel X-Patchwork-Id: 1404395 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=rJ+Jzzah; 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=dJjoMhax; 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=aHEOVIT5; 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 4Cdpbv66wDz9s1l for ; Sun, 22 Nov 2020 09:53:15 +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=vSCwL4LH/zmXwe57QFSo9GfIwZKkqcUP6TPC85wC2hU=; b=rJ+Jzzahls4Q7Us4r0kb1wTpm R3dP3NAEXEOH7OlHH+sAoHEydY73betmEeYcPydvMhRKvGkv+vQHUkcvGdB42sAvEB62/M2hKM+14 xT9yVx1Cd1Yhxt2wx4m1tCjap9+Y3eeu3wzIFsx5TJwwvYchDhlrfC7qAZqMkmd/6sdmKi1lk3S3r arLvYGponydk/o8WzSurzpNgMRHco9CD/HwdxdM4RnRo/V0c2CrdRpPUO8DocniqneHNo7U6Y9EB0 9oHEtU6QBBUBIorhXtKp3e7WzRJdELokNCmdJTPd5/w9CHskiVaZgm1AkUHMwjOo4liasFDCGnTz2 cdZrhicHw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kgbkh-0005wY-Of; Sat, 21 Nov 2020 22:53:07 +0000 Received: from esa5.hgst.iphmx.com ([216.71.153.144]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kgbkI-0005jy-3f for opensbi@lists.infradead.org; Sat, 21 Nov 2020 22:52:46 +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=1605999162; x=1637535162; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=SfkKDlobwhdVFLTTRt/KkOElNQD0wmQ49CSIRrUErVA=; b=dJjoMhaxCPASFgabTjBrL+rX299o0GbvMFPJxeQMoEbrDSauBEIBp/bO bAocXniOaP+WGTjJlLxf+q5k9+uREE9THBZtjsU+H7G8y9ZvceQw6WTb8 quvX1ZNETt7KT/HrOFEVAqF0CGQsrzPfmSdLmsAM8RkELpM5S6PQtSoaB jurEJh0W46dcAk76twpkpKtUvnh4LhpXeHWSOJaTk/6Zjfd1lG2KxODWf rmbsuptl28PLsEeF3WDbYnaBpzL3AIGSAFPXdQweKx3BXWtZcEzzqn/FF GZnaaP4prFYwI3RZEfep+AA9LHwHyJsdbdfTt7YfGlH++FdfiPKOGqTfm A==; IronPort-SDR: fSMlW7S3//yx6uG9RSzA3Q13Gzzav8KD3KNteUp5sbmnN5ZR+dLzi4/dWBANvXxow/V9ezUG8n cnNkqiossyi2wg+I1lMLskC8VPE87TFrHO5aBW9YDkk0rTT06k79L5iuvH+rCiJjnPWBTcXtfX MOgc0f900iT0r489Bc5dgvkHjY8SIL3GurJrU/KkK2yIt3HxD5WuI02mBqK0/95znDgQJMkRg8 uL11kzP+QFfkiv6mgzNWJ6XQxfLclya1ulup219YrM1lftQnAG+TumwLm9FVRU8MEzA7mA7m23 C20= X-IronPort-AV: E=Sophos;i="5.78,359,1599494400"; d="scan'208";a="153218799" Received: from mail-dm6nam12lp2177.outbound.protection.outlook.com (HELO NAM12-DM6-obe.outbound.protection.outlook.com) ([104.47.59.177]) by ob1.hgst.iphmx.com with ESMTP; 21 Nov 2020 17:48:56 +0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kzQvKkvU4b8UCfHhizMHIaxBMMvfISMrtJ2Jp3kaXMSQ6d3DoM/P/4VTX9NWMpVuRxDzy9PgC037SAN7Ij32KKi55ot+ZXjUwoJmv6iznMc6Olvw/JmQk5QMFkIulSx6tP71X2vNl1cAtf1zTCxYLCBZ5x2cgq2fC6i2tzt/qwZsNLXUSvzRRsCjkMBC0mslNMQkgmaM0x2xzfzhBwoILhKTo6QZy9yZ9aORowrLwFjR9nVUfwEoInJ5DiW04wUFvvQKW1bZmLmtsqvbiv03lq5T2EEOnURm+nOJsPMaq+oSAG8kADRLKGafHZig1YMPhPsk6tplvXccP45SzyVAYQ== 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=KFYrll9toRnvqDrfyNJkk3zjFbjXR8ft7UJG6FWE+II=; b=WxuOmaFBpZ+bjL08ZFxh141PIGIZU2zdAZxu13huQQk/yCSTvJi6FJGgEE2U/SIwL3HoJin4HRT8Ik4vTH8HSTZ/UjbElunxUPBrh+Thm9ORVET/SM8zoZgmV93WIPi/pq5laHQFDUqJ1+FhDFAVjvDpIdm131v4iURz20g76Zxq1r571s0I8I3ivTIpEcCC5ztcRQBZDFng3lxn7QID+PqI/CUIfm+AunvQKrrwxhlvXcQtBcU9LalSv+g0OzCuoDj+4tuLW98VfqsOzRkWf2N98vTM6cWXMgb0844VQIJM8R04f0Gxx4nUNcomPzemmsLpSmh4SeG/oFdR12pRAg== 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=KFYrll9toRnvqDrfyNJkk3zjFbjXR8ft7UJG6FWE+II=; b=aHEOVIT5RdJeNfIEZQ/vTDMOQY9z4SQlaiDe/4goo6kX30vNYJNIo/ReDQ7kPkSdhX5HZc7fXIjX+qFShntUQdzT8p2St40qs+25RINxVrtEhqPV6Kabw5UEP7/s7HLlnRoiO0NUHyzRhYoMIjb+G4/3oOb2q+e/r6q91Fm9rxg= 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 DM6PR04MB6361.namprd04.prod.outlook.com (2603:10b6:5:1e4::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3589.21; Sat, 21 Nov 2020 09:48: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.3589.025; Sat, 21 Nov 2020 09:48:55 +0000 From: Anup Patel To: Atish Patra , Alistair Francis Subject: [PATCH 11/11] platform: generic: Populate domains from FDT Date: Sat, 21 Nov 2020 15:17:56 +0530 Message-Id: <20201121094756.4154728-12-anup.patel@wdc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201121094756.4154728-1-anup.patel@wdc.com> References: <20201121094756.4154728-1-anup.patel@wdc.com> X-Originating-IP: [122.179.16.120] X-ClientProxiedBy: MA1PR01CA0115.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:1::31) 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.16.120) by MA1PR01CA0115.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:1::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3589.20 via Frontend Transport; Sat, 21 Nov 2020 09:48:53 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 62702cfb-5fe0-48c2-0e92-08d88e02a932 X-MS-TrafficTypeDiagnostic: DM6PR04MB6361: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: WDCIPOUTBOUND: EOP-TRUE X-MS-Oob-TLC-OOBClassifiers: OLM:1247; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: lp0IyOcRL8usWSVM273abhtwnBvXGRW7vXz5fCF6/6vj8HDJxzyXNtUOTy0mBQHO0GmITDHWcrt6tr8K/vP4/TkwA2gzJ73JvY87E+xjp1OdzzmPXwP9Fu5lp3+U/8MNBD78WakVO43EeEqAgNMSuFnrT2pODnxbOgb+dfPBN0A+ZGWhGJQjr/XIxFbkLSLtpzFgfFXC4SJ2AceRhqhZnKQluQPvP/dDLFisD6m4FvRcWFfhEhwrKo+sa/AjAed364t3lCEHFBIOkYgH4WSG0VoOfEXxcdTutMtcY3aJlKKn2/cfp1coPWfuU4aWDTPrRhID3RR6yEV2R0kKlhcHp8Tfg8xHtYC87Y2yekdNfYhgyUX7ACK22EK7rO7XA0e9 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)(136003)(366004)(346002)(396003)(376002)(39860400002)(44832011)(83380400001)(478600001)(66556008)(8936002)(8886007)(1076003)(55016002)(36756003)(54906003)(66946007)(316002)(66476007)(26005)(110136005)(6636002)(52116002)(2906002)(16526019)(7696005)(86362001)(8676002)(956004)(186003)(4326008)(5660300002)(2616005)(41533002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: HQa/bPqEl/RZMHmptYPNR4Rosls6oohfcZhkcspZBBcq2aq9WFKUdoYOt3BCDluebZ+niO7kx4sXMDrnmwxJMwXsxdht79We0yBoUz+jEe7ddNSwZv1InWbst4LShdLhXCyHkNyPlPSnD7WQOjNpe3YSBVnQqIxIqnlZ/VmL2/HusoE1MfFdzoMuHbZwQNf+iOpCN9JIJii1xI7lSzUUdGaGIHPLKP9yztt/KONUdjovklB7GvB5+Xsr5Q98FQKIEDd7f1cdjC0B4gf4gmS6xj91BqBSlUB/JmM/+FDA5XJSpCZbObYPePHaTEI5++RjBe+m0dzp4aEER6x5p8PixVpAf+C8QXFA8oJgqH+0+9LpT4GO9We6CPV5n4nA/Y8dzJuF92xcFeQFWqeiv2QYXwgeUH6hGyONevzAd4PJ8DBUePcX+5d6b9yvGs4KrRVLrDhd48Q3TSXx/jsLYKRZoAfT4tuv+0n6B9PyGGOpGLPdC3aaJWsrSzofnn2odqhr9C4joeQxi8pykOicI3171Vou8lhveIquuWWrWhzsPBbd7q7zpbvWvRPYfYqLd9LWy/fKlx8pt1KZGipgJpC3F1ra2mtI2nyrW2/+yvUacWoJ93VcUgM5EkVk4hxI5lpPR95y5Fr+ERHLvWayTLGkmw== X-OriginatorOrg: wdc.com X-MS-Exchange-CrossTenant-Network-Message-Id: 62702cfb-5fe0-48c2-0e92-08d88e02a932 X-MS-Exchange-CrossTenant-AuthSource: DM6PR04MB6201.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Nov 2020 09:48:55.4882 (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: lP+A79mAcL5LkbrC/lAizN3vY5l6wKQ1S5b1sDd0k2iBz1u4/DqYJT028XbDB54jbkCHUKwMMwlndxEissewZQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR04MB6361 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201121_175242_532877_58B8F70A X-CRM114-Status: GOOD ( 14.96 ) 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.144 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_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.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.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 generic platform should populate domains from FDT using the domain FDT helper routines. Signed-off-by: Anup Patel Reviewed-by: Atish Patra --- platform/generic/platform.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/platform/generic/platform.c b/platform/generic/platform.c index d902e71..63c405a 100644 --- a/platform/generic/platform.c +++ b/platform/generic/platform.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -148,6 +149,7 @@ static int generic_final_init(bool cold_boot) fdt_cpu_fixup(fdt); fdt_fixups(fdt); + fdt_domain_fixup(fdt); if (generic_plat && generic_plat->fdt_fixup) { rc = generic_plat->fdt_fixup(fdt, generic_plat_match); @@ -170,6 +172,11 @@ static void generic_final_exit(void) generic_plat->final_exit(generic_plat_match); } +static int generic_domains_init(void) +{ + return fdt_domains_populate(sbi_scratch_thishart_arg1_ptr()); +} + static u64 generic_tlbr_flush_limit(void) { if (generic_plat && generic_plat->tlbr_flush_limit) @@ -190,6 +197,8 @@ const struct sbi_platform_operations platform_ops = { .final_init = generic_final_init, .early_exit = generic_early_exit, .final_exit = generic_final_exit, + .domains_init = generic_domains_init, + .domain_get = fdt_domain_get, .console_putc = fdt_serial_putc, .console_getc = fdt_serial_getc, .console_init = fdt_serial_init,