From patchwork Fri Nov 30 17:06:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Logan Gunthorpe X-Patchwork-Id: 10706839 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 6057C13A4 for ; Fri, 30 Nov 2018 17:06:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 45441304EC for ; Fri, 30 Nov 2018 17:06:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3937A304ED; Fri, 30 Nov 2018 17:06:16 +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 9B1DA304EE for ; Fri, 30 Nov 2018 17:06:15 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 91D0C6B5942; Fri, 30 Nov 2018 12:06:14 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 8CAD96B5943; Fri, 30 Nov 2018 12:06:14 -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 7BB296B5944; Fri, 30 Nov 2018 12:06:14 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-it1-f199.google.com (mail-it1-f199.google.com [209.85.166.199]) by kanga.kvack.org (Postfix) with ESMTP id 51BD26B5942 for ; Fri, 30 Nov 2018 12:06:14 -0500 (EST) Received: by mail-it1-f199.google.com with SMTP id p66so7498450itc.0 for ; Fri, 30 Nov 2018 09:06:14 -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=SLAL1Kfu0n1HJZj77+XQGb8HrXVOut16xmnO1NozmzeuPQ143lu1neXy9eTEayJzig B+4BD48j6vHwZgHCYjHTBHsZfEASBDNC1ALK9yCPYzoWHk0TzgX/LXjPn+KrDUZS0dvH cYRY9AzZ2a346bl/PS0/EVsEy/JRPZr/Njy1dIL9pKFmjqQxUceNDGEafujRkjS0XRtY 0b1AUSDrSZB8pSjpfZap8283YrrhGGxcc1+nmS8DRocA922Hy6T571bLdZhUJ1F0dVg4 vomK4pZsUZ3U9C9vDJ/xW17RUokETXVBECQ8FfNuH7sxPD1bkJgtsvYyXE2xD8Vl9EAb 9swA== 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+aEWYfof0vxTqofIBPjAedObFd9XdI0Grq9E42OYV+RudkBnEUI15i mNhShtuvdyQwVO9b3X9NDX64ozwFyMaq8UaL7A27INK3emlzYHOaye4L6VrZ90r8qGfOyaroPfM 4AwA3aMwfYQ3g68QDovhCXf5HfU8yqrRJTDlRjiLlMVFUV+C/kCvXu9BK1ym9OeFsNg== X-Received: by 2002:a24:c187:: with SMTP id e129mr6576204itg.68.1543597574090; Fri, 30 Nov 2018 09:06:14 -0800 (PST) X-Google-Smtp-Source: AFSGD/XienR++H7w7TSgowOgfy6zaz2C87ui2tQUrhB4BQL1NGhljGj2w/jALGaa+yyt1Uu3mcPc X-Received: by 2002:a24:c187:: with SMTP id e129mr6576144itg.68.1543597573152; Fri, 30 Nov 2018 09:06:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543597573; cv=none; d=google.com; s=arc-20160816; b=jTR4cQLwoI21lxOkbpPACvofXzci7fhkxSPJGRPbt9adXleJEbpYHMxZNlpzJKi8Zd 8zw7wh4IU7I53j9CGpmWKoQB0WyVRPlpsayNLS7gLnb98v6qs9OLUQsSprswIjbjy4UE kdq5d7FXifxlk/g7AQ4sIgxINDSc77B/kiAhsSkOYJyZ3V/yh7na94unSTBLC4nm/Z8G tOceSpjq9/chP9UDUaiSBXzV1Kqc65QmZx6qfrhUs6pGNM4x4zHHLs/wY0l5+CMDg901 LqMzDEUkYSimsBOPRvZfs9gK2cB+SuN3/3OpKTgmNB1nqM1U9tq2eR/73rAEpb7D1Vho G7bA== 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=JGaM58QIfJ7buat1Kl9kR1E6N26uByMZrMEgvD/bMpRKRNQwA7o06N1ayozMCSpM+t ewk76oaUJHnIhqExQB4uKMbrklM1E+6mU/87PDZrdy6w2Un5yBxo479Xpos6SVDoZsqt xt3vSXDPfH+GL3e+GoPXRQ49LSNTIFstDp8cUI7NSlFSwYQvVWtzMR7A/KkygA4u4aKV o0kVP92wp1n+SDW71aNZr4110e02z5fS4XZBUs0OCZi0oEHPCyT3O3BNxb2MIJDPGQmc gDLMAQ9j+7yVAq0Ir9YTZsu3gyn72T0gUOCMGDjA4J8pTconjem5DM5np3Ssf2Dpy7iu ol8g== 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 z83si3601667itc.56.2018.11.30.09.06.12 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 30 Nov 2018 09:06:13 -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-0000qq-3E; Fri, 30 Nov 2018 10:06:10 -0700 Received: from gunthorp by cgy1-donard.priv.deltatee.com with local (Exim 4.89) (envelope-from ) id 1gSmEx-0004VI-So; Fri, 30 Nov 2018 10:06:07 -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: Fri, 30 Nov 2018 10:06:05 -0700 Message-Id: <20181130170606.17252-6-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 X-SA-Exim-Mail-From: gunthorp@deltatee.com Subject: [PATCH v24 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