linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zwane Mwaikambo <zwane@arm.linux.org.uk>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH][2.6] Dont use cpu_has_pse for WP test branch
Date: Tue, 4 Nov 2003 11:36:28 -0500 (EST)	[thread overview]
Message-ID: <Pine.LNX.4.53.0311041130040.20595@montezuma.fsmlabs.com> (raw)
In-Reply-To: <Pine.LNX.4.44.0311040809470.20373-100000@home.osdl.org>

On Tue, 4 Nov 2003, Linus Torvalds wrote:

> Why?
> 
> The reason we test the PSE bit is not that we think it's a good indicator 
> of "new enough".  It's because if the PSE bit is set, we will use 4MB 
> pages, and the code below that actually _tests_ whether WP works or not 
> won't work.

Agreed, i also retracted the patch due to the reasons behind cpu_has_pse 
not working was because of CONFIG_DEBUG_PAGEALLOC.

> In fact, these days we could remove the test entirely: the only reason it 
> exists is because traditionally we didn't have the "fixmap" helpers, so we 
> used the page in lowest kernel memory for testing (which did not exist if 
> we had PSE, since with PSE the kernel wouldn't use individual pages to map 
> itself).

Wasn't the test unconditional in 2.4? How about the following then?

Index: linux-2.6.0-test9-mm1/arch/i386/mm/init.c
===================================================================
RCS file: /build/cvsroot/linux-2.6.0-test9-mm1/arch/i386/mm/init.c,v
retrieving revision 1.1.1.1
diff -u -p -B -r1.1.1.1 init.c
--- linux-2.6.0-test9-mm1/arch/i386/mm/init.c	30 Oct 2003 11:22:42 -0000	1.1.1.1
+++ linux-2.6.0-test9-mm1/arch/i386/mm/init.c	4 Nov 2003 16:34:45 -0000
@@ -390,12 +390,6 @@ void __init paging_init(void)
 
 void __init test_wp_bit(void)
 {
-	if (cpu_has_pse) {
-		/* Ok, all PSE-capable CPUs are definitely handling the WP bit right. */
-		boot_cpu_data.wp_works_ok = 1;
-		return;
-	}
-
 	printk("Checking if this processor honours the WP bit even in supervisor mode... ");
 
 	/* Any page-aligned address will do, the test is non-destructive */

      reply	other threads:[~2003-11-04 16:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-04  7:07 [PATCH][2.6] Dont use cpu_has_pse for WP test branch Zwane Mwaikambo
2003-11-04  9:33 ` Zwane Mwaikambo
2003-11-04 16:13 ` Linus Torvalds
2003-11-04 16:36   ` Zwane Mwaikambo [this message]

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=Pine.LNX.4.53.0311041130040.20595@montezuma.fsmlabs.com \
    --to=zwane@arm.linux.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.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;
as well as URLs for NNTP newsgroup(s).