There are other places where we want to have access to the trap/exception
number, so move out the lookup_exception_vector() helper. While we're at
it, refactor it slightly to return the vector instead.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
This is 256K instead of 1M.
[ Converted to use asm/sizes.h. -- PFM ]
Signed-off-by: Luca Santini <luca.santini@spesonline.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
This follows the powerpc commit f6a616800e
'[POWERPC] Fix kernel stack allocation alignment'.
SH has traditionally forced the thread order to be relative to the page
size, so there were never any situations where the same bug was
triggered by slub. Regardless, the usage of > 8kB stacks for the larger
page sizes is overkill, so we switch to using slab allocations there,
as per the powerpc change.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
This combination triggers a divide by zero in kernel/fork.c when
calculating the initial max_threads value:
max_threads = mempages / (8 * THREAD_SIZE / PAGE_SIZE);
Simply disable 4K stacks on 64kB PAGE_SIZE to work around this,
as it's not a terribly useful combination to begin with.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
HAVE_IOREMAP_PROT enables an unconditional reference to
generic_access_phys(), which remains undefined in the nommu case.
As there's no point in supporting this there anyways, simply fix
up the dependency.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
linux/mmzone.h isn't exported, kill it off from asm/setup.h and simply
deal with it in the places that have a dependency instead.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
These have been using overrides for ELF_CORE_COPY_TASK_REGS and
ELF_CORE_COPY_FPREGS while the generic versions can be used instead.
Presently the pt_regs are also duplicated across elf_core_copy_regs()
and elf_core_copy_task_regs(), this switches to simply copying out
through elf_core_copy_regs() instead.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Now that the rest of the support requirements are out of the way, finally
enable support for tracehook.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
This adds a defconfig for the R2D+ target in the qemu system emulator.
Eventually it will be possible to simply use the r2d+ defconfig as it is.
Provided by Shin-ichiro KAWASAKI.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
All CPUs must have a sensible cpu_clk definition these days, which we can
safely use for deriving the preset loops_per_jiffy. The only odd one out
is SH-5, which hasn't been hammered in to the framework yet.
Based on the ST patch.
Signed-off-by: Francesco Virlinzi <francesco.virlinzi@st.com>
Signed-off-by: Carl Shaw <carl.shaw@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Presently this is doing a force_sig() SIGTRAP, which is already taken
care of in the generic code if no one asserts NOTIFY_STOP. Switch the
default return to NOTIFY_DONE in the case of unhandled traps, so that
the same trap may pass through to other users on the same die chain.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Not all parts support trapa #0xff, so use something within the debug trap
range that's accessible on all parts.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
This was initially checked in with a stupid default of y, while most
everyone is going to want to have this disabled anyways.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
This adds support for the Renesas (RTE) EDOSK7760 board. Currently
supported devices are:
- ramdisk support
- ethernet support
- nfs support
- ext2/ext3 support
- i2c support
- fb support (M)
Signed-off-by: Luca Santini <luca.santini@spesonline.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
This uses jump_to_uncached() which is now given the noinline attribute
due to the special section mapping. Kill off the inline attribute to
fix up compilation failure.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Initial support for kprobes/kretprobes for 32-bit SH platforms.
[ General cleanup and some rework for the kretprobe hash lock. -- PFM ]
Signed-off-by: Chris Smith <chris.smith@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Because alloc_bootmem functions return the allocated memory always
zeroed, an additional call of memset on allocated memory is
unnecessary.
Signed-off-by: Marek Skuczynski <M.Skuczynski@adbglobal.com>
Signed-off-by: Carl Shaw <carl.shaw@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>