From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qg0-f46.google.com (mail-qg0-f46.google.com [209.85.192.46]) by kanga.kvack.org (Postfix) with ESMTP id 4211B6B003C for ; Mon, 29 Sep 2014 07:33:43 -0400 (EDT) Received: by mail-qg0-f46.google.com with SMTP id a108so6636qge.19 for ; Mon, 29 Sep 2014 04:33:43 -0700 (PDT) Received: from mx1.redhat.com (mx1.redhat.com. [209.132.183.28]) by mx.google.com with ESMTPS id e8si7071062qgd.20.2014.09.29.04.33.42 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Sep 2014 04:33:42 -0700 (PDT) From: Frantisek Hrbata Subject: [RESEND PATCH 4/4] x86: remove high_memory check from valid_phys_addr_range Date: Mon, 29 Sep 2014 13:33:02 +0200 Message-Id: <1411990382-11902-5-git-send-email-fhrbata@redhat.com> In-Reply-To: <1411990382-11902-1-git-send-email-fhrbata@redhat.com> References: <1411990382-11902-1-git-send-email-fhrbata@redhat.com> Sender: owner-linux-mm@kvack.org List-ID: To: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, x86@kernel.org, oleg@redhat.com, kamaleshb@in.ibm.com, hechjie@cn.ibm.com, akpm@linux-foundation.org, dave.hansen@intel.com, dvlasenk@redhat.com, prarit@redhat.com, lwoodman@redhat.com, hannsj_uhl@de.ibm.com, torvalds@linux-foundation.org There is no need to block read/write access to /dev/mem for phys. addr. above high_memory for non-system RAM. The only limitation should be boot_cpu_data.x86_phys_bits(max phys. addr. size). Signed-off-by: Frantisek Hrbata --- arch/x86/mm/mmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/mm/mmap.c b/arch/x86/mm/mmap.c index c8acb10..7fa0242 100644 --- a/arch/x86/mm/mmap.c +++ b/arch/x86/mm/mmap.c @@ -127,7 +127,7 @@ void arch_pick_mmap_layout(struct mm_struct *mm) int valid_phys_addr_range(phys_addr_t addr, size_t count) { - return addr + count <= __pa(high_memory); + return arch_pfn_possible((addr + count) >> PAGE_SHIFT); } int valid_mmap_phys_addr_range(unsigned long pfn, size_t count) -- 1.9.3 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org