public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Jones <davej@codemonkey.org.uk>
To: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: David Brownell <david-b@pacbell.net>,
	Jeff Garzik <jgarzik@pobox.com>, Greg KH <greg@kroah.com>,
	Russell King <rmk@arm.linux.org.uk>,
	Linus Torvalds <torvalds@transmeta.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [patch 2.5] PCI MWI cacheline size fix
Date: Thu, 20 Mar 2003 12:54:55 +0000	[thread overview]
Message-ID: <20030320125450.GC6995@suse.de> (raw)
In-Reply-To: <20030320152956.A2584@jurassic.park.msu.ru>

On Thu, Mar 20, 2003 at 03:29:56PM +0300, Ivan Kokshaysky wrote:
 > On Thu, Mar 20, 2003 at 11:55:20AM +0000, Dave Jones wrote:
 > >  > +	else if (c->x86 > 6)
 > >  > +		pci_cache_line_size = 128 >> 2;	/* P4 */
 > >  >  
 > > 
 > > I'd feel more comfortable with this with a c->x86_vendor == X86_VENDOR_INTEL
 > > on the else if clause. The above code will silently break if for eg,
 > > VIA, Transmeta or any other clone manufacturer make a model 7 or higher CPU.
 > 
 > No, we'd just assume 128 bytes cache line size on such CPU, which is
 > safe unless it has cache lines larger than 128. But if we assume 32 bytes
 > while this new CPU has 64, MWI might corrupt memory by transferring
 > incomplete cache lines.

Ok, thanks for explaining this to me. Another possibility at future
proofing would be to actually run the cpuid function to get the
cacheline size, although as thats vendor (and in some cases model)
specific, it's probably more pain than its worth, so your method is
the safest way forward.

		Dave



  reply	other threads:[~2003-03-20 12:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-20 10:59 [patch 2.5] PCI MWI cacheline size fix Ivan Kokshaysky
2003-03-20 11:55 ` Dave Jones
2003-03-20 12:29   ` Ivan Kokshaysky
2003-03-20 12:54     ` Dave Jones [this message]
2003-03-20 14:33 ` Jeff Garzik
2003-03-20 15:29 ` David Brownell
2003-03-20 22:26 ` Greg KH

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=20030320125450.GC6995@suse.de \
    --to=davej@codemonkey.org.uk \
    --cc=david-b@pacbell.net \
    --cc=greg@kroah.com \
    --cc=ink@jurassic.park.msu.ru \
    --cc=jgarzik@pobox.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rmk@arm.linux.org.uk \
    --cc=torvalds@transmeta.com \
    /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