Commit 2cc12e2e authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 cleanups from Ingo Molnar:
 "A handful of small cleanups"

* 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/irq: Remove a redundant #ifdef directive
  x86/smp: Remove the redundant #ifdef CONFIG_SMP directive
  x86/smp: Reduce code duplication
  x86/pci-calgary: Use setup_timer() instead of open coding it.
parents 66acd7fc 0ccecd95
...@@ -149,6 +149,19 @@ void smp_store_cpu_info(int id); ...@@ -149,6 +149,19 @@ void smp_store_cpu_info(int id);
#define cpu_physical_id(cpu) per_cpu(x86_cpu_to_apicid, cpu) #define cpu_physical_id(cpu) per_cpu(x86_cpu_to_apicid, cpu)
#define cpu_acpi_id(cpu) per_cpu(x86_cpu_to_acpiid, cpu) #define cpu_acpi_id(cpu) per_cpu(x86_cpu_to_acpiid, cpu)
/*
* This function is needed by all SMP systems. It must _always_ be valid
* from the initial startup. We map APIC_BASE very early in page_setup(),
* so this is correct in the x86 case.
*/
#define raw_smp_processor_id() (this_cpu_read(cpu_number))
#ifdef CONFIG_X86_32
extern int safe_smp_processor_id(void);
#else
# define safe_smp_processor_id() smp_processor_id()
#endif
#else /* !CONFIG_SMP */ #else /* !CONFIG_SMP */
#define wbinvd_on_cpu(cpu) wbinvd() #define wbinvd_on_cpu(cpu) wbinvd()
static inline int wbinvd_on_all_cpus(void) static inline int wbinvd_on_all_cpus(void)
...@@ -161,22 +174,6 @@ static inline int wbinvd_on_all_cpus(void) ...@@ -161,22 +174,6 @@ static inline int wbinvd_on_all_cpus(void)
extern unsigned disabled_cpus; extern unsigned disabled_cpus;
#ifdef CONFIG_X86_32_SMP
/*
* This function is needed by all SMP systems. It must _always_ be valid
* from the initial startup. We map APIC_BASE very early in page_setup(),
* so this is correct in the x86 case.
*/
#define raw_smp_processor_id() (this_cpu_read(cpu_number))
extern int safe_smp_processor_id(void);
#elif defined(CONFIG_X86_64_SMP)
#define raw_smp_processor_id() (this_cpu_read(cpu_number))
#define safe_smp_processor_id() smp_processor_id()
#endif
#ifdef CONFIG_X86_LOCAL_APIC #ifdef CONFIG_X86_LOCAL_APIC
#ifndef CONFIG_X86_64 #ifndef CONFIG_X86_64
...@@ -191,11 +188,7 @@ static inline int logical_smp_processor_id(void) ...@@ -191,11 +188,7 @@ static inline int logical_smp_processor_id(void)
extern int hard_smp_processor_id(void); extern int hard_smp_processor_id(void);
#else /* CONFIG_X86_LOCAL_APIC */ #else /* CONFIG_X86_LOCAL_APIC */
#define hard_smp_processor_id() 0
# ifndef CONFIG_SMP
# define hard_smp_processor_id() 0
# endif
#endif /* CONFIG_X86_LOCAL_APIC */ #endif /* CONFIG_X86_LOCAL_APIC */
#ifdef CONFIG_DEBUG_NMI_SELFTEST #ifdef CONFIG_DEBUG_NMI_SELFTEST
......
...@@ -195,7 +195,5 @@ void __init native_init_IRQ(void) ...@@ -195,7 +195,5 @@ void __init native_init_IRQ(void)
if (!acpi_ioapic && !of_ioapic && nr_legacy_irqs()) if (!acpi_ioapic && !of_ioapic && nr_legacy_irqs())
setup_irq(2, &irq2); setup_irq(2, &irq2);
#ifdef CONFIG_X86_32
irq_ctx_init(smp_processor_id()); irq_ctx_init(smp_processor_id());
#endif
} }
...@@ -1007,9 +1007,8 @@ static void __init calgary_enable_translation(struct pci_dev *dev) ...@@ -1007,9 +1007,8 @@ static void __init calgary_enable_translation(struct pci_dev *dev)
writel(cpu_to_be32(val32), target); writel(cpu_to_be32(val32), target);
readl(target); /* flush */ readl(target); /* flush */
init_timer(&tbl->watchdog_timer); setup_timer(&tbl->watchdog_timer, &calgary_watchdog,
tbl->watchdog_timer.function = &calgary_watchdog; (unsigned long)dev);
tbl->watchdog_timer.data = (unsigned long)dev;
mod_timer(&tbl->watchdog_timer, jiffies); mod_timer(&tbl->watchdog_timer, jiffies);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment