summaryrefslogtreecommitdiff
path: root/arch/sparc/kernel
AgeCommit message (Collapse)Author
2012-05-21Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-nextLinus Torvalds
Pull sparc updates from David Miller: 1) Kill off support for sun4c and Cypress sun4m chips. And as a result we were able to also kill off that ugly btfixup thing that required multi-stage links of the final vmlinux image in the Kbuild system. This should make the kbuild maintainers really happy. Thanks a lot to Sam Ravnborg for his tireless efforts to get this going. 2) Convert sparc64 to nobootmem. I suspect now with sparc32 being a lot cleaner, it should be able to fall in line and modernize in this area too. 3) Make sparc32 use generic clockevents, from Tkhai Kirill. [ I fixed up the BPF rules, and tried to clean up the build rules too. But I don't have - or want - a sparc cross-build environment, so the BPF rule bug and the related build cleanup was all done with just a bare "make -n" pseudo-test. - Linus ] * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next: (110 commits) sparc32: use flushi when run-time patching in per_cpu_patch sparc32: fix cpuid_patch run-time patching sparc32: drop unused inline functions in srmmu.c sparc32: drop unused functions in pgtsrmmu.h sparc32,leon: move leon mmu functions to leon_mm.c sparc32,leon: remove duplicate definitions in leon.h sparc32,leon: remove duplicate UART register definitions sparc32,leon: move leon ASI definitions to asi.h sparc32: move trap table to a separate file sparc64: renamed ttable.S to ttable_64.S sparc32: Remove asm/sysen.h header. sparc32: Delete asm/smpprim.h sparc32: Remove unused empty_bad_page{,_table} declarations. sparc32: Kill boot_cpu_id4 sparc32: Move GET_PROCESSOR*_ID() out of asm/asmmacro.h sparc32: Remove completely unused code from asm/cache.h sparc32: Add ucmpdi2.o to obj-y instead of lib-y. sparc32: add ucmpdi2 sparc: introduce arch/sparc/Kbuild sparc: remove obsolete documentation ...
2012-05-20sparc32: use flushi when run-time patching in per_cpu_patchSam Ravnborg
Davis S. Miller wrote: " The way we do that now is overkill. We only needed to use the MMU cache ops when we had sun4c around because sun4c lacked support for the "flush" instruction. But all sun4m and later chips have it so we can use it unconditionally. So in the per_cpu_patch() code, get rid of the cache ops invocation, and instead execute a "flush %reg" after each of the instruction patch assignments, where %reg is set to the address of the instruction that was stored into. Perhaps take the flushi() definition from asm/cacheflush_64.h and place it into asm/cacheflush.h, then you can simply use that. " Implemented as per suggestion. Moved run-time patching before we call paging_init(), so helper methods in paging_init() may utilise run-time patching too. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-20sparc32: fix cpuid_patch run-time patchingSam Ravnborg
We hang forever when trying to do run-time patching of instructions identified by the cpuid_patch section Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-20sparc32: move trap table to a separate fileSam Ravnborg
Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-20sparc64: renamed ttable.S to ttable_64.SSam Ravnborg
To allow us to add ttable_32.S Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-20sparc32: Kill boot_cpu_id4David S. Miller
It is written, but never actually read. Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-20sparc32: Move GET_PROCESSOR*_ID() out of asm/asmmacro.hDavid S. Miller
GET_PROCESSOR4D_ID is completely unused, so delete it. Move GET_PROCESSOR4M_ID to the sun4m specific trap code which uses it. We now no longer need to include asm/asi.h Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-15sparc32: delete muldiv.o from MakefileSam Ravnborg
The source file is no more.. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-15sparc32: Kill off software 32-bit multiply/divide routines.David S. Miller
For the explicit calls to .udiv/.umul in assembler, I made a mechanical (read as: safe) transformation. I didn't attempt to make any simplifications. In particular, __ndelay and __udelay can be simplified significantly. Some of the %y reads are unnecessary and these routines have no need any longer for allocating a register window, they can be leaf functions. Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-15sparc32: Remove cypress cpu support.David S. Miller
It's the one aberration in v8, the only cpu that didn't actually have hardware multiply and divide instructions. Signed-off-by: David S. Miller <davem@davemloft.net> Acked-by: Sam Ravnborg <sam@ravnborg.org>
2012-05-14sparc32: remove runtime btfix supportSam Ravnborg
- remove all uses of btfixup header - remove the btfixup header - remove the btfixup code Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-14sparc32: remove remaining users of btfixupSam Ravnborg
Use sparc_config to hold the last two function pointers. There was no point generating dedicated _ops structures only for these. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-14sparc32: move smp ipi to method opsSam Ravnborg
I ended up renaming set_cpu_int to send_ipi to be consistent all way around. send_ipi was moved to the *_smp.c files so we could call the relevant method direct, without any _ops indirection. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-14sparc32: Implement hard_smp_processor_id() via instruction patching.David S. Miller
This is the last non-trivial user of btfixup. Like sparc64, use a special patch section to resolve the various implementations of how to read the current CPU's ID when we don't have current_thread_info()->cpu necessarily available. Signed-off-by: David S. Miller <davem@davemloft.net> Tested-by: Sam Ravnborg <sam@ravnborg.org>
2012-05-14sparc32: Move cache and TLB flushes over to method ops.David S. Miller
This eliminated most of the remaining users of btfixup. There are some complications because of the special cases we have for sun4d, leon, and some flavors of viking. It was found that there are no cases where a flush_page_for_dma method was not hooked up to something, so the "noflush" iommu methods were removed. Add some documentation to the viking_sun4d_smp_ops to describe exactly the hardware bug which causes us to need special TLB flushing on sun4d. Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-13sparc32: Convert mmu_* interfaces from btfixup to method ops.David S. Miller
This set of changes displays one major danger of btfixup, interface signatures are not always type checked fully. As seen here the iounit variant of the map_dma_area routine had an incorrect type for one of it's arguments. It turns out to be harmless in this case, but just imagine trying to debug something involving this kind of problem. No thanks. Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-13sparc: Kill mmu_{un,}lockarea().David S. Miller
These were used on sun4c during floppy data transfers since on that chip we had to lock the cpu mappings into the TLB because we cannot take a TLB miss during the assembler floppy interrupt handler that does the data transfer. That is no longer necessary since we've removed sun4c support, thus this stuff can disappear completely. Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-13sparc32: Kill btfixup for xchg()'s 'swap' instruction.David S. Miller
We always have this instruction available, so no need to use btfixup for it any more. This also eradicates the whole of atomic_32.S and thus the __atomic_begin and __atomic_end symbols completely. Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-13sparc32: drop unused clear_cpu_intSam Ravnborg
Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-13sparc32: drop unused set_irq_udtSam Ravnborg
Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-13sparc32: drop btfixup in pgtable_32.hSam Ravnborg
Only one function left using btfixup. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-12sparc32: drop unused code in process_32Sam Ravnborg
It is commented out using #ifdef 0 / #endif, and has been so for a long time. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-12sparc32: drop btfixup for check_pgt_cacheSam Ravnborg
It is a noop for srmmu - so use a define as sparc64 does. And drop all sparc callers - no need to confuse our-self be calling a noop function. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-12sparc32: simpler cputype check in head_32.SSam Ravnborg
We know this is not a sun4/sun4c - as we checked earlier. So no need to repeat the check. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-12sparc32: drop extra getprop call during bootSam Ravnborg
It was present only to support the sun4, sun4c boxes which do not have the "compatible" property in the root-node of the device tree. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-12sparc32: drop prom version check in head_32.SSam Ravnborg
We already sorted out if we are a sun4/sun4c and halted. So no need to check the prom version as we know this is a v2 or v3 as sun4m, sun4d etc. does not use a v1 prom. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-12sparc32: remove sun4c specific variables from head_32.SSam Ravnborg
This gives us back 7 pages... Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-12sparc32: Add back early sun4/sun4c detection so we can warn properly.David S. Miller
We need to do the check before we try to remap the kernel using SRMMU operations. Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-12sparc32: Trivial removal of sun4c references in comments.David S. Miller
I left some around, like the ones in the openprom headers, since we need to think about which pieces of those datastructures and code we can completely toss now. Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-12sparc32: Remove sun4 and sun4c from enum sparc_cpu.David S. Miller
All the remaining references are trivially removed since we've just eliminated the final reference to sparc_cpu_model from assembler code in commit b7d96ce189564e661909fbf8df39d7358149885b ("sparc32: Remove sparc_cpu_model read from floppy interrupt handler.") Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-12sparc32: Remove sparc_cpu_model read from floppy interrupt handler.David S. Miller
Since we no longer test the cpu model value, no need to load it into a register any more. It just gets overwritten in the next instruction anyways. :-) Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-12sparc32: Remove sun4c tlb/vac insn patching from entry.SDavid S. Miller
No longer used. Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-12sparc32: Restore SMP build and rectify sun4m NMI when non-SMP.David S. Miller
The non-SMP sun4m NMI handler was still accessing SUN4C registers. Fix that and share the sun4m NMI trap code between SMP and non-SMP cases. Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-12sparc32: Remove sun4c floppy assembler.David S. Miller
There were two blocks of code for the two ways to twiddle the terminal count pin in the AUXIO register, one for sun4c and one for sun4m. Kill the former. Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-12sparc: Clear out unused asm/machines.h values.David S. Miller
Remove sun4 and sun4c machine ID values from asm/machines.h Also kill NUM_SUN_MACHINES, use ARRAY_SIZE instead. Kill asm/machines.h include and sun4c checks from asm/floppy_32.h Remove asm/machines.h include from setup_32.c and time_32.c, unused. Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-12sparc32: use inline versions of pgprot_noncached, pte_to_pgoff and pgoff_to_pteSam Ravnborg
We no longer have different versions of these so use a few simple static inline functions. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-12sparc32: drop sun4c bits from head_32.SSam Ravnborg
As we no longer support sun4c we can remove all the code to support remapping the kernel in head_32.S. We also try to tell the user that the machine is not support, in case someone try to boot the kernel on a sun4c one day Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-12sparc32: drop test for sun4c in signal_32Sam Ravnborg
Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-12sparc32: drop sun4c user stack checking routineSam Ravnborg
With this we no longer do any run-time patchings of traps. So drop the function + macro to support this. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-12sparc32: drop sun4c stack checking routineSam Ravnborg
And drop run-time patching too. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-12sparc32: drop sun4c window overflow stack checking routineSam Ravnborg
Also drop run-time patching for srmmu Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-12sparc32: drop sun4c specific stack validationSam Ravnborg
This allows us to kill run-time patching for this function too Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-12sparc32: delete pgtsun4c.hSam Ravnborg
Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-12sparc32: remove all uses of ARCH_SUN4CSam Ravnborg
Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-12sparc32: remove sun4c trapsSam Ravnborg
We used to runtime patch the trap table for srmmu. With the removal of sun4c support this is no longer required. With the sun4c trap removed we can remove all the referenced trap handling which is sun4c specific. This also allows us to get rid of the nosun4c.c file that contained only dummy functions/data. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-12sparc32: drop sun4c supportSam Ravnborg
Machines with sun4c support are very rare these days, and noone is using them for any practical purposes. The sun4c support has been know broken for quite some time too. So rather than trying to keep it up-to-date, lets get rid of it. This allows us to do some very welcome cleanup of sparc32 support. Updated the former sun4c specifc nmi (which was also used for sun4m UP) to be a generic UP NMI. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-10sparc64: Do not clobber %g2 in xcall_fetch_glob_regs().David S. Miller
%g2 is meant to hold the CPUID number throughout this routine, since at the very beginning, and at the very end, we use %g2 to calculate indexes into per-cpu arrays. However we erroneously clobber it in order to hold the %cwp register value mid-stream. Fix this code to use %g3 for the %cwp read and related calulcations instead. Reported-by: Meelis Roos <mroos@linux.ee> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-27Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linuxDavid S. Miller
Conflicts: arch/sparc/kernel/leon_smp.c Merge mainline to get the nobootmem.c bug fix, for the sake of the sparc64 NO_BOOTMEM conversion. Resolve a small include line conflict in leon_smp.c Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-21sparc32,leon: add notify_cpu_starting()Yong Zhang
Otherwise cpu_active_mask will not set, which lead to other issue. Signed-off-by: Yong Zhang <yong.zhang0@gmail.com> Signed-off-by: Konrad Eisele <konrad@gaisler.com> Reviewed-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-21kill mm argument of vm_munmap()Al Viro
it's always current->mm Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>