Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp53378ybl; Tue, 20 Aug 2019 15:29:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqwlR9Wkk9pSqueE6HO/nH3JhSXAkYvXw62z3E9FglK0mb2nd9sGzn9/o1+nPEDuNgCro6F1 X-Received: by 2002:a17:90a:aa98:: with SMTP id l24mr2226710pjq.64.1566340182217; Tue, 20 Aug 2019 15:29:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566340182; cv=none; d=google.com; s=arc-20160816; b=LxWPW/r5OGTpr4IpUTcOieHC1pjR+YC5G+D1ILQQZFBRUAlwHcqR+goFGPl9XQCkiq sayZQ3PRcE39CdDfY0r0OYN4J4WZnk17a7SFGN+5uXUtJFny/M6fNJ+IZPJuBjqKu/R1 KK5qQ98o6ChjJRkm06HRLby4x4sXq7kon+N0B/9v5fH0dYsInHLnXxJsVSLHse2DtX7j Kp9fv7asuYJINbLuNYGgbyKJxHYm+I/va6o6ssxQghQxZiI/R/zX1d74o1WUOJClwdPW oBPK9iKb8ZGU1CkoMShJV7ckaebv6NgaqDhwUAbRljzr378vLwyOWE99NhRSPoHV+dL9 xOOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=+tKRKb/EpeGazO/fHX8R4Z89K5VnJuvx6rIj0XdpeBo=; b=vorI0/DvsLKQH+VYMwzYwpgIRU/HWIXPJUxY+MSE/C+NwLf2VfmOf8uCYEx00VAmE2 Ek+tIjWs8X+2sBqhZD4uuAMdYoZTQQOL0MqrzFa8zSWVntMqJA/6vlYtOGIKUji9xivk um0tIfh3vaimgeDsyhOWPtfVttoIAFdZtRIGOppCSBBzHj2dUFWKx+gfEdj9wXaAqy36 fuivGEiOXNrp1jKrXgXWFynZzGWlkQ0xn9sNyP0CZjsmwYiOYbjuDzfMQJ1PXoCny6P6 yIHqmhpvXb0os+7E/lV+/qWk40qfY/yD57lIvHec7mUO22c5ErbYtEla6Eu5sCg+cr3+ lwzg== 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 l2si14064032pff.221.2019.08.20.15.29.26; Tue, 20 Aug 2019 15:29:42 -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 S1730990AbfHTW2c (ORCPT + 99 others); Tue, 20 Aug 2019 18:28:32 -0400 Received: from verein.lst.de ([213.95.11.211]:60449 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730330AbfHTW2c (ORCPT ); Tue, 20 Aug 2019 18:28:32 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id BEB5868B20; Wed, 21 Aug 2019 00:28:28 +0200 (CEST) Date: Wed, 21 Aug 2019 00:28:28 +0200 From: Christoph Hellwig To: Christophe Leroy Cc: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , npiggin@gmail.com, hch@lst.de, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCH v2 05/12] powerpc/mm: rework io-workaround invocation. Message-ID: <20190820222828.GC18433@lst.de> References: <5fa3ef069fbd0f152512afaae19e7a60161454cf.1566309262.git.christophe.leroy@c-s.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5fa3ef069fbd0f152512afaae19e7a60161454cf.1566309262.git.christophe.leroy@c-s.fr> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 20, 2019 at 02:07:13PM +0000, Christophe Leroy wrote: > ppc_md.ioremap() is only used for I/O workaround on CELL platform, > so indirect function call can be avoided. > > This patch reworks the io-workaround and ioremap() functions to > use the global 'io_workaround_inited' flag for the activation > of io-workaround. > > When CONFIG_PPC_IO_WORKAROUNDS or CONFIG_PPC_INDIRECT_MMIO are not > selected, the I/O workaround ioremap() voids and the global flag is > not used. Note that CONFIG_PPC_IO_WORKAROUNDS is only selected by a specific cell config, and CONFIG_PPC_INDIRECT_MMIO is always selected by cell, so I think we can make CONFIG_PPC_IO_WORKAROUNDS depend on CONFIG_PPC_INDIRECT_MMIO > #define _IO_WORKAROUNDS_H > > +#ifdef CONFIG_PPC_IO_WORKAROUNDS > #include > #include > > @@ -32,4 +33,23 @@ extern int spiderpci_iowa_init(struct iowa_bus *, void *); > #define SPIDER_PCI_DUMMY_READ 0x0810 > #define SPIDER_PCI_DUMMY_READ_BASE 0x0814 > > +#endif > + > +#if defined(CONFIG_PPC_IO_WORKAROUNDS) && defined(CONFIG_PPC_INDIRECT_MMIO) and simplify the ifdefs here a bit. Otherwise this looks fine: Reviewed-by: Christoph Hellwig