From patchwork Sat Oct 22 11:14:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Zijlstra X-Patchwork-Id: 13015934 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id B93B4C04A95 for ; Sat, 22 Oct 2022 11:48:36 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D112D8E0003; Sat, 22 Oct 2022 07:48:35 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C99F08E0002; Sat, 22 Oct 2022 07:48:35 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B13908E0003; Sat, 22 Oct 2022 07:48:35 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 9CF848E0001 for ; Sat, 22 Oct 2022 07:48:35 -0400 (EDT) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 73F77A08A4 for ; Sat, 22 Oct 2022 11:48:35 +0000 (UTC) X-FDA: 80048412990.17.0C7B53A Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf28.hostedemail.com (Postfix) with ESMTP id 5A377C000B for ; Sat, 22 Oct 2022 11:48:34 +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=VsbQJE2gXZYIdS3+vUbgKcHjJGGPNYaddyEXb2iNKwA=; b=R/Cm2B1BOg/6TAQKIgkjPpWVyg aJqvcmGvaLHJIyjHUTTOC9NQOLfcdXPVFDNmrXjpOfj2HRuokxNbnDFv/xyauV8LYwlc6vtAvUbv8 qVx3drzMG8oj3vR8aj3v3JuvhjtGCrH6x8DIszHxZibmaxQOjKYKhniIsmx8QKAyVh8T0SzLH+L3N YIuC8UEvEF+f63BUsupCIiDX3G/ZGcBdpuKPmYfTMyl6VsHmFXx3eesedrDyRlojc94tKwrIsNqOg 7SCZNRhzklPUgvlZ2P4w8vhBw28FFxoMep0YjTvSE0ICbGaBrTrF7eV5JUiFFZy5fsqJBBxZu0Mu4 AbqXXtlw==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1omCzQ-00Dtgp-6K; Sat, 22 Oct 2022 11:48:32 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 397173006B1; Sat, 22 Oct 2022 13:48:26 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 0) id 241D428B8E50B; Sat, 22 Oct 2022 13:48:26 +0200 (CEST) Message-ID: <20221022114424.645657294@infradead.org> User-Agent: quilt/0.66 Date: Sat, 22 Oct 2022 13:14:06 +0200 From: Peter Zijlstra To: x86@kernel.org, willy@infradead.org, torvalds@linux-foundation.org, akpm@linux-foundation.org Cc: linux-kernel@vger.kernel.org, peterz@infradead.org, linux-mm@kvack.org, aarcange@redhat.com, kirill.shutemov@linux.intel.com, jroedel@suse.de, ubizjak@gmail.com Subject: [PATCH 03/13] sh/mm: Make pmd_t similar to pte_t References: <20221022111403.531902164@infradead.org> MIME-Version: 1.0 ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1666439315; a=rsa-sha256; cv=none; b=D9bPi556U225RThDouGCSsODBAfZdd3HAFRPJ9R7O3p+3zOoGwQwzuZ2a/IxvErD+LR/LM ArBu7FgXIzPA8PmJXCy98NHN/4jc+hb6tbz7iofQHdw4j2mfFMxjpc4v+Xm8SO/dtmkWeG UAsuqCHkyhulrJ9ZkOAbMZ3lDhNeHfQ= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b="R/Cm2B1B"; spf=none (imf28.hostedemail.com: domain of peterz@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=peterz@infradead.org; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1666439315; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding:in-reply-to: references:references:dkim-signature; bh=VsbQJE2gXZYIdS3+vUbgKcHjJGGPNYaddyEXb2iNKwA=; b=8nB3dGr1OqPByJNZcP9nmbqyHFNGkRP1SMGV4qX/XJihdRp+TVwfCvjFg+nNII6i2ERAwa 5MRE3uOkE/ybaGYMhXHx94Q/4mHj2NtceR8ykJa8ZPHf8SzAjQrN/v+/c3yZGJ4NwOkPrO IPzKtG693IscPFAZZuoLZPp7c3pyDWw= X-Stat-Signature: xokdarcyem39sekk8qrusdgp4oxygmm6 X-Rspamd-Queue-Id: 5A377C000B X-Rspam-User: X-Rspamd-Server: rspam03 Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b="R/Cm2B1B"; spf=none (imf28.hostedemail.com: domain of peterz@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=peterz@infradead.org; dmarc=none X-HE-Tag: 1666439314-651688 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 pmd_t *pud_pgtable(pud_t pud) {