From patchwork Mon Nov 30 11:27:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Zijlstra X-Patchwork-Id: 11940255 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=-13.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 D635DC64E7B for ; Mon, 30 Nov 2020 11:38:45 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 5545220855 for ; Mon, 30 Nov 2020 11:38:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="v/A3yNF6" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5545220855 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 678C88D000D; Mon, 30 Nov 2020 06:38:31 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 5B0F18D000A; Mon, 30 Nov 2020 06:38:31 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4A41B8D000C; Mon, 30 Nov 2020 06:38:31 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0086.hostedemail.com [216.40.44.86]) by kanga.kvack.org (Postfix) with ESMTP id 29F898D000A for ; Mon, 30 Nov 2020 06:38:31 -0500 (EST) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id E00F91EE6 for ; Mon, 30 Nov 2020 11:38:30 +0000 (UTC) X-FDA: 77540886780.28.cars59_1d03268273a1 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin28.hostedemail.com (Postfix) with ESMTP id BBE036C37 for ; Mon, 30 Nov 2020 11:38:30 +0000 (UTC) X-HE-Tag: cars59_1d03268273a1 X-Filterd-Recvd-Size: 2896 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf05.hostedemail.com (Postfix) with ESMTP for ; Mon, 30 Nov 2020 11:38:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Type:MIME-Version:References: Subject:Cc:To:From:Date:Message-ID:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:In-Reply-To; bh=9rpmj7e+Hv4t7twTnPnStJvZhGql4xrwM1pM4f4qTOM=; b=v/A3yNF6sUJE5HpF7raY5uFFNv LPvE3P4LP5V9kkgmI+/QIcDyPpVT7Vh3gc5QRFwNaiWzqzaL5X2gi+khpdds4OqWrrWqvRTzZW77A 9rp3kp5SMnx2isXm7N/cf4A8FxPDVR3hPnZB8ZCGbB1pycC/C7iOsoNNJV2fsS705RBHS+VpqDBrl KovUEqHFj7y3yqT2EqGgpZrx+UocBkhosH13AEmesyHKZF+zploGxfnqYmYPEVGCBMZg+qCdB3Zu4 DKJZbFge63xNTPMMHmJ2sXWU1S4rGAwU1jgBF40LEiENRmdGXH8BlGqHK5kRGxaPlpQLRYLKJlGPa fli9mZ/g==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kjhVa-0007Qe-SJ; Mon, 30 Nov 2020 11:38:19 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id EA9FE3059DD; Mon, 30 Nov 2020 12:38:17 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 0) id D90AE2B84F9C5; Mon, 30 Nov 2020 12:38:17 +0100 (CET) Message-ID: <20201130113602.959570640@infradead.org> User-Agent: quilt/0.66 Date: Mon, 30 Nov 2020 12:27:08 +0100 From: Peter Zijlstra To: x86@kernel.org, willy@infradead.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, aarcange@redhat.com, kirill.shutemov@linux.intel.com, jroedel@suse.de, peterz@infradead.org Subject: [RFC][PATCH 3/9] sh/mm: Make pmd_t similar to pte_t References: <20201130112705.900705277@infradead.org> MIME-Version: 1.0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Just like 64bit pte_t, have a low/high split in pmd_t. Signed-off-by: Peter Zijlstra (Intel) --- arch/sh/include/asm/pgtable-3level.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) --- a/arch/sh/include/asm/pgtable-3level.h +++ b/arch/sh/include/asm/pgtable-3level.h @@ -28,9 +28,15 @@ #define pmd_ERROR(e) \ printk("%s:%d: bad pmd %016llx.\n", __FILE__, __LINE__, pmd_val(e)) -typedef struct { unsigned long long pmd; } pmd_t; +typedef struct { + struct { + unsigned long pmd_low; + unsigned long pmd_high; + }; + unsigned long long pmd; +} pmd_t; #define pmd_val(x) ((x).pmd) -#define __pmd(x) ((pmd_t) { (x) } ) +#define __pmd(x) ((pmd_t) { .pmd = (x) } ) static inline unsigned long pud_page_vaddr(pud_t pud) {