Merge branch 'x86/cleanups' into x86/apic
authorIngo Molnar <mingo@kernel.org>
Fri, 15 Jun 2012 12:16:54 +0000 (14:16 +0200)
committerIngo Molnar <mingo@kernel.org>
Fri, 15 Jun 2012 12:17:01 +0000 (14:17 +0200)
Merge in the cleanups because a followup x86/apic change relies on them.

Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/include/asm/x86_init.h
arch/x86/kernel/apic/io_apic.c
arch/x86/kernel/early_printk.c
arch/x86/kernel/setup.c
arch/x86/kernel/x86_init.c
arch/x86/platform/uv/uv_irq.c

index c090af10ac7dcc7a6914c915562cc378cd188605..42d2ae18dab2b9f0195380e0c2a675fc3c18c746 100644 (file)
@@ -156,7 +156,6 @@ struct x86_cpuinit_ops {
 /**
  * struct x86_platform_ops - platform specific runtime functions
  * @calibrate_tsc:             calibrate TSC
- * @wallclock_init:            init the wallclock device
  * @get_wallclock:             get time from HW clock like RTC etc.
  * @set_wallclock:             set time back to HW clock
  * @is_untracked_pat_range     exclude from PAT logic
@@ -167,7 +166,6 @@ struct x86_cpuinit_ops {
  */
 struct x86_platform_ops {
        unsigned long (*calibrate_tsc)(void);
-       void (*wallclock_init)(void);
        unsigned long (*get_wallclock)(void);
        int (*set_wallclock)(unsigned long nowtime);
        void (*iommu_shutdown)(void);
index 0540f083f452e704a79c506a99548618a0528db5..7cbd397884f565f28c176ebf0f98ab400e7b99c7 100644 (file)
@@ -2293,6 +2293,7 @@ ioapic_set_affinity(struct irq_data *data, const struct cpumask *mask,
                /* Only the high 8 bits are valid. */
                dest = SET_APIC_LOGICAL_ID(dest);
                __target_IO_APIC_irq(irq, dest, data->chip_data);
+               ret = IRQ_SET_MASK_OK_NOCOPY;
        }
        raw_spin_unlock_irqrestore(&ioapic_lock, flags);
        return ret;
@@ -3118,7 +3119,7 @@ msi_set_affinity(struct irq_data *data, const struct cpumask *mask, bool force)
 
        __write_msi_msg(data->msi_desc, &msg);
 
-       return 0;
+       return IRQ_SET_MASK_OK_NOCOPY;
 }
 #endif /* CONFIG_SMP */
 
@@ -3240,7 +3241,7 @@ dmar_msi_set_affinity(struct irq_data *data, const struct cpumask *mask,
 
        dmar_msi_write(irq, &msg);
 
-       return 0;
+       return IRQ_SET_MASK_OK_NOCOPY;
 }
 
 #endif /* CONFIG_SMP */
@@ -3293,7 +3294,7 @@ static int hpet_msi_set_affinity(struct irq_data *data,
 
        hpet_msi_write(data->handler_data, &msg);
 
-       return 0;
+       return IRQ_SET_MASK_OK_NOCOPY;
 }
 
 #endif /* CONFIG_SMP */
@@ -3366,7 +3367,7 @@ ht_set_affinity(struct irq_data *data, const struct cpumask *mask, bool force)
                return -1;
 
        target_ht_irq(data->irq, dest, cfg->vector);
-       return 0;
+       return IRQ_SET_MASK_OK_NOCOPY;
 }
 
 #endif
index 9b9f18b4991849f7cc1923441bea2d5f5359886c..5e4771266f1a966e8c7cde35ab694ec551c61e7d 100644 (file)
@@ -119,7 +119,7 @@ static __init void early_serial_init(char *s)
        unsigned char c;
        unsigned divisor;
        unsigned baud = DEFAULT_BAUD;
-       char *e;
+       ssize_t ret;
 
        if (*s == ',')
                ++s;
@@ -127,14 +127,14 @@ static __init void early_serial_init(char *s)
        if (*s) {
                unsigned port;
                if (!strncmp(s, "0x", 2)) {
-                       early_serial_base = simple_strtoul(s, &e, 16);
+                       ret = kstrtoint(s, 16, &early_serial_base);
                } else {
                        static const int __initconst bases[] = { 0x3f8, 0x2f8 };
 
                        if (!strncmp(s, "ttyS", 4))
                                s += 4;
-                       port = simple_strtoul(s, &e, 10);
-                       if (port > 1 || s == e)
+                       ret = kstrtouint(s, 10, &port);
+                       if (ret || port > 1)
                                port = 0;
                        early_serial_base = bases[port];
                }
@@ -149,8 +149,8 @@ static __init void early_serial_init(char *s)
        outb(0x3, early_serial_base + MCR);     /* DTR + RTS */
 
        if (*s) {
-               baud = simple_strtoul(s, &e, 0);
-               if (baud == 0 || s == e)
+               ret = kstrtouint(s, 0, &baud);
+               if (ret || baud == 0)
                        baud = DEFAULT_BAUD;
        }
 
index 16be6dc14db1b67c108475466ee494312e82d665..f4b9b80e1b95e2a9d0341fd62ed4412949b52243 100644 (file)
@@ -1031,8 +1031,6 @@ void __init setup_arch(char **cmdline_p)
 
        x86_init.timers.wallclock_init();
 
-       x86_platform.wallclock_init();
-
        mcheck_init();
 
        arch_init_ideal_nops();
index 35c5e543f55023f32b1316e08ce0d405e671e095..9f3167e891ef4af9f92c57ac8092790412906ee3 100644 (file)
@@ -29,7 +29,6 @@ void __init x86_init_uint_noop(unsigned int unused) { }
 void __init x86_init_pgd_noop(pgd_t *unused) { }
 int __init iommu_init_noop(void) { return 0; }
 void iommu_shutdown_noop(void) { }
-void wallclock_init_noop(void) { }
 
 /*
  * The platform setup functions are preset with the default functions
@@ -101,7 +100,6 @@ static int default_i8042_detect(void) { return 1; };
 
 struct x86_platform_ops x86_platform = {
        .calibrate_tsc                  = native_calibrate_tsc,
-       .wallclock_init                 = wallclock_init_noop,
        .get_wallclock                  = mach_get_cmos_time,
        .set_wallclock                  = mach_set_rtc_mmss,
        .iommu_shutdown                 = iommu_shutdown_noop,
index a67c7a6bac7e538678cbebc94bbc7756482713c6..acf7752da952f52cc43b56f5133f4d8fe97e56e4 100644 (file)
@@ -227,7 +227,7 @@ uv_set_irq_affinity(struct irq_data *data, const struct cpumask *mask,
        if (cfg->move_in_progress)
                send_cleanup_vector(cfg);
 
-       return 0;
+       return IRQ_SET_MASK_OK_NOCOPY;
 }
 
 /*