aboutsummaryrefslogtreecommitdiff
path: root/arch/sparc/include/asm
AgeCommit message (Collapse)Author
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-19sparc32: drop unused functions in pgtsrmmu.hSam Ravnborg
One function was only used by leon - move it to a leon specific file. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-19sparc32,leon: remove duplicate definitions in leon.hSam Ravnborg
Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Konrad Eisele <konrad@gaisler.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-19sparc32,leon: remove duplicate UART register definitionsSam Ravnborg
The registers are defined in leon_amba too. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Konrad Eisele <konrad@gaisler.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-19sparc32,leon: move leon ASI definitions to asi.hSam Ravnborg
Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Konrad Eisele <konrad@gaisler.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-19sparc32: Remove asm/sysen.h header.David S. Miller
Defines a sun4c register, thus completely unused. Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-19sparc32: Delete asm/smpprim.hDavid S. Miller
Completely unused. Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-19sparc32: Remove unused empty_bad_page{,_table} declarations.David S. Miller
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-19sparc32: Kill boot_cpu_id4David S. Miller
It is written, but never actually read. Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-19sparc32: 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-19sparc32: Remove completely unused code from asm/cache.hDavid S. Miller
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-15sparc32: cleanup mm/fault_32.cSam Ravnborg
- remove unused variables - fix coding style issues that hurts my eyes Signed-off-by: Sam Ravnborg <sam@ravnborg.org> 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-14sparc64: Remove pointless assignment in floppy support.David S. Miller
Reported-by: Josip Rodin <joy@entuzijast.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-14sparc32: Kill unused hard_smp{4m,4d,leon}_processor_id() inlined.David S. Miller
Reported-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
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-13sparc32: 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: Un-btfixup update_mmu_cache().David S. Miller
The magic Swift SRMMU code in question has not been enabled for something on the order of a decade, and it as well as it's comment is there in the history in case we ever need it again. Therefore all implementations are NOPs and we can kill this stuff off. 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 btfixup in page_32.hSam Ravnborg
Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-13sparc32: drop unused prototype from timer_32.hSam Ravnborg
Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-13sparc32: drop btfixup in mmu_context_32.hSam 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-13sparc32: drop btfixup in pgalloc_32.hSam Ravnborg
Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-12sparc32: Un-btfixup more PTE constants and PTE ops.David S. Miller
pte_{filei,wrprotecti,mkcleani,mkoldi} pte_{mkwrite,mkdirty,mkyoung} Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-12sparc32: Un-btfixup pte_{write,dirty,young}iDavid S. Miller
And we can certainly get rid of the const function attributes, there is no way that's needed any longer and no other arch uses this kind of annotation here. Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-12sparc32: Un-btfixup set_pte, pte_present, mk_pte{_phys,_io}().David S. Miller
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-12sparc32: Un-btfixup pmd_{bad,present}().David S. Miller
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-12sparc32: Un-btfixup pgd_{none,bad,present}.David S. Miller
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-12sparc32: Un-btfixup PAGE_{NONE,COPY,READONLY,SHARED,KERNEL}.David S. Miller
That lets us also get rid of the run-time initialization of protection_map[] and all the ugly module workarounds for PAGE_KERNEL and PAGE_SHARED to deal with the fact that we can't do btfixups for modular code. Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-12sparc32: Un-btfixup pmd_page and pte_pfn.David S. Miller
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-12sparc32: Un-btfixup {pte,pmd,pgd}_clear().David S. Miller
Also we can remove BTFIXUPCALL_SWAPO0G0 as that is no longer used. This was rather amusing, we were setting the btfixup vectors based upon cpu type but all to the same exact generic srmmu routines. Furthermore, we were inconsistently marking the fixup as either BTFIXUPCALL_SWAPO0G0 or BTFIXUPCALL_NORM. What a mess, glad we could untangle this stuff. Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-12sparc32: Un-btfixup PGDIR_{SHIFT,SIZE,MASK} {USER_,}PTRS_PER_{PGD,PMD}David S. Miller
Only one set of values exist, the SRMMU ones. Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-12sparc32: drop unused type/externSam Ravnborg
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: drop btfixup for switch_mmSam Ravnborg
This revealed that the implementation of switch_mm had a bogus extra argument. No harm as said argument was never used - but confusing. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-12sparc32: code cleanup in floppy glueSam Ravnborg
Small cleanup to improve readability. Dropped one test for sparc_cpu_model - we already know that only sun4m support floppy. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-12sparc32: fix warning in floopy glueSam Ravnborg
Fix following warning: arch/sparc/include/asm/floppy_32.h:342:5: warning: 'op' may be used uninitialized in this function The warning are legitimite and we can end up using op uninitialized. This fixes build with my gcc on UP. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> 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-11sparc32: Kill unused defines from asm/head_32.hDavid S. Miller
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-11sparc32: Remove some more sun4c code from floppy glue.David S. Miller
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-11sparc32: Remove ldXa and stXa defines, unused.David S. Miller
These were for sharing some MMU code between sun4 and sun4c. Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-11sparc32: Remove sun4{,c} control reg definitions from contregs.h.David S. Miller
No longer used. Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-11sparc32: Kill asm/vac-ops.hDavid S. Miller
All sun4/sun4c stuff and unused. Signed-off-by: David S. Miller <davem@davemloft.net>