Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
authorLinus Torvalds <torvalds@g5.osdl.org>
Wed, 8 Feb 2006 04:34:29 +0000 (20:34 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 8 Feb 2006 04:34:29 +0000 (20:34 -0800)
90 files changed:
Documentation/powerpc/booting-without-of.txt
arch/cris/arch-v10/kernel/ptrace.c
arch/cris/kernel/setup.c
arch/ia64/dig/setup.c
arch/ia64/sn/kernel/setup.c
arch/m32r/kernel/m32r_ksyms.c
arch/m32r/kernel/setup.c
arch/powerpc/kernel/fpu.S
arch/powerpc/kernel/head_64.S
arch/powerpc/kernel/iommu.c
arch/powerpc/kernel/prom.c
arch/powerpc/kernel/prom_init.c
arch/powerpc/kernel/prom_parse.c
arch/powerpc/kernel/rtas.c
arch/powerpc/kernel/rtas_flash.c
arch/powerpc/kernel/setup_64.c
arch/powerpc/kernel/smp.c
arch/powerpc/kernel/time.c
arch/powerpc/kernel/udbg_16550.c
arch/powerpc/mm/lmb.c
arch/powerpc/mm/mem.c
arch/powerpc/platforms/cell/Makefile
arch/powerpc/platforms/chrp/chrp.h
arch/powerpc/platforms/chrp/pci.c
arch/powerpc/platforms/chrp/setup.c
arch/powerpc/platforms/chrp/time.c
arch/powerpc/platforms/powermac/low_i2c.c
arch/powerpc/platforms/powermac/setup.c
arch/powerpc/platforms/pseries/eeh_driver.c
arch/powerpc/platforms/pseries/setup.c
arch/ppc/kernel/head_8xx.S
arch/ppc/kernel/ppc_ksyms.c
arch/ppc/syslib/ocp.c
arch/s390/mm/cmm.c
arch/sh64/kernel/sh_ksyms.c
arch/sparc/kernel/process.c
arch/x86_64/kernel/setup.c
arch/x86_64/kernel/time.c
arch/x86_64/kernel/x8664_ksyms.c
arch/x86_64/pci/mmconfig.c
crypto/scatterwalk.c
drivers/base/memory.c
drivers/cdrom/viocd.c
drivers/char/ser_a2232.c
drivers/char/watchdog/sbc_epx_c3.c
drivers/edac/i82875p_edac.c
drivers/macintosh/windfarm_core.c
drivers/media/dvb/dvb-usb/dtt200u.c
drivers/media/dvb/dvb-usb/vp7045.c
drivers/net/hamradio/baycom_par.c
drivers/net/mv643xx_eth.c
drivers/net/wan/pci200syn.c
drivers/net/wan/wanxl.c
drivers/scsi/aacraid/commsup.c
drivers/scsi/mac53c94.c
drivers/scsi/scsi_transport_iscsi.c
drivers/scsi/sg.c
drivers/tc/tc.c
drivers/video/backlight/backlight.c
drivers/video/backlight/lcd.c
drivers/video/pmag-ba-fb.c
drivers/video/pmagb-b-fb.c
fs/namespace.c
fs/nfs/nfsroot.c
fs/reiserfs/hashes.c
fs/select.c
include/asm-mips/io.h
include/asm-powerpc/dma-mapping.h
include/asm-powerpc/prom.h
include/linux/cpumask.h
include/linux/dcache.h
include/linux/dvb/video.h
include/linux/jbd.h
include/linux/mtd/map.h
include/linux/nodemask.h
include/linux/smp.h
kernel/compat.c
kernel/sys.c
kernel/timer.c
net/dccp/ccids/lib/tfrc_equation.c
net/ipv4/igmp.c
net/ipv4/xfrm4_policy.c
net/ipv6/mcast.c
net/ipv6/raw.c
net/ipv6/xfrm6_policy.c
net/xfrm/xfrm_policy.c
sound/oss/dmasound/tas_common.h
sound/oss/emu10k1/recmgr.c
sound/ppc/pmac.c
sound/ppc/tumbler.c

index 1284498..54e5f9b 100644 (file)
@@ -880,6 +880,10 @@ address which can extend beyond that limit.
     - device_type : Should be "soc"
     - ranges : Should be defined as specified in 1) to describe the
       translation of SOC addresses for memory mapped SOC registers.
+    - bus-frequency: Contains the bus frequency for the SOC node.
+      Typically, the value of this field is filled in by the boot
+      loader. 
+
 
   Recommended properties:
 
@@ -919,6 +923,7 @@ SOC.
                device_type = "soc";
                ranges = <00000000 e0000000 00100000>
                reg = <e0000000 00003000>;
+               bus-frequency = <0>;
        }
 
 
@@ -1170,6 +1175,8 @@ platforms are moved over to use the flattened-device-tree model.
 
        mdio@24520 {
                reg = <24520 20>;
+               device_type = "mdio"; 
+               compatible = "gianfar";
 
                ethernet-phy@0 {
                        ......
@@ -1317,6 +1324,7 @@ not necessary as they are usually the same as the root node.
                device_type = "soc";
                ranges = <00000000 e0000000 00100000>
                reg = <e0000000 00003000>;
+               bus-frequency = <0>;
 
                mdio@24520 {
                        reg = <24520 20>;
index f214f74..961c0d5 100644 (file)
@@ -202,18 +202,18 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
                        int i;
                        unsigned long tmp;
                        
+                       ret = 0;
                        for (i = 0; i <= PT_MAX; i++) {
                                tmp = get_reg(child, i);
                                
                                if (put_user(tmp, datap)) {
                                        ret = -EFAULT;
-                                       goto out_tsk;
+                                       break;
                                }
                                
                                data += sizeof(long);
                        }
 
-                       ret = 0;
                        break;
                }
 
@@ -222,10 +222,11 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
                        int i;
                        unsigned long tmp;
                        
+                       ret = 0;
                        for (i = 0; i <= PT_MAX; i++) {
                                if (get_user(tmp, datap)) {
                                        ret = -EFAULT;
-                                       goto out_tsk;
+                                       break;
                                }
                                
                                if (i == PT_DCCR) {
@@ -237,7 +238,6 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
                                data += sizeof(long);
                        }
                        
-                       ret = 0;
                        break;
                }
 
index d11206e..1ba57ef 100644 (file)
@@ -24,7 +24,6 @@
 /*
  * Setup options
  */
-struct drive_info_struct { char dummy[32]; } drive_info;
 struct screen_info screen_info;
 
 extern int root_mountflags;
index d58003f..c9104bf 100644 (file)
 #include <asm/machvec.h>
 #include <asm/system.h>
 
-/*
- * This is here so we can use the CMOS detection in ide-probe.c to
- * determine what drives are present.  In theory, we don't need this
- * as the auto-detection could be done via ide-probe.c:do_probe() but
- * in practice that would be much slower, which is painful when
- * running in the simulator.  Note that passing zeroes in DRIVE_INFO
- * is sufficient (the IDE driver will autodetect the drive geometry).
- */
-char drive_info[4*16];
-
 void __init
 dig_setup (char **cmdline_p)
 {
index ee36bff..aac1ba3 100644 (file)
@@ -125,20 +125,6 @@ struct screen_info sn_screen_info = {
 };
 
 /*
- * This is here so we can use the CMOS detection in ide-probe.c to
- * determine what drives are present.  In theory, we don't need this
- * as the auto-detection could be done via ide-probe.c:do_probe() but
- * in practice that would be much slower, which is painful when
- * running in the simulator.  Note that passing zeroes in DRIVE_INFO
- * is sufficient (the IDE driver will autodetect the drive geometry).
- */
-#ifdef CONFIG_IA64_GENERIC
-extern char drive_info[4 * 16];
-#else
-char drive_info[4 * 16];
-#endif
-
-/*
  * This routine can only be used during init, since
  * smp_boot_data is an init data structure.
  * We have to use smp_boot_data.cpu_phys_id to find
index dbc8a39..be8b711 100644 (file)
 #include <asm/irq.h>
 #include <asm/tlbflush.h>
 
-#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_HD) || defined(CONFIG_BLK_DEV_IDE_MODULE) || defined(CONFIG_BLK_DEV_HD_MODULE)
-extern struct drive_info_struct drive_info;
-EXPORT_SYMBOL(drive_info);
-#endif
-
 /* platform dependent support */
 EXPORT_SYMBOL(boot_cpu_data);
 EXPORT_SYMBOL(dump_fpu);
index c2e4dcc..d742037 100644 (file)
 extern void init_mmu(void);
 #endif
 
-#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_HD)  \
-       || defined(CONFIG_BLK_DEV_IDE_MODULE)                   \
-       || defined(CONFIG_BLK_DEV_HD_MODULE)
-struct drive_info_struct { char dummy[32]; } drive_info;
-#endif
-
 extern char _end[];
 
 /*
index e4362df..340730f 100644 (file)
@@ -66,7 +66,7 @@ _GLOBAL(load_up_fpu)
 #else
        ld      r4,PACACURRENT(r13)
        addi    r5,r4,THREAD            /* Get THREAD */
-       l     r4,THREAD_FPEXC_MODE(r5)
+       lwz     r4,THREAD_FPEXC_MODE(r5)
        ori     r12,r12,MSR_FP
        or      r12,r12,r4
        std     r12,_MSR(r1)
index 3082684..4156596 100644 (file)
@@ -749,11 +749,12 @@ iSeries_secondary_smp_loop:
 
        .globl decrementer_iSeries_masked
 decrementer_iSeries_masked:
+       /* We may not have a valid TOC pointer in here. */
        li      r11,1
        ld      r12,PACALPPACAPTR(r13)
        stb     r11,LPPACADECRINT(r12)
-       LOAD_REG_ADDRBASE(r12,tb_ticks_per_jiffy)
-       lwz     r12,ADDROFF(tb_ticks_per_jiffy)(r12)
+       LOAD_REG_IMMEDIATE(r12, tb_ticks_per_jiffy)
+       lwz     r12,0(r12)
        mtspr   SPRN_DEC,r12
        /* fall through */
 
index 4d9b438..946f321 100644 (file)
@@ -334,9 +334,6 @@ int iommu_map_sg(struct device *dev, struct iommu_table *tbl,
 
        spin_unlock_irqrestore(&(tbl->it_lock), flags);
 
-       /* Make sure updates are seen by hardware */
-       mb();
-
        DBG("mapped %d elements:\n", outcount);
 
        /* For the sake of iommu_unmap_sg, we clear out the length in the
@@ -347,6 +344,10 @@ int iommu_map_sg(struct device *dev, struct iommu_table *tbl,
                outs->dma_address = DMA_ERROR_CODE;
                outs->dma_length = 0;
        }
+
+       /* Make sure updates are seen by hardware */
+       mb();
+
        return outcount;
 
  failure:
@@ -358,6 +359,8 @@ int iommu_map_sg(struct device *dev, struct iommu_table *tbl,
                        npages = (PAGE_ALIGN(s->dma_address + s->dma_length) - vaddr)
                                >> PAGE_SHIFT;
                        __iommu_free(tbl, vaddr, npages);
+                       s->dma_address = DMA_ERROR_CODE;
+                       s->dma_length = 0;
                }
        }
        spin_unlock_irqrestore(&(tbl->it_lock), flags);
index d50c8df..294832a 100644 (file)
@@ -491,7 +491,12 @@ void __init finish_device_tree(void)
        size = 16;
        finish_node(allnodes, &size, 1);
        size -= 16;
-       end = start = (unsigned long) __va(lmb_alloc(size, 128));
+
+       if (0 == size)
+               end = start = 0;
+       else
+               end = start = (unsigned long)__va(lmb_alloc(size, 128));
+
        finish_node(allnodes, &end, 0);
        BUG_ON(end != start + size);
 
@@ -1398,8 +1403,8 @@ struct device_node *of_find_node_by_name(struct device_node *from,
 
        read_lock(&devtree_lock);
        np = from ? from->allnext : allnodes;
-       for (; np != 0; np = np->allnext)
-               if (np->name != 0 && strcasecmp(np->name, name) == 0
+       for (; np != NULL; np = np->allnext)
+               if (np->name != NULL && strcasecmp(np->name, name) == 0
                    && of_node_get(np))
                        break;
        if (from)
@@ -1917,3 +1922,30 @@ int prom_update_property(struct device_node *np,
 
        return 0;
 }
+
+#ifdef CONFIG_KEXEC
+/* We may have allocated the flat device tree inside the crash kernel region
+ * in prom_init. If so we need to move it out into regular memory. */
+void kdump_move_device_tree(void)
+{
+       unsigned long start, end;
+       struct boot_param_header *new;
+
+       start = __pa((unsigned long)initial_boot_params);
+       end = start + initial_boot_params->totalsize;
+
+       if (end < crashk_res.start || start > crashk_res.end)
+               return;
+
+       new = (struct boot_param_header*)
+               __va(lmb_alloc(initial_boot_params->totalsize, PAGE_SIZE));
+
+       memcpy(new, initial_boot_params, initial_boot_params->totalsize);
+
+       initial_boot_params = new;
+
+       DBG("Flat device tree blob moved to %p\n", initial_boot_params);
+
+       /* XXX should we unreserve the old DT? */
+}
+#endif /* CONFIG_KEXEC */
index 7881ec9..ec7153f 100644 (file)
@@ -2098,6 +2098,10 @@ unsigned long __init prom_init(unsigned long r3, unsigned long r4,
         */
        prom_init_stdout();
 
+       /* Bail if this is a kdump kernel. */
+       if (PHYSICAL_START > 0)
+               prom_panic("Error: You can't boot a kdump kernel from OF!\n");
+
        /*
         * Check for an initrd
         */
index a8099c8..3934c22 100644 (file)
@@ -465,8 +465,10 @@ u32 *of_get_pci_address(struct device_node *dev, int bar_no, u64 *size,
        if (parent == NULL)
                return NULL;
        bus = of_match_bus(parent);
-       if (strcmp(bus->name, "pci"))
+       if (strcmp(bus->name, "pci")) {
+               of_node_put(parent);
                return NULL;
+       }
        bus->count_cells(dev, &na, &ns);
        of_node_put(parent);
        if (!OF_CHECK_COUNTS(na, ns))
index 7fe4a5c..b5b2add 100644 (file)
@@ -22,6 +22,7 @@
 
 #include <asm/prom.h>
 #include <asm/rtas.h>
+#include <asm/hvcall.h>
 #include <asm/semaphore.h>
 #include <asm/machdep.h>
 #include <asm/page.h>
@@ -565,6 +566,7 @@ static int ibm_suspend_me_token = RTAS_UNKNOWN_SERVICE;
 #ifdef CONFIG_PPC_PSERIES
 static void rtas_percpu_suspend_me(void *info)
 {
+       int i;
        long rc;
        long flags;
        struct rtas_suspend_me_data *data =
@@ -587,18 +589,16 @@ static void rtas_percpu_suspend_me(void *info)
 
        if (rc == H_Continue) {
                data->waiting = 0;
-               rtas_call(ibm_suspend_me_token, 0, 1,
-                         data->args->args);
+               data->args->args[data->args->nargs] =
+                       rtas_call(ibm_suspend_me_token, 0, 1, NULL);
+               for_each_cpu(i)
+                       plpar_hcall_norets(H_PROD,i);
        } else {
                data->waiting = -EBUSY;
                printk(KERN_ERR "Error on H_Join hypervisor call\n");
        }
 
 out:
-       /* before we restore interrupts, make sure we don't
-        * generate a spurious soft lockup errors
-        */
-       touch_softlockup_watchdog();
        local_irq_restore(flags);
        return;
 }
index 5050009..aaf384c 100644 (file)
@@ -672,8 +672,7 @@ static void rtas_flash_firmware(int reboot_type)
 static void remove_flash_pde(struct proc_dir_entry *dp)
 {
        if (dp) {
-               if (dp->data != NULL)
-                       kfree(dp->data);
+               kfree(dp->data);
                dp->owner = NULL;
                remove_proc_entry(dp->name, dp->parent);
        }
index e29b275..a717dff 100644 (file)
@@ -398,6 +398,9 @@ void __init setup_system(void)
 {
        DBG(" -> setup_system()\n");
 
+#ifdef CONFIG_KEXEC
+       kdump_move_device_tree();
+#endif
        /*
         * Unflatten the device-tree passed by prom_init or kexec
         */
index c8458c5..13595a6 100644 (file)
@@ -540,6 +540,9 @@ int __devinit start_secondary(void *unused)
        if (smp_ops->take_timebase)
                smp_ops->take_timebase();
 
+       if (system_state > SYSTEM_BOOTING)
+               per_cpu(last_jiffy, cpu) = get_tb();
+
        spin_lock(&call_lock);
        cpu_set(cpu, cpu_online_map);
        spin_unlock(&call_lock);
index c4a294d..1886045 100644 (file)
@@ -612,10 +612,10 @@ void __init generic_calibrate_decr(void)
 
        ppc_tb_freq = DEFAULT_TB_FREQ;          /* hardcoded default */
        node_found = 0;
-       if (cpu != 0) {
+       if (cpu) {
                fp = (unsigned int *)get_property(cpu, "timebase-frequency",
                                                  NULL);
-               if (fp != 0) {
+               if (fp) {
                        node_found = 1;
                        ppc_tb_freq = *fp;
                }
@@ -626,10 +626,10 @@ void __init generic_calibrate_decr(void)
 
        ppc_proc_freq = DEFAULT_PROC_FREQ;
        node_found = 0;
-       if (cpu != 0) {
+       if (cpu) {
                fp = (unsigned int *)get_property(cpu, "clock-frequency",
                                                  NULL);
-               if (fp != 0) {
+               if (fp) {
                        node_found = 1;
                        ppc_proc_freq = *fp;
                }
index 2da65a9..5d29dcc 100644 (file)
@@ -144,7 +144,7 @@ unsigned int udbg_probe_uart_speed(void __iomem *comport, unsigned int clock)
 }
 
 #ifdef CONFIG_PPC_MAPLE
-void udbg_maple_real_putc(unsigned char c)
+void udbg_maple_real_putc(char c)
 {
        if (udbg_comport) {
                while ((real_readb(&udbg_comport->lsr) & LSR_THRE) == 0)
index 9584608..bbe3eac 100644 (file)
@@ -197,6 +197,8 @@ long __init lmb_reserve(unsigned long base, unsigned long size)
 {
        struct lmb_region *_rgn = &(lmb.reserved);
 
+       BUG_ON(0 == size);
+
        return lmb_add_region(_rgn, base, size);
 }
 
@@ -227,6 +229,8 @@ unsigned long __init lmb_alloc_base(unsigned long size, unsigned long align,
        long i, j;
        unsigned long base = 0;
 
+       BUG_ON(0 == size);
+
 #ifdef CONFIG_PPC32
        /* On 32-bit, make sure we allocate lowmem */
        if (max_addr == LMB_ALLOC_ANYWHERE)
index 15aac0d..550517c 100644 (file)
@@ -435,17 +435,12 @@ void clear_user_page(void *page, unsigned long vaddr, struct page *pg)
 {
        clear_page(page);
 
-       if (cpu_has_feature(CPU_FTR_COHERENT_ICACHE))
-               return;
        /*
         * We shouldnt have to do this, but some versions of glibc
         * require it (ld.so assumes zero filled pages are icache clean)
         * - Anton
         */
-
-       /* avoid an atomic op if possible */
-       if (test_bit(PG_arch_1, &pg->flags))
-               clear_bit(PG_arch_1, &pg->flags);
+       flush_dcache_page(pg);
 }
 EXPORT_SYMBOL(clear_user_page);
 
@@ -469,12 +464,7 @@ void copy_user_page(void *vto, void *vfrom, unsigned long vaddr,
                return;
 #endif
 
-       if (cpu_has_feature(CPU_FTR_COHERENT_ICACHE))
-               return;
-
-       /* avoid an atomic op if possible */
-       if (test_bit(PG_arch_1, &pg->flags))
-               clear_bit(PG_arch_1, &pg->flags);
+       flush_dcache_page(pg);
 }
 
 void flush_icache_user_range(struct vm_area_struct *vma, struct page *page,
index 16031b5..3b998a3 100644 (file)
@@ -2,7 +2,7 @@ obj-y                   += interrupt.o iommu.o setup.o spider-pic.o
 obj-y                  += pervasive.o
 
 obj-$(CONFIG_SMP)      += smp.o
-obj-$(CONFIG_SPU_FS)   += spufs/ spu-base.o
+obj-$(CONFIG_SPU_FS)   += spu-base.o spufs/
 
 spu-base-y             += spu_base.o spu_priv1.o
 
index 3a2057f..814f547 100644 (file)
@@ -5,7 +5,6 @@
 extern void chrp_nvram_init(void);
 extern void chrp_get_rtc_time(struct rtc_time *);
 extern int chrp_set_rtc_time(struct rtc_time *);
-extern void chrp_calibrate_decr(void);
 extern long chrp_time_init(void);
 
 extern void chrp_find_bridges(void);
index 00c52f2..8ef279a 100644 (file)
@@ -204,9 +204,11 @@ static void __init setup_peg2(struct pci_controller *hose, struct device_node *d
        struct device_node *root = find_path_device("/");
        struct device_node *rtas;
 
+       of_node_get(root);
        rtas = of_find_node_by_name (root, "rtas");
        if (rtas) {
                hose->ops = &rtas_pci_ops;
+               of_node_put(rtas);
        } else {
                printk ("RTAS supporting Pegasos OF not found, please upgrade"
                        " your firmware\n");
index 2dc87aa..e1fadbf 100644 (file)
@@ -506,7 +506,7 @@ void __init chrp_init(void)
        ppc_md.halt           = rtas_halt;
 
        ppc_md.time_init      = chrp_time_init;
-       ppc_md.calibrate_decr = chrp_calibrate_decr;
+       ppc_md.calibrate_decr = generic_calibrate_decr;
 
        /* this may get overridden with rtas routines later... */
        ppc_md.set_rtc_time   = chrp_set_rtc_time;
index 36a0f97..78df2e7 100644 (file)
@@ -167,24 +167,3 @@ void chrp_get_rtc_time(struct rtc_time *tm)
        tm->tm_mon = mon;
        tm->tm_year = year;
 }
-
-
-void __init chrp_calibrate_decr(void)
-{
-       struct device_node *cpu;
-       unsigned int freq, *fp;
-
-       /*
-        * The cpu node should have a timebase-frequency property
-        * to tell us the rate at which the decrementer counts.
-        */
-       freq = 16666000;                /* hardcoded default */
-       cpu = find_type_devices("cpu");
-       if (cpu != 0) {
-               fp = (unsigned int *)
-                       get_property(cpu, "timebase-frequency", NULL);
-               if (fp != 0)
-                       freq = *fp;
-       }
-       ppc_tb_freq = freq;
-}
index 535c802..87eb6bb 100644 (file)
@@ -1052,8 +1052,7 @@ struct pmac_i2c_bus *pmac_i2c_adapter_to_bus(struct i2c_adapter *adapter)
 }
 EXPORT_SYMBOL_GPL(pmac_i2c_adapter_to_bus);
 
-extern int pmac_i2c_match_adapter(struct device_node *dev,
-                                 struct i2c_adapter *adapter)
+int pmac_i2c_match_adapter(struct device_node *dev, struct i2c_adapter *adapter)
 {
        struct pmac_i2c_bus *bus = pmac_i2c_find_bus(dev);
 
index 89c4c36..1955462 100644 (file)
@@ -82,8 +82,6 @@
 
 #undef SHOW_GATWICK_IRQS
 
-unsigned char drive_info;
-
 int ppc_override_l2cr = 0;
 int ppc_override_l2cr_value;
 int has_l2cache = 0;
index 6373372..e3cbba4 100644 (file)
@@ -333,7 +333,7 @@ void handle_eeh_events (struct eeh_event *event)
                rc = eeh_reset_device(frozen_pdn, NULL);
                if (rc)
                        goto hard_fail;
-               pci_walk_bus(frozen_bus, eeh_report_reset, 0);
+               pci_walk_bus(frozen_bus, eeh_report_reset, NULL);
        }
 
        /* If all devices reported they can proceed, the re-enable PIO */
@@ -342,11 +342,11 @@ void handle_eeh_events (struct eeh_event *event)
                rc = eeh_reset_device(frozen_pdn, NULL);
                if (rc)
                        goto hard_fail;
-               pci_walk_bus(frozen_bus, eeh_report_reset, 0);
+               pci_walk_bus(frozen_bus, eeh_report_reset, NULL);
        }
 
        /* Tell all device drivers that they can resume operations */
-       pci_walk_bus(frozen_bus, eeh_report_resume, 0);
+       pci_walk_bus(frozen_bus, eeh_report_resume, NULL);
 
        return;
        
@@ -367,7 +367,7 @@ hard_fail:
        eeh_slot_error_detail(frozen_pdn, 2 /* Permanent Error */);
 
        /* Notify all devices that they're about to go down. */
-       pci_walk_bus(frozen_bus, eeh_report_failure, 0);
+       pci_walk_bus(frozen_bus, eeh_report_failure, NULL);
 
        /* Shut down the device drivers for good. */
        pcibios_remove_pci_devices(frozen_bus);
index da6ceba..9edeca8 100644 (file)
@@ -585,7 +585,7 @@ static int pSeries_pci_probe_mode(struct pci_bus *bus)
 static void pseries_kexec_cpu_down(int crash_shutdown, int secondary)
 {
        /* Don't risk a hypervisor call if we're crashing */
-       if (!crash_shutdown) {
+       if (firmware_has_feature(FW_FEATURE_SPLPAR) && !crash_shutdown) {
                unsigned long vpa = __pa(get_lppaca());
 
                if (unregister_vpa(hard_smp_processor_id(), vpa)) {
index 3e6ca7f..c1e89ad 100644 (file)
@@ -810,13 +810,16 @@ initial_mmu:
        mtspr   SPRN_MD_TWC, r9
        li      r11, MI_BOOTINIT        /* Create RPN for address 0 */
        addis   r11, r11, 0x0080        /* Add 8M */
-       mtspr   SPRN_MD_RPN, r8
+       mtspr   SPRN_MD_RPN, r11
+
+       addi    r10, r10, 0x0100
+       mtspr   SPRN_MD_CTR, r10
 
        addis   r8, r8, 0x0080          /* Add 8M */
        mtspr   SPRN_MD_EPN, r8
        mtspr   SPRN_MD_TWC, r9
        addis   r11, r11, 0x0080        /* Add 8M */
-       mtspr   SPRN_MD_RPN, r8
+       mtspr   SPRN_MD_RPN, r11
 #endif
 
        /* Since the cache is enabled according to the information we
index 3a6e4bc..15bd9b4 100644 (file)
@@ -186,11 +186,15 @@ EXPORT_SYMBOL(flush_tlb_kernel_range);
 EXPORT_SYMBOL(flush_tlb_page);
 EXPORT_SYMBOL(_tlbie);
 #ifdef CONFIG_ALTIVEC
+#ifndef CONFIG_SMP
 EXPORT_SYMBOL(last_task_used_altivec);
+#endif
 EXPORT_SYMBOL(giveup_altivec);
 #endif /* CONFIG_ALTIVEC */
 #ifdef CONFIG_SPE
+#ifndef CONFIG_SMP
 EXPORT_SYMBOL(last_task_used_spe);
+#endif
 EXPORT_SYMBOL(giveup_spe);
 #endif /* CONFIG_SPE */
 #ifdef CONFIG_SMP
index ab34b1d..2fe28de 100644 (file)
@@ -189,8 +189,8 @@ ocp_device_resume(struct device *dev)
 struct bus_type ocp_bus_type = {
        .name = "ocp",
        .match = ocp_device_match,
-       .probe = ocp_driver_probe,
-       .remove = ocp_driver_remove,
+       .probe = ocp_device_probe,
+       .remove = ocp_device_remove,
        .suspend = ocp_device_suspend,
        .resume = ocp_device_resume,
 };
index 2d5cb13..b075ab4 100644 (file)
@@ -42,8 +42,8 @@ static volatile long cmm_timed_pages_target = 0;
 static long cmm_timeout_pages = 0;
 static long cmm_timeout_seconds = 0;
 
-static struct cmm_page_array *cmm_page_list = 0;
-static struct cmm_page_array *cmm_timed_page_list = 0;
+static struct cmm_page_array *cmm_page_list = NULL;
+static struct cmm_page_array *cmm_timed_page_list = NULL;
 
 static unsigned long cmm_thread_active = 0;
 static struct work_struct cmm_thread_starter;
@@ -259,7 +259,7 @@ static struct ctl_table cmm_table[];
 
 static int
 cmm_pages_handler(ctl_table *ctl, int write, struct file *filp,
-                 void *buffer, size_t *lenp, loff_t *ppos)
+                 void __user *buffer, size_t *lenp, loff_t *ppos)
 {
        char buf[16], *p;
        long pages;
@@ -300,7 +300,7 @@ cmm_pages_handler(ctl_table *ctl, int write, struct file *filp,
 
 static int
 cmm_timeout_handler(ctl_table *ctl, int write, struct file *filp,
-                   void *buffer, size_t *lenp, loff_t *ppos)
+                   void __user *buffer, size_t *lenp, loff_t *ppos)
 {
        char buf[64], *p;
        long pages, seconds;
@@ -419,7 +419,7 @@ cmm_init (void)
 #ifdef CONFIG_CMM_IUCV
        smsg_register_callback(SMSG_PREFIX, cmm_smsg_target);
 #endif
-       INIT_WORK(&cmm_thread_starter, (void *) cmm_start_thread, 0);
+       INIT_WORK(&cmm_thread_starter, (void *) cmm_start_thread, NULL);
        init_waitqueue_head(&cmm_thread_wait);
        init_timer(&cmm_timer);
        return 0;
index 472b450..de29c45 100644 (file)
 
 extern int dump_fpu(struct pt_regs *, elf_fpregset_t *);
 
-#if 0
-/* Not yet - there's no declaration of drive_info anywhere. */
-#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_HD) || defined(CONFIG_BLK_DEV_IDE_MODULE) || defined(CONFIG_BLK_DEV_HD_MODULE)
-extern struct drive_info_struct drive_info;
-EXPORT_SYMBOL(drive_info);
-#endif
-#endif
-
 /* platform dependent support */
 EXPORT_SYMBOL(dump_fpu);
 EXPORT_SYMBOL(iounmap);
index fbb05a4..118cac8 100644 (file)
@@ -54,7 +54,7 @@ void (*pm_idle)(void);
  * This is done via auxio, but could be used as a fallback
  * handler when auxio is not present-- unused for now...
  */
-void (*pm_power_off)(void);
+void (*pm_power_off)(void) = machine_power_off;
 
 /*
  * sysctl - toggle power-off restriction for serial console 
index 363db5a..9435ab7 100644 (file)
@@ -94,7 +94,6 @@ unsigned long saved_video_mode;
 /*
  * Setup options
  */
-struct drive_info_struct { char dummy[32]; } drive_info;
 struct screen_info screen_info;
 struct sys_desc_table_struct {
        unsigned short length;
@@ -572,7 +571,6 @@ void __init setup_arch(char **cmdline_p)
        unsigned long kernel_end;
 
        ROOT_DEV = old_decode_dev(ORIG_ROOT_DEV);
-       drive_info = DRIVE_INFO;
        screen_info = SCREEN_INFO;
        edid_info = EDID_INFO;
        saved_video_mode = SAVED_VIDEO_MODE;
index c0844bf..dba7237 100644 (file)
@@ -748,7 +748,7 @@ static __init int late_hpet_init(void)
         * Timer0 and Timer1 is used by platform.
         */
        hd.hd_phys_address = vxtime.hpet_address;
-       hd.hd_address = (void *)fix_to_virt(FIX_HPET_BASE);
+       hd.hd_address = (void __iomem *)fix_to_virt(FIX_HPET_BASE);
        hd.hd_nirqs = ntimer;
        hd.hd_flags = HPET_DATA_PLATFORM;
        hpet_reserve_timer(&hd, 0);
index b614d54..3496abc 100644 (file)
@@ -39,11 +39,6 @@ extern void __write_lock_failed(rwlock_t *rw);
 extern void __read_lock_failed(rwlock_t *rw);
 #endif
 
-#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_HD) || defined(CONFIG_BLK_DEV_IDE_MODULE) || defined(CONFIG_BLK_DEV_HD_MODULE)
-extern struct drive_info_struct drive_info;
-EXPORT_SYMBOL(drive_info);
-#endif
-
 /* platform dependent support */
 EXPORT_SYMBOL(boot_cpu_data);
 //EXPORT_SYMBOL(dump_fpu);
index b4a3fe4..18f371f 100644 (file)
@@ -49,7 +49,7 @@ static char __iomem *get_virt(unsigned int seg, unsigned bus)
                return pci_mmcfg_virt[0].virt;
 
        /* Fall back to type 0 */
-       return 0;
+       return NULL;
 }
 
 static char __iomem *pci_dev_base(unsigned int seg, unsigned int bus, unsigned int devfn)
index 47ac90e..2953e2c 100644 (file)
@@ -17,7 +17,6 @@
 #include <linux/mm.h>
 #include <linux/pagemap.h>
 #include <linux/highmem.h>
-#include <asm/bug.h>
 #include <asm/scatterlist.h>
 #include "internal.h"
 #include "scatterwalk.h"
index d1a0522..105a0d6 100644 (file)
@@ -303,7 +303,7 @@ static int block_size_init(void)
  */
 #ifdef CONFIG_ARCH_MEMORY_PROBE
 static ssize_t
-memory_probe_store(struct class *class, const char __user *buf, size_t count)
+memory_probe_store(struct class *class, const char *buf, size_t count)
 {
        u64 phys_addr;
        int ret;
index 193446e..e276172 100644 (file)
@@ -42,8 +42,6 @@
 #include <linux/proc_fs.h>
 #include <linux/seq_file.h>
 
-#include <asm/bug.h>
-
 #include <asm/vio.h>
 #include <asm/scatterlist.h>
 #include <asm/iseries/hv_types.h>
index 80a5b84..fee68cc 100644 (file)
 
 #include <linux/serial.h>
 #include <linux/generic_serial.h>
+#include <linux/tty_flip.h>
 
 #include "ser_a2232.h"
 #include "ser_a2232fw.h"
index 7a4dfb9..837b1ec 100644 (file)
@@ -92,7 +92,7 @@ static int epx_c3_release(struct inode *inode, struct file *file)
        return 0;
 }
 
-static ssize_t epx_c3_write(struct file *file, const char *data,
+static ssize_t epx_c3_write(struct file *file, const char __user *data,
                        size_t len, loff_t *ppos)
 {
        /* Refresh the timer. */
@@ -105,6 +105,7 @@ static int epx_c3_ioctl(struct inode *inode, struct file *file,
                        unsigned int cmd, unsigned long arg)
 {
        int options, retval = -EINVAL;
+       int __user *argp = (void __user *)arg;
        static struct watchdog_info ident = {
                .options                = WDIOF_KEEPALIVEPING |
                                          WDIOF_MAGICCLOSE,
@@ -114,20 +115,19 @@ static int epx_c3_ioctl(struct inode *inode, struct file *file,
 
        switch (cmd) {
        case WDIOC_GETSUPPORT:
-               if (copy_to_user((struct watchdog_info *)arg,
-                                &ident, sizeof(ident)))
+               if (copy_to_user(argp, &ident, sizeof(ident)))
                        return -EFAULT;
                return 0;
        case WDIOC_GETSTATUS:
        case WDIOC_GETBOOTSTATUS:
-               return put_user(0,(int *)arg);
+               return put_user(0, argp);
        case WDIOC_KEEPALIVE:
                epx_c3_pet();
                return 0;
        case WDIOC_GETTIMEOUT:
-               return put_user(WATCHDOG_TIMEOUT,(int *)arg);
-       case WDIOC_SETOPTIONS: {
-               if (get_user(options, (int *)arg))
+               return put_user(WATCHDOG_TIMEOUT, argp);
+       case WDIOC_SETOPTIONS:
+               if (get_user(options, argp))
                        return -EFAULT;
 
                if (options & WDIOS_DISABLECARD) {
@@ -141,7 +141,6 @@ static int epx_c3_ioctl(struct inode *inode, struct file *file,
                }
 
                return retval;
-       }
        default:
                return -ENOIOCTLCMD;
        }
index 009c08f..1991f94 100644 (file)
@@ -159,7 +159,7 @@ enum i82875p_chips {
 
 struct i82875p_pvt {
        struct pci_dev *ovrfl_pdev;
-       void *ovrfl_window;
+       void __iomem *ovrfl_window;
 };
 
 
index 6c2a471..32d4664 100644 (file)
@@ -33,6 +33,7 @@
 #include <linux/reboot.h>
 #include <linux/device.h>
 #include <linux/platform_device.h>
+#include <linux/mutex.h>
 
 #include "windfarm.h"
 
@@ -48,7 +49,7 @@
 
 static LIST_HEAD(wf_controls);
 static LIST_HEAD(wf_sensors);
-static DECLARE_MUTEX(wf_lock);
+static DEFINE_MUTEX(wf_lock);
 static struct notifier_block *wf_client_list;
 static int wf_client_count;
 static unsigned int wf_overtemp;
@@ -160,12 +161,12 @@ int wf_register_control(struct wf_control *new_ct)
 {
        struct wf_control *ct;
 
-       down(&wf_lock);
+       mutex_lock(&wf_lock);
        list_for_each_entry(ct, &wf_controls, link) {
                if (!strcmp(ct->name, new_ct->name)) {
                        printk(KERN_WARNING "windfarm: trying to register"
                               " duplicate control %s\n", ct->name);
-                       up(&wf_lock);
+                       mutex_unlock(&wf_lock);
                        return -EEXIST;
                }
        }
@@ -175,7 +176,7 @@ int wf_register_control(struct wf_control *new_ct)
        DBG("wf: Registered control %s\n", new_ct->name);
 
        wf_notify(WF_EVENT_NEW_CONTROL, new_ct);
-       up(&wf_lock);
+       mutex_unlock(&wf_lock);
 
        return 0;
 }
@@ -183,9 +184,9 @@ EXPORT_SYMBOL_GPL(wf_register_control);
 
 void wf_unregister_control(struct wf_control *ct)
 {
-       down(&wf_lock);
+       mutex_lock(&wf_lock);
        list_del(&ct->link);
-       up(&wf_lock);
+       mutex_unlock(&wf_lock);
 
        DBG("wf: Unregistered control %s\n", ct->name);
 
@@ -197,16 +198,16 @@ struct wf_control * wf_find_control(const char *name)
 {
        struct wf_control *ct;
 
-       down(&wf_lock);
+       mutex_lock(&wf_lock);
        list_for_each_entry(ct, &wf_controls, link) {
                if (!strcmp(ct->name, name)) {
                        if (wf_get_control(ct))
                                ct = NULL;
-                       up(&wf_lock);
+                       mutex_unlock(&wf_lock);
                        return ct;
                }
        }
-       up(&wf_lock);
+       mutex_unlock(&wf_lock);
        return NULL;
 }
 EXPORT_SYMBOL_GPL(wf_find_control);
@@ -250,12 +251,12 @@ int wf_register_sensor(struct wf_sensor *new_sr)
 {
        struct wf_sensor *sr;
 
-       down(&wf_lock);
+       mutex_lock(&wf_lock);
        list_for_each_entry(sr, &wf_sensors, link) {
                if (!strcmp(sr->name, new_sr->name)) {
                        printk(KERN_WARNING "windfarm: trying to register"
                               " duplicate sensor %s\n", sr->name);
-                       up(&wf_lock);
+                       mutex_unlock(&wf_lock);
                        return -EEXIST;
                }
        }
@@ -265,7 +266,7 @@ int wf_register_sensor(struct wf_sensor *new_sr)
        DBG("wf: Registered sensor %s\n", new_sr->name);
 
        wf_notify(WF_EVENT_NEW_SENSOR, new_sr);
-       up(&wf_lock);
+       mutex_unlock(&wf_lock);
 
        return 0;
 }
@@ -273,9 +274,9 @@ EXPORT_SYMBOL_GPL(wf_register_sensor);
 
 void wf_unregister_sensor(struct wf_sensor *sr)
 {
-       down(&wf_lock);
+       mutex_lock(&wf_lock);
        list_del(&sr->link);
-       up(&wf_lock);
+       mutex_unlock(&wf_lock);
 
        DBG("wf: Unregistered sensor %s\n", sr->name);
 
@@ -287,16 +288,16 @@ struct wf_sensor * wf_find_sensor(const char *name)
 {
        struct wf_sensor *sr;
 
-       down(&wf_lock);
+       mutex_lock(&wf_lock);
        list_for_each_entry(sr, &wf_sensors, link) {
                if (!strcmp(sr->name, name)) {
                        if (wf_get_sensor(sr))
                                sr = NULL;
-                       up(&wf_lock);
+                       mutex_unlock(&wf_lock);
                        return sr;
                }
        }
-       up(&wf_lock);
+       mutex_unlock(&wf_lock);
        return NULL;
 }
 EXPORT_SYMBOL_GPL(wf_find_sensor);
@@ -329,7 +330,7 @@ int wf_register_client(struct notifier_block *nb)
        struct wf_control *ct;
        struct wf_sensor *sr;
 
-       down(&wf_lock);
+       mutex_lock(&wf_lock);
        rc = notifier_chain_register(&wf_client_list, nb);
        if (rc != 0)
                goto bail;
@@ -341,19 +342,19 @@ int wf_register_client(struct notifier_block *nb)
        if (wf_client_count == 1)
                wf_start_thread();
  bail:
-       up(&wf_lock);
+       mutex_unlock(&wf_lock);
        return rc;
 }
 EXPORT_SYMBOL_GPL(wf_register_client);
 
 int wf_unregister_client(struct notifier_block *nb)
 {
-       down(&wf_lock);
+       mutex_lock(&wf_lock);
        notifier_chain_unregister(&wf_client_list, nb);
        wf_client_count++;
        if (wf_client_count == 0)
                wf_stop_thread();
-       up(&wf_lock);
+       mutex_unlock(&wf_lock);
 
        return 0;
 }
@@ -361,23 +362,23 @@ EXPORT_SYMBOL_GPL(wf_unregister_client);
 
 void wf_set_overtemp(void)
 {
-       down(&wf_lock);
+       mutex_lock(&wf_lock);
        wf_overtemp++;
        if (wf_overtemp == 1) {
                printk(KERN_WARNING "windfarm: Overtemp condition detected !\n");
                wf_overtemp_counter = 0;
                wf_notify(WF_EVENT_OVERTEMP, NULL);
        }
-       up(&wf_lock);
+       mutex_unlock(&wf_lock);
 }
 EXPORT_SYMBOL_GPL(wf_set_overtemp);
 
 void wf_clear_overtemp(void)
 {
-       down(&wf_lock);
+       mutex_lock(&wf_lock);
        WARN_ON(wf_overtemp == 0);
        if (wf_overtemp == 0) {
-               up(&wf_lock);
+               mutex_unlock(&wf_lock);
                return;
        }
        wf_overtemp--;
@@ -385,7 +386,7 @@ void wf_clear_overtemp(void)
                printk(KERN_WARNING "windfarm: Overtemp condition cleared !\n");
                wf_notify(WF_EVENT_NORMALTEMP, NULL);
        }
-       up(&wf_lock);
+       mutex_unlock(&wf_lock);
 }
 EXPORT_SYMBOL_GPL(wf_clear_overtemp);
 
index 130ea7f..12ebaf8 100644 (file)
@@ -151,7 +151,7 @@ static struct dvb_usb_properties dtt200u_properties = {
                  .cold_ids = { &dtt200u_usb_table[0], NULL },
                  .warm_ids = { &dtt200u_usb_table[1], NULL },
                },
-               { 0 },
+               { NULL },
        }
 };
 
@@ -192,7 +192,7 @@ static struct dvb_usb_properties wt220u_properties = {
                  .cold_ids = { &dtt200u_usb_table[2], NULL },
                  .warm_ids = { &dtt200u_usb_table[3], NULL },
                },
-               { 0 },
+               { NULL },
        }
 };
 
index 0282049..3835235 100644 (file)
@@ -247,7 +247,7 @@ static struct dvb_usb_properties vp7045_properties = {
                  .cold_ids = { &vp7045_usb_table[2], NULL },
                  .warm_ids = { &vp7045_usb_table[3], NULL },
                },
-               { 0 },
+               { NULL },
        }
 };
 
index 3b1bef1..77411a0 100644 (file)
@@ -86,7 +86,6 @@
 #include <linux/bitops.h>
 #include <linux/jiffies.h>
 
-#include <asm/bug.h>
 #include <asm/system.h>
 #include <asm/uaccess.h>
 
index 7ef4b04..c0998ef 100644 (file)
@@ -32,6 +32,8 @@
  */
 #include <linux/init.h>
 #include <linux/dma-mapping.h>
+#include <linux/in.h>
+#include <linux/ip.h>
 #include <linux/tcp.h>
 #include <linux/udp.h>
 #include <linux/etherdevice.h>
index 8dea07b..eba8e5c 100644 (file)
@@ -29,7 +29,7 @@
 #include <linux/netdevice.h>
 #include <linux/hdlc.h>
 #include <linux/pci.h>
-#include <asm/delay.h>
+#include <linux/delay.h>
 #include <asm/io.h>
 
 #include "hd64572.h"
index 9c1e106..9d3b51c 100644 (file)
@@ -27,8 +27,8 @@
 #include <linux/hdlc.h>
 #include <linux/pci.h>
 #include <linux/dma-mapping.h>
+#include <linux/delay.h>
 #include <asm/io.h>
-#include <asm/delay.h>
 
 #include "wanxl.h"
 
index 38d6d00..014cc8d 100644 (file)
 #include <linux/slab.h>
 #include <linux/completion.h>
 #include <linux/blkdev.h>
+#include <linux/delay.h>
 #include <scsi/scsi_host.h>
 #include <scsi/scsi_device.h>
 #include <asm/semaphore.h>
-#include <asm/delay.h>
 
 #include "aacraid.h"
 
index 311a412..93edaa8 100644 (file)
@@ -537,9 +537,9 @@ static int mac53c94_remove(struct macio_dev *mdev)
        free_irq(fp->intr, fp);
 
        if (fp->regs)
-               iounmap((void *) fp->regs);
+               iounmap(fp->regs);
        if (fp->dma)
-               iounmap((void *) fp->dma);
+               iounmap(fp->dma);
        kfree(fp->dma_cmd_space);
 
        scsi_host_put(host);
index 59a1c9d..723f7ac 100644 (file)
@@ -463,7 +463,7 @@ static inline struct list_head *skb_to_lh(struct sk_buff *skb)
 }
 
 static void*
-mempool_zone_alloc_skb(unsigned int gfp_mask, void *pool_data)
+mempool_zone_alloc_skb(gfp_t gfp_mask, void *pool_data)
 {
        struct mempool_zone *zone = pool_data;
 
index 7d07000..2a54753 100644 (file)
@@ -1679,7 +1679,7 @@ static int
 sg_build_sgat(Sg_scatter_hold * schp, const Sg_fd * sfp, int tablesize)
 {
        int sg_bufflen = tablesize * sizeof(struct scatterlist);
-       unsigned int gfp_flags = GFP_ATOMIC | __GFP_NOWARN;
+       gfp_t gfp_flags = GFP_ATOMIC | __GFP_NOWARN;
 
        /*
         * TODO: test without low_dma, we should not need it since
index a0e5af6..4a51e56 100644 (file)
@@ -17,7 +17,6 @@
 #include <linux/types.h>
 
 #include <asm/addrspace.h>
-#include <asm/bug.h>
 #include <asm/errno.h>
 #include <asm/io.h>
 #include <asm/paccess.h>
index 9d5015e..bd39bbd 100644 (file)
@@ -13,7 +13,6 @@
 #include <linux/ctype.h>
 #include <linux/err.h>
 #include <linux/fb.h>
-#include <asm/bug.h>
 
 static ssize_t backlight_show_power(struct class_device *cdev, char *buf)
 {
index 68c6906..9e32485 100644 (file)
@@ -13,7 +13,6 @@
 #include <linux/ctype.h>
 #include <linux/err.h>
 #include <linux/fb.h>
-#include <asm/bug.h>
 
 static ssize_t lcd_show_power(struct class_device *cdev, char *buf)
 {
index f3927b6..f5361cd 100644 (file)
@@ -30,7 +30,6 @@
 #include <linux/module.h>
 #include <linux/types.h>
 
-#include <asm/bug.h>
 #include <asm/io.h>
 #include <asm/system.h>
 
index 25148de..eeeac92 100644 (file)
@@ -27,7 +27,6 @@
 #include <linux/module.h>
 #include <linux/types.h>
 
-#include <asm/bug.h>
 #include <asm/io.h>
 #include <asm/system.h>
 
index a2bef5c..058a448 100644 (file)
@@ -494,7 +494,7 @@ void umount_tree(struct vfsmount *mnt, int propagate, struct list_head *kill)
                p->mnt_namespace = NULL;
                list_del_init(&p->mnt_child);
                if (p->mnt_parent != p)
-                       mnt->mnt_mountpoint->d_mounted--;
+                       p->mnt_mountpoint->d_mounted--;
                change_mnt_propagation(p, MS_PRIVATE);
        }
 }
index e897e00..c0a754e 100644 (file)
@@ -465,10 +465,11 @@ static int __init root_nfs_ports(void)
                                        "number from server, using default\n");
                        port = nfsd_port;
                }
-               nfs_port = htons(port);
+               nfs_port = port;
                dprintk("Root-NFS: Portmapper on server returned %d "
                        "as nfsd port\n", port);
        }
+       nfs_port = htons(nfs_port);
 
        if ((port = root_nfs_getport(NFS_MNT_PROGRAM, mountd_ver, proto)) < 0) {
                printk(KERN_ERR "Root-NFS: Unable to get mountd port "
index a3ec238..e664ac1 100644 (file)
@@ -21,7 +21,6 @@
 #include <linux/kernel.h>
 #include <linux/reiserfs_fs.h>
 #include <asm/types.h>
-#include <asm/bug.h>
 
 #define DELTA 0x9E3779B9
 #define FULLROUNDS 10          /* 32 is overkill, 16 is strong crypto */
index c0f02d3..bc60a3e 100644 (file)
@@ -510,9 +510,9 @@ asmlinkage long sys_pselect6(int n, fd_set __user *inp, fd_set __user *outp,
 
        if (sig) {
                if (!access_ok(VERIFY_READ, sig, sizeof(void *)+sizeof(size_t))
-                   || __get_user(up, (sigset_t * __user *)sig)
+                   || __get_user(up, (sigset_t __user * __user *)sig)
                    || __get_user(sigsetsize,
-                               (size_t * __user)(sig+sizeof(void *))))
+                               (size_t __user *)(sig+sizeof(void *))))
                        return -EFAULT;
        }
 
index d426857..a9fa125 100644 (file)
@@ -18,7 +18,6 @@
 #include <linux/types.h>
 
 #include <asm/addrspace.h>
-#include <asm/bug.h>
 #include <asm/byteorder.h>
 #include <asm/cpu.h>
 #include <asm/cpu-features.h>
index 837756a..2ac63f5 100644 (file)
@@ -15,7 +15,6 @@
 #include <linux/mm.h>
 #include <asm/scatterlist.h>
 #include <asm/io.h>
-#include <asm/bug.h>
 
 #define DMA_ERROR_CODE         (~(dma_addr_t)0x0)
 
index 5b2bd4e..cbd297f 100644 (file)
@@ -222,5 +222,7 @@ extern int of_address_to_resource(struct device_node *dev, int index,
 extern int of_pci_address_to_resource(struct device_node *dev, int bar,
                                      struct resource *r);
 
+extern void kdump_move_device_tree(void);
+
 #endif /* __KERNEL__ */
 #endif /* _POWERPC_PROM_H */
index 13e9f4a..20b446f 100644 (file)
@@ -84,7 +84,6 @@
 #include <linux/kernel.h>
 #include <linux/threads.h>
 #include <linux/bitmap.h>
-#include <asm/bug.h>
 
 typedef struct { DECLARE_BITMAP(bits, NR_CPUS); } cpumask_t;
 extern cpumask_t _unused_cpumask_arg_;
index a3f0994..4361f37 100644 (file)
@@ -8,7 +8,6 @@
 #include <linux/spinlock.h>
 #include <linux/cache.h>
 #include <linux/rcupdate.h>
-#include <asm/bug.h>
 
 struct nameidata;
 struct vfsmount;
index b1999bf..b81e58b 100644 (file)
@@ -135,7 +135,7 @@ typedef struct video_spu {
 
 typedef struct video_spu_palette {      /* SPU Palette information */
        int length;
-       uint8_t *palette;
+       uint8_t __user *palette;
 } video_spu_palette_t;
 
 
index 751bb38..0fe4aa8 100644 (file)
@@ -239,7 +239,6 @@ typedef struct journal_superblock_s
 
 #include <linux/fs.h>
 #include <linux/sched.h>
-#include <asm/bug.h>
 
 #define JBD_ASSERTIONS
 #ifdef JBD_ASSERTIONS
index fedfbc8..7dfd6e1 100644 (file)
@@ -15,7 +15,6 @@
 #include <asm/unaligned.h>
 #include <asm/system.h>
 #include <asm/io.h>
-#include <asm/bug.h>
 
 #ifdef CONFIG_MTD_MAP_BANK_WIDTH_1
 #define map_bankwidth(map) 1
index 4726ef7..b959a45 100644 (file)
@@ -84,7 +84,6 @@
 #include <linux/threads.h>
 #include <linux/bitmap.h>
 #include <linux/numa.h>
-#include <asm/bug.h>
 
 typedef struct { DECLARE_BITMAP(bits, MAX_NUMNODES); } nodemask_t;
 extern nodemask_t _unused_nodemask_arg_;
index 9dfa3ee..44153fd 100644 (file)
@@ -17,7 +17,6 @@ extern void cpu_idle(void);
 #include <linux/compiler.h>
 #include <linux/thread_info.h>
 #include <asm/smp.h>
-#include <asm/bug.h>
 
 /*
  * main cross-CPU interfaces, handles INIT, TLB flush, STOP, etc.
index 1867290..8c9cd88 100644 (file)
@@ -23,7 +23,6 @@
 #include <linux/security.h>
 
 #include <asm/uaccess.h>
-#include <asm/bug.h>
 
 int get_compat_timespec(struct timespec *ts, const struct compat_timespec __user *cts)
 {
index 0929c69..f91218a 100644 (file)
@@ -428,7 +428,7 @@ void kernel_kexec(void)
 {
 #ifdef CONFIG_KEXEC
        struct kimage *image;
-       image = xchg(&kexec_image, 0);
+       image = xchg(&kexec_image, NULL);
        if (!image) {
                return;
        }
index 4f1cb0a..b9dad39 100644 (file)
@@ -495,7 +495,7 @@ unsigned long next_timer_interrupt(void)
        base = &__get_cpu_var(tvec_bases);
        spin_lock(&base->t_base.lock);
        expires = base->timer_jiffies + (LONG_MAX >> 1);
-       list = 0;
+       list = NULL;
 
        /* Look for timer events in tv1. */
        j = base->timer_jiffies & TVR_MASK;
index d2b5933..add3cae 100644 (file)
@@ -15,7 +15,6 @@
 #include <linux/config.h>
 #include <linux/module.h>
 
-#include <asm/bug.h>
 #include <asm/div64.h>
 
 #include "tfrc.h"
index 0b4e95f..64ce52b 100644 (file)
@@ -1578,7 +1578,7 @@ static int sf_setstate(struct ip_mc_list *pmc)
                        new_in = psf->sf_count[MCAST_INCLUDE] != 0;
                if (new_in) {
                        if (!psf->sf_oldin) {
-                               struct ip_sf_list *prev = 0;
+                               struct ip_sf_list *prev = NULL;
 
                                for (dpsf=pmc->tomb; dpsf; dpsf=dpsf->sf_next) {
                                        if (dpsf->sf_inaddr == psf->sf_inaddr)
index 42196ba..45f7ae5 100644 (file)
@@ -8,7 +8,6 @@
  *     
  */
 
-#include <asm/bug.h>
 #include <linux/compiler.h>
 #include <linux/config.h>
 #include <linux/inetdevice.h>
index 4420948..807c021 100644 (file)
@@ -1978,7 +1978,7 @@ static int sf_setstate(struct ifmcaddr6 *pmc)
                        new_in = psf->sf_count[MCAST_INCLUDE] != 0;
                if (new_in) {
                        if (!psf->sf_oldin) {
-                               struct ip6_sf_list *prev = 0;
+                               struct ip6_sf_list *prev = NULL;
 
                                for (dpsf=pmc->mca_tomb; dpsf;
                                     dpsf=dpsf->sf_next) {
index 66f1d12..738376c 100644 (file)
@@ -35,7 +35,6 @@
 #include <linux/skbuff.h>
 #include <asm/uaccess.h>
 #include <asm/ioctls.h>
-#include <asm/bug.h>
 
 #include <net/ip.h>
 #include <net/sock.h>
index 69bd957..91cce8b 100644 (file)
@@ -11,7 +11,6 @@
  * 
  */
 
-#include <asm/bug.h>
 #include <linux/compiler.h>
 #include <linux/config.h>
 #include <linux/netdevice.h>
index 077bbf9..dbf4620 100644 (file)
@@ -13,7 +13,6 @@
  *
  */
 
-#include <asm/bug.h>
 #include <linux/config.h>
 #include <linux/slab.h>
 #include <linux/kmod.h>
index 3a6d486..0741c28 100644 (file)
@@ -178,10 +178,10 @@ tas_write_register(       struct tas_data_t *self,
        if (write_mode & WRITE_SHADOW)
                memcpy(self->shadow[reg_num],data,reg_width);
        if (write_mode & WRITE_HW) {
-               rc=i2c_smbus_write_block_data(self->client,
-                                             reg_num,
-                                             reg_width,
-                                             data);
+               rc=i2c_smbus_write_i2c_block_data(self->client,
+                                                 reg_num,
+                                                 reg_width,
+                                                 data);
                if (rc < 0) {
                        printk("tas: I2C block write failed \n");  
                        return rc; 
@@ -199,10 +199,10 @@ tas_sync_register(        struct tas_data_t *self,
 
        if (reg_width==0 || self==NULL)
                return -EINVAL;
-       rc=i2c_smbus_write_block_data(self->client,
-                                     reg_num,
-                                     reg_width,
-                                     self->shadow[reg_num]);
+       rc=i2c_smbus_write_i2c_block_data(self->client,
+                                         reg_num,
+                                         reg_width,
+                                         self->shadow[reg_num]);
        if (rc < 0) {
                printk("tas: I2C block write failed \n");
                return rc;
index 67c3fd0..2ce5618 100644 (file)
@@ -29,7 +29,7 @@
  **********************************************************************
  */
 
-#include <asm/delay.h>
+#include <linux/delay.h>
 #include "8010.h"
 #include "recmgr.h"
 
index 4988f87..aa57170 100644 (file)
@@ -66,7 +66,7 @@ static int snd_pmac_dbdma_alloc(struct snd_pmac *chip, struct pmac_dbdma *rec, i
 
 static void snd_pmac_dbdma_free(struct snd_pmac *chip, struct pmac_dbdma *rec)
 {
-       if (rec) {
+       if (rec->space) {
                unsigned int rsize = sizeof(struct dbdma_cmd) * (rec->size + 1);
 
                dma_free_coherent(&chip->pdev->dev, rsize, rec->space, rec->dma_base);
@@ -881,6 +881,7 @@ static int __init snd_pmac_detect(struct snd_pmac *chip)
        chip->can_capture = 1;
        chip->num_freqs = ARRAY_SIZE(awacs_freqs);
        chip->freq_table = awacs_freqs;
+       chip->pdev = NULL;
 
        chip->control_mask = MASK_IEPC | MASK_IEE | 0x11; /* default */
 
index 15c63cb..838fc11 100644 (file)
@@ -239,8 +239,8 @@ static int tumbler_set_master_volume(struct pmac_tumbler *mix)
        block[4] = (right_vol >> 8)  & 0xff;
        block[5] = (right_vol >> 0)  & 0xff;
   
-       if (i2c_smbus_write_block_data(mix->i2c.client, TAS_REG_VOL,
-                                      6, block) < 0) {
+       if (i2c_smbus_write_i2c_block_data(mix->i2c.client, TAS_REG_VOL, 6,
+                                          block) < 0) {
                snd_printk("failed to set volume \n");
                return -EINVAL;
        }
@@ -345,8 +345,8 @@ static int tumbler_set_drc(struct pmac_tumbler *mix)
                val[1] = 0;
        }
 
-       if (i2c_smbus_write_block_data(mix->i2c.client, TAS_REG_DRC,
-                                      2, val) < 0) {
+       if (i2c_smbus_write_i2c_block_data(mix->i2c.client, TAS_REG_DRC,
+                                          2, val) < 0) {
                snd_printk("failed to set DRC\n");
                return -EINVAL;
        }
@@ -381,8 +381,8 @@ static int snapper_set_drc(struct pmac_tumbler *mix)
        val[4] = 0x60;
        val[5] = 0xa0;
 
-       if (i2c_smbus_write_block_data(mix->i2c.client, TAS_REG_DRC,
-                                      6, val) < 0) {
+       if (i2c_smbus_write_i2c_block_data(mix->i2c.client, TAS_REG_DRC,
+                                          6, val) < 0) {
                snd_printk("failed to set DRC\n");
                return -EINVAL;
        }
@@ -492,8 +492,8 @@ static int tumbler_set_mono_volume(struct pmac_tumbler *mix,
        vol = info->table[vol];
        for (i = 0; i < info->bytes; i++)
                block[i] = (vol >> ((info->bytes - i - 1) * 8)) & 0xff;
-       if (i2c_smbus_write_block_data(mix->i2c.client, info->reg,
-                                      info->bytes, block) < 0) {
+       if (i2c_smbus_write_i2c_block_data(mix->i2c.client, info->reg,
+                                          info->bytes, block) < 0) {
                snd_printk("failed to set mono volume %d\n", info->index);
                return -EINVAL;
        }
@@ -625,7 +625,8 @@ static int snapper_set_mix_vol1(struct pmac_tumbler *mix, int idx, int ch, int r
                for (j = 0; j < 3; j++)
                        block[i * 3 + j] = (vol >> ((2 - j) * 8)) & 0xff;
        }
-       if (i2c_smbus_write_block_data(mix->i2c.client, reg, 9, block) < 0) {
+       if (i2c_smbus_write_i2c_block_data(mix->i2c.client, reg,
+                                          9, block) < 0) {
                snd_printk("failed to set mono volume %d\n", reg);
                return -EINVAL;
        }