public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Tejun Heo <tj@kernel.org>
Cc: 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>,
	Thomas Gleixner <tglx@linutronix.de>,
	Tony Luck <tony.luck@intel.com>,
	David Miller <davem@davemloft.net>
Subject: Re: [PATCH 1/3] pci: determine CLS more intelligently
Date: Sat, 4 Jul 2009 11:29:56 +0200	[thread overview]
Message-ID: <20090704092956.GA26456@elte.hu> (raw)
In-Reply-To: <4A4EE3E9.7090205@kernel.org>


* Tejun Heo <tj@kernel.org> wrote:

> Till now, CLS has been determined either by arch code or as 
> L1_CACHE_BYTES.  Only x86 and ia64 set CLS explicitly and x86 
> doesn't always get it right.  On most configurations, the chance 
> is that firmware configures the correct value during boot.
> 
> This patch makes pci_init() determine CLS by looking at what 
> firmware has configured.  It scans all devices and if all non-zero 
> values agree, the value is used.  If none is configured or there 
> is a disagreement, pci_dfl_cache_line_size is used.  arch can set 
> the dfl value (via PCI_CACHE_LINE_BYTES or 
> pci_dfl_cache_line_size) or override the actual one.
> 
> ia64, x86 and sparc64 updated to set the default cls instead of 
> the actual one.
> 
> While at it, declare pci_cache_line_size and 
> pci_dfl_cache_line_size in pci.h and drop private declarations 
> from arch code.
> 
> Signed-off-by: Tejun Heo <tj@kernel.org>
> Acked-by: David Miller <davem@davemloft.net>
> Acked-by: Greg KH <gregkh@suse.de>
> Cc: Ingo Molnar <mingo@elte.hu>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Tony Luck <tony.luck@intel.com>

The principle looks good to me. Regressions could be expected though 
- these details are fragile and affect the way how we talk to 
hardware.

Acked-by: Ingo Molnar <mingo@elte.hu>

	Ingo

  parent reply	other threads:[~2009-07-04  9:30 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 ` [PATCH 2/3] pci,sparc64: drop PCI_CACHE_LINE_BYTES Tejun Heo
2009-07-04  5:10   ` [PATCH 3/3] pccard: configure CLS on attach Tejun Heo
2009-07-04  9:29 ` Ingo Molnar [this message]
2009-09-17 17:31 ` [PATCH 1/3] pci: determine CLS more intelligently 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=20090704092956.GA26456@elte.hu \
    --to=mingo@elte.hu \
    --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=tglx@linutronix.de \
    --cc=tj@kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox