Received: by 10.213.65.68 with SMTP id h4csp871037imn; Thu, 22 Mar 2018 10:21:35 -0700 (PDT) X-Google-Smtp-Source: AG47ELsSQA2Me+VrppjcKODF3UPONMPlr0ckJD+z0pbYgN6lMW+OIOq5uhVaGzlGDKaJpS+lnuVe X-Received: by 2002:a17:902:2a43:: with SMTP id i61-v6mr26028116plb.54.1521739295374; Thu, 22 Mar 2018 10:21:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521739295; cv=none; d=google.com; s=arc-20160816; b=xvySZOCmaOsQ9mDxhGACLPETJrPzxGlylFIxzdIz069L03eM42CfXCFvORWt9ZEhcE 1hV7ONE7KLNYIZ0LhT2skqy0rYc3NjNVv6NRCdhw0qQ5kZQozKzV+bsiLIBlE+LclxZC Yq2P1IdpngWmaSNT0zgm6oZjxaqtAiQResKJ1+sbNdgGqyMzB2yqiWti1Pw4i3vZSBbV T6wo9eI3f51W2Kx4wn4dyOfP7vENkwznU69ANXjU2+2BYqToeO8SZt35hhQt8MhR/HOK Q+UGpOkGLIBQX/OPBAWWchKpvvpUA+lyYpz2Xnks4yVFEgduAcnqfb92ZOHPk/+hG1C0 LL5w== 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=gn2TNU29LRtc0GzDDwMBkJfKqMaNBYtZtNhwdzdvFDgwM6Twb9rZ/gnD+pmTABC+Wz QRit7rZkEWrvxv+d5OROZToUrVces0TVN6L1MsDRlEdF+q971PcnsT8cJ/NW2gPH1uM7 YY9fH/fa1UUSYCVZpJgQ3vsfABPBPMdKcuLE7UIiIOsPOY0tWyS4TTnEGwKIWbxPMr03 IRtmWzQU+mwPy2VQy0zU2FfKQRPrQEav70GBcT6a3IC8g6R4RcLeF0ZIR62BrCeUCJfr Gs/zjNciiwmaME1yIDraeTA8zigSzRwBwgFJEW5cmb8LcOVuetLc96m6tSzsS7owch6g lRPA== 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 f1-v6si187895pld.168.2018.03.22.10.21.20; Thu, 22 Mar 2018 10:21:35 -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 S1752455AbeCVRTy (ORCPT + 99 others); Thu, 22 Mar 2018 13:19:54 -0400 Received: from ale.deltatee.com ([207.54.116.67]:35146 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751907AbeCVRRM (ORCPT ); Thu, 22 Mar 2018 13:17:12 -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 1ez3pr-00073M-L3; Thu, 22 Mar 2018 11:17:09 -0600 Received: from gunthorp by cgy1-donard.priv.deltatee.com with local (Exim 4.89) (envelope-from ) id 1ez3pr-00018a-7V; Thu, 22 Mar 2018 11:17:07 -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: Thu, 22 Mar 2018 11:17:01 -0600 Message-Id: <20180322171703.4300-9-logang@deltatee.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180322171703.4300-1-logang@deltatee.com> References: <20180322171703.4300-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=-8.7 required=5.0 tests=ALL_TRUSTED,BAYES_00, GREYLIST_ISWHITE,MYRULES_NO_TEXT,T_RP_MATCHES_RCVD autolearn=ham autolearn_force=no version=3.4.1 Subject: [PATCH v14 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