Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp907492pxf; Wed, 7 Apr 2021 14:45:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwMJuGY6qLvx/z5WQ5WvWkWth4zYUVtQa9hCgLER+FJabTUHvWwILX1Phz4XRtFfTrKOxjT X-Received: by 2002:a17:906:144d:: with SMTP id q13mr6554225ejc.458.1617831917537; Wed, 07 Apr 2021 14:45:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617831917; cv=none; d=google.com; s=arc-20160816; b=CNQIgaPdQEZfOC6ZIR1MLk4V6e0YfZh5DoznjNPXFKnkLM96Qr07Si6vGegxTdb8Wb TVy3nAw+zPEhK/uhJZlRq8n5ZhTc5yPuKKHr/OTdLhFtzZYoTkEAbV0bZzKAuu/wpinE f7MHOzftRdg0y7AN6i6Kqlf0gC0VHIfeU/cG7rNho2sYUYbnfnMFtEbz1nj0EgsmzeZr dtGTsk67+HMUs37uPNT7DBHCkkj8wD5G0+XpRhKjcBs1v7RigSUP/79UcIk+S9mVmDWZ Pf19TqGeY9OrqNRo2sLaAdJutc/pIzUCMRV7XE4X3wvIIadnN8LfTamc3whaCAO2vmNI v/qw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=g0k4wwPOXNmXgZEu+e35jA5xYnPXDdrDnKQkWdO4OTU=; b=dp6GQ4XXuX4t/uUJvDXvLMSt9/bU5M5xNu62AnRS4Ahf8uJCqaRCRgBlzSazv0yzSt Z4Uw91K/Hk252swT0T8X8TnKWc0zuyya/Fvue+FKDM09C2viosWVqIyVJczPBkXGsvdP OCjStlwfWDTMKx7vZ+Yz84R6j2mwByKra0UShl6SFi4o6hCIH6BPOD3A1NBdJoSYNa6A U1O16RYpIbgIO1B8Jfz37OqqBCE5csUyi2yLcjGJx5nto6J9Gphb8eXhulIKCMIGDlqE D1nv0mml0DYf89/MiSO/eIYU4QIlm/X8R745//uNSDnzPDuDpBBsI+aPhsKME8MDIkQU N0Sg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kIKMCnKJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id q20si10567386edc.183.2021.04.07.14.44.54; Wed, 07 Apr 2021 14:45:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kIKMCnKJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1343854AbhDGR05 (ORCPT + 99 others); Wed, 7 Apr 2021 13:26:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:49260 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229720AbhDGR0t (ORCPT ); Wed, 7 Apr 2021 13:26:49 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C1CB761245; Wed, 7 Apr 2021 17:26:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1617816400; bh=X0TznhRQ1rNxYkaGVTvSVgcMdtW1s20eY3i7PGc1DyI=; h=From:To:Cc:Subject:Date:From; b=kIKMCnKJHZUhcF0j7TRm268bp2eLc+q8uBA03fX/4M51X2fyLiGbYbJgsb9Uo6I21 HPBaSbHjaY8Mt3/O+jXaBNnl3BEfPKofjxGs0J75TytOzfeyrX0HvfdhsOZPqUkttf Fgy+TmPa8WFe0YIEAphXWes1GOYabuwCcpMq7ZNwXyik97KHKI+djm/2MmvE77Rvdh vj6VilT6ua5X/fbpSGuFEuS+maCIfhyV4iKeBsfNa1No+2Z3MtRYTEBE9SkwsE9EnL nz6LnCgVALJzCe0wx0D5RN8cd6PH273SeFkyj0yLGbNbbzxsOCgrxMG6SjEeW5+yE8 ka5t4bs9ftKMg== From: Mike Rapoport To: linux-arm-kernel@lists.infradead.org Cc: Anshuman Khandual , Ard Biesheuvel , Catalin Marinas , David Hildenbrand , Marc Zyngier , Mark Rutland , Mike Rapoport , Mike Rapoport , Will Deacon , kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [RFC/RFT PATCH 0/3] arm64: drop pfn_valid_within() and simplify pfn_valid() Date: Wed, 7 Apr 2021 20:26:04 +0300 Message-Id: <20210407172607.8812-1-rppt@kernel.org> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Mike Rapoport Hi, These patches aim to remove CONFIG_HOLES_IN_ZONE and essentially hardwire pfn_valid_within() to 1. The idea is to mark NOMAP pages as reserved in the memory map and restore the intended semantics of pfn_valid() to designate availability of struct page for a pfn. With this the core mm will be able to cope with the fact that it cannot use NOMAP pages and the holes created by NOMAP ranges within MAX_ORDER blocks will be treated correctly even without the need for pfn_valid_within. The patches are only boot tested on qemu-system-aarch64 so I'd really appreciate memory stress tests on real hardware. If this actually works we'll be one step closer to drop custom pfn_valid() on arm64 altogether. Mike Rapoport (3): memblock: update initialization of reserved pages arm64: decouple check whether pfn is normal memory from pfn_valid() arm64: drop pfn_valid_within() and simplify pfn_valid() arch/arm64/Kconfig | 3 --- arch/arm64/include/asm/memory.h | 2 +- arch/arm64/include/asm/page.h | 1 + arch/arm64/kvm/mmu.c | 2 +- arch/arm64/mm/init.c | 10 ++++++++-- arch/arm64/mm/ioremap.c | 4 ++-- arch/arm64/mm/mmu.c | 2 +- mm/memblock.c | 23 +++++++++++++++++++++-- 8 files changed, 35 insertions(+), 12 deletions(-) base-commit: e49d033bddf5b565044e2abe4241353959bc9120 -- 2.28.0