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=-10.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, 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 BCC94C433B4 for ; Thu, 13 May 2021 10:54:52 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 73FFD61439 for ; Thu, 13 May 2021 10:54:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 73FFD61439 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=armlinux.org.uk Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; 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=7drUk6Ux8JlaGP+QTXpHX41YF8ZGymvaLbEH/WGKMWc=; b=IS1Gr/wcI76r0xP4aYSJ69mnr /91WltYD5mEbqhE0EAee0cbFdJX2p0si/GzrVxUKBF8dXDmb+iCDMQUr+CZqqxFcrutXgQfdanwth RVPg/bLz8IDe5T2wBuYGrOl8e8cyCmsQMr74MJNTs851UUWHOKZoF4NOa6uef1tA2J7/VKTqDiLVQ O4KeKaJS12QXKoExauG15I8znT+QNh4aFUJWtD2m0TJ5W/dPA1hD7GM1GJ3tnNhXdF1gCVLwyRJTu QBFmP+JjUJk0QmwT0J/XTtDq30a1axpmYiJm4IzVDP7619NhOuSPsaJ8M6GMUAbg1VI4cLEYmGfEL vuZr5eJbg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lh8xQ-005MPq-Pu; Thu, 13 May 2021 10:52:44 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lh8xO-005MPW-NN for linux-arm-kernel@desiato.infradead.org; Thu, 13 May 2021 10:52:42 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=/r7vsNkaaaLlEs2V4TIC3qkCSYecc0pj6ZL4FrnVKYU=; b=lyVbDlXqhoYVh+c81EnPx5AJZj GymXUWOf8oFY6VnXyf49Y7Ay0bMgtNNxBXtTcOy/Kf7rzwQYR2Qmtp1aCfL4ruPumiry10o6GMCaM MnUJw6cqkzlVFxUionzMivrk5uqx1TU0VtNo5kZSOxHKxm2QrMUWmWBrWYfXB4d+CObiXnJKF1rYT Gu2FSYFHMg3W6Drt7Vjd/mI8kZ49aclKMlOC5C5CX81qswQK9eHQuYwVozc4edgq31Nqgz8gaYQuf bBAhvgHD4o+q3BPzNue5OweTaCEgR7cjHeprT1dACk+dA9VaNpC7wM6sO+nI0dQFXxoQsqyNeoNCg U120QhSQ==; Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lh8xL-00BBBE-Uv for linux-arm-kernel@lists.infradead.org; Thu, 13 May 2021 10:52:41 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=/r7vsNkaaaLlEs2V4TIC3qkCSYecc0pj6ZL4FrnVKYU=; b=LPWt3jqo24QEG/KRjmzrkD/Tt ROLKh8lYDpweTeDIzcOQCqksjx3F7KAVfu8k5qJ3SRc9JxFWF5edVNwYMSyw7tNT5N81X6rpajSIK oFpGN8O5j9e+16kzxTjP6joY9m3nVOMaR/Hfnn6lx/RxpEAlobl8QvnRNz+d4BOvy0e9+tfSoCkGx sWuC+6dvbK/vqVTaldYRn2N5RkA7mV10/EG1I18WqZKm9TeYQkh+CT1VaqRfvWW2rr85CbnnBMFWF ow733p0Pv77Foi340p6xU3wnhcuYz41wq26bIuJ3qitKDiR6a7ssftZWwkgIDK4UtmrzgeyQzGggQ 3ZtVRhwYQ==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:43924) by pandora.armlinux.org.uk with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lh8xI-0005zJ-0Z; Thu, 13 May 2021 11:52:36 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.92) (envelope-from ) id 1lh8xG-0002wb-QB; Thu, 13 May 2021 11:52:34 +0100 Date: Thu, 13 May 2021 11:52:34 +0100 From: Russell King - ARM Linux admin To: Anshuman Khandual Cc: linux-arm-kernel@lists.infradead.org, Thomas Gleixner , Allison Randal , linux-kernel@vger.kernel.org Subject: Re: [PATCH] arm/mm: Drop [PTE|PMD]_TYPE_FAULT Message-ID: <20210513105234.GW1336@shell.armlinux.org.uk> References: <1620885113-5938-1-git-send-email-anshuman.khandual@arm.com> <20210513080353.GR1336@shell.armlinux.org.uk> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210513080353.GR1336@shell.armlinux.org.uk> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210513_035240_022171_FCB8DBB3 X-CRM114-Status: GOOD ( 13.93 ) 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 Thu, May 13, 2021 at 09:03:53AM +0100, Russell King - ARM Linux admin wrote: > On Thu, May 13, 2021 at 11:21:53AM +0530, Anshuman Khandual wrote: > > Drop these unused symbols i.e PTE_TYPE_FAULT and PMD_TYPE_FAULT. > > They're documentation, although PTE_TYPE_FAULT ought to be used by > __swp_entry() to show that better. So really, we should be doing something like this: diff --git a/arch/arm/include/asm/pgtable.h b/arch/arm/include/asm/pgtable.h index c02f24400369..c43e07d6046d 100644 --- a/arch/arm/include/asm/pgtable.h +++ b/arch/arm/include/asm/pgtable.h @@ -303,7 +303,7 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) #define __swp_entry(type,offset) ((swp_entry_t) { ((type) << __SWP_TYPE_SHIFT) | ((offset) << __SWP_OFFSET_SHIFT) }) #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) }) -#define __swp_entry_to_pte(swp) ((pte_t) { (swp).val }) +#define __swp_entry_to_pte(swp) __pte((swp).val | PTE_TYPE_FAULT) /* * It is an error for the kernel to have more swap files than we can Since that is really what is going on here. It is by design that the swp_entry_t is layed out to be correct, and of course because PTE_TYPE_FAULT has the value of zero, the above merely adds to the "documentation" rather than having any functional effect. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last! _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel