From patchwork Wed Jan 16 18:25:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Logan Gunthorpe X-Patchwork-Id: 10766663 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 8CAB11580 for ; Wed, 16 Jan 2019 18:25:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7FFB82F3F5 for ; Wed, 16 Jan 2019 18:25:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 737902F3F0; Wed, 16 Jan 2019 18:25:34 +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=unavailable 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 4F4912F3E8 for ; Wed, 16 Jan 2019 18:25:33 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3F7D28E0003; Wed, 16 Jan 2019 13:25:32 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 3A5E28E0002; Wed, 16 Jan 2019 13:25:32 -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 294C38E0003; Wed, 16 Jan 2019 13:25:32 -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 F40BE8E0002 for ; Wed, 16 Jan 2019 13:25:31 -0500 (EST) Received: by mail-io1-f70.google.com with SMTP id q207so5303592iod.18 for ; Wed, 16 Jan 2019 10:25:31 -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=SdqQCyo/3b5sF4K7Vmst/Hr2uAmNHk0FnK7+2EjSr4w=; b=pwR0iWje+w2rbx3OQGRZDChEOa/A5DWjG1zB0fay6WSDNYESUpepEH/O+0diBrGutM q7vMn6pVYcJX4qOw8XnK8U6loLWaS0A0o5NbKkiDZLfvCx8SrOr2XxQKsJKT6mvedrtG WUY+j7PsyCdfDKXM/33/WdhsNXFtoa2qRiiOn2gk2j6UT13rmDuKlQwwmUN2VgW8j1aj 7TLuzvwdkAlmYlL4Uhz6RwsudcOcMwkCD9fpee07uDJ1FOCzchbbI/KdNNh3giR2Z8fB 1TBM2JkYt64FMGSKfgGLBfOirt++XN2WXn0Fo/rD6eRva9/BVXwUvTFmHjjmCuRL8Kih pkhw== 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: AJcUukd5SDy+vy1+EnlSiYJaf6GF1QXPvAW7UJr0/m7cKHWPDz+RXnMR NTbzbaaM5eG7hUQq1z+CdXLpvy81jjgXNItSeomeNGWOd/FzdT51iR9u7Gt0ml6cHTymhSC3es/ Il0UoZEP78So8wHlcUzPEXN6P7d+wMV16W2bCdpQTZgC57X7EectTfcEzpA82dH0c/w== X-Received: by 2002:a6b:c8c9:: with SMTP id y192mr5322520iof.183.1547663131775; Wed, 16 Jan 2019 10:25:31 -0800 (PST) X-Google-Smtp-Source: ALg8bN6gH0dXrlR+EeU656Bo+8wa4w8spd1kmtFtH9hV2sMMbR3/EEu/NCrb7Ns8/i/0pJXDlgb4 X-Received: by 2002:a6b:c8c9:: with SMTP id y192mr5322496iof.183.1547663131023; Wed, 16 Jan 2019 10:25:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547663131; cv=none; d=google.com; s=arc-20160816; b=lzD7wHNXqgyG+++bGVfaVH5Gy6ItIgtQtwJLCEWC2WT6Mi5jQqykOXrBmUKhKT52Gq /N5BExcRKI7J38VUqGiSJsCfuS9gcyRjgVnWTcpxxvwecYDMH9q0jIgVw2IraDMGfCQH aO4gHDABpgOr4TPcWIikW7Om9/Fulq8DbEijlgYllTRwDq2slgYggHuZMwHFIYOxmBmB yqgUqpElZhwwBN0/gzJiNyycQuzf0XXEUQM+MzEFllw3rUyStpaXYn8GYuntobjPmcAo O2TZZ9Z9q95uvaIN6t9eRqa31FT3a0O/783QcJxDPN8Zo53CZR9qf8QP9a9A7sQYg6qD dFCg== 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=SdqQCyo/3b5sF4K7Vmst/Hr2uAmNHk0FnK7+2EjSr4w=; b=whmmyZATalXL8OMITHo01qgLb3csz0kAH2SZmAIp68aopxE9v1NGRLL3s5qXq5sDav 9RkJMho+2007L+DG9HJSTa/eaKHWquyygFCuA3eWKoesWvtEJ5ORrWnwsVDMk+9Wb77M S3exYg/aF/tgGixUWGc+WxfVi+eOYxX3zNUeLXKalWjOhp0qDrSwqRBQIsX9lDdOT8/s c7EOcROSwPZN5O6JdtA2OysQKPP7GxV2l3pVF9d3zTVhzBsHcXXDeQzZnalkCkTki8Bt LbwdzQhT4bRGajfeFY7XSiXSOtULpgfJpY5+N1A3561KeIuqRw2YE0sie+jXX5e/xg3i k60Q== 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 p24si217196iol.125.2019.01.16.10.25.30 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 16 Jan 2019 10:25:30 -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-0003NF-5D; Wed, 16 Jan 2019 11:25:28 -0700 Received: from gunthorp by cgy1-donard.priv.deltatee.com with local (Exim 4.89) (envelope-from ) id 1gjpsU-00054g-9Q; 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 Date: Wed, 16 Jan 2019 11:25:22 -0700 Message-Id: <20190116182523.19446-6-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 X-SA-Exim-Mail-From: gunthorp@deltatee.com Subject: [PATCH v25 5/6] 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) 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 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.h | 30 +---------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/drivers/ntb/hw/intel/ntb_hw_intel.h b/drivers/ntb/hw/intel/ntb_hw_intel.h index c49ff8970ce3..e071e28bca3f 100644 --- a/drivers/ntb/hw/intel/ntb_hw_intel.h +++ b/drivers/ntb/hw/intel/ntb_hw_intel.h @@ -53,6 +53,7 @@ #include #include +#include /* PCI device IDs */ #define PCI_DEVICE_ID_INTEL_NTB_B2B_JSF 0x3725 @@ -218,33 +219,4 @@ static inline int pdev_is_gen3(struct pci_dev *pdev) return 0; } -#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 - #endif