summaryrefslogtreecommitdiffstats
path: root/arch (follow)
Commit message (Collapse)AuthorAgeFilesLines
* m68knommu: correctly use trap_initGreg Ungerer2011-07-259-24/+13
| | | | | | | | | | | | 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>
* m68knommu: merge ColdFire 5206 and 5206e platform codeGreg Ungerer2011-07-255-195/+7
| | | | | | | | The ColdFire 5206 and 5206e CPU families are almost identical, we can easily merge the platform support code for them. All the differences are dealt with in the current include/asm/5206sim.h. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
* m68k: merge mmu and non-mmu bitops.hGreg Ungerer2011-07-255-837/+535
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following patch merges the mmu and non-mmu versions of the m68k bitops.h files. Now there is a good deal of difference between the two files, but none of it is actually an mmu specific difference. It is all about the specific m68k/coldfire varient we are targeting. So it makes an awful lot of sense to merge these into a single bitops.h. There is a number of ways I can see to factor this code. The approach I have taken here is to keep the various versions of each macro/function type together. This means that there is some ifdefery with each to handle each CPU type. I have added some comments in a couple of appropriate places to try and make it clear what the differences we are dealing with are. Specifically the instruction and addressing mode differences we have to deal with. The merged form keeps the same underlying optimizations for each CPU type for all the general bit clear/set/change and find bit operations. It does switch to using the generic le operations though, instead of any local varients. Build tested on ColdFire, 68328, 68360 (which is cpu32) and 68020+. Run tested on ColdFire and ARAnyM. Signed-off-by: Greg Ungerer <gerg@uclinux.org> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
* m68k: merge MMU and non MMU versions of system.hGreg Ungerer2011-07-257-380/+222
| | | | | | | | | | | | | | The non-MMU m68k targets can use the same asm/system.h as the MMU targets. So switch the current system_mm.h to be system.h and remove system_no.h. The assembly support code for the non-MMU resume functions needs to be modified to match the now common switch_to() macro. Specifically this means correctly saving and restoring the status flags in the case of the ColdFire resume, and some reordering of the code to not use registers before they are saved or after they are restored. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
* m68k: merge MMU and non-MMU versions of asm/hardirq.hGreg Ungerer2011-07-254-47/+32
| | | | | | | | The contents of asm/hardirq.h are pretty strait forward for both the MMU (hardirq_mm.h) and non-MMU (hardirq_no.h) include files. Merge the two back into a single file. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
* m68k: merge the non-mmu and mmu versions of module.cGreg Ungerer2011-07-254-241/+140
| | | | | | | | | 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>
* m68knommu: Fix printk() format in free_initrd_mem()Geert Uytterhoeven2011-07-251-2/+3
| | | | | | | | | arch/m68k/mm/init_no.c:123: warning: format "%d" expects type "int", but argument 2 has type "long unsigned int" And use pr_notice() while we're at it. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Greg Ungerer <gerg@uclinux.org>
* m68knommu: Make empty_zero_page "void *", like on m68kGeert Uytterhoeven2011-07-251-3/+3
| | | | | | | This allows to get rid of the casts. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Greg Ungerer <gerg@uclinux.org>
* Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-armLinus Torvalds2011-07-24206-5753/+6855
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (237 commits) ARM: 7004/1: fix traps.h compile warnings ARM: 6998/2: kernel: use proper memory barriers for bitops ARM: 6997/1: ep93xx: increase NR_BANKS to 16 for support of 128MB RAM ARM: Fix build errors caused by adding generic macros ARM: CPU hotplug: ensure we migrate all IRQs off a downed CPU ARM: CPU hotplug: pass in proper affinity mask on IRQ migration ARM: GIC: avoid routing interrupts to offline CPUs ARM: CPU hotplug: fix abuse of irqdesc->node ARM: 6981/2: mmci: adjust calculation of f_min ARM: 7000/1: LPAE: Use long long printk format for displaying the pud ARM: 6999/1: head, zImage: Always Enter the kernel in ARM state ARM: btc: avoid invalidating the branch target cache on kernel TLB maintanence ARM: ARM_DMA_ZONE_SIZE is no more ARM: mach-shark: move ARM_DMA_ZONE_SIZE to mdesc->dma_zone_size ARM: mach-sa1100: move ARM_DMA_ZONE_SIZE to mdesc->dma_zone_size ARM: mach-realview: move from ARM_DMA_ZONE_SIZE to mdesc->dma_zone_size ARM: mach-pxa: move from ARM_DMA_ZONE_SIZE to mdesc->dma_zone_size ARM: mach-ixp4xx: move from ARM_DMA_ZONE_SIZE to mdesc->dma_zone_size ARM: mach-h720x: move from ARM_DMA_ZONE_SIZE to mdesc->dma_zone_size ARM: mach-davinci: move from ARM_DMA_ZONE_SIZE to mdesc->dma_zone_size ...
| * Merge branch 'devel-stable' into for-nextRussell King2011-07-23106-4020/+4837
| |\ | | | | | | | | | | | | Conflicts: arch/arm/kernel/entry-armv.S
| | * ARM: Fix build errors caused by adding generic macrosRussell King2011-07-218-21/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 66a625a (ARM: mm: proc-macros: Add generic proc/cache/tlb struct definition macros) introduced build errors when PM_SLEEP is not enabled. The per-CPU do_suspend/do_resume functions are defined via the preprocessor to constant 0. However, the macros which use these were converted to assembly, resulting in undefined references to these functions. Fix that by moving the ! ifdef section into proc-macros.S and deleting it from all effected proc-*.S files. Acked-by: Dave Martin <dave.martin@linaro.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| | * Merge branch 'dma' of http://git.linaro.org/git/people/nico/linux into ↵Russell King2011-07-1955-288/+304
| | |\ | | | | | | | | | | | | devel-stable
| | | * ARM: ARM_DMA_ZONE_SIZE is no moreNicolas Pitre2011-07-182-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | One less dependency on mach/memory.h. Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
| | | * ARM: mach-shark: move ARM_DMA_ZONE_SIZE to mdesc->dma_zone_sizeNicolas Pitre2011-07-182-2/+1
| | | | | | | | | | | | | | | | Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
| | | * ARM: mach-sa1100: move ARM_DMA_ZONE_SIZE to mdesc->dma_zone_sizeNicolas Pitre2011-07-184-4/+9
| | | | | | | | | | | | | | | | Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
| | | * ARM: mach-realview: move from ARM_DMA_ZONE_SIZE to mdesc->dma_zone_sizeNicolas Pitre2011-07-186-4/+15
| | | | | | | | | | | | | | | | Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
| | | * ARM: mach-pxa: move from ARM_DMA_ZONE_SIZE to mdesc->dma_zone_sizeNicolas Pitre2011-07-182-4/+3
| | | | | | | | | | | | | | | | Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
| | | * ARM: mach-ixp4xx: move from ARM_DMA_ZONE_SIZE to mdesc->dma_zone_sizeNicolas Pitre2011-07-1813-4/+48
| | | | | | | | | | | | | | | | Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
| | | * ARM: mach-h720x: move from ARM_DMA_ZONE_SIZE to mdesc->dma_zone_sizeNicolas Pitre2011-07-183-7/+2
| | | | | | | | | | | | | | | | Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
| | | * ARM: mach-davinci: move from ARM_DMA_ZONE_SIZE to mdesc->dma_zone_sizeNicolas Pitre2011-07-1813-7/+13
| | | | | | | | | | | | | | | | Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
| | | * ARM: add dma_zone_size to the machine_desc structureNicolas Pitre2011-07-182-0/+10
| | | | | | | | | | | | | | | | Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
| | | * ARM: change ARM_DMA_ZONE_SIZE into a variableNicolas Pitre2011-07-182-12/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Having this value defined at compile time prevents multiple machines with conflicting definitions to coexist. Move it to a variable in preparation for having a per machine value selected at run time. This is relevant only when CONFIG_ZONE_DMA is selected. Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
| | * | Merge branch 'kprobes-thumb' of git://git.yxit.co.uk/linux into devel-stableRussell King2011-07-1590-2003/+4194
| | |\ \
| | | * | ARM: kprobes: Remove now unused codeJon Medhurst2011-07-131-738/+0
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Jon Medhurst <tixy@yxit.co.uk> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
| | | * | ARM: kprobes: Decode ARM preload (immediate) instructionsJon Medhurst2011-07-131-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These were missing from the previous implementation. Signed-off-by: Jon Medhurst <tixy@yxit.co.uk> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
| | | * | ARM: kprobes: Reject probing of unprivileged load and store instructionsJon Medhurst2011-07-131-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These occur extremely rarely in the kernel and writing test cases for them is difficult. Signed-off-by: Jon Medhurst <tixy@yxit.co.uk> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
| | | * | ARM: kprobes: Use new versions of emulate_ldr() and emulate_str()Jon Medhurst2011-07-131-14/+30
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Jon Medhurst <tixy@yxit.co.uk> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
| | | * | ARM: kprobes: Add new versions of emulate_ldr() and emulate_str()Jon Medhurst2011-07-131-3/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These use the register calling conventions required by the new decoding table framework for calling simulated instructions. We rename the old versions of these functions to *_old for now. Signed-off-by: Jon Medhurst <tixy@yxit.co.uk> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
| | | * | ARM: kprobes: Add emulate_rdlo12rdhi16rn0rm8_rwflags_nopc()Jon Medhurst2011-07-131-3/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the emulation function for the instruction format used by the ARM multiply long instructions. It replaces use of prep_emulate_rdhi16rdlo12rs8rm0_wflags(). Signed-off-by: Jon Medhurst <tixy@yxit.co.uk> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
| | | * | ARM: kprobes: Add emulate_rd12rm0_noflags_nopc()Jon Medhurst2011-07-131-7/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the emulation function for the instruction format used by the ARM bit-field manipulation instructions. Various other instruction forms can also make use of this and it is used to replace use of prep_emulate_rd12{rm0}{_modify} Signed-off-by: Jon Medhurst <tixy@yxit.co.uk> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
| | | * | ARM: kprobes: Replace use of prep_emulate_rd12rn16rm0_wflags()Jon Medhurst2011-07-131-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These can now use emulate_rd12rn16rm0_rwflags_nopc(). Signed-off-by: Jon Medhurst <tixy@yxit.co.uk> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
| | | * | ARM: kprobes: Add emulate_rd16rn12rm0rs8_rwflags_nopc()Jon Medhurst2011-07-131-7/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the emulation function for the instruction format used by the ARM multiply-accumulate instructions. These don't allow use of PC so we don't have to add special cases for this. This function is used to replace use of prep_emulate_rd16rs8rm0_wflags and prep_emulate_rd16rn12rs8rm0_wflags. Signed-off-by: Jon Medhurst <tixy@yxit.co.uk> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
| | | * | ARM: kprobes: Migrate remaining instruction decoding functions to tablesJon Medhurst2011-07-131-80/+90
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Jon Medhurst <tixy@yxit.co.uk> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
| | | * | ARM: kprobes: Migrate ARM space_cccc_100x to decoding tablesJon Medhurst2011-07-131-20/+13
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Jon Medhurst <tixy@yxit.co.uk> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
| | | * | ARM: kprobes: Migrate ARM space_cccc_01xx to decoding tablesJon Medhurst2011-07-131-18/+19
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Jon Medhurst <tixy@yxit.co.uk> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
| | | * | ARM: kprobes: Migrate ARM space_cccc_0111__1 to decoding tablesJon Medhurst2011-07-131-46/+36
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Jon Medhurst <tixy@yxit.co.uk> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
| | | * | ARM: kprobes: Migrate ARM space_cccc_0110__1 to decoding tablesJon Medhurst2011-07-131-126/+91
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Jon Medhurst <tixy@yxit.co.uk> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
| | | * | ARM: kprobes: Add emulate_rd12rn16rm0_rwflags_nopc()Jon Medhurst2011-07-131-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the emulation function for the instruction format used by the ARM media instructions. Signed-off-by: Jon Medhurst <tixy@yxit.co.uk> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
| | | * | ARM: kprobes: Migrate ARM space_cccc_001x to decoding tablesJon Medhurst2011-07-131-66/+50
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Jon Medhurst <tixy@yxit.co.uk> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
| | | * | ARM: kprobes: Migrate ARM space_cccc_000x to decoding tablesJon Medhurst2011-07-131-136/+116
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Jon Medhurst <tixy@yxit.co.uk> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
| | | * | ARM: kprobes: Migrate ARM LDRD and STRD to decoding tablesJon Medhurst2011-07-131-17/+20
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Jon Medhurst <tixy@yxit.co.uk> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
| | | * | ARM: kprobes: Add emulate_ldrdstrd()Jon Medhurst2011-07-131-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is an emulation function for the LDRD and STRD instructions. Signed-off-by: Jon Medhurst <tixy@yxit.co.uk> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
| | | * | ARM: kprobes: Migrate ARM data-processing (register) instructions to ↵Jon Medhurst2011-07-131-48/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | decoding tables Signed-off-by: Jon Medhurst <tixy@yxit.co.uk> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
| | | * | ARM: kprobes: Add emulate_rd12rn16rm0rs8_rwflags()Jon Medhurst2011-07-131-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the emulation function for the instruction format used by the ARM data-processing instructions. Signed-off-by: Jon Medhurst <tixy@yxit.co.uk> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
| | | * | ARM: kprobes: Add BLX macroJon Medhurst2011-07-131-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is for use by inline assembler which will be added to kprobes-arm.c It saves memory when used on newer ARM architectures and also provides correct interworking should ARM probes be required on Thumb kernels in the future. Signed-off-by: Jon Medhurst <tixy@yxit.co.uk> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
| | | * | ARM: kprobes: Add alu_write_pc()Jon Medhurst2011-07-132-0/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This writes a new value to PC which was obtained as the result of an ARM ALU instruction. For ARMv7 and later this performs interworking. On ARM kernels we shouldn't encounter any ALU instructions trying to switch to Thumb mode so support for this isn't strictly necessary. However, the approach taken in all other instruction decoding is for us to avoid unpredictable modification of the PC for security reasons. This is usually achieved by rejecting insertion of probes on problematic instruction, but for ALU instructions we can't do this as it depends on the contents of the CPU registers at the time the probe is hit. So, as we require some form of run-time checking to trap undesirable PC modification, we may as well simulate the instructions correctly, i.e. in the way they would behave in the absence of a probe. Signed-off-by: Jon Medhurst <tixy@yxit.co.uk> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
| | | * | ARM: kprobes: Migrate ARM space_1111 to decoding tablesJon Medhurst2011-07-131-31/+25
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Jon Medhurst <tixy@yxit.co.uk> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
| | | * | ARM: kprobes: Decode 32-bit Thumb multiply and absolute difference instructionsJon Medhurst2011-07-131-0/+49
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Jon Medhurst <tixy@yxit.co.uk> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
| | | * | ARM: kprobes: Decode 32-bit Thumb long multiply and divide instructionsJon Medhurst2011-07-131-0/+55
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Jon Medhurst <tixy@yxit.co.uk> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
| | | * | ARM: kprobes: Decode 32-bit Thumb data-processing (register) instructionsJon Medhurst2011-07-131-0/+108
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Jon Medhurst <tixy@yxit.co.uk> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>