Commit graph

23 commits

Author SHA1 Message Date
Richard Weinberger 37f078ff4c m32r: Autogenerate offsets in struct thread_info
Maintaining offsets by hand is no fun.

Signed-off-by: Richard Weinberger <richard@nod.at>
2015-04-12 20:58:24 +02:00
Thomas Gleixner 650e4dc2a7 m32r: Use preempt_schedule_irq
Use the proper core function instead of fiddling with preempt_active
and interrupt enable in the low level code.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Hirokazu Takata <takata@linux-m32r.org>
Cc: linux-m32r-ja@ml.linux-m32r.org
Link: http://lkml.kernel.org/r/20130917183628.758421136@linutronix.de
2013-11-13 20:21:46 +01:00
Al Viro ea4a1da9b2 m32r: switch to generic kernel_thread()/kernel_execve()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-10-31 22:59:31 -04:00
Al Viro a748102430 make m32r handle multiple pending signals
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-09-24 13:54:19 -07:00
Al Viro a7f8388e2c m32r: fix rt_sigsuspend()
do_signal() should know about saved_mask for it to work...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-09-24 13:54:19 -07:00
Tim Abbott 00b01b246b m32r: Move GET_THREAD_INFO definition out of asm/thread_info.h.
Previously, asm/thread_info.h was not usable from linker scripts
because it contains a piece of .macro code.  Since that code was only
used in the m32r entry.S, the right fix is probably to move the macro
there.

Signed-off-by: Tim Abbott <tabbott@ksplice.com>
Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
2009-09-23 00:29:39 +09:00
Adrian Bunk 81e4807303 m32r/kernel/: cleanups
This patch contains the following cleanups:
- make the following needlessly global code static:
  - entry.S: resume_userspace
  - process.c: pm_idle
  - process.c: default_idle()
  - smp.c: send_IPI_allbutself()
  - time.c: timer_interrupt()
  - time.c: struct irq0
  - traps.c: set_eit_vector_entries()
  - traps.c: kstack_depth_to_print
  - traps.c: show_trace()
  - traps.c: die_lock
- remove the following unused code:
  - head.S: startup_32
  - process.c: hlt_counter
  - process.c: disable_hlt()
  - process.c: enable_hlt()
  - process.c: dump_task_regs()
- remove the following variables and their usages since they were
  always 0:
  - irq.c: irq_err_count
  - irq.c: irq_mis_count

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
2008-09-27 18:27:21 +09:00
Hirokazu Takata 7071b2914a 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 <takata@linux-m32r.org>
2007-09-06 11:10:56 +09:00
Hirokazu Takata 33205613cd 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 <takata@linux-m32r.org>
Cc: Adrian Bunk <bunk@kernel.org>
2007-09-06 11:09:20 +09:00
Hirokazu Takata 9990b48a40 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 <takata@linux-m32r.org>
2007-09-03 11:30:19 +09:00
Hirokazu Takata de2232edb8 m32r: Cosmetic updates of arch/m32r/kernel/entry.S
- Remove unused symbols *_MASK
- Change indentation of comments, etc.

Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
2007-09-03 11:30:19 +09:00
Hirokazu Takata abd0a78235 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 <hitoshiy@linux-m32r.org>
Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
2007-09-03 11:30:18 +09:00
Hirokazu Takata 5171b10051 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 <hitoshiy@linux-m32r.org>
Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
2007-09-03 11:30:18 +09:00
Hirokazu Takata 6b8bd3f4b2 [PATCH] 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 <takata@linux-m32r.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:37 -08:00
Hirokazu Takata 8b03a632ef [PATCH] m32r: make userspace headers platform-independent
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 <takata@linux-m32r.org>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:37 -08:00
Jörn Engel 6ab3d5624e Remove obsolete #include <linux/config.h>
Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-06-30 19:25:36 +02:00
Hirokazu Takata 4127272c38 [PATCH] m32r: update switch_to macro for tuning
- Remove unnecessary push/pop's of the switch_to() macro
  for performance tuning.
- Cosmetic updates: change __inline__ to inline, etc.

Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
Cc: NIIBE Yutaka <gniibe@fsij.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-19 09:13:51 -07:00
Hirokazu Takata 8e8ff02c0b [PATCH] m32r: Fix pt_regs for !COFNIG_ISA_DSP_LEVEL2 target
This modification is required to fix debugging function for m32r targets
with !CONFIG_ISA_DSP_LEVEL2, by unifying 'struct pt_regs' and 'struct
sigcontext' size for all M32R ISA.

Some m32r processor core with !CONFIG_ISA_DSP_LEVEL2 configuration has only
single accumulator a0 (ex.  VDEC2 core, M32102 core, etc.), the others with
CONFIG_ISA_DSP_LEVEL2 has two accumulators, a0 and a1.

This means there are two variations of thread context.  So far, we reduced
and changed stackframe size at a syscall for their context size.  However,
this causes a problem that a GDB for processors with CONFIG_ISA_DSP_LEVEL2
cannot be used for processors with !CONFIG_ISA_DSP_LEVEL2.

From the viewpoint of GDB support, we should reduce such variation of
stackframe size for simplicity.

In this patch, dummy members are added to 'struct pt_regs' and 'struct
sigcontext' to adjust their size for !CONFIG_ISA_DSP_LEVEL2.

This modification is also a one step for a GDB update in future.
Currently, on the m32r, GDB can access process's context by using ptrace
functions in a simple way of register by register access.  By unifying
stackframe size, we have a possibility to make use of ptrace functions of
not only a single register access but also block register access,
PTRACE_{GETREGS,PUTREGS}.

However, for this purpose, we might have to modify stackframe structure
some more; for example, PSW (processor status word) register should be
pre-processed before pushing to stack at a syscall, and so on.  In this
case, we must update carefully both kernel and GDB at a time...

Signed-off-by: Hayato Fujiwara <fujiwara@linux-m32r.org>
Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
Cc: Kei Sakamoto <ksakamot@linux-m32r.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-19 09:13:50 -07:00
Hirokazu Takata 9287d95ea1 [PATCH] m32r: Support M32104UT target platform
This patch is for supporting a new target platform, Renesas M32104UT
evaluation board.

The M32104UT is an eval board based on an uT-Engine specification.  This board
has an MMU-less M32R family processor, M32104.
http://www-wa0.personal-media.co.jp/pmc/archive/te/te_m32104_e.pdf

This board is one of the most popular M32R platform, so we have ported
Linux/M32R to it.

Signed-off-by: Naoto Sugai <Sugai.Naoto@ak.MitsubishiElectric.co.jp>
Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:43 -08:00
Hirokazu Takata 60c83c77c4 [PATCH] m32r: trivial fix to remove unused instructions
A trivial fix to remove unused instructions.

Signed-off-by: Naoto Sugai <Sugai.Naoto@ak.MitsubishiElectric.co.jp>
Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:43 -08:00
Hirokazu Takata baa0b84f10 [PATCH] m32r: remove unused instructions
Remove unused instructions for debugging.

Signed-off-by: Naoto Sugai <sugai@isl.melco.co.jp>
Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-30 17:37:15 -08:00
Hirokazu Takata 9de11aab1c [PATCH] m32r: trap handler code for illegal traps
This patch prevents illegal traps from causing m32r kernel's infinite loop
execution.

Signed-off-by: Naoto Sugai <sugai@isl.melco.co.jp>
Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-11 09:46:54 -07:00
Linus Torvalds 1da177e4c3 Linux-2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.

Let it rip!
2005-04-16 15:20:36 -07:00