mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 2.6.12-rc1] m32r: Update MMU-less support (0/3)
@ 2005-03-24  1:48 Hirokazu Takata
  2005-03-24  1:54 ` [PATCH 2.6.12-rc1] m32r: Update MMU-less support (1/3) Hirokazu Takata
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Hirokazu Takata @ 2005-03-24  1:48 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-kernel, sugai, ysato, inaoka.kazuhiro, fujiwara, takata

Hello,

Here is a patchset to update m32r's MMU-less support.
# Thanks to Naoto Sugai, Yoshinori Sato, Kazuhiro Inaoka, 
# and Hayato Fujiwara.

These patches can be applied to 2.6.11 or later.
Tested on an OAKS32R target.
Please apply.

Thanks,


[PATCH 2.6.12-rc1] m32r: Update MMU-less support (1/3)
- Fix syscall table for !CONFIG_MMU
- Fix EIT vector setup routine for !CONFIG_MMU

[PATCH 2.6.12-rc1] m32r: Update MMU-less support (2/3)
- Fix serial output routine
- Update mm_context_t definition

[PATCH 2.6.12-rc1] m32r: Update MMU-less support (3/3)
- Use m32r-elf-gcc for MMU-less targets
- Set up cache for M32102 chip
- Module support for !CONFIG_MMU

--
Hirokazu Takata <takata@linux-m32r.org>
Linux/M32R Project:  http://www.linux-m32r.org/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 2.6.12-rc1] m32r: Update MMU-less support (1/3)
  2005-03-24  1:48 [PATCH 2.6.12-rc1] m32r: Update MMU-less support (0/3) Hirokazu Takata
@ 2005-03-24  1:54 ` Hirokazu Takata
  2005-03-24  1:55 ` [PATCH 2.6.12-rc1] m32r: Update MMU-less support (2/3) Hirokazu Takata
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Hirokazu Takata @ 2005-03-24  1:54 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, sugai, takata

This patch is for updating m32r's MMU-less support.

	* arch/m32r/kernel/entry.s:
	- Fix syscall table for !CONFIG_MMU

	* arch/m32r/kernel/traps.c:
	- Fix EIT vector setup routine for !CONFIG_MMU

Signed-off-by: Naoto Sugai <sugai@isl.melco.co.jp>
Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
---

 arch/m32r/kernel/entry.S |   21 +++++++++++----------
 arch/m32r/kernel/traps.c |    2 ++
 2 files changed, 13 insertions(+), 10 deletions(-)


diff -ruNp a/arch/m32r/kernel/entry.S b/arch/m32r/kernel/entry.S
--- a/arch/m32r/kernel/entry.S	2005-03-07 14:10:21.000000000 +0900
+++ b/arch/m32r/kernel/entry.S	2005-03-23 20:05:40.343327214 +0900
@@ -69,16 +69,17 @@
 #include <asm/mmu_context.h>
 
 #if !defined(CONFIG_MMU)
-#define sys_madvise             sys_ni_syscall
-#define sys_readahead           sys_ni_syscall
-#define sys_mprotect            sys_ni_syscall
-#define sys_msync               sys_ni_syscall
-#define sys_mlock               sys_ni_syscall
-#define sys_munlock             sys_ni_syscall
-#define sys_mlockall            sys_ni_syscall
-#define sys_munlockall          sys_ni_syscall
-#define sys_mremap              sys_ni_syscall
-#define sys_mincore             sys_ni_syscall
+#define sys_madvise		sys_ni_syscall
+#define sys_readahead		sys_ni_syscall
+#define sys_mprotect		sys_ni_syscall
+#define sys_msync		sys_ni_syscall
+#define sys_mlock		sys_ni_syscall
+#define sys_munlock		sys_ni_syscall
+#define sys_mlockall		sys_ni_syscall
+#define sys_munlockall		sys_ni_syscall
+#define sys_mremap		sys_ni_syscall
+#define sys_mincore		sys_ni_syscall
+#define sys_remap_file_pages	sys_ni_syscall
 #endif /* CONFIG_MMU */
 
 #define R4(reg)			@reg
diff -ruNp a/arch/m32r/kernel/traps.c b/arch/m32r/kernel/traps.c
--- a/arch/m32r/kernel/traps.c	2005-03-07 14:10:21.000000000 +0900
+++ b/arch/m32r/kernel/traps.c	2005-03-23 20:05:40.372322745 +0900
@@ -95,8 +95,10 @@ void	set_eit_vector_entries(void)
 	eit_vector[31] = 0xff000000UL;
 	eit_vector[32] = BRA_INSN(ei_handler, 32);
 	eit_vector[64] = BRA_INSN(pie_handler, 64);
+#ifdef CONFIG_MMU
 	eit_vector[68] = BRA_INSN(ace_handler, 68);
 	eit_vector[72] = BRA_INSN(tme_handler, 72);
+#endif /* CONFIG_MMU */
 #ifdef CONFIG_SMP
 	eit_vector[184] = (unsigned long)smp_reschedule_interrupt;
 	eit_vector[185] = (unsigned long)smp_invalidate_interrupt;

--
Hirokazu Takata <takata@linux-m32r.org>
Linux/M32R Project:  http://www.linux-m32r.org/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 2.6.12-rc1] m32r: Update MMU-less support (2/3)
  2005-03-24  1:48 [PATCH 2.6.12-rc1] m32r: Update MMU-less support (0/3) Hirokazu Takata
  2005-03-24  1:54 ` [PATCH 2.6.12-rc1] m32r: Update MMU-less support (1/3) Hirokazu Takata
@ 2005-03-24  1:55 ` Hirokazu Takata
  2005-03-24  1:55 ` [PATCH 2.6.12-rc1] m32r: Update MMU-less support (3/3) Hirokazu Takata
  2005-03-24  2:35 ` [PATCH 2.6.12-rc1] m32r: Update MMU-less support (0/3) Andrew Morton
  3 siblings, 0 replies; 6+ messages in thread
From: Hirokazu Takata @ 2005-03-24  1:55 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, ysato, takata

This patch is for updating m32r's MMU-less support.

	* arch/m32r/boot/compressed/m32r_sio.c:
	- Fix serial output routine

	* include/asm-m32r/mmu.h:
	- Update mm_context_t definition

Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
---

 arch/m32r/boot/compressed/m32r_sio.c |    7 ++++++-
 include/asm-m32r/mmu.h               |   18 ++----------------
 2 files changed, 8 insertions(+), 17 deletions(-)


diff -ruNp a/arch/m32r/boot/compressed/m32r_sio.c b/arch/m32r/boot/compressed/m32r_sio.c
--- a/arch/m32r/boot/compressed/m32r_sio.c	2004-12-25 06:34:58.000000000 +0900
+++ b/arch/m32r/boot/compressed/m32r_sio.c	2005-03-23 20:28:24.846369405 +0900
@@ -46,9 +46,14 @@ static void putc(char c)
 	}
 	*BOOT_SIO0TXB = c;
 }
-#else
+#else /* defined(CONFIG_PLAT_M32700UT_Alpha) || defined(CONFIG_PLAT_M32700UT) */
+#ifdef CONFIG_MMU
 #define SIO0STS	(volatile unsigned short *)(0xa0efd000 + 14)
 #define SIO0TXB	(volatile unsigned short *)(0xa0efd000 + 30)
+#else
+#define SIO0STS	(volatile unsigned short *)(0x00efd000 + 14)
+#define SIO0TXB	(volatile unsigned short *)(0x00efd000 + 30)
+#endif
 
 static void putc(char c)
 {
diff -ruNp a/include/asm-m32r/mmu.h b/include/asm-m32r/mmu.h
--- a/include/asm-m32r/mmu.h	2004-12-25 06:34:44.000000000 +0900
+++ b/include/asm-m32r/mmu.h	2005-03-23 20:26:57.473769245 +0900
@@ -1,25 +1,12 @@
 #ifndef _ASM_M32R_MMU_H
 #define _ASM_M32R_MMU_H
 
-/* $Id$ */
-
 #include <linux/config.h>
 
 #if !defined(CONFIG_MMU)
-struct mm_rblock_struct {
-  int     size;
-  int     refcount;
-  void    *kblock;
-};
-
-struct mm_tblock_struct {
-  struct mm_rblock_struct *rblock;
-  struct mm_tblock_struct *next;
-};
-
 typedef struct {
-  struct mm_tblock_struct tblock;
-  unsigned long           end_brk;
+	struct vm_list_struct	*vmlist;
+	unsigned long		end_brk;
 } mm_context_t;
 #else
 
@@ -32,4 +19,3 @@ typedef unsigned long mm_context_t[NR_CP
 
 #endif  /* CONFIG_MMU */
 #endif  /* _ASM_M32R_MMU_H */
-

--
Hirokazu Takata <takata@linux-m32r.org>
Linux/M32R Project:  http://www.linux-m32r.org/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 2.6.12-rc1] m32r: Update MMU-less support (3/3)
  2005-03-24  1:48 [PATCH 2.6.12-rc1] m32r: Update MMU-less support (0/3) Hirokazu Takata
  2005-03-24  1:54 ` [PATCH 2.6.12-rc1] m32r: Update MMU-less support (1/3) Hirokazu Takata
  2005-03-24  1:55 ` [PATCH 2.6.12-rc1] m32r: Update MMU-less support (2/3) Hirokazu Takata
@ 2005-03-24  1:55 ` Hirokazu Takata
  2005-03-24  2:35 ` [PATCH 2.6.12-rc1] m32r: Update MMU-less support (0/3) Andrew Morton
  3 siblings, 0 replies; 6+ messages in thread
From: Hirokazu Takata @ 2005-03-24  1:55 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, inaoka.kazuhiro, fujiwara, takata

This patch is for updating m32r's MMU-less support.

	* arch/m32r/boot/compressed/Makefile: 
	Use m32r-elf-gcc for MMU-less targets; change ELF object format
	from elf32-m32r-linux to elf32-m32r for !CONFIG_MMU.

	* arch/m32r/boot/compressed/head.S: Set up cache for M32102 chip.
	* arch/m32r/boot/setup.S: ditto.

	* arch/m32r/kernel/module.c: Module support for !CONFIG_MMU.

Signed-off-by: Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
Signed-off-by: Hayato Fujiwara <fujiwara@linux-m32r.org>
Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
---

 arch/m32r/boot/compressed/Makefile |    5 +++++
 arch/m32r/boot/compressed/head.S   |    5 +++++
 arch/m32r/boot/setup.S             |    5 +++++
 arch/m32r/kernel/module.c          |    6 ++++++
 arch/m32r/mm/fault-nommu.c         |    1 +
 5 files changed, 22 insertions(+)


diff -ruNp a/arch/m32r/boot/compressed/Makefile b/arch/m32r/boot/compressed/Makefile
--- a/arch/m32r/boot/compressed/Makefile	2004-12-25 06:33:49.000000000 +0900
+++ b/arch/m32r/boot/compressed/Makefile	2005-03-23 20:05:40.301333686 +0900
@@ -30,7 +30,12 @@ $(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bi
 
 CFLAGS_misc.o += -fpic
 
+ifdef CONFIG_MMU
 LDFLAGS_piggy.o := -r --format binary --oformat elf32-m32r-linux -T
+else
+LDFLAGS_piggy.o := -r --format binary --oformat elf32-m32r -T
+endif
+
 OBJCOPYFLAGS += -R .empty_zero_page
 
 $(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.gz FORCE
diff -ruNp a/arch/m32r/boot/compressed/head.S b/arch/m32r/boot/compressed/head.S
--- a/arch/m32r/boot/compressed/head.S	2004-12-25 06:34:26.000000000 +0900
+++ b/arch/m32r/boot/compressed/head.S	2005-03-23 20:05:40.310332299 +0900
@@ -138,6 +138,11 @@ startup:
 	ldi	r0, -1
 	ldi	r1, 0xd0	; invalidate i-cache, copy back d-cache
 	stb	r1, @r0
+#elif defined(CONFIG_CHIP_M32102)
+	/* Cache flush */
+	ldi	r0, -2
+	ldi	r1, 0x0100	; invalidate
+	stb	r1, @r0
 #else
 #error "put your cache flush function, please"
 #endif
diff -ruNp a/arch/m32r/boot/setup.S b/arch/m32r/boot/setup.S
--- a/arch/m32r/boot/setup.S	2004-12-25 06:34:45.000000000 +0900
+++ b/arch/m32r/boot/setup.S	2005-03-23 20:05:40.326329834 +0900
@@ -75,6 +75,11 @@ ENTRY(boot)
 	ldi	r1, #0x73		; cache on (with invalidation)
 ;	ldi	r1, #0x00		; cache off
 	st	r1, @r0
+#elif defined(CONFIG_CHIP_M32102)
+	ldi	r0, #-4              ;LDIMM	(r0, M32R_MCCR)
+	ldi	r1, #0x101		; cache on (with invalidation)
+;	ldi	r1, #0x00		; cache off
+	st	r1, @r0
 #else
 #error unknown chip configuration
 #endif
diff -ruNp a/arch/m32r/kernel/module.c b/arch/m32r/kernel/module.c
--- a/arch/m32r/kernel/module.c	2004-12-25 06:35:49.000000000 +0900
+++ b/arch/m32r/kernel/module.c	2005-03-23 20:05:40.356325211 +0900
@@ -14,6 +14,8 @@
     along with this program; if not, write to the Free Software
     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
+
+#include <linux/config.h>
 #include <linux/moduleloader.h>
 #include <linux/elf.h>
 #include <linux/vmalloc.h>
@@ -31,7 +33,11 @@ void *module_alloc(unsigned long size)
 {
 	if (size == 0)
 		return NULL;
+#ifdef CONFIG_MMU
 	return vmalloc_exec(size);
+#else
+	return vmalloc(size);
+#endif
 }
 
 
diff -ruNp a/arch/m32r/mm/fault-nommu.c b/arch/m32r/mm/fault-nommu.c
--- a/arch/m32r/mm/fault-nommu.c	2004-12-25 06:34:31.000000000 +0900
+++ b/arch/m32r/mm/fault-nommu.c	2005-03-23 20:05:56.192265581 +0900
@@ -23,6 +23,7 @@
 #include <linux/smp_lock.h>
 #include <linux/interrupt.h>
 #include <linux/init.h>
+#include <linux/vt_kern.h>              /* For unblank_screen() */
 
 #include <asm/m32r.h>
 #include <asm/system.h>

--
Hirokazu Takata <takata@linux-m32r.org>
Linux/M32R Project:  http://www.linux-m32r.org/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2.6.12-rc1] m32r: Update MMU-less support (0/3)
  2005-03-24  1:48 [PATCH 2.6.12-rc1] m32r: Update MMU-less support (0/3) Hirokazu Takata
                   ` (2 preceding siblings ...)
  2005-03-24  1:55 ` [PATCH 2.6.12-rc1] m32r: Update MMU-less support (3/3) Hirokazu Takata
@ 2005-03-24  2:35 ` Andrew Morton
  2005-03-24  2:58   ` Hirokazu Takata
  3 siblings, 1 reply; 6+ messages in thread
From: Andrew Morton @ 2005-03-24  2:35 UTC (permalink / raw)
  To: Hirokazu Takata
  Cc: linux-kernel, sugai, ysato, inaoka.kazuhiro, fujiwara, takata

Hirokazu Takata <takata@linux-m32r.org> wrote:
>
> Here is a patchset to update m32r's MMU-less support.

I'd prefer it if you could avoid sending multiple patches with the same
title in future, please.  It mucks up my patch naming and tracking system,
and surely all three patches weren't doing the same thing?

More at http://www.zip.com.au/~akpm/linux/patches/stuff/tpp.txt, thanks.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2.6.12-rc1] m32r: Update MMU-less support (0/3)
  2005-03-24  2:35 ` [PATCH 2.6.12-rc1] m32r: Update MMU-less support (0/3) Andrew Morton
@ 2005-03-24  2:58   ` Hirokazu Takata
  0 siblings, 0 replies; 6+ messages in thread
From: Hirokazu Takata @ 2005-03-24  2:58 UTC (permalink / raw)
  To: akpm; +Cc: takata, linux-kernel, sugai, ysato, inaoka.kazuhiro, fujiwara

Andrew, 

From: Andrew Morton <akpm@osdl.org>
> I'd prefer it if you could avoid sending multiple patches with the same
> title in future, please.  It mucks up my patch naming and tracking system,
> and surely all three patches weren't doing the same thing?
> 
> More at http://www.zip.com.au/~akpm/linux/patches/stuff/tpp.txt, thanks.
> 

Sorry for the inconvinience, and many thanks for your elaboration.

-- Takata

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-03-24  2:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-24  1:48 [PATCH 2.6.12-rc1] m32r: Update MMU-less support (0/3) Hirokazu Takata
2005-03-24  1:54 ` [PATCH 2.6.12-rc1] m32r: Update MMU-less support (1/3) Hirokazu Takata
2005-03-24  1:55 ` [PATCH 2.6.12-rc1] m32r: Update MMU-less support (2/3) Hirokazu Takata
2005-03-24  1:55 ` [PATCH 2.6.12-rc1] m32r: Update MMU-less support (3/3) Hirokazu Takata
2005-03-24  2:35 ` [PATCH 2.6.12-rc1] m32r: Update MMU-less support (0/3) Andrew Morton
2005-03-24  2:58   ` Hirokazu Takata

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®