Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp3568580ybv; Sun, 16 Feb 2020 00:21:08 -0800 (PST) X-Google-Smtp-Source: APXvYqzgZLNBagzMmqnd6QtOrxpYQvCK+neHpdElUyqSjxztyczv5Q6v2pC/5R1cJI1yR09mDjbw X-Received: by 2002:a05:6808:618:: with SMTP id y24mr6534701oih.86.1581841268716; Sun, 16 Feb 2020 00:21:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581841268; cv=none; d=google.com; s=arc-20160816; b=XzPvmtUoXXHvttlXzyuYFUK1ArLEqx6WZe/lzjPBcLlsUpEXpEMYz+0rCX5m6Ag7sk 9kXXBCIdnRFXiZB6bP3x3LEtVCc5T1N3MpOjwYz4/Rj6p2tE18TD49m0GAV8EsmV1kX6 5+akVz+sLzB/KbSRTV5aG0LTxHB2GEOzJyARrJVeZ0PlCdkf6eJBEFwSmoS4zyOG2gFe qpWFVF/vcC6FevzdtqxbLq1yde2AeKjJ4WS3tf0tAtLdoULYeTWjULU0Assvn0jLnM2P qF/89B+nsVAAfmJzANns+RYysuCZujNXiOcNVbmG8QsUNcVod+knUPfsNdvYmqt7pv5g WBTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=LBMLYQl/GSo+gyirE3i8EO126Nm4ryHXww5Hubf7rM4=; b=HI6+EGEzs87eKOVenevSV5ZKjhwQZAJ96Fa9NSxm0UyZ3lqaGcosp5RYc2S1Y+ksbg V1CgiUoc9xqH76somHEb/FQgbLm9+ijSxQXYs/SIUH/TITYTNZMZUnYPXevJcUmIX2h2 oGBRfwGdaVxq30uVhG1qWH0kQ7nCBodB1gWL0YYoO4Io6++R7AGuZmog9etUYHKSD0GS 31LwpOHX4628yKergccDoSL8ILkVLJwTEUVLdb4h6OWJSZiDkM1lXmCOtqxyh4fasqnz BDc/wsoL2Xwturj0tskThQXUmvEga4OD5fdRcLHrI0cA79HrJn1OOyQdFDGpKErVTOzb drvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=wyG8ILgv; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g4si5338874oib.152.2020.02.16.00.20.57; Sun, 16 Feb 2020 00:21:08 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=wyG8ILgv; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727943AbgBPIUj (ORCPT + 99 others); Sun, 16 Feb 2020 03:20:39 -0500 Received: from mail.kernel.org ([198.145.29.99]:57970 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725899AbgBPIUi (ORCPT ); Sun, 16 Feb 2020 03:20:38 -0500 Received: from aquarius.haifa.ibm.com (nesher1.haifa.il.ibm.com [195.110.40.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id EE50024676; Sun, 16 Feb 2020 08:20:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581841237; bh=fX2jVUBPzvxIFycYqkqAbM2SK2Ye1AXe+sp7QV+wvtQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wyG8ILgvSwRkhGXdMRYuaCYJ10sWJ2Prl5jx9nANAWJ+zd1vwV4rXp1kAUVqqc33I CwmlIovJ5pVE0Awqis6sq/785iqrRAQ6TG5fp6r8WpxtrqPTVo5mXMWPkZOiqir3uI ZThG2fcOlMP0yTucHdM/fAuOJwKnM1Q1Os6TfsQA= From: Mike Rapoport To: linux-kernel@vger.kernel.org Cc: Andrew Morton , Arnd Bergmann , Benjamin Herrenschmidt , Brian Cain , Catalin Marinas , Christophe Leroy , Fenghua Yu , Geert Uytterhoeven , Guan Xuetao , James Morse , Jonas Bonn , Julien Thierry , Ley Foon Tan , Marc Zyngier , Michael Ellerman , Paul Mackerras , Rich Felker , Russell King , Stafford Horne , Stefan Kristiansson , Suzuki K Poulose , Tony Luck , Will Deacon , Yoshinori Sato , kvmarm@lists.cs.columbia.edu, kvm-ppc@vger.kernel.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-hexagon@vger.kernel.org, linux-ia64@vger.kernel.org, linux-mm@kvack.org, linuxppc-dev@lists.ozlabs.org, linux-sh@vger.kernel.org, nios2-dev@lists.rocketboards.org, openrisc@lists.librecores.org, uclinux-h8-devel@lists.sourceforge.jp, Mike Rapoport , Mike Rapoport Subject: [PATCH v2 11/13] unicore32: remove __ARCH_USE_5LEVEL_HACK Date: Sun, 16 Feb 2020 10:18:41 +0200 Message-Id: <20200216081843.28670-12-rppt@kernel.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20200216081843.28670-1-rppt@kernel.org> References: <20200216081843.28670-1-rppt@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Mike Rapoport The unicore32 architecture has 2 level page tables and asm-generic/pgtable-nopmd.h and explicit casts from pud_t to pgd_t for page table folding. Add p4d walk in the only place that actually unfolds the pud level and remove __ARCH_USE_5LEVEL_HACK. Signed-off-by: Mike Rapoport --- arch/unicore32/include/asm/pgtable.h | 1 - arch/unicore32/kernel/hibernate.c | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/unicore32/include/asm/pgtable.h b/arch/unicore32/include/asm/pgtable.h index c8f7ba12f309..82030c32fc05 100644 --- a/arch/unicore32/include/asm/pgtable.h +++ b/arch/unicore32/include/asm/pgtable.h @@ -9,7 +9,6 @@ #ifndef __UNICORE_PGTABLE_H__ #define __UNICORE_PGTABLE_H__ -#define __ARCH_USE_5LEVEL_HACK #include #include diff --git a/arch/unicore32/kernel/hibernate.c b/arch/unicore32/kernel/hibernate.c index f3812245cc00..ccad051a79b6 100644 --- a/arch/unicore32/kernel/hibernate.c +++ b/arch/unicore32/kernel/hibernate.c @@ -33,9 +33,11 @@ struct swsusp_arch_regs swsusp_arch_regs_cpu0; static pmd_t *resume_one_md_table_init(pgd_t *pgd) { pud_t *pud; + p4d_t *p4d; pmd_t *pmd_table; - pud = pud_offset(pgd, 0); + p4d = p4d_offset(pgd, 0); + pud = pud_offset(p4d, 0); pmd_table = pmd_offset(pud, 0); return pmd_table; -- 2.24.0