netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: risto.suominen@gmail.com
Cc: khc@pm.waw.pl, netdev@vger.kernel.org
Subject: Re: [PATCH 002/002] de2104x: support for systems lacking cache coherence
Date: Tue, 10 Feb 2009 15:21:43 -0800 (PST)	[thread overview]
Message-ID: <20090210.152143.176850113.davem@davemloft.net> (raw)
In-Reply-To: <46e1c7760902091122m6ec7fbb5nefd9cc9789880c0f@mail.gmail.com>

From: Risto Suominen <risto.suominen@gmail.com>
Date: Mon, 9 Feb 2009 21:22:03 +0200

> 2009/2/9 Krzysztof Halasa <khc@pm.waw.pl>:
> > Potentially any driver is affected by such coherency problem, this can't
> > be specific to 21040.
> >
> I agree. That talks for the config solution.

I think the pci_alloc_consistent() implementation for your particular
platform should be fixed instead :-)

It should be using uncacheable cpu mappings of the returned memory if
the cpu lacks cache coherency with DMA.

Peppering all kinds of drivers with this kind of change being proposed
here is not the way to handle this problem.  It makes the creation of
the abstractions we created with pci_alloc_consistent() and friends
totally useless.

Drivers have to be able to say "what I write to this memory the device
will see, and what the device writes the cpu will see" and they have
to be able to say this regardless of details like cache alignment and
other things that they should have no business knowing about.

  parent reply	other threads:[~2009-02-10 23:21 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <46e1c7760902071330i5362fe4fvd99fc7075fc666d3@mail.gmail.com>
2009-02-09  7:27 ` Fwd: [PATCH 002/002] de2104x: support for systems lacking cache coherence Risto Suominen
2009-02-09  7:45   ` David Miller
2009-02-09  8:22     ` Risto Suominen
2009-02-09  8:29       ` David Miller
2009-02-09  8:35         ` Risto Suominen
2009-02-09 16:58       ` Krzysztof Halasa
2009-02-09 19:22         ` Risto Suominen
2009-02-09 22:51           ` David Miller
2009-02-10  1:45             ` Krzysztof Halasa
2009-02-10  1:50               ` David Miller
2009-02-10 23:21           ` David Miller [this message]
2009-02-11 12:18             ` Risto Suominen
2009-02-11 12:31               ` Risto Suominen
2009-02-11 21:39                 ` David Miller
2009-02-13  3:42     ` Benjamin Herrenschmidt
2009-02-10  1:01 ` Andrew Morton
2009-02-10  1:07   ` David Miller
2009-02-10  7:16   ` Risto Suominen

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=20090210.152143.176850113.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=khc@pm.waw.pl \
    --cc=netdev@vger.kernel.org \
    --cc=risto.suominen@gmail.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;
as well as URLs for NNTP newsgroup(s).