From 3a0704cbbd4ac21216fcab919c13e7b6fec56b99 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Thu, 27 Apr 2006 15:44:50 +0100 Subject: [PATCH] --- yaml --- r: 27054 b: refs/heads/master c: 477654fc5d5078d2213817609e68e8c968293261 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/arm/mm/mm-armv.c | 4 +- trunk/arch/mips/kernel/entry.S | 2 +- .../arch/powerpc/platforms/powermac/low_i2c.c | 12 --- trunk/drivers/base/power/suspend.c | 5 +- trunk/drivers/char/ipmi/ipmi_si_intf.c | 38 ++++---- trunk/drivers/char/tpm/tpm_bios.c | 89 +++++++++++++------ trunk/drivers/char/vt.c | 8 ++ trunk/drivers/ide/pci/sgiioc4.c | 16 ++-- trunk/drivers/md/md.c | 11 +-- trunk/drivers/video/au1100fb.c | 21 ++--- trunk/drivers/video/console/fbcon.c | 2 +- trunk/drivers/video/maxinefb.c | 4 +- trunk/fs/ext3/resize.c | 1 + trunk/include/asm-arm/system.h | 6 -- trunk/include/linux/vt_kern.h | 5 ++ trunk/include/net/compat.h | 3 +- trunk/kernel/hrtimer.c | 6 -- trunk/mm/memory_hotplug.c | 8 +- 19 files changed, 120 insertions(+), 123 deletions(-) diff --git a/[refs] b/[refs] index 41a1413049fd..f4016b653db7 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 5cedae9ca752a43cfb1074907d12c9f01fbebd45 +refs/heads/master: 477654fc5d5078d2213817609e68e8c968293261 diff --git a/trunk/arch/arm/mm/mm-armv.c b/trunk/arch/arm/mm/mm-armv.c index 95273de4f772..f14b2d0f3690 100644 --- a/trunk/arch/arm/mm/mm-armv.c +++ b/trunk/arch/arm/mm/mm-armv.c @@ -376,7 +376,7 @@ void __init build_mem_type_table(void) ecc_mask = 0; } - if (cpu_arch <= CPU_ARCH_ARMv5TEJ && !cpu_is_xscale()) { + if (cpu_arch <= CPU_ARCH_ARMv5TEJ) { for (i = 0; i < ARRAY_SIZE(mem_types); i++) { if (mem_types[i].prot_l1) mem_types[i].prot_l1 |= PMD_BIT4; @@ -631,7 +631,7 @@ void setup_mm_for_reboot(char mode) pgd = init_mm.pgd; base_pmdval = PMD_SECT_AP_WRITE | PMD_SECT_AP_READ | PMD_TYPE_SECT; - if (cpu_architecture() <= CPU_ARCH_ARMv5TEJ && !cpu_is_xscale()) + if (cpu_architecture() <= CPU_ARCH_ARMv5TEJ) base_pmdval |= PMD_BIT4; for (i = 0; i < FIRST_USER_PGD_NR + USER_PTRS_PER_PGD; i++, pgd++) { diff --git a/trunk/arch/mips/kernel/entry.S b/trunk/arch/mips/kernel/entry.S index d101d2fb24ca..a9c6de1b9542 100644 --- a/trunk/arch/mips/kernel/entry.S +++ b/trunk/arch/mips/kernel/entry.S @@ -101,7 +101,7 @@ FEXPORT(restore_all) # restore full frame EMT 1: mfc0 v1, CP0_TCSTATUS - /* We set IXMT above, XOR should cler it here */ + /* We set IXMT above, XOR should clear it here */ xori v1, v1, TCSTATUS_IXMT or v1, v0, v1 mtc0 v1, CP0_TCSTATUS diff --git a/trunk/arch/powerpc/platforms/powermac/low_i2c.c b/trunk/arch/powerpc/platforms/powermac/low_i2c.c index c896ce83d412..df2343e1956b 100644 --- a/trunk/arch/powerpc/platforms/powermac/low_i2c.c +++ b/trunk/arch/powerpc/platforms/powermac/low_i2c.c @@ -1157,7 +1157,6 @@ EXPORT_SYMBOL_GPL(pmac_i2c_xfer); /* some quirks for platform function decoding */ enum { pmac_i2c_quirk_invmask = 0x00000001u, - pmac_i2c_quirk_skip = 0x00000002u, }; static void pmac_i2c_devscan(void (*callback)(struct device_node *dev, @@ -1173,15 +1172,6 @@ static void pmac_i2c_devscan(void (*callback)(struct device_node *dev, /* XXX Study device-tree's & apple drivers are get the quirks * right ! */ - /* Workaround: It seems that running the clockspreading - * properties on the eMac will cause lockups during boot. - * The machine seems to work fine without that. So for now, - * let's make sure i2c-hwclock doesn't match about "imic" - * clocks and we'll figure out if we really need to do - * something special about those later. - */ - { "i2c-hwclock", "imic5002", pmac_i2c_quirk_skip }, - { "i2c-hwclock", "imic5003", pmac_i2c_quirk_skip }, { "i2c-hwclock", NULL, pmac_i2c_quirk_invmask }, { "i2c-cpu-voltage", NULL, 0}, { "temp-monitor", NULL, 0 }, @@ -1208,8 +1198,6 @@ static void pmac_i2c_devscan(void (*callback)(struct device_node *dev, if (p->compatible && !device_is_compatible(np, p->compatible)) continue; - if (p->quirks & pmac_i2c_quirk_skip) - break; callback(np, p->quirks); break; } diff --git a/trunk/drivers/base/power/suspend.c b/trunk/drivers/base/power/suspend.c index 2a769cc6f5f9..662209d3f42d 100644 --- a/trunk/drivers/base/power/suspend.c +++ b/trunk/drivers/base/power/suspend.c @@ -8,6 +8,7 @@ * */ +#include #include #include #include @@ -65,7 +66,6 @@ int suspend_device(struct device * dev, pm_message_t state) return error; } - /** * device_suspend - Save state and stop all devices in system. * @state: Power state to put each device in. @@ -85,6 +85,9 @@ int device_suspend(pm_message_t state) { int error = 0; + if (!is_console_suspend_safe()) + return -EINVAL; + down(&dpm_sem); down(&dpm_list_sem); while (!list_empty(&dpm_active) && error == 0) { diff --git a/trunk/drivers/char/ipmi/ipmi_si_intf.c b/trunk/drivers/char/ipmi/ipmi_si_intf.c index 02a7dd7a8a55..b36eef0e9d19 100644 --- a/trunk/drivers/char/ipmi/ipmi_si_intf.c +++ b/trunk/drivers/char/ipmi/ipmi_si_intf.c @@ -1184,20 +1184,20 @@ static void port_outl(struct si_sm_io *io, unsigned int offset, static void port_cleanup(struct smi_info *info) { unsigned int addr = info->io.addr_data; - int idx; + int mapsize; if (addr) { - for (idx = 0; idx < info->io_size; idx++) { - release_region(addr + idx * info->io.regspacing, - info->io.regsize); - } + mapsize = ((info->io_size * info->io.regspacing) + - (info->io.regspacing - info->io.regsize)); + + release_region (addr, mapsize); } } static int port_setup(struct smi_info *info) { unsigned int addr = info->io.addr_data; - int idx; + int mapsize; if (!addr) return -ENODEV; @@ -1225,22 +1225,16 @@ static int port_setup(struct smi_info *info) return -EINVAL; } - /* Some BIOSes reserve disjoint I/O regions in their ACPI - * tables. This causes problems when trying to register the - * entire I/O region. Therefore we must register each I/O - * port separately. - */ - for (idx = 0; idx < info->io_size; idx++) { - if (request_region(addr + idx * info->io.regspacing, - info->io.regsize, DEVICE_NAME) == NULL) { - /* Undo allocations */ - while (idx--) { - release_region(addr + idx * info->io.regspacing, - info->io.regsize); - } - return -EIO; - } - } + /* Calculate the total amount of memory to claim. This is an + * unusual looking calculation, but it avoids claiming any + * more memory than it has to. It will claim everything + * between the first address to the end of the last full + * register. */ + mapsize = ((info->io_size * info->io.regspacing) + - (info->io.regspacing - info->io.regsize)); + + if (request_region(addr, mapsize, DEVICE_NAME) == NULL) + return -EIO; return 0; } diff --git a/trunk/drivers/char/tpm/tpm_bios.c b/trunk/drivers/char/tpm/tpm_bios.c index a611972024e6..e45f0d3d12de 100644 --- a/trunk/drivers/char/tpm/tpm_bios.c +++ b/trunk/drivers/char/tpm/tpm_bios.c @@ -105,12 +105,6 @@ static const char* tcpa_event_type_strings[] = { "Non-Host Info" }; -struct tcpa_pc_event { - u32 event_id; - u32 event_size; - u8 event_data[0]; -}; - enum tcpa_pc_event_ids { SMBIOS = 1, BIS_CERT, @@ -120,15 +114,14 @@ enum tcpa_pc_event_ids { NVRAM, OPTION_ROM_EXEC, OPTION_ROM_CONFIG, - OPTION_ROM_MICROCODE = 10, + OPTION_ROM_MICROCODE, S_CRTM_VERSION, S_CRTM_CONTENTS, POST_CONTENTS, - HOST_TABLE_OF_DEVICES, }; static const char* tcpa_pc_event_id_strings[] = { - "", + "" "SMBIOS", "BIS Certificate", "POST BIOS ", @@ -137,12 +130,11 @@ static const char* tcpa_pc_event_id_strings[] = { "NVRAM", "Option ROM", "Option ROM config", - "", - "Option ROM microcode ", + "Option ROM microcode", "S-CRTM Version", - "S-CRTM Contents ", - "POST Contents ", - "Table of Devices", + "S-CRTM Contents", + "S-CRTM POST Contents", + "POST Contents", }; /* returns pointer to start of pos. entry of tcg log */ @@ -214,7 +206,7 @@ static int get_event_name(char *dest, struct tcpa_event *event, const char *name = ""; char data[40] = ""; int i, n_len = 0, d_len = 0; - struct tcpa_pc_event *pc_event; + u32 event_id; switch(event->event_type) { case PREBOOT: @@ -243,32 +235,31 @@ static int get_event_name(char *dest, struct tcpa_event *event, } break; case EVENT_TAG: - pc_event = (struct tcpa_pc_event *)event_entry; + event_id = be32_to_cpu(*((u32 *)event_entry)); /* ToDo Row data -> Base64 */ - switch (pc_event->event_id) { + switch (event_id) { case SMBIOS: case BIS_CERT: case CMOS: case NVRAM: case OPTION_ROM_EXEC: case OPTION_ROM_CONFIG: + case OPTION_ROM_MICROCODE: case S_CRTM_VERSION: - name = tcpa_pc_event_id_strings[pc_event->event_id]; + case S_CRTM_CONTENTS: + case POST_CONTENTS: + name = tcpa_pc_event_id_strings[event_id]; n_len = strlen(name); break; - /* hash data */ case POST_BIOS_ROM: case ESCD: - case OPTION_ROM_MICROCODE: - case S_CRTM_CONTENTS: - case POST_CONTENTS: - name = tcpa_pc_event_id_strings[pc_event->event_id]; + name = tcpa_pc_event_id_strings[event_id]; n_len = strlen(name); for (i = 0; i < 20; i++) - d_len += sprintf(&data[2*i], "%02x", - pc_event->event_data[i]); + d_len += sprintf(data, "%02x", + event_entry[8 + i]); break; default: break; @@ -284,13 +275,53 @@ static int get_event_name(char *dest, struct tcpa_event *event, static int tpm_binary_bios_measurements_show(struct seq_file *m, void *v) { - struct tcpa_event *event = v; - char *data = v; - int i; - for (i = 0; i < sizeof(struct tcpa_event) + event->event_size; i++) + char *eventname; + char data[4]; + u32 help; + int i, len; + struct tcpa_event *event = (struct tcpa_event *) v; + unsigned char *event_entry = + (unsigned char *) (v + sizeof(struct tcpa_event)); + + eventname = kmalloc(MAX_TEXT_EVENT, GFP_KERNEL); + if (!eventname) { + printk(KERN_ERR "%s: ERROR - No Memory for event name\n ", + __func__); + return -ENOMEM; + } + + /* 1st: PCR used is in little-endian format (4 bytes) */ + help = le32_to_cpu(event->pcr_index); + memcpy(data, &help, 4); + for (i = 0; i < 4; i++) + seq_putc(m, data[i]); + + /* 2nd: SHA1 (20 bytes) */ + for (i = 0; i < 20; i++) + seq_putc(m, event->pcr_value[i]); + + /* 3rd: event type identifier (4 bytes) */ + help = le32_to_cpu(event->event_type); + memcpy(data, &help, 4); + for (i = 0; i < 4; i++) seq_putc(m, data[i]); + len = 0; + + len += get_event_name(eventname, event, event_entry); + + /* 4th: filename <= 255 + \'0' delimiter */ + if (len > TCG_EVENT_NAME_LEN_MAX) + len = TCG_EVENT_NAME_LEN_MAX; + + for (i = 0; i < len; i++) + seq_putc(m, eventname[i]); + + /* 5th: delimiter */ + seq_putc(m, '\0'); + + kfree(eventname); return 0; } diff --git a/trunk/drivers/char/vt.c b/trunk/drivers/char/vt.c index 6c94879e0b99..acc5d47844eb 100644 --- a/trunk/drivers/char/vt.c +++ b/trunk/drivers/char/vt.c @@ -3238,6 +3238,14 @@ void vcs_scr_writew(struct vc_data *vc, u16 val, u16 *org) } } +int is_console_suspend_safe(void) +{ + /* It is unsafe to suspend devices while X has control of the + * hardware. Make sure we are running on a kernel-controlled console. + */ + return vc_cons[fg_console].d->vc_mode == KD_TEXT; +} + /* * Visible symbols for modules */ diff --git a/trunk/drivers/ide/pci/sgiioc4.c b/trunk/drivers/ide/pci/sgiioc4.c index 27c9eb989a9a..43b96e298363 100644 --- a/trunk/drivers/ide/pci/sgiioc4.c +++ b/trunk/drivers/ide/pci/sgiioc4.c @@ -345,17 +345,17 @@ sgiioc4_resetproc(ide_drive_t * drive) static u8 sgiioc4_INB(unsigned long port) { - u8 reg = (u8) readb((void __iomem *) port); + u8 reg = (u8) inb(port); if ((port & 0xFFF) == 0x11C) { /* Status register of IOC4 */ if (reg & 0x51) { /* Not busy...check for interrupt */ unsigned long other_ir = port - 0x110; - unsigned int intr_reg = (u32) readl((void __iomem *) other_ir); + unsigned int intr_reg = (u32) inl(other_ir); /* Clear the Interrupt, Error bits on the IOC4 */ if (intr_reg & 0x03) { - writel(0x03, (void __iomem *) other_ir); - intr_reg = (u32) readl((void __iomem *) other_ir); + outl(0x03, other_ir); + intr_reg = (u32) inl(other_ir); } } } @@ -606,12 +606,6 @@ ide_init_sgiioc4(ide_hwif_t * hwif) hwif->ide_dma_host_off = &sgiioc4_ide_dma_host_off; hwif->ide_dma_lostirq = &sgiioc4_ide_dma_lostirq; hwif->ide_dma_timeout = &__ide_dma_timeout; - - /* - * The IOC4 uses MMIO rather than Port IO. - * It also needs special workarounds for INB. - */ - default_hwif_mmiops(hwif); hwif->INB = &sgiioc4_INB; } @@ -749,6 +743,6 @@ ioc4_ide_exit(void) module_init(ioc4_ide_init); module_exit(ioc4_ide_exit); -MODULE_AUTHOR("Aniket Malatpure/Jeremy Higdon"); +MODULE_AUTHOR("Aniket Malatpure - Silicon Graphics Inc. (SGI)"); MODULE_DESCRIPTION("IDE PCI driver module for SGI IOC4 Base-IO Card"); MODULE_LICENSE("GPL"); diff --git a/trunk/drivers/md/md.c b/trunk/drivers/md/md.c index f19b874753a9..ec802913f977 100644 --- a/trunk/drivers/md/md.c +++ b/trunk/drivers/md/md.c @@ -167,15 +167,6 @@ void md_new_event(mddev_t *mddev) } EXPORT_SYMBOL_GPL(md_new_event); -/* Alternate version that can be called from interrupts - * when calling sysfs_notify isn't needed. - */ -void md_new_event_inintr(mddev_t *mddev) -{ - atomic_inc(&md_event_count); - wake_up(&md_event_waiters); -} - /* * Enables to iterate over all existing md arrays * all_mddevs_lock protects this list. @@ -4158,7 +4149,7 @@ void md_error(mddev_t *mddev, mdk_rdev_t *rdev) set_bit(MD_RECOVERY_INTR, &mddev->recovery); set_bit(MD_RECOVERY_NEEDED, &mddev->recovery); md_wakeup_thread(mddev->thread); - md_new_event_inintr(mddev); + md_new_event(mddev); } /* seq_file implementation /proc/mdstat */ diff --git a/trunk/drivers/video/au1100fb.c b/trunk/drivers/video/au1100fb.c index 789450bb0bc9..3d04b2def0f1 100644 --- a/trunk/drivers/video/au1100fb.c +++ b/trunk/drivers/video/au1100fb.c @@ -214,13 +214,10 @@ int au1100fb_setmode(struct au1100fb_device *fbdev) */ int au1100fb_fb_setcolreg(unsigned regno, unsigned red, unsigned green, unsigned blue, unsigned transp, struct fb_info *fbi) { - struct au1100fb_device *fbdev; - u32 *palette; + struct au1100fb_device *fbdev = to_au1100fb_device(fbi); + u32 *palette = fbdev->regs->lcd_pallettebase; u32 value; - fbdev = to_au1100fb_device(fbi); - palette = fbdev->regs->lcd_pallettebase; - if (regno > (AU1100_LCD_NBR_PALETTE_ENTRIES - 1)) return -EINVAL; @@ -319,11 +316,9 @@ int au1100fb_fb_blank(int blank_mode, struct fb_info *fbi) */ int au1100fb_fb_pan_display(struct fb_var_screeninfo *var, struct fb_info *fbi) { - struct au1100fb_device *fbdev; + struct au1100fb_device *fbdev = to_au1100fb_device(fbi); int dy; - fbdev = to_au1100fb_device(fbi); - print_dbg("fb_pan_display %p %p", var, fbi); if (!var || !fbdev) { @@ -387,12 +382,10 @@ void au1100fb_fb_rotate(struct fb_info *fbi, int angle) */ int au1100fb_fb_mmap(struct fb_info *fbi, struct vm_area_struct *vma) { - struct au1100fb_device *fbdev; + struct au1100fb_device *fbdev = to_au1100fb_device(fbi); unsigned int len; unsigned long start=0, off; - fbdev = to_au1100fb_device(fbi); - if (vma->vm_pgoff > (~0UL >> PAGE_SHIFT)) { return -EINVAL; } @@ -474,7 +467,7 @@ int au1100fb_drv_probe(struct device *dev) if (!request_mem_region(au1100fb_fix.mmio_start, au1100fb_fix.mmio_len, DRIVER_NAME)) { - print_err("fail to lock memory region at 0x%08lx", + print_err("fail to lock memory region at 0x%08x", au1100fb_fix.mmio_start); return -EBUSY; } @@ -602,13 +595,13 @@ int au1100fb_drv_remove(struct device *dev) return 0; } -int au1100fb_drv_suspend(struct device *dev, pm_message_t state) +int au1100fb_drv_suspend(struct device *dev, u32 state, u32 level) { /* TODO */ return 0; } -int au1100fb_drv_resume(struct device *dev) +int au1100fb_drv_resume(struct device *dev, u32 level) { /* TODO */ return 0; diff --git a/trunk/drivers/video/console/fbcon.c b/trunk/drivers/video/console/fbcon.c index 953eb8c171d6..ca020719d20b 100644 --- a/trunk/drivers/video/console/fbcon.c +++ b/trunk/drivers/video/console/fbcon.c @@ -2631,7 +2631,7 @@ static int fbcon_scrolldelta(struct vc_data *vc, int lines) scr_memcpyw((u16 *) q, (u16 *) p, vc->vc_size_row); } - softback_in = softback_curr = p; + softback_in = p; update_region(vc, vc->vc_origin, logo_lines * vc->vc_cols); } diff --git a/trunk/drivers/video/maxinefb.c b/trunk/drivers/video/maxinefb.c index f85421bf7cb5..743e7ad26acc 100644 --- a/trunk/drivers/video/maxinefb.c +++ b/trunk/drivers/video/maxinefb.c @@ -55,7 +55,7 @@ static struct fb_var_screeninfo maxinefb_defined = { }; static struct fb_fix_screeninfo maxinefb_fix = { - .id = "Maxine", + .id = "Maxine onboard graphics 1024x768x8", .smem_len = (1024*768), .type = FB_TYPE_PACKED_PIXELS, .visual = FB_VISUAL_PSEUDOCOLOR, @@ -107,6 +107,8 @@ static int maxinefb_setcolreg(unsigned regno, unsigned red, unsigned green, static struct fb_ops maxinefb_ops = { .owner = THIS_MODULE, + .fb_get_fix = gen_get_fix, + .fb_get_var = gen_get_var, .fb_setcolreg = maxinefb_setcolreg, .fb_fillrect = cfb_fillrect, .fb_copyarea = cfb_copyarea, diff --git a/trunk/fs/ext3/resize.c b/trunk/fs/ext3/resize.c index 34b39e9a1e5a..8aac5334680d 100644 --- a/trunk/fs/ext3/resize.c +++ b/trunk/fs/ext3/resize.c @@ -767,6 +767,7 @@ int ext3_group_add(struct super_block *sb, struct ext3_new_group_data *input) if (input->group != sbi->s_groups_count) { ext3_warning(sb, __FUNCTION__, "multiple resizers run on filesystem!"); + unlock_super(sb); err = -EBUSY; goto exit_journal; } diff --git a/trunk/include/asm-arm/system.h b/trunk/include/asm-arm/system.h index 7c9568d30307..95b3abf4851b 100644 --- a/trunk/include/asm-arm/system.h +++ b/trunk/include/asm-arm/system.h @@ -127,12 +127,6 @@ static inline int cpu_is_xsc3(void) } #endif -#if !defined(CONFIG_CPU_XSCALE) && !defined(CONFIG_CPU_XSC3) -#define cpu_is_xscale() 0 -#else -#define cpu_is_xscale() 1 -#endif - #define set_cr(x) \ __asm__ __volatile__( \ "mcr p15, 0, %0, c1, c0, 0 @ set CR" \ diff --git a/trunk/include/linux/vt_kern.h b/trunk/include/linux/vt_kern.h index fab5aed8ca31..530ae3f4248c 100644 --- a/trunk/include/linux/vt_kern.h +++ b/trunk/include/linux/vt_kern.h @@ -73,6 +73,11 @@ int con_copy_unimap(struct vc_data *dst_vc, struct vc_data *src_vc); int vt_waitactive(int vt); void change_console(struct vc_data *new_vc); void reset_vc(struct vc_data *vc); +#ifdef CONFIG_VT +int is_console_suspend_safe(void); +#else +static inline int is_console_suspend_safe(void) { return 1; } +#endif /* * vc_screen.c shares this temporary buffer with the console write code so that diff --git a/trunk/include/net/compat.h b/trunk/include/net/compat.h index e65cbedb6abc..8662b8f43df5 100644 --- a/trunk/include/net/compat.h +++ b/trunk/include/net/compat.h @@ -3,8 +3,6 @@ #include -struct sock; - #if defined(CONFIG_COMPAT) #include @@ -25,6 +23,7 @@ struct compat_cmsghdr { compat_int_t cmsg_type; }; +struct sock; extern int compat_sock_get_timestamp(struct sock *, struct timeval __user *); #else /* defined(CONFIG_COMPAT) */ diff --git a/trunk/kernel/hrtimer.c b/trunk/kernel/hrtimer.c index 01fa2ae98a85..b7f0388bd71c 100644 --- a/trunk/kernel/hrtimer.c +++ b/trunk/kernel/hrtimer.c @@ -456,7 +456,6 @@ hrtimer_start(struct hrtimer *timer, ktime_t tim, const enum hrtimer_mode mode) return ret; } -EXPORT_SYMBOL_GPL(hrtimer_start); /** * hrtimer_try_to_cancel - try to deactivate a timer @@ -485,7 +484,6 @@ int hrtimer_try_to_cancel(struct hrtimer *timer) return ret; } -EXPORT_SYMBOL_GPL(hrtimer_try_to_cancel); /** * hrtimer_cancel - cancel a timer and wait for the handler to finish. @@ -506,7 +504,6 @@ int hrtimer_cancel(struct hrtimer *timer) cpu_relax(); } } -EXPORT_SYMBOL_GPL(hrtimer_cancel); /** * hrtimer_get_remaining - get remaining time for the timer @@ -525,7 +522,6 @@ ktime_t hrtimer_get_remaining(const struct hrtimer *timer) return rem; } -EXPORT_SYMBOL_GPL(hrtimer_get_remaining); #ifdef CONFIG_NO_IDLE_HZ /** @@ -584,7 +580,6 @@ void hrtimer_init(struct hrtimer *timer, clockid_t clock_id, timer->base = &bases[clock_id]; timer->node.rb_parent = HRTIMER_INACTIVE; } -EXPORT_SYMBOL_GPL(hrtimer_init); /** * hrtimer_get_res - get the timer resolution for a clock @@ -604,7 +599,6 @@ int hrtimer_get_res(const clockid_t which_clock, struct timespec *tp) return 0; } -EXPORT_SYMBOL_GPL(hrtimer_get_res); /* * Expire the per base hrtimer-queue: diff --git a/trunk/mm/memory_hotplug.c b/trunk/mm/memory_hotplug.c index 70df5c0d957e..1ae2b2cc3a54 100644 --- a/trunk/mm/memory_hotplug.c +++ b/trunk/mm/memory_hotplug.c @@ -91,8 +91,8 @@ static void grow_zone_span(struct zone *zone, if (start_pfn < zone->zone_start_pfn) zone->zone_start_pfn = start_pfn; - zone->spanned_pages = max(old_zone_end_pfn, end_pfn) - - zone->zone_start_pfn; + if (end_pfn > old_zone_end_pfn) + zone->spanned_pages = end_pfn - zone->zone_start_pfn; zone_span_writeunlock(zone); } @@ -106,8 +106,8 @@ static void grow_pgdat_span(struct pglist_data *pgdat, if (start_pfn < pgdat->node_start_pfn) pgdat->node_start_pfn = start_pfn; - pgdat->node_spanned_pages = max(old_pgdat_end_pfn, end_pfn) - - pgdat->node_start_pfn; + if (end_pfn > old_pgdat_end_pfn) + pgdat->node_spanned_pages = end_pfn - pgdat->node_start_pfn; } int online_pages(unsigned long pfn, unsigned long nr_pages)