Commit Graph

152 Commits

Author SHA1 Message Date
Linus Torvalds
d06063cc22 Move FAULT_FLAG_xyz into handle_mm_fault() callers
This allows the callers to now pass down the full set of FAULT_FLAG_xyz
flags to handle_mm_fault().  All callers have been (mechanically)
converted to the new calling convention, there's almost certainly room
for architectures to clean up their code and then add FAULT_FLAG_RETRY
when that support is added.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-21 13:08:22 -07:00
Michal Simek
05bf7d4631 microblaze: Add missing symbols for CONSTRUCTORS support
Commit b99b87f70c add CONSTRUCTOR
support to Linux but Microblaze not defined KERNEL_CTORS symbols
which are used with that patch.
This patch fixed it.

Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-06-20 14:36:58 +02:00
Arnd Bergmann
20f54c490c microblaze: remove init_mm
Alexey removed the definition for init_mm from all architectures
but forgot microblaze, which was only recently added.
This fixes the microblaze build by dropping it there as well.

Cc: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-06-20 14:36:50 +02:00
Randy Dunlap
e4c9dd0fba kmap_types: make most arches use generic header file
Convert most arches to use asm-generic/kmap_types.h.

Move the KM_FENCE_ macro additions into asm-generic/kmap_types.h,
controlled by __WITH_KM_FENCE from each arch's kmap_types.h file.

Would be nice to be able to add custom KM_types per arch, but I don't yet
see a nice, clean way to do that.

Built on x86_64, i386, mips, sparc, alpha(tonyb), powerpc(tonyb), and
68k(tonyb).

Note: avr32 should be able to remove KM_PTE2 (since it's not used) and
then just use the generic kmap_types.h file.  Get avr32 maintainer
approval.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: <linux-arch@vger.kernel.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Bryan Wu <cooloney@kernel.org>
Cc: Mikael Starvik <starvik@axis.com>
Cc: Hirokazu Takata <takata@linux-m32r.org>
Cc: "Luck Tony" <tony.luck@intel.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: David Howells <dhowells@redhat.com>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-16 19:47:51 -07:00
Linus Torvalds
cd166bd0dd Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic:
  add generic lib/checksum.c
  asm-generic: add a generic uaccess.h
  asm-generic: add generic NOMMU versions of some headers
  asm-generic: add generic atomic.h and io.h
  asm-generic: add legacy I/O header files
  asm-generic: add generic versions of common headers
  asm-generic: make bitops.h usable
  asm-generic: make pci.h usable directly
  asm-generic: make get_rtc_time overridable
  asm-generic: rename page.h and uaccess.h
  asm-generic: rename atomic.h to atomic-long.h
  asm-generic: add a generic unistd.h
  asm-generic: add generic ABI headers
  asm-generic: add generic sysv ipc headers
  asm-generic: introduce asm/bitsperlong.h
  asm-generic: rename termios.h, signal.h and mman.h
2009-06-12 18:15:51 -07:00
Arnd Bergmann
5b17e1cd89 asm-generic: rename page.h and uaccess.h
The current asm-generic/page.h only contains the get_order
function, and asm-generic/uaccess.h only implements
unaligned accesses. This renames the file to getorder.h
and uaccess-unaligned.h to make room for new page.h
and uaccess.h file that will be usable by all simple
(e.g. nommu) architectures.

Signed-off-by: Remis Lima Baima <remis.developer@googlemail.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2009-06-11 21:02:17 +02:00
Arnd Bergmann
72099ed271 asm-generic: rename atomic.h to atomic-long.h
The existing asm-generic/atomic.h only defines the
atomic_long type. This renames it to atomic-long.h
so we have a place to add a truly generic atomic.h
that can be used on all non-SMP systems.

Signed-off-by: Remis Lima Baima <remis.developer@googlemail.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Ingo Molnar <mingo@elte.hu>
2009-06-11 21:02:17 +02:00
Arnd Bergmann
c31ae4bb4a asm-generic: introduce asm/bitsperlong.h
This provides a reliable way for asm-generic/types.h and other
files to find out if it is running on a 32 or 64 bit platform.

We cannot use CONFIG_64BIT for this in headers that are included
from user space because CONFIG symbols are not available there.
We also cannot do it inside of asm/types.h because some headers
need the word size but cannot include types.h.

The solution is to introduce a new header <asm/bitsperlong.h>
that defines both __BITS_PER_LONG for user space and
BITS_PER_LONG for usage in the kernel. The asm-generic
version falls back to 32 bit unless the architecture overrides
it, which I did for all 64 bit platforms.

Signed-off-by: Remis Lima Baima <remis.developer@googlemail.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2009-06-11 21:02:14 +02:00
Arnd Bergmann
63b852a6b6 asm-generic: rename termios.h, signal.h and mman.h
The existing asm-generic versions are incomplete and included
by some architectures. New architectures should be able
to use a generic version, so rename the existing files and
change all users, which lets us add the new files.

Signed-off-by: Remis Lima Baima <remis.developer@googlemail.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2009-06-11 21:01:52 +02:00
John Williams
3447ef29a7 microblaze: Don't use access_ok for unaligned
it assumes we have an unaligned exception handler which

 (a) may not be true
 (b) costs a lot of performance
 Instead we'll use struct/union method for big endian accesses,
  and byte-shifting for little endian.

Signed-off-by: John Williams <john.williams@petalogix.com>
2009-06-02 08:39:16 +02:00
Andrew Morton
77bc7ac87d microblaze: remove unused flat_stack_align() definition
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-06-02 07:54:36 +02:00
Michal Simek
fee3c55d7f microblaze: Fix problem with early_printk in startup
Problem arise when is incopatibility between kernel/dts/pvr
and kernel tries to announce it. Early printk device
(uartlite in our case) was in TLB 2 and when kernel
extract DTB it necessary to allocate at least one
TLB at the end of memory. First free TLB was number two
where was early printk. But checking mechanism (kernel/dts/pvr)
was after extrahing but TLB 2 was different. This caused
that kernel hung up.
Moving early printk device to TLB 63 solve it and we don't
protect it which means that we can use early_printk messages
only for initial parts of kernel then we rewrite TLB 63.

Reported-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-05-30 16:40:58 +02:00
Michal Simek
4b2368ffd6 microblaze_mmu_v2: Makefiles
Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-05-26 16:45:24 +02:00
Michal Simek
a116f6d5db microblaze_mmu_v2: Kconfig update
Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-05-26 16:45:24 +02:00
Michal Simek
8b3f7d5c0b microblaze_mmu_v2: stat.h MMU update
Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-05-26 16:45:24 +02:00
Michal Simek
e57a221f15 microblaze_mmu_v2: Elf update
Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-05-26 16:45:23 +02:00
Michal Simek
dcffc1b291 microblaze_mmu_v2: Update dma.h for MMU
Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-05-26 16:45:22 +02:00
Michal Simek
46fb9be93b microblaze_mmu_v2: Update cacheflush.h
Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-05-26 16:45:22 +02:00
Michal Simek
8b28626a6b microblaze_mmu_v2: Update signal returning address
Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-05-26 16:45:22 +02:00
Michal Simek
17f3324c3e microblaze_mmu_v2: Traps MMU update
Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-05-26 16:45:21 +02:00
Michal Simek
65504a47e0 microblaze_mmu_v2: Enable fork syscall for MMU and add fork as vfork for noMMU
Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-05-26 16:45:21 +02:00
Michal Simek
d4c1285ef0 microblaze_mmu_v2: Update linker script for MMU
Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-05-26 16:45:20 +02:00
Michal Simek
4bb73c3de7 microblaze_mmu_v2: Add MMU related exceptions handling
Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-05-26 16:45:20 +02:00
Michal Simek
0d6de95326 microblaze_mmu_v2: uaccess MMU update
Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-05-26 16:45:20 +02:00
Michal Simek
7db29dde73 microblaze_mmu_v2: Update exception handling - MMU exception
Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-05-26 16:45:20 +02:00
Michal Simek
ca54502bd5 microblaze_mmu_v2: entry.S, entry.h
Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-05-26 16:45:20 +02:00
Michal Simek
23cfc36933 microblaze_mmu_v2: Add CURRENT_TASK for entry.S
Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-05-26 16:45:19 +02:00
Michal Simek
627cef44f4 microblaze_mmu_v2: MMU asm offset update
Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-05-26 16:45:19 +02:00
Michal Simek
45be7d46a9 microblaze_mmu_v2: Update tlb.h and tlbflush.h
Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-05-26 16:45:19 +02:00
Michal Simek
5233806dfe microblaze_mmu_v2: Update process creation for MMU
Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-05-26 16:45:18 +02:00
Michal Simek
1f84e1ea0e microblaze_mmu_v2: pgalloc.h and page.h
Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-05-26 16:45:18 +02:00
Michal Simek
dc95be1f71 microblaze_mmu_v2: io.h MMU update
Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-05-26 16:45:16 +02:00
Michal Simek
15902bf63c microblaze_mmu_v2: Page table - ioremap - pgtable.c/h, section update
Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-05-26 16:45:16 +02:00
Michal Simek
fc34d1eb1c microblaze_mmu_v2: Context handling - mmu_context.c/h
Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-05-26 16:45:15 +02:00
Michal Simek
5de9612100 microblaze_mmu_v2: Page fault handling high level - fault.c
Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-05-26 16:45:15 +02:00
Michal Simek
23098649e0 microblaze_mmu_v2: mmu.h update
Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-05-26 16:45:15 +02:00
Michal Simek
4dc60832f5 microblaze_mmu_v2: MMU initialization
Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-05-26 16:45:15 +02:00
Michal Simek
3f50425c0c microblaze_mmu_v2: TLB low level code
Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-05-26 16:45:14 +02:00
Michal Simek
a43acfbbc8 microblaze_mmu_v2: Alocate TLB for early console
Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-05-26 16:45:14 +02:00
Michal Simek
5846cc608f microblaze_mmu_v2: MMU update for startup code
Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-05-26 16:45:14 +02:00
Michal Simek
2c65b4665f microblaze_mmu_v2: Add mmu_defconfig
Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-05-26 16:45:13 +02:00
Michal Simek
2f3a499e6b microblaze: Fix size of __kernel_mode_t to short
This patches solve problem with inconsistency between
kernel and glibc

Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-05-26 16:43:38 +02:00
Edgar E. Iglesias
0945f98b4a microblaze: Add audit and seccomp thread flags.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2009-05-26 16:43:22 +02:00
Michal Simek
aaf22af46f microblaze: Kbuild update
Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-05-22 09:50:46 +02:00
Michal Simek
b9479e6665 microblaze: Fix cast warning for __va in prom.c
__va expect 32bit value but of_read_ulong(of_read_number)
returns 64bit value

Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-05-21 16:39:58 +02:00
Michal Simek
e93b55bfb3 Microblaze: Remove unused variable from paging init
Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-05-21 16:39:52 +02:00
Michal Simek
cda1fd5a60 microblaze: Cleanup compiled-in rootfs in BSS section
This patch is based on patch from Steve Magnani.

There were bug for compiled-in rootfs. We have to move
moving rootfs which is in BSS section to _ebss section
which is at the end of kernel and then clear bss section
not vice-versa.

Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-05-21 16:39:16 +02:00
Michal Simek
1dff89a9c7 microblaze: Fix early cmdline for CMDLINE_FORCE
This patch fixed parsing early parameters because
current implementation does that early parse DTS
command line and then parse CMDLINE line which is compiled-in.

For case that DTS doesn't contain command line is
copied command line from kernel with is done in prom.c
that's why I can remove it from machine_early_init.

Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-05-21 16:39:05 +02:00
Steve Magnani
6e3d4e1d16 microblaze: Guard __HAVE_ARCH macros with __KERNEL__ in string.h
A polarity reversal in the __KERNEL__ guard prevents the __HAVE_ARCH
flags from being defined in kernel compilation.

I noticed that there's now an option for assembly-optimized versions of
memcpy and memmove. I believe this may be buggy; when I turn it on, all
my printk output gets smashed together, as if the newlines aren't getting
copied.

Signed-off-by: Steven J. Magnani <steve@digidescorp.com>
Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-05-21 15:56:08 +02:00
Thomas Chou
c3055d1456 microblaze: clean LDFLAGS to build kernel
Extra LDFLAGS from user space building may cause kernel failed
to compile.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-05-21 15:56:08 +02:00