Re: [112/121] m32r: consistently use "suffix-$(...)"
Acked-by: Hirokazu Takata Sorry, it is my old mistake that still remained in the m32r kernel. Please apply this patch. Thanks, -- Takata From: Ben Hutchings Subject: [112/121] m32r: consistently use "suffix-$(...)" Date: Sun, 08 Sep 2013 03:52:01 +0100 > 3.2.51-rc1 review patch. If anyone has any objections, please let me know. > > -- > > From: Geert Uytterhoeven > > commit df12aef6a19bb2d69859a94936bda0e6ccaf3327 upstream. > > Commit a556bec9955c ("m32r: fix arch/m32r/boot/compressed/Makefile") > changed "$(suffix_y)" to "$(suffix-y)", but didn't update any location > where "suffix_y" is set, causing: > > make[5]: *** No rule to make target > `arch/m32r/boot/compressed/vmlinux.bin.', needed by > `arch/m32r/boot/compressed/piggy.o'. Stop. > make[4]: *** [arch/m32r/boot/compressed/vmlinux] Error 2 > make[3]: *** [zImage] Error 2 > > Correct the other locations to fix this. > > Signed-off-by: Geert Uytterhoeven > Cc: Hirokazu Takata > Signed-off-by: Andrew Morton > Signed-off-by: Linus Torvalds > Signed-off-by: Ben Hutchings > --- > arch/m32r/boot/compressed/Makefile | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/arch/m32r/boot/compressed/Makefile > b/arch/m32r/boot/compressed/Makefile > index 177716b..01729c2 100644 > --- a/arch/m32r/boot/compressed/Makefile > +++ b/arch/m32r/boot/compressed/Makefile > @@ -43,9 +43,9 @@ endif > > OBJCOPYFLAGS += -R .empty_zero_page > > -suffix_$(CONFIG_KERNEL_GZIP) = gz > -suffix_$(CONFIG_KERNEL_BZIP2)= bz2 > -suffix_$(CONFIG_KERNEL_LZMA) = lzma > +suffix-$(CONFIG_KERNEL_GZIP) = gz > +suffix-$(CONFIG_KERNEL_BZIP2)= bz2 > +suffix-$(CONFIG_KERNEL_LZMA) = lzma > > $(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.$(suffix-y) FORCE > $(call if_changed,ld) > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [112/121] m32r: consistently use suffix-$(...)
Acked-by: Hirokazu Takata tak...@linux-m32r.org Sorry, it is my old mistake that still remained in the m32r kernel. Please apply this patch. Thanks, -- Takata From: Ben Hutchings b...@decadent.org.uk Subject: [112/121] m32r: consistently use suffix-$(...) Date: Sun, 08 Sep 2013 03:52:01 +0100 3.2.51-rc1 review patch. If anyone has any objections, please let me know. -- From: Geert Uytterhoeven ge...@linux-m68k.org commit df12aef6a19bb2d69859a94936bda0e6ccaf3327 upstream. Commit a556bec9955c (m32r: fix arch/m32r/boot/compressed/Makefile) changed $(suffix_y) to $(suffix-y), but didn't update any location where suffix_y is set, causing: make[5]: *** No rule to make target `arch/m32r/boot/compressed/vmlinux.bin.', needed by `arch/m32r/boot/compressed/piggy.o'. Stop. make[4]: *** [arch/m32r/boot/compressed/vmlinux] Error 2 make[3]: *** [zImage] Error 2 Correct the other locations to fix this. Signed-off-by: Geert Uytterhoeven ge...@linux-m68k.org Cc: Hirokazu Takata tak...@linux-m32r.org Signed-off-by: Andrew Morton a...@linux-foundation.org Signed-off-by: Linus Torvalds torva...@linux-foundation.org Signed-off-by: Ben Hutchings b...@decadent.org.uk --- arch/m32r/boot/compressed/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/m32r/boot/compressed/Makefile b/arch/m32r/boot/compressed/Makefile index 177716b..01729c2 100644 --- a/arch/m32r/boot/compressed/Makefile +++ b/arch/m32r/boot/compressed/Makefile @@ -43,9 +43,9 @@ endif OBJCOPYFLAGS += -R .empty_zero_page -suffix_$(CONFIG_KERNEL_GZIP) = gz -suffix_$(CONFIG_KERNEL_BZIP2)= bz2 -suffix_$(CONFIG_KERNEL_LZMA) = lzma +suffix-$(CONFIG_KERNEL_GZIP) = gz +suffix-$(CONFIG_KERNEL_BZIP2)= bz2 +suffix-$(CONFIG_KERNEL_LZMA) = lzma $(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.$(suffix-y) FORCE $(call if_changed,ld) -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [TRIVIAL PATCH 08/26] m32r: Convert print_symbol to %pSR
Acked-by: Hirokazu Takata Thank you. From: Joe Perches Subject: [TRIVIAL PATCH 08/26] m32r: Convert print_symbol to %pSR Date: Wed, 12 Dec 2012 10:18:57 -0800 > Use the new vsprintf extension to avoid any possible > message interleaving. > > Signed-off-by: Joe Perches > --- > arch/m32r/kernel/traps.c |6 ++ > 1 files changed, 2 insertions(+), 4 deletions(-) > > diff --git a/arch/m32r/kernel/traps.c b/arch/m32r/kernel/traps.c > index 3bcb207..9fe3467 100644 > --- a/arch/m32r/kernel/traps.c > +++ b/arch/m32r/kernel/traps.c > @@ -132,10 +132,8 @@ static void show_trace(struct task_struct *task, > unsigned long *stack) > printk("Call Trace: "); > while (!kstack_end(stack)) { > addr = *stack++; > - if (__kernel_text_address(addr)) { > - printk("[<%08lx>] ", addr); > - print_symbol("%s\n", addr); > - } > + if (__kernel_text_address(addr)) > + printk("[<%08lx>] %pSR\n", addr, (void *)addr); > } > printk("\n"); > } > -- > 1.7.8.112.g3fd21 > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [update] Re: new execve/kernel_thread design
Acked-by: Hirokazu Takata Al, many thanks for your great job. P.S. I'm struggling to reconstruct and repair my m32r test environment... -- Takata From: Al Viro Subject: Re: [update] Re: new execve/kernel_thread design Date: Fri, 07 Dec 2012 22:23:58 + > Current situation: > > * most of the architectures are OK - alpha arm arm64 c6x frv hexagon ia64 m68k > microblaze mips openrisc parisc sparc s390 tile um unicore32 x86 xtensa > > * powerpc *still* awaits an ACK from maintainers; no reports of any breakage > on linux-next and seems to be doing fine on my tests. > > * sh - still nothing from Paul; I'm going to assume that what we have in > linux-next is OK > > * mn10300 - untested, AFAIK > * avr32, blackfin, cris, h8300, score - maintainers seem to be MIA > * m32r - maintainer is not MIA, but I'm not sure if anyone, including > maintainer, has working m32r test boxen anymore... Anyway, not a word on > m32r patches in that pile. > > Folks, this is the final warning - I *will* send a pull request on the > stuff currently in linux-next as soon as the merge window opens. It had > been sitting there for a long time by now and you've all been Cc'd on > that thread all along. > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [update] Re: new execve/kernel_thread design
Acked-by: Hirokazu Takata tak...@linux-m32r.org Al, many thanks for your great job. P.S. I'm struggling to reconstruct and repair my m32r test environment... -- Takata From: Al Viro v...@zeniv.linux.org.uk Subject: Re: [update] Re: new execve/kernel_thread design Date: Fri, 07 Dec 2012 22:23:58 + Current situation: * most of the architectures are OK - alpha arm arm64 c6x frv hexagon ia64 m68k microblaze mips openrisc parisc sparc s390 tile um unicore32 x86 xtensa * powerpc *still* awaits an ACK from maintainers; no reports of any breakage on linux-next and seems to be doing fine on my tests. * sh - still nothing from Paul; I'm going to assume that what we have in linux-next is OK * mn10300 - untested, AFAIK * avr32, blackfin, cris, h8300, score - maintainers seem to be MIA * m32r - maintainer is not MIA, but I'm not sure if anyone, including maintainer, has working m32r test boxen anymore... Anyway, not a word on m32r patches in that pile. Folks, this is the final warning - I *will* send a pull request on the stuff currently in linux-next as soon as the merge window opens. It had been sitting there for a long time by now and you've all been Cc'd on that thread all along. -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [TRIVIAL PATCH 08/26] m32r: Convert print_symbol to %pSR
Acked-by: Hirokazu Takata tak...@linux-m32r.org Thank you. From: Joe Perches j...@perches.com Subject: [TRIVIAL PATCH 08/26] m32r: Convert print_symbol to %pSR Date: Wed, 12 Dec 2012 10:18:57 -0800 Use the new vsprintf extension to avoid any possible message interleaving. Signed-off-by: Joe Perches j...@perches.com --- arch/m32r/kernel/traps.c |6 ++ 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/m32r/kernel/traps.c b/arch/m32r/kernel/traps.c index 3bcb207..9fe3467 100644 --- a/arch/m32r/kernel/traps.c +++ b/arch/m32r/kernel/traps.c @@ -132,10 +132,8 @@ static void show_trace(struct task_struct *task, unsigned long *stack) printk(Call Trace: ); while (!kstack_end(stack)) { addr = *stack++; - if (__kernel_text_address(addr)) { - printk([%08lx] , addr); - print_symbol(%s\n, addr); - } + if (__kernel_text_address(addr)) + printk([%08lx] %pSR\n, addr, (void *)addr); } printk(\n); } -- 1.7.8.112.g3fd21 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[GIT PULL] m32r: updates to add missing syscalls
Hello, Linus, Please pull from: git://www.linux-m32r.org/git/takata/linux-2.6_dev.git for-linus This patchset adds missing m32r syscalls for 2.6.23 kernel. It has been included in 2.6.23-mm1 kernel and tested for a while. -- Takata Hirokazu Takata (3): m32r: Add missing syscalls m32r: Ignore warnings for unused syscalls m32r: Update sys_rt_sigsuspend arch/m32r/kernel/signal.c| 17 -- arch/m32r/kernel/syscall_table.S | 40 +++ include/asm-m32r/thread_info.h | 11 -- include/asm-m32r/unistd.h| 66 +- 4 files changed, 120 insertions(+), 14 deletions(-) [Log messages and full diffs follow] commit 1ae487048901ada4c49b6e88cee6a1b15a477b17 Author: Hirokazu Takata <[EMAIL PROTECTED]> Date: Wed Sep 12 17:51:35 2007 +0900 m32r: Update sys_rt_sigsuspend Update sys_rt_sigsuspend() of arch/m32r/signal.c. This modification is derived from generic one of kernel/signal.c. Signed-off-by: Hirokazu Takata <[EMAIL PROTECTED]> diff --git a/arch/m32r/kernel/signal.c b/arch/m32r/kernel/signal.c index 916faf6..650a6a1 100644 --- a/arch/m32r/kernel/signal.c +++ b/arch/m32r/kernel/signal.c @@ -36,7 +36,7 @@ sys_rt_sigsuspend(sigset_t __user *unewset, size_t sigsetsize, unsigned long r2, unsigned long r3, unsigned long r4, unsigned long r5, unsigned long r6, struct pt_regs *regs) { - sigset_t saveset, newset; + sigset_t newset; /* XXX: Don't preclude handling different sized sigset_t's. */ if (sigsetsize != sizeof(sigset_t)) @@ -44,21 +44,18 @@ sys_rt_sigsuspend(sigset_t __user *unewset, size_t sigsetsize, if (copy_from_user(, unewset, sizeof(newset))) return -EFAULT; - sigdelsetmask(, ~_BLOCKABLE); + sigdelsetmask(, sigmask(SIGKILL)|sigmask(SIGSTOP)); spin_lock_irq(>sighand->siglock); - saveset = current->blocked; + current->saved_sigmask = current->blocked; current->blocked = newset; recalc_sigpending(); spin_unlock_irq(>sighand->siglock); - regs->r0 = -EINTR; - while (1) { - current->state = TASK_INTERRUPTIBLE; - schedule(); - if (do_signal(regs, )) - return regs->r0; - } + current->state = TASK_INTERRUPTIBLE; + schedule(); + set_thread_flag(TIF_RESTORE_SIGMASK); + return -ERESTARTNOHAND; } asmlinkage int diff --git a/include/asm-m32r/thread_info.h b/include/asm-m32r/thread_info.h index c039820..1effcd0 100644 --- a/include/asm-m32r/thread_info.h +++ b/include/asm-m32r/thread_info.h @@ -149,16 +149,21 @@ static inline unsigned int get_thread_fault_code(void) #define TIF_NEED_RESCHED 2 /* rescheduling necessary */ #define TIF_SINGLESTEP 3 /* restore singlestep on return to user mode */ #define TIF_IRET 4 /* return with iret */ -#define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling TIF_NEED_RESCHED */ - /* 31..28 fault code */ -#define TIF_MEMDIE 17 +#define TIF_RESTORE_SIGMASK8 /* restore signal mask in do_signal() */ +#define TIF_USEDFPU16 /* FPU was used by this task this quantum (SMP) */ +#define TIF_POLLING_NRFLAG 17 /* true if poll_idle() is polling TIF_NEED_RESCHED */ +#define TIF_MEMDIE 18 /* OOM killer killed process */ +#define TIF_FREEZE 19 /* is freezing for suspend */ #define _TIF_SYSCALL_TRACE (1< Date: Thu Sep 13 18:31:34 2007 +0900 m32r: Ignore warnings for unused syscalls checksyscalls.sh reports warnings for missing syscalls. But, on m32r, some legacy syscalls were removed elaborately. This patch kills warnings for obsolete syscalls, which are no longer used in the m32r kernel. Signed-off-by: Hirokazu Takata <[EMAIL PROTECTED]> diff --git a/include/asm-m32r/unistd.h b/include/asm-m32r/unistd.h index d202aa9..f467eac 100644 --- a/include/asm-m32r/unistd.h +++ b/include/asm-m32r/unistd.h @@ -351,6 +351,30 @@ #define __ARCH_WANT_SYS_OLDUMOUNT #define __ARCH_WANT_SYS_RT_SIGACTION +#define __IGNORE_lchown +#define __IGNORE_setuid +#define __IGNORE_getuid +#define __IGNORE_setgid +#define __IGNORE_getgid +#define __IGNORE_geteuid +#define __IGNORE_getegid +#define __IGNORE_fcntl +#define __IGNORE_setreuid +#define __IGNORE_setregid +#define __IGNORE_getrlimit +#define __IGNORE_getgroups +#define __IGNORE_setgroups +#define __IGNORE_select +#define __IGNORE_mmap +#define __IGNORE_fchown +#define __IGNORE_setfsuid +#define __IGNORE_setfsgid +#define __IGNORE_setresuid +#define __IGNORE_getresuid +#define __IGNORE_setresgid +#define __IGNORE_getresgid +#define __IGNORE_chown + /* * "Conditional" s
[GIT PULL] m32r: updates to add missing syscalls
Hello, Linus, Please pull from: git://www.linux-m32r.org/git/takata/linux-2.6_dev.git for-linus This patchset adds missing m32r syscalls for 2.6.23 kernel. It has been included in 2.6.23-mm1 kernel and tested for a while. -- Takata Hirokazu Takata (3): m32r: Add missing syscalls m32r: Ignore warnings for unused syscalls m32r: Update sys_rt_sigsuspend arch/m32r/kernel/signal.c| 17 -- arch/m32r/kernel/syscall_table.S | 40 +++ include/asm-m32r/thread_info.h | 11 -- include/asm-m32r/unistd.h| 66 +- 4 files changed, 120 insertions(+), 14 deletions(-) [Log messages and full diffs follow] commit 1ae487048901ada4c49b6e88cee6a1b15a477b17 Author: Hirokazu Takata [EMAIL PROTECTED] Date: Wed Sep 12 17:51:35 2007 +0900 m32r: Update sys_rt_sigsuspend Update sys_rt_sigsuspend() of arch/m32r/signal.c. This modification is derived from generic one of kernel/signal.c. Signed-off-by: Hirokazu Takata [EMAIL PROTECTED] diff --git a/arch/m32r/kernel/signal.c b/arch/m32r/kernel/signal.c index 916faf6..650a6a1 100644 --- a/arch/m32r/kernel/signal.c +++ b/arch/m32r/kernel/signal.c @@ -36,7 +36,7 @@ sys_rt_sigsuspend(sigset_t __user *unewset, size_t sigsetsize, unsigned long r2, unsigned long r3, unsigned long r4, unsigned long r5, unsigned long r6, struct pt_regs *regs) { - sigset_t saveset, newset; + sigset_t newset; /* XXX: Don't preclude handling different sized sigset_t's. */ if (sigsetsize != sizeof(sigset_t)) @@ -44,21 +44,18 @@ sys_rt_sigsuspend(sigset_t __user *unewset, size_t sigsetsize, if (copy_from_user(newset, unewset, sizeof(newset))) return -EFAULT; - sigdelsetmask(newset, ~_BLOCKABLE); + sigdelsetmask(newset, sigmask(SIGKILL)|sigmask(SIGSTOP)); spin_lock_irq(current-sighand-siglock); - saveset = current-blocked; + current-saved_sigmask = current-blocked; current-blocked = newset; recalc_sigpending(); spin_unlock_irq(current-sighand-siglock); - regs-r0 = -EINTR; - while (1) { - current-state = TASK_INTERRUPTIBLE; - schedule(); - if (do_signal(regs, saveset)) - return regs-r0; - } + current-state = TASK_INTERRUPTIBLE; + schedule(); + set_thread_flag(TIF_RESTORE_SIGMASK); + return -ERESTARTNOHAND; } asmlinkage int diff --git a/include/asm-m32r/thread_info.h b/include/asm-m32r/thread_info.h index c039820..1effcd0 100644 --- a/include/asm-m32r/thread_info.h +++ b/include/asm-m32r/thread_info.h @@ -149,16 +149,21 @@ static inline unsigned int get_thread_fault_code(void) #define TIF_NEED_RESCHED 2 /* rescheduling necessary */ #define TIF_SINGLESTEP 3 /* restore singlestep on return to user mode */ #define TIF_IRET 4 /* return with iret */ -#define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling TIF_NEED_RESCHED */ - /* 31..28 fault code */ -#define TIF_MEMDIE 17 +#define TIF_RESTORE_SIGMASK8 /* restore signal mask in do_signal() */ +#define TIF_USEDFPU16 /* FPU was used by this task this quantum (SMP) */ +#define TIF_POLLING_NRFLAG 17 /* true if poll_idle() is polling TIF_NEED_RESCHED */ +#define TIF_MEMDIE 18 /* OOM killer killed process */ +#define TIF_FREEZE 19 /* is freezing for suspend */ #define _TIF_SYSCALL_TRACE (1TIF_SYSCALL_TRACE) #define _TIF_SIGPENDING(1TIF_SIGPENDING) #define _TIF_NEED_RESCHED (1TIF_NEED_RESCHED) #define _TIF_SINGLESTEP(1TIF_SINGLESTEP) #define _TIF_IRET (1TIF_IRET) +#define _TIF_RESTORE_SIGMASK (1TIF_RESTORE_SIGMASK) +#define _TIF_USEDFPU (1TIF_USEDFPU) #define _TIF_POLLING_NRFLAG(1TIF_POLLING_NRFLAG) +#define _TIF_FREEZE(1TIF_FREEZE) #define _TIF_WORK_MASK 0xFFFE /* work to do on interrupt/exception return */ #define _TIF_ALLWORK_MASK 0x /* work to do on any return to u-space */ commit 8f18d56b770ee92ab742737ee2378b4069b9adaf Author: Hirokazu Takata [EMAIL PROTECTED] Date: Thu Sep 13 18:31:34 2007 +0900 m32r: Ignore warnings for unused syscalls checksyscalls.sh reports warnings for missing syscalls. But, on m32r, some legacy syscalls were removed elaborately. This patch kills warnings for obsolete syscalls, which are no longer used in the m32r kernel. Signed-off-by: Hirokazu Takata [EMAIL PROTECTED] diff --git a/include/asm-m32r/unistd.h b/include/asm-m32r/unistd.h index d202aa9..f467eac 100644 --- a/include/asm-m32r/unistd.h +++ b/include/asm-m32r/unistd.h @@ -351,6 +351,30 @@ #define __ARCH_WANT_SYS_OLDUMOUNT
Re: [PATCH] binfmt_flat: minimum support for theBlackfin relocations
From: David McCullough <[EMAIL PROTECTED]> Date: Thu, 20 Sep 2007 11:55:25 +1000 > > Jivin Robin Getz lays it down ... > > On Tue 18 Sep 2007 04:09, Bryan Wu pondered: > > > From: Bernd Schmidt <[EMAIL PROTECTED]> > > > > > > This just adds minimum support for the Blackfin relocations, > > > since we don't have enough space in each reloc. The idea > > > is to store a value with one relocation so that subsequent ones can > > > access it. > > > > > > Signed-off-by: Bernd Schmidt <[EMAIL PROTECTED]> > > > Signed-off-by: Bryan Wu <[EMAIL PROTECTED]> > > > Cc: David McCullough <[EMAIL PROTECTED]> > > > Cc: Greg Ungerer <[EMAIL PROTECTED]> > > > > Adding the other appropriate maintainers. for h8, m32r, sh and v850. > > Looks fine to me, obviously impacts the existing arches very little. > Can't see why it shouldn't get included, > > Cheers, > Davidm Looks fine to me, too. Acked-by: Hirokazu Takata <[EMAIL PROTECTED]> -- Hirokazu Takata <[EMAIL PROTECTED]> Linux/M32R Project: http://www.linux-m32r.org/ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] binfmt_flat: minimum support for theBlackfin relocations
From: David McCullough [EMAIL PROTECTED] Date: Thu, 20 Sep 2007 11:55:25 +1000 Jivin Robin Getz lays it down ... On Tue 18 Sep 2007 04:09, Bryan Wu pondered: From: Bernd Schmidt [EMAIL PROTECTED] This just adds minimum support for the Blackfin relocations, since we don't have enough space in each reloc. The idea is to store a value with one relocation so that subsequent ones can access it. Signed-off-by: Bernd Schmidt [EMAIL PROTECTED] Signed-off-by: Bryan Wu [EMAIL PROTECTED] Cc: David McCullough [EMAIL PROTECTED] Cc: Greg Ungerer [EMAIL PROTECTED] Adding the other appropriate maintainers. for h8, m32r, sh and v850. Looks fine to me, obviously impacts the existing arches very little. Can't see why it shouldn't get included, Cheers, Davidm Looks fine to me, too. Acked-by: Hirokazu Takata [EMAIL PROTECTED] -- Hirokazu Takata [EMAIL PROTECTED] Linux/M32R Project: http://www.linux-m32r.org/ - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2.6.23-rc4-mm1] m32r: serial: remove M32R_SIO_SHARE_IRQS
Remove an unused symbol M32R_SIO_SHARE_IRQS from drivers/serial/m32r_sio.h. Signed-off-by: Hirokazu Takata <[EMAIL PROTECTED]> Cc: "Robert P. J. Day" <[EMAIL PROTECTED]> --- drivers/serial/m32r_sio.c |2 +- drivers/serial/m32r_sio.h |6 -- 2 files changed, 1 insertions(+), 7 deletions(-) diff --git a/drivers/serial/m32r_sio.c b/drivers/serial/m32r_sio.c index 6e09c8b..348ee2c 100644 --- a/drivers/serial/m32r_sio.c +++ b/drivers/serial/m32r_sio.c @@ -539,7 +539,7 @@ static void serial_do_unlink(struct irq_info *i, struct uart_sio_port *up) static int serial_link_irq_chain(struct uart_sio_port *up) { struct irq_info *i = irq_lists + up->port.irq; - int ret, irq_flags = up->port.flags & UPF_SHARE_IRQ ? IRQF_SHARED : 0; + int ret, irq_flags = 0; spin_lock_irq(>lock); diff --git a/drivers/serial/m32r_sio.h b/drivers/serial/m32r_sio.h index 849f1b2..e9b7e11 100644 --- a/drivers/serial/m32r_sio.h +++ b/drivers/serial/m32r_sio.h @@ -46,9 +46,3 @@ struct old_serial_port { #define PROBE_ANY (~0) #define HIGH_BITS_OFFSET ((sizeof(long)-sizeof(int))*8) - -#ifdef CONFIG_SERIAL_SIO_SHARE_IRQ -#define M32R_SIO_SHARE_IRQS 1 -#else -#define M32R_SIO_SHARE_IRQS 0 -#endif -- 1.5.2.4 -- Hirokazu Takata <[EMAIL PROTECTED]> Linux/M32R Project: http://www.linux-m32r.org/ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[GIT PULL] m32r: Please pull m32r kernel updates for 2.6.23-rc5
Hello, Linus, The following is a series of patches to update m32r architecure support for 2.6.23-rc5: - Rearrange platform support codes and move them to arch/m32r/platforms/ - Move config files to arch/m32r/config/ - Simplify and cleanup ei_handler routine of arch/m32r/kernel/entry.S Please pull from the "for-linus" branch of git://www.linux-m32r.org/git/takata/linux-2.6_dev.git Thease patches have tested after 2.6.23-rc3-mm1. Thanks, -- Takata Hirokazu Takata (12): m32r: Move defconfig files to arch/m32r/configs/ m32r: Update defconfig files for 2.6.23-rc1 m32r: Add defconfig file for the usrv platform. m32r: Rearrange platform-dependent codes m32r: Move dot.gdbinit files m32r: Define symbols to unify platform-dependent ICU checks m32r: Simplify ei_handler code m32r: Exit ei_handler directly for no IRQ case or IPI operations m32r: Cosmetic updates of arch/m32r/kernel/entry.S m32r: Separate syscall table from entry.S m32r: build fix of entry.S m32r: Rename STI/CLI macros -- commit 7071b2914a540b43dfcad17f6892a8c115799d50 Author: Hirokazu Takata <[EMAIL PROTECTED]> Date: Mon Aug 20 20:53:50 2007 +0900 m32r: Rename STI/CLI macros The names of STI and CLI macros were derived from i386 arch historically, but their name are incomprehensible. So, for easy to understand, rename these macros to ENABLE_INTERRUPTS and DISABLE_INTERRUPTS, respectively. Signed-off-by: Hirokazu Takata <[EMAIL PROTECTED]> commit 33205613cd603fa4d80bb81464e60b909b7047e1 Author: Hirokazu Takata <[EMAIL PROTECTED]> Date: Tue Aug 21 12:04:29 2007 +0900 m32r: build fix of entry.S This patch fixes the following compile error: <-- snip --> ... AS arch/m32r/kernel/entry.o /home/bunk/linux/kernel-2.6/linux-2.6.23-rc3-mm1/arch/m32r/kernel/entry.S: Assembler messages: /home/bunk/linux/kernel-2.6/linux-2.6.23-rc3-mm1/arch/m32r/kernel/entry.S:358: Error: bad instruction `addi r0,#(0)+(64))+(32))+(32)))' make[2]: *** [arch/m32r/kernel/entry.o] Error 1 <-- snip --> Signed-off-by: Hirokazu Takata <[EMAIL PROTECTED]> Cc: Adrian Bunk <[EMAIL PROTECTED]> commit 9990b48a403fa465b4ff600cd8a7b5108d1bc135 Author: Hirokazu Takata <[EMAIL PROTECTED]> Date: Mon Aug 20 09:12:46 2007 +0900 m32r: Separate syscall table from entry.S - Separate sys_call_table from arch/m32r/kernel/entry.S and move it to arch/m32r/kernel/system_call.S. - Change sys_call_table section from .data to .rodata. Signed-off-by: Hirokazu Takata <[EMAIL PROTECTED]> commit de2232edb8d82aca938570eb6f136e2d70a26418 Author: Hirokazu Takata <[EMAIL PROTECTED]> Date: Sat Aug 18 00:10:18 2007 +0900 m32r: Cosmetic updates of arch/m32r/kernel/entry.S - Remove unused symbols *_MASK - Change indentation of comments, etc. Signed-off-by: Hirokazu Takata <[EMAIL PROTECTED]> commit abd0a782359717ded8f663bc5b8e5e9e3cc4f5e7 Author: Hirokazu Takata <[EMAIL PROTECTED]> Date: Fri Aug 17 23:40:37 2007 +0900 m32r: Exit ei_handler directly for no IRQ case or IPI operations If no IRQ request is found in the IRQ check of ei_handler, we can exit directly by jumping "restore_all", instead of via "ret_from_intr". This modification is also likely effective for IPI operations, because scheduler call never happen at the exit of IPIs. Signed-off-by: Hitoshi Yamamoto <[EMAIL PROTECTED]> Signed-off-by: Hirokazu Takata <[EMAIL PROTECTED]> commit 5171b100511513bc52875055f7d900fc3f7c922b Author: Hirokazu Takata <[EMAIL PROTECTED]> Date: Fri Aug 17 18:11:37 2007 +0900 m32r: Simplify ei_handler code Simplify and clean up messy ei_handler code in arch/m32r/kernel/entry.S. - Remove ifdef's for CONFIG_CHIP_* configulations. - Rearrange the M32700 workaround code. - Remove the messy platform-dependent interrupt check routines and consolidate them to common INT0/INT1/INT2 check routines for all platforms with cascaded interrupt controllers. Signed-off-by: Hitoshi Yamamoto <[EMAIL PROTECTED]> Signed-off-by: Hirokazu Takata <[EMAIL PROTECTED]> commit e070fb743d9d13d9757e633d1bdd1f9c20b2d792 Author: Hirokazu Takata <[EMAIL PROTECTED]> Date: Fri Aug 17 17:22:15 2007 +0900 m32r: Define symbols to unify platform-dependent ICU checks On some m32r platforms, cascaded ICUs are used. This patch is required to simplify ei_handler and consolidate platform- dependent ICU check routines. platform ICU/INT1 ICU/INT0 ICU/INT2 -- m32104uto - - m32700uto o o opsput o o
Re: 2.6.23-rc3-mm1: m32r defconfig compile error
From: Adrian Bunk <[EMAIL PROTECTED]> Subject: 2.6.23-rc3-mm1: m32r defconfig compile error Date: Mon, 27 Aug 2007 23:27:48 +0200 > On Wed, Aug 22, 2007 at 02:06:48AM -0700, Andrew Morton wrote: > >... > > Changes since 2.6.23-rc2-mm2: > >... > > git-m32r.patch > >... > > git trees > >... > > <-- snip --> > > ... > AS arch/m32r/kernel/entry.o > /home/bunk/linux/kernel-2.6/linux-2.6.23-rc3-mm1/arch/m32r/kernel/entry.S: > Assembler messages: > /home/bunk/linux/kernel-2.6/linux-2.6.23-rc3-mm1/arch/m32r/kernel/entry.S:358: > Error: bad instruction `addi r0,#(0)+(64))+(32))+(32)))' > make[2]: *** [arch/m32r/kernel/entry.o] Error 1 > > <-- snip --> > > cu > Adrian > Hello, Adrian, Thank you for the report. M32700UT/OPSPUT Users, Please apply this patch to build an m32r 2.6.23-rc3-mm1 kernel. This patch has also included to my m32r kernel development git repository. git://www.linux-m32r.org/git/takata/linux-2.6_dev.git linux-m32r Thanks, -- Takata [PATCH 2.6.23-rc3-mm1] m32r: build fix of entry.S This patch is required to fix build errors for the modification: m32r: Simplify ei_handler code commit f6c7546d53a4288501dcdd96d5297214697e7237 Signed-off-by: Hirokazu Takata <[EMAIL PROTECTED]> --- arch/m32r/kernel/entry.S |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/m32r/kernel/entry.S b/arch/m32r/kernel/entry.S index c46cfaa..42b08bf 100644 --- a/arch/m32r/kernel/entry.S +++ b/arch/m32r/kernel/entry.S @@ -355,7 +355,7 @@ ENTRY(ei_handler) lduhr0, @(low(M32R_INT0ICU_ISTS),r0); bit10-6 : ISN sllir0, #21 srlir0, #27 ; ISN - addir0, #(M32R_INT0ICU_IRQ_BASE) + add3r0, r0, #(M32R_INT0ICU_IRQ_BASE) bra check_end .fillinsn 4: @@ -367,7 +367,7 @@ ENTRY(ei_handler) lduhr0, @(low(M32R_INT2ICU_ISTS),r0); bit10-6 : ISN sllir0, #21 srlir0, #27 ; ISN - addir0, #(M32R_INT2ICU_IRQ_BASE) + add3r0, r0, #(M32R_INT2ICU_IRQ_BASE) ; bra check_end .fillinsn 5: -- 1.5.2.4 -- Hirokazu Takata <[EMAIL PROTECTED]> Linux/M32R Project: http://www.linux-m32r.org/ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: 2.6.23-rc3-mm1: m32r defconfig compile error
From: Adrian Bunk [EMAIL PROTECTED] Subject: 2.6.23-rc3-mm1: m32r defconfig compile error Date: Mon, 27 Aug 2007 23:27:48 +0200 On Wed, Aug 22, 2007 at 02:06:48AM -0700, Andrew Morton wrote: ... Changes since 2.6.23-rc2-mm2: ... git-m32r.patch ... git trees ... -- snip -- ... AS arch/m32r/kernel/entry.o /home/bunk/linux/kernel-2.6/linux-2.6.23-rc3-mm1/arch/m32r/kernel/entry.S: Assembler messages: /home/bunk/linux/kernel-2.6/linux-2.6.23-rc3-mm1/arch/m32r/kernel/entry.S:358: Error: bad instruction `addi r0,#(0)+(64))+(32))+(32)))' make[2]: *** [arch/m32r/kernel/entry.o] Error 1 -- snip -- cu Adrian Hello, Adrian, Thank you for the report. M32700UT/OPSPUT Users, Please apply this patch to build an m32r 2.6.23-rc3-mm1 kernel. This patch has also included to my m32r kernel development git repository. git://www.linux-m32r.org/git/takata/linux-2.6_dev.git linux-m32r Thanks, -- Takata [PATCH 2.6.23-rc3-mm1] m32r: build fix of entry.S This patch is required to fix build errors for the modification: m32r: Simplify ei_handler code commit f6c7546d53a4288501dcdd96d5297214697e7237 Signed-off-by: Hirokazu Takata [EMAIL PROTECTED] --- arch/m32r/kernel/entry.S |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/m32r/kernel/entry.S b/arch/m32r/kernel/entry.S index c46cfaa..42b08bf 100644 --- a/arch/m32r/kernel/entry.S +++ b/arch/m32r/kernel/entry.S @@ -355,7 +355,7 @@ ENTRY(ei_handler) lduhr0, @(low(M32R_INT0ICU_ISTS),r0); bit10-6 : ISN sllir0, #21 srlir0, #27 ; ISN - addir0, #(M32R_INT0ICU_IRQ_BASE) + add3r0, r0, #(M32R_INT0ICU_IRQ_BASE) bra check_end .fillinsn 4: @@ -367,7 +367,7 @@ ENTRY(ei_handler) lduhr0, @(low(M32R_INT2ICU_ISTS),r0); bit10-6 : ISN sllir0, #21 srlir0, #27 ; ISN - addir0, #(M32R_INT2ICU_IRQ_BASE) + add3r0, r0, #(M32R_INT2ICU_IRQ_BASE) ; bra check_end .fillinsn 5: -- 1.5.2.4 -- Hirokazu Takata [EMAIL PROTECTED] Linux/M32R Project: http://www.linux-m32r.org/ - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 11/23] make atomic_read() and atomic_set() behavior consistent on m32r
Hi, Chris, From: Hirokazu Takata <[EMAIL PROTECTED]> Date: Wed, 22 Aug 2007 10:56:54 +0900 > From: Chris Snook <[EMAIL PROTECTED]> > Date: Mon, 13 Aug 2007 07:24:52 -0400 > > From: Chris Snook <[EMAIL PROTECTED]> > > > > Use volatile consistently in atomic.h on m32r. > > > > Signed-off-by: Chris Snook <[EMAIL PROTECTED]> > > Thanks, > > Acked-by: Hirokazu Takata <[EMAIL PROTECTED]> Hmmm.. It seems my reply was overhasty. Applying the above patch, I have many warning messages like this: <-- snip --> ... CC kernel/sched.o In file included from /project/m32r-linux/kernel/work/linux-2.6_dev.git/include/linux/netlink.h:139, from /project/m32r-linux/kernel/work/linux-2.6_dev.git/include/linux/genetlink.h:4, from /project/m32r-linux/kernel/work/linux-2.6_dev.git/include/net/genetlink.h:4, from /project/m32r-linux/kernel/work/linux-2.6_dev.git/include/linux/taskstats_kern.h:12, from /project/m32r-linux/kernel/work/linux-2.6_dev.git/include/linux/delayacct.h:21, from /project/m32r-linux/kernel/work/linux-2.6_dev.git/kernel/sched.c:61: /project/m32r-linux/kernel/work/linux-2.6_dev.git/include/linux/skbuff.h: In function 'skb_shared': /project/m32r-linux/kernel/work/linux-2.6_dev.git/include/linux/skbuff.h:521: warning: passing argument 1 of 'atomic_read' discards qualifiers from pointer target type ... <-- snip --> In this case, it is because stb_shared() is defined with a parameter with "const" qualifier, in include/linux/skbuff.h. static inline int skb_shared(const struct sk_buff *skb) { return atomic_read(>users) != 1; } I think the parameter of atomic_read() should have "const" qualifier to avoid these warnings, and IMHO this modification might be worth applying on other archs. Here is an additional patch to revise the previous one for m32r. I also tried to rewrite it with inline asm code, but the kernel text size bacame roughly 2kB larger. So, I prefer C version. Thanks, -- Takata [PATCH] m32r: Add "const" qualifier to the parameter of atomic_read() Update atomic_read() to avoid the following warning of gcc-4.1.x: warning: passing argument 1 of 'atomic_read' discards qualifiers from pointer target type Signed-off-by: Hirokazu Takata <[EMAIL PROTECTED]> Cc: Chris Snook <[EMAIL PROTECTED]> --- include/asm-m32r/atomic.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/include/asm-m32r/atomic.h b/include/asm-m32r/atomic.h index ba19689..9d46f86 100644 --- a/include/asm-m32r/atomic.h +++ b/include/asm-m32r/atomic.h @@ -32,7 +32,7 @@ typedef struct { int counter; } atomic_t; * * Atomically reads the value of @v. */ -static __inline__ int atomic_read(atomic_t *v) +static __inline__ int atomic_read(const atomic_t *v) { return *(volatile int *)>counter; } -- 1.5.2.4 -- Hirokazu Takata <[EMAIL PROTECTED]> Linux/M32R Project: http://www.linux-m32r.org/ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 11/23] make atomic_read() and atomic_set() behavior consistent on m32r
From: Chris Snook <[EMAIL PROTECTED]> Date: Mon, 13 Aug 2007 07:24:52 -0400 > From: Chris Snook <[EMAIL PROTECTED]> > > Use volatile consistently in atomic.h on m32r. > > Signed-off-by: Chris Snook <[EMAIL PROTECTED]> Thanks, Acked-by: Hirokazu Takata <[EMAIL PROTECTED]> - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2.6.23-rc2-mm2] build fix of kernel/sysctl_check.c
Include linux/string.h for strcmp() to fix the following build error. This patch is required for 2.6.23-rc2-mm2. <-- snip --> CC kernel/sysctl_check.o /project/m32r-linux/kernel/linux-2.6.23-rc2-mm2/linux-2.6.23-rc2-mm2/kernel/sysctl_check.c: In function 'sysctl_binary_lookup': /project/m32r-linux/kernel/linux-2.6.23-rc2-mm2/linux-2.6.23-rc2-mm2/kernel/sysctl_check.c:1303: error: implicit declaration of function 'strcmp' make[2]: *** [kernel/sysctl_check.o] Error 1 make[1]: *** [kernel] Error 2 make: *** [_all] Error 2 <-- snip --> Signed-off-by: Hirokazu Takata <[EMAIL PROTECTED]> --- kernel/sysctl_check.c |1 + 1 file changed, 1 insertion(+) Index: linux-2.6.23-rc2-mm2/kernel/sysctl_check.c === --- linux-2.6.23-rc2-mm2.orig/kernel/sysctl_check.c +++ linux-2.6.23-rc2-mm2/kernel/sysctl_check.c @@ -3,6 +3,7 @@ #include "../arch/s390/appldata/appldata.h" #include "../fs/xfs/linux-2.6/xfs_sysctl.h" #include +#include #include struct trans_ctl_table { -- Hirokazu Takata <[EMAIL PROTECTED]> Linux/M32R Project: http://www.linux-m32r.org/ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [patch 11/23] Fix m32r __xchg
From: Mathieu Desnoyers <[EMAIL PROTECTED]> Subject: [patch 11/23] Fix m32r __xchg Date: Mon, 20 Aug 2007 16:15:30 -0400 > the #endif /* CONFIG_SMP */ should cover the default condition, or it may > cause > bad parameter to be silently missed. > > To make it work correctly, we have to remove the ifdef CONFIG SMP surrounding > __xchg_called_with_bad_pointer declaration. Thanks to Adrian Bunk for > detecting > this. > > Signed-off-by: Mathieu Desnoyers <[EMAIL PROTECTED]> > CC: [EMAIL PROTECTED] > CC: [EMAIL PROTECTED] > CC: Adrian Bunk <[EMAIL PROTECTED]> > --- > include/asm-m32r/system.h |4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > Acked-by: Hirokazu Takata <[EMAIL PROTECTED]> Thank you, Mathiew and Adrian. -- Takata - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [patch 10/23] New cmpxchg_local (optimized for UP case) for m32r
From: Mathieu Desnoyers <[EMAIL PROTECTED]> Subject: [patch 10/23] New cmpxchg_local (optimized for UP case) for m32r Date: Mon, 20 Aug 2007 16:15:29 -0400 > Add __xchg_local, xchg_local (define), __cmpxchg_local_u32, __cmpxchg_local, > cmpxchg_local(macro). > > cmpxchg_local and cmpxchg64_local will use the architecture specific > __cmpxchg_local_u32 for 32 bits arguments, and use the generic > __cmpxchg_local_generic for 8, 16 and 64 bits arguments. > > Signed-off-by: Mathieu Desnoyers <[EMAIL PROTECTED]> > CC: [EMAIL PROTECTED] > CC: [EMAIL PROTECTED] > CC: [EMAIL PROTECTED] > --- > include/asm-m32r/system.h | 103 > +++--- > 1 file changed, 97 insertions(+), 6 deletions(-) Acked-by: Hirokazu Takata <[EMAIL PROTECTED]> Thanks, -- Takata - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [patch 12/23] local_t m32r use architecture specific cmpxchg_local
Hello, From: Mathieu Desnoyers <[EMAIL PROTECTED]> Subject: [patch 12/23] local_t m32r use architecture specific cmpxchg_local Date: Mon, 20 Aug 2007 16:15:31 -0400 > On m32r, use the new cmpxchg_local as primitive for the local_cmpxchg > operation. > > Signed-off-by: Mathieu Desnoyers <[EMAIL PROTECTED]> > CC: [EMAIL PROTECTED] > CC: [EMAIL PROTECTED] > --- > include/asm-m32r/local.h | 362 > ++- > 1 file changed, 361 insertions(+), 1 deletion(-) I think this patch looks fine. Acked-by: Hirokazu Takata <[EMAIL PROTECTED]> BTW, I need an additional patch to fix a build error, caused by the above patch. -- Takata [PATCH] m32r: build fix of arch/m32r/kernel/smpboot.c This patch is for Mathieu Desnoyers's include/asm-m32r/local.h. Applying the new include/asm-m32r/local.h, inclusion of linux/sched.h is needed to fix a build error of arch/m32r/kernel/smpboot.c. <-- snip --> ... CC arch/m32r/kernel/smpboot.o /project/m32r-linux/kernel/work/linux-2.6_dev.git/arch/m32r/kernel/smpboot.c: In function 'do_boot_cpu': /project/m32r-linux/kernel/work/linux-2.6_dev.git/arch/m32r/kernel/smpboot.c:279: error: implicit declaration of function 'fork_idle' /project/m32r-linux/kernel/work/linux-2.6_dev.git/arch/m32r/kernel/smpboot.c:279: warning: assignment makes pointer from integer without a cast /project/m32r-linux/kernel/work/linux-2.6_dev.git/arch/m32r/kernel/smpboot.c:283: error: dereferencing pointer to incomplete type /project/m32r-linux/kernel/work/linux-2.6_dev.git/arch/m32r/kernel/smpboot.c:289: error: dereferencing pointer to incomplete type /project/m32r-linux/kernel/work/linux-2.6_dev.git/arch/m32r/kernel/smpboot.c:290: error: implicit declaration of function 'task_thread_info' /project/m32r-linux/kernel/work/linux-2.6_dev.git/arch/m32r/kernel/smpboot.c:290: error: invalid type argument of '->' /project/m32r-linux/kernel/work/linux-2.6_dev.git/arch/m32r/kernel/smpboot.c: In function 'start_secondary': /project/m32r-linux/kernel/work/linux-2.6_dev.git/arch/m32r/kernel/smpboot.c:429: error: implicit declaration of function 'cpu_init' make[2]: *** [arch/m32r/kernel/smpboot.o] Error 1 <-- snip --> Signed-off-by: Hirokazu Takata <[EMAIL PROTECTED]> --- arch/m32r/kernel/smpboot.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/arch/m32r/kernel/smpboot.c b/arch/m32r/kernel/smpboot.c index 9dae410..b41aa78 100644 --- a/arch/m32r/kernel/smpboot.c +++ b/arch/m32r/kernel/smpboot.c @@ -43,6 +43,7 @@ #include #include #include +#include #include #include #include -- 1.5.2.4 -- Hirokazu Takata <[EMAIL PROTECTED]> Linux/M32R Project: http://www.linux-m32r.org/ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 11/23] make atomic_read() and atomic_set() behavior consistent on m32r
Hi, Chris, From: Hirokazu Takata [EMAIL PROTECTED] Date: Wed, 22 Aug 2007 10:56:54 +0900 From: Chris Snook [EMAIL PROTECTED] Date: Mon, 13 Aug 2007 07:24:52 -0400 From: Chris Snook [EMAIL PROTECTED] Use volatile consistently in atomic.h on m32r. Signed-off-by: Chris Snook [EMAIL PROTECTED] Thanks, Acked-by: Hirokazu Takata [EMAIL PROTECTED] Hmmm.. It seems my reply was overhasty. Applying the above patch, I have many warning messages like this: -- snip -- ... CC kernel/sched.o In file included from /project/m32r-linux/kernel/work/linux-2.6_dev.git/include/linux/netlink.h:139, from /project/m32r-linux/kernel/work/linux-2.6_dev.git/include/linux/genetlink.h:4, from /project/m32r-linux/kernel/work/linux-2.6_dev.git/include/net/genetlink.h:4, from /project/m32r-linux/kernel/work/linux-2.6_dev.git/include/linux/taskstats_kern.h:12, from /project/m32r-linux/kernel/work/linux-2.6_dev.git/include/linux/delayacct.h:21, from /project/m32r-linux/kernel/work/linux-2.6_dev.git/kernel/sched.c:61: /project/m32r-linux/kernel/work/linux-2.6_dev.git/include/linux/skbuff.h: In function 'skb_shared': /project/m32r-linux/kernel/work/linux-2.6_dev.git/include/linux/skbuff.h:521: warning: passing argument 1 of 'atomic_read' discards qualifiers from pointer target type ... -- snip -- In this case, it is because stb_shared() is defined with a parameter with const qualifier, in include/linux/skbuff.h. static inline int skb_shared(const struct sk_buff *skb) { return atomic_read(skb-users) != 1; } I think the parameter of atomic_read() should have const qualifier to avoid these warnings, and IMHO this modification might be worth applying on other archs. Here is an additional patch to revise the previous one for m32r. I also tried to rewrite it with inline asm code, but the kernel text size bacame roughly 2kB larger. So, I prefer C version. Thanks, -- Takata [PATCH] m32r: Add const qualifier to the parameter of atomic_read() Update atomic_read() to avoid the following warning of gcc-4.1.x: warning: passing argument 1 of 'atomic_read' discards qualifiers from pointer target type Signed-off-by: Hirokazu Takata [EMAIL PROTECTED] Cc: Chris Snook [EMAIL PROTECTED] --- include/asm-m32r/atomic.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/include/asm-m32r/atomic.h b/include/asm-m32r/atomic.h index ba19689..9d46f86 100644 --- a/include/asm-m32r/atomic.h +++ b/include/asm-m32r/atomic.h @@ -32,7 +32,7 @@ typedef struct { int counter; } atomic_t; * * Atomically reads the value of @v. */ -static __inline__ int atomic_read(atomic_t *v) +static __inline__ int atomic_read(const atomic_t *v) { return *(volatile int *)v-counter; } -- 1.5.2.4 -- Hirokazu Takata [EMAIL PROTECTED] Linux/M32R Project: http://www.linux-m32r.org/ - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [patch 12/23] local_t m32r use architecture specific cmpxchg_local
Hello, From: Mathieu Desnoyers [EMAIL PROTECTED] Subject: [patch 12/23] local_t m32r use architecture specific cmpxchg_local Date: Mon, 20 Aug 2007 16:15:31 -0400 On m32r, use the new cmpxchg_local as primitive for the local_cmpxchg operation. Signed-off-by: Mathieu Desnoyers [EMAIL PROTECTED] CC: [EMAIL PROTECTED] CC: [EMAIL PROTECTED] --- include/asm-m32r/local.h | 362 ++- 1 file changed, 361 insertions(+), 1 deletion(-) I think this patch looks fine. Acked-by: Hirokazu Takata [EMAIL PROTECTED] BTW, I need an additional patch to fix a build error, caused by the above patch. -- Takata [PATCH] m32r: build fix of arch/m32r/kernel/smpboot.c This patch is for Mathieu Desnoyers's include/asm-m32r/local.h. Applying the new include/asm-m32r/local.h, inclusion of linux/sched.h is needed to fix a build error of arch/m32r/kernel/smpboot.c. -- snip -- ... CC arch/m32r/kernel/smpboot.o /project/m32r-linux/kernel/work/linux-2.6_dev.git/arch/m32r/kernel/smpboot.c: In function 'do_boot_cpu': /project/m32r-linux/kernel/work/linux-2.6_dev.git/arch/m32r/kernel/smpboot.c:279: error: implicit declaration of function 'fork_idle' /project/m32r-linux/kernel/work/linux-2.6_dev.git/arch/m32r/kernel/smpboot.c:279: warning: assignment makes pointer from integer without a cast /project/m32r-linux/kernel/work/linux-2.6_dev.git/arch/m32r/kernel/smpboot.c:283: error: dereferencing pointer to incomplete type /project/m32r-linux/kernel/work/linux-2.6_dev.git/arch/m32r/kernel/smpboot.c:289: error: dereferencing pointer to incomplete type /project/m32r-linux/kernel/work/linux-2.6_dev.git/arch/m32r/kernel/smpboot.c:290: error: implicit declaration of function 'task_thread_info' /project/m32r-linux/kernel/work/linux-2.6_dev.git/arch/m32r/kernel/smpboot.c:290: error: invalid type argument of '-' /project/m32r-linux/kernel/work/linux-2.6_dev.git/arch/m32r/kernel/smpboot.c: In function 'start_secondary': /project/m32r-linux/kernel/work/linux-2.6_dev.git/arch/m32r/kernel/smpboot.c:429: error: implicit declaration of function 'cpu_init' make[2]: *** [arch/m32r/kernel/smpboot.o] Error 1 -- snip -- Signed-off-by: Hirokazu Takata [EMAIL PROTECTED] --- arch/m32r/kernel/smpboot.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/arch/m32r/kernel/smpboot.c b/arch/m32r/kernel/smpboot.c index 9dae410..b41aa78 100644 --- a/arch/m32r/kernel/smpboot.c +++ b/arch/m32r/kernel/smpboot.c @@ -43,6 +43,7 @@ #include linux/init.h #include linux/kernel.h #include linux/mm.h +#include linux/sched.h #include linux/err.h #include linux/irq.h #include linux/bootmem.h -- 1.5.2.4 -- Hirokazu Takata [EMAIL PROTECTED] Linux/M32R Project: http://www.linux-m32r.org/ - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [patch 10/23] New cmpxchg_local (optimized for UP case) for m32r
From: Mathieu Desnoyers [EMAIL PROTECTED] Subject: [patch 10/23] New cmpxchg_local (optimized for UP case) for m32r Date: Mon, 20 Aug 2007 16:15:29 -0400 Add __xchg_local, xchg_local (define), __cmpxchg_local_u32, __cmpxchg_local, cmpxchg_local(macro). cmpxchg_local and cmpxchg64_local will use the architecture specific __cmpxchg_local_u32 for 32 bits arguments, and use the generic __cmpxchg_local_generic for 8, 16 and 64 bits arguments. Signed-off-by: Mathieu Desnoyers [EMAIL PROTECTED] CC: [EMAIL PROTECTED] CC: [EMAIL PROTECTED] CC: [EMAIL PROTECTED] --- include/asm-m32r/system.h | 103 +++--- 1 file changed, 97 insertions(+), 6 deletions(-) Acked-by: Hirokazu Takata [EMAIL PROTECTED] Thanks, -- Takata - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [patch 11/23] Fix m32r __xchg
From: Mathieu Desnoyers [EMAIL PROTECTED] Subject: [patch 11/23] Fix m32r __xchg Date: Mon, 20 Aug 2007 16:15:30 -0400 the #endif /* CONFIG_SMP */ should cover the default condition, or it may cause bad parameter to be silently missed. To make it work correctly, we have to remove the ifdef CONFIG SMP surrounding __xchg_called_with_bad_pointer declaration. Thanks to Adrian Bunk for detecting this. Signed-off-by: Mathieu Desnoyers [EMAIL PROTECTED] CC: [EMAIL PROTECTED] CC: [EMAIL PROTECTED] CC: Adrian Bunk [EMAIL PROTECTED] --- include/asm-m32r/system.h |4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) Acked-by: Hirokazu Takata [EMAIL PROTECTED] Thank you, Mathiew and Adrian. -- Takata - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2.6.23-rc2-mm2] build fix of kernel/sysctl_check.c
Include linux/string.h for strcmp() to fix the following build error. This patch is required for 2.6.23-rc2-mm2. -- snip -- CC kernel/sysctl_check.o /project/m32r-linux/kernel/linux-2.6.23-rc2-mm2/linux-2.6.23-rc2-mm2/kernel/sysctl_check.c: In function 'sysctl_binary_lookup': /project/m32r-linux/kernel/linux-2.6.23-rc2-mm2/linux-2.6.23-rc2-mm2/kernel/sysctl_check.c:1303: error: implicit declaration of function 'strcmp' make[2]: *** [kernel/sysctl_check.o] Error 1 make[1]: *** [kernel] Error 2 make: *** [_all] Error 2 -- snip -- Signed-off-by: Hirokazu Takata [EMAIL PROTECTED] --- kernel/sysctl_check.c |1 + 1 file changed, 1 insertion(+) Index: linux-2.6.23-rc2-mm2/kernel/sysctl_check.c === --- linux-2.6.23-rc2-mm2.orig/kernel/sysctl_check.c +++ linux-2.6.23-rc2-mm2/kernel/sysctl_check.c @@ -3,6 +3,7 @@ #include ../arch/s390/appldata/appldata.h #include ../fs/xfs/linux-2.6/xfs_sysctl.h #include linux/sunrpc/debug.h +#include linux/string.h #include net/ip_vs.h struct trans_ctl_table { -- Hirokazu Takata [EMAIL PROTECTED] Linux/M32R Project: http://www.linux-m32r.org/ - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 11/23] make atomic_read() and atomic_set() behavior consistent on m32r
From: Chris Snook [EMAIL PROTECTED] Date: Mon, 13 Aug 2007 07:24:52 -0400 From: Chris Snook [EMAIL PROTECTED] Use volatile consistently in atomic.h on m32r. Signed-off-by: Chris Snook [EMAIL PROTECTED] Thanks, Acked-by: Hirokazu Takata [EMAIL PROTECTED] - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 52] include/asm-m32r/thread_info.h: kmalloc + memset conversion to kzalloc
From: Mariusz Kozlowski <[EMAIL PROTECTED]> Date: Tue, 31 Jul 2007 21:18:33 +0200 > Signed-off-by: Mariusz Kozlowski <[EMAIL PROTECTED]> > > include/asm-m32r/thread_info.h |5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > Acked-by: Hirokazu Takata <[EMAIL PROTECTED]> Thank you. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 52] include/asm-m32r/thread_info.h: kmalloc + memset conversion to kzalloc
From: Mariusz Kozlowski [EMAIL PROTECTED] Date: Tue, 31 Jul 2007 21:18:33 +0200 Signed-off-by: Mariusz Kozlowski [EMAIL PROTECTED] include/asm-m32r/thread_info.h |5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) Acked-by: Hirokazu Takata [EMAIL PROTECTED] Thank you. - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Remove fs.h from mm.h
From: Alexey Dobriyan <[EMAIL PROTECTED]> > Apologies. I just finished adding m32r to my cross-build setup, so there > shouldn't be any more such breakages. Many thanks for your erabolation of cross-build check. -- Takata - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Remove fs.h from mm.h
Hi, Alexery, This change breaks m32r, too. Don't forget updating the other archs, please. From: Linus Torvalds <[EMAIL PROTECTED]> Subject: Re: [PATCH] Remove fs.h from mm.h Date: Sun, 29 Jul 2007 17:08:20 -0700 (PDT) > > On Mon, 30 Jul 2007, Alexey Dobriyan wrote: > > > > Cross-compile tested without regressions on my two usual configs and (sigh): > > > > alpha arm-mx1adsmips-bigsur powerpc-ebony > .. > > Heh. > > Kudos for going above and beyond. > > "But where is blackfin and frv?" > > Thanks, > > Linus > - Here is a patch for the m32r. [PATCH] m32r: build fix for removing fs.h from mm.h This patch is required against the commit: Remove fs.h from mm.h 4e950f6f0189f65f8bf069cf2272649ef418f5e4 Signed-off-by: Hirokazu Takata <[EMAIL PROTECTED]> --- arch/m32r/kernel/ptrace.c |1 + arch/m32r/kernel/smpboot.c |1 + arch/m32r/kernel/sys_m32r.c |1 + 3 files changed, 3 insertions(+), 0 deletions(-) diff --git a/arch/m32r/kernel/ptrace.c b/arch/m32r/kernel/ptrace.c index 57a92ef..62a5142 100644 --- a/arch/m32r/kernel/ptrace.c +++ b/arch/m32r/kernel/ptrace.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/m32r/kernel/smpboot.c b/arch/m32r/kernel/smpboot.c index 3eb3059..9dae410 100644 --- a/arch/m32r/kernel/smpboot.c +++ b/arch/m32r/kernel/smpboot.c @@ -43,6 +43,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/m32r/kernel/sys_m32r.c b/arch/m32r/kernel/sys_m32r.c index bda8554..b13dbbe 100644 --- a/arch/m32r/kernel/sys_m32r.c +++ b/arch/m32r/kernel/sys_m32r.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include -- 1.5.2.4 -- Hirokazu Takata <[EMAIL PROTECTED]> Linux/M32R Project: http://www.linux-m32r.org/ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Remove fs.h from mm.h
Hi, Alexery, This change breaks m32r, too. Don't forget updating the other archs, please. From: Linus Torvalds [EMAIL PROTECTED] Subject: Re: [PATCH] Remove fs.h from mm.h Date: Sun, 29 Jul 2007 17:08:20 -0700 (PDT) On Mon, 30 Jul 2007, Alexey Dobriyan wrote: Cross-compile tested without regressions on my two usual configs and (sigh): alpha arm-mx1adsmips-bigsur powerpc-ebony .. Heh. Kudos for going above and beyond. But where is blackfin and frv? Thanks, Linus - Here is a patch for the m32r. [PATCH] m32r: build fix for removing fs.h from mm.h This patch is required against the commit: Remove fs.h from mm.h 4e950f6f0189f65f8bf069cf2272649ef418f5e4 Signed-off-by: Hirokazu Takata [EMAIL PROTECTED] --- arch/m32r/kernel/ptrace.c |1 + arch/m32r/kernel/smpboot.c |1 + arch/m32r/kernel/sys_m32r.c |1 + 3 files changed, 3 insertions(+), 0 deletions(-) diff --git a/arch/m32r/kernel/ptrace.c b/arch/m32r/kernel/ptrace.c index 57a92ef..62a5142 100644 --- a/arch/m32r/kernel/ptrace.c +++ b/arch/m32r/kernel/ptrace.c @@ -17,6 +17,7 @@ #include linux/kernel.h #include linux/sched.h #include linux/mm.h +#include linux/err.h #include linux/smp.h #include linux/smp_lock.h #include linux/errno.h diff --git a/arch/m32r/kernel/smpboot.c b/arch/m32r/kernel/smpboot.c index 3eb3059..9dae410 100644 --- a/arch/m32r/kernel/smpboot.c +++ b/arch/m32r/kernel/smpboot.c @@ -43,6 +43,7 @@ #include linux/init.h #include linux/kernel.h #include linux/mm.h +#include linux/err.h #include linux/irq.h #include linux/bootmem.h #include linux/delay.h diff --git a/arch/m32r/kernel/sys_m32r.c b/arch/m32r/kernel/sys_m32r.c index bda8554..b13dbbe 100644 --- a/arch/m32r/kernel/sys_m32r.c +++ b/arch/m32r/kernel/sys_m32r.c @@ -10,6 +10,7 @@ #include linux/errno.h #include linux/sched.h #include linux/mm.h +#include linux/fs.h #include linux/smp.h #include linux/sem.h #include linux/msg.h -- 1.5.2.4 -- Hirokazu Takata [EMAIL PROTECTED] Linux/M32R Project: http://www.linux-m32r.org/ - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Remove fs.h from mm.h
From: Alexey Dobriyan [EMAIL PROTECTED] Apologies. I just finished adding m32r to my cross-build setup, so there shouldn't be any more such breakages. Many thanks for your erabolation of cross-build check. -- Takata - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] m32r: Fix ei_tx_timeout() in drivers/net/lib8390.c
Change INT0 trigger mode from edge-sense mode to level-sense mode, in order to fix the following timeout error: 'NETDEV WATCHDOG: eth0: transmit timed out'. This patch is required only for the Mappi platform. Signed-off-by: Hirokazu Takata <[EMAIL PROTECTED]> Cc: Hitoshi Yamamoto <[EMAIL PROTECTED]> --- arch/m32r/kernel/setup_mappi.c |5 +++-- drivers/net/lib8390.c |9 - 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/arch/m32r/kernel/setup_mappi.c b/arch/m32r/kernel/setup_mappi.c index 6b2d77d..fe73c9e 100644 --- a/arch/m32r/kernel/setup_mappi.c +++ b/arch/m32r/kernel/setup_mappi.c @@ -45,7 +45,8 @@ static void mask_and_ack_mappi(unsigned int irq) static void end_mappi_irq(unsigned int irq) { - enable_mappi_irq(irq); + if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS))) + enable_mappi_irq(irq); } static unsigned int startup_mappi_irq(unsigned int irq) @@ -88,7 +89,7 @@ void __init init_IRQ(void) irq_desc[M32R_IRQ_INT0].chip = _irq_type; irq_desc[M32R_IRQ_INT0].action = NULL; irq_desc[M32R_IRQ_INT0].depth = 1; - icu_data[M32R_IRQ_INT0].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; + icu_data[M32R_IRQ_INT0].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD11; disable_mappi_irq(M32R_IRQ_INT0); #endif /* CONFIG_M32R_NE2000 */ diff --git a/drivers/net/lib8390.c b/drivers/net/lib8390.c index 5c86e73..721ee38 100644 --- a/drivers/net/lib8390.c +++ b/drivers/net/lib8390.c @@ -219,15 +219,6 @@ static void ei_tx_timeout(struct net_device *dev) int txsr, isr, tickssofar = jiffies - dev->trans_start; unsigned long flags; -#if defined(CONFIG_M32R) && defined(CONFIG_SMP) - unsigned long icucr; - - local_irq_save(flags); - icucr = inl(M32R_ICU_CR1_PORTL); - icucr |= M32R_ICUCR_ISMOD11; - outl(icucr, M32R_ICU_CR1_PORTL); - local_irq_restore(flags); -#endif ei_local->stat.tx_errors++; spin_lock_irqsave(_local->page_lock, flags); -- 1.5.2.3 -- Hirokazu Takata <[EMAIL PROTECTED]> Linux/M32R Project: http://www.linux-m32r.org/ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] m32r: Fix ei_tx_timeout() in drivers/net/lib8390.c
Change INT0 trigger mode from edge-sense mode to level-sense mode, in order to fix the following timeout error: 'NETDEV WATCHDOG: eth0: transmit timed out'. This patch is required only for the Mappi platform. Signed-off-by: Hirokazu Takata [EMAIL PROTECTED] Cc: Hitoshi Yamamoto [EMAIL PROTECTED] --- arch/m32r/kernel/setup_mappi.c |5 +++-- drivers/net/lib8390.c |9 - 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/arch/m32r/kernel/setup_mappi.c b/arch/m32r/kernel/setup_mappi.c index 6b2d77d..fe73c9e 100644 --- a/arch/m32r/kernel/setup_mappi.c +++ b/arch/m32r/kernel/setup_mappi.c @@ -45,7 +45,8 @@ static void mask_and_ack_mappi(unsigned int irq) static void end_mappi_irq(unsigned int irq) { - enable_mappi_irq(irq); + if (!(irq_desc[irq].status (IRQ_DISABLED | IRQ_INPROGRESS))) + enable_mappi_irq(irq); } static unsigned int startup_mappi_irq(unsigned int irq) @@ -88,7 +89,7 @@ void __init init_IRQ(void) irq_desc[M32R_IRQ_INT0].chip = mappi_irq_type; irq_desc[M32R_IRQ_INT0].action = NULL; irq_desc[M32R_IRQ_INT0].depth = 1; - icu_data[M32R_IRQ_INT0].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; + icu_data[M32R_IRQ_INT0].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD11; disable_mappi_irq(M32R_IRQ_INT0); #endif /* CONFIG_M32R_NE2000 */ diff --git a/drivers/net/lib8390.c b/drivers/net/lib8390.c index 5c86e73..721ee38 100644 --- a/drivers/net/lib8390.c +++ b/drivers/net/lib8390.c @@ -219,15 +219,6 @@ static void ei_tx_timeout(struct net_device *dev) int txsr, isr, tickssofar = jiffies - dev-trans_start; unsigned long flags; -#if defined(CONFIG_M32R) defined(CONFIG_SMP) - unsigned long icucr; - - local_irq_save(flags); - icucr = inl(M32R_ICU_CR1_PORTL); - icucr |= M32R_ICUCR_ISMOD11; - outl(icucr, M32R_ICU_CR1_PORTL); - local_irq_restore(flags); -#endif ei_local-stat.tx_errors++; spin_lock_irqsave(ei_local-page_lock, flags); -- 1.5.2.3 -- Hirokazu Takata [EMAIL PROTECTED] Linux/M32R Project: http://www.linux-m32r.org/ - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: who is the M32R maintainer?
Hello, From: "Robert P. J. Day" <[EMAIL PROTECTED]> Subject: who is the M32R maintainer? Date: Thu, 05 Jul 2007 07:21:37 -0400 (EDT) > > there's no M32R MAINTAINER entry. > > rday > > -- > > Robert P. J. Day > Linux Consulting, Training and Annoying Kernel Pedantry > Waterloo, Ontario, CANADA > > http://fsdev.net/wiki/index.php?title=Main_Page > I understand that it's not good. Please apply the following patch for the M32R architecture. [PATCH] m32r: A MAINTAINERS entry for the M32R architecture Signed-off-by: Hirokazu Takata <[EMAIL PROTECTED]> --- MAINTAINERS |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 2c1dfb2..a5c833b 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2297,6 +2297,14 @@ M: [EMAIL PROTECTED] L: [EMAIL PROTECTED] S: Maintained +M32R ARCHITECTURE +P: Hirokazu Takata +M: [EMAIL PROTECTED] +L: [EMAIL PROTECTED] +L: [EMAIL PROTECTED] (in Japanese) +W: http://www.linux-m32r.org/ +S: Maintained + M68K ARCHITECTURE P: Geert Uytterhoeven M: [EMAIL PROTECTED] -- 1.5.1 -- Hirokazu Takata <[EMAIL PROTECTED]> Linux/M32R Project: http://www.linux-m32r.org/ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: who is the M32R maintainer?
Hello, From: Robert P. J. Day [EMAIL PROTECTED] Subject: who is the M32R maintainer? Date: Thu, 05 Jul 2007 07:21:37 -0400 (EDT) there's no M32R MAINTAINER entry. rday -- Robert P. J. Day Linux Consulting, Training and Annoying Kernel Pedantry Waterloo, Ontario, CANADA http://fsdev.net/wiki/index.php?title=Main_Page I understand that it's not good. Please apply the following patch for the M32R architecture. [PATCH] m32r: A MAINTAINERS entry for the M32R architecture Signed-off-by: Hirokazu Takata [EMAIL PROTECTED] --- MAINTAINERS |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 2c1dfb2..a5c833b 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2297,6 +2297,14 @@ M: [EMAIL PROTECTED] L: [EMAIL PROTECTED] S: Maintained +M32R ARCHITECTURE +P: Hirokazu Takata +M: [EMAIL PROTECTED] +L: [EMAIL PROTECTED] +L: [EMAIL PROTECTED] (in Japanese) +W: http://www.linux-m32r.org/ +S: Maintained + M68K ARCHITECTURE P: Geert Uytterhoeven M: [EMAIL PROTECTED] -- 1.5.1 -- Hirokazu Takata [EMAIL PROTECTED] Linux/M32R Project: http://www.linux-m32r.org/ - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] [m32r] __xchg() should be always_inline
Thank you. Acked-by: Hirokazu Takata <[EMAIL PROTECTED]> From: Al Viro <[EMAIL PROTECTED]> Subject: [PATCH] [m32r] __xchg() should be always_inline Date: Tue, 15 May 2007 20:37:00 +0100 > > it depends on elimination of unreachable branches in switch (by object > size), so we must declare it always_inline > > Signed-off-by: Al Viro <[EMAIL PROTECTED]> > --- > include/asm-m32r/system.h |3 ++- > 1 files changed, 2 insertions(+), 1 deletions(-) > > diff --git a/include/asm-m32r/system.h b/include/asm-m32r/system.h > index b291b2f..8ee73d3 100644 > --- a/include/asm-m32r/system.h > +++ b/include/asm-m32r/system.h > @@ -10,6 +10,7 @@ > * Copyright (C) 2004, 2006 Hirokazu Takata > */ > > +#include > #include > > #ifdef __KERNEL__ > @@ -154,7 +155,7 @@ extern void __xchg_called_with_bad_pointer(void); > #define DCACHE_CLEAR(reg0, reg1, addr) > #endif /* CONFIG_CHIP_M32700_TS1 */ > > -static inline unsigned long > +static __always_inline unsigned long > __xchg(unsigned long x, volatile void * ptr, int size) > { > unsigned long flags; > -- > 1.5.0-rc2.GIT > > - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] [m32r] __xchg() should be always_inline
Thank you. Acked-by: Hirokazu Takata [EMAIL PROTECTED] From: Al Viro [EMAIL PROTECTED] Subject: [PATCH] [m32r] __xchg() should be always_inline Date: Tue, 15 May 2007 20:37:00 +0100 it depends on elimination of unreachable branches in switch (by object size), so we must declare it always_inline Signed-off-by: Al Viro [EMAIL PROTECTED] --- include/asm-m32r/system.h |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/include/asm-m32r/system.h b/include/asm-m32r/system.h index b291b2f..8ee73d3 100644 --- a/include/asm-m32r/system.h +++ b/include/asm-m32r/system.h @@ -10,6 +10,7 @@ * Copyright (C) 2004, 2006 Hirokazu Takata takata at linux-m32r.org */ +#include linux/compiler.h #include asm/assembler.h #ifdef __KERNEL__ @@ -154,7 +155,7 @@ extern void __xchg_called_with_bad_pointer(void); #define DCACHE_CLEAR(reg0, reg1, addr) #endif /* CONFIG_CHIP_M32700_TS1 */ -static inline unsigned long +static __always_inline unsigned long __xchg(unsigned long x, volatile void * ptr, int size) { unsigned long flags; -- 1.5.0-rc2.GIT - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 2.6.21] m32r: Fix switch_to macro to push/pop frame pointer if needed
From: Andrew Morton <[EMAIL PROTECTED]> > On Thu, 10 May 2007 13:58:36 +0900 Hirokazu Takata <[EMAIL PROTECTED]> wrote: > > > +#if defined(CONFIG_FRAME_POINTER) > > +|| !defined(CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER) > > hm, I didn't know that the preprocessor permitted that. > > I'll stick a \ in there to be safe. > Oops! It was my mistake. Here is a revised patch, please replace the previous one. Thanks, -- Takata This patch fixes a rarely-happened but severe scheduling problem of the recent m32r kernel of 2.6.17-rc3 or later. In the following previous m32r patch, the switch_to macro was modified not to do unnecessary push/pop operations for tuning. > [PATCH] m32r: update switch_to macro for tuning > 4127272c38619c56f0c1aa01d01c7bd757db70a1 In this modification, only 'lr' and 'sp' registers are push/pop'ed, assuming that the m32r kernel is always compiled with -fomit-frame-pointer option. However, in 2.6 kernel, kernel/sched.c is irregularly compiled with -fno-omit-frame-pointer if CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER is not defined. -- kernel/Makefile -- : ifneq ($(CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER),y) # According to Alan Modra <[EMAIL PROTECTED]>, the -fno-omit-frame-pointer is # needed for x86 only. Why this used to be enabled for all architectures is beyond # me. I suspect most platforms don't need this, but until we know that for sure # I turn this off for IA-64 only. Andreas Schwab says it's also needed on m68k # to get a correct value for the wait-channel (WCHAN in ps). --davidm CFLAGS_sched.o := $(PROFILING) -fno-omit-frame-pointer endif : --- Therefore, for the recent m32r kernel, we have to push/pop 'fp' (frame pointer) if CONFIG_FRAME_POINTER is defined or CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER is not defined. Signed-off-by: Hitoshi Yamamoto <[EMAIL PROTECTED]> Signed-off-by: Hirokazu Takata <[EMAIL PROTECTED]> --- arch/m32r/Kconfig |4 include/asm-m32r/system.h | 11 +++ 2 files changed, 15 insertions(+), 0 deletions(-) diff --git a/arch/m32r/Kconfig b/arch/m32r/Kconfig index 9740d6b..c3bb8a7 100644 --- a/arch/m32r/Kconfig +++ b/arch/m32r/Kconfig @@ -241,6 +241,10 @@ config GENERIC_CALIBRATE_DELAY bool default y +config SCHED_NO_NO_OMIT_FRAME_POINTER +bool +default y + config PREEMPT bool "Preemptible Kernel" help diff --git a/include/asm-m32r/system.h b/include/asm-m32r/system.h index 99ee098..76a6255 100644 --- a/include/asm-m32r/system.h +++ b/include/asm-m32r/system.h @@ -21,12 +21,22 @@ * `next' and `prev' should be struct task_struct, but it isn't always defined */ +#if defined(CONFIG_FRAME_POINTER) \ +|| !defined(CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER) +#define M32R_PUSH_FP " push fp\n" +#define M32R_POP_FP " pop fp\n" +#else +#define M32R_PUSH_FP "" +#define M32R_POP_FP "" +#endif + #define switch_to(prev, next, last) do { \ __asm__ __volatile__ ( \ " sethlr, #high(1f) \n" \ " or3 lr, lr, #low(1f)\n" \ " st lr, @%4 ; store old LR \n" \ " ld lr, @%5 ; load new LR \n" \ + M32R_PUSH_FP \ " st sp, @%2 ; store old SP \n" \ " ld sp, @%3 ; load new SP \n" \ " push%1 ; store `prev' on new stack \n" \ @@ -34,6 +44,7 @@ " .fillinsn \n" \ "1: \n" \ " pop %0 ; restore `__last' from new stack \n" \ + M32R_POP_FP \ : "=r" (last) \ : "0" (prev), \ "r" (&(prev->thread.sp)), "r" (&(next->thread.sp)), \ -- 1.5.1 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 2.6.21] m32r: Fix switch_to macro to push/pop frame pointer if needed
From: Andrew Morton [EMAIL PROTECTED] On Thu, 10 May 2007 13:58:36 +0900 Hirokazu Takata [EMAIL PROTECTED] wrote: +#if defined(CONFIG_FRAME_POINTER) +|| !defined(CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER) hm, I didn't know that the preprocessor permitted that. I'll stick a \ in there to be safe. Oops! It was my mistake. Here is a revised patch, please replace the previous one. Thanks, -- Takata This patch fixes a rarely-happened but severe scheduling problem of the recent m32r kernel of 2.6.17-rc3 or later. In the following previous m32r patch, the switch_to macro was modified not to do unnecessary push/pop operations for tuning. [PATCH] m32r: update switch_to macro for tuning 4127272c38619c56f0c1aa01d01c7bd757db70a1 In this modification, only 'lr' and 'sp' registers are push/pop'ed, assuming that the m32r kernel is always compiled with -fomit-frame-pointer option. However, in 2.6 kernel, kernel/sched.c is irregularly compiled with -fno-omit-frame-pointer if CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER is not defined. -- kernel/Makefile -- : ifneq ($(CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER),y) # According to Alan Modra [EMAIL PROTECTED], the -fno-omit-frame-pointer is # needed for x86 only. Why this used to be enabled for all architectures is beyond # me. I suspect most platforms don't need this, but until we know that for sure # I turn this off for IA-64 only. Andreas Schwab says it's also needed on m68k # to get a correct value for the wait-channel (WCHAN in ps). --davidm CFLAGS_sched.o := $(PROFILING) -fno-omit-frame-pointer endif : --- Therefore, for the recent m32r kernel, we have to push/pop 'fp' (frame pointer) if CONFIG_FRAME_POINTER is defined or CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER is not defined. Signed-off-by: Hitoshi Yamamoto [EMAIL PROTECTED] Signed-off-by: Hirokazu Takata [EMAIL PROTECTED] --- arch/m32r/Kconfig |4 include/asm-m32r/system.h | 11 +++ 2 files changed, 15 insertions(+), 0 deletions(-) diff --git a/arch/m32r/Kconfig b/arch/m32r/Kconfig index 9740d6b..c3bb8a7 100644 --- a/arch/m32r/Kconfig +++ b/arch/m32r/Kconfig @@ -241,6 +241,10 @@ config GENERIC_CALIBRATE_DELAY bool default y +config SCHED_NO_NO_OMIT_FRAME_POINTER +bool +default y + config PREEMPT bool Preemptible Kernel help diff --git a/include/asm-m32r/system.h b/include/asm-m32r/system.h index 99ee098..76a6255 100644 --- a/include/asm-m32r/system.h +++ b/include/asm-m32r/system.h @@ -21,12 +21,22 @@ * `next' and `prev' should be struct task_struct, but it isn't always defined */ +#if defined(CONFIG_FRAME_POINTER) \ +|| !defined(CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER) +#define M32R_PUSH_FP push fp\n +#define M32R_POP_FP pop fp\n +#else +#define M32R_PUSH_FP +#define M32R_POP_FP +#endif + #define switch_to(prev, next, last) do { \ __asm__ __volatile__ ( \ sethlr, #high(1f) \n \ or3 lr, lr, #low(1f)\n \ st lr, @%4 ; store old LR \n \ ld lr, @%5 ; load new LR \n \ + M32R_PUSH_FP \ st sp, @%2 ; store old SP \n \ ld sp, @%3 ; load new SP \n \ push%1 ; store `prev' on new stack \n \ @@ -34,6 +44,7 @@ .fillinsn \n \ 1: \n \ pop %0 ; restore `__last' from new stack \n \ + M32R_POP_FP \ : =r (last) \ : 0 (prev), \ r ((prev-thread.sp)), r ((next-thread.sp)), \ -- 1.5.1 - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2.6.21] m32r: Fix switch_to macro to push/pop frame pointer if needed
Hello, This patch fixes a rarely-happened but severe scheduling problem of the recent m32r kernel of 2.6.17-rc3 or later. In the following previous m32r patch, the switch_to macro was modified not to do unnecessary push/pop operations for tuning. > [PATCH] m32r: update switch_to macro for tuning > 4127272c38619c56f0c1aa01d01c7bd757db70a1 In this modification, only 'lr' and 'sp' registers are push/pop'ed, assuming that the m32r kernel is always compiled with -fomit-frame-pointer option. However, in 2.6 kernel, kernel/sched.c is irregularly compiled with -fno-omit-frame-pointer if CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER is not defined. -- kernel/Makefile -- : ifneq ($(CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER),y) # According to Alan Modra <[EMAIL PROTECTED]>, the -fno-omit-frame-pointer is # needed for x86 only. Why this used to be enabled for all architectures is beyond # me. I suspect most platforms don't need this, but until we know that for sure # I turn this off for IA-64 only. Andreas Schwab says it's also needed on m68k # to get a correct value for the wait-channel (WCHAN in ps). --davidm CFLAGS_sched.o := $(PROFILING) -fno-omit-frame-pointer endif : --- Therefore, for the recent m32r kernel, we have to push/pop 'fp' (frame pointer) if CONFIG_FRAME_POINTER is defined or CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER is not defined. Signed-off-by: Hitoshi Yamamoto <[EMAIL PROTECTED]> Signed-off-by: Hirokazu Takata <[EMAIL PROTECTED]> --- arch/m32r/Kconfig |4 include/asm-m32r/system.h | 11 +++ 2 files changed, 15 insertions(+), 0 deletions(-) diff --git a/arch/m32r/Kconfig b/arch/m32r/Kconfig index 9740d6b..c3bb8a7 100644 --- a/arch/m32r/Kconfig +++ b/arch/m32r/Kconfig @@ -241,6 +241,10 @@ config GENERIC_CALIBRATE_DELAY bool default y +config SCHED_NO_NO_OMIT_FRAME_POINTER +bool +default y + config PREEMPT bool "Preemptible Kernel" help diff --git a/include/asm-m32r/system.h b/include/asm-m32r/system.h index 99ee098..8b47816 100644 --- a/include/asm-m32r/system.h +++ b/include/asm-m32r/system.h @@ -21,12 +21,22 @@ * `next' and `prev' should be struct task_struct, but it isn't always defined */ +#if defined(CONFIG_FRAME_POINTER) +|| !defined(CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER) +#define M32R_PUSH_FP " push fp\n" +#define M32R_POP_FP " pop fp\n" +#else +#define M32R_PUSH_FP "" +#define M32R_POP_FP "" +#endif + #define switch_to(prev, next, last) do { \ __asm__ __volatile__ ( \ " sethlr, #high(1f) \n" \ " or3 lr, lr, #low(1f)\n" \ " st lr, @%4 ; store old LR \n" \ " ld lr, @%5 ; load new LR \n" \ + M32R_PUSH_FP \ " st sp, @%2 ; store old SP \n" \ " ld sp, @%3 ; load new SP \n" \ " push%1 ; store `prev' on new stack \n" \ @@ -34,6 +44,7 @@ " .fillinsn \n" \ "1: \n" \ " pop %0 ; restore `__last' from new stack \n" \ + M32R_POP_FP \ : "=r" (last) \ : "0" (prev), \ "r" (&(prev->thread.sp)), "r" (&(next->thread.sp)), \ -- 1.5.1 -- Hirokazu Takata <[EMAIL PROTECTED]> Linux/M32R Project: http://www.linux-m32r.org/ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2.6.21] m32r: Fix tme_handler to check _PAGE_PRESENT bit
Fix the tlb-miss handler (tme_handler) to check _PAGE_PRESENT bit in order to handle file-mapped or swapped-out pages correctly. This patch is required to fix unexpected page errors for m32r. Signed-off-by: Hitoshi Yamamoto <[EMAIL PROTECTED]> Signed-off-by: Hirokazu Takata <[EMAIL PROTECTED]> --- arch/m32r/mm/mmu.S | 22 +- 1 files changed, 13 insertions(+), 9 deletions(-) diff --git a/arch/m32r/mm/mmu.S b/arch/m32r/mm/mmu.S index 8bb74b1..49a6d16 100644 --- a/arch/m32r/mm/mmu.S +++ b/arch/m32r/mm/mmu.S @@ -163,7 +163,8 @@ ENTRY(tme_handler) ; pte_data = (unsigned long)pte_val(*pte); ld r2, @r3 ; r2: pte data - or3 r2, r2, #2 ; _PAGE_PRESENT(=2) + and3r3, r2, #2 ; _PAGE_PRESENT(=2) check + beqzr3, 3f .fillinsn 5: @@ -264,11 +265,8 @@ ENTRY(tme_handler) ; and3r1, r1, #0xeff ldi r4, #611; _KERNPG_TABLE(=611) - beq r1, r4, 4f ; !pmd_bad(*pmd) ? - .fillinsn -3: - ldi r1, #0 ; r1: pte_data = 0 - bra 5f + bne r1, r4, 3f ; !pmd_bad(*pmd) ? + .fillinsn 4: ; pte = pte_offset(pmd, address); @@ -282,8 +280,10 @@ ENTRY(tme_handler) add r4, r3 ; r4: pte ; pte_data = (unsigned long)pte_val(*pte); ld r1, @r4 ; r1: pte_data - .fillinsn + and3r3, r1, #2 ; _PAGE_PRESENT(=2) check + beqzr3, 3f + .fillinsn ;; set tlb ; r0: address, r1: pte_data, r2: entry ; r3,r4: (free) @@ -295,8 +295,7 @@ ENTRY(tme_handler) and3r4, r4, #(MMU_CONTEXT_ASID_MASK) or r3, r4 st r3, @r2 - or3 r4, r1, #2 ; _PAGE_PRESENT(=2) - st r4, @(4,r2) ; set_tlb_data(entry, pte_data); + st r1, @(4,r2) ; set_tlb_data(entry, pte_data); ld r4, @sp+ ld r3, @sp+ @@ -306,6 +305,11 @@ ENTRY(tme_handler) ld sp, @sp+ rte + .fillinsn +3: + ldi r1, #2 ; r1: pte_data = 0 | _PAGE_PRESENT(=2) + bra 5b + #else #error unknown isa configuration #endif -- 1.5.1 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2.6.21] m32r: Fix pte_to_pgoff(), pgoff_to_pte() and __swp_type() macros
This patch is required to handle file-mapped or swapped-out pages correctly. - Fix pte_to_pgoff() and pgoff_to_pte() macros not to include _PAGE_PROTNONE bit of PTE. Mask value for { ACCESSED, N, (R, W, X), L, G } is not 0xef but 0x7f. - Fix __swp_type() macro for MAX_SWAPFILES_SHIFT(=5), which is defined in include/linux/swap.h. * M32R TLB format [0][1:19] [20:23] [24:31] +---++-+ | VPN ||ASID | +---++-+ +-+-++-+---+-+-+-+-+ |0 PPN ||N|AC |L|G|V| | +-+-++-+---+-+-+-+-+ || RWX | | * software bits in PTE || | +-- _PAGE_FILE | _PAGE_DIRTY || + _PAGE_PRESENT |+ _PAGE_ACCESSED +- _PAGE_PROTNONE Signed-off-by: Hitoshi Yamamoto <[EMAIL PROTECTED]> Signed-off-by: Hirokazu Takata <[EMAIL PROTECTED]> --- include/asm-m32r/pgtable-2level.h |4 ++-- include/asm-m32r/pgtable.h|2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/asm-m32r/pgtable-2level.h b/include/asm-m32r/pgtable-2level.h index 7509257..bca3475 100644 --- a/include/asm-m32r/pgtable-2level.h +++ b/include/asm-m32r/pgtable-2level.h @@ -71,8 +71,8 @@ static inline pmd_t *pmd_offset(pgd_t * dir, unsigned long address) #define pfn_pmd(pfn, prot) __pmd(((pfn) << PAGE_SHIFT) | pgprot_val(prot)) #define PTE_FILE_MAX_BITS 29 -#define pte_to_pgoff(pte) (((pte_val(pte) >> 2) & 0xef) | (((pte_val(pte) >> 10)) << 7)) -#define pgoff_to_pte(off) ((pte_t) { (((off) & 0xef) << 2) | (((off) >> 7) << 10) | _PAGE_FILE }) +#define pte_to_pgoff(pte) (((pte_val(pte) >> 2) & 0x7f) | (((pte_val(pte) >> 10)) << 7)) +#define pgoff_to_pte(off) ((pte_t) { (((off) & 0x7f) << 2) | (((off) >> 7) << 10) | _PAGE_FILE }) #endif /* __KERNEL__ */ #endif /* _ASM_M32R_PGTABLE_2LEVEL_H */ diff --git a/include/asm-m32r/pgtable.h b/include/asm-m32r/pgtable.h index 1c15ba7..4e94876 100644 --- a/include/asm-m32r/pgtable.h +++ b/include/asm-m32r/pgtable.h @@ -366,7 +366,7 @@ static inline void pmd_set(pmd_t * pmdp, pte_t * ptep) #define pte_unmap_nested(pte) do { } while (0) /* Encode and de-code a swap entry */ -#define __swp_type(x) (((x).val >> 2) & 0x3f) +#define __swp_type(x) (((x).val >> 2) & 0x1f) #define __swp_offset(x)((x).val >> 10) #define __swp_entry(type, offset) \ ((swp_entry_t) { ((type) << 2) | ((offset) << 10) }) -- 1.5.1 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2.6.21] m32r: Fix switch_to macro to push/pop frame pointer if needed
Hello, This patch fixes a rarely-happened but severe scheduling problem of the recent m32r kernel of 2.6.17-rc3 or later. In the following previous m32r patch, the switch_to macro was modified not to do unnecessary push/pop operations for tuning. [PATCH] m32r: update switch_to macro for tuning 4127272c38619c56f0c1aa01d01c7bd757db70a1 In this modification, only 'lr' and 'sp' registers are push/pop'ed, assuming that the m32r kernel is always compiled with -fomit-frame-pointer option. However, in 2.6 kernel, kernel/sched.c is irregularly compiled with -fno-omit-frame-pointer if CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER is not defined. -- kernel/Makefile -- : ifneq ($(CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER),y) # According to Alan Modra [EMAIL PROTECTED], the -fno-omit-frame-pointer is # needed for x86 only. Why this used to be enabled for all architectures is beyond # me. I suspect most platforms don't need this, but until we know that for sure # I turn this off for IA-64 only. Andreas Schwab says it's also needed on m68k # to get a correct value for the wait-channel (WCHAN in ps). --davidm CFLAGS_sched.o := $(PROFILING) -fno-omit-frame-pointer endif : --- Therefore, for the recent m32r kernel, we have to push/pop 'fp' (frame pointer) if CONFIG_FRAME_POINTER is defined or CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER is not defined. Signed-off-by: Hitoshi Yamamoto [EMAIL PROTECTED] Signed-off-by: Hirokazu Takata [EMAIL PROTECTED] --- arch/m32r/Kconfig |4 include/asm-m32r/system.h | 11 +++ 2 files changed, 15 insertions(+), 0 deletions(-) diff --git a/arch/m32r/Kconfig b/arch/m32r/Kconfig index 9740d6b..c3bb8a7 100644 --- a/arch/m32r/Kconfig +++ b/arch/m32r/Kconfig @@ -241,6 +241,10 @@ config GENERIC_CALIBRATE_DELAY bool default y +config SCHED_NO_NO_OMIT_FRAME_POINTER +bool +default y + config PREEMPT bool Preemptible Kernel help diff --git a/include/asm-m32r/system.h b/include/asm-m32r/system.h index 99ee098..8b47816 100644 --- a/include/asm-m32r/system.h +++ b/include/asm-m32r/system.h @@ -21,12 +21,22 @@ * `next' and `prev' should be struct task_struct, but it isn't always defined */ +#if defined(CONFIG_FRAME_POINTER) +|| !defined(CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER) +#define M32R_PUSH_FP push fp\n +#define M32R_POP_FP pop fp\n +#else +#define M32R_PUSH_FP +#define M32R_POP_FP +#endif + #define switch_to(prev, next, last) do { \ __asm__ __volatile__ ( \ sethlr, #high(1f) \n \ or3 lr, lr, #low(1f)\n \ st lr, @%4 ; store old LR \n \ ld lr, @%5 ; load new LR \n \ + M32R_PUSH_FP \ st sp, @%2 ; store old SP \n \ ld sp, @%3 ; load new SP \n \ push%1 ; store `prev' on new stack \n \ @@ -34,6 +44,7 @@ .fillinsn \n \ 1: \n \ pop %0 ; restore `__last' from new stack \n \ + M32R_POP_FP \ : =r (last) \ : 0 (prev), \ r ((prev-thread.sp)), r ((next-thread.sp)), \ -- 1.5.1 -- Hirokazu Takata [EMAIL PROTECTED] Linux/M32R Project: http://www.linux-m32r.org/ - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2.6.21] m32r: Fix tme_handler to check _PAGE_PRESENT bit
Fix the tlb-miss handler (tme_handler) to check _PAGE_PRESENT bit in order to handle file-mapped or swapped-out pages correctly. This patch is required to fix unexpected page errors for m32r. Signed-off-by: Hitoshi Yamamoto [EMAIL PROTECTED] Signed-off-by: Hirokazu Takata [EMAIL PROTECTED] --- arch/m32r/mm/mmu.S | 22 +- 1 files changed, 13 insertions(+), 9 deletions(-) diff --git a/arch/m32r/mm/mmu.S b/arch/m32r/mm/mmu.S index 8bb74b1..49a6d16 100644 --- a/arch/m32r/mm/mmu.S +++ b/arch/m32r/mm/mmu.S @@ -163,7 +163,8 @@ ENTRY(tme_handler) ; pte_data = (unsigned long)pte_val(*pte); ld r2, @r3 ; r2: pte data - or3 r2, r2, #2 ; _PAGE_PRESENT(=2) + and3r3, r2, #2 ; _PAGE_PRESENT(=2) check + beqzr3, 3f .fillinsn 5: @@ -264,11 +265,8 @@ ENTRY(tme_handler) ; and3r1, r1, #0xeff ldi r4, #611; _KERNPG_TABLE(=611) - beq r1, r4, 4f ; !pmd_bad(*pmd) ? - .fillinsn -3: - ldi r1, #0 ; r1: pte_data = 0 - bra 5f + bne r1, r4, 3f ; !pmd_bad(*pmd) ? + .fillinsn 4: ; pte = pte_offset(pmd, address); @@ -282,8 +280,10 @@ ENTRY(tme_handler) add r4, r3 ; r4: pte ; pte_data = (unsigned long)pte_val(*pte); ld r1, @r4 ; r1: pte_data - .fillinsn + and3r3, r1, #2 ; _PAGE_PRESENT(=2) check + beqzr3, 3f + .fillinsn ;; set tlb ; r0: address, r1: pte_data, r2: entry ; r3,r4: (free) @@ -295,8 +295,7 @@ ENTRY(tme_handler) and3r4, r4, #(MMU_CONTEXT_ASID_MASK) or r3, r4 st r3, @r2 - or3 r4, r1, #2 ; _PAGE_PRESENT(=2) - st r4, @(4,r2) ; set_tlb_data(entry, pte_data); + st r1, @(4,r2) ; set_tlb_data(entry, pte_data); ld r4, @sp+ ld r3, @sp+ @@ -306,6 +305,11 @@ ENTRY(tme_handler) ld sp, @sp+ rte + .fillinsn +3: + ldi r1, #2 ; r1: pte_data = 0 | _PAGE_PRESENT(=2) + bra 5b + #else #error unknown isa configuration #endif -- 1.5.1 - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2.6.21] m32r: Fix pte_to_pgoff(), pgoff_to_pte() and __swp_type() macros
This patch is required to handle file-mapped or swapped-out pages correctly. - Fix pte_to_pgoff() and pgoff_to_pte() macros not to include _PAGE_PROTNONE bit of PTE. Mask value for { ACCESSED, N, (R, W, X), L, G } is not 0xef but 0x7f. - Fix __swp_type() macro for MAX_SWAPFILES_SHIFT(=5), which is defined in include/linux/swap.h. * M32R TLB format [0][1:19] [20:23] [24:31] +---++-+ | VPN ||ASID | +---++-+ +-+-++-+---+-+-+-+-+ |0 PPN ||N|AC |L|G|V| | +-+-++-+---+-+-+-+-+ || RWX | | * software bits in PTE || | +-- _PAGE_FILE | _PAGE_DIRTY || + _PAGE_PRESENT |+ _PAGE_ACCESSED +- _PAGE_PROTNONE Signed-off-by: Hitoshi Yamamoto [EMAIL PROTECTED] Signed-off-by: Hirokazu Takata [EMAIL PROTECTED] --- include/asm-m32r/pgtable-2level.h |4 ++-- include/asm-m32r/pgtable.h|2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/asm-m32r/pgtable-2level.h b/include/asm-m32r/pgtable-2level.h index 7509257..bca3475 100644 --- a/include/asm-m32r/pgtable-2level.h +++ b/include/asm-m32r/pgtable-2level.h @@ -71,8 +71,8 @@ static inline pmd_t *pmd_offset(pgd_t * dir, unsigned long address) #define pfn_pmd(pfn, prot) __pmd(((pfn) PAGE_SHIFT) | pgprot_val(prot)) #define PTE_FILE_MAX_BITS 29 -#define pte_to_pgoff(pte) (((pte_val(pte) 2) 0xef) | (((pte_val(pte) 10)) 7)) -#define pgoff_to_pte(off) ((pte_t) { (((off) 0xef) 2) | (((off) 7) 10) | _PAGE_FILE }) +#define pte_to_pgoff(pte) (((pte_val(pte) 2) 0x7f) | (((pte_val(pte) 10)) 7)) +#define pgoff_to_pte(off) ((pte_t) { (((off) 0x7f) 2) | (((off) 7) 10) | _PAGE_FILE }) #endif /* __KERNEL__ */ #endif /* _ASM_M32R_PGTABLE_2LEVEL_H */ diff --git a/include/asm-m32r/pgtable.h b/include/asm-m32r/pgtable.h index 1c15ba7..4e94876 100644 --- a/include/asm-m32r/pgtable.h +++ b/include/asm-m32r/pgtable.h @@ -366,7 +366,7 @@ static inline void pmd_set(pmd_t * pmdp, pte_t * ptep) #define pte_unmap_nested(pte) do { } while (0) /* Encode and de-code a swap entry */ -#define __swp_type(x) (((x).val 2) 0x3f) +#define __swp_type(x) (((x).val 2) 0x1f) #define __swp_offset(x)((x).val 10) #define __swp_entry(type, offset) \ ((swp_entry_t) { ((type) 2) | ((offset) 10) }) -- 1.5.1 - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2.6.19.1] m32r: Build fix for processors without ISA_DSP_LEVEL2
Additional fixes for processors without ISA_DSP_LEVEL2. sigcontext_t does not have dummy_acc1h, dummy_acc1l members any longer. This patch is against v2.6.19.1 kernel. From: Hirokazu Takata <[EMAIL PROTECTED]> Subject: [PATCH 2.6.19] m32r: Make userspace headers platform-independent Date: Wed, 06 Dec 2006 19:00:01 +0900 > The m32r kernel 2.6.18-rc1 or after cause build errors of "unknown isa > configuration" for userspace application programs, such as glibc, gdb, etc. > > This is because the recent kernel do not include linux/config.h not to > expose kernel headers for userspace. > > To fix the above compile errors, this patch fixes two headers ptrace.h > and sigcontext.h for m32r and makes them platform-independent. > > Signed-off-by: Hirokazu Takata <[EMAIL PROTECTED]> > --- > arch/m32r/kernel/entry.S | 65 ++-- > include/asm-m32r/ptrace.h | 28 ++--- > include/asm-m32r/sigcontext.h | 13 +--- > 3 files changed, 35 insertions(+), 71 deletions(-) > Signed-off-by: Hirokazu Takata <[EMAIL PROTECTED]> --- arch/m32r/kernel/process.c |2 +- arch/m32r/kernel/signal.c | 26 -- 2 files changed, 5 insertions(+), 23 deletions(-) diff --git a/arch/m32r/kernel/process.c b/arch/m32r/kernel/process.c index 44cbe0c..a689e29 100644 --- a/arch/m32r/kernel/process.c +++ b/arch/m32r/kernel/process.c @@ -174,7 +174,7 @@ void show_regs(struct pt_regs * regs) regs->acc1h, regs->acc1l); #elif defined(CONFIG_ISA_M32R2) || defined(CONFIG_ISA_M32R) printk("ACCH[%08lx]:ACCL[%08lx]\n", \ - regs->acch, regs->accl); + regs->acc0h, regs->acc0l); #else #error unknown isa configuration #endif diff --git a/arch/m32r/kernel/signal.c b/arch/m32r/kernel/signal.c index b60cea4..045f958 100644 --- a/arch/m32r/kernel/signal.c +++ b/arch/m32r/kernel/signal.c @@ -109,19 +109,10 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc, COPY(r10); COPY(r11); COPY(r12); -#if defined(CONFIG_ISA_M32R2) && defined(CONFIG_ISA_DSP_LEVEL2) COPY(acc0h); COPY(acc0l); - COPY(acc1h); - COPY(acc1l); -#elif defined(CONFIG_ISA_M32R2) || defined(CONFIG_ISA_M32R) - COPY(acch); - COPY(accl); - COPY(dummy_acc1h); - COPY(dummy_acc1l); -#else -#error unknown isa configuration -#endif + COPY(acc1h);/* ISA_DSP_LEVEL2 only */ + COPY(acc1l);/* ISA_DSP_LEVEL2 only */ COPY(psw); COPY(bpc); COPY(bbpsw); @@ -196,19 +187,10 @@ setup_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs, COPY(r10); COPY(r11); COPY(r12); -#if defined(CONFIG_ISA_M32R2) && defined(CONFIG_ISA_DSP_LEVEL2) COPY(acc0h); COPY(acc0l); - COPY(acc1h); - COPY(acc1l); -#elif defined(CONFIG_ISA_M32R2) || defined(CONFIG_ISA_M32R) - COPY(acch); - COPY(accl); - COPY(dummy_acc1h); - COPY(dummy_acc1l); -#else -#error unknown isa configuration -#endif + COPY(acc1h);/* ISA_DSP_LEVEL2 only */ + COPY(acc1l); /* ISA_DSP_LEVEL2 only */ COPY(psw); COPY(bpc); COPY(bbpsw); -- 1.4.4.2 -- Hirokazu Takata <[EMAIL PROTECTED]> Linux/M32R Project: http://www.linux-m32r.org/ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2.6.19] m32r: Cosmetic updates and trivial fixes
Cosmetic updates and trivial fixes of m32r arch-dependent files. - Remove RCS ID strings and trailing white lines - Other misc. cosmetic updates Signed-off-by: Hirokazu Takata <[EMAIL PROTECTED]> --- arch/m32r/kernel/head.S |2 -- arch/m32r/lib/ashxdi3.S |3 --- arch/m32r/lib/checksum.S |3 +-- arch/m32r/lib/delay.c|2 -- arch/m32r/lib/memcpy.S |2 -- arch/m32r/lib/memset.S |2 -- arch/m32r/lib/strlen.S |2 -- arch/m32r/mm/fault-nommu.c |5 + arch/m32r/mm/mmu.S |5 + include/asm-m32r/a.out.h |2 -- include/asm-m32r/addrspace.h |1 - include/asm-m32r/bugs.h |2 -- include/asm-m32r/byteorder.h |2 -- include/asm-m32r/cache.h |2 -- include/asm-m32r/cacheflush.h|1 - include/asm-m32r/current.h |3 --- include/asm-m32r/delay.h |2 -- include/asm-m32r/dma.h |2 -- include/asm-m32r/errno.h |3 --- include/asm-m32r/ide.h |6 +- include/asm-m32r/ioctls.h|5 - include/asm-m32r/ipcbuf.h|4 include/asm-m32r/kmap_types.h|4 include/asm-m32r/m32104ut/m32104ut_pld.h | 11 +-- include/asm-m32r/m32700ut/m32700ut_lan.h | 13 + include/asm-m32r/m32700ut/m32700ut_lcd.h | 13 + include/asm-m32r/m32700ut/m32700ut_pld.h | 13 + include/asm-m32r/mappi2/mappi2_pld.h | 13 ++--- include/asm-m32r/mappi3/mappi3_pld.h | 11 +-- include/asm-m32r/mc146818rtc.h |3 --- include/asm-m32r/mman.h |2 -- include/asm-m32r/mmu.h | 10 ++ include/asm-m32r/mmu_context.h |9 ++--- include/asm-m32r/module.h|3 --- include/asm-m32r/msgbuf.h|4 include/asm-m32r/namei.h |4 include/asm-m32r/opsput/opsput_lan.h | 13 + include/asm-m32r/opsput/opsput_lcd.h | 13 + include/asm-m32r/opsput/opsput_pld.h | 13 + include/asm-m32r/page.h |5 - include/asm-m32r/param.h |4 include/asm-m32r/pci.h |2 -- include/asm-m32r/pgalloc.h |3 --- include/asm-m32r/pgtable-2level.h|3 --- include/asm-m32r/posix_types.h |4 include/asm-m32r/rtc.h |4 include/asm-m32r/scatterlist.h |2 -- include/asm-m32r/sections.h |1 - include/asm-m32r/segment.h |4 include/asm-m32r/sembuf.h|4 include/asm-m32r/setup.h |4 include/asm-m32r/shmbuf.h|4 include/asm-m32r/shmparam.h |2 -- include/asm-m32r/sigcontext.h|3 --- include/asm-m32r/siginfo.h |2 -- include/asm-m32r/signal.h|4 include/asm-m32r/smp.h |3 --- include/asm-m32r/sockios.h |2 -- include/asm-m32r/spinlock_types.h|2 +- include/asm-m32r/stat.h |4 include/asm-m32r/string.h|2 -- include/asm-m32r/syscall.h |3 --- include/asm-m32r/system.h|2 +- include/asm-m32r/termbits.h |4 +--- include/asm-m32r/termios.h |2 -- include/asm-m32r/timex.h |3 --- include/asm-m32r/tlbflush.h |1 - include/asm-m32r/types.h |6 +- include/asm-m32r/ucontext.h |2 -- include/asm-m32r/unaligned.h |8 +--- include/asm-m32r/unistd.h|2 -- include/asm-m32r/user.h |6 -- include/asm-m32r/vga.h |4 +--- include/asm-m32r/xor.h |2 -- 74 files changed, 68 insertions(+), 258 deletions(-) diff --git a/arch/m32r/kernel/head.S b/arch/m32r/kernel/head.S index 0d3c8ee..dab7436 100644 --- a/arch/m32r/kernel/head.S +++ b/arch/m32r/kernel/head.S @@ -7,8 +7,6 @@ *Hitoshi Yamamoto */ -/* $Id$ */ - #include __INIT __INITDATA diff --git a/arch/m32r/lib/ashxdi3.S b/arch/m32r/lib/ashxdi3.S index 107594b..7fc0c19 100644 --- a/arch/m32r/lib/ashxdi3.S +++ b/arch/m32r/lib/ashxdi3.S @@ -4,8 +4,6 @@ * Copyright (C) 2001,2002 Hiroyuki Kondo, and Hirokazu Takata * */ -/* $Id$ */ - ; ; input (r0,r1) src @@ -293,4 +291,3 @@ __lshrdi3: #endif /* not CONFIG_ISA_DUAL_ISSUE */ .end - diff --git a/arch/m32r/lib/checksum.S b/arch/m32r/lib/chec
[PATCH 2.6.19] m32r: Fix do_page_fault and update_mmu_cache
Fix do_page_fault and update_mmu_cache. * Fix do_page_fault (vmalloc_fault:) to pass error_code correctly to update_mmu_cache by using a thread-fault code for all m32r chips. * Fix update_mmu_cache for OPSP chip - #ifdef CONFIG_CHIP_OPSP portion is a workaround of OPSP; Add a notfound-case operation to update_mmu_cache for OPSP like other m32r chip. - Fix pte_data that was not initialized if no entry found. Signed-off-by: Kazuhiro Inaoka <[EMAIL PROTECTED]> Signed-off-by: Hirokazu Takata <[EMAIL PROTECTED]> --- arch/m32r/mm/fault.c | 40 +++- 1 files changed, 19 insertions(+), 21 deletions(-) diff --git a/arch/m32r/mm/fault.c b/arch/m32r/mm/fault.c index 9b9feb0..fc7ccdf 100644 --- a/arch/m32r/mm/fault.c +++ b/arch/m32r/mm/fault.c @@ -362,8 +362,10 @@ vmalloc_fault: if (!pte_present(*pte_k)) goto no_context; - addr = (address & PAGE_MASK) | (error_code & ACE_INSTRUCTION); + addr = (address & PAGE_MASK); + set_thread_fault_code(error_code); update_mmu_cache(NULL, addr, *pte_k); + set_thread_fault_code(0); return; } } @@ -377,7 +379,7 @@ vmalloc_fault: void update_mmu_cache(struct vm_area_struct *vma, unsigned long vaddr, pte_t pte) { - unsigned long *entry1, *entry2; + volatile unsigned long *entry1, *entry2; unsigned long pte_data, flags; unsigned int *entry_dat; int inst = get_thread_fault_code() & ACE_INSTRUCTION; @@ -391,30 +393,26 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long vaddr, vaddr = (vaddr & PAGE_MASK) | get_asid(); + pte_data = pte_val(pte); + #ifdef CONFIG_CHIP_OPSP entry1 = (unsigned long *)ITLB_BASE; - for(i = 0 ; i < NR_TLB_ENTRIES; i++) { - if(*entry1++ == vaddr) { - pte_data = pte_val(pte); - set_tlb_data(entry1, pte_data); - break; - } - entry1++; + for (i = 0; i < NR_TLB_ENTRIES; i++) { + if (*entry1++ == vaddr) { + set_tlb_data(entry1, pte_data); + break; + } + entry1++; } entry2 = (unsigned long *)DTLB_BASE; - for(i = 0 ; i < NR_TLB_ENTRIES ; i++) { - if(*entry2++ == vaddr) { - pte_data = pte_val(pte); - set_tlb_data(entry2, pte_data); - break; - } - entry2++; + for (i = 0; i < NR_TLB_ENTRIES; i++) { + if (*entry2++ == vaddr) { + set_tlb_data(entry2, pte_data); + break; + } + entry2++; } - local_irq_restore(flags); - return; #else - pte_data = pte_val(pte); - /* * Update TLB entries * entry1: ITLB entry address @@ -439,6 +437,7 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long vaddr, "i" (MSVA_offset), "i" (MTOP_offset), "i" (MIDXI_offset) : "r4", "memory" ); +#endif if ((!inst && entry2 >= DTLB_END) || (inst && entry1 >= ITLB_END)) goto notfound; @@ -482,7 +481,6 @@ notfound: set_tlb_data(entry1, pte_data); goto found; -#endif } /*==* -- 1.4.4.2 -- Hirokazu Takata <[EMAIL PROTECTED]> Linux/M32R Project: http://www.linux-m32r.org/ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2.6.19] m32r: Fix kernel entry address of vmlinux
This patch fixes the kernel entry point address of vmlinux. The m32r kernel entry address is 0x08002000 (physical). But, so far, the ENTRY point written in vmlinux.lds.S was not point the correct kernel entry address. (before fix) $ objdump -x vmlinux vmlinux: file format elf32-m32r-linux vmlinux architecture: m32r2, flags 0x0112: EXEC_P, HAS_SYMS, D_PAGED start address 0x88002090/* NG */ : Sections: Idx Name Size VMA LMA File off Algn 0 .empty_zero_page 1000 88001000 88001000 1000 2**12 CONTENTS, ALLOC, LOAD, DATA 1 .boot 008c 88002000 88002000 2000 2**2 CONTENTS, ALLOC, LOAD, READONLY, CODE 2 .text 001ab694 88002090 88002090 2090 2**4 CONTENTS, ALLOC, LOAD, READONLY, CODE : (after fix) $ objdump -x vmlinux vmlinux: file format elf32-m32r-linux vmlinux architecture: m32r2, flags 0x0112: EXEC_P, HAS_SYMS, D_PAGED start address 0x08002000/* OK */ : This fix also remedies the following GDB error message (of gdb-6.4 or after) at the first operation of kernel debugging: "Previous frame identical to this frame (corrupt stack?)". Signed-off-by: Hirokazu Takata <[EMAIL PROTECTED]> --- arch/m32r/Makefile |2 +- arch/m32r/kernel/vmlinux.lds.S |5 - 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/arch/m32r/Makefile b/arch/m32r/Makefile index f219c47..cdf63b2 100644 --- a/arch/m32r/Makefile +++ b/arch/m32r/Makefile @@ -7,7 +7,7 @@ LDFLAGS:= OBJCOPYFLAGS := -O binary -R .note -R .comment -S -LDFLAGS_vmlinux:= -e startup_32 +LDFLAGS_vmlinux:= CFLAGS += -pipe -fno-schedule-insns CFLAGS_KERNEL += -mmodel=medium diff --git a/arch/m32r/kernel/vmlinux.lds.S b/arch/m32r/kernel/vmlinux.lds.S index 358b9ce..c497a2f 100644 --- a/arch/m32r/kernel/vmlinux.lds.S +++ b/arch/m32r/kernel/vmlinux.lds.S @@ -6,12 +6,15 @@ #include OUTPUT_ARCH(m32r) -ENTRY(startup_32) #if defined(__LITTLE_ENDIAN__) jiffies = jiffies_64; #else jiffies = jiffies_64 + 4; #endif + +kernel_entry = boot - 0x8000; +ENTRY(kernel_entry) + SECTIONS { . = CONFIG_MEMORY_START + __PAGE_OFFSET; -- 1.4.4.2 -- Hirokazu Takata <[EMAIL PROTECTED]> Linux/M32R Project: http://www.linux-m32r.org/ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2.6.19] m32r: Fix do_page_fault and update_mmu_cache
Fix do_page_fault and update_mmu_cache. * Fix do_page_fault (vmalloc_fault:) to pass error_code correctly to update_mmu_cache by using a thread-fault code for all m32r chips. * Fix update_mmu_cache for OPSP chip - #ifdef CONFIG_CHIP_OPSP portion is a workaround of OPSP; Add a notfound-case operation to update_mmu_cache for OPSP like other m32r chip. - Fix pte_data that was not initialized if no entry found. Signed-off-by: Kazuhiro Inaoka [EMAIL PROTECTED] Signed-off-by: Hirokazu Takata [EMAIL PROTECTED] --- arch/m32r/mm/fault.c | 40 +++- 1 files changed, 19 insertions(+), 21 deletions(-) diff --git a/arch/m32r/mm/fault.c b/arch/m32r/mm/fault.c index 9b9feb0..fc7ccdf 100644 --- a/arch/m32r/mm/fault.c +++ b/arch/m32r/mm/fault.c @@ -362,8 +362,10 @@ vmalloc_fault: if (!pte_present(*pte_k)) goto no_context; - addr = (address PAGE_MASK) | (error_code ACE_INSTRUCTION); + addr = (address PAGE_MASK); + set_thread_fault_code(error_code); update_mmu_cache(NULL, addr, *pte_k); + set_thread_fault_code(0); return; } } @@ -377,7 +379,7 @@ vmalloc_fault: void update_mmu_cache(struct vm_area_struct *vma, unsigned long vaddr, pte_t pte) { - unsigned long *entry1, *entry2; + volatile unsigned long *entry1, *entry2; unsigned long pte_data, flags; unsigned int *entry_dat; int inst = get_thread_fault_code() ACE_INSTRUCTION; @@ -391,30 +393,26 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long vaddr, vaddr = (vaddr PAGE_MASK) | get_asid(); + pte_data = pte_val(pte); + #ifdef CONFIG_CHIP_OPSP entry1 = (unsigned long *)ITLB_BASE; - for(i = 0 ; i NR_TLB_ENTRIES; i++) { - if(*entry1++ == vaddr) { - pte_data = pte_val(pte); - set_tlb_data(entry1, pte_data); - break; - } - entry1++; + for (i = 0; i NR_TLB_ENTRIES; i++) { + if (*entry1++ == vaddr) { + set_tlb_data(entry1, pte_data); + break; + } + entry1++; } entry2 = (unsigned long *)DTLB_BASE; - for(i = 0 ; i NR_TLB_ENTRIES ; i++) { - if(*entry2++ == vaddr) { - pte_data = pte_val(pte); - set_tlb_data(entry2, pte_data); - break; - } - entry2++; + for (i = 0; i NR_TLB_ENTRIES; i++) { + if (*entry2++ == vaddr) { + set_tlb_data(entry2, pte_data); + break; + } + entry2++; } - local_irq_restore(flags); - return; #else - pte_data = pte_val(pte); - /* * Update TLB entries * entry1: ITLB entry address @@ -439,6 +437,7 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long vaddr, i (MSVA_offset), i (MTOP_offset), i (MIDXI_offset) : r4, memory ); +#endif if ((!inst entry2 = DTLB_END) || (inst entry1 = ITLB_END)) goto notfound; @@ -482,7 +481,6 @@ notfound: set_tlb_data(entry1, pte_data); goto found; -#endif } /*==* -- 1.4.4.2 -- Hirokazu Takata [EMAIL PROTECTED] Linux/M32R Project: http://www.linux-m32r.org/ - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2.6.19] m32r: Fix kernel entry address of vmlinux
This patch fixes the kernel entry point address of vmlinux. The m32r kernel entry address is 0x08002000 (physical). But, so far, the ENTRY point written in vmlinux.lds.S was not point the correct kernel entry address. (before fix) $ objdump -x vmlinux vmlinux: file format elf32-m32r-linux vmlinux architecture: m32r2, flags 0x0112: EXEC_P, HAS_SYMS, D_PAGED start address 0x88002090/* NG */ : Sections: Idx Name Size VMA LMA File off Algn 0 .empty_zero_page 1000 88001000 88001000 1000 2**12 CONTENTS, ALLOC, LOAD, DATA 1 .boot 008c 88002000 88002000 2000 2**2 CONTENTS, ALLOC, LOAD, READONLY, CODE 2 .text 001ab694 88002090 88002090 2090 2**4 CONTENTS, ALLOC, LOAD, READONLY, CODE : (after fix) $ objdump -x vmlinux vmlinux: file format elf32-m32r-linux vmlinux architecture: m32r2, flags 0x0112: EXEC_P, HAS_SYMS, D_PAGED start address 0x08002000/* OK */ : This fix also remedies the following GDB error message (of gdb-6.4 or after) at the first operation of kernel debugging: Previous frame identical to this frame (corrupt stack?). Signed-off-by: Hirokazu Takata [EMAIL PROTECTED] --- arch/m32r/Makefile |2 +- arch/m32r/kernel/vmlinux.lds.S |5 - 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/arch/m32r/Makefile b/arch/m32r/Makefile index f219c47..cdf63b2 100644 --- a/arch/m32r/Makefile +++ b/arch/m32r/Makefile @@ -7,7 +7,7 @@ LDFLAGS:= OBJCOPYFLAGS := -O binary -R .note -R .comment -S -LDFLAGS_vmlinux:= -e startup_32 +LDFLAGS_vmlinux:= CFLAGS += -pipe -fno-schedule-insns CFLAGS_KERNEL += -mmodel=medium diff --git a/arch/m32r/kernel/vmlinux.lds.S b/arch/m32r/kernel/vmlinux.lds.S index 358b9ce..c497a2f 100644 --- a/arch/m32r/kernel/vmlinux.lds.S +++ b/arch/m32r/kernel/vmlinux.lds.S @@ -6,12 +6,15 @@ #include asm/page.h OUTPUT_ARCH(m32r) -ENTRY(startup_32) #if defined(__LITTLE_ENDIAN__) jiffies = jiffies_64; #else jiffies = jiffies_64 + 4; #endif + +kernel_entry = boot - 0x8000; +ENTRY(kernel_entry) + SECTIONS { . = CONFIG_MEMORY_START + __PAGE_OFFSET; -- 1.4.4.2 -- Hirokazu Takata [EMAIL PROTECTED] Linux/M32R Project: http://www.linux-m32r.org/ - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2.6.19] m32r: Cosmetic updates and trivial fixes
Cosmetic updates and trivial fixes of m32r arch-dependent files. - Remove RCS ID strings and trailing white lines - Other misc. cosmetic updates Signed-off-by: Hirokazu Takata [EMAIL PROTECTED] --- arch/m32r/kernel/head.S |2 -- arch/m32r/lib/ashxdi3.S |3 --- arch/m32r/lib/checksum.S |3 +-- arch/m32r/lib/delay.c|2 -- arch/m32r/lib/memcpy.S |2 -- arch/m32r/lib/memset.S |2 -- arch/m32r/lib/strlen.S |2 -- arch/m32r/mm/fault-nommu.c |5 + arch/m32r/mm/mmu.S |5 + include/asm-m32r/a.out.h |2 -- include/asm-m32r/addrspace.h |1 - include/asm-m32r/bugs.h |2 -- include/asm-m32r/byteorder.h |2 -- include/asm-m32r/cache.h |2 -- include/asm-m32r/cacheflush.h|1 - include/asm-m32r/current.h |3 --- include/asm-m32r/delay.h |2 -- include/asm-m32r/dma.h |2 -- include/asm-m32r/errno.h |3 --- include/asm-m32r/ide.h |6 +- include/asm-m32r/ioctls.h|5 - include/asm-m32r/ipcbuf.h|4 include/asm-m32r/kmap_types.h|4 include/asm-m32r/m32104ut/m32104ut_pld.h | 11 +-- include/asm-m32r/m32700ut/m32700ut_lan.h | 13 + include/asm-m32r/m32700ut/m32700ut_lcd.h | 13 + include/asm-m32r/m32700ut/m32700ut_pld.h | 13 + include/asm-m32r/mappi2/mappi2_pld.h | 13 ++--- include/asm-m32r/mappi3/mappi3_pld.h | 11 +-- include/asm-m32r/mc146818rtc.h |3 --- include/asm-m32r/mman.h |2 -- include/asm-m32r/mmu.h | 10 ++ include/asm-m32r/mmu_context.h |9 ++--- include/asm-m32r/module.h|3 --- include/asm-m32r/msgbuf.h|4 include/asm-m32r/namei.h |4 include/asm-m32r/opsput/opsput_lan.h | 13 + include/asm-m32r/opsput/opsput_lcd.h | 13 + include/asm-m32r/opsput/opsput_pld.h | 13 + include/asm-m32r/page.h |5 - include/asm-m32r/param.h |4 include/asm-m32r/pci.h |2 -- include/asm-m32r/pgalloc.h |3 --- include/asm-m32r/pgtable-2level.h|3 --- include/asm-m32r/posix_types.h |4 include/asm-m32r/rtc.h |4 include/asm-m32r/scatterlist.h |2 -- include/asm-m32r/sections.h |1 - include/asm-m32r/segment.h |4 include/asm-m32r/sembuf.h|4 include/asm-m32r/setup.h |4 include/asm-m32r/shmbuf.h|4 include/asm-m32r/shmparam.h |2 -- include/asm-m32r/sigcontext.h|3 --- include/asm-m32r/siginfo.h |2 -- include/asm-m32r/signal.h|4 include/asm-m32r/smp.h |3 --- include/asm-m32r/sockios.h |2 -- include/asm-m32r/spinlock_types.h|2 +- include/asm-m32r/stat.h |4 include/asm-m32r/string.h|2 -- include/asm-m32r/syscall.h |3 --- include/asm-m32r/system.h|2 +- include/asm-m32r/termbits.h |4 +--- include/asm-m32r/termios.h |2 -- include/asm-m32r/timex.h |3 --- include/asm-m32r/tlbflush.h |1 - include/asm-m32r/types.h |6 +- include/asm-m32r/ucontext.h |2 -- include/asm-m32r/unaligned.h |8 +--- include/asm-m32r/unistd.h|2 -- include/asm-m32r/user.h |6 -- include/asm-m32r/vga.h |4 +--- include/asm-m32r/xor.h |2 -- 74 files changed, 68 insertions(+), 258 deletions(-) diff --git a/arch/m32r/kernel/head.S b/arch/m32r/kernel/head.S index 0d3c8ee..dab7436 100644 --- a/arch/m32r/kernel/head.S +++ b/arch/m32r/kernel/head.S @@ -7,8 +7,6 @@ *Hitoshi Yamamoto */ -/* $Id$ */ - #include linux/init.h __INIT __INITDATA diff --git a/arch/m32r/lib/ashxdi3.S b/arch/m32r/lib/ashxdi3.S index 107594b..7fc0c19 100644 --- a/arch/m32r/lib/ashxdi3.S +++ b/arch/m32r/lib/ashxdi3.S @@ -4,8 +4,6 @@ * Copyright (C) 2001,2002 Hiroyuki Kondo, and Hirokazu Takata * */ -/* $Id$ */ - ; ; input (r0,r1) src @@ -293,4 +291,3 @@ __lshrdi3: #endif /* not CONFIG_ISA_DUAL_ISSUE */ .end - diff --git a/arch/m32r/lib/checksum.S b/arch/m32r/lib
[PATCH 2.6.19.1] m32r: Build fix for processors without ISA_DSP_LEVEL2
Additional fixes for processors without ISA_DSP_LEVEL2. sigcontext_t does not have dummy_acc1h, dummy_acc1l members any longer. This patch is against v2.6.19.1 kernel. From: Hirokazu Takata [EMAIL PROTECTED] Subject: [PATCH 2.6.19] m32r: Make userspace headers platform-independent Date: Wed, 06 Dec 2006 19:00:01 +0900 The m32r kernel 2.6.18-rc1 or after cause build errors of unknown isa configuration for userspace application programs, such as glibc, gdb, etc. This is because the recent kernel do not include linux/config.h not to expose kernel headers for userspace. To fix the above compile errors, this patch fixes two headers ptrace.h and sigcontext.h for m32r and makes them platform-independent. Signed-off-by: Hirokazu Takata [EMAIL PROTECTED] --- arch/m32r/kernel/entry.S | 65 ++-- include/asm-m32r/ptrace.h | 28 ++--- include/asm-m32r/sigcontext.h | 13 +--- 3 files changed, 35 insertions(+), 71 deletions(-) Signed-off-by: Hirokazu Takata [EMAIL PROTECTED] --- arch/m32r/kernel/process.c |2 +- arch/m32r/kernel/signal.c | 26 -- 2 files changed, 5 insertions(+), 23 deletions(-) diff --git a/arch/m32r/kernel/process.c b/arch/m32r/kernel/process.c index 44cbe0c..a689e29 100644 --- a/arch/m32r/kernel/process.c +++ b/arch/m32r/kernel/process.c @@ -174,7 +174,7 @@ void show_regs(struct pt_regs * regs) regs-acc1h, regs-acc1l); #elif defined(CONFIG_ISA_M32R2) || defined(CONFIG_ISA_M32R) printk(ACCH[%08lx]:ACCL[%08lx]\n, \ - regs-acch, regs-accl); + regs-acc0h, regs-acc0l); #else #error unknown isa configuration #endif diff --git a/arch/m32r/kernel/signal.c b/arch/m32r/kernel/signal.c index b60cea4..045f958 100644 --- a/arch/m32r/kernel/signal.c +++ b/arch/m32r/kernel/signal.c @@ -109,19 +109,10 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc, COPY(r10); COPY(r11); COPY(r12); -#if defined(CONFIG_ISA_M32R2) defined(CONFIG_ISA_DSP_LEVEL2) COPY(acc0h); COPY(acc0l); - COPY(acc1h); - COPY(acc1l); -#elif defined(CONFIG_ISA_M32R2) || defined(CONFIG_ISA_M32R) - COPY(acch); - COPY(accl); - COPY(dummy_acc1h); - COPY(dummy_acc1l); -#else -#error unknown isa configuration -#endif + COPY(acc1h);/* ISA_DSP_LEVEL2 only */ + COPY(acc1l);/* ISA_DSP_LEVEL2 only */ COPY(psw); COPY(bpc); COPY(bbpsw); @@ -196,19 +187,10 @@ setup_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs, COPY(r10); COPY(r11); COPY(r12); -#if defined(CONFIG_ISA_M32R2) defined(CONFIG_ISA_DSP_LEVEL2) COPY(acc0h); COPY(acc0l); - COPY(acc1h); - COPY(acc1l); -#elif defined(CONFIG_ISA_M32R2) || defined(CONFIG_ISA_M32R) - COPY(acch); - COPY(accl); - COPY(dummy_acc1h); - COPY(dummy_acc1l); -#else -#error unknown isa configuration -#endif + COPY(acc1h);/* ISA_DSP_LEVEL2 only */ + COPY(acc1l);/* ISA_DSP_LEVEL2 only */ COPY(psw); COPY(bpc); COPY(bbpsw); -- 1.4.4.2 -- Hirokazu Takata [EMAIL PROTECTED] Linux/M32R Project: http://www.linux-m32r.org/ - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2.6.19] m32r: bootloader support for OPSPUT platform
This patch supports "m32r-g00ff" bootloader for an OPSPUT platform. Applying this patch, it is possible to do ATA-boot from an IDE drive or HTTP-boot from network by m32r-g00ff. * arch/m32r/boot/compressed/m32r_sio.c: Fix hangup on OPSPUT at boot. * arch/m32r/kernel/io_opsput.c: IDE support for OPSPUT. * arch/m32r/kernel/setup_opsput.c: ditto. * include/asm-m32r/ide.h: ditto. Signed-off-by: Kazuhiro Inaoka <[EMAIL PROTECTED]> Signed-off-by: Hirokazu Takata <[EMAIL PROTECTED]> --- arch/m32r/boot/compressed/m32r_sio.c |7 +++- arch/m32r/kernel/io_opsput.c | 71 +- arch/m32r/kernel/setup_opsput.c | 17 +++- include/asm-m32r/ide.h |3 +- 4 files changed, 84 insertions(+), 14 deletions(-) diff --git a/arch/m32r/boot/compressed/m32r_sio.c b/arch/m32r/boot/compressed/m32r_sio.c index bce8af5..ee3c8be 100644 --- a/arch/m32r/boot/compressed/m32r_sio.c +++ b/arch/m32r/boot/compressed/m32r_sio.c @@ -2,6 +2,7 @@ * arch/m32r/boot/compressed/m32r_sio.c * * 2003-02-12: Takeo Takahashi + * 2006-11-30: OPSPUT support by Kazuhiro Inaoka * */ @@ -16,7 +17,7 @@ static int puts(const char *s) return 0; } -#if defined(CONFIG_PLAT_M32700UT_Alpha) || defined(CONFIG_PLAT_M32700UT) +#if defined(CONFIG_PLAT_M32700UT_Alpha) || defined(CONFIG_PLAT_M32700UT) || defined(CONFIG_PLAT_OPSPUT) #include #include @@ -31,7 +32,11 @@ static int puts(const char *s) #define BOOT_SIO0TXB (volatile unsigned short *)(0x02c0 + 0x2000c) #else #undef PLD_BASE +#if defined(CONFIG_PLAT_OPSPUT) +#define PLD_BASE 0x1cc0 +#else #define PLD_BASE 0xa4c0 +#endif #define BOOT_SIO0STS PLD_ESIO0STS #define BOOT_SIO0TXB PLD_ESIO0TXB #endif diff --git a/arch/m32r/kernel/io_opsput.c b/arch/m32r/kernel/io_opsput.c index da6c5f5..3cbb1f7 100644 --- a/arch/m32r/kernel/io_opsput.c +++ b/arch/m32r/kernel/io_opsput.c @@ -30,14 +30,34 @@ extern void pcc_iowrite_byte(int, unsigned long, void *, size_t, size_t, int); extern void pcc_iowrite_word(int, unsigned long, void *, size_t, size_t, int); #endif /* CONFIG_PCMCIA && CONFIG_M32R_CFC */ -#define PORT2ADDR(port) _port2addr(port) -#define PORT2ADDR_USB(port) _port2addr_usb(port) +#define PORT2ADDR(port)_port2addr(port) +#define PORT2ADDR_USB(port)_port2addr_usb(port) static inline void *_port2addr(unsigned long port) { return (void *)(port | NONCACHE_OFFSET); } +#if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) +static inline void *__port2addr_ata(unsigned long port) +{ + static int dummy_reg; + + switch (port) { + case 0x1f0: return (void *)(0x0c002000 | NONCACHE_OFFSET); + case 0x1f1: return (void *)(0x0c012800 | NONCACHE_OFFSET); + case 0x1f2: return (void *)(0x0c012002 | NONCACHE_OFFSET); + case 0x1f3: return (void *)(0x0c012802 | NONCACHE_OFFSET); + case 0x1f4: return (void *)(0x0c012004 | NONCACHE_OFFSET); + case 0x1f5: return (void *)(0x0c012804 | NONCACHE_OFFSET); + case 0x1f6: return (void *)(0x0c012006 | NONCACHE_OFFSET); + case 0x1f7: return (void *)(0x0c012806 | NONCACHE_OFFSET); + case 0x3f6: return (void *)(0x0c01200e | NONCACHE_OFFSET); + default:return (void *)_reg; + } +} +#endif + /* * OPSPUT-LAN is located in the extended bus space * from 0x1000 to 0x13ff on physical address. @@ -97,6 +117,12 @@ unsigned char _inb(unsigned long port) { if (port >= LAN_IOSTART && port < LAN_IOEND) return _ne_inb(PORT2ADDR_NE(port)); + +#if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) + else if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) { + return *(volatile unsigned char *)__port2addr_ata(port); + } +#endif #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { unsigned char b; @@ -112,6 +138,11 @@ unsigned short _inw(unsigned long port) { if (port >= LAN_IOSTART && port < LAN_IOEND) return _ne_inw(PORT2ADDR_NE(port)); +#if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) + else if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) { + return *(volatile unsigned short *)__port2addr_ata(port); + } +#endif #if defined(CONFIG_USB) else if(port >= 0x340 && port < 0x3a0) return *(volatile unsigned short *)PORT2ADDR_USB(port); @@ -164,6 +195,11 @@ void _outb(unsigned char b, unsigned long port) if (port >= LAN_IOSTART && port < LAN_IOEND) _ne_outb(b, PORT2ADDR_NE(port)); else +#if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) + if ((port >= 0x1
[PATCH 2.6.19] m32r: Fix ace_handler to pass full 32-bit address
Don't mask the lower 12-bit of the page fault address. In the current m32r kernel implementation, we use an access exception to detect page faults. This patch fixes ace_handler (access exception handler) for m32r. In order to check userspace address in do_page_fault, we have to pass full 32-bit address to do_page_fault. Signed-off-by: Hirokazu Takata <[EMAIL PROTECTED]> --- arch/m32r/kernel/entry.S |2 -- arch/m32r/mm/fault.c |4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/m32r/kernel/entry.S b/arch/m32r/kernel/entry.S index 5b01fd2..a2c472c 100644 --- a/arch/m32r/kernel/entry.S +++ b/arch/m32r/kernel/entry.S @@ -596,8 +596,6 @@ ENTRY(ace_handler) beqzr1, inst oprand: ld r2, @(low(MDEVA_offset),r2) ; set address - srlir2, #12 - sllir2, #12 srlir1, #1 bra 1f inst: diff --git a/arch/m32r/mm/fault.c b/arch/m32r/mm/fault.c index 8d5f551..9b9feb0 100644 --- a/arch/m32r/mm/fault.c +++ b/arch/m32r/mm/fault.c @@ -173,7 +173,7 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long error_code, goto good_area; if (!(vma->vm_flags & VM_GROWSDOWN)) goto bad_area; -#if 0 + if (error_code & ACE_USERMODE) { /* * accessing the stack below "spu" is always a bug. @@ -184,7 +184,7 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long error_code, if (address + 4 < regs->spu) goto bad_area; } -#endif + if (expand_stack(vma, address)) goto bad_area; /* -- 1.4.4.1 -- Hirokazu Takata <[EMAIL PROTECTED]> Linux/M32R Project: http://www.linux-m32r.org/ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 2.6.19] m32r: Fix access error handler to pass full 32-bit address
Hi, Andrew, Sorry, I sent a patch with wrong title. On m32r, ACE is an acronym of not "access error", but "access exception". Please drop the previous patch entitled "[PATCH 2.6.19] m32r: Fix access error handler to pass full 32-bit address". I will resend a correct patch again. Thanks, From: Hirokazu Takata <[EMAIL PROTECTED]> Subject: [PATCH 2.6.19] m32r: Fix access error handler to pass full 32-bit address Date: Wed, 06 Dec 2006 19:00:40 +0900 > Don't mask the lower 12-bit of the page fault address. > > In the current m32r kernel implementation, we use an access error handler > to detect page faults. > In order to check userspace address in do_page_fault, we have to pass > full 32-bit address to do_page_fault. > > Signed-off-by: Hirokazu Takata <[EMAIL PROTECTED]> > --- > arch/m32r/kernel/entry.S |2 -- > arch/m32r/mm/fault.c |4 ++-- > 2 files changed, 2 insertions(+), 4 deletions(-) -- Takata - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2.6.19] m32r: Support a synthesizable M32700 core
This patch is for supporting a synthesizable M32700 core for the Mappi-II FPGA board. On the core, location of MFT (Multi-Function Timer) registers is slightly different from the M32700 chip. Signed-off-by: Hirokazu Takata <[EMAIL PROTECTED]> --- include/asm-m32r/m32102.h |7 --- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/asm-m32r/m32102.h b/include/asm-m32r/m32102.h index a1f0d1f..52807f8 100644 --- a/include/asm-m32r/m32102.h +++ b/include/asm-m32r/m32102.h @@ -104,7 +104,8 @@ #define M32R_MFT5RLD_PORTL (0x0C+M32R_MFT5_OFFSET) /* MFT4 reload */ #define M32R_MFT5CMPRLD_PORTL (0x10+M32R_MFT5_OFFSET) /* MFT4 compare reload */ -#if defined(CONFIG_CHIP_M32700) || defined(CONFIG_CHIP_M32104) +#if (defined(CONFIG_CHIP_M32700) && !defined(CONFIG_PLAT_MAPPI2)) \ + || defined(CONFIG_CHIP_M32104) #define M32R_MFTCR_MFT0MSK (1UL<<31) /* b0 */ #define M32R_MFTCR_MFT1MSK (1UL<<30) /* b1 */ #define M32R_MFTCR_MFT2MSK (1UL<<29) /* b2 */ @@ -117,7 +118,7 @@ #define M32R_MFTCR_MFT3EN (1UL<<20) /* b11 */ #define M32R_MFTCR_MFT4EN (1UL<<19) /* b12 */ #define M32R_MFTCR_MFT5EN (1UL<<18) /* b13 */ -#else /* not CONFIG_CHIP_M32700 && not CONFIG_CHIP_M32104 */ +#else #define M32R_MFTCR_MFT0MSK (1UL<<15) /* b16 */ #define M32R_MFTCR_MFT1MSK (1UL<<14) /* b17 */ #define M32R_MFTCR_MFT2MSK (1UL<<13) /* b18 */ @@ -130,7 +131,7 @@ #define M32R_MFTCR_MFT3EN (1UL<<4) /* b27 */ #define M32R_MFTCR_MFT4EN (1UL<<3) /* b28 */ #define M32R_MFTCR_MFT5EN (1UL<<2) /* b29 */ -#endif /* not CONFIG_CHIP_M32700 && not CONFIG_CHIP_M32104 */ +#endif #define M32R_MFTMOD_CC_MASK (1UL<<15) /* b16 */ #define M32R_MFTMOD_TCCR (1UL<<13) /* b18 */ -- 1.4.4.1 -- Hirokazu Takata <[EMAIL PROTECTED]> Linux/M32R Project: http://www.linux-m32r.org/ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2.6.19] m32r: Fix access error handler to pass full 32-bit address
Don't mask the lower 12-bit of the page fault address. In the current m32r kernel implementation, we use an access error handler to detect page faults. In order to check userspace address in do_page_fault, we have to pass full 32-bit address to do_page_fault. Signed-off-by: Hirokazu Takata <[EMAIL PROTECTED]> --- arch/m32r/kernel/entry.S |2 -- arch/m32r/mm/fault.c |4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/m32r/kernel/entry.S b/arch/m32r/kernel/entry.S index 5b01fd2..a2c472c 100644 --- a/arch/m32r/kernel/entry.S +++ b/arch/m32r/kernel/entry.S @@ -596,8 +596,6 @@ ENTRY(ace_handler) beqzr1, inst oprand: ld r2, @(low(MDEVA_offset),r2) ; set address - srlir2, #12 - sllir2, #12 srlir1, #1 bra 1f inst: diff --git a/arch/m32r/mm/fault.c b/arch/m32r/mm/fault.c index 8d5f551..9b9feb0 100644 --- a/arch/m32r/mm/fault.c +++ b/arch/m32r/mm/fault.c @@ -173,7 +173,7 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long error_code, goto good_area; if (!(vma->vm_flags & VM_GROWSDOWN)) goto bad_area; -#if 0 + if (error_code & ACE_USERMODE) { /* * accessing the stack below "spu" is always a bug. @@ -184,7 +184,7 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long error_code, if (address + 4 < regs->spu) goto bad_area; } -#endif + if (expand_stack(vma, address)) goto bad_area; /* -- 1.4.4.1 -- Hirokazu Takata <[EMAIL PROTECTED]> Linux/M32R Project: http://www.linux-m32r.org/ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2.6.19] m32r: Fix compile error of m32r_cfc.c
Fix a compile error of m32r_cfc.c. In pcc_interrupt_wrapper, pcc_interrupt was called with wrong argument number. Signed-off-by: Hirokazu Takata <[EMAIL PROTECTED]> --- drivers/pcmcia/m32r_cfc.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/pcmcia/m32r_cfc.c b/drivers/pcmcia/m32r_cfc.c index 36fdaa5..3c22ac4 100644 --- a/drivers/pcmcia/m32r_cfc.c +++ b/drivers/pcmcia/m32r_cfc.c @@ -398,7 +398,7 @@ static irqreturn_t pcc_interrupt(int irq, void *dev) static void pcc_interrupt_wrapper(u_long data) { debug(3, "m32r_cfc: pcc_interrupt_wrapper:\n"); - pcc_interrupt(0, NULL, NULL); + pcc_interrupt(0, NULL); init_timer(_timer); poll_timer.expires = jiffies + poll_interval; add_timer(_timer); -- 1.4.4.1 -- Hirokazu Takata <[EMAIL PROTECTED]> Linux/M32R Project: http://www.linux-m32r.org/ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2.6.19] m32r: Make userspace headers platform-independent
Hello, This patch is required to fix build errors of application programs in userland. Please apply. I hope this patch is to be included into the stable kernel branch. Thank you. -- The m32r kernel 2.6.18-rc1 or after cause build errors of "unknown isa configuration" for userspace application programs, such as glibc, gdb, etc. This is because the recent kernel do not include linux/config.h not to expose kernel headers for userspace. To fix the above compile errors, this patch fixes two headers ptrace.h and sigcontext.h for m32r and makes them platform-independent. Signed-off-by: Hirokazu Takata <[EMAIL PROTECTED]> --- arch/m32r/kernel/entry.S | 65 ++-- include/asm-m32r/ptrace.h | 28 ++--- include/asm-m32r/sigcontext.h | 13 +--- 3 files changed, 35 insertions(+), 71 deletions(-) diff --git a/arch/m32r/kernel/entry.S b/arch/m32r/kernel/entry.S index ac6d840..5b01fd2 100644 --- a/arch/m32r/kernel/entry.S +++ b/arch/m32r/kernel/entry.S @@ -23,35 +23,35 @@ * updated in fork.c:copy_thread, signal.c:do_signal, * ptrace.c and ptrace.h * - * M32Rx/M32R2 M32R - * @(sp) - r4 ditto - * @(0x04,sp) - r5 ditto - * @(0x08,sp) - r6 ditto - * @(0x0c,sp) - *pt_regs ditto - * @(0x10,sp) - r0 ditto - * @(0x14,sp) - r1 ditto - * @(0x18,sp) - r2 ditto - * @(0x1c,sp) - r3 ditto - * @(0x20,sp) - r7 ditto - * @(0x24,sp) - r8 ditto - * @(0x28,sp) - r9 ditto - * @(0x2c,sp) - r10 ditto - * @(0x30,sp) - r11 ditto - * @(0x34,sp) - r12 ditto - * @(0x38,sp) - syscall_nr ditto - * @(0x3c,sp) - acc0h@(0x3c,sp) - acch - * @(0x40,sp) - acc0l@(0x40,sp) - accl - * @(0x44,sp) - acc1h@(0x44,sp) - dummy_acc1h - * @(0x48,sp) - acc1l@(0x48,sp) - dummy_acc1l - * @(0x4c,sp) - psw ditto - * @(0x50,sp) - bpc ditto - * @(0x54,sp) - bbpswditto - * @(0x58,sp) - bbpc ditto - * @(0x5c,sp) - spu (cr3)ditto - * @(0x60,sp) - fp (r13) ditto - * @(0x64,sp) - lr (r14) ditto - * @(0x68,sp) - spi (cr2)ditto - * @(0x6c,sp) - orig_r0 ditto + * M32R/M32Rx/M32R2 + * @(sp) - r4 + * @(0x04,sp) - r5 + * @(0x08,sp) - r6 + * @(0x0c,sp) - *pt_regs + * @(0x10,sp) - r0 + * @(0x14,sp) - r1 + * @(0x18,sp) - r2 + * @(0x1c,sp) - r3 + * @(0x20,sp) - r7 + * @(0x24,sp) - r8 + * @(0x28,sp) - r9 + * @(0x2c,sp) - r10 + * @(0x30,sp) - r11 + * @(0x34,sp) - r12 + * @(0x38,sp) - syscall_nr + * @(0x3c,sp) - acc0h + * @(0x40,sp) - acc0l + * @(0x44,sp) - acc1h; ISA_DSP_LEVEL2 only + * @(0x48,sp) - acc1l; ISA_DSP_LEVEL2 only + * @(0x4c,sp) - psw + * @(0x50,sp) - bpc + * @(0x54,sp) - bbpsw + * @(0x58,sp) - bbpc + * @(0x5c,sp) - spu (cr3) + * @(0x60,sp) - fp (r13) + * @(0x64,sp) - lr (r14) + * @(0x68,sp) - spi (cr2) + * @(0x6c,sp) - orig_r0 */ #include @@ -95,17 +95,10 @@ #define R11(reg) @(0x30,reg) #define R12(reg) @(0x34,reg) #define SYSCALL_NR(reg)@(0x38,reg) -#if defined(CONFIG_ISA_M32R2) && defined(CONFIG_ISA_DSP_LEVEL2) #define ACC0H(reg) @(0x3C,reg) #define ACC0L(reg) @(0x40,reg) #define ACC1H(reg) @(0x44,reg) #define ACC1L(reg) @(0x48,reg) -#elif defined(CONFIG_ISA_M32R2) || defined(CONFIG_ISA_M32R) -#define ACCH(reg) @(0x3C,reg) -#define ACCL(reg) @(0x40,reg) -#else -#error unknown isa configuration -#endif #define PSW(reg) @(0x4C,reg) #define BPC(reg) @(0x50,reg) #define BBPSW(reg) @(0x54,reg) diff --git a/include/asm-m32r/ptrace.h b/include/asm-m32r/ptrace.h index 2d2a6c9..632b4ce 100644 --- a/include/asm-m32r/ptrace.h +++ b/include/asm-m32r/ptrace.h @@ -33,21 +33,10 @@ #define PT_R15 PT_SP /* processor status and miscellaneous context registers. */ -#if defined(CONFIG_ISA_M32R2) && defined(CONFIG_ISA_DSP_LEVEL2) #define PT_ACC0H 15 #define PT_ACC0L 16 -#define PT_ACC1H 17 -#define PT_ACC1L 18 -#define PT_ACCHPT_ACC0H -#define PT_ACCLPT_ACC0L -#elif defined(CONFIG_ISA_M32R2) || defined(CONFIG_ISA_M32R) -#define PT_ACCH15 -#define PT_ACCL16 -#define PT_DUMMY_ACC1H 17 -#define PT_DUMMY_ACC1L 18 -#else -#error unknown isa conifiguration -#endif +#define PT_ACC1H
[PATCH 2.6.19] m32r: Make userspace headers platform-independent
Hello, This patch is required to fix build errors of application programs in userland. Please apply. I hope this patch is to be included into the stable kernel branch. Thank you. -- The m32r kernel 2.6.18-rc1 or after cause build errors of unknown isa configuration for userspace application programs, such as glibc, gdb, etc. This is because the recent kernel do not include linux/config.h not to expose kernel headers for userspace. To fix the above compile errors, this patch fixes two headers ptrace.h and sigcontext.h for m32r and makes them platform-independent. Signed-off-by: Hirokazu Takata [EMAIL PROTECTED] --- arch/m32r/kernel/entry.S | 65 ++-- include/asm-m32r/ptrace.h | 28 ++--- include/asm-m32r/sigcontext.h | 13 +--- 3 files changed, 35 insertions(+), 71 deletions(-) diff --git a/arch/m32r/kernel/entry.S b/arch/m32r/kernel/entry.S index ac6d840..5b01fd2 100644 --- a/arch/m32r/kernel/entry.S +++ b/arch/m32r/kernel/entry.S @@ -23,35 +23,35 @@ * updated in fork.c:copy_thread, signal.c:do_signal, * ptrace.c and ptrace.h * - * M32Rx/M32R2 M32R - * @(sp) - r4 ditto - * @(0x04,sp) - r5 ditto - * @(0x08,sp) - r6 ditto - * @(0x0c,sp) - *pt_regs ditto - * @(0x10,sp) - r0 ditto - * @(0x14,sp) - r1 ditto - * @(0x18,sp) - r2 ditto - * @(0x1c,sp) - r3 ditto - * @(0x20,sp) - r7 ditto - * @(0x24,sp) - r8 ditto - * @(0x28,sp) - r9 ditto - * @(0x2c,sp) - r10 ditto - * @(0x30,sp) - r11 ditto - * @(0x34,sp) - r12 ditto - * @(0x38,sp) - syscall_nr ditto - * @(0x3c,sp) - acc0h@(0x3c,sp) - acch - * @(0x40,sp) - acc0l@(0x40,sp) - accl - * @(0x44,sp) - acc1h@(0x44,sp) - dummy_acc1h - * @(0x48,sp) - acc1l@(0x48,sp) - dummy_acc1l - * @(0x4c,sp) - psw ditto - * @(0x50,sp) - bpc ditto - * @(0x54,sp) - bbpswditto - * @(0x58,sp) - bbpc ditto - * @(0x5c,sp) - spu (cr3)ditto - * @(0x60,sp) - fp (r13) ditto - * @(0x64,sp) - lr (r14) ditto - * @(0x68,sp) - spi (cr2)ditto - * @(0x6c,sp) - orig_r0 ditto + * M32R/M32Rx/M32R2 + * @(sp) - r4 + * @(0x04,sp) - r5 + * @(0x08,sp) - r6 + * @(0x0c,sp) - *pt_regs + * @(0x10,sp) - r0 + * @(0x14,sp) - r1 + * @(0x18,sp) - r2 + * @(0x1c,sp) - r3 + * @(0x20,sp) - r7 + * @(0x24,sp) - r8 + * @(0x28,sp) - r9 + * @(0x2c,sp) - r10 + * @(0x30,sp) - r11 + * @(0x34,sp) - r12 + * @(0x38,sp) - syscall_nr + * @(0x3c,sp) - acc0h + * @(0x40,sp) - acc0l + * @(0x44,sp) - acc1h; ISA_DSP_LEVEL2 only + * @(0x48,sp) - acc1l; ISA_DSP_LEVEL2 only + * @(0x4c,sp) - psw + * @(0x50,sp) - bpc + * @(0x54,sp) - bbpsw + * @(0x58,sp) - bbpc + * @(0x5c,sp) - spu (cr3) + * @(0x60,sp) - fp (r13) + * @(0x64,sp) - lr (r14) + * @(0x68,sp) - spi (cr2) + * @(0x6c,sp) - orig_r0 */ #include linux/linkage.h @@ -95,17 +95,10 @@ #define R11(reg) @(0x30,reg) #define R12(reg) @(0x34,reg) #define SYSCALL_NR(reg)@(0x38,reg) -#if defined(CONFIG_ISA_M32R2) defined(CONFIG_ISA_DSP_LEVEL2) #define ACC0H(reg) @(0x3C,reg) #define ACC0L(reg) @(0x40,reg) #define ACC1H(reg) @(0x44,reg) #define ACC1L(reg) @(0x48,reg) -#elif defined(CONFIG_ISA_M32R2) || defined(CONFIG_ISA_M32R) -#define ACCH(reg) @(0x3C,reg) -#define ACCL(reg) @(0x40,reg) -#else -#error unknown isa configuration -#endif #define PSW(reg) @(0x4C,reg) #define BPC(reg) @(0x50,reg) #define BBPSW(reg) @(0x54,reg) diff --git a/include/asm-m32r/ptrace.h b/include/asm-m32r/ptrace.h index 2d2a6c9..632b4ce 100644 --- a/include/asm-m32r/ptrace.h +++ b/include/asm-m32r/ptrace.h @@ -33,21 +33,10 @@ #define PT_R15 PT_SP /* processor status and miscellaneous context registers. */ -#if defined(CONFIG_ISA_M32R2) defined(CONFIG_ISA_DSP_LEVEL2) #define PT_ACC0H 15 #define PT_ACC0L 16 -#define PT_ACC1H 17 -#define PT_ACC1L 18 -#define PT_ACCHPT_ACC0H -#define PT_ACCLPT_ACC0L -#elif defined(CONFIG_ISA_M32R2) || defined(CONFIG_ISA_M32R) -#define PT_ACCH15 -#define PT_ACCL16 -#define PT_DUMMY_ACC1H 17 -#define PT_DUMMY_ACC1L 18 -#else -#error unknown isa conifiguration -#endif +#define PT_ACC1H 17
[PATCH 2.6.19] m32r: Fix access error handler to pass full 32-bit address
Don't mask the lower 12-bit of the page fault address. In the current m32r kernel implementation, we use an access error handler to detect page faults. In order to check userspace address in do_page_fault, we have to pass full 32-bit address to do_page_fault. Signed-off-by: Hirokazu Takata [EMAIL PROTECTED] --- arch/m32r/kernel/entry.S |2 -- arch/m32r/mm/fault.c |4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/m32r/kernel/entry.S b/arch/m32r/kernel/entry.S index 5b01fd2..a2c472c 100644 --- a/arch/m32r/kernel/entry.S +++ b/arch/m32r/kernel/entry.S @@ -596,8 +596,6 @@ ENTRY(ace_handler) beqzr1, inst oprand: ld r2, @(low(MDEVA_offset),r2) ; set address - srlir2, #12 - sllir2, #12 srlir1, #1 bra 1f inst: diff --git a/arch/m32r/mm/fault.c b/arch/m32r/mm/fault.c index 8d5f551..9b9feb0 100644 --- a/arch/m32r/mm/fault.c +++ b/arch/m32r/mm/fault.c @@ -173,7 +173,7 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long error_code, goto good_area; if (!(vma-vm_flags VM_GROWSDOWN)) goto bad_area; -#if 0 + if (error_code ACE_USERMODE) { /* * accessing the stack below spu is always a bug. @@ -184,7 +184,7 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long error_code, if (address + 4 regs-spu) goto bad_area; } -#endif + if (expand_stack(vma, address)) goto bad_area; /* -- 1.4.4.1 -- Hirokazu Takata [EMAIL PROTECTED] Linux/M32R Project: http://www.linux-m32r.org/ - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2.6.19] m32r: Fix compile error of m32r_cfc.c
Fix a compile error of m32r_cfc.c. In pcc_interrupt_wrapper, pcc_interrupt was called with wrong argument number. Signed-off-by: Hirokazu Takata [EMAIL PROTECTED] --- drivers/pcmcia/m32r_cfc.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/pcmcia/m32r_cfc.c b/drivers/pcmcia/m32r_cfc.c index 36fdaa5..3c22ac4 100644 --- a/drivers/pcmcia/m32r_cfc.c +++ b/drivers/pcmcia/m32r_cfc.c @@ -398,7 +398,7 @@ static irqreturn_t pcc_interrupt(int irq, void *dev) static void pcc_interrupt_wrapper(u_long data) { debug(3, m32r_cfc: pcc_interrupt_wrapper:\n); - pcc_interrupt(0, NULL, NULL); + pcc_interrupt(0, NULL); init_timer(poll_timer); poll_timer.expires = jiffies + poll_interval; add_timer(poll_timer); -- 1.4.4.1 -- Hirokazu Takata [EMAIL PROTECTED] Linux/M32R Project: http://www.linux-m32r.org/ - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2.6.19] m32r: Support a synthesizable M32700 core
This patch is for supporting a synthesizable M32700 core for the Mappi-II FPGA board. On the core, location of MFT (Multi-Function Timer) registers is slightly different from the M32700 chip. Signed-off-by: Hirokazu Takata [EMAIL PROTECTED] --- include/asm-m32r/m32102.h |7 --- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/asm-m32r/m32102.h b/include/asm-m32r/m32102.h index a1f0d1f..52807f8 100644 --- a/include/asm-m32r/m32102.h +++ b/include/asm-m32r/m32102.h @@ -104,7 +104,8 @@ #define M32R_MFT5RLD_PORTL (0x0C+M32R_MFT5_OFFSET) /* MFT4 reload */ #define M32R_MFT5CMPRLD_PORTL (0x10+M32R_MFT5_OFFSET) /* MFT4 compare reload */ -#if defined(CONFIG_CHIP_M32700) || defined(CONFIG_CHIP_M32104) +#if (defined(CONFIG_CHIP_M32700) !defined(CONFIG_PLAT_MAPPI2)) \ + || defined(CONFIG_CHIP_M32104) #define M32R_MFTCR_MFT0MSK (1UL31) /* b0 */ #define M32R_MFTCR_MFT1MSK (1UL30) /* b1 */ #define M32R_MFTCR_MFT2MSK (1UL29) /* b2 */ @@ -117,7 +118,7 @@ #define M32R_MFTCR_MFT3EN (1UL20) /* b11 */ #define M32R_MFTCR_MFT4EN (1UL19) /* b12 */ #define M32R_MFTCR_MFT5EN (1UL18) /* b13 */ -#else /* not CONFIG_CHIP_M32700 not CONFIG_CHIP_M32104 */ +#else #define M32R_MFTCR_MFT0MSK (1UL15) /* b16 */ #define M32R_MFTCR_MFT1MSK (1UL14) /* b17 */ #define M32R_MFTCR_MFT2MSK (1UL13) /* b18 */ @@ -130,7 +131,7 @@ #define M32R_MFTCR_MFT3EN (1UL4) /* b27 */ #define M32R_MFTCR_MFT4EN (1UL3) /* b28 */ #define M32R_MFTCR_MFT5EN (1UL2) /* b29 */ -#endif /* not CONFIG_CHIP_M32700 not CONFIG_CHIP_M32104 */ +#endif #define M32R_MFTMOD_CC_MASK(1UL15) /* b16 */ #define M32R_MFTMOD_TCCR (1UL13) /* b18 */ -- 1.4.4.1 -- Hirokazu Takata [EMAIL PROTECTED] Linux/M32R Project: http://www.linux-m32r.org/ - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 2.6.19] m32r: Fix access error handler to pass full 32-bit address
Hi, Andrew, Sorry, I sent a patch with wrong title. On m32r, ACE is an acronym of not access error, but access exception. Please drop the previous patch entitled [PATCH 2.6.19] m32r: Fix access error handler to pass full 32-bit address. I will resend a correct patch again. Thanks, From: Hirokazu Takata [EMAIL PROTECTED] Subject: [PATCH 2.6.19] m32r: Fix access error handler to pass full 32-bit address Date: Wed, 06 Dec 2006 19:00:40 +0900 Don't mask the lower 12-bit of the page fault address. In the current m32r kernel implementation, we use an access error handler to detect page faults. In order to check userspace address in do_page_fault, we have to pass full 32-bit address to do_page_fault. Signed-off-by: Hirokazu Takata [EMAIL PROTECTED] --- arch/m32r/kernel/entry.S |2 -- arch/m32r/mm/fault.c |4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) -- Takata - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2.6.19] m32r: Fix ace_handler to pass full 32-bit address
Don't mask the lower 12-bit of the page fault address. In the current m32r kernel implementation, we use an access exception to detect page faults. This patch fixes ace_handler (access exception handler) for m32r. In order to check userspace address in do_page_fault, we have to pass full 32-bit address to do_page_fault. Signed-off-by: Hirokazu Takata [EMAIL PROTECTED] --- arch/m32r/kernel/entry.S |2 -- arch/m32r/mm/fault.c |4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/m32r/kernel/entry.S b/arch/m32r/kernel/entry.S index 5b01fd2..a2c472c 100644 --- a/arch/m32r/kernel/entry.S +++ b/arch/m32r/kernel/entry.S @@ -596,8 +596,6 @@ ENTRY(ace_handler) beqzr1, inst oprand: ld r2, @(low(MDEVA_offset),r2) ; set address - srlir2, #12 - sllir2, #12 srlir1, #1 bra 1f inst: diff --git a/arch/m32r/mm/fault.c b/arch/m32r/mm/fault.c index 8d5f551..9b9feb0 100644 --- a/arch/m32r/mm/fault.c +++ b/arch/m32r/mm/fault.c @@ -173,7 +173,7 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long error_code, goto good_area; if (!(vma-vm_flags VM_GROWSDOWN)) goto bad_area; -#if 0 + if (error_code ACE_USERMODE) { /* * accessing the stack below spu is always a bug. @@ -184,7 +184,7 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long error_code, if (address + 4 regs-spu) goto bad_area; } -#endif + if (expand_stack(vma, address)) goto bad_area; /* -- 1.4.4.1 -- Hirokazu Takata [EMAIL PROTECTED] Linux/M32R Project: http://www.linux-m32r.org/ - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2.6.19] m32r: bootloader support for OPSPUT platform
This patch supports m32r-g00ff bootloader for an OPSPUT platform. Applying this patch, it is possible to do ATA-boot from an IDE drive or HTTP-boot from network by m32r-g00ff. * arch/m32r/boot/compressed/m32r_sio.c: Fix hangup on OPSPUT at boot. * arch/m32r/kernel/io_opsput.c: IDE support for OPSPUT. * arch/m32r/kernel/setup_opsput.c: ditto. * include/asm-m32r/ide.h: ditto. Signed-off-by: Kazuhiro Inaoka [EMAIL PROTECTED] Signed-off-by: Hirokazu Takata [EMAIL PROTECTED] --- arch/m32r/boot/compressed/m32r_sio.c |7 +++- arch/m32r/kernel/io_opsput.c | 71 +- arch/m32r/kernel/setup_opsput.c | 17 +++- include/asm-m32r/ide.h |3 +- 4 files changed, 84 insertions(+), 14 deletions(-) diff --git a/arch/m32r/boot/compressed/m32r_sio.c b/arch/m32r/boot/compressed/m32r_sio.c index bce8af5..ee3c8be 100644 --- a/arch/m32r/boot/compressed/m32r_sio.c +++ b/arch/m32r/boot/compressed/m32r_sio.c @@ -2,6 +2,7 @@ * arch/m32r/boot/compressed/m32r_sio.c * * 2003-02-12: Takeo Takahashi + * 2006-11-30: OPSPUT support by Kazuhiro Inaoka * */ @@ -16,7 +17,7 @@ static int puts(const char *s) return 0; } -#if defined(CONFIG_PLAT_M32700UT_Alpha) || defined(CONFIG_PLAT_M32700UT) +#if defined(CONFIG_PLAT_M32700UT_Alpha) || defined(CONFIG_PLAT_M32700UT) || defined(CONFIG_PLAT_OPSPUT) #include asm/m32r.h #include asm/io.h @@ -31,7 +32,11 @@ static int puts(const char *s) #define BOOT_SIO0TXB (volatile unsigned short *)(0x02c0 + 0x2000c) #else #undef PLD_BASE +#if defined(CONFIG_PLAT_OPSPUT) +#define PLD_BASE 0x1cc0 +#else #define PLD_BASE 0xa4c0 +#endif #define BOOT_SIO0STS PLD_ESIO0STS #define BOOT_SIO0TXB PLD_ESIO0TXB #endif diff --git a/arch/m32r/kernel/io_opsput.c b/arch/m32r/kernel/io_opsput.c index da6c5f5..3cbb1f7 100644 --- a/arch/m32r/kernel/io_opsput.c +++ b/arch/m32r/kernel/io_opsput.c @@ -30,14 +30,34 @@ extern void pcc_iowrite_byte(int, unsigned long, void *, size_t, size_t, int); extern void pcc_iowrite_word(int, unsigned long, void *, size_t, size_t, int); #endif /* CONFIG_PCMCIA CONFIG_M32R_CFC */ -#define PORT2ADDR(port) _port2addr(port) -#define PORT2ADDR_USB(port) _port2addr_usb(port) +#define PORT2ADDR(port)_port2addr(port) +#define PORT2ADDR_USB(port)_port2addr_usb(port) static inline void *_port2addr(unsigned long port) { return (void *)(port | NONCACHE_OFFSET); } +#if defined(CONFIG_IDE) !defined(CONFIG_M32R_CFC) +static inline void *__port2addr_ata(unsigned long port) +{ + static int dummy_reg; + + switch (port) { + case 0x1f0: return (void *)(0x0c002000 | NONCACHE_OFFSET); + case 0x1f1: return (void *)(0x0c012800 | NONCACHE_OFFSET); + case 0x1f2: return (void *)(0x0c012002 | NONCACHE_OFFSET); + case 0x1f3: return (void *)(0x0c012802 | NONCACHE_OFFSET); + case 0x1f4: return (void *)(0x0c012004 | NONCACHE_OFFSET); + case 0x1f5: return (void *)(0x0c012804 | NONCACHE_OFFSET); + case 0x1f6: return (void *)(0x0c012006 | NONCACHE_OFFSET); + case 0x1f7: return (void *)(0x0c012806 | NONCACHE_OFFSET); + case 0x3f6: return (void *)(0x0c01200e | NONCACHE_OFFSET); + default:return (void *)dummy_reg; + } +} +#endif + /* * OPSPUT-LAN is located in the extended bus space * from 0x1000 to 0x13ff on physical address. @@ -97,6 +117,12 @@ unsigned char _inb(unsigned long port) { if (port = LAN_IOSTART port LAN_IOEND) return _ne_inb(PORT2ADDR_NE(port)); + +#if defined(CONFIG_IDE) !defined(CONFIG_M32R_CFC) + else if ((port = 0x1f0 port =0x1f7) || port == 0x3f6) { + return *(volatile unsigned char *)__port2addr_ata(port); + } +#endif #if defined(CONFIG_PCMCIA) defined(CONFIG_M32R_CFC) else if (port = M32R_PCC_IOSTART0 port = M32R_PCC_IOEND0) { unsigned char b; @@ -112,6 +138,11 @@ unsigned short _inw(unsigned long port) { if (port = LAN_IOSTART port LAN_IOEND) return _ne_inw(PORT2ADDR_NE(port)); +#if defined(CONFIG_IDE) !defined(CONFIG_M32R_CFC) + else if ((port = 0x1f0 port =0x1f7) || port == 0x3f6) { + return *(volatile unsigned short *)__port2addr_ata(port); + } +#endif #if defined(CONFIG_USB) else if(port = 0x340 port 0x3a0) return *(volatile unsigned short *)PORT2ADDR_USB(port); @@ -164,6 +195,11 @@ void _outb(unsigned char b, unsigned long port) if (port = LAN_IOSTART port LAN_IOEND) _ne_outb(b, PORT2ADDR_NE(port)); else +#if defined(CONFIG_IDE) !defined(CONFIG_M32R_CFC) + if ((port = 0x1f0 port =0x1f7) || port == 0x3f6) { + *(volatile unsigned char *)__port2addr_ata(port) = b; + } else +#endif #if defined(CONFIG_PCMCIA) defined(CONFIG_M32R_CFC) if (port
[PATCH 2.6.13-rc4] m32r: Fix local-timer event handling
Hello, There was a scheduling problem of the m32r SMP kernel; A process rarely stopped and gave no responding but the other process have been handled by the other CPU still lives, then if we did something in the other terminal or something like that, the stopped process came back to life and continued its operation... (ex. LMbench: lat_sig) In the m32r SMP kernel, a local-timer event is delivered by using an IPI(inter processor interrupts); LOCAL_TIMER_IPI. And a function smp_send_timer() is prepared to send the LOCAL_TIMER_IPI from the current CPU to the other CPUs. The funtion smp_send_timer() was placed and used in do_IRQ() in former times (before 2.6.10-rc3-mm1 kernel), however, it was unintentionally removed when arch/m32r/kernel/irq.c was modified to employ the generic hardirq framework (CONFIG_GENERIC_HARDIRQ) in my previous patch. [PATCH 2.6.10-rc3-mm1] m32r: Use generic hardirq framework http://www.ussg.iu.edu/hypermail/linux/kernel/0412.2/0358.html The following patch fixes the above problem. I hope this will be merged in 2.6.13. Thanks, Signed-off-by: Hitoshi Yamamoto <[EMAIL PROTECTED]> Signed-off-by: Hirokazu Takata <[EMAIL PROTECTED]> --- arch/m32r/kernel/time.c | 13 - 1 files changed, 4 insertions(+), 9 deletions(-) Index: linux-2.6.13-rc4/arch/m32r/kernel/time.c === --- linux-2.6.13-rc4.orig/arch/m32r/kernel/time.c 2005-08-01 16:58:47.0 +0900 +++ linux-2.6.13-rc4/arch/m32r/kernel/time.c2005-08-01 16:58:53.0 +0900 @@ -205,8 +205,7 @@ static long last_rtc_update = 0; * timer_interrupt() needs to keep up the real-time clock, * as well as call the "do_timer()" routine every clocktick */ -static inline void -do_timer_interrupt(int irq, void *dev_id, struct pt_regs * regs) +irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) { #ifndef CONFIG_SMP profile_tick(CPU_PROFILING, regs); @@ -221,6 +220,7 @@ do_timer_interrupt(int irq, void *dev_id * CMOS clock accordingly every ~11 minutes. Set_rtc_mmss() has to be * called as close as possible to 500 ms before the new second starts. */ + write_seqlock(_lock); if ((time_status & STA_UNSYNC) == 0 && xtime.tv_sec > last_rtc_update + 660 && (xtime.tv_nsec / 1000) >= 50 - ((unsigned)TICK_SIZE) / 2 @@ -231,6 +231,7 @@ do_timer_interrupt(int irq, void *dev_id else/* do it again in 60 s */ last_rtc_update = xtime.tv_sec - 600; } + write_sequnlock(_lock); /* As we return to user mode fire off the other CPU schedulers.. this is basically because we don't yet share IRQ's around. This message is rigged to be safe on the 386 - basically it's @@ -238,14 +239,8 @@ do_timer_interrupt(int irq, void *dev_id #ifdef CONFIG_SMP smp_local_timer_interrupt(regs); + smp_send_timer(); #endif -} - -irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) -{ - write_seqlock(_lock); - do_timer_interrupt(irq, NULL, regs); - write_sequnlock(_lock); return IRQ_HANDLED; } -- Hirokazu Takata <[EMAIL PROTECTED]> Linux/M32R Project: http://www.linux-m32r.org/ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2.6.13-rc4] m32r: Fix local-timer event handling
Hello, There was a scheduling problem of the m32r SMP kernel; A process rarely stopped and gave no responding but the other process have been handled by the other CPU still lives, then if we did something in the other terminal or something like that, the stopped process came back to life and continued its operation... (ex. LMbench: lat_sig) In the m32r SMP kernel, a local-timer event is delivered by using an IPI(inter processor interrupts); LOCAL_TIMER_IPI. And a function smp_send_timer() is prepared to send the LOCAL_TIMER_IPI from the current CPU to the other CPUs. The funtion smp_send_timer() was placed and used in do_IRQ() in former times (before 2.6.10-rc3-mm1 kernel), however, it was unintentionally removed when arch/m32r/kernel/irq.c was modified to employ the generic hardirq framework (CONFIG_GENERIC_HARDIRQ) in my previous patch. [PATCH 2.6.10-rc3-mm1] m32r: Use generic hardirq framework http://www.ussg.iu.edu/hypermail/linux/kernel/0412.2/0358.html The following patch fixes the above problem. I hope this will be merged in 2.6.13. Thanks, Signed-off-by: Hitoshi Yamamoto [EMAIL PROTECTED] Signed-off-by: Hirokazu Takata [EMAIL PROTECTED] --- arch/m32r/kernel/time.c | 13 - 1 files changed, 4 insertions(+), 9 deletions(-) Index: linux-2.6.13-rc4/arch/m32r/kernel/time.c === --- linux-2.6.13-rc4.orig/arch/m32r/kernel/time.c 2005-08-01 16:58:47.0 +0900 +++ linux-2.6.13-rc4/arch/m32r/kernel/time.c2005-08-01 16:58:53.0 +0900 @@ -205,8 +205,7 @@ static long last_rtc_update = 0; * timer_interrupt() needs to keep up the real-time clock, * as well as call the do_timer() routine every clocktick */ -static inline void -do_timer_interrupt(int irq, void *dev_id, struct pt_regs * regs) +irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) { #ifndef CONFIG_SMP profile_tick(CPU_PROFILING, regs); @@ -221,6 +220,7 @@ do_timer_interrupt(int irq, void *dev_id * CMOS clock accordingly every ~11 minutes. Set_rtc_mmss() has to be * called as close as possible to 500 ms before the new second starts. */ + write_seqlock(xtime_lock); if ((time_status STA_UNSYNC) == 0 xtime.tv_sec last_rtc_update + 660 (xtime.tv_nsec / 1000) = 50 - ((unsigned)TICK_SIZE) / 2 @@ -231,6 +231,7 @@ do_timer_interrupt(int irq, void *dev_id else/* do it again in 60 s */ last_rtc_update = xtime.tv_sec - 600; } + write_sequnlock(xtime_lock); /* As we return to user mode fire off the other CPU schedulers.. this is basically because we don't yet share IRQ's around. This message is rigged to be safe on the 386 - basically it's @@ -238,14 +239,8 @@ do_timer_interrupt(int irq, void *dev_id #ifdef CONFIG_SMP smp_local_timer_interrupt(regs); + smp_send_timer(); #endif -} - -irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) -{ - write_seqlock(xtime_lock); - do_timer_interrupt(irq, NULL, regs); - write_sequnlock(xtime_lock); return IRQ_HANDLED; } -- Hirokazu Takata [EMAIL PROTECTED] Linux/M32R Project: http://www.linux-m32r.org/ - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2.6.12-rc1-mm3] m32r: build fix for CONFIG_DISCONTIGMEM
This patch fixes build error for CONFIG_DISCONTIGMEM. Please apply. * arch/m32r/mm/discontig.c: Fix build error for CONFIG_DISCONTIGMEM. * arch/m32r/kernel/setup.c: ditto. * arch/m32r/mm/discontig.c: - Add topology_init. - Cosmetics: change indentation of comments. Thanks, Signed-off-by: Hayato Fujiwara <[EMAIL PROTECTED]> Signed-off-by: Hirokazu Takata <[EMAIL PROTECTED]> --- arch/m32r/kernel/setup.c | 31 +++ arch/m32r/mm/discontig.c |1 + 2 files changed, 24 insertions(+), 8 deletions(-) diff -ruNp a/arch/m32r/kernel/setup.c b/arch/m32r/kernel/setup.c --- a/arch/m32r/kernel/setup.c 2005-03-31 16:18:18.640005019 +0900 +++ b/arch/m32r/kernel/setup.c 2005-03-31 16:17:55.848982566 +0900 @@ -7,8 +7,6 @@ *Hitoshi Yamamoto */ -/* $Id$ */ - #include #include #include @@ -24,6 +22,9 @@ #include #include #include +#include +#include + #include #include #include @@ -52,7 +53,7 @@ struct cpuinfo_m32r boot_cpu_data; #ifdef CONFIG_BLK_DEV_RAM extern int rd_doload; /* 1 = load ramdisk, 0 = don't load */ extern int rd_prompt; /* 1 = prompt for ramdisk, 0 = don't prompt */ -extern int rd_image_start; /* starting block # of image */ +extern int rd_image_start; /* starting block # of image */ #endif #if defined(CONFIG_VGA_CONSOLE) @@ -273,6 +274,21 @@ void __init setup_arch(char **cmdline_p) paging_init(); } +static struct cpu cpu[NR_CPUS]; + +static int __init topology_init(void) +{ + int cpu_id; + + for (cpu_id = 0; cpu_id < NR_CPUS; cpu_id++) + if (cpu_possible(cpu_id)) + register_cpu([cpu_id], cpu_id, NULL); + + return 0; +} + +subsys_initcall(topology_init); + #ifdef CONFIG_PROC_FS /* * Get CPU information for use by the procfs. @@ -285,7 +301,7 @@ static int show_cpuinfo(struct seq_file #ifdef CONFIG_SMP if (!cpu_online(cpu)) return 0; -#endif /* CONFIG_SMP */ +#endif /* CONFIG_SMP */ seq_printf(m, "processor\t: %ld\n", cpu); @@ -359,7 +375,7 @@ struct seq_operations cpuinfo_op = { stop: c_stop, show: show_cpuinfo, }; -#endif /* CONFIG_PROC_FS */ +#endif /* CONFIG_PROC_FS */ unsigned long cpu_initialized __initdata = 0; @@ -399,7 +415,6 @@ void __init cpu_init (void) #endif /* Set up ICUIMASK */ - outl(0x0007, M32R_ICU_IMASK_PORTL); /* imask=111 */ + outl(0x0007, M32R_ICU_IMASK_PORTL); /* imask=111 */ } -#endif /* defined(CONFIG_CHIP_VDEC2) ... */ - +#endif /* defined(CONFIG_CHIP_VDEC2) ... */ diff -ruNp a/arch/m32r/mm/discontig.c b/arch/m32r/mm/discontig.c --- a/arch/m32r/mm/discontig.c 2005-03-31 16:18:18.649003632 +0900 +++ b/arch/m32r/mm/discontig.c 2005-03-31 15:28:45.0 +0900 @@ -11,6 +11,7 @@ #include #include #include +#include #include -- Hirokazu Takata <[EMAIL PROTECTED]> Linux/M32R Project: http://www.linux-m32r.org/ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2.6.12-rc1-mm3] m32r: build fix for CONFIG_DISCONTIGMEM
This patch fixes build error for CONFIG_DISCONTIGMEM. Please apply. * arch/m32r/mm/discontig.c: Fix build error for CONFIG_DISCONTIGMEM. * arch/m32r/kernel/setup.c: ditto. * arch/m32r/mm/discontig.c: - Add topology_init. - Cosmetics: change indentation of comments. Thanks, Signed-off-by: Hayato Fujiwara [EMAIL PROTECTED] Signed-off-by: Hirokazu Takata [EMAIL PROTECTED] --- arch/m32r/kernel/setup.c | 31 +++ arch/m32r/mm/discontig.c |1 + 2 files changed, 24 insertions(+), 8 deletions(-) diff -ruNp a/arch/m32r/kernel/setup.c b/arch/m32r/kernel/setup.c --- a/arch/m32r/kernel/setup.c 2005-03-31 16:18:18.640005019 +0900 +++ b/arch/m32r/kernel/setup.c 2005-03-31 16:17:55.848982566 +0900 @@ -7,8 +7,6 @@ *Hitoshi Yamamoto */ -/* $Id$ */ - #include linux/config.h #include linux/init.h #include linux/stddef.h @@ -24,6 +22,9 @@ #include linux/seq_file.h #include linux/timex.h #include linux/tty.h +#include linux/cpu.h +#include linux/nodemask.h + #include asm/processor.h #include asm/pgtable.h #include asm/io.h @@ -52,7 +53,7 @@ struct cpuinfo_m32r boot_cpu_data; #ifdef CONFIG_BLK_DEV_RAM extern int rd_doload; /* 1 = load ramdisk, 0 = don't load */ extern int rd_prompt; /* 1 = prompt for ramdisk, 0 = don't prompt */ -extern int rd_image_start; /* starting block # of image */ +extern int rd_image_start; /* starting block # of image */ #endif #if defined(CONFIG_VGA_CONSOLE) @@ -273,6 +274,21 @@ void __init setup_arch(char **cmdline_p) paging_init(); } +static struct cpu cpu[NR_CPUS]; + +static int __init topology_init(void) +{ + int cpu_id; + + for (cpu_id = 0; cpu_id NR_CPUS; cpu_id++) + if (cpu_possible(cpu_id)) + register_cpu(cpu[cpu_id], cpu_id, NULL); + + return 0; +} + +subsys_initcall(topology_init); + #ifdef CONFIG_PROC_FS /* * Get CPU information for use by the procfs. @@ -285,7 +301,7 @@ static int show_cpuinfo(struct seq_file #ifdef CONFIG_SMP if (!cpu_online(cpu)) return 0; -#endif /* CONFIG_SMP */ +#endif /* CONFIG_SMP */ seq_printf(m, processor\t: %ld\n, cpu); @@ -359,7 +375,7 @@ struct seq_operations cpuinfo_op = { stop: c_stop, show: show_cpuinfo, }; -#endif /* CONFIG_PROC_FS */ +#endif /* CONFIG_PROC_FS */ unsigned long cpu_initialized __initdata = 0; @@ -399,7 +415,6 @@ void __init cpu_init (void) #endif /* Set up ICUIMASK */ - outl(0x0007, M32R_ICU_IMASK_PORTL); /* imask=111 */ + outl(0x0007, M32R_ICU_IMASK_PORTL); /* imask=111 */ } -#endif /* defined(CONFIG_CHIP_VDEC2) ... */ - +#endif /* defined(CONFIG_CHIP_VDEC2) ... */ diff -ruNp a/arch/m32r/mm/discontig.c b/arch/m32r/mm/discontig.c --- a/arch/m32r/mm/discontig.c 2005-03-31 16:18:18.649003632 +0900 +++ b/arch/m32r/mm/discontig.c 2005-03-31 15:28:45.0 +0900 @@ -11,6 +11,7 @@ #include linux/bootmem.h #include linux/mmzone.h #include linux/initrd.h +#include linux/nodemask.h #include asm/setup.h -- Hirokazu Takata [EMAIL PROTECTED] Linux/M32R Project: http://www.linux-m32r.org/ - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2.6.12-rc1-mm3] m32r: m32r_sio driver update (was Re: [PATCH] Re: Bitrotting serial drivers)
Hello, Here is an additional patch to update m32r_sio driver. This patch is against 2.6.12-rc1-mm3. m32r_sio driver updates: - Move m32r_sio specific description from asm-m32r/serial.h to driver/serial/m32r_sio.c. - Remove __register_m32r_sio, register_m32r_sio and unregister_m32r_sio from driver/serial/m32r_sio.c. Thank you. From: Russell King <[EMAIL PROTECTED]> Subject: Re: [PATCH] Re: Bitrotting serial drivers Date: Thu, 24 Mar 2005 12:17:46 + > On Thu, Mar 24, 2005 at 07:14:24PM +0900, Hirokazu Takata wrote: > > diff -ruNp a/include/asm-m32r/serial.h b/include/asm-m32r/serial.h > > --- a/include/asm-m32r/serial.h 2004-12-25 06:35:40.0 +0900 > > +++ b/include/asm-m32r/serial.h 2005-03-24 17:25:05.812651363 +0900 > > Can m32r accept PCMCIA cards? If so, this may mean that 8250.c gets > built, which will use this file to determine where it should look for > built-in 8250 ports. > > If this file is used to describe non-8250 compatible ports, you could > end up with a nasty mess. Therefore, I recommend that you do not use > asm-m32r/serial.h to describe your SIO ports. > > Instead, since these definitions are private to your own driver, you > may consider moving them into the driver, or a header file closely > associated with your driver in drivers/serial. Signed-off-by: Hirokazu Takata <[EMAIL PROTECTED]> --- drivers/serial/m32r_sio.c | 131 ++ include/asm-m32r/serial.h | 41 -- 2 files changed, 31 insertions(+), 141 deletions(-) diff -ruNp a/include/asm-m32r/serial.h b/include/asm-m32r/serial.h --- a/include/asm-m32r/serial.h 2005-03-29 21:47:12.912822762 +0900 +++ b/include/asm-m32r/serial.h 2005-03-29 18:15:37.0 +0900 @@ -1,47 +1,10 @@ #ifndef _ASM_M32R_SERIAL_H #define _ASM_M32R_SERIAL_H -/* - * include/asm-m32r/serial.h - */ +/* include/asm-m32r/serial.h */ #include -#include -/* - * This assumes you have a 1.8432 MHz clock for your UART. - * - * It'd be nice if someone built a serial card with a 24.576 MHz - * clock, since the 16550A is capable of handling a top speed of 1.5 - * megabits/second; but this requires the faster clock. - */ -#define BASE_BAUD ( 1843200 / 16 ) - -/* Standard COM flags */ -#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST) - -/* Standard PORT definitions */ -#if defined(CONFIG_PLAT_USRV) - -#define STD_SERIAL_PORT_DEFNS \ - /* UART CLK PORT IRQFLAGS */ \ - { 0, BASE_BAUD, 0x3F8, PLD_IRQ_UART0, STD_COM_FLAGS }, /* ttyS0 */ \ - { 0, BASE_BAUD, 0x2F8, PLD_IRQ_UART1, STD_COM_FLAGS }, /* ttyS1 */ - -#else /* !CONFIG_PLAT_USRV */ - -#if defined(CONFIG_SERIAL_M32R_PLDSIO) -#define STD_SERIAL_PORT_DEFNS \ - { 0, BASE_BAUD, ((unsigned long)PLD_ESIO0CR), PLD_IRQ_SIO0_RCV, \ - STD_COM_FLAGS }, /* ttyS0 */ -#else -#define STD_SERIAL_PORT_DEFNS \ - { 0, BASE_BAUD, M32R_SIO_OFFSET, M32R_IRQ_SIO0_R, \ - STD_COM_FLAGS }, /* ttyS0 */ -#endif - -#endif /* !CONFIG_PLAT_USRV */ - -#define SERIAL_PORT_DFNS STD_SERIAL_PORT_DEFNS +#define BASE_BAUD 115200 #endif /* _ASM_M32R_SERIAL_H */ diff -ruNp a/drivers/serial/m32r_sio.c b/drivers/serial/m32r_sio.c --- a/drivers/serial/m32r_sio.c 2005-03-29 21:47:12.924820913 +0900 +++ b/drivers/serial/m32r_sio.c 2005-03-29 21:56:38.001930365 +0900 @@ -54,13 +54,6 @@ #include "m32r_sio_reg.h" /* - * Configuration: - * share_irqs - whether we pass SA_SHIRQ to request_irq(). This option - *is unsafe when used on edge-triggered interrupts. - */ -unsigned int share_irqs_sio = M32R_SIO_SHARE_IRQS; - -/* * Debugging. */ #if 0 @@ -86,15 +79,36 @@ unsigned int share_irqs_sio = M32R_SIO_S #include +/* Standard COM flags */ +#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST) + /* * SERIAL_PORT_DFNS tells us about built-in ports that have no * standard enumeration mechanism. Platforms that can find all * serial ports via mechanisms like ACPI or PCI need not supply it. */ -#ifndef SERIAL_PORT_DFNS -#define SERIAL_PORT_DFNS +#undef SERIAL_PORT_DFNS +#if defined(CONFIG_PLAT_USRV) + +#define SERIAL_PORT_DFNS \ + /* UART CLK PORT IRQFLAGS */ \ + { 0, BASE_BAUD, 0x3F8, PLD_IRQ_UART0, STD_COM_FLAGS }, /* ttyS0 */ \ + { 0, BASE_BAUD, 0x2F8, PLD_IRQ_UART1, STD_COM_FLAGS }, /* ttyS1 */ + +#else /* !CONFIG_PLAT_USRV */ + +#if defined(CONFIG_SERIAL_M32R_PLDSIO) +#define SERIAL_PORT_DFNS \ + { 0, BASE_BAUD, ((unsigned long)PLD_ESIO0CR), PLD_IRQ_SIO0_RCV, \ + STD_COM_FLAGS }, /* ttyS0 */ +#else +#define SERIAL_PORT_DFNS
[PATCH 2.6.12-rc1] m32r: Fix spinlock.h for CONFIG_DEBUG_SPINLOCK
This patch is for fixing a build error of asm-m32r/spinlock.h for CONFIG_DEBUG_SPINLOCK. Please apply. Thanks, Signed-off-by: Hirokazu Takata <[EMAIL PROTECTED]> --- include/asm-m32r/spinlock.h |6 ++ 1 files changed, 2 insertions(+), 4 deletions(-) diff -ruNp a/include/asm-m32r/spinlock.h b/include/asm-m32r/spinlock.h --- a/include/asm-m32r/spinlock.h 2005-03-07 14:10:57.0 +0900 +++ b/include/asm-m32r/spinlock.h 2005-03-08 14:08:57.0 +0900 @@ -102,10 +102,8 @@ static inline void _raw_spin_lock(spinlo unsigned long tmp0, tmp1; #ifdef CONFIG_DEBUG_SPINLOCK - __label__ here; -here: - if (lock->magic != SPINLOCK_MAGIC) { - printk("pc: %p\n", &); + if (unlikely(lock->magic != SPINLOCK_MAGIC)) { + printk("pc: %p\n", __builtin_return_address(0)); BUG(); } #endif -- Hirokazu Takata <[EMAIL PROTECTED]> Linux/M32R Project: http://www.linux-m32r.org/ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2.6.12-rc1] m32r: Fix spinlock.h for CONFIG_DEBUG_SPINLOCK
This patch is for fixing a build error of asm-m32r/spinlock.h for CONFIG_DEBUG_SPINLOCK. Please apply. Thanks, Signed-off-by: Hirokazu Takata [EMAIL PROTECTED] --- include/asm-m32r/spinlock.h |6 ++ 1 files changed, 2 insertions(+), 4 deletions(-) diff -ruNp a/include/asm-m32r/spinlock.h b/include/asm-m32r/spinlock.h --- a/include/asm-m32r/spinlock.h 2005-03-07 14:10:57.0 +0900 +++ b/include/asm-m32r/spinlock.h 2005-03-08 14:08:57.0 +0900 @@ -102,10 +102,8 @@ static inline void _raw_spin_lock(spinlo unsigned long tmp0, tmp1; #ifdef CONFIG_DEBUG_SPINLOCK - __label__ here; -here: - if (lock-magic != SPINLOCK_MAGIC) { - printk(pc: %p\n, here); + if (unlikely(lock-magic != SPINLOCK_MAGIC)) { + printk(pc: %p\n, __builtin_return_address(0)); BUG(); } #endif -- Hirokazu Takata [EMAIL PROTECTED] Linux/M32R Project: http://www.linux-m32r.org/ - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2.6.12-rc1-mm3] m32r: m32r_sio driver update (was Re: [PATCH] Re: Bitrotting serial drivers)
Hello, Here is an additional patch to update m32r_sio driver. This patch is against 2.6.12-rc1-mm3. m32r_sio driver updates: - Move m32r_sio specific description from asm-m32r/serial.h to driver/serial/m32r_sio.c. - Remove __register_m32r_sio, register_m32r_sio and unregister_m32r_sio from driver/serial/m32r_sio.c. Thank you. From: Russell King [EMAIL PROTECTED] Subject: Re: [PATCH] Re: Bitrotting serial drivers Date: Thu, 24 Mar 2005 12:17:46 + On Thu, Mar 24, 2005 at 07:14:24PM +0900, Hirokazu Takata wrote: diff -ruNp a/include/asm-m32r/serial.h b/include/asm-m32r/serial.h --- a/include/asm-m32r/serial.h 2004-12-25 06:35:40.0 +0900 +++ b/include/asm-m32r/serial.h 2005-03-24 17:25:05.812651363 +0900 Can m32r accept PCMCIA cards? If so, this may mean that 8250.c gets built, which will use this file to determine where it should look for built-in 8250 ports. If this file is used to describe non-8250 compatible ports, you could end up with a nasty mess. Therefore, I recommend that you do not use asm-m32r/serial.h to describe your SIO ports. Instead, since these definitions are private to your own driver, you may consider moving them into the driver, or a header file closely associated with your driver in drivers/serial. Signed-off-by: Hirokazu Takata [EMAIL PROTECTED] --- drivers/serial/m32r_sio.c | 131 ++ include/asm-m32r/serial.h | 41 -- 2 files changed, 31 insertions(+), 141 deletions(-) diff -ruNp a/include/asm-m32r/serial.h b/include/asm-m32r/serial.h --- a/include/asm-m32r/serial.h 2005-03-29 21:47:12.912822762 +0900 +++ b/include/asm-m32r/serial.h 2005-03-29 18:15:37.0 +0900 @@ -1,47 +1,10 @@ #ifndef _ASM_M32R_SERIAL_H #define _ASM_M32R_SERIAL_H -/* - * include/asm-m32r/serial.h - */ +/* include/asm-m32r/serial.h */ #include linux/config.h -#include asm/m32r.h -/* - * This assumes you have a 1.8432 MHz clock for your UART. - * - * It'd be nice if someone built a serial card with a 24.576 MHz - * clock, since the 16550A is capable of handling a top speed of 1.5 - * megabits/second; but this requires the faster clock. - */ -#define BASE_BAUD ( 1843200 / 16 ) - -/* Standard COM flags */ -#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST) - -/* Standard PORT definitions */ -#if defined(CONFIG_PLAT_USRV) - -#define STD_SERIAL_PORT_DEFNS \ - /* UART CLK PORT IRQFLAGS */ \ - { 0, BASE_BAUD, 0x3F8, PLD_IRQ_UART0, STD_COM_FLAGS }, /* ttyS0 */ \ - { 0, BASE_BAUD, 0x2F8, PLD_IRQ_UART1, STD_COM_FLAGS }, /* ttyS1 */ - -#else /* !CONFIG_PLAT_USRV */ - -#if defined(CONFIG_SERIAL_M32R_PLDSIO) -#define STD_SERIAL_PORT_DEFNS \ - { 0, BASE_BAUD, ((unsigned long)PLD_ESIO0CR), PLD_IRQ_SIO0_RCV, \ - STD_COM_FLAGS }, /* ttyS0 */ -#else -#define STD_SERIAL_PORT_DEFNS \ - { 0, BASE_BAUD, M32R_SIO_OFFSET, M32R_IRQ_SIO0_R, \ - STD_COM_FLAGS }, /* ttyS0 */ -#endif - -#endif /* !CONFIG_PLAT_USRV */ - -#define SERIAL_PORT_DFNS STD_SERIAL_PORT_DEFNS +#define BASE_BAUD 115200 #endif /* _ASM_M32R_SERIAL_H */ diff -ruNp a/drivers/serial/m32r_sio.c b/drivers/serial/m32r_sio.c --- a/drivers/serial/m32r_sio.c 2005-03-29 21:47:12.924820913 +0900 +++ b/drivers/serial/m32r_sio.c 2005-03-29 21:56:38.001930365 +0900 @@ -54,13 +54,6 @@ #include m32r_sio_reg.h /* - * Configuration: - * share_irqs - whether we pass SA_SHIRQ to request_irq(). This option - *is unsafe when used on edge-triggered interrupts. - */ -unsigned int share_irqs_sio = M32R_SIO_SHARE_IRQS; - -/* * Debugging. */ #if 0 @@ -86,15 +79,36 @@ unsigned int share_irqs_sio = M32R_SIO_S #include asm/serial.h +/* Standard COM flags */ +#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST) + /* * SERIAL_PORT_DFNS tells us about built-in ports that have no * standard enumeration mechanism. Platforms that can find all * serial ports via mechanisms like ACPI or PCI need not supply it. */ -#ifndef SERIAL_PORT_DFNS -#define SERIAL_PORT_DFNS +#undef SERIAL_PORT_DFNS +#if defined(CONFIG_PLAT_USRV) + +#define SERIAL_PORT_DFNS \ + /* UART CLK PORT IRQFLAGS */ \ + { 0, BASE_BAUD, 0x3F8, PLD_IRQ_UART0, STD_COM_FLAGS }, /* ttyS0 */ \ + { 0, BASE_BAUD, 0x2F8, PLD_IRQ_UART1, STD_COM_FLAGS }, /* ttyS1 */ + +#else /* !CONFIG_PLAT_USRV */ + +#if defined(CONFIG_SERIAL_M32R_PLDSIO) +#define SERIAL_PORT_DFNS \ + { 0, BASE_BAUD, ((unsigned long)PLD_ESIO0CR), PLD_IRQ_SIO0_RCV, \ + STD_COM_FLAGS }, /* ttyS0 */ +#else +#define SERIAL_PORT_DFNS \ + { 0, BASE_BAUD
Re: [PATCH] Re: Bitrotting serial drivers
From: Russell King <[EMAIL PROTECTED]> Date: Thu, 24 Mar 2005 12:17:46 + > On Thu, Mar 24, 2005 at 07:14:24PM +0900, Hirokazu Takata wrote: > > Could you please accept the following patch? > > Probably, but I'd like to have a reply to my comments below first. > > > diff -ruNp a/include/asm-m32r/serial.h b/include/asm-m32r/serial.h > > --- a/include/asm-m32r/serial.h 2004-12-25 06:35:40.0 +0900 > > +++ b/include/asm-m32r/serial.h 2005-03-24 17:25:05.812651363 +0900 > > Can m32r accept PCMCIA cards? If so, this may mean that 8250.c gets > built, which will use this file to determine where it should look for > built-in 8250 ports. > > If this file is used to describe non-8250 compatible ports, you could > end up with a nasty mess. Therefore, I recommend that you do not use > asm-m32r/serial.h to describe your SIO ports. I understand. You mean I have to keep 8250.c buildable for PCMCIA serial cards, if I make use of both m32r_sio and 8250 compatible drivers at a time, right? > Instead, since these definitions are private to your own driver, you > may consider moving them into the driver, or a header file closely > associated with your driver in drivers/serial. I will try to move these definitions into the m32r_sio driver. Please just a moment, I have no time to do it now... Thank you. -- Takata - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Re: Bitrotting serial drivers
From: Russell King [EMAIL PROTECTED] Date: Thu, 24 Mar 2005 12:17:46 + On Thu, Mar 24, 2005 at 07:14:24PM +0900, Hirokazu Takata wrote: Could you please accept the following patch? Probably, but I'd like to have a reply to my comments below first. diff -ruNp a/include/asm-m32r/serial.h b/include/asm-m32r/serial.h --- a/include/asm-m32r/serial.h 2004-12-25 06:35:40.0 +0900 +++ b/include/asm-m32r/serial.h 2005-03-24 17:25:05.812651363 +0900 Can m32r accept PCMCIA cards? If so, this may mean that 8250.c gets built, which will use this file to determine where it should look for built-in 8250 ports. If this file is used to describe non-8250 compatible ports, you could end up with a nasty mess. Therefore, I recommend that you do not use asm-m32r/serial.h to describe your SIO ports. I understand. You mean I have to keep 8250.c buildable for PCMCIA serial cards, if I make use of both m32r_sio and 8250 compatible drivers at a time, right? Instead, since these definitions are private to your own driver, you may consider moving them into the driver, or a header file closely associated with your driver in drivers/serial. I will try to move these definitions into the m32r_sio driver. Please just a moment, I have no time to do it now... Thank you. -- Takata - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] Re: Bitrotting serial drivers
Hi, I made a patch to update m32r_sio driver. Compile checked and tested on a M32700UT eva board with SMP kernel. It looks working... Could you please accept the following patch? Thanks, -- Takata From: Russell King <[EMAIL PROTECTED]> Date: Sat, 19 Mar 2005 17:21:01 + > m32r_sio > > > Maintainer: Hirokazu Takata > > Please clean up the m32r_sio driver, removing whatever bits of code > aren't absolutely necessary. > > Specifically, I'd like to see the following addressed: > > - the usage of SERIAL_IO_HUB6 > (this driver doesn't support hub6 cards) > - SERIAL_IO_* should be UPIO_* > - __register_m32r_sio, register_m32r_sio, unregister_m32r_sio, > m32r_sio_get_irq_map > (this driver doesn't support PCMCIA cards, all of which are based on >8250-compatible devices.) __register_m32r_sio, register_m32r_sio, unregister_m32r_sio are still remained. I'm going to take a look them after. > - early_serial_setup > (should we really have the function name duplicated across different >hardware drivers?) > Signed-off-by: Hirokazu Takata <[EMAIL PROTECTED]> --- drivers/serial/m32r_sio.c | 156 -- drivers/serial/m32r_sio.h |1 drivers/serial/m32r_sio_reg.h | 190 -- include/asm-m32r/serial.h | 142 --- include/linux/serial_core.h |3 5 files changed, 59 insertions(+), 433 deletions(-) diff -ruNp a/include/linux/serial_core.h b/include/linux/serial_core.h --- a/include/linux/serial_core.h 2005-03-24 14:02:31.0 +0900 +++ b/include/linux/serial_core.h 2005-03-24 14:50:23.0 +0900 @@ -113,6 +113,9 @@ /* Samsung S3C2400 SoC */ #define PORT_S3C2400 67 +/* M32R SIO */ +#define PORT_M32R_SIO 68 + #ifdef __KERNEL__ #include diff -ruNp a/include/asm-m32r/serial.h b/include/asm-m32r/serial.h --- a/include/asm-m32r/serial.h 2004-12-25 06:35:40.0 +0900 +++ b/include/asm-m32r/serial.h 2005-03-24 17:25:05.812651363 +0900 @@ -1,10 +1,6 @@ #ifndef _ASM_M32R_SERIAL_H #define _ASM_M32R_SERIAL_H -/* $Id$ */ - -/* orig : i386 2.4.18 */ - /* * include/asm-m32r/serial.h */ @@ -21,131 +17,31 @@ */ #define BASE_BAUD ( 1843200 / 16 ) -/* Standard COM flags (except for COM4, because of the 8514 problem) */ -#ifdef CONFIG_SERIAL_DETECT_IRQ -#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST | ASYNC_AUTO_IRQ) -#define STD_COM4_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_AUTO_IRQ) -#else +/* Standard COM flags */ #define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST) -#define STD_COM4_FLAGS ASYNC_BOOT_AUTOCONF -#endif - -#ifdef CONFIG_SERIAL_MANY_PORTS -#define FOURPORT_FLAGS ASYNC_FOURPORT -#define ACCENT_FLAGS 0 -#define BOCA_FLAGS 0 -#define HUB6_FLAGS 0 -#define RS_TABLE_SIZE 64 -#else -#define RS_TABLE_SIZE -#endif - -#define MCA_COM_FLAGS (STD_COM_FLAGS|ASYNC_BOOT_ONLYMCA) - -/* - * The following define the access methods for the HUB6 card. All - * access is through two ports for all 24 possible chips. The card is - * selected through the high 2 bits, the port on that card with the - * "middle" 3 bits, and the register on that port with the bottom - * 3 bits. - * - * While the access port and interrupt is configurable, the default - * port locations are 0x302 for the port control register, and 0x303 - * for the data read/write register. Normally, the interrupt is at irq3 - * but can be anything from 3 to 7 inclusive. Note that using 3 will - * require disabling com2. - */ -#define C_P(card,port) (((card)<<6|(port)<<3) + 1) +/* Standard PORT definitions */ +#if defined(CONFIG_PLAT_USRV) -#define STD_SERIAL_PORT_DEFNS \ - /* UART CLK PORT IRQ FLAGS*/ \ - { 0, BASE_BAUD, 0x3F8, 4, STD_COM_FLAGS }, /* ttyS0 */ \ - { 0, BASE_BAUD, 0x2F8, 3, STD_COM_FLAGS }, /* ttyS1 */ \ - { 0, BASE_BAUD, 0x3E8, 4, STD_COM_FLAGS }, /* ttyS2 */ \ - { 0, BASE_BAUD, 0x2E8, 3, STD_COM4_FLAGS }, /* ttyS3 */ - - -#ifdef CONFIG_SERIAL_MANY_PORTS -#define EXTRA_SERIAL_PORT_DEFNS\ - { 0, BASE_BAUD, 0x1A0, 9, FOURPORT_FLAGS }, /* ttyS4 */ \ - { 0, BASE_BAUD, 0x1A8, 9, FOURPORT_FLAGS }, /* ttyS5 */ \ - { 0, BASE_BAUD, 0x1B0, 9, FOURPORT_FLAGS }, /* ttyS6 */ \ - { 0, BASE_BAUD, 0x1B8, 9, FOURPORT_FLAGS }, /* ttyS7 */ \ - { 0, BASE_BAUD, 0x2A0, 5, FOURPORT_FLAGS }, /* ttyS8 */ \ - { 0, BASE_BAUD, 0x2A8, 5, FOURPORT_FLAGS }, /* ttyS9 */ \ - { 0, BASE_BAUD, 0x2B0, 5, FOURPORT_FLAGS }, /* ttyS10 */\ - { 0, BASE_BAUD, 0x2B8, 5, FOURPORT_FLAGS }, /* ttyS11 */\ - { 0, BASE_BAUD, 0x330, 4, ACCENT_FLAGS }, /* ttyS12 */\ - { 0, BASE_BAUD, 0x338, 4, ACCENT_FLAGS }, /* tty
[PATCH] Re: Bitrotting serial drivers
Hi, I made a patch to update m32r_sio driver. Compile checked and tested on a M32700UT eva board with SMP kernel. It looks working... Could you please accept the following patch? Thanks, -- Takata From: Russell King [EMAIL PROTECTED] Date: Sat, 19 Mar 2005 17:21:01 + m32r_sio Maintainer: Hirokazu Takata Please clean up the m32r_sio driver, removing whatever bits of code aren't absolutely necessary. Specifically, I'd like to see the following addressed: - the usage of SERIAL_IO_HUB6 (this driver doesn't support hub6 cards) - SERIAL_IO_* should be UPIO_* - __register_m32r_sio, register_m32r_sio, unregister_m32r_sio, m32r_sio_get_irq_map (this driver doesn't support PCMCIA cards, all of which are based on 8250-compatible devices.) __register_m32r_sio, register_m32r_sio, unregister_m32r_sio are still remained. I'm going to take a look them after. - early_serial_setup (should we really have the function name duplicated across different hardware drivers?) Signed-off-by: Hirokazu Takata [EMAIL PROTECTED] --- drivers/serial/m32r_sio.c | 156 -- drivers/serial/m32r_sio.h |1 drivers/serial/m32r_sio_reg.h | 190 -- include/asm-m32r/serial.h | 142 --- include/linux/serial_core.h |3 5 files changed, 59 insertions(+), 433 deletions(-) diff -ruNp a/include/linux/serial_core.h b/include/linux/serial_core.h --- a/include/linux/serial_core.h 2005-03-24 14:02:31.0 +0900 +++ b/include/linux/serial_core.h 2005-03-24 14:50:23.0 +0900 @@ -113,6 +113,9 @@ /* Samsung S3C2400 SoC */ #define PORT_S3C2400 67 +/* M32R SIO */ +#define PORT_M32R_SIO 68 + #ifdef __KERNEL__ #include linux/config.h diff -ruNp a/include/asm-m32r/serial.h b/include/asm-m32r/serial.h --- a/include/asm-m32r/serial.h 2004-12-25 06:35:40.0 +0900 +++ b/include/asm-m32r/serial.h 2005-03-24 17:25:05.812651363 +0900 @@ -1,10 +1,6 @@ #ifndef _ASM_M32R_SERIAL_H #define _ASM_M32R_SERIAL_H -/* $Id$ */ - -/* orig : i386 2.4.18 */ - /* * include/asm-m32r/serial.h */ @@ -21,131 +17,31 @@ */ #define BASE_BAUD ( 1843200 / 16 ) -/* Standard COM flags (except for COM4, because of the 8514 problem) */ -#ifdef CONFIG_SERIAL_DETECT_IRQ -#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST | ASYNC_AUTO_IRQ) -#define STD_COM4_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_AUTO_IRQ) -#else +/* Standard COM flags */ #define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST) -#define STD_COM4_FLAGS ASYNC_BOOT_AUTOCONF -#endif - -#ifdef CONFIG_SERIAL_MANY_PORTS -#define FOURPORT_FLAGS ASYNC_FOURPORT -#define ACCENT_FLAGS 0 -#define BOCA_FLAGS 0 -#define HUB6_FLAGS 0 -#define RS_TABLE_SIZE 64 -#else -#define RS_TABLE_SIZE -#endif - -#define MCA_COM_FLAGS (STD_COM_FLAGS|ASYNC_BOOT_ONLYMCA) - -/* - * The following define the access methods for the HUB6 card. All - * access is through two ports for all 24 possible chips. The card is - * selected through the high 2 bits, the port on that card with the - * middle 3 bits, and the register on that port with the bottom - * 3 bits. - * - * While the access port and interrupt is configurable, the default - * port locations are 0x302 for the port control register, and 0x303 - * for the data read/write register. Normally, the interrupt is at irq3 - * but can be anything from 3 to 7 inclusive. Note that using 3 will - * require disabling com2. - */ -#define C_P(card,port) (((card)6|(port)3) + 1) +/* Standard PORT definitions */ +#if defined(CONFIG_PLAT_USRV) -#define STD_SERIAL_PORT_DEFNS \ - /* UART CLK PORT IRQ FLAGS*/ \ - { 0, BASE_BAUD, 0x3F8, 4, STD_COM_FLAGS }, /* ttyS0 */ \ - { 0, BASE_BAUD, 0x2F8, 3, STD_COM_FLAGS }, /* ttyS1 */ \ - { 0, BASE_BAUD, 0x3E8, 4, STD_COM_FLAGS }, /* ttyS2 */ \ - { 0, BASE_BAUD, 0x2E8, 3, STD_COM4_FLAGS }, /* ttyS3 */ - - -#ifdef CONFIG_SERIAL_MANY_PORTS -#define EXTRA_SERIAL_PORT_DEFNS\ - { 0, BASE_BAUD, 0x1A0, 9, FOURPORT_FLAGS }, /* ttyS4 */ \ - { 0, BASE_BAUD, 0x1A8, 9, FOURPORT_FLAGS }, /* ttyS5 */ \ - { 0, BASE_BAUD, 0x1B0, 9, FOURPORT_FLAGS }, /* ttyS6 */ \ - { 0, BASE_BAUD, 0x1B8, 9, FOURPORT_FLAGS }, /* ttyS7 */ \ - { 0, BASE_BAUD, 0x2A0, 5, FOURPORT_FLAGS }, /* ttyS8 */ \ - { 0, BASE_BAUD, 0x2A8, 5, FOURPORT_FLAGS }, /* ttyS9 */ \ - { 0, BASE_BAUD, 0x2B0, 5, FOURPORT_FLAGS }, /* ttyS10 */\ - { 0, BASE_BAUD, 0x2B8, 5, FOURPORT_FLAGS }, /* ttyS11 */\ - { 0, BASE_BAUD, 0x330, 4, ACCENT_FLAGS }, /* ttyS12 */\ - { 0, BASE_BAUD, 0x338, 4, ACCENT_FLAGS }, /* ttyS13 */\ - { 0, BASE_BAUD, 0x000, 0, 0 }, /* ttyS14 (spare) */\ - { 0, BASE_BAUD, 0x000
[PATCH 2.6.12-rc1] m32r: Fix M32102 I-cache invalidation
This patch fixes I-cache invalidation operation for M32102 chip, which is one of m32r MMU-less targets. Before this fix, the m32r kernel for M32102 chip missed I-cache invalidation operation and switched off I-cache unintentionally. This bug caused awful performance degradation. Signed-off-by: Mamoru Sakugawa <[EMAIL PROTECTED]> Signed-off-by: Hirokazu Takata <[EMAIL PROTECTED]> --- diff -ruNp a/arch/m32r/mm/cache.c b/arch/m32r/mm/cache.c --- a/arch/m32r/mm/cache.c 2004-12-25 06:35:50.0 +0900 +++ b/arch/m32r/mm/cache.c 2005-03-10 21:43:07.708321535 +0900 @@ -4,8 +4,6 @@ * Copyright (C) 2002 Hirokazu Takata */ -/* $Id$ */ - #include #include @@ -25,8 +23,8 @@ #define MCCR_DCACHE_CBINV (MCCR_CC|MCCR_DIV|MCCR_DCB) #define CHECK_MCCR(mccr) (mccr = *MCCR) #elif defined(CONFIG_CHIP_M32102) -#define MCCR ((volatile unsigned long*)0xfffc) -#define MCCR_IIV (1UL << 8) /* I-cache invalidate */ +#define MCCR ((volatile unsigned char*)0xfffe) +#define MCCR_IIV (1UL << 0) /* I-cache invalidate */ #define MCCR_ICACHE_INVMCCR_IIV #endif /* CONFIG_CHIP_XNUX2 || CONFIG_CHIP_M32700 */ @@ -65,4 +63,3 @@ void _flush_cache_copyback_all(void) #endif } - -- Hirokazu Takata <[EMAIL PROTECTED]> Linux/M32R Project: http://www.linux-m32r.org/ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 2.6.12-rc1] m32r: Update MMU-less support (0/3)
Andrew, From: Andrew Morton <[EMAIL PROTECTED]> > 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 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2.6.12-rc1] m32r: Update MMU-less support (1/3)
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 <[EMAIL PROTECTED]> Signed-off-by: Hirokazu Takata <[EMAIL PROTECTED]> --- 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.0 +0900 +++ b/arch/m32r/kernel/entry.S 2005-03-23 20:05:40.343327214 +0900 @@ -69,16 +69,17 @@ #include #if !defined(CONFIG_MMU) -#define sys_madvise sys_ni_syscall -#define sys_readahead sys_ni_syscall -#define sys_mprotectsys_ni_syscall -#define sys_msync sys_ni_syscall -#define sys_mlock sys_ni_syscall -#define sys_munlock sys_ni_syscall -#define sys_mlockallsys_ni_syscall -#define sys_munlockall sys_ni_syscall -#define sys_mremap sys_ni_syscall -#define sys_mincore sys_ni_syscall +#define sys_madvisesys_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_munlocksys_ni_syscall +#define sys_mlockall sys_ni_syscall +#define sys_munlockall sys_ni_syscall +#define sys_mremap sys_ni_syscall +#define sys_mincoresys_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.0 +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] = 0xff00UL; 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 <[EMAIL PROTECTED]> Linux/M32R Project: http://www.linux-m32r.org/ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2.6.12-rc1] m32r: Update MMU-less support (3/3)
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 <[EMAIL PROTECTED]> Signed-off-by: Hayato Fujiwara <[EMAIL PROTECTED]> Signed-off-by: Hirokazu Takata <[EMAIL PROTECTED]> --- 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/Makefile2004-12-25 06:33:49.0 +0900 +++ b/arch/m32r/boot/compressed/Makefile2005-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.0 +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.S2004-12-25 06:34:45.0 +0900 +++ b/arch/m32r/boot/setup.S2005-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.0 +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 #include #include #include @@ -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.c2004-12-25 06:34:31.0 +0900 +++ b/arch/m32r/mm/fault-nommu.c2005-03-23 20:05:56.192265581 +0900 @@ -23,6 +23,7 @@ #include #include #include +#include /* For unblank_screen() */ #include #include -- Hirokazu Takata <[EMAIL PROTECTED]> Linux/M32R Project: http://www.linux-m32r.org/ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2.6.12-rc1] m32r: Update MMU-less support (2/3)
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 <[EMAIL PROTECTED]> Signed-off-by: Hirokazu Takata <[EMAIL PROTECTED]> --- 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.0 +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.h2004-12-25 06:34:44.0 +0900 +++ b/include/asm-m32r/mmu.h2005-03-23 20:26:57.473769245 +0900 @@ -1,25 +1,12 @@ #ifndef _ASM_M32R_MMU_H #define _ASM_M32R_MMU_H -/* $Id$ */ - #include #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 <[EMAIL PROTECTED]> Linux/M32R Project: http://www.linux-m32r.org/ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2.6.12-rc1] m32r: Update MMU-less support (0/3)
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 <[EMAIL PROTECTED]> Linux/M32R Project: http://www.linux-m32r.org/ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2.6.12-rc1] m32r: Update MMU-less support (0/3)
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 [EMAIL PROTECTED] Linux/M32R Project: http://www.linux-m32r.org/ - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2.6.12-rc1] m32r: Update MMU-less support (2/3)
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 [EMAIL PROTECTED] Signed-off-by: Hirokazu Takata [EMAIL PROTECTED] --- 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.0 +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.h2004-12-25 06:34:44.0 +0900 +++ b/include/asm-m32r/mmu.h2005-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 [EMAIL PROTECTED] Linux/M32R Project: http://www.linux-m32r.org/ - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2.6.12-rc1] m32r: Update MMU-less support (3/3)
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 [EMAIL PROTECTED] Signed-off-by: Hayato Fujiwara [EMAIL PROTECTED] Signed-off-by: Hirokazu Takata [EMAIL PROTECTED] --- 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/Makefile2004-12-25 06:33:49.0 +0900 +++ b/arch/m32r/boot/compressed/Makefile2005-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.0 +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.S2004-12-25 06:34:45.0 +0900 +++ b/arch/m32r/boot/setup.S2005-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.0 +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.c2004-12-25 06:34:31.0 +0900 +++ b/arch/m32r/mm/fault-nommu.c2005-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 [EMAIL PROTECTED] Linux/M32R Project: http://www.linux-m32r.org/ - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2.6.12-rc1] m32r: Update MMU-less support (1/3)
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 [EMAIL PROTECTED] Signed-off-by: Hirokazu Takata [EMAIL PROTECTED] --- 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.0 +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_mprotectsys_ni_syscall -#define sys_msync sys_ni_syscall -#define sys_mlock sys_ni_syscall -#define sys_munlock sys_ni_syscall -#define sys_mlockallsys_ni_syscall -#define sys_munlockall sys_ni_syscall -#define sys_mremap sys_ni_syscall -#define sys_mincore sys_ni_syscall +#define sys_madvisesys_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_munlocksys_ni_syscall +#define sys_mlockall sys_ni_syscall +#define sys_munlockall sys_ni_syscall +#define sys_mremap sys_ni_syscall +#define sys_mincoresys_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.0 +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] = 0xff00UL; 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 [EMAIL PROTECTED] Linux/M32R Project: http://www.linux-m32r.org/ - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 2.6.12-rc1] m32r: Update MMU-less support (0/3)
Andrew, From: Andrew Morton [EMAIL PROTECTED] 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 - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2.6.12-rc1] m32r: Fix M32102 I-cache invalidation
This patch fixes I-cache invalidation operation for M32102 chip, which is one of m32r MMU-less targets. Before this fix, the m32r kernel for M32102 chip missed I-cache invalidation operation and switched off I-cache unintentionally. This bug caused awful performance degradation. Signed-off-by: Mamoru Sakugawa [EMAIL PROTECTED] Signed-off-by: Hirokazu Takata [EMAIL PROTECTED] --- diff -ruNp a/arch/m32r/mm/cache.c b/arch/m32r/mm/cache.c --- a/arch/m32r/mm/cache.c 2004-12-25 06:35:50.0 +0900 +++ b/arch/m32r/mm/cache.c 2005-03-10 21:43:07.708321535 +0900 @@ -4,8 +4,6 @@ * Copyright (C) 2002 Hirokazu Takata */ -/* $Id$ */ - #include linux/config.h #include asm/pgtable.h @@ -25,8 +23,8 @@ #define MCCR_DCACHE_CBINV (MCCR_CC|MCCR_DIV|MCCR_DCB) #define CHECK_MCCR(mccr) (mccr = *MCCR) #elif defined(CONFIG_CHIP_M32102) -#define MCCR ((volatile unsigned long*)0xfffc) -#define MCCR_IIV (1UL 8) /* I-cache invalidate */ +#define MCCR ((volatile unsigned char*)0xfffe) +#define MCCR_IIV (1UL 0) /* I-cache invalidate */ #define MCCR_ICACHE_INVMCCR_IIV #endif /* CONFIG_CHIP_XNUX2 || CONFIG_CHIP_M32700 */ @@ -65,4 +63,3 @@ void _flush_cache_copyback_all(void) #endif } - -- Hirokazu Takata [EMAIL PROTECTED] Linux/M32R Project: http://www.linux-m32r.org/ - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2.6.11-rc4] m32r: warning fix
Hi, This patch removes the following warning of find_next_zero_bit() for m32r. Please apply. --- $ make ARCH=m32r CROSS_COMPILE=m32r-linux- : LDS arch/m32r/kernel/vmlinux.lds CC arch/m32r/mm/init.o In file included from /project/m32r-linux/kernel/linux-2.6.11-rc4-bk4/b/arch/m32r/mm/init.c:20: /project/m32r-linux/kernel/linux-2.6.11-rc4-bk4/b/include/linux/nodemask.h: In function `__first_unset_node': /project/m32r-linux/kernel/linux-2.6.11-rc4-bk4/b/include/linux/nodemask.h:246: warning: passing arg 1 of `find_next_zero_bit' discards qualifiers from pointer target type CC arch/m32r/mm/fault.o AS arch/m32r/mm/mmu.o : --- Thanks, Signed-off-by: Hirokazu Takata <[EMAIL PROTECTED]> --- include/asm-m32r/bitops.h |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff -ruNp a/include/asm-m32r/bitops.h b/include/asm-m32r/bitops.h --- a/include/asm-m32r/bitops.h 2005-02-16 20:58:08.0 +0900 +++ b/include/asm-m32r/bitops.h 2005-02-17 09:57:15.0 +0900 @@ -405,9 +405,10 @@ static __inline__ unsigned long ffz(unsi * @offset: The bitnumber to start searching at * @size: The maximum size to search */ -static __inline__ int find_next_zero_bit(void *addr, int size, int offset) +static __inline__ int find_next_zero_bit(const unsigned long *addr, +int size, int offset) { - unsigned long *p = ((unsigned long *) addr) + (offset >> 5); + const unsigned long *p = addr + (offset >> 5); unsigned long result = offset & ~31UL; unsigned long tmp; -- Hirokazu Takata <[EMAIL PROTECTED]> Linux/M32R Project: http://www.linux-m32r.org/ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2.6.11-rc4] m32r: defconfig updates
Hi, Here is a patchset to update defconfig files for m32r. The m32r kernel's API/ABI has been changed since 2.6.11-rc1. Please apply. Thanks, Signed-off-by: Hirokazu Takata <[EMAIL PROTECTED]> --- arch/m32r/defconfig | 44 arch/m32r/m32700ut/defconfig.m32700ut.smp | 44 arch/m32r/m32700ut/defconfig.m32700ut.up | 44 arch/m32r/mappi/defconfig.nommu | 45 +++-- arch/m32r/mappi/defconfig.smp | 44 arch/m32r/mappi/defconfig.up | 44 arch/m32r/mappi2/defconfig.vdec2 | 43 +++ arch/m32r/oaks32r/defconfig.nommu | 44 +++- arch/m32r/opsput/defconfig.opsput | 54 +++--- 9 files changed, 329 insertions(+), 77 deletions(-) diff -ruNp a/arch/m32r/defconfig b/arch/m32r/defconfig --- a/arch/m32r/defconfig 2004-12-25 06:35:00.0 +0900 +++ b/arch/m32r/defconfig 2005-02-16 21:10:44.0 +0900 @@ -1,11 +1,13 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.10-rc1-bk21 -# Fri Nov 12 16:08:49 2004 +# Linux kernel version: 2.6.11-rc4 +# Wed Feb 16 21:10:44 2005 # CONFIG_M32R=y -CONFIG_UID16=y +# CONFIG_UID16 is not set CONFIG_GENERIC_ISA_DMA=y +CONFIG_GENERIC_HARDIRQS=y +CONFIG_GENERIC_IRQ_PROBE=y # # Code maturity level options @@ -81,6 +83,7 @@ CONFIG_NOHIGHMEM=y # CONFIG_DISCONTIGMEM is not set CONFIG_RWSEM_GENERIC_SPINLOCK=y # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set +CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_PREEMPT=y # CONFIG_HAVE_DEC_LOCK is not set # CONFIG_SMP is not set @@ -96,7 +99,6 @@ CONFIG_PREEMPT=y # CONFIG_PCCARD=y # CONFIG_PCMCIA_DEBUG is not set -# CONFIG_PCMCIA_OBSOLETE is not set CONFIG_PCMCIA=y # @@ -146,10 +148,12 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y # Block devices # # CONFIG_BLK_DEV_FD is not set +# CONFIG_BLK_DEV_COW_COMMON is not set CONFIG_BLK_DEV_LOOP=y # CONFIG_BLK_DEV_CRYPTOLOOP is not set CONFIG_BLK_DEV_NBD=y CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=4096 # CONFIG_BLK_DEV_INITRD is not set CONFIG_INITRAMFS_SOURCE="" @@ -162,6 +166,7 @@ CONFIG_IOSCHED_NOOP=y # CONFIG_IOSCHED_AS is not set CONFIG_IOSCHED_DEADLINE=y CONFIG_IOSCHED_CFQ=y +# CONFIG_ATA_OVER_ETH is not set # # ATA/ATAPI/MFM/RLL support @@ -219,12 +224,12 @@ CONFIG_SCSI_MULTI_LUN=y # # CONFIG_SCSI_SPI_ATTRS is not set # CONFIG_SCSI_FC_ATTRS is not set +# CONFIG_SCSI_ISCSI_ATTRS is not set # # SCSI low-level drivers # # CONFIG_SCSI_SATA is not set -# CONFIG_SCSI_QLOGIC_1280_1040 is not set # CONFIG_SCSI_DEBUG is not set # @@ -396,6 +401,7 @@ CONFIG_SERIO=y # CONFIG_SERIO_I8042 is not set CONFIG_SERIO_SERPORT=y # CONFIG_SERIO_CT82C710 is not set +# CONFIG_SERIO_LIBPS2 is not set # CONFIG_SERIO_RAW is not set # @@ -450,7 +456,6 @@ CONFIG_DS1302=y # # Ftape, the floppy tape device driver # -# CONFIG_AGP is not set # CONFIG_DRM is not set # @@ -524,6 +529,7 @@ CONFIG_LOGO=y CONFIG_LOGO_LINUX_MONO=y CONFIG_LOGO_LINUX_VGA16=y CONFIG_LOGO_LINUX_CLUT224=y +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set # # Sound @@ -537,11 +543,25 @@ CONFIG_LOGO_LINUX_CLUT224=y # CONFIG_USB_ARCH_HAS_OHCI is not set # +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information +# + +# # USB Gadget Support # # CONFIG_USB_GADGET is not set # +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# +# InfiniBand support +# +# CONFIG_INFINIBAND is not set + +# # File systems # CONFIG_EXT2_FS=y @@ -558,6 +578,10 @@ CONFIG_REISERFS_FS=m # CONFIG_REISERFS_PROC_INFO is not set # CONFIG_REISERFS_FS_XATTR is not set # CONFIG_JFS_FS is not set + +# +# XFS support +# # CONFIG_XFS_FS is not set # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set @@ -628,7 +652,6 @@ CONFIG_NFS_V3=y CONFIG_ROOT_NFS=y CONFIG_LOCKD=y CONFIG_LOCKD_V4=y -# CONFIG_EXPORTFS is not set CONFIG_SUNRPC=y # CONFIG_RPCSEC_GSS_KRB5 is not set # CONFIG_RPCSEC_GSS_SPKM3 is not set @@ -697,7 +720,8 @@ CONFIG_NLS_DEFAULT="iso8859-1" # Kernel hacking # # CONFIG_DEBUG_KERNEL is not set -# CONFIG_DEBUG_SPINLOCK_SLEEP is not set +CONFIG_DEBUG_PREEMPT=y +# CONFIG_DEBUG_BUGVERBOSE is not set # CONFIG_FRAME_POINTER is not set # @@ -712,6 +736,10 @@ CONFIG_NLS_DEFAULT="iso8859-1" # CONFIG_CRYPTO is not set # +# Hardware crypto devices +# + +# # Library routines # # CONFIG_CRC_CCITT is not set diff -ruNp a/arch/m32r/m32700ut/defconfig.m32700ut.smp b/arch/m32r/m32700ut/defconfig.m32700ut.smp --- a/arch/m32r/m32700ut/defconfig.m32700ut.smp 2004-12-25 06:34:58.0 +0900 +++ b/arch/m32r/m32700ut/defconfig.m32700ut.smp 2005-02-16 21:10:50.0 +0900 @@ -1,11 +1,13 @@ # # Automatically generated mak
[PATCH 2.6.11-rc4] m32r: fix sys_clone() (was [PATCH 2.6.10-bk4] m32r: fix sys_clone())
Sorry, I missed the previous mail's subject. This patch is against 2.6.11-rc4 or 2.6.11-rc4-bk4. -- Takata From: Hirokazu Takata <[EMAIL PROTECTED]> Subject: [PATCH 2.6.10-bk4] m32r: fix sys_clone() Date: Thu, 17 Feb 2005 12:18:33 +0900 (JST) > Hi, > > This patch is required to fix sys_clone() for m32r. > > * arch/m32r/kernel/process.c: > - Fix sys_clone; add arguments, parent_tidptr and child_tidptr. > - Cosmetics: Change indentation of function parameters for > sys_clone(), sys_vfork(). > Thanks, > > Signed-off-by: Hirokazu Takata <[EMAIL PROTECTED]> > --- > > arch/m32r/kernel/process.c | 18 ++ > 1 files changed, 10 insertions(+), 8 deletions(-) > > diff -ruNp a/arch/m32r/kernel/process.c b/arch/m32r/kernel/process.c > --- a/arch/m32r/kernel/process.c 2004-12-25 06:35:49.0 +0900 > +++ b/arch/m32r/kernel/process.c 2005-02-16 21:19:35.0 +0900 > @@ -1,6 +1,5 @@ > /* > * linux/arch/m32r/kernel/process.c > - * orig : sh > * > * Copyright (c) 2001, 2002 Hiroyuki Kondo, Hirokazu Takata, > *Hitoshi Yamamoto > @@ -290,13 +289,16 @@ asmlinkage int sys_fork(unsigned long r0 > } > > asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp, > - unsigned long r2, unsigned long r3, unsigned long r4, unsigned long r5, > - unsigned long r6, struct pt_regs regs) > + unsigned long parent_tidptr, > + unsigned long child_tidptr, > + unsigned long r4, unsigned long r5, unsigned long r6, > + struct pt_regs regs) > { > if (!newsp) > newsp = regs.spu; > > - return do_fork(clone_flags, newsp, , 0, NULL, NULL); > + return do_fork(clone_flags, newsp, , 0, > +(int __user *)parent_tidptr, (int __user *)child_tidptr); > } > > /* > @@ -320,9 +322,10 @@ asmlinkage int sys_vfork(unsigned long r > /* > * sys_execve() executes a new program. > */ > -asmlinkage int sys_execve(char __user *ufilename, char __user * __user > *uargv, char __user * __user *uenvp, > - unsigned long r3, unsigned long r4, unsigned long r5, unsigned long r6, > - struct pt_regs regs) > +asmlinkage int sys_execve(char __user *ufilename, char __user * __user > *uargv, > + char __user * __user *uenvp, > + unsigned long r3, unsigned long r4, unsigned long r5, > + unsigned long r6, struct pt_regs regs) > { > int error; > char *filename; > @@ -354,4 +357,3 @@ unsigned long get_wchan(struct task_stru > /* M32R_FIXME */ > return (0); > } > - > > -- > Hirokazu Takata <[EMAIL PROTECTED]> > Linux/M32R Project: http://www.linux-m32r.org/ > - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2.6.11-rc4] m32r: build fix for SMP kernel
Hello, Here is a patch to fix compile errors of 2.6.11-rc4 for the m32r SMP kernel. I think this patch should be included in 2.6.11. Please apply. * include/asm-m32r/spinlock.h: - Add read_can_lock() and write_can_lock() to fix build errors for SMP. - Rename 'lock' to 'slock'. (cf. Changesets 1.1966.85.1) * arch/m32r/kernel/smp.c: - Rename 'lock' to 'slock'. (cf. Changesets 1.1966.85.1) Thank you. Signed-off-by: Hirokazu Takata <[EMAIL PROTECTED]> --- arch/m32r/kernel/smp.c |2 - include/asm-m32r/spinlock.h | 68 ++-- 2 files changed, 36 insertions(+), 34 deletions(-) diff -ruNp a/arch/m32r/kernel/smp.c b/arch/m32r/kernel/smp.c --- a/arch/m32r/kernel/smp.c2005-02-16 20:57:19.0 +0900 +++ b/arch/m32r/kernel/smp.c2005-02-16 21:19:35.0 +0900 @@ -953,7 +953,7 @@ unsigned long send_IPI_mask_phys(cpumask "ldir4, #1 \n\t" "st r4, @%2 \n\t" : "="(ipicr_val) - : "r"(flags), "r"(>lock), "r"(ipicr_addr), + : "r"(flags), "r"(>slock), "r"(ipicr_addr), "r"(mask), "r"(try), "r"(my_physid_mask) : "memory", "r4" #ifdef CONFIG_CHIP_M32700_TS1 diff -ruNp a/include/asm-m32r/spinlock.h b/include/asm-m32r/spinlock.h --- a/include/asm-m32r/spinlock.h 2005-02-16 20:58:08.0 +0900 +++ b/include/asm-m32r/spinlock.h 2005-02-16 21:19:35.0 +0900 @@ -20,23 +20,13 @@ extern int printk(const char * fmt, ...) #define RW_LOCK_BIAS0x0100 #define RW_LOCK_BIAS_STR "0x0100" -/* It seems that people are forgetting to - * initialize their spinlocks properly, tsk tsk. - * Remember to turn this off in 2.4. -ben - */ -#if defined(CONFIG_DEBUG_SPINLOCK) -#define SPINLOCK_DEBUG 1 -#else -#define SPINLOCK_DEBUG 0 -#endif - /* * Your basic SMP spinlocks, allowing only a single CPU anywhere */ typedef struct { - volatile int lock; -#if SPINLOCK_DEBUG + volatile int slock; +#ifdef CONFIG_DEBUG_SPINLOCK unsigned magic; #endif #ifdef CONFIG_PREEMPT @@ -46,7 +36,7 @@ typedef struct { #define SPINLOCK_MAGIC 0xdead4ead -#if SPINLOCK_DEBUG +#ifdef CONFIG_DEBUG_SPINLOCK #define SPINLOCK_MAGIC_INIT, SPINLOCK_MAGIC #else #define SPINLOCK_MAGIC_INIT/* */ @@ -63,7 +53,7 @@ typedef struct { * We make no fairness assumptions. They have a cost. */ -#define spin_is_locked(x) (*(volatile int *)(&(x)->lock) <= 0) +#define spin_is_locked(x) (*(volatile int *)(&(x)->slock) <= 0) #define spin_unlock_wait(x)do { barrier(); } while(spin_is_locked(x)) #define _raw_spin_lock_flags(lock, flags) _raw_spin_lock(lock) @@ -80,11 +70,11 @@ static inline int _raw_spin_trylock(spin unsigned long tmp1, tmp2; /* -* lock->lock : =1 : unlock -*: <=0 : lock +* lock->slock : =1 : unlock +* : <=0 : lock * { -* oldval = lock->lock; <--+ need atomic operation -* lock->lock = 0; <--+ +* oldval = lock->slock; <--+ need atomic operation +* lock->slock = 0; <--+ * } */ __asm__ __volatile__ ( @@ -97,7 +87,7 @@ static inline int _raw_spin_trylock(spin "unlock %1, @%3;\n\t" "mvtc %2, psw;\n\t" : "=" (oldval), "=" (tmp1), "=" (tmp2) - : "r" (>lock) + : "r" (>slock) : "memory" #ifdef CONFIG_CHIP_M32700_TS1 , "r6" @@ -111,22 +101,22 @@ static inline void _raw_spin_lock(spinlo { unsigned long tmp0, tmp1; -#if SPINLOCK_DEBUG +#ifdef CONFIG_DEBUG_SPINLOCK __label__ here; here: if (lock->magic != SPINLOCK_MAGIC) { - printk("eip: %p\n", &); + printk("pc: %p\n", &); BUG(); } #endif /* -* lock->lock : =1 : unlock -*: <=0 : lock +* lock->slock : =1 : unlock +* : <=0 : lock * * for ( ; ; ) { -* lock->lock -= 1; <-- need atomic operation -* if (lock->lock == 0) break; -* for ( ; lock->lock <= 0 ; ); +* lock->slock -= 1; <-- need atomic operation +* if (lock->slock == 0) break; +* for ( ; lock->slock <= 0 ; ); * } */ __asm__ __volatile__ ( @@ -149,7 +139,7 @@ here: &quo
[PATCH 2.6.10-bk4] m32r: fix sys_clone()
Hi, This patch is required to fix sys_clone() for m32r. * arch/m32r/kernel/process.c: - Fix sys_clone; add arguments, parent_tidptr and child_tidptr. - Cosmetics: Change indentation of function parameters for sys_clone(), sys_vfork(). Thanks, Signed-off-by: Hirokazu Takata <[EMAIL PROTECTED]> --- arch/m32r/kernel/process.c | 18 ++ 1 files changed, 10 insertions(+), 8 deletions(-) diff -ruNp a/arch/m32r/kernel/process.c b/arch/m32r/kernel/process.c --- a/arch/m32r/kernel/process.c2004-12-25 06:35:49.0 +0900 +++ b/arch/m32r/kernel/process.c2005-02-16 21:19:35.0 +0900 @@ -1,6 +1,5 @@ /* * linux/arch/m32r/kernel/process.c - *orig : sh * * Copyright (c) 2001, 2002 Hiroyuki Kondo, Hirokazu Takata, *Hitoshi Yamamoto @@ -290,13 +289,16 @@ asmlinkage int sys_fork(unsigned long r0 } asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp, - unsigned long r2, unsigned long r3, unsigned long r4, unsigned long r5, - unsigned long r6, struct pt_regs regs) +unsigned long parent_tidptr, +unsigned long child_tidptr, +unsigned long r4, unsigned long r5, unsigned long r6, +struct pt_regs regs) { if (!newsp) newsp = regs.spu; - return do_fork(clone_flags, newsp, , 0, NULL, NULL); + return do_fork(clone_flags, newsp, , 0, + (int __user *)parent_tidptr, (int __user *)child_tidptr); } /* @@ -320,9 +322,10 @@ asmlinkage int sys_vfork(unsigned long r /* * sys_execve() executes a new program. */ -asmlinkage int sys_execve(char __user *ufilename, char __user * __user *uargv, char __user * __user *uenvp, - unsigned long r3, unsigned long r4, unsigned long r5, unsigned long r6, - struct pt_regs regs) +asmlinkage int sys_execve(char __user *ufilename, char __user * __user *uargv, + char __user * __user *uenvp, + unsigned long r3, unsigned long r4, unsigned long r5, + unsigned long r6, struct pt_regs regs) { int error; char *filename; @@ -354,4 +357,3 @@ unsigned long get_wchan(struct task_stru /* M32R_FIXME */ return (0); } - -- Hirokazu Takata <[EMAIL PROTECTED]> Linux/M32R Project: http://www.linux-m32r.org/ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2.6.10-bk4] m32r: fix sys_clone()
Hi, This patch is required to fix sys_clone() for m32r. * arch/m32r/kernel/process.c: - Fix sys_clone; add arguments, parent_tidptr and child_tidptr. - Cosmetics: Change indentation of function parameters for sys_clone(), sys_vfork(). Thanks, Signed-off-by: Hirokazu Takata [EMAIL PROTECTED] --- arch/m32r/kernel/process.c | 18 ++ 1 files changed, 10 insertions(+), 8 deletions(-) diff -ruNp a/arch/m32r/kernel/process.c b/arch/m32r/kernel/process.c --- a/arch/m32r/kernel/process.c2004-12-25 06:35:49.0 +0900 +++ b/arch/m32r/kernel/process.c2005-02-16 21:19:35.0 +0900 @@ -1,6 +1,5 @@ /* * linux/arch/m32r/kernel/process.c - *orig : sh * * Copyright (c) 2001, 2002 Hiroyuki Kondo, Hirokazu Takata, *Hitoshi Yamamoto @@ -290,13 +289,16 @@ asmlinkage int sys_fork(unsigned long r0 } asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp, - unsigned long r2, unsigned long r3, unsigned long r4, unsigned long r5, - unsigned long r6, struct pt_regs regs) +unsigned long parent_tidptr, +unsigned long child_tidptr, +unsigned long r4, unsigned long r5, unsigned long r6, +struct pt_regs regs) { if (!newsp) newsp = regs.spu; - return do_fork(clone_flags, newsp, regs, 0, NULL, NULL); + return do_fork(clone_flags, newsp, regs, 0, + (int __user *)parent_tidptr, (int __user *)child_tidptr); } /* @@ -320,9 +322,10 @@ asmlinkage int sys_vfork(unsigned long r /* * sys_execve() executes a new program. */ -asmlinkage int sys_execve(char __user *ufilename, char __user * __user *uargv, char __user * __user *uenvp, - unsigned long r3, unsigned long r4, unsigned long r5, unsigned long r6, - struct pt_regs regs) +asmlinkage int sys_execve(char __user *ufilename, char __user * __user *uargv, + char __user * __user *uenvp, + unsigned long r3, unsigned long r4, unsigned long r5, + unsigned long r6, struct pt_regs regs) { int error; char *filename; @@ -354,4 +357,3 @@ unsigned long get_wchan(struct task_stru /* M32R_FIXME */ return (0); } - -- Hirokazu Takata [EMAIL PROTECTED] Linux/M32R Project: http://www.linux-m32r.org/ - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2.6.11-rc4] m32r: build fix for SMP kernel
Hello, Here is a patch to fix compile errors of 2.6.11-rc4 for the m32r SMP kernel. I think this patch should be included in 2.6.11. Please apply. * include/asm-m32r/spinlock.h: - Add read_can_lock() and write_can_lock() to fix build errors for SMP. - Rename 'lock' to 'slock'. (cf. Changesets 1.1966.85.1) * arch/m32r/kernel/smp.c: - Rename 'lock' to 'slock'. (cf. Changesets 1.1966.85.1) Thank you. Signed-off-by: Hirokazu Takata [EMAIL PROTECTED] --- arch/m32r/kernel/smp.c |2 - include/asm-m32r/spinlock.h | 68 ++-- 2 files changed, 36 insertions(+), 34 deletions(-) diff -ruNp a/arch/m32r/kernel/smp.c b/arch/m32r/kernel/smp.c --- a/arch/m32r/kernel/smp.c2005-02-16 20:57:19.0 +0900 +++ b/arch/m32r/kernel/smp.c2005-02-16 21:19:35.0 +0900 @@ -953,7 +953,7 @@ unsigned long send_IPI_mask_phys(cpumask ldir4, #1 \n\t st r4, @%2 \n\t : =r(ipicr_val) - : r(flags), r(ipilock-lock), r(ipicr_addr), + : r(flags), r(ipilock-slock), r(ipicr_addr), r(mask), r(try), r(my_physid_mask) : memory, r4 #ifdef CONFIG_CHIP_M32700_TS1 diff -ruNp a/include/asm-m32r/spinlock.h b/include/asm-m32r/spinlock.h --- a/include/asm-m32r/spinlock.h 2005-02-16 20:58:08.0 +0900 +++ b/include/asm-m32r/spinlock.h 2005-02-16 21:19:35.0 +0900 @@ -20,23 +20,13 @@ extern int printk(const char * fmt, ...) #define RW_LOCK_BIAS0x0100 #define RW_LOCK_BIAS_STR 0x0100 -/* It seems that people are forgetting to - * initialize their spinlocks properly, tsk tsk. - * Remember to turn this off in 2.4. -ben - */ -#if defined(CONFIG_DEBUG_SPINLOCK) -#define SPINLOCK_DEBUG 1 -#else -#define SPINLOCK_DEBUG 0 -#endif - /* * Your basic SMP spinlocks, allowing only a single CPU anywhere */ typedef struct { - volatile int lock; -#if SPINLOCK_DEBUG + volatile int slock; +#ifdef CONFIG_DEBUG_SPINLOCK unsigned magic; #endif #ifdef CONFIG_PREEMPT @@ -46,7 +36,7 @@ typedef struct { #define SPINLOCK_MAGIC 0xdead4ead -#if SPINLOCK_DEBUG +#ifdef CONFIG_DEBUG_SPINLOCK #define SPINLOCK_MAGIC_INIT, SPINLOCK_MAGIC #else #define SPINLOCK_MAGIC_INIT/* */ @@ -63,7 +53,7 @@ typedef struct { * We make no fairness assumptions. They have a cost. */ -#define spin_is_locked(x) (*(volatile int *)((x)-lock) = 0) +#define spin_is_locked(x) (*(volatile int *)((x)-slock) = 0) #define spin_unlock_wait(x)do { barrier(); } while(spin_is_locked(x)) #define _raw_spin_lock_flags(lock, flags) _raw_spin_lock(lock) @@ -80,11 +70,11 @@ static inline int _raw_spin_trylock(spin unsigned long tmp1, tmp2; /* -* lock-lock : =1 : unlock -*: =0 : lock +* lock-slock : =1 : unlock +* : =0 : lock * { -* oldval = lock-lock; --+ need atomic operation -* lock-lock = 0; --+ +* oldval = lock-slock; --+ need atomic operation +* lock-slock = 0; --+ * } */ __asm__ __volatile__ ( @@ -97,7 +87,7 @@ static inline int _raw_spin_trylock(spin unlock %1, @%3;\n\t mvtc %2, psw;\n\t : =r (oldval), =r (tmp1), =r (tmp2) - : r (lock-lock) + : r (lock-slock) : memory #ifdef CONFIG_CHIP_M32700_TS1 , r6 @@ -111,22 +101,22 @@ static inline void _raw_spin_lock(spinlo { unsigned long tmp0, tmp1; -#if SPINLOCK_DEBUG +#ifdef CONFIG_DEBUG_SPINLOCK __label__ here; here: if (lock-magic != SPINLOCK_MAGIC) { - printk(eip: %p\n, here); + printk(pc: %p\n, here); BUG(); } #endif /* -* lock-lock : =1 : unlock -*: =0 : lock +* lock-slock : =1 : unlock +* : =0 : lock * * for ( ; ; ) { -* lock-lock -= 1; -- need atomic operation -* if (lock-lock == 0) break; -* for ( ; lock-lock = 0 ; ); +* lock-slock -= 1; -- need atomic operation +* if (lock-slock == 0) break; +* for ( ; lock-slock = 0 ; ); * } */ __asm__ __volatile__ ( @@ -149,7 +139,7 @@ here: bra2b; \n\t LOCK_SECTION_END : =r (tmp0), =r (tmp1) - : r (lock-lock) + : r (lock-slock) : memory #ifdef CONFIG_CHIP_M32700_TS1 , r6 @@ -159,12 +149,12 @@ here: static inline void _raw_spin_unlock(spinlock_t *lock) { -#if SPINLOCK_DEBUG +#ifdef CONFIG_DEBUG_SPINLOCK BUG_ON(lock-magic != SPINLOCK_MAGIC); BUG_ON
[PATCH 2.6.11-rc4] m32r: fix sys_clone() (was [PATCH 2.6.10-bk4] m32r: fix sys_clone())
Sorry, I missed the previous mail's subject. This patch is against 2.6.11-rc4 or 2.6.11-rc4-bk4. -- Takata From: Hirokazu Takata [EMAIL PROTECTED] Subject: [PATCH 2.6.10-bk4] m32r: fix sys_clone() Date: Thu, 17 Feb 2005 12:18:33 +0900 (JST) Hi, This patch is required to fix sys_clone() for m32r. * arch/m32r/kernel/process.c: - Fix sys_clone; add arguments, parent_tidptr and child_tidptr. - Cosmetics: Change indentation of function parameters for sys_clone(), sys_vfork(). Thanks, Signed-off-by: Hirokazu Takata [EMAIL PROTECTED] --- arch/m32r/kernel/process.c | 18 ++ 1 files changed, 10 insertions(+), 8 deletions(-) diff -ruNp a/arch/m32r/kernel/process.c b/arch/m32r/kernel/process.c --- a/arch/m32r/kernel/process.c 2004-12-25 06:35:49.0 +0900 +++ b/arch/m32r/kernel/process.c 2005-02-16 21:19:35.0 +0900 @@ -1,6 +1,5 @@ /* * linux/arch/m32r/kernel/process.c - *orig : sh * * Copyright (c) 2001, 2002 Hiroyuki Kondo, Hirokazu Takata, *Hitoshi Yamamoto @@ -290,13 +289,16 @@ asmlinkage int sys_fork(unsigned long r0 } asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp, - unsigned long r2, unsigned long r3, unsigned long r4, unsigned long r5, - unsigned long r6, struct pt_regs regs) + unsigned long parent_tidptr, + unsigned long child_tidptr, + unsigned long r4, unsigned long r5, unsigned long r6, + struct pt_regs regs) { if (!newsp) newsp = regs.spu; - return do_fork(clone_flags, newsp, regs, 0, NULL, NULL); + return do_fork(clone_flags, newsp, regs, 0, +(int __user *)parent_tidptr, (int __user *)child_tidptr); } /* @@ -320,9 +322,10 @@ asmlinkage int sys_vfork(unsigned long r /* * sys_execve() executes a new program. */ -asmlinkage int sys_execve(char __user *ufilename, char __user * __user *uargv, char __user * __user *uenvp, - unsigned long r3, unsigned long r4, unsigned long r5, unsigned long r6, - struct pt_regs regs) +asmlinkage int sys_execve(char __user *ufilename, char __user * __user *uargv, + char __user * __user *uenvp, + unsigned long r3, unsigned long r4, unsigned long r5, + unsigned long r6, struct pt_regs regs) { int error; char *filename; @@ -354,4 +357,3 @@ unsigned long get_wchan(struct task_stru /* M32R_FIXME */ return (0); } - -- Hirokazu Takata [EMAIL PROTECTED] Linux/M32R Project: http://www.linux-m32r.org/ - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/