From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DC035C3DA61 for ; Thu, 25 Jul 2024 02:49:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=UgNjldwktuPByHwAsYffwjN8K0Fjq0GmW4N3qwI83W8=; b=TXwgSV0QbZNs09ghZQ1JM9Qb+z qxGnwSlF7ZUvseWp9vfrQMZKhDkIGqMbt9FmF+HLnyaMZF6RA3kYGU8ubxLGbhOmFp38/t9hBin6R 38TOZ2ffCfqyqO2jbJ22wB4nIrZjiLcTptvqZZAlbT5Mpn7eDpj+x7lpKbU491PsPtK2vE8+uzi4V nt70pqh0l4tJF12I9EodtahCFVWUj21fYzspIwCheStKbnvRhU1JTKPza776TlFFZL2fY4CAtoXhL G+9SpPmUARA2E1Ff55YKjW178wpaClhBxOs0yjQanXjuzcL/JQfWMunvx0zuhl3PxK6nWA5D/OqpM cCn0pVSQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sWoXp-0000000H9J8-1ohi; Thu, 25 Jul 2024 02:49:29 +0000 Received: from mail-bn7nam10on20622.outbound.protection.outlook.com ([2a01:111:f403:2009::622] helo=NAM10-BN7-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sWoXN-0000000H9BU-3iF3; Thu, 25 Jul 2024 02:49:04 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=OPMWCVZVJXVs9jQE55+3JHZ7lTFWvn6colaLiJ8qNm0IswWQC7g637kFeQYeKe0Xca27VCew96V4VOwH4tH6wzrMgt1Z4bdnDzgyftwwKLYn7ZUTZXDMlBmzNAY6YMwH3H/iwvnrcYL2MnApLHALZTW1tsYVtOQYsSedNmjn36f2pb9TIjtTnWtf8X71gb4L/GLFJRSNWlslIFrY6cMIFONjUHA1c3RtgTbdVCdLfb3D8+eWLLiBMWfRg9D36NZqPzOTpHJkIYAnOOqULSSzNmMDy6gGiWcdvf8e7cQMAXUlirXiaaHWmIFMg8XDgifrEvHBrkdBbV+/ALUyW3rtiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=KICwaEmEmefSXrpqpyBJFKorUqr504asr+dVhE0WZNg=; b=WJxRncRt7GS/x80xrF+lDVOttPmfCzMKCW/RrQZyVp6tyQX42QzjQhZRLWnTzpo8p8gLS8BS/iQMcl7K3qosIT9QYMCRRanMq48HW/ZdyvPmhVbMdXVHeQ15ycirOXIFY4h3aORxsKp3NirMnoWjqzirHjvmUvNirkYC3vSI9+9RQxImlmnlIfo6jjjyfPg8pZWTPdqlRugfD8cUUZpHFlLFQOgqGu8W4sbSv9fr095oykL03bL7Ku5rRgNoXrXr6THEtF0nDgRgnfgELHmzj5B24k79qlYZ0b5QOnmRQMmOrEhNAlexRvJ6Wk/3j6iw4+rkFAZLhDdBdlJlp2Rd9Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=KICwaEmEmefSXrpqpyBJFKorUqr504asr+dVhE0WZNg=; b=K/gRXzszGAPHYMDC/RhldMty0QV7ndTMINas1csgLmoH+RyKtxEsyjEtMv99trHezfehhW8WMXIUJWHFFKV5ynvVtotQPbhtm9Es3MIOdz8Ts0R0plCVX5uDQIcpiYff10dmYFu0O+edjun8LF4l7DkUGmRtVvnVUx4KnK7klsTaJYuIMoqDMcWLydleK59jaqDZhCTn1jQrUbf/DNss0C74gtCOD25RObpAdjB5jAfk9b5WiLnvtvkJAoF+sGFjVjeLpT7UUJQntv8tmC23oG9mKFleP2DJYnx7o/g3QydMxG1X99TKjUwgc42RBW7+dW65o4Ut5cbmyRsM+NTtFw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from DS7PR12MB5744.namprd12.prod.outlook.com (2603:10b6:8:73::18) by IA1PR12MB6434.namprd12.prod.outlook.com (2603:10b6:208:3ae::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.19; Thu, 25 Jul 2024 02:48:46 +0000 Received: from DS7PR12MB5744.namprd12.prod.outlook.com ([fe80::f018:13a9:e165:6b7e]) by DS7PR12MB5744.namprd12.prod.outlook.com ([fe80::f018:13a9:e165:6b7e%4]) with mapi id 15.20.7784.017; Thu, 25 Jul 2024 02:48:46 +0000 From: Zi Yan To: Mike Rapoport Cc: linux-kernel@vger.kernel.org, Alexander Gordeev , Andreas Larsson , Andrew Morton , Arnd Bergmann , Borislav Petkov , Catalin Marinas , Christophe Leroy , Dan Williams , Dave Hansen , David Hildenbrand , "David S. Miller" , Davidlohr Bueso , Greg Kroah-Hartman , Heiko Carstens , Huacai Chen , Ingo Molnar , Jiaxun Yang , John Paul Adrian Glaubitz , Jonathan Cameron , Jonathan Corbet , Michael Ellerman , Palmer Dabbelt , "Rafael J. Wysocki" , Rob Herring , Samuel Holland , Thomas Bogendoerfer , Thomas Gleixner , Vasily Gorbik , Will Deacon , devicetree@vger.kernel.org, linux-acpi@vger.kernel.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-cxl@vger.kernel.org, linux-doc@vger.kernel.org, linux-mips@vger.kernel.org, linux-mm@kvack.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, loongarch@lists.linux.dev, nvdimm@lists.linux.dev, sparclinux@vger.kernel.org, x86@kernel.org Subject: Re: [PATCH v2 00/25] mm: introduce numa_memblks Date: Wed, 24 Jul 2024 22:48:42 -0400 X-Mailer: MailMate (1.14r6038) Message-ID: <231F6DF6-96C8-4149-92CF-4FC03C9FE357@nvidia.com> In-Reply-To: <6336C276-113E-4D93-A09E-13420A6438D8@nvidia.com> References: <20240723064156.4009477-1-rppt@kernel.org> <1D474894-F8AC-427B-8F90-5A6808E77CC5@nvidia.com> <6336C276-113E-4D93-A09E-13420A6438D8@nvidia.com> X-ClientProxiedBy: BLAPR03CA0141.namprd03.prod.outlook.com (2603:10b6:208:32e::26) To DS7PR12MB5744.namprd12.prod.outlook.com (2603:10b6:8:73::18) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS7PR12MB5744:EE_|IA1PR12MB6434:EE_ X-MS-Office365-Filtering-Correlation-Id: 075ff538-581b-41af-e117-08dcac544dda X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|7416014|1800799024|366016; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?F8zHuYmDBh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7EIZ3u?= =?us-ascii?Q?LXgsSZStJJt2CfQ4Fl6dmbiQbHTEIRPS/l7zeRJ3158TKrvFZqbmJHxChhQT?= =?us-ascii?Q?xtRKeboxd2K9YAFEQVjHFK2OQI0H/EEKuw8CfhlB0VjgLPqAgRlbGDFazGgQ?= =?us-ascii?Q?p9Lz3wAI0Fb1BM9zqatLqCWdzvM1+YqReBeitLas1ykS+Ji93PrP3gv561LI?= =?us-ascii?Q?3ji5Pb5xK6DVWDnobVXkf1KE+toSCTEJFeoortH6Fa4vJZHEbyA07xJvESex?= =?us-ascii?Q?oz5hxLhuW7f3yTyTWv6z0l1gJtZwbbQoNdRX5NRFyHmmZLAQUQk/2FlYGoB8?= =?us-ascii?Q?6R1fXY+lWeHprZRDL5rnOBTDDzE4SSjpBzCUuNgZKtxpvy9/O8OXXb/Rbt5v?= =?us-ascii?Q?hRQ8Fl1oNYfEsEl8/BWM+GOhPjrCLtFcSenV0d3oUjytjp6S/U2VubOXLawN?= =?us-ascii?Q?sNmYhtMPVYYgXd3u72rxlAJM6jj3hwXZdnnuCtzMiRxse4DjrBVClRjrTnZg?= =?us-ascii?Q?SmpKX9U=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS7PR12MB5744.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(7416014)(1800799024)(366016);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?KcN+AyorealjjBn58OV/a2CERzpv4ZdiPFnqfrPBIWjRrkr1pLiXlzahZaxm?= =?us-ascii?Q?NY9d/XDXUKab8XwYjWNDClFrDxQW9k6ZYtDHgwL41/SKwzCYzq5JBkDDqS1o?= =?us-ascii?Q?kWzNliU1vKxP9G3tzOvHE1x/hqDdF99CuFg2zcABgCVjJrRyq75MV156R3v9?= =?us-ascii?Q?av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UVCi3EF9M?= =?us-ascii?Q?MmfVTRzDBEaXgMtwMeiAtTN7ayR1q6GJ2ZhZBS8/9gaYV3/e5LWPBssG5mA5?= =?us-ascii?Q?ou3kjEOZeKJu5bbdnpfurYIjexrGpEDTvLmoOmpXiOjjmnk3o/lwnO0J//l4?= =?us-ascii?Q?kLW1wmatHReqYHZO4HQxncY5VdE6Ey5ldUW0yAtRftSkCBlWPlcjpvo/g4vW?= =?us-ascii?Q?RNjxnfcYkYPxlk+lxud1sS01fP7qy6G5OksgxfqpBK7C6EEEVWvHyK2Omdoy?= =?us-ascii?Q?ypaGYMsoFJ+E60FrVFaCsJh/uT1kB00vzhmIisZ/CeKvSlVN8XDceoWjifPU?= =?us-ascii?Q?dO43pCPKkLperGFAY2DJr6A9a/VLXrinqZBme2wp4fyt/wCs0c5kK7G3AqK5?= =?us-ascii?Q?1nvxho9ONrYyXwzqQhD/2toSBADhx0ooDCxXko9Xc4KEUEzhkWZMdbtdXSdZ?= =?us-ascii?Q?FgZ197KczpR13cZm2xrAYOtm0oPuRLVa/42t6cMo3Ulf/pqeFlkJXVMSagOq?= =?us-ascii?Q?20ykFkh54liP7vW+iZuSNXtRIz03LpCl7fOfERYh?= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 075ff538-581b-41af-e117-08dcac544dda X-MS-Exchange-CrossTenant-AuthSource: DS7PR12MB5744.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jul 2024 02:48:46.4664 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 68GWoAGC7x7M+9elXqXJm9xiJ4NJ6LwbNRQfq6l5NTs68k18A10Urz2M9qqv0O+E X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB6434 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240724_194902_016741_32BBF99E X-CRM114-Status: GOOD ( 24.24 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============0915282717153150832==" Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org --===============0915282717153150832== Content-Type: multipart/signed; boundary="=_MailMate_59508B23-E8AA-4646-9577-89FD38A5FCB4_="; micalg=pgp-sha512; protocol="application/pgp-signature" --=_MailMate_59508B23-E8AA-4646-9577-89FD38A5FCB4_= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On 24 Jul 2024, at 20:35, Zi Yan wrote: > On 24 Jul 2024, at 18:44, Zi Yan wrote: > >> On 23 Jul 2024, at 2:41, Mike Rapoport wrote: >> >>> From: "Mike Rapoport (Microsoft)" >>> >>> Hi, >>> >>> Following the discussion about handling of CXL fixed memory windows o= n >>> arm64 [1] I decided to bite the bullet and move numa_memblks from x86= to >>> the generic code so they will be available on arm64/riscv and maybe o= n >>> loongarch sometime later. >>> >>> While it could be possible to use memblock to describe CXL memory win= dows, >>> it currently lacks notion of unpopulated memory ranges and numa_membl= ks >>> does implement this. >>> >>> Another reason to make numa_memblks generic is that both arch_numa (a= rm64 >>> and riscv) and loongarch use trimmed copy of x86 code although there = is no >>> fundamental reason why the same code cannot be used on all these plat= forms. >>> Having numa_memblks in mm/ will make it's interaction with ACPI and F= DT >>> more consistent and I believe will reduce maintenance burden. >>> >>> And with generic numa_memblks it is (almost) straightforward to enabl= e NUMA >>> emulation on arm64 and riscv. >>> >>> The first 9 commits in this series are cleanups that are not strictly= >>> related to numa_memblks. >>> Commits 10-16 slightly reorder code in x86 to allow extracting numa_m= emblks >>> and NUMA emulation to the generic code. >>> Commits 17-19 actually move the code from arch/x86/ to mm/ and commit= s 20-22 >>> does some aftermath cleanups. >>> Commit 23 switches arch_numa to numa_memblks. >>> Commit 24 enables usage of phys_to_target_node() and >>> memory_add_physaddr_to_nid() with numa_memblks. >>> Commit 25 moves the description for numa=3Dfake from x86 to admin-gui= de >>> >>> [1] https://lore.kernel.org/all/20240529171236.32002-1-Jonathan.Camer= on@huawei.com/ >>> >>> v1: https://lore.kernel.org/all/20240716111346.3676969-1-rppt@kernel.= org >>> * add cleanup for arch_alloc_nodedata and HAVE_ARCH_NODEDATA_EXTENSIO= N >>> * add patch that moves description of numa=3Dfake kernel parameter fr= om >>> x86 to admin-guide >>> * reduce rounding up of node_data allocations from PAGE_SIZE to >>> SMP_CACHE_BYTES >>> * restore single allocation attempt of numa_distance >>> * fix several comments >>> * added review tags >>> >>> Mike Rapoport (Microsoft) (25): >>> mm: move kernel/numa.c to mm/ >>> MIPS: sgi-ip27: make NODE_DATA() the same as on all other architect= ures >>> MIPS: sgi-ip27: ensure node_possible_map only contains valid nodes >>> MIPS: sgi-ip27: drop HAVE_ARCH_NODEDATA_EXTENSION >>> MIPS: loongson64: rename __node_data to node_data >>> MIPS: loongson64: drop HAVE_ARCH_NODEDATA_EXTENSION >>> mm: drop CONFIG_HAVE_ARCH_NODEDATA_EXTENSION >>> arch, mm: move definition of node_data to generic code >>> arch, mm: pull out allocation of NODE_DATA to generic code >>> x86/numa: simplify numa_distance allocation >>> x86/numa: use get_pfn_range_for_nid to verify that node spans memor= y >>> x86/numa: move FAKE_NODE_* defines to numa_emu >>> x86/numa_emu: simplify allocation of phys_dist >>> x86/numa_emu: split __apicid_to_node update to a helper function >>> x86/numa_emu: use a helper function to get MAX_DMA32_PFN >>> x86/numa: numa_{add,remove}_cpu: make cpu parameter unsigned >>> mm: introduce numa_memblks >>> mm: move numa_distance and related code from x86 to numa_memblks >>> mm: introduce numa_emulation >>> mm: numa_memblks: introduce numa_memblks_init >>> mm: numa_memblks: make several functions and variables static >>> mm: numa_memblks: use memblock_{start,end}_of_DRAM() when sanitizin= g >>> meminfo >>> arch_numa: switch over to numa_memblks >>> mm: make range-to-target_node lookup facility a part of numa_memblk= s >>> docs: move numa=3Dfake description to kernel-parameters.txt >>> >> Hi, >> >> I have tested this series on both x86_64 and arm64. It works fine on x= 86_64. >> All numa=3Dfake=3D options work as they did before the series. >> >> But I am not able to boot the kernel (no printout at all) on arm64 VM >> (Mac mini M1 VMWare). By git bisecting, arch_numa: switch over to numa= _memblks >> is the first patch causing the boot failure. I see the warning: >> >> WARNING: modpost: vmlinux: section mismatch in reference: numa_add_cpu= +0x1c (section: .text) -> early_cpu_to_node (section: .init.text) >> >> I am not sure if it is red herring or not, since changing early_cpu_to= _node >> to cpu_to_node in numa_add_cpu() from mm/numa_emulation.c did get rid = of the >> warning, but the system still failed to boot. >> >> Please note that you need binutils 2.40 to build the arm64 kernel, sin= ce there >> is a bug(https://sourceware.org/bugzilla/show_bug.cgi?id=3D31924) in 2= =2E42 preventing >> arm64 kernel from booting as well. >> >> My config is attached. > > I get more info after adding earlycon to the boot option. > pgdat is NULL, causing issues when free_area_init_node() is dereferenci= ng > it at first WARN_ON. > > FYI, my build is this series on top of v6.10 instead of the base commit= , > where the series applies cleanly on top v6.10. OK, the issue comes from that my arm64 VM has no ACPI but x86_64 VM has i= t, thus on arm64 VM numa_init(arch_acpi_numa_ini) failed in arch_numa_init()= and the code falls back to numa_init(dummy_numa_init). In dummy_numa_init= (), before patch 23 "arch_numa: switch over to numa_memblks", numa_add_memblk= () from drivers/base/arch_numa.c is called on arm64, which unconditionally set 0 to numa_nodes_parsed. This is missing in the x86 version of numa_add_memblk(), which is now used by all arch. By adding the patch below, my arm64 kernel boots in the VM. diff --git a/drivers/base/arch_numa.c b/drivers/base/arch_numa.c index 806550239d08..354f15b8d9b7 100644 --- a/drivers/base/arch_numa.c +++ b/drivers/base/arch_numa.c @@ -279,6 +279,7 @@ static int __init dummy_numa_init(void) pr_err("NUMA init failed\n"); return ret; } + node_set(0, numa_nodes_parsed); numa_off =3D true; return 0; Feel free to add Tested-by: Zi Yan # for x86_64 and arm64 after you incorporate the fix. -- Best Regards, Yan, Zi --=_MailMate_59508B23-E8AA-4646-9577-89FD38A5FCB4_= Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQJDBAEBCgAtFiEE6rR4j8RuQ2XmaZol4n+egRQHKFQFAmahvQoPHHppeUBudmlk aWEuY29tAAoJEOJ/noEUByhUSf0P/0cm9Ze5mkTYGa1wnpb68oWLf69d3kYx4/rD EJiF/eiAN0aZvKrfaf0nR+Wv3VR+Q/uNKbhMUSV4Fh4rmQ2RlHsWKyfnTiHssLey tG29ykrNlHIW7JKyczMSOk1OoZIcNLGGN/460+/vg/5i5GJycnZzVDossjE3aNAm nxsRenHA8CKxOgRfWoklsq9BxqkrbiO44mAfJ5u/pITtTBwHMl/Ic2e8jtr+jyMG 9dXB5q5E6vyLXAam9dDqLxKBCuDN3JHEP7H8FeHqqm1fvMShZ1L2i6KNJIILIGus VS2axQL2JJG2gjGSU4WhUQU1vNCS9olGNq8RTR2Z8dZN0giE5RqIxnPJCtyMPxYc CweiYuXt3j2SnADAUJkwoG1e6UEu+N+EPl4n0NOehhsCT0I+EYUtRKG8vUlVv4J5 lXAhfCXI2yM7y1TgmCHxeRRbvxXMzBJ9nca1DGBZ96NXga/F0n8OxOF5wZLrNAH5 45aSfogAKVUN69rtRtd6S3YjUm8yplbX3LQ3zFG72ojN/qeLK3jOzTRO0Cqk3vCE qzH0Hr1GjYL2m18/9Qv2hpZYyREL8qYtRX+zbUmHhq5XQaPtfYUNOPGw91M/XCgH +eZEp7E/gWez4mMq/hFK8b2HudbSBYg9xiDNiG2LSn0eA8pGhyXVhC4+2IzUtzSm JyYYM5Mt =ZVJ/ -----END PGP SIGNATURE----- --=_MailMate_59508B23-E8AA-4646-9577-89FD38A5FCB4_=-- --===============0915282717153150832== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv --===============0915282717153150832==--