From: David Miller <davem@davemloft.net>
To: mikpe@it.uu.se
Cc: linux-kernel@vger.kernel.org, sparclinux@vger.kernel.org
Subject: Re: [BUG sparc64] 2.6.16-git6 broke X11 on Ultra5 with ATI Mach64
Date: Thu, 27 Jul 2006 18:13:56 -0700 (PDT) [thread overview]
Message-ID: <20060727.181356.71087770.davem@davemloft.net> (raw)
In-Reply-To: <20060707.000524.112600047.davem@davemloft.net>
From: David Miller <davem@davemloft.net>
Date: Fri, 07 Jul 2006 00:05:24 -0700 (PDT)
> I'll have to figure out how the writeable bits get lost
> in the call chain.
Actually, I digged further, things seem correct.
Initially we only set the SW-writable bit, and this is the right thing
to do for a MAP_SHARED writable mapping.
If the process actually tries to write to the mapping, the page fault
path will set the two bits that actually enable writes, namely the
HW-writable bit and the SW-dirty bit.
This occurs when pte_mkdirty() is called on the PTE during the
execution of mm/memory.c:handle_pte_fault(), right here:
if (write_access) {
if (!pte_write(entry))
return do_wp_page(mm, vma, address,
pte, pmd, ptl, entry);
entry = pte_mkdirty(entry);
}
pte_write() will return true, since the SW-writable bit is set. So we
don't should not invoke do_wp_page(), and we'll just set the dirty bit
on the existing PTE.
For some reason that isn't happening properly, or something keeps
clearing the HW-writable bit on us. Another possibility is that
one of these operations sets the cacheable bits, or clears the
side-effect bit, either of which would cause corruption or other
problems when accessing the ATI card through such a mapping.
I wonder why.... I'll try to run some experiments on my system to try
and get to the bottom of this.
next prev parent reply other threads:[~2006-07-28 1:13 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-06 9:37 Mikael Pettersson
2006-07-07 7:05 ` David Miller
2006-07-28 1:13 ` David Miller [this message]
2006-07-28 3:38 ` David Miller
-- strict thread matches above, loose matches on Subject: below --
2006-08-28 21:18 Mikael Pettersson
2006-08-06 21:09 Mikael Pettersson
2006-08-06 23:37 ` David Miller
2006-08-01 11:30 Mikael Pettersson
2006-07-28 10:35 Mikael Pettersson
2006-07-28 11:13 ` David Miller
2006-08-01 5:42 ` David Miller
2006-08-28 7:39 ` David Miller
2006-07-04 10:03 Mikael Pettersson
2006-07-03 11:17 Mikael Pettersson
2006-07-04 7:41 ` Rene Rebe
2006-07-04 9:32 ` Rene Rebe
2006-07-06 3:40 ` David 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=20060727.181356.71087770.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mikpe@it.uu.se \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome