From patchwork Wed Jan 16 18:25:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Logan Gunthorpe X-Patchwork-Id: 10766665 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 C6BBB1580 for ; Wed, 16 Jan 2019 18:25:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B6E2F2F3E1 for ; Wed, 16 Jan 2019 18:25:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A95012F3F0; Wed, 16 Jan 2019 18:25:37 +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 901322F3E1 for ; Wed, 16 Jan 2019 18:25:36 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 496158E0007; Wed, 16 Jan 2019 13:25:34 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 46C098E0004; Wed, 16 Jan 2019 13:25:34 -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 2E4B68E0007; Wed, 16 Jan 2019 13:25:34 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-it1-f200.google.com (mail-it1-f200.google.com [209.85.166.200]) by kanga.kvack.org (Postfix) with ESMTP id 05CF38E0002 for ; Wed, 16 Jan 2019 13:25:34 -0500 (EST) Received: by mail-it1-f200.google.com with SMTP id 136so2475651itt.6 for ; Wed, 16 Jan 2019 10:25:34 -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=8yF3qyP2usLqKl/a24+bzCiizo8aQgkvKqVG9jLd7ss=; b=ZF/Fb+NtHOltOB1igUTQkszsnxFcWyWUkYFDKvBAio2G8j2VlReyL3EMN1rIu90oZk kHBfP8isO16ZxDASB84uri/2Wa0vVgqxIPbpEB8ypfSoJpx+LQUznTZKenl2EKGKgMK0 DdOqNWihoLtxD9jLkWBzQ++6/H+OAAxJbZ5eVol6cuiCDaOJAI7M3N2q64ydEbcOQILg FwprybWWU03GC7mg7RbzcQMacRL5qA6ZPYS35HbSfKsYaWcUuBFJYU0TRae3LZtlIfqe kFMG/peBkcSg2d5AY6oODZEkDLZAzGCOYEdNjTRdevn6PbewWSMhw5toJV/b077u6Ptq bXJA== 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: AJcUukfKkkYvPnwsZW8UYFPxrLCRzxGqtH+DVqTOsGG49Ew57qrIJXwl 73GYv6oVAbXjbUCblDQ2Zow+rJfeVF3CTNReGdGVCZmf1/xzGoigEFmxcAcmvgCsH7NciEKaqUk u1HjlMXsijXdXYWl31lAoOAkp3NgZQNYjEZbf4DxkPDkvU+FRFdGWFniF08TVDyt+0A== X-Received: by 2002:a24:248:: with SMTP id 69mr6328748itu.91.1547663133778; Wed, 16 Jan 2019 10:25:33 -0800 (PST) X-Google-Smtp-Source: ALg8bN5pk27t8z7nDLvOBrjEClrKD1d40GOiMY6slCQZgFef7ZhDYFjNkF4gWorrmHPhPaFdNvpR X-Received: by 2002:a24:248:: with SMTP id 69mr6328718itu.91.1547663132874; Wed, 16 Jan 2019 10:25:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547663132; cv=none; d=google.com; s=arc-20160816; b=amg5OaiIAGJyIr96RCCWWjxseg99ejgsnzUK/846DQ3IxU62tLjwnkYwykz0ycRqvG LY+ckmHe2ctyMMIO9ilpb5UrDgEz0z99qM3aQuPM1nauFfkqz1HOr9VpRcUnBMMDu+2R mhf/X7CyY0VBGhpiHT4592YFnYbf5dqQCJiP7TXONx1eKGv3mFHgL2vcLzR+/tK2Ys/0 wyWo2Bn+y7hCORei3Dq9FI6b3Ki0/7dpCVJNgoOl1sNTBJiW44eDx07hqFQCAf3XgTqW TnF2BxnQzMsQrXkW1guRUTtbN5QmXf+iHbwscvt5MK2vJpL+S4KeI7bScPEJi6bvLacr zuVg== 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=8yF3qyP2usLqKl/a24+bzCiizo8aQgkvKqVG9jLd7ss=; b=OBjfGIUOEtodhAkaPLKsNu1BUN2GY936/hc/6yinnWGqryNNBmXQ+wnrvTg2mO/G2D 4cjZUNR52bFFQQzre0Q6rJh04SKL4UtuetjgVTZxuNFEI4tcQePkfQNnVUroaCzYcrJr LZcBB5SAAsh934NYwVkgX/NAMyhpPZ6vT/W5H08ITV42/5N0xww8jF16CS+oRurqg8PX sPL835FKioxRoiYx+TcyEigxlPEK5CeuJlBQBVjcIXX5LzBK5sHKCGsQ9h91sheFUbwq wvRBNrYEuC3TB/5Gi1Ud22knogO/KOIK3U2hmuiOrV7xZIXE+XpIuGqtvydlQkBQjlU9 ogIg== 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 i71si4359416itc.81.2019.01.16.10.25.32 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 16 Jan 2019 10:25:32 -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 1gjpsV-0003NG-Cn; Wed, 16 Jan 2019 11:25:31 -0700 Received: from gunthorp by cgy1-donard.priv.deltatee.com with local (Exim 4.89) (envelope-from ) id 1gjpsU-00054j-C6; Wed, 16 Jan 2019 11:25:26 -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: Wed, 16 Jan 2019 11:25:23 -0700 Message-Id: <20190116182523.19446-7-logang@deltatee.com> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20190116182523.19446-1-logang@deltatee.com> References: <20190116182523.19446-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 v25 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 f1eaa3c4d46a..f2df2d39c65b 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