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 X-Spam-Level: X-Spam-Status: No, score=-10.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E5BCFC4338F for ; Wed, 4 Aug 2021 16:42:34 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id A933360238 for ; Wed, 4 Aug 2021 16:42:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org A933360238 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=ti.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:CC:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=C8arRIKThA7Z6wCZhIHxRYCqhALgJhbK656JqGmvXqU=; b=NgK88p0fLShVIh lGBFtGjYTOKevrsgJYWmEQLDJhR6rqUc/qx03ros+X6nIp4OWKTktL5FtH5F/IMXgyXuQoHYdRo+x WinoKTsHYlydaGJeFtCcNX8CXtMWrFvOKDJYaDy3mtOt9vyT3+zEd0VicJCqRLvs2a979wiS8sBon 161M6g092ZXf9KQghIsXNN6xemoqZcNO11cP7vleMIbx5TGTVKZMDjnOgA5qF8xPnHOa0LWLU5KJ9 YkDyWMY9cNthuC6ZWvEZjQT8SyYraWpCMSSNrSIMzUAvBAso2jCVsf8Ew/xeiaBFaeoyNW8TWBDBF daD5xi71mkJ+QvnI7KAA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mBJwq-006mv7-WF; Wed, 04 Aug 2021 16:40:53 +0000 Received: from fllv0016.ext.ti.com ([198.47.19.142]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mBJwe-006msn-US for linux-arm-kernel@lists.infradead.org; Wed, 04 Aug 2021 16:40:42 +0000 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 174GeYsm009324; Wed, 4 Aug 2021 11:40:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1628095234; bh=872YEMeAUCEb+XUD7/3f4u06sDAXAcgeUyt8iMGbF1c=; h=Date:From:To:CC:Subject:References:In-Reply-To; b=iilUfwiae9o1MINjv05rqWAAEtSt7g3zLkGQ6khZxTC0POaIiuI2aXnrZutoDV+rJ hLE6P9s5EP2lCmpj6v+UvCjJZVbKAQcc+i/1WFBcL/9RPvlZM5yc4hSTG6p09MYbmF BksxQYux43XOX4dSrh1eVx3UKOXpctd/y7lbQTI4= Received: from DFLE103.ent.ti.com (dfle103.ent.ti.com [10.64.6.24]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 174GeY50082273 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 4 Aug 2021 11:40:34 -0500 Received: from DFLE115.ent.ti.com (10.64.6.36) by DFLE103.ent.ti.com (10.64.6.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Wed, 4 Aug 2021 11:40:33 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DFLE115.ent.ti.com (10.64.6.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2 via Frontend Transport; Wed, 4 Aug 2021 11:40:33 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 174GeXEh091458; Wed, 4 Aug 2021 11:40:33 -0500 Date: Wed, 4 Aug 2021 11:40:33 -0500 From: Nishanth Menon To: Linus Walleij CC: Russell King , , Nishanth Menon Subject: Re: [PATCH] ARM: Fix Keystone 2 kernel mapping regression Message-ID: <20210804164033.5omplm7qs7fuxgfb@cupcake> References: <20210804135747.737233-1-linus.walleij@linaro.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210804135747.737233-1-linus.walleij@linaro.org> User-Agent: NeoMutt/20171215 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210804_094041_129258_3FC4612A X-CRM114-Status: GOOD ( 18.49 ) X-BeenThere: linux-arm-kernel@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: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 15:57-20210804, Linus Walleij wrote: > This fixes a Keystone 2 regression discovered as a side effect of > defining an passing the physical start/end sections of the kernel > to the MMU remapping code. > > As the Keystone applies an offset to all physical addresses, > including those identified and patches by phys2virt, we fail to > account for this offset in the kernel_sec_start and kernel_sec_end > variables. > > Further these offsets can extend into the 64bit range on LPAE > systems such as the Keystone 2. > > Fix it like this: > - Extend kernel_sec_start and kernel_sec_end to be 64bit > - Add the offset also to kernel_sec_start and kernel_sec_end > > As passing kernel_sec_start and kernel_sec_end as 64bit invariably > incurs endianness issues I have attempted to dry-code around > these. Please review. > > Tested on the Vexpress QEMU model both with and without LPAE > enabled. > > Fixes: 6e121df14ccd ("ARM: 9090/1: Map the lowmem and kernel separately") > Reported-by: Nishanth Menon > Suggested-by: Russell King > Signed-off-by: Linus Walleij > Signed-off-by: Nishanth Menon > Link: https://lore.kernel.org/r/20210804135747.737233-1-linus.walleij@linaro.org > --- > Nishanth: Please test! > Other smart folks: please have a look at my endianness compensation > assembly. Russell, Linus - awesome. thanks for looking at the right problem. test log (two k2 platforms from two generations): Baseline(good): v5.13 k2g-evm: https://pastebin.ubuntu.com/p/xnGy9fM6mj/ k2hk-evm: https://pastebin.ubuntu.com/p/gpX6bPsF2R/ Check base(bad): v5.14-rc4 k2g-evm: k2hk-evm: https://pastebin.ubuntu.com/p/ht7sTjyTD2/ k2g-evm: https://pastebin.ubuntu.com/p/skf8nsGqPZ/ Check patch: v5.14-rc4 + 20210804135747.737233-1-linus.walleij@linaro.org k2hk-evm: https://pastebin.ubuntu.com/p/ycX7bmgcyT/ k2g-evm: https://pastebin.ubuntu.com/p/FgfZSwg7fY/ -- Regards, Nishanth Menon Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel