- 17 8月, 2015 5 次提交
-
-
由 Max Filippov 提交于
In case perf IRQ is the highest of the medium-level IRQs, and is alone on its level, it may be treated as NMI: - LOCKLEVEL is defined to be one level less than EXCM level, - IRQ masking never lowers current IRQ level, - new fake exception cause code, EXCCAUSE_MAPPED_NMI is assigned to that IRQ; new second level exception handler, do_nmi, assigned to it handles it as NMI, - atomic operations in configurations without s32c1i still need to mask all interrupts. Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Acked-by: NPeter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com>
-
由 Max Filippov 提交于
There's no way _switch_to can produce double exceptions now, don't enter/leave EXC_TABLE_FIXUP critical section. Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com>
-
由 Max Filippov 提交于
call12 can't be safely used as the first call in the inline function, because the compiler does not extend the stack frame of the bounding function accordingly, which may result in corruption of local variables. If a call needs to be done, do call8 first followed by call12. For pure assembly code in _switch_to increase stack frame size of the bounding function. Cc: stable@vger.kernel.org Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com>
-
由 Max Filippov 提交于
entry.s only disables IRQs on hardware IRQ, move trace_hardirqs_off call into do_interrupt. Check actual intlevel that will be restored on return from exception handler to decide if trace_hardirqs_on should be called. Annotate IRQ on/off points in the TIF_* handling loop on return from exception handler. Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com>
-
由 Max Filippov 提交于
Restore original a0 in the kernel exception stack frame. This way it looks like the frame that got interrupt/exception did alloca (copy a0 and a1 spilled under old stack to the new location as well) to save registers and then did a call to handler. The point where interrupt/exception was taken is not in the stack chain, only in pt_regs (call4 from that address can be simulated to keep it in the stack trace). Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com>
-
- 15 7月, 2015 1 次提交
-
-
由 Max Filippov 提交于
Userspace return code may skip restoring THREADPTR register if there are no registers that need to be zeroed. This leads to spurious failures in libc NPTL tests. Always restore THREADPTR on return to userspace. Cc: stable@vger.kernel.org Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com>
-
- 14 8月, 2014 4 次提交
-
-
由 Max Filippov 提交于
These syscalls are not used by userspace tools for some time now, and they have issues when called with invalid arguments. It's not worth changing signal delivery mechanism as we don't expect any new users for these syscalls. Let's keep them for backwards compatibility under #ifdef, disabled by default. Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com>
-
由 Max Filippov 提交于
Remove restoring a6 on some return paths and instead modify and restore it in a single place, using symbolic name. Correctly restore a7 from PT_AREG7 in case of illegal a6 value. Cc: stable@vger.kernel.org Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com>
-
由 Max Filippov 提交于
Current definition of TLBTEMP_BASE_2 is always 32K above the TLBTEMP_BASE_1, whereas fast_second_level_miss handler for the TLBTEMP region analyzes virtual address bit (PAGE_SHIFT + DCACHE_ALIAS_ORDER) to determine TLBTEMP region where the fault happened. The size of the TLBTEMP region is also checked incorrectly: not 64K, but twice data cache way size (whicht may as well be less than the instruction cache way size). Fix TLBTEMP_BASE_2 to be TLBTEMP_BASE_1 + data cache way size. Provide TLBTEMP_SIZE that is a greater of doubled data cache way size or the instruction cache way size, and use it to determine if the second level TLB miss occured in the TLBTEMP region. Practical occurence of page faults in the TLBTEMP area is extremely rare, this code can be tested by deletion of all w[di]tlb instructions in the tlbtemp_mapping region. Cc: stable@vger.kernel.org Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com>
-
由 Max Filippov 提交于
With SMP and a lot of debug options enabled task_struct::thread gets out of reach of s32i/l32i instructions with base pointing at task_struct, breaking build with the following messages: arch/xtensa/kernel/entry.S: Assembler messages: arch/xtensa/kernel/entry.S:1002: Error: operand 3 of 'l32i.n' has invalid value '1048' arch/xtensa/kernel/entry.S:1831: Error: operand 3 of 's32i.n' has invalid value '1040' arch/xtensa/kernel/entry.S:1832: Error: operand 3 of 's32i.n' has invalid value '1044' Change base to point to task_struct::thread in such cases. Don't use a10 in _switch_to to save/restore prev pointer as a2 is not clobbered. Cc: stable@vger.kernel.org Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com>
-
- 29 1月, 2014 1 次提交
-
-
由 Chris Zankel 提交于
The original implementation could clobber registers under certain conditions. The Xtensa processor architecture uses windowed registers and the original implementation was using a4 as a temporary register, which under certain conditions could be register a0 of the oldest window frame, and didn't always restore the content correctly. By moving the _spill_registers routine inside the fast system call, it frees up one more register (the return address is not required anymore) for the spill routine. Signed-off-by: NChris Zankel <chris@zankel.net>
-
- 26 1月, 2014 2 次提交
-
-
由 Max Filippov 提交于
We need it saved because it contains a3 where we track which register windows we still need to spill, and fixup handler may call C exception handlers. Also fix comments. Cc: stable@vger.kernel.org Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com>
-
由 Max Filippov 提交于
Most in-kernel users want registers spilled on the kernel stack and don't require PS.EXCM to be set. That means that they don't need fixup routine and could reuse regular window overflow mechanism for that, which makes spill routine very simple. Cc: stable@vger.kernel.org Suggested-by: NChris Zankel <chris@zankel.net> Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com>
-
- 16 10月, 2013 1 次提交
-
-
由 Max Filippov 提交于
fast_syscall_spill_registers_fixup was not correctly updated by the 'keep a3 and excsave1 on entry to exception handlers' patch: it doesn't preserve a3 that it gets on entry, breaking _spill_registers in case of page fault on stack during register spilling, leading to unhandled exception in kernel mode. Preserve a3 by saving it in the original _spill_registers stack frame's a3 during exception handling and restoring it afterwards. Also fix comments and function bounds annotations. Reported-by: NBaruch Siach <baruch@tkos.co.il> Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com> Tested-by: NBaruch Siach <baruch@tkos.co.il> Signed-off-by: NChris Zankel <chris@zankel.net>
-
- 07 9月, 2013 4 次提交
-
-
由 Max Filippov 提交于
Instead of emulating movsp instruction in the kernel use window underflow handler to load missing register window and retry failed movsp. Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com> Signed-off-by: NChris Zankel <chris@zankel.net>
-
由 Max Filippov 提交于
Based on the SMP patch by Joe Taylor and subsequent fixes. Preserve exception table pointer (normally stored in excsave1 SR) as it cannot be easily restored in SMP environment. Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com> Signed-off-by: NChris Zankel <chris@zankel.net>
-
由 Max Filippov 提交于
Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com> Signed-off-by: NChris Zankel <chris@zankel.net>
-
由 Max Filippov 提交于
Check pending signals and rescheduling thread flags with interrupts disabled, and don't enable them if no flags are set. Call trace_hardirqs_on after thread flags handling, so that rescheduling is done and hardirqs tracking flag is updated in the correct task context. Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com> Signed-off-by: NChris Zankel <chris@zankel.net>
-
- 08 7月, 2013 1 次提交
-
-
由 Max Filippov 提交于
- check that user TLB mappings correspond to the current page table; - check that TLB mapping VPN is in the kernel/user address range in accordance with its ASID. Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com> Signed-off-by: NChris Zankel <chris@zankel.net>
-
- 21 5月, 2013 1 次提交
-
-
由 Max Filippov 提交于
Before _PAGE_WRITABLE_BIT test fast_store_prohibited must make sure that PTE is present. Otherwise 'writable' bit is undefined and may be reused in the 'file offset' or 'swap type' PTE fields. Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com> Signed-off-by: NChris Zankel <chris@zankel.net>
-
- 09 5月, 2013 2 次提交
-
-
由 Max Filippov 提交于
IRQ handlers are expected to run with IRQs disabled. See e.g. http://lwn.net/Articles/380931/ for a longer story. This was overlooked in the commit 2d1c645c xtensa: dispatch medium-priority interrupts Revert to old behavior and simplify interrupt entry and exit code. Interrupt handler still honours IRQ priority. do_notify_resume/schedule must be called with interrupts enabled, enable interrupts if we return from user exception. Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com> Signed-off-by: NChris Zankel <chris@zankel.net>
-
由 Max Filippov 提交于
Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com> Signed-off-by: NChris Zankel <chris@zankel.net>
-
- 24 2月, 2013 3 次提交
-
-
由 Chris Zankel 提交于
The Xtensa architecture provides a global register called THREADPTR for the purpose of Thread Local Storage (TLS) support. This allows us to use a fairly simple implementation, keeping the thread pointer in the regset and simply saving and restoring it upon entering/exiting the from user space. Signed-off-by: NChris Zankel <chris@zankel.net>
-
由 dann 提交于
Support call graph profiling. Keep upper two bits of PC unchanged through backtrace rather than take them from sp (a1). The stack pointer is usually in the same GB (same upper 2 bits) as PC, but technically doesn't always have to be (and might not in the future, when taking full advantage of MMU v3). Signed-off-by: NDan Nicolaescu <dann@xtensa-linux.org> Signed-off-by: NPete Delaney <piet@tensilica.com> Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com> Signed-off-by: NChris Zankel <chris@zankel.net>
-
由 Marc Gauthier 提交于
Add support for dispatching medium-priority interrupts, that is, interrupts of priority levels 2 to EXCM_LEVEL. IRQ handling may be preempted by higher priority IRQ. Signed-off-by: NMarc Gauthier <marc@tensilica.com> Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com> Signed-off-by: NChris Zankel <chris@zankel.net>
-
- 19 12月, 2012 3 次提交
-
-
由 Chris Zankel 提交于
Remove heading and trailing spaces, trim trailing lines, and wrap lines that are longer than 80 characters. Signed-off-by: NChris Zankel <chris@zankel.net>
-
由 Max Filippov 提交于
Although scompare1 may be saved/restored by xchal_ncp_{load,store} macros, explicit save/restore of registers manipulated by the kernel itself is considered more correct. Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com> Signed-off-by: NChris Zankel <chris@zankel.net>
-
由 Chris Zankel 提交于
Use ENDPROC() to mark the end of assembler functions. Signed-off-by: NChris Zankel <chris@zankel.net>
-
- 26 10月, 2012 2 次提交
-
-
由 Max Filippov 提交于
Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com> Signed-off-by: NChris Zankel <chris@zankel.net>
-
由 Max Filippov 提交于
Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com> Signed-off-by: NChris Zankel <chris@zankel.net>
-
- 20 10月, 2012 1 次提交
-
-
由 Chris Zankel 提交于
Fix two compiler warnings complaining about truncating a value on a 64-bit host, and about declaring an unused variable that is only used for a specific configuration. Signed-off-by: NChris Zankel <chris@zankel.net>
-
- 16 10月, 2012 1 次提交
-
-
由 Max Filippov 提交于
- reference SRs by names where possible, not by numbers; - get rid of __stringify around SR names where possible; - remove unneeded SR names from asm/regs.h; - add SREG_ prefix to remaining SR names; Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com> Signed-off-by: NChris Zankel <chris@zankel.net>
-
- 22 5月, 2012 2 次提交
-
-
由 Al Viro 提交于
Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
-
由 Al Viro 提交于
Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
-
- 31 3月, 2011 1 次提交
-
-
由 Lucas De Marchi 提交于
Fixes generated by 'codespell' and manually reviewed. Signed-off-by: NLucas De Marchi <lucas.demarchi@profusion.mobi>
-
- 02 5月, 2010 1 次提交
-
-
由 Chris Zankel 提交于
The linker script was including assembly macros from the coprocessor header file that is not otherwise used by the script. Signed-off-by: NChris Zankel <chris@zankel.net>
-
- 09 2月, 2010 1 次提交
-
-
由 Daniel Mack 提交于
In particular, several occurances of funny versions of 'success', 'unknown', 'therefore', 'acknowledge', 'argument', 'achieve', 'address', 'beginning', 'desirable', 'separate' and 'necessary' are fixed. Signed-off-by: NDaniel Mack <daniel@caiaq.de> Cc: Joe Perches <joe@perches.com> Cc: Junio C Hamano <gitster@pobox.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 03 4月, 2009 1 次提交
-
-
由 Johannes Weiner 提交于
Add support for !CONFIG_MMU setups. Signed-off-by: NJohannes Weiner <jw@emlix.com> Signed-off-by: NChris Zankel <chris@zankel.net>
-
- 07 11月, 2008 1 次提交
-
-
由 Chris Zankel 提交于
Move all header files for xtensa to arch/xtensa/include and platform and variant header files to the appropriate arch/xtensa/platforms/ and arch/xtensa/variants/ directories. Moving the files gets also rid of all uses of symlinks in the Makefile. This has been completed already for the majority of the architectures and xtensa is one out of six missing. Signed-off-by: NSam Ravnborg <sam@ravnborg.org> Signed-off-by: NChris Zankel <chris@zankel.net>
-
- 14 2月, 2008 1 次提交
-
-
由 Chris Zankel 提交于
For processor configurations that have optional registers (compiler-used but non-coprocessor), user space registers might get corrupted when there are only 4 registers in the current window-frame, ie. register a4 belongs to the oldest frame in the register file. Signed-off-by: NChris Zankel <chris@zankel.net>
-