aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/asm-x86/bug.h
Commit message (Collapse)AuthorAgeFilesLines
* x86: fix bug_line()Jan Beulich2013-10-141-2/+4
| | | | | | | | | | | Due to the packing into a bit field together with a relocated field, the computation can overflow when the relocated field ends up getting a negative value stored. Hence it isn't sufficient to correct the value by 1 in this case, but we also need to mask the result to the width of the original bit field. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* x86: mark BUG()s and assertion failures as terminal.Tim Deegan2013-09-191-3/+8
| | | | | | | | | This helps avoid static analysis false-positives, and might lead to better code density as the compiler knows it doesn't have to restore spilled state &c. Signed-off-by: Tim Deegan <tim@xen.org> Acked-by: Keir Fraser <keir@xen.org>
* xen/x86: don't use '.ifnes' in bug frame construction.Tim Deegan2013-08-301-6/+8
| | | | | | | | | | | | | | | Spotted because it breaks the clang build for LLVM <3.2. .ifnes is not right here as it will choke on a string with embedded quotes. .ifnb would be better except that LLVM <3.2 doesn't support that either (and nor does binutils 2.16). It should be possible to use something like !!msg or !!msg[0] instead of a separate flag, but I gave up trying to find something that would make it through CPP, asm() and gas as a usable constant. :| Signed-off-by: Tim Deegan <tim@xen.org> Acked-by: Jan Beulich <jbeulich@suse.com>
* x86: move struct bug_frame instances out of lineJan Beulich2013-08-231-29/+47
| | | | | | | | | | | | | | Just like Linux did many years ago, move them into a separate (data) section, such that they no longer pollute instruction caches and TLBs. Assertion frames, requiring two pointers to be stored, occupy two slots in the array, with the second slot mimicking a frame the location pointer of which doesn't match any address within .text or .init.text (it effectively points back to the slot itself, which - being in a data section - can't be reached by non-buggy execution). Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* xen: Remove x86_32 build target.Keir Fraser2012-09-121-4/+0
| | | | Signed-off-by: Keir Fraser <keir@xen.org>
* x86: Add another '&' to the function arg of run_in_exception_handler.Tim Deegan2011-03-071-1/+1
| | | | | | | This is needed to compile xen with clang. Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com> Acked-by: Keir Fraser <keir@xen.org>
* x86: revert 22983:0edb666c8300Tim Deegan2011-03-071-4/+5
| | | | | | run_in_exception_handler _does_ have other users. Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
* Xen: remove run_in_exception_handler() and recode its only callerTim Deegan2011-03-071-5/+4
| | | | | | | | | | (dump_execution_state()) as its own bug-trap. This is needed to compile xen with clang, which can't handle using a function name in an asm immediate. Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com> Acked-by: Keir Fraser <keir@xen.org>
* xen: stringify assertion condition for printing sooner.Keir Fraser2011-01-181-1/+1
| | | | | | | | | | | | | So that: (XEN) Assertion '!(((*({ unsigned long __ptr; __asm__ ("" : "=r"(__ptr) : "0"(&per_cpu____preempt_count)); (typeof(&per_cpu____preempt_count)) (__ptr + (get_cpu_info()->per_cpu_offset)); }))) || ((irq_stat[(((get_cpu_info()->processor_id)1... becomes: (XEN) Assertion '"!in_atomic()"' failed at softirq.c:61 Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
* x86: Generalise BUGFRAME_dump mechanism to allow polled UART irq toKeir Fraser2010-02-241-4/+5
| | | | | | get proper regs argument. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* x86: unify BUG() & Co, reduce overhead on x86-64Keir Fraser2009-03-311-0/+24
| | | | | | | | | | | | | Since it's only the string pointer representations that differ between i386 and x86-64, abstract out those and make everything else shared. While touching this code, also use - proper instructions rather than a mixture of such and raw .byte/ .long/.quad data emissions, - PC-relative pointers on x86-64 to cut the amount of storage (and in particular cache space) needed for string references by half. Signed-off-by: Jan Beulich <jbeulich@novell.com>
* Add WARN() and generic WARN_ON().kfraser@localhost.localdomain2007-03-271-3/+3
| | | | | | Based on a patch by Jan Beulich <jbeulich@novell.com> Signed-off-by: Keir Fraser <keir@xensource.com>
* x86: Better BUG() and ASSERT() logging.kfraser@localhost.localdomain2007-02-211-2/+10
| | | | Signed-off-by: Keir Fraser <keir@xensource.com>
* xen/x86: Better BUG back traces.kfraser@localhost.localdomain2007-02-201-0/+13
Signed-off-by: Keir Fraser <keir@xensource.com>