• Jan Beulich's avatar
    x86, asm: Fix CFI macro invocations to deal with shortcomings in gas · 3234282f
    Jan Beulich authored
    
    gas prior to (perhaps) 2.16.90 has problems with passing non-
    parenthesized expressions containing spaces to macros. Spaces, however,
    get inserted by cpp between any macro expanding to a number and a
    subsequent + or -. For the +, current x86 gas then removes the space
    again (future gas may not do so), but for the - the space gets retained
    and is then considered a separator between macro arguments.
    
    Fix the respective definitions for both the - and + cases, so that they
    neither contain spaces nor make cpp insert any (the latter by adding
    seemingly redundant parentheses).
    Signed-off-by: default avatarJan Beulich <jbeulich@novell.com>
    LKML-Reference: <4CBDBEBA020000780001E05A@vpn.id2.novell.com>
    Cc: Alexander van Heukelum <heukelum@fastmail.fm>
    Signed-off-by: default avatarH. Peter Anvin <hpa@linux.intel.com>
    3234282f
entry_arch.h 1.75 KB
/*
 * This file is designed to contain the BUILD_INTERRUPT specifications for
 * all of the extra named interrupt vectors used by the architecture.
 * Usually this is the Inter Process Interrupts (IPIs)
 */

/*
 * The following vectors are part of the Linux architecture, there
 * is no hardware IRQ pin equivalent for them, they are triggered
 * through the ICC by us (IPIs)
 */
#ifdef CONFIG_SMP
BUILD_INTERRUPT(reschedule_interrupt,RESCHEDULE_VECTOR)
BUILD_INTERRUPT(call_function_interrupt,CALL_FUNCTION_VECTOR)
BUILD_INTERRUPT(call_function_single_interrupt,CALL_FUNCTION_SINGLE_VECTOR)
BUILD_INTERRUPT(irq_move_cleanup_interrupt,IRQ_MOVE_CLEANUP_VECTOR)
BUILD_INTERRUPT(reboot_interrupt,REBOOT_VECTOR)

.irpc idx, "01234567"
BUILD_INTERRUPT3(invalidate_interrupt\idx,
		 (INVALIDATE_TLB_VECTOR_START)+\idx,
		 smp_invalidate_interrupt)
.endr
#endif

BUILD_INTERRUPT(x86_platform_ipi, X86_PLATFORM_IPI_VECTOR)

/*
 * every pentium local APIC has two 'local interrupts', with a
 * soft-definable vector attached to both interrupts, one of
 * which is a timer interrupt, the other one is error counter
 * overflow. Linux uses the local APIC timer interrupt to get
 * a much simpler SMP time architecture:
 */
#ifdef CONFIG_X86_LOCAL_APIC

BUILD_INTERRUPT(apic_timer_interrupt,LOCAL_TIMER_VECTOR)
BUILD_INTERRUPT(error_interrupt,ERROR_APIC_VECTOR)
BUILD_INTERRUPT(spurious_interrupt,SPURIOUS_APIC_VECTOR)

#ifdef CONFIG_PERF_EVENTS
BUILD_INTERRUPT(perf_pending_interrupt, LOCAL_PENDING_VECTOR)
#endif

#ifdef CONFIG_X86_THERMAL_VECTOR
BUILD_INTERRUPT(thermal_interrupt,THERMAL_APIC_VECTOR)
#endif

#ifdef CONFIG_X86_MCE_THRESHOLD
BUILD_INTERRUPT(threshold_interrupt,THRESHOLD_APIC_VECTOR)
#endif

#ifdef CONFIG_X86_MCE
BUILD_INTERRUPT(mce_self_interrupt,MCE_SELF_VECTOR)
#endif

#endif