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=-11.0 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 A37E5C432BE for ; Mon, 9 Aug 2021 13:49:48 +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 5194160F25 for ; Mon, 9 Aug 2021 13:49:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 5194160F25 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=+ZfuipxEObUjImzeM4wjUbyEA9641F4yVHskD93gQnY=; b=LneD25MXZ1T74m m2RBia78TVlYmg/BCkzxQluA3huwaO6KwBcml65KReMVVzTb4bM8ZMhJW6Bn7F81InPjEBBsWDlvt pAx/6rQA12QYtCSeV0KRnh7MnfM/zaL3oJhn9qq70RN/UOm8G6MiVGyyheprYoO3m1Ccuv02UY9Uz baApqkX7fu/80DE+3yLNAoanxNYccnqQOoNVoQbE4HtleB4gaNAWrKFylnwVBK7YF/RnvyHecVKXa PoSFgwMA/f/EAxhtTV/PLM91+cX0jNVOwE+KsynbItenLfiwVlzb4KSwNEIiSqAJnxxTWdTdqd01p GDlA/LIvdGV8UKuT89mA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mD5dA-000odI-08; Mon, 09 Aug 2021 13:47:52 +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 1mD5d5-000ocH-Ae for linux-arm-kernel@lists.infradead.org; Mon, 09 Aug 2021 13:47:49 +0000 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 179DlTkM048376; Mon, 9 Aug 2021 08:47:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1628516849; bh=Y5Zqf8GeEwD2eD3qGVsqw1YeccalPZklbzCyMxxe60o=; h=Date:From:To:CC:Subject:References:In-Reply-To; b=UpGljWhdaOAQnjpv2i2QHdYlwVlnGfILnxlesDMU/gAPVmpk/73vW2jxmdiVsuJ7n gc4I4YKpzff6ipVopi80yMNQ9VyyJ48qb8luiZfsvH8K4KQWye0zMWTsZ2yI7rGqBC ieiU9K0d232RzV4+g5R5JLTl9TC4YqlVs6VpvxIc= Received: from DLEE111.ent.ti.com (dlee111.ent.ti.com [157.170.170.22]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 179DlTJs110753 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 9 Aug 2021 08:47:29 -0500 Received: from DLEE113.ent.ti.com (157.170.170.24) by DLEE111.ent.ti.com (157.170.170.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Mon, 9 Aug 2021 08:47:28 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DLEE113.ent.ti.com (157.170.170.24) 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; Mon, 9 Aug 2021 08:47:28 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 179DlS8W117922; Mon, 9 Aug 2021 08:47:28 -0500 Date: Mon, 9 Aug 2021 08:47:28 -0500 From: Nishanth Menon To: Linus Walleij CC: Russell King , , Nishanth Menon , Grygorii Strashko Subject: Re: [PATCH v3] ARM: Fix Keystone 2 kernel mapping regression Message-ID: <20210809134728.3fy3gczobmdxvxtb@reword> References: <20210809115233.1009708-1-linus.walleij@linaro.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210809115233.1009708-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-20210809_064747_495956_C16DCF4B X-CRM114-Status: GOOD ( 15.39 ) 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 13:52-20210809, 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 BE8 endianness issues I have attempted to dry-code around > these. > > 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 > Tested-by: Grygorii Strashko > Tested-by: Nishanth Menon > Signed-off-by: Linus Walleij > Signed-off-by: Nishanth Menon > Link: https://lore.kernel.org/r/20210809115233.1009708-1-linus.walleij@linaro.org > --- V3 looks good as well. Thanks. Test log for v3: https://pastebin.ubuntu.com/p/RfhFwJf349/ (k2g-evm) https://pastebin.ubuntu.com/p/QmXsDPwyh9/ (k2hk evm) Tag used: next-20210809 -- 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