All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Greg KH <greg@kroah.com>, Robert Hancock <hancockr@shaw.ca>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	linux-pci@vger.kernel.org,
	Linux Kernel <linux-kernel@vger.kernel.org>,
	Daniel Ritz <daniel.ritz@gmx.ch>,
	Dominik Brodowski <linux@dominikbrodowski.net>,
	Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>,
	Axel Birndt <towerlexa@gmx.de>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>,
	Tony Luck <tony.luck@intel.com>,
	David Miller <davem@davemloft.net>, Ingo Molnar <mingo@elte.hu>
Subject: [PATCH 2/3] pci,sparc64: drop PCI_CACHE_LINE_BYTES
Date: Sat, 04 Jul 2009 14:09:36 +0900	[thread overview]
Message-ID: <4A4EE410.4080001@kernel.org> (raw)
In-Reply-To: <4A4EE3E9.7090205@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 <davem@davemloft.net>
Signed-off-by: Tejun Heo <tj@kernel.org>
---
 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(-)

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
@@ -17,8 +17,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
@@ -41,17 +41,13 @@ int pci_domains_supported = 1;
 unsigned long pci_cardbus_io_size = DEFAULT_CARDBUS_IO_SIZE;
 unsigned long pci_cardbus_mem_size = DEFAULT_CARDBUS_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;
 
 /**

  reply	other threads:[~2009-07-04  5:08 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-04  5:08 [PATCH 1/3] pci: determine CLS more intelligently Tejun Heo
2009-07-04  5:09 ` Tejun Heo [this message]
2009-07-04  5:10   ` [PATCH 3/3] pccard: configure CLS on attach Tejun Heo
2009-07-04  9:29 ` [PATCH 1/3] pci: determine CLS more intelligently Ingo Molnar
2009-09-17 17:31 ` Jesse Barnes
2009-09-22  8:33   ` [PATCH 1/3 pci#linux-next] " Tejun Heo
2009-09-23  5:24     ` Benjamin Herrenschmidt
2009-10-06 16:53     ` Jesse Barnes
2009-09-22  8:34   ` [PATCH 2/3 pci#linux-next] pci,sparc64: drop PCI_CACHE_LINE_BYTES Tejun Heo
2009-09-22  8:34   ` [PATCH 3/3 pci#linux-next] pccard: configure CLS on attach Tejun Heo
2009-09-22 10:02     ` Axel Birndt
2009-09-23  1:18       ` Tejun Heo
2009-09-23  5:28     ` Benjamin Herrenschmidt
2009-09-28 17:52 ` [PATCH 1/3] pci: determine CLS more intelligently Jesse Barnes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A4EE410.4080001@kernel.org \
    --to=tj@kernel.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=benh@kernel.crashing.org \
    --cc=daniel.ritz@gmx.ch \
    --cc=davem@davemloft.net \
    --cc=greg@kroah.com \
    --cc=hancockr@shaw.ca \
    --cc=kaneshige.kenji@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux@dominikbrodowski.net \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@intel.com \
    --cc=towerlexa@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.