Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp791546ybx; Thu, 31 Oct 2019 00:40:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqxgiEGeAT7xJLZRCcxepKuy/Qy4QQdJqwee0E9Lo6aZe9k4YnmfKcFbOwLMC/nrR+IRIbrr X-Received: by 2002:a17:906:670c:: with SMTP id a12mr2348595ejp.273.1572507607445; Thu, 31 Oct 2019 00:40:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572507607; cv=none; d=google.com; s=arc-20160816; b=Th+8dSmEIkRuYa6PqCMPgpicgvAq+2OMWkdoL+VJ75nHpnSSctPPol7oBDd3805WBE qNd0xAp8vSFMVbXhrIi8mUELrlE1KkcgbL5u08EulXuj7iP89bYqeHuwK/79Xh4lzWZh 89YFy4MnnhWBmT4T6XziiT70dd5WUEIygLeIB7SjrYPjQNDzaIT/jN9c62iRPbIIUmUa H0ln7a/hOgOaRH/P6sp5m4CedaWIz8p6JZAkDffgDSiPwwrNkjvp9kMCIJIisjlaJ0dY xk4j6IrNrsY5phmu3Cbgm2yl+gpY5Hx67Hs8p9Hk83AvMRiHxsmpAttZvMcpBWJy1F1g Nu+A== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=XYiEiAeXhzSNlTeZVtybpT8lclKkW3XtSx+iKVkW34s=; b=aU2re4f1ETrl7e8B3zxHPEBsb8VktAMQHZNtq272V9jsa0EZusT5YesrkTskd8hfXy o38oJAszIYOaGTxWziHYx3peg4DGG1D9Kg0rBveJIscNWLDBsSnwXaQ0ATyjMHCjJkFY kz4YUWgu7SjGd1ODHN+LYw2r/3gYdXSjAkNdkivaBepHNWySVAVKPScxX/SBo4pK4kUt kbwe9MSmH2i2P1woSy3wbSk7Es/0C7PgVQIpaUI5n0ZKJGFe9AhboCX8MUF9S6DID8z9 nf2hGnr2Gqrnuy+700cDXiM61froWnxPOHJueUOvxiBhrivzAaGaLGBXBNV70RBMFJnx vGPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b=V6fRNYMg; 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 u11si3899833edi.385.2019.10.31.00.39.42; Thu, 31 Oct 2019 00:40:07 -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; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b=V6fRNYMg; 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 S1726884AbfJaHi7 (ORCPT + 99 others); Thu, 31 Oct 2019 03:38:59 -0400 Received: from mail-lj1-f193.google.com ([209.85.208.193]:44595 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726575AbfJaHi7 (ORCPT ); Thu, 31 Oct 2019 03:38:59 -0400 Received: by mail-lj1-f193.google.com with SMTP id c4so5478791lja.11 for ; Thu, 31 Oct 2019 00:38:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=XYiEiAeXhzSNlTeZVtybpT8lclKkW3XtSx+iKVkW34s=; b=V6fRNYMgoB8Pzl1XrdHlLWkDp21wb/ZAO1KlZ7rzpLCgOKB+cLTIKkhzxBjKnpaTRq wg/s5Fs8T97v4nps20HK5RGnMMQyCoRPJTQ1WSk7qZGXAWoSpTN1wt/mdQcRW0iqvpyg dx5JXOcfg8IV2iczVB2WVlj1Lz68hY/phZ2co= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=XYiEiAeXhzSNlTeZVtybpT8lclKkW3XtSx+iKVkW34s=; b=CYYR+bbnTMvVx34mlYnmQFOMBaJVILE6x6Muozwe8XxBWfjnhFQ1Nr1nGePfPgo6V+ x0fYxrt7gpxR8RBUocLf93I5WBwqEt/tQWDh5RwA/lxjikM41qDq0pBNmoeSHYZruBF4 5xygs5Y7voR6JPLwo1orROuENvDFhO93Mrrobyl4t+OwjgNlukeYIgmbFLSWSSd1hFuy OH+BCNUHTwB+rLQy5r07hrzO+Cr3RMLNQnCFmcjuACrdwVFs4umrqYpzp796LkgLg9Fq jXaeGemT6y578101pa2UPWCi7WsU2vEWPOspkNqCq9IXjRQIBcPhMrmwoPCGXnBXoFjR UHig== X-Gm-Message-State: APjAAAVHgDdQiOO8wkbDXa/4MwwUfI9vMaz8Dt8oz5HwfbgROzIYb6lf Pf/BRh3fevsAHC+pMPFlcSTYSlOiI12gvoAU X-Received: by 2002:a2e:7815:: with SMTP id t21mr2927502ljc.149.1572507537180; Thu, 31 Oct 2019 00:38:57 -0700 (PDT) Received: from [172.16.11.28] ([81.216.59.226]) by smtp.gmail.com with ESMTPSA id n11sm1422892lfd.88.2019.10.31.00.38.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 31 Oct 2019 00:38:56 -0700 (PDT) Subject: Re: [RFC PATCH 0/5] powerpc: make iowrite32be etc. inline To: Rasmus Villemoes , linux-arch@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Cc: Christophe Leroy , Arnd Bergmann , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , linux-kernel@vger.kernel.org References: <20191031003154.21969-1-linux@rasmusvillemoes.dk> From: Rasmus Villemoes Message-ID: <04799503-b423-6bc8-71cd-bee54e45883e@rasmusvillemoes.dk> Date: Thu, 31 Oct 2019 08:38:54 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20191031003154.21969-1-linux@rasmusvillemoes.dk> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 31/10/2019 01.31, Rasmus Villemoes wrote: > At first I tried something that wouldn't need to touch anything > outside arch/powerpc/, but I ended up with conditional inclusion of > asm-generic headers and/or duplicating a lot of their contents. Urrgh, this is much worse than I feared. Already 1/5 is broken because asm-generic.h includes asm-generic/iomap.h conditionally, but asm-generic/pci_iomap.h unconditionally, so now users of io.h with CONFIG_PCI and !CONFIG_GENERIC_IOMAP get an external declaration of pci_iounmap they didn't use to, in addition to the static inline defined in io.h. And I didn't think 2/5 could break anything - on the premise that if somebody already have a non-trivial define of ioread16, they couldn't possibly also include asm-generic/iomap.h. alpha proves me wrong; as long as one doesn't define ioread16 until after iomap.h has been parsed, there's no problem (well, except of course if some static inline that uses ioread16 got parsed between the compiler seeing the extern declaration and alpha then defining the ioread16 macro, but apparently that doesn't happen). So sorry for the noise. Maybe I'll just have to bite the bullet and introduce private qe_iowrite32be etc. and define them based on $ARCH. Any better ideas would be much appreciated. Thanks, Rasmus