From: "Tom 'spot' Callaway" <tcallawa@redhat.com>
To: sparclinux@vger.kernel.org
Subject: Re: Badness in map_area_pte
Date: Sat, 05 Feb 2005 16:30:31 +0000 [thread overview]
Message-ID: <1107621031.3951.245.camel@localhost.localdomain> (raw)
In-Reply-To: <41E96A42.7090501@mc.net>
[-- Attachment #1: Type: text/plain, Size: 875 bytes --]
On Fri, 2005-02-04 at 22:07 -0800, David S. Miller wrote:
> On Fri, 04 Feb 2005 15:37:24 -0600
> "Tom 'spot' Callaway" <tcallawa@redhat.com> wrote:
>
> > On Sat, 2005-01-15 at 20:29 -0800, William Lee Irwin III wrote:
> >
> > > I suspected the same. Perhaps time to brew up another BTFIXUP.
> >
> > I tried to whip up a BTFIXUP patch for this, but it wouldn't work, since
> > VMALLOC_START is in entry.S. Peter Jones took my patch and made a
> > version that works. His patch to resolve this is attached.
>
> That entry.S code is all for sun4c, so you can use VMALLOC_START_SUN4C
> or whatever.
OK, how about this patch?
Signed-off-by: Tom 'spot' Callaway <tcallawa@redhat.com>
~spot
---
Tom "spot" Callaway <tcallawa(a)redhat*com> LCA, RHCE
Red Hat Sales Engineer || Aurora Linux Project Leader
"If you are going through hell, keep going."
-- Sir Winston Churchill
[-- Attachment #2: linux-2.6.10-sparc-vmallocstartfix2.patch --]
[-- Type: text/x-patch, Size: 2195 bytes --]
--- linux-2.6.10/arch/sparc/kernel/entry.S.BAD 2005-02-05 09:41:05.967434326 -0500
+++ linux-2.6.10/arch/sparc/kernel/entry.S 2005-02-05 09:41:36.828742694 -0500
@@ -944,7 +944,7 @@
and %l5, %l4, %l5
/* Test for NULL pte_t * in vmalloc area. */
- sethi %hi(VMALLOC_START), %l4
+ sethi %hi(VMALLOC_START_SUN4), %l4
cmp %l5, %l4
blu,a invalid_segment_patch1
lduXa [%l5] ASI_SEGMAP, %l4
@@ -1072,7 +1072,7 @@
andn %l4, 0x1ff, %l5
1:
- sethi %hi(VMALLOC_START), %l4
+ sethi %hi(VMALLOC_START_SUN4), %l4
cmp %l5, %l4
bgeu 1f
--- linux-2.6.10/arch/sparc/mm/init.c.BAD 2005-02-05 09:47:32.849619294 -0500
+++ linux-2.6.10/arch/sparc/mm/init.c 2005-02-05 09:56:03.119046550 -0500
@@ -44,6 +44,7 @@
struct sparc_phys_banks sp_banks[SPARC_PHYS_BANKS+1];
unsigned long sparc_unmapped_base;
+unsigned long vmalloc_start_addr;
struct pgtable_cache_struct pgt_quicklists;
@@ -402,6 +403,27 @@
int reservedpages = 0;
int i;
+ switch(sparc_cpu_model) {
+ case sun4:
+ case sun4c:
+ vmalloc_start_addr = VMALLOC_START_SUN4;
+ BTFIXUPSET_SETHI(vmalloc_start_addr, VMALLOC_START_SUN4);
+ break;
+ case sun4d:
+ case sun4e:
+ case sun4m:
+ vmalloc_start_addr = VMALLOC_START_SUN4M;
+ BTFIXUPSET_SETHI(vmalloc_start_addr, VMALLOC_START_SUN4M);
+ break;
+ /* these are just to pacify gcc warnings */
+ case sun4u:
+ case sun_unknown:
+ case ap1000:
+ default:
+ break;
+ }
+
+
if (PKMAP_BASE+LAST_PKMAP*PAGE_SIZE >= FIXADDR_START) {
prom_printf("BUG: fixmap and pkmap areas overlap\n");
prom_printf("pkbase: 0x%lx pkend: 0x%lx fixstart 0x%lx\n",
--- linux-2.6.10/include/asm-sparc/vaddrs.h.BAD 2005-02-05 09:45:57.662089998 -0500
+++ linux-2.6.10/include/asm-sparc/vaddrs.h 2005-02-05 09:51:33.763994742 -0500
@@ -35,7 +35,13 @@
#define IOBASE_VADDR 0xfe000000
#define IOBASE_END 0xfe600000
-#define VMALLOC_START 0xfe600000
+extern unsigned long vmalloc_start_addr;
+
+BTFIXUPDEF_SETHI(vmalloc_start_addr)
+
+#define VMALLOC_START_SUN4 0xfe600000
+#define VMALLOC_START_SUN4M 0xfe300000
+#define VMALLOC_START BTFIXUP_SETHI(vmalloc_start_addr)
/* XXX Alter this when I get around to fixing sun4c - Anton */
#define VMALLOC_END 0xffc00000
next prev parent reply other threads:[~2005-02-05 16:30 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-15 19:08 Badness in map_area_pte Bob Breuer
2005-01-16 2:25 ` Bob Breuer
2005-01-16 3:55 ` William Lee Irwin III
2005-01-16 4:24 ` Bob Breuer
2005-01-16 4:29 ` William Lee Irwin III
2005-02-04 21:37 ` Tom 'spot' Callaway
2005-02-05 6:07 ` David S. Miller
2005-02-05 16:30 ` Tom 'spot' Callaway [this message]
2005-02-05 18:34 ` Tom 'spot' Callaway
2005-02-05 19:48 ` 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=1107621031.3951.245.camel@localhost.localdomain \
--to=tcallawa@redhat.com \
--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.