diff --git a/[refs] b/[refs] index e4fef3b69236..5115b29e7d62 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: d8612417b2f78767b96ca434b50d23e5cdfcde07 +refs/heads/master: ce29a1f8bd99aac409904b4ca4fd700e67802556 diff --git a/trunk/arch/i386/boot/pm.c b/trunk/arch/i386/boot/pm.c index 6be9ca811d17..09fb342cc62e 100644 --- a/trunk/arch/i386/boot/pm.c +++ b/trunk/arch/i386/boot/pm.c @@ -122,7 +122,11 @@ static void setup_gdt(void) /* DS: data, read/write, 4 GB, base 0 */ [GDT_ENTRY_BOOT_DS] = GDT_ENTRY(0xc093, 0, 0xfffff), }; - struct gdt_ptr gdt; + /* Xen HVM incorrectly stores a pointer to the gdt_ptr, instead + of the gdt_ptr contents. Thus, make it static so it will + stay in memory, at least long enough that we switch to the + proper kernel GDT. */ + static struct gdt_ptr gdt; gdt.len = sizeof(boot_gdt)-1; gdt.ptr = (u32)&boot_gdt + (ds() << 4); diff --git a/trunk/arch/ia64/hp/sim/hpsim_console.c b/trunk/arch/ia64/hp/sim/hpsim_console.c index 01663bc42b1a..6e149c8ab835 100644 --- a/trunk/arch/ia64/hp/sim/hpsim_console.c +++ b/trunk/arch/ia64/hp/sim/hpsim_console.c @@ -21,7 +21,6 @@ #include #include #include -#include #include "hpsim_ssc.h" @@ -29,7 +28,7 @@ static int simcons_init (struct console *, char *); static void simcons_write (struct console *, const char *, unsigned); static struct tty_driver *simcons_console_device (struct console *, int *); -static struct console hpsim_cons = { +struct console hpsim_cons = { .name = "simcons", .write = simcons_write, .device = simcons_console_device, @@ -59,18 +58,7 @@ simcons_write (struct console *cons, const char *buf, unsigned count) static struct tty_driver *simcons_console_device (struct console *c, int *index) { + extern struct tty_driver *hp_simserial_driver; *index = c->index; return hp_simserial_driver; } - -int simcons_register(void) -{ - if (!ia64_platform_is("hpsim")) - return 1; - - if (hpsim_cons.flags & CON_ENABLED) - return 1; - - register_console(&hpsim_cons); - return 0; -} diff --git a/trunk/arch/ia64/hp/sim/hpsim_setup.c b/trunk/arch/ia64/hp/sim/hpsim_setup.c index f629e903ebc7..f2297192a582 100644 --- a/trunk/arch/ia64/hp/sim/hpsim_setup.c +++ b/trunk/arch/ia64/hp/sim/hpsim_setup.c @@ -21,7 +21,6 @@ #include #include #include -#include #include "hpsim_ssc.h" @@ -42,5 +41,11 @@ hpsim_setup (char **cmdline_p) { ROOT_DEV = Root_SDA1; /* default to first SCSI drive */ - simcons_register(); +#ifdef CONFIG_HP_SIMSERIAL_CONSOLE + { + extern struct console hpsim_cons; + if (ia64_platform_is("hpsim")) + register_console(&hpsim_cons); + } +#endif } diff --git a/trunk/arch/ia64/hp/sim/simeth.c b/trunk/arch/ia64/hp/sim/simeth.c index 4017696ada63..f26077a773d5 100644 --- a/trunk/arch/ia64/hp/sim/simeth.c +++ b/trunk/arch/ia64/hp/sim/simeth.c @@ -22,9 +22,6 @@ #include #include #include -#include - -#include "hpsim_ssc.h" #define SIMETH_RECV_MAX 10 @@ -38,6 +35,12 @@ #define SIMETH_FRAME_SIZE ETH_FRAME_LEN +#define SSC_NETDEV_PROBE 100 +#define SSC_NETDEV_SEND 101 +#define SSC_NETDEV_RECV 102 +#define SSC_NETDEV_ATTACH 103 +#define SSC_NETDEV_DETACH 104 + #define NETWORK_INTR 8 struct simeth_local { @@ -121,6 +124,9 @@ simeth_probe (void) return r; } +extern long ia64_ssc (long, long, long, long, int); +extern void ia64_ssc_connect_irq (long intr, long irq); + static inline int netdev_probe(char *name, unsigned char *ether) { diff --git a/trunk/arch/ia64/hp/sim/simscsi.c b/trunk/arch/ia64/hp/sim/simscsi.c index 4552a1cf5b33..e62694f8ef75 100644 --- a/trunk/arch/ia64/hp/sim/simscsi.c +++ b/trunk/arch/ia64/hp/sim/simscsi.c @@ -14,7 +14,6 @@ #include #include #include -#include "hpsim_ssc.h" #include #include @@ -60,6 +59,8 @@ struct disk_stat { unsigned count; }; +extern long ia64_ssc (long arg0, long arg1, long arg2, long arg3, int nr); + static int desc[16] = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }; diff --git a/trunk/arch/ia64/kernel/irq_ia64.c b/trunk/arch/ia64/kernel/irq_ia64.c index 00a4599e5f47..c47c8acc96e3 100644 --- a/trunk/arch/ia64/kernel/irq_ia64.c +++ b/trunk/arch/ia64/kernel/irq_ia64.c @@ -82,7 +82,7 @@ struct irq_cfg irq_cfg[NR_IRQS] __read_mostly = { }; DEFINE_PER_CPU(int[IA64_NUM_VECTORS], vector_irq) = { - [0 ... IA64_NUM_VECTORS - 1] = -1 + [0 ... IA64_NUM_VECTORS - 1] = IA64_SPURIOUS_INT_VECTOR }; static cpumask_t vector_table[IA64_NUM_VECTORS] = { @@ -179,7 +179,7 @@ static void __clear_irq_vector(int irq) domain = cfg->domain; cpus_and(mask, cfg->domain, cpu_online_map); for_each_cpu_mask(cpu, mask) - per_cpu(vector_irq, cpu)[vector] = -1; + per_cpu(vector_irq, cpu)[vector] = IA64_SPURIOUS_INT_VECTOR; cfg->vector = IRQ_VECTOR_UNASSIGNED; cfg->domain = CPU_MASK_NONE; irq_status[irq] = IRQ_UNUSED; @@ -249,7 +249,7 @@ void __setup_vector_irq(int cpu) /* Clear vector_irq */ for (vector = 0; vector < IA64_NUM_VECTORS; ++vector) - per_cpu(vector_irq, cpu)[vector] = -1; + per_cpu(vector_irq, cpu)[vector] = IA64_SPURIOUS_INT_VECTOR; /* Mark the inuse vectors */ for (irq = 0; irq < NR_IRQS; ++irq) { if (!cpu_isset(cpu, irq_cfg[irq].domain)) @@ -432,18 +432,10 @@ ia64_handle_irq (ia64_vector vector, struct pt_regs *regs) } else if (unlikely(IS_RESCHEDULE(vector))) kstat_this_cpu.irqs[vector]++; else { - int irq = local_vector_to_irq(vector); - ia64_setreg(_IA64_REG_CR_TPR, vector); ia64_srlz_d(); - if (unlikely(irq < 0)) { - printk(KERN_ERR "%s: Unexpected interrupt " - "vector %d on CPU %d is not mapped " - "to any IRQ!\n", __FUNCTION__, vector, - smp_processor_id()); - } else - generic_handle_irq(irq); + generic_handle_irq(local_vector_to_irq(vector)); /* * Disable interrupts and send EOI: @@ -491,7 +483,6 @@ void ia64_process_pending_intr(void) kstat_this_cpu.irqs[vector]++; else { struct pt_regs *old_regs = set_irq_regs(NULL); - int irq = local_vector_to_irq(vector); ia64_setreg(_IA64_REG_CR_TPR, vector); ia64_srlz_d(); @@ -502,15 +493,8 @@ void ia64_process_pending_intr(void) * it will work. I hope it works!. * Probably could shared code. */ - if (unlikely(irq < 0)) { - printk(KERN_ERR "%s: Unexpected interrupt " - "vector %d on CPU %d not being mapped " - "to any IRQ!!\n", __FUNCTION__, vector, - smp_processor_id()); - } else { - vectors_in_migration[irq]=0; - generic_handle_irq(irq); - } + vectors_in_migration[local_vector_to_irq(vector)]=0; + generic_handle_irq(local_vector_to_irq(vector)); set_irq_regs(old_regs); /* diff --git a/trunk/arch/ia64/kernel/setup.c b/trunk/arch/ia64/kernel/setup.c index 9e392a30d197..407efea04bf5 100644 --- a/trunk/arch/ia64/kernel/setup.c +++ b/trunk/arch/ia64/kernel/setup.c @@ -60,7 +60,6 @@ #include #include #include -#include #if defined(CONFIG_SMP) && (IA64_CPU_SIZE > PAGE_SIZE) # error "struct cpuinfo_ia64 too big!" @@ -390,8 +389,13 @@ early_console_setup (char *cmdline) if (!efi_setup_pcdp_console(cmdline)) earlycons++; #endif - if (!simcons_register()) +#ifdef CONFIG_HP_SIMSERIAL_CONSOLE + { + extern struct console hpsim_cons; + register_console(&hpsim_cons); earlycons++; + } +#endif return (earlycons) ? 0 : -1; } @@ -956,11 +960,6 @@ cpu_init (void) /* clear TPR & XTP to enable all interrupt classes: */ ia64_setreg(_IA64_REG_CR_TPR, 0); - - /* Clear any pending interrupts left by SAL/EFI */ - while (ia64_get_ivr() != IA64_SPURIOUS_INT_VECTOR) - ia64_eoi(); - #ifdef CONFIG_SMP normal_xtp(); #endif diff --git a/trunk/arch/ia64/kernel/smpboot.c b/trunk/arch/ia64/kernel/smpboot.c index 308772f7cddc..62209dcf06d3 100644 --- a/trunk/arch/ia64/kernel/smpboot.c +++ b/trunk/arch/ia64/kernel/smpboot.c @@ -58,7 +58,6 @@ #include #include #include -#include #define SMP_DEBUG 0 @@ -731,11 +730,6 @@ int __cpu_disable(void) return (-EBUSY); } - if (ia64_platform_is("sn2")) { - if (!sn_cpu_disable_allowed(cpu)) - return -EBUSY; - } - cpu_clear(cpu, cpu_online_map); if (migrate_platform_irqs(cpu)) { diff --git a/trunk/arch/ia64/mm/contig.c b/trunk/arch/ia64/mm/contig.c index d3c538be466c..7ac8592a35b6 100644 --- a/trunk/arch/ia64/mm/contig.c +++ b/trunk/arch/ia64/mm/contig.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #include @@ -57,8 +56,6 @@ void show_mem(void) present = pgdat->node_present_pages; for(i = 0; i < pgdat->node_spanned_pages; i++) { struct page *page; - if (unlikely(i % MAX_ORDER_NR_PAGES == 0)) - touch_nmi_watchdog(); if (pfn_valid(pgdat->node_start_pfn + i)) page = pfn_to_page(pgdat->node_start_pfn + i); else { diff --git a/trunk/arch/ia64/mm/discontig.c b/trunk/arch/ia64/mm/discontig.c index 0d34585058c8..0dbf0e81f8c0 100644 --- a/trunk/arch/ia64/mm/discontig.c +++ b/trunk/arch/ia64/mm/discontig.c @@ -16,7 +16,6 @@ #include #include -#include #include #include #include @@ -534,8 +533,6 @@ void show_mem(void) present = pgdat->node_present_pages; for(i = 0; i < pgdat->node_spanned_pages; i++) { struct page *page; - if (unlikely(i % MAX_ORDER_NR_PAGES == 0)) - touch_nmi_watchdog(); if (pfn_valid(pgdat->node_start_pfn + i)) page = pfn_to_page(pgdat->node_start_pfn + i); else { diff --git a/trunk/arch/ia64/sn/kernel/huberror.c b/trunk/arch/ia64/sn/kernel/huberror.c index b663168da55c..2c3f9dfca78b 100644 --- a/trunk/arch/ia64/sn/kernel/huberror.c +++ b/trunk/arch/ia64/sn/kernel/huberror.c @@ -185,14 +185,11 @@ void hubiio_crb_error_handler(struct hubdev_info *hubdev_info) */ void hub_error_init(struct hubdev_info *hubdev_info) { - if (request_irq(SGI_II_ERROR, hub_eint_handler, IRQF_SHARED, - "SN_hub_error", (void *)hubdev_info)) { + "SN_hub_error", (void *)hubdev_info)) printk("hub_error_init: Failed to request_irq for 0x%p\n", hubdev_info); - return; - } - sn_set_err_irq_affinity(SGI_II_ERROR); + return; } @@ -205,14 +202,11 @@ void hub_error_init(struct hubdev_info *hubdev_info) */ void ice_error_init(struct hubdev_info *hubdev_info) { - if (request_irq (SGI_TIO_ERROR, (void *)hub_eint_handler, IRQF_SHARED, "SN_TIO_error", - (void *)hubdev_info)) { + (void *)hubdev_info)) printk("ice_error_init: request_irq() error hubdev_info 0x%p\n", hubdev_info); - return; - } - sn_set_err_irq_affinity(SGI_TIO_ERROR); + return; } diff --git a/trunk/arch/ia64/sn/kernel/irq.c b/trunk/arch/ia64/sn/kernel/irq.c index 0f9b12683bf3..360047389449 100644 --- a/trunk/arch/ia64/sn/kernel/irq.c +++ b/trunk/arch/ia64/sn/kernel/irq.c @@ -19,7 +19,6 @@ #include #include #include -#include static void force_interrupt(int irq); static void register_intr_pda(struct sn_irq_info *sn_irq_info); @@ -234,20 +233,6 @@ static void sn_set_affinity_irq(unsigned int irq, cpumask_t mask) (void)sn_retarget_vector(sn_irq_info, nasid, slice); } -#ifdef CONFIG_SMP -void sn_set_err_irq_affinity(unsigned int irq) -{ - /* - * On systems which support CPU disabling (SHub2), all error interrupts - * are targetted at the boot CPU. - */ - if (is_shub2() && sn_prom_feature_available(PRF_CPU_DISABLE_SUPPORT)) - set_irq_affinity_info(irq, cpu_physical_id(0), 0); -} -#else -void sn_set_err_irq_affinity(unsigned int irq) { } -#endif - static void sn_mask_irq(unsigned int irq) { diff --git a/trunk/arch/ia64/sn/kernel/sn2/sn2_smp.c b/trunk/arch/ia64/sn/kernel/sn2/sn2_smp.c index f3c69329e145..033c8a9f000e 100644 --- a/trunk/arch/ia64/sn/kernel/sn2/sn2_smp.c +++ b/trunk/arch/ia64/sn/kernel/sn2/sn2_smp.c @@ -40,7 +40,6 @@ #include #include #include -#include DEFINE_PER_CPU(struct ptc_stats, ptcstats); DECLARE_PER_CPU(struct ptc_stats, ptcstats); @@ -430,31 +429,6 @@ void sn2_send_IPI(int cpuid, int vector, int delivery_mode, int redirect) sn_send_IPI_phys(nasid, physid, vector, delivery_mode); } -#ifdef CONFIG_HOTPLUG_CPU -/** - * sn_cpu_disable_allowed - Determine if a CPU can be disabled. - * @cpu - CPU that is requested to be disabled. - * - * CPU disable is only allowed on SHub2 systems running with a PROM - * that supports CPU disable. It is not permitted to disable the boot processor. - */ -bool sn_cpu_disable_allowed(int cpu) -{ - if (is_shub2() && sn_prom_feature_available(PRF_CPU_DISABLE_SUPPORT)) { - if (cpu != 0) - return true; - else - printk(KERN_WARNING - "Disabling the boot processor is not allowed.\n"); - - } else - printk(KERN_WARNING - "CPU disable is not supported on this system.\n"); - - return false; -} -#endif /* CONFIG_HOTPLUG_CPU */ - #ifdef CONFIG_PROC_FS #define PTC_BASENAME "sgi_sn/ptc_statistics" diff --git a/trunk/arch/ia64/sn/kernel/sn2/sn_hwperf.c b/trunk/arch/ia64/sn/kernel/sn2/sn_hwperf.c index 1a8e49607f11..df8d5bed6119 100644 --- a/trunk/arch/ia64/sn/kernel/sn2/sn_hwperf.c +++ b/trunk/arch/ia64/sn/kernel/sn2/sn_hwperf.c @@ -66,8 +66,7 @@ static int sn_hwperf_enum_objects(int *nobj, struct sn_hwperf_object_info **ret) } sz = sn_hwperf_obj_cnt * sizeof(struct sn_hwperf_object_info); - objbuf = vmalloc(sz); - if (objbuf == NULL) { + if ((objbuf = (struct sn_hwperf_object_info *) vmalloc(sz)) == NULL) { printk("sn_hwperf_enum_objects: vmalloc(%d) failed\n", (int)sz); e = -ENOMEM; goto out; diff --git a/trunk/arch/ia64/sn/pci/pcibr/pcibr_provider.c b/trunk/arch/ia64/sn/pci/pcibr/pcibr_provider.c index ab3eaf85fe4d..42485ad50ceb 100644 --- a/trunk/arch/ia64/sn/pci/pcibr/pcibr_provider.c +++ b/trunk/arch/ia64/sn/pci/pcibr/pcibr_provider.c @@ -145,7 +145,6 @@ pcibr_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *cont printk(KERN_WARNING "pcibr cannot allocate interrupt for error handler\n"); } - sn_set_err_irq_affinity(SGI_PCIASIC_ERROR); /* * Update the Bridge with the "kernel" pagesize diff --git a/trunk/arch/ia64/sn/pci/tioca_provider.c b/trunk/arch/ia64/sn/pci/tioca_provider.c index ef048a674772..d798dd4d0dc4 100644 --- a/trunk/arch/ia64/sn/pci/tioca_provider.c +++ b/trunk/arch/ia64/sn/pci/tioca_provider.c @@ -654,8 +654,6 @@ tioca_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *cont __FUNCTION__, SGI_TIOCA_ERROR, (int)tioca_common->ca_common.bs_persist_busnum); - sn_set_err_irq_affinity(SGI_TIOCA_ERROR); - /* Setup locality information */ controller->node = tioca_kern->ca_closest_node; return tioca_common; diff --git a/trunk/arch/ia64/sn/pci/tioce_provider.c b/trunk/arch/ia64/sn/pci/tioce_provider.c index cee9379d44e0..84b72b27e27f 100644 --- a/trunk/arch/ia64/sn/pci/tioce_provider.c +++ b/trunk/arch/ia64/sn/pci/tioce_provider.c @@ -1034,7 +1034,6 @@ tioce_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *cont tioce_common->ce_pcibus.bs_persist_segment, tioce_common->ce_pcibus.bs_persist_busnum); - sn_set_err_irq_affinity(SGI_PCIASIC_ERROR); return tioce_common; } diff --git a/trunk/arch/powerpc/kernel/ibmebus.c b/trunk/arch/powerpc/kernel/ibmebus.c index d6a38cd5018e..9a8c9af43b22 100644 --- a/trunk/arch/powerpc/kernel/ibmebus.c +++ b/trunk/arch/powerpc/kernel/ibmebus.c @@ -188,21 +188,33 @@ static struct ibmebus_dev* __devinit ibmebus_register_device_node( struct device_node *dn) { struct ibmebus_dev *dev; - int i, len, bus_len; + const char *loc_code; + int length; + + loc_code = of_get_property(dn, "ibm,loc-code", NULL); + if (!loc_code) { + printk(KERN_WARNING "%s: node %s missing 'ibm,loc-code'\n", + __FUNCTION__, dn->name ? dn->name : ""); + return ERR_PTR(-EINVAL); + } + + if (strlen(loc_code) == 0) { + printk(KERN_WARNING "%s: 'ibm,loc-code' is invalid\n", + __FUNCTION__); + return ERR_PTR(-EINVAL); + } dev = kzalloc(sizeof(struct ibmebus_dev), GFP_KERNEL); - if (!dev) + if (!dev) { return ERR_PTR(-ENOMEM); + } dev->ofdev.node = of_node_get(dn); - len = strlen(dn->full_name + 1); - bus_len = min(len, BUS_ID_SIZE - 1); - memcpy(dev->ofdev.dev.bus_id, dn->full_name + 1 - + (len - bus_len), bus_len); - for (i = 0; i < bus_len; i++) - if (dev->ofdev.dev.bus_id[i] == '/') - dev->ofdev.dev.bus_id[i] = '_'; + length = strlen(loc_code); + memcpy(dev->ofdev.dev.bus_id, loc_code + + (length - min(length, BUS_ID_SIZE - 1)), + min(length, BUS_ID_SIZE - 1)); /* Register with generic device framework. */ if (ibmebus_register_device_common(dev, dn->name) != 0) { diff --git a/trunk/arch/powerpc/platforms/cell/spu_base.c b/trunk/arch/powerpc/platforms/cell/spu_base.c index 106d2921e2d9..095a30304c56 100644 --- a/trunk/arch/powerpc/platforms/cell/spu_base.c +++ b/trunk/arch/powerpc/platforms/cell/spu_base.c @@ -236,35 +236,28 @@ static irqreturn_t spu_irq_class_0(int irq, void *data) { struct spu *spu; - unsigned long stat, mask; spu = data; - - mask = spu_int_mask_get(spu, 0); - stat = spu_int_stat_get(spu, 0); - stat &= mask; - - spin_lock(&spu->register_lock); - spu->class_0_pending |= stat; - spin_unlock(&spu->register_lock); - + spu->class_0_pending = 1; spu->stop_callback(spu); - spu_int_stat_clear(spu, 0, stat); - return IRQ_HANDLED; } int spu_irq_class_0_bottom(struct spu *spu) { + unsigned long stat, mask; unsigned long flags; - unsigned long stat; - spin_lock_irqsave(&spu->register_lock, flags); - stat = spu->class_0_pending; spu->class_0_pending = 0; + spin_lock_irqsave(&spu->register_lock, flags); + mask = spu_int_mask_get(spu, 0); + stat = spu_int_stat_get(spu, 0); + + stat &= mask; + if (stat & 1) /* invalid DMA alignment */ __spu_trap_dma_align(spu); @@ -274,6 +267,7 @@ spu_irq_class_0_bottom(struct spu *spu) if (stat & 4) /* error on SPU */ __spu_trap_error(spu); + spu_int_stat_clear(spu, 0, stat); spin_unlock_irqrestore(&spu->register_lock, flags); return (stat & 0x7) ? -EIO : 0; diff --git a/trunk/arch/powerpc/platforms/ps3/platform.h b/trunk/arch/powerpc/platforms/ps3/platform.h index 2eb8f92704b4..87d52060fec0 100644 --- a/trunk/arch/powerpc/platforms/ps3/platform.h +++ b/trunk/arch/powerpc/platforms/ps3/platform.h @@ -83,7 +83,6 @@ enum ps3_dev_type { PS3_DEV_TYPE_STOR_ROM = TYPE_ROM, /* 5 */ PS3_DEV_TYPE_SB_GPIO = 6, PS3_DEV_TYPE_STOR_FLASH = TYPE_RBC, /* 14 */ - PS3_DEV_TYPE_STOR_DUMMY = 32, PS3_DEV_TYPE_NOACCESS = 255, }; diff --git a/trunk/arch/powerpc/platforms/ps3/repository.c b/trunk/arch/powerpc/platforms/ps3/repository.c index 1c94824f7b63..8cc37cfea0f2 100644 --- a/trunk/arch/powerpc/platforms/ps3/repository.c +++ b/trunk/arch/powerpc/platforms/ps3/repository.c @@ -349,35 +349,6 @@ int ps3_repository_find_device(struct ps3_repository_device *repo) return result; } - if (tmp.bus_type == PS3_BUS_TYPE_STORAGE) { - /* - * A storage device may show up in the repository before the - * hypervisor has finished probing its type and regions - */ - unsigned int num_regions; - - if (tmp.dev_type == PS3_DEV_TYPE_STOR_DUMMY) { - pr_debug("%s:%u storage device not ready\n", __func__, - __LINE__); - return -ENODEV; - } - - result = ps3_repository_read_stor_dev_num_regions(tmp.bus_index, - tmp.dev_index, - &num_regions); - if (result) { - pr_debug("%s:%d read_stor_dev_num_regions failed\n", - __func__, __LINE__); - return result; - } - - if (!num_regions) { - pr_debug("%s:%u storage device has no regions yet\n", - __func__, __LINE__); - return -ENODEV; - } - } - result = ps3_repository_read_dev_id(tmp.bus_index, tmp.dev_index, &tmp.dev_id); diff --git a/trunk/arch/powerpc/platforms/ps3/spu.c b/trunk/arch/powerpc/platforms/ps3/spu.c index d1630a074acf..ac2a4b8a4c14 100644 --- a/trunk/arch/powerpc/platforms/ps3/spu.c +++ b/trunk/arch/powerpc/platforms/ps3/spu.c @@ -505,8 +505,6 @@ static void mfc_sr1_set(struct spu *spu, u64 sr1) static const u64 allowed = ~(MFC_STATE1_LOCAL_STORAGE_DECODE_MASK | MFC_STATE1_PROBLEM_STATE_MASK); - sr1 |= MFC_STATE1_MASTER_RUN_CONTROL_MASK; - BUG_ON((sr1 & allowed) != (spu_pdata(spu)->cache.sr1 & allowed)); spu_pdata(spu)->cache.sr1 = sr1; diff --git a/trunk/drivers/ata/ata_piix.c b/trunk/drivers/ata/ata_piix.c index 3b8bf1812dc8..e40c94f5f59d 100644 --- a/trunk/drivers/ata/ata_piix.c +++ b/trunk/drivers/ata/ata_piix.c @@ -955,8 +955,7 @@ static int piix_broken_suspend(void) DMI_MATCH(DMI_PRODUCT_NAME, "PORTEGE M500"), }, }, - - { } /* terminate list */ + { } }; static const char *oemstrs[] = { "Tecra M3,", @@ -1188,8 +1187,6 @@ static void piix_iocfg_bit18_quirk(struct pci_dev *pdev) DMI_MATCH(DMI_PRODUCT_NAME, "M570U"), }, }, - - { } /* terminate list */ }; u32 iocfg; diff --git a/trunk/drivers/ata/sata_via.c b/trunk/drivers/ata/sata_via.c index 57fd30de8f0d..a4e631766eee 100644 --- a/trunk/drivers/ata/sata_via.c +++ b/trunk/drivers/ata/sata_via.c @@ -371,7 +371,7 @@ static void vt6421_set_dma_mode(struct ata_port *ap, struct ata_device *adev) { struct pci_dev *pdev = to_pci_dev(ap->host->dev); static const u8 udma_bits[] = { 0xEE, 0xE8, 0xE6, 0xE4, 0xE2, 0xE1, 0xE0, 0xE0 }; - pci_write_config_byte(pdev, PATA_UDMA_TIMING, udma_bits[adev->dma_mode - XFER_UDMA_0]); + pci_write_config_byte(pdev, PATA_UDMA_TIMING, udma_bits[adev->pio_mode - XFER_UDMA_0]); } static const unsigned int svia_bar_sizes[] = { diff --git a/trunk/drivers/mtd/mtdsuper.c b/trunk/drivers/mtd/mtdsuper.c index 9b430f20b640..aca331971201 100644 --- a/trunk/drivers/mtd/mtdsuper.c +++ b/trunk/drivers/mtd/mtdsuper.c @@ -70,8 +70,6 @@ static int get_sb_mtd_aux(struct file_system_type *fs_type, int flags, DEBUG(1, "MTDSB: New superblock for device %d (\"%s\")\n", mtd->index, mtd->name); - sb->s_flags = flags; - ret = fill_super(sb, data, flags & MS_SILENT ? 1 : 0); if (ret < 0) { up_write(&sb->s_umount); diff --git a/trunk/fs/jffs2/fs.c b/trunk/fs/jffs2/fs.c index 8bc727b71696..1d3b7a9fc828 100644 --- a/trunk/fs/jffs2/fs.c +++ b/trunk/fs/jffs2/fs.c @@ -627,7 +627,7 @@ unsigned char *jffs2_gc_fetch_page(struct jffs2_sb_info *c, struct inode *inode = OFNI_EDONI_2SFFJ(f); struct page *pg; - pg = read_cache_page_async(inode->i_mapping, offset >> PAGE_CACHE_SHIFT, + pg = read_cache_page(inode->i_mapping, offset >> PAGE_CACHE_SHIFT, (void *)jffs2_do_readpage_unlock, inode); if (IS_ERR(pg)) return (void *)pg; diff --git a/trunk/fs/nfs/file.c b/trunk/fs/nfs/file.c index 579cf8a7d4a7..c87dc713b5d7 100644 --- a/trunk/fs/nfs/file.c +++ b/trunk/fs/nfs/file.c @@ -316,7 +316,7 @@ static void nfs_invalidate_page(struct page *page, unsigned long offset) if (offset != 0) return; /* Cancel any unstarted writes on this page */ - nfs_wb_page_cancel(page->mapping->host, page); + nfs_wb_page_priority(page->mapping->host, page, FLUSH_INVALIDATE); } static int nfs_release_page(struct page *page, gfp_t gfp) diff --git a/trunk/fs/nfs/namespace.c b/trunk/fs/nfs/namespace.c index acfc56f9edc0..aea76d0e5fbd 100644 --- a/trunk/fs/nfs/namespace.c +++ b/trunk/fs/nfs/namespace.c @@ -176,7 +176,7 @@ static void nfs_expire_automounts(struct work_struct *work) void nfs_release_automount_timer(void) { if (list_empty(&nfs_automount_list)) - cancel_delayed_work(&nfs_automount_task); + cancel_delayed_work_sync(&nfs_automount_task); } /* diff --git a/trunk/fs/nfs/nfs4proc.c b/trunk/fs/nfs/nfs4proc.c index 4b90e17555a9..62b3ae280310 100644 --- a/trunk/fs/nfs/nfs4proc.c +++ b/trunk/fs/nfs/nfs4proc.c @@ -646,7 +646,7 @@ static int _nfs4_do_open_reclaim(struct nfs_open_context *ctx, struct nfs4_state rcu_read_lock(); delegation = rcu_dereference(NFS_I(state->inode)->delegation); if (delegation != NULL && (delegation->flags & NFS_DELEGATION_NEED_RECLAIM) != 0) - delegation_type = delegation->type; + delegation_type = delegation->flags; rcu_read_unlock(); opendata->o_arg.u.delegation_type = delegation_type; status = nfs4_open_recover(opendata, state); @@ -1434,7 +1434,7 @@ nfs4_atomic_open(struct inode *dir, struct dentry *dentry, struct nameidata *nd) } res = d_add_unique(dentry, igrab(state->inode)); if (res != NULL) - path.dentry = res; + dentry = res; nfs4_intent_set_file(nd, &path, state); return res; } diff --git a/trunk/fs/nfs/super.c b/trunk/fs/nfs/super.c index 8ed593766f16..46139003ea0c 100644 --- a/trunk/fs/nfs/super.c +++ b/trunk/fs/nfs/super.c @@ -911,13 +911,13 @@ static int nfs_parse_mount_options(char *raw, kfree(string); switch (token) { - case Opt_xprt_udp: + case Opt_udp: mnt->flags &= ~NFS_MOUNT_TCP; mnt->nfs_server.protocol = IPPROTO_UDP; mnt->timeo = 7; mnt->retrans = 5; break; - case Opt_xprt_tcp: + case Opt_tcp: mnt->flags |= NFS_MOUNT_TCP; mnt->nfs_server.protocol = IPPROTO_TCP; mnt->timeo = 600; @@ -936,10 +936,10 @@ static int nfs_parse_mount_options(char *raw, kfree(string); switch (token) { - case Opt_xprt_udp: + case Opt_udp: mnt->mount_server.protocol = IPPROTO_UDP; break; - case Opt_xprt_tcp: + case Opt_tcp: mnt->mount_server.protocol = IPPROTO_TCP; break; default: @@ -1153,20 +1153,20 @@ static int nfs_validate_mount_data(struct nfs_mount_data **options, c = strchr(dev_name, ':'); if (c == NULL) return -EINVAL; - len = c - dev_name; + len = c - dev_name - 1; if (len > sizeof(data->hostname)) - return -ENAMETOOLONG; + return -EINVAL; strncpy(data->hostname, dev_name, len); args.nfs_server.hostname = data->hostname; c++; if (strlen(c) > NFS_MAXPATHLEN) - return -ENAMETOOLONG; + return -EINVAL; args.nfs_server.export_path = c; status = nfs_try_mount(&args, mntfh); if (status) - return status; + return -EINVAL; /* * Translate to nfs_mount_data, which nfs_fill_super @@ -1677,7 +1677,7 @@ static int nfs4_validate_mount_data(struct nfs4_mount_data **options, /* while calculating len, pretend ':' is '\0' */ len = c - dev_name; if (len > NFS4_MAXNAMLEN) - return -ENAMETOOLONG; + return -EINVAL; *hostname = kzalloc(len, GFP_KERNEL); if (*hostname == NULL) return -ENOMEM; @@ -1686,7 +1686,7 @@ static int nfs4_validate_mount_data(struct nfs4_mount_data **options, c++; /* step over the ':' */ len = strlen(c); if (len > NFS4_MAXPATHLEN) - return -ENAMETOOLONG; + return -EINVAL; *mntpath = kzalloc(len + 1, GFP_KERNEL); if (*mntpath == NULL) return -ENOMEM; diff --git a/trunk/fs/nfs/write.c b/trunk/fs/nfs/write.c index 0d7a77cc394b..ef97e0c0f5b1 100644 --- a/trunk/fs/nfs/write.c +++ b/trunk/fs/nfs/write.c @@ -1396,50 +1396,6 @@ int nfs_sync_mapping_range(struct address_space *mapping, loff_t range_start, lo return ret; } -int nfs_wb_page_cancel(struct inode *inode, struct page *page) -{ - struct nfs_page *req; - loff_t range_start = page_offset(page); - loff_t range_end = range_start + (loff_t)(PAGE_CACHE_SIZE - 1); - struct writeback_control wbc = { - .bdi = page->mapping->backing_dev_info, - .sync_mode = WB_SYNC_ALL, - .nr_to_write = LONG_MAX, - .range_start = range_start, - .range_end = range_end, - }; - int ret = 0; - - BUG_ON(!PageLocked(page)); - for (;;) { - req = nfs_page_find_request(page); - if (req == NULL) - goto out; - if (test_bit(PG_NEED_COMMIT, &req->wb_flags)) { - nfs_release_request(req); - break; - } - if (nfs_lock_request_dontget(req)) { - nfs_inode_remove_request(req); - /* - * In case nfs_inode_remove_request has marked the - * page as being dirty - */ - cancel_dirty_page(page, PAGE_CACHE_SIZE); - nfs_unlock_request(req); - break; - } - ret = nfs_wait_on_request(req); - if (ret < 0) - goto out; - } - if (!PagePrivate(page)) - return 0; - ret = nfs_sync_mapping_wait(page->mapping, &wbc, FLUSH_INVALIDATE); -out: - return ret; -} - int nfs_wb_page_priority(struct inode *inode, struct page *page, int how) { loff_t range_start = page_offset(page); diff --git a/trunk/include/asm-ia64/hpsim.h b/trunk/include/asm-ia64/hpsim.h deleted file mode 100644 index 892ab198a9da..000000000000 --- a/trunk/include/asm-ia64/hpsim.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef _ASMIA64_HPSIM_H -#define _ASMIA64_HPSIM_H - -#ifndef CONFIG_HP_SIMSERIAL_CONSOLE -static inline int simcons_register(void) { return 1; } -#else -int simcons_register(void); -#endif - -struct tty_driver; -extern struct tty_driver *hp_simserial_driver; - -void ia64_ssc_connect_irq(long intr, long irq); -void ia64_ctl_trace(long on); - -#endif diff --git a/trunk/include/asm-ia64/sn/arch.h b/trunk/include/asm-ia64/sn/arch.h index 7caa1f44cd95..16adc93d7a72 100644 --- a/trunk/include/asm-ia64/sn/arch.h +++ b/trunk/include/asm-ia64/sn/arch.h @@ -81,6 +81,5 @@ extern u8 sn_sharing_domain_size; extern u8 sn_region_size; extern void sn_flush_all_caches(long addr, long bytes); -extern bool sn_cpu_disable_allowed(int cpu); #endif /* _ASM_IA64_SN_ARCH_H */ diff --git a/trunk/include/asm-ia64/sn/intr.h b/trunk/include/asm-ia64/sn/intr.h index e0487aa97418..12b54ddb06be 100644 --- a/trunk/include/asm-ia64/sn/intr.h +++ b/trunk/include/asm-ia64/sn/intr.h @@ -60,7 +60,6 @@ extern u64 sn_intr_alloc(nasid_t, int, int, nasid_t, int); extern void sn_intr_free(nasid_t, int, struct sn_irq_info *); extern struct sn_irq_info *sn_retarget_vector(struct sn_irq_info *, nasid_t, int); -extern void sn_set_err_irq_affinity(unsigned int); extern struct list_head **sn_irq_lh; #define CPU_VECTOR_TO_IRQ(cpuid,vector) (vector) diff --git a/trunk/include/asm-ia64/sn/sn_feature_sets.h b/trunk/include/asm-ia64/sn/sn_feature_sets.h index 8e83ac117ace..bfdc36273ed4 100644 --- a/trunk/include/asm-ia64/sn/sn_feature_sets.h +++ b/trunk/include/asm-ia64/sn/sn_feature_sets.h @@ -31,7 +31,6 @@ extern int sn_prom_feature_available(int id); #define PRF_PAL_CACHE_FLUSH_SAFE 0 #define PRF_DEVICE_FLUSH_LIST 1 #define PRF_HOTPLUG_SUPPORT 2 -#define PRF_CPU_DISABLE_SUPPORT 3 /* --------------------- OS Features -------------------------------*/ diff --git a/trunk/include/asm-powerpc/spu.h b/trunk/include/asm-powerpc/spu.h index 5bde3980bf49..8836c0f1f2f7 100644 --- a/trunk/include/asm-powerpc/spu.h +++ b/trunk/include/asm-powerpc/spu.h @@ -130,7 +130,6 @@ struct spu { u64 flags; u64 dar; u64 dsisr; - u64 class_0_pending; size_t ls_size; unsigned int slb_replace; struct mm_struct *mm; @@ -139,6 +138,7 @@ struct spu { unsigned long long timestamp; pid_t pid; pid_t tgid; + int class_0_pending; spinlock_t register_lock; void (* wbox_callback)(struct spu *spu); diff --git a/trunk/include/linux/nfs_fs.h b/trunk/include/linux/nfs_fs.h index 7250eeadd7b5..157dcb055b5c 100644 --- a/trunk/include/linux/nfs_fs.h +++ b/trunk/include/linux/nfs_fs.h @@ -431,7 +431,6 @@ extern int nfs_sync_mapping_range(struct address_space *, loff_t, loff_t, int); extern int nfs_wb_all(struct inode *inode); extern int nfs_wb_page(struct inode *inode, struct page* page); extern int nfs_wb_page_priority(struct inode *inode, struct page* page, int how); -extern int nfs_wb_page_cancel(struct inode *inode, struct page* page); #if defined(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4) extern int nfs_commit_inode(struct inode *, int); extern struct nfs_write_data *nfs_commit_alloc(void); diff --git a/trunk/net/ipv4/tcp_input.c b/trunk/net/ipv4/tcp_input.c index bbad2cdb74b7..1ee72127462b 100644 --- a/trunk/net/ipv4/tcp_input.c +++ b/trunk/net/ipv4/tcp_input.c @@ -560,7 +560,7 @@ static u32 tcp_rto_min(struct sock *sk) struct dst_entry *dst = __sk_dst_get(sk); u32 rto_min = TCP_RTO_MIN; - if (dst && dst_metric_locked(dst, RTAX_RTO_MIN)) + if (dst_metric_locked(dst, RTAX_RTO_MIN)) rto_min = dst->metrics[RTAX_RTO_MIN-1]; return rto_min; } diff --git a/trunk/scripts/kconfig/conf.c b/trunk/scripts/kconfig/conf.c index a38787a881ea..8be6a4269e63 100644 --- a/trunk/scripts/kconfig/conf.c +++ b/trunk/scripts/kconfig/conf.c @@ -72,7 +72,7 @@ static void check_stdin(void) } } -static int conf_askvalue(struct symbol *sym, const char *def) +static void conf_askvalue(struct symbol *sym, const char *def) { enum symbol_type type = sym_get_type(sym); tristate val; @@ -87,7 +87,7 @@ static int conf_askvalue(struct symbol *sym, const char *def) printf("%s\n", def); line[0] = '\n'; line[1] = 0; - return 0; + return; } switch (input_mode) { @@ -97,23 +97,23 @@ static int conf_askvalue(struct symbol *sym, const char *def) case set_random: if (sym_has_value(sym)) { printf("%s\n", def); - return 0; + return; } break; case ask_new: case ask_silent: if (sym_has_value(sym)) { printf("%s\n", def); - return 0; + return; } check_stdin(); case ask_all: fflush(stdout); fgets(line, 128, stdin); - return 1; + return; case set_default: printf("%s\n", def); - return 1; + return; default: break; } @@ -123,7 +123,7 @@ static int conf_askvalue(struct symbol *sym, const char *def) case S_HEX: case S_STRING: printf("%s\n", def); - return 1; + return; default: ; } @@ -174,7 +174,6 @@ static int conf_askvalue(struct symbol *sym, const char *def) break; } printf("%s", line); - return 1; } int conf_string(struct menu *menu) @@ -188,8 +187,7 @@ int conf_string(struct menu *menu) def = sym_get_string_value(sym); if (sym_get_string_value(sym)) printf("[%s] ", def); - if (!conf_askvalue(sym, def)) - return 0; + conf_askvalue(sym, def); switch (line[0]) { case '\n': break; @@ -242,8 +240,7 @@ static int conf_sym(struct menu *menu) if (menu_has_help(menu)) printf("/?"); printf("] "); - if (!conf_askvalue(sym, sym_get_string_value(sym))) - return 0; + conf_askvalue(sym, sym_get_string_value(sym)); strip(line); switch (line[0]) {