Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp3353142ybl; Mon, 19 Aug 2019 17:19:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqxaWy/LbWpFUlUdj/XIoqmnFYbOocIdbYuq9e0pSbQ+z9e5D8f5ZgTKTpEqj3ztMpcTxHWF X-Received: by 2002:a63:f304:: with SMTP id l4mr14865164pgh.66.1566260351733; Mon, 19 Aug 2019 17:19:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566260351; cv=none; d=google.com; s=arc-20160816; b=wKakgaNGzA3RotCpAmH7q5bVldpJ3Y71VnNC1RvrtBvZpKDZxYi7gZAD49kdogDa1u qO5cwVfwWZVHpEGDKN4Msvkn6TWAJL/clIXrEl5QREobvwlfjz035oKLs5ebrxHrflMk PZXz3X5w6+s5CNZpG3xEWeub01ZJVVVCPjv/P4FdzECcF6JJbXZqirKx3EZtEzTJ9+AR fzg1s1ovVvFphPjRr1p7aqLR7L+IjHQFZzCtPqDxXAqPc1bdte0VKR4EReorO7KaKVXK Fa7KUM2AqUIKnfhZPw4x0mD28lp/JGGWaLcnLojfuwxSiASF9wpdPPfkWZVIhTMviTRX pD7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from; bh=jOkYbBY50SSM3OTnfZKysGe+FjgF84V74ysog5c2xIQ=; b=kFJCVhP93Mnb2UFzgpcWaeNcHnGAefwwBB1Bl0tZmNKmhHVVeOuJVcrOOZ4XmhDkBM E52adZwusiJ/6KDDIZgJYnoVZVjqgh+whVwZfb0dVE8ksfAnS7wXMQsRlSNDF0GyEK48 i+9CkK1J4W1Wv3As/ACZcR+xhNxfTq83EBuCfyYREDFO9IljRxiI1+p//mLTrqwaG0lt 3bxc4CY9XYpPwcStOUruDry3EKFowmihmoLk1vhLypjygDyadROzAaoLKjDyNM7UboYV NVmnlE/CGOVnf/Icj+xUbynwN8t9FM/05WFq7cgjrrNSHa+Cj6eni9IDsZUTGTaomWzY Kndw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s3si10723860pgn.467.2019.08.19.17.18.56; Mon, 19 Aug 2019 17:19:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728698AbfHTASI (ORCPT + 99 others); Mon, 19 Aug 2019 20:18:08 -0400 Received: from ozlabs.org ([203.11.71.1]:39811 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728351AbfHTASI (ORCPT ); Mon, 19 Aug 2019 20:18:08 -0400 Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 46CBG53TVsz9s4Y; Tue, 20 Aug 2019 10:18:05 +1000 (AEST) From: Michael Ellerman To: Christophe Leroy , Benjamin Herrenschmidt , Paul Mackerras , npiggin@gmail.com Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCH v1 08/10] powerpc/mm: move __ioremap_at() and __iounmap_at() into ioremap.c In-Reply-To: <84bab66e7afc4b35e2bd460a87b5911c1b0830d2.1565726867.git.christophe.leroy@c-s.fr> References: <6bc35eca507359075528bc0e55938bc1ce8ee485.1565726867.git.christophe.leroy@c-s.fr> <84bab66e7afc4b35e2bd460a87b5911c1b0830d2.1565726867.git.christophe.leroy@c-s.fr> Date: Tue, 20 Aug 2019 10:18:00 +1000 Message-ID: <87tvac666f.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Christophe Leroy writes: > diff --git a/arch/powerpc/mm/ioremap.c b/arch/powerpc/mm/ioremap.c > index 57d742509cec..889ee656cf64 100644 > --- a/arch/powerpc/mm/ioremap.c > +++ b/arch/powerpc/mm/ioremap.c > @@ -103,3 +103,46 @@ void iounmap(volatile void __iomem *token) > vunmap(addr); > } > EXPORT_SYMBOL(iounmap); > + > +#ifdef CONFIG_PPC64 > +/** > + * __ioremap_at - Low level function to establish the page tables > + * for an IO mapping > + */ > +void __iomem *__ioremap_at(phys_addr_t pa, void *ea, unsigned long size, pgprot_t prot) > +{ > + /* We don't support the 4K PFN hack with ioremap */ > + if (pgprot_val(prot) & H_PAGE_4K_PFN) > + return NULL; > + > + if ((ea + size) >= (void *)IOREMAP_END) { > + pr_warn("Outside the supported range\n"); > + return NULL; > + } > + > + WARN_ON(pa & ~PAGE_MASK); > + WARN_ON(((unsigned long)ea) & ~PAGE_MASK); > + WARN_ON(size & ~PAGE_MASK); > + > + if (ioremap_range((unsigned long)ea, pa, size, prot, NUMA_NO_NODE)) This doesn't build. Adding ... extern int ioremap_range(unsigned long ea, phys_addr_t pa, unsigned long size, pgprot_t prot, int nid); ... above, until the next patch, fixes it. cheers