From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756179AbdHYLFI (ORCPT ); Fri, 25 Aug 2017 07:05:08 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:40564 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754656AbdHYKyj (ORCPT ); Fri, 25 Aug 2017 06:54:39 -0400 Message-Id: <20170825104413.200412431@linutronix.de> User-Agent: quilt/0.63-1 Date: Fri, 25 Aug 2017 12:31:06 +0200 From: Thomas Gleixner To: LKML Cc: Ingo Molnar , Peter Anvin , Peter Zijlstra , Andy Lutomirski , Borislav Petkov , Steven Rostedt Subject: [patch 03/41] x86/irq: Move ifdeffery to header file References: <20170825103103.287814238@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Disposition: inline; filename=x86-irq--Move-ifdeffery-to-header-file.patch Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Having this in the middle of code is beyond ugly. Signed-off-by: Thomas Gleixner --- arch/x86/include/asm/desc.h | 5 +++++ arch/x86/kernel/irqinit.c | 3 --- 2 files changed, 5 insertions(+), 3 deletions(-) --- a/arch/x86/include/asm/desc.h +++ b/arch/x86/include/asm/desc.h @@ -482,7 +482,12 @@ static inline void _set_gate(int gate, u 0, 0, __KERNEL_CS); \ } while (0) +#ifdef CONFIG_X86_LOCAL_APIC extern int first_system_vector; +#else +#define first_system_vector NR_VECTORS +#endif + /* used_vectors is BITMAP for irq is not managed by percpu vector_irq */ extern unsigned long used_vectors[]; --- a/arch/x86/kernel/irqinit.c +++ b/arch/x86/kernel/irqinit.c @@ -169,9 +169,6 @@ void __init native_init_IRQ(void) * 'special' SMP interrupts) */ i = FIRST_EXTERNAL_VECTOR; -#ifndef CONFIG_X86_LOCAL_APIC -#define first_system_vector NR_VECTORS -#endif for_each_clear_bit_from(i, used_vectors, first_system_vector) { /* IA32_SYSCALL_VECTOR could be used in trap_init already. */ set_intr_gate(i, irq_entries_start +