Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp4084034ybg; Tue, 29 Oct 2019 01:46:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqxgPTFxYzVCAIFTEfZ3Wh1e4wtCtnpettcFqUbN8BWwxhtLPLQwZiKISb5awSsxc+v/Kq6f X-Received: by 2002:a05:6402:1255:: with SMTP id l21mr24453208edw.41.1572338810903; Tue, 29 Oct 2019 01:46:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572338810; cv=none; d=google.com; s=arc-20160816; b=SwQoq+7cw8K+HpeGOUzW7HqDp5l+mIZeX9nwGh7vLNSkS0+z+Xn7tx1OEncGyrnwsz rCxdWz+M1PmH/fZj3hFL8k0QlWvWTaSbPP9hNQvnNl1p1fx8curZM8o29T1gIpeo1+4g pNkImXihjr8hUktIJk4gdFf3uYUjtAElvkS6bynPfWYQwo4a2hB/MUfCqopY0gPypmvN NIFdUuTSoY1gZE1rn2FrrS0PnCsAbkObbcDmJjh29LsKovtrIW571I/GVn9ywgID5NyN RBD831JhQ0cHYZl/QLHlJQrvd4Z7WYW4tV1YiTTq6ksqvU/IrYzqcs22sa5IfQI6UEOH qXtg== 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=HGXd6rlxFLbtpjrAQ8G1Qtj9aAnpBTx6NO8SjG7PtjI=; b=NZ6uJqq8jM76fj6aBKrPDRwqjXxXJoK6VVT7fG2akL/qpbbKh246IpwHYl3AtK6mfZ 6TkOsyQObFkQKViFmpjBW9P/fP0AfBsnTZ76EJf6jg+j45+dKRTBUkZe1vx7BjC5fjhU a9i1juWrHBYrtC4hN4rt7dzinznDHqi7FjsUenWOcQdJ8Y9ZrYFz7eFOj6ajKJroM/Zg LdUwcy0s+Ux19Mpsh77qJIZfMR6Ig6pJ0sWFgVM9Cs4P6G5UcuobjB98XjiEgub1CRa3 dsgdS8ABbW0dg/kYcxw42/qeQi/0d7Mq53PsyIZrkPfZ1SsrYImlu+Q9x+z3Qg64D9gc J+Gg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b=RB8kpGeg; 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 k15si7952288ejz.22.2019.10.29.01.46.27; Tue, 29 Oct 2019 01:46:50 -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=RB8kpGeg; 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 S1729835AbfJ2Ine (ORCPT + 99 others); Tue, 29 Oct 2019 04:43:34 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:39441 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725854AbfJ2Ind (ORCPT ); Tue, 29 Oct 2019 04:43:33 -0400 Received: by mail-lj1-f194.google.com with SMTP id y3so14328947ljj.6 for ; Tue, 29 Oct 2019 01:43:32 -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=HGXd6rlxFLbtpjrAQ8G1Qtj9aAnpBTx6NO8SjG7PtjI=; b=RB8kpGegZFDbX4ehO3+DnkUXso3PSM4ypigva4bxla2UhzbfYW3VFanbaz6VAqTIp9 vC4VW/N/DNc5sYKbDVzBAZWHMwSNqKbSozM7z9NZGI9mkDa0OXo0Om0mCpyDwNoaV8lk b3mRrhW7uAmiDR3MvGYepqftbS6Qixnz1xrt0= 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=HGXd6rlxFLbtpjrAQ8G1Qtj9aAnpBTx6NO8SjG7PtjI=; b=Ztu7BaaksRHls9mnFr4C2X/U6PHgwVe4ZwDNPKW4atmTVoi4Lk09Y6IF96niTfosPE /cQP6i25lnAm91LqWM969g9G2a8vlhOtkjA1IpUSOAl3ggGoZwxg78xFUfLL9cq9kEpQ wkYGQhrgo4W/6zc+NAqHc2WMKGVyowCegtM22MgtieUmjwvkMdRGd5XJzTnKOPIKiNuL MgsOXvJMZp2UeKZgBT0jp1cpun2qhVTjjmwF793hfpSPL5Dvt7Kmygal0T4DI3Lnyo3w kVrI7eENwGgSFBj4z/o5sZTs6DeZrJGfZGM9oJgre8HggkEEZeungO5JJ6NnQEVtmn99 +utQ== X-Gm-Message-State: APjAAAUOKQFymZmEBD24ogf3SYaD5lJRIhVSoIRJZJ8L6o4jotd0j3US P+V2Db0gnqZEJBuPR0u1iBD5Fs2m2sirXvY6 X-Received: by 2002:a2e:4751:: with SMTP id u78mr1617787lja.210.1572338611332; Tue, 29 Oct 2019 01:43:31 -0700 (PDT) Received: from [172.16.11.28] ([81.216.59.226]) by smtp.gmail.com with ESMTPSA id 77sm13198495lfj.41.2019.10.29.01.43.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 29 Oct 2019 01:43:30 -0700 (PDT) Subject: ppc: inlining iowrite32be and friends (was: Re: [PATCH v2 03/23] soc: fsl: qe: avoid ppc-specific io accessors) To: Christophe Leroy , Qiang Zhao , Li Yang Cc: linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Scott Wood , Michael Ellerman , Benjamin Herrenschmidt References: <20191018125234.21825-1-linux@rasmusvillemoes.dk> <20191025124058.22580-1-linux@rasmusvillemoes.dk> <20191025124058.22580-4-linux@rasmusvillemoes.dk> <886d5218-6d6b-824c-3ab9-63aafe41ff40@c-s.fr> From: Rasmus Villemoes Message-ID: <02a8a449-e421-f70f-4bf9-50a94324834b@rasmusvillemoes.dk> Date: Tue, 29 Oct 2019 09:43:28 +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: <886d5218-6d6b-824c-3ab9-63aafe41ff40@c-s.fr> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 29/10/2019 08.43, Christophe Leroy wrote: > > > Le 25/10/2019 à 14:40, Rasmus Villemoes a écrit : >> In preparation for allowing to build QE support for architectures >> other than PPC, replace the ppc-specific io accessors. Done via >> >> $ spatch --sp-file io.cocci --in-place drivers/soc/fsl/qe/ >> > As discussed already, this patch changes io accesors from inline to > outline, this has a performance impact on powerpc32 like 83xx. > > Could you please include in your series before this patch a patch to > change generic io accessors to inline on powerpc ? Well, it's complicated. I was hoping someone could explain why those are OOL in the first place. The history of arch/powerpc/kernel/iomap.c and the makefile fragment including it is a bit messy - first of all, the file itself talks about "ppc64 implementation" but is obviously used for all ppc32 (while the ppc64 platforms that set PPC_INDIRECT_PIO also get GENERIC_IOMAP, i.e. lib/iomap.c). So, what I wanted to do was to make the accessors inline when !PPC_INDIRECT_PIO && !PPC_INDIRECT_MMIO. But then I need to avoid including asm-generic/iomap.h, because that declares these as extern. OTOH, I think I do need some of the declarations from that file, e.g. at least pci_iounmap, and perhaps also the *_rep versions, unless they should also be inlined. I'm happy to give it a try, but I think that belongs in a separate series. The first few attempts are almost certain to generate some 0day reports. Question for powerpc maintainers: Is there a fundamental reason iowrite32be and friends are out-of-line on PPC32 (more generally, the PPC platforms that set neither PPC_INDIRECT_PIO or PPC_INDIRECT_MMIO)? If so, there's no point trying to make them inline, and I'd have to address Christophe's concern by introducing private qe_iowrite32be() etc. wrappers. Thanks, Rasmus