All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@linux-mips.org>
To: "Kevin D. Kissell" <kevink@mips.com>
Cc: "Steven J. Hill" <sjhill@realitydiluted.com>,
	Brian Murphy <brian@murphy.dk>,
	linux-mips@linux-mips.org
Subject: Re: BUG in pcnet32.c?
Date: Tue, 30 Mar 2004 03:24:03 +0200	[thread overview]
Message-ID: <20040330012403.GB4068@linux-mips.org> (raw)
In-Reply-To: <008901c415d0$3a94d5f0$10eca8c0@grendel>

On Mon, Mar 29, 2004 at 10:55:52PM +0200, Kevin D. Kissell wrote:

> Which reminds me of something I've been meaning to mention for a while.
> Back in the dark days of Linux 2.2 on MIPS, I discovered that a number
> of network drivers were subtly broken for MIPS because they allocated
> enough extra space for IP header alignment, but not for cache line alignment.
> Particularly on CPUs with write-back caches, it can be a Bad Thing if a cache 
> line straddles two packet buffers, as the flush of one can cause the other
> to be clobbered.  I had to redefine the alignment constant for MIPS to be
> a function of the line size to have 100% solid operation of the Tulip and
> pcnet32 drivers.
> 
> The whole network driver cache management paradigm was redone for 2.4,
> and I've often wondered whether the same potential problem exists, but never
> had the time to go in and check.

The change goes beyond just cache managment; the API also abstracts away
I/O MMUs which so far are quite rare on MIPS systems - but I really hope
they're going to establish themselves asap.

The Documentation/DMA-API.txt also documents how properly deal with cache
alignment when using this API.

Steven, maybe that we should add another assertion to make sure we don't
run into trouble with missaligned cachelines?

> There, I've mentioned it.  My conscience is clear.  ;o)

Ommmmm ;))

  Ralf

  parent reply	other threads:[~2004-03-30  1:24 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-29 20:01 BUG in pcnet32.c? Brian Murphy
2004-03-29 20:25 ` Steven J. Hill
2004-03-29 20:55   ` Kevin D. Kissell
2004-03-29 20:55     ` Kevin D. Kissell
2004-03-29 20:58     ` Steven J. Hill
2004-03-30  1:24     ` Ralf Baechle [this message]
2004-03-30  2:30       ` Steven J. Hill
2004-03-31 20:48   ` Brian Murphy
2004-04-01  8:31     ` Geert Uytterhoeven
2004-04-01 17:31     ` Ralf Baechle
2004-04-02  8:27       ` Brian Murphy
2004-04-02  8:39         ` Ralf Baechle

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=20040330012403.GB4068@linux-mips.org \
    --to=ralf@linux-mips.org \
    --cc=brian@murphy.dk \
    --cc=kevink@mips.com \
    --cc=linux-mips@linux-mips.org \
    --cc=sjhill@realitydiluted.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 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.