Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 5 May 2010 02:07:35 +0000 (19:07 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 5 May 2010 02:07:35 +0000 (19:07 -0700)
* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-tip:
  powernow-k8: Fix frequency reporting
  x86: Fix parse_reservetop() build failure on certain configs
  x86: Fix NULL pointer access in irq_force_complete_move() for Xen guests
  x86: Fix 'reservetop=' functionality

arch/x86/include/asm/io.h
arch/x86/kernel/apic/io_apic.c
arch/x86/kernel/cpu/cpufreq/powernow-k8.c
arch/x86/mm/ioremap.c
arch/x86/mm/pgtable_32.c

index a1dcfa3ab17dd505c7400869463ed81adfcca91b..30a3e977612306033c9647487dde3298b31a4f73 100644 (file)
@@ -347,6 +347,7 @@ extern void __iomem *early_ioremap(resource_size_t phys_addr,
 extern void __iomem *early_memremap(resource_size_t phys_addr,
                                    unsigned long size);
 extern void early_iounmap(void __iomem *addr, unsigned long size);
+extern void fixup_early_ioremap(void);
 
 #define IO_SPACE_LIMIT 0xffff
 
index 127b8718abfb0abd389334865f0bf3159b8e0fa3..eb2789c3f7216a43eb4017e44fed32556a703918 100644 (file)
@@ -2545,6 +2545,9 @@ void irq_force_complete_move(int irq)
        struct irq_desc *desc = irq_to_desc(irq);
        struct irq_cfg *cfg = desc->chip_data;
 
+       if (!cfg)
+               return;
+
        __irq_complete_move(&desc, cfg->vector);
 }
 #else
index d360b56e9825e43e16b185b00746a016e806c1f5..b6215b9798e202dcd78a5e929427b20a2e4e0065 100644 (file)
@@ -929,7 +929,8 @@ static int fill_powernow_table_pstate(struct powernow_k8_data *data,
                powernow_table[i].index = index;
 
                /* Frequency may be rounded for these */
-               if (boot_cpu_data.x86 == 0x10 || boot_cpu_data.x86 == 0x11) {
+               if ((boot_cpu_data.x86 == 0x10 && boot_cpu_data.x86_model < 10)
+                                || boot_cpu_data.x86 == 0x11) {
                        powernow_table[i].frequency =
                                freq_from_fid_did(lo & 0x3f, (lo >> 6) & 7);
                } else
index 5eb1ba74a3a933e9c82f18773395a57c0954a3ed..12e4d2d3c1105e24990808cd898897bdefebb403 100644 (file)
@@ -448,6 +448,20 @@ static inline void __init early_clear_fixmap(enum fixed_addresses idx)
 static void __iomem *prev_map[FIX_BTMAPS_SLOTS] __initdata;
 static unsigned long prev_size[FIX_BTMAPS_SLOTS] __initdata;
 
+void __init fixup_early_ioremap(void)
+{
+       int i;
+
+       for (i = 0; i < FIX_BTMAPS_SLOTS; i++) {
+               if (prev_map[i]) {
+                       WARN_ON(1);
+                       break;
+               }
+       }
+
+       early_ioremap_init();
+}
+
 static int __init check_early_ioremap_leak(void)
 {
        int count = 0;
index 1a8faf09afed2135174396055cd1d82fc5bbfd8a..792854003ed339c742dbbeabaeff2f90e0f44a31 100644 (file)
@@ -18,6 +18,7 @@
 #include <asm/e820.h>
 #include <asm/tlb.h>
 #include <asm/tlbflush.h>
+#include <asm/io.h>
 
 unsigned int __VMALLOC_RESERVE = 128 << 20;
 
@@ -128,6 +129,7 @@ static int __init parse_reservetop(char *arg)
 
        address = memparse(arg, &arg);
        reserve_top_address(address);
+       fixup_early_ioremap();
        return 0;
 }
 early_param("reservetop", parse_reservetop);