Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp460890imm; Wed, 11 Jul 2018 05:40:39 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfKHG6PYRpTOQCMByYCwTm5aaMyhPhTKuyrSWd5yE3RN1PwMlSPm5wA5X0JGq+SB9QKDDRT X-Received: by 2002:a17:902:22cc:: with SMTP id o12-v6mr28061141plg.68.1531312839291; Wed, 11 Jul 2018 05:40:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531312839; cv=none; d=google.com; s=arc-20160816; b=V3q/sGgM4JmMj+8oO7B/3TB/xhhAmvZ5GaOeHrs+5ggvU5UzV995a4km/6TtT+t0hg X7o+7TzB3jfPybjCpZvkKKNIUckmPZpZr839fKSSWnFHoy7+5CHOf9+XdpGQ7Tjv20TS Gp2QRZg3t0KW9P3kxMtHv1yEUn6NDEgfVEXdnlsM4ni5Ib1JAeepFtDrE73np3Vz4sRc MUWqQXjtNp/sXQSpOKREdq8B/Ax6nI0ixJtfHRYIP+5OUIVLAtC/s4ZpwHFjK5yB0Bp3 WVlWMlcdf7ghBsbsNvcG44Zb/GNex9c2oXNFTzOmWa0GRXlLcI1CfOWWqOlxRX9ihJFI NbpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=6qqLsqNk9bWBryUrKXDR6Ugu0CY4TJrtpHUlCaeMRE4=; b=QLrYosd3LoAbGajHkTRgbkCHhRwp54igF9O+kanhNvE+WI0iZNgGmCbAejPjaeMl53 Mr58fYLR6zynfDkYSSC9PPEL0BNZZ/FNRpRXlNgnk/uHJKKa0nP1U7zZskmCpVo7k4BE uOpJT7IgL9fr0Ebwwc0JK1UGWIxHFtmb00PeaOEmkUloMnVeo0cRm5j7LLfECE77QfIJ yp12L1OPyv/XlNvBfXMG6sZY8L5IVOzobmzDElv3XJ32tqf5H5EAC/BOxoZX7HzTgutf WZJkPvGT1m11AnTDIFBU3e3wFh90blFYeMuIqIl1k3s5PY3EUBC3WZEJ2gJpiQu028Sx p7+g== 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 25-v6si16690138pfp.108.2018.07.11.05.40.24; Wed, 11 Jul 2018 05:40:39 -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 S1732823AbeGKMNA (ORCPT + 99 others); Wed, 11 Jul 2018 08:13:00 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:44452 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726457AbeGKMM7 (ORCPT ); Wed, 11 Jul 2018 08:12:59 -0400 Received: from wuerfel.lan ([46.223.138.35]) by mrelayeu.kundenserver.de (mreue003 [212.227.15.129]) with ESMTPA (Nemesis) id 0M7nzI-1fyzzx1Ihc-00vSfd; Wed, 11 Jul 2018 14:08:53 +0200 From: Arnd Bergmann To: "David S. Miller" , Arnd Bergmann Cc: Boris Brezillon , linux-ia64@vger.kernel.org, linux-alpha@vger.kernel.org, sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] sparc64: add reads{b,w,l}/writes{b,w,l} Date: Wed, 11 Jul 2018 14:08:06 +0200 Message-Id: <20180711120824.3882108-2-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20180711120824.3882108-1-arnd@arndb.de> References: <20180711120824.3882108-1-arnd@arndb.de> X-Provags-ID: V03:K1:wkkgXftNy6ebXNUe1Td0Auor9Sdh11vLJ6ZgqhxeXn4FovZjF05 6XDZDJF4tjIRhK9MQh5T596MZLuhHyuvS/pKoV/J+lEjHONRn6/QmRUVlP47x/+MOfBzfqu ox47Fj6UYQNdSeLQD/SejRwlhkzWIl6gvV+yF4+H8hyiXarrIPwkTEaZZKNKfOy29RDseiz Og9z3NpucMaEKQiOd/2Ig== X-UI-Out-Filterresults: notjunk:1;V01:K0:67xNIxIBSzk=:ocslP4G0Bwp2Kgvc6pyyta a+Lgpu5TXbDml3DJtx2nIDp1EVuyg+FZ33JBUjcbVQ+BmceBbFs/m3ZcR7mYsGNXGh53ipTtL Gy4A3Wiy999mRSp2G7SUPRjxVZH7b/SniztRTnwEe9HnYkxDhKVzjHjmlVp0Pm7HyozPD6BP3 0ebBXkF8j7cyDpMDRljjkiD87+yDIJwAT2v95VVYp6BYsWZwmSv53d38qsKEtgHgjb8rNjuMj Hjhb9mL2G+FwerOY1RdgIvwvc+XUo2BrH5/KQT9SmExIaeyZvX3SIMitMeR7wtkpgYCtI2fPx 5kaAdJiy8uAi3ftGtaiofZH+OS/1lB03Cpu5/u/i9y69LWSbcv9MJrbT8qshjvTA7IVRoMv+M 3jyV9A+BWCq+cRww63fUJKcZoAul2QxqqMAQZ0T1bBYtOPqxWgKbv5V75MCBE+Soh++0QrJDX u2hofn+Yp4Qo5wv1nZGqSO0FbTHe9PGQU9wj5fK/zSnEl7aQv9jSUk0/7WBX3JeAqzoM7SQam qLmaoB7iaLfyigIbVVzD8fFPPVihlTU/EeJbsJ/960fxQ4yynhUkSEWQZdthth3L/piWdcxV/ JiVFRmrhAIOMGClSH7u11NozFSPQW7OawqDvIWQY9MP5RaFHTURxyqe7st0YEEXuO1u2D6fNJ GxrVA6uvq93RoVD4C3O/o/VOQZXYXeJDOdLiInLErwtjmgo/mVWa+8z9VaRpe4WmNZ8M= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Some drivers need these for compile-testing. On most architectures they come from asm-generic/io.h, but not on sparc64, which has its own definitions. Since we already have ioread*_rep()/iowrite*_rep() that have the same behavior on sparc64 (i.e. all PCI I/O space is memory mapped), we can rename the existing helpers and add macros to define them to the same implementation. Signed-off-by: Arnd Bergmann --- arch/sparc/include/asm/io_64.h | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/arch/sparc/include/asm/io_64.h b/arch/sparc/include/asm/io_64.h index 9a1e9cbc7e6d..b162c23ae8c2 100644 --- a/arch/sparc/include/asm/io_64.h +++ b/arch/sparc/include/asm/io_64.h @@ -243,35 +243,42 @@ void insb(unsigned long, void *, unsigned long); void insw(unsigned long, void *, unsigned long); void insl(unsigned long, void *, unsigned long); -static inline void ioread8_rep(void __iomem *port, void *buf, unsigned long count) +static inline void readsb(void __iomem *port, void *buf, unsigned long count) { insb((unsigned long __force)port, buf, count); } -static inline void ioread16_rep(void __iomem *port, void *buf, unsigned long count) +static inline void readsw(void __iomem *port, void *buf, unsigned long count) { insw((unsigned long __force)port, buf, count); } -static inline void ioread32_rep(void __iomem *port, void *buf, unsigned long count) +static inline void readsl(void __iomem *port, void *buf, unsigned long count) { insl((unsigned long __force)port, buf, count); } -static inline void iowrite8_rep(void __iomem *port, const void *buf, unsigned long count) +static inline void writesb(void __iomem *port, const void *buf, unsigned long count) { outsb((unsigned long __force)port, buf, count); } -static inline void iowrite16_rep(void __iomem *port, const void *buf, unsigned long count) +static inline void writesw(void __iomem *port, const void *buf, unsigned long count) { outsw((unsigned long __force)port, buf, count); } -static inline void iowrite32_rep(void __iomem *port, const void *buf, unsigned long count) +static inline void writesl(void __iomem *port, const void *buf, unsigned long count) { outsl((unsigned long __force)port, buf, count); } +#define ioread8_rep(p,d,l) readsb(p,d,l) +#define ioread16_rep(p,d,l) readsw(p,d,l) +#define ioread32_rep(p,d,l) readsl(p,d,l) +#define iowrite8_rep(p,d,l) writesb(p,d,l) +#define iowrite16_rep(p,d,l) writesw(p,d,l) +#define iowrite32_rep(p,d,l) writesl(p,d,l) + /* Valid I/O Space regions are anywhere, because each PCI bus supported * can live in an arbitrary area of the physical address range. */ -- 2.9.0