From: Bob Breuer <breuerr@mc.net>
To: sparclinux@vger.kernel.org
Subject: Re: hme broken on 2.6 hypersparc
Date: Fri, 12 Nov 2004 03:41:04 +0000 [thread overview]
Message-ID: <419430D0.9030500@mc.net> (raw)
In-Reply-To: <4192D294.8090305@mc.net>
I think I have an idea on what is going wrong.
First off, I came across an old publication:
http://www.usenix.org/publications/library/proceedings/sd96/full_papers/chu.txt
In section 5.3, it states that cache aliasing can occur between
DVMA and host memory addresses. I'm not sure if that is physical
or virtual host addresses, but either way cache aliasing can
happen. The cache aliasing is most prominent with the hypersparcs
because of the virtually indexed, phyically tagged cache.
Before the iommu rewrite, dvma addresses were pre-allocated and
mapped 1 to 1 with the kernel low memory. Because of the 1:1
mapping, no cache aliases will ever occur in low memory.
After the iommu rewrite, all dvma addresses are allocated on
the fly. I suspect that very little consideration was given
to cache aliasing.
I have found two easy ways in a low-memory only hypersparc
machine to make the hme work: 1) revert my srmmu fix, and
2) revert the iommu back to the fixed 1:1 dvma mapping.
Neither fix should be considered correct.
The hme driver uses a consistent dma mapping for it's transmit
descriptors. If those descriptors are cacheable, they must
not be aliased in the cache. Fix 1 makes them uncached, and
fix 2 eliminates the cache alias.
Looking on to the esp dma errors, I think there are only 2
reasons why it was failing: A) the iotlb changes were not
seen by the iommu, or B) a cache alias prevented the cpu
from seeing the new data. Doing a flush_cache_all happens
to fix both possible problems. Being unfamiliar with the
iommu, it is hard to rule out A. However, after trying to
figure out the hme problem, I'm leaning toward B as the core
problem here.
After all this, I think that if the dvma address allocation
could be made to actively avoid cache aliasing, it might
fix both problems.
Bob
next prev parent reply other threads:[~2004-11-12 3:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-11 2:46 hme broken on 2.6 hypersparc Bob Breuer
2004-11-12 3:41 ` Bob Breuer [this message]
2004-11-12 5:51 ` David S. Miller
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=419430D0.9030500@mc.net \
--to=breuerr@mc.net \
--cc=sparclinux@vger.kernel.org \
/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.