From patchwork Wed Jan 10 19:07:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Punit Agrawal X-Patchwork-Id: 10155917 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0ADC7601A1 for ; Wed, 10 Jan 2018 19:08:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F31EB26B41 for ; Wed, 10 Jan 2018 19:08:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E748E28578; Wed, 10 Jan 2018 19:08:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 72C9926B41 for ; Wed, 10 Jan 2018 19:08:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=knDIKHaPeVFnnSeKGXsd6+FbpOpZ6CoGcJFFEPdoYBU=; b=LSGMGJQEMIXPS/Cx8i0VJuaFap 1e7Ps2WlFfg802RHE1BAinXoCg79fSeyoYS2ZuHkvbEJLB98TSIMTmTIz30o4T2675XvWeRmgYabf mnAC4ti51TbBcyqvsZ7K/2FwRMgH/NSLIZWi+DVIZWc5VvrbBBEN8ngwtEmUlEzXIjeXExVbyb2EO n+fQr0gubCp2nYFeUjDbupeYAz85Y3eq2xzNnMRolI2Xkxq8pxtXVvJLpGu0BpSbUNDQ3wXDoatmW SYywp6guoqnw9+woQfGPN50QEhWlHiMpKn3YQX+ImsIT0mF7G2PFtq8oifSxKyCovYzf6AdWdFfzJ wF0WE3/A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eZLjd-0002PT-Ho; Wed, 10 Jan 2018 19:08:25 +0000 Received: from foss.arm.com ([217.140.101.70]) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eZLja-0002AH-7b for linux-arm-kernel@lists.infradead.org; Wed, 10 Jan 2018 19:08:23 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 1B1321529; Wed, 10 Jan 2018 11:08:12 -0800 (PST) Received: from localhost (e105922-lin.cambridge.arm.com [10.1.207.29]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B35C03F581; Wed, 10 Jan 2018 11:08:11 -0800 (PST) From: Punit Agrawal To: kvmarm@lists.cs.columbia.edu Subject: [RFC 1/4] arm64: Correct type for PUD macros Date: Wed, 10 Jan 2018 19:07:26 +0000 Message-Id: <20180110190729.18383-2-punit.agrawal@arm.com> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180110190729.18383-1-punit.agrawal@arm.com> References: <20180110190729.18383-1-punit.agrawal@arm.com> X-ARM-No-Footer: FoSSMail X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180110_110822_416442_03A0F930 X-CRM114-Status: UNSURE ( 6.94 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: suzuki.poulose@arm.com, Catalin Marinas , Punit Agrawal , Will Deacon , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The PUD macros (PUD_TABLE_BIT, PUD_TYPE_MASK, PUD_TYPE_SECT) use the pgdval_t even when pudval_t is available. Even though the underlying type for both (u64) is the same it is confusing and may lead to issues in the future. Fix this by using pudval_t to define the PUD_* macros. Fixes: 084bd29810a56 ("ARM64: mm: HugeTLB support.") Fixes: 206a2a73a62d3 ("arm64: mm: Create gigabyte kernel logical mappings where possible") Signed-off-by: Punit Agrawal Cc: Catalin Marinas Cc: Will Deacon --- arch/arm64/include/asm/pgtable-hwdef.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm64/include/asm/pgtable-hwdef.h b/arch/arm64/include/asm/pgtable-hwdef.h index eb0c2bd90de9..40a998cdd399 100644 --- a/arch/arm64/include/asm/pgtable-hwdef.h +++ b/arch/arm64/include/asm/pgtable-hwdef.h @@ -116,9 +116,9 @@ * Level 1 descriptor (PUD). */ #define PUD_TYPE_TABLE (_AT(pudval_t, 3) << 0) -#define PUD_TABLE_BIT (_AT(pgdval_t, 1) << 1) -#define PUD_TYPE_MASK (_AT(pgdval_t, 3) << 0) -#define PUD_TYPE_SECT (_AT(pgdval_t, 1) << 0) +#define PUD_TABLE_BIT (_AT(pudval_t, 1) << 1) +#define PUD_TYPE_MASK (_AT(pudval_t, 3) << 0) +#define PUD_TYPE_SECT (_AT(pudval_t, 1) << 0) /* * Level 2 descriptor (PMD).