[lkml]   [2009]   [Jul]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 1/3] pci: determine CLS more intelligently

* Tejun Heo <> 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 <>
> Acked-by: David Miller <>
> Acked-by: Greg KH <>
> Cc: Ingo Molnar <>
> Cc: Thomas Gleixner <>
> Cc: Tony Luck <>

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

Acked-by: Ingo Molnar <>


 \ /
  Last update: 2009-07-04 11:33    [W:0.232 / U:0.108 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site