summaryrefslogtreecommitdiff
path: root/arch/parisc/kernel/syscall.S
AgeCommit message (Collapse)Author
2014-09-13parisc: Implement new LWS CAS supporting 64 bit operations.Guy Martin
The current LWS cas only works correctly for 32bit. The new LWS allows for CAS operations of variable size. Signed-off-by: Guy Martin <gmsoft@tuxicoman.be> Cc: <stable@vger.kernel.org> # 3.13+ Signed-off-by: Helge Deller <deller@gmx.de>
2014-05-15parisc: Improve LWS-CAS performanceJohn David Anglin
The attached change significantly improves the performance of the LWS-CAS code in syscall.S. This allows a number of packages to build (e.g., zeromq3, gtest and libxs) that previously failed because slow LWS-CAS performance under contention. In particular, interrupts taken while the lock was taken degraded performance significantly. The change does the following: 1) Disables interrupts around the CAS operation, and 2) Changes the loads and stores to use the ordered completer, "o", on PA 2.0. "o" and "ma" with a zero offset are equivalent. The latter is accepted on both PA 1.X and 2.0. The use of ordered loads and stores probably makes no difference on all existing hardware, but it seemed pedantically correct. In particular, the CAS operation must complete before LDCW lock is released. As written before, a processor could reorder the operations. I don't believe the period interrupts are disabled is long enough to significantly increase interrupt latency. For example, the TLB insert code is longer. Worst case is a memory fault in the CAS operation. Signed-off-by: John David Anglin <dave.anglin@bell.net> Cc: stable@vger.kernel.org # 3.13+ Signed-off-by: Helge Deller <deller@gmx.de>
2013-11-07parisc: provide macro to create exception table entriesHelge Deller
Provide a macro ASM_EXCEPTIONTABLE_ENTRY() to create exception table entries and convert all open-coded places to use that macro. This patch is a first step toward creating a exception table which only holds 32bit pointers even on a 64bit kernel. That way in my own kernel I was able to reduce the in-kernel exception table from 44kB to 22kB. Signed-off-by: Helge Deller <deller@gmx.de>
2013-05-06parisc: document the parisc gateway pageHelge Deller
Include some documentation about how the parisc gateway page technically works and how it is used from userspace. James Bottomley is the original author of this description and it was copied here out of an email thread from Apr 12 2013 titled: man2 : syscall.2 : document syscall calling conventions CC: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: Helge Deller <deller@gmx.de>
2013-05-06parisc: fix partly 16/64k PAGE_SIZE bootHelge Deller
This patch fixes partly PAGE_SIZEs of 16K or 64K by adjusting the assembler PTE lookup code and the assembler TEMPALIAS code. Furthermore some data alignments for PAGE_SIZE have been limited to 4K (or less) to not waste too much memory with greater page sizes. As a side note, the palo loader can (currently) only handle up to 10 ELF segments which is fixed with tighter aligning as well. My testings indicated that the ldci command in the sba iommu coding needed adjustment by the PAGE_SHIFT value and that the I/O PDIR Page size was only set to 4K for my machine (C3000). All this fixes partly the boot, but there are still quite some caching problems left. Examples are e.g. the symbios logic driver which is failing: sym0: <896> rev 0x7 at pci 0000:00:0f.0 irq 69 sym0: PA-RISC Firmware, ID 7, Fast-40, SE, parity checking CACHE TEST FAILED: DMA error (dstat=0x81).sym0: CACHE INCORRECTLY CONFIGURED. and the tulip network driver which doesn't seem to work correctly either: Sending BOOTP requests .net eth0: Setting full-duplex based on MII#1 link partner capability of 05e1 ..... timed out! Beside those kernel fixes glibc will need fixes too to be able to handle >4K page sizes. Signed-off-by: Helge Deller <deller@gmx.de>
2013-02-20parisc: fix ptrace breakageAl Viro
1) PTRACE_SYSCALL doesn't work for 64bit process on parisc64. Compat syscall table is used instead of 64bit one. IMO we should either refuse to allow PTRACE_SYSCALL for 64bit processes or duplicate the logics choosing the right syscall table into .Ltracesys. 2) if you have let the tracee run with PTRACE_SYSCALL and it had stopped, you can use PTRACE_POKEUSR to modify syscall number (r20) and arguments 1--4 (r26--r23). Modifications will have effect. However, modifying arguments 5 and 6 (r22 and r21 resp.) works only when process (32bit one) runs on 64bit host - on 32bit one it has no effect. AFAICS, the diff below should fix that one. Signed-off-by: Al Viro <viro@ZenIV.linux.org.uk> Tested-by: John David Anglin <dave.anglin@bell.net> Signed-off-by: Helge Deller <deller@gmx.de>
2012-10-01parisc: decide whether to go to slow path (tracesys) based on thread flagsAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-10-01parisc: fix double restartsAl Viro
Don't bother restoring r28 on syscall restarts; it's clobbered by syscall anyway. Reuse (now unused) ->orig_r28 as "no restarts allowed" flag. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2011-03-31Fix common misspellingsLucas De Marchi
Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
2010-05-30parisc: LWS fixes for syscall.SJohn David Anglin
1) Gate immediately and save a branch. 2) Fix off by one error in checking entry number. 3) Use sr7 instead of sr3 in error return path as sr3 might not contain correct value. 4) Enable locking on UP systems to prevent incorrect operation of the cas_action critical region on page faults. Tested on several systems, including UP c3750 with 2.6.33.2 kernel. Signed-off-by: John David Anglin <dave.anglin@nrc-cnrc.gc.ca> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2009-09-27parisc: split syscall_trace into two halvesKyle McMartin
Instead of fiddling with gr[20], restructure code to return whether or not to -ENOSYS. (Also do a bit of fiddling to let them take pt_regs directly instead of re-computing it.) Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
2009-09-27parisc: add missing TI_TASK macro in syscall.SKyle McMartin
LDREG 0(%r1),%r1 really wants to be accessing thread_info.task, instead of hardcoding the 0. Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
2009-09-27parisc: tracehook_report_syscallKyle McMartin
This makes parisc use the standard tracehook_report_syscall_entry and tracehook_report_syscall_exit hooks in <linux/tracehook.h>. To do this, we need to access current->thread.regs, and to know whether we're entering or exiting the syscall, so add this to syscall_trace. Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
2009-03-31parisc: document light weight syscall ABIHelge Deller
Document the LWS ABI including implementation notes for userspace, and comment cleanup. Remove extraneous .align 16 after lws_lock_start. Signed-off-by: Carlos O'Donell <carlos@systemhalted.org> Signed-off-by: Helge Deller <deller@gmx.de> Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
2008-06-13Revert "parisc: fix trivial section name warnings"Kyle McMartin
This reverts commit bd3bb8c15b9a80dbddfb7905b237a4a11a4725b4. Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
2008-05-15parisc: fix trivial section name warningsHelge Deller
This trivial patch fixes the following section warnings on PARISC: > WARNING: vmlinux.o (.text.1): unexpected section name. >The (.[number]+) following section name are ld generated and not expected. > Did you forget to use "ax"/"aw" in a .S file? > Note that for example <linux/init.h> contains > section definitions for use in .S files. Signed-off-by: Helge Deller <deller@gmx.de> Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
2007-10-18[PARISC] Remove hardcoded uses of PAGE_SIZEKyle McMartin
Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
2007-10-18[PARISC] Kill off ASM_PAGE_SIZE useSam Ravnborg
We have the macro _AC() generally available now so the calculation of PAGE_SIZE can be made assembler compatible. Introduce use of _AC() and kill all users of ASM_PAGE_SIZE. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
2007-06-03[PARISC] Fix bug when syscall nr is __NR_Linux_syscallsKyle McMartin
The bug was that we were comparing __NR_syscalls to be greater or equal to the syscall number stored in %r20. __NR_syscalls is one greater than the last syscall though, so we're loading one entry beyond the end of the syscall table, and trying to jump to it. Fix this by only checking that we're greater, alternatively, we could have compared to (__NR_Linux_syscalls - 1) Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2007-05-30[PARISC] fix "reduce size of task_struct on 64-bit machines" falloutKyle McMartin
Amazingly, parisc was the only arch effected by this... Convert register-sized loads/stores to always be 32-bit for these fields. Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2007-05-22[PARISC] Disable LWS debuggingAurelien Jarno
The LWS debugging code on parisc is wrongly enabled due to a bug in the use of the preprocessor directives. This debugging code is not thread safe and causes problems with a recent glibc on SMP kernels. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2007-02-17[PARISC] add ASM_EXCEPTIONTABLE_ENTRY() macroHelge Deller
- this macro unifies the code to add exception table entries - additionally use ENTRY()/ENDPROC() at more places Signed-off-by: Helge Deller <deller@gmx.de> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2007-02-17[PARISC] more ENTRY(), ENDPROC(), END() conversionsHelge Deller
Signed-off-by: Helge Deller <deller@gmx.de> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2006-10-04Remove all inclusions of <linux/config.h>Dave Jones
kbuild explicitly includes this at build time. Signed-off-by: Dave Jones <davej@redhat.com>
2006-06-27[PARISC] Remove unused macro fixup_branch in syscall.SKyle McMartin
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2006-06-27[PARISC] Ensure all ldcw uses are ldcw,co on pa2.0Kyle McMartin
ldcw,co should always be used on pa2.0, otherwise the strict cache width alignment requirement is not relaxed. Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2006-04-21[PARISC] Further work for multiple page sizesHelge Deller
More work towards supporing multiple page sizes on 64-bit. Convert some assumptions that 64bit uses 3 level page tables into testing PT_NLEVELS. Also some BUG() to BUG_ON() conversions and some cleanups to assembler. Signed-off-by: Helge Deller <deller@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2006-01-22[PARISC] Add CONFIG_DEBUG_RODATA to protect read-only dataHelge Deller
Add the parisc version of the "mark rodata section read only" patches. Based on code from and Signed-off-by Arjan van de Ven <arjan@infradead.org>, Ingo Molnar <mingo@elte.hu>, Andi Kleen <ak@muc.de>, Andrew Morton <akpm@osdl.org>, Linus Torvalds <torvalds@osdl.org>. Signed-off-by: Helge Deller <deller@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-11-17[PARISC] Document some register usages in assembly filesCarlos O'Donell
Document clobbers and args in entry.S and syscall.S. entry.S: Add comment to indicate that cr27 may recycle and EDEADLOCK detection is not 100% correct. Since this is only enabled when using ENABLE_LWS_DEBUG, the user is warned by the comment. Signed-off-by: Carlos O'Donell <carlos@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-10-21[PARISC] Replace uses of __LP64__ with CONFIG_64BITGrant Grundler
2.6.12-rc4-pa3 s/__LP64__/CONFIG_64BIT/ and fixup config.h usage Signed-off-by: Grant Grundler <grundler@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-09-09kbuild: m68k,parisc,ppc,ppc64,s390,xtensa use generic asm-offsets.h supportSam Ravnborg
Delete obsoleted parts form arch makefiles and rename to asm-offsets.h Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2005-04-16Linux-2.6.12-rc2v2.6.12-rc2Linus Torvalds
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!