From ba2355200bd67999206df4796a75818494a3992b Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Tue, 7 Feb 2006 18:11:24 -0800 Subject: [PATCH] --- yaml --- r: 20083 b: refs/heads/master c: 1b9a4289017c8ab77b063a968c9df7e5a193e495 h: refs/heads/master i: 20081: bde43f8360a936245f02183dc5969e6134178503 20079: 3ef832b543a3daede0e8a7d51ca45e5fd6b00db0 v: v3 --- [refs] | 2 +- .../powerpc/booting-without-of.txt | 8 --- trunk/arch/cris/arch-v10/kernel/ptrace.c | 8 +-- trunk/arch/cris/kernel/setup.c | 1 + trunk/arch/ia64/dig/setup.c | 10 ++++ trunk/arch/ia64/sn/kernel/setup.c | 14 +++++ trunk/arch/m32r/kernel/m32r_ksyms.c | 5 ++ trunk/arch/m32r/kernel/setup.c | 6 +++ trunk/arch/powerpc/kernel/fpu.S | 2 +- trunk/arch/powerpc/kernel/head_64.S | 5 +- trunk/arch/powerpc/kernel/iommu.c | 9 ++-- trunk/arch/powerpc/kernel/prom.c | 38 ++----------- trunk/arch/powerpc/kernel/prom_init.c | 4 -- trunk/arch/powerpc/kernel/prom_parse.c | 4 +- trunk/arch/powerpc/kernel/rtas.c | 12 ++--- trunk/arch/powerpc/kernel/rtas_flash.c | 3 +- trunk/arch/powerpc/kernel/setup_64.c | 3 -- trunk/arch/powerpc/kernel/smp.c | 3 -- trunk/arch/powerpc/kernel/time.c | 8 +-- trunk/arch/powerpc/kernel/udbg_16550.c | 2 +- trunk/arch/powerpc/mm/lmb.c | 4 -- trunk/arch/powerpc/mm/mem.c | 14 ++++- trunk/arch/powerpc/platforms/cell/Makefile | 2 +- trunk/arch/powerpc/platforms/chrp/chrp.h | 1 + trunk/arch/powerpc/platforms/chrp/pci.c | 2 - trunk/arch/powerpc/platforms/chrp/setup.c | 2 +- trunk/arch/powerpc/platforms/chrp/time.c | 21 ++++++++ .../arch/powerpc/platforms/powermac/low_i2c.c | 3 +- trunk/arch/powerpc/platforms/powermac/setup.c | 2 + .../powerpc/platforms/pseries/eeh_driver.c | 8 +-- trunk/arch/powerpc/platforms/pseries/setup.c | 2 +- trunk/arch/ppc/kernel/head_8xx.S | 7 +-- trunk/arch/ppc/kernel/ppc_ksyms.c | 4 -- trunk/arch/ppc/syslib/ocp.c | 4 +- trunk/arch/s390/mm/cmm.c | 10 ++-- trunk/arch/sh64/kernel/sh_ksyms.c | 8 +++ trunk/arch/sparc/kernel/entry.S | 2 +- trunk/arch/sparc/kernel/process.c | 2 +- trunk/arch/sparc/kernel/systbls.S | 3 +- trunk/arch/sparc64/kernel/entry.S | 2 +- trunk/arch/sparc64/kernel/systbls.S | 5 +- trunk/arch/sparc64/solaris/systbl.S | 29 ---------- trunk/arch/x86_64/kernel/setup.c | 2 + trunk/arch/x86_64/kernel/time.c | 2 +- trunk/arch/x86_64/kernel/x8664_ksyms.c | 5 ++ trunk/arch/x86_64/pci/mmconfig.c | 2 +- trunk/crypto/scatterwalk.c | 1 + trunk/drivers/base/memory.c | 2 +- trunk/drivers/cdrom/viocd.c | 2 + trunk/drivers/char/ser_a2232.c | 1 - trunk/drivers/char/watchdog/sbc_epx_c3.c | 15 +++--- trunk/drivers/edac/i82875p_edac.c | 2 +- trunk/drivers/macintosh/windfarm_core.c | 53 +++++++++---------- trunk/drivers/media/dvb/dvb-usb/dtt200u.c | 4 +- trunk/drivers/media/dvb/dvb-usb/vp7045.c | 2 +- trunk/drivers/net/hamradio/baycom_par.c | 1 + trunk/drivers/net/mv643xx_eth.c | 2 - trunk/drivers/net/wan/pci200syn.c | 2 +- trunk/drivers/net/wan/wanxl.c | 2 +- trunk/drivers/scsi/aacraid/commsup.c | 2 +- trunk/drivers/scsi/mac53c94.c | 4 +- trunk/drivers/scsi/scsi_transport_iscsi.c | 2 +- trunk/drivers/scsi/sg.c | 2 +- trunk/drivers/tc/tc.c | 1 + trunk/drivers/video/backlight/backlight.c | 1 + trunk/drivers/video/backlight/lcd.c | 1 + trunk/drivers/video/pmag-ba-fb.c | 1 + trunk/drivers/video/pmagb-b-fb.c | 1 + trunk/fs/namespace.c | 2 +- trunk/fs/nfs/nfsroot.c | 3 +- trunk/fs/reiserfs/hashes.c | 1 + trunk/fs/select.c | 4 +- trunk/include/asm-mips/io.h | 1 + trunk/include/asm-powerpc/dma-mapping.h | 1 + trunk/include/asm-powerpc/prom.h | 2 - trunk/include/asm-sparc/unistd.h | 7 +-- trunk/include/asm-sparc64/unistd.h | 7 +-- trunk/include/linux/cpumask.h | 1 + trunk/include/linux/dcache.h | 1 + trunk/include/linux/dvb/video.h | 2 +- trunk/include/linux/jbd.h | 1 + trunk/include/linux/mtd/map.h | 1 + trunk/include/linux/nodemask.h | 1 + trunk/include/linux/smp.h | 1 + trunk/kernel/compat.c | 1 + trunk/kernel/sys.c | 2 +- trunk/kernel/timer.c | 2 +- trunk/net/dccp/ccids/lib/tfrc_equation.c | 1 + trunk/net/ipv4/igmp.c | 2 +- trunk/net/ipv4/xfrm4_policy.c | 1 + trunk/net/ipv6/mcast.c | 2 +- trunk/net/ipv6/raw.c | 1 + trunk/net/ipv6/xfrm6_policy.c | 1 + trunk/net/xfrm/xfrm_policy.c | 1 + trunk/sound/oss/dmasound/tas_common.h | 16 +++--- trunk/sound/oss/emu10k1/recmgr.c | 2 +- trunk/sound/ppc/pmac.c | 3 +- trunk/sound/ppc/tumbler.c | 19 ++++--- 98 files changed, 249 insertions(+), 240 deletions(-) diff --git a/[refs] b/[refs] index d22fc2c4ce8a..a378cd482f32 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 367636e8a9ef250d5b255f9d299e1c27cb3d7ea3 +refs/heads/master: 1b9a4289017c8ab77b063a968c9df7e5a193e495 diff --git a/trunk/Documentation/powerpc/booting-without-of.txt b/trunk/Documentation/powerpc/booting-without-of.txt index 54e5f9b1536d..1284498e847c 100644 --- a/trunk/Documentation/powerpc/booting-without-of.txt +++ b/trunk/Documentation/powerpc/booting-without-of.txt @@ -880,10 +880,6 @@ 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: @@ -923,7 +919,6 @@ SOC. device_type = "soc"; ranges = <00000000 e0000000 00100000> reg = ; - bus-frequency = <0>; } @@ -1175,8 +1170,6 @@ platforms are moved over to use the flattened-device-tree model. mdio@24520 { reg = <24520 20>; - device_type = "mdio"; - compatible = "gianfar"; ethernet-phy@0 { ...... @@ -1324,7 +1317,6 @@ not necessary as they are usually the same as the root node. device_type = "soc"; ranges = <00000000 e0000000 00100000> reg = ; - bus-frequency = <0>; mdio@24520 { reg = <24520 20>; diff --git a/trunk/arch/cris/arch-v10/kernel/ptrace.c b/trunk/arch/cris/arch-v10/kernel/ptrace.c index 961c0d58ded4..f214f74f264e 100644 --- a/trunk/arch/cris/arch-v10/kernel/ptrace.c +++ b/trunk/arch/cris/arch-v10/kernel/ptrace.c @@ -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; - break; + goto out_tsk; } data += sizeof(long); } + ret = 0; break; } @@ -222,11 +222,10 @@ 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; - break; + goto out_tsk; } if (i == PT_DCCR) { @@ -238,6 +237,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) data += sizeof(long); } + ret = 0; break; } diff --git a/trunk/arch/cris/kernel/setup.c b/trunk/arch/cris/kernel/setup.c index 1ba57efff60d..d11206e467ab 100644 --- a/trunk/arch/cris/kernel/setup.c +++ b/trunk/arch/cris/kernel/setup.c @@ -24,6 +24,7 @@ /* * Setup options */ +struct drive_info_struct { char dummy[32]; } drive_info; struct screen_info screen_info; extern int root_mountflags; diff --git a/trunk/arch/ia64/dig/setup.c b/trunk/arch/ia64/dig/setup.c index c9104bfff667..d58003f1ad02 100644 --- a/trunk/arch/ia64/dig/setup.c +++ b/trunk/arch/ia64/dig/setup.c @@ -25,6 +25,16 @@ #include #include +/* + * 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) { diff --git a/trunk/arch/ia64/sn/kernel/setup.c b/trunk/arch/ia64/sn/kernel/setup.c index aac1ba32c5e5..ee36bff93c30 100644 --- a/trunk/arch/ia64/sn/kernel/setup.c +++ b/trunk/arch/ia64/sn/kernel/setup.c @@ -124,6 +124,20 @@ struct screen_info sn_screen_info = { .orig_video_points = 16 }; +/* + * 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. diff --git a/trunk/arch/m32r/kernel/m32r_ksyms.c b/trunk/arch/m32r/kernel/m32r_ksyms.c index be8b711367ec..dbc8a392105f 100644 --- a/trunk/arch/m32r/kernel/m32r_ksyms.c +++ b/trunk/arch/m32r/kernel/m32r_ksyms.c @@ -18,6 +18,11 @@ #include #include +#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); diff --git a/trunk/arch/m32r/kernel/setup.c b/trunk/arch/m32r/kernel/setup.c index d742037a7ccb..c2e4dccf0112 100644 --- a/trunk/arch/m32r/kernel/setup.c +++ b/trunk/arch/m32r/kernel/setup.c @@ -37,6 +37,12 @@ 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[]; /* diff --git a/trunk/arch/powerpc/kernel/fpu.S b/trunk/arch/powerpc/kernel/fpu.S index 340730fb8c91..e4362dfa37fb 100644 --- a/trunk/arch/powerpc/kernel/fpu.S +++ b/trunk/arch/powerpc/kernel/fpu.S @@ -66,7 +66,7 @@ _GLOBAL(load_up_fpu) #else ld r4,PACACURRENT(r13) addi r5,r4,THREAD /* Get THREAD */ - lwz r4,THREAD_FPEXC_MODE(r5) + ld r4,THREAD_FPEXC_MODE(r5) ori r12,r12,MSR_FP or r12,r12,r4 std r12,_MSR(r1) diff --git a/trunk/arch/powerpc/kernel/head_64.S b/trunk/arch/powerpc/kernel/head_64.S index 415659629394..308268466342 100644 --- a/trunk/arch/powerpc/kernel/head_64.S +++ b/trunk/arch/powerpc/kernel/head_64.S @@ -749,12 +749,11 @@ 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_IMMEDIATE(r12, tb_ticks_per_jiffy) - lwz r12,0(r12) + LOAD_REG_ADDRBASE(r12,tb_ticks_per_jiffy) + lwz r12,ADDROFF(tb_ticks_per_jiffy)(r12) mtspr SPRN_DEC,r12 /* fall through */ diff --git a/trunk/arch/powerpc/kernel/iommu.c b/trunk/arch/powerpc/kernel/iommu.c index 946f3219fd29..4d9b4388918b 100644 --- a/trunk/arch/powerpc/kernel/iommu.c +++ b/trunk/arch/powerpc/kernel/iommu.c @@ -334,6 +334,9 @@ 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 @@ -344,10 +347,6 @@ 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: @@ -359,8 +358,6 @@ 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); diff --git a/trunk/arch/powerpc/kernel/prom.c b/trunk/arch/powerpc/kernel/prom.c index 294832a7e0a6..d50c8df0183e 100644 --- a/trunk/arch/powerpc/kernel/prom.c +++ b/trunk/arch/powerpc/kernel/prom.c @@ -491,12 +491,7 @@ void __init finish_device_tree(void) size = 16; finish_node(allnodes, &size, 1); size -= 16; - - if (0 == size) - end = start = 0; - else - end = start = (unsigned long)__va(lmb_alloc(size, 128)); - + end = start = (unsigned long) __va(lmb_alloc(size, 128)); finish_node(allnodes, &end, 0); BUG_ON(end != start + size); @@ -1403,8 +1398,8 @@ struct device_node *of_find_node_by_name(struct device_node *from, read_lock(&devtree_lock); np = from ? from->allnext : allnodes; - for (; np != NULL; np = np->allnext) - if (np->name != NULL && strcasecmp(np->name, name) == 0 + for (; np != 0; np = np->allnext) + if (np->name != 0 && strcasecmp(np->name, name) == 0 && of_node_get(np)) break; if (from) @@ -1922,30 +1917,3 @@ 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 */ diff --git a/trunk/arch/powerpc/kernel/prom_init.c b/trunk/arch/powerpc/kernel/prom_init.c index ec7153f4d47c..7881ec96ef11 100644 --- a/trunk/arch/powerpc/kernel/prom_init.c +++ b/trunk/arch/powerpc/kernel/prom_init.c @@ -2098,10 +2098,6 @@ 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 */ diff --git a/trunk/arch/powerpc/kernel/prom_parse.c b/trunk/arch/powerpc/kernel/prom_parse.c index 3934c227549b..a8099c806150 100644 --- a/trunk/arch/powerpc/kernel/prom_parse.c +++ b/trunk/arch/powerpc/kernel/prom_parse.c @@ -465,10 +465,8 @@ 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")) { - of_node_put(parent); + if (strcmp(bus->name, "pci")) return NULL; - } bus->count_cells(dev, &na, &ns); of_node_put(parent); if (!OF_CHECK_COUNTS(na, ns)) diff --git a/trunk/arch/powerpc/kernel/rtas.c b/trunk/arch/powerpc/kernel/rtas.c index b5b2add7ad1e..7fe4a5c944c9 100644 --- a/trunk/arch/powerpc/kernel/rtas.c +++ b/trunk/arch/powerpc/kernel/rtas.c @@ -22,7 +22,6 @@ #include #include -#include #include #include #include @@ -566,7 +565,6 @@ 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 = @@ -589,16 +587,18 @@ static void rtas_percpu_suspend_me(void *info) if (rc == H_Continue) { data->waiting = 0; - 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); + rtas_call(ibm_suspend_me_token, 0, 1, + data->args->args); } 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; } diff --git a/trunk/arch/powerpc/kernel/rtas_flash.c b/trunk/arch/powerpc/kernel/rtas_flash.c index aaf384c3f04a..50500093c97f 100644 --- a/trunk/arch/powerpc/kernel/rtas_flash.c +++ b/trunk/arch/powerpc/kernel/rtas_flash.c @@ -672,7 +672,8 @@ static void rtas_flash_firmware(int reboot_type) static void remove_flash_pde(struct proc_dir_entry *dp) { if (dp) { - kfree(dp->data); + if (dp->data != NULL) + kfree(dp->data); dp->owner = NULL; remove_proc_entry(dp->name, dp->parent); } diff --git a/trunk/arch/powerpc/kernel/setup_64.c b/trunk/arch/powerpc/kernel/setup_64.c index a717dff695ef..e29b275e09e0 100644 --- a/trunk/arch/powerpc/kernel/setup_64.c +++ b/trunk/arch/powerpc/kernel/setup_64.c @@ -398,9 +398,6 @@ 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 */ diff --git a/trunk/arch/powerpc/kernel/smp.c b/trunk/arch/powerpc/kernel/smp.c index 13595a64f013..c8458c531b25 100644 --- a/trunk/arch/powerpc/kernel/smp.c +++ b/trunk/arch/powerpc/kernel/smp.c @@ -540,9 +540,6 @@ 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); diff --git a/trunk/arch/powerpc/kernel/time.c b/trunk/arch/powerpc/kernel/time.c index 1886045a2fd8..c4a294d657b9 100644 --- a/trunk/arch/powerpc/kernel/time.c +++ b/trunk/arch/powerpc/kernel/time.c @@ -612,10 +612,10 @@ void __init generic_calibrate_decr(void) ppc_tb_freq = DEFAULT_TB_FREQ; /* hardcoded default */ node_found = 0; - if (cpu) { + if (cpu != 0) { fp = (unsigned int *)get_property(cpu, "timebase-frequency", NULL); - if (fp) { + if (fp != 0) { 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) { + if (cpu != 0) { fp = (unsigned int *)get_property(cpu, "clock-frequency", NULL); - if (fp) { + if (fp != 0) { node_found = 1; ppc_proc_freq = *fp; } diff --git a/trunk/arch/powerpc/kernel/udbg_16550.c b/trunk/arch/powerpc/kernel/udbg_16550.c index 5d29dcca523c..2da65a9c93f6 100644 --- a/trunk/arch/powerpc/kernel/udbg_16550.c +++ b/trunk/arch/powerpc/kernel/udbg_16550.c @@ -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(char c) +void udbg_maple_real_putc(unsigned char c) { if (udbg_comport) { while ((real_readb(&udbg_comport->lsr) & LSR_THRE) == 0) diff --git a/trunk/arch/powerpc/mm/lmb.c b/trunk/arch/powerpc/mm/lmb.c index bbe3eac918e8..9584608fd768 100644 --- a/trunk/arch/powerpc/mm/lmb.c +++ b/trunk/arch/powerpc/mm/lmb.c @@ -197,8 +197,6 @@ 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); } @@ -229,8 +227,6 @@ 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) diff --git a/trunk/arch/powerpc/mm/mem.c b/trunk/arch/powerpc/mm/mem.c index 550517c2dd42..15aac0d78dfa 100644 --- a/trunk/arch/powerpc/mm/mem.c +++ b/trunk/arch/powerpc/mm/mem.c @@ -435,12 +435,17 @@ 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 */ - flush_dcache_page(pg); + + /* avoid an atomic op if possible */ + if (test_bit(PG_arch_1, &pg->flags)) + clear_bit(PG_arch_1, &pg->flags); } EXPORT_SYMBOL(clear_user_page); @@ -464,7 +469,12 @@ void copy_user_page(void *vto, void *vfrom, unsigned long vaddr, return; #endif - flush_dcache_page(pg); + 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); } void flush_icache_user_range(struct vm_area_struct *vma, struct page *page, diff --git a/trunk/arch/powerpc/platforms/cell/Makefile b/trunk/arch/powerpc/platforms/cell/Makefile index 3b998a393e3f..16031b565be4 100644 --- a/trunk/arch/powerpc/platforms/cell/Makefile +++ b/trunk/arch/powerpc/platforms/cell/Makefile @@ -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) += spu-base.o spufs/ +obj-$(CONFIG_SPU_FS) += spufs/ spu-base.o spu-base-y += spu_base.o spu_priv1.o diff --git a/trunk/arch/powerpc/platforms/chrp/chrp.h b/trunk/arch/powerpc/platforms/chrp/chrp.h index 814f54742e0f..3a2057fa314a 100644 --- a/trunk/arch/powerpc/platforms/chrp/chrp.h +++ b/trunk/arch/powerpc/platforms/chrp/chrp.h @@ -5,6 +5,7 @@ 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); diff --git a/trunk/arch/powerpc/platforms/chrp/pci.c b/trunk/arch/powerpc/platforms/chrp/pci.c index 8ef279ad36ad..00c52f27ef4f 100644 --- a/trunk/arch/powerpc/platforms/chrp/pci.c +++ b/trunk/arch/powerpc/platforms/chrp/pci.c @@ -204,11 +204,9 @@ 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"); diff --git a/trunk/arch/powerpc/platforms/chrp/setup.c b/trunk/arch/powerpc/platforms/chrp/setup.c index e1fadbf49150..2dc87aa5962f 100644 --- a/trunk/arch/powerpc/platforms/chrp/setup.c +++ b/trunk/arch/powerpc/platforms/chrp/setup.c @@ -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 = generic_calibrate_decr; + ppc_md.calibrate_decr = chrp_calibrate_decr; /* this may get overridden with rtas routines later... */ ppc_md.set_rtc_time = chrp_set_rtc_time; diff --git a/trunk/arch/powerpc/platforms/chrp/time.c b/trunk/arch/powerpc/platforms/chrp/time.c index 78df2e7ca88a..36a0f97bb7b1 100644 --- a/trunk/arch/powerpc/platforms/chrp/time.c +++ b/trunk/arch/powerpc/platforms/chrp/time.c @@ -167,3 +167,24 @@ 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; +} diff --git a/trunk/arch/powerpc/platforms/powermac/low_i2c.c b/trunk/arch/powerpc/platforms/powermac/low_i2c.c index 87eb6bb7f0e7..535c802b369f 100644 --- a/trunk/arch/powerpc/platforms/powermac/low_i2c.c +++ b/trunk/arch/powerpc/platforms/powermac/low_i2c.c @@ -1052,7 +1052,8 @@ struct pmac_i2c_bus *pmac_i2c_adapter_to_bus(struct i2c_adapter *adapter) } EXPORT_SYMBOL_GPL(pmac_i2c_adapter_to_bus); -int pmac_i2c_match_adapter(struct device_node *dev, struct i2c_adapter *adapter) +extern int pmac_i2c_match_adapter(struct device_node *dev, + struct i2c_adapter *adapter) { struct pmac_i2c_bus *bus = pmac_i2c_find_bus(dev); diff --git a/trunk/arch/powerpc/platforms/powermac/setup.c b/trunk/arch/powerpc/platforms/powermac/setup.c index 1955462f4082..89c4c3636161 100644 --- a/trunk/arch/powerpc/platforms/powermac/setup.c +++ b/trunk/arch/powerpc/platforms/powermac/setup.c @@ -82,6 +82,8 @@ #undef SHOW_GATWICK_IRQS +unsigned char drive_info; + int ppc_override_l2cr = 0; int ppc_override_l2cr_value; int has_l2cache = 0; diff --git a/trunk/arch/powerpc/platforms/pseries/eeh_driver.c b/trunk/arch/powerpc/platforms/pseries/eeh_driver.c index e3cbba49fd6e..6373372932ba 100644 --- a/trunk/arch/powerpc/platforms/pseries/eeh_driver.c +++ b/trunk/arch/powerpc/platforms/pseries/eeh_driver.c @@ -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, NULL); + pci_walk_bus(frozen_bus, eeh_report_reset, 0); } /* 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, NULL); + pci_walk_bus(frozen_bus, eeh_report_reset, 0); } /* Tell all device drivers that they can resume operations */ - pci_walk_bus(frozen_bus, eeh_report_resume, NULL); + pci_walk_bus(frozen_bus, eeh_report_resume, 0); return; @@ -367,7 +367,7 @@ void handle_eeh_events (struct eeh_event *event) 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, NULL); + pci_walk_bus(frozen_bus, eeh_report_failure, 0); /* Shut down the device drivers for good. */ pcibios_remove_pci_devices(frozen_bus); diff --git a/trunk/arch/powerpc/platforms/pseries/setup.c b/trunk/arch/powerpc/platforms/pseries/setup.c index 9edeca83f434..da6cebaf72cd 100644 --- a/trunk/arch/powerpc/platforms/pseries/setup.c +++ b/trunk/arch/powerpc/platforms/pseries/setup.c @@ -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 (firmware_has_feature(FW_FEATURE_SPLPAR) && !crash_shutdown) { + if (!crash_shutdown) { unsigned long vpa = __pa(get_lppaca()); if (unregister_vpa(hard_smp_processor_id(), vpa)) { diff --git a/trunk/arch/ppc/kernel/head_8xx.S b/trunk/arch/ppc/kernel/head_8xx.S index c1e89ad0684d..3e6ca7f5843f 100644 --- a/trunk/arch/ppc/kernel/head_8xx.S +++ b/trunk/arch/ppc/kernel/head_8xx.S @@ -810,16 +810,13 @@ 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, r11 - - addi r10, r10, 0x0100 - mtspr SPRN_MD_CTR, r10 + mtspr SPRN_MD_RPN, r8 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, r11 + mtspr SPRN_MD_RPN, r8 #endif /* Since the cache is enabled according to the information we diff --git a/trunk/arch/ppc/kernel/ppc_ksyms.c b/trunk/arch/ppc/kernel/ppc_ksyms.c index 15bd9b448a48..3a6e4bcb3c53 100644 --- a/trunk/arch/ppc/kernel/ppc_ksyms.c +++ b/trunk/arch/ppc/kernel/ppc_ksyms.c @@ -186,15 +186,11 @@ 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 diff --git a/trunk/arch/ppc/syslib/ocp.c b/trunk/arch/ppc/syslib/ocp.c index 2fe28ded2c60..ab34b1d6072f 100644 --- a/trunk/arch/ppc/syslib/ocp.c +++ b/trunk/arch/ppc/syslib/ocp.c @@ -189,8 +189,8 @@ ocp_device_resume(struct device *dev) struct bus_type ocp_bus_type = { .name = "ocp", .match = ocp_device_match, - .probe = ocp_device_probe, - .remove = ocp_device_remove, + .probe = ocp_driver_probe, + .remove = ocp_driver_remove, .suspend = ocp_device_suspend, .resume = ocp_device_resume, }; diff --git a/trunk/arch/s390/mm/cmm.c b/trunk/arch/s390/mm/cmm.c index b075ab499d05..2d5cb1385753 100644 --- a/trunk/arch/s390/mm/cmm.c +++ b/trunk/arch/s390/mm/cmm.c @@ -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 = NULL; -static struct cmm_page_array *cmm_timed_page_list = NULL; +static struct cmm_page_array *cmm_page_list = 0; +static struct cmm_page_array *cmm_timed_page_list = 0; 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 __user *buffer, size_t *lenp, loff_t *ppos) + void *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 __user *buffer, size_t *lenp, loff_t *ppos) + void *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, NULL); + INIT_WORK(&cmm_thread_starter, (void *) cmm_start_thread, 0); init_waitqueue_head(&cmm_thread_wait); init_timer(&cmm_timer); return 0; diff --git a/trunk/arch/sh64/kernel/sh_ksyms.c b/trunk/arch/sh64/kernel/sh_ksyms.c index de29c45f23a7..472b450e61be 100644 --- a/trunk/arch/sh64/kernel/sh_ksyms.c +++ b/trunk/arch/sh64/kernel/sh_ksyms.c @@ -31,6 +31,14 @@ 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); diff --git a/trunk/arch/sparc/kernel/entry.S b/trunk/arch/sparc/kernel/entry.S index 267ec8f6fb58..887f6a160c58 100644 --- a/trunk/arch/sparc/kernel/entry.S +++ b/trunk/arch/sparc/kernel/entry.S @@ -38,7 +38,7 @@ #define curptr g6 -#define NR_SYSCALLS 299 /* Each OS is different... */ +#define NR_SYSCALLS 300 /* Each OS is different... */ /* These are just handy. */ #define _SV save %sp, -STACKFRAME_SZ, %sp diff --git a/trunk/arch/sparc/kernel/process.c b/trunk/arch/sparc/kernel/process.c index 118cac84a0f5..fbb05a452e51 100644 --- a/trunk/arch/sparc/kernel/process.c +++ b/trunk/arch/sparc/kernel/process.c @@ -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) = machine_power_off; +void (*pm_power_off)(void); /* * sysctl - toggle power-off restriction for serial console diff --git a/trunk/arch/sparc/kernel/systbls.S b/trunk/arch/sparc/kernel/systbls.S index 6877ae4cd1d9..c0314705d73a 100644 --- a/trunk/arch/sparc/kernel/systbls.S +++ b/trunk/arch/sparc/kernel/systbls.S @@ -78,7 +78,7 @@ sys_call_table: /*280*/ .long sys_ni_syscall, sys_add_key, sys_request_key, sys_keyctl, sys_openat /*285*/ .long sys_mkdirat, sys_mknodat, sys_fchownat, sys_futimesat, sys_newfstatat /*290*/ .long sys_unlinkat, sys_renameat, sys_linkat, sys_symlinkat, sys_readlinkat -/*295*/ .long sys_fchmodat, sys_faccessat, sys_pselect6, sys_ppoll +/*295*/ .long sys_fchmodat, sys_faccessat, sys_pselect6, sys_ppoll, sys_unshare #ifdef CONFIG_SUNOS_EMUL /* Now the SunOS syscall table. */ @@ -190,5 +190,6 @@ sunos_sys_table: /*290*/ .long sunos_nosys, sunos_nosys, sunos_nosys .long sunos_nosys, sunos_nosys, sunos_nosys .long sunos_nosys, sunos_nosys, sunos_nosys + .long sunos_nosys #endif diff --git a/trunk/arch/sparc64/kernel/entry.S b/trunk/arch/sparc64/kernel/entry.S index 12911e7463f2..a73553ae7e53 100644 --- a/trunk/arch/sparc64/kernel/entry.S +++ b/trunk/arch/sparc64/kernel/entry.S @@ -25,7 +25,7 @@ #define curptr g6 -#define NR_SYSCALLS 299 /* Each OS is different... */ +#define NR_SYSCALLS 300 /* Each OS is different... */ .text .align 32 diff --git a/trunk/arch/sparc64/kernel/systbls.S b/trunk/arch/sparc64/kernel/systbls.S index 2881faf36635..5928b3c33e27 100644 --- a/trunk/arch/sparc64/kernel/systbls.S +++ b/trunk/arch/sparc64/kernel/systbls.S @@ -79,7 +79,7 @@ sys_call_table32: /*280*/ .word sys_ni_syscall, sys_add_key, sys_request_key, sys_keyctl, compat_sys_openat .word sys_mkdirat, sys_mknodat, sys_fchownat, compat_sys_futimesat, compat_sys_newfstatat /*285*/ .word sys_unlinkat, sys_renameat, sys_linkat, sys_symlinkat, sys_readlinkat - .word sys_fchmodat, sys_faccessat, compat_sys_pselect6, compat_sys_ppoll + .word sys_fchmodat, sys_faccessat, compat_sys_pselect6, compat_sys_ppoll, sys_unshare #endif /* CONFIG_COMPAT */ @@ -148,7 +148,7 @@ sys_call_table: /*280*/ .word sys_nis_syscall, sys_add_key, sys_request_key, sys_keyctl, sys_openat .word sys_mkdirat, sys_mknodat, sys_fchownat, sys_futimesat, compat_sys_newfstatat /*285*/ .word sys_unlinkat, sys_renameat, sys_linkat, sys_symlinkat, sys_readlinkat - .word sys_fchmodat, sys_faccessat, sys_pselect6, sys_ppoll + .word sys_fchmodat, sys_faccessat, sys_pselect6, sys_ppoll, sys_unshare #if defined(CONFIG_SUNOS_EMUL) || defined(CONFIG_SOLARIS_EMUL) || \ defined(CONFIG_SOLARIS_EMUL_MODULE) @@ -261,4 +261,5 @@ sunos_sys_table: /*290*/ .word sunos_nosys, sunos_nosys, sunos_nosys .word sunos_nosys, sunos_nosys, sunos_nosys .word sunos_nosys, sunos_nosys, sunos_nosys + .word sunos_nosys #endif diff --git a/trunk/arch/sparc64/solaris/systbl.S b/trunk/arch/sparc64/solaris/systbl.S index d25667eeae10..7043ca18caf9 100644 --- a/trunk/arch/sparc64/solaris/systbl.S +++ b/trunk/arch/sparc64/solaris/systbl.S @@ -283,32 +283,3 @@ solaris_sys_table: .word solaris_unimplemented /* 253 */ .word solaris_unimplemented /* 254 */ .word solaris_unimplemented /* 255 */ - .word solaris_unimplemented /* 256 */ - .word solaris_unimplemented /* 257 */ - .word solaris_unimplemented /* 258 */ - .word solaris_unimplemented /* 259 */ - .word solaris_unimplemented /* 260 */ - .word solaris_unimplemented /* 261 */ - .word solaris_unimplemented /* 262 */ - .word solaris_unimplemented /* 263 */ - .word solaris_unimplemented /* 264 */ - .word solaris_unimplemented /* 265 */ - .word solaris_unimplemented /* 266 */ - .word solaris_unimplemented /* 267 */ - .word solaris_unimplemented /* 268 */ - .word solaris_unimplemented /* 269 */ - .word solaris_unimplemented /* 270 */ - .word solaris_unimplemented /* 271 */ - .word solaris_unimplemented /* 272 */ - .word solaris_unimplemented /* 273 */ - .word solaris_unimplemented /* 274 */ - .word solaris_unimplemented /* 275 */ - .word solaris_unimplemented /* 276 */ - .word solaris_unimplemented /* 277 */ - .word solaris_unimplemented /* 278 */ - .word solaris_unimplemented /* 279 */ - .word solaris_unimplemented /* 280 */ - .word solaris_unimplemented /* 281 */ - .word solaris_unimplemented /* 282 */ - .word solaris_unimplemented /* 283 */ - diff --git a/trunk/arch/x86_64/kernel/setup.c b/trunk/arch/x86_64/kernel/setup.c index 9435ab7d6fb8..363db5a003df 100644 --- a/trunk/arch/x86_64/kernel/setup.c +++ b/trunk/arch/x86_64/kernel/setup.c @@ -94,6 +94,7 @@ 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; @@ -571,6 +572,7 @@ 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; diff --git a/trunk/arch/x86_64/kernel/time.c b/trunk/arch/x86_64/kernel/time.c index dba7237be5c1..c0844bffbf84 100644 --- a/trunk/arch/x86_64/kernel/time.c +++ b/trunk/arch/x86_64/kernel/time.c @@ -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 __iomem *)fix_to_virt(FIX_HPET_BASE); + hd.hd_address = (void *)fix_to_virt(FIX_HPET_BASE); hd.hd_nirqs = ntimer; hd.hd_flags = HPET_DATA_PLATFORM; hpet_reserve_timer(&hd, 0); diff --git a/trunk/arch/x86_64/kernel/x8664_ksyms.c b/trunk/arch/x86_64/kernel/x8664_ksyms.c index 3496abc8d372..b614d54d2ae4 100644 --- a/trunk/arch/x86_64/kernel/x8664_ksyms.c +++ b/trunk/arch/x86_64/kernel/x8664_ksyms.c @@ -39,6 +39,11 @@ 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); diff --git a/trunk/arch/x86_64/pci/mmconfig.c b/trunk/arch/x86_64/pci/mmconfig.c index 18f371fe37f8..b4a3fe4ec249 100644 --- a/trunk/arch/x86_64/pci/mmconfig.c +++ b/trunk/arch/x86_64/pci/mmconfig.c @@ -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 NULL; + return 0; } static char __iomem *pci_dev_base(unsigned int seg, unsigned int bus, unsigned int devfn) diff --git a/trunk/crypto/scatterwalk.c b/trunk/crypto/scatterwalk.c index 2953e2cc56f0..47ac90e615f4 100644 --- a/trunk/crypto/scatterwalk.c +++ b/trunk/crypto/scatterwalk.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include "internal.h" #include "scatterwalk.h" diff --git a/trunk/drivers/base/memory.c b/trunk/drivers/base/memory.c index 105a0d61eb1f..d1a05224627e 100644 --- a/trunk/drivers/base/memory.c +++ b/trunk/drivers/base/memory.c @@ -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 *buf, size_t count) +memory_probe_store(struct class *class, const char __user *buf, size_t count) { u64 phys_addr; int ret; diff --git a/trunk/drivers/cdrom/viocd.c b/trunk/drivers/cdrom/viocd.c index e27617259552..193446e6a08a 100644 --- a/trunk/drivers/cdrom/viocd.c +++ b/trunk/drivers/cdrom/viocd.c @@ -42,6 +42,8 @@ #include #include +#include + #include #include #include diff --git a/trunk/drivers/char/ser_a2232.c b/trunk/drivers/char/ser_a2232.c index fee68cc895f8..80a5b840e22f 100644 --- a/trunk/drivers/char/ser_a2232.c +++ b/trunk/drivers/char/ser_a2232.c @@ -103,7 +103,6 @@ #include #include -#include #include "ser_a2232.h" #include "ser_a2232fw.h" diff --git a/trunk/drivers/char/watchdog/sbc_epx_c3.c b/trunk/drivers/char/watchdog/sbc_epx_c3.c index 837b1ec3ffe3..7a4dfb95d087 100644 --- a/trunk/drivers/char/watchdog/sbc_epx_c3.c +++ b/trunk/drivers/char/watchdog/sbc_epx_c3.c @@ -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 __user *data, +static ssize_t epx_c3_write(struct file *file, const char *data, size_t len, loff_t *ppos) { /* Refresh the timer. */ @@ -105,7 +105,6 @@ 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, @@ -115,19 +114,20 @@ static int epx_c3_ioctl(struct inode *inode, struct file *file, switch (cmd) { case WDIOC_GETSUPPORT: - if (copy_to_user(argp, &ident, sizeof(ident))) + if (copy_to_user((struct watchdog_info *)arg, + &ident, sizeof(ident))) return -EFAULT; return 0; case WDIOC_GETSTATUS: case WDIOC_GETBOOTSTATUS: - return put_user(0, argp); + return put_user(0,(int *)arg); case WDIOC_KEEPALIVE: epx_c3_pet(); return 0; case WDIOC_GETTIMEOUT: - return put_user(WATCHDOG_TIMEOUT, argp); - case WDIOC_SETOPTIONS: - if (get_user(options, argp)) + return put_user(WATCHDOG_TIMEOUT,(int *)arg); + case WDIOC_SETOPTIONS: { + if (get_user(options, (int *)arg)) return -EFAULT; if (options & WDIOS_DISABLECARD) { @@ -141,6 +141,7 @@ static int epx_c3_ioctl(struct inode *inode, struct file *file, } return retval; + } default: return -ENOIOCTLCMD; } diff --git a/trunk/drivers/edac/i82875p_edac.c b/trunk/drivers/edac/i82875p_edac.c index 1991f94af753..009c08fe5d69 100644 --- a/trunk/drivers/edac/i82875p_edac.c +++ b/trunk/drivers/edac/i82875p_edac.c @@ -159,7 +159,7 @@ enum i82875p_chips { struct i82875p_pvt { struct pci_dev *ovrfl_pdev; - void __iomem *ovrfl_window; + void *ovrfl_window; }; diff --git a/trunk/drivers/macintosh/windfarm_core.c b/trunk/drivers/macintosh/windfarm_core.c index 32d466441ac2..6c2a471ea6c0 100644 --- a/trunk/drivers/macintosh/windfarm_core.c +++ b/trunk/drivers/macintosh/windfarm_core.c @@ -33,7 +33,6 @@ #include #include #include -#include #include "windfarm.h" @@ -49,7 +48,7 @@ static LIST_HEAD(wf_controls); static LIST_HEAD(wf_sensors); -static DEFINE_MUTEX(wf_lock); +static DECLARE_MUTEX(wf_lock); static struct notifier_block *wf_client_list; static int wf_client_count; static unsigned int wf_overtemp; @@ -161,12 +160,12 @@ int wf_register_control(struct wf_control *new_ct) { struct wf_control *ct; - mutex_lock(&wf_lock); + down(&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); - mutex_unlock(&wf_lock); + up(&wf_lock); return -EEXIST; } } @@ -176,7 +175,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); - mutex_unlock(&wf_lock); + up(&wf_lock); return 0; } @@ -184,9 +183,9 @@ EXPORT_SYMBOL_GPL(wf_register_control); void wf_unregister_control(struct wf_control *ct) { - mutex_lock(&wf_lock); + down(&wf_lock); list_del(&ct->link); - mutex_unlock(&wf_lock); + up(&wf_lock); DBG("wf: Unregistered control %s\n", ct->name); @@ -198,16 +197,16 @@ struct wf_control * wf_find_control(const char *name) { struct wf_control *ct; - mutex_lock(&wf_lock); + down(&wf_lock); list_for_each_entry(ct, &wf_controls, link) { if (!strcmp(ct->name, name)) { if (wf_get_control(ct)) ct = NULL; - mutex_unlock(&wf_lock); + up(&wf_lock); return ct; } } - mutex_unlock(&wf_lock); + up(&wf_lock); return NULL; } EXPORT_SYMBOL_GPL(wf_find_control); @@ -251,12 +250,12 @@ int wf_register_sensor(struct wf_sensor *new_sr) { struct wf_sensor *sr; - mutex_lock(&wf_lock); + down(&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); - mutex_unlock(&wf_lock); + up(&wf_lock); return -EEXIST; } } @@ -266,7 +265,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); - mutex_unlock(&wf_lock); + up(&wf_lock); return 0; } @@ -274,9 +273,9 @@ EXPORT_SYMBOL_GPL(wf_register_sensor); void wf_unregister_sensor(struct wf_sensor *sr) { - mutex_lock(&wf_lock); + down(&wf_lock); list_del(&sr->link); - mutex_unlock(&wf_lock); + up(&wf_lock); DBG("wf: Unregistered sensor %s\n", sr->name); @@ -288,16 +287,16 @@ struct wf_sensor * wf_find_sensor(const char *name) { struct wf_sensor *sr; - mutex_lock(&wf_lock); + down(&wf_lock); list_for_each_entry(sr, &wf_sensors, link) { if (!strcmp(sr->name, name)) { if (wf_get_sensor(sr)) sr = NULL; - mutex_unlock(&wf_lock); + up(&wf_lock); return sr; } } - mutex_unlock(&wf_lock); + up(&wf_lock); return NULL; } EXPORT_SYMBOL_GPL(wf_find_sensor); @@ -330,7 +329,7 @@ int wf_register_client(struct notifier_block *nb) struct wf_control *ct; struct wf_sensor *sr; - mutex_lock(&wf_lock); + down(&wf_lock); rc = notifier_chain_register(&wf_client_list, nb); if (rc != 0) goto bail; @@ -342,19 +341,19 @@ int wf_register_client(struct notifier_block *nb) if (wf_client_count == 1) wf_start_thread(); bail: - mutex_unlock(&wf_lock); + up(&wf_lock); return rc; } EXPORT_SYMBOL_GPL(wf_register_client); int wf_unregister_client(struct notifier_block *nb) { - mutex_lock(&wf_lock); + down(&wf_lock); notifier_chain_unregister(&wf_client_list, nb); wf_client_count++; if (wf_client_count == 0) wf_stop_thread(); - mutex_unlock(&wf_lock); + up(&wf_lock); return 0; } @@ -362,23 +361,23 @@ EXPORT_SYMBOL_GPL(wf_unregister_client); void wf_set_overtemp(void) { - mutex_lock(&wf_lock); + down(&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); } - mutex_unlock(&wf_lock); + up(&wf_lock); } EXPORT_SYMBOL_GPL(wf_set_overtemp); void wf_clear_overtemp(void) { - mutex_lock(&wf_lock); + down(&wf_lock); WARN_ON(wf_overtemp == 0); if (wf_overtemp == 0) { - mutex_unlock(&wf_lock); + up(&wf_lock); return; } wf_overtemp--; @@ -386,7 +385,7 @@ void wf_clear_overtemp(void) printk(KERN_WARNING "windfarm: Overtemp condition cleared !\n"); wf_notify(WF_EVENT_NORMALTEMP, NULL); } - mutex_unlock(&wf_lock); + up(&wf_lock); } EXPORT_SYMBOL_GPL(wf_clear_overtemp); diff --git a/trunk/drivers/media/dvb/dvb-usb/dtt200u.c b/trunk/drivers/media/dvb/dvb-usb/dtt200u.c index 12ebaf8bddca..130ea7f21f5e 100644 --- a/trunk/drivers/media/dvb/dvb-usb/dtt200u.c +++ b/trunk/drivers/media/dvb/dvb-usb/dtt200u.c @@ -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 }, }, - { NULL }, + { 0 }, } }; @@ -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 }, }, - { NULL }, + { 0 }, } }; diff --git a/trunk/drivers/media/dvb/dvb-usb/vp7045.c b/trunk/drivers/media/dvb/dvb-usb/vp7045.c index 3835235b68df..028204956bb0 100644 --- a/trunk/drivers/media/dvb/dvb-usb/vp7045.c +++ b/trunk/drivers/media/dvb/dvb-usb/vp7045.c @@ -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 }, }, - { NULL }, + { 0 }, } }; diff --git a/trunk/drivers/net/hamradio/baycom_par.c b/trunk/drivers/net/hamradio/baycom_par.c index 77411a00d1ee..3b1bef1ee215 100644 --- a/trunk/drivers/net/hamradio/baycom_par.c +++ b/trunk/drivers/net/hamradio/baycom_par.c @@ -86,6 +86,7 @@ #include #include +#include #include #include diff --git a/trunk/drivers/net/mv643xx_eth.c b/trunk/drivers/net/mv643xx_eth.c index c0998ef938e0..7ef4b0434a3f 100644 --- a/trunk/drivers/net/mv643xx_eth.c +++ b/trunk/drivers/net/mv643xx_eth.c @@ -32,8 +32,6 @@ */ #include #include -#include -#include #include #include #include diff --git a/trunk/drivers/net/wan/pci200syn.c b/trunk/drivers/net/wan/pci200syn.c index eba8e5cfacc2..8dea07b47999 100644 --- a/trunk/drivers/net/wan/pci200syn.c +++ b/trunk/drivers/net/wan/pci200syn.c @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include #include "hd64572.h" diff --git a/trunk/drivers/net/wan/wanxl.c b/trunk/drivers/net/wan/wanxl.c index 9d3b51c3ef54..9c1e10602f2b 100644 --- a/trunk/drivers/net/wan/wanxl.c +++ b/trunk/drivers/net/wan/wanxl.c @@ -27,8 +27,8 @@ #include #include #include -#include #include +#include #include "wanxl.h" diff --git a/trunk/drivers/scsi/aacraid/commsup.c b/trunk/drivers/scsi/aacraid/commsup.c index 014cc8d54a9f..38d6d00fb0fc 100644 --- a/trunk/drivers/scsi/aacraid/commsup.c +++ b/trunk/drivers/scsi/aacraid/commsup.c @@ -38,10 +38,10 @@ #include #include #include -#include #include #include #include +#include #include "aacraid.h" diff --git a/trunk/drivers/scsi/mac53c94.c b/trunk/drivers/scsi/mac53c94.c index 93edaa8696cf..311a4122bd70 100644 --- a/trunk/drivers/scsi/mac53c94.c +++ b/trunk/drivers/scsi/mac53c94.c @@ -537,9 +537,9 @@ static int mac53c94_remove(struct macio_dev *mdev) free_irq(fp->intr, fp); if (fp->regs) - iounmap(fp->regs); + iounmap((void *) fp->regs); if (fp->dma) - iounmap(fp->dma); + iounmap((void *) fp->dma); kfree(fp->dma_cmd_space); scsi_host_put(host); diff --git a/trunk/drivers/scsi/scsi_transport_iscsi.c b/trunk/drivers/scsi/scsi_transport_iscsi.c index 723f7acbeb12..59a1c9d9d3bd 100644 --- a/trunk/drivers/scsi/scsi_transport_iscsi.c +++ b/trunk/drivers/scsi/scsi_transport_iscsi.c @@ -463,7 +463,7 @@ static inline struct list_head *skb_to_lh(struct sk_buff *skb) } static void* -mempool_zone_alloc_skb(gfp_t gfp_mask, void *pool_data) +mempool_zone_alloc_skb(unsigned int gfp_mask, void *pool_data) { struct mempool_zone *zone = pool_data; diff --git a/trunk/drivers/scsi/sg.c b/trunk/drivers/scsi/sg.c index 2a547538d444..7d0700091f3d 100644 --- a/trunk/drivers/scsi/sg.c +++ b/trunk/drivers/scsi/sg.c @@ -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); - gfp_t gfp_flags = GFP_ATOMIC | __GFP_NOWARN; + unsigned int gfp_flags = GFP_ATOMIC | __GFP_NOWARN; /* * TODO: test without low_dma, we should not need it since diff --git a/trunk/drivers/tc/tc.c b/trunk/drivers/tc/tc.c index 4a51e56f85b6..a0e5af638e0e 100644 --- a/trunk/drivers/tc/tc.c +++ b/trunk/drivers/tc/tc.c @@ -17,6 +17,7 @@ #include #include +#include #include #include #include diff --git a/trunk/drivers/video/backlight/backlight.c b/trunk/drivers/video/backlight/backlight.c index bd39bbd88d41..9d5015e99372 100644 --- a/trunk/drivers/video/backlight/backlight.c +++ b/trunk/drivers/video/backlight/backlight.c @@ -13,6 +13,7 @@ #include #include #include +#include static ssize_t backlight_show_power(struct class_device *cdev, char *buf) { diff --git a/trunk/drivers/video/backlight/lcd.c b/trunk/drivers/video/backlight/lcd.c index 9e32485ee7bb..68c690605aa7 100644 --- a/trunk/drivers/video/backlight/lcd.c +++ b/trunk/drivers/video/backlight/lcd.c @@ -13,6 +13,7 @@ #include #include #include +#include static ssize_t lcd_show_power(struct class_device *cdev, char *buf) { diff --git a/trunk/drivers/video/pmag-ba-fb.c b/trunk/drivers/video/pmag-ba-fb.c index f5361cd8ccce..f3927b6cda9d 100644 --- a/trunk/drivers/video/pmag-ba-fb.c +++ b/trunk/drivers/video/pmag-ba-fb.c @@ -30,6 +30,7 @@ #include #include +#include #include #include diff --git a/trunk/drivers/video/pmagb-b-fb.c b/trunk/drivers/video/pmagb-b-fb.c index eeeac924b500..25148de5fe67 100644 --- a/trunk/drivers/video/pmagb-b-fb.c +++ b/trunk/drivers/video/pmagb-b-fb.c @@ -27,6 +27,7 @@ #include #include +#include #include #include diff --git a/trunk/fs/namespace.c b/trunk/fs/namespace.c index 058a44865beb..a2bef5c81033 100644 --- a/trunk/fs/namespace.c +++ b/trunk/fs/namespace.c @@ -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) - p->mnt_mountpoint->d_mounted--; + mnt->mnt_mountpoint->d_mounted--; change_mnt_propagation(p, MS_PRIVATE); } } diff --git a/trunk/fs/nfs/nfsroot.c b/trunk/fs/nfs/nfsroot.c index c0a754ecdee6..e897e00c2c9d 100644 --- a/trunk/fs/nfs/nfsroot.c +++ b/trunk/fs/nfs/nfsroot.c @@ -465,11 +465,10 @@ static int __init root_nfs_ports(void) "number from server, using default\n"); port = nfsd_port; } - nfs_port = port; + nfs_port = htons(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 " diff --git a/trunk/fs/reiserfs/hashes.c b/trunk/fs/reiserfs/hashes.c index e664ac16fad9..a3ec238fd9e0 100644 --- a/trunk/fs/reiserfs/hashes.c +++ b/trunk/fs/reiserfs/hashes.c @@ -21,6 +21,7 @@ #include #include #include +#include #define DELTA 0x9E3779B9 #define FULLROUNDS 10 /* 32 is overkill, 16 is strong crypto */ diff --git a/trunk/fs/select.c b/trunk/fs/select.c index bc60a3e14ef3..c0f02d36c60e 100644 --- a/trunk/fs/select.c +++ b/trunk/fs/select.c @@ -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 * __user *)sig) + || __get_user(up, (sigset_t * __user *)sig) || __get_user(sigsetsize, - (size_t __user *)(sig+sizeof(void *)))) + (size_t * __user)(sig+sizeof(void *)))) return -EFAULT; } diff --git a/trunk/include/asm-mips/io.h b/trunk/include/asm-mips/io.h index a9fa1254894a..d42685747e7d 100644 --- a/trunk/include/asm-mips/io.h +++ b/trunk/include/asm-mips/io.h @@ -18,6 +18,7 @@ #include #include +#include #include #include #include diff --git a/trunk/include/asm-powerpc/dma-mapping.h b/trunk/include/asm-powerpc/dma-mapping.h index 2ac63f569592..837756ab7dc7 100644 --- a/trunk/include/asm-powerpc/dma-mapping.h +++ b/trunk/include/asm-powerpc/dma-mapping.h @@ -15,6 +15,7 @@ #include #include #include +#include #define DMA_ERROR_CODE (~(dma_addr_t)0x0) diff --git a/trunk/include/asm-powerpc/prom.h b/trunk/include/asm-powerpc/prom.h index cbd297f44cce..5b2bd4eefb01 100644 --- a/trunk/include/asm-powerpc/prom.h +++ b/trunk/include/asm-powerpc/prom.h @@ -222,7 +222,5 @@ 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 */ diff --git a/trunk/include/asm-sparc/unistd.h b/trunk/include/asm-sparc/unistd.h index 2ac64e65e336..0615d601a7c6 100644 --- a/trunk/include/asm-sparc/unistd.h +++ b/trunk/include/asm-sparc/unistd.h @@ -315,11 +315,12 @@ #define __NR_faccessat 296 #define __NR_pselect6 297 #define __NR_ppoll 298 +#define __NR_unshare 299 -/* WARNING: You MAY NOT add syscall numbers larger than 298, since +/* WARNING: You MAY NOT add syscall numbers larger than 299, since * all of the syscall tables in the Sparc kernel are - * sized to have 298 entries (starting at zero). Therefore - * find a free slot in the 0-298 range. + * sized to have 299 entries (starting at zero). Therefore + * find a free slot in the 0-299 range. */ #define _syscall0(type,name) \ diff --git a/trunk/include/asm-sparc64/unistd.h b/trunk/include/asm-sparc64/unistd.h index 84ac2bdb0902..c58ba8a096cf 100644 --- a/trunk/include/asm-sparc64/unistd.h +++ b/trunk/include/asm-sparc64/unistd.h @@ -317,11 +317,12 @@ #define __NR_faccessat 296 #define __NR_pselect6 297 #define __NR_ppoll 298 +#define __NR_unshare 299 -/* WARNING: You MAY NOT add syscall numbers larger than 298, since +/* WARNING: You MAY NOT add syscall numbers larger than 299, since * all of the syscall tables in the Sparc kernel are - * sized to have 298 entries (starting at zero). Therefore - * find a free slot in the 0-298 range. + * sized to have 299 entries (starting at zero). Therefore + * find a free slot in the 0-299 range. */ #define _syscall0(type,name) \ diff --git a/trunk/include/linux/cpumask.h b/trunk/include/linux/cpumask.h index 20b446f26ecd..13e9f4a3ab26 100644 --- a/trunk/include/linux/cpumask.h +++ b/trunk/include/linux/cpumask.h @@ -84,6 +84,7 @@ #include #include #include +#include typedef struct { DECLARE_BITMAP(bits, NR_CPUS); } cpumask_t; extern cpumask_t _unused_cpumask_arg_; diff --git a/trunk/include/linux/dcache.h b/trunk/include/linux/dcache.h index 4361f3789975..a3f09947940e 100644 --- a/trunk/include/linux/dcache.h +++ b/trunk/include/linux/dcache.h @@ -8,6 +8,7 @@ #include #include #include +#include struct nameidata; struct vfsmount; diff --git a/trunk/include/linux/dvb/video.h b/trunk/include/linux/dvb/video.h index b81e58b2ebf8..b1999bfeaa56 100644 --- a/trunk/include/linux/dvb/video.h +++ b/trunk/include/linux/dvb/video.h @@ -135,7 +135,7 @@ typedef struct video_spu { typedef struct video_spu_palette { /* SPU Palette information */ int length; - uint8_t __user *palette; + uint8_t *palette; } video_spu_palette_t; diff --git a/trunk/include/linux/jbd.h b/trunk/include/linux/jbd.h index 0fe4aa891ddc..751bb3849467 100644 --- a/trunk/include/linux/jbd.h +++ b/trunk/include/linux/jbd.h @@ -239,6 +239,7 @@ typedef struct journal_superblock_s #include #include +#include #define JBD_ASSERTIONS #ifdef JBD_ASSERTIONS diff --git a/trunk/include/linux/mtd/map.h b/trunk/include/linux/mtd/map.h index 7dfd6e1fcde7..fedfbc8a287f 100644 --- a/trunk/include/linux/mtd/map.h +++ b/trunk/include/linux/mtd/map.h @@ -15,6 +15,7 @@ #include #include #include +#include #ifdef CONFIG_MTD_MAP_BANK_WIDTH_1 #define map_bankwidth(map) 1 diff --git a/trunk/include/linux/nodemask.h b/trunk/include/linux/nodemask.h index b959a4525cbd..4726ef7ba8e8 100644 --- a/trunk/include/linux/nodemask.h +++ b/trunk/include/linux/nodemask.h @@ -84,6 +84,7 @@ #include #include #include +#include typedef struct { DECLARE_BITMAP(bits, MAX_NUMNODES); } nodemask_t; extern nodemask_t _unused_nodemask_arg_; diff --git a/trunk/include/linux/smp.h b/trunk/include/linux/smp.h index 44153fdf73fc..9dfa3ee769ae 100644 --- a/trunk/include/linux/smp.h +++ b/trunk/include/linux/smp.h @@ -17,6 +17,7 @@ extern void cpu_idle(void); #include #include #include +#include /* * main cross-CPU interfaces, handles INIT, TLB flush, STOP, etc. diff --git a/trunk/kernel/compat.c b/trunk/kernel/compat.c index 8c9cd88b6785..1867290c37e3 100644 --- a/trunk/kernel/compat.c +++ b/trunk/kernel/compat.c @@ -23,6 +23,7 @@ #include #include +#include int get_compat_timespec(struct timespec *ts, const struct compat_timespec __user *cts) { diff --git a/trunk/kernel/sys.c b/trunk/kernel/sys.c index f91218a5463e..0929c698affc 100644 --- a/trunk/kernel/sys.c +++ b/trunk/kernel/sys.c @@ -428,7 +428,7 @@ void kernel_kexec(void) { #ifdef CONFIG_KEXEC struct kimage *image; - image = xchg(&kexec_image, NULL); + image = xchg(&kexec_image, 0); if (!image) { return; } diff --git a/trunk/kernel/timer.c b/trunk/kernel/timer.c index b9dad3994676..4f1cb0ab5251 100644 --- a/trunk/kernel/timer.c +++ b/trunk/kernel/timer.c @@ -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 = NULL; + list = 0; /* Look for timer events in tv1. */ j = base->timer_jiffies & TVR_MASK; diff --git a/trunk/net/dccp/ccids/lib/tfrc_equation.c b/trunk/net/dccp/ccids/lib/tfrc_equation.c index add3cae65e2d..d2b5933b4510 100644 --- a/trunk/net/dccp/ccids/lib/tfrc_equation.c +++ b/trunk/net/dccp/ccids/lib/tfrc_equation.c @@ -15,6 +15,7 @@ #include #include +#include #include #include "tfrc.h" diff --git a/trunk/net/ipv4/igmp.c b/trunk/net/ipv4/igmp.c index 64ce52bf0485..0b4e95f93dad 100644 --- a/trunk/net/ipv4/igmp.c +++ b/trunk/net/ipv4/igmp.c @@ -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 = NULL; + struct ip_sf_list *prev = 0; for (dpsf=pmc->tomb; dpsf; dpsf=dpsf->sf_next) { if (dpsf->sf_inaddr == psf->sf_inaddr) diff --git a/trunk/net/ipv4/xfrm4_policy.c b/trunk/net/ipv4/xfrm4_policy.c index 45f7ae58f2c0..42196ba3b0b9 100644 --- a/trunk/net/ipv4/xfrm4_policy.c +++ b/trunk/net/ipv4/xfrm4_policy.c @@ -8,6 +8,7 @@ * */ +#include #include #include #include diff --git a/trunk/net/ipv6/mcast.c b/trunk/net/ipv6/mcast.c index 807c021d64a2..4420948a1bfe 100644 --- a/trunk/net/ipv6/mcast.c +++ b/trunk/net/ipv6/mcast.c @@ -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 = NULL; + struct ip6_sf_list *prev = 0; for (dpsf=pmc->mca_tomb; dpsf; dpsf=dpsf->sf_next) { diff --git a/trunk/net/ipv6/raw.c b/trunk/net/ipv6/raw.c index 738376cf0c51..66f1d12ea578 100644 --- a/trunk/net/ipv6/raw.c +++ b/trunk/net/ipv6/raw.c @@ -35,6 +35,7 @@ #include #include #include +#include #include #include diff --git a/trunk/net/ipv6/xfrm6_policy.c b/trunk/net/ipv6/xfrm6_policy.c index 91cce8b2d7a5..69bd957380e7 100644 --- a/trunk/net/ipv6/xfrm6_policy.c +++ b/trunk/net/ipv6/xfrm6_policy.c @@ -11,6 +11,7 @@ * */ +#include #include #include #include diff --git a/trunk/net/xfrm/xfrm_policy.c b/trunk/net/xfrm/xfrm_policy.c index dbf4620768d6..077bbf9fb9b7 100644 --- a/trunk/net/xfrm/xfrm_policy.c +++ b/trunk/net/xfrm/xfrm_policy.c @@ -13,6 +13,7 @@ * */ +#include #include #include #include diff --git a/trunk/sound/oss/dmasound/tas_common.h b/trunk/sound/oss/dmasound/tas_common.h index 0741c28e56ce..3a6d48666db0 100644 --- a/trunk/sound/oss/dmasound/tas_common.h +++ b/trunk/sound/oss/dmasound/tas_common.h @@ -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_i2c_block_data(self->client, - reg_num, - reg_width, - data); + rc=i2c_smbus_write_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_i2c_block_data(self->client, - reg_num, - reg_width, - self->shadow[reg_num]); + rc=i2c_smbus_write_block_data(self->client, + reg_num, + reg_width, + self->shadow[reg_num]); if (rc < 0) { printk("tas: I2C block write failed \n"); return rc; diff --git a/trunk/sound/oss/emu10k1/recmgr.c b/trunk/sound/oss/emu10k1/recmgr.c index 2ce56180e7d4..67c3fd04cfdd 100644 --- a/trunk/sound/oss/emu10k1/recmgr.c +++ b/trunk/sound/oss/emu10k1/recmgr.c @@ -29,7 +29,7 @@ ********************************************************************** */ -#include +#include #include "8010.h" #include "recmgr.h" diff --git a/trunk/sound/ppc/pmac.c b/trunk/sound/ppc/pmac.c index aa57170101fd..4988f873a7ba 100644 --- a/trunk/sound/ppc/pmac.c +++ b/trunk/sound/ppc/pmac.c @@ -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->space) { + if (rec) { unsigned int rsize = sizeof(struct dbdma_cmd) * (rec->size + 1); dma_free_coherent(&chip->pdev->dev, rsize, rec->space, rec->dma_base); @@ -881,7 +881,6 @@ 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 */ diff --git a/trunk/sound/ppc/tumbler.c b/trunk/sound/ppc/tumbler.c index 838fc113c441..15c63cb2ccba 100644 --- a/trunk/sound/ppc/tumbler.c +++ b/trunk/sound/ppc/tumbler.c @@ -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_i2c_block_data(mix->i2c.client, TAS_REG_VOL, 6, - block) < 0) { + if (i2c_smbus_write_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_i2c_block_data(mix->i2c.client, TAS_REG_DRC, - 2, val) < 0) { + if (i2c_smbus_write_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_i2c_block_data(mix->i2c.client, TAS_REG_DRC, - 6, val) < 0) { + if (i2c_smbus_write_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_i2c_block_data(mix->i2c.client, info->reg, - info->bytes, block) < 0) { + if (i2c_smbus_write_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,8 +625,7 @@ 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_i2c_block_data(mix->i2c.client, reg, - 9, block) < 0) { + if (i2c_smbus_write_block_data(mix->i2c.client, reg, 9, block) < 0) { snd_printk("failed to set mono volume %d\n", reg); return -EINVAL; }