From patchwork Tue Apr 21 20:46:06 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Luis R. Rodriguez" X-Patchwork-Id: 6253801 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 798EA9F1BE for ; Tue, 21 Apr 2015 20:46:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 097BC20222 for ; Tue, 21 Apr 2015 20:46:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F07702034E for ; Tue, 21 Apr 2015 20:46:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756257AbbDUUqQ (ORCPT ); Tue, 21 Apr 2015 16:46:16 -0400 Received: from mail-pa0-f41.google.com ([209.85.220.41]:32952 "EHLO mail-pa0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752475AbbDUUqO (ORCPT ); Tue, 21 Apr 2015 16:46:14 -0400 Received: by paboj16 with SMTP id oj16so251794705pab.0; Tue, 21 Apr 2015 13:46:14 -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=E6pm8C9nPfM0mdOFXGEePtGgLVn5vZa4A1Ui6uCtVYE=; b=OdRiEfY4DaHPTFZy8mr9ALlc1TJVX6vbBUxtIaL1XRBN5Bi7gO1460Nlq1rEX4BSTh 4pRDm66/rl4pTOEosGv+sJMcSzKJ2QgYsu0Q42DRhtdcnLn18c9gNCI9Bz+18LdAVuKU kxrY12Zml8bLODMujUwD0Ask54PTLA74fe/HFSNhFWTNYio+MtFarNyJhypQN2aT2m3S H9ubCj5y0MlVcY90mY+ETMkVYqEfbe662WO47G/uBim7LTWikbcnzTQlqEF9fgEM0HeK jWoL1J5Jltpx6pm2lzkjY4PiBbDnmqd0agNO3/wUl31rDa2aMfPevT6m212QlS1WoHSJ 17tQ== X-Received: by 10.68.190.9 with SMTP id gm9mr38968479pbc.110.1429649174161; Tue, 21 Apr 2015 13:46:14 -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 z5sm2863023pbt.54.2015.04.21.13.46.11 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 21 Apr 2015 13:46:13 -0700 (PDT) Received: by mcgrof@gmail.com (sSMTP sendmail emulation); Tue, 21 Apr 2015 13:46:10 -0700 From: "Luis R. Rodriguez" To: nagalakshmi.nandigama@avagotech.com, praveen.krishnamoorthy@avagotech.com, sreekanth.reddy@avagotech.com, abhijit.mahajan@avagotech.com, MPT-FusionLinux.pdl@avagotech.com, linux-scsi@vger.kernel.org Cc: luto@amacapital.net, mst@redhat.com, "Luis R. Rodriguez" , Toshi Kani , Christoph Hellwig , Suresh Siddha , Ingo Molnar , Thomas Gleixner , Juergen Gross , Daniel Vetter , Dave Airlie , Antonino Daplas , Tomi Valkeinen , =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= , Mel Gorman , Vlastimil Babka , Borislav Petkov , Davidlohr Bueso , Jean-Christophe Plagniol-Villard , linux-kernel@vger.kernel.org Subject: [PATCH v3] fusion: remove dead MTRR code Date: Tue, 21 Apr 2015 13:46:06 -0700 Message-Id: <1429649166-18294-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=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 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: Nagalakshmi Nandigama Cc: Praveen Krishnamoorthy Cc: Sreekanth Reddy Cc: Abhijit Mahajan Cc: linux-scsi@vger.kernel.org Cc: Andy Lutomirski Cc: Suresh Siddha Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Juergen Gross Cc: Daniel Vetter Cc: Juergen Gross Cc: Dave Airlie Cc: Antonino Daplas Cc: Tomi Valkeinen Cc: Ville Syrjälä Cc: Mel Gorman Cc: Vlastimil Babka Cc: Borislav Petkov Cc: Davidlohr Bueso 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 | 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;