From patchwork Fri Mar 20 23:18:06 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Luis R. Rodriguez" X-Patchwork-Id: 6061911 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 30581BF90F for ; Fri, 20 Mar 2015 23:56:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2C8AC2024D for ; Fri, 20 Mar 2015 23:56:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D768C20522 for ; Fri, 20 Mar 2015 23:56:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751107AbbCTX4M (ORCPT ); Fri, 20 Mar 2015 19:56:12 -0400 Received: from mail-pa0-f49.google.com ([209.85.220.49]:34712 "EHLO mail-pa0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751037AbbCTX4K (ORCPT ); Fri, 20 Mar 2015 19:56:10 -0400 Received: by pacwe9 with SMTP id we9so123533291pac.1; Fri, 20 Mar 2015 16:56:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=wuKdJQBiY4gp5FnqOtjf05AW4cxIXbTIrvdVXJJ/bHg=; b=DptVlw78XQd98pD7yq6RYVEEVOPqYcPa/RFGvxUkZxKfrEcEBfqtUsn1UZwSPYnGY1 D+GpzWy8J74IRlxGaVsakBSwCMXPXWrc9oYvPQTpLbM0Qcs9rvTuyCWEkPgbxElqMSHQ UZSQpcDRsmtNc9wxFbzA6cuPpFpIjPHM8YK5luJ5DMk+ohULKheFhRSs7QSROXTY4Syf RJtcudFVi+TuQ0ZaO8AwHEqh2suA466Mw6kH+WeUUWyW1wVKrR66sT+er24CecDqGmei z6VHy8A9tY1ZTQzf9/yTU9Xi8Z9U/9vNi4vs5lpIvcuaAZ/sj21KP6EumR4dpxslR17e BIyQ== X-Received: by 10.70.38.195 with SMTP id i3mr191710052pdk.76.1426895770023; Fri, 20 Mar 2015 16:56:10 -0700 (PDT) Received: from mcgrof@gmail.com (c-98-234-145-61.hsd1.ca.comcast.net. [98.234.145.61]) by mx.google.com with ESMTPSA id np6sm9766387pdb.80.2015.03.20.16.56.06 (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 20 Mar 2015 16:56:08 -0700 (PDT) Received: by mcgrof@gmail.com (sSMTP sendmail emulation); Fri, 20 Mar 2015 16:53:58 -0700 From: "Luis R. Rodriguez" To: luto@amacapital.net, mingo@redhat.com, tglx@linutronix.de, hpa@zytor.com, jgross@suse.com, JBeulich@suse.com, bp@suse.de, suresh.b.siddha@intel.com, venkatesh.pallipadi@intel.com, airlied@redhat.com Cc: linux-kernel@vger.kernel.org, linux-fbdev@vger.kernel.org, x86@kernel.org, xen-devel@lists.xenproject.org, "Luis R. Rodriguez" , Ingo Molnar , Daniel Vetter , Nagalakshmi Nandigama , Praveen Krishnamoorthy , Sreekanth Reddy , Abhijit Mahajan , Antonino Daplas , Tomi Valkeinen , Jean-Christophe Plagniol-Villard , MPT-FusionLinux.pdl@avagotech.com, linux-scsi@vger.kernel.org Subject: [PATCH v1 16/47] fusion: use __arch_phys_wc_add() Date: Fri, 20 Mar 2015 16:18:06 -0700 Message-Id: <1426893517-2511-17-git-send-email-mcgrof@do-not-panic.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1426893517-2511-1-git-send-email-mcgrof@do-not-panic.com> References: <1426893517-2511-1-git-send-email-mcgrof@do-not-panic.com> Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID,T_RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: "Luis R. Rodriguez" If and when this gets enabled the driver should address using ioremap_wc() on the same area, that could require a bit of work as it would mean a split with two ioremap'd areas. Annotate this. Cc: Andy Lutomirski Cc: Suresh Siddha Cc: Venkatesh Pallipadi Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Juergen Gross Cc: Daniel Vetter Cc: Nagalakshmi Nandigama Cc: Praveen Krishnamoorthy Cc: Sreekanth Reddy Cc: Abhijit Mahajan Cc: Juergen Gross Cc: Dave Airlie Cc: Antonino Daplas Cc: Tomi Valkeinen Cc: Jean-Christophe Plagniol-Villard Cc: MPT-FusionLinux.pdl@avagotech.com Cc: linux-scsi@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Luis R. Rodriguez --- drivers/message/fusion/mptbase.c | 19 ++++--------------- drivers/message/fusion/mptbase.h | 2 +- 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c index 187f836..c7b1a55 100644 --- a/drivers/message/fusion/mptbase.c +++ b/drivers/message/fusion/mptbase.c @@ -59,10 +59,6 @@ #include #include /* needed for in_interrupt() proto */ #include -#include -#ifdef CONFIG_MTRR -#include -#endif #include #include @@ -2820,11 +2816,8 @@ mpt_adapter_dispose(MPT_ADAPTER *ioc) pci_disable_device(ioc->pcidev); pci_release_selected_regions(ioc->pcidev, ioc->bars); -#if defined(CONFIG_MTRR) && 0 - if (ioc->mtrr_reg > 0) { - mtrr_del(ioc->mtrr_reg, 0, 0); - dprintk(ioc, printk(MYIOC_s_INFO_FMT "MTRR region de-registered\n", ioc->name)); - } +#if 0 + __arch_phys_wc_del(ioc->wc_cookie); #endif /* Zap the adapter lookup ptr! */ @@ -4512,17 +4505,13 @@ PrimeIocFifos(MPT_ADAPTER *ioc) ioc->req_frames_low_dma = (u32) (alloc_dma & 0xFFFFFFFF); -#if defined(CONFIG_MTRR) && 0 +#if 0 /* * Enable Write Combining MTRR for IOC's memory region. * (at least as much as we can; "size and base must be * multiples of 4 kiB" */ - ioc->mtrr_reg = mtrr_add(ioc->req_frames_dma, - sz, - MTRR_TYPE_WRCOMB, 1); - dprintk(ioc, printk(MYIOC_s_DEBUG_FMT "MTRR region registered (base:size=%08x:%x)\n", - ioc->name, ioc->req_frames_dma, sz)); + ioc->wc_cookie = arch_phys_wc_add(ioc->req_frames_dma, sz); #endif for (i = 0; i < ioc->req_depth; i++) { diff --git a/drivers/message/fusion/mptbase.h b/drivers/message/fusion/mptbase.h index 8f14090..f0bff11 100644 --- a/drivers/message/fusion/mptbase.h +++ b/drivers/message/fusion/mptbase.h @@ -671,7 +671,7 @@ typedef struct _MPT_ADAPTER u8 *HostPageBuffer; /* SAS - host page buffer support */ u32 HostPageBuffer_sz; dma_addr_t HostPageBuffer_dma; - int mtrr_reg; + int wc_cookie; struct pci_dev *pcidev; /* struct pci_dev pointer */ int bars; /* bitmask of BAR's that must be configured */ int msi_enable;