From patchwork Tue Jun 9 23:15:00 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: 6575671 Return-Path: X-Original-To: patchwork-linux-scsi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D4FB19F3D1 for ; Tue, 9 Jun 2015 23:17:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B18FB2054D for ; Tue, 9 Jun 2015 23:17:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5809A20528 for ; Tue, 9 Jun 2015 23:17:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932640AbbFIXRR (ORCPT ); Tue, 9 Jun 2015 19:17:17 -0400 Received: from mail-qc0-f176.google.com ([209.85.216.176]:33693 "EHLO mail-qc0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932240AbbFIXRQ (ORCPT ); Tue, 9 Jun 2015 19:17:16 -0400 Received: by qcnj1 with SMTP id j1so11634523qcn.0; Tue, 09 Jun 2015 16:17:15 -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:mime-version:content-type :content-transfer-encoding; bh=Zkzz/sunOxNxxNPgDizjbGab9K/T9xx9ZYwUINMx3M0=; b=JKg+rryyKWLx8uMN3vQGEH7XcwA6+fcaIlFSXCque2ifOdkYBK+gWfPiJYyc5GuZSX F3Efqw1kkkHzIY17OKkqAQ8P9lbSj8u3NuyNt/zyn97T4PwqiHlQNL3krAk+R0i6Igsk q4h91FZPSvja1XN7+rBa7QY2m2XN+Edmzv0Z6Lczk3dvU/95CuMINRxjrQKzK43PK/XY Bz4EQ8lQdNU+u9vGmtATH3VKjIomPut23YeMkhluzYWGMF1bngTfIK4fYaas26vQFACq fLql4HH5jhyg1bcqtdG2VvrB1pYub9m+hytEp1r6haPZWcDcg628slPkk9Fu4V+xrbEp SA3w== X-Received: by 10.140.96.202 with SMTP id k68mr195023qge.102.1433891835462; Tue, 09 Jun 2015 16:17:15 -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 140sm3343038qhg.16.2015.06.09.16.17.11 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 09 Jun 2015 16:17:13 -0700 (PDT) Received: by mcgrof@gmail.com (sSMTP sendmail emulation); Tue, 09 Jun 2015 16:15:03 -0700 From: "Luis R. Rodriguez" To: JBottomley@odin.com Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, akpm@linux-foundation.org, hch@infradead.org, "Luis R. Rodriguez" , Toshi Kani , Sreekanth Reddy , Andy Lutomirski , Juergen Gross , Dave Airlie , Tomi Valkeinen , MPT-FusionLinux.pdl@avagotech.com Subject: [PATCH v4] fusion: remove dead MTRR code Date: Tue, 9 Jun 2015 16:15:00 -0700 Message-Id: <1433891700-19961-1-git-send-email-mcgrof@do-not-panic.com> X-Mailer: git-send-email 2.1.0 MIME-Version: 1.0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@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=ham 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 could should split up IO memory space properly and that is quite a bit of work. Just remove the uncommented dead MTRR code then. There are a few motivations for this: a) Take advantage of PAT when available b) Help bury MTRR code away, MTRR is architecture specific and on x86 its replaced by PAT c) Help with the goal of eventually using _PAGE_CACHE_UC over _PAGE_CACHE_UC_MINUS on x86 on ioremap_nocache() (see commit de33c442e titled "x86 PAT: fix performance drop for glx, use UC minus for ioremap(), ioremap_nocache() and pci_mmap_page_range()") Cc: Toshi Kani Cc: Christoph Hellwig Cc: Sreekanth Reddy Cc: Andy Lutomirski Cc: Juergen Gross Cc: Dave Airlie Cc: Tomi Valkeinen Cc: MPT-FusionLinux.pdl@avagotech.com Cc: linux-scsi@vger.kernel.org Cc: linux-kernel@vger.kernel.org Acked-by: Sreekanth Reddy Signed-off-by: Luis R. Rodriguez --- James, The last patches for fusion went up through Christoph. I checked with him and he notes this should go through you. This v4 has only the commit log changed to annotate the Acked-by the driver maintainer. Please let me know if there are any issue with this, or if you are busy it seems like Andrew Morton might be willing to take this up through his tree. Let me know what you prefer. This is part of a long series of patches in which we are doing transformation over from MTRR specific code to the more PAT friendly aware code. This driver specific change is really trivial as all it does is remove commented out code which we woiuld otherwise have to replace and port. The driver maintainer is OK with this removal. drivers/message/fusion/mptbase.c | 24 ------------------------ drivers/message/fusion/mptbase.h | 1 - 2 files changed, 25 deletions(-) diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c index 187f836..5dcc031 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,13 +2816,6 @@ 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)); - } -#endif - /* Zap the adapter lookup ptr! */ list_del(&ioc->list); @@ -4512,19 +4501,6 @@ PrimeIocFifos(MPT_ADAPTER *ioc) ioc->req_frames_low_dma = (u32) (alloc_dma & 0xFFFFFFFF); -#if defined(CONFIG_MTRR) && 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)); -#endif - for (i = 0; i < ioc->req_depth; i++) { alloc_dma += ioc->req_sz; mem += ioc->req_sz; diff --git a/drivers/message/fusion/mptbase.h b/drivers/message/fusion/mptbase.h index 8f14090..813d463 100644 --- a/drivers/message/fusion/mptbase.h +++ b/drivers/message/fusion/mptbase.h @@ -671,7 +671,6 @@ typedef struct _MPT_ADAPTER u8 *HostPageBuffer; /* SAS - host page buffer support */ u32 HostPageBuffer_sz; dma_addr_t HostPageBuffer_dma; - int mtrr_reg; struct pci_dev *pcidev; /* struct pci_dev pointer */ int bars; /* bitmask of BAR's that must be configured */ int msi_enable;