aboutsummaryrefslogtreecommitdiffstats
path: root/fs (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2014-07-01thermal: ti-soc-thermal: ti-bandgap.c: Cleaning up wrong address is checkedRickard Strandqvist1-1/+1
Wrong address is checked after memory allocation. Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2014-07-01Thermal: imx: correct critical trip temperature settingAnson Huang1-11/+7
On latest i.MX6 SOC with thermal calibration data of 0x5A100000, the critical trip temperature will be an invalid value and cause system auto shutdown as below log: thermal thermal_zone0: critical temperature reached(42 C),shutting down So, with universal formula for thermal sensor, only room temperature point is calibrated, which means the calibration data read from fuse only has valid data of bit [31:20], others are all 0, the critical trip point temperature can NOT depend on the hot point calibration data, here we set it to 20 C higher than default passive temperature. Signed-off-by: Anson Huang <b20788@freescale.com> Acked-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2014-06-30thermal: Bind cooling devices with the correct argumentsPunit Agrawal1-2/+2
When binding cooling devices to thermal zones created from the device tree the minimum and maximum cooling states are in the wrong order leading to failure to bind. Fix the order of cooling states in the call to thermal_zone_bind_cooling_device to fix this. Cc:Zhang Rui <rui.zhang@intel.com> Signed-off-by: Punit Agrawal <punit.agrawal@arm.com> Reviewed-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2014-06-30thermal: Add braces around suspect codeStephen Boyd1-1/+2
It looks like this code is missing braces, otherwise the if statement shouldn't have been indented. Fix it. Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2014-06-30thermal: hwmon: Make the check for critical temp valid consistentAaron Lu1-15/+18
On 05/21/2014 04:22 PM, Aaron Lu wrote: > On 05/21/2014 01:57 PM, Kui Zhang wrote: >> Hello, >> >> I get following error when rmmod thermal. >> >> rmmod thermal >> Killed While dealing with this problem, I found another problem that also results in a kernel crash on thermal module removal: From: Aaron Lu <aaron.lu@intel.com> Date: Wed, 21 May 2014 16:05:38 +0800 Subject: [PATCH] thermal: hwmon: Make the check for critical temp valid consistent We used the tz->ops->get_crit_temp && !tz->ops->get_crit_temp(tz, temp) to decide if we need to create the temp_crit attribute file but we just check if tz->ops->get_crit_temp exists to decide if we need to remove that attribute file. Some ACPI thermal zone doesn't have a valid critical trip point and that would result in removing a non-existent device file on thermal module unload. Cc: All applicable <stable@vger.kernel.org> Signed-off-by: Aaron Lu <aaron.lu@intel.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2014-06-26MAINTAINERS: Update Eduardo Valentin's email addressLee Jones1-2/+2
Eduardo TI address is bouncing, but it looks like he's still contributing via his Gmail address. Cc: Eduardo Valentin <edubezval@gmail.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2014-06-21Linux 3.16-rc2Linus Torvalds1-1/+1
2014-06-20MAINTAINERS: add entry for VMware Balloon driverDmitry Torokhov2-1/+10
Signed-off-by: Dmitry Torokhov <dtor@vmware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19w1: mxc_w1: Fix incorrect "presence" statusAlexander Shiyan1-1/+1
W1 reset_bus() should return zero if slave device is present. This patch fix this issue. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19imx-drm: parallel-display: Fix DPMS default state.Denis Carikli1-0/+7
If connector->dpms is left untouched, it defaults to DRM_MODE_DPMS_ON (0). As a result, drm_helper_connector_dpms will exit when it will be asked to set the state to DRM_MODE_DPMS_ON, because it is already set. That issue prevented displays from turning on at boot. Signed-off-by: Denis Carikli <denis@eukrea.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19staging: android: timed_output: fix use after free of devYi Zhang1-1/+0
tdev->dev has been freed in device_destroy(), it's not right to use dev_set_drvdata() after that; Signed-off-by: Yi Zhang <yizhang@marvell.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-20unicore32: Remove ARCH_HAS_CPUFREQ config optionStephen Boyd1-6/+0
This config exists entirely to hide the cpufreq menu from the kernel configuration unless a platform has selected it. Nothing is actually built if this config is 'Y' and it just leads to more patches that add a select under a platform Kconfig so that some other CPUfreq option can be chosen. Let's remove the option so that we can always enable CPUfreq drivers on unicore32 platforms. Cc: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Xuetao Guan <gxt@mprc.pku.edu.cn>
2014-06-20UniCore32: Change git tree location information in MAINTAINERSGuan Xuetao1-2/+2
UniCore32 git repo has moved to github. Branch 'unicore32' is used for prepared patches, and automatically merged to linux-next. Branch 'unicore32-working' is used for development. Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn>
2014-06-20arch: unicore32: ksyms: export '__cpuc_coherent_kern_range' to avoid compiling failureChen Gang1-0/+2
flush_icache_range() is '__cpuc_coherent_kern_range' under unicore32, and lkdtm.ko needs it. At present, '__cpuc_coherent_kern_range' is still used by unicore32, so export it to avoid compiling failure. The related error (with allmodconfig under unicore32): ERROR: "__cpuc_coherent_kern_range" [drivers/misc/lkdtm.ko] undefined! Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com> Acked-by: Xuetao Guan <gxt@mprc.pku.edu.cn> Signed-off-by: Xuetao Guan <gxt@mprc.pku.edu.cn>
2014-06-20arch: unicore32: ksyms: export 'pm_power_off' to avoid compiling failure.Chen Gang1-0/+1
Two driver modules need 'pm_power_off', so export it. The related error (with allmodconfig under unicore32): MODPOST 4039 modules ERROR: "pm_power_off" [drivers/mfd/retu-mfd.ko] undefined! ERROR: "pm_power_off" [drivers/char/ipmi/ipmi_poweroff.ko] undefined! Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com> Acked-by: Xuetao Guan <gxt@mprc.pku.edu.cn> Signed-off-by: Xuetao Guan <gxt@mprc.pku.edu.cn>
2014-06-20arch: unicore32: ksyms: export additional find_first_*() to avoid compiling failureChen Gang1-0/+2
Some modules need find_first_bit() and find_first_zero_bit(), so export them. The related error (with allmodconfig under unicore32): MODPOST 4039 modules ERROR: "find_first_bit" [sound/soc/codecs/snd-soc-uda1380.ko] undefined! ERROR: "find_first_zero_bit" [net/sctp/sctp.ko] undefined! ... Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com> Acked-by: Xuetao Guan <gxt@mprc.pku.edu.cn> Signed-off-by: Xuetao Guan <gxt@mprc.pku.edu.cn>
2014-06-20arch:unicore32:mm: add devmem_is_allowed() to support STRICT_DEVMEMChen Gang1-0/+23
unicore32 supports STRICT_DEVMEM, so it needs devmem_is_allowed(), like some of other architectures have done (e.g. arm, powerpc, x86 ...). The related error with allmodconfig: CC drivers/char/mem.o drivers/char/mem.c: In function ‘range_is_allowed’: drivers/char/mem.c:69: error: implicit declaration of function ‘devmem_is_allowed’ make[2]: *** [drivers/char/mem.o] Error 1 make[1]: *** [drivers/char] Error 2 make: *** [drivers] Error 2 Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com> Acked-by: Xuetao Guan <gxt@mprc.pku.edu.cn> Signed-off-by: Xuetao Guan <gxt@mprc.pku.edu.cn>
2014-06-20unicore32: include: asm: add missing ')' for PAGE_* macros in pgtable.hChen Gang1-5/+5
Missing related ')', the related compiling error: CC [M] drivers/gpu/drm/udl/udl_fb.o drivers/gpu/drm/udl/udl_fb.c: In function ‘udl_fb_mmap’: drivers/gpu/drm/udl/udl_fb.c:273: error: expected ‘)’ before ‘return’ drivers/gpu/drm/udl/udl_fb.c:281: error: expected expression before ‘}’ token make[4]: *** [drivers/gpu/drm/udl/udl_fb.o] Error 1 make[3]: *** [drivers/gpu/drm/udl] Error 2 make[2]: *** [drivers/gpu/drm] Error 2 make[1]: *** [drivers/gpu] Error 2 make: *** [drivers] Error 2 Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com> Acked-by: Xuetao Guan <gxt@mprc.pku.edu.cn> Signed-off-by: Xuetao Guan <gxt@mprc.pku.edu.cn>
2014-06-20arch/unicore32/kernel/setup.c: add generic 'screen_info' to avoid compiling failureChen Gang1-0/+4
Add generic 'screen_info' just like another architectures have done (e.g. tile, sh, score, ia64, hexagon, and cris). The related error (with allmodconfig under unicore32): LD init/built-in.o drivers/built-in.o: In function `vgacon_save_screen': powercap_sys.c:(.text+0x21788): undefined reference to `screen_info' drivers/built-in.o: In function `vgacon_resize': powercap_sys.c:(.text+0x21b54): undefined reference to `screen_info' drivers/built-in.o: In function `vgacon_switch': powercap_sys.c:(.text+0x21cb4): undefined reference to `screen_info' drivers/built-in.o: In function `vgacon_init': powercap_sys.c:(.text+0x2296c): undefined reference to `screen_info' drivers/built-in.o: In function `vgacon_startup': powercap_sys.c:(.text+0x22e80): undefined reference to `screen_info' Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com> Acked-by: Xuetao Guan <gxt@mprc.pku.edu.cn> Signed-off-by: Xuetao Guan <gxt@mprc.pku.edu.cn>
2014-06-20drivers: scsi: mvsas: fix compiling issue by adding 'MVS_' for "enum pci_interrupt_cause"Chen Gang2-34/+34
The direct cause is IRQ_SPI is already defined as a macro in unicore32 architecture (also, blackfin and mips architectures define it). The related error (unicore32 with allmodconfig) CC [M] drivers/scsi/mvsas/mv_94xx.o In file included from drivers/scsi/mvsas/mv_94xx.c:27: drivers/scsi/mvsas/mv_94xx.h:176: error: expected identifier before numeric constant And IRQ_SAS_A and IRQ_SAS_B are used as 'u32' (although "enum pci_interrupt_cause" is not used directly, now). All together, need add 'MVS_' for "enum pci_interrupt_cause". Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Xuetao Guan <gxt@mprc.pku.edu.cn> Signed-off-by: Xuetao Guan <gxt@mprc.pku.edu.cn>
2014-06-20arch: unicore32: kernel: ksyms: remove 'bswapsi2' and 'muldi3' to avoid compiling failureChen Gang2-4/+0
After check the code, 'bswapsi2' and 'muldi3' are useless for unicore32, so can remove them to avoid compiling failure. The related error (with allmodconfig under unicore32): LD init/built-in.o arch/unicore32/kernel/built-in.o:(___ksymtab+__muldi3+0x0): undefined reference to `__muldi3' arch/unicore32/kernel/built-in.o:(___ksymtab+__bswapsi2+0x0): undefined reference to `__bswapsi2' Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com> Acked-by: Xuetao Guan <gxt@mprc.pku.edu.cn> Signed-off-by: Xuetao Guan <gxt@mprc.pku.edu.cn>
2014-06-20arch/unicore32/kernel/ksyms.c: remove 2 export symbols to avoid compiling failureChen Gang1-4/+0
'csum_partial' and 'csum_partial_copy_from_user' have already been exported in "lib/", so need not export them again, or it will cause compiling error. The related error (with allmodconfig under unicore32): LD vmlinux.o lib/built-in.o:(___ksymtab+csum_partial+0x0): multiple definition of `__ksymtab_csum_partial' arch/unicore32/kernel/built-in.o:(___ksymtab+csum_partial+0x0): first defined here lib/built-in.o:(___ksymtab+csum_partial_copy_from_user+0x0): multiple definition of `__ksymtab_csum_partial_copy_from_user' arch/unicore32/kernel/built-in.o:(___ksymtab+csum_partial_copy_from_user+0x0): first defined here make: *** [vmlinux] Error 1 Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com> Acked-by: Xuetao Guan <gxt@mprc.pku.edu.cn> Signed-off-by: Xuetao Guan <gxt@mprc.pku.edu.cn>
2014-06-20drivers/rtc/rtc-puv3.c: remove "&dev->" for typo issue MIME-Version: 1.0Chen Gang1-1/+1
It is only a typo issue, the related commit: "1fbc4c4 drivers/rtc/rtc-puv3.c: use dev_dbg() instead of pr_debug()" The related error (for unicore32 with allmodconfig): CC [M] drivers/rtc/rtc-puv3.o drivers/rtc/rtc-puv3.c: In function 'puv3_rtc_setalarm': drivers/rtc/rtc-puv3.c:143: error: 'struct device' has no member named 'dev' Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com> Acked-by: Xuetao Guan <gxt@mprc.pku.edu.cn> Signed-off-by: Xuetao Guan <gxt@mprc.pku.edu.cn>
2014-06-20drivers/rtc/rtc-puv3.c: use dev_dbg() instead of dev_debug() for typo issueChen Gang1-1/+1
It is only a typo issue, the related commit: "1fbc4c4 drivers/rtc/rtc-puv3.c: use dev_dbg() instead of pr_debug()" The related error (unicore32 with allmodconfig): CC [M] drivers/rtc/rtc-puv3.o drivers/rtc/rtc-puv3.c: In function 'puv3_rtc_setpie': drivers/rtc/rtc-puv3.c:74: error: implicit declaration of function 'dev_debug' Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com> Acked-by: Xuetao Guan <gxt@mprc.pku.edu.cn> Signed-off-by: Xuetao Guan <gxt@mprc.pku.edu.cn>
2014-06-20arch/unicore32/include/asm/io.h: add readl_relaxed() generic definitionChen Gang1-0/+4
Need generic definition for readl_relaxed(), like other architectures have done. Or can not pass compiling with allmodconfig, the related error: CC [M] drivers/message/fusion/mptbase.o drivers/message/fusion/mptbase.c: In function 'mpt_send_handshake_request': drivers/message/fusion/mptbase.c:1224: error: implicit declaration of function 'readl_relaxed' Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com> Acked-by: Xuetao Guan <gxt@mprc.pku.edu.cn> Signed-off-by: Xuetao Guan <gxt@mprc.pku.edu.cn>
2014-06-20arch/unicore32/include/asm/ptrace.h: add generic definition for profile_pc()Chen Gang1-0/+1
Add generic definition just like another architectures have done, or can not pass compiling with allmodconfig, the related error: CC kernel/profile.o kernel/profile.c: In function 'profile_tick': kernel/profile.c:419: error: implicit declaration of function 'profile_pc' make[1]: *** [kernel/profile.o] Error 1 make: *** [kernel] Error 2 Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com> Acked-by: Xuetao Guan <gxt@mprc.pku.edu.cn> Signed-off-by: Xuetao Guan <gxt@mprc.pku.edu.cn>
2014-06-20arch/unicore32/mm/alignment.c: include "asm/pgtable.h" to avoid compiling errorChen Gang1-0/+1
Need include "asm/pgtable.h" to include "asm-generic/pgtable-nopmd.h", so can let 'pmd_t' defined. The related error with allmodconfig: CC arch/unicore32/mm/alignment.o In file included from arch/unicore32/mm/alignment.c:24: arch/unicore32/include/asm/tlbflush.h:135: error: expected .). before .*. token arch/unicore32/include/asm/tlbflush.h:154: error: expected .). before .*. token In file included from arch/unicore32/mm/alignment.c:27: arch/unicore32/mm/mm.h:15: error: expected .=., .,., .;., .sm. or ._attribute__. before .*. token arch/unicore32/mm/mm.h:20: error: expected .=., .,., .;., .sm. or ._attribute__. before .*. token arch/unicore32/mm/mm.h:25: error: expected .=., .,., .;., .sm. or ._attribute__. before .*. token make[1]: *** [arch/unicore32/mm/alignment.o] Error 1 make: *** [arch/unicore32/mm] Error 2 Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com> Acked-by: Xuetao Guan <gxt@mprc.pku.edu.cn> Signed-off-by: Xuetao Guan <gxt@mprc.pku.edu.cn>
2014-06-20arch/unicore32/kernel/clock.c: add readl() and writel() for 'PM_' macrosChen Gang1-4/+4
Add readl() and writel() for 'PM_' macros, just like another areas have done within unicored32, or will cause compiling issue. The related error (allmodconfig for unicored32): CC arch/unicore32/kernel/clock.o arch/unicore32/kernel/clock.c: In function 'clk_set_rate': arch/unicore32/kernel/clock.c:182: warning: initialization makes integer from pointer without a cast arch/unicore32/kernel/clock.c:204: error: lvalue required as left operand of assignment arch/unicore32/kernel/clock.c:206: error: lvalue required as left operand of assignment arch/unicore32/kernel/clock.c:207: error: invalid operands to binary & (have 'void *' and 'long unsigned int') make[1]: *** [arch/unicore32/kernel/clock.o] Error 1 make: *** [arch/unicore32/kernel] Error 2 Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com> Acked-by: Xuetao Guan <gxt@mprc.pku.edu.cn> Signed-off-by: Xuetao Guan <gxt@mprc.pku.edu.cn>
2014-06-20arch/unicore32/kernel/module.c: use __vmalloc_node_range() instead of __vmalloc_area()Chen Gang1-8/+3
__vmalloc_area() has already been removed from upstream kernel, need use __vmalloc_node_range() instead of. The related commit: "d0a2126 mm: unify module_alloc code for vmalloc". The related error (allmodconfig for unicore32): CC arch/unicore32/kernel/module.o arch/unicore32/kernel/module.c: In function 'module_alloc' : arch/unicore32/kernel/module.c:34: error: implicit declaration of function '__vmalloc_area' arch/unicore32/kernel/module.c:34: warning: return makes pointer from integer without a cast make[1]: *** [arch/unicore32/kernel/module.o] Error 1 make: *** [arch/unicore32/kernel] Error 2 Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com> Acked-by: Xuetao Guan <gxt@mprc.pku.edu.cn> Signed-off-by: Xuetao Guan <gxt@mprc.pku.edu.cn>
2014-06-20arch/unicore32/kernel/ksyms.c: remove several undefined exported symbolsChen Gang1-33/+0
For 'csum_partial_copy_nocheck()', it has default definition in 'asm-generic'. For '__raw_reads?()' and '__raw_writes?()' are used by the drivers which no relationship with allmodconfig for unicode32, the related modules are: drivers/mmc/host/omap.c drivers/mtd/nand/atmel_nand.c drivers/mtd/nand/pxa3xx_nand.c drivers/usb/gadget/at91_udc.c Others are only within some architectures (not kernel wide). The related error with allmodconfig for unicode32: CC arch/unicore32/kernel/ksyms.o arch/unicore32/kernel/ksyms.c:29: error: ._backtrace. undeclared here (not in a function) arch/unicore32/kernel/ksyms.c:29: error: type defaults to .nt. in declaration of ._backtrace. arch/unicore32/kernel/ksyms.c:38: error: .sum_partial_copy_nocheck. undeclared here (not in a function) arch/unicore32/kernel/ksyms.c:38: error: type defaults to .nt. in declaration of .sum_partial_copy_nocheck. arch/unicore32/kernel/ksyms.c:39: error: ._csum_ipv6_magic. undeclared here (not in a function) arch/unicore32/kernel/ksyms.c:39: error: type defaults to .nt. in declaration of ._csum_ipv6_magic. arch/unicore32/kernel/ksyms.c:43: error: ._raw_readsb. undeclared here (not in a function) arch/unicore32/kernel/ksyms.c:43: error: type defaults to .nt. in declaration of ._raw_readsb. arch/unicore32/kernel/ksyms.c:46: error: ._raw_readsw. undeclared here (not in a function) arch/unicore32/kernel/ksyms.c:46: error: type defaults to .nt. in declaration of ._raw_readsw. arch/unicore32/kernel/ksyms.c:49: error: ._raw_readsl. undeclared here (not in a function) arch/unicore32/kernel/ksyms.c:49: error: type defaults to .nt. in declaration of ._raw_readsl. arch/unicore32/kernel/ksyms.c:52: error: ._raw_writesb. undeclared here (not in a function) arch/unicore32/kernel/ksyms.c:52: error: type defaults to .nt. in declaration of ._raw_writesb. arch/unicore32/kernel/ksyms.c:55: error: ._raw_writesw. undeclared here (not in a function) arch/unicore32/kernel/ksyms.c:55: error: type defaults to .nt. in declaration of ._raw_writesw. arch/unicore32/kernel/ksyms.c:58: error: ._raw_writesl. undeclared here (not in a function) arch/unicore32/kernel/ksyms.c:58: error: type defaults to .nt. in declaration of ._raw_writesl. arch/unicore32/kernel/ksyms.c:79: error: ._get_user_1. undeclared here (not in a function) arch/unicore32/kernel/ksyms.c:79: error: type defaults to .nt. in declaration of ._get_user_1. arch/unicore32/kernel/ksyms.c:80: error: ._get_user_2. undeclared here (not in a function) arch/unicore32/kernel/ksyms.c:80: error: type defaults to .nt. in declaration of ._get_user_2. arch/unicore32/kernel/ksyms.c:81: error: ._get_user_4. undeclared here (not in a function) arch/unicore32/kernel/ksyms.c:81: error: type defaults to .nt. in declaration of ._get_user_4. arch/unicore32/kernel/ksyms.c:83: error: ._put_user_1. undeclared here (not in a function) arch/unicore32/kernel/ksyms.c:83: error: type defaults to .nt. in declaration of ._put_user_1. arch/unicore32/kernel/ksyms.c:84: error: ._put_user_2. undeclared here (not in a function) arch/unicore32/kernel/ksyms.c:84: error: type defaults to .nt. in declaration of ._put_user_2. arch/unicore32/kernel/ksyms.c:85: error: ._put_user_4. undeclared here (not in a function) arch/unicore32/kernel/ksyms.c:85: error: type defaults to .nt. in declaration of ._put_user_4. arch/unicore32/kernel/ksyms.c:86: error: ._put_user_8. undeclared here (not in a function) arch/unicore32/kernel/ksyms.c:86: error: type defaults to .nt. in declaration of ._put_user_8. Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com> Acked-by: Xuetao Guan <gxt@mprc.pku.edu.cn> Signed-off-by: Xuetao Guan <gxt@mprc.pku.edu.cn>
2014-06-19Btrfs: fix wrong error handle when the device is missing or is not writeableMiao Xie1-7/+15
The original bio might be submitted, so we shoud increase bi_remaining to account for it when we deal with the error that the device is missing or is not writeable, or we would skip the endio handle. Signed-off-by: Miao Xie <miaox@cn.fujitsu.com> Signed-off-by: Chris Mason <clm@fb.com>
2014-06-19Btrfs: fix deadlock when mounting a degraded fsMiao Xie2-1/+9
The deadlock happened when we mount degraded filesystem, the reproduced steps are following: # mkfs.btrfs -f -m raid1 -d raid1 <dev0> <dev1> # echo 1 > /sys/block/`basename <dev0>`/device/delete # mount -o degraded <dev1> <mnt> The reason was that the counter -- bi_remaining was wrong. If the missing or unwriteable device was the last device in the mapping array, we would not submit the original bio, so we shouldn't increase bi_remaining of it in btrfs_end_bio(), or we would skip the final endio handle. Fix this problem by adding a flag into btrfs bio structure. If we submit the original bio, we will set the flag, and we increase bi_remaining counter, or we don't. Though there is another way to fix it -- decrease bi_remaining counter of the original bio when we make sure the original bio is not submitted, this method need add more check and is easy to make mistake. Signed-off-by: Miao Xie <miaox@cn.fujitsu.com> Reviewed-by: Liu Bo <bo.li.liu@oracle.com> Signed-off-by: Chris Mason <clm@fb.com>
2014-06-19Btrfs: use bio_endio_nodec instead of open codeMiao Xie1-8/+1
Signed-off-by: Miao Xie <miaox@cn.fujitsu.com> Signed-off-by: Chris Mason <clm@fb.com>
2014-06-19Btrfs: fix NULL pointer crash when running balance and scrub concurrentlyWang Shilong3-7/+6
While running balance, scrub, fsstress concurrently we hit the following kernel crash: [56561.448845] BTRFS info (device sde): relocating block group 11005853696 flags 132 [56561.524077] BUG: unable to handle kernel NULL pointer dereference at 0000000000000078 [56561.524237] IP: [<ffffffffa038956d>] scrub_chunk.isra.12+0xdd/0x130 [btrfs] [56561.524297] PGD 9be28067 PUD 7f3dd067 PMD 0 [56561.524325] Oops: 0000 [#1] SMP [....] [56561.527237] Call Trace: [56561.527309] [<ffffffffa038980e>] scrub_enumerate_chunks+0x24e/0x490 [btrfs] [56561.527392] [<ffffffff810abe00>] ? abort_exclusive_wait+0x50/0xb0 [56561.527476] [<ffffffffa038add4>] btrfs_scrub_dev+0x1a4/0x530 [btrfs] [56561.527561] [<ffffffffa0368107>] btrfs_ioctl+0x13f7/0x2a90 [btrfs] [56561.527639] [<ffffffff811c82f0>] do_vfs_ioctl+0x2e0/0x4c0 [56561.527712] [<ffffffff8109c384>] ? vtime_account_user+0x54/0x60 [56561.527788] [<ffffffff810f768c>] ? __audit_syscall_entry+0x9c/0xf0 [56561.527870] [<ffffffff811c8551>] SyS_ioctl+0x81/0xa0 [56561.527941] [<ffffffff815707f7>] tracesys+0xdd/0xe2 [...] [56561.528304] RIP [<ffffffffa038956d>] scrub_chunk.isra.12+0xdd/0x130 [btrfs] [56561.528395] RSP <ffff88004c0f5be8> [56561.528454] CR2: 0000000000000078 This is because in btrfs_relocate_chunk(), we will free @bdev directly while scrub may still hold extent mapping, and may access freed memory. Fix this problem by wrapping freeing @bdev work into free_extent_map() which is based on reference count. Reported-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: Wang Shilong <wangsl.fnst@cn.fujitsu.com> Signed-off-by: Miao Xie <miaox@cn.fujitsu.com> Signed-off-by: Chris Mason <clm@fb.com>
2014-06-19btrfs: Skip scrubbing removed chunks to avoid -ENOENT.Qu Wenruo1-10/+9
When run scrub with balance, sometimes -ENOENT will be returned, since in scrub_enumerate_chunks() will search dev_extent in *COMMIT_ROOT*, but btrfs_lookup_block_group() will search block group in *MEMORY*, so if a chunk is removed but not committed, -ENOENT will be returned. However, there is no need to stop scrubbing since other chunks may be scrubbed without problem. So this patch changes the behavior to skip removed chunks and continue to scrub the rest. Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: Miao Xie <miaox@cn.fujitsu.com> Signed-off-by: Chris Mason <clm@fb.com>
2014-06-19Btrfs: fix broken free space cache after the system crashedMiao Xie4-44/+186
When we mounted the filesystem after the crash, we got the following message: BTRFS error (device xxx): block group xxxx has wrong amount of free space BTRFS error (device xxx): failed to load free space cache for block group xxx It is because we didn't update the metadata of the allocated space (in extent tree) until the file data was written into the disk. During this time, there was no information about the allocated spaces in either the extent tree nor the free space cache. when we wrote out the free space cache at this time (commit transaction), those spaces were lost. In fact, only the free space that is used to store the file data had this problem, the others didn't because the metadata of them is updated in the same transaction context. There are many methods which can fix the above problem - track the allocated space, and write it out when we write out the free space cache - account the size of the allocated space that is used to store the file data, if the size is not zero, don't write out the free space cache. The first one is complex and may make the performance drop down. This patch chose the second method, we use a per-block-group variant to account the size of that allocated space. Besides that, we also introduce a per-block-group read-write semaphore to avoid the race between the allocation and the free space cache write out. Signed-off-by: Miao Xie <miaox@cn.fujitsu.com> Signed-off-by: Chris Mason <clm@fb.com>
2014-06-19Btrfs: make free space cache write out functions more readableMiao Xie1-66/+93
This patch makes the free space cache write out functions more readable, and beisdes that, it also reduces the stack space that the function -- __btrfs_write_out_cache uses from 194bytes to 144bytes. Signed-off-by: Miao Xie <miaox@cn.fujitsu.com> Signed-off-by: Chris Mason <clm@fb.com>
2014-06-19Btrfs: remove unused wait queue in struct extent_bufferFilipe Manana1-1/+0
The lock_wq wait queue is not used anywhere, therefore just remove it. On a x86_64 system, this reduced sizeof(struct extent_buffer) from 320 bytes down to 296 bytes, which means a 4Kb page can now be used for 13 extent buffers instead of 12. Signed-off-by: Filipe David Borba Manana <fdmanana@gmail.com> Signed-off-by: Chris Mason <clm@fb.com>
2014-06-19Btrfs: fix deadlocks with trylock on tree nodesChris Mason1-34/+46
The Btrfs tree trylock function is poorly named. It always takes the spinlock and backs off if the blocking lock is held. This can lead to surprising lockups because people expect it to really be a trylock. This commit makes it a pure trylock, both for the spinlock and the blocking lock. It also reworks the nested lock handling slightly to avoid taking the read lock while a spinning write lock might be held. Signed-off-by: Chris Mason <clm@fb.com>
2014-06-19tty/serial: fix 8250 early console option passing to regular consoleRob Herring2-2/+5
In the conversion to generic early console, the passing of options from the early 8250 console to the regular ttyS console was broken. This resulted in the baud rate changing when switching consoles during boot. This feature allows specifying a single console option on the kernel command line rather than both an early console and regular serial tty console. It would be nice to generalize this feature. However, it only works if the correct baud rate can be probed early which is not the case on many platforms which have non-standard UART clock rates. So for now, this is left as an 8250 specific feature. Reported-and-tested-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Rob Herring <robh@kernel.org> Cc: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19tty: Correct INPCK handlingPeter Hurley1-9/+10
If INPCK is not set, input parity detection should be disabled. This means parity errors should not be received from the tty driver, and the data received should be treated normally. SUS v3, 11.2.2, General Terminal Interface - Input Modes, states: "If INPCK is set, input parity checking shall be enabled. If INPCK is not set, input parity checking shall be disabled, allowing output parity generation without input parity errors. Note that whether input parity checking is enabled or disabled is independent of whether parity detection is enabled or disabled (see Control Modes). If parity detection is enabled but input parity checking is disabled, the hardware to which the terminal is connected shall recognize the parity bit, but the terminal special file shall not check whether or not this bit is correctly set." Ignore parity errors reported by the tty driver when INPCK is not set, and handle the received data normally. Fixes: Bugzilla #71681, 'Improvement of n_tty_receive_parity_error from n_tty.c' Reported-by: Ivan <athlon_@mail.ru> Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19serial: Fix IGNBRK handlingPeter Hurley34-32/+44
If IGNBRK is set without either BRKINT or PARMRK set, some uart drivers send a 0x00 byte for BREAK without the TTYBREAK flag to the line discipline, when it should send either nothing or the TTYBREAK flag set. This happens because the read_status_mask masks out the BI condition, which uart_insert_char() then interprets as a normal 0x00 byte. SUS v3 is clear regarding the meaning of IGNBRK; Section 11.2.2, General Terminal Interface - Input Modes, states: "If IGNBRK is set, a break condition detected on input shall be ignored; that is, not put on the input queue and therefore not read by any process." Fix read_status_mask to include the BI bit if IGNBRK is set; the lsr status retains the BI bit if a BREAK is recv'd, which is subsequently ignored in uart_insert_char() when masked with the ignore_status_mask. Affected drivers: 8250 - all serial_txx9 mfd amba-pl010 amba-pl011 atmel_serial bfin_uart dz ip22zilog max310x mxs-auart netx-serial pnx8xxx_uart pxa sb1250-duart sccnxp serial_ks8695 sirfsoc_uart st-asc vr41xx_siu zs sunzilog fsl_lpuart sunsab ucc_uart bcm63xx_uart sunsu efm32-uart pmac_zilog mpsc msm_serial m32r_sio Unaffected drivers: omap-serial rp2 sa1100 imx icom Annotated for fixes: altera_uart mcf Drivers without break detection: 21285 xilinx-uartps altera_jtaguart apbuart arc-uart clps711x max3100 uartlite msm_serial_hs nwpserial lantiq vt8500_serial Unknown: samsung mpc52xx_uart bfin_sport_uart cpm_uart/core Fixes: Bugzilla #71651, '8250_core.c incorrectly handles IGNBRK flag' Reported-by: Ivan <athlon_@mail.ru> Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19drm: fix uninitialized acquire_ctx fields (v2)Rob Clark1-0/+1
The acquire ctx will typically be declared on the stack, which means we could have garbage values for any uninitialized field. In this case, it was triggering WARN_ON()s because 'contended' had garbage value. Go ahead and use memset() to be more future-proof. v2: now with extra brown paper bag Reported-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Rob Clark <robdclark@gmail.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Tested-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2014-06-18staging: comedi: addi_apci_1564: add addi_watchdog dependencyArnd Bergmann1-0/+1
With commit aed3f9d498b ("staging: comedi: addi_apci_1564: absorb apci1564_reset()"), the apci 1564 driver has gained a dependency on the addi watchdog module, which is not reflected correctly in Kconfig, and that can lead to link errors when the watchdog is disabled. This adds an explicit 'select', like it is done in the other addi apci drivers that need it. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: H Hartley Sweeten <hsweeten@visionengravers.com> Acked-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-18drm/radeon: Fix radeon_irq_kms_pflip_irq_get/put() imbalanceMichel Dänzer1-1/+1
Fixes a regression in 3.16-rc1 compared to 3.15. The unbalanced calls would presumably result in the page flip interrupts never getting disabled once they are enabled. Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-06-18Revert "drm/radeon: remove drm_vblank_get|put from pflip handling"Michel Dänzer1-0/+17
This reverts commit 75f36d861957cb05b7889af24c8cd4a789398304. drm_vblank_get() is necessary to ensure the DRM vblank counter value is up to date in drm_send_vblank_event(). Seems to fix weston hangs waiting for page flips to complete. Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-06-18drm/radeon: improve dvi_mode_validAlex Deucher1-9/+7
Make sure we have an HDMI monitor before validating modes with clocks >165 Mhz on single link connections. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-06-18drm/radeon: update mode_valid testing for DPAlex Deucher1-4/+15
When we have a passive adapter validate the clocks against the HMDI/DVI limits. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-06-18drm/radeon: Use dce5/6 hdmi deep color clock setup also on dce8+Mario Kleiner1-1/+1
Need to use the adjusted clock on dce8 as well. bug: https://bugs.freedesktop.org/show_bug.cgi?id=80029 Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-06-18cpuidle: mvebu: Fix the name of the statesGregory CLEMENT1-2/+2
The length name of the states 2 was too long to fit in the allocated string (limited to 16 bytes). This lead to improper string displayed through sysfs. This patch shorten the name by removing the reference to Marvell and to the CPU as both are implicit. For coherency the same change have been done for the states 1. Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>