summaryrefslogtreecommitdiffstats
path: root/arch/parisc/kernel/entry.S
Commit message (Collapse)AuthorAgeFilesLines
* scripts/spelling.txt: add regsiter -> register spelling mistakeStephen Boyd2017-05-081-1/+1
| | | | | | | | | | This typo is quite common. Fix it and add it to the spelling file so that checkpatch catches it earlier. Link: http://lkml.kernel.org/r/20170317011131.6881-2-sboyd@codeaurora.org Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* parisc: Re-enable interrupts earlyHelge Deller2016-12-121-9/+3
| | | | | | | | | | | | | Since kernel 3.9 we re-enable interrupts quite late due to commit c207a76bf15 ("parisc: only re-enable interrupts if we need to schedule or deliver signals when returning to userspace"). At that time the parisc kernel had no dedicated IRQ stack, and this commit prevented kernel stack overflows. But since commit 200c880420a ("parisc: implement irq stacks") we now have an IRQ stack, so we may be safe now. And when CONFIG_DEBUG_STACKOVERFLOW=y is enabled, we can even check at runtime for overflows. Signed-off-by: Helge Deller <deller@gmx.de>
* parisc: Add cfi_startproc and cfi_endproc to assembly codeHelge Deller2016-10-051-22/+24
| | | | | | | Add ENTRY_CFI() and ENDPROC_CFI() macros for dwarf debug info and convert assembly users to new macros. Signed-off-by: Helge Deller <deller@gmx.de>
* parisc: Use long jump to reach ftrace_return_to_handler()Helge Deller2016-05-231-1/+10
| | | | | | | | Depending on config options we will need to use a long jump to reach ftrace_return_to_handler(). Additionally only compile the parisc_return_to_handler code when CONFIG_FUNCTION_GRAPH_TRACER is set. Signed-off-by: Helge Deller <deller@gmx.de>
* parisc: Merge ftrace C-helper and assembler functions into .text.hot sectionHelge Deller2016-05-221-1/+1
| | | | | | | | | | | When enabling all-branch ftrace support (CONFIG_PROFILE_ALL_BRANCHES) the kernel gets really huge and some ftrace assembler functions like mcount can't reach the ftrace helper functions which are written in C. Avoid this problem of too distant branches by moving the ftrace C-helper functions into the .text.hot section which is put in front of the standard .text section by the linker. Signed-off-by: Helge Deller <deller@gmx.de>
* parisc: Fix ftrace function tracerHelge Deller2016-04-141-19/+74
| | | | | | | | | | Fix the FTRACE function tracer for 32- and 64-bit kernel. The former code was horribly broken. Reimplement most coding in assembly and utilize optimizations, e.g. put mcount() and ftrace_stub() into one L1 cacheline. Signed-off-by: Helge Deller <deller@gmx.de>
* parisc: Add Huge Page and HUGETLBFS supportHelge Deller2015-11-221-14/+31
| | | | | | | | | | | | | | | | This patch adds huge page support to allow userspace to allocate huge pages and to use hugetlbfs filesystem on 32- and 64-bit Linux kernels. A later patch will add kernel support to map kernel text and data on huge pages. The only requirement is, that the kernel needs to be compiled for a PA8X00 CPU (PA2.0 architecture). Older PA1.X CPUs do not support variable page sizes. 64bit Kernels are compiled for PA2.0 by default. Technically on parisc multiple physical huge pages may be needed to emulate standard 2MB huge pages. Signed-off-by: Helge Deller <deller@gmx.de>
* parisc: Initialize the fault vector earlier in the boot process.Helge Deller2015-11-221-8/+3
| | | | | | | | | | | | | | | | A fault vector on parisc needs to be 2K aligned. Furthermore the checksum of the fault vector needs to sum up to 0 which is being calculated and written at runtime. Up to now we aligned both PA20 and PA11 fault vectors on the same 4K page in order to easily write the checksum after having mapped the kernel read-only (by mapping this page only as read-write). But when we want to map the kernel text and data on huge pages this makes things harder. So, simplify it by aligning both fault vectors on 2K boundries and write the checksum before we map the page read-only. Signed-off-by: Helge Deller <deller@gmx.de>
* parisc: Fix some PTE/TLB race conditions and optimize __flush_tlb_range ↵John David Anglin2015-07-101-84/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | based on timing results The increased use of pdtlb/pitlb instructions seemed to increase the frequency of random segmentation faults building packages. Further, we had a number of cases where TLB inserts would repeatedly fail and all forward progress would stop. The Haskell ghc package caused a lot of trouble in this area. The final indication of a race in pte handling was this syslog entry on sibaris (C8000): swap_free: Unused swap offset entry 00000004 BUG: Bad page map in process mysqld pte:00000100 pmd:019bbec5 addr:00000000ec464000 vm_flags:00100073 anon_vma:0000000221023828 mapping: (null) index:ec464 CPU: 1 PID: 9176 Comm: mysqld Not tainted 4.0.0-2-parisc64-smp #1 Debian 4.0.5-1 Backtrace: [<0000000040173eb0>] show_stack+0x20/0x38 [<0000000040444424>] dump_stack+0x9c/0x110 [<00000000402a0d38>] print_bad_pte+0x1a8/0x278 [<00000000402a28b8>] unmap_single_vma+0x3d8/0x770 [<00000000402a4090>] zap_page_range+0xf0/0x198 [<00000000402ba2a4>] SyS_madvise+0x404/0x8c0 Note that the pte value is 0 except for the accessed bit 0x100. This bit shouldn't be set without the present bit. It should be noted that the madvise system call is probably a trigger for many of the random segmentation faults. In looking at the kernel code, I found the following problems: 1) The pte_clear define didn't take TLB lock when clearing a pte. 2) We didn't test pte present bit inside lock in exception support. 3) The pte and tlb locks needed to merged in order to ensure consistency between page table and TLB. This also has the effect of serializing TLB broadcasts on SMP systems. The attached change implements the above and a few other tweaks to try to improve performance. Based on the timing code, TLB purges are very slow (e.g., ~ 209 cycles per page on rp3440). Thus, I think it beneficial to test the split_tlb variable to avoid duplicate purges. Probably, all PA 2.0 machines have combined TLBs. I dropped using __flush_tlb_range in flush_tlb_mm as I realized all applications and most threads have a stack size that is too large to make this useful. I added some comments to this effect. Since implementing 1 through 3, I haven't had any random segmentation faults on mx3210 (rp3440) in about one week of building code and running as a Debian buildd. Signed-off-by: John David Anglin <dave.anglin@bell.net> Cc: stable@vger.kernel.org # v3.18+ Signed-off-by: Helge Deller <deller@gmx.de>
* parisc: expose number of page table levels on Kconfig levelKirill A. Shutemov2015-04-141-2/+2
| | | | | | | | | | | | We would want to use number of page table level to define mm_struct. Let's expose it as CONFIG_PGTABLE_LEVELS. Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: "James E.J. Bottomley" <jejb@parisc-linux.org> Cc: Helge Deller <deller@gmx.de> Tested-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* parisc: hpux - Remove hpux gateway pageHelge Deller2015-02-161-20/+0
| | | | | | Drop code to create HP-UX gateway page and syscall entry code. Signed-off-by: Helge Deller <deller@gmx.de>
* parisc: make interrupt and interruption stack allocation reentrantJohn David Anglin2013-05-241-9/+10
| | | | | | | | | | | | | | | | | | | | | | | | | The get_stack_use_cr30 and get_stack_use_r30 macros allocate a stack frame for external interrupts and interruptions requiring a stack frame. They are currently not reentrant in that they save register context before the stack is set or adjusted. I have observed a number of system crashes where there was clear evidence of stack corruption during interrupt processing, and as a result register corruption. Some interruptions can still occur during interruption processing, however external interrupts are disabled and data TLB misses don't occur for absolute accesses. So, it's not entirely clear what triggers this issue. Also, if an interruption occurs when Q=0, it is generally not possible to recover as the shadowed registers are not copied. The attached patch reworks the get_stack_use_cr30 and get_stack_use_r30 macros to allocate stack before doing register saves. The new code is a couple of instructions shorter than the old implementation. Thus, it's an improvement even if it doesn't fully resolve the stack corruption issue. Based on limited testing, it improves SMP system stability. Signed-off-by: John David Anglin <dave.anglin@bell.net> Signed-off-by: Helge Deller <deller@gmx.de>
* parisc: fix SMP races when updating PTE and TLB entries in entry.SJohn David Anglin2013-05-111-72/+83
| | | | | | | | | | | | | Currently, race conditions exist in the handling of TLB interruptions in entry.S. In particular, dirty bit updates can be lost if an accessed interruption occurs just after the dirty bit interruption on a different cpu. Lost dirty bit updates result in user pages not being flushed and general system instability. This change adds lock and unlock macros to synchronize all PTE and TLB updates done in entry.S. As a result, userspace stability is significantly improved. Signed-off-by: John David Anglin <dave.anglin@bell.net> Signed-off-by: Helge Deller <deller@gmx.de>
* parisc: implement irq stacksHelge Deller2013-05-071-0/+41
| | | | | | | | | | | | | | | | Default kernel stack size on parisc is 16k. During tests we found that the kernel stack can easily grow beyond 13k, which leaves 3k left for irq processing. This patch adds the possibility to activate an additional stack of 16k per CPU which is being used during irq processing. This implementation does not yet uses this irq stack for the irq bh handler. The assembler code for call_on_stack was heavily cleaned up by John David Anglin. CC: John David Anglin <dave.anglin@bell.net> Signed-off-by: Helge Deller <deller@gmx.de>
* parisc: only re-enable interrupts if we need to schedule or deliver signals ↵John David Anglin2013-05-071-5/+9
| | | | | | | | | | | | | | | | | | | | | when returning to userspace Helge and I have found that we have a kernel stack overflow problem which causes a variety of random failures. Currently, we re-enable interrupts when returning from an external interrupt incase we need to schedule or delivery signals. As a result, a potentially unlimited number of interrupts can occur while we are running on the kernel stack. It is very limited in space (currently, 16k). This change defers enabling interrupts until we have actually decided to schedule or delivery signals. This only occurs when we about to return to userspace. This limits the number of interrupts on the kernel stack to one. In other cases, interrupts remain disabled until the final return from interrupt (rfi). Signed-off-by: John David Anglin <dave.anglin@bell.net> Signed-off-by: Helge Deller <deller@gmx.de>
* parisc: use long branch in fork_like macroJohn David Anglin2013-05-061-1/+2
| | | | | | | | | | | The "b" branch instruction used in the fork_like macro only can handle 17-bit pc-relative offsets. This fails with an out of range offset with some .config files. Rewrite to use the "be" instruction which can branch to any address in a space. Signed-off-by: John David Anglin <dave.anglin@bell.net> Signed-off-by: Helge Deller <deller@gmx.de>
* parisc: fix partly 16/64k PAGE_SIZE bootHelge Deller2013-05-061-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Merge branch 'for-linus' of ↵Linus Torvalds2013-02-231-38/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal Pull signal handling cleanups from Al Viro: "This is the first pile; another one will come a bit later and will contain SYSCALL_DEFINE-related patches. - a bunch of signal-related syscalls (both native and compat) unified. - a bunch of compat syscalls switched to COMPAT_SYSCALL_DEFINE (fixing several potential problems with missing argument validation, while we are at it) - a lot of now-pointless wrappers killed - a couple of architectures (cris and hexagon) forgot to save altstack settings into sigframe, even though they used the (uninitialized) values in sigreturn; fixed. - microblaze fixes for delivery of multiple signals arriving at once - saner set of helpers for signal delivery introduced, several architectures switched to using those." * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal: (143 commits) x86: convert to ksignal sparc: convert to ksignal arm: switch to struct ksignal * passing alpha: pass k_sigaction and siginfo_t using ksignal pointer burying unused conditionals make do_sigaltstack() static arm64: switch to generic old sigaction() (compat-only) arm64: switch to generic compat rt_sigaction() arm64: switch compat to generic old sigsuspend arm64: switch to generic compat rt_sigqueueinfo() arm64: switch to generic compat rt_sigpending() arm64: switch to generic compat rt_sigprocmask() arm64: switch to generic sigaltstack sparc: switch to generic old sigsuspend sparc: COMPAT_SYSCALL_DEFINE does all sign-extension as well as SYSCALL_DEFINE sparc: kill sign-extending wrappers for native syscalls kill sparc32_open() sparc: switch to use of generic old sigaction sparc: switch sys_compat_rt_sigaction() to COMPAT_SYSCALL_DEFINE mips: switch to generic sys_fork() and sys_clone() ...
| * parisc: switch to generic sigaltstackAl Viro2013-02-031-38/+0
| | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* | parisc: Fix comment describing setup of access rights in entry.SJohn David Anglin2013-02-201-2/+2
| | | | | | | | | | | | | | This comment describes incredibly subtle code, so it should be right! Signed-off-by: John David Anglin <dave.anglin@bell.net> Signed-off-by: Helge Deller <deller@gmx.de>
* | parisc: improve ptrace support for gdb single-stepJohn David Anglin2013-01-071-5/+13
|/ | | | | | | | | | | | | | | | | | | | Various GCC tests use gdb to simulate a multithreaded application. Many of these tests have been failing on parisc linux. GCC does this by using gdb to single-step the application, then gdb is used to call other test specific code. Where this fails is when the application is stepped into the delay slot of a taken branch. This sets the PSW B bit. When the test specific code is executed, this usually clears the PSW B bit. Currently, gdb is not allowed to set the B bit. So, the code falls through what should be a taken branch. The attached patch adds the PSW B bit to the set of bits that gdb is allowed to set. In order to set the B bit, the trace system call must return using an interrupt restore. The patch also modifies this code to use the saved IAOQ values when they are saved by a ptrace syscall or interruption. Signed-off-by: John David Anglin <dave.anglin@bell.net> Signed-off-by: Helge Deller <deller@gmx.de>
* parisc: switch to generic fork/vfork/cloneAl Viro2012-11-281-30/+8
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* parisc: switch to saner kernel_execve() semanticsAl Viro2012-10-211-19/+3
| | | | | ACKed-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* parisc: optimizations in copy_thread() and friendsAl Viro2012-10-141-67/+19
| | | | | | | | | | | | | | | | | | | | | | * in user thread case the registers had been copied as part of task_struct already; no need to do it in copy_thread(). * no need to store kernel stack pointer into regs->r21; we know its offset anyway. * no need to clobber r3 in sys_fork_wrapper and friends - r28 will do just as well and *it* will be overwritten anyway. * no need to mess with storing the return address for child - it should just use syscall_exit. * no need to bother with separate stack frame for sys_clone() - just branch there and be done with that. * no need to bother with wrapper_exit - we need it only on the child_return, so let's just do it there. * use the same ksp for kernel threads and userland ones, while we are at it, and let ret_from_kernel_execve() go through the normal syscall_exit. More straightforward is better here... [fixes from jejb folded] Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* parisc: switch to generic sys_execve()Al Viro2012-10-141-46/+0
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* parisc: switch to generic kernel_execve()Al Viro2012-10-141-22/+6
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* parisc: switch to generic kernel_thread()Al Viro2012-10-141-52/+1
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* TIF_RESTORE_SIGMASK can be set only when TIF_SIGPENDING is setAl Viro2012-06-011-2/+2
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* Merge branch 'for-linus' of ↵Linus Torvalds2012-05-311-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal Pull second pile of signal handling patches from Al Viro: "This one is just task_work_add() series + remaining prereqs for it. There probably will be another pull request from that tree this cycle - at least for helpers, to get them out of the way for per-arch fixes remaining in the tree." Fix trivial conflict in kernel/irq/manage.c: the merge of Andrew's pile had brought in commit 97fd75b7b8e0 ("kernel/irq/manage.c: use the pr_foo() infrastructure to prefix printks") which changed one of the pr_err() calls that this merge moves around. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal: keys: kill task_struct->replacement_session_keyring keys: kill the dummy key_replace_session_keyring() keys: change keyctl_session_to_parent() to use task_work_add() genirq: reimplement exit_irq_thread() hook via task_work_add() task_work_add: generic process-context callbacks avr32: missed _TIF_NOTIFY_RESUME on one of do_notify_resume callers parisc: need to check NOTIFY_RESUME when exiting from syscall move key_repace_session_keyring() into tracehook_notify_resume() TIF_NOTIFY_RESUME is defined on all targets now
| * parisc: need to check NOTIFY_RESUME when exiting from syscallAl Viro2012-05-231-1/+1
| | | | | | | | | | | | ... not just on return from interrupt Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* | [PARISC] fix TLB fault path on PA2.0 narrow systemsJames Bottomley2012-05-251-13/+17
|/ | | | | | | | | | | | | | | | | | commit 5e185581d7c46ddd33cd9c01106d1fc86efb9376 Author: James Bottomley <JBottomley@Parallels.com> [PARISC] fix PA1.1 oops on boot Didn't quite fix the crash on boot. It moved it from PA1.1 processors to PA2.0 narrow kernels. The final fix is to make sure the [id]tlb_miss_20 paths also work. Even on narrow systems, these paths require using the wide instructions becuase the tlb insertion format is wide. Fix this by conditioning the dep[wd],z on whether we're being called from _11 or _20[w] paths. Tested-by: Helge Deller <deller@gmx.de> Cc: stable@vger.kernel.org Signed-off-by: James Bottomley <JBottomley@Parallels.com>
* [PARISC] fix PA1.1 oops on bootJames Bottomley2012-05-161-0/+4
| | | | | | | | | | | | | | | | All PA1.1 systems have been oopsing on boot since commit f311847c2fcebd81912e2f0caf8a461dec28db41 Author: James Bottomley <James.Bottomley@HansenPartnership.com> Date: Wed Dec 22 10:22:11 2010 -0600 parisc: flush pages through tmpalias space because a PA2.0 instruction was accidentally introduced into the PA1.1 TLB insertion interruption path when it was consolidated with the do_alias macro. Fix the do_alias macro only to use PA2.0 instructions if compiled for 64 bit. Cc: stable@vger.kernel.org #2.6.39+ Signed-off-by: James Bottomley <JBottomley@Parallels.com>
* [PARISC] only make executable areas executableJames Bottomley2011-04-151-0/+3
| | | | | | | | | | | | | | | | | | Currently parisc has the whole kernel marked as RWX, meaning any kernel page at all is eligible to be executed. This can cause a theoretical problem on systems with combined I/D TLB because the act of referencing a page causes a TLB insertion with an executable bit. This TLB entry may be used by the CPU as the basis for speculating the page into the I-Cache. If this speculated page is subsequently used for a user process, there is the possibility we will get a stale I-cache line picked up as the binary executes. As a point of good practise, only mark actual kernel text pages as executable. The same has to be done for init_text pages, but they're converted to data pages (and the I-Cache flushed) when the init memory is released. Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* Fix common misspellingsLucas De Marchi2011-03-311-5/+5
| | | | | | Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
* eliminate special FLUSH flag from page tableJames Bottomley2011-01-151-58/+3
| | | | | | | | | This was used to flush a region even if the page table entry had been cleared. In theory this was never necessary, but now we've switched to alias based flushing, the whole set of code associated with it can be dumped. Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* parisc: flush pages through tmpalias spaceJames Bottomley2011-01-151-52/+142
| | | | | | | | | | | | | | | | | | | The kernel has an 8M tmpailas space (originally designed for copying and clearing pages but now only used for clearing). The idea is to place zeros into the cache above a physical page rather than into the physical page and flush the cache, because often the zeros end up being replaced quickly anyway. We can also use the tmpalias space for flushing a page. The difference here is that we have to do tmpalias processing in the non access data and instruction traps. The principle is the same: as long as we know the physical address and have a virtual address congruent to the real one, the flush will be effective. In order to use the tmpalias space, the icache miss path has to be enhanced to check for the alias region to make the fic instruction effective. Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* parisc: Remove unnecessary macros from entry.SJohn David Anglin2010-05-301-33/+7
| | | | | | | | | | | The EXTR, DEP and DEPI macros are unnecessary. There are PA 1.X pneumonics available with the same functionality, and the DEP and DEPI macros conflict with assembler pneumonics. Tested on a variety of 32 and 64-bit systems. Signed-off-by: John David Anglin <dave.anglin@nrc-cnrc.gc.ca> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
* parisc: Delete unnecessary nop's in entry.SJohn David Anglin2010-05-301-7/+0
| | | | | Signed-off-by: John David Anglin <dave.anglin@nrc-cnrc.gc.ca> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
* parisc: Avoid interruption in critical region in entry.SJohn David Anglin2010-05-301-2/+3
| | | | | Signed-off-by: John David Anglin <dave.anglin@nrc-cnrc.gc.ca> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
* parisc: stop using task->ptrace for {single,block}step flagsKyle McMartin2009-09-271-10/+11
| | | | | | | | task->ptrace flags belong to generic code, so instead thief some TIF_ bits to use. Somewhat risky conversion of code to test TASK_FLAGS instead of TASK_PTRACE in assembly, but it looks alright in the end. Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
* KEYS: Extend TIF_NOTIFY_RESUME to (almost) all architectures [try #6]David Howells2009-09-021-1/+1
| | | | | | | | | | | | | | | | | Implement TIF_NOTIFY_RESUME for most of those architectures in which isn't yet available, and, whilst we're at it, have it call the appropriate tracehook. After this patch, blackfin, m68k* and xtensa still lack support and need alteration of assembly code to make it work. Resume notification can then be used (by a later patch) to install a new session keyring on the parent of a process. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Russell King <rmk+kernel@arm.linux.org.uk> cc: linux-arch@vger.kernel.org Signed-off-by: James Morris <jmorris@namei.org>
* parisc: Set correct bit in protection flagsJohn David Anglin2009-08-021-1/+1
| | | | | Signed-off-by: John David Anglin <dave@hiauly1.hia.nrc.ca> Signed-off-by: Helge Deller <deller@gmx.de>
* parisc: add ftrace (function and graph tracer) functionalityHelge Deller2009-03-311-0/+27
| | | | | | | | | | This patch adds the ftrace debugging functionality to the parisc kernel. It will currently only work with 64bit kernels, because the gcc options -pg and -ffunction-sections can't be enabled at the same time and -ffunction-sections is still needed to be able to link 32bit kernels. Signed-off-by: Helge Deller <deller@gmx.de> Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
* parisc: allow to build with 16k default kernel page sizeHelge Deller2009-03-311-8/+17
| | | | | | | | | | Introduce new convert_for_tlb_insert20 macro and use it to replace assembler statements with hardcoded constants. This change allows the parisc64 kernel to boot with 16kb default kernel page size, aka CONFIG_PARISC_PAGE_SIZE_16KB=y. Signed-off-by: Helge Deller <deller@gmx.de> Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
* parisc: use constants instead of numbers in assemblyHelge Deller2009-03-311-4/+4
| | | | | | | | | | | | | | | A few small fixups: * _PAGE_SIZE_ENCODING_DEFAULT is wrong here, as one might assume that it's possible to define the page size that way. This is wrong. Use 0 instead. * use constants instead of hardcoded numerical values in depi and extru while building the PFN out of the pte entry * use SHRREG instead of extru (iitlba expects the PFN at bits {7..26}) Still wondering why we can use the same register (pte) as extru source and target register, but it seems to work on PA1.1 and PA2.0... Signed-off-by: Helge Deller <deller@gmx.de> Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
* parisc: add braces around arguments in assembler macrosHelge Deller2009-03-131-3/+3
| | | | | | | | Add braces around the macro arguments, else for example "shl %r1, 5-3, %r2" would not expand to what you would assume. Signed-off-by: Helge Deller <deller@gmx.de> Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
* Revert "parisc: fix trivial section name warnings"Kyle McMartin2008-06-131-2/+1
| | | | | | This reverts commit bd3bb8c15b9a80dbddfb7905b237a4a11a4725b4. Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
* parisc: use conditional macro for 64-bit wide opsKyle McMartin2008-05-151-27/+19
| | | | | | | This work enables us to remove -traditional from $AFLAGS on parisc. Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
* parisc: fix trivial section name warningsHelge Deller2008-05-151-1/+2
| | | | | | | | | | | | 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>
* [PARISC] Kill off broken irqstack codeKyle McMartin2007-10-181-34/+3
| | | | | | | It's been unfinished and broken long enough, and I have some ideas on how to do it more cleanly. Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>