From: Ingo Molnar Date: Wed, 15 Oct 2008 10:48:44 +0000 (+0200) Subject: Merge branches 'core/softlockup', 'core/softirq', 'core/resources', 'core/printk... X-Git-Tag: v2.6.28-rc1~271^2 X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?p=linux-2.6-omap-h63xx.git;a=commitdiff_plain;h=6b2ada82101a08e2830fb29d7dc9b858be637dd4 Merge branches 'core/softlockup', 'core/softirq', 'core/resources', 'core/printk' and 'core/misc' into core-v28-for-linus --- 6b2ada82101a08e2830fb29d7dc9b858be637dd4 diff --cc arch/x86/kernel/e820.c index 78e642feac3,66e48aa2dd1,9af89078f7b,477f4bb7e55,9af89078f7b,78e642feac3..ce97bf3bed1 --- a/arch/x86/kernel/e820.c +++ b/arch/x86/kernel/e820.c @@@@@@@ -1279,11 -1274,10 -1274,10 -1274,9 -1274,10 -1279,11 +1279,10 @@@@@@@ void __init e820_reserve_resources(void u64 end; res = alloc_bootmem_low(sizeof(struct resource) * e820.nr_map); ++++ e820_res = res; for (i = 0; i < e820.nr_map; i++) { end = e820.map[i].addr + e820.map[i].size - 1; --- --#ifndef CONFIG_RESOURCES_64BIT --- -- if (end > 0x100000000ULL) { +++ ++ if (end != (resource_size_t)end) { res++; continue; } diff --cc arch/x86/mm/ioremap.c index e4c43ec71b2,d4b6e6a29ae,d4b6e6a29ae,c818b45bd07,016f335bbee,e4c43ec71b2..ae71e11eb3e --- a/arch/x86/mm/ioremap.c +++ b/arch/x86/mm/ioremap.c @@@@@@@ -616,24 -546,18 -546,18 -552,18 -546,20 -616,24 +622,24 @@@@@@@ static inline void __init early_clear_f __early_set_fixmap(idx, 0, __pgprot(0)); } ---- ---- int __initdata early_ioremap_nested; ---- ++++ static void *prev_map[FIX_BTMAPS_SLOTS] __initdata; ++++ static unsigned long prev_size[FIX_BTMAPS_SLOTS] __initdata; static int __init check_early_ioremap_leak(void) { ---- if (!early_ioremap_nested) - return 0; ++++ int count = 0; ++++ int i; +++ - printk(KERN_WARNING ++++ for (i = 0; i < FIX_BTMAPS_SLOTS; i++) ++++ if (prev_map[i]) ++++ count++; ++++ ++++ if (!count) + return 0; + WARN(1, KERN_WARNING "Debug warning: early ioremap leak of %d areas detected.\n", --- early_ioremap_nested); - early_ioremap_nested); ++++ count); printk(KERN_WARNING - "please boot with early_ioremap_debug and report the dmesg.\n"); - WARN_ON(1); + "please boot with early_ioremap_debug and report the dmesg.\n"); return 1; } @@@@@@@ -729,29 -629,11 -629,11 -635,11 -631,11 -729,29 +735,29 @@@@@@@ void __init early_iounmap(void *addr, u unsigned long offset; unsigned int nrpages; enum fixed_addresses idx; ---- int nesting; ++++ int i, slot; ++ -- nesting = --early_ioremap_nested; -- if (WARN_ON(nesting < 0)) ++++ slot = -1; ++++ for (i = 0; i < FIX_BTMAPS_SLOTS; i++) { ++++ if (prev_map[i] == addr) { ++++ slot = i; ++++ break; ++++ } ++++ } ++++ ++++ if (slot < 0) { ++++ printk(KERN_INFO "early_iounmap(%p, %08lx) not found slot\n", ++++ addr, size); ++++ WARN_ON(1); ++ + return; ++++ } ++ -- nesting = --early_ioremap_nested; -- if (WARN_ON(nesting < 0)) ++++ if (prev_size[slot] != size) { ++++ printk(KERN_INFO "early_iounmap(%p, %08lx) [%d] size not consistent %08lx\n", ++++ addr, size, slot, prev_size[slot]); ++++ WARN_ON(1); + return; ++++ } if (early_ioremap_debug) { printk(KERN_INFO "early_iounmap(%p, %08lx) [%d]\n", addr, diff --cc drivers/pci/setup-bus.c index 3abbfad9dda,3abbfad9dda,1aad599816f,f250a90ee45,827c0a520e2,3abbfad9dda..d5e2106760f --- a/drivers/pci/setup-bus.c +++ b/drivers/pci/setup-bus.c @@@@@@@ -531,40 -531,40 -531,36 -530,36 -530,6 -531,40 +530,40 @@@@@@@ void __ref pci_bus_assign_resources(str } EXPORT_SYMBOL(pci_bus_assign_resources); + static void pci_bus_dump_res(struct pci_bus *bus) + { + int i; + + for (i = 0; i < PCI_BUS_NUM_RESOURCES; i++) { + struct resource *res = bus->resource[i]; + if (!res) + continue; + -- printk(KERN_INFO "bus: %02x index %x %s: [%llx, %llx]\n", bus->number, i, (res->flags & IORESOURCE_IO)? "io port":"mmio", res->start, res->end); +++ printk(KERN_INFO "bus: %02x index %x %s: [%llx, %llx]\n", +++ bus->number, i, +++ (res->flags & IORESOURCE_IO) ? "io port" : "mmio", +++ (unsigned long long) res->start, +++ (unsigned long long) res->end); + } + } + + static void pci_bus_dump_resources(struct pci_bus *bus) + { + struct pci_bus *b; + struct pci_dev *dev; + + + pci_bus_dump_res(bus); + + list_for_each_entry(dev, &bus->devices, bus_list) { + b = dev->subordinate; + if (!b) + continue; + + pci_bus_dump_resources(b); + } + } + void __init pci_assign_unassigned_resources(void) { diff --cc include/linux/ioport.h index ee9bcc6f32b,350033e8f4e,8d3b7a9afd1,01712cf1a38,22d2115458c,ee9bcc6f32b..e38b6aa2d40 --- a/include/linux/ioport.h +++ b/include/linux/ioport.h @@@@@@@ -108,11 -108,8 -108,8 -108,11 -108,7 -108,11 +108,11 @@@@@@@ extern struct resource iomem_resource extern int request_resource(struct resource *root, struct resource *new); extern int release_resource(struct resource *new); ++ + extern void reserve_region_with_split(struct resource *root, ++ + resource_size_t start, resource_size_t end, ++ + const char *name); extern int insert_resource(struct resource *parent, struct resource *new); + extern void insert_resource_expand_to_fit(struct resource *root, struct resource *new); extern int allocate_resource(struct resource *root, struct resource *new, resource_size_t size, resource_size_t min, resource_size_t max, resource_size_t align,