summaryrefslogtreecommitdiffstats
path: root/arch/microblaze/include/asm
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'fixes-for-linus' of git://git.monstr.eu/linux-2.6-microblazeLinus Torvalds2009-07-275-16/+18
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'fixes-for-linus' of git://git.monstr.eu/linux-2.6-microblaze: microblaze: Makefile cleanup microblaze: Typo fix for cpu param inconsistency microblaze: Add support for R_MICROBLAZE_64_NONE microblaze: Get module loading working microblaze: remove sys_ipc microblaze: Support unaligned address for put/get_user macros microblaze: Detect new Microblaze 7.20 versions microblaze: Fix do_page_fault for no context microblaze: Add _PAGE_FILE macros to pgtable.h microblaze: Fix put_user macro for 64bits arguments microblaze: Clear print messages for DTB passing via r7 microblaze: Not to clear r7 after copying DTB to kernel microblaze: Add messages about FDT blob microblaze: Final support for statically linked DTB microblaze: remove duplicated #include microblaze: Define tlb_flush macro
| * microblaze: Add _PAGE_FILE macros to pgtable.hMichal Simek2009-07-271-3/+3
| | | | | | | | | | | | | | | | | | We need to define _PAGE_FILE macro and change pte functions. Microblaze use the same MMU as PowerPC that's why we define _PAGE_FILE in the same style. This change fixed remap_file_pages01 LTP test. Signed-off-by: Michal Simek <monstr@monstr.eu>
| * microblaze: Fix put_user macro for 64bits argumentsMichal Simek2009-07-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | For 64bits arguments gcc caused that put_user macro works with wrong value because of optimalization. Adding volatile caused that gcc not optimized it. It is possible to use (as Blackfin do) two put_user macros with 32bits arguments but there is one more instruction which is due to duplication zero return value which is called put_user_asm macro. Signed-off-by: Michal Simek <monstr@monstr.eu>
| * microblaze: Final support for statically linked DTBJohn Williams2009-07-271-10/+13
| | | | | | | | | | | | | | | | | | If r7 is zero at kernel boot, or does not point to a valid DTB, then we fall back to a DTB (assumed to be) linked statically in the kernel, instead of blindly copying bogus cruft into the kernel DTB memory region Signed-off-by: John Williams <john.williams@petalogix.com> Signed-off-by: Michal Simek <monstr@monstr.eu>
| * microblaze: remove duplicated #includeHuang Weiyi2009-07-271-1/+0Star
| | | | | | | | | | | | | | | | Remove duplicated #include('s) in arch/microblaze/include/asm/io.h Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com> Signed-off-by: Michal Simek <monstr@monstr.eu>
| * microblaze: Define tlb_flush macroMichal Simek2009-07-271-1/+1
| | | | | | | | | | | | | | | | | | This fix remove bug which we had till now in all Microblaze MMU code. Primary tested on mmap01 LTP test. We forget to flush invalid tlb which were changed - we used them and there were wrong old data which wasn't correct. Signed-off-by: Michal Simek <monstr@monstr.eu>
* | mm: Pass virtual address to [__]p{te,ud,md}_free_tlb()Benjamin Herrenschmidt2009-07-271-2/+2
|/ | | | | | | | | | | | | | | | | | | | | | | | | | mm: Pass virtual address to [__]p{te,ud,md}_free_tlb() Upcoming paches to support the new 64-bit "BookE" powerpc architecture will need to have the virtual address corresponding to PTE page when freeing it, due to the way the HW table walker works. Basically, the TLB can be loaded with "large" pages that cover the whole virtual space (well, sort-of, half of it actually) represented by a PTE page, and which contain an "indirect" bit indicating that this TLB entry RPN points to an array of PTEs from which the TLB can then create direct entries. Thus, in order to invalidate those when PTE pages are deleted, we need the virtual address to pass to tlbilx or tlbivax instructions. The old trick of sticking it somewhere in the PTE page struct page sucks too much, the address is almost readily available in all call sites and almost everybody implemets these as macros, so we may as well add the argument everywhere. I added it to the pmd and pud variants for consistency. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: David Howells <dhowells@redhat.com> [MN10300 & FRV] Acked-by: Nick Piggin <npiggin@suse.de> Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com> [s390] Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* sched: INIT_PREEMPT_COUNTPeter Zijlstra2009-07-101-3/+1Star
| | | | | | | | | | | | | | | | | | | | | Pull the initial preempt_count value into a single definition site. Maintainers for: alpha, ia64 and m68k, please have a look, your arch code is funny. The header magic is a bit odd, but similar to the KERNEL_DS one, CPP waits with expanding these macros until the INIT_THREAD_INFO macro itself is expanded, which is in arch/*/kernel/init_task.c where we've already included sched.h so we're good. Cc: tony.luck@intel.com Cc: rth@twiddle.net Cc: geert@linux-m68k.org Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Acked-by: Matt Mackall <mpm@selenic.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* microblaze: Wire up new syscallsMichal Simek2009-07-061-1/+3
| | | | | | Wire up new syscalls rt_tgsigqueueinfo and perf_counter_open. Signed-off-by: Michal Simek <monstr@monstr.eu>
* microblaze: use generic syscalls.hArnd Bergmann2009-07-061-36/+3Star
| | | | | | | | | The prototypes in syscalls.h all make sense for microblaze, but for some of them, the actual implementation in sys_microblaze.c needs to be adapted. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Michal Simek <monstr@monstr.eu>
* microblaze: clean up signal handlingArnd Bergmann2009-07-063-175/+4Star
| | | | | | | | | | | | | | | When legacy signal handling is disabled, the arch/microblaze/kernel/signal.c implementation can be much simpler, as most of it is handled generically from kernel/signal.c. This is also a prerequisite for using the generic asm/unistd.h, which does not provide __NR_sigreturn, because this macro is referenced by the current signal.c implementation. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Michal Simek <monstr@monstr.eu>
* microblaze: convert all simple headers to use asm-genericRemis Lima Baima2009-07-0619-266/+21Star
| | | | | | | | | | | | | | All the simple microblaze header files were adapted to use their asm-generic implementations. These files are more simple and were quite straightforward to change. fb.h, vga.h and parport.h previously did not exist, using the generic version makes it possible to build more drivers successfully in allyesonfig. Signed-off-by: Remis Lima Baima <remis.developer@googlemail.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Michal Simek <monstr@monstr.eu>
* microblaze: use the generic lib/checksum.cRemis Lima Baima2009-07-061-68/+2Star
| | | | | | | | The microblaze checksum code is mostly identical to the asm-generic+lib version, so use that instead. Signed-off-by: Remis Lima Baima <remis.developer@googlemail.com> Signed-off-by: Michal Simek <monstr@monstr.eu>
* microblaze: fall back on generic header files for the ABIArnd Bergmann2009-07-0617-887/+16Star
| | | | | | | | | Almost all of the ABI relevant header files now have generic versions, so use those now in order to reduce the amount of architecture specific code. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Michal Simek <monstr@monstr.eu>
* kmap_types: make most arches use generic header fileRandy Dunlap2009-06-171-24/+1Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Merge branch 'for-linus' of ↵Linus Torvalds2009-06-135-4/+5
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * asm-generic: rename page.h and uaccess.hArnd Bergmann2009-06-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * asm-generic: rename atomic.h to atomic-long.hArnd Bergmann2009-06-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | 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>
| * asm-generic: introduce asm/bitsperlong.hArnd Bergmann2009-06-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * asm-generic: rename termios.h, signal.h and mman.hArnd Bergmann2009-06-112-2/+2
| | | | | | | | | | | | | | | | | | | | 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>
* | microblaze: Don't use access_ok for unalignedJohn Williams2009-06-021-1/+2
| | | | | | | | | | | | | | | | | | | | | | 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>
* | microblaze: remove unused flat_stack_align() definitionAndrew Morton2009-06-021-1/+0Star
| | | | | | | | | | Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Michal Simek <monstr@monstr.eu>
* | microblaze_mmu_v2: stat.h MMU updateMichal Simek2009-05-261-41/+36Star
| | | | | | | | Signed-off-by: Michal Simek <monstr@monstr.eu>
* | microblaze_mmu_v2: Elf updateMichal Simek2009-05-261-0/+93
| | | | | | | | Signed-off-by: Michal Simek <monstr@monstr.eu>
* | microblaze_mmu_v2: Update dma.h for MMUMichal Simek2009-05-261-0/+5
| | | | | | | | Signed-off-by: Michal Simek <monstr@monstr.eu>
* | microblaze_mmu_v2: Update cacheflush.hMichal Simek2009-05-261-1/+19
| | | | | | | | Signed-off-by: Michal Simek <monstr@monstr.eu>
* | microblaze_mmu_v2: Traps MMU updateMichal Simek2009-05-261-16/+8Star
| | | | | | | | Signed-off-by: Michal Simek <monstr@monstr.eu>
* | microblaze_mmu_v2: uaccess MMU updateMichal Simek2009-05-261-52/+246
| | | | | | | | Signed-off-by: Michal Simek <monstr@monstr.eu>
* | microblaze_mmu_v2: entry.S, entry.hMichal Simek2009-05-261-2/+35
| | | | | | | | Signed-off-by: Michal Simek <monstr@monstr.eu>
* | microblaze_mmu_v2: Add CURRENT_TASK for entry.SMichal Simek2009-05-261-0/+8
| | | | | | | | Signed-off-by: Michal Simek <monstr@monstr.eu>
* | microblaze_mmu_v2: Update tlb.h and tlbflush.hMichal Simek2009-05-262-0/+56
| | | | | | | | Signed-off-by: Michal Simek <monstr@monstr.eu>
* | microblaze_mmu_v2: Update process creation for MMUMichal Simek2009-05-263-13/+123
| | | | | | | | Signed-off-by: Michal Simek <monstr@monstr.eu>
* | microblaze_mmu_v2: pgalloc.h and page.hMichal Simek2009-05-262-43/+314
| | | | | | | | Signed-off-by: Michal Simek <monstr@monstr.eu>
* | microblaze_mmu_v2: io.h MMU updateMichal Simek2009-05-261-0/+31
| | | | | | | | Signed-off-by: Michal Simek <monstr@monstr.eu>
* | microblaze_mmu_v2: Page table - ioremap - pgtable.c/h, section updateMichal Simek2009-05-262-0/+539
| | | | | | | | Signed-off-by: Michal Simek <monstr@monstr.eu>
* | microblaze_mmu_v2: Context handling - mmu_context.c/hMichal Simek2009-05-263-21/+168
| | | | | | | | Signed-off-by: Michal Simek <monstr@monstr.eu>
* | microblaze_mmu_v2: mmu.h updateMichal Simek2009-05-261-2/+102
| | | | | | | | Signed-off-by: Michal Simek <monstr@monstr.eu>
* | microblaze_mmu_v2: Alocate TLB for early consoleMichal Simek2009-05-261-2/+8
| | | | | | | | Signed-off-by: Michal Simek <monstr@monstr.eu>
* | microblaze: Fix size of __kernel_mode_t to shortMichal Simek2009-05-261-1/+1
| | | | | | | | | | | | | | This patches solve problem with inconsistency between kernel and glibc Signed-off-by: Michal Simek <monstr@monstr.eu>
* | microblaze: Add audit and seccomp thread flags.Edgar E. Iglesias2009-05-261-0/+9
| | | | | | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* | microblaze: Kbuild updateMichal Simek2009-05-221-24/+1Star
| | | | | | | | Signed-off-by: Michal Simek <monstr@monstr.eu>
* | microblaze: Guard __HAVE_ARCH macros with __KERNEL__ in string.hSteve Magnani2009-05-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | microblaze: use generic dma-mapping-broken.hArnd Bergmann2009-05-211-129/+1Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Microblaze does not support the Linux DMA mapping API at this point, so disable CONFIG_NO_DMA. This lets us use the generic dma-mapping-broken.h implementation instead of providing a different copy. Any drivers that try to use DMA mapping now get omitted from Kconfig or produce a link error, rather than failing silently at run time. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Michal Simek <monstr@monstr.eu>
* | microblaze: prepare signal handling for generic unistd.hMichal Simek2009-05-212-0/+14
| | | | | | | | | | | | | | | | | | We need to define set_restore_sigmask() in order to get pselect and ppoll. Also, the setup_frame function can not be used when __NR_sigreturn is not defined. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Michal Simek <monstr@monstr.eu>
* | microblaze: clean up checksum.cArnd Bergmann2009-05-211-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes the function prototypes in the checksum code to have the usual prototypes, typically by turning int arguments into __wsum. Also change csum_partial_copy_from_user() to operate on the right address space and export ip_fast_csum, which is used in modular networking code. The new version is now sparse-clean including endianess checks. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Michal Simek <monstr@monstr.eu>
* | microblaze: remove bad_user_access_lengthArnd Bergmann2009-05-211-4/+3Star
| | | | | | | | | | | | | | | | This function was actually causing harm, by hiding errors about invalid sized get_user/put_user accesses. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Michal Simek <monstr@monstr.eu>
* | microblaze: do not include types.h in ptrace.hArnd Bergmann2009-05-211-1/+0Star
| | | | | | | | | | | | | | | | linux/types.h breaks the uclibc build, so don't include it here. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Michal Simek <monstr@monstr.eu>
* | microblaze: add a dummy pgprot_noncachedArnd Bergmann2009-05-211-0/+2
| | | | | | | | | | | | | | | | | | | | Some device drivers call this, so add a macro that pretends to do this. Since there is no MMU support, it won't actually result in an uncached mapping, though. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Michal Simek <monstr@monstr.eu>
* | microblaze: Remove POWERPC reference from Microblaze gpio.hMichal Simek2009-05-211-3/+3
|/ | | | Signed-off-by: Michal Simek <monstr@monstr.eu>
* of: make of_(un)register_platform_driver common codeGrant Likely2009-05-031-10/+0Star
| | | | | | | | | | | | | | | | | | | | | | Some drivers using of_register_platform_driver() wrapper break on sparc because the wrapper isn't in the header file. This patch moves it from Microblaze and PowerPC implementations and makes it common code. Fixes this sparc64 allmodconfig build error (at least): drivers/leds/leds-gpio.c: In function `gpio_led_init': drivers/leds/leds-gpio.c:295: error: implicit declaration of function `of_register_platform_driver' drivers/leds/leds-gpio.c: In function `gpio_led_exit': drivers/leds/leds-gpio.c:311: error: implicit declaration of function `of_unregister_platform_driver' Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: David S. Miller <davem@davemloft.net> Cc: Michal Simek <monstr@monstr.eu> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>