Move the HAVE_ARCH_BUG/HAVE_ARCH_WARN_ON definitions underneath
CONFIG_GENERIC_BUG. This is needed for BUGFLAG_WARNING usage.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
The CPU family abstraction already exists, so move out the PXSEG
definition for each one. SH-2A already has this special cased,
and SH-5 will as well.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
When the thread_info->addr_limit changes were introduced, __access_ok()
was missed in the conversion, allowing user processes to perform P1/P2
accesses under certain conditions.
This has already been corrected with the nommu refactoring in later
kernels.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
In the do_execve() path, argument page handling used to explicitly call
flush_dcache_page() for each page, this has since been reworked and
uses flush_kernel_dcache_page() instead, which is presently a nop.
Doing a simple modprobe/rmmod in a loop under busybox consistently
manages to crash without providing a sane flush_kernel_dcache_page()
implementation, so, plug in a simple implementation.
Signed-off-by: Carmelo Amoroso <carmelo73@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
We have nothing to do here, but there are continually drivers that
fail to build without it. Stub it in.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Now that copy_to_user_page()/copy_from_user_page() are wired up, we
can drop the old __copy_xxx() implementations. Now that the page
colouring scheme has changed via kmap_coherent(), we can avoid the
flush in these specific helpers.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
This moves copy_{to,from}_user_page() out-of-line on SH-4 and
converts for the kmap_coherent() API. Based on the MIPS
implementation.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
With the kmap_coherent() API in place, this is trivial to implement,
and lets us avoid the cache flush in certain cases.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
The ST40 stuff in-tree hasn't built for some time, and hasn't been
updated for over 3 years. ST maintains their own out-of-tree changes
and rebases occasionally, and that's ultimately where all of the ST40
users go anyways.
In order for the ST40 code to be brought up to date most of the stuff
removed in this changeset would have to be rewritten anyways, so there's
very little benefit in keeping the remnants around either.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
The common linux/ptrace.h already defines PTRACE_O_TRACESYSGOOD so there is no
need to have arches do it. This also keeps glibc-2.7 from breaking since it
has an enum for the PTRACE_O_* flags.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
While using separate IRQ stacks can cut down on stack consumption,
many users can also use 4k stacks directly without the additional
need of separate stacks for soft and hardirqs.
With this split, we support the same rationale for 4KSTACKS as
m68knommu, with the IRQSTACKS abstraction as per ppc64.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>