aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68k/include (follow)
AgeCommit message (Collapse)AuthorFilesLines
2012-08-03Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68kLinus Torvalds35-707/+29
Pull m68k updates from Geert Uytterhoeven. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: m68k: Make sys_atomic_cmpxchg_32 work on classic m68k m68k/apollo: Rename "timer" to "apollo_timer" zorro: Remove unused zorro_bus.devices m68k: Remove never used asm/shm.h m68k/sun3: Remove unselectable code in prom_init() m68k: Use asm-generic version of <asm/sections.h> m68k: Replace m68k-specific _[se]bss by generic __bss_{start,stop} mtd/uclinux: Use generic __bss_stop instead of _ebss m68knommu: Allow ColdFire CPUs to use unaligned accesses m68k: Remove five unused headers m68k: CPU32 does not support unaligned accesses m68k: Introduce config option CPU_HAS_NO_UNALIGNED m68k: delay, muldi3 - Use CONFIG_CPU_HAS_NO_MULDIV64 m68k: Move CPU_HAS_* config options m68k: Remove duplicate FPU config option m68knommu: Clean up printing of sections m68k: Use asm-generic version of <asm/types.h> m68k: Use Kbuild logic to import asm-generic headers
2012-07-30ipc: use Kconfig options for __ARCH_WANT_[COMPAT_]IPC_PARSE_VERSIONWill Deacon1-1/+0
Rather than #define the options manually in the architecture code, add Kconfig options for them and select them there instead. This also allows us to select the compat IPC version parsing automatically for platforms using the old compat IPC interface. Reported-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Will Deacon <will.deacon@arm.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Chris Metcalf <cmetcalf@tilera.com> Cc: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-07-24Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommuLinus Torvalds21-271/+1090
Pull m68knommu arch update from Greg Ungerer: "Quite a varied set of changes this time. - A little more merge cleanup, this time the assembler entry code. - New sub-architecture support for the ColdFire 5251/5253 and 5441x CPU families. - Specific clk support code for the ColdFire 520x and 532x CPU familes. - Refactoring of the ColdFire GPIO support. - PCI bus support for some ColdFire CPUS that have PCI hardware (54xx family). This showed up a few problems with ColdFire cache, allocating coherent memory and bi-directional DMA support. Fixes for those too." * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu: (21 commits) m68k: allow PCI bus to be enabled for ColdFire m54xx CPUs m68k: add PCI bus code support for the ColdFire M54xx SoC family m68k: add IO access definitions to support PCI on ColdFire platforms m68k: add PCI bus support definitions for the ColdFire M54xx SoC family m68k: common PCI support definitions and code m68k: add support for DMA_BIDIRECTIONAL in dma support functions m68k: fix ColdFire clear cache operation m68k: use simpler dma_alloc_coherent() for ColdFire CPUs m68knommu: platform support for 8390 based ethernet used on some boards m68knommu: Add clk definitions for m532x. m68knommu: Add clk definitions for m520x. m68knommu: Add rtc device for m5441x. m68knommu: add definitions for the third interrupt controller on devices that don't have a third interrupt controller. m68knommu: Add support for the Coldfire m5441x. m68knommu: use MCF_IRQ_PIT1 instead of MCFINT_VECBASE + MCFINT_PIT1 coldfire-qspi: Add support for the Coldfire 5251/5253. m68knommu: Add support for the Coldfire 5251/5253 m68knommu: refactor Coldfire GPIO not to require GPIOLIB, eliminate mcf_gpio_chips. m68k: merge the MMU and non-MMU versions of the entry.S code m68k: use jbsr to call functions instead of bsrl ...
2012-07-22m68k/apollo: Rename "timer" to "apollo_timer"Geert Uytterhoeven1-1/+1
In file included from include/linux/kgdb.h:17, from include/linux/fb.h:8, from drivers/video/dnfb.c:15: include/linux/serial_8250.h:71: error: expected identifier or ‘(’ before numeric constant include/linux/serial_8250.h:72: error: expected ‘;’ before ‘struct’ make[1]: *** [drivers/video/dnfb.o] Error 1 This is caused by #define timer (IO_BASE + timer_physaddr) in <asm/apollohw.h>, which conflicts with the new "timer" struct member in <linux/serial_8250.h>. Rename "timer" to "apollo_timer", as it's a way too generic name for a global #define. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> -- http://kisskb.ellerman.id.au/kisskb/buildresult/6739606/
2012-07-17m68k: add IO access definitions to support PCI on ColdFire platformsGreg Ungerer1-1/+47
Define the usual memory access functions (readb/writeb/...) and I/O space functions (inb/outb/...) for PCI bus support on ColdFire CPU based platforms. Signed-off-by: Greg Ungerer <gerg@uclinux.org> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
2012-07-17m68k: add PCI bus support definitions for the ColdFire M54xx SoC familyGreg Ungerer2-0/+141
Add all the required definitoins to support the ColdFire M54xx SoC PCI hardware unit. These are strait out of the MCF5475 Reference Manual. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2012-07-17m68k: common PCI support definitions and codeGreg Ungerer3-0/+12
Basic set of definitions and support code required to turn on CONFIG_PCI for the m68k architecture. Nothing specific to any PCI implementation in any m68k class CPU hardware yet. Signed-off-by: Greg Ungerer <gerg@uclinux.org> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
2012-07-17m68k: fix ColdFire clear cache operationGreg Ungerer1-0/+41
The code for clearing (invalidating) the ColdFire cache is actually performing a push operation. Add functions to clear the cache, and fix cache_clear() to call the appropriate clear cache function. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2012-07-16m68knommu: Add clk definitions for m532x.Steven King1-0/+14
The 532x has individually controllable clocks for it peripherals. Add clk definitions for these and add default initialization of either enabled or disabled. Signed-off-by: Steven King <sfking@fdwdc.com> Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2012-07-16m68knommu: Add clk definitions for m520x.Steven King1-0/+10
The 520x has individually controllable clocks for its peripherals. Add clk definitions for these and add default initialization of either enabled or disabled for all of the clocks. Signed-off-by: Steven King <sfking@fdwdc.com> Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2012-07-16m68knommu: Add rtc device for m5441x.Steven King1-0/+6
Add definitions for the m5441x rtc device and an init_BSP function to the m5441x device code. Signed-off-by: Steven King <sfking@fdwdc.com>
2012-07-16m68knommu: add definitions for the third interrupt controller on devices that don't have a third interrupt controller.Steven King2-0/+6
Extending the interrupt controller code in intc-simr.c to support the third interrupt controller on the m5441x means we need to add defines (as 0) for the third interrupt controller on devices that don't have a third interrupt controller. Signed-off-by: Steven King <sfking@fdwdc.com> Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2012-07-16m68knommu: Add support for the Coldfire m5441x.Steven King7-11/+350
Add support for the Coldfire 5441x (54410/54415/54416/54417/54418). Currently we only support noMMU mode. It requires the PIT patch posted previously as it uses the PIT instead of the dma timer as a clock source so we can get all that GENERIC_CLOCKEVENTS goodness. It also adds some simple clk definitions and very simple minded power management. The gpio code is tweeked and some additional devices are added to devices.c. The Makefile uses -mv4e as apparently, the only difference a v4m (m5441x) and a v4e is the later has a FPU, which I don't think should matter to us in the kernel. Signed-off-by: Steven King <sfking@fdwdc.com> Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2012-07-16m68knommu: use MCF_IRQ_PIT1 instead of MCFINT_VECBASE + MCFINT_PIT1Steven King4-1/+4
use MCF_IRQ_PIT1 instead of MCFINT_VECBASE + MCFINT_PIT1 so we can support those parts that have the pit1 interrupt on other than the first interrupt controller. Signed-off-by: Steven King <sfking@fdwdc.com> Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2012-07-16m68knommu: Add support for the Coldfire 5251/5253Steven King5-7/+206
Basic support for the Coldfire 5251/5253. Signed-off-by: Steven king <sfking@fdwdc.com> Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2012-07-16m68knommu: refactor Coldfire GPIO not to require GPIOLIB, eliminate mcf_gpio_chips.Steven King3-263/+265
If we're not connecting external GPIO extenders via i2c or spi or whatever, we probably don't need GPIOLIB. If we provide an alternate implementation of the GPIOLIB functions to use when only on-chip GPIO is needed, we can change ARCH_REQUIRE_GPIOLIB to ARCH_WANTS_OPTIONAL_GPIOLIB so that GPIOLIB becomes optional. The downside is that in the GPIOLIB=n case, we lose all error checking done by gpiolib, ie multiply allocating the gpio, free'ing gpio etc., so that the only checking that can be done is if we reference a gpio on an external part. Targets that need the extra error checking can still select GPIOLIB=y. For the case where GPIOLIB=y, we can simplify the table of gpio chips to use a single chip, eliminating the tables of chips in the 5xxx.c files. The original motivation for the definition of multiple chips was to match the way many of the Coldfire variants defined their gpio as a spare array in memory. However, all this really gains us is some error checking when we request a gpio, gpiolib can check that it doesn't fall in one of the holes. If thats important, I think we can still come up with a better way of accomplishing that. Also in this patch is some general cleanup and reorganizing of the gpio header files (I'm sure I must have had a reason why I sometimes used a prefix of mcf_gpio and other times mcfgpio but for the life of me I can't think of it now). Signed-off-by: Steven King <sfking@fdwdc.com> Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2012-07-12net: add support for NS8390 based eth controllers on some ColdFire CPU boardsGreg Ungerer1-120/+9
A number of older ColdFire CPU based boards use NS8390 based network controllers. Most use the Davicom 9008F or the UMC 9008F. This driver provides the support code to get these devices working on these platforms. Generally the NS8390 based eth device is direct connected via the general purpose bus of the ColdFire CPU. So its addressing and interrupt setup is fixed on each of the different platforms (classic platform setup). This driver is based on the other drivers/net/ethernet/8390 drivers, and includes the lib8390.c code. It uses the existing definitions of the board NS8390 device addresses, interrupts and access types from the arch/m68k/include/asm/mcf8390.h, but moves the IO access functions into the driver code and out of that header. Signed-off-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-12m68knommu: move the badly named mcfne.h to a better mcf8390.hGreg Ungerer1-4/+4
The mcfne.h include contains definitions to support NS8390 eth based hardware on ColdFire based CPU boards. So change its name to reflect that better. Signed-off-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-27m68k: Remove never used asm/shm.hPaul Bolle1-31/+0
m68k's asm/shm.h header has been part of the tree ever since m68k support got added in v1.3.94. (It started as /include/asm-m68k/shm.h and moved to its current location a few years ago.) It seems it was never used: no file ever included it and nothing used the macros it defines. (Actually, from v2.5.46 until v2.6.29-rc3 it was included by m68knommu's asm/shm.h. But that header was just a very thin wrapper for this header and was itself unused too.) This header can safely be removed. Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2012-06-27m68k: Use asm-generic version of <asm/sections.h>Geert Uytterhoeven2-6/+1
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Greg Ungerer<gerg@uclinux.org>
2012-06-27m68k: Replace m68k-specific _[se]bss by generic __bss_{start,stop}Geert Uytterhoeven1-2/+0
BSS_SECTION() provides the __bss_{start,stop} symbols, so there's no need to wrap our own _[se]bss around it. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Greg Ungerer<gerg@uclinux.org>
2012-06-27m68k: Remove five unused headersPaul Bolle5-545/+0
There are five entirely unused headers in arch/m68k/include/asm. Nothing includes these headers. And a few tests found no hits for the things they provide (which makes sense). MC68332.h, mac_mouse.h, and mcfmbus.h are all unused since at least v2.6.12-rc2 (I didn't bother looking further back than that). apollodma.h is unused since v2.6.19: commit 2ed0ce5b57950a620155433c62a5a02a067f1376 ("m68k/Apollo: Remove obsolete arch/m68k/apollo/dma.c") removed the last file interested in that header. And everything interested in <asm/sbus.h> was removed in the v2.6.28 release cycle. The last occurrence of "sbus.h" was deleted with commit 0c0db98b50ed1217c0dbf4051722034ba314d06e ("sparc: Remove Documentation/sparc/sbus_drivers.txt"). I'm not sure whether anything relevant for m68k was included in v2.6.27, but it doesn't really matter. Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Acked-by: Greg Ungerer<gerg@uclinux.org> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2012-06-13Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68kLinus Torvalds2-4/+9
Pull m68k update from Geert Uytterhoeven. This makes m68k use the generic library functions for the user-space strn[cpy|len] functions. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: m68k: Use generic strncpy_from_user(), strlen_user(), and strnlen_user()
2012-06-12m68knommu: m528x qspi definition fixSteven King1-1/+1
The consolidation of the qspi code missed a definition for 528x. Signed-off-by: Steven King <sfking@fdwdc.com> Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2012-06-10m68k: Introduce config option CPU_HAS_NO_UNALIGNEDGeert Uytterhoeven1-2/+2
Use CONFIG_CPU_HAS_NO_UNALIGNED instead of open coding CONFIG_M68000 || CONFIG_COLDFIRE Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Greg Ungerer<gerg@uclinux.org>
2012-06-10m68k: delay, muldi3 - Use CONFIG_CPU_HAS_NO_MULDIV64Geert Uytterhoeven1-1/+1
instead of open coding CONFIG_M68000 || CONFIG_COLDFIRE Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Greg Ungerer<gerg@uclinux.org>
2012-06-10m68k: Use asm-generic version of <asm/types.h>Geert Uytterhoeven2-22/+1
The extra definition for BITS_PER_LONG we had is also indirectly provided by <asm-generic/types.h>, via <asm-generic/int-ll64.h> and <asm/bitsperlong.h> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2012-06-10m68k: Use Kbuild logic to import asm-generic headersGeert Uytterhoeven24-97/+23
Replace all headers files that just include their asm-generic version by Kbuild logic Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2012-06-06m68k: Use generic strncpy_from_user(), strlen_user(), and strnlen_user()Geert Uytterhoeven2-4/+9
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Greg Ungerer <gerg@uclinux.org>
2012-05-30bury __kernel_nlink_t, make internal nlink_t consistentAl Viro1-3/+0
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-05-24Merge branch 'next' of git://git.kernel.org/pub/scm/virt/kvm/kvmLinus Torvalds1-0/+1
Pull KVM changes from Avi Kivity: "Changes include additional instruction emulation, page-crossing MMIO, faster dirty logging, preventing the watchdog from killing a stopped guest, module autoload, a new MSI ABI, and some minor optimizations and fixes. Outside x86 we have a small s390 and a very large ppc update. Regarding the new (for kvm) rebaseless workflow, some of the patches that were merged before we switch trees had to be rebased, while others are true pulls. In either case the signoffs should be correct now." Fix up trivial conflicts in Documentation/feature-removal-schedule.txt arch/powerpc/kvm/book3s_segment.S and arch/x86/include/asm/kvm_para.h. I suspect the kvm_para.h resolution ends up doing the "do I have cpuid" check effectively twice (it was done differently in two different commits), but better safe than sorry ;) * 'next' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (125 commits) KVM: make asm-generic/kvm_para.h have an ifdef __KERNEL__ block KVM: s390: onereg for timer related registers KVM: s390: epoch difference and TOD programmable field KVM: s390: KVM_GET/SET_ONEREG for s390 KVM: s390: add capability indicating COW support KVM: Fix mmu_reload() clash with nested vmx event injection KVM: MMU: Don't use RCU for lockless shadow walking KVM: VMX: Optimize %ds, %es reload KVM: VMX: Fix %ds/%es clobber KVM: x86 emulator: convert bsf/bsr instructions to emulate_2op_SrcV_nobyte() KVM: VMX: unlike vmcs on fail path KVM: PPC: Emulator: clean up SPR reads and writes KVM: PPC: Emulator: clean up instruction parsing kvm/powerpc: Add new ioctl to retreive server MMU infos kvm/book3s: Make kernel emulated H_PUT_TCE available for "PR" KVM KVM: PPC: bookehv: Fix r8/r13 storing in level exception handler KVM: PPC: Book3S: Enable IRQs during exit handling KVM: PPC: Fix PR KVM on POWER7 bare metal KVM: PPC: Fix stbux emulation KVM: PPC: bookehv: Use lwz/stw instead of PPC_LL/PPC_STL for 32-bit fields ...
2012-05-23Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signalLinus Torvalds1-0/+1
Pull first series of signal handling cleanups from Al Viro: "This is just the first part of the queue (about a half of it); assorted fixes all over the place in signal handling. This one ends with all sigsuspend() implementations switched to generic one (->saved_sigmask-based). With this, a bunch of assorted old buglets are fixed and most of the missing bits of NOTIFY_RESUME hookup are in place. Two more fixes sit in arm and um trees respectively, and there's a couple of broken ones that need obvious fixes - parisc and avr32 check TIF_NOTIFY_RESUME only on one of two codepaths; fixes for that will happen in the next series" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal: (55 commits) unicore32: if there's no handler we need to restore sigmask, syscall or no syscall xtensa: add handling of TIF_NOTIFY_RESUME microblaze: drop 'oldset' argument of do_notify_resume() microblaze: handle TIF_NOTIFY_RESUME score: add handling of NOTIFY_RESUME to do_notify_resume() m68k: add TIF_NOTIFY_RESUME and handle it. sparc: kill ancient comment in sparc_sigaction() h8300: missing checks of __get_user()/__put_user() return values frv: missing checks of __get_user()/__put_user() return values cris: missing checks of __get_user()/__put_user() return values powerpc: missing checks of __get_user()/__put_user() return values sh: missing checks of __get_user()/__put_user() return values sparc: missing checks of __get_user()/__put_user() return values avr32: struct old_sigaction is never used m32r: struct old_sigaction is never used xtensa: xtensa_sigaction doesn't exist alpha: tidy signal delivery up score: don't open-code force_sigsegv() cris: don't open-code force_sigsegv() blackfin: don't open-code force_sigsegv() ...
2012-05-23Merge branch 'x86-fpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tipLinus Torvalds1-3/+0
Pull fpu state cleanups from Ingo Molnar: "This tree streamlines further aspects of FPU handling by eliminating the prepare_to_copy() complication and moving that logic to arch_dup_task_struct(). It also fixes the FPU dumps in threaded core dumps, removes and old (and now invalid) assumption plus micro-optimizes the exit path by avoiding an FPU save for dead tasks." Fixed up trivial add-add conflict in arch/sh/kernel/process.c that came in because we now do the FPU handling in arch_dup_task_struct() rather than the legacy (and now gone) prepare_to_copy(). * 'x86-fpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86, fpu: drop the fpu state during thread exit x86, xsave: remove thread_has_fpu() bug check in __sanitize_i387_state() coredump: ensure the fpu state is flushed for proper multi-threaded core dump fork: move the real prepare_to_copy() users to arch_dup_task_struct()
2012-05-21m68k: add TIF_NOTIFY_RESUME and handle it.Al Viro1-0/+1
TIF_NOTIFY_RESUME added (as bit 5). That way nommu glue needs no changes at all; mmu one needs just to replace jmi do_signal_return to jne do_signal_return There we have flags shifted up, until bit 6 (SIGPENDING) is in MSBit; instead of checking that MSBit is set (jmi) we check that MSBit or something below it is set (jne); bits 0..4 are never set, so that's precisely "bit 6 or bit 5 is set". Usual handling of NOTIFY_RESUME/SIGPENDING is done in do_notify_resume(); glue calls it instead of do_signal(). Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-05-21Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommuLinus Torvalds5-105/+172
Pull m68knommu tree from Greg Ungerer: "More merge and clean up of MMU and non-MMU common files, namely signal.c and dma.c. There is also a simplification of the ColdFire GPIO setup tables. Using a couple of simple macros we make the init tables really small and easy to read, and save a couple of thousand lines of code. Also a move of all the ColdFire subarch support files into the existing coldfire directory. The sub-directories just ended up duplicating Makefiles and now only contain really simple pieces of code. This saves quite a few lines of code too. As always a couple of bugs fixes thrown in too. Oh and a new defconfig for the ColdFire platforms that support having the MMU enabled." * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu: (39 commits) m68k: add a defconfig for the M5475EVB ColdFire with MMU board m68knommu: unaligned.h fix for M68000 core m68k: merge the MMU and non-MMU versions of the arch dma code m68knommu: reorganize the no-MMU cache flushing to match m68k m68knommu: move the 54xx platform code into the common ColdFire code directory m68knommu: move the 532x platform code into the common ColdFire code directory m68knommu: move the 5407 platform code into the common ColdFire code directory m68knommu: move the 5307 platform code into the common ColdFire code directory m68knommu: move the 528x platform code into the common ColdFire code directory m68knommu: move the 527x platform code into the common ColdFire code directory m68knommu: move the 5272 platform code into the common ColdFire code directory m68knommu: move the 5249 platform code into the common ColdFire code directory m68knommu: move the 523x platform code into the common ColdFire code directory m68knommu: move the 520x platform code into the common ColdFire code directory m68knommu: move the 5206 platform code into the common ColdFire code directory m68knommu: simplify the ColdFire 5407 GPIO struct setup m68knommu: simplify the ColdFire 532x GPIO struct setup m68knommu: simplify the ColdFire 5307 GPIO struct setup m68knommu: simplify the ColdFire 528x GPIO struct setup m68knommu: simplify the ColdFire 527x GPIO struct setup ...
2012-05-20m68knommu: unaligned.h fix for M68000 coreLuis Alves1-1/+1
This patch fixes unaligned memory access for the 68000 core based cpu's. Some time ago, my cpu (68000) was raising address/bus error's when mounting cifs shares (didn't bother to debug it at the time). After developing the MMC/SD card driver I was having the same issue when mounting the vfat fs. I've traced the issue down to the 'unaligned.h' file. (I guess nobody has ever used unaligned.h back in the 68328 'era'. Signed-off-by: Luis Alves <ljalvs@gmail.com> Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2012-05-20m68knommu: reorganize the no-MMU cache flushing to match m68kGreg Ungerer1-4/+28
Introduce cache_push() and cache_clear() functions for the non-MMU m68k devices. With these in place we can more easily merge some of the common m68k arch code. In particular by reorganizing the __flush_cache_all() code and separating the cache push and clear functions it becomes trivial to implement the new cache_push() and cache_clear() functions. Signed-off-by: Greg Ungerer <gerg@uclinux.org> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
2012-05-20m68knommu: make duplicated ColdFire GPIO init code common for allGreg Ungerer1-0/+3
The code that adds each ColdFire platforms GPIO signals is duplicated in each platforms specific code. Remove it from each platforms code and put a single version in the existing ColdFire gpio subsystem init code. Signed-off-by: Greg Ungerer <gerg@uclinux.org> Acked-by: Steven King <sfking@fdwdc.com>
2012-05-20m68knommu: switch to GPIO init macros in ColdFire 528x init codeGreg Ungerer1-99/+80
Modify the GPIO setup table to use the mcfgpio.h macros for table init. Simplifies code and reduces line count significantly. We also need to rename some of the GPIO registers to be consistent with all other ColdFire parts (we can't use the new GPIO macros otherwise). Signed-off-by: Greg Ungerer <gerg@uclinux.org> Acked-by: Steven King <sfking@fdwdc.com>
2012-05-20m68knommu: introduce macros to simplify ColdFire GPIO table initializationGreg Ungerer1-0/+54
We have very large tables in the ColdFire CPU GPIO setup code that essentially boil down to 2 distinct types of GPIO pin initiaization. Using 2 macros we can reduce these large tables to at most a dozen lines of setup code, and in quite a few cases a single table entry. Introduce these 2 macros into the existing mcfgpio.h header. Signed-off-by: Greg Ungerer <gerg@uclinux.org> Acked-by: Steven King <sfking@fdwdc.com>
2012-05-20m68k: fix compiler warning by properly inlining flat_set_persistent()Ezequiel Garcia1-1/+6
This patch removes the following warning: fs/binfmt_flat.c:752: warning: unused variable 'persistent'. There is neither functionality change, nor extra code generated. Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com> Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2012-05-16fork: move the real prepare_to_copy() users to arch_dup_task_struct()Suresh Siddha1-3/+0
Historical prepare_to_copy() is mostly a no-op, duplicated for majority of the architectures and the rest following the x86 model of flushing the extended register state like fpu there. Remove it and use the arch_dup_task_struct() instead. Suggested-by: Oleg Nesterov <oleg@redhat.com> Suggested-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com> Link: http://lkml.kernel.org/r/1336692811-30576-1-git-send-email-suresh.b.siddha@intel.com Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: David Howells <dhowells@redhat.com> Cc: Koichi Yasutake <yasutake.koichi@jp.panasonic.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Paul Mundt <lethal@linux-sh.org> Cc: Chris Zankel <chris@zankel.net> Cc: Richard Henderson <rth@twiddle.net> Cc: Russell King <linux@arm.linux.org.uk> Cc: Haavard Skinnemoen <hskinnemoen@gmail.com> Cc: Mike Frysinger <vapier@gentoo.org> Cc: Mark Salter <msalter@redhat.com> Cc: Aurelien Jacquiot <a-jacquiot@ti.com> Cc: Mikael Starvik <starvik@axis.com> Cc: Yoshinori Sato <ysato@users.sourceforge.jp> Cc: Richard Kuo <rkuo@codeaurora.org> Cc: Tony Luck <tony.luck@intel.com> Cc: Michal Simek <monstr@monstr.eu> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Jonas Bonn <jonas@southpole.se> Cc: James E.J. Bottomley <jejb@parisc-linux.org> Cc: Helge Deller <deller@gmx.de> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: Chen Liqin <liqin.chen@sunplusct.com> Cc: Lennox Wu <lennox.wu@gmail.com> Cc: David S. Miller <davem@davemloft.net> Cc: Chris Metcalf <cmetcalf@tilera.com> Cc: Jeff Dike <jdike@addtoit.com> Cc: Richard Weinberger <richard@nod.at> Cc: Guan Xuetao <gxt@mprc.pku.edu.cn> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2012-04-22m68k: Correct the Atari ALLOWINT definitionMikael Pettersson1-2/+2
Booting a 3.2, 3.3, or 3.4-rc4 kernel on an Atari using the `nfeth' ethernet device triggers a WARN_ONCE() in generic irq handling code on the first irq for that device: WARNING: at kernel/irq/handle.c:146 handle_irq_event_percpu+0x134/0x142() irq 3 handler nfeth_interrupt+0x0/0x194 enabled interrupts Modules linked in: Call Trace: [<000299b2>] warn_slowpath_common+0x48/0x6a [<000299c0>] warn_slowpath_common+0x56/0x6a [<00029a4c>] warn_slowpath_fmt+0x2a/0x32 [<0005b34c>] handle_irq_event_percpu+0x134/0x142 [<0005b34c>] handle_irq_event_percpu+0x134/0x142 [<0000a584>] nfeth_interrupt+0x0/0x194 [<001ba0a8>] schedule_preempt_disabled+0x0/0xc [<0005b37a>] handle_irq_event+0x20/0x2c [<0005add4>] generic_handle_irq+0x2c/0x3a [<00002ab6>] do_IRQ+0x20/0x32 [<0000289e>] auto_irqhandler_fixup+0x4/0x6 [<00003144>] cpu_idle+0x22/0x2e [<001b8a78>] printk+0x0/0x18 [<0024d112>] start_kernel+0x37a/0x386 [<0003021d>] __do_proc_dointvec+0xb1/0x366 [<0003021d>] __do_proc_dointvec+0xb1/0x366 [<0024c31e>] _sinittext+0x31e/0x9c0 After invoking the irq's handler the kernel sees !irqs_disabled() and concludes that the handler erroneously enabled interrupts. However, debugging shows that !irqs_disabled() is true even before the handler is invoked, which indicates a problem in the platform code rather than the specific driver. The warning does not occur in 3.1 or older kernels. It turns out that the ALLOWINT definition for Atari is incorrect. The Atari definition of ALLOWINT is ~0x400, the stated purpose of that is to avoid taking HSYNC interrupts. irqs_disabled() returns true if the 3-bit ipl & 4 is non-zero. The nfeth interrupt runs at ipl 3 (it's autovector 3), but 3 & 4 is zero so irqs_disabled() is false, and the warning above is generated. When interrupts are explicitly disabled, ipl is set to 7. When they are enabled, ipl is masked with ALLOWINT. On Atari this will result in ipl = 3, which blocks interrupts at ipl 3 and below. So how come nfeth interrupts at ipl 3 are received at all? That's because ipl is reset to 2 by Atari-specific code in default_idle(), again with the stated purpose of blocking HSYNC interrupts. This discrepancy means that ipl 3 can remain blocked for longer than intended. Both default_idle() and falcon_hblhandler() identify HSYNC with ipl 2, and the "Atari ST/.../F030 Hardware Register Listing" agrees, but ALLOWINT is defined as if HSYNC was ipl 3. [As an experiment I modified default_idle() to reset ipl to 3, and as expected that resulted in all nfeth interrupts being blocked.] The fix is simple: define ALLOWINT as ~0x500 instead. This makes arch_local_irq_enable() consistent with default_idle(), and prevents the !irqs_disabled() problems for ipl 3 interrupts. Tested on Atari running in an Aranym VM. Signed-off-by: Mikael Pettersson <mikpe@it.uu.se> Tested-by: Michael Schmitz <schmitzmic@googlemail.com> (on Falcon/CT60) Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2012-04-22m68k/video: Create <asm/vga.h>Geert Uytterhoeven1-0/+27
For now, it just contains the hack for cirrusfb on Amiga, which is moved out of <video/vga.h> with some slight modifications (use raw_*() instead of z_*(), which are defined on all m68k platforms). This makes it safe to include <video/vga.h> in all contexts. Before it could fail to compile with include/video/vga.h: In function ‘vga_mm_r’: include/video/vga.h:242: error: implicit declaration of function ‘z_readb’ include/video/vga.h: In function ‘vga_mm_w’: include/video/vga.h:247: error: implicit declaration of function ‘z_writeb’ include/video/vga.h: In function ‘vga_mm_w_fast’: include/video/vga.h:253: error: implicit declaration of function ‘z_writew’ or include/video/vga.h:23:21: error: asm/vga.h: No such file or directory depending on the value of CONFIG_AMIGA. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Cc: linux-fbdev@vger.kernel.org Cc: dri-devel@lists.freedesktop.org
2012-04-22m68k: Make sure {read,write}s[bwl]() are always definedGeert Uytterhoeven1-0/+7
drivers/usb/musb/musb_io.h provides default implementations for {read,write}s[bwl]() on most platforms, some of which will conflict soon with platform-specific counterparts on m68k. To avoid having to add more platform-specific checks to musb_io.h later, make sure {read,write}s[bwl]() are always defined on m68k, and disable the default implementations in musb_io.h on m68k, like is already done for several other architectures. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Felipe Balbi <balbi@ti.com>
2012-04-22m68k/atari: Change VME irq numbers from unsigned long to unsigned intGeert Uytterhoeven1-2/+2
Device interrupts numbers were changed to unsigned int in 1997, the year IRQ_MACHSPEC was killed as well. Also kill a related cast while we're at it. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Cc: netdev@vger.kernel.org
2012-04-22m68k: Remove unused MAX_NOINT_IPL definitionGeert Uytterhoeven1-2/+0
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2012-04-08kvmclock: Add functions to check if the host has stopped the vmEric B Munson1-0/+1
When a host stops or suspends a VM it will set a flag to show this. The watchdog will use these functions to determine if a softlockup is real, or the result of a suspended VM. Signed-off-by: Eric B Munson <emunson@mgebm.net> asm-generic changes Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
2012-04-01m68k: include asm/cmpxchg.h in our m68k atomic.hGreg Ungerer1-0/+1
After commit 9ffc93f203c18a70623f21950f1dd473c9ec48cd ("Remove all CC init/main.o In file included from include/linux/mm.h:15:0, from include/linux/ring_buffer.h:5, from include/linux/ftrace_event.h:4, from include/trace/syscall.h:6, from include/linux/syscalls.h:78, from init/main.c:16: include/linux/debug_locks.h: In function ‘__debug_locks_off’: include/linux/debug_locks.h:16:2: error: implicit declaration of function ‘xchg’ There is no indirect inclusions of the new asm/cmpxchg.h for m68k here. Looking at most other architectures they include asm/cmpxchg.h in their asm/atomic.h. M68k currently does not do this. Including this in atomic.h fixes all m68k build problems. Signed-off-by: Greg Ungerer <gerg@uclinux.org> Acked-by: David Howells <dhowells@redhat.com> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2012-03-29Merge branch 'x86-x32-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tipLinus Torvalds1-43/+10
Pull x32 support for x86-64 from Ingo Molnar: "This tree introduces the X32 binary format and execution mode for x86: 32-bit data space binaries using 64-bit instructions and 64-bit kernel syscalls. This allows applications whose working set fits into a 32 bits address space to make use of 64-bit instructions while using a 32-bit address space with shorter pointers, more compressed data structures, etc." Fix up trivial context conflicts in arch/x86/{Kconfig,vdso/vma.c} * 'x86-x32-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (71 commits) x32: Fix alignment fail in struct compat_siginfo x32: Fix stupid ia32/x32 inversion in the siginfo format x32: Add ptrace for x32 x32: Switch to a 64-bit clock_t x32: Provide separate is_ia32_task() and is_x32_task() predicates x86, mtrr: Use explicit sizing and padding for the 64-bit ioctls x86/x32: Fix the binutils auto-detect x32: Warn and disable rather than error if binutils too old x32: Only clear TIF_X32 flag once x32: Make sure TS_COMPAT is cleared for x32 tasks fs: Remove missed ->fds_bits from cessation use of fd_set structs internally fs: Fix close_on_exec pointer in alloc_fdtable x32: Drop non-__vdso weak symbols from the x32 VDSO x32: Fix coding style violations in the x32 VDSO code x32: Add x32 VDSO support x32: Allow x32 to be configured x32: If configured, add x32 system calls to system call tables x32: Handle process creation x32: Signal-related system calls x86: Add #ifdef CONFIG_COMPAT to <asm/sys_ia32.h> ...