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=-4.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 0500CC43387 for ; Wed, 19 Dec 2018 08:06:48 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (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 828572184C for ; Wed, 19 Dec 2018 08:06:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 828572184C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 43KSCT3BdxzDqQr for ; Wed, 19 Dec 2018 19:06:45 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au Received: from ozlabs.org (bilbo.ozlabs.org [203.11.71.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 43KS9674njzDqbt for ; Wed, 19 Dec 2018 19:04:42 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPSA id 43KS9620zxz9s7W; Wed, 19 Dec 2018 19:04:42 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au From: Michael Ellerman To: Christophe Leroy , Benjamin Herrenschmidt , Paul Mackerras Subject: Re: [PATCH v3] powerpc: implement CONFIG_DEBUG_VIRTUAL In-Reply-To: <5e18c60e-9572-5844-b17d-aa55e7ff4709@c-s.fr> References: <87y38nrkto.fsf@concordia.ellerman.id.au> <87a7l2s6p3.fsf@concordia.ellerman.id.au> <5e18c60e-9572-5844-b17d-aa55e7ff4709@c-s.fr> Date: Wed, 19 Dec 2018 19:04:42 +1100 Message-ID: <87woo6q6w5.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" Christophe Leroy writes: > On 12/19/2018 06:57 AM, Christophe Leroy wrote: ... > > In fact the solution is the following: > > diff --git a/arch/powerpc/mm/pgtable_32.c b/arch/powerpc/mm/pgtable_32.c > index 4fc77a99c9bf..60401af2bc8f 100644 > --- a/arch/powerpc/mm/pgtable_32.c > +++ b/arch/powerpc/mm/pgtable_32.c > @@ -143,7 +143,7 @@ __ioremap_caller(phys_addr_t addr, unsigned long > size, pgprot_t prot, void *call > * Don't allow anybody to remap normal RAM that we're using. > * mem_init() sets high_memory so only do the check after that. > */ > - if (slab_is_available() && (p < virt_to_phys(high_memory)) && > + if (slab_is_available() && (p <= virt_to_phys(high_memory - 1)) && > page_is_ram(__phys_to_pfn(p))) { > printk("__ioremap(): phys addr 0x%llx is RAM lr %ps\n", > (unsigned long long)p, __builtin_return_address(0)); > > > I'll send an updated patch in a few minutes. Awesome, thanks. I'll take v4. cheers