diff options
66 files changed, 388 insertions, 225 deletions
| @@ -73,6 +73,7 @@ Juha Yrjola <juha.yrjola@nokia.com> | |||
| 73 | Juha Yrjola <juha.yrjola@solidboot.com> | 73 | Juha Yrjola <juha.yrjola@solidboot.com> |
| 74 | Kay Sievers <kay.sievers@vrfy.org> | 74 | Kay Sievers <kay.sievers@vrfy.org> |
| 75 | Kenneth W Chen <kenneth.w.chen@intel.com> | 75 | Kenneth W Chen <kenneth.w.chen@intel.com> |
| 76 | Konstantin Khlebnikov <koct9i@gmail.com> <k.khlebnikov@samsung.com> | ||
| 76 | Koushik <raghavendra.koushik@neterion.com> | 77 | Koushik <raghavendra.koushik@neterion.com> |
| 77 | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 78 | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> |
| 78 | Leonid I Ananiev <leonid.i.ananiev@intel.com> | 79 | Leonid I Ananiev <leonid.i.ananiev@intel.com> |
diff --git a/MAINTAINERS b/MAINTAINERS index aaa039dee999..d66a97dd3a12 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
| @@ -4953,6 +4953,16 @@ F: Documentation/input/multi-touch-protocol.txt | |||
| 4953 | F: drivers/input/input-mt.c | 4953 | F: drivers/input/input-mt.c |
| 4954 | K: \b(ABS|SYN)_MT_ | 4954 | K: \b(ABS|SYN)_MT_ |
| 4955 | 4955 | ||
| 4956 | INTEL ASoC BDW/HSW DRIVERS | ||
| 4957 | M: Jie Yang <yang.jie@linux.intel.com> | ||
| 4958 | L: alsa-devel@alsa-project.org | ||
| 4959 | S: Supported | ||
| 4960 | F: sound/soc/intel/sst-haswell* | ||
| 4961 | F: sound/soc/intel/sst-dsp* | ||
| 4962 | F: sound/soc/intel/sst-firmware.c | ||
| 4963 | F: sound/soc/intel/broadwell.c | ||
| 4964 | F: sound/soc/intel/haswell.c | ||
| 4965 | |||
| 4956 | INTEL C600 SERIES SAS CONTROLLER DRIVER | 4966 | INTEL C600 SERIES SAS CONTROLLER DRIVER |
| 4957 | M: Intel SCU Linux support <intel-linux-scu@intel.com> | 4967 | M: Intel SCU Linux support <intel-linux-scu@intel.com> |
| 4958 | M: Artur Paszkiewicz <artur.paszkiewicz@intel.com> | 4968 | M: Artur Paszkiewicz <artur.paszkiewicz@intel.com> |
| @@ -9241,7 +9251,6 @@ F: drivers/net/ethernet/dlink/sundance.c | |||
| 9241 | 9251 | ||
| 9242 | SUPERH | 9252 | SUPERH |
| 9243 | L: linux-sh@vger.kernel.org | 9253 | L: linux-sh@vger.kernel.org |
| 9244 | W: http://www.linux-sh.org | ||
| 9245 | Q: http://patchwork.kernel.org/project/linux-sh/list/ | 9254 | Q: http://patchwork.kernel.org/project/linux-sh/list/ |
| 9246 | S: Orphan | 9255 | S: Orphan |
| 9247 | F: Documentation/sh/ | 9256 | F: Documentation/sh/ |
diff --git a/arch/arm/boot/dts/exynos4.dtsi b/arch/arm/boot/dts/exynos4.dtsi index b8168f1f8139..24ff27049ce0 100644 --- a/arch/arm/boot/dts/exynos4.dtsi +++ b/arch/arm/boot/dts/exynos4.dtsi | |||
| @@ -368,7 +368,7 @@ | |||
| 368 | }; | 368 | }; |
| 369 | 369 | ||
| 370 | i2s1: i2s@13960000 { | 370 | i2s1: i2s@13960000 { |
| 371 | compatible = "samsung,s5pv210-i2s"; | 371 | compatible = "samsung,s3c6410-i2s"; |
| 372 | reg = <0x13960000 0x100>; | 372 | reg = <0x13960000 0x100>; |
| 373 | clocks = <&clock CLK_I2S1>; | 373 | clocks = <&clock CLK_I2S1>; |
| 374 | clock-names = "iis"; | 374 | clock-names = "iis"; |
| @@ -378,7 +378,7 @@ | |||
| 378 | }; | 378 | }; |
| 379 | 379 | ||
| 380 | i2s2: i2s@13970000 { | 380 | i2s2: i2s@13970000 { |
| 381 | compatible = "samsung,s5pv210-i2s"; | 381 | compatible = "samsung,s3c6410-i2s"; |
| 382 | reg = <0x13970000 0x100>; | 382 | reg = <0x13970000 0x100>; |
| 383 | clocks = <&clock CLK_I2S2>; | 383 | clocks = <&clock CLK_I2S2>; |
| 384 | clock-names = "iis"; | 384 | clock-names = "iis"; |
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 3289969ee423..843713c05b79 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig | |||
| @@ -2656,27 +2656,21 @@ config TRAD_SIGNALS | |||
| 2656 | bool | 2656 | bool |
| 2657 | 2657 | ||
| 2658 | config MIPS32_COMPAT | 2658 | config MIPS32_COMPAT |
| 2659 | bool "Kernel support for Linux/MIPS 32-bit binary compatibility" | 2659 | bool |
| 2660 | depends on 64BIT | ||
| 2661 | help | ||
| 2662 | Select this option if you want Linux/MIPS 32-bit binary | ||
| 2663 | compatibility. Since all software available for Linux/MIPS is | ||
| 2664 | currently 32-bit you should say Y here. | ||
| 2665 | 2660 | ||
| 2666 | config COMPAT | 2661 | config COMPAT |
| 2667 | bool | 2662 | bool |
| 2668 | depends on MIPS32_COMPAT | ||
| 2669 | select ARCH_WANT_OLD_COMPAT_IPC | ||
| 2670 | default y | ||
| 2671 | 2663 | ||
| 2672 | config SYSVIPC_COMPAT | 2664 | config SYSVIPC_COMPAT |
| 2673 | bool | 2665 | bool |
| 2674 | depends on COMPAT && SYSVIPC | ||
| 2675 | default y | ||
| 2676 | 2666 | ||
| 2677 | config MIPS32_O32 | 2667 | config MIPS32_O32 |
| 2678 | bool "Kernel support for o32 binaries" | 2668 | bool "Kernel support for o32 binaries" |
| 2679 | depends on MIPS32_COMPAT | 2669 | depends on 64BIT |
| 2670 | select ARCH_WANT_OLD_COMPAT_IPC | ||
| 2671 | select COMPAT | ||
| 2672 | select MIPS32_COMPAT | ||
| 2673 | select SYSVIPC_COMPAT if SYSVIPC | ||
| 2680 | help | 2674 | help |
| 2681 | Select this option if you want to run o32 binaries. These are pure | 2675 | Select this option if you want to run o32 binaries. These are pure |
| 2682 | 32-bit binaries as used by the 32-bit Linux/MIPS port. Most of | 2676 | 32-bit binaries as used by the 32-bit Linux/MIPS port. Most of |
| @@ -2686,7 +2680,10 @@ config MIPS32_O32 | |||
| 2686 | 2680 | ||
| 2687 | config MIPS32_N32 | 2681 | config MIPS32_N32 |
| 2688 | bool "Kernel support for n32 binaries" | 2682 | bool "Kernel support for n32 binaries" |
| 2689 | depends on MIPS32_COMPAT | 2683 | depends on 64BIT |
| 2684 | select COMPAT | ||
| 2685 | select MIPS32_COMPAT | ||
| 2686 | select SYSVIPC_COMPAT if SYSVIPC | ||
| 2690 | help | 2687 | help |
| 2691 | Select this option if you want to run n32 binaries. These are | 2688 | Select this option if you want to run n32 binaries. These are |
| 2692 | 64-bit binaries using 32-bit quantities for addressing and certain | 2689 | 64-bit binaries using 32-bit quantities for addressing and certain |
diff --git a/arch/mips/boot/elf2ecoff.c b/arch/mips/boot/elf2ecoff.c index 8585078ae50e..2a4c52e27f41 100644 --- a/arch/mips/boot/elf2ecoff.c +++ b/arch/mips/boot/elf2ecoff.c | |||
| @@ -49,7 +49,8 @@ | |||
| 49 | /* | 49 | /* |
| 50 | * Some extra ELF definitions | 50 | * Some extra ELF definitions |
| 51 | */ | 51 | */ |
| 52 | #define PT_MIPS_REGINFO 0x70000000 /* Register usage information */ | 52 | #define PT_MIPS_REGINFO 0x70000000 /* Register usage information */ |
| 53 | #define PT_MIPS_ABIFLAGS 0x70000003 /* Records ABI related flags */ | ||
| 53 | 54 | ||
| 54 | /* -------------------------------------------------------------------- */ | 55 | /* -------------------------------------------------------------------- */ |
| 55 | 56 | ||
| @@ -349,39 +350,46 @@ int main(int argc, char *argv[]) | |||
| 349 | 350 | ||
| 350 | for (i = 0; i < ex.e_phnum; i++) { | 351 | for (i = 0; i < ex.e_phnum; i++) { |
| 351 | /* Section types we can ignore... */ | 352 | /* Section types we can ignore... */ |
| 352 | if (ph[i].p_type == PT_NULL || ph[i].p_type == PT_NOTE || | 353 | switch (ph[i].p_type) { |
| 353 | ph[i].p_type == PT_PHDR | 354 | case PT_NULL: |
| 354 | || ph[i].p_type == PT_MIPS_REGINFO) | 355 | case PT_NOTE: |
| 356 | case PT_PHDR: | ||
| 357 | case PT_MIPS_REGINFO: | ||
| 358 | case PT_MIPS_ABIFLAGS: | ||
| 355 | continue; | 359 | continue; |
| 356 | /* Section types we can't handle... */ | ||
| 357 | else if (ph[i].p_type != PT_LOAD) { | ||
| 358 | fprintf(stderr, | ||
| 359 | "Program header %d type %d can't be converted.\n", | ||
| 360 | ex.e_phnum, ph[i].p_type); | ||
| 361 | exit(1); | ||
| 362 | } | ||
| 363 | /* Writable (data) segment? */ | ||
| 364 | if (ph[i].p_flags & PF_W) { | ||
| 365 | struct sect ndata, nbss; | ||
| 366 | 360 | ||
| 367 | ndata.vaddr = ph[i].p_vaddr; | 361 | case PT_LOAD: |
| 368 | ndata.len = ph[i].p_filesz; | 362 | /* Writable (data) segment? */ |
| 369 | nbss.vaddr = ph[i].p_vaddr + ph[i].p_filesz; | 363 | if (ph[i].p_flags & PF_W) { |
| 370 | nbss.len = ph[i].p_memsz - ph[i].p_filesz; | 364 | struct sect ndata, nbss; |
| 365 | |||
| 366 | ndata.vaddr = ph[i].p_vaddr; | ||
| 367 | ndata.len = ph[i].p_filesz; | ||
| 368 | nbss.vaddr = ph[i].p_vaddr + ph[i].p_filesz; | ||
| 369 | nbss.len = ph[i].p_memsz - ph[i].p_filesz; | ||
| 371 | 370 | ||
| 372 | combine(&data, &ndata, 0); | 371 | combine(&data, &ndata, 0); |
| 373 | combine(&bss, &nbss, 1); | 372 | combine(&bss, &nbss, 1); |
| 374 | } else { | 373 | } else { |
| 375 | struct sect ntxt; | 374 | struct sect ntxt; |
| 376 | 375 | ||
| 377 | ntxt.vaddr = ph[i].p_vaddr; | 376 | ntxt.vaddr = ph[i].p_vaddr; |
| 378 | ntxt.len = ph[i].p_filesz; | 377 | ntxt.len = ph[i].p_filesz; |
| 379 | 378 | ||
| 380 | combine(&text, &ntxt, 0); | 379 | combine(&text, &ntxt, 0); |
| 380 | } | ||
| 381 | /* Remember the lowest segment start address. */ | ||
| 382 | if (ph[i].p_vaddr < cur_vma) | ||
| 383 | cur_vma = ph[i].p_vaddr; | ||
| 384 | break; | ||
| 385 | |||
| 386 | default: | ||
| 387 | /* Section types we can't handle... */ | ||
| 388 | fprintf(stderr, | ||
| 389 | "Program header %d type %d can't be converted.\n", | ||
| 390 | ex.e_phnum, ph[i].p_type); | ||
| 391 | exit(1); | ||
| 381 | } | 392 | } |
| 382 | /* Remember the lowest segment start address. */ | ||
| 383 | if (ph[i].p_vaddr < cur_vma) | ||
| 384 | cur_vma = ph[i].p_vaddr; | ||
| 385 | } | 393 | } |
| 386 | 394 | ||
| 387 | /* Sections must be in order to be converted... */ | 395 | /* Sections must be in order to be converted... */ |
diff --git a/arch/mips/cavium-octeon/smp.c b/arch/mips/cavium-octeon/smp.c index ecd903dd1c45..8b1eeffa12ed 100644 --- a/arch/mips/cavium-octeon/smp.c +++ b/arch/mips/cavium-octeon/smp.c | |||
| @@ -240,9 +240,7 @@ static int octeon_cpu_disable(void) | |||
| 240 | 240 | ||
| 241 | set_cpu_online(cpu, false); | 241 | set_cpu_online(cpu, false); |
| 242 | cpu_clear(cpu, cpu_callin_map); | 242 | cpu_clear(cpu, cpu_callin_map); |
| 243 | local_irq_disable(); | ||
| 244 | octeon_fixup_irqs(); | 243 | octeon_fixup_irqs(); |
| 245 | local_irq_enable(); | ||
| 246 | 244 | ||
| 247 | flush_cache_all(); | 245 | flush_cache_all(); |
| 248 | local_flush_tlb_all(); | 246 | local_flush_tlb_all(); |
diff --git a/arch/mips/configs/malta_defconfig b/arch/mips/configs/malta_defconfig index f57b96dcf7df..61a4460d67d3 100644 --- a/arch/mips/configs/malta_defconfig +++ b/arch/mips/configs/malta_defconfig | |||
| @@ -132,7 +132,6 @@ CONFIG_IP_NF_MATCH_ECN=m | |||
| 132 | CONFIG_IP_NF_MATCH_TTL=m | 132 | CONFIG_IP_NF_MATCH_TTL=m |
| 133 | CONFIG_IP_NF_FILTER=m | 133 | CONFIG_IP_NF_FILTER=m |
| 134 | CONFIG_IP_NF_TARGET_REJECT=m | 134 | CONFIG_IP_NF_TARGET_REJECT=m |
| 135 | CONFIG_IP_NF_TARGET_ULOG=m | ||
| 136 | CONFIG_IP_NF_MANGLE=m | 135 | CONFIG_IP_NF_MANGLE=m |
| 137 | CONFIG_IP_NF_TARGET_CLUSTERIP=m | 136 | CONFIG_IP_NF_TARGET_CLUSTERIP=m |
| 138 | CONFIG_IP_NF_TARGET_ECN=m | 137 | CONFIG_IP_NF_TARGET_ECN=m |
| @@ -175,7 +174,6 @@ CONFIG_BRIDGE_EBT_MARK_T=m | |||
| 175 | CONFIG_BRIDGE_EBT_REDIRECT=m | 174 | CONFIG_BRIDGE_EBT_REDIRECT=m |
| 176 | CONFIG_BRIDGE_EBT_SNAT=m | 175 | CONFIG_BRIDGE_EBT_SNAT=m |
| 177 | CONFIG_BRIDGE_EBT_LOG=m | 176 | CONFIG_BRIDGE_EBT_LOG=m |
| 178 | CONFIG_BRIDGE_EBT_ULOG=m | ||
| 179 | CONFIG_BRIDGE_EBT_NFLOG=m | 177 | CONFIG_BRIDGE_EBT_NFLOG=m |
| 180 | CONFIG_IP_SCTP=m | 178 | CONFIG_IP_SCTP=m |
| 181 | CONFIG_BRIDGE=m | 179 | CONFIG_BRIDGE=m |
| @@ -220,8 +218,6 @@ CONFIG_NET_ACT_SKBEDIT=m | |||
| 220 | CONFIG_NET_CLS_IND=y | 218 | CONFIG_NET_CLS_IND=y |
| 221 | CONFIG_CFG80211=m | 219 | CONFIG_CFG80211=m |
| 222 | CONFIG_MAC80211=m | 220 | CONFIG_MAC80211=m |
| 223 | CONFIG_MAC80211_RC_PID=y | ||
| 224 | CONFIG_MAC80211_RC_DEFAULT_PID=y | ||
| 225 | CONFIG_MAC80211_MESH=y | 221 | CONFIG_MAC80211_MESH=y |
| 226 | CONFIG_RFKILL=m | 222 | CONFIG_RFKILL=m |
| 227 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | 223 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" |
| @@ -248,19 +244,13 @@ CONFIG_ATA_OVER_ETH=m | |||
| 248 | CONFIG_IDE=y | 244 | CONFIG_IDE=y |
| 249 | CONFIG_BLK_DEV_IDECD=y | 245 | CONFIG_BLK_DEV_IDECD=y |
| 250 | CONFIG_IDE_GENERIC=y | 246 | CONFIG_IDE_GENERIC=y |
| 251 | CONFIG_BLK_DEV_GENERIC=y | ||
| 252 | CONFIG_BLK_DEV_PIIX=y | ||
| 253 | CONFIG_BLK_DEV_IT8213=m | ||
| 254 | CONFIG_BLK_DEV_TC86C001=m | ||
| 255 | CONFIG_RAID_ATTRS=m | 247 | CONFIG_RAID_ATTRS=m |
| 256 | CONFIG_SCSI=m | 248 | CONFIG_BLK_DEV_SD=y |
| 257 | CONFIG_BLK_DEV_SD=m | ||
| 258 | CONFIG_CHR_DEV_ST=m | 249 | CONFIG_CHR_DEV_ST=m |
| 259 | CONFIG_CHR_DEV_OSST=m | 250 | CONFIG_CHR_DEV_OSST=m |
| 260 | CONFIG_BLK_DEV_SR=m | 251 | CONFIG_BLK_DEV_SR=m |
| 261 | CONFIG_BLK_DEV_SR_VENDOR=y | 252 | CONFIG_BLK_DEV_SR_VENDOR=y |
| 262 | CONFIG_CHR_DEV_SG=m | 253 | CONFIG_CHR_DEV_SG=m |
| 263 | CONFIG_SCSI_MULTI_LUN=y | ||
| 264 | CONFIG_SCSI_CONSTANTS=y | 254 | CONFIG_SCSI_CONSTANTS=y |
| 265 | CONFIG_SCSI_LOGGING=y | 255 | CONFIG_SCSI_LOGGING=y |
| 266 | CONFIG_SCSI_SCAN_ASYNC=y | 256 | CONFIG_SCSI_SCAN_ASYNC=y |
| @@ -273,6 +263,8 @@ CONFIG_SCSI_AACRAID=m | |||
| 273 | CONFIG_SCSI_AIC7XXX=m | 263 | CONFIG_SCSI_AIC7XXX=m |
| 274 | CONFIG_AIC7XXX_RESET_DELAY_MS=15000 | 264 | CONFIG_AIC7XXX_RESET_DELAY_MS=15000 |
| 275 | # CONFIG_AIC7XXX_DEBUG_ENABLE is not set | 265 | # CONFIG_AIC7XXX_DEBUG_ENABLE is not set |
| 266 | CONFIG_ATA=y | ||
| 267 | CONFIG_ATA_PIIX=y | ||
| 276 | CONFIG_MD=y | 268 | CONFIG_MD=y |
| 277 | CONFIG_BLK_DEV_MD=m | 269 | CONFIG_BLK_DEV_MD=m |
| 278 | CONFIG_MD_LINEAR=m | 270 | CONFIG_MD_LINEAR=m |
| @@ -340,6 +332,7 @@ CONFIG_UIO=m | |||
| 340 | CONFIG_UIO_CIF=m | 332 | CONFIG_UIO_CIF=m |
| 341 | CONFIG_EXT2_FS=y | 333 | CONFIG_EXT2_FS=y |
| 342 | CONFIG_EXT3_FS=y | 334 | CONFIG_EXT3_FS=y |
| 335 | CONFIG_EXT4_FS=y | ||
| 343 | CONFIG_REISERFS_FS=m | 336 | CONFIG_REISERFS_FS=m |
| 344 | CONFIG_REISERFS_PROC_INFO=y | 337 | CONFIG_REISERFS_PROC_INFO=y |
| 345 | CONFIG_REISERFS_FS_XATTR=y | 338 | CONFIG_REISERFS_FS_XATTR=y |
| @@ -441,4 +434,3 @@ CONFIG_CRYPTO_SERPENT=m | |||
| 441 | CONFIG_CRYPTO_TEA=m | 434 | CONFIG_CRYPTO_TEA=m |
| 442 | CONFIG_CRYPTO_TWOFISH=m | 435 | CONFIG_CRYPTO_TWOFISH=m |
| 443 | # CONFIG_CRYPTO_ANSI_CPRNG is not set | 436 | # CONFIG_CRYPTO_ANSI_CPRNG is not set |
| 444 | CONFIG_CRC16=m | ||
diff --git a/arch/mips/include/asm/fpu.h b/arch/mips/include/asm/fpu.h index 994d21939676..affebb78f5d6 100644 --- a/arch/mips/include/asm/fpu.h +++ b/arch/mips/include/asm/fpu.h | |||
| @@ -64,7 +64,7 @@ static inline int __enable_fpu(enum fpu_mode mode) | |||
| 64 | return SIGFPE; | 64 | return SIGFPE; |
| 65 | 65 | ||
| 66 | /* set FRE */ | 66 | /* set FRE */ |
| 67 | write_c0_config5(read_c0_config5() | MIPS_CONF5_FRE); | 67 | set_c0_config5(MIPS_CONF5_FRE); |
| 68 | goto fr_common; | 68 | goto fr_common; |
| 69 | 69 | ||
| 70 | case FPU_64BIT: | 70 | case FPU_64BIT: |
| @@ -74,8 +74,10 @@ static inline int __enable_fpu(enum fpu_mode mode) | |||
| 74 | #endif | 74 | #endif |
| 75 | /* fall through */ | 75 | /* fall through */ |
| 76 | case FPU_32BIT: | 76 | case FPU_32BIT: |
| 77 | /* clear FRE */ | 77 | if (cpu_has_fre) { |
| 78 | write_c0_config5(read_c0_config5() & ~MIPS_CONF5_FRE); | 78 | /* clear FRE */ |
| 79 | clear_c0_config5(MIPS_CONF5_FRE); | ||
| 80 | } | ||
| 79 | fr_common: | 81 | fr_common: |
| 80 | /* set CU1 & change FR appropriately */ | 82 | /* set CU1 & change FR appropriately */ |
| 81 | fr = (int)mode & FPU_FR_MASK; | 83 | fr = (int)mode & FPU_FR_MASK; |
| @@ -182,25 +184,32 @@ static inline int init_fpu(void) | |||
| 182 | int ret = 0; | 184 | int ret = 0; |
| 183 | 185 | ||
| 184 | if (cpu_has_fpu) { | 186 | if (cpu_has_fpu) { |
| 187 | unsigned int config5; | ||
| 188 | |||
| 185 | ret = __own_fpu(); | 189 | ret = __own_fpu(); |
| 186 | if (!ret) { | 190 | if (ret) |
| 187 | unsigned int config5 = read_c0_config5(); | 191 | return ret; |
| 188 | |||
| 189 | /* | ||
| 190 | * Ensure FRE is clear whilst running _init_fpu, since | ||
| 191 | * single precision FP instructions are used. If FRE | ||
| 192 | * was set then we'll just end up initialising all 32 | ||
| 193 | * 64b registers. | ||
| 194 | */ | ||
| 195 | write_c0_config5(config5 & ~MIPS_CONF5_FRE); | ||
| 196 | enable_fpu_hazard(); | ||
| 197 | 192 | ||
| 193 | if (!cpu_has_fre) { | ||
| 198 | _init_fpu(); | 194 | _init_fpu(); |
| 199 | 195 | ||
| 200 | /* Restore FRE */ | 196 | return 0; |
| 201 | write_c0_config5(config5); | ||
| 202 | enable_fpu_hazard(); | ||
| 203 | } | 197 | } |
| 198 | |||
| 199 | /* | ||
| 200 | * Ensure FRE is clear whilst running _init_fpu, since | ||
| 201 | * single precision FP instructions are used. If FRE | ||
| 202 | * was set then we'll just end up initialising all 32 | ||
| 203 | * 64b registers. | ||
| 204 | */ | ||
| 205 | config5 = clear_c0_config5(MIPS_CONF5_FRE); | ||
| 206 | enable_fpu_hazard(); | ||
| 207 | |||
| 208 | _init_fpu(); | ||
| 209 | |||
| 210 | /* Restore FRE */ | ||
| 211 | write_c0_config5(config5); | ||
| 212 | enable_fpu_hazard(); | ||
| 204 | } else | 213 | } else |
| 205 | fpu_emulator_init_fpu(); | 214 | fpu_emulator_init_fpu(); |
| 206 | 215 | ||
diff --git a/arch/mips/include/asm/fw/arc/hinv.h b/arch/mips/include/asm/fw/arc/hinv.h index f8d37d1df5de..9fac64a26353 100644 --- a/arch/mips/include/asm/fw/arc/hinv.h +++ b/arch/mips/include/asm/fw/arc/hinv.h | |||
| @@ -119,7 +119,7 @@ union key_u { | |||
| 119 | #define SGI_ARCS_REV 10 /* rev .10, 3/04/92 */ | 119 | #define SGI_ARCS_REV 10 /* rev .10, 3/04/92 */ |
| 120 | #endif | 120 | #endif |
| 121 | 121 | ||
| 122 | typedef struct component { | 122 | typedef struct { |
| 123 | CONFIGCLASS Class; | 123 | CONFIGCLASS Class; |
| 124 | CONFIGTYPE Type; | 124 | CONFIGTYPE Type; |
| 125 | IDENTIFIERFLAG Flags; | 125 | IDENTIFIERFLAG Flags; |
| @@ -140,7 +140,7 @@ struct cfgdata { | |||
| 140 | }; | 140 | }; |
| 141 | 141 | ||
| 142 | /* System ID */ | 142 | /* System ID */ |
| 143 | typedef struct systemid { | 143 | typedef struct { |
| 144 | CHAR VendorId[8]; | 144 | CHAR VendorId[8]; |
| 145 | CHAR ProductId[8]; | 145 | CHAR ProductId[8]; |
| 146 | } SYSTEMID; | 146 | } SYSTEMID; |
| @@ -166,7 +166,7 @@ typedef enum memorytype { | |||
| 166 | #endif /* _NT_PROM */ | 166 | #endif /* _NT_PROM */ |
| 167 | } MEMORYTYPE; | 167 | } MEMORYTYPE; |
| 168 | 168 | ||
| 169 | typedef struct memorydescriptor { | 169 | typedef struct { |
| 170 | MEMORYTYPE Type; | 170 | MEMORYTYPE Type; |
| 171 | LONG BasePage; | 171 | LONG BasePage; |
| 172 | LONG PageCount; | 172 | LONG PageCount; |
diff --git a/arch/mips/include/asm/mips-cm.h b/arch/mips/include/asm/mips-cm.h index b95a827d763e..59c0901bdd84 100644 --- a/arch/mips/include/asm/mips-cm.h +++ b/arch/mips/include/asm/mips-cm.h | |||
| @@ -89,9 +89,9 @@ static inline bool mips_cm_has_l2sync(void) | |||
| 89 | 89 | ||
| 90 | /* Macros to ease the creation of register access functions */ | 90 | /* Macros to ease the creation of register access functions */ |
| 91 | #define BUILD_CM_R_(name, off) \ | 91 | #define BUILD_CM_R_(name, off) \ |
| 92 | static inline u32 *addr_gcr_##name(void) \ | 92 | static inline u32 __iomem *addr_gcr_##name(void) \ |
| 93 | { \ | 93 | { \ |
| 94 | return (u32 *)(mips_cm_base + (off)); \ | 94 | return (u32 __iomem *)(mips_cm_base + (off)); \ |
| 95 | } \ | 95 | } \ |
| 96 | \ | 96 | \ |
| 97 | static inline u32 read_gcr_##name(void) \ | 97 | static inline u32 read_gcr_##name(void) \ |
diff --git a/arch/mips/include/asm/mipsregs.h b/arch/mips/include/asm/mipsregs.h index 5e4aef304b02..5b720d8c2745 100644 --- a/arch/mips/include/asm/mipsregs.h +++ b/arch/mips/include/asm/mipsregs.h | |||
| @@ -1386,12 +1386,27 @@ do { \ | |||
| 1386 | __res; \ | 1386 | __res; \ |
| 1387 | }) | 1387 | }) |
| 1388 | 1388 | ||
| 1389 | #define _write_32bit_cp1_register(dest, val, gas_hardfloat) \ | ||
| 1390 | do { \ | ||
| 1391 | __asm__ __volatile__( \ | ||
| 1392 | " .set push \n" \ | ||
| 1393 | " .set reorder \n" \ | ||
| 1394 | " "STR(gas_hardfloat)" \n" \ | ||
| 1395 | " ctc1 %0,"STR(dest)" \n" \ | ||
| 1396 | " .set pop \n" \ | ||
| 1397 | : : "r" (val)); \ | ||
| 1398 | } while (0) | ||
| 1399 | |||
| 1389 | #ifdef GAS_HAS_SET_HARDFLOAT | 1400 | #ifdef GAS_HAS_SET_HARDFLOAT |
| 1390 | #define read_32bit_cp1_register(source) \ | 1401 | #define read_32bit_cp1_register(source) \ |
| 1391 | _read_32bit_cp1_register(source, .set hardfloat) | 1402 | _read_32bit_cp1_register(source, .set hardfloat) |
| 1403 | #define write_32bit_cp1_register(dest, val) \ | ||
| 1404 | _write_32bit_cp1_register(dest, val, .set hardfloat) | ||
| 1392 | #else | 1405 | #else |
| 1393 | #define read_32bit_cp1_register(source) \ | 1406 | #define read_32bit_cp1_register(source) \ |
| 1394 | _read_32bit_cp1_register(source, ) | 1407 | _read_32bit_cp1_register(source, ) |
| 1408 | #define write_32bit_cp1_register(dest, val) \ | ||
| 1409 | _write_32bit_cp1_register(dest, val, ) | ||
| 1395 | #endif | 1410 | #endif |
| 1396 | 1411 | ||
| 1397 | #ifdef HAVE_AS_DSP | 1412 | #ifdef HAVE_AS_DSP |
diff --git a/arch/mips/include/asm/syscall.h b/arch/mips/include/asm/syscall.h index bb7963753730..6499d93ae68d 100644 --- a/arch/mips/include/asm/syscall.h +++ b/arch/mips/include/asm/syscall.h | |||
| @@ -29,13 +29,7 @@ | |||
| 29 | static inline long syscall_get_nr(struct task_struct *task, | 29 | static inline long syscall_get_nr(struct task_struct *task, |
| 30 | struct pt_regs *regs) | 30 | struct pt_regs *regs) |
| 31 | { | 31 | { |
| 32 | /* O32 ABI syscall() - Either 64-bit with O32 or 32-bit */ | 32 | return current_thread_info()->syscall; |
| 33 | if ((config_enabled(CONFIG_32BIT) || | ||
| 34 | test_tsk_thread_flag(task, TIF_32BIT_REGS)) && | ||
| 35 | (regs->regs[2] == __NR_syscall)) | ||
| 36 | return regs->regs[4]; | ||
| 37 | else | ||
| 38 | return regs->regs[2]; | ||
| 39 | } | 33 | } |
| 40 | 34 | ||
| 41 | static inline unsigned long mips_get_syscall_arg(unsigned long *arg, | 35 | static inline unsigned long mips_get_syscall_arg(unsigned long *arg, |
diff --git a/arch/mips/include/asm/thread_info.h b/arch/mips/include/asm/thread_info.h index 99eea59604e9..e4440f92b366 100644 --- a/arch/mips/include/asm/thread_info.h +++ b/arch/mips/include/asm/thread_info.h | |||
| @@ -36,6 +36,7 @@ struct thread_info { | |||
| 36 | */ | 36 | */ |
| 37 | struct restart_block restart_block; | 37 | struct restart_block restart_block; |
| 38 | struct pt_regs *regs; | 38 | struct pt_regs *regs; |
| 39 | long syscall; /* syscall number */ | ||
| 39 | }; | 40 | }; |
| 40 | 41 | ||
| 41 | /* | 42 | /* |
diff --git a/arch/mips/include/uapi/asm/unistd.h b/arch/mips/include/uapi/asm/unistd.h index d001bb1ad177..c03088f9f514 100644 --- a/arch/mips/include/uapi/asm/unistd.h +++ b/arch/mips/include/uapi/asm/unistd.h | |||
| @@ -376,16 +376,17 @@ | |||
| 376 | #define __NR_getrandom (__NR_Linux + 353) | 376 | #define __NR_getrandom (__NR_Linux + 353) |
| 377 | #define __NR_memfd_create (__NR_Linux + 354) | 377 | #define __NR_memfd_create (__NR_Linux + 354) |
| 378 | #define __NR_bpf (__NR_Linux + 355) | 378 | #define __NR_bpf (__NR_Linux + 355) |
| 379 | #define __NR_execveat (__NR_Linux + 356) | ||
| 379 | 380 | ||
| 380 | /* | 381 | /* |
| 381 | * Offset of the last Linux o32 flavoured syscall | 382 | * Offset of the last Linux o32 flavoured syscall |
| 382 | */ | 383 | */ |
| 383 | #define __NR_Linux_syscalls 355 | 384 | #define __NR_Linux_syscalls 356 |
| 384 | 385 | ||
| 385 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ | 386 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ |
| 386 | 387 | ||
| 387 | #define __NR_O32_Linux 4000 | 388 | #define __NR_O32_Linux 4000 |
| 388 | #define __NR_O32_Linux_syscalls 355 | 389 | #define __NR_O32_Linux_syscalls 356 |
| 389 | 390 | ||
| 390 | #if _MIPS_SIM == _MIPS_SIM_ABI64 | 391 | #if _MIPS_SIM == _MIPS_SIM_ABI64 |
| 391 | 392 | ||
| @@ -709,16 +710,17 @@ | |||
| 709 | #define __NR_getrandom (__NR_Linux + 313) | 710 | #define __NR_getrandom (__NR_Linux + 313) |
| 710 | #define __NR_memfd_create (__NR_Linux + 314) | 711 | #define __NR_memfd_create (__NR_Linux + 314) |
| 711 | #define __NR_bpf (__NR_Linux + 315) | 712 | #define __NR_bpf (__NR_Linux + 315) |
| 713 | #define __NR_execveat (__NR_Linux + 316) | ||
| 712 | 714 | ||
| 713 | /* | 715 | /* |
| 714 | * Offset of the last Linux 64-bit flavoured syscall | 716 | * Offset of the last Linux 64-bit flavoured syscall |
| 715 | */ | 717 | */ |
| 716 | #define __NR_Linux_syscalls 315 | 718 | #define __NR_Linux_syscalls 316 |
| 717 | 719 | ||
| 718 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ | 720 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ |
| 719 | 721 | ||
| 720 | #define __NR_64_Linux 5000 | 722 | #define __NR_64_Linux 5000 |
| 721 | #define __NR_64_Linux_syscalls 315 | 723 | #define __NR_64_Linux_syscalls 316 |
| 722 | 724 | ||
| 723 | #if _MIPS_SIM == _MIPS_SIM_NABI32 | 725 | #if _MIPS_SIM == _MIPS_SIM_NABI32 |
| 724 | 726 | ||
| @@ -1046,15 +1048,16 @@ | |||
| 1046 | #define __NR_getrandom (__NR_Linux + 317) | 1048 | #define __NR_getrandom (__NR_Linux + 317) |
| 1047 | #define __NR_memfd_create (__NR_Linux + 318) | 1049 | #define __NR_memfd_create (__NR_Linux + 318) |
| 1048 | #define __NR_bpf (__NR_Linux + 319) | 1050 | #define __NR_bpf (__NR_Linux + 319) |
| 1051 | #define __NR_execveat (__NR_Linux + 320) | ||
| 1049 | 1052 | ||
| 1050 | /* | 1053 | /* |
| 1051 | * Offset of the last N32 flavoured syscall | 1054 | * Offset of the last N32 flavoured syscall |
| 1052 | */ | 1055 | */ |
| 1053 | #define __NR_Linux_syscalls 319 | 1056 | #define __NR_Linux_syscalls 320 |
| 1054 | 1057 | ||
| 1055 | #endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ | 1058 | #endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ |
| 1056 | 1059 | ||
| 1057 | #define __NR_N32_Linux 6000 | 1060 | #define __NR_N32_Linux 6000 |
| 1058 | #define __NR_N32_Linux_syscalls 319 | 1061 | #define __NR_N32_Linux_syscalls 320 |
| 1059 | 1062 | ||
| 1060 | #endif /* _UAPI_ASM_UNISTD_H */ | 1063 | #endif /* _UAPI_ASM_UNISTD_H */ |
diff --git a/arch/mips/jz4740/irq.c b/arch/mips/jz4740/irq.c index 2531da1d3add..97206b3deb97 100644 --- a/arch/mips/jz4740/irq.c +++ b/arch/mips/jz4740/irq.c | |||
| @@ -30,6 +30,9 @@ | |||
| 30 | #include <asm/irq_cpu.h> | 30 | #include <asm/irq_cpu.h> |
| 31 | 31 | ||
| 32 | #include <asm/mach-jz4740/base.h> | 32 | #include <asm/mach-jz4740/base.h> |
| 33 | #include <asm/mach-jz4740/irq.h> | ||
| 34 | |||
| 35 | #include "irq.h" | ||
| 33 | 36 | ||
| 34 | static void __iomem *jz_intc_base; | 37 | static void __iomem *jz_intc_base; |
| 35 | 38 | ||
diff --git a/arch/mips/kernel/elf.c b/arch/mips/kernel/elf.c index c92b15df6893..a5b5b56485c1 100644 --- a/arch/mips/kernel/elf.c +++ b/arch/mips/kernel/elf.c | |||
| @@ -19,8 +19,8 @@ enum { | |||
| 19 | int arch_elf_pt_proc(void *_ehdr, void *_phdr, struct file *elf, | 19 | int arch_elf_pt_proc(void *_ehdr, void *_phdr, struct file *elf, |
| 20 | bool is_interp, struct arch_elf_state *state) | 20 | bool is_interp, struct arch_elf_state *state) |
| 21 | { | 21 | { |
| 22 | struct elfhdr *ehdr = _ehdr; | 22 | struct elf32_hdr *ehdr = _ehdr; |
| 23 | struct elf_phdr *phdr = _phdr; | 23 | struct elf32_phdr *phdr = _phdr; |
| 24 | struct mips_elf_abiflags_v0 abiflags; | 24 | struct mips_elf_abiflags_v0 abiflags; |
| 25 | int ret; | 25 | int ret; |
| 26 | 26 | ||
| @@ -48,7 +48,7 @@ int arch_elf_pt_proc(void *_ehdr, void *_phdr, struct file *elf, | |||
| 48 | return 0; | 48 | return 0; |
| 49 | } | 49 | } |
| 50 | 50 | ||
| 51 | static inline unsigned get_fp_abi(struct elfhdr *ehdr, int in_abi) | 51 | static inline unsigned get_fp_abi(struct elf32_hdr *ehdr, int in_abi) |
| 52 | { | 52 | { |
| 53 | /* If the ABI requirement is provided, simply return that */ | 53 | /* If the ABI requirement is provided, simply return that */ |
| 54 | if (in_abi != -1) | 54 | if (in_abi != -1) |
| @@ -65,7 +65,7 @@ static inline unsigned get_fp_abi(struct elfhdr *ehdr, int in_abi) | |||
| 65 | int arch_check_elf(void *_ehdr, bool has_interpreter, | 65 | int arch_check_elf(void *_ehdr, bool has_interpreter, |
| 66 | struct arch_elf_state *state) | 66 | struct arch_elf_state *state) |
| 67 | { | 67 | { |
| 68 | struct elfhdr *ehdr = _ehdr; | 68 | struct elf32_hdr *ehdr = _ehdr; |
| 69 | unsigned fp_abi, interp_fp_abi, abi0, abi1; | 69 | unsigned fp_abi, interp_fp_abi, abi0, abi1; |
| 70 | 70 | ||
| 71 | /* Ignore non-O32 binaries */ | 71 | /* Ignore non-O32 binaries */ |
diff --git a/arch/mips/kernel/irq_cpu.c b/arch/mips/kernel/irq_cpu.c index 590c2c980fd3..6eb7a3f515fc 100644 --- a/arch/mips/kernel/irq_cpu.c +++ b/arch/mips/kernel/irq_cpu.c | |||
| @@ -57,6 +57,8 @@ static struct irq_chip mips_cpu_irq_controller = { | |||
| 57 | .irq_mask_ack = mask_mips_irq, | 57 | .irq_mask_ack = mask_mips_irq, |
| 58 | .irq_unmask = unmask_mips_irq, | 58 | .irq_unmask = unmask_mips_irq, |
| 59 | .irq_eoi = unmask_mips_irq, | 59 | .irq_eoi = unmask_mips_irq, |
| 60 | .irq_disable = mask_mips_irq, | ||
| 61 | .irq_enable = unmask_mips_irq, | ||
| 60 | }; | 62 | }; |
| 61 | 63 | ||
| 62 | /* | 64 | /* |
| @@ -93,6 +95,8 @@ static struct irq_chip mips_mt_cpu_irq_controller = { | |||
| 93 | .irq_mask_ack = mips_mt_cpu_irq_ack, | 95 | .irq_mask_ack = mips_mt_cpu_irq_ack, |
| 94 | .irq_unmask = unmask_mips_irq, | 96 | .irq_unmask = unmask_mips_irq, |
| 95 | .irq_eoi = unmask_mips_irq, | 97 | .irq_eoi = unmask_mips_irq, |
| 98 | .irq_disable = mask_mips_irq, | ||
| 99 | .irq_enable = unmask_mips_irq, | ||
| 96 | }; | 100 | }; |
| 97 | 101 | ||
| 98 | asmlinkage void __weak plat_irq_dispatch(void) | 102 | asmlinkage void __weak plat_irq_dispatch(void) |
diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c index eb76434828e8..85bff5d513e5 100644 --- a/arch/mips/kernel/process.c +++ b/arch/mips/kernel/process.c | |||
| @@ -82,6 +82,30 @@ void flush_thread(void) | |||
| 82 | { | 82 | { |
| 83 | } | 83 | } |
| 84 | 84 | ||
| 85 | int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src) | ||
| 86 | { | ||
| 87 | /* | ||
| 88 | * Save any process state which is live in hardware registers to the | ||
| 89 | * parent context prior to duplication. This prevents the new child | ||
| 90 | * state becoming stale if the parent is preempted before copy_thread() | ||
| 91 | * gets a chance to save the parent's live hardware registers to the | ||
| 92 | * child context. | ||
| 93 | */ | ||
| 94 | preempt_disable(); | ||
| 95 | |||
| 96 | if (is_msa_enabled()) | ||
| 97 | save_msa(current); | ||
| 98 | else if (is_fpu_owner()) | ||
| 99 | _save_fp(current); | ||
| 100 | |||
| 101 | save_dsp(current); | ||
| 102 | |||
| 103 | preempt_enable(); | ||
| 104 | |||
| 105 | *dst = *src; | ||
| 106 | return 0; | ||
| 107 | } | ||
| 108 | |||
| 85 | int copy_thread(unsigned long clone_flags, unsigned long usp, | 109 | int copy_thread(unsigned long clone_flags, unsigned long usp, |
| 86 | unsigned long arg, struct task_struct *p) | 110 | unsigned long arg, struct task_struct *p) |
| 87 | { | 111 | { |
| @@ -92,18 +116,6 @@ int copy_thread(unsigned long clone_flags, unsigned long usp, | |||
| 92 | 116 | ||
| 93 | childksp = (unsigned long)task_stack_page(p) + THREAD_SIZE - 32; | 117 | childksp = (unsigned long)task_stack_page(p) + THREAD_SIZE - 32; |
| 94 | 118 | ||
| 95 | preempt_disable(); | ||
| 96 | |||
| 97 | if (is_msa_enabled()) | ||
| 98 | save_msa(p); | ||
| 99 | else if (is_fpu_owner()) | ||
| 100 | save_fp(p); | ||
| 101 | |||
| 102 | if (cpu_has_dsp) | ||
| 103 | save_dsp(p); | ||
| 104 | |||
| 105 | preempt_enable(); | ||
| 106 | |||
| 107 | /* set up new TSS. */ | 119 | /* set up new TSS. */ |
| 108 | childregs = (struct pt_regs *) childksp - 1; | 120 | childregs = (struct pt_regs *) childksp - 1; |
| 109 | /* Put the stack after the struct pt_regs. */ | 121 | /* Put the stack after the struct pt_regs. */ |
diff --git a/arch/mips/kernel/ptrace.c b/arch/mips/kernel/ptrace.c index 9d1487d83293..510452812594 100644 --- a/arch/mips/kernel/ptrace.c +++ b/arch/mips/kernel/ptrace.c | |||
| @@ -770,6 +770,8 @@ asmlinkage long syscall_trace_enter(struct pt_regs *regs, long syscall) | |||
| 770 | long ret = 0; | 770 | long ret = 0; |
| 771 | user_exit(); | 771 | user_exit(); |
| 772 | 772 | ||
| 773 | current_thread_info()->syscall = syscall; | ||
| 774 | |||
| 773 | if (secure_computing() == -1) | 775 | if (secure_computing() == -1) |
| 774 | return -1; | 776 | return -1; |
| 775 | 777 | ||
diff --git a/arch/mips/kernel/scall32-o32.S b/arch/mips/kernel/scall32-o32.S index 00cad1005a16..6e8de80bb446 100644 --- a/arch/mips/kernel/scall32-o32.S +++ b/arch/mips/kernel/scall32-o32.S | |||
| @@ -181,6 +181,7 @@ illegal_syscall: | |||
| 181 | sll t1, t0, 2 | 181 | sll t1, t0, 2 |
| 182 | beqz v0, einval | 182 | beqz v0, einval |
| 183 | lw t2, sys_call_table(t1) # syscall routine | 183 | lw t2, sys_call_table(t1) # syscall routine |
| 184 | sw a0, PT_R2(sp) # call routine directly on restart | ||
| 184 | 185 | ||
| 185 | /* Some syscalls like execve get their arguments from struct pt_regs | 186 | /* Some syscalls like execve get their arguments from struct pt_regs |
| 186 | and claim zero arguments in the syscall table. Thus we have to | 187 | and claim zero arguments in the syscall table. Thus we have to |
| @@ -580,3 +581,4 @@ EXPORT(sys_call_table) | |||
| 580 | PTR sys_getrandom | 581 | PTR sys_getrandom |
| 581 | PTR sys_memfd_create | 582 | PTR sys_memfd_create |
| 582 | PTR sys_bpf /* 4355 */ | 583 | PTR sys_bpf /* 4355 */ |
| 584 | PTR sys_execveat | ||
diff --git a/arch/mips/kernel/scall64-64.S b/arch/mips/kernel/scall64-64.S index 5251565e344b..ad4d44635c76 100644 --- a/arch/mips/kernel/scall64-64.S +++ b/arch/mips/kernel/scall64-64.S | |||
| @@ -435,4 +435,5 @@ EXPORT(sys_call_table) | |||
| 435 | PTR sys_getrandom | 435 | PTR sys_getrandom |
| 436 | PTR sys_memfd_create | 436 | PTR sys_memfd_create |
| 437 | PTR sys_bpf /* 5315 */ | 437 | PTR sys_bpf /* 5315 */ |
| 438 | PTR sys_execveat | ||
| 438 | .size sys_call_table,.-sys_call_table | 439 | .size sys_call_table,.-sys_call_table |
diff --git a/arch/mips/kernel/scall64-n32.S b/arch/mips/kernel/scall64-n32.S index 77e74398b828..446cc654da56 100644 --- a/arch/mips/kernel/scall64-n32.S +++ b/arch/mips/kernel/scall64-n32.S | |||
| @@ -428,4 +428,5 @@ EXPORT(sysn32_call_table) | |||
| 428 | PTR sys_getrandom | 428 | PTR sys_getrandom |
| 429 | PTR sys_memfd_create | 429 | PTR sys_memfd_create |
| 430 | PTR sys_bpf | 430 | PTR sys_bpf |
| 431 | PTR compat_sys_execveat /* 6320 */ | ||
| 431 | .size sysn32_call_table,.-sysn32_call_table | 432 | .size sysn32_call_table,.-sysn32_call_table |
diff --git a/arch/mips/kernel/scall64-o32.S b/arch/mips/kernel/scall64-o32.S index 6f8db9f728e8..d07b210fbeff 100644 --- a/arch/mips/kernel/scall64-o32.S +++ b/arch/mips/kernel/scall64-o32.S | |||
| @@ -186,6 +186,7 @@ LEAF(sys32_syscall) | |||
| 186 | dsll t1, t0, 3 | 186 | dsll t1, t0, 3 |
| 187 | beqz v0, einval | 187 | beqz v0, einval |
| 188 | ld t2, sys32_call_table(t1) # syscall routine | 188 | ld t2, sys32_call_table(t1) # syscall routine |
| 189 | sd a0, PT_R2(sp) # call routine directly on restart | ||
| 189 | 190 | ||
| 190 | move a0, a1 # shift argument registers | 191 | move a0, a1 # shift argument registers |
| 191 | move a1, a2 | 192 | move a1, a2 |
| @@ -565,4 +566,5 @@ EXPORT(sys32_call_table) | |||
| 565 | PTR sys_getrandom | 566 | PTR sys_getrandom |
| 566 | PTR sys_memfd_create | 567 | PTR sys_memfd_create |
| 567 | PTR sys_bpf /* 4355 */ | 568 | PTR sys_bpf /* 4355 */ |
| 569 | PTR compat_sys_execveat | ||
| 568 | .size sys32_call_table,.-sys32_call_table | 570 | .size sys32_call_table,.-sys32_call_table |
diff --git a/arch/mips/kernel/smp-cmp.c b/arch/mips/kernel/smp-cmp.c index 1e0a93c5a3e7..e36a859af666 100644 --- a/arch/mips/kernel/smp-cmp.c +++ b/arch/mips/kernel/smp-cmp.c | |||
| @@ -44,8 +44,8 @@ static void cmp_init_secondary(void) | |||
| 44 | struct cpuinfo_mips *c __maybe_unused = ¤t_cpu_data; | 44 | struct cpuinfo_mips *c __maybe_unused = ¤t_cpu_data; |
| 45 | 45 | ||
| 46 | /* Assume GIC is present */ | 46 | /* Assume GIC is present */ |
| 47 | change_c0_status(ST0_IM, STATUSF_IP3 | STATUSF_IP4 | STATUSF_IP6 | | 47 | change_c0_status(ST0_IM, STATUSF_IP2 | STATUSF_IP3 | STATUSF_IP4 | |
| 48 | STATUSF_IP7); | 48 | STATUSF_IP5 | STATUSF_IP6 | STATUSF_IP7); |
| 49 | 49 | ||
| 50 | /* Enable per-cpu interrupts: platform specific */ | 50 | /* Enable per-cpu interrupts: platform specific */ |
| 51 | 51 | ||
diff --git a/arch/mips/kernel/smp-mt.c b/arch/mips/kernel/smp-mt.c index ad86951b73bd..17ea705f6c40 100644 --- a/arch/mips/kernel/smp-mt.c +++ b/arch/mips/kernel/smp-mt.c | |||
| @@ -161,7 +161,8 @@ static void vsmp_init_secondary(void) | |||
| 161 | #ifdef CONFIG_MIPS_GIC | 161 | #ifdef CONFIG_MIPS_GIC |
| 162 | /* This is Malta specific: IPI,performance and timer interrupts */ | 162 | /* This is Malta specific: IPI,performance and timer interrupts */ |
| 163 | if (gic_present) | 163 | if (gic_present) |
| 164 | change_c0_status(ST0_IM, STATUSF_IP3 | STATUSF_IP4 | | 164 | change_c0_status(ST0_IM, STATUSF_IP2 | STATUSF_IP3 | |
| 165 | STATUSF_IP4 | STATUSF_IP5 | | ||
| 165 | STATUSF_IP6 | STATUSF_IP7); | 166 | STATUSF_IP6 | STATUSF_IP7); |
| 166 | else | 167 | else |
| 167 | #endif | 168 | #endif |
diff --git a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c index c94c4e92e17d..1c0d8c50b7e1 100644 --- a/arch/mips/kernel/smp.c +++ b/arch/mips/kernel/smp.c | |||
| @@ -123,10 +123,10 @@ asmlinkage void start_secondary(void) | |||
| 123 | unsigned int cpu; | 123 | unsigned int cpu; |
| 124 | 124 | ||
| 125 | cpu_probe(); | 125 | cpu_probe(); |
| 126 | cpu_report(); | ||
| 127 | per_cpu_trap_init(false); | 126 | per_cpu_trap_init(false); |
| 128 | mips_clockevent_init(); | 127 | mips_clockevent_init(); |
| 129 | mp_ops->init_secondary(); | 128 | mp_ops->init_secondary(); |
| 129 | cpu_report(); | ||
| 130 | 130 | ||
| 131 | /* | 131 | /* |
| 132 | * XXX parity protection should be folded in here when it's converted | 132 | * XXX parity protection should be folded in here when it's converted |
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index ad3d2031c327..c3b41e24c05a 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c | |||
| @@ -1231,7 +1231,8 @@ static int enable_restore_fp_context(int msa) | |||
| 1231 | 1231 | ||
| 1232 | /* Restore the scalar FP control & status register */ | 1232 | /* Restore the scalar FP control & status register */ |
| 1233 | if (!was_fpu_owner) | 1233 | if (!was_fpu_owner) |
| 1234 | asm volatile("ctc1 %0, $31" : : "r"(current->thread.fpu.fcr31)); | 1234 | write_32bit_cp1_register(CP1_STATUS, |
| 1235 | current->thread.fpu.fcr31); | ||
| 1235 | } | 1236 | } |
| 1236 | 1237 | ||
| 1237 | out: | 1238 | out: |
diff --git a/arch/mips/mm/tlb-r4k.c b/arch/mips/mm/tlb-r4k.c index e90b2e899291..30639a6e9b8c 100644 --- a/arch/mips/mm/tlb-r4k.c +++ b/arch/mips/mm/tlb-r4k.c | |||
| @@ -489,6 +489,8 @@ static void r4k_tlb_configure(void) | |||
| 489 | #ifdef CONFIG_64BIT | 489 | #ifdef CONFIG_64BIT |
| 490 | pg |= PG_ELPA; | 490 | pg |= PG_ELPA; |
| 491 | #endif | 491 | #endif |
| 492 | if (cpu_has_rixiex) | ||
| 493 | pg |= PG_IEC; | ||
| 492 | write_c0_pagegrain(pg); | 494 | write_c0_pagegrain(pg); |
| 493 | } | 495 | } |
| 494 | 496 | ||
diff --git a/arch/mn10300/include/asm/cacheflush.h b/arch/mn10300/include/asm/cacheflush.h index faed90240ded..6d6df839948f 100644 --- a/arch/mn10300/include/asm/cacheflush.h +++ b/arch/mn10300/include/asm/cacheflush.h | |||
| @@ -159,13 +159,6 @@ extern void flush_icache_range(unsigned long start, unsigned long end); | |||
| 159 | #define copy_from_user_page(vma, page, vaddr, dst, src, len) \ | 159 | #define copy_from_user_page(vma, page, vaddr, dst, src, len) \ |
| 160 | memcpy(dst, src, len) | 160 | memcpy(dst, src, len) |
| 161 | 161 | ||
| 162 | /* | ||
| 163 | * Internal debugging function | ||
| 164 | */ | ||
| 165 | #ifdef CONFIG_DEBUG_PAGEALLOC | ||
| 166 | extern void kernel_map_pages(struct page *page, int numpages, int enable); | ||
| 167 | #endif | ||
| 168 | |||
| 169 | #endif /* __ASSEMBLY__ */ | 162 | #endif /* __ASSEMBLY__ */ |
| 170 | 163 | ||
| 171 | #endif /* _ASM_CACHEFLUSH_H */ | 164 | #endif /* _ASM_CACHEFLUSH_H */ |
diff --git a/arch/powerpc/include/asm/cacheflush.h b/arch/powerpc/include/asm/cacheflush.h index 5b9312220e84..30b35fff2dea 100644 --- a/arch/powerpc/include/asm/cacheflush.h +++ b/arch/powerpc/include/asm/cacheflush.h | |||
| @@ -60,13 +60,6 @@ extern void flush_dcache_phys_range(unsigned long start, unsigned long stop); | |||
| 60 | #define copy_from_user_page(vma, page, vaddr, dst, src, len) \ | 60 | #define copy_from_user_page(vma, page, vaddr, dst, src, len) \ |
| 61 | memcpy(dst, src, len) | 61 | memcpy(dst, src, len) |
| 62 | 62 | ||
| 63 | |||
| 64 | |||
| 65 | #ifdef CONFIG_DEBUG_PAGEALLOC | ||
| 66 | /* internal debugging function */ | ||
| 67 | void kernel_map_pages(struct page *page, int numpages, int enable); | ||
| 68 | #endif | ||
| 69 | |||
| 70 | #endif /* __KERNEL__ */ | 63 | #endif /* __KERNEL__ */ |
| 71 | 64 | ||
| 72 | #endif /* _ASM_POWERPC_CACHEFLUSH_H */ | 65 | #endif /* _ASM_POWERPC_CACHEFLUSH_H */ |
diff --git a/arch/s390/include/asm/cacheflush.h b/arch/s390/include/asm/cacheflush.h index 3e20383d0921..58fae7d098cf 100644 --- a/arch/s390/include/asm/cacheflush.h +++ b/arch/s390/include/asm/cacheflush.h | |||
| @@ -4,10 +4,6 @@ | |||
| 4 | /* Caches aren't brain-dead on the s390. */ | 4 | /* Caches aren't brain-dead on the s390. */ |
| 5 | #include <asm-generic/cacheflush.h> | 5 | #include <asm-generic/cacheflush.h> |
| 6 | 6 | ||
| 7 | #ifdef CONFIG_DEBUG_PAGEALLOC | ||
| 8 | void kernel_map_pages(struct page *page, int numpages, int enable); | ||
| 9 | #endif | ||
| 10 | |||
| 11 | int set_memory_ro(unsigned long addr, int numpages); | 7 | int set_memory_ro(unsigned long addr, int numpages); |
| 12 | int set_memory_rw(unsigned long addr, int numpages); | 8 | int set_memory_rw(unsigned long addr, int numpages); |
| 13 | int set_memory_nx(unsigned long addr, int numpages); | 9 | int set_memory_nx(unsigned long addr, int numpages); |
diff --git a/arch/sparc/include/asm/cacheflush_64.h b/arch/sparc/include/asm/cacheflush_64.h index 38965379e350..68513c41e10d 100644 --- a/arch/sparc/include/asm/cacheflush_64.h +++ b/arch/sparc/include/asm/cacheflush_64.h | |||
| @@ -74,11 +74,6 @@ void flush_ptrace_access(struct vm_area_struct *, struct page *, | |||
| 74 | #define flush_cache_vmap(start, end) do { } while (0) | 74 | #define flush_cache_vmap(start, end) do { } while (0) |
| 75 | #define flush_cache_vunmap(start, end) do { } while (0) | 75 | #define flush_cache_vunmap(start, end) do { } while (0) |
| 76 | 76 | ||
| 77 | #ifdef CONFIG_DEBUG_PAGEALLOC | ||
| 78 | /* internal debugging function */ | ||
| 79 | void kernel_map_pages(struct page *page, int numpages, int enable); | ||
| 80 | #endif | ||
| 81 | |||
| 82 | #endif /* !__ASSEMBLY__ */ | 77 | #endif /* !__ASSEMBLY__ */ |
| 83 | 78 | ||
| 84 | #endif /* _SPARC64_CACHEFLUSH_H */ | 79 | #endif /* _SPARC64_CACHEFLUSH_H */ |
diff --git a/arch/x86/kernel/cpu/microcode/core.c b/arch/x86/kernel/cpu/microcode/core.c index 15c29096136b..36a83617eb21 100644 --- a/arch/x86/kernel/cpu/microcode/core.c +++ b/arch/x86/kernel/cpu/microcode/core.c | |||
| @@ -552,7 +552,7 @@ static int __init microcode_init(void) | |||
| 552 | int error; | 552 | int error; |
| 553 | 553 | ||
| 554 | if (paravirt_enabled() || dis_ucode_ldr) | 554 | if (paravirt_enabled() || dis_ucode_ldr) |
| 555 | return 0; | 555 | return -EINVAL; |
| 556 | 556 | ||
| 557 | if (c->x86_vendor == X86_VENDOR_INTEL) | 557 | if (c->x86_vendor == X86_VENDOR_INTEL) |
| 558 | microcode_ops = init_intel_microcode(); | 558 | microcode_ops = init_intel_microcode(); |
diff --git a/drivers/irqchip/irq-mips-gic.c b/drivers/irqchip/irq-mips-gic.c index 2b0468e3df6a..56b96c63dc4b 100644 --- a/drivers/irqchip/irq-mips-gic.c +++ b/drivers/irqchip/irq-mips-gic.c | |||
| @@ -37,6 +37,7 @@ static struct irq_domain *gic_irq_domain; | |||
| 37 | static int gic_shared_intrs; | 37 | static int gic_shared_intrs; |
| 38 | static int gic_vpes; | 38 | static int gic_vpes; |
| 39 | static unsigned int gic_cpu_pin; | 39 | static unsigned int gic_cpu_pin; |
| 40 | static unsigned int timer_cpu_pin; | ||
| 40 | static struct irq_chip gic_level_irq_controller, gic_edge_irq_controller; | 41 | static struct irq_chip gic_level_irq_controller, gic_edge_irq_controller; |
| 41 | 42 | ||
| 42 | static void __gic_irq_dispatch(void); | 43 | static void __gic_irq_dispatch(void); |
| @@ -616,6 +617,8 @@ static int gic_local_irq_domain_map(struct irq_domain *d, unsigned int virq, | |||
| 616 | gic_write(GIC_REG(VPE_OTHER, GIC_VPE_COMPARE_MAP), val); | 617 | gic_write(GIC_REG(VPE_OTHER, GIC_VPE_COMPARE_MAP), val); |
| 617 | break; | 618 | break; |
| 618 | case GIC_LOCAL_INT_TIMER: | 619 | case GIC_LOCAL_INT_TIMER: |
| 620 | /* CONFIG_MIPS_CMP workaround (see __gic_init) */ | ||
| 621 | val = GIC_MAP_TO_PIN_MSK | timer_cpu_pin; | ||
| 619 | gic_write(GIC_REG(VPE_OTHER, GIC_VPE_TIMER_MAP), val); | 622 | gic_write(GIC_REG(VPE_OTHER, GIC_VPE_TIMER_MAP), val); |
| 620 | break; | 623 | break; |
| 621 | case GIC_LOCAL_INT_PERFCTR: | 624 | case GIC_LOCAL_INT_PERFCTR: |
| @@ -713,12 +716,36 @@ static void __init __gic_init(unsigned long gic_base_addr, | |||
| 713 | if (cpu_has_veic) { | 716 | if (cpu_has_veic) { |
| 714 | /* Always use vector 1 in EIC mode */ | 717 | /* Always use vector 1 in EIC mode */ |
| 715 | gic_cpu_pin = 0; | 718 | gic_cpu_pin = 0; |
| 719 | timer_cpu_pin = gic_cpu_pin; | ||
| 716 | set_vi_handler(gic_cpu_pin + GIC_PIN_TO_VEC_OFFSET, | 720 | set_vi_handler(gic_cpu_pin + GIC_PIN_TO_VEC_OFFSET, |
| 717 | __gic_irq_dispatch); | 721 | __gic_irq_dispatch); |
| 718 | } else { | 722 | } else { |
| 719 | gic_cpu_pin = cpu_vec - GIC_CPU_PIN_OFFSET; | 723 | gic_cpu_pin = cpu_vec - GIC_CPU_PIN_OFFSET; |
| 720 | irq_set_chained_handler(MIPS_CPU_IRQ_BASE + cpu_vec, | 724 | irq_set_chained_handler(MIPS_CPU_IRQ_BASE + cpu_vec, |
| 721 | gic_irq_dispatch); | 725 | gic_irq_dispatch); |
| 726 | /* | ||
| 727 | * With the CMP implementation of SMP (deprecated), other CPUs | ||
| 728 | * are started by the bootloader and put into a timer based | ||
| 729 | * waiting poll loop. We must not re-route those CPU's local | ||
| 730 | * timer interrupts as the wait instruction will never finish, | ||
| 731 | * so just handle whatever CPU interrupt it is routed to by | ||
| 732 | * default. | ||
| 733 | * | ||
| 734 | * This workaround should be removed when CMP support is | ||
| 735 | * dropped. | ||
| 736 | */ | ||
| 737 | if (IS_ENABLED(CONFIG_MIPS_CMP) && | ||
| 738 | gic_local_irq_is_routable(GIC_LOCAL_INT_TIMER)) { | ||
| 739 | timer_cpu_pin = gic_read(GIC_REG(VPE_LOCAL, | ||
| 740 | GIC_VPE_TIMER_MAP)) & | ||
| 741 | GIC_MAP_MSK; | ||
| 742 | irq_set_chained_handler(MIPS_CPU_IRQ_BASE + | ||
| 743 | GIC_CPU_PIN_OFFSET + | ||
| 744 | timer_cpu_pin, | ||
| 745 | gic_irq_dispatch); | ||
| 746 | } else { | ||
| 747 | timer_cpu_pin = gic_cpu_pin; | ||
| 748 | } | ||
| 722 | } | 749 | } |
| 723 | 750 | ||
| 724 | gic_irq_domain = irq_domain_add_simple(node, GIC_NUM_LOCAL_INTRS + | 751 | gic_irq_domain = irq_domain_add_simple(node, GIC_NUM_LOCAL_INTRS + |
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index 9a02da16f2be..1a9585d4380a 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c | |||
| @@ -2591,6 +2591,7 @@ int btrfs_sync_log(struct btrfs_trans_handle *trans, | |||
| 2591 | } | 2591 | } |
| 2592 | 2592 | ||
| 2593 | if (log_root_tree->log_transid_committed >= root_log_ctx.log_transid) { | 2593 | if (log_root_tree->log_transid_committed >= root_log_ctx.log_transid) { |
| 2594 | blk_finish_plug(&plug); | ||
| 2594 | mutex_unlock(&log_root_tree->log_mutex); | 2595 | mutex_unlock(&log_root_tree->log_mutex); |
| 2595 | ret = root_log_ctx.log_ret; | 2596 | ret = root_log_ctx.log_ret; |
| 2596 | goto out; | 2597 | goto out; |
diff --git a/fs/nilfs2/nilfs.h b/fs/nilfs2/nilfs.h index 91093cd74f0d..385704027575 100644 --- a/fs/nilfs2/nilfs.h +++ b/fs/nilfs2/nilfs.h | |||
| @@ -141,7 +141,6 @@ enum { | |||
| 141 | * @ti_save: Backup of journal_info field of task_struct | 141 | * @ti_save: Backup of journal_info field of task_struct |
| 142 | * @ti_flags: Flags | 142 | * @ti_flags: Flags |
| 143 | * @ti_count: Nest level | 143 | * @ti_count: Nest level |
| 144 | * @ti_garbage: List of inode to be put when releasing semaphore | ||
| 145 | */ | 144 | */ |
| 146 | struct nilfs_transaction_info { | 145 | struct nilfs_transaction_info { |
| 147 | u32 ti_magic; | 146 | u32 ti_magic; |
| @@ -150,7 +149,6 @@ struct nilfs_transaction_info { | |||
| 150 | one of other filesystems has a bug. */ | 149 | one of other filesystems has a bug. */ |
| 151 | unsigned short ti_flags; | 150 | unsigned short ti_flags; |
| 152 | unsigned short ti_count; | 151 | unsigned short ti_count; |
| 153 | struct list_head ti_garbage; | ||
| 154 | }; | 152 | }; |
| 155 | 153 | ||
| 156 | /* ti_magic */ | 154 | /* ti_magic */ |
diff --git a/fs/nilfs2/segment.c b/fs/nilfs2/segment.c index 7ef18fc656c2..469086b9f99b 100644 --- a/fs/nilfs2/segment.c +++ b/fs/nilfs2/segment.c | |||
| @@ -305,7 +305,6 @@ static void nilfs_transaction_lock(struct super_block *sb, | |||
| 305 | ti->ti_count = 0; | 305 | ti->ti_count = 0; |
| 306 | ti->ti_save = cur_ti; | 306 | ti->ti_save = cur_ti; |
| 307 | ti->ti_magic = NILFS_TI_MAGIC; | 307 | ti->ti_magic = NILFS_TI_MAGIC; |
| 308 | INIT_LIST_HEAD(&ti->ti_garbage); | ||
| 309 | current->journal_info = ti; | 308 | current->journal_info = ti; |
| 310 | 309 | ||
| 311 | for (;;) { | 310 | for (;;) { |
| @@ -332,8 +331,6 @@ static void nilfs_transaction_unlock(struct super_block *sb) | |||
| 332 | 331 | ||
| 333 | up_write(&nilfs->ns_segctor_sem); | 332 | up_write(&nilfs->ns_segctor_sem); |
| 334 | current->journal_info = ti->ti_save; | 333 | current->journal_info = ti->ti_save; |
| 335 | if (!list_empty(&ti->ti_garbage)) | ||
| 336 | nilfs_dispose_list(nilfs, &ti->ti_garbage, 0); | ||
| 337 | } | 334 | } |
| 338 | 335 | ||
| 339 | static void *nilfs_segctor_map_segsum_entry(struct nilfs_sc_info *sci, | 336 | static void *nilfs_segctor_map_segsum_entry(struct nilfs_sc_info *sci, |
| @@ -746,6 +743,15 @@ static void nilfs_dispose_list(struct the_nilfs *nilfs, | |||
| 746 | } | 743 | } |
| 747 | } | 744 | } |
| 748 | 745 | ||
| 746 | static void nilfs_iput_work_func(struct work_struct *work) | ||
| 747 | { | ||
| 748 | struct nilfs_sc_info *sci = container_of(work, struct nilfs_sc_info, | ||
| 749 | sc_iput_work); | ||
| 750 | struct the_nilfs *nilfs = sci->sc_super->s_fs_info; | ||
| 751 | |||
| 752 | nilfs_dispose_list(nilfs, &sci->sc_iput_queue, 0); | ||
| 753 | } | ||
| 754 | |||
| 749 | static int nilfs_test_metadata_dirty(struct the_nilfs *nilfs, | 755 | static int nilfs_test_metadata_dirty(struct the_nilfs *nilfs, |
| 750 | struct nilfs_root *root) | 756 | struct nilfs_root *root) |
| 751 | { | 757 | { |
| @@ -1900,8 +1906,8 @@ static int nilfs_segctor_collect_dirty_files(struct nilfs_sc_info *sci, | |||
| 1900 | static void nilfs_segctor_drop_written_files(struct nilfs_sc_info *sci, | 1906 | static void nilfs_segctor_drop_written_files(struct nilfs_sc_info *sci, |
| 1901 | struct the_nilfs *nilfs) | 1907 | struct the_nilfs *nilfs) |
| 1902 | { | 1908 | { |
| 1903 | struct nilfs_transaction_info *ti = current->journal_info; | ||
| 1904 | struct nilfs_inode_info *ii, *n; | 1909 | struct nilfs_inode_info *ii, *n; |
| 1910 | int defer_iput = false; | ||
| 1905 | 1911 | ||
| 1906 | spin_lock(&nilfs->ns_inode_lock); | 1912 | spin_lock(&nilfs->ns_inode_lock); |
| 1907 | list_for_each_entry_safe(ii, n, &sci->sc_dirty_files, i_dirty) { | 1913 | list_for_each_entry_safe(ii, n, &sci->sc_dirty_files, i_dirty) { |
| @@ -1912,9 +1918,24 @@ static void nilfs_segctor_drop_written_files(struct nilfs_sc_info *sci, | |||
| 1912 | clear_bit(NILFS_I_BUSY, &ii->i_state); | 1918 | clear_bit(NILFS_I_BUSY, &ii->i_state); |
| 1913 | brelse(ii->i_bh); | 1919 | brelse(ii->i_bh); |
| 1914 | ii->i_bh = NULL; | 1920 | ii->i_bh = NULL; |
| 1915 | list_move_tail(&ii->i_dirty, &ti->ti_garbage); | 1921 | list_del_init(&ii->i_dirty); |
| 1922 | if (!ii->vfs_inode.i_nlink) { | ||
| 1923 | /* | ||
| 1924 | * Defer calling iput() to avoid a deadlock | ||
| 1925 | * over I_SYNC flag for inodes with i_nlink == 0 | ||
| 1926 | */ | ||
| 1927 | list_add_tail(&ii->i_dirty, &sci->sc_iput_queue); | ||
| 1928 | defer_iput = true; | ||
| 1929 | } else { | ||
| 1930 | spin_unlock(&nilfs->ns_inode_lock); | ||
| 1931 | iput(&ii->vfs_inode); | ||
| 1932 | spin_lock(&nilfs->ns_inode_lock); | ||
| 1933 | } | ||
| 1916 | } | 1934 | } |
| 1917 | spin_unlock(&nilfs->ns_inode_lock); | 1935 | spin_unlock(&nilfs->ns_inode_lock); |
| 1936 | |||
| 1937 | if (defer_iput) | ||
| 1938 | schedule_work(&sci->sc_iput_work); | ||
| 1918 | } | 1939 | } |
| 1919 | 1940 | ||
| 1920 | /* | 1941 | /* |
| @@ -2583,6 +2604,8 @@ static struct nilfs_sc_info *nilfs_segctor_new(struct super_block *sb, | |||
| 2583 | INIT_LIST_HEAD(&sci->sc_segbufs); | 2604 | INIT_LIST_HEAD(&sci->sc_segbufs); |
| 2584 | INIT_LIST_HEAD(&sci->sc_write_logs); | 2605 | INIT_LIST_HEAD(&sci->sc_write_logs); |
| 2585 | INIT_LIST_HEAD(&sci->sc_gc_inodes); | 2606 | INIT_LIST_HEAD(&sci->sc_gc_inodes); |
| 2607 | INIT_LIST_HEAD(&sci->sc_iput_queue); | ||
| 2608 | INIT_WORK(&sci->sc_iput_work, nilfs_iput_work_func); | ||
| 2586 | init_timer(&sci->sc_timer); | 2609 | init_timer(&sci->sc_timer); |
| 2587 | 2610 | ||
| 2588 | sci->sc_interval = HZ * NILFS_SC_DEFAULT_TIMEOUT; | 2611 | sci->sc_interval = HZ * NILFS_SC_DEFAULT_TIMEOUT; |
| @@ -2609,6 +2632,8 @@ static void nilfs_segctor_write_out(struct nilfs_sc_info *sci) | |||
| 2609 | ret = nilfs_segctor_construct(sci, SC_LSEG_SR); | 2632 | ret = nilfs_segctor_construct(sci, SC_LSEG_SR); |
| 2610 | nilfs_transaction_unlock(sci->sc_super); | 2633 | nilfs_transaction_unlock(sci->sc_super); |
| 2611 | 2634 | ||
| 2635 | flush_work(&sci->sc_iput_work); | ||
| 2636 | |||
| 2612 | } while (ret && retrycount-- > 0); | 2637 | } while (ret && retrycount-- > 0); |
| 2613 | } | 2638 | } |
| 2614 | 2639 | ||
| @@ -2633,6 +2658,9 @@ static void nilfs_segctor_destroy(struct nilfs_sc_info *sci) | |||
| 2633 | || sci->sc_seq_request != sci->sc_seq_done); | 2658 | || sci->sc_seq_request != sci->sc_seq_done); |
| 2634 | spin_unlock(&sci->sc_state_lock); | 2659 | spin_unlock(&sci->sc_state_lock); |
| 2635 | 2660 | ||
| 2661 | if (flush_work(&sci->sc_iput_work)) | ||
| 2662 | flag = true; | ||
| 2663 | |||
| 2636 | if (flag || !nilfs_segctor_confirm(sci)) | 2664 | if (flag || !nilfs_segctor_confirm(sci)) |
| 2637 | nilfs_segctor_write_out(sci); | 2665 | nilfs_segctor_write_out(sci); |
| 2638 | 2666 | ||
| @@ -2642,6 +2670,12 @@ static void nilfs_segctor_destroy(struct nilfs_sc_info *sci) | |||
| 2642 | nilfs_dispose_list(nilfs, &sci->sc_dirty_files, 1); | 2670 | nilfs_dispose_list(nilfs, &sci->sc_dirty_files, 1); |
| 2643 | } | 2671 | } |
| 2644 | 2672 | ||
| 2673 | if (!list_empty(&sci->sc_iput_queue)) { | ||
| 2674 | nilfs_warning(sci->sc_super, __func__, | ||
| 2675 | "iput queue is not empty\n"); | ||
| 2676 | nilfs_dispose_list(nilfs, &sci->sc_iput_queue, 1); | ||
| 2677 | } | ||
| 2678 | |||
| 2645 | WARN_ON(!list_empty(&sci->sc_segbufs)); | 2679 | WARN_ON(!list_empty(&sci->sc_segbufs)); |
| 2646 | WARN_ON(!list_empty(&sci->sc_write_logs)); | 2680 | WARN_ON(!list_empty(&sci->sc_write_logs)); |
| 2647 | 2681 | ||
diff --git a/fs/nilfs2/segment.h b/fs/nilfs2/segment.h index 38a1d0013314..a48d6de1e02c 100644 --- a/fs/nilfs2/segment.h +++ b/fs/nilfs2/segment.h | |||
| @@ -26,6 +26,7 @@ | |||
| 26 | #include <linux/types.h> | 26 | #include <linux/types.h> |
| 27 | #include <linux/fs.h> | 27 | #include <linux/fs.h> |
| 28 | #include <linux/buffer_head.h> | 28 | #include <linux/buffer_head.h> |
| 29 | #include <linux/workqueue.h> | ||
| 29 | #include <linux/nilfs2_fs.h> | 30 | #include <linux/nilfs2_fs.h> |
| 30 | #include "nilfs.h" | 31 | #include "nilfs.h" |
| 31 | 32 | ||
| @@ -92,6 +93,8 @@ struct nilfs_segsum_pointer { | |||
| 92 | * @sc_nblk_inc: Block count of current generation | 93 | * @sc_nblk_inc: Block count of current generation |
| 93 | * @sc_dirty_files: List of files to be written | 94 | * @sc_dirty_files: List of files to be written |
| 94 | * @sc_gc_inodes: List of GC inodes having blocks to be written | 95 | * @sc_gc_inodes: List of GC inodes having blocks to be written |
| 96 | * @sc_iput_queue: list of inodes for which iput should be done | ||
| 97 | * @sc_iput_work: work struct to defer iput call | ||
| 95 | * @sc_freesegs: array of segment numbers to be freed | 98 | * @sc_freesegs: array of segment numbers to be freed |
| 96 | * @sc_nfreesegs: number of segments on @sc_freesegs | 99 | * @sc_nfreesegs: number of segments on @sc_freesegs |
| 97 | * @sc_dsync_inode: inode whose data pages are written for a sync operation | 100 | * @sc_dsync_inode: inode whose data pages are written for a sync operation |
| @@ -135,6 +138,8 @@ struct nilfs_sc_info { | |||
| 135 | 138 | ||
| 136 | struct list_head sc_dirty_files; | 139 | struct list_head sc_dirty_files; |
| 137 | struct list_head sc_gc_inodes; | 140 | struct list_head sc_gc_inodes; |
| 141 | struct list_head sc_iput_queue; | ||
| 142 | struct work_struct sc_iput_work; | ||
| 138 | 143 | ||
| 139 | __u64 *sc_freesegs; | 144 | __u64 *sc_freesegs; |
| 140 | size_t sc_nfreesegs; | 145 | size_t sc_nfreesegs; |
diff --git a/include/linux/wait.h b/include/linux/wait.h index 2232ed16635a..37423e0e1379 100644 --- a/include/linux/wait.h +++ b/include/linux/wait.h | |||
| @@ -363,7 +363,6 @@ do { \ | |||
| 363 | */ | 363 | */ |
| 364 | #define wait_event_cmd(wq, condition, cmd1, cmd2) \ | 364 | #define wait_event_cmd(wq, condition, cmd1, cmd2) \ |
| 365 | do { \ | 365 | do { \ |
| 366 | might_sleep(); \ | ||
| 367 | if (condition) \ | 366 | if (condition) \ |
| 368 | break; \ | 367 | break; \ |
| 369 | __wait_event_cmd(wq, condition, cmd1, cmd2); \ | 368 | __wait_event_cmd(wq, condition, cmd1, cmd2); \ |
diff --git a/include/sound/ak4113.h b/include/sound/ak4113.h index 2609048c1d44..3a34f6edc2d1 100644 --- a/include/sound/ak4113.h +++ b/include/sound/ak4113.h | |||
| @@ -286,7 +286,7 @@ struct ak4113 { | |||
| 286 | ak4113_write_t *write; | 286 | ak4113_write_t *write; |
| 287 | ak4113_read_t *read; | 287 | ak4113_read_t *read; |
| 288 | void *private_data; | 288 | void *private_data; |
| 289 | unsigned int init:1; | 289 | atomic_t wq_processing; |
| 290 | spinlock_t lock; | 290 | spinlock_t lock; |
| 291 | unsigned char regmap[AK4113_WRITABLE_REGS]; | 291 | unsigned char regmap[AK4113_WRITABLE_REGS]; |
| 292 | struct snd_kcontrol *kctls[AK4113_CONTROLS]; | 292 | struct snd_kcontrol *kctls[AK4113_CONTROLS]; |
diff --git a/include/sound/ak4114.h b/include/sound/ak4114.h index 52f02a60dba7..069299a88915 100644 --- a/include/sound/ak4114.h +++ b/include/sound/ak4114.h | |||
| @@ -168,7 +168,7 @@ struct ak4114 { | |||
| 168 | ak4114_write_t * write; | 168 | ak4114_write_t * write; |
| 169 | ak4114_read_t * read; | 169 | ak4114_read_t * read; |
| 170 | void * private_data; | 170 | void * private_data; |
| 171 | unsigned int init: 1; | 171 | atomic_t wq_processing; |
| 172 | spinlock_t lock; | 172 | spinlock_t lock; |
| 173 | unsigned char regmap[6]; | 173 | unsigned char regmap[6]; |
| 174 | unsigned char txcsb[5]; | 174 | unsigned char txcsb[5]; |
diff --git a/include/sound/soc.h b/include/sound/soc.h index b4fca9aed2a2..ac8b333acb4d 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h | |||
| @@ -498,6 +498,7 @@ int snd_soc_test_bits(struct snd_soc_codec *codec, unsigned int reg, | |||
| 498 | unsigned int mask, unsigned int value); | 498 | unsigned int mask, unsigned int value); |
| 499 | 499 | ||
| 500 | #ifdef CONFIG_SND_SOC_AC97_BUS | 500 | #ifdef CONFIG_SND_SOC_AC97_BUS |
| 501 | struct snd_ac97 *snd_soc_alloc_ac97_codec(struct snd_soc_codec *codec); | ||
| 501 | struct snd_ac97 *snd_soc_new_ac97_codec(struct snd_soc_codec *codec); | 502 | struct snd_ac97 *snd_soc_new_ac97_codec(struct snd_soc_codec *codec); |
| 502 | void snd_soc_free_ac97_codec(struct snd_ac97 *ac97); | 503 | void snd_soc_free_ac97_codec(struct snd_ac97 *ac97); |
| 503 | 504 | ||
diff --git a/kernel/sched/core.c b/kernel/sched/core.c index e628cb11b560..5eab11d4b747 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c | |||
| @@ -1814,6 +1814,10 @@ void __dl_clear_params(struct task_struct *p) | |||
| 1814 | dl_se->dl_period = 0; | 1814 | dl_se->dl_period = 0; |
| 1815 | dl_se->flags = 0; | 1815 | dl_se->flags = 0; |
| 1816 | dl_se->dl_bw = 0; | 1816 | dl_se->dl_bw = 0; |
| 1817 | |||
| 1818 | dl_se->dl_throttled = 0; | ||
| 1819 | dl_se->dl_new = 1; | ||
| 1820 | dl_se->dl_yielded = 0; | ||
| 1817 | } | 1821 | } |
| 1818 | 1822 | ||
| 1819 | /* | 1823 | /* |
| @@ -1839,7 +1843,7 @@ static void __sched_fork(unsigned long clone_flags, struct task_struct *p) | |||
| 1839 | #endif | 1843 | #endif |
| 1840 | 1844 | ||
| 1841 | RB_CLEAR_NODE(&p->dl.rb_node); | 1845 | RB_CLEAR_NODE(&p->dl.rb_node); |
| 1842 | hrtimer_init(&p->dl.dl_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); | 1846 | init_dl_task_timer(&p->dl); |
| 1843 | __dl_clear_params(p); | 1847 | __dl_clear_params(p); |
| 1844 | 1848 | ||
| 1845 | INIT_LIST_HEAD(&p->rt.run_list); | 1849 | INIT_LIST_HEAD(&p->rt.run_list); |
| @@ -2049,6 +2053,9 @@ static inline int dl_bw_cpus(int i) | |||
| 2049 | * allocated bandwidth to reflect the new situation. | 2053 | * allocated bandwidth to reflect the new situation. |
| 2050 | * | 2054 | * |
| 2051 | * This function is called while holding p's rq->lock. | 2055 | * This function is called while holding p's rq->lock. |
| 2056 | * | ||
| 2057 | * XXX we should delay bw change until the task's 0-lag point, see | ||
| 2058 | * __setparam_dl(). | ||
| 2052 | */ | 2059 | */ |
| 2053 | static int dl_overflow(struct task_struct *p, int policy, | 2060 | static int dl_overflow(struct task_struct *p, int policy, |
| 2054 | const struct sched_attr *attr) | 2061 | const struct sched_attr *attr) |
| @@ -3251,15 +3258,31 @@ __setparam_dl(struct task_struct *p, const struct sched_attr *attr) | |||
| 3251 | { | 3258 | { |
| 3252 | struct sched_dl_entity *dl_se = &p->dl; | 3259 | struct sched_dl_entity *dl_se = &p->dl; |
| 3253 | 3260 | ||
| 3254 | init_dl_task_timer(dl_se); | ||
| 3255 | dl_se->dl_runtime = attr->sched_runtime; | 3261 | dl_se->dl_runtime = attr->sched_runtime; |
| 3256 | dl_se->dl_deadline = attr->sched_deadline; | 3262 | dl_se->dl_deadline = attr->sched_deadline; |
| 3257 | dl_se->dl_period = attr->sched_period ?: dl_se->dl_deadline; | 3263 | dl_se->dl_period = attr->sched_period ?: dl_se->dl_deadline; |
| 3258 | dl_se->flags = attr->sched_flags; | 3264 | dl_se->flags = attr->sched_flags; |
| 3259 | dl_se->dl_bw = to_ratio(dl_se->dl_period, dl_se->dl_runtime); | 3265 | dl_se->dl_bw = to_ratio(dl_se->dl_period, dl_se->dl_runtime); |
| 3260 | dl_se->dl_throttled = 0; | 3266 | |
| 3261 | dl_se->dl_new = 1; | 3267 | /* |
| 3262 | dl_se->dl_yielded = 0; | 3268 | * Changing the parameters of a task is 'tricky' and we're not doing |
| 3269 | * the correct thing -- also see task_dead_dl() and switched_from_dl(). | ||
| 3270 | * | ||
| 3271 | * What we SHOULD do is delay the bandwidth release until the 0-lag | ||
| 3272 | * point. This would include retaining the task_struct until that time | ||
| 3273 | * and change dl_overflow() to not immediately decrement the current | ||
| 3274 | * amount. | ||
| 3275 | * | ||
| 3276 | * Instead we retain the current runtime/deadline and let the new | ||
| 3277 | * parameters take effect after the current reservation period lapses. | ||
| 3278 | * This is safe (albeit pessimistic) because the 0-lag point is always | ||
| 3279 | * before the current scheduling deadline. | ||
| 3280 | * | ||
| 3281 | * We can still have temporary overloads because we do not delay the | ||
| 3282 | * change in bandwidth until that time; so admission control is | ||
| 3283 | * not on the safe side. It does however guarantee tasks will never | ||
| 3284 | * consume more than promised. | ||
| 3285 | */ | ||
| 3263 | } | 3286 | } |
| 3264 | 3287 | ||
| 3265 | /* | 3288 | /* |
| @@ -4642,6 +4665,9 @@ int cpuset_cpumask_can_shrink(const struct cpumask *cur, | |||
| 4642 | struct dl_bw *cur_dl_b; | 4665 | struct dl_bw *cur_dl_b; |
| 4643 | unsigned long flags; | 4666 | unsigned long flags; |
| 4644 | 4667 | ||
| 4668 | if (!cpumask_weight(cur)) | ||
| 4669 | return ret; | ||
| 4670 | |||
| 4645 | rcu_read_lock_sched(); | 4671 | rcu_read_lock_sched(); |
| 4646 | cur_dl_b = dl_bw_of(cpumask_any(cur)); | 4672 | cur_dl_b = dl_bw_of(cpumask_any(cur)); |
| 4647 | trial_cpus = cpumask_weight(trial); | 4673 | trial_cpus = cpumask_weight(trial); |
diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c index b52092f2636d..726470d47f87 100644 --- a/kernel/sched/deadline.c +++ b/kernel/sched/deadline.c | |||
| @@ -1094,6 +1094,7 @@ static void task_dead_dl(struct task_struct *p) | |||
| 1094 | * Since we are TASK_DEAD we won't slip out of the domain! | 1094 | * Since we are TASK_DEAD we won't slip out of the domain! |
| 1095 | */ | 1095 | */ |
| 1096 | raw_spin_lock_irq(&dl_b->lock); | 1096 | raw_spin_lock_irq(&dl_b->lock); |
| 1097 | /* XXX we should retain the bw until 0-lag */ | ||
| 1097 | dl_b->total_bw -= p->dl.dl_bw; | 1098 | dl_b->total_bw -= p->dl.dl_bw; |
| 1098 | raw_spin_unlock_irq(&dl_b->lock); | 1099 | raw_spin_unlock_irq(&dl_b->lock); |
| 1099 | 1100 | ||
| @@ -1614,8 +1615,8 @@ static void cancel_dl_timer(struct rq *rq, struct task_struct *p) | |||
| 1614 | 1615 | ||
| 1615 | static void switched_from_dl(struct rq *rq, struct task_struct *p) | 1616 | static void switched_from_dl(struct rq *rq, struct task_struct *p) |
| 1616 | { | 1617 | { |
| 1618 | /* XXX we should retain the bw until 0-lag */ | ||
| 1617 | cancel_dl_timer(rq, p); | 1619 | cancel_dl_timer(rq, p); |
| 1618 | |||
| 1619 | __dl_clear_params(p); | 1620 | __dl_clear_params(p); |
| 1620 | 1621 | ||
| 1621 | /* | 1622 | /* |
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 40667cbf371b..fe331fc391f5 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c | |||
| @@ -1730,7 +1730,7 @@ static int preferred_group_nid(struct task_struct *p, int nid) | |||
| 1730 | nodes = node_online_map; | 1730 | nodes = node_online_map; |
| 1731 | for (dist = sched_max_numa_distance; dist > LOCAL_DISTANCE; dist--) { | 1731 | for (dist = sched_max_numa_distance; dist > LOCAL_DISTANCE; dist--) { |
| 1732 | unsigned long max_faults = 0; | 1732 | unsigned long max_faults = 0; |
| 1733 | nodemask_t max_group; | 1733 | nodemask_t max_group = NODE_MASK_NONE; |
| 1734 | int a, b; | 1734 | int a, b; |
| 1735 | 1735 | ||
| 1736 | /* Are there nodes at this distance from each other? */ | 1736 | /* Are there nodes at this distance from each other? */ |
diff --git a/kernel/smpboot.c b/kernel/smpboot.c index f032fb5284e3..40190f28db35 100644 --- a/kernel/smpboot.c +++ b/kernel/smpboot.c | |||
| @@ -280,6 +280,7 @@ int smpboot_register_percpu_thread(struct smp_hotplug_thread *plug_thread) | |||
| 280 | unsigned int cpu; | 280 | unsigned int cpu; |
| 281 | int ret = 0; | 281 | int ret = 0; |
| 282 | 282 | ||
| 283 | get_online_cpus(); | ||
| 283 | mutex_lock(&smpboot_threads_lock); | 284 | mutex_lock(&smpboot_threads_lock); |
| 284 | for_each_online_cpu(cpu) { | 285 | for_each_online_cpu(cpu) { |
| 285 | ret = __smpboot_create_thread(plug_thread, cpu); | 286 | ret = __smpboot_create_thread(plug_thread, cpu); |
| @@ -292,6 +293,7 @@ int smpboot_register_percpu_thread(struct smp_hotplug_thread *plug_thread) | |||
| 292 | list_add(&plug_thread->list, &hotplug_threads); | 293 | list_add(&plug_thread->list, &hotplug_threads); |
| 293 | out: | 294 | out: |
| 294 | mutex_unlock(&smpboot_threads_lock); | 295 | mutex_unlock(&smpboot_threads_lock); |
| 296 | put_online_cpus(); | ||
| 295 | return ret; | 297 | return ret; |
| 296 | } | 298 | } |
| 297 | EXPORT_SYMBOL_GPL(smpboot_register_percpu_thread); | 299 | EXPORT_SYMBOL_GPL(smpboot_register_percpu_thread); |
diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c index 37e50aadd471..d8c724cda37b 100644 --- a/kernel/time/hrtimer.c +++ b/kernel/time/hrtimer.c | |||
| @@ -122,7 +122,7 @@ static void hrtimer_get_softirq_time(struct hrtimer_cpu_base *base) | |||
| 122 | mono = ktime_get_update_offsets_tick(&off_real, &off_boot, &off_tai); | 122 | mono = ktime_get_update_offsets_tick(&off_real, &off_boot, &off_tai); |
| 123 | boot = ktime_add(mono, off_boot); | 123 | boot = ktime_add(mono, off_boot); |
| 124 | xtim = ktime_add(mono, off_real); | 124 | xtim = ktime_add(mono, off_real); |
| 125 | tai = ktime_add(xtim, off_tai); | 125 | tai = ktime_add(mono, off_tai); |
| 126 | 126 | ||
| 127 | base->clock_base[HRTIMER_BASE_REALTIME].softirq_time = xtim; | 127 | base->clock_base[HRTIMER_BASE_REALTIME].softirq_time = xtim; |
| 128 | base->clock_base[HRTIMER_BASE_MONOTONIC].softirq_time = mono; | 128 | base->clock_base[HRTIMER_BASE_MONOTONIC].softirq_time = mono; |
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 683b4782019b..2f6893c2f01b 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c | |||
| @@ -5773,7 +5773,7 @@ void mem_cgroup_uncharge_list(struct list_head *page_list) | |||
| 5773 | * mem_cgroup_migrate - migrate a charge to another page | 5773 | * mem_cgroup_migrate - migrate a charge to another page |
| 5774 | * @oldpage: currently charged page | 5774 | * @oldpage: currently charged page |
| 5775 | * @newpage: page to transfer the charge to | 5775 | * @newpage: page to transfer the charge to |
| 5776 | * @lrucare: both pages might be on the LRU already | 5776 | * @lrucare: either or both pages might be on the LRU already |
| 5777 | * | 5777 | * |
| 5778 | * Migrate the charge from @oldpage to @newpage. | 5778 | * Migrate the charge from @oldpage to @newpage. |
| 5779 | * | 5779 | * |
diff --git a/mm/nommu.c b/mm/nommu.c index b51eadf6d952..28bd8c4dff6f 100644 --- a/mm/nommu.c +++ b/mm/nommu.c | |||
| @@ -59,6 +59,7 @@ | |||
| 59 | #endif | 59 | #endif |
| 60 | 60 | ||
| 61 | void *high_memory; | 61 | void *high_memory; |
| 62 | EXPORT_SYMBOL(high_memory); | ||
| 62 | struct page *mem_map; | 63 | struct page *mem_map; |
| 63 | unsigned long max_mapnr; | 64 | unsigned long max_mapnr; |
| 64 | unsigned long highest_memmap_pfn; | 65 | unsigned long highest_memmap_pfn; |
diff --git a/mm/pagewalk.c b/mm/pagewalk.c index ad83195521f2..b264bda46e1b 100644 --- a/mm/pagewalk.c +++ b/mm/pagewalk.c | |||
| @@ -199,7 +199,10 @@ int walk_page_range(unsigned long addr, unsigned long end, | |||
| 199 | */ | 199 | */ |
| 200 | if ((vma->vm_start <= addr) && | 200 | if ((vma->vm_start <= addr) && |
| 201 | (vma->vm_flags & VM_PFNMAP)) { | 201 | (vma->vm_flags & VM_PFNMAP)) { |
| 202 | next = vma->vm_end; | 202 | if (walk->pte_hole) |
| 203 | err = walk->pte_hole(addr, next, walk); | ||
| 204 | if (err) | ||
| 205 | break; | ||
| 203 | pgd = pgd_offset(walk->mm, next); | 206 | pgd = pgd_offset(walk->mm, next); |
| 204 | continue; | 207 | continue; |
| 205 | } | 208 | } |
diff --git a/mm/shmem.c b/mm/shmem.c index 73ba1df7c8ba..993e6ba689cc 100644 --- a/mm/shmem.c +++ b/mm/shmem.c | |||
| @@ -1013,7 +1013,7 @@ static int shmem_replace_page(struct page **pagep, gfp_t gfp, | |||
| 1013 | */ | 1013 | */ |
| 1014 | oldpage = newpage; | 1014 | oldpage = newpage; |
| 1015 | } else { | 1015 | } else { |
| 1016 | mem_cgroup_migrate(oldpage, newpage, false); | 1016 | mem_cgroup_migrate(oldpage, newpage, true); |
| 1017 | lru_cache_add_anon(newpage); | 1017 | lru_cache_add_anon(newpage); |
| 1018 | *pagep = newpage; | 1018 | *pagep = newpage; |
| 1019 | } | 1019 | } |
diff --git a/sound/i2c/other/ak4113.c b/sound/i2c/other/ak4113.c index 1a3a6fa27158..c6bba99a90b2 100644 --- a/sound/i2c/other/ak4113.c +++ b/sound/i2c/other/ak4113.c | |||
| @@ -56,8 +56,7 @@ static inline unsigned char reg_read(struct ak4113 *ak4113, unsigned char reg) | |||
| 56 | 56 | ||
| 57 | static void snd_ak4113_free(struct ak4113 *chip) | 57 | static void snd_ak4113_free(struct ak4113 *chip) |
| 58 | { | 58 | { |
| 59 | chip->init = 1; /* don't schedule new work */ | 59 | atomic_inc(&chip->wq_processing); /* don't schedule new work */ |
| 60 | mb(); | ||
| 61 | cancel_delayed_work_sync(&chip->work); | 60 | cancel_delayed_work_sync(&chip->work); |
| 62 | kfree(chip); | 61 | kfree(chip); |
| 63 | } | 62 | } |
| @@ -89,6 +88,7 @@ int snd_ak4113_create(struct snd_card *card, ak4113_read_t *read, | |||
| 89 | chip->write = write; | 88 | chip->write = write; |
| 90 | chip->private_data = private_data; | 89 | chip->private_data = private_data; |
| 91 | INIT_DELAYED_WORK(&chip->work, ak4113_stats); | 90 | INIT_DELAYED_WORK(&chip->work, ak4113_stats); |
| 91 | atomic_set(&chip->wq_processing, 0); | ||
| 92 | 92 | ||
| 93 | for (reg = 0; reg < AK4113_WRITABLE_REGS ; reg++) | 93 | for (reg = 0; reg < AK4113_WRITABLE_REGS ; reg++) |
| 94 | chip->regmap[reg] = pgm[reg]; | 94 | chip->regmap[reg] = pgm[reg]; |
| @@ -139,13 +139,11 @@ static void ak4113_init_regs(struct ak4113 *chip) | |||
| 139 | 139 | ||
| 140 | void snd_ak4113_reinit(struct ak4113 *chip) | 140 | void snd_ak4113_reinit(struct ak4113 *chip) |
| 141 | { | 141 | { |
| 142 | chip->init = 1; | 142 | if (atomic_inc_return(&chip->wq_processing) == 1) |
| 143 | mb(); | 143 | cancel_delayed_work_sync(&chip->work); |
| 144 | flush_delayed_work(&chip->work); | ||
| 145 | ak4113_init_regs(chip); | 144 | ak4113_init_regs(chip); |
| 146 | /* bring up statistics / event queing */ | 145 | /* bring up statistics / event queing */ |
| 147 | chip->init = 0; | 146 | if (atomic_dec_and_test(&chip->wq_processing)) |
| 148 | if (chip->kctls[0]) | ||
| 149 | schedule_delayed_work(&chip->work, HZ / 10); | 147 | schedule_delayed_work(&chip->work, HZ / 10); |
| 150 | } | 148 | } |
| 151 | EXPORT_SYMBOL_GPL(snd_ak4113_reinit); | 149 | EXPORT_SYMBOL_GPL(snd_ak4113_reinit); |
| @@ -632,8 +630,9 @@ static void ak4113_stats(struct work_struct *work) | |||
| 632 | { | 630 | { |
| 633 | struct ak4113 *chip = container_of(work, struct ak4113, work.work); | 631 | struct ak4113 *chip = container_of(work, struct ak4113, work.work); |
| 634 | 632 | ||
| 635 | if (!chip->init) | 633 | if (atomic_inc_return(&chip->wq_processing) == 1) |
| 636 | snd_ak4113_check_rate_and_errors(chip, chip->check_flags); | 634 | snd_ak4113_check_rate_and_errors(chip, chip->check_flags); |
| 637 | 635 | ||
| 638 | schedule_delayed_work(&chip->work, HZ / 10); | 636 | if (atomic_dec_and_test(&chip->wq_processing)) |
| 637 | schedule_delayed_work(&chip->work, HZ / 10); | ||
| 639 | } | 638 | } |
diff --git a/sound/i2c/other/ak4114.c b/sound/i2c/other/ak4114.c index c7f56339415d..b70e6eccbd03 100644 --- a/sound/i2c/other/ak4114.c +++ b/sound/i2c/other/ak4114.c | |||
| @@ -66,8 +66,7 @@ static void reg_dump(struct ak4114 *ak4114) | |||
| 66 | 66 | ||
| 67 | static void snd_ak4114_free(struct ak4114 *chip) | 67 | static void snd_ak4114_free(struct ak4114 *chip) |
| 68 | { | 68 | { |
| 69 | chip->init = 1; /* don't schedule new work */ | 69 | atomic_inc(&chip->wq_processing); /* don't schedule new work */ |
| 70 | mb(); | ||
| 71 | cancel_delayed_work_sync(&chip->work); | 70 | cancel_delayed_work_sync(&chip->work); |
| 72 | kfree(chip); | 71 | kfree(chip); |
| 73 | } | 72 | } |
| @@ -100,6 +99,7 @@ int snd_ak4114_create(struct snd_card *card, | |||
| 100 | chip->write = write; | 99 | chip->write = write; |
| 101 | chip->private_data = private_data; | 100 | chip->private_data = private_data; |
| 102 | INIT_DELAYED_WORK(&chip->work, ak4114_stats); | 101 | INIT_DELAYED_WORK(&chip->work, ak4114_stats); |
| 102 | atomic_set(&chip->wq_processing, 0); | ||
| 103 | 103 | ||
| 104 | for (reg = 0; reg < 6; reg++) | 104 | for (reg = 0; reg < 6; reg++) |
| 105 | chip->regmap[reg] = pgm[reg]; | 105 | chip->regmap[reg] = pgm[reg]; |
| @@ -152,13 +152,11 @@ static void ak4114_init_regs(struct ak4114 *chip) | |||
| 152 | 152 | ||
| 153 | void snd_ak4114_reinit(struct ak4114 *chip) | 153 | void snd_ak4114_reinit(struct ak4114 *chip) |
| 154 | { | 154 | { |
| 155 | chip->init = 1; | 155 | if (atomic_inc_return(&chip->wq_processing) == 1) |
| 156 | mb(); | 156 | cancel_delayed_work_sync(&chip->work); |
| 157 | flush_delayed_work(&chip->work); | ||
| 158 | ak4114_init_regs(chip); | 157 | ak4114_init_regs(chip); |
| 159 | /* bring up statistics / event queing */ | 158 | /* bring up statistics / event queing */ |
| 160 | chip->init = 0; | 159 | if (atomic_dec_and_test(&chip->wq_processing)) |
| 161 | if (chip->kctls[0]) | ||
| 162 | schedule_delayed_work(&chip->work, HZ / 10); | 160 | schedule_delayed_work(&chip->work, HZ / 10); |
| 163 | } | 161 | } |
| 164 | 162 | ||
| @@ -612,10 +610,10 @@ static void ak4114_stats(struct work_struct *work) | |||
| 612 | { | 610 | { |
| 613 | struct ak4114 *chip = container_of(work, struct ak4114, work.work); | 611 | struct ak4114 *chip = container_of(work, struct ak4114, work.work); |
| 614 | 612 | ||
| 615 | if (!chip->init) | 613 | if (atomic_inc_return(&chip->wq_processing) == 1) |
| 616 | snd_ak4114_check_rate_and_errors(chip, chip->check_flags); | 614 | snd_ak4114_check_rate_and_errors(chip, chip->check_flags); |
| 617 | 615 | if (atomic_dec_and_test(&chip->wq_processing)) | |
| 618 | schedule_delayed_work(&chip->work, HZ / 10); | 616 | schedule_delayed_work(&chip->work, HZ / 10); |
| 619 | } | 617 | } |
| 620 | 618 | ||
| 621 | EXPORT_SYMBOL(snd_ak4114_create); | 619 | EXPORT_SYMBOL(snd_ak4114_create); |
diff --git a/sound/soc/atmel/atmel_ssc_dai.c b/sound/soc/atmel/atmel_ssc_dai.c index 99ff35e2a25d..35e44e463cfe 100644 --- a/sound/soc/atmel/atmel_ssc_dai.c +++ b/sound/soc/atmel/atmel_ssc_dai.c | |||
| @@ -348,7 +348,6 @@ static int atmel_ssc_hw_params(struct snd_pcm_substream *substream, | |||
| 348 | struct atmel_pcm_dma_params *dma_params; | 348 | struct atmel_pcm_dma_params *dma_params; |
| 349 | int dir, channels, bits; | 349 | int dir, channels, bits; |
| 350 | u32 tfmr, rfmr, tcmr, rcmr; | 350 | u32 tfmr, rfmr, tcmr, rcmr; |
| 351 | int start_event; | ||
| 352 | int ret; | 351 | int ret; |
| 353 | int fslen, fslen_ext; | 352 | int fslen, fslen_ext; |
| 354 | 353 | ||
| @@ -457,19 +456,10 @@ static int atmel_ssc_hw_params(struct snd_pcm_substream *substream, | |||
| 457 | * The SSC transmit clock is obtained from the BCLK signal on | 456 | * The SSC transmit clock is obtained from the BCLK signal on |
| 458 | * on the TK line, and the SSC receive clock is | 457 | * on the TK line, and the SSC receive clock is |
| 459 | * generated from the transmit clock. | 458 | * generated from the transmit clock. |
| 460 | * | ||
| 461 | * For single channel data, one sample is transferred | ||
| 462 | * on the falling edge of the LRC clock. | ||
| 463 | * For two channel data, one sample is | ||
| 464 | * transferred on both edges of the LRC clock. | ||
| 465 | */ | 459 | */ |
| 466 | start_event = ((channels == 1) | ||
| 467 | ? SSC_START_FALLING_RF | ||
| 468 | : SSC_START_EDGE_RF); | ||
| 469 | |||
| 470 | rcmr = SSC_BF(RCMR_PERIOD, 0) | 460 | rcmr = SSC_BF(RCMR_PERIOD, 0) |
| 471 | | SSC_BF(RCMR_STTDLY, START_DELAY) | 461 | | SSC_BF(RCMR_STTDLY, START_DELAY) |
| 472 | | SSC_BF(RCMR_START, start_event) | 462 | | SSC_BF(RCMR_START, SSC_START_FALLING_RF) |
| 473 | | SSC_BF(RCMR_CKI, SSC_CKI_RISING) | 463 | | SSC_BF(RCMR_CKI, SSC_CKI_RISING) |
| 474 | | SSC_BF(RCMR_CKO, SSC_CKO_NONE) | 464 | | SSC_BF(RCMR_CKO, SSC_CKO_NONE) |
| 475 | | SSC_BF(RCMR_CKS, ssc->clk_from_rk_pin ? | 465 | | SSC_BF(RCMR_CKS, ssc->clk_from_rk_pin ? |
| @@ -478,14 +468,14 @@ static int atmel_ssc_hw_params(struct snd_pcm_substream *substream, | |||
| 478 | rfmr = SSC_BF(RFMR_FSEDGE, SSC_FSEDGE_POSITIVE) | 468 | rfmr = SSC_BF(RFMR_FSEDGE, SSC_FSEDGE_POSITIVE) |
| 479 | | SSC_BF(RFMR_FSOS, SSC_FSOS_NONE) | 469 | | SSC_BF(RFMR_FSOS, SSC_FSOS_NONE) |
| 480 | | SSC_BF(RFMR_FSLEN, 0) | 470 | | SSC_BF(RFMR_FSLEN, 0) |
| 481 | | SSC_BF(RFMR_DATNB, 0) | 471 | | SSC_BF(RFMR_DATNB, (channels - 1)) |
| 482 | | SSC_BIT(RFMR_MSBF) | 472 | | SSC_BIT(RFMR_MSBF) |
| 483 | | SSC_BF(RFMR_LOOP, 0) | 473 | | SSC_BF(RFMR_LOOP, 0) |
| 484 | | SSC_BF(RFMR_DATLEN, (bits - 1)); | 474 | | SSC_BF(RFMR_DATLEN, (bits - 1)); |
| 485 | 475 | ||
| 486 | tcmr = SSC_BF(TCMR_PERIOD, 0) | 476 | tcmr = SSC_BF(TCMR_PERIOD, 0) |
| 487 | | SSC_BF(TCMR_STTDLY, START_DELAY) | 477 | | SSC_BF(TCMR_STTDLY, START_DELAY) |
| 488 | | SSC_BF(TCMR_START, start_event) | 478 | | SSC_BF(TCMR_START, SSC_START_FALLING_RF) |
| 489 | | SSC_BF(TCMR_CKI, SSC_CKI_FALLING) | 479 | | SSC_BF(TCMR_CKI, SSC_CKI_FALLING) |
| 490 | | SSC_BF(TCMR_CKO, SSC_CKO_NONE) | 480 | | SSC_BF(TCMR_CKO, SSC_CKO_NONE) |
| 491 | | SSC_BF(TCMR_CKS, ssc->clk_from_rk_pin ? | 481 | | SSC_BF(TCMR_CKS, ssc->clk_from_rk_pin ? |
| @@ -495,7 +485,7 @@ static int atmel_ssc_hw_params(struct snd_pcm_substream *substream, | |||
| 495 | | SSC_BF(TFMR_FSDEN, 0) | 485 | | SSC_BF(TFMR_FSDEN, 0) |
| 496 | | SSC_BF(TFMR_FSOS, SSC_FSOS_NONE) | 486 | | SSC_BF(TFMR_FSOS, SSC_FSOS_NONE) |
| 497 | | SSC_BF(TFMR_FSLEN, 0) | 487 | | SSC_BF(TFMR_FSLEN, 0) |
| 498 | | SSC_BF(TFMR_DATNB, 0) | 488 | | SSC_BF(TFMR_DATNB, (channels - 1)) |
| 499 | | SSC_BIT(TFMR_MSBF) | 489 | | SSC_BIT(TFMR_MSBF) |
| 500 | | SSC_BF(TFMR_DATDEF, 0) | 490 | | SSC_BF(TFMR_DATDEF, 0) |
| 501 | | SSC_BF(TFMR_DATLEN, (bits - 1)); | 491 | | SSC_BF(TFMR_DATLEN, (bits - 1)); |
| @@ -512,7 +502,7 @@ static int atmel_ssc_hw_params(struct snd_pcm_substream *substream, | |||
| 512 | rcmr = SSC_BF(RCMR_PERIOD, ssc_p->rcmr_period) | 502 | rcmr = SSC_BF(RCMR_PERIOD, ssc_p->rcmr_period) |
| 513 | | SSC_BF(RCMR_STTDLY, 1) | 503 | | SSC_BF(RCMR_STTDLY, 1) |
| 514 | | SSC_BF(RCMR_START, SSC_START_RISING_RF) | 504 | | SSC_BF(RCMR_START, SSC_START_RISING_RF) |
| 515 | | SSC_BF(RCMR_CKI, SSC_CKI_RISING) | 505 | | SSC_BF(RCMR_CKI, SSC_CKI_FALLING) |
| 516 | | SSC_BF(RCMR_CKO, SSC_CKO_NONE) | 506 | | SSC_BF(RCMR_CKO, SSC_CKO_NONE) |
| 517 | | SSC_BF(RCMR_CKS, SSC_CKS_DIV); | 507 | | SSC_BF(RCMR_CKS, SSC_CKS_DIV); |
| 518 | 508 | ||
| @@ -527,7 +517,7 @@ static int atmel_ssc_hw_params(struct snd_pcm_substream *substream, | |||
| 527 | tcmr = SSC_BF(TCMR_PERIOD, ssc_p->tcmr_period) | 517 | tcmr = SSC_BF(TCMR_PERIOD, ssc_p->tcmr_period) |
| 528 | | SSC_BF(TCMR_STTDLY, 1) | 518 | | SSC_BF(TCMR_STTDLY, 1) |
| 529 | | SSC_BF(TCMR_START, SSC_START_RISING_RF) | 519 | | SSC_BF(TCMR_START, SSC_START_RISING_RF) |
| 530 | | SSC_BF(TCMR_CKI, SSC_CKI_RISING) | 520 | | SSC_BF(TCMR_CKI, SSC_CKI_FALLING) |
| 531 | | SSC_BF(TCMR_CKO, SSC_CKO_CONTINUOUS) | 521 | | SSC_BF(TCMR_CKO, SSC_CKO_CONTINUOUS) |
| 532 | | SSC_BF(TCMR_CKS, SSC_CKS_DIV); | 522 | | SSC_BF(TCMR_CKS, SSC_CKS_DIV); |
| 533 | 523 | ||
| @@ -556,7 +546,7 @@ static int atmel_ssc_hw_params(struct snd_pcm_substream *substream, | |||
| 556 | rcmr = SSC_BF(RCMR_PERIOD, 0) | 546 | rcmr = SSC_BF(RCMR_PERIOD, 0) |
| 557 | | SSC_BF(RCMR_STTDLY, START_DELAY) | 547 | | SSC_BF(RCMR_STTDLY, START_DELAY) |
| 558 | | SSC_BF(RCMR_START, SSC_START_RISING_RF) | 548 | | SSC_BF(RCMR_START, SSC_START_RISING_RF) |
| 559 | | SSC_BF(RCMR_CKI, SSC_CKI_RISING) | 549 | | SSC_BF(RCMR_CKI, SSC_CKI_FALLING) |
| 560 | | SSC_BF(RCMR_CKO, SSC_CKO_NONE) | 550 | | SSC_BF(RCMR_CKO, SSC_CKO_NONE) |
| 561 | | SSC_BF(RCMR_CKS, ssc->clk_from_rk_pin ? | 551 | | SSC_BF(RCMR_CKS, ssc->clk_from_rk_pin ? |
| 562 | SSC_CKS_PIN : SSC_CKS_CLOCK); | 552 | SSC_CKS_PIN : SSC_CKS_CLOCK); |
diff --git a/sound/soc/codecs/rt5640.c b/sound/soc/codecs/rt5640.c index c3f2decd643c..1ff726c29249 100644 --- a/sound/soc/codecs/rt5640.c +++ b/sound/soc/codecs/rt5640.c | |||
| @@ -2124,6 +2124,7 @@ MODULE_DEVICE_TABLE(of, rt5640_of_match); | |||
| 2124 | static struct acpi_device_id rt5640_acpi_match[] = { | 2124 | static struct acpi_device_id rt5640_acpi_match[] = { |
| 2125 | { "INT33CA", 0 }, | 2125 | { "INT33CA", 0 }, |
| 2126 | { "10EC5640", 0 }, | 2126 | { "10EC5640", 0 }, |
| 2127 | { "10EC5642", 0 }, | ||
| 2127 | { }, | 2128 | { }, |
| 2128 | }; | 2129 | }; |
| 2129 | MODULE_DEVICE_TABLE(acpi, rt5640_acpi_match); | 2130 | MODULE_DEVICE_TABLE(acpi, rt5640_acpi_match); |
diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c index 29cf7ce610f4..aa98be32bb60 100644 --- a/sound/soc/codecs/sgtl5000.c +++ b/sound/soc/codecs/sgtl5000.c | |||
| @@ -483,21 +483,21 @@ static int sgtl5000_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt) | |||
| 483 | /* setting i2s data format */ | 483 | /* setting i2s data format */ |
| 484 | switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) { | 484 | switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) { |
| 485 | case SND_SOC_DAIFMT_DSP_A: | 485 | case SND_SOC_DAIFMT_DSP_A: |
| 486 | i2sctl |= SGTL5000_I2S_MODE_PCM; | 486 | i2sctl |= SGTL5000_I2S_MODE_PCM << SGTL5000_I2S_MODE_SHIFT; |
| 487 | break; | 487 | break; |
| 488 | case SND_SOC_DAIFMT_DSP_B: | 488 | case SND_SOC_DAIFMT_DSP_B: |
| 489 | i2sctl |= SGTL5000_I2S_MODE_PCM; | 489 | i2sctl |= SGTL5000_I2S_MODE_PCM << SGTL5000_I2S_MODE_SHIFT; |
| 490 | i2sctl |= SGTL5000_I2S_LRALIGN; | 490 | i2sctl |= SGTL5000_I2S_LRALIGN; |
| 491 | break; | 491 | break; |
| 492 | case SND_SOC_DAIFMT_I2S: | 492 | case SND_SOC_DAIFMT_I2S: |
| 493 | i2sctl |= SGTL5000_I2S_MODE_I2S_LJ; | 493 | i2sctl |= SGTL5000_I2S_MODE_I2S_LJ << SGTL5000_I2S_MODE_SHIFT; |
| 494 | break; | 494 | break; |
| 495 | case SND_SOC_DAIFMT_RIGHT_J: | 495 | case SND_SOC_DAIFMT_RIGHT_J: |
| 496 | i2sctl |= SGTL5000_I2S_MODE_RJ; | 496 | i2sctl |= SGTL5000_I2S_MODE_RJ << SGTL5000_I2S_MODE_SHIFT; |
| 497 | i2sctl |= SGTL5000_I2S_LRPOL; | 497 | i2sctl |= SGTL5000_I2S_LRPOL; |
| 498 | break; | 498 | break; |
| 499 | case SND_SOC_DAIFMT_LEFT_J: | 499 | case SND_SOC_DAIFMT_LEFT_J: |
| 500 | i2sctl |= SGTL5000_I2S_MODE_I2S_LJ; | 500 | i2sctl |= SGTL5000_I2S_MODE_I2S_LJ << SGTL5000_I2S_MODE_SHIFT; |
| 501 | i2sctl |= SGTL5000_I2S_LRALIGN; | 501 | i2sctl |= SGTL5000_I2S_LRALIGN; |
| 502 | break; | 502 | break; |
| 503 | default: | 503 | default: |
| @@ -1462,6 +1462,9 @@ static int sgtl5000_i2c_probe(struct i2c_client *client, | |||
| 1462 | if (ret) | 1462 | if (ret) |
| 1463 | return ret; | 1463 | return ret; |
| 1464 | 1464 | ||
| 1465 | /* Need 8 clocks before I2C accesses */ | ||
| 1466 | udelay(1); | ||
| 1467 | |||
| 1465 | /* read chip information */ | 1468 | /* read chip information */ |
| 1466 | ret = regmap_read(sgtl5000->regmap, SGTL5000_CHIP_ID, ®); | 1469 | ret = regmap_read(sgtl5000->regmap, SGTL5000_CHIP_ID, ®); |
| 1467 | if (ret) | 1470 | if (ret) |
diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c index b7ebce054b4e..dd222b10ce13 100644 --- a/sound/soc/codecs/tlv320aic3x.c +++ b/sound/soc/codecs/tlv320aic3x.c | |||
| @@ -1046,7 +1046,7 @@ static int aic3x_prepare(struct snd_pcm_substream *substream, | |||
| 1046 | delay += aic3x->tdm_delay; | 1046 | delay += aic3x->tdm_delay; |
| 1047 | 1047 | ||
| 1048 | /* Configure data delay */ | 1048 | /* Configure data delay */ |
| 1049 | snd_soc_write(codec, AIC3X_ASD_INTF_CTRLC, aic3x->tdm_delay); | 1049 | snd_soc_write(codec, AIC3X_ASD_INTF_CTRLC, delay); |
| 1050 | 1050 | ||
| 1051 | return 0; | 1051 | return 0; |
| 1052 | } | 1052 | } |
diff --git a/sound/soc/codecs/wm8731.c b/sound/soc/codecs/wm8731.c index b9211b42f6e9..b115ed815db9 100644 --- a/sound/soc/codecs/wm8731.c +++ b/sound/soc/codecs/wm8731.c | |||
| @@ -717,6 +717,8 @@ static int wm8731_i2c_probe(struct i2c_client *i2c, | |||
| 717 | if (wm8731 == NULL) | 717 | if (wm8731 == NULL) |
| 718 | return -ENOMEM; | 718 | return -ENOMEM; |
| 719 | 719 | ||
| 720 | mutex_init(&wm8731->lock); | ||
| 721 | |||
| 720 | wm8731->regmap = devm_regmap_init_i2c(i2c, &wm8731_regmap); | 722 | wm8731->regmap = devm_regmap_init_i2c(i2c, &wm8731_regmap); |
| 721 | if (IS_ERR(wm8731->regmap)) { | 723 | if (IS_ERR(wm8731->regmap)) { |
| 722 | ret = PTR_ERR(wm8731->regmap); | 724 | ret = PTR_ERR(wm8731->regmap); |
diff --git a/sound/soc/codecs/wm9705.c b/sound/soc/codecs/wm9705.c index 3eddb18fefd1..5cc457ef8894 100644 --- a/sound/soc/codecs/wm9705.c +++ b/sound/soc/codecs/wm9705.c | |||
| @@ -344,23 +344,27 @@ static int wm9705_soc_probe(struct snd_soc_codec *codec) | |||
| 344 | struct snd_ac97 *ac97; | 344 | struct snd_ac97 *ac97; |
| 345 | int ret = 0; | 345 | int ret = 0; |
| 346 | 346 | ||
| 347 | ac97 = snd_soc_new_ac97_codec(codec); | 347 | ac97 = snd_soc_alloc_ac97_codec(codec); |
| 348 | if (IS_ERR(ac97)) { | 348 | if (IS_ERR(ac97)) { |
| 349 | ret = PTR_ERR(ac97); | 349 | ret = PTR_ERR(ac97); |
| 350 | dev_err(codec->dev, "Failed to register AC97 codec\n"); | 350 | dev_err(codec->dev, "Failed to register AC97 codec\n"); |
| 351 | return ret; | 351 | return ret; |
| 352 | } | 352 | } |
| 353 | 353 | ||
| 354 | snd_soc_codec_set_drvdata(codec, ac97); | ||
| 355 | |||
| 356 | ret = wm9705_reset(codec); | 354 | ret = wm9705_reset(codec); |
| 357 | if (ret) | 355 | if (ret) |
| 358 | goto reset_err; | 356 | goto err_put_device; |
| 357 | |||
| 358 | ret = device_add(&ac97->dev); | ||
| 359 | if (ret) | ||
| 360 | goto err_put_device; | ||
| 361 | |||
| 362 | snd_soc_codec_set_drvdata(codec, ac97); | ||
| 359 | 363 | ||
| 360 | return 0; | 364 | return 0; |
| 361 | 365 | ||
| 362 | reset_err: | 366 | err_put_device: |
| 363 | snd_soc_free_ac97_codec(ac97); | 367 | put_device(&ac97->dev); |
| 364 | return ret; | 368 | return ret; |
| 365 | } | 369 | } |
| 366 | 370 | ||
diff --git a/sound/soc/codecs/wm9712.c b/sound/soc/codecs/wm9712.c index e04643d2bb24..9517571e820d 100644 --- a/sound/soc/codecs/wm9712.c +++ b/sound/soc/codecs/wm9712.c | |||
| @@ -666,7 +666,7 @@ static int wm9712_soc_probe(struct snd_soc_codec *codec) | |||
| 666 | struct wm9712_priv *wm9712 = snd_soc_codec_get_drvdata(codec); | 666 | struct wm9712_priv *wm9712 = snd_soc_codec_get_drvdata(codec); |
| 667 | int ret = 0; | 667 | int ret = 0; |
| 668 | 668 | ||
| 669 | wm9712->ac97 = snd_soc_new_ac97_codec(codec); | 669 | wm9712->ac97 = snd_soc_alloc_ac97_codec(codec); |
| 670 | if (IS_ERR(wm9712->ac97)) { | 670 | if (IS_ERR(wm9712->ac97)) { |
| 671 | ret = PTR_ERR(wm9712->ac97); | 671 | ret = PTR_ERR(wm9712->ac97); |
| 672 | dev_err(codec->dev, "Failed to register AC97 codec: %d\n", ret); | 672 | dev_err(codec->dev, "Failed to register AC97 codec: %d\n", ret); |
| @@ -675,15 +675,19 @@ static int wm9712_soc_probe(struct snd_soc_codec *codec) | |||
| 675 | 675 | ||
| 676 | ret = wm9712_reset(codec, 0); | 676 | ret = wm9712_reset(codec, 0); |
| 677 | if (ret < 0) | 677 | if (ret < 0) |
| 678 | goto reset_err; | 678 | goto err_put_device; |
| 679 | |||
| 680 | ret = device_add(&wm9712->ac97->dev); | ||
| 681 | if (ret) | ||
| 682 | goto err_put_device; | ||
| 679 | 683 | ||
| 680 | /* set alc mux to none */ | 684 | /* set alc mux to none */ |
| 681 | ac97_write(codec, AC97_VIDEO, ac97_read(codec, AC97_VIDEO) | 0x3000); | 685 | ac97_write(codec, AC97_VIDEO, ac97_read(codec, AC97_VIDEO) | 0x3000); |
| 682 | 686 | ||
| 683 | return 0; | 687 | return 0; |
| 684 | 688 | ||
| 685 | reset_err: | 689 | err_put_device: |
| 686 | snd_soc_free_ac97_codec(wm9712->ac97); | 690 | put_device(&wm9712->ac97->dev); |
| 687 | return ret; | 691 | return ret; |
| 688 | } | 692 | } |
| 689 | 693 | ||
diff --git a/sound/soc/codecs/wm9713.c b/sound/soc/codecs/wm9713.c index 71b9d5b0734d..6ab1122a3872 100644 --- a/sound/soc/codecs/wm9713.c +++ b/sound/soc/codecs/wm9713.c | |||
| @@ -1225,7 +1225,7 @@ static int wm9713_soc_probe(struct snd_soc_codec *codec) | |||
| 1225 | struct wm9713_priv *wm9713 = snd_soc_codec_get_drvdata(codec); | 1225 | struct wm9713_priv *wm9713 = snd_soc_codec_get_drvdata(codec); |
| 1226 | int ret = 0, reg; | 1226 | int ret = 0, reg; |
| 1227 | 1227 | ||
| 1228 | wm9713->ac97 = snd_soc_new_ac97_codec(codec); | 1228 | wm9713->ac97 = snd_soc_alloc_ac97_codec(codec); |
| 1229 | if (IS_ERR(wm9713->ac97)) | 1229 | if (IS_ERR(wm9713->ac97)) |
| 1230 | return PTR_ERR(wm9713->ac97); | 1230 | return PTR_ERR(wm9713->ac97); |
| 1231 | 1231 | ||
| @@ -1234,7 +1234,11 @@ static int wm9713_soc_probe(struct snd_soc_codec *codec) | |||
| 1234 | wm9713_reset(codec, 0); | 1234 | wm9713_reset(codec, 0); |
| 1235 | ret = wm9713_reset(codec, 1); | 1235 | ret = wm9713_reset(codec, 1); |
| 1236 | if (ret < 0) | 1236 | if (ret < 0) |
| 1237 | goto reset_err; | 1237 | goto err_put_device; |
| 1238 | |||
| 1239 | ret = device_add(&wm9713->ac97->dev); | ||
| 1240 | if (ret) | ||
| 1241 | goto err_put_device; | ||
| 1238 | 1242 | ||
| 1239 | /* unmute the adc - move to kcontrol */ | 1243 | /* unmute the adc - move to kcontrol */ |
| 1240 | reg = ac97_read(codec, AC97_CD) & 0x7fff; | 1244 | reg = ac97_read(codec, AC97_CD) & 0x7fff; |
| @@ -1242,8 +1246,8 @@ static int wm9713_soc_probe(struct snd_soc_codec *codec) | |||
| 1242 | 1246 | ||
| 1243 | return 0; | 1247 | return 0; |
| 1244 | 1248 | ||
| 1245 | reset_err: | 1249 | err_put_device: |
| 1246 | snd_soc_free_ac97_codec(wm9713->ac97); | 1250 | put_device(&wm9713->ac97->dev); |
| 1247 | return ret; | 1251 | return ret; |
| 1248 | } | 1252 | } |
| 1249 | 1253 | ||
diff --git a/sound/soc/intel/sst-haswell-ipc.c b/sound/soc/intel/sst-haswell-ipc.c index 5bf14040c24a..8156cc1accb7 100644 --- a/sound/soc/intel/sst-haswell-ipc.c +++ b/sound/soc/intel/sst-haswell-ipc.c | |||
| @@ -651,11 +651,11 @@ static void hsw_notification_work(struct work_struct *work) | |||
| 651 | } | 651 | } |
| 652 | 652 | ||
| 653 | /* tell DSP that notification has been handled */ | 653 | /* tell DSP that notification has been handled */ |
| 654 | sst_dsp_shim_update_bits_unlocked(hsw->dsp, SST_IPCD, | 654 | sst_dsp_shim_update_bits(hsw->dsp, SST_IPCD, |
| 655 | SST_IPCD_BUSY | SST_IPCD_DONE, SST_IPCD_DONE); | 655 | SST_IPCD_BUSY | SST_IPCD_DONE, SST_IPCD_DONE); |
| 656 | 656 | ||
| 657 | /* unmask busy interrupt */ | 657 | /* unmask busy interrupt */ |
| 658 | sst_dsp_shim_update_bits_unlocked(hsw->dsp, SST_IMRX, SST_IMRX_BUSY, 0); | 658 | sst_dsp_shim_update_bits(hsw->dsp, SST_IMRX, SST_IMRX_BUSY, 0); |
| 659 | } | 659 | } |
| 660 | 660 | ||
| 661 | static struct ipc_message *reply_find_msg(struct sst_hsw *hsw, u32 header) | 661 | static struct ipc_message *reply_find_msg(struct sst_hsw *hsw, u32 header) |
diff --git a/sound/soc/intel/sst/sst_acpi.c b/sound/soc/intel/sst/sst_acpi.c index 2ac72eb5e75d..b3360139c41a 100644 --- a/sound/soc/intel/sst/sst_acpi.c +++ b/sound/soc/intel/sst/sst_acpi.c | |||
| @@ -350,7 +350,7 @@ static struct sst_machines sst_acpi_bytcr[] = { | |||
| 350 | 350 | ||
| 351 | /* Cherryview-based platforms: CherryTrail and Braswell */ | 351 | /* Cherryview-based platforms: CherryTrail and Braswell */ |
| 352 | static struct sst_machines sst_acpi_chv[] = { | 352 | static struct sst_machines sst_acpi_chv[] = { |
| 353 | {"10EC5670", "cht-bsw", "cht-bsw-rt5672", NULL, "fw_sst_22a8.bin", | 353 | {"10EC5670", "cht-bsw", "cht-bsw-rt5672", NULL, "intel/fw_sst_22a8.bin", |
| 354 | &chv_platform_data }, | 354 | &chv_platform_data }, |
| 355 | {}, | 355 | {}, |
| 356 | }; | 356 | }; |
diff --git a/sound/soc/soc-ac97.c b/sound/soc/soc-ac97.c index 2e10e9a38376..08d7259bbaab 100644 --- a/sound/soc/soc-ac97.c +++ b/sound/soc/soc-ac97.c | |||
| @@ -48,15 +48,18 @@ static void soc_ac97_device_release(struct device *dev) | |||
| 48 | } | 48 | } |
| 49 | 49 | ||
| 50 | /** | 50 | /** |
| 51 | * snd_soc_new_ac97_codec - initailise AC97 device | 51 | * snd_soc_alloc_ac97_codec() - Allocate new a AC'97 device |
| 52 | * @codec: audio codec | 52 | * @codec: The CODEC for which to create the AC'97 device |
| 53 | * | 53 | * |
| 54 | * Initialises AC97 codec resources for use by ad-hoc devices only. | 54 | * Allocated a new snd_ac97 device and intializes it, but does not yet register |
| 55 | * it. The caller is responsible to either call device_add(&ac97->dev) to | ||
| 56 | * register the device, or to call put_device(&ac97->dev) to free the device. | ||
| 57 | * | ||
| 58 | * Returns: A snd_ac97 device or a PTR_ERR in case of an error. | ||
| 55 | */ | 59 | */ |
| 56 | struct snd_ac97 *snd_soc_new_ac97_codec(struct snd_soc_codec *codec) | 60 | struct snd_ac97 *snd_soc_alloc_ac97_codec(struct snd_soc_codec *codec) |
| 57 | { | 61 | { |
| 58 | struct snd_ac97 *ac97; | 62 | struct snd_ac97 *ac97; |
| 59 | int ret; | ||
| 60 | 63 | ||
| 61 | ac97 = kzalloc(sizeof(struct snd_ac97), GFP_KERNEL); | 64 | ac97 = kzalloc(sizeof(struct snd_ac97), GFP_KERNEL); |
| 62 | if (ac97 == NULL) | 65 | if (ac97 == NULL) |
| @@ -73,7 +76,28 @@ struct snd_ac97 *snd_soc_new_ac97_codec(struct snd_soc_codec *codec) | |||
| 73 | codec->component.card->snd_card->number, 0, | 76 | codec->component.card->snd_card->number, 0, |
| 74 | codec->component.name); | 77 | codec->component.name); |
| 75 | 78 | ||
| 76 | ret = device_register(&ac97->dev); | 79 | device_initialize(&ac97->dev); |
| 80 | |||
| 81 | return ac97; | ||
| 82 | } | ||
| 83 | EXPORT_SYMBOL(snd_soc_alloc_ac97_codec); | ||
| 84 | |||
| 85 | /** | ||
| 86 | * snd_soc_new_ac97_codec - initailise AC97 device | ||
| 87 | * @codec: audio codec | ||
| 88 | * | ||
| 89 | * Initialises AC97 codec resources for use by ad-hoc devices only. | ||
| 90 | */ | ||
| 91 | struct snd_ac97 *snd_soc_new_ac97_codec(struct snd_soc_codec *codec) | ||
| 92 | { | ||
| 93 | struct snd_ac97 *ac97; | ||
| 94 | int ret; | ||
| 95 | |||
| 96 | ac97 = snd_soc_alloc_ac97_codec(codec); | ||
| 97 | if (IS_ERR(ac97)) | ||
| 98 | return ac97; | ||
| 99 | |||
| 100 | ret = device_add(&ac97->dev); | ||
| 77 | if (ret) { | 101 | if (ret) { |
| 78 | put_device(&ac97->dev); | 102 | put_device(&ac97->dev); |
| 79 | return ERR_PTR(ret); | 103 | return ERR_PTR(ret); |
diff --git a/tools/lib/lockdep/.gitignore b/tools/lib/lockdep/.gitignore new file mode 100644 index 000000000000..cc0e7a9f99e3 --- /dev/null +++ b/tools/lib/lockdep/.gitignore | |||
| @@ -0,0 +1 @@ | |||
| liblockdep.so.* | |||
diff --git a/tools/lib/lockdep/Makefile b/tools/lib/lockdep/Makefile index 52f9279c6c13..4b866c54f624 100644 --- a/tools/lib/lockdep/Makefile +++ b/tools/lib/lockdep/Makefile | |||
| @@ -104,7 +104,7 @@ N = | |||
| 104 | 104 | ||
| 105 | export Q VERBOSE | 105 | export Q VERBOSE |
| 106 | 106 | ||
| 107 | INCLUDES = -I. -I/usr/local/include -I./uinclude -I./include -I../../include $(CONFIG_INCLUDES) | 107 | INCLUDES = -I. -I./uinclude -I./include -I../../include $(CONFIG_INCLUDES) |
| 108 | 108 | ||
| 109 | # Set compile option CFLAGS if not set elsewhere | 109 | # Set compile option CFLAGS if not set elsewhere |
| 110 | CFLAGS ?= -g -DCONFIG_LOCKDEP -DCONFIG_STACKTRACE -DCONFIG_PROVE_LOCKING -DBITS_PER_LONG=__WORDSIZE -DLIBLOCKDEP_VERSION='"$(LIBLOCKDEP_VERSION)"' -rdynamic -O0 -g | 110 | CFLAGS ?= -g -DCONFIG_LOCKDEP -DCONFIG_STACKTRACE -DCONFIG_PROVE_LOCKING -DBITS_PER_LONG=__WORDSIZE -DLIBLOCKDEP_VERSION='"$(LIBLOCKDEP_VERSION)"' -rdynamic -O0 -g |
