Changeset 19208
- Timestamp:
- 05/05/12 13:05:50 (13 months ago)
- Location:
- src/linux/universal/linux-3.3
- Files:
-
- 89 edited
-
Makefile (modified) (1 diff)
-
arch/arm/Kconfig (modified) (1 diff)
-
arch/arm/include/asm/tls.h (modified) (2 diffs)
-
arch/arm/kernel/irq.c (modified) (1 diff)
-
arch/arm/mm/abort-ev6.S (modified) (1 diff)
-
arch/mips/ath79/dev-wmac.c (modified) (1 diff)
-
arch/powerpc/platforms/85xx/common.c (modified) (1 diff)
-
arch/powerpc/platforms/85xx/mpc85xx_mds.c (modified) (2 diffs)
-
arch/powerpc/platforms/85xx/p1022_ds.c (modified) (1 diff)
-
arch/x86/boot/Makefile (modified) (1 diff)
-
arch/x86/boot/compressed/Makefile (modified) (1 diff)
-
arch/x86/boot/compressed/eboot.c (modified) (4 diffs)
-
arch/x86/boot/compressed/head_32.S (modified) (2 diffs)
-
arch/x86/boot/compressed/head_64.S (modified) (1 diff)
-
arch/x86/boot/compressed/mkpiggy.c (modified) (2 diffs)
-
arch/x86/boot/tools/build.c (modified) (5 diffs)
-
arch/x86/include/asm/x86_init.h (modified) (1 diff)
-
arch/x86/kernel/apic/apic.c (modified) (3 diffs)
-
arch/x86/kernel/apic/apic_numachip.c (modified) (1 diff)
-
arch/x86/kernel/cpu/amd.c (modified) (1 diff)
-
arch/x86/kernel/cpu/common.c (modified) (1 diff)
-
arch/x86/kernel/i387.c (modified) (1 diff)
-
arch/x86/kernel/microcode_amd.c (modified) (2 diffs)
-
arch/x86/kernel/microcode_core.c (modified) (2 diffs)
-
arch/x86/kernel/x86_init.c (modified) (1 diff)
-
arch/x86/xen/smp.c (modified) (2 diffs)
-
arch/x86/xen/xen-asm.S (modified) (1 diff)
-
drivers/ata/libata-eh.c (modified) (1 diff)
-
drivers/crypto/talitos.c (modified) (7 diffs)
-
drivers/dma/at_hdmac.c (modified) (1 diff)
-
drivers/firmware/efivars.c (modified) (3 diffs)
-
drivers/gpu/drm/i915/i915_gem_execbuffer.c (modified) (2 diffs)
-
drivers/gpu/drm/i915/i915_reg.h (modified) (1 diff)
-
drivers/gpu/drm/i915/intel_ringbuffer.c (modified) (1 diff)
-
drivers/gpu/drm/i915/intel_sdvo.c (modified) (5 diffs)
-
drivers/gpu/drm/nouveau/nouveau_acpi.c (modified) (1 diff)
-
drivers/gpu/drm/radeon/atombios_crtc.c (modified) (1 diff)
-
drivers/hwmon/coretemp.c (modified) (2 diffs)
-
drivers/hwmon/fam15h_power.c (modified) (2 diffs)
-
drivers/i2c/busses/i2c-pnx.c (modified) (1 diff)
-
drivers/input/mouse/synaptics.c (modified) (1 diff)
-
drivers/md/raid5.c (modified) (2 diffs)
-
drivers/net/wireless/b43/main.c (modified) (1 diff)
-
drivers/net/wireless/ipw2x00/ipw2200.c (modified) (2 diffs)
-
drivers/net/wireless/iwlwifi/iwl-1000.c (modified) (2 diffs)
-
drivers/net/wireless/iwlwifi/iwl-2000.c (modified) (2 diffs)
-
drivers/net/wireless/iwlwifi/iwl-5000.c (modified) (5 diffs)
-
drivers/net/wireless/iwlwifi/iwl-6000.c (modified) (3 diffs)
-
drivers/net/wireless/iwlwifi/iwl-agn.c (modified) (2 diffs)
-
drivers/net/wireless/iwlwifi/iwl-fh.h (modified) (1 diff)
-
drivers/net/wireless/iwlwifi/iwl-mac80211.c (modified) (3 diffs)
-
drivers/net/wireless/iwlwifi/iwl-prph.h (modified) (1 diff)
-
drivers/net/wireless/rtlwifi/pci.c (modified) (1 diff)
-
drivers/net/wireless/wl1251/main.c (modified) (1 diff)
-
drivers/net/wireless/wl1251/sdio.c (modified) (1 diff)
-
drivers/platform/x86/dell-laptop.c (modified) (1 diff)
-
drivers/scsi/libsas/sas_expander.c (modified) (3 diffs)
-
drivers/usb/class/cdc-wdm.c (modified) (3 diffs)
-
drivers/usb/core/hcd-pci.c (modified) (1 diff)
-
drivers/usb/gadget/dummy_hcd.c (modified) (1 diff)
-
drivers/usb/gadget/f_mass_storage.c (modified) (1 diff)
-
drivers/usb/gadget/file_storage.c (modified) (1 diff)
-
drivers/usb/gadget/uvc.h (modified) (1 diff)
-
drivers/usb/gadget/uvc_v4l2.c (modified) (1 diff)
-
drivers/usb/host/ehci-pci.c (modified) (1 diff)
-
drivers/usb/host/ehci-tegra.c (modified) (1 diff)
-
fs/autofs4/autofs_i.h (modified) (2 diffs)
-
fs/autofs4/dev-ioctl.c (modified) (2 diffs)
-
fs/autofs4/inode.c (modified) (3 diffs)
-
fs/autofs4/waitq.c (modified) (2 diffs)
-
fs/exec.c (modified) (1 diff)
-
fs/nfs/nfs4proc.c (modified) (4 diffs)
-
fs/nfs/read.c (modified) (1 diff)
-
fs/nfs/super.c (modified) (1 diff)
-
fs/nfs/write.c (modified) (1 diff)
-
fs/pipe.c (modified) (6 diffs)
-
include/linux/efi.h (modified) (1 diff)
-
include/linux/pipe_fs_i.h (modified) (1 diff)
-
include/linux/usb/hcd.h (modified) (1 diff)
-
kernel/exit.c (modified) (1 diff)
-
kernel/power/swap.c (modified) (5 diffs)
-
kernel/sched/core.c (modified) (6 diffs)
-
kernel/signal.c (modified) (1 diff)
-
kernel/trace/trace_output.c (modified) (2 diffs)
-
net/mac80211/tx.c (modified) (1 diff)
-
net/wireless/nl80211.c (modified) (13 diffs)
-
sound/pci/hda/patch_realtek.c (modified) (1 diff)
-
sound/soc/codecs/wm8994.c (modified) (9 diffs)
-
sound/soc/soc-dapm.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/linux/universal/linux-3.3/Makefile
r19156 r19208 1 1 VERSION = 3 2 2 PATCHLEVEL = 3 3 SUBLEVEL = 44 EXTRAVERSION = 3 SUBLEVEL = 5 4 EXTRAVERSION = -rc1 5 5 NAME = Saber-toothed Squirrel 6 6 -
src/linux/universal/linux-3.3/arch/arm/Kconfig
r18805 r19208 1173 1173 endif 1174 1174 1175 config ARM_ERRATA_326103 1176 bool "ARM errata: FSR write bit incorrect on a SWP to read-only memory" 1177 depends on CPU_V6 1178 help 1179 Executing a SWP instruction to read-only memory does not set bit 11 1180 of the FSR on the ARM 1136 prior to r1p0. This causes the kernel to 1181 treat the access as a read, preventing a COW from occurring and 1182 causing the faulting task to livelock. 1183 1175 1184 config ARM_ERRATA_411920 1176 1185 bool "ARM errata: Invalidation of the Instruction Cache operation can fail" -
src/linux/universal/linux-3.3/arch/arm/include/asm/tls.h
r18778 r19208 8 8 .macro set_tls_v6k, tp, tmp1, tmp2 9 9 mcr p15, 0, \tp, c13, c0, 3 @ set TLS register 10 mov \tmp1, #0 11 mcr p15, 0, \tmp1, c13, c0, 2 @ clear user r/w TLS register 10 12 .endm 11 13 … … 16 18 tst \tmp1, #HWCAP_TLS @ hardware TLS available? 17 19 mcrne p15, 0, \tp, c13, c0, 3 @ yes, set TLS register 20 movne \tmp1, #0 21 mcrne p15, 0, \tmp1, c13, c0, 2 @ clear user r/w TLS register 18 22 streq \tp, [\tmp2, #-15] @ set TLS value at 0xffff0ff0 19 23 .endm -
src/linux/universal/linux-3.3/arch/arm/kernel/irq.c
r18778 r19208 157 157 158 158 c = irq_data_get_irq_chip(d); 159 if (c->irq_set_affinity) 160 c->irq_set_affinity(d, affinity, true); 161 else 159 if (!c->irq_set_affinity) 162 160 pr_debug("IRQ%u: unable to set affinity\n", d->irq); 161 else if (c->irq_set_affinity(d, affinity, true) == IRQ_SET_MASK_OK && ret) 162 cpumask_copy(d->affinity, affinity); 163 163 164 164 return ret; -
src/linux/universal/linux-3.3/arch/arm/mm/abort-ev6.S
r18778 r19208 27 27 mrc p15, 0, r0, c6, c0, 0 @ get FAR 28 28 /* 29 * Faulty SWP instruction on 1136 doesn't set bit 11 in DFSR (erratum 326103). 30 * The test below covers all the write situations, including Java bytecodes 29 * Faulty SWP instruction on 1136 doesn't set bit 11 in DFSR. 31 30 */ 31 #ifdef CONFIG_ARM_ERRATA_326103 32 ldr ip, =0x4107b36 33 mrc p15, 0, r3, c0, c0, 0 @ get processor id 34 teq ip, r3, lsr #4 @ r0 ARM1136? 35 bne do_DataAbort 36 tst r5, #PSR_J_BIT @ Java? 37 tsteq r5, #PSR_T_BIT @ Thumb? 38 bne do_DataAbort 32 39 bic r1, r1, #1 << 11 @ clear bit 11 of FSR 33 tst r5, #PSR_J_BIT @ Java? 34 bne do_DataAbort 35 do_thumb_abort fsr=r1, pc=r4, psr=r5, tmp=r3 36 ldreq r3, [r4] @ read aborted ARM instruction 40 ldr r3, [r4] @ read aborted ARM instruction 37 41 #ifdef CONFIG_CPU_ENDIAN_BE8 38 rev eqr3, r342 rev r3, r3 39 43 #endif 40 44 do_ldrd_abort tmp=ip, insn=r3 41 45 tst r3, #1 << 20 @ L = 0 -> write 42 46 orreq r1, r1, #1 << 11 @ yes. 47 #endif 43 48 b do_DataAbort -
src/linux/universal/linux-3.3/arch/mips/ath79/dev-wmac.c
r18778 r19208 59 59 static int ar933x_wmac_reset(void) 60 60 { 61 ath79_device_reset_set(AR933X_RESET_WMAC); 61 62 ath79_device_reset_clear(AR933X_RESET_WMAC); 62 ath79_device_reset_set(AR933X_RESET_WMAC);63 63 64 64 return 0; -
src/linux/universal/linux-3.3/arch/powerpc/platforms/85xx/common.c
r18778 r19208 22 22 { .compatible = "fsl,cpm2", }, 23 23 { .compatible = "fsl,srio", }, 24 /* So that the DMA channel nodes can be probed individually: */ 25 { .compatible = "fsl,eloplus-dma", }, 26 /* For the PMC driver */ 27 { .compatible = "fsl,mpc8548-guts", }, 28 /* Probably unnecessary? */ 29 { .compatible = "gpio-leds", }, 24 30 {}, 25 31 }; -
src/linux/universal/linux-3.3/arch/powerpc/platforms/85xx/mpc85xx_mds.c
r18778 r19208 406 406 machine_arch_initcall(mpc8569_mds, board_fixups); 407 407 408 static struct of_device_id mpc85xx_ids[] = {409 { .compatible = "fsl,mpc8548-guts", },410 { .compatible = "gpio-leds", },411 {},412 };413 414 408 static int __init mpc85xx_publish_devices(void) 415 409 { … … 419 413 simple_gpiochip_init("fsl,mpc8569mds-bcsr-gpio"); 420 414 421 mpc85xx_common_publish_devices(); 422 of_platform_bus_probe(NULL, mpc85xx_ids, NULL); 423 424 return 0; 415 return mpc85xx_common_publish_devices(); 425 416 } 426 417 -
src/linux/universal/linux-3.3/arch/powerpc/platforms/85xx/p1022_ds.c
r18778 r19208 304 304 } 305 305 306 static struct of_device_id __initdata p1022_ds_ids[] = { 307 /* So that the DMA channel nodes can be probed individually: */ 308 { .compatible = "fsl,eloplus-dma", }, 309 {}, 310 }; 311 312 static int __init p1022_ds_publish_devices(void) 313 { 314 mpc85xx_common_publish_devices(); 315 return of_platform_bus_probe(NULL, p1022_ds_ids, NULL); 316 } 317 machine_device_initcall(p1022_ds, p1022_ds_publish_devices); 306 machine_device_initcall(p1022_ds, mpc85xx_common_publish_devices); 318 307 319 308 machine_arch_initcall(p1022_ds, swiotlb_setup_bus_notifier); -
src/linux/universal/linux-3.3/arch/x86/boot/Makefile
r18778 r19208 38 38 hostprogs-y := mkcpustr tools/build 39 39 40 HOST_EXTRACFLAGS += $(LINUXINCLUDE) 40 HOST_EXTRACFLAGS += -I$(srctree)/tools/include $(LINUXINCLUDE) \ 41 -D__EXPORTED_HEADERS__ 41 42 42 43 $(obj)/cpu.o: $(obj)/cpustr.h -
src/linux/universal/linux-3.3/arch/x86/boot/compressed/Makefile
r18778 r19208 23 23 24 24 hostprogs-y := mkpiggy 25 HOST_EXTRACFLAGS += -I$(srctree)/tools/include 25 26 26 27 VMLINUX_OBJS = $(obj)/vmlinux.lds $(obj)/head_$(BITS).o $(obj)/misc.o \ -
src/linux/universal/linux-3.3/arch/x86/boot/compressed/eboot.c
r18778 r19208 540 540 efi_file_handle_t *h; 541 541 efi_file_info_t *info; 542 efi_char16_t filename [256];542 efi_char16_t filename_16[256]; 543 543 unsigned long info_sz; 544 544 efi_guid_t info_guid = EFI_FILE_INFO_ID; … … 553 553 554 554 initrd = &initrds[i]; 555 p = filename ;555 p = filename_16; 556 556 557 557 /* Skip any leading slashes */ … … 560 560 561 561 while (*str && *str != ' ' && *str != '\n') { 562 if ( p >= filename + sizeof(filename))562 if ((u8 *)p >= (u8 *)filename_16 + sizeof(filename_16)) 563 563 break; 564 564 … … 584 584 } 585 585 586 status = efi_call_phys5(fh->open, fh, &h, filename ,586 status = efi_call_phys5(fh->open, fh, &h, filename_16, 587 587 EFI_FILE_MODE_READ, (u64)0); 588 588 if (status != EFI_SUCCESS) -
src/linux/universal/linux-3.3/arch/x86/boot/compressed/head_32.S
r18778 r19208 34 34 ENTRY(startup_32) 35 35 #ifdef CONFIG_EFI_STUB 36 jmp preferred_addr 37 38 .balign 0x10 36 39 /* 37 40 * We don't need the return address, so set up the stack so … … 42 45 call efi_main 43 46 cmpl $0, %eax 44 je preferred_addr45 47 movl %eax, %esi 46 call 1f48 jne 2f 47 49 1: 50 /* EFI init failed, so hang. */ 51 hlt 52 jmp 1b 53 2: 54 call 3f 55 3: 48 56 popl %eax 49 subl $ 1b, %eax57 subl $3b, %eax 50 58 subl BP_pref_address(%esi), %eax 51 59 add BP_code32_start(%esi), %eax -
src/linux/universal/linux-3.3/arch/x86/boot/compressed/head_64.S
r18778 r19208 201 201 */ 202 202 #ifdef CONFIG_EFI_STUB 203 pushq %rsi 203 /* 204 * The entry point for the PE/COFF executable is 0x210, so only 205 * legacy boot loaders will execute this jmp. 206 */ 207 jmp preferred_addr 208 209 .org 0x210 204 210 mov %rcx, %rdi 205 211 mov %rdx, %rsi 206 212 call efi_main 207 popq%rsi213 movq %rax,%rsi 208 214 cmpq $0,%rax 209 je preferred_addr 210 movq %rax,%rsi 211 call 1f 215 jne 2f 212 216 1: 217 /* EFI init failed, so hang. */ 218 hlt 219 jmp 1b 220 2: 221 call 3f 222 3: 213 223 popq %rax 214 subq $ 1b, %rax224 subq $3b, %rax 215 225 subq BP_pref_address(%rsi), %rax 216 226 add BP_code32_start(%esi), %eax -
src/linux/universal/linux-3.3/arch/x86/boot/compressed/mkpiggy.c
r18778 r19208 30 30 #include <string.h> 31 31 #include <inttypes.h> 32 33 static uint32_t getle32(const void *p) 34 { 35 const uint8_t *cp = p; 36 37 return (uint32_t)cp[0] + ((uint32_t)cp[1] << 8) + 38 ((uint32_t)cp[2] << 16) + ((uint32_t)cp[3] << 24); 39 } 32 #include <tools/le_byteshift.h> 40 33 41 34 int main(int argc, char *argv[]) … … 70 63 71 64 ilen = ftell(f); 72 olen = get le32(&olen);65 olen = get_unaligned_le32(&olen); 73 66 fclose(f); 74 67 -
src/linux/universal/linux-3.3/arch/x86/boot/tools/build.c
r18778 r19208 35 35 #include <sys/mman.h> 36 36 #include <asm/boot.h> 37 #include <tools/le_byteshift.h> 37 38 38 39 typedef unsigned char u8; … … 42 43 #define DEFAULT_MAJOR_ROOT 0 43 44 #define DEFAULT_MINOR_ROOT 0 45 #define DEFAULT_ROOT_DEV (DEFAULT_MAJOR_ROOT << 8 | DEFAULT_MINOR_ROOT) 44 46 45 47 /* Minimal number of setup sectors */ … … 160 162 if (c < 1024) 161 163 die("The setup must be at least 1024 bytes"); 162 if ( buf[510] != 0x55 || buf[511] != 0xaa)164 if (get_unaligned_le16(&buf[510]) != 0xAA55) 163 165 die("Boot block hasn't got boot flag (0xAA55)"); 164 166 fclose(file); … … 172 174 173 175 /* Set the default root device */ 174 buf[508] = DEFAULT_MINOR_ROOT; 175 buf[509] = DEFAULT_MAJOR_ROOT; 176 put_unaligned_le16(DEFAULT_ROOT_DEV, &buf[508]); 176 177 177 178 fprintf(stderr, "Setup is %d bytes (padded to %d bytes).\n", c, i); … … 193 194 /* Patch the setup code with the appropriate size parameters */ 194 195 buf[0x1f1] = setup_sectors-1; 195 buf[0x1f4] = sys_size; 196 buf[0x1f5] = sys_size >> 8; 197 buf[0x1f6] = sys_size >> 16; 198 buf[0x1f7] = sys_size >> 24; 196 put_unaligned_le32(sys_size, &buf[0x1f4]); 199 197 200 198 #ifdef CONFIG_EFI_STUB 201 199 file_sz = sz + i + ((sys_size * 16) - sz); 202 200 203 pe_header = *(unsigned int *)&buf[0x3c];201 pe_header = get_unaligned_le32(&buf[0x3c]); 204 202 205 203 /* Size of code */ 206 *(unsigned int *)&buf[pe_header + 0x1c] = file_sz;204 put_unaligned_le32(file_sz, &buf[pe_header + 0x1c]); 207 205 208 206 /* Size of image */ 209 *(unsigned int *)&buf[pe_header + 0x50] = file_sz;207 put_unaligned_le32(file_sz, &buf[pe_header + 0x50]); 210 208 211 209 #ifdef CONFIG_X86_32 212 /* Address of entry point */ 213 *(unsigned int *)&buf[pe_header + 0x28] = i; 210 /* 211 * Address of entry point. 212 * 213 * The EFI stub entry point is +16 bytes from the start of 214 * the .text section. 215 */ 216 put_unaligned_le32(i + 16, &buf[pe_header + 0x28]); 214 217 215 218 /* .text size */ 216 *(unsigned int *)&buf[pe_header + 0xb0] = file_sz;219 put_unaligned_le32(file_sz, &buf[pe_header + 0xb0]); 217 220 218 221 /* .text size of initialised data */ 219 *(unsigned int *)&buf[pe_header + 0xb8] = file_sz;222 put_unaligned_le32(file_sz, &buf[pe_header + 0xb8]); 220 223 #else 221 224 /* 222 225 * Address of entry point. startup_32 is at the beginning and 223 226 * the 64-bit entry point (startup_64) is always 512 bytes 224 * after. 227 * after. The EFI stub entry point is 16 bytes after that, as 228 * the first instruction allows legacy loaders to jump over 229 * the EFI stub initialisation 225 230 */ 226 *(unsigned int *)&buf[pe_header + 0x28] = i + 512;231 put_unaligned_le32(i + 528, &buf[pe_header + 0x28]); 227 232 228 233 /* .text size */ 229 *(unsigned int *)&buf[pe_header + 0xc0] = file_sz;234 put_unaligned_le32(file_sz, &buf[pe_header + 0xc0]); 230 235 231 236 /* .text size of initialised data */ 232 *(unsigned int *)&buf[pe_header + 0xc8] = file_sz; 237 put_unaligned_le32(file_sz, &buf[pe_header + 0xc8]); 238 233 239 #endif /* CONFIG_X86_32 */ 234 240 #endif /* CONFIG_EFI_STUB */ -
src/linux/universal/linux-3.3/arch/x86/include/asm/x86_init.h
r18778 r19208 190 190 extern void x86_init_noop(void); 191 191 extern void x86_init_uint_noop(unsigned int unused); 192 extern void x86_default_fixup_cpu_id(struct cpuinfo_x86 *c, int node);193 192 194 193 #endif -
src/linux/universal/linux-3.3/arch/x86/kernel/apic/apic.c
r18778 r19208 1633 1633 1634 1634 /* The BIOS may have set up the APIC at some other address */ 1635 rdmsr(MSR_IA32_APICBASE, l, h); 1636 if (l & MSR_IA32_APICBASE_ENABLE) 1637 mp_lapic_addr = l & MSR_IA32_APICBASE_BASE; 1635 if (boot_cpu_data.x86 >= 6) { 1636 rdmsr(MSR_IA32_APICBASE, l, h); 1637 if (l & MSR_IA32_APICBASE_ENABLE) 1638 mp_lapic_addr = l & MSR_IA32_APICBASE_BASE; 1639 } 1638 1640 1639 1641 pr_info("Found and enabled local APIC!\n"); … … 1653 1655 * and AMD K7 (Model > 1) or later. 1654 1656 */ 1655 rdmsr(MSR_IA32_APICBASE, l, h); 1656 if (!(l & MSR_IA32_APICBASE_ENABLE)) { 1657 pr_info("Local APIC disabled by BIOS -- reenabling.\n"); 1658 l &= ~MSR_IA32_APICBASE_BASE; 1659 l |= MSR_IA32_APICBASE_ENABLE | addr; 1660 wrmsr(MSR_IA32_APICBASE, l, h); 1661 enabled_via_apicbase = 1; 1657 if (boot_cpu_data.x86 >= 6) { 1658 rdmsr(MSR_IA32_APICBASE, l, h); 1659 if (!(l & MSR_IA32_APICBASE_ENABLE)) { 1660 pr_info("Local APIC disabled by BIOS -- reenabling.\n"); 1661 l &= ~MSR_IA32_APICBASE_BASE; 1662 l |= MSR_IA32_APICBASE_ENABLE | addr; 1663 wrmsr(MSR_IA32_APICBASE, l, h); 1664 enabled_via_apicbase = 1; 1665 } 1662 1666 } 1663 1667 return apic_verify(); … … 2205 2209 * SMP! We'll need to do this as part of the CPU restore! 2206 2210 */ 2207 rdmsr(MSR_IA32_APICBASE, l, h); 2208 l &= ~MSR_IA32_APICBASE_BASE; 2209 l |= MSR_IA32_APICBASE_ENABLE | mp_lapic_addr; 2210 wrmsr(MSR_IA32_APICBASE, l, h); 2211 if (boot_cpu_data.x86 >= 6) { 2212 rdmsr(MSR_IA32_APICBASE, l, h); 2213 l &= ~MSR_IA32_APICBASE_BASE; 2214 l |= MSR_IA32_APICBASE_ENABLE | mp_lapic_addr; 2215 wrmsr(MSR_IA32_APICBASE, l, h); 2216 } 2211 2217 } 2212 2218 -
src/linux/universal/linux-3.3/arch/x86/kernel/apic/apic_numachip.c
r18778 r19208 202 202 static void fixup_cpu_id(struct cpuinfo_x86 *c, int node) 203 203 { 204 c->phys_proc_id = node; 205 per_cpu(cpu_llc_id, smp_processor_id()) = node; 204 205 if (c->phys_proc_id != node) { 206 c->phys_proc_id = node; 207 per_cpu(cpu_llc_id, smp_processor_id()) = node; 208 } 206 209 } 207 210 -
src/linux/universal/linux-3.3/arch/x86/kernel/cpu/amd.c
r18778 r19208 353 353 354 354 /* 355 * If core numbers are inconsistent, it's likely a multi-fabric platform, 356 * so invoke platform-specific handler 357 */ 358 if (c->phys_proc_id != node) 355 * On multi-fabric platform (e.g. Numascale NumaChip) a 356 * platform-specific handler needs to be called to fixup some 357 * IDs of the CPU. 358 */ 359 if (x86_cpuinit.fixup_cpu_id) 359 360 x86_cpuinit.fixup_cpu_id(c, node); 360 361 -
src/linux/universal/linux-3.3/arch/x86/kernel/cpu/common.c
r18778 r19208 1164 1164 1165 1165 /* 1166 * Prints an error where the NUMA and configured core-number mismatch and the1167 * platform didn't override this to fix it up1168 */1169 void __cpuinit x86_default_fixup_cpu_id(struct cpuinfo_x86 *c, int node)1170 {1171 pr_err("NUMA core number %d differs from configured core number %d\n", node, c->phys_proc_id);1172 }1173 1174 /*1175 1166 * cpu_init() initializes state that is per-CPU. Some data is already 1176 1167 * initialized (naturally) in the bootstrap process, such as the GDT -
src/linux/universal/linux-3.3/arch/x86/kernel/i387.c
r18778 r19208 155 155 if (HAVE_HWFP && tsk == current) 156 156 unlazy_fpu(tsk); 157 tsk->thread.fpu.last_cpu = ~0; 157 158 return 0; 158 159 } -
src/linux/universal/linux-3.3/arch/x86/kernel/microcode_amd.c
r18778 r19208 83 83 struct cpuinfo_x86 *c = &cpu_data(cpu); 84 84 85 if (c->x86_vendor != X86_VENDOR_AMD || c->x86 < 0x10) {86 pr_warning("CPU%d: family %d not supported\n", cpu, c->x86);87 return -1;88 }89 90 85 csig->rev = c->microcode; 91 86 pr_info("CPU%d: patch_level=0x%08x\n", cpu, csig->rev); … … 381 376 struct microcode_ops * __init init_amd_microcode(void) 382 377 { 378 struct cpuinfo_x86 *c = &cpu_data(0); 379 380 if (c->x86_vendor != X86_VENDOR_AMD || c->x86 < 0x10) { 381 pr_warning("AMD CPU family 0x%x not supported\n", c->x86); 382 return NULL; 383 } 384 383 385 patch = (void *)get_zeroed_page(GFP_KERNEL); 384 386 if (!patch) -
src/linux/universal/linux-3.3/arch/x86/kernel/microcode_core.c
r18778 r19208 419 419 return err; 420 420 421 if (microcode_init_cpu(cpu) == UCODE_ERROR) { 422 sysfs_remove_group(&dev->kobj, &mc_attr_group); 421 if (microcode_init_cpu(cpu) == UCODE_ERROR) 423 422 return -EINVAL; 424 }425 423 426 424 return err; … … 514 512 else if (c->x86_vendor == X86_VENDOR_AMD) 515 513 microcode_ops = init_amd_microcode(); 516 517 if (!microcode_ops) { 514 else 518 515 pr_err("no support for this CPU vendor\n"); 516 517 if (!microcode_ops) 519 518 return -ENODEV; 520 }521 519 522 520 microcode_pdev = platform_device_register_simple("microcode", -1, -
src/linux/universal/linux-3.3/arch/x86/kernel/x86_init.c
r18778 r19208 93 93 struct x86_cpuinit_ops x86_cpuinit __cpuinitdata = { 94 94 .setup_percpu_clockev = setup_secondary_APIC_clock, 95 .fixup_cpu_id = x86_default_fixup_cpu_id,96 95 }; 97 96 -
src/linux/universal/linux-3.3/arch/x86/xen/smp.c
r18778 r19208 173 173 { 174 174 int i, rc; 175 unsigned int subtract = 0; 175 176 176 177 if (!xen_initial_domain()) … … 187 188 set_cpu_possible(i, false); 188 189 set_cpu_present(i, false); 190 subtract++; 189 191 } 190 192 } 193 #ifdef CONFIG_HOTPLUG_CPU 194 /* This is akin to using 'nr_cpus' on the Linux command line. 195 * Which is OK as when we use 'dom0_max_vcpus=X' we can only 196 * have up to X, while nr_cpu_ids is greater than X. This 197 * normally is not a problem, except when CPU hotplugging 198 * is involved and then there might be more than X CPUs 199 * in the guest - which will not work as there is no 200 * hypercall to expand the max number of VCPUs an already 201 * running guest has. So cap it up to X. */ 202 if (subtract) 203 nr_cpu_ids = nr_cpu_ids - subtract; 204 #endif 205 191 206 } 192 207 -
src/linux/universal/linux-3.3/arch/x86/xen/xen-asm.S
r18778 r19208 97 97 /* check for unmasked and pending */ 98 98 cmpw $0x0001, PER_CPU_VAR(xen_vcpu_info) + XEN_vcpu_info_pending 99 j z 1f99 jnz 1f 100 100 2: call check_events 101 101 1: -
src/linux/universal/linux-3.3/drivers/ata/libata-eh.c
r18778 r19208 3501 3501 int *trials = void_arg; 3502 3502 3503 if (ent->timestamp < now - min(now, interval)) 3503 if ((ent->eflags & ATA_EFLAG_OLD_ER) || 3504 (ent->timestamp < now - min(now, interval))) 3504 3505 return -1; 3505 3506 -
src/linux/universal/linux-3.3/drivers/crypto/talitos.c
r18778 r19208 125 125 int irq[2]; 126 126 127 /* SEC global registers lock */ 128 spinlock_t reg_lock ____cacheline_aligned; 129 127 130 /* SEC version geometry (from device tree node) */ 128 131 unsigned int num_channels; … … 413 416 struct device *dev = (struct device *)data; \ 414 417 struct talitos_private *priv = dev_get_drvdata(dev); \ 418 unsigned long flags; \ 415 419 \ 416 420 if (ch_done_mask & 1) \ … … 428 432 /* At this point, all completed channels have been processed */ \ 429 433 /* Unmask done interrupts for channels completed later on. */ \ 434 spin_lock_irqsave(&priv->reg_lock, flags); \ 430 435 setbits32(priv->reg + TALITOS_IMR, ch_done_mask); \ 431 436 setbits32(priv->reg + TALITOS_IMR_LO, TALITOS_IMR_LO_INIT); \ 437 spin_unlock_irqrestore(&priv->reg_lock, flags); \ 432 438 } 433 439 DEF_TALITOS_DONE(4ch, TALITOS_ISR_4CHDONE) … … 620 626 struct talitos_private *priv = dev_get_drvdata(dev); \ 621 627 u32 isr, isr_lo; \ 628 unsigned long flags; \ 622 629 \ 630 spin_lock_irqsave(&priv->reg_lock, flags); \ 623 631 isr = in_be32(priv->reg + TALITOS_ISR); \ 624 632 isr_lo = in_be32(priv->reg + TALITOS_ISR_LO); \ … … 627 635 out_be32(priv->reg + TALITOS_ICR_LO, isr_lo); \ 628 636 \ 629 if (unlikely((isr & ~TALITOS_ISR_4CHDONE) & ch_err_mask || isr_lo)) \ 630 talitos_error(dev, isr, isr_lo); \ 631 else \ 637 if (unlikely(isr & ch_err_mask || isr_lo)) { \ 638 spin_unlock_irqrestore(&priv->reg_lock, flags); \ 639 talitos_error(dev, isr & ch_err_mask, isr_lo); \ 640 } \ 641 else { \ 632 642 if (likely(isr & ch_done_mask)) { \ 633 643 /* mask further done interrupts. */ \ … … 636 646 tasklet_schedule(&priv->done_task[tlet]); \ 637 647 } \ 648 spin_unlock_irqrestore(&priv->reg_lock, flags); \ 649 } \ 638 650 \ 639 651 return (isr & (ch_done_mask | ch_err_mask) || isr_lo) ? IRQ_HANDLED : \ … … 2719 2731 priv->ofdev = ofdev; 2720 2732 2733 spin_lock_init(&priv->reg_lock); 2734 2721 2735 err = talitos_probe_irq(ofdev); 2722 2736 if (err) -
src/linux/universal/linux-3.3/drivers/dma/at_hdmac.c
r18778 r19208 241 241 242 242 vdbg_dump_regs(atchan); 243 244 /* clear any pending interrupt */245 while (dma_readl(atdma, EBCISR))246 cpu_relax();247 243 248 244 channel_writel(atchan, SADDR, 0); -
src/linux/universal/linux-3.3/drivers/firmware/efivars.c
r18778 r19208 192 192 } 193 193 194 static bool 195 validate_device_path(struct efi_variable *var, int match, u8 *buffer, 196 unsigned long len) 197 { 198 struct efi_generic_dev_path *node; 199 int offset = 0; 200 201 node = (struct efi_generic_dev_path *)buffer; 202 203 if (len < sizeof(*node)) 204 return false; 205 206 while (offset <= len - sizeof(*node) && 207 node->length >= sizeof(*node) && 208 node->length <= len - offset) { 209 offset += node->length; 210 211 if ((node->type == EFI_DEV_END_PATH || 212 node->type == EFI_DEV_END_PATH2) && 213 node->sub_type == EFI_DEV_END_ENTIRE) 214 return true; 215 216 node = (struct efi_generic_dev_path *)(buffer + offset); 217 } 218 219 /* 220 * If we're here then either node->length pointed past the end 221 * of the buffer or we reached the end of the buffer without 222 * finding a device path end node. 223 */ 224 return false; 225 } 226 227 static bool 228 validate_boot_order(struct efi_variable *var, int match, u8 *buffer, 229 unsigned long len) 230 { 231 /* An array of 16-bit integers */ 232 if ((len % 2) != 0) 233 return false; 234 235 return true; 236 } 237 238 static bool 239 validate_load_option(struct efi_variable *var, int match, u8 *buffer, 240 unsigned long len) 241 { 242 u16 filepathlength; 243 int i, desclength = 0, namelen; 244 245 namelen = utf16_strnlen(var->VariableName, sizeof(var->VariableName)); 246 247 /* Either "Boot" or "Driver" followed by four digits of hex */ 248 for (i = match; i < match+4; i++) { 249 if (var->VariableName[i] > 127 || 250 hex_to_bin(var->VariableName[i] & 0xff) < 0) 251 return true; 252 } 253 254 /* Reject it if there's 4 digits of hex and then further content */ 255 if (namelen > match + 4) 256 return false; 257 258 /* A valid entry must be at least 8 bytes */ 259 if (len < 8) 260 return false; 261 262 filepathlength = buffer[4] | buffer[5] << 8; 263 264 /* 265 * There's no stored length for the description, so it has to be 266 * found by hand 267 */ 268 desclength = utf16_strsize((efi_char16_t *)(buffer + 6), len - 6) + 2; 269 270 /* Each boot entry must have a descriptor */ 271 if (!desclength) 272 return false; 273 274 /* 275 * If the sum of the length of the description, the claimed filepath 276 * length and the original header are greater than the length of the 277 * variable, it's malformed 278 */ 279 if ((desclength + filepathlength + 6) > len) 280 return false; 281 282 /* 283 * And, finally, check the filepath 284 */ 285 return validate_device_path(var, match, buffer + desclength + 6, 286 filepathlength); 287 } 288 289 static bool 290 validate_uint16(struct efi_variable *var, int match, u8 *buffer, 291 unsigned long len) 292 { 293 /* A single 16-bit integer */ 294 if (len != 2) 295 return false; 296 297 return true; 298 } 299 300 static bool 301 validate_ascii_string(struct efi_variable *var, int match, u8 *buffer, 302 unsigned long len) 303 { 304 int i; 305 306 for (i = 0; i < len; i++) { 307 if (buffer[i] > 127) 308 return false; 309 310 if (buffer[i] == 0) 311 return true; 312 } 313 314 return false; 315 } 316 317 struct variable_validate { 318 char *name; 319 bool (*validate)(struct efi_variable *var, int match, u8 *data, 320 unsigned long len); 321 }; 322 323 static const struct variable_validate variable_validate[] = { 324 { "BootNext", validate_uint16 }, 325 { "BootOrder", validate_boot_order }, 326 { "DriverOrder", validate_boot_order }, 327 { "Boot*", validate_load_option }, 328 { "Driver*", validate_load_option }, 329 { "ConIn", validate_device_path }, 330 { "ConInDev", validate_device_path }, 331 { "ConOut", validate_device_path }, 332 { "ConOutDev", validate_device_path }, 333 { "ErrOut", validate_device_path }, 334 { "ErrOutDev", validate_device_path }, 335 { "Timeout", validate_uint16 }, 336 { "Lang", validate_ascii_string }, 337 { "PlatformLang", validate_ascii_string }, 338 { "", NULL }, 339 }; 340 341 static bool 342 validate_var(struct efi_variable *var, u8 *data, unsigned long len) 343 { 344 int i; 345 u16 *unicode_name = var->VariableName; 346 347 for (i = 0; variable_validate[i].validate != NULL; i++) { 348 const char *name = variable_validate[i].name; 349 int match; 350 351 for (match = 0; ; match++) { 352 char c = name[match]; 353 u16 u = unicode_name[match]; 354 355 /* All special variables are plain ascii */ 356 if (u > 127) 357 return true; 358 359 /* Wildcard in the matching name means we've matched */ 360 if (c == '*') 361 return variable_validate[i].validate(var, 362 match, data, len); 363 364 /* Case sensitive match */ 365 if (c != u) 366 break; 367 368 /* Reached the end of the string while matching */ 369 if (!c) 370 return variable_validate[i].validate(var, 371 match, data, len); 372 } 373 } 374 375 return true; 376 } 377 194 378 static efi_status_t 195 379 get_var_data_locked(struct efivars *efivars, struct efi_variable *var) … … 322 506 if ((new_var->DataSize <= 0) || (new_var->Attributes == 0)){ 323 507 printk(KERN_ERR "efivars: DataSize & Attributes must be valid!\n"); 508 return -EINVAL; 509 } 510 511 if ((new_var->Attributes & ~EFI_VARIABLE_MASK) != 0 || 512 validate_var(new_var, new_var->Data, new_var->DataSize) == false) { 513 printk(KERN_ERR "efivars: Malformed variable content\n"); 324 514 return -EINVAL; 325 515 } … … 627 817 return -EACCES; 628 818 819 if ((new_var->Attributes & ~EFI_VARIABLE_MASK) != 0 || 820 validate_var(new_var, new_var->Data, new_var->DataSize) == false) { 821 printk(KERN_ERR "efivars: Malformed variable content\n"); 822 return -EINVAL; 823 } 824 629 825 spin_lock(&efivars->lock); 630 826 -
src/linux/universal/linux-3.3/drivers/gpu/drm/i915/i915_gem_execbuffer.c
r18778 r19208 1083 1083 } 1084 1084 1085 if (args->num_cliprects > UINT_MAX / sizeof(*cliprects)) { 1086 DRM_DEBUG("execbuf with %u cliprects\n", 1087 args->num_cliprects); 1088 return -EINVAL; 1089 } 1085 1090 cliprects = kmalloc(args->num_cliprects * sizeof(*cliprects), 1086 1091 GFP_KERNEL); … … 1354 1359 int ret; 1355 1360 1356 if (args->buffer_count < 1) { 1361 if (args->buffer_count < 1 || 1362 args->buffer_count > UINT_MAX / sizeof(*exec2_list)) { 1357 1363 DRM_ERROR("execbuf2 with %d buffers\n", args->buffer_count); 1358 1364 return -EINVAL; -
src/linux/universal/linux-3.3/drivers/gpu/drm/i915/i915_reg.h
r19019 r19208 524 524 #define CM0_IZ_OPT_DISABLE (1<<6) 525 525 #define CM0_ZR_OPT_DISABLE (1<<5) 526 #define CM0_STC_EVICT_DISABLE_LRA_SNB (1<<5) 526 527 #define CM0_DEPTH_EVICT_DISABLE (1<<4) 527 528 #define CM0_COLOR_EVICT_DISABLE (1<<3) -
src/linux/universal/linux-3.3/drivers/gpu/drm/i915/intel_ringbuffer.c
r19073 r19208 418 418 I915_WRITE(INSTPM, 419 419 INSTPM_FORCE_ORDERING << 16 | INSTPM_FORCE_ORDERING); 420 421 /* From the Sandybridge PRM, volume 1 part 3, page 24: 422 * "If this bit is set, STCunit will have LRA as replacement 423 * policy. [...] This bit must be reset. LRA replacement 424 * policy is not supported." 425 */ 426 I915_WRITE(CACHE_MODE_0, 427 CM0_STC_EVICT_DISABLE_LRA_SNB << CM0_MASK_SHIFT); 420 428 } 421 429 -
src/linux/universal/linux-3.3/drivers/gpu/drm/i915/intel_sdvo.c
r18778 r19208 732 732 uint16_t h_blank_len, h_sync_len, v_blank_len, v_sync_len; 733 733 uint16_t h_sync_offset, v_sync_offset; 734 int mode_clock; 734 735 735 736 width = mode->crtc_hdisplay; … … 746 747 v_sync_offset = mode->crtc_vsync_start - mode->crtc_vblank_start; 747 748 748 dtd->part1.clock = mode->clock / 10; 749 mode_clock = mode->clock; 750 mode_clock /= intel_mode_get_pixel_multiplier(mode) ?: 1; 751 mode_clock /= 10; 752 dtd->part1.clock = mode_clock; 753 749 754 dtd->part1.h_active = width & 0xff; 750 755 dtd->part1.h_blank = h_blank_len & 0xff; … … 998 1003 u32 sdvox; 999 1004 struct intel_sdvo_in_out_map in_out; 1000 struct intel_sdvo_dtd input_dtd ;1005 struct intel_sdvo_dtd input_dtd, output_dtd; 1001 1006 int pixel_multiplier = intel_mode_get_pixel_multiplier(adjusted_mode); 1002 1007 int rate; … … 1023 1028 return; 1024 1029 1025 /* We have tried to get input timing in mode_fixup, and filled into 1026 * adjusted_mode. 1027 */ 1028 if (intel_sdvo->is_tv || intel_sdvo->is_lvds) { 1029 input_dtd = intel_sdvo->input_dtd; 1030 } else { 1031 /* Set the output timing to the screen */ 1032 if (!intel_sdvo_set_target_output(intel_sdvo, 1033 intel_sdvo->attached_output)) 1034 return; 1035 1036 intel_sdvo_get_dtd_from_mode(&input_dtd, adjusted_mode); 1037 (void) intel_sdvo_set_output_timing(intel_sdvo, &input_dtd); 1038 } 1030 /* lvds has a special fixed output timing. */ 1031 if (intel_sdvo->is_lvds) 1032 intel_sdvo_get_dtd_from_mode(&output_dtd, 1033 intel_sdvo->sdvo_lvds_fixed_mode); 1034 else 1035 intel_sdvo_get_dtd_from_mode(&output_dtd, mode); 1036 (void) intel_sdvo_set_output_timing(intel_sdvo, &output_dtd); 1039 1037 1040 1038 /* Set the input timing to the screen. Assume always input 0. */ … … 1054 1052 return; 1055 1053 1054 /* We have tried to get input timing in mode_fixup, and filled into 1055 * adjusted_mode. 1056 */ 1057 intel_sdvo_get_dtd_from_mode(&input_dtd, adjusted_mode); 1056 1058 (void) intel_sdvo_set_input_timing(intel_sdvo, &input_dtd); 1057 1059 -
src/linux/universal/linux-3.3/drivers/gpu/drm/nouveau/nouveau_acpi.c
r18778 r19208 271 271 struct pci_dev *pdev = NULL; 272 272 int has_dsm = 0; 273 int has_optimus ;273 int has_optimus = 0; 274 274 int vga_count = 0; 275 275 bool guid_valid; -
src/linux/universal/linux-3.3/drivers/gpu/drm/radeon/atombios_crtc.c
r18879 r19208 913 913 } 914 914 915 if ( radeon_encoder->active_device &916 ( ATOM_DEVICE_LCD_SUPPORT | ATOM_DEVICE_DFP_SUPPORT)) {915 if ((radeon_encoder->active_device & (ATOM_DEVICE_LCD_SUPPORT | ATOM_DEVICE_DFP_SUPPORT)) || 916 (radeon_encoder_get_dp_bridge_encoder_id(encoder) != ENCODER_OBJECT_ID_NONE)) { 917 917 struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; 918 918 struct drm_connector *connector = -
src/linux/universal/linux-3.3/drivers/hwmon/coretemp.c
r18778 r19208 52 52 53 53 #define BASE_SYSFS_ATTR_NO 2 /* Sysfs Base attr no for coretemp */ 54 #define NUM_REAL_CORES 16/* Number of Real cores per cpu */54 #define NUM_REAL_CORES 32 /* Number of Real cores per cpu */ 55 55 #define CORETEMP_NAME_LENGTH 17 /* String Length of attrs */ 56 56 #define MAX_CORE_ATTRS 4 /* Maximum no of basic attrs */ … … 709 709 indx = TO_ATTR_NO(cpu); 710 710 711 /* The core id is too big, just return */ 712 if (indx > MAX_CORE_DATA - 1) 713 return; 714 711 715 if (pdata->core_data[indx] && pdata->core_data[indx]->cpu == cpu) 712 716 coretemp_remove_core(pdata, &pdev->dev, indx); -
src/linux/universal/linux-3.3/drivers/hwmon/fam15h_power.c
r18879 r19208 123 123 } 124 124 125 /* 126 * Newer BKDG versions have an updated recommendation on how to properly 127 * initialize the running average range (was: 0xE, now: 0x9). This avoids 128 * counter saturations resulting in bogus power readings. 129 * We correct this value ourselves to cope with older BIOSes. 130 */ 131 static DEFINE_PCI_DEVICE_TABLE(affected_device) = { 132 { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_15H_NB_F4) }, 133 { 0 } 134 }; 135 136 static void __devinit tweak_runavg_range(struct pci_dev *pdev) 137 { 138 u32 val; 139 140 /* 141 * let this quirk apply only to the current version of the 142 * northbridge, since future versions may change the behavior 143 */ 144 if (!pci_match_id(affected_device, pdev)) 145 return; 146 147 pci_bus_read_config_dword(pdev->bus, 148 PCI_DEVFN(PCI_SLOT(pdev->devfn), 5), 149 REG_TDP_RUNNING_AVERAGE, &val); 150 if ((val & 0xf) != 0xe) 151 return; 152 153 val &= ~0xf; 154 val |= 0x9; 155 pci_bus_write_config_dword(pdev->bus, 156 PCI_DEVFN(PCI_SLOT(pdev->devfn), 5), 157 REG_TDP_RUNNING_AVERAGE, val); 158 } 159 125 160 static void __devinit fam15h_power_init_data(struct pci_dev *f4, 126 161 struct fam15h_power_data *data) … … 155 190 struct device *dev; 156 191 int err; 192 193 /* 194 * though we ignore every other northbridge, we still have to 195 * do the tweaking on _each_ node in MCM processors as the counters 196 * are working hand-in-hand 197 */ 198 tweak_runavg_range(pdev); 157 199 158 200 if (!fam15h_power_is_internal_node0(pdev)) { -
src/linux/universal/linux-3.3/drivers/i2c/busses/i2c-pnx.c
r18778 r19208 547 547 struct i2c_pnx_algo_data *alg_data = platform_get_drvdata(pdev); 548 548 549 /* FIXME: shouldn't this be clk_disable? */ 550 clk_enable(alg_data->clk); 549 clk_disable(alg_data->clk); 551 550 552 551 return 0; -
src/linux/universal/linux-3.3/drivers/input/mouse/synaptics.c
r18778 r19208 275 275 struct synaptics_data *priv = psmouse->private; 276 276 277 if (!SYN_CAP_ADV_GESTURE(priv->ext_cap_0c)) 277 if (!(SYN_CAP_ADV_GESTURE(priv->ext_cap_0c) || 278 SYN_CAP_IMAGE_SENSOR(priv->ext_cap_0c))) 278 279 return 0; 279 280 -
src/linux/universal/linux-3.3/drivers/md/raid5.c
r18778 r19208 3278 3278 * we must be recovering. 3279 3279 * else if we are after recovery_cp, we must be syncing 3280 * else if MD_RECOVERY_REQUESTED is set, we also are syncing. 3280 3281 * else we can only be replacing 3281 3282 * sync and recovery both need to read all devices, and so … … 3283 3284 */ 3284 3285 if (do_recovery || 3285 sh->sector >= conf->mddev->recovery_cp) 3286 sh->sector >= conf->mddev->recovery_cp || 3287 test_bit(MD_RECOVERY_REQUESTED, &(conf->mddev->recovery))) 3286 3288 s->syncing = 1; 3287 3289 else -
src/linux/universal/linux-3.3/drivers/net/wireless/b43/main.c
r18778 r19208 4842 4842 mutex_unlock(&wl->mutex); 4843 4843 4844 /* reload configuration */ 4845 b43_op_config(hw, ~0); 4844 /* 4845 * Configuration may have been overwritten during initialization. 4846 * Reload the configuration, but only if initialization was 4847 * successful. Reloading the configuration after a failed init 4848 * may hang the system. 4849 */ 4850 if (!err) 4851 b43_op_config(hw, ~0); 4846 4852 4847 4853 return err; -
src/linux/universal/linux-3.3/drivers/net/wireless/ipw2x00/ipw2200.c
r18778 r19208 2192 2192 int rc = 0; 2193 2193 unsigned long flags; 2194 unsigned long now, end; 2194 2195 2195 2196 spin_lock_irqsave(&priv->lock, flags); … … 2233 2234 spin_unlock_irqrestore(&priv->lock, flags); 2234 2235 2236 now = jiffies; 2237 end = now + HOST_COMPLETE_TIMEOUT; 2238 again: 2235 2239 rc = wait_event_interruptible_timeout(priv->wait_command_queue, 2236 2240 !(priv-> 2237 2241 status & STATUS_HCMD_ACTIVE), 2238 HOST_COMPLETE_TIMEOUT); 2242 end - now); 2243 if (rc < 0) { 2244 now = jiffies; 2245 if (time_before(now, end)) 2246 goto again; 2247 rc = 0; 2248 } 2249 2239 2250 if (rc == 0) { 2240 2251 spin_lock_irqsave(&priv->lock, flags); -
src/linux/universal/linux-3.3/drivers/net/wireless/iwlwifi/iwl-1000.c
r18778 r19208 46 46 47 47 /* Highest firmware API version supported */ 48 #define IWL1000_UCODE_API_MAX 649 #define IWL100_UCODE_API_MAX 648 #define IWL1000_UCODE_API_MAX 5 49 #define IWL100_UCODE_API_MAX 5 50 50 51 51 /* Oldest version we won't warn about */ … … 236 236 }; 237 237 238 MODULE_FIRMWARE(IWL1000_MODULE_FIRMWARE(IWL1000_UCODE_API_ MAX));239 MODULE_FIRMWARE(IWL100_MODULE_FIRMWARE(IWL100_UCODE_API_ MAX));238 MODULE_FIRMWARE(IWL1000_MODULE_FIRMWARE(IWL1000_UCODE_API_OK)); 239 MODULE_FIRMWARE(IWL100_MODULE_FIRMWARE(IWL100_UCODE_API_OK)); -
src/linux/universal/linux-3.3/drivers/net/wireless/iwlwifi/iwl-2000.c
r18778 r19208 52 52 53 53 /* Oldest version we won't warn about */ 54 #define IWL2030_UCODE_API_OK 555 #define IWL2000_UCODE_API_OK 556 #define IWL105_UCODE_API_OK 557 #define IWL135_UCODE_API_OK 554 #define IWL2030_UCODE_API_OK 6 55 #define IWL2000_UCODE_API_OK 6 56 #define IWL105_UCODE_API_OK 6 57 #define IWL135_UCODE_API_OK 6 58 58 59 59 /* Lowest firmware API version supported */ … … 339 339 }; 340 340 341 MODULE_FIRMWARE(IWL2000_MODULE_FIRMWARE(IWL2000_UCODE_API_ MAX));342 MODULE_FIRMWARE(IWL2030_MODULE_FIRMWARE(IWL2030_UCODE_API_ MAX));343 MODULE_FIRMWARE(IWL105_MODULE_FIRMWARE(IWL105_UCODE_API_ MAX));344 MODULE_FIRMWARE(IWL135_MODULE_FIRMWARE(IWL135_UCODE_API_ MAX));341 MODULE_FIRMWARE(IWL2000_MODULE_FIRMWARE(IWL2000_UCODE_API_OK)); 342 MODULE_FIRMWARE(IWL2030_MODULE_FIRMWARE(IWL2030_UCODE_API_OK)); 343 MODULE_FIRMWARE(IWL105_MODULE_FIRMWARE(IWL105_UCODE_API_OK)); 344 MODULE_FIRMWARE(IWL135_MODULE_FIRMWARE(IWL135_UCODE_API_OK)); -
src/linux/universal/linux-3.3/drivers/net/wireless/iwlwifi/iwl-5000.c
r18778 r19208 50 50 #define IWL5000_UCODE_API_MAX 5 51 51 #define IWL5150_UCODE_API_MAX 2 52 53 /* Oldest version we won't warn about */ 54 #define IWL5000_UCODE_API_OK 5 55 #define IWL5150_UCODE_API_OK 2 52 56 53 57 /* Lowest firmware API version supported */ … … 360 364 .fw_name_pre = IWL5000_FW_PRE, \ 361 365 .ucode_api_max = IWL5000_UCODE_API_MAX, \ 366 .ucode_api_ok = IWL5000_UCODE_API_OK, \ 362 367 .ucode_api_min = IWL5000_UCODE_API_MIN, \ 363 368 .eeprom_ver = EEPROM_5000_EEPROM_VERSION, \ … … 403 408 .fw_name_pre = IWL5000_FW_PRE, 404 409 .ucode_api_max = IWL5000_UCODE_API_MAX, 410 .ucode_api_ok = IWL5000_UCODE_API_OK, 405 411 .ucode_api_min = IWL5000_UCODE_API_MIN, 406 412 .eeprom_ver = EEPROM_5050_EEPROM_VERSION, … … 416 422 .fw_name_pre = IWL5150_FW_PRE, \ 417 423 .ucode_api_max = IWL5150_UCODE_API_MAX, \ 424 .ucode_api_ok = IWL5150_UCODE_API_OK, \ 418 425 .ucode_api_min = IWL5150_UCODE_API_MIN, \ 419 426 .eeprom_ver = EEPROM_5050_EEPROM_VERSION, \ … … 437 444 }; 438 445 439 MODULE_FIRMWARE(IWL5000_MODULE_FIRMWARE(IWL5000_UCODE_API_ MAX));440 MODULE_FIRMWARE(IWL5150_MODULE_FIRMWARE(IWL5150_UCODE_API_ MAX));446 MODULE_FIRMWARE(IWL5000_MODULE_FIRMWARE(IWL5000_UCODE_API_OK)); 447 MODULE_FIRMWARE(IWL5150_MODULE_FIRMWARE(IWL5150_UCODE_API_OK)); -
src/linux/universal/linux-3.3/drivers/net/wireless/iwlwifi/iwl-6000.c
r18778 r19208 54 54 #define IWL6000_UCODE_API_OK 4 55 55 #define IWL6000G2_UCODE_API_OK 5 56 #define IWL6050_UCODE_API_OK 5 57 #define IWL6000G2B_UCODE_API_OK 6 56 58 57 59 /* Lowest firmware API version supported */ … … 390 392 .fw_name_pre = IWL6030_FW_PRE, \ 391 393 .ucode_api_max = IWL6000G2_UCODE_API_MAX, \ 392 .ucode_api_ok = IWL6000G2 _UCODE_API_OK,\394 .ucode_api_ok = IWL6000G2B_UCODE_API_OK, \ 393 395 .ucode_api_min = IWL6000G2_UCODE_API_MIN, \ 394 396 .eeprom_ver = EEPROM_6030_EEPROM_VERSION, \ … … 549 551 550 552 MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_OK)); 551 MODULE_FIRMWARE(IWL6050_MODULE_FIRMWARE(IWL6050_UCODE_API_ MAX));552 MODULE_FIRMWARE(IWL6005_MODULE_FIRMWARE(IWL6000G2_UCODE_API_ MAX));553 MODULE_FIRMWARE(IWL6030_MODULE_FIRMWARE(IWL6000G2 _UCODE_API_MAX));553 MODULE_FIRMWARE(IWL6050_MODULE_FIRMWARE(IWL6050_UCODE_API_OK)); 554 MODULE_FIRMWARE(IWL6005_MODULE_FIRMWARE(IWL6000G2_UCODE_API_OK)); 555 MODULE_FIRMWARE(IWL6030_MODULE_FIRMWARE(IWL6000G2B_UCODE_API_OK)); -
src/linux/universal/linux-3.3/drivers/net/wireless/iwlwifi/iwl-agn.c
r18778 r19208 1404 1404 void iwlagn_prepare_restart(struct iwl_priv *priv) 1405 1405 { 1406 struct iwl_rxon_context *ctx;1407 1406 bool bt_full_concurrent; 1408 1407 u8 bt_ci_compliance; … … 1413 1412 lockdep_assert_held(&priv->shrd->mutex); 1414 1413 1415 for_each_context(priv, ctx)1416 ctx->vif = NULL;1417 1414 priv->is_open = 0; 1418 1415 -
src/linux/universal/linux-3.3/drivers/net/wireless/iwlwifi/iwl-fh.h
r18778 r19208 105 105 * bytes from one another. Each TFD circular buffer in DRAM must be 256-byte 106 106 * aligned (address bits 0-7 must be 0). 107 * Later devices have 20 (5000 series) or 30 (higher) queues, but the registers 108 * for them are in different places. 107 109 * 108 110 * Bit fields in each pointer register: 109 111 * 27-0: TFD CB physical base address [35:8], must be 256-byte aligned 110 112 */ 111 #define FH_MEM_CBBC_LOWER_BOUND (FH_MEM_LOWER_BOUND + 0x9D0) 112 #define FH_MEM_CBBC_UPPER_BOUND (FH_MEM_LOWER_BOUND + 0xA10) 113 114 /* Find TFD CB base pointer for given queue (range 0-15). */ 115 #define FH_MEM_CBBC_QUEUE(x) (FH_MEM_CBBC_LOWER_BOUND + (x) * 0x4) 113 #define FH_MEM_CBBC_0_15_LOWER_BOUND (FH_MEM_LOWER_BOUND + 0x9D0) 114 #define FH_MEM_CBBC_0_15_UPPER_BOUND (FH_MEM_LOWER_BOUND + 0xA10) 115 #define FH_MEM_CBBC_16_19_LOWER_BOUND (FH_MEM_LOWER_BOUND + 0xBF0) 116 #define FH_MEM_CBBC_16_19_UPPER_BOUND (FH_MEM_LOWER_BOUND + 0xC00) 117 #define FH_MEM_CBBC_20_31_LOWER_BOUND (FH_MEM_LOWER_BOUND + 0xB20) 118 #define FH_MEM_CBBC_20_31_UPPER_BOUND (FH_MEM_LOWER_BOUND + 0xB80) 119 120 /* Find TFD CB base pointer for given queue */ 121 static inline unsigned int FH_MEM_CBBC_QUEUE(unsigned int chnl) 122 { 123 if (chnl < 16) 124 return FH_MEM_CBBC_0_15_LOWER_BOUND + 4 * chnl; 125 if (chnl < 20) 126 return FH_MEM_CBBC_16_19_LOWER_BOUND + 4 * (chnl - 16); 127 WARN_ON_ONCE(chnl >= 32); 128 return FH_MEM_CBBC_20_31_LOWER_BOUND + 4 * (chnl - 20); 129 } 116 130 117 131 -
src/linux/universal/linux-3.3/drivers/net/wireless/iwlwifi/iwl-mac80211.c
r18778 r19208 1227 1227 int err; 1228 1228 enum nl80211_iftype viftype = ieee80211_vif_type_p2p(vif); 1229 bool reset = false; 1229 1230 1230 1231 IWL_DEBUG_MAC80211(priv, "enter: type %d, addr %pM\n", … … 1248 1249 1249 1250 if (tmp->vif) { 1251 /* On reset we need to add the same interface again */ 1252 if (tmp->vif == vif) { 1253 reset = true; 1254 ctx = tmp; 1255 break; 1256 } 1257 1250 1258 /* check if this busy context is exclusive */ 1251 1259 if (tmp->exclusive_interface_modes & … … 1274 1282 1275 1283 err = iwl_setup_interface(priv, ctx); 1276 if (!err )1284 if (!err || reset) 1277 1285 goto out; 1278 1286 -
src/linux/universal/linux-3.3/drivers/net/wireless/iwlwifi/iwl-prph.h
r18778 r19208 228 228 #define SCD_TXFACT (SCD_BASE + 0x10) 229 229 #define SCD_ACTIVE (SCD_BASE + 0x14) 230 #define SCD_QUEUE_WRPTR(x) (SCD_BASE + 0x18 + (x) * 4)231 #define SCD_QUEUE_RDPTR(x) (SCD_BASE + 0x68 + (x) * 4)232 230 #define SCD_QUEUECHAIN_SEL (SCD_BASE + 0xe8) 233 231 #define SCD_AGGR_SEL (SCD_BASE + 0x248) 234 232 #define SCD_INTERRUPT_MASK (SCD_BASE + 0x108) 235 #define SCD_QUEUE_STATUS_BITS(x) (SCD_BASE + 0x10c + (x) * 4) 233 234 static inline unsigned int SCD_QUEUE_WRPTR(unsigned int chnl) 235 { 236 if (chnl < 20) 237 return SCD_BASE + 0x18 + chnl * 4; 238 WARN_ON_ONCE(chnl >= 32); 239 return SCD_BASE + 0x284 + (chnl - 20) * 4; 240 } 241 242 static inline unsigned int SCD_QUEUE_RDPTR(unsigned int chnl) 243 { 244 if (chnl < 20) 245 return SCD_BASE + 0x68 + chnl * 4; 246 WARN_ON_ONCE(chnl >= 32); 247 return SCD_BASE + 0x2B4 + (chnl - 20) * 4; 248 } 249 250 static inline unsigned int SCD_QUEUE_STATUS_BITS(unsigned int chnl) 251 { 252 if (chnl < 20) 253 return SCD_BASE + 0x10c + chnl * 4; 254 WARN_ON_ONCE(chnl >= 32); 255 return SCD_BASE + 0x384 + (chnl - 20) * 4; 256 } 236 257 237 258 /*********************** END TX SCHEDULER *************************************/ -
src/linux/universal/linux-3.3/drivers/net/wireless/rtlwifi/pci.c
r19073 r19208 1956 1956 rtlpriv->intf_ops->adapter_stop(hw); 1957 1957 } 1958 rtlpriv->cfg->ops->disable_interrupt(hw); 1958 1959 1959 1960 /*deinit rfkill */ -
src/linux/universal/linux-3.3/drivers/net/wireless/wl1251/main.c
r18778 r19208 480 480 cancel_work_sync(&wl->tx_work); 481 481 cancel_work_sync(&wl->filter_work); 482 cancel_delayed_work_sync(&wl->elp_work); 482 483 483 484 mutex_lock(&wl->mutex); -
src/linux/universal/linux-3.3/drivers/net/wireless/wl1251/sdio.c
r18778 r19208 316 316 if (wl->irq) 317 317 free_irq(wl->irq, wl); 318 wl1251_free_hw(wl); 318 319 kfree(wl_sdio); 319 wl1251_free_hw(wl);320 320 321 321 sdio_claim_host(func); -
src/linux/universal/linux-3.3/drivers/platform/x86/dell-laptop.c
r19156 r19208 212 212 .driver_data = &quirk_dell_vostro_v130, 213 213 }, 214 { } 214 215 }; 215 216 -
src/linux/universal/linux-3.3/drivers/scsi/libsas/sas_expander.c
r18778 r19208 193 193 phy->attached_iproto = dr->iproto << 1; 194 194 phy->attached_tproto = dr->tproto << 1; 195 memcpy(phy->attached_sas_addr, dr->attached_sas_addr, SAS_ADDR_SIZE); 195 /* help some expanders that fail to zero sas_address in the 'no 196 * device' case 197 */ 198 if (phy->attached_dev_type == NO_DEVICE || 199 phy->linkrate < SAS_LINK_RATE_1_5_GBPS) 200 memset(phy->attached_sas_addr, 0, SAS_ADDR_SIZE); 201 else 202 memcpy(phy->attached_sas_addr, dr->attached_sas_addr, SAS_ADDR_SIZE); 196 203 phy->attached_phy_id = dr->attached_phy_id; 197 204 phy->phy_change_count = dr->change_count; … … 1644 1651 1645 1652 res = sas_get_phy_change_count(dev, i, &phy_change_count); 1646 if (res) 1647 goto out; 1648 else if (phy_change_count != ex->ex_phy[i].phy_change_count) { 1653 switch (res) { 1654 case SMP_RESP_PHY_VACANT: 1655 case SMP_RESP_NO_PHY: 1656 continue; 1657 case SMP_RESP_FUNC_ACC: 1658 break; 1659 default: 1660 return res; 1661 } 1662 1663 if (phy_change_count != ex->ex_phy[i].phy_change_count) { 1649 1664 if (update) 1650 1665 ex->ex_phy[i].phy_change_count = … … 1654 1669 } 1655 1670 } 1656 out: 1657 return res; 1671 return 0; 1658 1672 } 1659 1673 -
src/linux/universal/linux-3.3/drivers/usb/class/cdc-wdm.c
r18879 r19208 109 109 desc->werr = urb->status; 110 110 spin_unlock(&desc->iuspin); 111 kfree(desc->outbuf); 112 desc->outbuf = NULL; 111 113 clear_bit(WDM_IN_USE, &desc->flags); 112 kfree(desc->outbuf);113 114 wake_up(&desc->wait); 114 115 } … … 313 314 return -EIO; 314 315 315 desc->outbuf =buf = kmalloc(count, GFP_KERNEL);316 buf = kmalloc(count, GFP_KERNEL); 316 317 if (!buf) { 317 318 rv = -ENOMEM; … … 377 378 req->wLength = cpu_to_le16(count); 378 379 set_bit(WDM_IN_USE, &desc->flags); 380 desc->outbuf = buf; 379 381 380 382 rv = usb_submit_urb(desc->command, GFP_KERNEL); 381 383 if (rv < 0) { 382 384 kfree(buf); 385 desc->outbuf = NULL; 383 386 clear_bit(WDM_IN_USE, &desc->flags); 384 387 dev_err(&desc->intf->dev, "Tx URB error: %d\n", rv); -
src/linux/universal/linux-3.3/drivers/usb/core/hcd-pci.c
r18778 r19208 492 492 pci_save_state(pci_dev); 493 493 494 /* 495 * Some systems crash if an EHCI controller is in D3 during 496 * a sleep transition. We have to leave such controllers in D0. 497 */ 498 if (hcd->broken_pci_sleep) { 499 dev_dbg(dev, "Staying in PCI D0\n"); 500 return retval; 501 } 502 494 503 /* If the root hub is dead rather than suspended, disallow remote 495 504 * wakeup. usb_hc_died() should ensure that both hosts are marked as -
src/linux/universal/linux-3.3/drivers/usb/gadget/dummy_hcd.c
r18778 r19208 925 925 dum->driver = NULL; 926 926 927 dummy_pullup(&dum->gadget, 0);928 927 return 0; 929 928 } -
src/linux/universal/linux-3.3/drivers/usb/gadget/f_mass_storage.c
r18778 r19208 2191 2191 sprintf(unknown, "Unknown x%02x", common->cmnd[0]); 2192 2192 reply = check_command(common, common->cmnd_size, 2193 DATA_DIR_UNKNOWN, 0xff, 0, unknown);2193 DATA_DIR_UNKNOWN, ~0, 0, unknown); 2194 2194 if (reply == 0) { 2195 2195 common->curlun->sense_data = SS_INVALID_COMMAND; -
src/linux/universal/linux-3.3/drivers/usb/gadget/file_storage.c
r18778 r19208 2580 2580 sprintf(unknown, "Unknown x%02x", fsg->cmnd[0]); 2581 2581 if ((reply = check_command(fsg, fsg->cmnd_size, 2582 DATA_DIR_UNKNOWN, 0xff, 0, unknown)) == 0) {2582 DATA_DIR_UNKNOWN, ~0, 0, unknown)) == 0) { 2583 2583 fsg->curlun->sense_data = SS_INVALID_COMMAND; 2584 2584 reply = -EINVAL; -
src/linux/universal/linux-3.3/drivers/usb/gadget/uvc.h
r18778 r19208 29 29 struct uvc_request_data 30 30 { 31 unsigned intlength;31 __s32 length; 32 32 __u8 data[60]; 33 33 }; -
src/linux/universal/linux-3.3/drivers/usb/gadget/uvc_v4l2.c
r18778 r19208 40 40 return usb_ep_set_halt(cdev->gadget->ep0); 41 41 42 req->length = min (uvc->event_length, data->length);42 req->length = min_t(unsigned int, uvc->event_length, data->length); 43 43 req->zero = data->length < uvc->event_length; 44 44 req->dma = DMA_ADDR_INVALID; -
src/linux/universal/linux-3.3/drivers/usb/host/ehci-pci.c
r18778 r19208 144 144 hcd->has_tt = 1; 145 145 tdi_reset(ehci); 146 } 147 if (pdev->subsystem_vendor == PCI_VENDOR_ID_ASUSTEK) { 148 /* EHCI #1 or #2 on 6 Series/C200 Series chipset */ 149 if (pdev->device == 0x1c26 || pdev->device == 0x1c2d) { 150 ehci_info(ehci, "broken D3 during system sleep on ASUS\n"); 151 hcd->broken_pci_sleep = 1; 152 device_set_wakeup_capable(&pdev->dev, false); 153 } 146 154 } 147 155 break; -
src/linux/universal/linux-3.3/drivers/usb/host/ehci-tegra.c
r18778 r19208 602 602 return err; 603 603 } 604 gpio_set_value(gpio, 1);605 604 606 605 return err; -
src/linux/universal/linux-3.3/fs/autofs4/autofs_i.h
r18778 r19208 111 111 int min_proto; 112 112 int max_proto; 113 int compat_daemon;114 113 unsigned long exp_timeout; 115 114 unsigned int type; … … 271 270 void autofs4_clean_ino(struct autofs_info *); 272 271 272 static inline int autofs_prepare_pipe(struct file *pipe) 273 { 274 if (!pipe->f_op || !pipe->f_op->write) 275 return -EINVAL; 276 if (!S_ISFIFO(pipe->f_dentry->d_inode->i_mode)) 277 return -EINVAL; 278 /* We want a packet pipe */ 279 pipe->f_flags |= O_DIRECT; 280 return 0; 281 } 282 273 283 /* Queue management functions */ 274 284 -
src/linux/universal/linux-3.3/fs/autofs4/dev-ioctl.c
r18778 r19208 377 377 goto out; 378 378 } 379 if ( !pipe->f_op || !pipe->f_op->write) {379 if (autofs_prepare_pipe(pipe) < 0) { 380 380 err = -EPIPE; 381 381 fput(pipe); … … 386 386 sbi->pipe = pipe; 387 387 sbi->catatonic = 0; 388 sbi->compat_daemon = is_compat_task();389 388 } 390 389 out: -
src/linux/universal/linux-3.3/fs/autofs4/inode.c
r18778 r19208 20 20 #include <linux/bitops.h> 21 21 #include <linux/magic.h> 22 #include <linux/compat.h>23 22 #include "autofs_i.h" 24 23 #include <linux/module.h> … … 226 225 sbi->min_proto = 0; 227 226 sbi->max_proto = 0; 228 sbi->compat_daemon = is_compat_task();229 227 mutex_init(&sbi->wq_mutex); 230 228 mutex_init(&sbi->pipe_mutex); … … 296 294 goto fail_dput; 297 295 } 298 if ( !pipe->f_op || !pipe->f_op->write)296 if (autofs_prepare_pipe(pipe) < 0) 299 297 goto fail_fput; 300 298 sbi->pipe = pipe; -
src/linux/universal/linux-3.3/fs/autofs4/waitq.c
r18778 r19208 93 93 } 94 94 95 /*96 * The autofs_v5 packet was misdesigned.97 *98 * The packets are identical on x86-32 and x86-64, but have different99 * alignment. Which means that 'sizeof()' will give different results.100 * Fix it up for the case of running 32-bit user mode on a 64-bit kernel.101 */102 static noinline size_t autofs_v5_packet_size(struct autofs_sb_info *sbi)103 {104 size_t pktsz = sizeof(struct autofs_v5_packet);105 #if defined(CONFIG_X86_64) && defined(CONFIG_COMPAT)106 if (sbi->compat_daemon > 0)107 pktsz -= 4;108 #endif109 return pktsz;110 }111 112 95 static void autofs4_notify_daemon(struct autofs_sb_info *sbi, 113 96 struct autofs_wait_queue *wq, … … 173 156 struct autofs_v5_packet *packet = &pkt.v5_pkt.v5_packet; 174 157 175 pktsz = autofs_v5_packet_size(sbi); 158 pktsz = sizeof(*packet); 159 176 160 packet->wait_queue_token = wq->wait_queue_token; 177 161 packet->len = wq->name.len; -
src/linux/universal/linux-3.3/fs/exec.c
r18778 r19208 976 976 977 977 no_thread_group: 978 /* we have changed execution domain */ 979 tsk->exit_signal = SIGCHLD; 980 978 981 if (current->mm) 979 982 setmax_mm_hiwater_rss(&sig->maxrss, current->mm); -
src/linux/universal/linux-3.3/fs/nfs/nfs4proc.c
r19019 r19208 4461 4461 { 4462 4462 struct nfs_server *server = NFS_SERVER(state->inode); 4463 struct nfs4_exception exception = { }; 4463 struct nfs4_exception exception = { 4464 .inode = state->inode, 4465 }; 4464 4466 int err; 4465 4467 … … 4479 4481 { 4480 4482 struct nfs_server *server = NFS_SERVER(state->inode); 4481 struct nfs4_exception exception = { }; 4483 struct nfs4_exception exception = { 4484 .inode = state->inode, 4485 }; 4482 4486 int err; 4483 4487 … … 4559 4563 struct nfs4_exception exception = { 4560 4564 .state = state, 4565 .inode = state->inode, 4561 4566 }; 4562 4567 int err; … … 4604 4609 if (state == NULL) 4605 4610 return -ENOLCK; 4611 /* 4612 * Don't rely on the VFS having checked the file open mode, 4613 * since it won't do this for flock() locks. 4614 */ 4615 switch (request->fl_type & (F_RDLCK|F_WRLCK|F_UNLCK)) { 4616 case F_RDLCK: 4617 if (!(filp->f_mode & FMODE_READ)) 4618 return -EBADF; 4619 break; 4620 case F_WRLCK: 4621 if (!(filp->f_mode & FMODE_WRITE)) 4622 return -EBADF; 4623 } 4624 4606 4625 do { 4607 4626 status = nfs4_proc_setlk(state, cmd, request); -
src/linux/universal/linux-3.3/fs/nfs/read.c
r18778 r19208 325 325 data = list_entry(res->next, struct nfs_read_data, list); 326 326 list_del(&data->list); 327 nfs_readdata_ free(data);327 nfs_readdata_release(data); 328 328 } 329 329 nfs_readpage_release(req); -
src/linux/universal/linux-3.3/fs/nfs/super.c
r18778 r19208 2708 2708 size_t len; 2709 2709 2710 len = strlen(hostname) + 3;2710 len = strlen(hostname) + 5; 2711 2711 root_devname = kmalloc(len, GFP_KERNEL); 2712 2712 if (root_devname == NULL) 2713 2713 return ERR_PTR(-ENOMEM); 2714 snprintf(root_devname, len, "%s:/", hostname); 2714 /* Does hostname needs to be enclosed in brackets? */ 2715 if (strchr(hostname, ':')) 2716 snprintf(root_devname, len, "[%s]:/", hostname); 2717 else 2718 snprintf(root_devname, len, "%s:/", hostname); 2715 2719 root_mnt = vfs_kern_mount(fs_type, flags, root_devname, data); 2716 2720 kfree(root_devname); -
src/linux/universal/linux-3.3/fs/nfs/write.c
r18778 r19208 975 975 data = list_entry(res->next, struct nfs_write_data, list); 976 976 list_del(&data->list); 977 nfs_writedata_ free(data);977 nfs_writedata_release(data); 978 978 } 979 979 nfs_redirty_request(req); -
src/linux/universal/linux-3.3/fs/pipe.c
r18778 r19208 338 338 static const struct pipe_buf_operations anon_pipe_buf_ops = { 339 339 .can_merge = 1, 340 .map = generic_pipe_buf_map, 341 .unmap = generic_pipe_buf_unmap, 342 .confirm = generic_pipe_buf_confirm, 343 .release = anon_pipe_buf_release, 344 .steal = generic_pipe_buf_steal, 345 .get = generic_pipe_buf_get, 346 }; 347 348 static const struct pipe_buf_operations packet_pipe_buf_ops = { 349 .can_merge = 0, 340 350 .map = generic_pipe_buf_map, 341 351 .unmap = generic_pipe_buf_unmap, … … 407 417 buf->offset += chars; 408 418 buf->len -= chars; 419 420 /* Was it a packet buffer? Clean up and exit */ 421 if (buf->flags & PIPE_BUF_FLAG_PACKET) { 422 total_len = chars; 423 buf->len = 0; 424 } 425 409 426 if (!buf->len) { 410 427 buf->ops = NULL; … … 457 474 file_accessed(filp); 458 475 return ret; 476 } 477 478 static inline int is_packetized(struct file *file) 479 { 480 return (file->f_flags & O_DIRECT) != 0; 459 481 } 460 482 … … 593 615 buf->offset = 0; 594 616 buf->len = chars; 617 buf->flags = 0; 618 if (is_packetized(filp)) { 619 buf->ops = &packet_pipe_buf_ops; 620 buf->flags = PIPE_BUF_FLAG_PACKET; 621 } 595 622 pipe->nrbufs = ++bufs; 596 623 pipe->tmp_page = NULL; … … 1013 1040 f->f_mapping = inode->i_mapping; 1014 1041 1015 f->f_flags = O_WRONLY | (flags & O_NONBLOCK);1042 f->f_flags = O_WRONLY | (flags & (O_NONBLOCK | O_DIRECT)); 1016 1043 f->f_version = 0; 1017 1044 … … 1057 1084 int fdw, fdr; 1058 1085 1059 if (flags & ~(O_CLOEXEC | O_NONBLOCK ))1086 if (flags & ~(O_CLOEXEC | O_NONBLOCK | O_DIRECT)) 1060 1087 return -EINVAL; 1061 1088 -
src/linux/universal/linux-3.3/include/linux/efi.h
r18778 r19208 511 511 #define EFI_VARIABLE_BOOTSERVICE_ACCESS 0x0000000000000002 512 512 #define EFI_VARIABLE_RUNTIME_ACCESS 0x0000000000000004 513 513 #define EFI_VARIABLE_HARDWARE_ERROR_RECORD 0x0000000000000008 514 #define EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS 0x0000000000000010 515 #define EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS 0x0000000000000020 516 #define EFI_VARIABLE_APPEND_WRITE 0x0000000000000040 517 518 #define EFI_VARIABLE_MASK (EFI_VARIABLE_NON_VOLATILE | \ 519 EFI_VARIABLE_BOOTSERVICE_ACCESS | \ 520 EFI_VARIABLE_RUNTIME_ACCESS | \ 521 EFI_VARIABLE_HARDWARE_ERROR_RECORD | \ 522 EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS | \ 523 EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS | \ 524 EFI_VARIABLE_APPEND_WRITE) 514 525 /* 515 526 * The type of search to perform when calling boottime->locate_handle -
src/linux/universal/linux-3.3/include/linux/pipe_fs_i.h
r18778 r19208 9 9 #define PIPE_BUF_FLAG_ATOMIC 0x02 /* was atomically mapped */ 10 10 #define PIPE_BUF_FLAG_GIFT 0x04 /* page is a gift */ 11 #define PIPE_BUF_FLAG_PACKET 0x08 /* read() as a packet */ 11 12 12 13 /** -
src/linux/universal/linux-3.3/include/linux/usb/hcd.h
r18778 r19208 127 127 unsigned authorized_default:1; 128 128 unsigned has_tt:1; /* Integrated TT in root hub */ 129 unsigned broken_pci_sleep:1; /* Don't put the 130 controller in PCI-D3 for system sleep */ 129 131 130 132 int irq; /* irq allocated */ -
src/linux/universal/linux-3.3/kernel/exit.c
r18778 r19208 821 821 kill_orphaned_pgrp(tsk->group_leader, NULL); 822 822 823 /* Let father know we died824 *825 * Thread signals are configurable, but you aren't going to use826 * that to send signals to arbitrary processes.827 * That stops right now.828 *829 * If the parent exec id doesn't match the exec id we saved830 * when we started then we know the parent has changed security831 * domain.832 *833 * If our self_exec id doesn't match our parent_exec_id then834 * we have changed execution domain as these two values started835 * the same after a fork.836 */837 if (thread_group_leader(tsk) && tsk->exit_signal != SIGCHLD &&838 (tsk->parent_exec_id != tsk->real_parent->self_exec_id ||839 tsk->self_exec_id != tsk->parent_exec_id))840 tsk->exit_signal = SIGCHLD;841 842 823 if (unlikely(tsk->ptrace)) { 843 824 int sig = thread_group_leader(tsk) && -
src/linux/universal/linux-3.3/kernel/power/swap.c
r18778 r19208 52 52 #define MAP_PAGE_ENTRIES (PAGE_SIZE / sizeof(sector_t) - 1) 53 53 54 /* 55 * Number of free pages that are not high. 56 */ 57 static inline unsigned long low_free_pages(void) 58 { 59 return nr_free_pages() - nr_free_highpages(); 60 } 61 62 /* 63 * Number of pages required to be kept free while writing the image. Always 64 * half of all available low pages before the writing starts. 65 */ 66 static inline unsigned long reqd_free_pages(void) 67 { 68 return low_free_pages() / 2; 69 } 70 54 71 struct swap_map_page { 55 72 sector_t entries[MAP_PAGE_ENTRIES]; … … 73 90 sector_t first_sector; 74 91 unsigned int k; 75 unsigned long nr_free_pages, written;92 unsigned long reqd_free_pages; 76 93 u32 crc32; 77 94 }; … … 317 334 } 318 335 handle->k = 0; 319 handle->nr_free_pages = nr_free_pages() >> 1; 320 handle->written = 0; 336 handle->reqd_free_pages = reqd_free_pages(); 321 337 handle->first_sector = handle->cur_swap; 322 338 return 0; … … 353 369 handle->k = 0; 354 370 } 355 if (bio_chain && ++handle->written > handle->nr_free_pages) {371 if (bio_chain && low_free_pages() <= handle->reqd_free_pages) { 356 372 error = hib_wait_on_bio_chain(bio_chain); 357 373 if (error) 358 374 goto out; 359 handle-> written = 0;375 handle->reqd_free_pages = reqd_free_pages(); 360 376 } 361 377 out: … … 619 635 * We don't want to run out of pages when writing. 620 636 */ 621 handle-> nr_free_pages = nr_free_pages() >> 1;637 handle->reqd_free_pages = reqd_free_pages(); 622 638 623 639 /* -
src/linux/universal/linux-3.3/kernel/sched/core.c
r18778 r19208 2267 2267 * weights adjusted to the number of cycles missed. 2268 2268 */ 2269 static void calc_global_nohz( unsigned long ticks)2269 static void calc_global_nohz(void) 2270 2270 { 2271 2271 long delta, active, n; 2272 2273 if (time_before(jiffies, calc_load_update))2274 return;2275 2272 2276 2273 /* … … 2285 2282 2286 2283 /* 2287 * I f we were idle for multiple load cycles, apply them.2284 * It could be the one fold was all it took, we done! 2288 2285 */ 2289 if (ticks >= LOAD_FREQ) { 2290 n = ticks / LOAD_FREQ; 2291 2292 active = atomic_long_read(&calc_load_tasks); 2293 active = active > 0 ? active * FIXED_1 : 0; 2294 2295 avenrun[0] = calc_load_n(avenrun[0], EXP_1, active, n); 2296 avenrun[1] = calc_load_n(avenrun[1], EXP_5, active, n); 2297 avenrun[2] = calc_load_n(avenrun[2], EXP_15, active, n); 2298 2299 calc_load_update += n * LOAD_FREQ; 2300 } 2286 if (time_before(jiffies, calc_load_update + 10)) 2287 return; 2301 2288 2302 2289 /* 2303 * Its possible the remainder of the above division also crosses 2304 * a LOAD_FREQ period, the regular check in calc_global_load() 2305 * which comes after this will take care of that. 2306 * 2307 * Consider us being 11 ticks before a cycle completion, and us 2308 * sleeping for 4*LOAD_FREQ + 22 ticks, then the above code will 2309 * age us 4 cycles, and the test in calc_global_load() will 2310 * pick up the final one. 2290 * Catch-up, fold however many we are behind still 2311 2291 */ 2292 delta = jiffies - calc_load_update - 10; 2293 n = 1 + (delta / LOAD_FREQ); 2294 2295 active = atomic_long_read(&calc_load_tasks); 2296 active = active > 0 ? active * FIXED_1 : 0; 2297 2298 avenrun[0] = calc_load_n(avenrun[0], EXP_1, active, n); 2299 avenrun[1] = calc_load_n(avenrun[1], EXP_5, active, n); 2300 avenrun[2] = calc_load_n(avenrun[2], EXP_15, active, n); 2301 2302 calc_load_update += n * LOAD_FREQ; 2312 2303 } 2313 2304 #else … … 2321 2312 } 2322 2313 2323 static void calc_global_nohz( unsigned long ticks)2314 static void calc_global_nohz(void) 2324 2315 { 2325 2316 } … … 2349 2340 long active; 2350 2341 2351 calc_global_nohz(ticks);2352 2353 2342 if (time_before(jiffies, calc_load_update + 10)) 2354 2343 return; … … 2362 2351 2363 2352 calc_load_update += LOAD_FREQ; 2353 2354 /* 2355 * Account one period with whatever state we found before 2356 * folding in the nohz state and ageing the entire idle period. 2357 * 2358 * This avoids loosing a sample when we go idle between 2359 * calc_load_account_active() (10 ticks ago) and now and thus 2360 * under-accounting. 2361 */ 2362 calc_global_nohz(); 2364 2363 } 2365 2364 … … 6337 6336 6338 6337 for_each_cpu(j, cpu_map) { 6339 struct sched_domain *sd = *per_cpu_ptr(sdd->sd, j); 6340 if (sd && (sd->flags & SD_OVERLAP)) 6341 free_sched_groups(sd->groups, 0); 6342 kfree(*per_cpu_ptr(sdd->sd, j)); 6343 kfree(*per_cpu_ptr(sdd->sg, j)); 6344 kfree(*per_cpu_ptr(sdd->sgp, j)); 6338 struct sched_domain *sd; 6339 6340 if (sdd->sd) { 6341 sd = *per_cpu_ptr(sdd->sd, j); 6342 if (sd && (sd->flags & SD_OVERLAP)) 6343 free_sched_groups(sd->groups, 0); 6344 kfree(*per_cpu_ptr(sdd->sd, j)); 6345 } 6346 6347 if (sdd->sg) 6348 kfree(*per_cpu_ptr(sdd->sg, j)); 6349 if (sdd->sgp) 6350 kfree(*per_cpu_ptr(sdd->sgp, j)); 6345 6351 } 6346 6352 free_percpu(sdd->sd); 6353 sdd->sd = NULL; 6347 6354 free_percpu(sdd->sg); 6355 sdd->sg = NULL; 6348 6356 free_percpu(sdd->sgp); 6357 sdd->sgp = NULL; 6349 6358 } 6350 6359 } -
src/linux/universal/linux-3.3/kernel/signal.c
r18778 r19208 1643 1643 BUG_ON(!tsk->ptrace && 1644 1644 (tsk->group_leader != tsk || !thread_group_empty(tsk))); 1645 1646 if (sig != SIGCHLD) { 1647 /* 1648 * This is only possible if parent == real_parent. 1649 * Check if it has changed security domain. 1650 */ 1651 if (tsk->parent_exec_id != tsk->parent->self_exec_id) 1652 sig = SIGCHLD; 1653 } 1645 1654 1646 1655 info.si_signo = sig; -
src/linux/universal/linux-3.3/kernel/trace/trace_output.c
r18778 r19208 651 651 u64 next_ts; 652 652 int ret; 653 /* trace_find_next_entry will reset ent_size */ 654 int ent_size = iter->ent_size; 653 655 struct trace_seq *s = &iter->seq; 654 656 struct trace_entry *entry = iter->ent, … … 658 660 unsigned long abs_usecs = ns2usecs(iter->ts - iter->tr->time_start); 659 661 unsigned long rel_usecs; 662 663 /* Restore the original ent_size */ 664 iter->ent_size = ent_size; 660 665 661 666 if (!next_entry) -
src/linux/universal/linux-3.3/net/mac80211/tx.c
r18778 r19208 1145 1145 if (!tx->sta && sdata->dev->ieee80211_ptr->use_4addr) 1146 1146 return TX_DROP; 1147 } else if (info->flags & IEEE80211_TX_CTL_INJECTED) { 1147 } else if (info->flags & IEEE80211_TX_CTL_INJECTED || 1148 tx->sdata->control_port_protocol == tx->skb->protocol) { 1148 1149 tx->sta = sta_info_get_bss(sdata, hdr->addr1); 1149 1150 } -
src/linux/universal/linux-3.3/net/wireless/nl80211.c
r18778 r19208 1294 1294 } 1295 1295 1296 if (!netif_running(netdev)) { 1297 result = -ENETDOWN; 1298 goto bad_res; 1299 } 1300 1296 1301 nla_for_each_nested(nl_txq_params, 1297 1302 info->attrs[NL80211_ATTR_WIPHY_TXQ_PARAMS], … … 6263 6268 .policy = nl80211_policy, 6264 6269 .flags = GENL_ADMIN_PERM, 6265 .internal_flags = NL80211_FLAG_NEED_NETDEV |6270 .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | 6266 6271 NL80211_FLAG_NEED_RTNL, 6267 6272 }, … … 6295 6300 .flags = GENL_ADMIN_PERM, 6296 6301 .doit = nl80211_addset_beacon, 6297 .internal_flags = NL80211_FLAG_NEED_NETDEV |6302 .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | 6298 6303 NL80211_FLAG_NEED_RTNL, 6299 6304 }, … … 6303 6308 .flags = GENL_ADMIN_PERM, 6304 6309 .doit = nl80211_addset_beacon, 6305 .internal_flags = NL80211_FLAG_NEED_NETDEV |6310 .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | 6306 6311 NL80211_FLAG_NEED_RTNL, 6307 6312 }, … … 6327 6332 .policy = nl80211_policy, 6328 6333 .flags = GENL_ADMIN_PERM, 6329 .internal_flags = NL80211_FLAG_NEED_NETDEV |6334 .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | 6330 6335 NL80211_FLAG_NEED_RTNL, 6331 6336 }, … … 6343 6348 .policy = nl80211_policy, 6344 6349 .flags = GENL_ADMIN_PERM, 6345 .internal_flags = NL80211_FLAG_NEED_NETDEV |6350 .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | 6346 6351 NL80211_FLAG_NEED_RTNL, 6347 6352 }, … … 6376 6381 .policy = nl80211_policy, 6377 6382 .flags = GENL_ADMIN_PERM, 6378 .internal_flags = NL80211_FLAG_NEED_NETDEV |6383 .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | 6379 6384 NL80211_FLAG_NEED_RTNL, 6380 6385 }, … … 6384 6389 .policy = nl80211_policy, 6385 6390 .flags = GENL_ADMIN_PERM, 6386 .internal_flags = NL80211_FLAG_NEED_NETDEV |6391 .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | 6387 6392 NL80211_FLAG_NEED_RTNL, 6388 6393 }, … … 6410 6415 .policy = nl80211_policy, 6411 6416 /* can be retrieved by unprivileged users */ 6412 .internal_flags = NL80211_FLAG_NEED_NETDEV |6417 .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | 6413 6418 NL80211_FLAG_NEED_RTNL, 6414 6419 }, … … 6543 6548 .policy = nl80211_policy, 6544 6549 .flags = GENL_ADMIN_PERM, 6545 .internal_flags = NL80211_FLAG_NEED_NETDEV |6550 .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | 6546 6551 NL80211_FLAG_NEED_RTNL, 6547 6552 }, … … 6551 6556 .policy = nl80211_policy, 6552 6557 .flags = GENL_ADMIN_PERM, 6553 .internal_flags = NL80211_FLAG_NEED_NETDEV |6558 .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | 6554 6559 NL80211_FLAG_NEED_RTNL, 6555 6560 }, … … 6559 6564 .policy = nl80211_policy, 6560 6565 .flags = GENL_ADMIN_PERM, 6561 .internal_flags = NL80211_FLAG_NEED_NETDEV |6566 .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | 6562 6567 NL80211_FLAG_NEED_RTNL, 6563 6568 }, … … 6719 6724 .policy = nl80211_policy, 6720 6725 .flags = GENL_ADMIN_PERM, 6721 .internal_flags = NL80211_FLAG_NEED_NETDEV |6726 .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | 6722 6727 NL80211_FLAG_NEED_RTNL, 6723 6728 }, -
src/linux/universal/linux-3.3/sound/pci/hda/patch_realtek.c
r19073 r19208 5403 5403 5404 5404 static const struct snd_pci_quirk alc269_fixup_tbl[] = { 5405 SND_PCI_QUIRK(0x1043, 0x1427, "Asus Zenbook UX31E", ALC269VB_FIXUP_DMIC), 5405 5406 SND_PCI_QUIRK(0x1043, 0x1a13, "Asus G73Jw", ALC269_FIXUP_ASUS_G73JW), 5406 5407 SND_PCI_QUIRK(0x1043, 0x16e3, "ASUS UX50", ALC269_FIXUP_STEREO_DMIC), -
src/linux/universal/linux-3.3/sound/soc/codecs/wm8994.c
r19019 r19208 930 930 } 931 931 932 static int aif1clk_ev(struct snd_soc_dapm_widget *w, 933 struct snd_kcontrol *kcontrol, int event) 934 { 935 struct snd_soc_codec *codec = w->codec; 936 struct wm8994 *control = codec->control_data; 937 int mask = WM8994_AIF1DAC1L_ENA | WM8994_AIF1DAC1R_ENA; 938 int dac; 939 int adc; 940 int val; 941 942 switch (control->type) { 943 case WM8994: 944 case WM8958: 945 mask |= WM8994_AIF1DAC2L_ENA | WM8994_AIF1DAC2R_ENA; 946 break; 947 default: 948 break; 949 } 950 951 switch (event) { 952 case SND_SOC_DAPM_PRE_PMU: 953 val = snd_soc_read(codec, WM8994_AIF1_CONTROL_1); 954 if ((val & WM8994_AIF1ADCL_SRC) && 955 (val & WM8994_AIF1ADCR_SRC)) 956 adc = WM8994_AIF1ADC1R_ENA | WM8994_AIF1ADC2R_ENA; 957 else if (!(val & WM8994_AIF1ADCL_SRC) && 958 !(val & WM8994_AIF1ADCR_SRC)) 959 adc = WM8994_AIF1ADC1L_ENA | WM8994_AIF1ADC2L_ENA; 960 else 961 adc = WM8994_AIF1ADC1R_ENA | WM8994_AIF1ADC2R_ENA | 962 WM8994_AIF1ADC1L_ENA | WM8994_AIF1ADC2L_ENA; 963 964 val = snd_soc_read(codec, WM8994_AIF1_CONTROL_2); 965 if ((val & WM8994_AIF1DACL_SRC) && 966 (val & WM8994_AIF1DACR_SRC)) 967 dac = WM8994_AIF1DAC1R_ENA | WM8994_AIF1DAC2R_ENA; 968 else if (!(val & WM8994_AIF1DACL_SRC) && 969 !(val & WM8994_AIF1DACR_SRC)) 970 dac = WM8994_AIF1DAC1L_ENA | WM8994_AIF1DAC2L_ENA; 971 else 972 dac = WM8994_AIF1DAC1R_ENA | WM8994_AIF1DAC2R_ENA | 973 WM8994_AIF1DAC1L_ENA | WM8994_AIF1DAC2L_ENA; 974 975 snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_4, 976 mask, adc); 977 snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_5, 978 mask, dac); 979 snd_soc_update_bits(codec, WM8994_CLOCKING_1, 980 WM8994_AIF1DSPCLK_ENA | 981 WM8994_SYSDSPCLK_ENA, 982 WM8994_AIF1DSPCLK_ENA | 983 WM8994_SYSDSPCLK_ENA); 984 snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_4, mask, 985 WM8994_AIF1ADC1R_ENA | 986 WM8994_AIF1ADC1L_ENA | 987 WM8994_AIF1ADC2R_ENA | 988 WM8994_AIF1ADC2L_ENA); 989 snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_5, mask, 990 WM8994_AIF1DAC1R_ENA | 991 WM8994_AIF1DAC1L_ENA | 992 WM8994_AIF1DAC2R_ENA | 993 WM8994_AIF1DAC2L_ENA); 994 break; 995 996 case SND_SOC_DAPM_PRE_PMD: 997 case SND_SOC_DAPM_POST_PMD: 998 snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_5, 999 mask, 0); 1000 snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_4, 1001 mask, 0); 1002 1003 val = snd_soc_read(codec, WM8994_CLOCKING_1); 1004 if (val & WM8994_AIF2DSPCLK_ENA) 1005 val = WM8994_SYSDSPCLK_ENA; 1006 else 1007 val = 0; 1008 snd_soc_update_bits(codec, WM8994_CLOCKING_1, 1009 WM8994_SYSDSPCLK_ENA | 1010 WM8994_AIF1DSPCLK_ENA, val); 1011 break; 1012 } 1013 1014 return 0; 1015 } 1016 1017 static int aif2clk_ev(struct snd_soc_dapm_widget *w, 1018 struct snd_kcontrol *kcontrol, int event) 1019 { 1020 struct snd_soc_codec *codec = w->codec; 1021 int dac; 1022 int adc; 1023 int val; 1024 1025 switch (event) { 1026 case SND_SOC_DAPM_PRE_PMU: 1027 val = snd_soc_read(codec, WM8994_AIF2_CONTROL_1); 1028 if ((val & WM8994_AIF2ADCL_SRC) && 1029 (val & WM8994_AIF2ADCR_SRC)) 1030 adc = WM8994_AIF2ADCR_ENA; 1031 else if (!(val & WM8994_AIF2ADCL_SRC) && 1032 !(val & WM8994_AIF2ADCR_SRC)) 1033 adc = WM8994_AIF2ADCL_ENA; 1034 else 1035 adc = WM8994_AIF2ADCL_ENA | WM8994_AIF2ADCR_ENA; 1036 1037 1038 val = snd_soc_read(codec, WM8994_AIF2_CONTROL_2); 1039 if ((val & WM8994_AIF2DACL_SRC) && 1040 (val & WM8994_AIF2DACR_SRC)) 1041 dac = WM8994_AIF2DACR_ENA; 1042 else if (!(val & WM8994_AIF2DACL_SRC) && 1043 !(val & WM8994_AIF2DACR_SRC)) 1044 dac = WM8994_AIF2DACL_ENA; 1045 else 1046 dac = WM8994_AIF2DACL_ENA | WM8994_AIF2DACR_ENA; 1047 1048 snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_4, 1049 WM8994_AIF2ADCL_ENA | 1050 WM8994_AIF2ADCR_ENA, adc); 1051 snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_5, 1052 WM8994_AIF2DACL_ENA | 1053 WM8994_AIF2DACR_ENA, dac); 1054 snd_soc_update_bits(codec, WM8994_CLOCKING_1, 1055 WM8994_AIF2DSPCLK_ENA | 1056 WM8994_SYSDSPCLK_ENA, 1057 WM8994_AIF2DSPCLK_ENA | 1058 WM8994_SYSDSPCLK_ENA); 1059 snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_4, 1060 WM8994_AIF2ADCL_ENA | 1061 WM8994_AIF2ADCR_ENA, 1062 WM8994_AIF2ADCL_ENA | 1063 WM8994_AIF2ADCR_ENA); 1064 snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_5, 1065 WM8994_AIF2DACL_ENA | 1066 WM8994_AIF2DACR_ENA, 1067 WM8994_AIF2DACL_ENA | 1068 WM8994_AIF2DACR_ENA); 1069 break; 1070 1071 case SND_SOC_DAPM_PRE_PMD: 1072 case SND_SOC_DAPM_POST_PMD: 1073 snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_5, 1074 WM8994_AIF2DACL_ENA | 1075 WM8994_AIF2DACR_ENA, 0); 1076 snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_5, 1077 WM8994_AIF2ADCL_ENA | 1078 WM8994_AIF2ADCR_ENA, 0); 1079 1080 val = snd_soc_read(codec, WM8994_CLOCKING_1); 1081 if (val & WM8994_AIF1DSPCLK_ENA) 1082 val = WM8994_SYSDSPCLK_ENA; 1083 else 1084 val = 0; 1085 snd_soc_update_bits(codec, WM8994_CLOCKING_1, 1086 WM8994_SYSDSPCLK_ENA | 1087 WM8994_AIF2DSPCLK_ENA, val); 1088 break; 1089 } 1090 1091 return 0; 1092 } 1093 1094 static int aif1clk_late_ev(struct snd_soc_dapm_widget *w, 1095 struct snd_kcontrol *kcontrol, int event) 1096 { 1097 struct snd_soc_codec *codec = w->codec; 1098 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); 1099 1100 switch (event) { 1101 case SND_SOC_DAPM_PRE_PMU: 1102 wm8994->aif1clk_enable = 1; 1103 break; 1104 case SND_SOC_DAPM_POST_PMD: 1105 wm8994->aif1clk_disable = 1; 1106 break; 1107 } 1108 1109 return 0; 1110 } 1111 1112 static int aif2clk_late_ev(struct snd_soc_dapm_widget *w, 1113 struct snd_kcontrol *kcontrol, int event) 1114 { 1115 struct snd_soc_codec *codec = w->codec; 1116 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); 1117 1118 switch (event) { 1119 case SND_SOC_DAPM_PRE_PMU: 1120 wm8994->aif2clk_enable = 1; 1121 break; 1122 case SND_SOC_DAPM_POST_PMD: 1123 wm8994->aif2clk_disable = 1; 1124 break; 1125 } 1126 1127 return 0; 1128 } 1129 932 1130 static int late_enable_ev(struct snd_soc_dapm_widget *w, 933 1131 struct snd_kcontrol *kcontrol, int event) … … 939 1137 case SND_SOC_DAPM_PRE_PMU: 940 1138 if (wm8994->aif1clk_enable) { 1139 aif1clk_ev(w, kcontrol, event); 941 1140 snd_soc_update_bits(codec, WM8994_AIF1_CLOCKING_1, 942 1141 WM8994_AIF1CLK_ENA_MASK, … … 945 1144 } 946 1145 if (wm8994->aif2clk_enable) { 1146 aif2clk_ev(w, kcontrol, event); 947 1147 snd_soc_update_bits(codec, WM8994_AIF2_CLOCKING_1, 948 1148 WM8994_AIF2CLK_ENA_MASK, … … 970 1170 snd_soc_update_bits(codec, WM8994_AIF1_CLOCKING_1, 971 1171 WM8994_AIF1CLK_ENA_MASK, 0); 1172 aif1clk_ev(w, kcontrol, event); 972 1173 wm8994->aif1clk_disable = 0; 973 1174 } … … 975 1176 snd_soc_update_bits(codec, WM8994_AIF2_CLOCKING_1, 976 1177 WM8994_AIF2CLK_ENA_MASK, 0); 1178 aif2clk_ev(w, kcontrol, event); 977 1179 wm8994->aif2clk_disable = 0; 978 1180 } 979 break;980 }981 982 return 0;983 }984 985 static int aif1clk_ev(struct snd_soc_dapm_widget *w,986 struct snd_kcontrol *kcontrol, int event)987 {988 struct snd_soc_codec *codec = w->codec;989 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);990 991 switch (event) {992 case SND_SOC_DAPM_PRE_PMU:993 wm8994->aif1clk_enable = 1;994 break;995 case SND_SOC_DAPM_POST_PMD:996 wm8994->aif1clk_disable = 1;997 break;998 }999 1000 return 0;1001 }1002 1003 static int aif2clk_ev(struct snd_soc_dapm_widget *w,1004 struct snd_kcontrol *kcontrol, int event)1005 {1006 struct snd_soc_codec *codec = w->codec;1007 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);1008 1009 switch (event) {1010 case SND_SOC_DAPM_PRE_PMU:1011 wm8994->aif2clk_enable = 1;1012 break;1013 case SND_SOC_DAPM_POST_PMD:1014 wm8994->aif2clk_disable = 1;1015 1181 break; 1016 1182 } … … 1315 1481 1316 1482 static const struct snd_soc_dapm_widget wm8994_lateclk_revd_widgets[] = { 1317 SND_SOC_DAPM_SUPPLY("AIF1CLK", SND_SOC_NOPM, 0, 0, aif1clk_ ev,1483 SND_SOC_DAPM_SUPPLY("AIF1CLK", SND_SOC_NOPM, 0, 0, aif1clk_late_ev, 1318 1484 SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD), 1319 SND_SOC_DAPM_SUPPLY("AIF2CLK", SND_SOC_NOPM, 0, 0, aif2clk_ ev,1485 SND_SOC_DAPM_SUPPLY("AIF2CLK", SND_SOC_NOPM, 0, 0, aif2clk_late_ev, 1320 1486 SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD), 1321 1487 … … 1346 1512 1347 1513 static const struct snd_soc_dapm_widget wm8994_lateclk_widgets[] = { 1348 SND_SOC_DAPM_SUPPLY("AIF1CLK", WM8994_AIF1_CLOCKING_1, 0, 0, NULL, 0), 1349 SND_SOC_DAPM_SUPPLY("AIF2CLK", WM8994_AIF2_CLOCKING_1, 0, 0, NULL, 0), 1514 SND_SOC_DAPM_SUPPLY("AIF1CLK", WM8994_AIF1_CLOCKING_1, 0, 0, aif1clk_ev, 1515 SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_PRE_PMD), 1516 SND_SOC_DAPM_SUPPLY("AIF2CLK", WM8994_AIF2_CLOCKING_1, 0, 0, aif2clk_ev, 1517 SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_PRE_PMD), 1350 1518 SND_SOC_DAPM_PGA("Direct Voice", SND_SOC_NOPM, 0, 0, NULL, 0), 1351 1519 SND_SOC_DAPM_MIXER("SPKL", WM8994_POWER_MANAGEMENT_3, 8, 0, … … 1400 1568 SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD), 1401 1569 1402 SND_SOC_DAPM_SUPPLY("DSP1CLK", WM8994_CLOCKING_1, 3, 0, NULL, 0),1403 SND_SOC_DAPM_SUPPLY("DSP2CLK", WM8994_CLOCKING_1, 2, 0, NULL, 0),1404 SND_SOC_DAPM_SUPPLY("DSPINTCLK", WM8994_CLOCKING_1, 1, 0, NULL, 0),1570 SND_SOC_DAPM_SUPPLY("DSP1CLK", SND_SOC_NOPM, 3, 0, NULL, 0), 1571 SND_SOC_DAPM_SUPPLY("DSP2CLK", SND_SOC_NOPM, 2, 0, NULL, 0), 1572 SND_SOC_DAPM_SUPPLY("DSPINTCLK", SND_SOC_NOPM, 1, 0, NULL, 0), 1405 1573 1406 1574 SND_SOC_DAPM_AIF_OUT("AIF1ADC1L", NULL, 1407 0, WM8994_POWER_MANAGEMENT_4, 9, 0),1575 0, SND_SOC_NOPM, 9, 0), 1408 1576 SND_SOC_DAPM_AIF_OUT("AIF1ADC1R", NULL, 1409 0, WM8994_POWER_MANAGEMENT_4, 8, 0),1577 0, SND_SOC_NOPM, 8, 0), 1410 1578 SND_SOC_DAPM_AIF_IN_E("AIF1DAC1L", NULL, 0, 1411 WM8994_POWER_MANAGEMENT_5, 9, 0, wm8958_aif_ev,1579 SND_SOC_NOPM, 9, 0, wm8958_aif_ev, 1412 1580 SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD), 1413 1581 SND_SOC_DAPM_AIF_IN_E("AIF1DAC1R", NULL, 0, 1414 WM8994_POWER_MANAGEMENT_5, 8, 0, wm8958_aif_ev,1582 SND_SOC_NOPM, 8, 0, wm8958_aif_ev, 1415 1583 SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD), 1416 1584 1417 1585 SND_SOC_DAPM_AIF_OUT("AIF1ADC2L", NULL, 1418 0, WM8994_POWER_MANAGEMENT_4, 11, 0),1586 0, SND_SOC_NOPM, 11, 0), 1419 1587 SND_SOC_DAPM_AIF_OUT("AIF1ADC2R", NULL, 1420 0, WM8994_POWER_MANAGEMENT_4, 10, 0),1588 0, SND_SOC_NOPM, 10, 0), 1421 1589 SND_SOC_DAPM_AIF_IN_E("AIF1DAC2L", NULL, 0, 1422 WM8994_POWER_MANAGEMENT_5, 11, 0, wm8958_aif_ev,1590 SND_SOC_NOPM, 11, 0, wm8958_aif_ev, 1423 1591 SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD), 1424 1592 SND_SOC_DAPM_AIF_IN_E("AIF1DAC2R", NULL, 0, 1425 WM8994_POWER_MANAGEMENT_5, 10, 0, wm8958_aif_ev,1593 SND_SOC_NOPM, 10, 0, wm8958_aif_ev, 1426 1594 SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD), 1427 1595 … … 1450 1618 1451 1619 SND_SOC_DAPM_AIF_OUT("AIF2ADCL", NULL, 0, 1452 WM8994_POWER_MANAGEMENT_4, 13, 0),1620 SND_SOC_NOPM, 13, 0), 1453 1621 SND_SOC_DAPM_AIF_OUT("AIF2ADCR", NULL, 0, 1454 WM8994_POWER_MANAGEMENT_4, 12, 0),1622 SND_SOC_NOPM, 12, 0), 1455 1623 SND_SOC_DAPM_AIF_IN_E("AIF2DACL", NULL, 0, 1456 WM8994_POWER_MANAGEMENT_5, 13, 0, wm8958_aif_ev,1624 SND_SOC_NOPM, 13, 0, wm8958_aif_ev, 1457 1625 SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD), 1458 1626 SND_SOC_DAPM_AIF_IN_E("AIF2DACR", NULL, 0, 1459 WM8994_POWER_MANAGEMENT_5, 12, 0, wm8958_aif_ev,1627 SND_SOC_NOPM, 12, 0, wm8958_aif_ev, 1460 1628 SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD), 1461 1629 -
src/linux/universal/linux-3.3/sound/soc/soc-dapm.c
r18778 r19208 71 71 [snd_soc_dapm_hp] = 10, 72 72 [snd_soc_dapm_spk] = 10, 73 [snd_soc_dapm_line] = 10, 73 74 [snd_soc_dapm_post] = 11, 74 75 }; … … 79 80 [snd_soc_dapm_hp] = 2, 80 81 [snd_soc_dapm_spk] = 2, 82 [snd_soc_dapm_line] = 2, 81 83 [snd_soc_dapm_out_drv] = 2, 82 84 [snd_soc_dapm_pga] = 4,
Note: See TracChangeset
for help on using the changeset viewer.
