Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Auto-update from upstream

Len Brown d8bcd8e4 5b2db367

+814 -567
+3 -3
MAINTAINERS
··· 536 536 M: mchehab@brturbo.com.br 537 537 L: video4linux-list@redhat.com 538 538 W: http://linuxtv.org 539 - T: quilt http://www.linuxtv.org/download/quilt/ 539 + T: git kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb.git 540 540 S: Maintained 541 541 542 542 BUSLOGIC SCSI DRIVER ··· 834 834 M: linux-dvb-maintainer@linuxtv.org 835 835 L: linux-dvb@linuxtv.org (subscription required) 836 836 W: http://linuxtv.org/ 837 - T: quilt http://www.linuxtv.org/download/quilt/ 837 + T: git kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb.git 838 838 S: Supported 839 839 840 840 EATA-DMA SCSI DRIVER ··· 2896 2896 M: mchehab@brturbo.com.br 2897 2897 L: video4linux-list@redhat.com 2898 2898 W: http://linuxtv.org 2899 - T: quilt http://www.linuxtv.org/download/quilt/ 2899 + T: git kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb.git 2900 2900 S: Maintained 2901 2901 2902 2902 W1 DALLAS'S 1-WIRE BUS
+2 -2
Makefile
··· 1 1 VERSION = 2 2 2 PATCHLEVEL = 6 3 3 SUBLEVEL = 15 4 - EXTRAVERSION =-rc5 5 - NAME=Affluent Albatross 4 + EXTRAVERSION =-rc6 5 + NAME=Sliding Snow Leopard 6 6 7 7 # *DOCUMENTATION* 8 8 # To see a list of typical targets execute "make help"
+1 -1
arch/alpha/kernel/machvec_impl.h
··· 41 41 #define CAT1(x,y) x##y 42 42 #define CAT(x,y) CAT1(x,y) 43 43 44 - #define DO_DEFAULT_RTC rtc_port: 0x70 44 + #define DO_DEFAULT_RTC .rtc_port = 0x70 45 45 46 46 #define DO_EV4_MMU \ 47 47 .max_asn = EV4_MAX_ASN, \
+4 -4
arch/arm/kernel/calls.S
··· 131 131 .long sys_wait4 132 132 /* 115 */ .long sys_swapoff 133 133 .long sys_sysinfo 134 - .long sys_ipc_wrapper 134 + .long sys_ipc 135 135 .long sys_fsync 136 136 .long sys_sigreturn_wrapper 137 137 /* 120 */ .long sys_clone_wrapper ··· 254 254 .long sys_fremovexattr 255 255 .long sys_tkill 256 256 .long sys_sendfile64 257 - /* 240 */ .long sys_futex_wrapper 257 + /* 240 */ .long sys_futex 258 258 .long sys_sched_setaffinity 259 259 .long sys_sched_getaffinity 260 260 .long sys_io_setup ··· 284 284 .long sys_fstatfs64 285 285 .long sys_tgkill 286 286 .long sys_utimes 287 - /* 270 */ .long sys_arm_fadvise64_64_wrapper 287 + /* 270 */ .long sys_arm_fadvise64_64 288 288 .long sys_pciconfig_iobase 289 289 .long sys_pciconfig_read 290 290 .long sys_pciconfig_write ··· 333 333 .long sys_inotify_init 334 334 .long sys_inotify_add_watch 335 335 .long sys_inotify_rm_watch 336 - .long sys_mbind_wrapper 336 + .long sys_mbind 337 337 /* 320 */ .long sys_get_mempolicy 338 338 .long sys_set_mempolicy 339 339 __syscall_end:
+49
arch/arm/kernel/entry-armv.S
··· 614 614 /* 615 615 * Reference prototype: 616 616 * 617 + * void __kernel_memory_barrier(void) 618 + * 619 + * Input: 620 + * 621 + * lr = return address 622 + * 623 + * Output: 624 + * 625 + * none 626 + * 627 + * Clobbered: 628 + * 629 + * the Z flag might be lost 630 + * 631 + * Definition and user space usage example: 632 + * 633 + * typedef void (__kernel_dmb_t)(void); 634 + * #define __kernel_dmb (*(__kernel_dmb_t *)0xffff0fa0) 635 + * 636 + * Apply any needed memory barrier to preserve consistency with data modified 637 + * manually and __kuser_cmpxchg usage. 638 + * 639 + * This could be used as follows: 640 + * 641 + * #define __kernel_dmb() \ 642 + * asm volatile ( "mov r0, #0xffff0fff; mov lr, pc; sub pc, r0, #95" \ 643 + * : : : "lr","cc" ) 644 + */ 645 + 646 + __kuser_memory_barrier: @ 0xffff0fa0 647 + 648 + #if __LINUX_ARM_ARCH__ >= 6 && defined(CONFIG_SMP) 649 + mcr p15, 0, r0, c7, c10, 5 @ dmb 650 + #endif 651 + mov pc, lr 652 + 653 + .align 5 654 + 655 + /* 656 + * Reference prototype: 657 + * 617 658 * int __kernel_cmpxchg(int oldval, int newval, int *ptr) 618 659 * 619 660 * Input: ··· 682 641 * Return zero if *ptr was changed or non-zero if no exchange happened. 683 642 * The C flag is also set if *ptr was changed to allow for assembly 684 643 * optimization in the calling code. 644 + * 645 + * Note: this routine already includes memory barriers as needed. 685 646 * 686 647 * For example, a user space atomic_add implementation could look like this: 687 648 * ··· 741 698 742 699 #else 743 700 701 + #ifdef CONFIG_SMP 702 + mcr p15, 0, r0, c7, c10, 5 @ dmb 703 + #endif 744 704 ldrex r3, [r2] 745 705 subs r3, r3, r0 746 706 strexeq r3, r1, [r2] 747 707 rsbs r0, r3, #0 708 + #ifdef CONFIG_SMP 709 + mcr p15, 0, r0, c7, c10, 5 @ dmb 710 + #endif 748 711 mov pc, lr 749 712 750 713 #endif
+2 -18
arch/arm/kernel/entry-common.S
··· 145 145 #endif 146 146 enable_irq 147 147 148 - str r4, [sp, #-S_OFF]! @ push fifth arg 148 + stmdb sp!, {r4, r5} @ push fifth and sixth args 149 149 150 150 get_thread_info tsk 151 151 ldr ip, [tsk, #TI_FLAGS] @ check for syscall tracing ··· 204 204 * Special system call wrappers 205 205 */ 206 206 @ r0 = syscall number 207 - @ r5 = syscall table 207 + @ r8 = syscall table 208 208 .type sys_syscall, #function 209 209 sys_syscall: 210 210 eor scno, r0, #__NR_SYSCALL_BASE ··· 254 254 sys_sigaltstack_wrapper: 255 255 ldr r2, [sp, #S_OFF + S_SP] 256 256 b do_sigaltstack 257 - 258 - sys_futex_wrapper: 259 - str r5, [sp, #4] @ push sixth arg 260 - b sys_futex 261 - 262 - sys_arm_fadvise64_64_wrapper: 263 - str r5, [sp, #4] @ push r5 to stack 264 - b sys_arm_fadvise64_64 265 - 266 - sys_mbind_wrapper: 267 - str r5, [sp, #4] 268 - b sys_mbind 269 - 270 - sys_ipc_wrapper: 271 - str r5, [sp, #4] @ push sixth arg 272 - b sys_ipc 273 257 274 258 /* 275 259 * Note: off_4k (r5) is always units of 4K. If we can't do the requested
+1 -1
arch/i386/mm/ioremap.c
··· 245 245 addr < phys_to_virt(ISA_END_ADDRESS)) 246 246 return; 247 247 248 - addr = (volatile void *)(PAGE_MASK & (unsigned long __force)addr); 248 + addr = (volatile void __iomem *)(PAGE_MASK & (unsigned long __force)addr); 249 249 250 250 /* Use the vm area unlocked, assuming the caller 251 251 ensures there isn't another iounmap for the same address
+1 -1
arch/i386/pci/Makefile
··· 1 1 obj-y := i386.o 2 2 3 3 obj-$(CONFIG_PCI_BIOS) += pcbios.o 4 - obj-$(CONFIG_PCI_MMCONFIG) += mmconfig.o 4 + obj-$(CONFIG_PCI_MMCONFIG) += mmconfig.o direct.o 5 5 obj-$(CONFIG_PCI_DIRECT) += direct.o 6 6 7 7 pci-y := fixup.o
+1 -1
arch/i386/pci/mmconfig.c
··· 155 155 addr = get_base_addr(0, 0, PCI_DEVFN(i, 0)); 156 156 if (addr != 0) 157 157 pci_exp_set_dev_base(addr, 0, PCI_DEVFN(i, 0)); 158 - if (addr == 0 || readl((u32 *)addr) != val1) 158 + if (addr == 0 || readl((u32 __iomem *)mmcfg_virt_addr) != val1) 159 159 set_bit(i, fallback_slots); 160 160 spin_unlock_irqrestore(&pci_config_lock, flags); 161 161 }
+1 -1
arch/ia64/configs/sn2_defconfig
··· 113 113 CONFIG_IA64_SGI_SN_XP=m 114 114 CONFIG_FORCE_MAX_ZONEORDER=17 115 115 CONFIG_SMP=y 116 - CONFIG_NR_CPUS=512 116 + CONFIG_NR_CPUS=1024 117 117 # CONFIG_HOTPLUG_CPU is not set 118 118 CONFIG_SCHED_SMT=y 119 119 CONFIG_PREEMPT=y
+29
arch/ia64/kernel/time.c
··· 249 249 */ 250 250 set_normalized_timespec(&wall_to_monotonic, -xtime.tv_sec, -xtime.tv_nsec); 251 251 } 252 + 253 + #define SMALLUSECS 100 254 + 255 + void 256 + udelay (unsigned long usecs) 257 + { 258 + unsigned long start; 259 + unsigned long cycles; 260 + unsigned long smallusecs; 261 + 262 + /* 263 + * Execute the non-preemptible delay loop (because the ITC might 264 + * not be synchronized between CPUS) in relatively short time 265 + * chunks, allowing preemption between the chunks. 266 + */ 267 + while (usecs > 0) { 268 + smallusecs = (usecs > SMALLUSECS) ? SMALLUSECS : usecs; 269 + preempt_disable(); 270 + cycles = smallusecs*local_cpu_data->cyc_per_usec; 271 + start = ia64_get_itc(); 272 + 273 + while (ia64_get_itc() - start < cycles) 274 + cpu_relax(); 275 + 276 + preempt_enable(); 277 + usecs -= smallusecs; 278 + } 279 + } 280 + EXPORT_SYMBOL(udelay);
+3 -3
arch/ia64/kernel/uncached.c
··· 53 53 if ((status != PAL_VISIBILITY_OK) && 54 54 (status != PAL_VISIBILITY_OK_REMOTE_NEEDED)) 55 55 printk(KERN_DEBUG "pal_prefetch_visibility() returns %i on " 56 - "CPU %i\n", status, get_cpu()); 56 + "CPU %i\n", status, raw_smp_processor_id()); 57 57 } 58 58 59 59 ··· 63 63 status = ia64_pal_mc_drain(); 64 64 if (status) 65 65 printk(KERN_WARNING "ia64_pal_mc_drain() failed with %i on " 66 - "CPU %i\n", status, get_cpu()); 66 + "CPU %i\n", status, raw_smp_processor_id()); 67 67 } 68 68 69 69 ··· 105 105 status = ia64_pal_prefetch_visibility(PAL_VISIBILITY_PHYSICAL); 106 106 107 107 dprintk(KERN_INFO "pal_prefetch_visibility() returns %i on cpu %i\n", 108 - status, get_cpu()); 108 + status, raw_smp_processor_id()); 109 109 110 110 if (!status) { 111 111 status = smp_call_function(uncached_ipi_visibility, NULL, 0, 1);
+3
arch/ia64/kernel/vmlinux.lds.S
··· 177 177 } 178 178 . = ALIGN(PAGE_SIZE); /* make sure the gate page doesn't expose kernel data */ 179 179 180 + .data.read_mostly : AT(ADDR(.data.read_mostly) - LOAD_OFFSET) 181 + { *(.data.read_mostly) } 182 + 180 183 .data.cacheline_aligned : AT(ADDR(.data.cacheline_aligned) - LOAD_OFFSET) 181 184 { *(.data.cacheline_aligned) } 182 185
+1 -1
arch/ia64/sn/kernel/sn2/sn2_smp.c
··· 202 202 unsigned long end, unsigned long nbits) 203 203 { 204 204 int i, opt, shub1, cnode, mynasid, cpu, lcpu = 0, nasid, flushed = 0; 205 - int mymm = (mm == current->active_mm); 205 + int mymm = (mm == current->active_mm && current->mm); 206 206 volatile unsigned long *ptc0, *ptc1; 207 207 unsigned long itc, itc2, flags, data0 = 0, data1 = 0, rr_value; 208 208 short nasids[MAX_NUMNODES], nix;
+24 -24
arch/ia64/sn/pci/pcibr/pcibr_reg.c
··· 25 25 */ 26 26 void pcireg_control_bit_clr(struct pcibus_info *pcibus_info, uint64_t bits) 27 27 { 28 - union br_ptr *ptr = (union br_ptr *)pcibus_info->pbi_buscommon.bs_base; 28 + union br_ptr __iomem *ptr = (union br_ptr __iomem *)pcibus_info->pbi_buscommon.bs_base; 29 29 30 30 if (pcibus_info) { 31 31 switch (pcibus_info->pbi_bridge_type) { ··· 38 38 default: 39 39 panic 40 40 ("pcireg_control_bit_clr: unknown bridgetype bridge 0x%p", 41 - (void *)ptr); 41 + ptr); 42 42 } 43 43 } 44 44 } 45 45 46 46 void pcireg_control_bit_set(struct pcibus_info *pcibus_info, uint64_t bits) 47 47 { 48 - union br_ptr *ptr = (union br_ptr *)pcibus_info->pbi_buscommon.bs_base; 48 + union br_ptr __iomem *ptr = (union br_ptr __iomem *)pcibus_info->pbi_buscommon.bs_base; 49 49 50 50 if (pcibus_info) { 51 51 switch (pcibus_info->pbi_bridge_type) { ··· 58 58 default: 59 59 panic 60 60 ("pcireg_control_bit_set: unknown bridgetype bridge 0x%p", 61 - (void *)ptr); 61 + ptr); 62 62 } 63 63 } 64 64 } ··· 68 68 */ 69 69 uint64_t pcireg_tflush_get(struct pcibus_info *pcibus_info) 70 70 { 71 - union br_ptr *ptr = (union br_ptr *)pcibus_info->pbi_buscommon.bs_base; 71 + union br_ptr __iomem *ptr = (union br_ptr __iomem *)pcibus_info->pbi_buscommon.bs_base; 72 72 uint64_t ret = 0; 73 73 74 74 if (pcibus_info) { ··· 82 82 default: 83 83 panic 84 84 ("pcireg_tflush_get: unknown bridgetype bridge 0x%p", 85 - (void *)ptr); 85 + ptr); 86 86 } 87 87 } 88 88 ··· 98 98 */ 99 99 uint64_t pcireg_intr_status_get(struct pcibus_info * pcibus_info) 100 100 { 101 - union br_ptr *ptr = (union br_ptr *)pcibus_info->pbi_buscommon.bs_base; 101 + union br_ptr __iomem *ptr = (union br_ptr __iomem *)pcibus_info->pbi_buscommon.bs_base; 102 102 uint64_t ret = 0; 103 103 104 104 if (pcibus_info) { ··· 112 112 default: 113 113 panic 114 114 ("pcireg_intr_status_get: unknown bridgetype bridge 0x%p", 115 - (void *)ptr); 115 + ptr); 116 116 } 117 117 } 118 118 return ret; ··· 123 123 */ 124 124 void pcireg_intr_enable_bit_clr(struct pcibus_info *pcibus_info, uint64_t bits) 125 125 { 126 - union br_ptr *ptr = (union br_ptr *)pcibus_info->pbi_buscommon.bs_base; 126 + union br_ptr __iomem *ptr = (union br_ptr __iomem *)pcibus_info->pbi_buscommon.bs_base; 127 127 128 128 if (pcibus_info) { 129 129 switch (pcibus_info->pbi_bridge_type) { ··· 136 136 default: 137 137 panic 138 138 ("pcireg_intr_enable_bit_clr: unknown bridgetype bridge 0x%p", 139 - (void *)ptr); 139 + ptr); 140 140 } 141 141 } 142 142 } 143 143 144 144 void pcireg_intr_enable_bit_set(struct pcibus_info *pcibus_info, uint64_t bits) 145 145 { 146 - union br_ptr *ptr = (union br_ptr *)pcibus_info->pbi_buscommon.bs_base; 146 + union br_ptr __iomem *ptr = (union br_ptr __iomem *)pcibus_info->pbi_buscommon.bs_base; 147 147 148 148 if (pcibus_info) { 149 149 switch (pcibus_info->pbi_bridge_type) { ··· 156 156 default: 157 157 panic 158 158 ("pcireg_intr_enable_bit_set: unknown bridgetype bridge 0x%p", 159 - (void *)ptr); 159 + ptr); 160 160 } 161 161 } 162 162 } ··· 167 167 void pcireg_intr_addr_addr_set(struct pcibus_info *pcibus_info, int int_n, 168 168 uint64_t addr) 169 169 { 170 - union br_ptr *ptr = (union br_ptr *)pcibus_info->pbi_buscommon.bs_base; 170 + union br_ptr __iomem *ptr = (union br_ptr __iomem *)pcibus_info->pbi_buscommon.bs_base; 171 171 172 172 if (pcibus_info) { 173 173 switch (pcibus_info->pbi_bridge_type) { ··· 186 186 default: 187 187 panic 188 188 ("pcireg_intr_addr_addr_get: unknown bridgetype bridge 0x%p", 189 - (void *)ptr); 189 + ptr); 190 190 } 191 191 } 192 192 } ··· 196 196 */ 197 197 void pcireg_force_intr_set(struct pcibus_info *pcibus_info, int int_n) 198 198 { 199 - union br_ptr *ptr = (union br_ptr *)pcibus_info->pbi_buscommon.bs_base; 199 + union br_ptr __iomem *ptr = (union br_ptr __iomem *)pcibus_info->pbi_buscommon.bs_base; 200 200 201 201 if (pcibus_info) { 202 202 switch (pcibus_info->pbi_bridge_type) { ··· 209 209 default: 210 210 panic 211 211 ("pcireg_force_intr_set: unknown bridgetype bridge 0x%p", 212 - (void *)ptr); 212 + ptr); 213 213 } 214 214 } 215 215 } ··· 219 219 */ 220 220 uint64_t pcireg_wrb_flush_get(struct pcibus_info *pcibus_info, int device) 221 221 { 222 - union br_ptr *ptr = (union br_ptr *)pcibus_info->pbi_buscommon.bs_base; 222 + union br_ptr __iomem *ptr = (union br_ptr __iomem *)pcibus_info->pbi_buscommon.bs_base; 223 223 uint64_t ret = 0; 224 224 225 225 if (pcibus_info) { ··· 233 233 __sn_readq_relaxed(&ptr->pic.p_wr_req_buf[device]); 234 234 break; 235 235 default: 236 - panic("pcireg_wrb_flush_get: unknown bridgetype bridge 0x%p", (void *)ptr); 236 + panic("pcireg_wrb_flush_get: unknown bridgetype bridge 0x%p", ptr); 237 237 } 238 238 239 239 } ··· 244 244 void pcireg_int_ate_set(struct pcibus_info *pcibus_info, int ate_index, 245 245 uint64_t val) 246 246 { 247 - union br_ptr *ptr = (union br_ptr *)pcibus_info->pbi_buscommon.bs_base; 247 + union br_ptr __iomem *ptr = (union br_ptr __iomem *)pcibus_info->pbi_buscommon.bs_base; 248 248 249 249 if (pcibus_info) { 250 250 switch (pcibus_info->pbi_bridge_type) { ··· 257 257 default: 258 258 panic 259 259 ("pcireg_int_ate_set: unknown bridgetype bridge 0x%p", 260 - (void *)ptr); 260 + ptr); 261 261 } 262 262 } 263 263 } 264 264 265 - uint64_t *pcireg_int_ate_addr(struct pcibus_info *pcibus_info, int ate_index) 265 + uint64_t __iomem *pcireg_int_ate_addr(struct pcibus_info *pcibus_info, int ate_index) 266 266 { 267 - union br_ptr *ptr = (union br_ptr *)pcibus_info->pbi_buscommon.bs_base; 268 - uint64_t *ret = (uint64_t *) 0; 267 + union br_ptr __iomem *ptr = (union br_ptr __iomem *)pcibus_info->pbi_buscommon.bs_base; 268 + uint64_t __iomem *ret = NULL; 269 269 270 270 if (pcibus_info) { 271 271 switch (pcibus_info->pbi_bridge_type) { ··· 278 278 default: 279 279 panic 280 280 ("pcireg_int_ate_addr: unknown bridgetype bridge 0x%p", 281 - (void *)ptr); 281 + ptr); 282 282 } 283 283 } 284 284 return ret;
+6 -6
arch/ia64/sn/pci/tioca_provider.c
··· 38 38 uint64_t offset; 39 39 struct page *tmp; 40 40 struct tioca_common *tioca_common; 41 - struct tioca *ca_base; 41 + struct tioca __iomem *ca_base; 42 42 43 43 tioca_common = tioca_kern->ca_common; 44 - ca_base = (struct tioca *)tioca_common->ca_common.bs_base; 44 + ca_base = (struct tioca __iomem *)tioca_common->ca_common.bs_base; 45 45 46 46 if (list_empty(tioca_kern->ca_devices)) 47 47 return 0; ··· 215 215 { 216 216 int cap_ptr; 217 217 uint32_t reg; 218 - struct tioca *tioca_base; 218 + struct tioca __iomem *tioca_base; 219 219 struct pci_dev *pdev; 220 220 struct tioca_common *common; 221 221 ··· 257 257 * Set ca's fw to match 258 258 */ 259 259 260 - tioca_base = (struct tioca *)common->ca_common.bs_base; 260 + tioca_base = (struct tioca __iomem*)common->ca_common.bs_base; 261 261 __sn_setq_relaxed(&tioca_base->ca_control1, CA_AGP_FW_ENABLE); 262 262 } 263 263 ··· 322 322 tioca_dma_d48(struct pci_dev *pdev, uint64_t paddr) 323 323 { 324 324 struct tioca_common *tioca_common; 325 - struct tioca *ca_base; 325 + struct tioca __iomem *ca_base; 326 326 uint64_t ct_addr; 327 327 dma_addr_t bus_addr; 328 328 uint32_t node_upper; ··· 330 330 struct pcidev_info *pcidev_info = SN_PCIDEV_INFO(pdev); 331 331 332 332 tioca_common = (struct tioca_common *)pcidev_info->pdi_pcibus_info; 333 - ca_base = (struct tioca *)tioca_common->ca_common.bs_base; 333 + ca_base = (struct tioca __iomem *)tioca_common->ca_common.bs_base; 334 334 335 335 ct_addr = PHYS_TO_TIODMA(paddr); 336 336 if (!ct_addr)
+4 -3
arch/powerpc/configs/cell_defconfig
··· 1 1 # 2 2 # Automatically generated make config: don't edit 3 - # Linux kernel version: 2.6.15-rc1 4 - # Tue Nov 15 14:36:20 2005 3 + # Linux kernel version: 2.6.15-rc5 4 + # Tue Dec 20 15:59:26 2005 5 5 # 6 6 CONFIG_PPC64=y 7 7 CONFIG_64BIT=y ··· 53 53 # CONFIG_IKCONFIG is not set 54 54 # CONFIG_CPUSETS is not set 55 55 CONFIG_INITRAMFS_SOURCE="" 56 + CONFIG_CC_OPTIMIZE_FOR_SIZE=y 56 57 # CONFIG_EMBEDDED is not set 57 58 CONFIG_KALLSYMS=y 58 59 # CONFIG_KALLSYMS_ALL is not set ··· 152 151 CONFIG_FLATMEM=y 153 152 CONFIG_FLAT_NODE_MEM_MAP=y 154 153 # CONFIG_SPARSEMEM_STATIC is not set 155 - CONFIG_SPLIT_PTLOCK_CPUS=4096 154 + CONFIG_SPLIT_PTLOCK_CPUS=4 156 155 # CONFIG_PPC_64K_PAGES is not set 157 156 CONFIG_SCHED_SMT=y 158 157 CONFIG_PROC_DEVICETREE=y
+5 -4
arch/powerpc/configs/g5_defconfig
··· 1 1 # 2 2 # Automatically generated make config: don't edit 3 - # Linux kernel version: 2.6.15-rc1 4 - # Tue Nov 15 14:39:20 2005 3 + # Linux kernel version: 2.6.15-rc5 4 + # Tue Dec 20 15:59:30 2005 5 5 # 6 6 CONFIG_PPC64=y 7 7 CONFIG_64BIT=y ··· 53 53 CONFIG_IKCONFIG_PROC=y 54 54 # CONFIG_CPUSETS is not set 55 55 CONFIG_INITRAMFS_SOURCE="" 56 + CONFIG_CC_OPTIMIZE_FOR_SIZE=y 56 57 # CONFIG_EMBEDDED is not set 57 58 CONFIG_KALLSYMS=y 58 59 # CONFIG_KALLSYMS_ALL is not set ··· 163 162 CONFIG_FLATMEM=y 164 163 CONFIG_FLAT_NODE_MEM_MAP=y 165 164 # CONFIG_SPARSEMEM_STATIC is not set 166 - CONFIG_SPLIT_PTLOCK_CPUS=4096 165 + CONFIG_SPLIT_PTLOCK_CPUS=4 167 166 # CONFIG_PPC_64K_PAGES is not set 168 167 # CONFIG_SCHED_SMT is not set 169 168 CONFIG_PROC_DEVICETREE=y ··· 1204 1203 CONFIG_USB_SERIAL=m 1205 1204 CONFIG_USB_SERIAL_GENERIC=y 1206 1205 # CONFIG_USB_SERIAL_AIRPRIME is not set 1206 + # CONFIG_USB_SERIAL_ANYDATA is not set 1207 1207 CONFIG_USB_SERIAL_BELKIN=m 1208 1208 CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m 1209 1209 # CONFIG_USB_SERIAL_CP2101 is not set ··· 1235 1233 CONFIG_USB_SERIAL_KLSI=m 1236 1234 CONFIG_USB_SERIAL_KOBIL_SCT=m 1237 1235 CONFIG_USB_SERIAL_MCT_U232=m 1238 - # CONFIG_USB_SERIAL_NOKIA_DKU2 is not set 1239 1236 CONFIG_USB_SERIAL_PL2303=m 1240 1237 # CONFIG_USB_SERIAL_HP4X is not set 1241 1238 CONFIG_USB_SERIAL_SAFE=m
+4 -3
arch/powerpc/configs/iseries_defconfig
··· 1 1 # 2 2 # Automatically generated make config: don't edit 3 - # Linux kernel version: 2.6.15-rc1 4 - # Tue Nov 15 14:38:09 2005 3 + # Linux kernel version: 2.6.15-rc5 4 + # Tue Dec 20 15:59:32 2005 5 5 # 6 6 CONFIG_PPC64=y 7 7 CONFIG_64BIT=y ··· 55 55 CONFIG_IKCONFIG_PROC=y 56 56 # CONFIG_CPUSETS is not set 57 57 CONFIG_INITRAMFS_SOURCE="" 58 + CONFIG_CC_OPTIMIZE_FOR_SIZE=y 58 59 # CONFIG_EMBEDDED is not set 59 60 CONFIG_KALLSYMS=y 60 61 # CONFIG_KALLSYMS_ALL is not set ··· 145 144 CONFIG_FLATMEM=y 146 145 CONFIG_FLAT_NODE_MEM_MAP=y 147 146 # CONFIG_SPARSEMEM_STATIC is not set 148 - CONFIG_SPLIT_PTLOCK_CPUS=4096 147 + CONFIG_SPLIT_PTLOCK_CPUS=4 149 148 # CONFIG_PPC_64K_PAGES is not set 150 149 # CONFIG_SCHED_SMT is not set 151 150 CONFIG_PROC_DEVICETREE=y
+5 -5
arch/powerpc/configs/maple_defconfig
··· 1 1 # 2 2 # Automatically generated make config: don't edit 3 - # Linux kernel version: 2.6.15-rc1 4 - # Tue Nov 15 14:38:58 2005 3 + # Linux kernel version: 2.6.15-rc5 4 + # Tue Dec 20 15:59:36 2005 5 5 # 6 6 CONFIG_PPC64=y 7 7 CONFIG_64BIT=y ··· 53 53 CONFIG_IKCONFIG_PROC=y 54 54 # CONFIG_CPUSETS is not set 55 55 CONFIG_INITRAMFS_SOURCE="" 56 + CONFIG_CC_OPTIMIZE_FOR_SIZE=y 56 57 # CONFIG_EMBEDDED is not set 57 58 CONFIG_KALLSYMS=y 58 59 CONFIG_KALLSYMS_ALL=y ··· 150 149 CONFIG_FLATMEM=y 151 150 CONFIG_FLAT_NODE_MEM_MAP=y 152 151 # CONFIG_SPARSEMEM_STATIC is not set 153 - CONFIG_SPLIT_PTLOCK_CPUS=4096 152 + CONFIG_SPLIT_PTLOCK_CPUS=4 154 153 # CONFIG_PPC_64K_PAGES is not set 155 154 # CONFIG_SCHED_SMT is not set 156 155 CONFIG_PROC_DEVICETREE=y ··· 243 242 # QoS and/or fair queueing 244 243 # 245 244 # CONFIG_NET_SCHED is not set 246 - # CONFIG_NET_CLS_ROUTE is not set 247 245 248 246 # 249 247 # Network testing ··· 794 794 # CONFIG_USB_SERIAL_CONSOLE is not set 795 795 CONFIG_USB_SERIAL_GENERIC=y 796 796 # CONFIG_USB_SERIAL_AIRPRIME is not set 797 + # CONFIG_USB_SERIAL_ANYDATA is not set 797 798 # CONFIG_USB_SERIAL_BELKIN is not set 798 799 # CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set 799 800 # CONFIG_USB_SERIAL_CP2101 is not set ··· 825 824 # CONFIG_USB_SERIAL_KLSI is not set 826 825 # CONFIG_USB_SERIAL_KOBIL_SCT is not set 827 826 # CONFIG_USB_SERIAL_MCT_U232 is not set 828 - # CONFIG_USB_SERIAL_NOKIA_DKU2 is not set 829 827 # CONFIG_USB_SERIAL_PL2303 is not set 830 828 # CONFIG_USB_SERIAL_HP4X is not set 831 829 # CONFIG_USB_SERIAL_SAFE is not set
+4 -3
arch/powerpc/configs/ppc64_defconfig
··· 1 1 # 2 2 # Automatically generated make config: don't edit 3 - # Linux kernel version: 2.6.15-rc1 4 - # Fri Nov 18 16:23:24 2005 3 + # Linux kernel version: 2.6.15-rc5 4 + # Tue Dec 20 15:59:38 2005 5 5 # 6 6 CONFIG_PPC64=y 7 7 CONFIG_64BIT=y ··· 54 54 CONFIG_IKCONFIG_PROC=y 55 55 CONFIG_CPUSETS=y 56 56 CONFIG_INITRAMFS_SOURCE="" 57 + CONFIG_CC_OPTIMIZE_FOR_SIZE=y 57 58 # CONFIG_EMBEDDED is not set 58 59 CONFIG_KALLSYMS=y 59 60 CONFIG_KALLSYMS_ALL=y ··· 177 176 # CONFIG_SPARSEMEM_STATIC is not set 178 177 CONFIG_SPARSEMEM_EXTREME=y 179 178 # CONFIG_MEMORY_HOTPLUG is not set 180 - CONFIG_SPLIT_PTLOCK_CPUS=4096 179 + CONFIG_SPLIT_PTLOCK_CPUS=4 181 180 # CONFIG_PPC_64K_PAGES is not set 182 181 # CONFIG_SCHED_SMT is not set 183 182 CONFIG_PROC_DEVICETREE=y
+4 -3
arch/powerpc/configs/pseries_defconfig
··· 1 1 # 2 2 # Automatically generated make config: don't edit 3 - # Linux kernel version: 2.6.15-rc1 4 - # Tue Nov 15 14:36:55 2005 3 + # Linux kernel version: 2.6.15-rc5 4 + # Tue Dec 20 15:59:40 2005 5 5 # 6 6 CONFIG_PPC64=y 7 7 CONFIG_64BIT=y ··· 55 55 CONFIG_IKCONFIG_PROC=y 56 56 CONFIG_CPUSETS=y 57 57 CONFIG_INITRAMFS_SOURCE="" 58 + CONFIG_CC_OPTIMIZE_FOR_SIZE=y 58 59 # CONFIG_EMBEDDED is not set 59 60 CONFIG_KALLSYMS=y 60 61 CONFIG_KALLSYMS_ALL=y ··· 164 163 # CONFIG_SPARSEMEM_STATIC is not set 165 164 CONFIG_SPARSEMEM_EXTREME=y 166 165 # CONFIG_MEMORY_HOTPLUG is not set 167 - CONFIG_SPLIT_PTLOCK_CPUS=4096 166 + CONFIG_SPLIT_PTLOCK_CPUS=4 168 167 CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y 169 168 # CONFIG_PPC_64K_PAGES is not set 170 169 CONFIG_SCHED_SMT=y
+2 -2
arch/powerpc/kernel/entry_64.S
··· 183 183 ld r13,GPR13(r1) /* returning to usermode */ 184 184 1: ld r2,GPR2(r1) 185 185 li r12,MSR_RI 186 - andc r10,r10,r12 187 - mtmsrd r10,1 /* clear MSR.RI */ 186 + andc r11,r10,r12 187 + mtmsrd r11,1 /* clear MSR.RI */ 188 188 ld r1,GPR1(r1) 189 189 mtlr r4 190 190 mtcr r5
+1 -1
arch/powerpc/kernel/syscalls.c
··· 247 247 #define OVERRIDE_MACHINE 0 248 248 #endif 249 249 250 - static inline int override_machine(char *mach) 250 + static inline int override_machine(char __user *mach) 251 251 { 252 252 if (OVERRIDE_MACHINE) { 253 253 /* change ppc64 to ppc */
+2 -1
arch/ppc/platforms/85xx/mpc85xx_cds_common.c
··· 130 130 } 131 131 132 132 #ifdef CONFIG_CPM2 133 - static void cpm2_cascade(int irq, void *dev_id, struct pt_regs *regs) 133 + static irqreturn_t cpm2_cascade(int irq, void *dev_id, struct pt_regs *regs) 134 134 { 135 135 while((irq = cpm2_get_irq(regs)) >= 0) 136 136 __do_IRQ(irq, regs); 137 + return IRQ_HANDLED; 137 138 } 138 139 139 140 static struct irqaction cpm2_irqaction = {
+1
arch/ppc/syslib/ppc4xx_dma.c
··· 30 30 31 31 #include <asm/system.h> 32 32 #include <asm/io.h> 33 + #include <asm/dma.h> 33 34 #include <asm/ppc4xx_dma.h> 34 35 35 36 ppc_dma_ch_t dma_channels[MAX_PPC4xx_DMA_CHANNELS];
+12 -12
arch/sparc/kernel/ebus.c
··· 22 22 #include <asm/oplib.h> 23 23 #include <asm/bpp.h> 24 24 25 - struct linux_ebus *ebus_chain = 0; 25 + struct linux_ebus *ebus_chain = NULL; 26 26 27 27 /* We are together with pcic.c under CONFIG_PCI. */ 28 28 extern unsigned int pcic_pin_to_irq(unsigned int, char *name); ··· 46 46 { "SUNW,CS4231", 0 }, 47 47 { "parallel", 0 }, 48 48 { "se", 2 }, 49 - { 0, 0 } 49 + { NULL, 0 } 50 50 }; 51 51 52 52 /* ··· 55 55 */ 56 56 static struct ebus_system_entry ebus_blacklist[] = { 57 57 { "SUNW,JavaEngine1", je1_1 }, 58 - { 0, 0 } 58 + { NULL, NULL } 59 59 }; 60 60 61 61 static struct ebus_device_irq *ebus_blackp = NULL; ··· 233 233 ebus_alloc(sizeof(struct linux_ebus_child)); 234 234 235 235 child = dev->children; 236 - child->next = 0; 236 + child->next = NULL; 237 237 child->parent = dev; 238 238 child->bus = dev->bus; 239 239 fill_ebus_child(node, &regs[0], child); ··· 243 243 ebus_alloc(sizeof(struct linux_ebus_child)); 244 244 245 245 child = child->next; 246 - child->next = 0; 246 + child->next = NULL; 247 247 child->parent = dev; 248 248 child->bus = dev->bus; 249 249 fill_ebus_child(node, &regs[0], child); ··· 275 275 } 276 276 } 277 277 278 - pdev = pci_get_device(PCI_VENDOR_ID_SUN, PCI_DEVICE_ID_SUN_EBUS, 0); 278 + pdev = pci_get_device(PCI_VENDOR_ID_SUN, PCI_DEVICE_ID_SUN_EBUS, NULL); 279 279 if (!pdev) { 280 280 return; 281 281 } ··· 284 284 285 285 ebus_chain = ebus = (struct linux_ebus *) 286 286 ebus_alloc(sizeof(struct linux_ebus)); 287 - ebus->next = 0; 287 + ebus->next = NULL; 288 288 289 289 while (ebusnd) { 290 290 ··· 325 325 ebus_alloc(sizeof(struct linux_ebus_device)); 326 326 327 327 dev = ebus->devices; 328 - dev->next = 0; 329 - dev->children = 0; 328 + dev->next = NULL; 329 + dev->children = NULL; 330 330 dev->bus = ebus; 331 331 fill_ebus_device(nd, dev); 332 332 ··· 335 335 ebus_alloc(sizeof(struct linux_ebus_device)); 336 336 337 337 dev = dev->next; 338 - dev->next = 0; 339 - dev->children = 0; 338 + dev->next = NULL; 339 + dev->children = NULL; 340 340 dev->bus = ebus; 341 341 fill_ebus_device(nd, dev); 342 342 } ··· 353 353 ebus->next = (struct linux_ebus *) 354 354 ebus_alloc(sizeof(struct linux_ebus)); 355 355 ebus = ebus->next; 356 - ebus->next = 0; 356 + ebus->next = NULL; 357 357 ++num_ebus; 358 358 } 359 359 if (pdev)
+1 -1
arch/sparc/kernel/led.c
··· 55 55 return len; 56 56 } 57 57 58 - static int led_write_proc(struct file *file, const char *buffer, 58 + static int led_write_proc(struct file *file, const char __user *buffer, 59 59 unsigned long count, void *data) 60 60 { 61 61 char *buf = NULL;
+1 -1
arch/sparc/kernel/pcic.c
··· 161 161 static int pcic0_up; 162 162 static struct linux_pcic pcic0; 163 163 164 - void * __iomem pcic_regs; 164 + void __iomem *pcic_regs; 165 165 volatile int pcic_speculative; 166 166 volatile int pcic_trapped; 167 167
+2 -2
arch/sparc/kernel/time.c
··· 49 49 enum sparc_clock_type sp_clock_typ; 50 50 DEFINE_SPINLOCK(mostek_lock); 51 51 void __iomem *mstk48t02_regs = NULL; 52 - static struct mostek48t08 *mstk48t08_regs = NULL; 52 + static struct mostek48t08 __iomem *mstk48t08_regs = NULL; 53 53 static int set_rtc_mmss(unsigned long); 54 54 static int sbus_do_settimeofday(struct timespec *tv); 55 55 ··· 342 342 /* XXX r/o attribute is somewhere in r.flags */ 343 343 r.flags = clk_reg[0].which_io; 344 344 r.start = clk_reg[0].phys_addr; 345 - mstk48t08_regs = (struct mostek48t08 *) sbus_ioremap(&r, 0, 345 + mstk48t08_regs = sbus_ioremap(&r, 0, 346 346 sizeof(struct mostek48t08), "mk48t08"); 347 347 348 348 mstk48t02_regs = &mstk48t08_regs->regs;
+1 -1
arch/sparc/mm/sun4c.c
··· 497 497 patch_kernel_fault_handler(); 498 498 } 499 499 500 - volatile unsigned long *sun4c_memerr_reg = NULL; 500 + volatile unsigned long __iomem *sun4c_memerr_reg = NULL; 501 501 502 502 void __init sun4c_probe_memerr_reg(void) 503 503 {
-5
arch/sparc64/Makefile
··· 17 17 NEW_GCC := $(call cc-option-yn, -m64 -mcmodel=medlow) 18 18 NEW_GAS := $(shell if $(LD) -V 2>&1 | grep 'elf64_sparc' > /dev/null; then echo y; else echo n; fi) 19 19 UNDECLARED_REGS := $(shell if $(CC) -c -x assembler /dev/null -Wa,--help | grep undeclared-regs > /dev/null; then echo y; else echo n; fi; ) 20 - INLINE_LIMIT := $(call cc-option-yn, -m64 -finline-limit=100000) 21 20 22 21 export NEW_GCC 23 22 ··· 46 47 -ffixed-g4 -ffixed-g5 -fcall-used-g7 -Wno-sign-compare \ 47 48 $(CC_UNDECL) 48 49 AFLAGS += -m64 -mcpu=ultrasparc $(CC_UNDECL) 49 - endif 50 - 51 - ifeq ($(INLINE_LIMIT),y) 52 - CFLAGS := $(CFLAGS) -finline-limit=100000 53 50 endif 54 51 55 52 ifeq ($(CONFIG_MCOUNT),y)
+2
arch/um/Kconfig
··· 289 289 290 290 source "drivers/net/Kconfig" 291 291 292 + source "drivers/connector/Kconfig" 293 + 292 294 source "fs/Kconfig" 293 295 294 296 source "security/Kconfig"
+4
arch/um/Makefile-x86_64
··· 12 12 13 13 ELF_ARCH := i386:x86-64 14 14 ELF_FORMAT := elf64-x86-64 15 + 16 + # Not on all 64-bit distros /lib is a symlink to /lib64. PLD is an example. 17 + 18 + LINK-$(CONFIG_LD_SCRIPT_DYN) += -Wl,-rpath,/lib64
+17 -14
arch/um/include/sysdep-i386/stub.h
··· 6 6 #ifndef __SYSDEP_STUB_H 7 7 #define __SYSDEP_STUB_H 8 8 9 + #include <sys/mman.h> 9 10 #include <asm/ptrace.h> 10 11 #include <asm/unistd.h> 12 + #include "stub-data.h" 13 + #include "kern_constants.h" 14 + #include "uml-config.h" 11 15 12 16 extern void stub_segv_handler(int sig); 13 17 extern void stub_clone_handler(void); ··· 80 76 return ret; 81 77 } 82 78 83 - static inline long stub_syscall6(long syscall, long arg1, long arg2, long arg3, 84 - long arg4, long arg5, long arg6) 85 - { 86 - long ret; 87 - 88 - __asm__ volatile ("push %%ebp ; movl %%eax,%%ebp ; movl %1,%%eax ; " 89 - "int $0x80 ; pop %%ebp" 90 - : "=a" (ret) 91 - : "g" (syscall), "b" (arg1), "c" (arg2), "d" (arg3), 92 - "S" (arg4), "D" (arg5), "0" (arg6)); 93 - 94 - return ret; 95 - } 96 - 97 79 static inline void trap_myself(void) 98 80 { 99 81 __asm("int3"); 82 + } 83 + 84 + static inline void remap_stack(int fd, unsigned long offset) 85 + { 86 + __asm__ volatile ("movl %%eax,%%ebp ; movl %0,%%eax ; int $0x80 ;" 87 + "movl %7, %%ebx ; movl %%eax, (%%ebx)" 88 + : : "g" (STUB_MMAP_NR), "b" (UML_CONFIG_STUB_DATA), 89 + "c" (UM_KERN_PAGE_SIZE), 90 + "d" (PROT_READ | PROT_WRITE), 91 + "S" (MAP_FIXED | MAP_SHARED), "D" (fd), 92 + "a" (offset), 93 + "i" (&((struct stub_data *) UML_CONFIG_STUB_DATA)->err) 94 + : "memory"); 100 95 } 101 96 102 97 #endif
+18 -14
arch/um/include/sysdep-x86_64/stub.h
··· 6 6 #ifndef __SYSDEP_STUB_H 7 7 #define __SYSDEP_STUB_H 8 8 9 + #include <sys/mman.h> 9 10 #include <asm/unistd.h> 10 11 #include <sysdep/ptrace_user.h> 12 + #include "stub-data.h" 13 + #include "kern_constants.h" 14 + #include "uml-config.h" 11 15 12 16 extern void stub_segv_handler(int sig); 13 17 extern void stub_clone_handler(void); ··· 85 81 return ret; 86 82 } 87 83 88 - static inline long stub_syscall6(long syscall, long arg1, long arg2, long arg3, 89 - long arg4, long arg5, long arg6) 90 - { 91 - long ret; 92 - 93 - __asm__ volatile ("movq %5,%%r10 ; movq %6,%%r8 ; " 94 - "movq %7, %%r9; " __syscall : "=a" (ret) 95 - : "0" (syscall), "D" (arg1), "S" (arg2), "d" (arg3), 96 - "g" (arg4), "g" (arg5), "g" (arg6) 97 - : __syscall_clobber, "r10", "r8", "r9" ); 98 - 99 - return ret; 100 - } 101 - 102 84 static inline void trap_myself(void) 103 85 { 104 86 __asm("int3"); 87 + } 88 + 89 + static inline void remap_stack(long fd, unsigned long offset) 90 + { 91 + __asm__ volatile ("movq %4,%%r10 ; movq %5,%%r8 ; " 92 + "movq %6, %%r9; " __syscall "; movq %7, %%rbx ; " 93 + "movq %%rax, (%%rbx)": 94 + : "a" (STUB_MMAP_NR), "D" (UML_CONFIG_STUB_DATA), 95 + "S" (UM_KERN_PAGE_SIZE), 96 + "d" (PROT_READ | PROT_WRITE), 97 + "g" (MAP_FIXED | MAP_SHARED), "g" (fd), 98 + "g" (offset), 99 + "i" (&((struct stub_data *) UML_CONFIG_STUB_DATA)->err) 100 + : __syscall_clobber, "r10", "r8", "r9" ); 105 101 } 106 102 107 103 #endif
+13 -10
arch/um/kernel/skas/clone.c
··· 18 18 * on some systems. 19 19 */ 20 20 21 - #define STUB_DATA(field) (((struct stub_data *) UML_CONFIG_STUB_DATA)->field) 22 - 23 21 void __attribute__ ((__section__ (".__syscall_stub"))) 24 22 stub_clone_handler(void) 25 23 { 24 + struct stub_data *data = (struct stub_data *) UML_CONFIG_STUB_DATA; 26 25 long err; 27 26 28 27 err = stub_syscall2(__NR_clone, CLONE_PARENT | CLONE_FILES | SIGCHLD, ··· 34 35 if(err) 35 36 goto out; 36 37 37 - err = stub_syscall3(__NR_setitimer, ITIMER_VIRTUAL, 38 - (long) &STUB_DATA(timer), 0); 38 + err = stub_syscall3(__NR_setitimer, ITIMER_VIRTUAL, 39 + (long) &data->timer, 0); 39 40 if(err) 40 41 goto out; 41 42 42 - err = stub_syscall6(STUB_MMAP_NR, UML_CONFIG_STUB_DATA, 43 - UM_KERN_PAGE_SIZE, PROT_READ | PROT_WRITE, 44 - MAP_FIXED | MAP_SHARED, STUB_DATA(fd), 45 - STUB_DATA(offset)); 43 + remap_stack(data->fd, data->offset); 44 + goto done; 45 + 46 46 out: 47 - /* save current result. Parent: pid; child: retcode of mmap */ 48 - STUB_DATA(err) = err; 47 + /* save current result. 48 + * Parent: pid; 49 + * child: retcode of mmap already saved and it jumps around this 50 + * assignment 51 + */ 52 + data->err = err; 53 + done: 49 54 trap_myself(); 50 55 }
-5
arch/um/scripts/Makefile.rules
··· 21 21 endef 22 22 23 23 24 - # The stubs and unmap.o can't try to call mcount or update basic block data 25 - define unprofile 26 - $(patsubst -pg,,$(patsubst -fprofile-arcs -ftest-coverage,,$(1))) 27 - endef 28 - 29 24 # cmd_make_link checks to see if the $(foo-dir) variable starts with a /. If 30 25 # so, it's considered to be a path relative to $(srcdir) rather than 31 26 # $(srcdir)/arch/$(SUBARCH). This is because x86_64 wants to get ldt.c from
+1 -1
arch/x86_64/mm/ioremap.c
··· 263 263 addr < phys_to_virt(ISA_END_ADDRESS)) 264 264 return; 265 265 266 - addr = (volatile void *)(PAGE_MASK & (unsigned long __force)addr); 266 + addr = (volatile void __iomem *)(PAGE_MASK & (unsigned long __force)addr); 267 267 /* Use the vm area unlocked, assuming the caller 268 268 ensures there isn't another iounmap for the same address 269 269 in parallel. Reuse of the virtual address is prevented by
+1 -1
arch/x86_64/pci/Makefile
··· 11 11 obj-$(CONFIG_ACPI) += acpi.o 12 12 obj-y += legacy.o irq.o common.o 13 13 # mmconfig has a 64bit special 14 - obj-$(CONFIG_PCI_MMCONFIG) += mmconfig.o 14 + obj-$(CONFIG_PCI_MMCONFIG) += mmconfig.o direct.o 15 15 16 16 obj-$(CONFIG_NUMA) += k8-bus.o 17 17
+7 -7
arch/x86_64/pci/mmconfig.c
··· 18 18 /* Static virtual mapping of the MMCONFIG aperture */ 19 19 struct mmcfg_virt { 20 20 struct acpi_table_mcfg_config *cfg; 21 - char *virt; 21 + char __iomem *virt; 22 22 }; 23 23 static struct mmcfg_virt *pci_mmcfg_virt; 24 24 25 - static char *get_virt(unsigned int seg, unsigned bus) 25 + static char __iomem *get_virt(unsigned int seg, unsigned bus) 26 26 { 27 27 int cfg_num = -1; 28 28 struct acpi_table_mcfg_config *cfg; ··· 43 43 } 44 44 } 45 45 46 - static char *pci_dev_base(unsigned int seg, unsigned int bus, unsigned int devfn) 46 + static char __iomem *pci_dev_base(unsigned int seg, unsigned int bus, unsigned int devfn) 47 47 { 48 - char *addr; 48 + char __iomem *addr; 49 49 if (seg == 0 && bus == 0 && test_bit(PCI_SLOT(devfn), &fallback_slots)) 50 50 return NULL; 51 51 addr = get_virt(seg, bus); ··· 57 57 static int pci_mmcfg_read(unsigned int seg, unsigned int bus, 58 58 unsigned int devfn, int reg, int len, u32 *value) 59 59 { 60 - char *addr; 60 + char __iomem *addr; 61 61 62 62 /* Why do we have this when nobody checks it. How about a BUG()!? -AK */ 63 63 if (unlikely(!value || (bus > 255) || (devfn > 255) || (reg > 4095))) ··· 85 85 static int pci_mmcfg_write(unsigned int seg, unsigned int bus, 86 86 unsigned int devfn, int reg, int len, u32 value) 87 87 { 88 - char *addr; 88 + char __iomem *addr; 89 89 90 90 /* Why do we have this when nobody checks it. How about a BUG()!? -AK */ 91 91 if (unlikely((bus > 255) || (devfn > 255) || (reg > 4095))) ··· 127 127 int i; 128 128 for (i = 0; i < 32; i++) { 129 129 u32 val1; 130 - char *addr; 130 + char __iomem *addr; 131 131 132 132 pci_conf1_read(0, 0, PCI_DEVFN(i,0), 0, 4, &val1); 133 133 if (val1 == 0xffffffff)
+31 -14
block/scsi_ioctl.c
··· 442 442 return err; 443 443 } 444 444 445 + 446 + /* Send basic block requests */ 447 + static int __blk_send_generic(request_queue_t *q, struct gendisk *bd_disk, int cmd, int data) 448 + { 449 + struct request *rq; 450 + int err; 451 + 452 + rq = blk_get_request(q, WRITE, __GFP_WAIT); 453 + rq->flags |= REQ_BLOCK_PC; 454 + rq->data = NULL; 455 + rq->data_len = 0; 456 + rq->timeout = BLK_DEFAULT_TIMEOUT; 457 + memset(rq->cmd, 0, sizeof(rq->cmd)); 458 + rq->cmd[0] = cmd; 459 + rq->cmd[4] = data; 460 + rq->cmd_len = 6; 461 + err = blk_execute_rq(q, bd_disk, rq, 0); 462 + blk_put_request(rq); 463 + 464 + return err; 465 + } 466 + 467 + static inline int blk_send_start_stop(request_queue_t *q, struct gendisk *bd_disk, int data) 468 + { 469 + return __blk_send_generic(q, bd_disk, GPCMD_START_STOP_UNIT, data); 470 + } 471 + 445 472 int scsi_cmd_ioctl(struct file *file, struct gendisk *bd_disk, unsigned int cmd, void __user *arg) 446 473 { 447 474 request_queue_t *q; 448 - struct request *rq; 449 - int close = 0, err; 475 + int err; 450 476 451 477 q = bd_disk->queue; 452 478 if (!q) ··· 590 564 err = sg_scsi_ioctl(file, q, bd_disk, arg); 591 565 break; 592 566 case CDROMCLOSETRAY: 593 - close = 1; 567 + err = blk_send_start_stop(q, bd_disk, 0x03); 568 + break; 594 569 case CDROMEJECT: 595 - rq = blk_get_request(q, WRITE, __GFP_WAIT); 596 - rq->flags |= REQ_BLOCK_PC; 597 - rq->data = NULL; 598 - rq->data_len = 0; 599 - rq->timeout = BLK_DEFAULT_TIMEOUT; 600 - memset(rq->cmd, 0, sizeof(rq->cmd)); 601 - rq->cmd[0] = GPCMD_START_STOP_UNIT; 602 - rq->cmd[4] = 0x02 + (close != 0); 603 - rq->cmd_len = 6; 604 - err = blk_execute_rq(q, bd_disk, rq, 0); 605 - blk_put_request(rq); 570 + err = blk_send_start_stop(q, bd_disk, 0x02); 606 571 break; 607 572 default: 608 573 err = -ENOTTY;
+1 -1
drivers/atm/adummy.c
··· 123 123 } 124 124 memset(adummy_dev, 0, sizeof(struct adummy_dev)); 125 125 126 - atm_dev = atm_dev_register(DEV_LABEL, &adummy_ops, -1, 0); 126 + atm_dev = atm_dev_register(DEV_LABEL, &adummy_ops, -1, NULL); 127 127 if (!atm_dev) { 128 128 printk(KERN_ERR DEV_LABEL ": atm_dev_register() failed\n"); 129 129 err = -ENODEV;
-1
drivers/base/memory.c
··· 28 28 static struct sysdev_class memory_sysdev_class = { 29 29 set_kset_name(MEMORY_CLASS_NAME), 30 30 }; 31 - EXPORT_SYMBOL(memory_sysdev_class); 32 31 33 32 static char *memory_hotplug_name(struct kset *kset, struct kobject *kobj) 34 33 {
+1 -1
drivers/char/Kconfig
··· 687 687 688 688 config RTC 689 689 tristate "Enhanced Real Time Clock Support" 690 - depends on !PPC32 && !PARISC && !IA64 && !M68K 690 + depends on !PPC32 && !PARISC && !IA64 && !M68K && (!(SPARC32 || SPARC64) || PCI) 691 691 ---help--- 692 692 If you say Y here and create a character special file /dev/rtc with 693 693 major number 10 and minor number 135 using mknod ("man mknod"), you
+8 -3
drivers/char/drm/radeon_cp.c
··· 1311 1311 1312 1312 static int radeon_do_init_cp(drm_device_t * dev, drm_radeon_init_t * init) 1313 1313 { 1314 - drm_radeon_private_t *dev_priv = dev->dev_private;; 1314 + drm_radeon_private_t *dev_priv = dev->dev_private; 1315 + unsigned int mem_size; 1316 + 1315 1317 DRM_DEBUG("\n"); 1316 1318 1317 1319 dev_priv->is_pci = init->is_pci; ··· 1523 1521 + dev_priv->fb_location) >> 10)); 1524 1522 1525 1523 dev_priv->gart_size = init->gart_size; 1526 - dev_priv->gart_vm_start = dev_priv->fb_location 1527 - + RADEON_READ(RADEON_CONFIG_APER_SIZE) * 2; 1524 + 1525 + mem_size = RADEON_READ(RADEON_CONFIG_MEMSIZE); 1526 + if (mem_size == 0) 1527 + mem_size = 0x800000; 1528 + dev_priv->gart_vm_start = dev_priv->fb_location + mem_size; 1528 1529 1529 1530 #if __OS_HAS_AGP 1530 1531 if (!dev_priv->is_pci)
+1
drivers/char/drm/radeon_drv.h
··· 379 379 # define RADEON_PLL_WR_EN (1 << 7) 380 380 #define RADEON_CLOCK_CNTL_INDEX 0x0008 381 381 #define RADEON_CONFIG_APER_SIZE 0x0108 382 + #define RADEON_CONFIG_MEMSIZE 0x00f8 382 383 #define RADEON_CRTC_OFFSET 0x0224 383 384 #define RADEON_CRTC_OFFSET_CNTL 0x0228 384 385 # define RADEON_CRTC_TILE_EN (1 << 15)
+4 -2
drivers/char/ipmi/ipmi_si_intf.c
··· 2399 2399 new_smi->handlers->cleanup(new_smi->si_sm); 2400 2400 kfree(new_smi->si_sm); 2401 2401 } 2402 - new_smi->io_cleanup(new_smi); 2402 + if (new_smi->io_cleanup) 2403 + new_smi->io_cleanup(new_smi); 2403 2404 2404 2405 return rv; 2405 2406 } ··· 2519 2518 2520 2519 kfree(to_clean->si_sm); 2521 2520 2522 - to_clean->io_cleanup(to_clean); 2521 + if (to_clean->io_cleanup) 2522 + to_clean->io_cleanup(to_clean); 2523 2523 } 2524 2524 2525 2525 static __exit void cleanup_ipmi_si(void)
+1 -1
drivers/char/mwave/mwavepub.h
··· 69 69 typedef struct _MW_READWRITE { 70 70 unsigned short usDspAddress; /* The dsp address */ 71 71 unsigned long ulDataLength; /* The size in bytes of the data or user buffer */ 72 - void *pBuf; /* Input:variable sized buffer */ 72 + void __user *pBuf; /* Input:variable sized buffer */ 73 73 } MW_READWRITE, *pMW_READWRITE; 74 74 75 75 #define IOCTL_MW_RESET _IO(MWAVE_MINOR,1)
+7 -6
drivers/char/pcmcia/cm4000_cs.c
··· 1444 1444 dev_link_t *link; 1445 1445 int size; 1446 1446 int rc; 1447 + void __user *argp = (void __user *)arg; 1447 1448 #ifdef PCMCIA_DEBUG 1448 1449 char *ioctl_names[CM_IOC_MAXNR + 1] = { 1449 1450 [_IOC_NR(CM_IOCGSTATUS)] "CM_IOCGSTATUS", ··· 1482 1481 _IOC_DIR(cmd), _IOC_READ, _IOC_WRITE, size, cmd); 1483 1482 1484 1483 if (_IOC_DIR(cmd) & _IOC_READ) { 1485 - if (!access_ok(VERIFY_WRITE, (void *)arg, size)) 1484 + if (!access_ok(VERIFY_WRITE, argp, size)) 1486 1485 return -EFAULT; 1487 1486 } 1488 1487 if (_IOC_DIR(cmd) & _IOC_WRITE) { 1489 - if (!access_ok(VERIFY_READ, (void *)arg, size)) 1488 + if (!access_ok(VERIFY_READ, argp, size)) 1490 1489 return -EFAULT; 1491 1490 } 1492 1491 ··· 1507 1506 status |= CM_NO_READER; 1508 1507 if (test_bit(IS_BAD_CARD, &dev->flags)) 1509 1508 status |= CM_BAD_CARD; 1510 - if (copy_to_user((int *)arg, &status, sizeof(int))) 1509 + if (copy_to_user(argp, &status, sizeof(int))) 1511 1510 return -EFAULT; 1512 1511 } 1513 1512 return 0; 1514 1513 case CM_IOCGATR: 1515 1514 DEBUGP(4, dev, "... in CM_IOCGATR\n"); 1516 1515 { 1517 - struct atreq *atreq = (struct atreq *) arg; 1516 + struct atreq __user *atreq = argp; 1518 1517 int tmp; 1519 1518 /* allow nonblocking io and being interrupted */ 1520 1519 if (wait_event_interruptible ··· 1598 1597 { 1599 1598 struct ptsreq krnptsreq; 1600 1599 1601 - if (copy_from_user(&krnptsreq, (struct ptsreq *) arg, 1600 + if (copy_from_user(&krnptsreq, argp, 1602 1601 sizeof(struct ptsreq))) 1603 1602 return -EFAULT; 1604 1603 ··· 1642 1641 int old_pc_debug = 0; 1643 1642 1644 1643 old_pc_debug = pc_debug; 1645 - if (copy_from_user(&pc_debug, (int *)arg, sizeof(int))) 1644 + if (copy_from_user(&pc_debug, argp, sizeof(int))) 1646 1645 return -EFAULT; 1647 1646 1648 1647 if (old_pc_debug != pc_debug)
+8 -7
drivers/char/watchdog/booke_wdt.c
··· 72 72 /* 73 73 * booke_wdt_write: 74 74 */ 75 - static ssize_t booke_wdt_write (struct file *file, const char *buf, 75 + static ssize_t booke_wdt_write (struct file *file, const char __user *buf, 76 76 size_t count, loff_t *ppos) 77 77 { 78 78 booke_wdt_ping(); ··· 92 92 unsigned int cmd, unsigned long arg) 93 93 { 94 94 u32 tmp = 0; 95 + u32 __user *p = (u32 __user *)arg; 95 96 96 97 switch (cmd) { 97 98 case WDIOC_GETSUPPORT: 98 - if (copy_to_user ((struct watchdog_info *) arg, &ident, 99 + if (copy_to_user ((struct watchdog_info __user *) arg, &ident, 99 100 sizeof(struct watchdog_info))) 100 101 return -EFAULT; 101 102 case WDIOC_GETSTATUS: 102 - return put_user(ident.options, (u32 *) arg); 103 + return put_user(ident.options, p); 103 104 case WDIOC_GETBOOTSTATUS: 104 105 /* XXX: something is clearing TSR */ 105 106 tmp = mfspr(SPRN_TSR) & TSR_WRS(3); ··· 110 109 booke_wdt_ping(); 111 110 return 0; 112 111 case WDIOC_SETTIMEOUT: 113 - if (get_user(booke_wdt_period, (u32 *) arg)) 112 + if (get_user(booke_wdt_period, p)) 114 113 return -EFAULT; 115 114 mtspr(SPRN_TCR, (mfspr(SPRN_TCR)&~WDTP(0))|WDTP(booke_wdt_period)); 116 115 return 0; 117 116 case WDIOC_GETTIMEOUT: 118 - return put_user(booke_wdt_period, (u32 *) arg); 117 + return put_user(booke_wdt_period, p); 119 118 case WDIOC_SETOPTIONS: 120 - if (get_user(tmp, (u32 *) arg)) 119 + if (get_user(tmp, p)) 121 120 return -EINVAL; 122 121 if (tmp == WDIOS_ENABLECARD) { 123 122 booke_wdt_ping(); ··· 173 172 int ret = 0; 174 173 175 174 printk (KERN_INFO "PowerPC Book-E Watchdog Timer Loaded\n"); 176 - ident.firmware_version = cpu_specs[0].pvr_value; 175 + ident.firmware_version = cur_cpu_spec->pvr_value; 177 176 178 177 ret = misc_register(&booke_wdt_miscdev); 179 178 if (ret) {
+1 -1
drivers/char/watchdog/wdrtas.c
··· 320 320 wdrtas_ioctl(struct inode *inode, struct file *file, 321 321 unsigned int cmd, unsigned long arg) 322 322 { 323 - int __user *argp = (void *)arg; 323 + int __user *argp = (void __user *)arg; 324 324 int i; 325 325 static struct watchdog_info wdinfo = { 326 326 .options = WDRTAS_SUPPORTED_MASK,
+3 -3
drivers/firmware/dell_rbu.c
··· 105 105 int ordernum = 0; 106 106 int retval = 0; 107 107 unsigned int packet_array_size = 0; 108 - void **invalid_addr_packet_array = 0; 109 - void *packet_data_temp_buf = 0; 108 + void **invalid_addr_packet_array = NULL; 109 + void *packet_data_temp_buf = NULL; 110 110 unsigned int idx = 0; 111 111 112 112 pr_debug("create_packet: entry \n"); ··· 178 178 packet_data_temp_buf), 179 179 allocation_floor); 180 180 invalid_addr_packet_array[idx++] = packet_data_temp_buf; 181 - packet_data_temp_buf = 0; 181 + packet_data_temp_buf = NULL; 182 182 } 183 183 } 184 184 spin_lock(&rbu_data.lock);
+6 -5
drivers/i2c/busses/i2c-mv64xxx.c
··· 529 529 i2c_set_adapdata(&drv_data->adapter, drv_data); 530 530 531 531 if (request_irq(drv_data->irq, mv64xxx_i2c_intr, 0, 532 - MV64XXX_I2C_CTLR_NAME, drv_data)) { 533 - 534 - dev_err(dev, "mv64xxx: Can't register intr handler " 535 - "irq: %d\n", drv_data->irq); 532 + MV64XXX_I2C_CTLR_NAME, drv_data)) { 533 + dev_err(&drv_data->adapter.dev, 534 + "mv64xxx: Can't register intr handler irq: %d\n", 535 + drv_data->irq); 536 536 rc = -EINVAL; 537 537 goto exit_unmap_regs; 538 538 } else if ((rc = i2c_add_adapter(&drv_data->adapter)) != 0) { 539 - dev_err(dev, "mv64xxx: Can't add i2c adapter, rc: %d\n", -rc); 539 + dev_err(&drv_data->adapter.dev, 540 + "mv64xxx: Can't add i2c adapter, rc: %d\n", -rc); 540 541 goto exit_free_irq; 541 542 } 542 543
+1
drivers/ieee1394/hosts.h
··· 41 41 /* this nodes state */ 42 42 unsigned in_bus_reset:1; 43 43 unsigned is_shutdown:1; 44 + unsigned resume_packet_sent:1; 44 45 45 46 /* this nodes' duties on the bus */ 46 47 unsigned is_root:1;
+57 -10
drivers/ieee1394/nodemgr.c
··· 1349 1349 } 1350 1350 1351 1351 1352 + /* Write the BROADCAST_CHANNEL as per IEEE1394a 8.3.2.3.11 and 8.4.2.3. This 1353 + * seems like an optional service but in the end it is practically mandatory 1354 + * as a consequence of these clauses. 1355 + * 1356 + * Note that we cannot do a broadcast write to all nodes at once because some 1357 + * pre-1394a devices would hang. */ 1358 + static void nodemgr_irm_write_bc(struct node_entry *ne, int generation) 1359 + { 1360 + const u64 bc_addr = (CSR_REGISTER_BASE | CSR_BROADCAST_CHANNEL); 1361 + quadlet_t bc_remote, bc_local; 1362 + int ret; 1363 + 1364 + if (!ne->host->is_irm || ne->generation != generation || 1365 + ne->nodeid == ne->host->node_id) 1366 + return; 1367 + 1368 + bc_local = cpu_to_be32(ne->host->csr.broadcast_channel); 1369 + 1370 + /* Check if the register is implemented and 1394a compliant. */ 1371 + ret = hpsb_read(ne->host, ne->nodeid, generation, bc_addr, &bc_remote, 1372 + sizeof(bc_remote)); 1373 + if (!ret && bc_remote & cpu_to_be32(0x80000000) && 1374 + bc_remote != bc_local) 1375 + hpsb_node_write(ne, bc_addr, &bc_local, sizeof(bc_local)); 1376 + } 1377 + 1378 + 1352 1379 static void nodemgr_probe_ne(struct host_info *hi, struct node_entry *ne, int generation) 1353 1380 { 1354 1381 struct device *dev; ··· 1386 1359 dev = get_device(&ne->device); 1387 1360 if (!dev) 1388 1361 return; 1362 + 1363 + nodemgr_irm_write_bc(ne, generation); 1389 1364 1390 1365 /* If "needs_probe", then this is either a new or changed node we 1391 1366 * rescan totally. If the generation matches for an existing node ··· 1442 1413 return; 1443 1414 } 1444 1415 1445 - /* Because we are a 1394a-2000 compliant IRM, we need to inform all the other 1446 - * nodes of the broadcast channel. (Really we're only setting the validity 1447 - * bit). Other IRM responsibilities go in here as well. */ 1416 + static int nodemgr_send_resume_packet(struct hpsb_host *host) 1417 + { 1418 + struct hpsb_packet *packet; 1419 + int ret = 1; 1420 + 1421 + packet = hpsb_make_phypacket(host, 1422 + 0x003c0000 | NODEID_TO_NODE(host->node_id) << 24); 1423 + if (packet) { 1424 + packet->no_waiter = 1; 1425 + packet->generation = get_hpsb_generation(host); 1426 + ret = hpsb_send_packet(packet); 1427 + } 1428 + if (ret) 1429 + HPSB_WARN("fw-host%d: Failed to broadcast resume packet", 1430 + host->id); 1431 + return ret; 1432 + } 1433 + 1434 + /* Perform a few high-level IRM responsibilities. */ 1448 1435 static int nodemgr_do_irm_duties(struct hpsb_host *host, int cycles) 1449 1436 { 1450 1437 quadlet_t bc; ··· 1469 1424 if (!host->is_irm || host->irm_id == (nodeid_t)-1) 1470 1425 return 1; 1471 1426 1472 - host->csr.broadcast_channel |= 0x40000000; /* set validity bit */ 1473 - 1474 - bc = cpu_to_be32(host->csr.broadcast_channel); 1475 - 1476 - hpsb_write(host, LOCAL_BUS | ALL_NODES, get_hpsb_generation(host), 1477 - (CSR_REGISTER_BASE | CSR_BROADCAST_CHANNEL), 1478 - &bc, sizeof(quadlet_t)); 1427 + /* We are a 1394a-2000 compliant IRM. Set the validity bit. */ 1428 + host->csr.broadcast_channel |= 0x40000000; 1479 1429 1480 1430 /* If there is no bus manager then we should set the root node's 1481 1431 * force_root bit to promote bus stability per the 1394 ··· 1502 1462 return 0; 1503 1463 } 1504 1464 } 1465 + 1466 + /* Some devices suspend their ports while being connected to an inactive 1467 + * host adapter, i.e. if connected before the low-level driver is 1468 + * loaded. They become visible either when physically unplugged and 1469 + * replugged, or when receiving a resume packet. Send one once. */ 1470 + if (!host->resume_packet_sent && !nodemgr_send_resume_packet(host)) 1471 + host->resume_packet_sent = 1; 1505 1472 1506 1473 return 1; 1507 1474 }
+1 -1
drivers/input/misc/wistron_btns.c
··· 320 320 }, 321 321 .driver_data = keymap_acer_aspire_1500 322 322 }, 323 - { 0, } 323 + { NULL, } 324 324 }; 325 325 326 326 static int __init select_keymap(void)
+1 -1
drivers/macintosh/therm_pm72.c
··· 933 933 if (state0->overtemp > 0) { 934 934 state0->rpm = state0->mpu.rmaxn_exhaust_fan; 935 935 state0->intake_rpm = intake = state0->mpu.rmaxn_intake_fan; 936 - pump = state0->pump_min; 936 + pump = state0->pump_max; 937 937 goto do_set_fans; 938 938 } 939 939
+1 -1
drivers/md/md.c
··· 1729 1729 if (p == NULL && mddev->raid_disks == 0) 1730 1730 return 0; 1731 1731 if (mddev->level >= 0) 1732 - return sprintf(page, "RAID-%d\n", mddev->level); 1732 + return sprintf(page, "raid%d\n", mddev->level); 1733 1733 else 1734 1734 return sprintf(page, "%s\n", p->name); 1735 1735 }
+3 -3
drivers/media/dvb/bt8xx/dst_ca.c
··· 406 406 } 407 407 dprintk(verbose, DST_CA_DEBUG, 1, " "); 408 408 409 - if (copy_from_user(p_ca_message, (void *)arg, sizeof (struct ca_msg))) { 409 + if (copy_from_user(p_ca_message, arg, sizeof (struct ca_msg))) { 410 410 result = -EFAULT; 411 411 goto free_mem_and_exit; 412 412 } ··· 579 579 return 0; 580 580 } 581 581 582 - static int dst_ca_read(struct file *file, char __user *buffer, size_t length, loff_t *offset) 582 + static ssize_t dst_ca_read(struct file *file, char __user *buffer, size_t length, loff_t *offset) 583 583 { 584 584 int bytes_read = 0; 585 585 ··· 588 588 return bytes_read; 589 589 } 590 590 591 - static int dst_ca_write(struct file *file, const char __user *buffer, size_t length, loff_t *offset) 591 + static ssize_t dst_ca_write(struct file *file, const char __user *buffer, size_t length, loff_t *offset) 592 592 { 593 593 dprintk(verbose, DST_CA_DEBUG, 1, " Device write."); 594 594
+3
drivers/media/dvb/ttpci/av7110.c
··· 176 176 } 177 177 } 178 178 179 + if (dev->pci->subsystem_vendor == 0x13c2 && dev->pci->subsystem_device == 0x000e) 180 + av7110_fw_cmd(av7110, COMTYPE_AUDIODAC, SpdifSwitch, 1, 0); // SPDIF on 181 + 179 182 ret = av7110_set_volume(av7110, av7110->mixer.volume_left, av7110->mixer.volume_right); 180 183 if (ret < 0) 181 184 printk("dvb-ttpci:cannot set volume :%d\n",ret);
+2 -1
drivers/media/dvb/ttpci/av7110_hw.h
··· 143 143 MainSwitch, 144 144 ADSwitch, 145 145 SendDiSEqC, 146 - SetRegister 146 + SetRegister, 147 + SpdifSwitch 147 148 }; 148 149 149 150 enum av7110_request_command {
+23 -17
drivers/media/video/cx25840/cx25840-core.c
··· 333 333 334 334 static int set_v4lstd(struct i2c_client *client, v4l2_std_id std) 335 335 { 336 - u8 fmt; 336 + u8 fmt=0; /* zero is autodetect */ 337 337 338 - switch (std) { 339 - /* zero is autodetect */ 340 - case 0: fmt = 0x0; break; 341 - /* default ntsc to ntsc-m */ 342 - case V4L2_STD_NTSC: 343 - case V4L2_STD_NTSC_M: fmt = 0x1; break; 344 - case V4L2_STD_NTSC_M_JP: fmt = 0x2; break; 345 - case V4L2_STD_NTSC_443: fmt = 0x3; break; 346 - case V4L2_STD_PAL: fmt = 0x4; break; 347 - case V4L2_STD_PAL_M: fmt = 0x5; break; 348 - case V4L2_STD_PAL_N: fmt = 0x6; break; 349 - case V4L2_STD_PAL_Nc: fmt = 0x7; break; 350 - case V4L2_STD_PAL_60: fmt = 0x8; break; 351 - case V4L2_STD_SECAM: fmt = 0xc; break; 352 - default: 353 - return -ERANGE; 338 + /* First tests should be against specific std */ 339 + if (std & V4L2_STD_NTSC_M_JP) { 340 + fmt=0x2; 341 + } else if (std & V4L2_STD_NTSC_443) { 342 + fmt=0x3; 343 + } else if (std & V4L2_STD_PAL_M) { 344 + fmt=0x5; 345 + } else if (std & V4L2_STD_PAL_N) { 346 + fmt=0x6; 347 + } else if (std & V4L2_STD_PAL_Nc) { 348 + fmt=0x7; 349 + } else if (std & V4L2_STD_PAL_60) { 350 + fmt=0x8; 351 + } else { 352 + /* Then, test against generic ones */ 353 + if (std & V4L2_STD_NTSC) { 354 + fmt=0x1; 355 + } else if (std & V4L2_STD_PAL) { 356 + fmt=0x4; 357 + } else if (std & V4L2_STD_SECAM) { 358 + fmt=0xc; 359 + } 354 360 } 355 361 356 362 cx25840_and_or(client, 0x400, ~0xf, fmt);
+4 -4
drivers/media/video/em28xx/em28xx-core.c
··· 39 39 #define em28xx_coredbg(fmt, arg...) do {\ 40 40 if (core_debug) \ 41 41 printk(KERN_INFO "%s %s :"fmt, \ 42 - dev->name, __FUNCTION__, ##arg); } while (0) 42 + dev->name, __FUNCTION__ , ##arg); } while (0) 43 43 44 44 static unsigned int reg_debug; 45 45 module_param(reg_debug,int,0644); ··· 48 48 #define em28xx_regdbg(fmt, arg...) do {\ 49 49 if (reg_debug) \ 50 50 printk(KERN_INFO "%s %s :"fmt, \ 51 - dev->name, __FUNCTION__, ##arg); } while (0) 51 + dev->name, __FUNCTION__ , ##arg); } while (0) 52 52 53 53 static unsigned int isoc_debug; 54 54 module_param(isoc_debug,int,0644); ··· 57 57 #define em28xx_isocdbg(fmt, arg...) do {\ 58 58 if (isoc_debug) \ 59 59 printk(KERN_INFO "%s %s :"fmt, \ 60 - dev->name, __FUNCTION__, ##arg); } while (0) 60 + dev->name, __FUNCTION__ , ##arg); } while (0) 61 61 62 62 static int alt = EM28XX_PINOUT; 63 63 module_param(alt, int, 0644); ··· 126 126 const size_t imagesize = PAGE_ALIGN(dev->frame_size); /*needs to be page aligned cause the buffers can be mapped individually! */ 127 127 void *buff = NULL; 128 128 u32 i; 129 - em28xx_coredbg("requested %i buffers with size %i", count, imagesize); 129 + em28xx_coredbg("requested %i buffers with size %zd", count, imagesize); 130 130 if (count > EM28XX_NUM_FRAMES) 131 131 count = EM28XX_NUM_FRAMES; 132 132
+1 -1
drivers/media/video/em28xx/em28xx-i2c.c
··· 44 44 printk(fmt, ##args); } while (0) 45 45 #define dprintk2(lvl,fmt, args...) if (i2c_debug>=lvl) do{ \ 46 46 printk(KERN_DEBUG "%s at %s: " fmt, \ 47 - dev->name, __FUNCTION__, ##args); } while (0) 47 + dev->name, __FUNCTION__ , ##args); } while (0) 48 48 49 49 /* 50 50 * em2800_i2c_send_max4()
+1 -1
drivers/media/video/em28xx/em28xx-video.c
··· 45 45 #define em28xx_videodbg(fmt, arg...) do {\ 46 46 if (video_debug) \ 47 47 printk(KERN_INFO "%s %s :"fmt, \ 48 - dev->name, __FUNCTION__, ##arg); } while (0) 48 + dev->name, __FUNCTION__ , ##arg); } while (0) 49 49 50 50 MODULE_AUTHOR(DRIVER_AUTHOR); 51 51 MODULE_DESCRIPTION(DRIVER_DESC);
+4 -4
drivers/media/video/em28xx/em28xx.h
··· 392 392 /* printk macros */ 393 393 394 394 #define em28xx_err(fmt, arg...) do {\ 395 - printk(KERN_ERR fmt, ##arg); } while (0) 395 + printk(KERN_ERR fmt , ##arg); } while (0) 396 396 397 397 #define em28xx_errdev(fmt, arg...) do {\ 398 398 printk(KERN_ERR "%s: "fmt,\ 399 - dev->name, ##arg); } while (0) 399 + dev->name , ##arg); } while (0) 400 400 401 401 #define em28xx_info(fmt, arg...) do {\ 402 402 printk(KERN_INFO "%s: "fmt,\ 403 - dev->name, ##arg); } while (0) 403 + dev->name , ##arg); } while (0) 404 404 #define em28xx_warn(fmt, arg...) do {\ 405 405 printk(KERN_WARNING "%s: "fmt,\ 406 - dev->name, ##arg); } while (0) 406 + dev->name , ##arg); } while (0) 407 407 408 408 inline static int em28xx_audio_source(struct em28xx *dev, int input) 409 409 {
+1 -1
drivers/media/video/saa7134/saa7134-alsa.c
··· 60 60 MODULE_PARM_DESC(index, "Index value for SAA7134 capture interface(s)."); 61 61 62 62 #define dprintk(fmt, arg...) if (debug) \ 63 - printk(KERN_DEBUG "%s/alsa: " fmt, dev->name, ## arg) 63 + printk(KERN_DEBUG "%s/alsa: " fmt, dev->name , ##arg) 64 64 65 65 66 66
+1 -1
drivers/media/video/tveeprom.c
··· 206 206 { TUNER_ABSENT, "TCL 2002MI_3H"}, 207 207 { TUNER_TCL_2002N, "TCL 2002N 5H"}, 208 208 /* 100-109 */ 209 - { TUNER_ABSENT, "Philips FMD1216ME"}, 209 + { TUNER_PHILIPS_FMD1216ME_MK3, "Philips FMD1216ME"}, 210 210 { TUNER_TEA5767, "Philips TEA5768HL FM Radio"}, 211 211 { TUNER_ABSENT, "Panasonic ENV57H12D5"}, 212 212 { TUNER_PHILIPS_FM1236_MK3, "TCL MFNM05-4"},
+5 -1
drivers/message/i2o/pci.c
··· 303 303 struct i2o_controller *c; 304 304 int rc; 305 305 struct pci_dev *i960 = NULL; 306 + int pci_dev_busy = 0; 306 307 307 308 printk(KERN_INFO "i2o: Checking for PCI I2O controllers...\n"); 308 309 ··· 396 395 if ((rc = i2o_pci_alloc(c))) { 397 396 printk(KERN_ERR "%s: DMA / IO allocation for I2O controller " 398 397 " failed\n", c->name); 398 + if (rc == -ENODEV) 399 + pci_dev_busy = 1; 399 400 goto free_controller; 400 401 } 401 402 ··· 428 425 i2o_iop_free(c); 429 426 430 427 disable: 431 - pci_disable_device(pdev); 428 + if (!pci_dev_busy) 429 + pci_disable_device(pdev); 432 430 433 431 return rc; 434 432 }
+2 -2
drivers/mtd/onenand/generic.c
··· 12 12 * This is a device driver for the OneNAND flash for generic boards. 13 13 */ 14 14 15 - #include <linux/device.h> 16 15 #include <linux/module.h> 17 16 #include <linux/init.h> 17 + #include <linux/platform_device.h> 18 18 #include <linux/mtd/mtd.h> 19 19 #include <linux/mtd/onenand.h> 20 20 #include <linux/mtd/partitions.h> ··· 39 39 { 40 40 struct onenand_info *info; 41 41 struct platform_device *pdev = to_platform_device(dev); 42 - struct onenand_platform_data *pdata = pdev->dev.platform_data; 42 + struct flash_platform_data *pdata = pdev->dev.platform_data; 43 43 struct resource *res = pdev->resource; 44 44 unsigned long size = res->end - res->start + 1; 45 45 int err;
+40 -13
drivers/mtd/onenand/onenand_base.c
··· 940 940 u_char *eccbuf, struct nand_oobinfo *oobsel) 941 941 { 942 942 struct onenand_chip *this = mtd->priv; 943 - unsigned char buffer[MAX_ONENAND_PAGESIZE], *pbuf; 943 + unsigned char *pbuf; 944 944 size_t total_len, len; 945 945 int i, written = 0; 946 946 int ret = 0; ··· 975 975 /* Loop until all keve's data has been written */ 976 976 len = 0; 977 977 while (count) { 978 - pbuf = buffer; 978 + pbuf = this->page_buf; 979 979 /* 980 980 * If the given tuple is >= pagesize then 981 981 * write it out from the iov ··· 995 995 int cnt = 0, thislen; 996 996 while (cnt < mtd->oobblock) { 997 997 thislen = min_t(int, mtd->oobblock - cnt, vecs->iov_len - len); 998 - memcpy(buffer + cnt, vecs->iov_base + len, thislen); 998 + memcpy(this->page_buf + cnt, vecs->iov_base + len, thislen); 999 999 cnt += thislen; 1000 1000 len += thislen; 1001 1001 ··· 1296 1296 1297 1297 /* Block lock scheme */ 1298 1298 for (block = start; block < end; block++) { 1299 + /* Set block address */ 1300 + value = onenand_block_address(this, block); 1301 + this->write_word(value, this->base + ONENAND_REG_START_ADDRESS1); 1302 + /* Select DataRAM for DDP */ 1303 + value = onenand_bufferram_address(this, block); 1304 + this->write_word(value, this->base + ONENAND_REG_START_ADDRESS2); 1299 1305 /* Set start block address */ 1300 1306 this->write_word(block, this->base + ONENAND_REG_START_BLOCK_ADDRESS); 1301 1307 /* Write unlock command */ ··· 1314 1308 while (this->read_word(this->base + ONENAND_REG_CTRL_STATUS) 1315 1309 & ONENAND_CTRL_ONGO) 1316 1310 continue; 1317 - 1318 - /* Set block address for read block status */ 1319 - value = onenand_block_address(this, block); 1320 - this->write_word(value, this->base + ONENAND_REG_START_ADDRESS1); 1321 1311 1322 1312 /* Check lock status */ 1323 1313 status = this->read_word(this->base + ONENAND_REG_WP_STATUS); ··· 1348 1346 1349 1347 static const struct onenand_manufacturers onenand_manuf_ids[] = { 1350 1348 {ONENAND_MFR_SAMSUNG, "Samsung"}, 1351 - {ONENAND_MFR_UNKNOWN, "Unknown"} 1352 1349 }; 1353 1350 1354 1351 /** ··· 1358 1357 */ 1359 1358 static int onenand_check_maf(int manuf) 1360 1359 { 1360 + int size = ARRAY_SIZE(onenand_manuf_ids); 1361 + char *name; 1361 1362 int i; 1362 1363 1363 - for (i = 0; onenand_manuf_ids[i].id; i++) { 1364 + for (i = 0; i < size; i++) 1364 1365 if (manuf == onenand_manuf_ids[i].id) 1365 1366 break; 1366 - } 1367 1367 1368 - printk(KERN_DEBUG "OneNAND Manufacturer: %s (0x%0x)\n", 1369 - onenand_manuf_ids[i].name, manuf); 1368 + if (i < size) 1369 + name = onenand_manuf_ids[i].name; 1370 + else 1371 + name = "Unknown"; 1370 1372 1371 - return (i != ONENAND_MFR_UNKNOWN); 1373 + printk(KERN_DEBUG "OneNAND Manufacturer: %s (0x%0x)\n", name, manuf); 1374 + 1375 + return (i == size); 1372 1376 } 1373 1377 1374 1378 /** ··· 1519 1513 this->read_bufferram = onenand_sync_read_bufferram; 1520 1514 } 1521 1515 1516 + /* Allocate buffers, if necessary */ 1517 + if (!this->page_buf) { 1518 + size_t len; 1519 + len = mtd->oobblock + mtd->oobsize; 1520 + this->page_buf = kmalloc(len, GFP_KERNEL); 1521 + if (!this->page_buf) { 1522 + printk(KERN_ERR "onenand_scan(): Can't allocate page_buf\n"); 1523 + return -ENOMEM; 1524 + } 1525 + this->options |= ONENAND_PAGEBUF_ALLOC; 1526 + } 1527 + 1522 1528 this->state = FL_READY; 1523 1529 init_waitqueue_head(&this->wq); 1524 1530 spin_lock_init(&this->chip_lock); ··· 1592 1574 */ 1593 1575 void onenand_release(struct mtd_info *mtd) 1594 1576 { 1577 + struct onenand_chip *this = mtd->priv; 1578 + 1595 1579 #ifdef CONFIG_MTD_PARTITIONS 1596 1580 /* Deregister partitions */ 1597 1581 del_mtd_partitions (mtd); 1598 1582 #endif 1599 1583 /* Deregister the device */ 1600 1584 del_mtd_device (mtd); 1585 + 1586 + /* Free bad block table memory, if allocated */ 1587 + if (this->bbm) 1588 + kfree(this->bbm); 1589 + /* Buffer allocated by onenand_scan */ 1590 + if (this->options & ONENAND_PAGEBUF_ALLOC) 1591 + kfree(this->page_buf); 1601 1592 } 1602 1593 1603 1594 EXPORT_SYMBOL_GPL(onenand_scan);
+2 -2
drivers/mtd/onenand/onenand_bbt.c
··· 118 118 */ 119 119 static inline int onenand_memory_bbt (struct mtd_info *mtd, struct nand_bbt_descr *bd) 120 120 { 121 - unsigned char data_buf[MAX_ONENAND_PAGESIZE]; 121 + struct onenand_chip *this = mtd->priv; 122 122 123 123 bd->options &= ~NAND_BBT_SCANEMPTY; 124 - return create_bbt(mtd, data_buf, bd, -1); 124 + return create_bbt(mtd, this->page_buf, bd, -1); 125 125 } 126 126 127 127 /**
+5 -5
drivers/net/s2io.c
··· 3078 3078 3079 3079 static int wait_for_msix_trans(nic_t *nic, int i) 3080 3080 { 3081 - XENA_dev_config_t *bar0 = (XENA_dev_config_t *) nic->bar0; 3081 + XENA_dev_config_t __iomem *bar0 = nic->bar0; 3082 3082 u64 val64; 3083 3083 int ret = 0, cnt = 0; 3084 3084 ··· 3099 3099 3100 3100 void restore_xmsi_data(nic_t *nic) 3101 3101 { 3102 - XENA_dev_config_t *bar0 = (XENA_dev_config_t *) nic->bar0; 3102 + XENA_dev_config_t __iomem *bar0 = nic->bar0; 3103 3103 u64 val64; 3104 3104 int i; 3105 3105 ··· 3117 3117 3118 3118 static void store_xmsi_data(nic_t *nic) 3119 3119 { 3120 - XENA_dev_config_t *bar0 = (XENA_dev_config_t *) nic->bar0; 3120 + XENA_dev_config_t __iomem *bar0 = nic->bar0; 3121 3121 u64 val64, addr, data; 3122 3122 int i; 3123 3123 ··· 3140 3140 3141 3141 int s2io_enable_msi(nic_t *nic) 3142 3142 { 3143 - XENA_dev_config_t *bar0 = (XENA_dev_config_t *) nic->bar0; 3143 + XENA_dev_config_t __iomem *bar0 = nic->bar0; 3144 3144 u16 msi_ctrl, msg_val; 3145 3145 struct config_param *config = &nic->config; 3146 3146 struct net_device *dev = nic->dev; ··· 3190 3190 3191 3191 int s2io_enable_msi_x(nic_t *nic) 3192 3192 { 3193 - XENA_dev_config_t *bar0 = (XENA_dev_config_t *) nic->bar0; 3193 + XENA_dev_config_t __iomem *bar0 = nic->bar0; 3194 3194 u64 tx_mat, rx_mat; 3195 3195 u16 msi_control; /* Temp variable */ 3196 3196 int ret, i, j, msix_indx = 1;
+102 -86
drivers/net/tg3.c
··· 68 68 69 69 #define DRV_MODULE_NAME "tg3" 70 70 #define PFX DRV_MODULE_NAME ": " 71 - #define DRV_MODULE_VERSION "3.45" 72 - #define DRV_MODULE_RELDATE "Dec 13, 2005" 71 + #define DRV_MODULE_VERSION "3.46" 72 + #define DRV_MODULE_RELDATE "Dec 19, 2005" 73 73 74 74 #define TG3_DEF_MAC_MODE 0 75 75 #define TG3_DEF_RX_MODE 0 ··· 341 341 { "interrupt test (offline)" }, 342 342 }; 343 343 344 + static void tg3_write32(struct tg3 *tp, u32 off, u32 val) 345 + { 346 + writel(val, tp->regs + off); 347 + } 348 + 349 + static u32 tg3_read32(struct tg3 *tp, u32 off) 350 + { 351 + return (readl(tp->regs + off)); 352 + } 353 + 344 354 static void tg3_write_indirect_reg32(struct tg3 *tp, u32 off, u32 val) 345 355 { 346 356 unsigned long flags; ··· 421 411 return val; 422 412 } 423 413 424 - static void _tw32_flush(struct tg3 *tp, u32 off, u32 val) 414 + /* usec_wait specifies the wait time in usec when writing to certain registers 415 + * where it is unsafe to read back the register without some delay. 416 + * GRC_LOCAL_CTRL is one example if the GPIOs are toggled to switch power. 417 + * TG3PCI_CLOCK_CTRL is another example if the clock frequencies are changed. 418 + */ 419 + static void _tw32_flush(struct tg3 *tp, u32 off, u32 val, u32 usec_wait) 425 420 { 426 - tp->write32(tp, off, val); 427 - if (!(tp->tg3_flags & TG3_FLAG_PCIX_TARGET_HWBUG) && 428 - !(tp->tg3_flags & TG3_FLAG_5701_REG_WRITE_BUG) && 429 - !(tp->tg3_flags2 & TG3_FLG2_ICH_WORKAROUND)) 430 - tp->read32(tp, off); /* flush */ 421 + if ((tp->tg3_flags & TG3_FLAG_PCIX_TARGET_HWBUG) || 422 + (tp->tg3_flags2 & TG3_FLG2_ICH_WORKAROUND)) 423 + /* Non-posted methods */ 424 + tp->write32(tp, off, val); 425 + else { 426 + /* Posted method */ 427 + tg3_write32(tp, off, val); 428 + if (usec_wait) 429 + udelay(usec_wait); 430 + tp->read32(tp, off); 431 + } 432 + /* Wait again after the read for the posted method to guarantee that 433 + * the wait time is met. 434 + */ 435 + if (usec_wait) 436 + udelay(usec_wait); 431 437 } 432 438 433 439 static inline void tw32_mailbox_flush(struct tg3 *tp, u32 off, u32 val) ··· 464 438 readl(mbox); 465 439 } 466 440 467 - static void tg3_write32(struct tg3 *tp, u32 off, u32 val) 468 - { 469 - writel(val, tp->regs + off); 470 - } 471 - 472 - static u32 tg3_read32(struct tg3 *tp, u32 off) 473 - { 474 - return (readl(tp->regs + off)); 475 - } 476 - 477 441 #define tw32_mailbox(reg, val) tp->write32_mbox(tp, reg, val) 478 442 #define tw32_mailbox_f(reg, val) tw32_mailbox_flush(tp, (reg), (val)) 479 443 #define tw32_rx_mbox(reg, val) tp->write32_rx_mbox(tp, reg, val) ··· 471 455 #define tr32_mailbox(reg) tp->read32_mbox(tp, reg) 472 456 473 457 #define tw32(reg,val) tp->write32(tp, reg, val) 474 - #define tw32_f(reg,val) _tw32_flush(tp,(reg),(val)) 458 + #define tw32_f(reg,val) _tw32_flush(tp,(reg),(val), 0) 459 + #define tw32_wait_f(reg,val,us) _tw32_flush(tp,(reg),(val), (us)) 475 460 #define tr32(reg) tp->read32(tp, reg) 476 461 477 462 static void tg3_write_mem(struct tg3 *tp, u32 off, u32 val) ··· 612 595 613 596 if (tp->tg3_flags2 & TG3_FLG2_5705_PLUS) { 614 597 if (orig_clock_ctrl & CLOCK_CTRL_625_CORE) { 615 - tw32_f(TG3PCI_CLOCK_CTRL, 616 - clock_ctrl | CLOCK_CTRL_625_CORE); 617 - udelay(40); 598 + tw32_wait_f(TG3PCI_CLOCK_CTRL, 599 + clock_ctrl | CLOCK_CTRL_625_CORE, 40); 618 600 } 619 601 } else if ((orig_clock_ctrl & CLOCK_CTRL_44MHZ_CORE) != 0) { 620 - tw32_f(TG3PCI_CLOCK_CTRL, 621 - clock_ctrl | 622 - (CLOCK_CTRL_44MHZ_CORE | CLOCK_CTRL_ALTCLK)); 623 - udelay(40); 624 - tw32_f(TG3PCI_CLOCK_CTRL, 625 - clock_ctrl | (CLOCK_CTRL_ALTCLK)); 626 - udelay(40); 602 + tw32_wait_f(TG3PCI_CLOCK_CTRL, 603 + clock_ctrl | 604 + (CLOCK_CTRL_44MHZ_CORE | CLOCK_CTRL_ALTCLK), 605 + 40); 606 + tw32_wait_f(TG3PCI_CLOCK_CTRL, 607 + clock_ctrl | (CLOCK_CTRL_ALTCLK), 608 + 40); 627 609 } 628 - tw32_f(TG3PCI_CLOCK_CTRL, clock_ctrl); 629 - udelay(40); 610 + tw32_wait_f(TG3PCI_CLOCK_CTRL, clock_ctrl, 40); 630 611 } 631 612 632 613 #define PHY_BUSY_LOOPS 5000 ··· 1032 1017 if ((tp->tg3_flags & TG3_FLAG_EEPROM_WRITE_PROT) != 0) 1033 1018 return; 1034 1019 1035 - if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704) { 1036 - tp_peer = pci_get_drvdata(tp->pdev_peer); 1037 - if (!tp_peer) 1038 - BUG(); 1039 - } 1020 + if ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704) || 1021 + (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5714)) { 1022 + struct net_device *dev_peer; 1040 1023 1024 + dev_peer = pci_get_drvdata(tp->pdev_peer); 1025 + if (!dev_peer) 1026 + BUG(); 1027 + tp_peer = netdev_priv(dev_peer); 1028 + } 1041 1029 1042 1030 if ((tp->tg3_flags & TG3_FLAG_WOL_ENABLE) != 0 || 1043 1031 (tp->tg3_flags & TG3_FLAG_ENABLE_ASF) != 0 || ··· 1048 1030 (tp_peer->tg3_flags & TG3_FLAG_ENABLE_ASF) != 0) { 1049 1031 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5700 || 1050 1032 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5701) { 1051 - tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | 1052 - (GRC_LCLCTRL_GPIO_OE0 | 1053 - GRC_LCLCTRL_GPIO_OE1 | 1054 - GRC_LCLCTRL_GPIO_OE2 | 1055 - GRC_LCLCTRL_GPIO_OUTPUT0 | 1056 - GRC_LCLCTRL_GPIO_OUTPUT1)); 1057 - udelay(100); 1033 + tw32_wait_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | 1034 + (GRC_LCLCTRL_GPIO_OE0 | 1035 + GRC_LCLCTRL_GPIO_OE1 | 1036 + GRC_LCLCTRL_GPIO_OE2 | 1037 + GRC_LCLCTRL_GPIO_OUTPUT0 | 1038 + GRC_LCLCTRL_GPIO_OUTPUT1), 1039 + 100); 1058 1040 } else { 1059 1041 u32 no_gpio2; 1060 - u32 grc_local_ctrl; 1042 + u32 grc_local_ctrl = 0; 1061 1043 1062 1044 if (tp_peer != tp && 1063 1045 (tp_peer->tg3_flags & TG3_FLAG_INIT_COMPLETE) != 0) 1064 1046 return; 1065 1047 1048 + /* Workaround to prevent overdrawing Amps. */ 1049 + if (GET_ASIC_REV(tp->pci_chip_rev_id) == 1050 + ASIC_REV_5714) { 1051 + grc_local_ctrl |= GRC_LCLCTRL_GPIO_OE3; 1052 + tw32_wait_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | 1053 + grc_local_ctrl, 100); 1054 + } 1055 + 1066 1056 /* On 5753 and variants, GPIO2 cannot be used. */ 1067 1057 no_gpio2 = tp->nic_sram_data_cfg & 1068 1058 NIC_SRAM_DATA_CFG_NO_GPIO2; 1069 1059 1070 - grc_local_ctrl = GRC_LCLCTRL_GPIO_OE0 | 1060 + grc_local_ctrl |= GRC_LCLCTRL_GPIO_OE0 | 1071 1061 GRC_LCLCTRL_GPIO_OE1 | 1072 1062 GRC_LCLCTRL_GPIO_OE2 | 1073 1063 GRC_LCLCTRL_GPIO_OUTPUT1 | ··· 1084 1058 grc_local_ctrl &= ~(GRC_LCLCTRL_GPIO_OE2 | 1085 1059 GRC_LCLCTRL_GPIO_OUTPUT2); 1086 1060 } 1087 - tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | 1088 - grc_local_ctrl); 1089 - udelay(100); 1061 + tw32_wait_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | 1062 + grc_local_ctrl, 100); 1090 1063 1091 1064 grc_local_ctrl |= GRC_LCLCTRL_GPIO_OUTPUT0; 1092 1065 1093 - tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | 1094 - grc_local_ctrl); 1095 - udelay(100); 1066 + tw32_wait_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | 1067 + grc_local_ctrl, 100); 1096 1068 1097 1069 if (!no_gpio2) { 1098 1070 grc_local_ctrl &= ~GRC_LCLCTRL_GPIO_OUTPUT2; 1099 - tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | 1100 - grc_local_ctrl); 1101 - udelay(100); 1071 + tw32_wait_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | 1072 + grc_local_ctrl, 100); 1102 1073 } 1103 1074 } 1104 1075 } else { ··· 1105 1082 (tp_peer->tg3_flags & TG3_FLAG_INIT_COMPLETE) != 0) 1106 1083 return; 1107 1084 1108 - tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | 1109 - (GRC_LCLCTRL_GPIO_OE1 | 1110 - GRC_LCLCTRL_GPIO_OUTPUT1)); 1111 - udelay(100); 1085 + tw32_wait_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | 1086 + (GRC_LCLCTRL_GPIO_OE1 | 1087 + GRC_LCLCTRL_GPIO_OUTPUT1), 100); 1112 1088 1113 - tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | 1114 - (GRC_LCLCTRL_GPIO_OE1)); 1115 - udelay(100); 1089 + tw32_wait_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | 1090 + GRC_LCLCTRL_GPIO_OE1, 100); 1116 1091 1117 - tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | 1118 - (GRC_LCLCTRL_GPIO_OE1 | 1119 - GRC_LCLCTRL_GPIO_OUTPUT1)); 1120 - udelay(100); 1092 + tw32_wait_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | 1093 + (GRC_LCLCTRL_GPIO_OE1 | 1094 + GRC_LCLCTRL_GPIO_OUTPUT1), 100); 1121 1095 } 1122 1096 } 1123 1097 } ··· 1157 1137 udelay(100); /* Delay after power state change */ 1158 1138 1159 1139 /* Switch out of Vaux if it is not a LOM */ 1160 - if (!(tp->tg3_flags & TG3_FLAG_EEPROM_WRITE_PROT)) { 1161 - tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl); 1162 - udelay(100); 1163 - } 1140 + if (!(tp->tg3_flags & TG3_FLAG_EEPROM_WRITE_PROT)) 1141 + tw32_wait_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl, 100); 1164 1142 1165 1143 return 0; 1166 1144 ··· 1257 1239 base_val |= (CLOCK_CTRL_RXCLK_DISABLE | 1258 1240 CLOCK_CTRL_TXCLK_DISABLE); 1259 1241 1260 - tw32_f(TG3PCI_CLOCK_CTRL, base_val | 1261 - CLOCK_CTRL_ALTCLK | 1262 - CLOCK_CTRL_PWRDOWN_PLL133); 1263 - udelay(40); 1242 + tw32_wait_f(TG3PCI_CLOCK_CTRL, base_val | CLOCK_CTRL_ALTCLK | 1243 + CLOCK_CTRL_PWRDOWN_PLL133, 40); 1264 1244 } else if (tp->tg3_flags2 & TG3_FLG2_5780_CLASS) { 1265 1245 /* do nothing */ 1266 1246 } else if (!((tp->tg3_flags2 & TG3_FLG2_5750_PLUS) && ··· 1279 1263 newbits2 = newbits1 | CLOCK_CTRL_44MHZ_CORE; 1280 1264 } 1281 1265 1282 - tw32_f(TG3PCI_CLOCK_CTRL, tp->pci_clock_ctrl | newbits1); 1283 - udelay(40); 1266 + tw32_wait_f(TG3PCI_CLOCK_CTRL, tp->pci_clock_ctrl | newbits1, 1267 + 40); 1284 1268 1285 - tw32_f(TG3PCI_CLOCK_CTRL, tp->pci_clock_ctrl | newbits2); 1286 - udelay(40); 1269 + tw32_wait_f(TG3PCI_CLOCK_CTRL, tp->pci_clock_ctrl | newbits2, 1270 + 40); 1287 1271 1288 1272 if (!(tp->tg3_flags2 & TG3_FLG2_5705_PLUS)) { 1289 1273 u32 newbits3; ··· 1297 1281 newbits3 = CLOCK_CTRL_44MHZ_CORE; 1298 1282 } 1299 1283 1300 - tw32_f(TG3PCI_CLOCK_CTRL, 1301 - tp->pci_clock_ctrl | newbits3); 1302 - udelay(40); 1284 + tw32_wait_f(TG3PCI_CLOCK_CTRL, 1285 + tp->pci_clock_ctrl | newbits3, 40); 1303 1286 } 1304 1287 } 1305 1288 ··· 1309 1294 tg3_writephy(tp, MII_TG3_EXT_CTRL, 1310 1295 MII_TG3_EXT_CTRL_FORCE_LED_OFF); 1311 1296 tg3_writephy(tp, MII_TG3_AUX_CTRL, 0x01b2); 1312 - tg3_writephy(tp, MII_BMCR, BMCR_PDOWN); 1297 + if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5700) 1298 + tg3_writephy(tp, MII_BMCR, BMCR_PDOWN); 1313 1299 } 1314 1300 } 1315 1301 ··· 7975 7959 u32 offset; 7976 7960 u32 len; 7977 7961 } mem_tbl_570x[] = { 7978 - { 0x00000000, 0x01000}, 7962 + { 0x00000000, 0x00b50}, 7979 7963 { 0x00002000, 0x1c000}, 7980 7964 { 0xffffffff, 0x00000} 7981 7965 }, mem_tbl_5705[] = { 7982 7966 { 0x00000100, 0x0000c}, 7983 7967 { 0x00000200, 0x00008}, 7984 - { 0x00000b50, 0x00400}, 7985 7968 { 0x00004000, 0x00800}, 7986 7969 { 0x00006000, 0x01000}, 7987 7970 { 0x00008000, 0x02000}, ··· 10481 10466 return str; 10482 10467 } 10483 10468 10484 - static struct pci_dev * __devinit tg3_find_5704_peer(struct tg3 *tp) 10469 + static struct pci_dev * __devinit tg3_find_peer(struct tg3 *tp) 10485 10470 { 10486 10471 struct pci_dev *peer; 10487 10472 unsigned int func, devnr = tp->pdev->devfn & ~7; ··· 10734 10719 tp->rx_pending = 63; 10735 10720 } 10736 10721 10737 - if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704) 10738 - tp->pdev_peer = tg3_find_5704_peer(tp); 10722 + if ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704) || 10723 + (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5714)) 10724 + tp->pdev_peer = tg3_find_peer(tp); 10739 10725 10740 10726 err = tg3_get_device_address(tp); 10741 10727 if (err) {
+3 -4
drivers/pci/Makefile
··· 6 6 pci-driver.o search.o pci-sysfs.o rom.o setup-res.o 7 7 obj-$(CONFIG_PROC_FS) += proc.o 8 8 9 + # Build PCI Express stuff if needed 10 + obj-$(CONFIG_PCIEPORTBUS) += pcie/ 11 + 9 12 obj-$(CONFIG_HOTPLUG) += hotplug.o 10 13 11 14 # Build the PCI Hotplug drivers if we were asked to ··· 43 40 ifeq ($(CONFIG_PCI_DEBUG),y) 44 41 EXTRA_CFLAGS += -DDEBUG 45 42 endif 46 - 47 - # Build PCI Express stuff if needed 48 - obj-$(CONFIG_PCIEPORTBUS) += pcie/ 49 -
+10 -9
drivers/sbus/char/jsflash.c
··· 249 249 /* 250 250 * OS SIMM Cannot be read in other size but a 32bits word. 251 251 */ 252 - static ssize_t jsf_read(struct file * file, char * buf, 252 + static ssize_t jsf_read(struct file * file, char __user * buf, 253 253 size_t togo, loff_t *ppos) 254 254 { 255 255 unsigned long p = *ppos; 256 - char *tmp = buf; 256 + char __user *tmp = buf; 257 257 258 258 union byte4 { 259 259 char s[4]; ··· 305 305 return tmp-buf; 306 306 } 307 307 308 - static ssize_t jsf_write(struct file * file, const char * buf, 308 + static ssize_t jsf_write(struct file * file, const char __user * buf, 309 309 size_t count, loff_t *ppos) 310 310 { 311 311 return -ENOSPC; ··· 356 356 * Program a block of flash. 357 357 * Very simple because we can do it byte by byte anyway. 358 358 */ 359 - static int jsf_ioctl_program(unsigned long arg) 359 + static int jsf_ioctl_program(void __user *arg) 360 360 { 361 361 struct jsflash_program_arg abuf; 362 - char *uptr; 362 + char __user *uptr; 363 363 unsigned long p; 364 364 unsigned int togo; 365 365 union { ··· 367 367 char s[4]; 368 368 } b; 369 369 370 - if (copy_from_user(&abuf, (char *)arg, JSFPRGSZ)) 370 + if (copy_from_user(&abuf, arg, JSFPRGSZ)) 371 371 return -EFAULT; 372 372 p = abuf.off; 373 373 togo = abuf.size; 374 374 if ((togo & 3) || (p & 3)) return -EINVAL; 375 375 376 - uptr = (char *) (unsigned long) abuf.data; 376 + uptr = (char __user *) (unsigned long) abuf.data; 377 377 while (togo != 0) { 378 378 togo -= 4; 379 379 if (copy_from_user(&b.s[0], uptr, 4)) ··· 390 390 unsigned long arg) 391 391 { 392 392 int error = -ENOTTY; 393 + void __user *argp = (void __user *)arg; 393 394 394 395 if (!capable(CAP_SYS_ADMIN)) 395 396 return -EPERM; 396 397 switch (cmd) { 397 398 case JSFLASH_IDENT: 398 - if (copy_to_user((void *)arg, &jsf0.id, JSFIDSZ)) 399 + if (copy_to_user(argp, &jsf0.id, JSFIDSZ)) 399 400 return -EFAULT; 400 401 break; 401 402 case JSFLASH_ERASE: 402 403 error = jsf_ioctl_erase(arg); 403 404 break; 404 405 case JSFLASH_PROGRAM: 405 - error = jsf_ioctl_program(arg); 406 + error = jsf_ioctl_program(argp); 406 407 break; 407 408 } 408 409
+5 -5
drivers/sbus/char/uctrl.c
··· 309 309 } 310 310 } 311 311 312 - void uctrl_get_event_status() 312 + void uctrl_get_event_status(void) 313 313 { 314 314 struct uctrl_driver *driver = &drv; 315 315 struct uctrl_txn txn; ··· 318 318 txn.opcode = READ_EVENT_STATUS; 319 319 txn.inbits = 0; 320 320 txn.outbits = 2; 321 - txn.inbuf = 0; 321 + txn.inbuf = NULL; 322 322 txn.outbuf = outbits; 323 323 324 324 uctrl_do_txn(&txn); ··· 329 329 dprintk(("ev is %x\n", driver->status.event_status)); 330 330 } 331 331 332 - void uctrl_get_external_status() 332 + void uctrl_get_external_status(void) 333 333 { 334 334 struct uctrl_driver *driver = &drv; 335 335 struct uctrl_txn txn; ··· 339 339 txn.opcode = READ_EXTERNAL_STATUS; 340 340 txn.inbits = 0; 341 341 txn.outbits = 2; 342 - txn.inbuf = 0; 342 + txn.inbuf = NULL; 343 343 txn.outbuf = outbits; 344 344 345 345 uctrl_do_txn(&txn); ··· 414 414 if (driver->irq) 415 415 free_irq(driver->irq, driver); 416 416 if (driver->regs) 417 - driver->regs = 0; 417 + driver->regs = NULL; 418 418 } 419 419 420 420 module_init(ts102_uctrl_init);
+1 -1
drivers/sbus/char/vfc.h
··· 125 125 126 126 127 127 struct vfc_dev { 128 - volatile struct vfc_regs *regs; 128 + volatile struct vfc_regs __iomem *regs; 129 129 struct vfc_regs *phys_regs; 130 130 unsigned int control_reg; 131 131 struct semaphore device_lock_sem;
+3 -3
drivers/sbus/char/vfc_dev.c
··· 149 149 } 150 150 printk("Initializing vfc%d\n",instance); 151 151 dev->regs = NULL; 152 - dev->regs = (volatile struct vfc_regs *) 152 + dev->regs = (volatile struct vfc_regs __iomem *) 153 153 sbus_ioremap(&sdev->resource[0], 0, 154 154 sizeof(struct vfc_regs), vfcstr); 155 155 dev->which_io = sdev->reg_addrs[0].which_io; ··· 319 319 int timeout = 1000; 320 320 321 321 while (!timeout--) { 322 - if (dev->regs->control & VFC_STATUS_CAPTURE) 322 + if (sbus_readl(&dev->regs->control) & VFC_STATUS_CAPTURE) 323 323 break; 324 324 vfc_i2c_delay_no_busy(dev, 100); 325 325 } ··· 718 718 if(dev == NULL) 719 719 return; 720 720 devfs_remove("vfc/%d", dev->instance); 721 - sbus_iounmap((unsigned long)dev->regs, sizeof(struct vfc_regs)); 721 + sbus_iounmap(dev->regs, sizeof(struct vfc_regs)); 722 722 kfree(dev); 723 723 } 724 724
+20 -5
drivers/scsi/dpt_i2o.c
··· 660 660 msg[2] = 0; 661 661 msg[3]= 0; 662 662 msg[4] = (u32)cmd; 663 - if( (rcode = adpt_i2o_post_wait(pHba, msg, sizeof(msg), FOREVER)) != 0){ 663 + if (pHba->host) 664 + spin_lock_irq(pHba->host->host_lock); 665 + rcode = adpt_i2o_post_wait(pHba, msg, sizeof(msg), FOREVER); 666 + if (pHba->host) 667 + spin_unlock_irq(pHba->host->host_lock); 668 + if (rcode != 0) { 664 669 if(rcode == -EOPNOTSUPP ){ 665 670 printk(KERN_INFO"%s: Abort cmd not supported\n",pHba->name); 666 671 return FAILED; ··· 702 697 msg[2] = 0; 703 698 msg[3] = 0; 704 699 700 + if (pHba->host) 701 + spin_lock_irq(pHba->host->host_lock); 705 702 old_state = d->state; 706 703 d->state |= DPTI_DEV_RESET; 707 - if( (rcode = adpt_i2o_post_wait(pHba, msg,sizeof(msg), FOREVER)) ){ 708 - d->state = old_state; 704 + rcode = adpt_i2o_post_wait(pHba, msg,sizeof(msg), FOREVER); 705 + d->state = old_state; 706 + if (pHba->host) 707 + spin_unlock_irq(pHba->host->host_lock); 708 + if (rcode != 0) { 709 709 if(rcode == -EOPNOTSUPP ){ 710 710 printk(KERN_INFO"%s: Device reset not supported\n",pHba->name); 711 711 return FAILED; ··· 718 708 printk(KERN_INFO"%s: Device reset failed\n",pHba->name); 719 709 return FAILED; 720 710 } else { 721 - d->state = old_state; 722 711 printk(KERN_INFO"%s: Device reset successful\n",pHba->name); 723 712 return SUCCESS; 724 713 } ··· 730 721 { 731 722 adpt_hba* pHba; 732 723 u32 msg[4]; 724 + u32 rcode; 733 725 734 726 pHba = (adpt_hba*)cmd->device->host->hostdata[0]; 735 727 memset(msg, 0, sizeof(msg)); ··· 739 729 msg[1] = (I2O_HBA_BUS_RESET<<24|HOST_TID<<12|pHba->channel[cmd->device->channel].tid); 740 730 msg[2] = 0; 741 731 msg[3] = 0; 742 - if(adpt_i2o_post_wait(pHba, msg,sizeof(msg), FOREVER) ){ 732 + if (pHba->host) 733 + spin_lock_irq(pHba->host->host_lock); 734 + rcode = adpt_i2o_post_wait(pHba, msg,sizeof(msg), FOREVER); 735 + if (pHba->host) 736 + spin_unlock_irq(pHba->host->host_lock); 737 + if (rcode != 0) { 743 738 printk(KERN_WARNING"%s: Bus reset failed.\n",pHba->name); 744 739 return FAILED; 745 740 } else {
+1 -1
drivers/scsi/iscsi_tcp.c
··· 3368 3368 switch(param) { 3369 3369 case ISCSI_PARAM_MAX_RECV_DLENGTH: { 3370 3370 char *saveptr = conn->data; 3371 - int flags = GFP_KERNEL; 3371 + gfp_t flags = GFP_KERNEL; 3372 3372 3373 3373 if (conn->data_size >= value) { 3374 3374 conn->max_recv_dlength = value;
+1 -1
drivers/scsi/scsi_transport_iscsi.c
··· 249 249 } 250 250 251 251 static void* 252 - mempool_zone_alloc_skb(unsigned int gfp_mask, void *pool_data) 252 + mempool_zone_alloc_skb(gfp_t gfp_mask, void *pool_data) 253 253 { 254 254 struct mempool_zone *zone = pool_data; 255 255
+2
drivers/usb/host/uhci-hcd.c
··· 717 717 * at the source, so we must turn off PIRQ. 718 718 */ 719 719 pci_write_config_word(to_pci_dev(uhci_dev(uhci)), USBLEGSUP, 0); 720 + mb(); 720 721 clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); 721 722 uhci->hc_inaccessible = 1; 722 723 hcd->poll_rh = 0; ··· 739 738 * really don't want to keep a stale HCD_FLAG_HW_ACCESSIBLE=0 740 739 */ 741 740 set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); 741 + mb(); 742 742 743 743 if (uhci->rh_state == UHCI_RH_RESET) /* Dead */ 744 744 return 0;
+1
drivers/usb/input/hid-input.c
··· 137 137 switch (usage->hid & 0xffff) { 138 138 case 0xba: map_abs(ABS_RUDDER); break; 139 139 case 0xbb: map_abs(ABS_THROTTLE); break; 140 + default: goto ignore; 140 141 } 141 142 break; 142 143
+1 -1
drivers/usb/misc/auerswald.c
··· 1696 1696 int ret; 1697 1697 wait_queue_t wait; 1698 1698 1699 - dbg ("auerchar_write %d bytes", len); 1699 + dbg ("auerchar_write %zd bytes", len); 1700 1700 1701 1701 /* Error checking */ 1702 1702 if (!ccp)
+1 -1
drivers/video/arcfb.c
··· 441 441 * the fb. it's inefficient for them to do anything less than 64*8 442 442 * writes since we update the lcd in each write() anyway. 443 443 */ 444 - static ssize_t arcfb_write(struct file *file, const char *buf, size_t count, 444 + static ssize_t arcfb_write(struct file *file, const char __user *buf, size_t count, 445 445 loff_t *ppos) 446 446 { 447 447 /* modded from epson 1355 */
+5 -3
drivers/video/console/fbcon_ud.c
··· 420 420 int ud_update_start(struct fb_info *info) 421 421 { 422 422 struct fbcon_ops *ops = info->fbcon_par; 423 - u32 xoffset, yoffset; 423 + int xoffset, yoffset; 424 424 u32 vyres = GETVYRES(ops->p->scrollmode, info); 425 425 u32 vxres = GETVXRES(ops->p->scrollmode, info); 426 426 int err; 427 427 428 - xoffset = (vxres - info->var.xres) - ops->var.xoffset; 429 - yoffset = (vyres - info->var.yres) - ops->var.yoffset; 428 + xoffset = vxres - info->var.xres - ops->var.xoffset; 429 + yoffset = vyres - info->var.yres - ops->var.yoffset; 430 + if (yoffset < 0) 431 + yoffset += vyres; 430 432 ops->var.xoffset = xoffset; 431 433 ops->var.yoffset = yoffset; 432 434 err = fb_pan_display(info, &ops->var);
+2 -2
drivers/video/cyber2000fb.c
··· 1512 1512 * I/O cycles storing into a reserved memory space at 1513 1513 * physical address 0x3000000 1514 1514 */ 1515 - unsigned char *iop; 1515 + unsigned char __iomem *iop; 1516 1516 1517 1517 iop = ioremap(0x3000000, 0x5000); 1518 1518 if (iop == NULL) { ··· 1526 1526 writeb(EXT_BIU_MISC, iop + 0x3ce); 1527 1527 writeb(EXT_BIU_MISC_LIN_ENABLE, iop + 0x3cf); 1528 1528 1529 - iounmap((void *)iop); 1529 + iounmap(iop); 1530 1530 #else 1531 1531 /* 1532 1532 * Most other machine types are "normal", so
+5
drivers/video/intelfb/intelfb.h
··· 41 41 42 42 /*** hw-related values ***/ 43 43 44 + /* Resource Allocation */ 45 + #define INTELFB_FB_ACQUIRED 1 46 + #define INTELFB_MMIO_ACQUIRED 2 47 + 44 48 /* PCI ids for supported devices */ 45 49 #define PCI_DEVICE_ID_INTEL_830M 0x3577 46 50 #define PCI_DEVICE_ID_INTEL_845G 0x2562 ··· 261 257 int hwcursor; 262 258 int fixed_mode; 263 259 int ring_active; 260 + int flag; 264 261 265 262 /* hw cursor */ 266 263 int cursor_on;
+20 -31
drivers/video/intelfb/intelfbdrv.c
··· 135 135 static void __devinit get_initial_mode(struct intelfb_info *dinfo); 136 136 static void update_dinfo(struct intelfb_info *dinfo, 137 137 struct fb_var_screeninfo *var); 138 - static int intelfb_get_fix(struct fb_fix_screeninfo *fix, 139 - struct fb_info *info); 140 - 141 138 static int intelfb_check_var(struct fb_var_screeninfo *var, 142 139 struct fb_info *info); 143 140 static int intelfb_set_par(struct fb_info *info); ··· 470 473 if (dinfo->aperture.virtual) 471 474 iounmap((void __iomem *)dinfo->aperture.virtual); 472 475 473 - if (dinfo->mmio_base_phys) 476 + if (dinfo->flag & INTELFB_MMIO_ACQUIRED) 474 477 release_mem_region(dinfo->mmio_base_phys, INTEL_REG_SIZE); 475 - if (dinfo->aperture.physical) 478 + if (dinfo->flag & INTELFB_FB_ACQUIRED) 476 479 release_mem_region(dinfo->aperture.physical, 477 480 dinfo->aperture.size); 478 481 framebuffer_release(dinfo->info); ··· 569 572 cleanup(dinfo); 570 573 return -ENODEV; 571 574 } 575 + 576 + dinfo->flag |= INTELFB_FB_ACQUIRED; 577 + 572 578 if (!request_mem_region(dinfo->mmio_base_phys, 573 579 INTEL_REG_SIZE, 574 580 INTELFB_MODULE_NAME)) { ··· 579 579 cleanup(dinfo); 580 580 return -ENODEV; 581 581 } 582 + 583 + dinfo->flag |= INTELFB_MMIO_ACQUIRED; 582 584 583 585 /* Get the chipset info. */ 584 586 dinfo->pci_chipset = pdev->device; ··· 1093 1091 return 1; 1094 1092 1095 1093 info->pixmap.scan_align = 1; 1096 - 1094 + strcpy(info->fix.id, dinfo->name); 1095 + info->fix.smem_start = dinfo->fb.physical; 1096 + info->fix.smem_len = dinfo->fb.size; 1097 + info->fix.type = FB_TYPE_PACKED_PIXELS; 1098 + info->fix.type_aux = 0; 1099 + info->fix.xpanstep = 8; 1100 + info->fix.ypanstep = 1; 1101 + info->fix.ywrapstep = 0; 1102 + info->fix.mmio_start = dinfo->mmio_base_phys; 1103 + info->fix.mmio_len = INTEL_REG_SIZE; 1104 + info->fix.accel = FB_ACCEL_I830; 1097 1105 update_dinfo(dinfo, &info->var); 1098 1106 1099 1107 return 0; ··· 1121 1109 dinfo->yres = var->xres; 1122 1110 dinfo->pixclock = var->pixclock; 1123 1111 1124 - intelfb_get_fix(&dinfo->info->fix, dinfo->info); 1112 + dinfo->info->fix.visual = dinfo->visual; 1113 + dinfo->info->fix.line_length = dinfo->pitch; 1125 1114 1126 1115 switch (dinfo->bpp) { 1127 1116 case 8: ··· 1151 1138 } 1152 1139 1153 1140 /* fbops functions */ 1154 - 1155 - static int 1156 - intelfb_get_fix(struct fb_fix_screeninfo *fix, struct fb_info *info) 1157 - { 1158 - struct intelfb_info *dinfo = GET_DINFO(info); 1159 - 1160 - DBG_MSG("intelfb_get_fix\n"); 1161 - 1162 - memset(fix, 0, sizeof(*fix)); 1163 - strcpy(fix->id, dinfo->name); 1164 - fix->smem_start = dinfo->fb.physical; 1165 - fix->smem_len = dinfo->fb.size; 1166 - fix->type = FB_TYPE_PACKED_PIXELS; 1167 - fix->type_aux = 0; 1168 - fix->visual = dinfo->visual; 1169 - fix->xpanstep = 8; 1170 - fix->ypanstep = 1; 1171 - fix->ywrapstep = 0; 1172 - fix->line_length = dinfo->pitch; 1173 - fix->mmio_start = dinfo->mmio_base_phys; 1174 - fix->mmio_len = INTEL_REG_SIZE; 1175 - fix->accel = FB_ACCEL_I830; 1176 - return 0; 1177 - } 1178 1141 1179 1142 /*************************************************************** 1180 1143 * fbdev interface *
+4
fs/lockd/clntlock.c
··· 157 157 inode = fl->fl_file->f_dentry->d_inode; 158 158 if (inode->i_sb->s_magic != NFS_SUPER_MAGIC) 159 159 continue; 160 + if (fl->fl_u.nfs_fl.owner == NULL) 161 + continue; 160 162 if (fl->fl_u.nfs_fl.owner->host != host) 161 163 continue; 162 164 if (!(fl->fl_u.nfs_fl.flags & NFS_LCK_GRANTED)) ··· 227 225 228 226 inode = fl->fl_file->f_dentry->d_inode; 229 227 if (inode->i_sb->s_magic != NFS_SUPER_MAGIC) 228 + continue; 229 + if (fl->fl_u.nfs_fl.owner == NULL) 230 230 continue; 231 231 if (fl->fl_u.nfs_fl.owner->host != host) 232 232 continue;
+6 -18
fs/nfs/direct.c
··· 678 678 if (!count) 679 679 goto out; 680 680 681 - if (mapping->nrpages) { 682 - retval = filemap_fdatawrite(mapping); 683 - if (retval == 0) 684 - retval = nfs_wb_all(inode); 685 - if (retval == 0) 686 - retval = filemap_fdatawait(mapping); 687 - if (retval) 688 - goto out; 689 - } 681 + retval = nfs_sync_mapping(mapping); 682 + if (retval) 683 + goto out; 690 684 691 685 retval = nfs_direct_read(inode, ctx, &iov, pos, 1); 692 686 if (retval > 0) ··· 758 764 if (!count) 759 765 goto out; 760 766 761 - if (mapping->nrpages) { 762 - retval = filemap_fdatawrite(mapping); 763 - if (retval == 0) 764 - retval = nfs_wb_all(inode); 765 - if (retval == 0) 766 - retval = filemap_fdatawait(mapping); 767 - if (retval) 768 - goto out; 769 - } 767 + retval = nfs_sync_mapping(mapping); 768 + if (retval) 769 + goto out; 770 770 771 771 retval = nfs_direct_write(inode, ctx, &iov, pos, 1); 772 772 if (mapping->nrpages)
+4 -19
fs/nfs/file.c
··· 433 433 * Flush all pending writes before doing anything 434 434 * with locks.. 435 435 */ 436 - filemap_fdatawrite(filp->f_mapping); 437 - down(&inode->i_sem); 438 - nfs_wb_all(inode); 439 - up(&inode->i_sem); 440 - filemap_fdatawait(filp->f_mapping); 436 + nfs_sync_mapping(filp->f_mapping); 441 437 442 438 /* NOTE: special case 443 439 * If we're signalled while cleaning up locks on process exit, we ··· 461 465 * Flush all pending writes before doing anything 462 466 * with locks.. 463 467 */ 464 - status = filemap_fdatawrite(filp->f_mapping); 465 - if (status == 0) { 466 - down(&inode->i_sem); 467 - status = nfs_wb_all(inode); 468 - up(&inode->i_sem); 469 - if (status == 0) 470 - status = filemap_fdatawait(filp->f_mapping); 471 - } 472 - if (status < 0) 468 + status = nfs_sync_mapping(filp->f_mapping); 469 + if (status != 0) 473 470 goto out; 474 471 475 472 lock_kernel(); ··· 486 497 * Make sure we clear the cache whenever we try to get the lock. 487 498 * This makes locking act as a cache coherency point. 488 499 */ 489 - filemap_fdatawrite(filp->f_mapping); 490 - down(&inode->i_sem); 491 - nfs_wb_all(inode); /* we may have slept */ 492 - up(&inode->i_sem); 493 - filemap_fdatawait(filp->f_mapping); 500 + nfs_sync_mapping(filp->f_mapping); 494 501 nfs_zap_caches(inode); 495 502 out: 496 503 rpc_clnt_sigunmask(NFS_CLIENT(inode), &oldset);
+23 -5
fs/nfs/inode.c
··· 640 640 return 0; 641 641 } 642 642 643 + /** 644 + * nfs_sync_mapping - helper to flush all mmapped dirty data to disk 645 + */ 646 + int nfs_sync_mapping(struct address_space *mapping) 647 + { 648 + int ret; 649 + 650 + if (mapping->nrpages == 0) 651 + return 0; 652 + unmap_mapping_range(mapping, 0, 0, 0); 653 + ret = filemap_fdatawrite(mapping); 654 + if (ret != 0) 655 + goto out; 656 + ret = filemap_fdatawait(mapping); 657 + if (ret != 0) 658 + goto out; 659 + ret = nfs_wb_all(mapping->host); 660 + out: 661 + return ret; 662 + } 663 + 643 664 /* 644 665 * Invalidate the local caches 645 666 */ ··· 1200 1179 struct nfs_inode *nfsi = NFS_I(inode); 1201 1180 1202 1181 if (nfsi->cache_validity & NFS_INO_INVALID_DATA) { 1203 - if (S_ISREG(inode->i_mode)) { 1204 - if (filemap_fdatawrite(mapping) == 0) 1205 - filemap_fdatawait(mapping); 1206 - nfs_wb_all(inode); 1207 - } 1182 + if (S_ISREG(inode->i_mode)) 1183 + nfs_sync_mapping(mapping); 1208 1184 invalidate_inode_pages2(mapping); 1209 1185 1210 1186 spin_lock(&inode->i_lock);
+1 -1
fs/nfsd/nfs2acl.c
··· 107 107 dprintk("nfsd: SETACL(2acl) %s\n", SVCFH_fmt(&argp->fh)); 108 108 109 109 fh = fh_copy(&resp->fh, &argp->fh); 110 - nfserr = fh_verify(rqstp, &resp->fh, 0, MAY_NOP); 110 + nfserr = fh_verify(rqstp, &resp->fh, 0, MAY_SATTR); 111 111 112 112 if (!nfserr) { 113 113 nfserr = nfserrno( nfsd_set_posix_acl(
+1 -1
fs/nfsd/nfs3acl.c
··· 101 101 int nfserr = 0; 102 102 103 103 fh = fh_copy(&resp->fh, &argp->fh); 104 - nfserr = fh_verify(rqstp, &resp->fh, 0, MAY_NOP); 104 + nfserr = fh_verify(rqstp, &resp->fh, 0, MAY_SATTR); 105 105 106 106 if (!nfserr) { 107 107 nfserr = nfserrno( nfsd_set_posix_acl(
+6 -2
fs/relayfs/relay.c
··· 333 333 return length; 334 334 335 335 toobig: 336 - printk(KERN_WARNING "relayfs: event too large (%Zd)\n", length); 337 - WARN_ON(1); 336 + buf->chan->last_toobig = length; 338 337 return 0; 339 338 } 340 339 ··· 397 398 continue; 398 399 relay_close_buf(chan->buf[i]); 399 400 } 401 + 402 + if (chan->last_toobig) 403 + printk(KERN_WARNING "relayfs: one or more items not logged " 404 + "[item size (%Zd) > sub-buffer size (%Zd)]\n", 405 + chan->last_toobig, chan->subbuf_size); 400 406 401 407 kref_put(&chan->kref, relay_destroy_channel); 402 408 }
+2 -2
fs/xfs/quota/xfs_qm.c
··· 78 78 79 79 STATIC int xfs_qm_init_quotainos(xfs_mount_t *); 80 80 STATIC int xfs_qm_init_quotainfo(xfs_mount_t *); 81 - STATIC int xfs_qm_shake(int, unsigned int); 81 + STATIC int xfs_qm_shake(int, gfp_t); 82 82 83 83 #ifdef DEBUG 84 84 extern mutex_t qcheck_lock; ··· 2197 2197 */ 2198 2198 /* ARGSUSED */ 2199 2199 STATIC int 2200 - xfs_qm_shake(int nr_to_scan, unsigned int gfp_mask) 2200 + xfs_qm_shake(int nr_to_scan, gfp_t gfp_mask) 2201 2201 { 2202 2202 int ndqused, nfree, n; 2203 2203
+1 -9
include/asm-ia64/delay.h
··· 84 84 ia64_delay_loop (loops - 1); 85 85 } 86 86 87 - static __inline__ void 88 - udelay (unsigned long usecs) 89 - { 90 - unsigned long start = ia64_get_itc(); 91 - unsigned long cycles = usecs*local_cpu_data->cyc_per_usec; 92 - 93 - while (ia64_get_itc() - start < cycles) 94 - cpu_relax(); 95 - } 87 + extern void udelay (unsigned long usecs); 96 88 97 89 #endif /* _ASM_IA64_DELAY_H */
-3
include/asm-ppc/ppc4xx_dma.h
··· 33 33 34 34 #define MAX_PPC4xx_DMA_CHANNELS 4 35 35 36 - /* in arch/ppc/kernel/setup.c -- Cort */ 37 - extern unsigned long DMA_MODE_WRITE, DMA_MODE_READ; 38 - 39 36 /* 40 37 * Function return status codes 41 38 * These values are used to indicate whether or not the function
+1 -1
include/asm-sparc/memreg.h
··· 36 36 37 37 /* Memory parity error register with associated bit constants. */ 38 38 #ifndef __ASSEMBLY__ 39 - extern __volatile__ unsigned long *sun4c_memerr_reg; 39 + extern __volatile__ unsigned long __iomem *sun4c_memerr_reg; 40 40 #endif 41 41 42 42 #define SUN4C_MPE_ERROR 0x80 /* Parity error detected. (ro) */
+3 -3
include/asm-sparc/pcic.h
··· 16 16 #include <asm/pbm.h> 17 17 18 18 struct linux_pcic { 19 - void * __iomem pcic_regs; 19 + void __iomem *pcic_regs; 20 20 unsigned long pcic_io; 21 - void * __iomem pcic_config_space_addr; 22 - void * __iomem pcic_config_space_data; 21 + void __iomem *pcic_config_space_addr; 22 + void __iomem *pcic_config_space_data; 23 23 struct resource pcic_res_regs; 24 24 struct resource pcic_res_io; 25 25 struct resource pcic_res_cfg_addr;
+1 -1
include/linux/cache.h
··· 13 13 #define SMP_CACHE_BYTES L1_CACHE_BYTES 14 14 #endif 15 15 16 - #if defined(CONFIG_X86) || defined(CONFIG_SPARC64) 16 + #if defined(CONFIG_X86) || defined(CONFIG_SPARC64) || defined(CONFIG_IA64) 17 17 #define __read_mostly __attribute__((__section__(".data.read_mostly"))) 18 18 #else 19 19 #define __read_mostly
+1
include/linux/mm.h
··· 163 163 #define VM_HUGETLB 0x00400000 /* Huge TLB Page VM */ 164 164 #define VM_NONLINEAR 0x00800000 /* Is non-linear (remap_file_pages) */ 165 165 #define VM_MAPPED_COPY 0x01000000 /* T if mapped copy of data (nommu mmap) */ 166 + #define VM_INSERTPAGE 0x02000000 /* The vma has had "vm_insert_page()" done on it */ 166 167 167 168 #ifndef VM_STACK_DEFAULT_FLAGS /* arch can override this */ 168 169 #define VM_STACK_DEFAULT_FLAGS VM_DATA_DEFAULT_FLAGS
+2 -3
include/linux/mtd/onenand.h
··· 17 17 #include <linux/mtd/bbm.h> 18 18 19 19 #define MAX_BUFFERRAM 2 20 - #define MAX_ONENAND_PAGESIZE (2048 + 64) 21 20 22 21 /* Scan and identify a OneNAND device */ 23 22 extern int onenand_scan(struct mtd_info *mtd, int max_chips); ··· 109 110 spinlock_t chip_lock; 110 111 wait_queue_head_t wq; 111 112 onenand_state_t state; 113 + unsigned char *page_buf; 112 114 113 115 struct nand_oobinfo *autooob; 114 116 ··· 134 134 * Options bits 135 135 */ 136 136 #define ONENAND_CONT_LOCK (0x0001) 137 - 137 + #define ONENAND_PAGEBUF_ALLOC (0x1000) 138 138 139 139 /* 140 140 * OneNAND Flash Manufacturer ID Codes 141 141 */ 142 142 #define ONENAND_MFR_SAMSUNG 0xec 143 - #define ONENAND_MFR_UNKNOWN 0x00 144 143 145 144 /** 146 145 * struct nand_manufacturers - NAND Flash Manufacturer ID Structure
+1
include/linux/nfs_fs.h
··· 291 291 /* 292 292 * linux/fs/nfs/inode.c 293 293 */ 294 + extern int nfs_sync_mapping(struct address_space *mapping); 294 295 extern void nfs_zap_caches(struct inode *); 295 296 extern struct inode *nfs_fhget(struct super_block *, struct nfs_fh *, 296 297 struct nfs_fattr *);
+3 -2
include/linux/relayfs_fs.h
··· 20 20 #include <linux/kref.h> 21 21 22 22 /* 23 - * Tracks changes to rchan_buf struct 23 + * Tracks changes to rchan/rchan_buf structs 24 24 */ 25 - #define RELAYFS_CHANNEL_VERSION 5 25 + #define RELAYFS_CHANNEL_VERSION 6 26 26 27 27 /* 28 28 * Per-cpu relay channel buffer ··· 60 60 struct rchan_callbacks *cb; /* client callbacks */ 61 61 struct kref kref; /* channel refcount */ 62 62 void *private_data; /* for user-defined data */ 63 + size_t last_toobig; /* tried to log event > subbuf size */ 63 64 struct rchan_buf *buf[NR_CPUS]; /* per-cpu channel buffers */ 64 65 }; 65 66
+4
include/linux/rtnetlink.h
··· 866 866 #define RTNLGRP_IPV4_MROUTE RTNLGRP_IPV4_MROUTE 867 867 RTNLGRP_IPV4_ROUTE, 868 868 #define RTNLGRP_IPV4_ROUTE RTNLGRP_IPV4_ROUTE 869 + RTNLGRP_NOP1, 869 870 RTNLGRP_IPV6_IFADDR, 870 871 #define RTNLGRP_IPV6_IFADDR RTNLGRP_IPV6_IFADDR 871 872 RTNLGRP_IPV6_MROUTE, ··· 877 876 #define RTNLGRP_IPV6_IFINFO RTNLGRP_IPV6_IFINFO 878 877 RTNLGRP_DECnet_IFADDR, 879 878 #define RTNLGRP_DECnet_IFADDR RTNLGRP_DECnet_IFADDR 879 + RTNLGRP_NOP2, 880 880 RTNLGRP_DECnet_ROUTE, 881 881 #define RTNLGRP_DECnet_ROUTE RTNLGRP_DECnet_ROUTE 882 + RTNLGRP_NOP3, 883 + RTNLGRP_NOP4, 882 884 RTNLGRP_IPV6_PREFIX, 883 885 #define RTNLGRP_IPV6_PREFIX RTNLGRP_IPV6_PREFIX 884 886 __RTNLGRP_MAX
+1
include/net/xfrm.h
··· 890 890 extern void xfrm_policy_flush(void); 891 891 extern int xfrm_sk_policy_insert(struct sock *sk, int dir, struct xfrm_policy *pol); 892 892 extern int xfrm_flush_bundles(void); 893 + extern void xfrm_flush_all_bundles(void); 893 894 extern int xfrm_bundle_ok(struct xfrm_dst *xdst, struct flowi *fl, int family); 894 895 extern void xfrm_init_pmtu(struct dst_entry *dst); 895 896
-1
init/Kconfig
··· 260 260 bool "Optimize for size (Look out for broken compilers!)" 261 261 default y 262 262 depends on ARM || H8300 || EXPERIMENTAL 263 - depends on !SPARC64 264 263 help 265 264 Enabling this option will pass "-Os" instead of "-O2" to gcc 266 265 resulting in a smaller kernel.
+1 -1
kernel/params.c
··· 619 619 620 620 621 621 /* module-related sysfs stuff */ 622 - #ifdef CONFIG_MODULES 622 + #ifdef CONFIG_SYSFS 623 623 624 624 #define to_module_attr(n) container_of(n, struct module_attribute, attr); 625 625 #define to_module_kobject(n) container_of(n, struct module_kobject, kobj);
+10 -8
lib/spinlock_debug.c
··· 20 20 if (lock->owner && lock->owner != SPINLOCK_OWNER_INIT) 21 21 owner = lock->owner; 22 22 printk("BUG: spinlock %s on CPU#%d, %s/%d\n", 23 - msg, smp_processor_id(), current->comm, current->pid); 23 + msg, raw_smp_processor_id(), 24 + current->comm, current->pid); 24 25 printk(" lock: %p, .magic: %08x, .owner: %s/%d, .owner_cpu: %d\n", 25 26 lock, lock->magic, 26 27 owner ? owner->comm : "<none>", ··· 79 78 if (print_once) { 80 79 print_once = 0; 81 80 printk("BUG: spinlock lockup on CPU#%d, %s/%d, %p\n", 82 - smp_processor_id(), current->comm, current->pid, 83 - lock); 81 + raw_smp_processor_id(), current->comm, 82 + current->pid, lock); 84 83 dump_stack(); 85 84 } 86 85 } ··· 121 120 122 121 if (xchg(&print_once, 0)) { 123 122 printk("BUG: rwlock %s on CPU#%d, %s/%d, %p\n", msg, 124 - smp_processor_id(), current->comm, current->pid, lock); 123 + raw_smp_processor_id(), current->comm, 124 + current->pid, lock); 125 125 dump_stack(); 126 126 #ifdef CONFIG_SMP 127 127 /* ··· 150 148 if (print_once) { 151 149 print_once = 0; 152 150 printk("BUG: read-lock lockup on CPU#%d, %s/%d, %p\n", 153 - smp_processor_id(), current->comm, current->pid, 154 - lock); 151 + raw_smp_processor_id(), current->comm, 152 + current->pid, lock); 155 153 dump_stack(); 156 154 } 157 155 } ··· 222 220 if (print_once) { 223 221 print_once = 0; 224 222 printk("BUG: write-lock lockup on CPU#%d, %s/%d, %p\n", 225 - smp_processor_id(), current->comm, current->pid, 226 - lock); 223 + raw_smp_processor_id(), current->comm, 224 + current->pid, lock); 227 225 dump_stack(); 228 226 } 229 227 }
+3 -2
lib/swiotlb.c
··· 704 704 addr = SG_ENT_VIRT_ADDRESS(sg); 705 705 dev_addr = virt_to_phys(addr); 706 706 if (swiotlb_force || address_needs_mapping(hwdev, dev_addr)) { 707 - sg->dma_address = (dma_addr_t) virt_to_phys(map_single(hwdev, addr, sg->length, dir)); 708 - if (!sg->dma_address) { 707 + void *map = map_single(hwdev, addr, sg->length, dir); 708 + sg->dma_address = virt_to_bus(map); 709 + if (!map) { 709 710 /* Don't panic here, we expect map_sg users 710 711 to do proper error handling. */ 711 712 swiotlb_full(hwdev, sg->length, dir, 0);
+2 -1
mm/memory.c
··· 574 574 * readonly mappings. The tradeoff is that copy_page_range is more 575 575 * efficient than faulting. 576 576 */ 577 - if (!(vma->vm_flags & (VM_HUGETLB|VM_NONLINEAR|VM_PFNMAP))) { 577 + if (!(vma->vm_flags & (VM_HUGETLB|VM_NONLINEAR|VM_PFNMAP|VM_INSERTPAGE))) { 578 578 if (!vma->anon_vma) 579 579 return 0; 580 580 } ··· 1228 1228 return -EFAULT; 1229 1229 if (!page_count(page)) 1230 1230 return -EINVAL; 1231 + vma->vm_flags |= VM_INSERTPAGE; 1231 1232 return insert_page(vma->vm_mm, addr, page, vma->vm_page_prot); 1232 1233 } 1233 1234 EXPORT_SYMBOL(vm_insert_page);
+1 -1
mm/mmap.c
··· 611 611 * If the vma has a ->close operation then the driver probably needs to release 612 612 * per-vma resources, so we don't attempt to merge those. 613 613 */ 614 - #define VM_SPECIAL (VM_IO | VM_DONTCOPY | VM_DONTEXPAND | VM_RESERVED) 614 + #define VM_SPECIAL (VM_IO | VM_DONTCOPY | VM_DONTEXPAND | VM_RESERVED | VM_PFNMAP) 615 615 616 616 static inline int is_mergeable_vma(struct vm_area_struct *vma, 617 617 struct file *file, unsigned long vm_flags)
+1 -1
mm/mremap.c
··· 323 323 /* We can't remap across vm area boundaries */ 324 324 if (old_len > vma->vm_end - addr) 325 325 goto out; 326 - if (vma->vm_flags & VM_DONTEXPAND) { 326 + if (vma->vm_flags & (VM_DONTEXPAND | VM_PFNMAP)) { 327 327 if (new_len > old_len) 328 328 goto out; 329 329 }
+1 -1
mm/page_alloc.c
··· 1896 1896 static struct notifier_block pageset_notifier = 1897 1897 { &pageset_cpuup_callback, NULL, 0 }; 1898 1898 1899 - void __init setup_per_cpu_pageset() 1899 + void __init setup_per_cpu_pageset(void) 1900 1900 { 1901 1901 int err; 1902 1902
+7 -10
net/bridge/br_netfilter.c
··· 295 295 len -= 2; 296 296 297 297 while (len > 0) { 298 - int optlen = raw[off+1]+2; 298 + int optlen = skb->nh.raw[off+1]+2; 299 299 300 300 switch (skb->nh.raw[off]) { 301 301 case IPV6_TLV_PAD0: ··· 308 308 case IPV6_TLV_JUMBO: 309 309 if (skb->nh.raw[off+1] != 4 || (off&3) != 2) 310 310 goto bad; 311 - 312 311 pkt_len = ntohl(*(u32*)(skb->nh.raw+off+2)); 313 - 312 + if (pkt_len <= IPV6_MAXPLEN || 313 + skb->nh.ipv6h->payload_len) 314 + goto bad; 314 315 if (pkt_len > skb->len - sizeof(struct ipv6hdr)) 315 316 goto bad; 316 - if (pkt_len + sizeof(struct ipv6hdr) < skb->len) { 317 - if (__pskb_trim(skb, 318 - pkt_len + sizeof(struct ipv6hdr))) 319 - goto bad; 320 - if (skb->ip_summed == CHECKSUM_HW) 321 - skb->ip_summed = CHECKSUM_NONE; 322 - } 317 + if (pskb_trim_rcsum(skb, 318 + pkt_len+sizeof(struct ipv6hdr))) 319 + goto bad; 323 320 break; 324 321 default: 325 322 if (optlen > len)
+2 -1
net/ipv4/netfilter/Makefile
··· 12 12 13 13 # connection tracking 14 14 obj-$(CONFIG_IP_NF_CONNTRACK) += ip_conntrack.o 15 + obj-$(CONFIG_IP_NF_NAT) += ip_nat.o 15 16 16 17 # conntrack netlink interface 17 18 obj-$(CONFIG_IP_NF_CONNTRACK_NETLINK) += ip_conntrack_netlink.o ··· 42 41 # the three instances of ip_tables 43 42 obj-$(CONFIG_IP_NF_FILTER) += iptable_filter.o 44 43 obj-$(CONFIG_IP_NF_MANGLE) += iptable_mangle.o 45 - obj-$(CONFIG_IP_NF_NAT) += iptable_nat.o ip_nat.o 44 + obj-$(CONFIG_IP_NF_NAT) += iptable_nat.o 46 45 obj-$(CONFIG_IP_NF_RAW) += iptable_raw.o 47 46 48 47 # matches
+1
net/ipv4/xfrm4_policy.c
··· 182 182 case IPPROTO_UDP: 183 183 case IPPROTO_TCP: 184 184 case IPPROTO_SCTP: 185 + case IPPROTO_DCCP: 185 186 if (pskb_may_pull(skb, xprth + 4 - skb->data)) { 186 187 u16 *ports = (u16 *)xprth; 187 188
+12 -4
net/ipv6/addrconf.c
··· 1596 1596 not good. 1597 1597 */ 1598 1598 if (valid_lft >= 0x7FFFFFFF/HZ) 1599 - rt_expires = 0; 1599 + rt_expires = 0x7FFFFFFF - (0x7FFFFFFF % HZ); 1600 1600 else 1601 - rt_expires = jiffies + valid_lft * HZ; 1601 + rt_expires = valid_lft * HZ; 1602 + 1603 + /* 1604 + * We convert this (in jiffies) to clock_t later. 1605 + * Avoid arithmetic overflow there as well. 1606 + * Overflow can happen only if HZ < USER_HZ. 1607 + */ 1608 + if (HZ < USER_HZ && rt_expires > 0x7FFFFFFF / USER_HZ) 1609 + rt_expires = 0x7FFFFFFF / USER_HZ; 1602 1610 1603 1611 if (pinfo->onlink) { 1604 1612 struct rt6_info *rt; ··· 1618 1610 ip6_del_rt(rt, NULL, NULL, NULL); 1619 1611 rt = NULL; 1620 1612 } else { 1621 - rt->rt6i_expires = rt_expires; 1613 + rt->rt6i_expires = jiffies + rt_expires; 1622 1614 } 1623 1615 } 1624 1616 } else if (valid_lft) { 1625 1617 addrconf_prefix_route(&pinfo->prefix, pinfo->prefix_len, 1626 - dev, rt_expires, RTF_ADDRCONF|RTF_EXPIRES|RTF_PREFIX_RT); 1618 + dev, jiffies_to_clock_t(rt_expires), RTF_ADDRCONF|RTF_EXPIRES|RTF_PREFIX_RT); 1627 1619 } 1628 1620 if (rt) 1629 1621 dst_release(&rt->u.dst);
+1 -1
net/ipv6/netfilter/Kconfig
··· 211 211 212 212 config IP6_NF_TARGET_NFQUEUE 213 213 tristate "NFQUEUE Target Support" 214 - depends on IP_NF_IPTABLES 214 + depends on IP6_NF_IPTABLES 215 215 help 216 216 This Target replaced the old obsolete QUEUE target. 217 217
+1 -1
net/ipv6/route.c
··· 829 829 } 830 830 831 831 rt->u.dst.obsolete = -1; 832 - rt->rt6i_expires = clock_t_to_jiffies(rtmsg->rtmsg_info); 832 + rt->rt6i_expires = jiffies + clock_t_to_jiffies(rtmsg->rtmsg_info); 833 833 if (nlh && (r = NLMSG_DATA(nlh))) { 834 834 rt->rt6i_protocol = r->rtm_protocol; 835 835 } else {
+1
net/ipv6/xfrm6_policy.c
··· 214 214 case IPPROTO_UDP: 215 215 case IPPROTO_TCP: 216 216 case IPPROTO_SCTP: 217 + case IPPROTO_DCCP: 217 218 if (pskb_may_pull(skb, skb->nh.raw + offset + 4 - skb->data)) { 218 219 u16 *ports = (u16 *)exthdr; 219 220
+4 -12
net/sctp/socket.c
··· 156 156 sizeof(struct sk_buff) + 157 157 sizeof(struct sctp_chunk); 158 158 159 - sk->sk_wmem_queued += SCTP_DATA_SNDSIZE(chunk) + 160 - sizeof(struct sk_buff) + 161 - sizeof(struct sctp_chunk); 162 - 163 159 atomic_add(sizeof(struct sctp_chunk), &sk->sk_wmem_alloc); 164 160 } 165 161 ··· 3421 3425 } 3422 3426 3423 3427 static int sctp_copy_laddrs_to_user(struct sock *sk, __u16 port, 3424 - void * __user *to, size_t space_left) 3428 + void __user **to, size_t space_left) 3425 3429 { 3426 3430 struct list_head *pos; 3427 3431 struct sctp_sockaddr_entry *addr; ··· 4422 4426 * tcp_poll(). Note that, based on these implementations, we don't 4423 4427 * lock the socket in this function, even though it seems that, 4424 4428 * ideally, locking or some other mechanisms can be used to ensure 4425 - * the integrity of the counters (sndbuf and wmem_queued) used 4429 + * the integrity of the counters (sndbuf and wmem_alloc) used 4426 4430 * in this place. We assume that we don't need locks either until proven 4427 4431 * otherwise. 4428 4432 * ··· 4829 4833 sizeof(struct sk_buff) + 4830 4834 sizeof(struct sctp_chunk); 4831 4835 4832 - sk->sk_wmem_queued -= SCTP_DATA_SNDSIZE(chunk) + 4833 - sizeof(struct sk_buff) + 4834 - sizeof(struct sctp_chunk); 4835 - 4836 4836 atomic_sub(sizeof(struct sctp_chunk), &sk->sk_wmem_alloc); 4837 4837 4838 4838 sock_wfree(skb); ··· 4912 4920 4913 4921 /* Is there any sndbuf space available on the socket? 4914 4922 * 4915 - * Note that wmem_queued is the sum of the send buffers on all of the 4923 + * Note that sk_wmem_alloc is the sum of the send buffers on all of the 4916 4924 * associations on the same socket. For a UDP-style socket with 4917 4925 * multiple associations, it is possible for it to be "unwriteable" 4918 4926 * prematurely. I assume that this is acceptable because ··· 4925 4933 { 4926 4934 int amt = 0; 4927 4935 4928 - amt = sk->sk_sndbuf - sk->sk_wmem_queued; 4936 + amt = sk->sk_sndbuf - atomic_read(&sk->sk_wmem_alloc); 4929 4937 if (amt < 0) 4930 4938 amt = 0; 4931 4939 return amt;
+4 -2
net/sunrpc/auth_gss/auth_gss.c
··· 638 638 gss_msg); 639 639 atomic_inc(&gss_msg->count); 640 640 gss_unhash_msg(gss_msg); 641 - if (msg->errno == -ETIMEDOUT || msg->errno == -EPIPE) { 641 + if (msg->errno == -ETIMEDOUT) { 642 642 unsigned long now = jiffies; 643 643 if (time_after(now, ratelimit)) { 644 644 printk(KERN_WARNING "RPC: AUTH_GSS upcall timed out.\n" ··· 786 786 cred->gc_flags = 0; 787 787 cred->gc_base.cr_ops = &gss_credops; 788 788 cred->gc_service = gss_auth->service; 789 - err = gss_create_upcall(gss_auth, cred); 789 + do { 790 + err = gss_create_upcall(gss_auth, cred); 791 + } while (err == -EAGAIN); 790 792 if (err < 0) 791 793 goto out_err; 792 794
+2 -2
net/sunrpc/rpc_pipe.c
··· 174 174 goto out; 175 175 msg = (struct rpc_pipe_msg *)filp->private_data; 176 176 if (msg != NULL) { 177 - msg->errno = -EPIPE; 177 + msg->errno = -EAGAIN; 178 178 list_del_init(&msg->list); 179 179 rpci->ops->destroy_msg(msg); 180 180 } ··· 183 183 if (filp->f_mode & FMODE_READ) 184 184 rpci->nreaders --; 185 185 if (!rpci->nreaders) 186 - __rpc_purge_upcall(inode, -EPIPE); 186 + __rpc_purge_upcall(inode, -EAGAIN); 187 187 if (rpci->ops->release_pipe) 188 188 rpci->ops->release_pipe(inode); 189 189 out:
+2
net/sunrpc/xprtsock.c
··· 990 990 sk->sk_data_ready = xs_udp_data_ready; 991 991 sk->sk_write_space = xs_udp_write_space; 992 992 sk->sk_no_check = UDP_CSUM_NORCV; 993 + sk->sk_allocation = GFP_ATOMIC; 993 994 994 995 xprt_set_connected(xprt); 995 996 ··· 1075 1074 sk->sk_data_ready = xs_tcp_data_ready; 1076 1075 sk->sk_state_change = xs_tcp_state_change; 1077 1076 sk->sk_write_space = xs_tcp_write_space; 1077 + sk->sk_allocation = GFP_ATOMIC; 1078 1078 1079 1079 /* socket options */ 1080 1080 sk->sk_userlocks |= SOCK_BINDPORT_LOCK;
+14 -5
net/xfrm/xfrm_policy.c
··· 1014 1014 } 1015 1015 EXPORT_SYMBOL(__xfrm_route_forward); 1016 1016 1017 - /* Optimize later using cookies and generation ids. */ 1018 - 1019 1017 static struct dst_entry *xfrm_dst_check(struct dst_entry *dst, u32 cookie) 1020 1018 { 1021 - if (!stale_bundle(dst)) 1022 - return dst; 1023 - 1019 + /* If it is marked obsolete, which is how we even get here, 1020 + * then we have purged it from the policy bundle list and we 1021 + * did that for a good reason. 1022 + */ 1024 1023 return NULL; 1025 1024 } 1026 1025 ··· 1101 1102 { 1102 1103 xfrm_prune_bundles(stale_bundle); 1103 1104 return 0; 1105 + } 1106 + 1107 + static int always_true(struct dst_entry *dst) 1108 + { 1109 + return 1; 1110 + } 1111 + 1112 + void xfrm_flush_all_bundles(void) 1113 + { 1114 + xfrm_prune_bundles(always_true); 1104 1115 } 1105 1116 1106 1117 void xfrm_init_pmtu(struct dst_entry *dst)
+5
net/xfrm/xfrm_state.c
··· 431 431 spin_lock_bh(&xfrm_state_lock); 432 432 __xfrm_state_insert(x); 433 433 spin_unlock_bh(&xfrm_state_lock); 434 + 435 + xfrm_flush_all_bundles(); 434 436 } 435 437 EXPORT_SYMBOL(xfrm_state_insert); 436 438 ··· 479 477 out: 480 478 spin_unlock_bh(&xfrm_state_lock); 481 479 xfrm_state_put_afinfo(afinfo); 480 + 481 + if (!err) 482 + xfrm_flush_all_bundles(); 482 483 483 484 if (x1) { 484 485 xfrm_state_delete(x1);
+18 -11
sound/oss/au1550_ac97.c
··· 578 578 } while ((stat & PSC_AC97STAT_DR) == 0); 579 579 } 580 580 581 + /* Hold spinlock for both start_dac() and start_adc() calls */ 581 582 static void 582 583 start_dac(struct au1550_state *s) 583 584 { 584 585 struct dmabuf *db = &s->dma_dac; 585 - unsigned long flags; 586 586 587 587 if (!db->stopped) 588 588 return; 589 - 590 - spin_lock_irqsave(&s->lock, flags); 591 589 592 590 set_xmit_slots(db->num_channels); 593 591 au_writel(PSC_AC97PCR_TC, PSC_AC97PCR); ··· 596 598 au1xxx_dbdma_start(db->dmanr); 597 599 598 600 db->stopped = 0; 599 - 600 - spin_unlock_irqrestore(&s->lock, flags); 601 601 } 602 602 603 603 static void ··· 714 718 } 715 719 716 720 717 - /* hold spinlock for the following */ 718 721 static void 719 722 dac_dma_interrupt(int irq, void *dev_id, struct pt_regs *regs) 720 723 { 721 724 struct au1550_state *s = (struct au1550_state *) dev_id; 722 725 struct dmabuf *db = &s->dma_dac; 723 726 u32 ac97c_stat; 727 + 728 + spin_lock(&s->lock); 724 729 725 730 ac97c_stat = au_readl(PSC_AC97STAT); 726 731 if (ac97c_stat & (AC97C_XU | AC97C_XO | AC97C_TE)) ··· 744 747 /* wake up anybody listening */ 745 748 if (waitqueue_active(&db->wait)) 746 749 wake_up(&db->wait); 750 + 751 + spin_unlock(&s->lock); 747 752 } 748 753 749 754 ··· 757 758 u32 obytes; 758 759 char *obuf; 759 760 761 + spin_lock(&s->lock); 762 + 760 763 /* Pull the buffer from the dma queue. 761 764 */ 762 765 au1xxx_dbdma_get_dest(dp->dmanr, (void *)(&obuf), &obytes); ··· 766 765 if ((dp->count + obytes) > dp->dmasize) { 767 766 /* Overrun. Stop ADC and log the error 768 767 */ 768 + spin_unlock(&s->lock); 769 769 stop_adc(s); 770 770 dp->error++; 771 771 err("adc overrun"); ··· 789 787 if (waitqueue_active(&dp->wait)) 790 788 wake_up(&dp->wait); 791 789 790 + spin_unlock(&s->lock); 792 791 } 793 792 794 793 static loff_t ··· 1051 1048 /* wait for samples in ADC dma buffer 1052 1049 */ 1053 1050 do { 1051 + spin_lock_irqsave(&s->lock, flags); 1054 1052 if (db->stopped) 1055 1053 start_adc(s); 1056 - spin_lock_irqsave(&s->lock, flags); 1057 1054 avail = db->count; 1058 1055 if (avail <= 0) 1059 1056 __set_current_state(TASK_INTERRUPTIBLE); ··· 1573 1570 if (get_user(val, (int *) arg)) 1574 1571 return -EFAULT; 1575 1572 if (file->f_mode & FMODE_READ) { 1576 - if (val & PCM_ENABLE_INPUT) 1573 + if (val & PCM_ENABLE_INPUT) { 1574 + spin_lock_irqsave(&s->lock, flags); 1577 1575 start_adc(s); 1578 - else 1576 + spin_unlock_irqrestore(&s->lock, flags); 1577 + } else 1579 1578 stop_adc(s); 1580 1579 } 1581 1580 if (file->f_mode & FMODE_WRITE) { 1582 - if (val & PCM_ENABLE_OUTPUT) 1581 + if (val & PCM_ENABLE_OUTPUT) { 1582 + spin_lock_irqsave(&s->lock, flags); 1583 1583 start_dac(s); 1584 - else 1584 + spin_unlock_irqrestore(&s->lock, flags); 1585 + } else 1585 1586 stop_dac(s); 1586 1587 } 1587 1588 return 0;