From: Russell King <rmk+lkml@arm.linux.org.uk>
To: Tejun Heo <htejun@gmail.com>
Cc: Matthew Wilcox <matthew@wil.cx>,
Arjan van de Ven <arjan@infradead.org>,
linux-pci@atrey.karlin.mff.cuni.cz, Greg KH <greg@kroah.com>,
lkml <linux-kernel@vger.kernel.org>
Subject: Re: question regarding cacheline size
Date: Thu, 7 Sep 2006 14:10:34 +0100 [thread overview]
Message-ID: <20060907131034.GC29532@flint.arm.linux.org.uk> (raw)
In-Reply-To: <45001665.9050509@gmail.com>
On Thu, Sep 07, 2006 at 02:53:57PM +0200, Tejun Heo wrote:
> Matthew Wilcox wrote:
> >On Thu, Sep 07, 2006 at 02:33:25PM +0200, Arjan van de Ven wrote:
> >>>So I think we should redo the PCI subsystem to set cacheline size during
> >>>the buswalk rather than waiting for drivers to ask for it to be set.
> >>... while allowing for quirks for devices that go puke when this
> >>register gets written ;)
> >>
> >>(afaik there are a few)
> >
> >So you want:
> >
> > unsigned int no_cls:1; /* Device pukes on write to Cacheline Size */
> >
> >in struct pci_dev?
>
> The spec says that devices can put additional restriction on supported
> cacheline size (IIRC, the example was something like power of two >= or
> <= certain size) and should ignore (treat as zero) if unsupported value
> is written. So, there might be need for more low level driver
> involvement which knows device restrictions, but I don't know whether
> such devices exist.
The problem is that both ends of the bus need to know the cache line
size for some of these commands to work correctly.
Consider, as in Matthew's case, a read command which wraps at the cache
line boundary. Unless both the master and slave are programmed with the
same cache line size, it's entirely possible for the wrong memory
locations to be read.
Eg, the device might expect 0x118, 0x11c, 0x100, 0x104, but it actually
gets 0x118, 0x11c, 0x120, 0x124 because the target got programmed with
64 while the master was set to 32.
This is, of course, supposing that the memory read command is used in
the cache line wrap mode.
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 Serial core
next prev parent reply other threads:[~2006-09-07 13:10 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-07 8:31 question regarding cacheline size Tejun Heo
2006-09-07 11:11 ` Matthew Wilcox
2006-09-07 11:20 ` Tejun Heo
2006-09-07 12:07 ` Russell King
2006-09-07 12:23 ` Matthew Wilcox
2006-09-07 12:33 ` Arjan van de Ven
2006-09-07 12:40 ` Matthew Wilcox
2006-09-07 12:53 ` Tejun Heo
2006-09-07 13:04 ` Matthew Wilcox
2006-09-07 13:19 ` Tejun Heo
2006-09-07 15:21 ` Grant Grundler
2006-09-07 15:47 ` Tejun Heo
2006-09-07 16:00 ` Jeff Garzik
2006-09-07 17:00 ` Matthew Wilcox
2006-09-07 16:04 ` Jeff Garzik
2006-09-22 23:47 ` Grant Grundler
2006-09-07 13:30 ` Jeff Garzik
2006-09-07 13:10 ` Russell King [this message]
2006-09-07 13:01 ` Arjan van de Ven
2006-09-07 13:02 ` Russell King
2006-09-07 11:59 ` linux-os (Dick Johnson)
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=20060907131034.GC29532@flint.arm.linux.org.uk \
--to=rmk+lkml@arm.linux.org.uk \
--cc=arjan@infradead.org \
--cc=greg@kroah.com \
--cc=htejun@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@atrey.karlin.mff.cuni.cz \
--cc=matthew@wil.cx \
/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