From patchwork Tue Sep 22 08:34:17 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tejun Heo X-Patchwork-Id: 49210 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n8M8Ywxo027562 for ; Tue, 22 Sep 2009 08:34:58 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754611AbZIVIex (ORCPT ); Tue, 22 Sep 2009 04:34:53 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754385AbZIVIex (ORCPT ); Tue, 22 Sep 2009 04:34:53 -0400 Received: from hera.kernel.org ([140.211.167.34]:49449 "EHLO hera.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754073AbZIVIew (ORCPT ); Tue, 22 Sep 2009 04:34:52 -0400 Received: from htj.dyndns.org (IDENT:U2FsdGVkX18WlwPreBNZG41uwVe1NP2MTLTbvcKyrRk@localhost [127.0.0.1]) by hera.kernel.org (8.14.2/8.14.2) with ESMTP id n8M8YIZ1018643 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Tue, 22 Sep 2009 08:34:19 GMT Received: from [127.0.0.2] (htj.dyndns.org [127.0.0.2]) by htj.dyndns.org (Postfix) with ESMTPSA id F091F434E8D65; Tue, 22 Sep 2009 17:34:17 +0900 (KST) Message-ID: <4AB88C09.9020805@kernel.org> Date: Tue, 22 Sep 2009 17:34:17 +0900 From: Tejun Heo User-Agent: Thunderbird 2.0.0.22 (X11/20090605) MIME-Version: 1.0 To: Jesse Barnes CC: Greg KH , Robert Hancock , Alan Cox , linux-pci@vger.kernel.org, Linux Kernel , Daniel Ritz , Dominik Brodowski , Kenji Kaneshige , Axel Birndt , Benjamin Herrenschmidt , Ingo Molnar , Thomas Gleixner , Tony Luck , David Miller Subject: [PATCH 2/3 pci#linux-next] pci,sparc64: drop PCI_CACHE_LINE_BYTES References: <4A4EE3E9.7090205@kernel.org> <20090917103131.55eca691@jbarnes-g45> In-Reply-To: <20090917103131.55eca691@jbarnes-g45> X-Enigmail-Version: 0.95.7 X-Virus-Scanned: ClamAV 0.93.3/9821/Mon Sep 21 23:48:15 2009 on hera.kernel.org X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00, UNPARSEABLE_RELAY autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on hera.kernel.org X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.0 (hera.kernel.org [127.0.0.1]); Tue, 22 Sep 2009 08:34:20 +0000 (UTC) Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org sparc64 is now the only user of PCI_CACHE_LINE_BYTES. Drop it and set pci_dfl_cache_line_size from pcibios_init() instead and drop PCI_CACHE_LINE_BYTES handling from generic pci code. Orignally-From: David Miller Signed-off-by: Tejun Heo --- arch/sparc/include/asm/pci_64.h | 2 -- arch/sparc/kernel/pci.c | 7 +++++++ drivers/pci/pci.c | 6 +----- 3 files changed, 8 insertions(+), 7 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: work/arch/sparc/kernel/pci.c =================================================================== --- work.orig/arch/sparc/kernel/pci.c +++ work/arch/sparc/kernel/pci.c @@ -1081,3 +1081,10 @@ void pci_resource_to_user(const struct p *start = rp->start - offset; *end = rp->end - offset; } + +static int __init pcibios_init(void) +{ + pci_dfl_cache_line_size = 64 >> 2; + return 0; +} +subsys_initcall(pcibios_init); Index: work/arch/sparc/include/asm/pci_64.h =================================================================== --- work.orig/arch/sparc/include/asm/pci_64.h +++ work/arch/sparc/include/asm/pci_64.h @@ -16,8 +16,6 @@ #define PCI_IRQ_NONE 0xffffffff -#define PCI_CACHE_LINE_BYTES 64 - static inline void pcibios_set_master(struct pci_dev *dev) { /* No special bus mastering setup handling */ Index: work/drivers/pci/pci.c =================================================================== --- work.orig/drivers/pci/pci.c +++ work/drivers/pci/pci.c @@ -47,17 +47,13 @@ unsigned long pci_cardbus_mem_size = DEF unsigned long pci_hotplug_io_size = DEFAULT_HOTPLUG_IO_SIZE; unsigned long pci_hotplug_mem_size = DEFAULT_HOTPLUG_MEM_SIZE; -#ifndef PCI_CACHE_LINE_BYTES -#define PCI_CACHE_LINE_BYTES L1_CACHE_BYTES -#endif - /* * The default CLS is used if arch didn't set CLS explicitly and not * all pci devices agree on the same value. Arch can override either * the dfl or actual value as it sees fit. Don't forget this is * measured in 32-bit words, not bytes. */ -u8 pci_dfl_cache_line_size __initdata = PCI_CACHE_LINE_BYTES >> 2; +u8 pci_dfl_cache_line_size __initdata = L1_CACHE_BYTES >> 2; u8 pci_cache_line_size; /**