Subject: HIGHMEM

From: "Hdei Nunoe" <[email-masked]>
Date: Tue, 7 Dec 2004 10:07:26 +0900

Hi there,

Has anyone succeeded the HIGHMEM with discontiguous physical memory?
I am using kernel 2.4.18 on TX4937 with two chunks of 256Mbyte memory.
There is 256Mbyte gap in between the physical memory blocks - lower 
memory is 0x00000000 to 0x10000000, upper memory is 0x20000000 to
0x30000000.  System hungs when it create INIT process.

Cheers,
-hdei

---

From: Jan-Benedict Glaw <[email-masked]>
Date: Tue, 7 Dec 2004 10:17:44 +0100

On Tue, 2004-12-07 10:07:26 +0900, Hdei Nunoe <[email-masked]>

> I am using kernel 2.4.18 on TX4937 with two chunks of 256Mbyte memory.

2.4.18 is obsolete...

MfG, JBG

-- 
Jan-Benedict Glaw       [email-masked]    . +49-172-7608481             _ O _
"Eine Freie Meinung in  einem Freien Kopf    | Gegen Zensur | Gegen Krieg  _ _ O
 fuer einen Freien Staat voll Freier Bürger" | im Internet! |   im Irak!   O O O
ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));

---

From: "Hdei Nunoe" <[email-masked]>
Date: Tue, 7 Dec 2004 18:56:33 +0900

Hi Jan,

Will it work on the newer version?

Cheers,
-hdei

----- Original Message ----- 
From: "Jan-Benedict Glaw" <[email-masked]>
To: "Hdei Nunoe" <[email-masked]>
Cc: <[email-masked]>
Sent: Tuesday, December 07, 2004 6:17 PM
Subject: Re: HIGHMEM

2.4.18 is obsolete...

MfG, JBG

--

---

From: Ralf Baechle <[email-masked]>
Date: Tue, 7 Dec 2004 10:58:37 +0100

> 0x30000000.  System hungs when it create INIT process.

In 2.4 the support for CONFIG_DISCONTIG and CONFIG_NUMA are a bit tangled
with each other because IP27 is the only platform to uses these features
and it needs both.  Other than that you can also just setup your system
as 0x0 - 0x10000000 being RAM, 0x10000000 - 0x20000000 being reserved
memory and 0x20000000 - 0x30000000 being highmem.  Which works but is a
bit wasteful.

Issue #2 is that we don't support the combination of CONFIG_DISCONTIG and
CONFIG_HIGHMEM.  And highmem is a lobotomized solution for lobotomized
silicon anyway.  You have a 64-bit processor - use it's capabilities :-)

Issue #3 - As I recall the TX4937's H3 core is suffering from cache
aliases.  Handling those efficiently for highmem is not easily possible
and so we don't even try.  More recent kernels will refuse to enable
highmem on such cache configurations but something like 2.4.18 which by
now is an almost 3 year old antique doesn't know about that and will
happily crash.

I recommend you should go for a 64-bit kernel instead.  And 64-bit support
is certainly better in 2.6 than in 2.4.  Especially the area of 32-bit
binary compatibility has been improved significantly.

  Ralf

---

From: Jan-Benedict Glaw <[email-masked]>
Date: Tue, 7 Dec 2004 11:02:43 +0100

On Tue, 2004-12-07 18:56:33 +0900, Hdei Nunoe <[email-masked]>

> Will it work on the newer version?

Did you try recent 2.6.x versions?

MfG, JBG

---

From: Atsushi Nemoto <[email-masked]>
Date: Mon, 13 Dec 2004 13:34:09 +0900 (JST)

>>>>> On Tue, 7 Dec 2004 10:58:37 +0100, Ralf Baechle <[email-masked]> said:
ralf> Issue #3 - As I recall the TX4937's H3 core is suffering from
ralf> cache aliases.  Handling those efficiently for highmem is not
ralf> easily possible and so we don't even try.  More recent kernels
ralf> will refuse to enable highmem on such cache configurations but
ralf> something like 2.4.18 which by now is an almost 3 year old
ralf> antique doesn't know about that and will happily crash.

ralf> I recommend you should go for a 64-bit kernel instead.  And
ralf> 64-bit support is certainly better in 2.6 than in 2.4.
ralf> Especially the area of 32-bit binary compatibility has been
ralf> improved significantly.

And this is a small step to a 64-bit kernel for TX49XX.  Could you
apply?

--- linux-mips/arch/mips/mm/Makefile	2004-12-13 09:39:09.000000000 +0900
+++ linux/arch/mips/mm/Makefile	2004-12-13 09:52:54.000000000 +0900
@@ -49,6 +49,7 @@
 endif
 ifdef CONFIG_MIPS64
 obj-$(CONFIG_CPU_R4300)		+= tlbex64.o
+obj-$(CONFIG_CPU_TX49XX)	+= tlbex64.o
 obj-$(CONFIG_CPU_R4X00)		+= tlbex64.o
 obj-$(CONFIG_CPU_R5000)		+= tlbex64.o
 obj-$(CONFIG_CPU_NEVADA)	+= tlbex64.o

---

From: "Hdei Nunoe" <[email-masked]>
Date: Tue, 14 Dec 2004 13:26:55 +0900

Ralf,

Thanks for the info!  I still have a ocuple of question, hope you do not 
mind.

> and it needs both.

Is it named "sgi-ip27"?

> Other than that you can also just setup your system

The gap in physical memory is 0x10000000 - 0x20000000, but it is 
0x90000000 -
0xC0000000 in virtual memory because there is K1 segment.  So the macros 
such
as __pa() or __va() does not work, I think.  Started to wonder it might not 
be easy
as just changing the PAGE_OFFSET value.  Do you see?

cheers,
-hdei

---

From: Ralf Baechle <[email-masked]>
Date: Wed, 15 Dec 2004 15:15:08 +0100

> >with each other because IP27 is the only platform to uses these features

Yes, obviously :-)

> as just changing the PAGE_OFFSET value.  Do you see?

PAGE_OFFSET is the difference of a ZONE_NORMAL's virtual address and it's
physical address.  Once there is no more 1:1 mapping between physical and
virtual addresses such as in your suggestion PAGE_OFFSET can no longer be
used, that is you need to rewrite all users of this function.

  Ralf

---

From: Ralf Baechle <[email-masked]>
Date: Wed, 15 Dec 2004 15:16:13 +0100

> And this is a small step to a 64-bit kernel for TX49XX.  Could you

Sure, done.

  Ralf

---

From: Atsushi Nemoto <[email-masked]>
Date: Tue, 21 Dec 2004 23:33:24 +0900 (JST)

>>>>> On Wed, 15 Dec 2004 15:16:13 +0100, Ralf Baechle <[email-masked]> said:

>> And this is a small step to a 64-bit kernel for TX49XX.  Could you

ralf> Sure, done.

Thanks.  And this is next step.  Could you apply too?

diff -u linux-mips/include/asm-mips/addrspace.h linux/include/asm-mips/addrspace.h 
--- linux-mips/include/asm-mips/addrspace.h	Sun Sep 26 21:31:45 2004
+++ linux/include/asm-mips/addrspace.h	Sat Dec 18 21:21:01 2004
@@ -126,6 +126,7 @@
     || defined (CONFIG_CPU_R4X00)					\
     || defined (CONFIG_CPU_R5000)					\
     || defined (CONFIG_CPU_NEVADA)					\
+    || defined (CONFIG_CPU_TX49XX)					\
     || defined (CONFIG_CPU_MIPS64)
 #define	KUSIZE			0x0000010000000000	/* 2^^40 */
 #define	KUSIZE_64		0x0000010000000000	/* 2^^40 */

---

From: "Hdei Nunoe" <[email-masked]>
Date: Wed, 22 Dec 2004 08:51:58 +0900

Hello,

Could anyone tell how significant the migration from MIPS32 to MIPS64 is?
Is it just re-building with the MIPS64 toolchain? 
Or is it like another architecture porting?

Regards,
-hdei

---

From: Atsushi Nemoto <[email-masked]>
Date: Fri, 24 Dec 2004 16:33:48 +0900 (JST)

>>>>> On Wed, 22 Dec 2004 08:51:58 +0900, "Hdei Nunoe" <[email-masked]> said:
nunoe> Could anyone tell how significant the migration from MIPS32 to
nunoe> MIPS64 is?  Is it just re-building with the MIPS64 toolchain?
nunoe> Or is it like another architecture porting?

Just rebuilding will not be enough, but the migration will not be so
hard.

Most of you have to do is using correct integer data types ('long' is
64bit and 'int' is 32bit in mips64 kernel).

---
Atsushi Nemoto