summaryrefslogtreecommitdiff
path: root/arch/m68k/kernel
AgeCommit message (Collapse)Author
2011-12-30m68k: add ColdFire paging exception handling codeGreg Ungerer
Add code to traps.c to handle MMU exceptions for the ColdFire. Most of this code is from the 2.6.25 kernel BSP code released by Freescale. Signed-off-by: Greg Ungerer <gerg@uclinux.org> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Matt Waddel <mwaddel@yahoo.com> Acked-by: Kurt Mahan <kmahan@xmission.com>
2011-12-30m68k: set register a2 to current if MMU enabled on ColdFireGreg Ungerer
Virtual memory m68k systems build with register a2 dedicated to being the current proc pointer (non-MMU don't do this). Add code to the ColdFire interrupt and exception processing to set this on entry, and at context switch time. We use the same GET_CURRENT() macro that MMU enabled code uses - modifying it so that the assembler is ColdFire clean. Signed-off-by: Greg Ungerer <gerg@uclinux.org> Acked-by: Matt Waddel <mwaddel@yahoo.com> Acked-by: Kurt Mahan <kmahan@xmission.com> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
2011-12-30m68k: show ColdFire CPU/FPU/MMU typeGreg Ungerer
Update the show_cpuinfo() code to display info about ColdFire cores. Signed-off-by: Greg Ungerer <gerg@uclinux.org> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Matt Waddel <mwaddel@yahoo.com> Acked-by: Kurt Mahan <kmahan@xmission.com>
2011-12-24m68k: consolidate the vmlinux.lds linker scriptsGreg Ungerer
The merge of m68knommu left the linker scripts a little disorganized. Some consistent naming and squashing two of scripts that just include others can simplify things a lot. So merge the two simple including scripts, and rename the nommu script to be consistent with the existing m68k linker scripts. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2011-12-24m68k: handle presence of 64bit mul/div instructions cleanlyGreg Ungerer
The traditional 68000 processors and the newer reduced instruction set ColdFire processors do not support the 32*32->64 multiply or the 64/32->32 divide instructions. This is not a difference based on the presence of a hardware MMU or not. Create a new config symbol to mark that a CPU type doesn't support the longer multiply/divide instructions. Use this then as a basis for using the fast 64bit based divide (in div64.h) and for linking in the extra libgcc functions that may be required (mulsi3, divsi3, etc). Signed-off-by: Greg Ungerer <gerg@uclinux.org> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
2011-12-24m68knommu: no need to set register marker on trapsGreg Ungerer
Commit 61619b12078dc8b85a3d4cbfa16f650daa341bd1 ("m68k: merge mmu and non-mmu include/asm/entry.h files") made the trap entry code basically the same for mmu and non-mmu builds. This means we no longer need code to mark the stack frame as "system-call" type or other in the non-mmu trap handling entry points. This is done in the SAVE_ALL_INT macro now. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2011-12-24m68k: support configure time command line for MMU m68kGreg Ungerer
The non-MMU builds of m68k allow a fixed kernel boot command line to be configured at configure time. Allow this MMU builds as well. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2011-12-24m68k: print memory layout info in boot logGreg Ungerer
Output a table of the kernel memory regions at boot time. This is taken directly from the ARM architecture code that does this. The table looks like this: Virtual kernel memory layout: vector : 0x00000000 - 0x00000400 ( 0 KiB) kmap : 0xd0000000 - 0xe0000000 ( 256 MiB) vmalloc : 0xc0000000 - 0xcfffffff ( 255 MiB) lowmem : 0x00000000 - 0x02000000 ( 32 MiB) .init : 0x00128000 - 0x00134000 ( 48 KiB) .text : 0x00020000 - 0x00118d54 ( 996 KiB) .data : 0x00118d60 - 0x00126000 ( 53 KiB) .bss : 0x00134000 - 0x001413e0 ( 53 KiB) This has been very useful while debugging the ColdFire virtual memory support code. But in general I think it is nice to know extacly where the kernel has layed everything out on boot. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2011-12-24m68knommu: move definition of mach_gettod to where it is usedGreg Ungerer
The mach_gettod function pointer is only called from the time_no.c code. So move its actual definition to there too. It is currently in setup_no.c for no particularly good reason. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2011-12-24m68k: remove thread_info struct from thread structGreg Ungerer
Currently on m68k we have a comeplete thread_info structure stored inside of the thread_struct, and we also have it in the initial part of the kernel stack. Mostly the code currently uses the one inside of the thread_struct, only using the "task" pointer from the stack based one. This is wasteful and confusing, we should only have the single instance of thread_info inside the stack page. And this is the norm for all other architectures. This change makes m68k handle thread_info consistently on both MMU enabled and non-MMU setups. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2011-12-24m68k: remove duplicate asm offset for task thread.infoGreg Ungerer
We have a duplicate name and definition for the offset of the thread.info struct within the task struct in our asm-offsets.c code. Remove one of them, and consolidate to use a single define, TASK_INFO. Signed-off-by: Greg Ungerer <gerg@uclinux.org> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
2011-12-24m68k: merge the init_task code for mmu and non-mmu targetsGreg Ungerer
The init_task code can be the same for both mmu and non-mmu targets. None of the alignment carried out in the the current init_task code is necessary. The linker script takes care of aligning the init_thread structure to a THREAD SIZE boundary, and that is all we need. So use the init_task.c code for all target types, that makes m68k code consistent with what most other architectures do. Signed-off-by: Greg Ungerer <gerg@uclinux.org> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
2011-12-10m68k/mac: early consoleFinn Thain
Revive the old mac_serial_print() routine as mac_early_print(). mac_serial_print() did not function because it did not use the right offsets for its stack arguments. Fix this and make compilation conditional on CONFIG_EARLY_PRINTK instead of the obscure MAC_SERIAL_DEBUG macro. Give mac_early_print() a new string length parameter to fit the early console API. Send output to the framebuffer as well as serial ports. Change the line rate to 38400 baud to match the default for the real (pmac_zilog) serial console. Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2011-12-06m68k: Wire up process_vm_{read,write}vGeert Uytterhoeven
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Greg Ungerer <gerg@uclinux.org>
2011-11-08m68k/irq: Remove obsolete support for user vector interrupt fixupsGeert Uytterhoeven
It was used on Apollo only, before its conversion to genirq. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2011-11-08m68k/irq: Remove obsolete m68k irq frameworkGeert Uytterhoeven
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2011-11-08m68k/irq: Add genirq supportGeert Uytterhoeven
Disabled on all platforms for now Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> [v1] Acked-by: Thomas Gleixner <tglx@linutronix.de>
2011-11-08m68k/irq: Remove obsolete IRQ_FLG_* usersGeert Uytterhoeven
The m68k core irq code stopped honoring these flags during the irq restructuring in 2006. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2011-11-08m68k/irq: Rename {,__}m68k_handle_int()Geert Uytterhoeven
- Rename m68k_handle_int() to generic_handle_irq(), and drop the unneeded asmlinkage, - Rename __m68k_handle_int() to do_IRQ(). Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2011-11-08m68k/irq: Extract irq_set_chip()Geert Uytterhoeven
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Thomas Gleixner <tglx@linutronix.de>
2011-11-08m68k/irq: Rename setup_irq() to m68k_setup_irq() and make it staticGeert Uytterhoeven
It has nothing to do with the standard one in <linux/irq.h> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Thomas Gleixner <tglx@linutronix.de>
2011-11-08m68k/irq: Switch irq_chip methods to "struct irq_data *data"Geert Uytterhoeven
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Thomas Gleixner <tglx@linutronix.de>
2011-11-08m68k/irq: Rename irq_node to irq_dataGeert Uytterhoeven
Make it more similar to the genirq version: - Add an irq field Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Thomas Gleixner <tglx@linutronix.de>
2011-11-08m68k/irq: Kill irq_node_t typedef, always use struct irq_nodeGeert Uytterhoeven
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Thomas Gleixner <tglx@linutronix.de>
2011-11-08m68k/irq: Rename irq_controller to irq_chipGeert Uytterhoeven
Make it more similar to the genirq version: - Remove lock (unused as we don't do SMP anyway), - Prepend methods with irq_, - Make irq_startup() return unsigned int. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Thomas Gleixner <tglx@linutronix.de>
2011-10-31m68k: Add export.h to the m68k specific files as requiredPaul Gortmaker
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-10-25Merge branch 'for-linus' of git://github.com/gregungerer/m68knommuLinus Torvalds
* 'for-linus' of git://github.com/gregungerer/m68knommu: m68k: drop unused Kconfig symbols m68k: drop unused Kconfig symbols m68knommu: create common externs for _ram* vars m68knommu: remove extern declarations of memory_start/memory_end from mm/init m68knommu: use generic section names in mm/init code m68knommu: use generic section names in setup code m68k: merge the mmu and non-mmu traps.c files m68k: move hardware vector setting from traps.c to its own file m68k: merge mmu and non-mmu include/asm/entry.h files m68k: merge the mmu and non-mmu kernel/Makefiles m68k: merge mmu and non-mmu arch Makefiles m68k: reorganize Kconfig options to improve mmu/non-mmu selections m68knommu: fix problems with SPI/GPIO on ColdFire 520x m68k: fix memcpy to unmatched/unaligned source and dest on 68000
2011-10-24m68k: Finally remove leftover markers sectionsKirill Tkhai
Markers have removed already twice: 1: fc5377668c3d808e1d53c4aee152c836f55c3490 2: eb878b3bc0349344dbf70c51bf01fc734d5cf2d3 But a little bit is still here. Signed-off-by: Tkhai Kirill <tkhai@yandex.ru> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2011-10-18m68knommu: create common externs for _ram* varsGreg Ungerer
Create common extern definitions of _rambase, _ramstart and _ramend instead of them being externed when used in code. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2011-10-18m68knommu: use generic section names in setup codeGreg Ungerer
We should be including and using sections.h to get at the extern definitions of the linker sections in the m68knommu startup code. Not defining them locally. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2011-10-18m68k: merge the mmu and non-mmu traps.c filesGreg Ungerer
The code for handling traps in the non-mmu case is a subset of the mmu enabled case. Merge the non-mmu traps_no.c code back to a single traps.c. There is actually no code mmu specific here at all, and the processor specific code (for the more complex 68020/68030/68040/68060) is already proplerly conditionaly used. The format of console exception dump is a little different, but I don't think will cause any one problems, it is purely for debug purposes. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2011-10-18m68k: move hardware vector setting from traps.c to its own fileGreg Ungerer
Most of the trap.c code is general to all m68k arch members. But the code it currently contains to set the hardware vector table is quite specific to the 680x0 family. They can have the vector table at any address unlike other family members (which either support only a single fixed address, or a limited range of addresses). So lets move that code out to a new file, vectors.c. This will make sharing the rest of the trap.c code easier and cleaner. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2011-10-18m68k: merge mmu and non-mmu include/asm/entry.h filesGreg Ungerer
The changes in the mmu version of entry.h (entry_mm.h) and the non-mmu version (entry_no.h) are not about the presence or use of an MMU at all. The main changes are to support the ColdFire processors. The code for trap entry and exit for all types of 68k processor outside coldfire is the same. So merge the files back to a single entry.h and share the common 68k entry/exit code. Some changes are required for the non-mmu entry handlers to adopt the differing macros for system call and interrupt entry, but this is quite strait forward. The changes for the ColdFire remove a couple of instructions for the separate a7 register case, and are no worse for the older single a7 register case. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2011-10-18m68k: merge the mmu and non-mmu kernel/MakefilesGreg Ungerer
The few differences between the mmu and non-mmu kernel/Makefiles can easily be handled inside of a single Makefile. Merge the 2 back into a single Makefile. Signed-off-by: Greg Ungerer <gerg@uclinux.org> Acked-by: Sam Ravnborg <sam@ravnborg.org>
2011-08-26All Arch: remove linkage for sys_nfsservctl system callNeilBrown
The nfsservctl system call is now gone, so we should remove all linkage for it. Signed-off-by: NeilBrown <neilb@suse.de> Signed-off-by: J. Bruce Fields <bfields@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-08-01Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: m68k/math-emu: Remove unnecessary code m68k/math-emu: Remove commented out old code m68k: Kill warning in setup_arch() when compiling for Sun3 m68k/atari: Prefix GPIO_{IN,OUT} with CODEC_ sparc: iounmap() and *_free_coherent() - Use lookup_resource() m68k/atari: Reserve some ST-RAM early on for device buffer use m68k/amiga: Chip RAM - Use lookup_resource() resources: Add lookup_resource() sparc: _sparc_find_resource() should check for exact matches m68k/amiga: Chip RAM - Offset resource end by CHIP_PHYSADDR m68k/amiga: Chip RAM - Use resource_size() to fix off-by-one error m68k/amiga: Chip RAM - Change chipavail to an atomic_t m68k/amiga: Chip RAM - Always allocate from the start of memory m68k/amiga: Chip RAM - Convert from printk() to pr_*() m68k/amiga: Chip RAM - Use tabs for indentation
2011-07-30m68k: Kill warning in setup_arch() when compiling for Sun3Geert Uytterhoeven
arch/m68k/kernel/setup_mm.c: In function ‘setup_arch’: arch/m68k/kernel/setup_mm.c:219: warning: unused variable ‘i’ Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2011-07-26Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu: m68k: Revive reporting of spurious interrupts m68knommu: Move forward declaration of do_IRQ() from machdep.h to irq.h m68k: fix some atomic operation asm address modes for ColdFire m68k: use CPU_HAS_NO_BITFIELDS for signal functions m68k: merge and clean up delay.h files m68knommu: correctly use trap_init m68knommu: merge ColdFire 5206 and 5206e platform code m68k: merge mmu and non-mmu bitops.h m68k: merge MMU and non MMU versions of system.h m68k: merge MMU and non-MMU versions of asm/hardirq.h m68k: merge the non-mmu and mmu versions of module.c m68knommu: Fix printk() format in free_initrd_mem() m68knommu: Make empty_zero_page "void *", like on m68k
2011-07-26m68k, exec: remove redundant set_fs(USER_DS)Mathias Krause
The address limit is already set in flush_old_exec() so those calls to set_fs(USER_DS) are redundant. Signed-off-by: Mathias Krause <minipli@googlemail.com> Cc: Greg Ungerer <gerg@uclinux.org> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-07-25m68k: Revive reporting of spurious interruptsGeert Uytterhoeven
commit 2502b667ea835ee16685c74b2a0d89ba8afe117a ("Change the m68knommu irq handling to use the generic irq framework.") removed the reporting of spurious interrupts on nommu (68328 and 68360). Bring it back in a generic way, using "atomic_t irq_err_count", as that's what most of the other architectures are using. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2011-07-25m68knommu: correctly use trap_initGreg Ungerer
Currently trap_init() is an empty function for m68knommu. Instead the vectors are being setup as part of the IRQ initialization. This is inconsistent with m68k and other architectures. Change the local init_vectors() to be trap_init(), and init the vectors at the correct time during startup. This will help merge of m68k and m68knommu trap code in the furture. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2011-07-25m68k: merge the non-mmu and mmu versions of module.cGreg Ungerer
The non-mmu and mmu versions of the module loader module.c are nearly identical. Merge them back to a single module.c. There is a little bit of re-ordering of the struct and enum definitions in module.h to keep the ifdefery to a minimum. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2011-07-24modules: make arch's use default loader hooksJonas Bonn
This patch removes all the module loader hook implementations in the architecture specific code where the functionality is the same as that now provided by the recently added default hooks. Signed-off-by: Jonas Bonn <jonas@southpole.se> Acked-by: Mike Frysinger <vapier@gentoo.org> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> Tested-by: Michal Simek <monstr@monstr.eu> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-14m68k: use kernel processor defines for conditional optimizationsGreg Ungerer
Older m68k-linux compilers will include pre-defined symbols that confuse what processor it is being targeted for. For example gcc-4.1.2 will pre-define __mc68020__ even if you specify the target processor as -m68000 on the gcc command line. Newer versions of gcc have this corrected. In a few places the m68k code uses defined(__mc68020__) for optimizations that include instructions that are specific to the CPU 68020 and above. When compiling with older compilers this will be true even when we have selected to compile for the older 68000 processors. Switch to using the kernel processor defines, CONFIG_M68020 and friends. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2011-06-14m68knommu: fix linker script exported name sectionsGreg Ungerer
The recent commit titled "module: Sort exported symbols" (f02e8a65) changed the exported symbol name sections. Bring the m68knommu linker script into line with those changes - including the sorting of the symbol names. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2011-05-28ns: Wire up the setns system callEric W. Biederman
32bit and 64bit on x86 are tested and working. The rest I have looked at closely and I can't find any problems. setns is an easy system call to wire up. It just takes two ints so I don't expect any weird architecture porting problems. While doing this I have noticed that we have some architectures that are very slow to get new system calls. cris seems to be the slowest where the last system calls wired up were preadv and pwritev. avr32 is weird in that recvmmsg was wired up but never declared in unistd.h. frv is behind with perf_event_open being the last syscall wired up. On h8300 the last system call wired up was epoll_wait. On m32r the last system call wired up was fallocate. mn10300 has recvmmsg as the last system call wired up. The rest seem to at least have syncfs wired up which was new in the 2.6.39. v2: Most of the architecture support added by Daniel Lezcano <dlezcano@fr.ibm.com> v3: ported to v2.6.36-rc4 by: Eric W. Biederman <ebiederm@xmission.com> v4: Moved wiring up of the system call to another patch v5: ported to v2.6.39-rc6 v6: rebased onto parisc-next and net-next to avoid syscall conflicts. v7: ported to Linus's latest post 2.6.39 tree. >  arch/blackfin/include/asm/unistd.h     |    3 ++- >  arch/blackfin/mach-common/entry.S      |    1 + Acked-by: Mike Frysinger <vapier@gentoo.org> Oh - ia64 wiring looks good. Acked-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-05-24m68knommu: Use generic show_interrupts()Geert Uytterhoeven
Apart from whitespace differences, /proc/interrupts doesn't change by enabling GENERIC_IRQ_SHOW. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2011-05-24m68k: merge the mmu and non-mmu versions of sys_m68k.cGreg Ungerer
There is a lot of common code in the sys_m68k.c files. The mmu and non-mmu versions can easily be merged into a single file. There is really only 2 functions that differ in the 2 cases. A single ifdef on CONFIG_MMU can take care of this. Alternatively we could break those 2 functions out and maintain sys_m68k_no.c and sys_m68k_mm.c with just this code in it (Makefile could then just build the right one). Does anyone have strong feelings on which way they want this done? Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2011-05-24m68knommu: Remove obsolete #include <linux/sys.h>Geert Uytterhoeven
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2011-05-24m68k: merge mmu and non-mmu versions of asm-offsets.cGreg Ungerer
It is strait forward to merge the mmu and non-mmu versions of asm-offstes.c. Some name changes are required for the preempt and thread_info.flags in the non-mmu entry.S assembler to make them consistent for both setups. Signed-off-by: Greg Ungerer <gerg@uclinux.org>