From patchwork Fri Nov 30 17:06:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Logan Gunthorpe X-Patchwork-Id: 10706843 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6D84C1057 for ; Fri, 30 Nov 2018 17:06:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 584FF304EE for ; Fri, 30 Nov 2018 17:06:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4B7E0304E4; Fri, 30 Nov 2018 17:06:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D4DBA304C0 for ; Fri, 30 Nov 2018 17:06:18 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3A0AF6B5948; Fri, 30 Nov 2018 12:06:16 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 2B38C6B5947; Fri, 30 Nov 2018 12:06:16 -0500 (EST) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1604D6B5946; Fri, 30 Nov 2018 12:06:16 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-io1-f70.google.com (mail-io1-f70.google.com [209.85.166.70]) by kanga.kvack.org (Postfix) with ESMTP id D51246B5943 for ; Fri, 30 Nov 2018 12:06:15 -0500 (EST) Received: by mail-io1-f70.google.com with SMTP id x5so6123047ion.1 for ; Fri, 30 Nov 2018 09:06:15 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:from:to:cc :date:message-id:in-reply-to:references:mime-version :content-transfer-encoding:subject; bh=xiVzrMixx22L0jVuC4/GHg9aSUVemvSKbhxTFU+QSeQ=; b=N0ryL6JvzVwJOUpaeUCov361rt6/mVdZS0Xk8DB0U+DU7m6w5imVI4htsdlFlei7Gs oC0YCsMmlJlVUsCpJULcsXD96saGia4hJDidMaGaj2HPjlmZrU2UKdkWfML5rHheUmMJ JjSbwTePZDd941IAJONwSEPLjsVqXSWFnX6YJEfBy+GGJ+mCju6yKORfMk503IFPfPOS GSH2qeIDgBBeNIMGydzY4k7CK5Nd4JBU/cx/DIjs6GmA05ZgOIrzaKfYlqu7Fnt7Ns87 2yQ2e08gtxgrwgs+Yyu/35vsJs9LNAa+V9Yf42UayZ3CRefkbhxrvhKaZEpXbl7KePIL hx1A== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of gunthorp@deltatee.com designates 207.54.116.67 as permitted sender) smtp.mailfrom=gunthorp@deltatee.com X-Gm-Message-State: AA+aEWZiAH+3kaQOx+8Cgg2HX1rGXW1hNIU08mLmO94wrwSVXrJgBqc9 apDuhCPTTEYJ+BKwhwPi+eJR9jlSF4ZzqrdZf4UQzKBsxj20vTZcOZWE2NyK96QDqncUU+NPam0 N4crbeEQVk2DqaHgfL9Hm58yBCcUHGDP+a4VZ/OiPsjbaK+i3AseZDlSCVZ1bwNKYVg== X-Received: by 2002:a24:2fcb:: with SMTP id j194mr6067261itj.56.1543597575659; Fri, 30 Nov 2018 09:06:15 -0800 (PST) X-Google-Smtp-Source: AFSGD/WE9XA2o0z2CarDFLeX2q8eBA99op5SknC3YSp8dH1wD8ssyuWXnzDu46dOB9BXmkC0/UKb X-Received: by 2002:a24:2fcb:: with SMTP id j194mr6067200itj.56.1543597574813; Fri, 30 Nov 2018 09:06:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543597574; cv=none; d=google.com; s=arc-20160816; b=DLcTKmbmDexfWirDbNUFPlefFs8ya3SegQH5ppuQSqddP5CS1hIxW9clPmXBrjQyEj wc0gyvS79wO0kEf1JDMx6kCmh8PQOdDhC2fJn7uEjUaTCWm597dwXHcvzmv6Pld8aA5p 8tnkFn0Qf0XpbOjJdxcBMCbccDLf6sDPAh7GDnO/6frXc+A6/n2TbNsmFhh1WPiDyAGm tyXt/J+9SB2WMTFT/GmO4eE+4LGzqil9w2EMLPDJJwFvKUMghXBKr0bITCkoVZj3BX9e YgFN+PIWExCMYTPx+m692M6IFkKfWuwt8+of6DBqY60Zcg5Dv6Y/1uvTE3npr2/griSu MCsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=subject:content-transfer-encoding:mime-version:references :in-reply-to:message-id:date:cc:to:from; bh=xiVzrMixx22L0jVuC4/GHg9aSUVemvSKbhxTFU+QSeQ=; b=G8HdZ53uKXNNvOvpNP9WRweTxRIf2XrzSlP4xM5Q+j2GTfR9SAymnqMiFS1R4n1Fgg AmtBf3EYH416N4dGK5nB3Bkgs+90ojqdQxPdp6wz0m2pNKlU5xWBurfiM6lbdODoVaHf 91rgtvw78bIY/SWi5N7eK0zax6Z6cla4xi0y14Ldum8MkNAepp6e7LprgSkcFR0I/hBZ aGBMjZsYot9M8y5OujPpJUL6GQ6bA4miHoZPRQbGtCNJ0A3g8M1DkaegLpXEsTPwq6gZ kBuJ5+Vr+SRn/mdfw6TE+JHH6kZxc97L9j1DnyqthxbOVG7KgUeROMwOXGuY88LMoL1F aFow== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of gunthorp@deltatee.com designates 207.54.116.67 as permitted sender) smtp.mailfrom=gunthorp@deltatee.com Received: from ale.deltatee.com (ale.deltatee.com. [207.54.116.67]) by mx.google.com with ESMTPS id d81si3604103itc.66.2018.11.30.09.06.14 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 30 Nov 2018 09:06:14 -0800 (PST) Received-SPF: pass (google.com: domain of gunthorp@deltatee.com designates 207.54.116.67 as permitted sender) client-ip=207.54.116.67; Authentication-Results: mx.google.com; spf=pass (google.com: domain of gunthorp@deltatee.com designates 207.54.116.67 as permitted sender) smtp.mailfrom=gunthorp@deltatee.com Received: from cgy1-donard.priv.deltatee.com ([172.16.1.31]) by ale.deltatee.com with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1gSmEz-0000qr-9A; Fri, 30 Nov 2018 10:06:11 -0700 Received: from gunthorp by cgy1-donard.priv.deltatee.com with local (Exim 4.89) (envelope-from ) id 1gSmEx-0004VL-WF; Fri, 30 Nov 2018 10:06:08 -0700 From: Logan Gunthorpe To: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-ntb@googlegroups.com, linux-crypto@vger.kernel.org, linux-mm@kvack.org, Andrew Morton Cc: Arnd Bergmann , Greg Kroah-Hartman , Andy Shevchenko , =?utf-8?q?Horia_Geant=C4=83?= , Logan Gunthorpe , Jon Mason Date: Fri, 30 Nov 2018 10:06:06 -0700 Message-Id: <20181130170606.17252-7-logang@deltatee.com> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181130170606.17252-1-logang@deltatee.com> References: <20181130170606.17252-1-logang@deltatee.com> MIME-Version: 1.0 X-SA-Exim-Connect-IP: 172.16.1.31 X-SA-Exim-Rcpt-To: linux-ntb@googlegroups.com, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-crypto@vger.kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org, arnd@arndb.de, gregkh@linuxfoundation.org, andy.shevchenko@gmail.com, horia.geanta@nxp.com, logang@deltatee.com, jdmason@kudzu.us X-SA-Exim-Mail-From: gunthorp@deltatee.com Subject: [PATCH v24 6/6] ntb: ntb_hw_switchtec: Cleanup 64bit IO defines to use the common header X-SA-Exim-Version: 4.2.1 (built Tue, 02 Aug 2016 21:08:31 +0000) X-SA-Exim-Scanned: Yes (on ale.deltatee.com) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP Clean up the ifdefs which conditionally defined the io{read|write}64 functions in favour of the new common io-64-nonatomic-lo-hi header. Per a nit from Andy Shevchenko, the include list is also made alphabetical. Signed-off-by: Logan Gunthorpe Reviewed-by: Andy Shevchenko Cc: Jon Mason --- drivers/ntb/hw/mscc/ntb_hw_switchtec.c | 36 +++----------------------- 1 file changed, 4 insertions(+), 32 deletions(-) diff --git a/drivers/ntb/hw/mscc/ntb_hw_switchtec.c b/drivers/ntb/hw/mscc/ntb_hw_switchtec.c index 5ee5f40b4dfc..c0b97699169d 100644 --- a/drivers/ntb/hw/mscc/ntb_hw_switchtec.c +++ b/drivers/ntb/hw/mscc/ntb_hw_switchtec.c @@ -13,13 +13,14 @@ * */ -#include -#include +#include +#include #include #include -#include +#include #include #include +#include MODULE_DESCRIPTION("Microsemi Switchtec(tm) NTB Driver"); MODULE_VERSION("0.1"); @@ -36,35 +37,6 @@ module_param(use_lut_mws, bool, 0644); MODULE_PARM_DESC(use_lut_mws, "Enable the use of the LUT based memory windows"); -#ifndef ioread64 -#ifdef readq -#define ioread64 readq -#else -#define ioread64 _ioread64 -static inline u64 _ioread64(void __iomem *mmio) -{ - u64 low, high; - - low = ioread32(mmio); - high = ioread32(mmio + sizeof(u32)); - return low | (high << 32); -} -#endif -#endif - -#ifndef iowrite64 -#ifdef writeq -#define iowrite64 writeq -#else -#define iowrite64 _iowrite64 -static inline void _iowrite64(u64 val, void __iomem *mmio) -{ - iowrite32(val, mmio); - iowrite32(val >> 32, mmio + sizeof(u32)); -} -#endif -#endif - #define SWITCHTEC_NTB_MAGIC 0x45CC0001 #define MAX_MWS 128