Received: by 10.213.65.68 with SMTP id h4csp1398733imn; Wed, 21 Mar 2018 09:42:55 -0700 (PDT) X-Google-Smtp-Source: AG47ELuQm0MJyOSeY2QPEMAIxbo6Z4UbnbyVOjdr9ptBRYuFSxcLSmYstFqKCnxXDQ7Oq8s3hQB4 X-Received: by 2002:a17:902:7d93:: with SMTP id a19-v6mr17884944plm.160.1521650575106; Wed, 21 Mar 2018 09:42:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521650575; cv=none; d=google.com; s=arc-20160816; b=f/y6iagxnVOSFGCXu9i87hXa5or/Wkyyd931945ervmxeW5+kDC/2oeNAoC7yxmfDl oj/GclVaHzR6nPEj0OEe26PdkGGWR+fr4Fp6FWLmFJzGCWCGEkYnUeTmRBIUoTq3keXQ lqZuowT0L2lzsB8gOydOhNWFI2XJ3CuN7lRLD19P7AuZimYLTZlOldT4+SOH5IUIodg5 YCW4F6WRoeqxavODPz+u3QJWXgdilygxG+0OVeLYfYrg0L8TNDjB9a0CjMNenQZ5w6zn lnrk1uG5IZzIazDvtjG13UDHYREUdmMGlmx6NzAY2BARcxrWQOVAie41g5PL7GJealQj tWew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:references:in-reply-to:message-id :date:cc:to:from:arc-authentication-results; bh=5r7BVSMWLPf1poCuDJ+n+Y1NCPOdkr/DoAWOECkhpH0=; b=xgMep6d8NDKyD2538IohAKKHdC1ArTd5Vbdl91ShmnNZx6zYxV/6k9azVyYJ3L6/z9 7UbKpsYzI7bMxYUMUkKjQDC0U+KbTJ3IjtUsZkYKgNFJJGt8/PSGOLoQFHM4kiKFNIM1 tS+abozALizJ5fo0ZhVpeIRNPyAkYy+SRlxPJa9/ER3txP4LKM9YzdP2JJ4COKXp1DPa pgokOQo3Bsh8DDyyvKa2pctjprnoY5R9Eb5Q4TO9S72+TEKSlnbpIukuRu/T1+6zrcd6 g7va+tywbUw5g2JCaxZ/DWwdvWADbhmqxNqtQeQ8tyCOxzueQ/yDr9ws3zw6VzEg9W+V x1UA== 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 f14-v6si4075084plr.76.2018.03.21.09.42.40; Wed, 21 Mar 2018 09:42:55 -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 S1753130AbeCUQio (ORCPT + 99 others); Wed, 21 Mar 2018 12:38:44 -0400 Received: from ale.deltatee.com ([207.54.116.67]:56604 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752874AbeCUQh4 (ORCPT ); Wed, 21 Mar 2018 12:37:56 -0400 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 1eygkM-0007W5-TT; Wed, 21 Mar 2018 10:37:55 -0600 Received: from gunthorp by cgy1-donard.priv.deltatee.com with local (Exim 4.89) (envelope-from ) id 1eygkH-0003DO-4o; Wed, 21 Mar 2018 10:37:49 -0600 From: Logan Gunthorpe To: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-ntb@googlegroups.com, linux-crypto@vger.kernel.org, Greg Kroah-Hartman Cc: Arnd Bergmann , Andy Shevchenko , =?UTF-8?q?Horia=20Geant=C4=83?= , Logan Gunthorpe Date: Wed, 21 Mar 2018 10:37:43 -0600 Message-Id: <20180321163745.12286-9-logang@deltatee.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180321163745.12286-1-logang@deltatee.com> References: <20180321163745.12286-1-logang@deltatee.com> 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, gregkh@linuxfoundation.org, arnd@arndb.de, andy.shevchenko@gmail.com, horia.geanta@nxp.com, logang@deltatee.com X-SA-Exim-Mail-From: gunthorp@deltatee.com X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on ale.deltatee.com X-Spam-Level: X-Spam-Status: No, score=-6.7 required=5.0 tests=ALL_TRUSTED,BAYES_00, MYRULES_NO_TEXT,T_RP_MATCHES_RCVD autolearn=no autolearn_force=no version=3.4.1 Subject: [PATCH v13 08/10] ntb: ntb_hw_intel: use io-64-nonatomic instead of in-driver hacks 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) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Now that ioread64 and iowrite64 are available in io-64-nonatomic, we can remove the hack at the top of ntb_hw_intel.c and replace it with an include. Signed-off-by: Logan Gunthorpe Reviewed-by: Andy Shevchenko Acked-by: Dave Jiang Acked-by: Allen Hubbe Acked-by: Jon Mason --- drivers/ntb/hw/intel/ntb_hw_intel.c | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/drivers/ntb/hw/intel/ntb_hw_intel.c b/drivers/ntb/hw/intel/ntb_hw_intel.c index 156b45cd4a19..5cf40ab21366 100644 --- a/drivers/ntb/hw/intel/ntb_hw_intel.c +++ b/drivers/ntb/hw/intel/ntb_hw_intel.c @@ -59,6 +59,7 @@ #include #include #include +#include #include "ntb_hw_intel.h" @@ -149,35 +150,6 @@ MODULE_PARM_DESC(xeon_b2b_dsd_bar5_addr32, static inline enum ntb_topo xeon_ppd_topo(struct intel_ntb_dev *ndev, u8 ppd); static int xeon_init_isr(struct intel_ntb_dev *ndev); -#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 - static inline int pdev_is_xeon(struct pci_dev *pdev) { switch (pdev->device) { -- 2.11.0