aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-09-15locking/static_keys: Fix up the static keys documentationJonathan Corbet2-8/+6
Fix a few small mistakes in the static key documentation and delete an unneeded sentence. Suggested-by: Jason Baron <[email protected]> Signed-off-by: Jonathan Corbet <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
2015-09-15btrfs: skip waiting on ordered range for special filesJeff Mahoney1-1/+2
In btrfs_evict_inode, we properly truncate the page cache for evicted inodes but then we call btrfs_wait_ordered_range for every inode as well. It's the right thing to do for regular files but results in incorrect behavior for device inodes for block devices. filemap_fdatawrite_range gets called with inode->i_mapping which gets resolved to the block device inode before getting passed to wbc_attach_fdatawrite_inode and ultimately to inode_to_bdi. What happens next depends on whether there's an open file handle associated with the inode. If there is, we write to the block device, which is unexpected behavior. If there isn't, we through normally and inode->i_data is used. We can also end up racing against open/close which can result in crashes when i_mapping points to a block device inode that has been closed. Since there can't be any page cache associated with special file inodes, it's safe to skip the btrfs_wait_ordered_range call entirely and avoid the problem. Cc: <[email protected]> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=100911 Tested-by: Christoph Biedl <[email protected]> Signed-off-by: Jeff Mahoney <[email protected]> Reviewed-by: Filipe Manana <[email protected]>
2015-09-15ACPI: Eliminate CONFIG_.*{, _MODULE} #ifdef in favor of IS_ENABLED()Sudeep Holla4-16/+11
This commit removes all CONFIG_.*{,_MODULE} in ACPI code, replacing it with IS_ENABLED(). Signed-off-by: Sudeep Holla <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
2015-09-15ACPI: int340x_thermal: add missing CONFIG_ prefixSudeep Holla1-1/+1
This patch adds the missing CONFIG_ prefix to INTEL_SOC_DTS_THERMAL macros. Signed-off-by: Sudeep Holla <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
2015-09-15Btrfs: fix read corruption of compressed and shared extentsFilipe Manana1-8/+57
If a file has a range pointing to a compressed extent, followed by another range that points to the same compressed extent and a read operation attempts to read both ranges (either completely or part of them), the pages that correspond to the second range are incorrectly filled with zeroes. Consider the following example: File layout [0 - 8K] [8K - 24K] | | | | points to extent X, points to extent X, offset 4K, length of 8K offset 0, length 16K [extent X, compressed length = 4K uncompressed length = 16K] If a readpages() call spans the 2 ranges, a single bio to read the extent is submitted - extent_io.c:submit_extent_page() would only create a new bio to cover the second range pointing to the extent if the extent it points to had a different logical address than the extent associated with the first range. This has a consequence of the compressed read end io handler (compression.c:end_compressed_bio_read()) finish once the extent is decompressed into the pages covering the first range, leaving the remaining pages (belonging to the second range) filled with zeroes (done by compression.c:btrfs_clear_biovec_end()). So fix this by submitting the current bio whenever we find a range pointing to a compressed extent that was preceded by a range with a different extent map. This is the simplest solution for this corner case. Making the end io callback populate both ranges (or more, if we have multiple pointing to the same extent) is a much more complex solution since each bio is tightly coupled with a single extent map and the extent maps associated to the ranges pointing to the shared extent can have different offsets and lengths. The following test case for fstests triggers the issue: seq=`basename $0` seqres=$RESULT_DIR/$seq echo "QA output created by $seq" tmp=/tmp/$$ status=1 # failure is the default! trap "_cleanup; exit \$status" 0 1 2 3 15 _cleanup() { rm -f $tmp.* } # get standard environment, filters and checks . ./common/rc . ./common/filter # real QA test starts here _need_to_be_root _supported_fs btrfs _supported_os Linux _require_scratch _require_cloner rm -f $seqres.full test_clone_and_read_compressed_extent() { local mount_opts=$1 _scratch_mkfs >>$seqres.full 2>&1 _scratch_mount $mount_opts # Create a test file with a single extent that is compressed (the # data we write into it is highly compressible no matter which # compression algorithm is used, zlib or lzo). $XFS_IO_PROG -f -c "pwrite -S 0xaa 0K 4K" \ -c "pwrite -S 0xbb 4K 8K" \ -c "pwrite -S 0xcc 12K 4K" \ $SCRATCH_MNT/foo | _filter_xfs_io # Now clone our extent into an adjacent offset. $CLONER_PROG -s $((4 * 1024)) -d $((16 * 1024)) -l $((8 * 1024)) \ $SCRATCH_MNT/foo $SCRATCH_MNT/foo # Same as before but for this file we clone the extent into a lower # file offset. $XFS_IO_PROG -f -c "pwrite -S 0xaa 8K 4K" \ -c "pwrite -S 0xbb 12K 8K" \ -c "pwrite -S 0xcc 20K 4K" \ $SCRATCH_MNT/bar | _filter_xfs_io $CLONER_PROG -s $((12 * 1024)) -d 0 -l $((8 * 1024)) \ $SCRATCH_MNT/bar $SCRATCH_MNT/bar echo "File digests before unmounting filesystem:" md5sum $SCRATCH_MNT/foo | _filter_scratch md5sum $SCRATCH_MNT/bar | _filter_scratch # Evicting the inode or clearing the page cache before reading # again the file would also trigger the bug - reads were returning # all bytes in the range corresponding to the second reference to # the extent with a value of 0, but the correct data was persisted # (it was a bug exclusively in the read path). The issue happened # only if the same readpages() call targeted pages belonging to the # first and second ranges that point to the same compressed extent. _scratch_remount echo "File digests after mounting filesystem again:" # Must match the same digests we got before. md5sum $SCRATCH_MNT/foo | _filter_scratch md5sum $SCRATCH_MNT/bar | _filter_scratch } echo -e "\nTesting with zlib compression..." test_clone_and_read_compressed_extent "-o compress=zlib" _scratch_unmount echo -e "\nTesting with lzo compression..." test_clone_and_read_compressed_extent "-o compress=lzo" status=0 exit Cc: [email protected] Signed-off-by: Filipe Manana <[email protected]> Reviewed-by: Qu Wenruo<[email protected]> Reviewed-by: Liu Bo <[email protected]>
2015-09-14Merge tag 'clk-fixes-for-linus' of ↵Linus Torvalds4-4/+17
git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk fixes from Stephen Boyd: "A couple build fixes for drivers introduced in the merge window and a handful of patches to add more critical clocks on rockchip SoCs that are affected by newly introduced gpio clock handling" * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: clk: rockchip: Add pclk_peri to critical clocks on RK3066/RK3188 clk: rockchip: add pclk_cpu to the list of rk3188 critical clocks clk: rockchip: handle critical clocks after registering all clocks clk: Hi6220: separately build stub clock driver clk: h8s2678: Fix compile error
2015-09-15Merge branch 'for-rafael' of ↵Rafael J. Wysocki5-26/+54
https://git.kernel.org/pub/scm/linux/kernel/git/mzx/devfreq into pm-devfreq Pull devfreq updates for v4.3 from MyungJoo Ham. * 'for-rafael' of https://git.kernel.org/pub/scm/linux/kernel/git/mzx/devfreq: PM / devfreq: Fix incorrect type issue. PM / devfreq: tegra: Update governor to use devfreq_update_stats() PM / devfreq: comments for get_dev_status usage updated PM / devfreq: drop comment about thermal setting max_freq PM / devfreq: cache the last call to get_dev_status() PM / devfreq: Drop unlikely before IS_ERR(_OR_NULL) PM / devfreq: exynos-ppmu: bit-wise operation bugfix. PM / devfreq: exynos-ppmu: Update documentation to support PPMUv2 PM / devfreq: exynos-ppmu: Add the support of PPMUv2 for Exynos5433 PM / devfreq: event: Remove incorrect property in exynos-ppmu DT binding Conflicts: drivers/devfreq/event/exynos-ppmu.c
2015-09-14selftests: exec: revert to default emit ruleBamvor Jian Zhang1-3/+1
With the previous patch, the installation method change from install to rsync. There is no need to create subdir during test, the default EMIT_TESTS is enough. This patch essentially revert commit 84cbd9e4 ("selftests/exec: do not install subdir as it is already created"). Suggested-by: Michael Ellerman <[email protected]> Signed-off-by: Bamvor Jian Zhang <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
2015-09-14selftests: change install command to rsyncBamvor Jian Zhang2-8/+5
The command of install could not handle the special files in exec testcases, change the default rule to rsync to fix this. The installation is unchanged after this commit. Suggested-by: Michael Ellerman <[email protected]> Signed-off-by: Bamvor Jian Zhang <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
2015-09-14selftests: mqueue: simplify the MakefileBamvor Jian Zhang1-5/+3
Use make's implict rule for building simple C programs. Suggested-by: Michael Ellerman <[email protected]> Signed-off-by: Bamvor Jian Zhang <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
2015-09-14selftests: mqueue: allow extra cflagsBamvor Jian Zhang1-1/+1
Change from = to += in order to allows the user to pass whatever CFLAGS they wish(E.g. pass the proper headers and librareis (popt.h and libpopt.so) in cross-compiling) Suggested-by: Michael Ellerman <[email protected]> Signed-off-by: Bamvor Jian Zhang <[email protected]> Acked-by: Michael Ellerman <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
2015-09-14selftests: rename jump label to static_keysBamvor Jian Zhang1-1/+1
Commit 2bf9e0ab08c6 ("locking/static_keys: Provide a selftest") renamed jump_label directory to static_keys and failed to update the Makefile, causing the selftests build to fail. This commit fixes it by updating the Makefile with the new name and also moves the entry into the correct position to keep the list alphabetically sorted. Fixes: 2bf9e0ab08c6 ("locking/static_keys: Provide a selftest") Signed-off-by: Bamvor Jian Zhang <[email protected]> Acked-by: Shuah Khan <[email protected]> Acked-by: Michael Ellerman <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
2015-09-14selftests/seccomp: add support for s390Kees Cook2-6/+38
This adds support for s390 to the seccomp selftests. Some improvements were made to enhance the accuracy of failure reporting, and additional tests were added to validate assumptions about the currently traced syscall. Also adds early asserts for running on older kernels to avoid noise when the seccomp syscall is not implemented. Signed-off-by: Kees Cook <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
2015-09-14seltests/zram: fix syntax errorZhang Zhen2-10/+3
Not all shells define a variable UID. This is a bash and zsh feature only. In other shells, the UID variable is not defined, so here test command expands to [ != 0 ] which is a syntax error. Without this patch: root@HGH1000007090:/opt/work/linux/tools/testing/selftests/zram# sh zram.sh zram.sh: 8: [: !=: unexpected operator zram.sh : No zram.ko module or /dev/zram0 device file not found zram.sh : CONFIG_ZRAM is not set With this patch: root@HGH1000007090:/opt/work/linux/tools/testing/selftests/zram# sh ./zram.sh zram.sh : No zram.ko module or /dev/zram0 device file not found zram.sh : CONFIG_ZRAM is not set Signed-off-by: Zhang Zhen <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
2015-09-14Merge branch 'fixes-rc1' into omap-for-v4.3/fixesTony Lindgren6818-179989/+414605
2015-09-14ARM: dts: Fixup model name for HP t410 dtsNicolas Chauvet1-1/+1
This fix the model name for the device. Whole string taken from the HP support center web page Signed-off-by: Nicolas Chauvet <[email protected]> Signed-off-by: Tony Lindgren <[email protected]>
2015-09-14ARM: dts: DRA7: fix a typo in ethernetVishal Mahaveer1-1/+1
Register address in name of the node is wrong Signed-off-by: Vishal Mahaveer <[email protected]> Acked-by: Mugunthan V N <[email protected]> Signed-off-by: Tony Lindgren <[email protected]>
2015-09-14ARM: omap2plus_defconfig: make PCF857x built-inKishon Vijay Abraham I1-1/+1
One of the lines from PCF857x is connected to the vdd line of MMC1 in DRA74x and DRA72x EVMs and is modelled as a regulator. If PCF857x is not made as built-in, the regulator_get in omap_hsmmc fails making it difficult to use MMC1 as rootfs. Make PCF857x built-in. Signed-off-by: Kishon Vijay Abraham I <[email protected]> Signed-off-by: Sekhar Nori <[email protected]> Signed-off-by: Tony Lindgren <[email protected]>
2015-09-14ARM: dts: Use ti,pbias compatible string for pbiasKishon Vijay Abraham I5-5/+5
Use platform specific compatible strings instead of the common "ti,pbias-omap" compatible string. Signed-off-by: Kishon Vijay Abraham I <[email protected]> Acked-by: Tony Lindgren <[email protected]> Signed-off-by: Tony Lindgren <[email protected]>
2015-09-14clk: rockchip: add critical clock for rk3368Heiko Stübner1-0/+6
Again a result of the gpio-clock-liberation the rk3368 needs the pclk_pd_pmu marked as critical, to boot successfully. Reported-by: Mark Rutland <[email protected]> Signed-off-by: Heiko Stuebner <[email protected]> Tested-by: Mark Rutland <[email protected]> Signed-off-by: Stephen Boyd <[email protected]>
2015-09-14Merge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6Linus Torvalds2-1/+10
Pull CIFS fixes from Steve French: "Two small cifs fixes" * 'for-next' of git://git.samba.org/sfrench/cifs-2.6: [CIFS] mount option sec=none not displayed properly in /proc/mounts CIFS: fix type confusion in copy offload ioctl
2015-09-14Merge branch 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-armLinus Torvalds8-9/+32
Pull ARM fixes from Russell King: "A number of fixes for the merge window, fixing a number of cases missed when testing the uaccess code, particularly cases which only show up with certain compiler versions" * 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm: ARM: 8431/1: fix alignement of __bug_table section entries arm/xen: Enable user access to the kernel before issuing a privcmd call ARM: domains: add memory dependencies to get_domain/set_domain ARM: domains: thread_info.h no longer needs asm/domains.h ARM: uaccess: fix undefined instruction on ARMv7M/noMMU ARM: uaccess: remove unneeded uaccess_save_and_disable macro ARM: swpan: fix nwfpe for uaccess changes ARM: 8429/1: disable GCC SRA optimization
2015-09-14ARM: OMAP5: Cleanup options for SoC only buildNishanth Menon1-1/+2
OMAP5 SoC has Cortex-A15 which does not use TWD timer. It uses ARCH_TIMER instead, clean up unwanted configuration and enable OMAP_INTERCONNECT and OPP which is necessary for expected functionality on the SoC. Reported-by: Carlos Hernandez <[email protected]> Reported-by: Felipe Balbi <[email protected]> Signed-off-by: Nishanth Menon <[email protected]> Signed-off-by: Tony Lindgren <[email protected]>
2015-09-14ARM: DRA7: Select missing options for SoC only buildNishanth Menon1-0/+3
DRA7 does use OPP, uses OMAP interconnect and also does require SCU. These are missing in the SoC only build of DRA7 breaking various PM features in DRA7 only build. Reported-by: Carlos Hernandez <[email protected]> Signed-off-by: Nishanth Menon <[email protected]> Signed-off-by: Tony Lindgren <[email protected]>
2015-09-14ARM: OMAP2+: board-generic: Remove stale of_irq macrosNishanth Menon1-7/+0
When commit c4082d499fa2 ("ARM: omap2+: board-generic: clean up the irq data from board file") cleaned up the direct usage of gic_of_init and omap_intc_of_init, it failed to clean up the macros properly. Since these macros are no longer used, lets just remove them. Fixes: c4082d499fa2 ("ARM: omap2+: board-generic: clean up the irq data from board file") Reported-by: Carlos Hernandez <[email protected]> Signed-off-by: Nishanth Menon <[email protected]> Signed-off-by: Tony Lindgren <[email protected]>
2015-09-14ARM: OMAP4+: PM: erratum is used by OMAP5 and DRA7 as wellNishanth Menon1-1/+2
OMAP5 and DRA7 reuse the same pm44xx_erratum variable so, enable the same, else PM features such as Suspend to ram is broken in a SoC only build configuration. Reported-by: Carlos Hernandez <[email protected]> Signed-off-by: Nishanth Menon <[email protected]> Signed-off-by: Tony Lindgren <[email protected]>
2015-09-14ARM: dts: omap3-igep: Move eth IRQ pinmux to IGEPv2 common dtsiJavier Martinez Canillas2-6/+6
Only the IGEPv2 boards have a LAN9221i chip connected to the GPMC so the pinmux configuration for the GPIO connected to the IRQ line of the LAN chip should not be defined in the IGEP common dtsi but in the one common to the IGEPv2 boards. While there, use the OMAP3_CORE1_IOPAD() macro for the padconf reg. Suggested-by: Ladislav Michl <[email protected]> Signed-off-by: Javier Martinez Canillas <[email protected]> Acked-by: Enric Balletbo i Serra <[email protected]> Signed-off-by: Tony Lindgren <[email protected]>
2015-09-14ARM: dts: am57xx-beagle-x15: Add wakeup irq for mcp79410Nishanth Menon1-1/+2
With the support in the generic PM framework for wakeirq and capability added to the rtc-ds1307 driver to support this, we can now define the optional wakeup irq to allow the RTC to wakeup the system from low power modes as part of suspend. Signed-off-by: Nishanth Menon <[email protected]> Signed-off-by: Tony Lindgren <[email protected]>
2015-09-14ARM: dts: am335x-phycore-som: Fix mpu voltageTeresa Remmet1-2/+2
Fix the mpu voltage as it is set too low for the silicon revision 2.1. Signed-off-by: Teresa Remmet <[email protected]> Signed-off-by: Tony Lindgren <[email protected]>
2015-09-14ARM: dts: am57xx-beagle-x15: Fix regulator populated in MMC1 dt nodeKishon Vijay Abraham I1-1/+0
For beagle x15, both the vdd and io lines are connected to the same regulator (ldo1_reg). However vmmc_aux is populated to vdd_3v3. Remove it. Signed-off-by: Kishon Vijay Abraham I <[email protected]> Acked-by: Nishanth Menon <[email protected]> [[email protected]: updated to apply] Signed-off-by: Tony Lindgren <[email protected]>
2015-09-14ARM: dts: Fix dm814x control base to properly initialize Ethernet PHYTony Lindgren3-8/+8
Looks like I made a typo on the control base, all the 81xx SoCs have it at 0x48140000 base. We've just gotten away with the typo as the Ethernet phy was configured by the bootloader on my test system and we're not yet using the pinctrl. In addition to fixing the contol base, we need to also use the right Ethernet phy flags to initialize it. And we are still missing the PLL driver for dm814x and only relying on the divider and mux clocks. Fixes: f3d953ea3721 ("ARM: dts: Add minimal dm814x support") Cc: Matthijs van Duin <[email protected]> Cc: Nicolas Chauvet <[email protected]> Signed-off-by: Tony Lindgren <[email protected]>
2015-09-14ARM: dts: omap3-beagle: make i2c3, ddc and tfp410 gpio work againCarl Frederik Werner1-1/+1
Let's fix pinmux address of gpio 170 used by tfp410 powerdown-gpio. According to the OMAP35x Technical Reference Manual CONTROL_PADCONF_I2C3_SDA[15:0] 0x480021C4 mode0: i2c3_sda CONTROL_PADCONF_I2C3_SDA[31:16] 0x480021C4 mode4: gpio_170 the pinmux address of gpio 170 must be 0x480021C6. The former wrong address broke i2c3 (used by hdmi ddc), resulting in kernel message: omap_i2c 48060000.i2c: controller timed out Fixes: 8cecf52befd7 ("ARM: omap3-beagle.dts: add display information") Cc: [email protected] # v3.15+ Signed-off-by: Carl Frederik Werner <[email protected]> Signed-off-by: Tony Lindgren <[email protected]>
2015-09-14Merge branch 'fix/rt5645' of ↵Mark Brown1-0/+7
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-fix-rt5645
2015-09-14ASoC: davinci-mcasp: Set .symmetric_rates = 1 in snd_soc_dai_driverJyri Sarha1-0/+1
The TX and RX direction share the same bit clock and frame sync, so the samplerate must be the same to both directions. Signed-off-by: Jyri Sarha <[email protected]> Acked-by: Peter Ujfalusi <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2015-09-14perf top: Fix segfault pressing -> with no hist entriesWang Nan1-1/+11
'perf top' segfaults with following operation: # perf top -e page-faults -p 11400 # 11400 never generates page-fault Then on the resulting empty interface, press right key: # ./perf top -e page-faults -p 11400 perf: Segmentation fault -------- backtrace -------- ./perf[0x535428] /lib64/libc.so.6(+0x3545f)[0x7f0dd360745f] ./perf[0x531d46] ./perf(perf_evlist__tui_browse_hists+0x96)[0x5340d6] ./perf[0x44ba2f] /lib64/libpthread.so.0(+0x81d0)[0x7f0dd49dc1d0] /lib64/libc.so.6(clone+0x6c)[0x7f0dd36b90dc] The bug resides in perf_evsel__hists_browse() that, in the above circumstance browser->selection can be NULL, but code after skip_annotation doesn't consider it. This patch fix it by checking browser->selection before fetching browser->selection->map. Signed-off-by: Wang Nan <[email protected]> Tested-by: Arnaldo Carvalho de Melo <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Zefan Li <[email protected]> Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2015-09-14ASoC: au1x: psc-i2s: Fix unused variable 'ret' warningAxel Lin1-1/+0
Fix below build warning: sound/soc/au1x/psc-i2s.c: In function 'au1xpsc_i2s_drvprobe': sound/soc/au1x/psc-i2s.c:299:6: warning: unused variable 'ret' [-Wunused-variable] Reported-by: kbuild test robot <[email protected]> Signed-off-by: Axel Lin <[email protected]> Acked-by: Manuel Lauss <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2015-09-14ASoC: SPEAr: Make SND_SPEAR_SOC select SND_SOC_GENERIC_DMAENGINE_PCMAxel Lin1-1/+1
devm_snd_dmaengine_pcm_register() is guarded by CONFIG_SND_SOC_GENERIC_DMAENGINE_PCM. Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2015-09-14ASoC: mediatek: Increase periods_min in captureKoro Chen1-0/+17
In capture, there is chance that hw_ptr reported at IRQ is a little smaller than period_size due to internal AFE buffer. In the case of ping-pong buffer: |xxxxxxxxxxxxxxxxxxxxxxxxxxxx--|-----------------------------| hw_ptr < period_size This available buffer will not be read since its size is smaller than avail_min (which is period_size by default), and read thread continues to sleep. If the next hw_ptr is just a little larger than buffer_size, overrun occurs. One more period can hold the possible unread buffer. Signed-off-by: Koro Chen <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2015-09-14KVM: make the declaration of functions within 80 charactersWei Yang1-2/+2
After 'commit 0b8ba4a2b658 ("KVM: fix checkpatch.pl errors in kvm/coalesced_mmio.h")', the declaration of the two function will exceed 80 characters. This patch reduces the TAPs to make each line in 80 characters. Signed-off-by: Wei Yang <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
2015-09-14x86/apic: Serialize LVTT and TSC_DEADLINE writesShaohua Li1-0/+7
The APIC LVTT register is MMIO mapped but the TSC_DEADLINE register is an MSR. The write to the TSC_DEADLINE MSR is not serializing, so it's not guaranteed that the write to LVTT has reached the APIC before the TSC_DEADLINE MSR is written. In such a case the write to the MSR is ignored and as a consequence the local timer interrupt never fires. The SDM decribes this issue for xAPIC and x2APIC modes. The serialization methods recommended by the SDM differ. xAPIC: "1. Memory-mapped write to LVT Timer Register, setting bits 18:17 to 10b. 2. WRMSR to the IA32_TSC_DEADLINE MSR a value much larger than current time-stamp counter. 3. If RDMSR of the IA32_TSC_DEADLINE MSR returns zero, go to step 2. 4. WRMSR to the IA32_TSC_DEADLINE MSR the desired deadline." x2APIC: "To allow for efficient access to the APIC registers in x2APIC mode, the serializing semantics of WRMSR are relaxed when writing to the APIC registers. Thus, system software should not use 'WRMSR to APIC registers in x2APIC mode' as a serializing instruction. Read and write accesses to the APIC registers will occur in program order. A WRMSR to an APIC register may complete before all preceding stores are globally visible; software can prevent this by inserting a serializing instruction, an SFENCE, or an MFENCE before the WRMSR." The xAPIC method is to just wait for the memory mapped write to hit the LVTT by checking whether the MSR write has reached the hardware. There is no reason why a proper MFENCE after the memory mapped write would not do the same. Andi Kleen confirmed that MFENCE is sufficient for the xAPIC case as well. Issue MFENCE before writing to the TSC_DEADLINE MSR. This can be done unconditionally as all CPUs which have TSC_DEADLINE also have MFENCE support. [ tglx: Massaged the changelog ] Signed-off-by: Shaohua Li <[email protected]> Reviewed-by: Ingo Molnar <[email protected]> Cc: <[email protected]> Cc: <[email protected]> Cc: <[email protected]> Cc: Andi Kleen <[email protected]> Cc: H. Peter Anvin <[email protected]> Cc: [email protected] #v3.7+ Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
2015-09-14ASoC: davinci-mcasp: Revise the FIFO threshold calculationPeter Ujfalusi1-4/+3
The FIFO threshold for McASP should be <=[tx/rx]numevt so the initial value for the refining should meet this requirement as well. Signed-off-by: Peter Ujfalusi <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2015-09-14x86/ioapic: Force affinity setting in setup_ioapic_dest()Thomas Gleixner1-2/+3
The recent ioapic cleanups changed the affinity setting in setup_ioapic_dest() from a direct write to the hardware to the delayed affinity setup via irq_set_affinity(). That results in a warning from chained_irq_exit(): WARNING: CPU: 0 PID: 5 at kernel/irq/migration.c:32 irq_move_masked_irq [<ffffffff810a0a88>] irq_move_masked_irq+0xb8/0xc0 [<ffffffff8103c161>] ioapic_ack_level+0x111/0x130 [<ffffffff812bbfe8>] intel_gpio_irq_handler+0x148/0x1c0 The reason is that irq_set_affinity() does not write directly to the hardware. It marks the affinity setting as pending and executes it from the next interrupt. The chained handler infrastructure does not take the irq descriptor lock for performance reasons because such a chained interrupt is not visible to any interfaces. So the delayed affinity setting triggers the warning in irq_move_masked_irq(). Restore the old behaviour by calling the set_affinity function of the ioapic chip in setup_ioapic_dest(). This is safe as none of the interrupts can be on the fly at this point. Fixes: aa5cb97f14a2 'x86/irq: Remove x86_io_apic_ops.set_affinity and related interfaces' Reported-and-tested-by: Mika Westerberg <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Cc: Jiang Liu <[email protected]> Cc: [email protected]
2015-09-14netfilter: nft_compat: skip family comparison in case of NFPROTO_UNSPECPablo Neira Ayuso1-6/+18
Fix lookup of existing match/target structures in the corresponding list by skipping the family check if NFPROTO_UNSPEC is used. This is resulting in the allocation and insertion of one match/target structure for each use of them. So this not only bloats memory consumption but also severely affects the time to reload the ruleset from the iptables-compat utility. After this patch, iptables-compat-restore and iptables-compat take almost the same time to reload large rulesets. Fixes: 0ca743a55991 ("netfilter: nf_tables: add compatibility layer for x_tables") Signed-off-by: Pablo Neira Ayuso <[email protected]>
2015-09-14netfilter: bridge: fix routing of bridge frames with call-iptables=1Florian Westphal1-3/+3
We can't re-use the physoutdev storage area. 1. When using NFQUEUE in PREROUTING, we attempt to bump a bogus refcnt since nf_bridge->physoutdev is garbage (ipv4/ipv6 address) 2. for same reason, we crash in physdev match in FORWARD or later if skb is routed instead of bridged. This increases nf_bridge_info to 40 bytes, but we have no other choice. Fixes: 72b1e5e4cac7 ("netfilter: bridge: reduce nf_bridge_info to 32 bytes again") Reported-by: Sander Eikelenboom <[email protected]> Signed-off-by: Florian Westphal <[email protected]> Signed-off-by: Pablo Neira Ayuso <[email protected]>
2015-09-14dm crypt: constrain crypt device's max_segment_size to PAGE_SIZEMike Snitzer1-2/+15
Setting the dm-crypt device's max_segment_size to PAGE_SIZE is an unfortunate constraint that is required to avoid the potential for exceeding dm-crypt's underlying device's max_segments limits -- due to crypt_alloc_buffer() possibly allocating pages for the encryption bio that are not as physically contiguous as the original bio. It is interesting to note that this problem was already fixed back in 2007 via commit 91e106259 ("dm crypt: use bio_add_page"). But Linux 4.0 commit cf2f1abfb ("dm crypt: don't allocate pages for a partial request") regressed dm-crypt back to _not_ using bio_add_page(). But given dm-crypt's cpu parallelization changes all depend on commit cf2f1abfb's abandoning of the more complex io fragments processing that dm-crypt previously had we cannot easily go back to using bio_add_page(). So all said the cleanest way to resolve this issue is to fix dm-crypt to properly constrain the original bios entering dm-crypt so the encryption bios that dm-crypt generates from the original bios are always compatible with the underlying device's max_segments queue limits. It should be noted that technically Linux 4.3 does _not_ need this fix because of the block core's new late bio-splitting capability. But, it is reasoned, there is little to be gained by having the block core split the encrypted bio that is composed of PAGE_SIZE segments. That said, in the future we may revert this change. Fixes: cf2f1abfb ("dm crypt: don't allocate pages for a partial request") Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=104421 Suggested-by: Jeff Moyer <[email protected]> Signed-off-by: Mike Snitzer <[email protected]> Cc: [email protected] # 4.0+
2015-09-14KVM: arm64: add workaround for Cortex-A57 erratum #852523Will Deacon1-1/+3
When restoring the system register state for an AArch32 guest at EL2, writes to DACR32_EL2 may not be correctly synchronised by Cortex-A57, which can lead to the guest effectively running with junk in the DACR and running into unexpected domain faults. This patch works around the issue by re-ordering our restoration of the AArch32 register aliases so that they happen before the AArch64 system registers. Ensuring that the registers are restored in this order guarantees that they will be correctly synchronised by the core. Cc: <[email protected]> Reviewed-by: Marc Zyngier <[email protected]> Signed-off-by: Will Deacon <[email protected]> Signed-off-by: Marc Zyngier <[email protected]>
2015-09-14usb: phy: phy-generic: Fix reset behaviour on legacy bootRoger Quadros1-1/+2
The gpio-desc migration done in v4.0 caused a regression with legacy boots due to reversed reset logic. e.g. omap3-beagle USB host breaks on legacy boot. Request the reset GPIO with GPIOF_ACTIVE_LOW flag so that it matches the driver logic and pin behaviour. Fixes: e9f2cefb0cdc ("usb: phy: generic: migrate to gpio_desc") Cc: <[email protected]> # 4.0+ Tested-by: Fabio Estevam <[email protected]> Signed-off-by: Roger Quadros <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2015-09-14usb: musb: ux500: Fix module autoload for OF platform driverLuis de Bethencourt1-0/+2
This platform driver has a OF device ID table but the OF module alias information is not created so module autoloading won't work. Signed-off-by: Luis de Bethencourt <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2015-09-14usb: musb: Disable interrupts on suspend, enable them on resumePascal Huerst1-0/+6
In certain situations, an interrupt triggers on resume, before musb_start() has been called. This has been observed to cause enumeration issues after suspend/resume cycles with AM335x. Signed-off-by: Pascal Huerst <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2015-09-14usb: gadget: amd5536udc: fix error handling in udc_pci_probe()Alexey Khoroshilov1-23/+20
If a failure happens early in udc_pci_probe(), error handling code just kfree(dev) and returns. The patch adds proper resource deallocations in udc_pci_probe() itself, since udc_pci_remove() is not suitabe to be called so early in initialization process. By the way, iounmap(dev->regs) is replaced by iounmap(dev->virt_addr) in udc_pci_remove() for clarity. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>