Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp237881ybk; Sat, 9 May 2020 01:16:14 -0700 (PDT) X-Google-Smtp-Source: APiQypI03VKM+sW43w6Z6m44Hc1yk965iUxe0ifb987W7RPbcnSbuWRqNr5HKNJhR8B5Jl4Xw7Ic X-Received: by 2002:a17:906:11c9:: with SMTP id o9mr5349456eja.64.1589012174050; Sat, 09 May 2020 01:16:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589012174; cv=none; d=google.com; s=arc-20160816; b=eocP4z7grLBkVYLSiq4bmdLr4R6NBx/XiU9OZ4hA1NLSLOdq8W5/D5a2xknS9O8Jwc 3ES4Rmm0gV6WqWgZee2SEXLW/DINCvLQZ0bl5OXQg3xNf+qRn47ZKtrmPG/b2AW24LlU 49anoSifBL+bdNEOdWUexoCDjsz06fQcGvX8xbcG3JZoMguZCmWIr5R02hR9rY1ixUW5 hjwIeqFegHByXb7bBbyI+o4oJSbFVt79B3pc1uvDt8zIS28CICQMjqblfFJo6JuytEol AoHbzfq7cHoJKoXEfuPNepPHql7mdw+NBu/3ramEcA8F0jwZSTDHj2izwoVl6WCjpFOh DoDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=trcL6JL/P6z4vCS3d8TLuc4KmkB3M51YoritqIkziPk=; b=w3+absquQ5btkSm1d5vUMvD4hqVlI49pksJFjk+jjcOaP+m98hUA9d2pjsgeiuUTac IW3PmLZN8ulPp5UkGdnYWmeoUCArezuY62fQ5uXBkHEi5zlVsxoEaaXfFAEYj9+2KmmR qUhTEZSKFl+hRIVGmIBgNTfPssMosRZezJAGlNFn+BKVgDG1xX7zKVDT8W8Zy8YTAUE8 FoerNGG+kD4DTT86vOiO10CnO17QzC5ViR1xGmOyoVnj0rKtGVhszVWKOK7vIkCC2VeS eGwaP5f+AhoOUL83a40sxLxfbA62ilZodt0XfwFNcaKnh+tERIG+jAUa7LQXV976A/b/ CfVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Y4PmmSPd; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g7si2246139ejf.410.2020.05.09.01.15.49; Sat, 09 May 2020 01:16:14 -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=@gmail.com header.s=20161025 header.b=Y4PmmSPd; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727768AbgEIILv (ORCPT + 99 others); Sat, 9 May 2020 04:11:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43964 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725850AbgEIILu (ORCPT ); Sat, 9 May 2020 04:11:50 -0400 Received: from mail-il1-x133.google.com (mail-il1-x133.google.com [IPv6:2607:f8b0:4864:20::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 725C6C061A0C for ; Sat, 9 May 2020 01:11:49 -0700 (PDT) Received: by mail-il1-x133.google.com with SMTP id m5so3626328ilj.10 for ; Sat, 09 May 2020 01:11:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=trcL6JL/P6z4vCS3d8TLuc4KmkB3M51YoritqIkziPk=; b=Y4PmmSPdrqGZ9O/9z6M1BAClnjDC+wdjebUzwpC5fqMXzZYsNdW+jA1kUHbxbimLGc /mmI2EA72uT5ihkSTK2kuTqHj2x1+e1v/a4TpW12wq022tFZEyVJOJOn+45xFoyZvGwB YxJG4EZ5l7m5NEQyA6gu8GjgtWPhpi6dUm0V8JIuLM4mfs8vHdoqVr27OTCiinlxu2kC HIZXznUP4vbfD1HXnVh4/XkWFHjrO1UFdc0yBC7U2UEIIx8yk+99ve4PhVtDG2qRyX41 ZZqSJzBY37qlaSMcLkKy1g2xS1xSIjqErA0/BU92BelEHTjchkhQwastD5fZK5bhcYmz n5Uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=trcL6JL/P6z4vCS3d8TLuc4KmkB3M51YoritqIkziPk=; b=bmZE2ocwfzdVzZRBx3E95Ug8UAbSuFDqyljuwSLfBy8EhfO4ZUM3hCpURVW2BqVydJ xYwFYsBZGeGVhIO/VItPBQAowZKFbUnpfd5SHYt0YO8dA0/fS1w49jpzzjo5nd31wt2b 7DooiV2Xm34LG0RJWi594EAodeVn4Fb6/KA9ItvreN/stfbFu5YxeisF0GFUN9zgpA7f MhMlAqoDKBbYhmom7zqGNjtaWfkeBm8g6mWGfcQVdl+fndkb0BbrWJZepYE+K9u1PaPg cYNdIDppSlnZNE+G9zU7lkc2Iscg1Y/4gIdvlXnDie/MjdTW97M+kh2zmyBjIJM3rCHN hTLg== X-Gm-Message-State: AGi0PubjRzoVMS1becRDhVV0rO95z3/hbgUnTn/cyCR/MMXCbdddP/wi GpspYPstAxeVh/qX3SeiujOzRJ0QZNTsGawiYxg= X-Received: by 2002:a92:7c01:: with SMTP id x1mr6540061ilc.122.1589011908683; Sat, 09 May 2020 01:11:48 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: "Oliver O'Halloran" Date: Sat, 9 May 2020 18:11:37 +1000 Message-ID: Subject: Re: ioremap() called early from pnv_pci_init_ioda_phb() To: Qian Cai Cc: Christophe Leroy , Michael Ellerman , linuxppc-dev , LKML Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, May 9, 2020 at 12:41 AM Qian Cai wrote: > > Booting POWER9 PowerNV has this message, > > "ioremap() called early from pnv_pci_init_ioda_phb+0x420/0xdfc. Use early= _ioremap() instead=E2=80=9D > > but use the patch below will result in leaks because it will never call e= arly_iounmap() anywhere. However, it looks me it was by design that phb->re= gs mapping would be there forever where it would be used in pnv_ioda_get_in= val_reg(), so is just that check_early_ioremap_leak() initcall too strong? The warning there is junk. The PHBs are setup at boot and never torn down so we're not "leaking" the mapping. It's supposed to be there for the lifetime of the kernel. That said, we could probably move the PCI setup to a point later in boot where the normal ioremap can be be used. We would have to check for initcalls which depend on the PHBs being setup and delay those too though. Oliver