Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp450410ybx; Wed, 30 Oct 2019 18:07:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqyb2krXejO4erTbrUy5ATOekZTk5Gh6zQ10bedQkpCZ3xdWvKys7EnQ18+IISFhAQwhWyim X-Received: by 2002:a17:906:e20d:: with SMTP id gf13mr1233835ejb.176.1572484074501; Wed, 30 Oct 2019 18:07:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572484074; cv=none; d=google.com; s=arc-20160816; b=n0Joz2pO+iUnob/6J5R3AzJ/NPTtaLXr6wAzQ8Pl0owfnK6e8MGnhV281jO4jsyqiu nw/jgVAPeH9qYKmJUyKFnkFJpNRiPcT3YjrqtIUEmHaxJQyyGYyfR4mUv79pR0BuWW9N p3KmfyEeKNEhOEY6JP0cMq6+XaVeBgnu8TKYrqyc+XuUx6qDiJ7/VvuwqBj9NIGpBDI2 KSLjP64zEvtsZsGy/SCN2SNXmrpSMoVaCmV53mtVEIdHV/hYdBPP9Adxt9KPOUAhP+3f /uM49gdRg8hkwsKyO6475hGWUY1Da9bNuEdLZeHATNRHQdkjP4tj846Jq78ywVbjb3Jd /VwQ== 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:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=LuWs8dcQ+Sr64TXmHkexn1zViahF1FUWncWFh41F/hk=; b=ku5BnN/5gIgKrThE69J9WZDhRevqIHdAA+HUf65f7WmB4+C6NO+UnRQYbLeda+1H9z qUVuTWc9NOxfGS3fU5qiRyEp8FTV3IhSajXJEbz50EG/341UeDzwIyTW9zgssqd+0kCC CJtIBP00fjg5CvnTI98DTWAOq2dmWl30+Dkjx431dlTKXRbIcYIp+J72AxDDzP6VoRAN 7QUviRuxhhiwq2DbnHSy58sqZpyoi4QuZRCvFFokkZA3ruDVIoYQdh4vfpC3z7Zi0id9 Fmad0jnSkD3HIVHnGikwqHlebgkpW+4R1EYtRiOR3FluQEo+/8OBRlLbANXBK+zrM4MN kEQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b=KkZ+NNwM; 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 f51si2751061edb.421.2019.10.30.18.07.31; Wed, 30 Oct 2019 18:07:54 -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=KkZ+NNwM; 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 S1727072AbfJaAcD (ORCPT + 99 others); Wed, 30 Oct 2019 20:32:03 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:37859 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725867AbfJaAcD (ORCPT ); Wed, 30 Oct 2019 20:32:03 -0400 Received: by mail-wr1-f65.google.com with SMTP id e11so4353260wrv.4 for ; Wed, 30 Oct 2019 17:32:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=LuWs8dcQ+Sr64TXmHkexn1zViahF1FUWncWFh41F/hk=; b=KkZ+NNwMPyqf8TZ/0SNrTMfEEbtY6AkiKFiX1KC01wShyWiWJD4un4RhPqMCse8c3V 8vK8gBksSfUJfxpaB4aCkY3CXRfcAjThUYGNBHRSplOKOXvu8P10aMmaFwAncndK+2n7 WBZui9XlT7Gxb2n8XS6MJwcIgLAsADNcZ+Lu4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=LuWs8dcQ+Sr64TXmHkexn1zViahF1FUWncWFh41F/hk=; b=h8nMSxr8/cgb411Uusc/4DIvRLisjR0gkr4YSxoRQkeosswleUraZMnsnoLJmVcEKj 0kjgqloEC/UbZiBg/7AsVIzWDA7q/R1rwC3E4xc/9+y8tZJzd4HGdWKILtzkOykblW0m R9OPLh5aqgSuvJ8ZZxvigp4WIsIIxifrUAohZNMDrSAQRLbFZYVdYk0R21QlrGmNILCF fPDHq9bDllu9o+JVFnzwwo09yFkwHbkOjbfNwbcMHn9ACwXH5wM0rFSpNt3+Lyzu+yaM ly5yI/ap1Hun1g3J1Ll4/vfSD2nJIr6F8trX/OS5Jgy90vNmeVxX4oUxNjZeByA1LmOy ovuQ== X-Gm-Message-State: APjAAAU1rWedVi+uA20nE0JcwNLE6Q8MNBuVxhOxu/PY2DPTvp9YlU1o YHKsaqSECGrijBCbKLWXewjgl04zmnQLurRA X-Received: by 2002:adf:f2d1:: with SMTP id d17mr2407775wrp.353.1572481920804; Wed, 30 Oct 2019 17:32:00 -0700 (PDT) Received: from prevas-ravi.prevas.se (ip-5-186-115-54.cgn.fibianet.dk. [5.186.115.54]) by smtp.gmail.com with ESMTPSA id r13sm2357111wra.74.2019.10.30.17.31.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Oct 2019 17:32:00 -0700 (PDT) From: Rasmus Villemoes To: 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, Rasmus Villemoes Subject: [RFC PATCH 0/5] powerpc: make iowrite32be etc. inline Date: Thu, 31 Oct 2019 01:31:49 +0100 Message-Id: <20191031003154.21969-1-linux@rasmusvillemoes.dk> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When trying to make the QUICC Engine drivers compile on arm, I mechanically (with coccinelle) changed out_be32() to iowrite32be() etc. Christophe pointed out [1][2] that that would pessimize the powerpc SOCs since the IO accesses now incur a function call overhead. He asked that I try to make those io accessors inline on ppc, and this is the best I could come up with. 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. The diffstat may become a little better if kernel/iomap.c can indeed be removed (due to !CONFIG_PPC_INDIRECT_PIO && CONFIG_PPC_INDIRECT_MMIO never happening). [1] https://lore.kernel.org/lkml/6ee121cf-0e3d-4aa0-2593-fcb00995e429@c-s.fr/ [2] https://lore.kernel.org/lkml/886d5218-6d6b-824c-3ab9-63aafe41ff40@c-s.fr/ Rasmus Villemoes (5): asm-generic: move pcu_iounmap from iomap.h to pci_iomap.h asm-generic: employ "ifndef foo; define foo foo" idiom in iomap.h powerpc: move pci_iounmap() from iomap.c to pci-common.c powerpc: make pcibios_vaddr_is_ioport() static powerpc: make iowrite32 and friends static inline when no indirection arch/powerpc/include/asm/io.h | 172 ++++++++++++++++++++++++++ arch/powerpc/include/asm/pci-bridge.h | 9 -- arch/powerpc/kernel/Makefile | 2 +- arch/powerpc/kernel/iomap.c | 13 -- arch/powerpc/kernel/pci-common.c | 15 ++- include/asm-generic/iomap.h | 104 +++++++++++++--- include/asm-generic/pci_iomap.h | 7 ++ 7 files changed, 282 insertions(+), 40 deletions(-) -- 2.23.0