Linux 4.5.7
Greg KH
maintainer----------------
NOTE: This is the LAST 4.5.y stable kernel release. It is now end-of-life, please move to the 4.6.y kernel tree now as this tree will not be getting any more updates.
----------------
I'm announcing the release of the 4.5.7 kernel.
All users of the 4.5 kernel series must upgrade.
The updated 4.5.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.5.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Documentation/devicetree/bindings/clock/imx35-clock.txt | 1 Makefile | 4 arch/arm/boot/dts/armada-385-linksys.dtsi | 6 arch/arm/boot/dts/armada-xp-linksys-mamba.dts | 4 arch/arm/boot/dts/exynos4210-trats.dts | 2 arch/arm/boot/dts/sama5d2-pinfunc.h | 4 arch/arm/boot/dts/sun4i-a10.dtsi | 2 arch/arm/boot/dts/sun7i-a20.dtsi | 5 arch/mips/ath79/early_printk.c | 6 arch/mips/include/asm/asmmacro.h | 40 +-- arch/mips/include/asm/cacheflush.h | 6 arch/mips/include/asm/msa.h | 13 + arch/mips/include/asm/pgtable.h | 26 ++ arch/mips/include/asm/switch_to.h | 2 arch/mips/include/asm/watch.h | 10 arch/mips/include/uapi/asm/siginfo.h | 22 -- arch/mips/kernel/mips-r2-to-r6-emul.c | 105 +++++----- arch/mips/kernel/pm.c | 2 arch/mips/kernel/process.c | 6 arch/mips/kernel/ptrace.c | 27 +- arch/mips/kernel/r4k_fpu.S | 10 arch/mips/kernel/setup.c | 3 arch/mips/kernel/signal.c | 15 - arch/mips/kernel/traps.c | 8 arch/mips/kernel/watch.c | 5 arch/mips/lib/ashldi3.c | 2 arch/mips/lib/ashrdi3.c | 2 arch/mips/lib/bswapdi.c | 2 arch/mips/lib/bswapsi.c | 2 arch/mips/lib/cmpdi2.c | 2 arch/mips/lib/lshrdi3.c | 2 arch/mips/lib/ucmpdi2.c | 2 arch/mips/loongson64/Platform | 2 arch/mips/loongson64/loongson-3/numa.c | 6 arch/mips/math-emu/cp1emu.c | 8 arch/mips/mm/cache.c | 41 ++- arch/mips/vdso/Makefile | 4 arch/powerpc/kernel/eeh.c | 2 arch/powerpc/kernel/eeh_driver.c | 26 ++ arch/powerpc/kernel/exceptions-64s.S | 16 + arch/x86/xen/setup.c | 65 ++---- drivers/base/power/main.c | 5 drivers/base/power/runtime.c | 9 drivers/char/hw_random/exynos-rng.c | 10 drivers/clk/at91/clk-h32mx.c | 2 drivers/clk/bcm/clk-bcm2835.c | 58 ++++- drivers/clk/imx/clk-imx35.c | 4 drivers/cpuidle/cpuidle.c | 4 drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c | 10 drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.c | 2 drivers/gpu/drm/drm_atomic.c | 2 drivers/gpu/drm/drm_fb_helper.c | 5 drivers/gpu/drm/gma500/mdfld_dsi_pkg_sender.c | 2 drivers/gpu/drm/i915/intel_atomic.c | 3 drivers/gpu/drm/i915/intel_display.c | 21 +- drivers/gpu/drm/i915/intel_drv.h | 2 drivers/gpu/drm/i915/intel_fbdev.c | 6 drivers/gpu/drm/i915/intel_pm.c | 2 drivers/gpu/drm/i915/intel_psr.c | 55 ++++- drivers/gpu/drm/imx/imx-drm-core.c | 8 drivers/gpu/drm/imx/ipuv3-crtc.c | 2 drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 10 drivers/gpu/drm/vmwgfx/vmwgfx_fb.c | 6 drivers/gpu/ipu-v3/ipu-common.c | 5 drivers/hwmon/ads7828.c | 10 drivers/input/joystick/xpad.c | 6 drivers/input/misc/uinput.c | 6 drivers/media/v4l2-core/v4l2-compat-ioctl32.c | 3 drivers/mfd/intel-lpss.c | 19 + drivers/mfd/intel_soc_pmic_core.c | 1 drivers/net/wireless/ath/ath10k/core.c | 8 drivers/net/wireless/ath/ath10k/debug.c | 7 drivers/net/wireless/ath/ath10k/mac.c | 13 + drivers/net/wireless/ath/ath5k/led.c | 2 drivers/net/wireless/ath/ath9k/init.c | 7 drivers/net/wireless/ath/ath9k/pci.c | 10 drivers/net/wireless/realtek/rtlwifi/base.c | 4 drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c | 9 drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c | 27 ++ drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.h | 2 drivers/net/wireless/realtek/rtlwifi/btcoexist/rtl_btc.c | 5 drivers/net/wireless/realtek/rtlwifi/pci.c | 2 drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c | 5 drivers/net/wireless/realtek/rtlwifi/rtl8723be/sw.c | 3 drivers/net/wireless/realtek/rtlwifi/wifi.h | 3 drivers/pci/probe.c | 6 drivers/pinctrl/samsung/pinctrl-exynos5440.c | 15 - drivers/scsi/aacraid/aacraid.h | 1 drivers/scsi/aacraid/comminit.c | 24 ++ drivers/scsi/aacraid/commsup.c | 12 - drivers/scsi/lpfc/lpfc_mem.c | 6 drivers/tty/serial/ucc_uart.c | 3 drivers/xen/events/events_base.c | 6 fs/affs/super.c | 5 fs/btrfs/backref.c | 2 fs/btrfs/ctree.h | 1 fs/btrfs/extent-tree.c | 2 fs/btrfs/extent_io.c | 14 + fs/btrfs/file.c | 2 fs/btrfs/inode.c | 2 fs/btrfs/ioctl.c | 41 +++ fs/btrfs/scrub.c | 7 fs/btrfs/super.c | 22 +- fs/btrfs/sysfs.c | 6 fs/btrfs/tree-log.c | 15 - fs/btrfs/volumes.c | 61 ++++- fs/btrfs/volumes.h | 2 fs/ext4/ialloc.c | 59 ++--- fs/ext4/ioctl.c | 2 fs/ext4/mballoc.c | 10 fs/ext4/namei.c | 2 fs/nfs/pnfs_nfs.c | 28 ++ fs/nfs/write.c | 4 fs/xfs/xfs_fsops.c | 4 fs/xfs/xfs_inode.c | 26 +- fs/xfs/xfs_super.c | 10 include/linux/mm.h | 2 include/video/imx-ipu-v3.h | 2 kernel/exit.c | 29 +- lib/dma-debug.c | 2 mm/page_alloc.c | 2 mm/rmap.c | 2 net/bluetooth/6lowpan.c | 11 - net/sunrpc/auth_gss/svcauth_gss.c | 4 scripts/package/Makefile | 4 sound/soc/codecs/ak4642.c | 3 126 files changed, 926 insertions(+), 438 deletions(-)
Adam Borowski (1):
btrfs: fix int32 overflow in shrink_delalloc().
Akshay Bhat (1):
hwmon: (ads7828) Enable internal reference
Alex Deucher (1):
drm/amdgpu: use drm_mode_vrefresh() rather than mode->vrefresh
Alexander Kurz (1):
ARM: dts: imx35: restore existing used clock enumeration
Anand Jain (3):
btrfs: fix lock dep warning, move scratch dev out of device_list_mutex and uuid_mutex
btrfs: fix lock dep warning move scratch super outside of chunk_mutex
btrfs: pass the right error code to the btrfs_std_error
Andrew Jeffery (1):
pinctrl: exynos5440: Use off-stack memory for pinctrl_gpio_range
Anilkumar Kolli (2):
ath10k: fix debugfs pktlog_filter write
ath10k: fix kernel panic, move arvifs list head init before htt init
Arnd Bergmann (1):
gcov: disable tree-loop-im to reduce stack usage
Austin S. Hemmelgarn (1):
btrfs: allow balancing to dup with multi-device
Cameron Gutman (1):
Input: xpad - prevent spurious input from wired Xbox 360 controllers
Charmaine Lee (2):
drm/vmwgfx: Enable SVGA_3D_CMD_DX_SET_PREDICATION drm/vmwgfx: use vmw_cmd_dx_cid_check for query commands.
Daniel Lezcano (1):
cpuidle: Fix cpuidle_state_is_coupled() argument in cpuidle_enter()
Daniel Vetter (1):
drm/i915/psr: Try to program link training times correctly
Dave Chinner (4):
xfs: Don't wrap growfs AGFL indexes
xfs: xfs_iflush_cluster fails to abort on error
xfs: fix inode validity check in xfs_iflush_cluster
xfs: skip stale inodes in xfs_iflush_cluster
Dave Gerlach (1):
cpuidle: Indicate when a device has been unregistered
David Sterba (4):
btrfs: add read-only check to sysfs handler of features
btrfs: add check to sysfs handler of label
btrfs: add write protection to SET_FEATURES ioctl
btrfs: make state preallocation more speculative in __set_extent_bit
Eric Anholt (1):
clk: bcm2835: Fix PLL poweron
Eric Sandeen (1):
xfs: disallow rw remount on fs with unknown ro-compat features
Filipe Manana (2):
Btrfs: fix for incorrect directory entries after fsync log replay
Btrfs: fix empty symlink after creating symlink and fsync parent dir
Florian Vallee (1):
ARM: dts: at91: fix typo in sama5d2 PIN_PD24 description
Gavin Shan (2):
powerpc/eeh: Don't report error in eeh_pe_reset_and_recover() powerpc/eeh: Restore initial state in eeh_pe_reset_and_recover()
Glenn Ruben Bakke (1):
Bluetooth: 6lowpan: Fix memory corruption of ipv6 destination address
Greg Kroah-Hartman (1):
Linux 4.5.7
Guilherme G. Piccoli (1):
Revert "powerpc/eeh: Fix crash in eeh_add_device_early() on Cell"
Hari Bathini (1):
powerpc/book3s64: Fix branching to OOL handlers in relocatable kernel
Harvey Hunt (1):
MIPS: lib: Mark intrinsics notrace
Heikki Krogerus (1):
mfd: intel-lpss: Save register context on suspend
Huacai Chen (3):
MIPS: Loongson-3: Fix build error after ld-version.sh modification
MIPS: Reserve nosave data for hibernation
MIPS: Loongson-3: Reserve 32MB for RS780E integrated GPU
Imre Kaloz (1):
ARM: mvebu: fix GPIO config on the Linksys boards
Itai Handler (1):
drm/gma500: Fix possible out of bounds read
James Hogan (8):
MIPS: Don't unwind to user mode with EVA
MIPS: Avoid using unwind_stack() with usermode
MIPS: Fix siginfo.h to use strict posix types
MIPS: Fix uapi include in exported asm/siginfo.h
MIPS: Fix watchpoint restoration
MIPS: Fix MSA ld_*/st_* asm macros to use PTR_ADDU
MIPS: Fix sigreturn via VDSO on microMIPS kernel
MIPS: Build microMIPS VDSO for microMIPS kernels
Jan Kara (1):
ext4: fix oops on corrupted filesystem
Josef Bacik (1):
Btrfs: remove BUG_ON()'s in btrfs_map_block
Joseph Salisbury (1):
ath5k: Change led pin configuration for compaq c700 laptop
Juergen Gross (1):
xen: use same main loop for counting and remapping pages
Kirill A. Shutemov (1):
mm: thp: avoid false positive VM_BUG_ON_PAGE in page_move_anon_rmap()
Krzysztof Kozlowski (1):
hwrng: exynos - Fix unbalanced PM runtime put on timeout error path
Larry Finger (2):
rtlwifi: rtl8723be: Add antenna select module parameter
rtlwifi: btcoexist: Implement antenna selection
Leonid Yegoshin (1):
MIPS64: R6: R2 emulation bugfix
Liu Bo (3):
Btrfs: do not create empty block group if we have allocated data
Btrfs: fix divide error upon chunk's stripe_len
Btrfs: fix unexpected return value of fiemap
Luis de Bethencourt (2):
btrfs: fix mixed block count of available space
btrfs: avoid overflowing f_bfree
Luke Dashjr (1):
btrfs: bugfix: handle FS_IOC32_{GETFLAGS,SETFLAGS,GETVERSION} in btrfs_ioctl
Lyude (3):
drm/i915/fbdev: Fix num_connector references in intel_fb_initial_config()
drm/fb_helper: Fix references to dev->mode_config.num_connector
drm/atomic: Verify connector->funcs != NULL when clearing statesMaciej W. Rozycki (4):
MIPS: MSA: Fix a link error on `_init_msa_upper' with older GCC
MIPS: ptrace: Fix FP context restoration FCSR regression
MIPS: ptrace: Prevent writes to read-only FCSR bits
MIPS: VDSO: Build with `-fno-strict-aliasing'
Marek Szyprowski (1):
ARM: dts: exynos: Add interrupt line to MAX8997 PMIC on exynos4210-trats
Mario Kleiner (1):
drm/amdgpu: Fix hdmi deep color support.
Mark Brown (1):
ASoC: ak4642: Enable cache usage to fix crashes on resume
Martin K. Petersen (1):
Revert "lpfc: Delete unnecessary checks before the function call mempool_destroy"
Martin Sperl (3):
clk: bcm2835: pll_off should only update CM_PLL_ANARST
clk: bcm2835: divider value has to be 1 or more
clk: bcm2835: correctly enable fractional clock support
Matthias Schiffer (1):
MIPS: ath79: make bootconsole wait for both THRE and TEMT
Mikulas Patocka (1):
affs: fix remount failure when there are no options changed
Nicolai Stange (2):
ext4: address UBSAN warning in mb_find_order_for_block()
ext4: silence UBSAN in ext4_mb_init()
Oleg Nesterov (1):
wait/ptrace: assume __WALL if the child is traced
Paul Burton (7):
MIPS: math-emu: Fix jalr emulation when rd == $0
MIPS: Flush highmem pages in __flush_dcache_page
MIPS: Handle highmem pages in __update_cache
MIPS: Sync icache & dcache in set_pte_at
MIPS: Use copy_s.fmt rather than copy_u.fmt
MIPS: Prevent "restoration" of MSA context in non-MSA kernels
MIPS: Disable preemption during prctl(PR_SET_FP_MODE, ...)
Pavel Rojtberg (1):
Input: xpad - move pending clear to the correct location
Philipp Zabel (1):
drm/imx: Match imx-ipuv3-crtc components using device node in platform data
Prarit Bhargava (1):
PCI: Disable all BAR sizing for devices with non-compliant BARs
Priit Laes (2):
ARM: sun4i: dt: Enable dram gate 5 (tve0 clock) for simplefb TV output
ARM: sun7i: dt: Enable dram gate 5 (tve0 clock) for simplefb TV output
Rafael J. Wysocki (1):
PM / sleep: Handle failures in device_suspend_late() consistently
Raghava Aditya Renukunta (3):
aacraid: Relinquish CPU during timeout wait
aacraid: Fix for aac_command_thread hang
aacraid: Fix for KDUMP driver hang
Rajkumar Manoharan (2):
ath10k: fix firmware assert in monitor mode
ath10k: fix rx_channel during hw reconfigure
Ricky Liang (1):
Input: uinput - handle compat ioctl for UI_SET_PHYS
Ross Lagerwall (1):
xen/events: Don't move disabled irqs
Scott Talbert (1):
btrfs: fix memory leak during RAID 5/6 device replacement
Seth Forshee (1):
ext4: fix check of dqget() return value in ext4_ioctl_setproject()
Sinclair Yeh (1):
drm/vmwgfx: Fix order of operation
Srinivas Pandruvada (1):
scripts/package/Makefile: rpmbuild add support of RPMOPTS
Stefan Bader (1):
mm: use phys_addr_t for reserve_bootmem_region() arguments
Theodore Ts'o (2):
ext4: fix hang when processing corrupted orphaned inode list
ext4: clean up error handling when orphan list is corrupted
Tiffany Lin (1):
media: v4l2-compat-ioctl32: fix missing reserved field copy in put_v4l2_create32
Tomáš Trnka (1):
sunrpc: fix stripping of padded MIC tokens
Ulf Hansson (1):
PM / Runtime: Fix error path in pm_runtime_force_resume()
Ville Syrjälä (4):
mfd: intel_soc_pmic_core: Terminate panel control GPIO lookup table correctly drm/i915: Don't leave old junk in ilk active watermarks on readout drm/i915: Fix watermarks for VLV/CHV
dma-debug: avoid spinlock recursion when disabling dma-debug
Vincent Stehlé (1):
Btrfs: fix fspath error deallocation
Vittorio Gambaletta (VittGam) (2):
ath9k: Add a module parameter to invert LED polarity.
ath9k: Fix LED polarity for some Mini PCI AR9220 MB92 cards.
Vladimir Zapolskiy (1):
clk: at91: fix check of clk_register() returned value
Weston Andros Adamson (1):
nfs: avoid race that crashes nfs_init_commit
Zhao Lei (1):
btrfs: scrub: Set bbio to NULL before calling btrfs_map_block
Zhao Qiang (1):
QE-UART: add "fsl,t1040-ucc-uart" to of_device_id
wang yanqing (2):
rtlwifi: Fix logic error in enter/exit power-save mode
rtlwifi: pci: use dev_kfree_skb_irq instead of kfree_skb in rtl_pci_reset_trx_ring
Greg KH
maintainerDocumentation/devicetree/bindings/clock/imx35-clock.txt +1 -0
@@ -94,6 +94,7 @@ clocks and IDs. csi_sel 79 iim_gate 80 gpu2d_gate 81 + ckli_gate 82 Examples:
Makefile +2 -2
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 5 -SUBLEVEL = 6 +SUBLEVEL = 7 EXTRAVERSION = NAME = Blurry Fish Butt
@@ -364,7 +364,7 @@ AFLAGS_MODULE = LDFLAGS_MODULE = CFLAGS_KERNEL = AFLAGS_KERNEL = -CFLAGS_GCOV = -fprofile-arcs -ftest-coverage +CFLAGS_GCOV = -fprofile-arcs -ftest-coverage -fno-tree-loop-im # Use USERINCLUDE when you must reference the UAPI directories only.
arch/arm/boot/dts/armada-385-linksys.dtsi +3 -3
@@ -245,7 +245,7 @@ button@2 { label = "Factory Reset Button"; linux,code = <KEY_RESTART>; - gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; + gpios = <&gpio0 29 GPIO_ACTIVE_LOW>; }; };
@@ -260,7 +260,7 @@ }; sata { - gpios = <&gpio1 22 GPIO_ACTIVE_HIGH>; + gpios = <&gpio1 22 GPIO_ACTIVE_LOW>; default-state = "off"; }; };
@@ -313,7 +313,7 @@ &pinctrl { keys_pin: keys-pin { - marvell,pins = "mpp24", "mpp47"; + marvell,pins = "mpp24", "mpp29"; marvell,function = "gpio"; };
arch/arm/boot/dts/armada-xp-linksys-mamba.dts +2 -2
@@ -304,13 +304,13 @@ button@1 { label = "WPS"; linux,code = <KEY_WPS_BUTTON>; - gpios = <&gpio1 0 GPIO_ACTIVE_HIGH>; + gpios = <&gpio1 0 GPIO_ACTIVE_LOW>; }; button@2 { label = "Factory Reset Button"; linux,code = <KEY_RESTART>; - gpios = <&gpio1 1 GPIO_ACTIVE_HIGH>; + gpios = <&gpio1 1 GPIO_ACTIVE_LOW>; }; };
arch/arm/boot/dts/exynos4210-trats.dts +2 -0
@@ -298,6 +298,8 @@ compatible = "maxim,max8997-pmic"; reg = <0x66>; + interrupt-parent = <&gpx0>; + interrupts = <7 0>; max8997,pmic-buck1-uses-gpio-dvs; max8997,pmic-buck2-uses-gpio-dvs;
arch/arm/boot/dts/sama5d2-pinfunc.h +2 -2
@@ -837,8 +837,8 @@#define PIN_PD23__ISC_FIELD PINMUX_PIN(PIN_PD23, 6, 4)#define PIN_PD24 120#define PIN_PD24__GPIO PINMUX_PIN(PIN_PD24, 0, 0) -#define PIN_PD24__UTXD2 PINMUX_PIN(PIN_PD23, 1, 2) -#define PIN_PD24__FLEXCOM4_IO3 PINMUX_PIN(PIN_PD23, 3, 3) +#define PIN_PD24__UTXD2 PINMUX_PIN(PIN_PD24, 1, 2) +#define PIN_PD24__FLEXCOM4_IO3 PINMUX_PIN(PIN_PD24, 3, 3)#define PIN_PD25 121#define PIN_PD25__GPIO PINMUX_PIN(PIN_PD25, 0, 0)#define PIN_PD25__SPI1_SPCK PINMUX_PIN(PIN_PD25, 1, 3)
arch/arm/boot/dts/sun4i-a10.dtsi +1 -1
@@ -96,7 +96,7 @@ allwinner,pipeline = "de_fe0-de_be0-lcd0-tve0"; clocks = <&pll5 1>, <&ahb_gates 34>, <&ahb_gates 36>, <&ahb_gates 44>, <&ahb_gates 46>, - <&dram_gates 25>, <&dram_gates 26>; + <&dram_gates 5>, <&dram_gates 25>, <&dram_gates 26>; status = "disabled"; }; };
arch/arm/boot/dts/sun7i-a20.dtsi +3 -2
@@ -85,8 +85,9 @@ compatible = "allwinner,simple-framebuffer", "simple-framebuffer"; allwinner,pipeline = "de_be0-lcd0-tve0"; - clocks = <&pll5 1>, <&ahb_gates 34>, <&ahb_gates 36>, - <&ahb_gates 44>, <&dram_gates 26>; + clocks = <&pll5 1>, + <&ahb_gates 34>, <&ahb_gates 36>, <&ahb_gates 44>, + <&dram_gates 5>, <&dram_gates 26>; status = "disabled"; }; };
arch/mips/ath79/early_printk.c +4 -2
@@ -31,13 +31,15 @@ static inline void prom_putchar_wait(void __iomem *reg, u32 mask, u32 val) }while (1 ); } +#define BOTH_EMPTY (UART_LSR_TEMT | UART_LSR_THRE) +static void prom_putchar_ar71xx (unsigned char ch) {void __iomem *base = (void __iomem *)(KSEG1ADDR (AR71XX_UART_BASE )); -prom_putchar_wait (base +UART_LSR *4 ,UART_LSR_THRE ,UART_LSR_THRE ); +prom_putchar_wait (base +UART_LSR *4 ,BOTH_EMPTY ,BOTH_EMPTY );__raw_writel (ch, base +UART_TX *4 ); -prom_putchar_wait (base +UART_LSR *4 ,UART_LSR_THRE ,UART_LSR_THRE ); +prom_putchar_wait (base +UART_LSR *4 ,BOTH_EMPTY ,BOTH_EMPTY ); }static void prom_putchar_ar933x (unsigned char ch)
arch/mips/include/asm/asmmacro.h +20 -20
@@ -298,21 +298,21 @@ .set pop .endm - .macro copy_u_w ws, n + .macro copy_s_w ws, n .set push .set mips32r2 .set fp=64 .set msa - copy_u.w $1, $w\ws[\n] + copy_s.w $1, $w\ws[\n] .set pop .endm - .macro copy_u_d ws, n + .macro copy_s_d ws, n .set push .set mips64r2 .set fp=64 .set msa - copy_u.d $1, $w\ws[\n] + copy_s.d $1, $w\ws[\n] .set pop .endm
@@ -346,8 +346,8 @@#define STH_MSA_INSN 0x5800081f#define STW_MSA_INSN 0x5800082f#define STD_MSA_INSN 0x5800083f -#define COPY_UW_MSA_INSN 0x58f00056 -#define COPY_UD_MSA_INSN 0x58f80056 +#define COPY_SW_MSA_INSN 0x58b00056 +#define COPY_SD_MSA_INSN 0x58b80056#define INSERT_W_MSA_INSN 0x59300816#define INSERT_D_MSA_INSN 0x59380816#else
@@ -361,8 +361,8 @@#define STH_MSA_INSN 0x78000825#define STW_MSA_INSN 0x78000826#define STD_MSA_INSN 0x78000827 -#define COPY_UW_MSA_INSN 0x78f00059 -#define COPY_UD_MSA_INSN 0x78f80059 +#define COPY_SW_MSA_INSN 0x78b00059 +#define COPY_SD_MSA_INSN 0x78b80059#define INSERT_W_MSA_INSN 0x79300819#define INSERT_D_MSA_INSN 0x79380819#endif
@@ -393,7 +393,7 @@ .set push .set noat SET_HARDFLOAT - addu $1, \base, \off + PTR_ADDU $1, \base, \off .word LDB_MSA_INSN | (\wd << 6) .set pop .endm
@@ -402,7 +402,7 @@ .set push .set noat SET_HARDFLOAT - addu $1, \base, \off + PTR_ADDU $1, \base, \off .word LDH_MSA_INSN | (\wd << 6) .set pop .endm
@@ -411,7 +411,7 @@ .set push .set noat SET_HARDFLOAT - addu $1, \base, \off + PTR_ADDU $1, \base, \off .word LDW_MSA_INSN | (\wd << 6) .set pop .endm
@@ -420,7 +420,7 @@ .set push .set noat SET_HARDFLOAT - addu $1, \base, \off + PTR_ADDU $1, \base, \off .word LDD_MSA_INSN | (\wd << 6) .set pop .endm
@@ -429,7 +429,7 @@ .set push .set noat SET_HARDFLOAT - addu $1, \base, \off + PTR_ADDU $1, \base, \off .word STB_MSA_INSN | (\wd << 6) .set pop .endm
@@ -438,7 +438,7 @@ .set push .set noat SET_HARDFLOAT - addu $1, \base, \off + PTR_ADDU $1, \base, \off .word STH_MSA_INSN | (\wd << 6) .set pop .endm
@@ -447,7 +447,7 @@ .set push .set noat SET_HARDFLOAT - addu $1, \base, \off + PTR_ADDU $1, \base, \off .word STW_MSA_INSN | (\wd << 6) .set pop .endm
@@ -456,26 +456,26 @@ .set push .set noat SET_HARDFLOAT - addu $1, \base, \off + PTR_ADDU $1, \base, \off .word STD_MSA_INSN | (\wd << 6) .set pop .endm - .macro copy_u_w ws, n + .macro copy_s_w ws, n .set push .set noat SET_HARDFLOAT .insn - .word COPY_UW_MSA_INSN | (\n << 16) | (\ws << 11) + .word COPY_SW_MSA_INSN | (\n << 16) | (\ws << 11) .set pop .endm - .macro copy_u_d ws, n + .macro copy_s_d ws, n .set push .set noat SET_HARDFLOAT .insn - .word COPY_UD_MSA_INSN | (\n << 16) | (\ws << 11) + .word COPY_SD_MSA_INSN | (\n << 16) | (\ws << 11) .set pop .endm
arch/mips/include/asm/cacheflush.h +0 -6
@@ -51,7 +51,6 @@ extern void (*flush_cache_range)(struct vm_area_struct *vma, unsigned long start, unsigned long end);extern void (*flush_cache_page)(struct vm_area_struct *vma,unsigned long page,unsigned long pfn);extern void __flush_dcache_page (struct page *page); -extern void __flush_icache_page (struct vm_area_struct *vma,struct page *page);#define ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE 1static inline void flush_dcache_page (struct page *page)
@@ -77,11 +76,6 @@ static inline void flush_anon_page(struct vm_area_struct *vma,static inline void flush_icache_page (struct vm_area_struct *vma,struct page *page) { -if (!cpu_has_ic_fills_f_dc && (vma->vm_flags &VM_EXEC ) && -Page_dcache_dirty (page)) { -__flush_icache_page (vma, page); -ClearPageDcacheDirty (page); - } }extern void (*flush_icache_range)(unsigned long start,unsigned long end);
arch/mips/include/asm/msa.h +13 -0
@@ -147,6 +147,19 @@ static inline void restore_msa(struct task_struct *t)_restore_msa (t); } +static inline void init_msa_upper (void ) +{ +/* +* Check cpu_has_msa only if it's a constant. This will allow the +* compiler to optimise out code for CPUs without MSA without adding +* an extra redundant check for CPUs with MSA. +*/ +if (__builtin_constant_p (cpu_has_msa) && !cpu_has_msa) +return ; + +_init_msa_upper (); +} +#ifdef TOOLCHAIN_SUPPORTS_MSA #define __BUILD_MSA_CTL_REG (name, cs) \
arch/mips/include/asm/pgtable.h +21 -5
@@ -127,10 +127,14 @@ do { \ } \ }while (0 ) +static inline void set_pte_at(struct mm_struct *mm, unsigned long addr, +pte_t *ptep,pte_t pteval); +#if defined(CONFIG_PHYS_ADDR_T_64BIT ) && defined(CONFIG_CPU_MIPS32 )#define pte_none (pte) (!(((pte).pte_high) & ~_PAGE_GLOBAL))#define pte_present (pte) ((pte).pte_low & _PAGE_PRESENT) +#define pte_no_exec (pte) ((pte).pte_low & _PAGE_NO_EXEC)static inline void set_pte (pte_t *ptep,pte_t pte) {
@@ -148,7 +152,6 @@ static inline void set_pte(pte_t *ptep, pte_t pte) buddy->pte_high |= _PAGE_GLOBAL; } } -#define set_pte_at (mm, addr, ptep, pteval) set_pte(ptep, pteval)static inline void pte_clear (struct mm_struct *mm,unsigned long addr,pte_t *ptep) {
@@ -166,6 +169,7 @@ static inline void pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *pt#define pte_none (pte) (!(pte_val(pte) & ~_PAGE_GLOBAL))#define pte_present (pte) (pte_val(pte) & _PAGE_PRESENT) +#define pte_no_exec (pte) (pte_val(pte) & _PAGE_NO_EXEC)/* * Certain architectures need to do special things when pte's
@@ -218,7 +222,6 @@ static inline void set_pte(pte_t *ptep, pte_t pteval) }#endif } -#define set_pte_at (mm, addr, ptep, pteval) set_pte(ptep, pteval)static inline void pte_clear (struct mm_struct *mm,unsigned long addr,pte_t *ptep) {
@@ -234,6 +237,22 @@ static inline void pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *pt }#endif +static inline void set_pte_at (struct mm_struct *mm,unsigned long addr, +pte_t *ptep,pte_t pteval) +{ +extern void __update_cache (unsigned long address,pte_t pte); + +if (!pte_present (pteval)) + goto cache_sync_done; + +if (pte_present (*ptep) && (pte_pfn (*ptep) ==pte_pfn (pteval))) + goto cache_sync_done; + +__update_cache (addr, pteval); +cache_sync_done: +set_pte (ptep, pteval); +} +/* * (pmds are folded into puds so this doesn't get actually called, * but the define is needed for a generic inline function.)
@@ -430,15 +449,12 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)extern void __update_tlb (struct vm_area_struct *vma,unsigned long address,pte_t pte); -extern void __update_cache (struct vm_area_struct *vma,unsigned long address, -pte_t pte);static inline void update_mmu_cache (struct vm_area_struct *vma,unsigned long address,pte_t *ptep) {pte_t pte = *ptep;__update_tlb (vma, address, pte); -__update_cache (vma, address, pte); } static inline void update_mmu_cache_pmd(struct vm_area_struct *vma,
arch/mips/include/asm/switch_to.h +1 -1
@@ -105,7 +105,7 @@ do { \__clear_software_ll_bit (); \if (cpu_has_userlocal) \write_c0_userlocal (task_thread_info (next)->tp_value); \ -__restore_watch (); \ +__restore_watch (next); \ (last) =resume (prev, next,task_thread_info (next)); \ }while (0 )
arch/mips/include/asm/watch.h +5 -5
@@ -12,21 +12,21 @@#include <asm/mipsregs.h> -void mips_install_watch_registers (void ); +void mips_install_watch_registers (struct task_struct *t);void mips_read_watch_registers (void );void mips_clear_watch_registers (void );void mips_probe_watch_registers (struct cpuinfo_mips *c);#ifdef CONFIG_HARDWARE_WATCHPOINTS -#define __restore_watch () do { \ +#define __restore_watch (task) do { \ if (unlikely(test_bit(TIF_LOAD_WATCH, \ - ¤t_thread_info()->flags))) { \ - mips_install_watch_registers(); \ + &task_thread_info(task)->flags))) { \ + mips_install_watch_registers(task); \ } \ } while (0)#else -#define __restore_watch () do {} while (0) +#define __restore_watch (task) do {} while (0)#endif #endif /* _ASM_WATCH_H */
arch/mips/include/uapi/asm/siginfo.h +10 -12
@@ -28,7 +28,7 @@#define __ARCH_SIGSYS -#include <uapi/asm-generic/siginfo.h> +#include <asm-generic/siginfo.h> /* We can't use generic siginfo_t, because our si_code and si_errno are swapped */ typedef struct siginfo {
@@ -42,13 +42,13 @@ typedef struct siginfo {/* kill() */ struct { -pid_t _pid;/* sender's pid */ +__kernel_pid_t _pid;/* sender's pid */ __ARCH_SI_UID_T _uid;/* sender's uid */ } _kill;/* POSIX.1b timers */ struct { -timer_t _tid;/* timer id */ +__kernel_timer_t _tid;/* timer id */ int _overrun;/* overrun count */ char _pad[sizeof ( __ARCH_SI_UID_T) -sizeof (int )];sigval_t _sigval;/* same as below */
@@ -57,26 +57,26 @@ typedef struct siginfo {/* POSIX.1b signals */ struct { -pid_t _pid;/* sender's pid */ +__kernel_pid_t _pid;/* sender's pid */ __ARCH_SI_UID_T _uid;/* sender's uid */ sigval_t _sigval; } _rt;/* SIGCHLD */ struct { -pid_t _pid;/* which child */ +__kernel_pid_t _pid;/* which child */ __ARCH_SI_UID_T _uid;/* sender's uid */ int _status;/* exit code */ -clock_t _utime; -clock_t _stime; +__kernel_clock_t _utime; +__kernel_clock_t _stime; } _sigchld;/* IRIX SIGCHLD */ struct { -pid_t _pid;/* which child */ -clock_t _utime; +__kernel_pid_t _pid;/* which child */ +__kernel_clock_t _utime;int _status;/* exit code */ -clock_t _stime; +__kernel_clock_t _stime; } _irix_sigchld;/* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
@@ -118,6 +118,4 @@ typedef struct siginfo {#define SI_TIMER __SI_CODE(__SI_TIMER, -3)/* sent by timer expiration */ #define SI_MESGQ __SI_CODE(__SI_MESGQ, -4)/* sent by real time mesq state change */ -#include <asm-generic/siginfo.h> -#endif /* _UAPI_ASM_SIGINFO_H */
arch/mips/kernel/mips-r2-to-r6-emul.c +53 -52
183 lines not on this page · raw message
arch/mips/kernel/pm.c +1 -1
@@ -56,7 +56,7 @@ static void mips_cpu_restore(void)write_c0_userlocal (current_thread_info ()->tp_value);/* Restore watch registers */ -__restore_watch (); +__restore_watch (current); }/**
arch/mips/kernel/process.c +5 -1
@@ -455,7 +455,7 @@ unsigned long notrace unwind_stack_by_address(unsigned long stack_page, *sp + sizeof(*regs) <= stack_page + THREAD_SIZE - 32) { regs = (struct pt_regs *)*sp; pc = regs->cp0_epc; -if (__kernel_text_address (pc)) { +if (!user_mode (regs) &&__kernel_text_address (pc)) { *sp = regs->regs[29 ]; *ra = regs->regs[31 ];return pc;
@@ -601,6 +601,9 @@ int mips_set_process_fp_mode(struct task_struct *task, unsigned int value)if (!(value &PR_FP_MODE_FR ) && cpu_has_fpu && cpu_has_mips_r6)return -EOPNOTSUPP ; +/* Proceed with the mode switch */ +preempt_disable (); +/* Save FP & vector context, then disable FPU & MSA */ if (task->signal == current->signal)lose_fpu (1 );
@@ -659,6 +662,7 @@ int mips_set_process_fp_mode(struct task_struct *task, unsigned int value)/* Allow threads to use FP again */ atomic_set (&task->mm->context.fp_mode_switching,0 ); +preempt_enable ();return 0 ; }
arch/mips/kernel/ptrace.c +19 -8
@@ -57,8 +57,7 @@ static void init_fp_ctx(struct task_struct *target)/* Begin with data registers set to all 1s... */ memset (&target->thread.fpu.fpr, ~0 ,sizeof (target->thread.fpu.fpr)); -/* ...and FCSR zeroed */ - target->thread.fpu.fcr31 =0 ; +/* FCSR has been preset by `mips_set_personality_nan'. */ /* * Record that the target has "used" math, such that the context
@@ -80,6 +79,22 @@ void ptrace_disable(struct task_struct *child) }/* +* Poke at FCSR according to its mask. Don't set the cause bits as +* this is currently not handled correctly in FP context restoration +* and will cause an oops if a corresponding enable bit is set. +*/ +static void ptrace_setfcr31 (struct task_struct *child,u32 value) +{ +u32 fcr31; +u32 mask; + + value &= ~FPU_CSR_ALL_X ; + fcr31 = child->thread.fpu.fcr31; + mask = boot_cpu_data.fpu_msk31; + child->thread.fpu.fcr31 = (value & ~mask) | (fcr31 & mask); +} + +/* * Read a general register set. We always use the 64-bit format, even * for 32-bit kernels and for 32-bit processes on a 64-bit kernel. * Registers are sign extended to fill the available space.
@@ -159,9 +174,7 @@ int ptrace_setfpregs(struct task_struct *child, __u32 __user *data) {union fpureg *fregs;u64 fpr_val; -u32 fcr31;u32 value; -u32 mask;int i;if (!access_ok (VERIFY_READ , data,33 *8 ))
@@ -176,9 +189,7 @@ int ptrace_setfpregs(struct task_struct *child, __u32 __user *data) }__get_user (value, data +64 ); - fcr31 = child->thread.fpu.fcr31; - mask = boot_cpu_data.fpu_msk31; - child->thread.fpu.fcr31 = (value & ~mask) | (fcr31 & mask); +ptrace_setfcr31 (child, value);/* FIR may not be written. */
@@ -805,7 +816,7 @@ long arch_ptrace(struct task_struct *child, long request,break ;#endif case FPC_CSR : - child->thread.fpu.fcr31 = data & ~FPU_CSR_ALL_X ; +ptrace_setfcr31 (child, data);break ; case DSP_BASE ... DSP_BASE + 5: {dspreg_t *dregs;
arch/mips/kernel/r4k_fpu.S +5 -5
@@ -244,17 +244,17 @@ LEAF(\name) .set push .set noat #ifdef CONFIG_64BIT - copy_u_d \wr, 1 + copy_s_d \wr, 1 EX sd $1, \off(\base) #elif defined(CONFIG_CPU_LITTLE_ENDIAN) - copy_u_w \wr, 2 + copy_s_w \wr, 2 EX sw $1, \off(\base) - copy_u_w \wr, 3 + copy_s_w \wr, 3 EX sw $1, (\off+4)(\base) #else /* CONFIG_CPU_BIG_ENDIAN */ - copy_u_w \wr, 2 + copy_s_w \wr, 2 EX sw $1, (\off+4)(\base) - copy_u_w \wr, 3 + copy_s_w \wr, 3 EX sw $1, \off(\base) #endif .set pop
arch/mips/kernel/setup.c +3 -0
@@ -706,6 +706,9 @@ static void __init arch_mem_init(char **cmdline_p)for_each_memblock (reserved, reg)if (reg->size !=0 )reserve_bootmem (reg->base, reg->size,BOOTMEM_DEFAULT ); + +reserve_bootmem_region (__pa_symbol (&__nosave_begin), +__pa_symbol (&__nosave_end));/* Reserve for hibernation */ }static void __init resource_init (void )
arch/mips/kernel/signal.c +5 -10
@@ -195,6 +195,9 @@ static int restore_msa_extcontext(void __user *buf, unsigned int size)unsigned int csr;int i, err; +if (!config_enabled (CONFIG_CPU_HAS_MSA )) +return SIGSYS ; +if (size !=sizeof (*msa))return -EINVAL ;
@@ -398,8 +401,8 @@ int protected_restore_fp_context(void __user *sc) } fp_done: -if (used &USED_EXTCONTEXT ) - err |=restore_extcontext (sc_to_extcontext (sc)); +if (!err && (used &USED_EXTCONTEXT )) + err =restore_extcontext (sc_to_extcontext (sc));return err ?: sig; }
@@ -767,15 +770,7 @@ static void handle_signal(struct ksignal *ksig, struct pt_regs *regs)sigset_t *oldset =sigmask_to_save ();int ret;struct mips_abi *abi = current->thread.abi; -#ifdef CONFIG_CPU_MICROMIPS -void *vdso; -unsigned long tmp = (unsigned long )current->mm->context.vdso; - -set_isa16_mode (tmp); - vdso = (void *)tmp; -#else void *vdso = current->mm->context.vdso; -#endif if (regs->regs[0 ]) {switch (regs->regs[2 ]) {
arch/mips/kernel/traps.c +4 -4
@@ -144,7 +144,7 @@ static void show_backtrace(struct task_struct *task, const struct pt_regs *regs)if (!task) task = current; -if (raw_show_trace || !__kernel_text_address (pc)) { +if (raw_show_trace ||user_mode (regs) || !__kernel_text_address (pc)) {show_raw_backtrace (sp);return ; }
@@ -1242,7 +1242,7 @@ static int enable_restore_fp_context(int msa) err =init_fpu ();if (msa && !err) {enable_msa (); -_init_msa_upper (); +init_msa_upper ();set_thread_flag (TIF_USEDMSA );set_thread_flag (TIF_MSA_CTX_LIVE ); }
@@ -1305,7 +1305,7 @@ static int enable_restore_fp_context(int msa)*/ prior_msa =test_and_set_thread_flag (TIF_MSA_CTX_LIVE );if (!prior_msa && was_fpu_owner) { -_init_msa_upper (); +init_msa_upper (); goto out; }
@@ -1322,7 +1322,7 @@ static int enable_restore_fp_context(int msa)* of each vector register such that it cannot see data left * behind by another task. */ -_init_msa_upper (); +init_msa_upper (); }else {/* We need to restore the vector context. */ restore_msa (current);
arch/mips/kernel/watch.c +2 -3
@@ -15,10 +15,9 @@* Install the watch registers for the current thread. A maximum of * four registers are installed although the machine may have more. */ -void mips_install_watch_registers (void ) +void mips_install_watch_registers (struct task_struct *t) { -struct mips3264_watch_reg_state *watches = - ¤t->thread.watch.mips3264; +struct mips3264_watch_reg_state *watches = &t->thread.watch.mips3264;switch (current_cpu_data.watch_reg_use_cnt) {default :BUG ();
arch/mips/lib/ashldi3.c +1 -1
@@ -2,7 +2,7 @@#include "libgcc.h" -long long __ashldi3 (long long u,word_type b) +long long notrace __ashldi3 (long long u,word_type b) {DWunion uu, w;word_type bm;
arch/mips/lib/ashrdi3.c +1 -1
@@ -2,7 +2,7 @@#include "libgcc.h" -long long __ashrdi3 (long long u,word_type b) +long long notrace __ashrdi3 (long long u,word_type b) {DWunion uu, w;word_type bm;
arch/mips/lib/bswapdi.c +1 -1
@@ -1,6 +1,6 @@#include <linux/module.h> -unsigned long long __bswapdi2 (unsigned long long u) +unsigned long long notrace __bswapdi2 (unsigned long long u) {return (((u) &0xff00000000000000ull ) >>56 ) | (((u) & 0x00ff000000000000ull) >> 40) |
arch/mips/lib/bswapsi.c +1 -1
@@ -1,6 +1,6 @@#include <linux/module.h> -unsigned int __bswapsi2 (unsigned int u) +unsigned int notrace __bswapsi2(unsigned int u) {return (((u) &0xff000000 ) >>24 ) | (((u) & 0x00ff0000) >> 8) |
arch/mips/lib/cmpdi2.c +1 -1
@@ -2,7 +2,7 @@#include "libgcc.h" -word_type __cmpdi2 (long long a,long long b) +word_type notrace __cmpdi2(long long a, long long b) {const DWunion au = { .ll = a
arch/mips/lib/lshrdi3.c +1 -1
@@ -2,7 +2,7 @@#include "libgcc.h" -long long __lshrdi3 (long long u,word_type b) +long long notrace __lshrdi3 (long long u,word_type b) {DWunion uu, w;word_type bm;
arch/mips/lib/ucmpdi2.c +1 -1
@@ -2,7 +2,7 @@#include "libgcc.h" -word_type __ucmpdi2 (unsigned long long a,unsigned long long b) +word_type notrace __ucmpdi2(unsigned long long a, unsigned long long b) {const DWunion au = {.ll = a};const DWunion bu = {.ll = b};
arch/mips/loongson64/Platform +1 -1
@@ -31,7 +31,7 @@ cflags-$(CONFIG_CPU_LOONGSON3) += -Wa,--trap # can't easily be used safely within the kbuild framework. # ifeq ($(call cc-ifversion, -ge, 0409, y), y) - ifeq ($(call ld-ifversion, -ge, 22500000, y), y) + ifeq ($(call ld-ifversion, -ge, 225000000, y), y) cflags-$(CONFIG_CPU_LOONGSON3) += \ $(call cc-option,-march=loongson3a -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS64) else
arch/mips/loongson64/loongson-3/numa.c +3 -3
@@ -213,10 +213,10 @@ static void __init node_mem_init(unsigned int node) BOOTMEM_DEFAULT);if (node ==0 &&node_end_pfn (0 ) >= (0xffffffff >>PAGE_SHIFT )) { -/* Reserve 0xff800000~0xffffffff for RS780E integrated GPU */ +/* Reserve 0xfe000000~0xffffffff for RS780E integrated GPU */ reserve_bootmem_node (NODE_DATA (node), - (node_addrspace_offset |0xff800000 ), -8 <<20 ,BOOTMEM_DEFAULT ); + (node_addrspace_offset |0xfe000000 ), +32 <<20 ,BOOTMEM_DEFAULT ); }sparse_memory_present_with_active_regions (node);
arch/mips/math-emu/cp1emu.c +5 -3
@@ -445,9 +445,11 @@ static int isBranchInstr(struct pt_regs *regs, struct mm_decoded_insn dec_insn,case spec_op:switch (insn.r_format.func) {case jalr_op: - regs->regs[insn.r_format.rd] = - regs->cp0_epc + dec_insn.pc_inc + - dec_insn.next_pc_inc; +if (insn.r_format.rd !=0 ) { + regs->regs[insn.r_format.rd] = + regs->cp0_epc + dec_insn.pc_inc + + dec_insn.next_pc_inc; + }/* Fall through */ case jr_op:/* For R6, JR already emulated in jalr_op */
arch/mips/mm/cache.c +21 -20
76 lines not on this page · raw message
arch/mips/vdso/Makefile +3 -1
@@ -5,10 +5,12 @@ obj-vdso-y := elf.o gettimeofday.o sigreturn.o ccflags-vdso := \ $(filter -I%,$(KBUILD_CFLAGS)) \ $(filter -E%,$(KBUILD_CFLAGS)) \ + $(filter -mmicromips,$(KBUILD_CFLAGS)) \ $(filter -march=%,$(KBUILD_CFLAGS)) cflags-vdso := $(ccflags-vdso) \ $(filter -W%,$(filter-out -Wa$(comma)%,$(KBUILD_CFLAGS))) \ - -O2 -g -fPIC -fno-common -fno-builtin -G 0 -DDISABLE_BRANCH_PROFILING \ + -O2 -g -fPIC -fno-strict-aliasing -fno-common -fno-builtin -G 0 \ + -DDISABLE_BRANCH_PROFILING \ $(call cc-option, -fno-stack-protector) aflags-vdso := $(ccflags-vdso) \ $(filter -I%,$(KBUILD_CFLAGS)) \
arch/powerpc/kernel/eeh.c +1 -1
@@ -1072,7 +1072,7 @@ void eeh_add_device_early(struct pci_dn *pdn)struct pci_controller *phb;struct eeh_dev *edev =pdn_to_eeh_dev (pdn); -if (!edev || !eeh_enabled ()) +if (!edev)return ;if (!eeh_has_flag (EEH_PROBE_MODE_DEVTREE ))
arch/powerpc/kernel/eeh_driver.c +23 -3
@@ -166,6 +166,16 @@ static void *eeh_dev_save_state(void *data, void *userdata)if (!edev)return NULL ; +/* +* We cannot access the config space on some adapters. +* Otherwise, it will cause fenced PHB. We don't save +* the content in their config space and will restore +* from the initial config space saved when the EEH +* device is created. +*/ +if (edev->pe && (edev->pe->state &EEH_PE_CFG_RESTRICTED )) +return NULL ; + pdev =eeh_dev_to_pci_dev (edev);if (!pdev)return NULL ;
@@ -305,6 +315,19 @@ static void *eeh_dev_restore_state(void *data, void *userdata)if (!edev)return NULL ; +/* +* The content in the config space isn't saved because +* the blocked config space on some adapters. We have +* to restore the initial saved config space when the +* EEH device is created. +*/ +if (edev->pe && (edev->pe->state &EEH_PE_CFG_RESTRICTED )) { +if (list_is_last (&edev->list, &edev->pe->edevs)) +eeh_pe_restore_bars (edev->pe); + +return NULL ; + } + pdev =eeh_dev_to_pci_dev (edev);if (!pdev)return NULL ;
@@ -504,9 +527,6 @@ int eeh_pe_reset_and_recover(struct eeh_pe *pe)/* Save states */ eeh_pe_dev_traverse (pe, eeh_dev_save_state,NULL ); -/* Report error */ -eeh_pe_dev_traverse (pe, eeh_report_error, &result); -/* Issue reset */ ret =eeh_reset_pe (pe);if (ret) {
arch/powerpc/kernel/exceptions-64s.S +11 -5
@@ -953,11 +953,6 @@ hv_facility_unavailable_relon_trampoline: #endif STD_RELON_EXCEPTION_PSERIES(0x5700, 0x1700, altivec_assist) - /* Other future vectors */ - .align 7 - .globl __end_interrupts -__end_interrupts: - .align 7 system_call_entry: b system_call_common
@@ -1244,6 +1239,17 @@ __end_handlers: STD_RELON_EXCEPTION_PSERIES_OOL(0xf60, facility_unavailable) STD_RELON_EXCEPTION_HV_OOL(0xf80, hv_facility_unavailable) + /* + * The __end_interrupts marker must be past the out-of-line (OOL) + * handlers, so that they are copied to real address 0x100 when running + * a relocatable kernel. This ensures they can be reached from the short + * trampoline handlers (like 0x4f00, 0x4f20, etc.) which branch + * directly, without using LOAD_HANDLER(). + */ + .align 7 + .globl __end_interrupts +__end_interrupts: + #if defined(CONFIG_PPC_PSERIES) || defined(CONFIG_PPC_POWERNV) /* * Data area reserved for FWNMI option.
arch/x86/xen/setup.c +26 -39
112 lines not on this page · raw message
drivers/base/power/main.c +3 -2
@@ -1267,14 +1267,15 @@ int dpm_suspend_late(pm_message_t state) error =device_suspend_late (dev);mutex_lock (&dpm_list_mtx); +if (!list_empty (&dev->power.entry)) +list_move (&dev->power.entry, &dpm_late_early_list); +if (error) {pm_dev_err (dev, state," late" , error);dpm_save_failed_dev (dev_name (dev));put_device (dev);break ; } -if (!list_empty (&dev->power.entry)) -list_move (&dev->power.entry, &dpm_late_early_list);put_device (dev);if (async_error)
drivers/base/power/runtime.c +7 -2
@@ -1506,11 +1506,16 @@ int pm_runtime_force_resume(struct device *dev) goto out; } - ret =callback (dev); + ret =pm_runtime_set_active (dev);if (ret) goto out; -pm_runtime_set_active (dev); + ret =callback (dev); +if (ret) { +pm_runtime_set_suspended (dev); + goto out; + } +pm_runtime_mark_last_busy (dev); out:pm_runtime_enable (dev);
drivers/char/hw_random/exynos-rng.c +7 -3
@@ -89,6 +89,7 @@ static int exynos_read(struct hwrng *rng, void *buf, struct exynos_rng, rng);u32 *data = buf;int retry =100 ; +int ret =4 ;pm_runtime_get_sync (exynos_rng->dev);
@@ -97,17 +98,20 @@ static int exynos_read(struct hwrng *rng, void *buf,while (!(exynos_rng_readl (exynos_rng,EXYNOS_PRNG_STATUS_OFFSET ) &PRNG_DONE ) && --retry)cpu_relax (); -if (!retry) -return -ETIMEDOUT ; +if (!retry) { + ret = -ETIMEDOUT ; + goto out; + }exynos_rng_writel (exynos_rng,PRNG_DONE ,EXYNOS_PRNG_STATUS_OFFSET ); *data =exynos_rng_readl (exynos_rng,EXYNOS_PRNG_OUT1_OFFSET ); +out:pm_runtime_mark_last_busy (exynos_rng->dev);pm_runtime_put_sync_autosuspend (exynos_rng->dev); -return 4 ; +return ret; }static int exynos_rng_probe (struct platform_device *pdev)
drivers/clk/at91/clk-h32mx.c +1 -1
@@ -116,7 +116,7 @@ void __init of_sama5d4_clk_h32mx_setup(struct device_node *np, h32mxclk->pmc = pmc; clk =clk_register (NULL , &h32mxclk->hw); -if (!clk) { +if (IS_ERR (clk)) {kfree (h32mxclk);return ; }
drivers/clk/bcm/clk-bcm2835.c +51 -7
115 lines not on this page · raw message
drivers/clk/imx/clk-imx35.c +2 -2
@@ -66,7 +66,7 @@ static const char *std_sel[] = {"ppll", "arm"};static const char *ipg_per_sel[] = {"ahb_per_div" ,"arm_per_div" };enum mx35_clks { - ckih, ckil, mpll, ppll, mpll_075, arm, hsp, hsp_div, hsp_sel, ahb, ipg, + ckih, mpll, ppll, mpll_075, arm, hsp, hsp_div, hsp_sel, ahb, ipg, arm_per_div, ahb_per_div, ipg_per, uart_sel, uart_div, esdhc_sel, esdhc1_div, esdhc2_div, esdhc3_div, spdif_sel, spdif_div_pre, spdif_div_post, ssi_sel, ssi1_div_pre, ssi1_div_post, ssi2_div_pre,
@@ -79,7 +79,7 @@ enum mx35_clks { rtc_gate, rtic_gate, scc_gate, sdma_gate, spba_gate, spdif_gate, ssi1_gate, ssi2_gate, uart1_gate, uart2_gate, uart3_gate, usbotg_gate, wdog_gate, max_gate, admux_gate, csi_gate, csi_div, csi_sel, iim_gate, - gpu2d_gate, clk_max + gpu2d_gate, ckil, clk_max };static struct clk *clk[clk_max];
drivers/cpuidle/cpuidle.c +3 -1
@@ -214,7 +214,7 @@ int cpuidle_enter_state(struct cpuidle_device *dev, struct cpuidle_driver *drv,tick_broadcast_exit (); } -if (!cpuidle_state_is_coupled (drv, entered_state)) +if (!cpuidle_state_is_coupled (drv, index))local_irq_enable (); diff =ktime_to_us (ktime_sub (time_end, time_start));
@@ -433,6 +433,8 @@ static void __cpuidle_unregister_device(struct cpuidle_device *dev)list_del (&dev->device_list);per_cpu (cpuidle_devices, dev->cpu) =NULL ;module_put (drv->owner); + + dev->registered =0 ; }static void __cpuidle_device_init (struct cpuidle_device *dev)
drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c +5 -5
@@ -194,12 +194,12 @@ int amdgpu_connector_get_monitor_bpc(struct drm_connector *connector) bpc =8 ;DRM_DEBUG ("%s: HDMI deep color 10 bpc exceeds max tmds clock. Using %d bpc.\n" , connector->name, bpc); - }else if (bpc >8 ) { -/* max_tmds_clock missing, but hdmi spec mandates it for deep color. */ -DRM_DEBUG ("%s: Required max tmds clock for HDMI deep color missing. Using 8 bpc.\n" , - connector->name); - bpc =8 ; } + }else if (bpc >8 ) { +/* max_tmds_clock missing, but hdmi spec mandates it for deep color. */ +DRM_DEBUG ("%s: Required max tmds clock for HDMI deep color missing. Using 8 bpc.\n" , + connector->name); + bpc =8 ; } }
drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.c +1 -1
@@ -150,7 +150,7 @@ u32 amdgpu_dpm_get_vrefresh(struct amdgpu_device *adev)list_for_each_entry (crtc, &dev->mode_config.crtc_list, head) { amdgpu_crtc =to_amdgpu_crtc (crtc);if (crtc->enabled && amdgpu_crtc->enabled && amdgpu_crtc->hw_mode.clock) { - vrefresh = amdgpu_crtc->hw_mode.vrefresh; + vrefresh =drm_mode_vrefresh (&amdgpu_crtc->hw_mode);break ; } }
drivers/gpu/drm/drm_atomic.c +1 -1
@@ -138,7 +138,7 @@ void drm_atomic_state_default_clear(struct drm_atomic_state *state)for (i =0 ; i < state->num_connector; i++) {struct drm_connector *connector = state->connectors[i]; -if (!connector) +if (!connector || !connector->funcs)continue ;/*
drivers/gpu/drm/drm_fb_helper.c +2 -3
@@ -1899,7 +1899,6 @@ static int drm_pick_crtcs(struct drm_fb_helper *fb_helper, int n, int width, int height) { int c, o; -struct drm_device *dev = fb_helper->dev;struct drm_connector *connector;const struct drm_connector_helper_funcs *connector_funcs;struct drm_encoder *encoder;
@@ -1918,7 +1917,7 @@ static int drm_pick_crtcs(struct drm_fb_helper *fb_helper,if (modes[n] ==NULL )return best_score; - crtcs =kzalloc (dev->mode_config.num_connector * + crtcs =kzalloc (fb_helper->connector_count *sizeof (struct drm_fb_helper_crtc *),GFP_KERNEL );if (!crtcs)return best_score;
@@ -1964,7 +1963,7 @@ static int drm_pick_crtcs(struct drm_fb_helper *fb_helper,if (score > best_score) { best_score = score;memcpy (best_crtcs, crtcs, - dev->mode_config.num_connector * + fb_helper->connector_count *sizeof (struct drm_fb_helper_crtc *)); } }
drivers/gpu/drm/gma500/mdfld_dsi_pkg_sender.c +1 -1
@@ -72,7 +72,7 @@ static const char *const dsi_errors[] = {"RX Prot Violation" ,"HS Generic Write FIFO Full" ,"LP Generic Write FIFO Full" , -"Generic Read Data Avail" +"Generic Read Data Avail" ,"Special Packet Sent" , "Tearing Effect", };
drivers/gpu/drm/i915/intel_atomic.c +2 -1
@@ -96,7 +96,8 @@ intel_crtc_duplicate_state(struct drm_crtc *crtc) crtc_state->update_pipe = false; crtc_state->disable_lp_wm = false; crtc_state->disable_cxsr = false; - crtc_state->wm_changed = false; + crtc_state->update_wm_pre = false; + crtc_state->update_wm_post = false;return &crtc_state->base; }
drivers/gpu/drm/i915/intel_display.c +15 -6
@@ -4816,7 +4816,7 @@ static void intel_post_plane_update(struct intel_crtc *crtc) crtc->wm.cxsr_allowed = true; -if (pipe_config->wm_changed && pipe_config->base.active) +if (pipe_config->update_wm_post && pipe_config->base.active)intel_update_watermarks (&crtc->base);if (atomic->update_fbc)
@@ -4850,7 +4850,7 @@ static void intel_pre_plane_update(struct intel_crtc *crtc)intel_set_memory_cxsr (dev_priv, false); } -if (!needs_modeset (&pipe_config->base) && pipe_config->wm_changed) +if (!needs_modeset (&pipe_config->base) && pipe_config->update_wm_pre)intel_update_watermarks (&crtc->base); }
@@ -6229,6 +6229,7 @@ static void valleyview_crtc_enable(struct drm_crtc *crtc)intel_crtc_load_lut (crtc); +intel_update_watermarks (crtc);intel_enable_pipe (intel_crtc);assert_vblank_disabled (crtc);
@@ -11881,8 +11882,14 @@ int intel_plane_atomic_calc_changes(struct drm_crtc_state *crtc_state, plane->base.id, was_visible, visible, turn_off, turn_on, mode_changed); -if (turn_on || turn_off) { - pipe_config->wm_changed = true; +if (turn_on) { + pipe_config->update_wm_pre = true; + +/* must disable cxsr around plane enable/disable */ +if (plane->type !=DRM_PLANE_TYPE_CURSOR ) + pipe_config->disable_cxsr = true; + }else if (turn_off) { + pipe_config->update_wm_post = true;/* must disable cxsr around plane enable/disable */ if (plane->type !=DRM_PLANE_TYPE_CURSOR ) {
@@ -11891,7 +11898,9 @@ int intel_plane_atomic_calc_changes(struct drm_crtc_state *crtc_state, pipe_config->disable_cxsr = true; } }else if (intel_wm_need_update (plane, plane_state)) { - pipe_config->wm_changed = true; +/* FIXME bollocks */ + pipe_config->update_wm_pre = true; + pipe_config->update_wm_post = true; }if (visible || was_visible)
@@ -12036,7 +12045,7 @@ static int intel_crtc_atomic_check(struct drm_crtc *crtc, }if (mode_changed && !crtc_state->active) - pipe_config->wm_changed = true; + pipe_config->update_wm_post = true; if (mode_changed && crtc_state->enable && dev_priv->display.crtc_compute_clock &&
drivers/gpu/drm/i915/intel_drv.h +1 -1
@@ -367,7 +367,7 @@ struct intel_crtc_state {bool update_pipe;/* can a fast modeset be performed? */ bool disable_cxsr; -bool wm_changed;/* watermarks are updated */ +bool update_wm_pre, update_wm_post;/* watermarks are updated */ /* Pipe source size (ie. panel fitter input size) * All planes will be positioned inside this space,
drivers/gpu/drm/i915/intel_fbdev.c +3 -3
@@ -368,12 +368,12 @@ static bool intel_fb_initial_config(struct drm_fb_helper *fb_helper,uint64_t conn_configured =0 , mask;int pass =0 ; - save_enabled =kcalloc (dev->mode_config.num_connector,sizeof (bool ), + save_enabled =kcalloc (fb_helper->connector_count,sizeof (bool ),GFP_KERNEL );if (!save_enabled)return false; -memcpy (save_enabled, enabled, dev->mode_config.num_connector); +memcpy (save_enabled, enabled, fb_helper->connector_count); mask = (1 << fb_helper->connector_count) -1 ; retry:for (i =0 ; i < fb_helper->connector_count; i++) {
@@ -507,7 +507,7 @@ retry:if (fallback) { bail:DRM_DEBUG_KMS ("Not using firmware configuration\n" ); -memcpy (enabled, save_enabled, dev->mode_config.num_connector); +memcpy (enabled, save_enabled, fb_helper->connector_count);kfree (save_enabled);return false; }
drivers/gpu/drm/i915/intel_pm.c +2 -0
@@ -3812,6 +3812,8 @@ static void ilk_pipe_wm_get_hw_state(struct drm_crtc *crtc)if (IS_HASWELL (dev) ||IS_BROADWELL (dev)) hw->wm_linetime[pipe] =I915_READ (PIPE_WM_LINETIME (pipe)); +memset (active,0 ,sizeof (*active)); + active->pipe_enabled = intel_crtc->active;if (active->pipe_enabled) {
drivers/gpu/drm/i915/intel_psr.c +47 -8
66 lines not on this page · raw message
drivers/gpu/drm/imx/imx-drm-core.c +8 -0
@@ -26,6 +26,7 @@#include <drm/drm_fb_cma_helper.h> #include <drm/drm_plane_helper.h> #include <drm/drm_of.h> +#include <video/imx-ipu-v3.h> #include "imx-drm.h"
@@ -498,6 +499,13 @@ static int compare_of(struct device *dev, void *data) {struct device_node *np = data; +/* Special case for DI, dev->of_node may not be set yet */ +if (strcmp (dev->driver->name,"imx-ipuv3-crtc" ) ==0 ) { +struct ipu_client_platformdata *pdata = dev->platform_data; + +return pdata->of_node == np; + } +/* Special case for LDB, one device for two channels */ if (of_node_cmp (np->name,"lvds-channel" ) ==0 ) { np =of_get_parent (np);
drivers/gpu/drm/imx/ipuv3-crtc.c +1 -1
@@ -371,7 +371,7 @@ static int ipu_crtc_init(struct ipu_crtc *ipu_crtc, ret =imx_drm_add_crtc (drm, &ipu_crtc->base, &ipu_crtc->imx_crtc, &ipu_crtc->plane[0 ]->base, &ipu_crtc_helper_funcs, - ipu_crtc->dev->of_node); + pdata->of_node);if (ret) {dev_err (ipu_crtc->dev,"adding crtc failed with %d.\n" , ret); goto err_put_resources;
drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c +5 -5
@@ -3273,19 +3273,19 @@ static const struct vmw_cmd_entry vmw_cmd_entries[SVGA_3D_CMD_MAX] = { &vmw_cmd_dx_cid_check, true, false, true),VMW_CMD_DEF (SVGA_3D_CMD_DX_DEFINE_QUERY , &vmw_cmd_dx_define_query, true, false, true), -VMW_CMD_DEF (SVGA_3D_CMD_DX_DESTROY_QUERY , &vmw_cmd_ok, +VMW_CMD_DEF (SVGA_3D_CMD_DX_DESTROY_QUERY , &vmw_cmd_dx_cid_check, true, false, true),VMW_CMD_DEF (SVGA_3D_CMD_DX_BIND_QUERY , &vmw_cmd_dx_bind_query, true, false, true),VMW_CMD_DEF (SVGA_3D_CMD_DX_SET_QUERY_OFFSET , - &vmw_cmd_ok, true, false, true), -VMW_CMD_DEF (SVGA_3D_CMD_DX_BEGIN_QUERY , &vmw_cmd_ok, + &vmw_cmd_dx_cid_check, true, false, true), +VMW_CMD_DEF (SVGA_3D_CMD_DX_BEGIN_QUERY , &vmw_cmd_dx_cid_check, true, false, true), -VMW_CMD_DEF (SVGA_3D_CMD_DX_END_QUERY , &vmw_cmd_ok, +VMW_CMD_DEF (SVGA_3D_CMD_DX_END_QUERY , &vmw_cmd_dx_cid_check, true, false, true),VMW_CMD_DEF (SVGA_3D_CMD_DX_READBACK_QUERY , &vmw_cmd_invalid, true, false, true), -VMW_CMD_DEF (SVGA_3D_CMD_DX_SET_PREDICATION , &vmw_cmd_invalid, +VMW_CMD_DEF (SVGA_3D_CMD_DX_SET_PREDICATION , &vmw_cmd_dx_cid_check, true, false, true),VMW_CMD_DEF (SVGA_3D_CMD_DX_SET_VIEWPORTS , &vmw_cmd_dx_cid_check, true, false, true),
drivers/gpu/drm/vmwgfx/vmwgfx_fb.c +3 -3
@@ -573,9 +573,9 @@ static int vmw_fb_set_par(struct fb_info *info) mode = old_mode; old_mode =NULL ; }else if (!vmw_kms_validate_mode_vram (vmw_priv, - mode->hdisplay * - (var->bits_per_pixel +7 ) /8 , - mode->vdisplay)) { + mode->hdisplay * +DIV_ROUND_UP (var->bits_per_pixel,8 ), + mode->vdisplay)) {drm_mode_destroy (vmw_priv->dev, mode);return -EINVAL ; }
drivers/gpu/ipu-v3/ipu-common.c +3 -2
@@ -997,7 +997,7 @@ struct ipu_platform_reg { };/* These must be in the order of the corresponding device tree port nodes */ -static const struct ipu_platform_reg client_reg[] = { +static struct ipu_platform_reg client_reg[] = { { .pdata = { .csi =0 ,
@@ -1048,7 +1048,7 @@ static int ipu_add_client_devices(struct ipu_soc *ipu, unsigned long ipu_base)mutex_unlock (&ipu_client_id_mutex);for (i =0 ; i <ARRAY_SIZE (client_reg); i++) { -const struct ipu_platform_reg *reg = &client_reg[i]; +struct ipu_platform_reg *reg = &client_reg[i];struct platform_device *pdev;struct device_node *of_node;
@@ -1070,6 +1070,7 @@ static int ipu_add_client_devices(struct ipu_soc *ipu, unsigned long ipu_base) pdev->dev.parent = dev; + reg->pdata.of_node = of_node; ret =platform_device_add_data (pdev, ®->pdata,sizeof (reg->pdata));if (!ret)
drivers/hwmon/ads7828.c +10 -0
@@ -120,6 +120,7 @@ static int ads7828_probe(struct i2c_client *client,unsigned int vref_mv =ADS7828_INT_VREF_MV ;bool diff_input = false;bool ext_vref = false; +unsigned int regval; data =devm_kzalloc (dev,sizeof (struct ads7828_data ),GFP_KERNEL );if (!data)
@@ -154,6 +155,15 @@ static int ads7828_probe(struct i2c_client *client,if (!diff_input) data->cmd_byte |=ADS7828_CMD_SD_SE ; +/* +* Datasheet specifies internal reference voltage is disabled by +* default. The internal reference voltage needs to be enabled and +* voltage needs to settle before getting valid ADC data. So perform a +* dummy read to enable the internal reference voltage. +*/ +if (!ext_vref) +regmap_read (data->regmap, data->cmd_byte, ®val); + hwmon_dev =devm_hwmon_device_register_with_groups (dev, client->name, data, ads7828_groups);
drivers/input/joystick/xpad.c +5 -1
@@ -455,6 +455,10 @@ static void xpad_process_packet(struct usb_xpad *xpad, u16 cmd, unsigned char *dstatic void xpad360_process_packet (struct usb_xpad *xpad,struct input_dev *dev,u16 cmd,unsigned char *data) { +/* valid pad data */ +if (data[0 ] !=0x00 ) +return ; +/* digital pad */ if (xpad->mapping &MAP_DPAD_TO_BUTTONS ) {/* dpad as buttons (left, right, up, down) */
@@ -754,6 +758,7 @@ static bool xpad_prepare_next_out_packet(struct usb_xpad *xpad)if (packet) {memcpy (xpad->odata, packet->data, packet->len); xpad->irq_out->transfer_buffer_length = packet->len; + packet->pending = false;return true; }
@@ -795,7 +800,6 @@ static void xpad_irq_out(struct urb *urb)switch (status) {case 0 :/* success */ - xpad->out_packets[xpad->last_out_packet].pending = false; xpad->irq_out_active =xpad_prepare_next_out_packet (xpad);break ;
drivers/input/misc/uinput.c +6 -0
@@ -981,9 +981,15 @@ static long uinput_ioctl(struct file *file, unsigned int cmd, unsigned long arg) }#ifdef CONFIG_COMPAT + +#define UI_SET_PHYS_COMPAT _IOW(UINPUT_IOCTL_BASE, 108, compat_uptr_t) +static long uinput_compat_ioctl (struct file *file,unsigned int cmd,unsigned long arg) { +if (cmd ==UI_SET_PHYS_COMPAT ) + cmd =UI_SET_PHYS ; +return uinput_ioctl_handler (file, cmd, arg,compat_ptr (arg)); }#endif
drivers/media/v4l2-core/v4l2-compat-ioctl32.c +2 -1
@@ -280,7 +280,8 @@ static int put_v4l2_format32(struct v4l2_format *kp, struct v4l2_format32 __userstatic int put_v4l2_create32 (struct v4l2_create_buffers *kp,struct v4l2_create_buffers32 __user *up) {if (!access_ok (VERIFY_WRITE , up,sizeof (struct v4l2_create_buffers32 )) || -copy_to_user (up, kp, offsetof(struct v4l2_create_buffers32 , format))) +copy_to_user (up, kp, offsetof(struct v4l2_create_buffers32 , format)) || +copy_to_user (up->reserved, kp->reserved,sizeof (kp->reserved)))return -EFAULT ;return __put_v4l2_format32 (&kp->format, &up->format); }
drivers/mfd/intel-lpss.c +18 -1
@@ -34,6 +34,7 @@#define LPSS_DEV_SIZE 0x200#define LPSS_PRIV_OFFSET 0x200#define LPSS_PRIV_SIZE 0x100 +#define LPSS_PRIV_REG_COUNT (LPSS_PRIV_SIZE / 4)#define LPSS_IDMA64_OFFSET 0x800#define LPSS_IDMA64_SIZE 0x800
@@ -76,6 +77,7 @@ struct intel_lpss {struct mfd_cell *cell;struct device *dev;void __iomem *priv; +u32 priv_ctx[LPSS_PRIV_REG_COUNT ];int devid;u32 caps;u32 active_ltr;
@@ -493,6 +495,16 @@ EXPORT_SYMBOL_GPL(intel_lpss_prepare);int intel_lpss_suspend (struct device *dev) { +struct intel_lpss *lpss =dev_get_drvdata (dev); +unsigned int i; + +/* Save device context */ +for (i =0 ; i <LPSS_PRIV_REG_COUNT ; i++) + lpss->priv_ctx[i] =readl (lpss->priv + i *4 ); + +/* Put the device into reset state */ +writel (0 , lpss->priv +LPSS_PRIV_RESETS ); +return 0 ; }EXPORT_SYMBOL_GPL (intel_lpss_suspend);
@@ -500,8 +512,13 @@ EXPORT_SYMBOL_GPL(intel_lpss_suspend);int intel_lpss_resume (struct device *dev) {struct intel_lpss *lpss =dev_get_drvdata (dev); +unsigned int i; -intel_lpss_init_dev (lpss); +intel_lpss_deassert_reset (lpss); + +/* Restore device context */ +for (i =0 ; i <LPSS_PRIV_REG_COUNT ; i++) +writel (lpss->priv_ctx[i], lpss->priv + i *4 );return 0 ; }
drivers/mfd/intel_soc_pmic_core.c +1 -0
@@ -35,6 +35,7 @@ static struct gpiod_lookup_table panel_gpio_table = { .table = {/* Panel EN/DISABLE */ GPIO_LOOKUP("gpio_crystalcove", 94, "panel", GPIO_ACTIVE_HIGH), + { }, }, };
drivers/net/wireless/ath/ath10k/core.c +4 -4
@@ -1687,6 +1687,10 @@ int ath10k_core_start(struct ath10k *ar, enum ath10k_firmware_mode mode) goto err_hif_stop; } + ar->free_vdev_map = (1LL << ar->max_num_vdevs) -1 ; + +INIT_LIST_HEAD (&ar->arvifs); +/* we don't care about HTT in UTF mode */ if (mode ==ATH10K_FIRMWARE_MODE_NORMAL ) { status =ath10k_htt_setup (&ar->htt);
@@ -1700,10 +1704,6 @@ int ath10k_core_start(struct ath10k *ar, enum ath10k_firmware_mode mode)if (status) goto err_hif_stop; - ar->free_vdev_map = (1LL << ar->max_num_vdevs) -1 ; - -INIT_LIST_HEAD (&ar->arvifs); -return 0 ; err_hif_stop:
drivers/net/wireless/ath/ath10k/debug.c +6 -1
@@ -2011,7 +2011,12 @@ static ssize_t ath10k_write_pktlog_filter(struct file *file, goto out; } -if (filter && (filter != ar->debug.pktlog_filter)) { +if (filter == ar->debug.pktlog_filter) { + ret = count; + goto out; + } + +if (filter) { ret =ath10k_wmi_pdev_pktlog_enable (ar, filter);if (ret) { ath10k_warn(ar, "failed to enable pktlog filter %x: %d\n",
drivers/net/wireless/ath/ath10k/mac.c +11 -2
@@ -4474,7 +4474,10 @@ static int ath10k_add_interface(struct ieee80211_hw *hw, goto err_vdev_delete; } -if (ar->cfg_tx_chainmask) { +/* Configuring number of spatial stream for monitor interface is causing +* target assert in qca9888 and qca6174. +*/ +if (ar->cfg_tx_chainmask && (vif->type !=NL80211_IFTYPE_MONITOR )) {u16 nss =get_nss_from_chainmask (ar->cfg_tx_chainmask); vdev_param = ar->wmi.vdev_param->nss;
@@ -6434,7 +6437,13 @@ ath10k_mac_update_rx_channel(struct ath10k *ar, def = &vifs[0 ].new_ctx->def; ar->rx_channel = def->chan; - }else if (ctx &&ath10k_mac_num_chanctxs (ar) ==0 ) { + }else if ((ctx &&ath10k_mac_num_chanctxs (ar) ==0 ) || + (ctx && (ar->state ==ATH10K_STATE_RESTARTED ))) { +/* During driver restart due to firmware assert, since mac80211 +* already has valid channel context for given radio, channel +* context iteration return num_chanctx > 0. So fix rx_channel +* when restart is in progress. +*/ ar->rx_channel = ctx->def.chan; }else { ar->rx_channel =NULL ;
drivers/net/wireless/ath/ath5k/led.c +1 -1
@@ -77,7 +77,7 @@ static const struct pci_device_id ath5k_led_devices[] = {/* HP Compaq CQ60-206US ([email protected]) */ { ATH_SDEVICE(PCI_VENDOR_ID_HP, 0x0137a), ATH_LED(3, 1) },/* HP Compaq C700 ([email protected]) */ - { ATH_SDEVICE(PCI_VENDOR_ID_HP, 0x0137b), ATH_LED(3, 1) }, + { ATH_SDEVICE(PCI_VENDOR_ID_HP, 0x0137b), ATH_LED(3, 0) },/* LiteOn AR5BXB63 ([email protected]) */ { ATH_SDEVICE(PCI_VENDOR_ID_ATHEROS, 0x3067), ATH_LED(3, 0) },/* IBM-specific AR5212 (all others) */
drivers/net/wireless/ath/ath9k/init.c +7 -0
@@ -49,6 +49,10 @@ int ath9k_led_blink;module_param_named (blink, ath9k_led_blink, int,0444 );MODULE_PARM_DESC (blink,"Enable LED blink on activity" ); +static int ath9k_led_active_high =-1 ; +module_param_named (led_active_high, ath9k_led_active_high, int,0444 ); +MODULE_PARM_DESC (led_active_high,"Invert LED polarity" ); +static int ath9k_btcoex_enable;module_param_named (btcoex_enable, ath9k_btcoex_enable, int,0444 );MODULE_PARM_DESC (btcoex_enable,"Enable wifi-BT coexistence" );
@@ -600,6 +604,9 @@ static int ath9k_init_softc(u16 devid, struct ath_softc *sc,if (ret)return ret; +if (ath9k_led_active_high !=-1 ) + ah->config.led_active_high = ath9k_led_active_high ==1 ; +/* * Enable WLAN/BT RX Antenna diversity only when: *
drivers/net/wireless/ath/ath9k/pci.c +10 -0
@@ -28,6 +28,16 @@ static const struct pci_device_id ath_pci_id_table[] = { { PCI_VDEVICE(ATHEROS, 0x0024) }, /* PCI-E */ { PCI_VDEVICE(ATHEROS, 0x0027) }, /* PCI */ { PCI_VDEVICE(ATHEROS, 0x0029) }, /* PCI */ + +#ifdef CONFIG_ATH9K_PCOEM + /* Mini PCI AR9220 MB92 cards: Compex WLM200NX, Wistron DNMA-92 */ + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, +0x0029 , +PCI_VENDOR_ID_ATHEROS , +0x2096 ), + .driver_data = ATH9K_PCI_LED_ACT_HI }, +#endif + { PCI_VDEVICE(ATHEROS, 0x002A) }, /* PCI-E */ #ifdef CONFIG_ATH9K_PCOEM
drivers/net/wireless/realtek/rtlwifi/base.c +2 -2
@@ -1660,9 +1660,9 @@ void rtl_watchdog_wq_callback(void *data)if (((rtlpriv->link_info.num_rx_inperiod + rtlpriv->link_info.num_tx_inperiod) >8 ) || (rtlpriv->link_info.num_rx_inperiod >2 )) -rtl_lps_enter (hw); -else rtl_lps_leave (hw); +else +rtl_lps_enter (hw); } rtlpriv->link_info.num_rx_inperiod =0 ;
drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c +7 -2
@@ -1203,7 +1203,6 @@ static void btc8723b2ant_set_ant_path(struct btc_coexist *btcoexist,/* Force GNT_BT to low */ btcoexist->btc_write_1byte_bitmask (btcoexist,0x765 ,0x18 ,0x0 ); - btcoexist->btc_write_2byte (btcoexist,0x948 ,0x0 );if (board_info->btdm_ant_pos ==BTC_ANTENNA_AT_MAIN_PORT ) {/* tell firmware "no antenna inverse" */
@@ -1211,19 +1210,25 @@ static void btc8723b2ant_set_ant_path(struct btc_coexist *btcoexist, h2c_parameter[1 ] =1 ;/* ext switch type */ btcoexist->btc_fill_h2c (btcoexist,0x65 ,2 , h2c_parameter); + btcoexist->btc_write_2byte (btcoexist,0x948 ,0x0 ); }else {/* tell firmware "antenna inverse" */ h2c_parameter[0 ] =1 ; h2c_parameter[1 ] =1 ;/* ext switch type */ btcoexist->btc_fill_h2c (btcoexist,0x65 ,2 , h2c_parameter); + btcoexist->btc_write_2byte (btcoexist,0x948 ,0x280 ); } }/* ext switch setting */ if (use_ext_switch) {/* fixed internal switch S1->WiFi, S0->BT */ - btcoexist->btc_write_2byte (btcoexist,0x948 ,0x0 ); +if (board_info->btdm_ant_pos ==BTC_ANTENNA_AT_MAIN_PORT ) + btcoexist->btc_write_2byte (btcoexist,0x948 ,0x0 ); +else + btcoexist->btc_write_2byte (btcoexist,0x948 ,0x280 ); +switch (antpos_type) {case BTC_ANT_WIFI_AT_MAIN :/* ext switch main at wifi */
drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c +26 -1
@@ -965,13 +965,38 @@ void exhalbtc_set_chip_type(u8 chip_type) } } -void exhalbtc_set_ant_num (u8 type,u8 ant_num) +void exhalbtc_set_ant_num (struct rtl_priv *rtlpriv,u8 type,u8 ant_num) {if (BT_COEX_ANT_TYPE_PG == type) { gl_bt_coexist.board_info.pg_ant_num = ant_num; gl_bt_coexist.board_info.btdm_ant_num = ant_num; +/* The antenna position: +* Main (default) or Aux for pgAntNum=2 && btdmAntNum =1. +* The antenna position should be determined by +* auto-detect mechanism. +* The following is assumed to main, +* and those must be modified +* if y auto-detect mechanism is ready +*/ +if ((gl_bt_coexist.board_info.pg_ant_num ==2 ) && + (gl_bt_coexist.board_info.btdm_ant_num ==1 )) + gl_bt_coexist.board_info.btdm_ant_pos = +BTC_ANTENNA_AT_MAIN_PORT ; +else + gl_bt_coexist.board_info.btdm_ant_pos = +BTC_ANTENNA_AT_MAIN_PORT ; }else if (BT_COEX_ANT_TYPE_ANTDIV == type) { gl_bt_coexist.board_info.btdm_ant_num = ant_num; + gl_bt_coexist.board_info.btdm_ant_pos = +BTC_ANTENNA_AT_MAIN_PORT ; + }else if (type ==BT_COEX_ANT_TYPE_DETECTED ) { + gl_bt_coexist.board_info.btdm_ant_num = ant_num; +if (rtlpriv->cfg->mod_params->ant_sel ==1 ) + gl_bt_coexist.board_info.btdm_ant_pos = +BTC_ANTENNA_AT_AUX_PORT ; +else + gl_bt_coexist.board_info.btdm_ant_pos = +BTC_ANTENNA_AT_MAIN_PORT ; } }
drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.h +1 -1
@@ -535,7 +535,7 @@ void exhalbtc_set_bt_patch_version(u16 bt_hci_version, u16 bt_patch_version);void exhalbtc_update_min_bt_rssi (char bt_rssi);void exhalbtc_set_bt_exist (bool bt_exist);void exhalbtc_set_chip_type (u8 chip_type); -void exhalbtc_set_ant_num (u8 type,u8 ant_num); +void exhalbtc_set_ant_num (struct rtl_priv *rtlpriv,u8 type,u8 ant_num);void exhalbtc_display_bt_coex_info (struct btc_coexist *btcoexist);void exhalbtc_signal_compensation (struct btc_coexist *btcoexist,u8 *rssi_wifi,u8 *rssi_bt);
drivers/net/wireless/realtek/rtlwifi/btcoexist/rtl_btc.c +4 -1
@@ -72,7 +72,10 @@ void rtl_btc_init_hal_vars(struct rtl_priv *rtlpriv) __func__, bt_type);exhalbtc_set_chip_type (bt_type); -exhalbtc_set_ant_num (BT_COEX_ANT_TYPE_PG , ant_num); +if (rtlpriv->cfg->mod_params->ant_sel ==1 ) +exhalbtc_set_ant_num (rtlpriv,BT_COEX_ANT_TYPE_DETECTED ,1 ); +else +exhalbtc_set_ant_num (rtlpriv,BT_COEX_ANT_TYPE_PG , ant_num); }void rtl_btc_init_hw_config (struct rtl_priv *rtlpriv)
drivers/net/wireless/realtek/rtlwifi/pci.c +1 -1
@@ -1573,7 +1573,7 @@ int rtl_pci_reset_trx_ring(struct ieee80211_hw *hw) true, HW_DESC_TXBUFF_ADDR), skb->len, PCI_DMA_TODEVICE); -kfree_skb (skb); +dev_kfree_skb_irq (skb); ring->idx = (ring->idx +1 ) % ring->entries; } ring->idx =0 ;
drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c +5 -0
@@ -2684,6 +2684,7 @@ void rtl8723be_read_bt_coexist_info_from_hwpg(struct ieee80211_hw *hw, bool auto_load_fail, u8 *hwinfo) { struct rtl_priv *rtlpriv = rtl_priv(hw); +struct rtl_mod_params *mod_params = rtlpriv->cfg->mod_params;u8 value;u32 tmpu_32;
@@ -2702,6 +2703,10 @@ void rtl8723be_read_bt_coexist_info_from_hwpg(struct ieee80211_hw *hw, rtlpriv->btcoexist.btc_info.ant_num =ANT_X2 ; } +/* override ant_num / ant_path */ +if (mod_params->ant_sel) + rtlpriv->btcoexist.btc_info.ant_num = + (mod_params->ant_sel ==1 ?ANT_X2 :ANT_X1 ); }void rtl8723be_bt_reg_init (struct ieee80211_hw *hw)
drivers/net/wireless/realtek/rtlwifi/rtl8723be/sw.c +3 -0
@@ -273,6 +273,7 @@ static struct rtl_mod_params rtl8723be_mod_params = { .msi_support = false, .disable_watchdog = false, .debug = DBG_EMERG, + .ant_sel = 0, };static struct rtl_hal_cfg rtl8723be_hal_cfg = {
@@ -394,6 +395,7 @@ module_param_named(fwlps, rtl8723be_mod_params.fwctrl_lps, bool, 0444);module_param_named (msi, rtl8723be_mod_params.msi_support, bool,0444 );module_param_named (disable_watchdog, rtl8723be_mod_params.disable_watchdog, bool,0444 ); +module_param_named (ant_sel, rtl8723be_mod_params.ant_sel, int,0444 );MODULE_PARM_DESC (swenc,"Set to 1 for software crypto (default 0)\n" );MODULE_PARM_DESC (ips,"Set to 0 to not use link power save (default 1)\n" );MODULE_PARM_DESC (swlps,"Set to 1 to use SW control power save (default 0)\n" );
@@ -402,6 +404,7 @@ MODULE_PARM_DESC(msi, "Set to 1 to use MSI interrupts mode (default 0)\n");MODULE_PARM_DESC (debug,"Set debug level (0-5) (default 0)" );MODULE_PARM_DESC (disable_watchdog,"Set to 1 to disable the watchdog (default 0)\n" ); +MODULE_PARM_DESC (ant_sel,"Set to 1 or 2 to force antenna number (default 0)\n" ); static SIMPLE_DEV_PM_OPS(rtlwifi_pm_ops, rtl_pci_suspend, rtl_pci_resume);
drivers/net/wireless/realtek/rtlwifi/wifi.h +3 -0
@@ -2251,6 +2251,9 @@ struct rtl_mod_params {/* default 0: 1 means do not disable interrupts */ bool int_clear; + +/* select antenna */ +int ant_sel; };struct rtl_hal_usbint_cfg {
drivers/pci/probe.c +3 -3
@@ -179,9 +179,6 @@ int __pci_read_base(struct pci_dev *dev, enum pci_bar_type type,u16 orig_cmd;struct pci_bus_region region, inverted_region; -if (dev->non_compliant_bars) -return 0 ; - mask = type ?PCI_ROM_ADDRESS_MASK : ~0 ;/* No printks while decoding is disabled! */
@@ -322,6 +319,9 @@ static void pci_read_bases(struct pci_dev *dev, unsigned int howmany, int rom) {unsigned int pos, reg; +if (dev->non_compliant_bars) +return ; +for (pos =0 ; pos < howmany; pos++) {struct resource *res = &dev->resource[pos]; reg =PCI_BASE_ADDRESS_0 + (pos <<2 );
drivers/pinctrl/samsung/pinctrl-exynos5440.c +8 -7
@@ -107,6 +107,7 @@ struct exynos5440_pmx_func {* @nr_groups: number of pin groups available. * @pmx_functions: list of pin functions parsed from device tree. * @nr_functions: number of pin functions available. +* @range: gpio range to register with pinctrl */ struct exynos5440_pinctrl_priv_data {void __iomem *reg_base;
@@ -117,6 +118,7 @@ struct exynos5440_pinctrl_priv_data {unsigned int nr_groups;const struct exynos5440_pmx_func *pmx_functions;unsigned int nr_functions; +struct pinctrl_gpio_range range; };/**
@@ -742,7 +744,6 @@ static int exynos5440_pinctrl_register(struct platform_device *pdev,struct pinctrl_desc *ctrldesc;struct pinctrl_dev *pctl_dev;struct pinctrl_pin_desc *pindesc, *pdesc; -struct pinctrl_gpio_range grange;char *pin_names;int pin, ret;
@@ -794,12 +795,12 @@ static int exynos5440_pinctrl_register(struct platform_device *pdev,return PTR_ERR (pctl_dev); } - grange.name ="exynos5440-pctrl-gpio-range" ; - grange.id =0 ; - grange.base =0 ; - grange.npins =EXYNOS5440_MAX_PINS ; - grange.gc = priv->gc; -pinctrl_add_gpio_range (pctl_dev, &grange); + priv->range.name ="exynos5440-pctrl-gpio-range" ; + priv->range.id =0 ; + priv->range.base =0 ; + priv->range.npins =EXYNOS5440_MAX_PINS ; + priv->range.gc = priv->gc; +pinctrl_add_gpio_range (pctl_dev, &priv->range);return 0 ; }
drivers/scsi/aacraid/aacraid.h +1 -0
@@ -29,6 +29,7 @@ enum {#define AAC_INT_MODE_MSI (1<<1)#define AAC_INT_MODE_AIF (1<<2)#define AAC_INT_MODE_SYNC (1<<3) +#define AAC_INT_MODE_MSIX (1<<16)#define AAC_INT_ENABLE_TYPE1_INTX 0xfffffffb#define AAC_INT_ENABLE_TYPE1_MSIX 0xfffffffa
drivers/scsi/aacraid/comminit.c +24 -0
@@ -37,6 +37,7 @@#include <linux/spinlock.h> #include <linux/slab.h> #include <linux/blkdev.h> +#include <linux/delay.h> #include <linux/completion.h> #include <linux/mm.h> #include <scsi/scsi_host.h>
@@ -47,6 +48,20 @@ struct aac_common aac_config = { .irq_mod = 1 }; +static inline int aac_is_msix_mode (struct aac_dev *dev) +{ +u32 status; + + status =src_readl (dev, MUnit.OMR); +return (status &AAC_INT_MODE_MSIX ); +} + +static inline void aac_change_to_intx (struct aac_dev *dev) +{ +aac_src_access_devreg (dev,AAC_DISABLE_MSIX ); +aac_src_access_devreg (dev,AAC_ENABLE_INTX ); +} +static int aac_alloc_comm (struct aac_dev *dev,void **commaddr,unsigned long commsize,unsigned long commalign) {unsigned char *base;
@@ -425,6 +440,15 @@ struct aac_dev *aac_init_adapter(struct aac_dev *dev) dev->comm_interface =AAC_COMM_PRODUCER ; dev->raw_io_interface = dev->raw_io_64 =0 ; + +/* +* Enable INTX mode, if not done already Enabled +*/ +if (aac_is_msix_mode (dev)) { +aac_change_to_intx (dev); +dev_info (&dev->pdev->dev,"Changed firmware to INTX mode" ); + } + if ((!aac_adapter_sync_cmd(dev, GET_ADAPTER_PROPERTIES, 0, 0, 0, 0, 0, 0, status+0, status+1, status+2, status+3, NULL)) &&
drivers/scsi/aacraid/commsup.c +8 -4
@@ -611,10 +611,10 @@ int aac_fib_send(u16 command, struct fib *fibptr, unsigned long size, }return -EFAULT ; } -/* We used to udelay() here but that absorbed -* a CPU when a timeout occured. Not very -* useful. */ -cpu_relax (); +/* +* Allow other processes / CPUS to use core +*/ +schedule (); } }else if (down_interruptible (&fibptr->event_wait)) {/* Do nothing ... satisfy
@@ -1970,6 +1970,10 @@ int aac_command_thread(void *data)if (difference <=0 ) difference =1 ;set_current_state (TASK_INTERRUPTIBLE ); + +if (kthread_should_stop ()) +break ; +schedule_timeout (difference);if (kthread_should_stop ())
drivers/scsi/lpfc/lpfc_mem.c +4 -2
@@ -231,13 +231,15 @@ lpfc_mem_free(struct lpfc_hba *phba)if (phba->lpfc_hbq_pool)pci_pool_destroy (phba->lpfc_hbq_pool); phba->lpfc_hbq_pool =NULL ; -mempool_destroy (phba->rrq_pool); + +if (phba->rrq_pool) +mempool_destroy (phba->rrq_pool); phba->rrq_pool =NULL ;/* Free NLP memory pool */ mempool_destroy (phba->nlp_mem_pool); phba->nlp_mem_pool =NULL ; -if (phba->sli_rev ==LPFC_SLI_REV4 ) { +if (phba->sli_rev ==LPFC_SLI_REV4 && phba->active_rrq_pool) {mempool_destroy (phba->active_rrq_pool); phba->active_rrq_pool =NULL ; }
drivers/tty/serial/ucc_uart.c +3 -0
@@ -1478,6 +1478,9 @@ static const struct of_device_id ucc_uart_match[] = { .type = "serial", .compatible = "ucc_uart", }, + { + .compatible = "fsl,t1040-ucc-uart", + }, {}, };MODULE_DEVICE_TABLE (of, ucc_uart_match);
drivers/xen/events/events_base.c +4 -2
@@ -487,7 +487,8 @@ static void eoi_pirq(struct irq_data *data)if (!VALID_EVTCHN (evtchn))return ; -if (unlikely (irqd_is_setaffinity_pending (data))) { +if (unlikely (irqd_is_setaffinity_pending (data)) && +likely (!irqd_irq_disabled (data))) {int masked =test_and_set_mask (evtchn);clear_evtchn (evtchn);
@@ -1370,7 +1371,8 @@ static void ack_dynirq(struct irq_data *data)if (!VALID_EVTCHN (evtchn))return ; -if (unlikely (irqd_is_setaffinity_pending (data))) { +if (unlikely (irqd_is_setaffinity_pending (data)) && +likely (!irqd_irq_disabled (data))) {int masked =test_and_set_mask (evtchn);clear_evtchn (evtchn);
fs/affs/super.c +3 -2
@@ -528,7 +528,7 @@ affs_remount(struct super_block *sb, int *flags, char *data)char *prefix =NULL ; new_opts =kstrdup (data,GFP_KERNEL ); -if (!new_opts) +if (data && !new_opts)return -ENOMEM ;pr_debug ("%s(flags=0x%x,opts=\"%s\")\n" , __func__, *flags, data);
@@ -546,7 +546,8 @@ affs_remount(struct super_block *sb, int *flags, char *data) }flush_delayed_work (&sbi->sb_work); -replace_mount_options (sb, new_opts); +if (new_opts) +replace_mount_options (sb, new_opts); sbi->s_flags = mount_flags; sbi->s_mode = mode;
fs/btrfs/backref.c +1 -1
@@ -1995,7 +1995,7 @@ struct inode_fs_paths *init_ipath(s32 total_bytes, struct btrfs_root *fs_root, ifp =kmalloc (sizeof (*ifp),GFP_NOFS );if (!ifp) { -kfree (fspath); +vfree (fspath);return ERR_PTR (-ENOMEM ); }
fs/btrfs/ctree.h +1 -0
@@ -4089,6 +4089,7 @@ void btrfs_test_inode_set_ops(struct inode *inode);/* ioctl.c */ long btrfs_ioctl (struct file *file,unsigned int cmd,unsigned long arg); +long btrfs_compat_ioctl (struct file *file,unsigned int cmd,unsigned long arg);void btrfs_update_iflags (struct inode *inode);void btrfs_inherit_iflags (struct inode *inode,struct inode *dir);int btrfs_is_empty_uuid (u8 *uuid);
fs/btrfs/extent-tree.c +1 -1
@@ -4620,7 +4620,7 @@ static void shrink_delalloc(struct btrfs_root *root, u64 to_reclaim, u64 orig,/* Calc the number of the pages we need flush for space reservation */ items =calc_reclaim_items_nr (root, to_reclaim); - to_reclaim = items *EXTENT_SIZE_PER_ITEM ; + to_reclaim = (u64 )items *EXTENT_SIZE_PER_ITEM ; trans = (struct btrfs_trans_handle *)current->journal_info; block_rsv = &root->fs_info->delalloc_block_rsv;
fs/btrfs/extent_io.c +12 -2
@@ -875,8 +875,14 @@ __set_extent_bit(struct extent_io_tree *tree, u64 start, u64 end, bits |=EXTENT_FIRST_DELALLOC ; again:if (!prealloc &&gfpflags_allow_blocking (mask)) { +/* +* Don't care for allocation failure here because we might end +* up not needing the pre-allocated extent state at all, which +* is the case if we only have in the tree extent states that +* cover our input range and don't cover too any other range. +* If we end up needing a new extent state we allocate it later. +*/ prealloc =alloc_extent_state (mask); -BUG_ON (!prealloc); }spin_lock (&tree->lock);
@@ -4385,8 +4391,12 @@ int extent_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo,if (ret <0 ) {btrfs_free_path (path);return ret; + }else { +WARN_ON (!ret); +if (ret ==1 ) + ret =0 ; } -WARN_ON (!ret); + path->slots[0 ]--;btrfs_item_key_to_cpu (path->nodes[0 ], &found_key, path->slots[0 ]); found_type = found_key.type;
fs/btrfs/file.c +1 -1
@@ -2931,7 +2931,7 @@ const struct file_operations btrfs_file_operations = { .fallocate = btrfs_fallocate, .unlocked_ioctl = btrfs_ioctl, #ifdef CONFIG_COMPAT - .compat_ioctl = btrfs_ioctl, + .compat_ioctl = btrfs_compat_ioctl, #endif .copy_file_range = btrfs_copy_file_range, .clone_file_range = btrfs_clone_file_range,
fs/btrfs/inode.c +1 -1
@@ -10088,7 +10088,7 @@ static const struct file_operations btrfs_dir_file_operations = { .iterate = btrfs_real_readdir, .unlocked_ioctl = btrfs_ioctl, #ifdef CONFIG_COMPAT - .compat_ioctl = btrfs_ioctl, + .compat_ioctl = btrfs_compat_ioctl, #endif .release = btrfs_release_file, .fsync = btrfs_sync_file,
fs/btrfs/ioctl.c +36 -5
63 lines not on this page · raw message
fs/btrfs/scrub.c +5 -2
@@ -2125,6 +2125,8 @@ static void scrub_missing_raid56_end_io(struct bio *bio)if (bio->bi_error) sblock->no_io_error_seen =0 ; +bio_put (bio); +btrfs_queue_work (fs_info->scrub_workers, &sblock->work); }
@@ -2177,7 +2179,7 @@ static void scrub_missing_raid56_pages(struct scrub_block *sblock)struct btrfs_fs_info *fs_info = sctx->dev_root->fs_info;u64 length = sblock->page_count *PAGE_SIZE ;u64 logical = sblock->pagev[0 ]->logical; -struct btrfs_bio *bbio; +struct btrfs_bio *bbio =NULL ;struct bio *bio;struct btrfs_raid_bio *rbio;int ret;
@@ -2858,7 +2860,7 @@ static noinline_for_stack int scrub_raid56_parity(struct scrub_ctx *sctx,int extent_mirror_num;int stop_loop =0 ; - nsectors = map->stripe_len / root->sectorsize; + nsectors =div_u64 (map->stripe_len, root->sectorsize); bitmap_len =scrub_calc_parity_bitmap_len (nsectors); sparity =kzalloc (sizeof (struct scrub_parity ) +2 * bitmap_len,GFP_NOFS );
@@ -2978,6 +2980,7 @@ again: extent_len); mapped_length = extent_len; + bbio =NULL ; ret =btrfs_map_block (fs_info,READ , extent_logical, &mapped_length, &bbio,0 );if (!ret) {
fs/btrfs/super.c +18 -4
@@ -2024,6 +2024,7 @@ static int btrfs_statfs(struct dentry *dentry, struct kstatfs *buf)struct btrfs_block_rsv *block_rsv = &fs_info->global_block_rsv;int ret;u64 thresh =0 ; +int mixed =0 ;/* * holding chunk_muext to avoid allocating new chunks, holding
@@ -2049,8 +2050,17 @@ static int btrfs_statfs(struct dentry *dentry, struct kstatfs *buf) } } } -if (found->flags &BTRFS_BLOCK_GROUP_METADATA ) - total_free_meta += found->disk_total - found->disk_used; + +/* +* Metadata in mixed block goup profiles are accounted in data +*/ +if (!mixed && found->flags &BTRFS_BLOCK_GROUP_METADATA ) { +if (found->flags &BTRFS_BLOCK_GROUP_DATA ) + mixed =1 ; +else + total_free_meta += found->disk_total - + found->disk_used; + } total_used += found->disk_used; }
@@ -2063,7 +2073,11 @@ static int btrfs_statfs(struct dentry *dentry, struct kstatfs *buf)/* Account global block reserve as used, it's in logical size already */ spin_lock (&block_rsv->lock); - buf->f_bfree -= block_rsv->size >> bits; +/* Mixed block groups accounting is not byte-accurate, avoid overflow */ +if (buf->f_bfree >= block_rsv->size >> bits) + buf->f_bfree -= block_rsv->size >> bits; +else + buf->f_bfree =0 ;spin_unlock (&block_rsv->lock); buf->f_bavail =div_u64 (total_free_data, factor);
@@ -2088,7 +2102,7 @@ static int btrfs_statfs(struct dentry *dentry, struct kstatfs *buf)*/ thresh =4 *1024 *1024 ; -if (total_free_meta - thresh < block_rsv->size) +if (!mixed && total_free_meta - thresh < block_rsv->size) buf->f_bavail =0 ; buf->f_type =BTRFS_SUPER_MAGIC ;
fs/btrfs/sysfs.c +6 -0
@@ -120,6 +120,9 @@ static ssize_t btrfs_feature_attr_store(struct kobject *kobj,if (!fs_info)return -EPERM ; +if (fs_info->sb->s_flags &MS_RDONLY ) +return -EROFS ; + ret =kstrtoul (skip_spaces (buf),0 , &val);if (ret)return ret;
@@ -374,6 +377,9 @@ static ssize_t btrfs_label_store(struct kobject *kobj,struct btrfs_fs_info *fs_info =to_fs_info (kobj);size_t p_len; +if (!fs_info) +return -EPERM ; +if (fs_info->sb->s_flags &MS_RDONLY )return -EROFS ;
fs/btrfs/tree-log.c +9 -6
@@ -5157,7 +5157,7 @@ process_leaf: } ctx->log_new_dentries = false; -if (type ==BTRFS_FT_DIR ) +if (type ==BTRFS_FT_DIR || type ==BTRFS_FT_SYMLINK ) log_mode =LOG_INODE_ALL ;btrfs_release_path (path); ret = btrfs_log_inode(trans, root, di_inode,
@@ -5277,11 +5277,16 @@ static int btrfs_log_all_parents(struct btrfs_trans_handle *trans,if (IS_ERR (dir_inode))continue ; +if (ctx) + ctx->log_new_dentries = false; ret =btrfs_log_inode (trans, root, dir_inode,LOG_INODE_ALL ,0 ,LLONG_MAX , ctx);if (!ret &&btrfs_must_commit_transaction (trans, dir_inode)) ret =1 ; +if (!ret && ctx && ctx->log_new_dentries) + ret =log_new_dir_dentries (trans, root, + dir_inode, ctx);iput (dir_inode);if (ret) goto out;
@@ -5651,11 +5656,9 @@ void btrfs_record_unlink_dir(struct btrfs_trans_handle *trans,* into the file. When the file is logged we check it and * don't log the parents if the file is fully on disk. */ -if (S_ISREG (inode->i_mode)) { -mutex_lock (&BTRFS_I (inode)->log_mutex); -BTRFS_I (inode)->last_unlink_trans = trans->transid; -mutex_unlock (&BTRFS_I (inode)->log_mutex); - } +mutex_lock (&BTRFS_I (inode)->log_mutex); +BTRFS_I (inode)->last_unlink_trans = trans->transid; +mutex_unlock (&BTRFS_I (inode)->log_mutex);/* * if this directory was already logged any new
fs/btrfs/volumes.c +44 -17
125 lines not on this page · raw message
fs/btrfs/volumes.h +1 -1
@@ -347,7 +347,7 @@ struct map_lookup {u64 type;int io_align;int io_width; -int stripe_len; +u64 stripe_len;int sector_size;int num_stripes;int sub_stripes;
fs/ext4/ialloc.c +28 -31
97 lines not on this page · raw message
fs/ext4/ioctl.c +1 -1
@@ -365,7 +365,7 @@ static int ext4_ioctl_setproject(struct file *filp, __u32 projid)struct dquot *transfer_to[MAXQUOTAS ] = { }; transfer_to[PRJQUOTA ] =dqget (sb,make_kqid_projid (kprojid)); -if (transfer_to[PRJQUOTA ]) { +if (!IS_ERR (transfer_to[PRJQUOTA ])) { err =__dquot_transfer (inode, transfer_to);dqput (transfer_to[PRJQUOTA ]);if (err)
fs/ext4/mballoc.c +7 -3
@@ -1259,6 +1259,7 @@ static void ext4_mb_unload_buddy(struct ext4_buddy *e4b)static int mb_find_order_for_block (struct ext4_buddy *e4b,int block) {int order =1 ; +int bb_incr =1 << (e4b->bd_blkbits -1 );void *bb;BUG_ON (e4b->bd_bitmap == e4b->bd_buddy);
@@ -1271,7 +1272,8 @@ static int mb_find_order_for_block(struct ext4_buddy *e4b, int block)/* this block is part of buddy of order 'order' */ return order; } - bb +=1 << (e4b->bd_blkbits - order); + bb += bb_incr; + bb_incr >>=1 ; order++; }return 0 ;
@@ -2576,7 +2578,7 @@ int ext4_mb_init(struct super_block *sb) {struct ext4_sb_info *sbi =EXT4_SB (sb);unsigned i, j; -unsigned offset; +unsigned offset, offset_incr;unsigned max;int ret;
@@ -2605,11 +2607,13 @@ int ext4_mb_init(struct super_block *sb) i =1 ; offset =0 ; + offset_incr =1 << (sb->s_blocksize_bits -1 ); max = sb->s_blocksize <<2 ;do { sbi->s_mb_offsets[i] = offset; sbi->s_mb_maxs[i] = max; - offset +=1 << (sb->s_blocksize_bits - i); + offset += offset_incr; + offset_incr = offset_incr >>1 ; max = max >>1 ; i++; }while (i <= sb->s_blocksize_bits +1 );
fs/ext4/namei.c +1 -1
@@ -2828,7 +2828,7 @@ int ext4_orphan_add(handle_t *handle, struct inode *inode)* list entries can cause panics at unmount time. */ mutex_lock (&sbi->s_orphan_lock); -list_del (&EXT4_I (inode)->i_orphan); +list_del_init (&EXT4_I (inode)->i_orphan);mutex_unlock (&sbi->s_orphan_lock); } }
fs/nfs/pnfs_nfs.c +28 -0
@@ -246,6 +246,23 @@ void pnfs_fetch_commit_bucket_list(struct list_head *pages, } +/* Helper function for pnfs_generic_commit_pagelist to catch an empty +* page list. This can happen when two commits race. */ +static bool +pnfs_generic_commit_cancel_empty_pagelist (struct list_head *pages, +struct nfs_commit_data *data, +struct nfs_commit_info *cinfo) +{ +if (list_empty (pages)) { +if (atomic_dec_and_test (&cinfo->mds->rpcs_out)) +wake_up_atomic_t (&cinfo->mds->rpcs_out); +nfs_commitdata_release (data); +return true; + } + +return false; +} +/* This follows nfs_commit_list pretty closely */ int pnfs_generic_commit_pagelist(struct inode *inode, struct list_head *mds_pages,
@@ -280,6 +297,11 @@ pnfs_generic_commit_pagelist(struct inode *inode, struct list_head *mds_pages,list_for_each_entry_safe (data, tmp, &list, pages) {list_del_init (&data->pages);if (data->ds_commit_index <0 ) { +/* another commit raced with us */ +if (pnfs_generic_commit_cancel_empty_pagelist (mds_pages, + data, cinfo)) +continue ; +nfs_init_commit (data, mds_pages,NULL , cinfo); nfs_initiate_commit(NFS_CLIENT(inode), data, NFS_PROTO(data->inode),
@@ -288,6 +310,12 @@ pnfs_generic_commit_pagelist(struct inode *inode, struct list_head *mds_pages,LIST_HEAD (pages);pnfs_fetch_commit_bucket_list (&pages, data, cinfo); + +/* another commit raced with us */ +if (pnfs_generic_commit_cancel_empty_pagelist (&pages, + data, cinfo)) +continue ; +nfs_init_commit (data, &pages, data->lseg, cinfo);initiate_commit (data, how); }
fs/nfs/write.c +4 -0
@@ -1709,6 +1709,10 @@ nfs_commit_list(struct inode *inode, struct list_head *head, int how, {struct nfs_commit_data *data; +/* another commit raced with us */ +if (list_empty (head)) +return 0 ; + data =nfs_commitdata_alloc ();if (!data)
fs/xfs/xfs_fsops.c +2 -2
@@ -243,8 +243,8 @@ xfs_growfs_data_private( agf->agf_roots[XFS_BTNUM_CNTi] =cpu_to_be32 (XFS_CNT_BLOCK (mp)); agf->agf_levels[XFS_BTNUM_BNOi] =cpu_to_be32 (1 ); agf->agf_levels[XFS_BTNUM_CNTi] =cpu_to_be32 (1 ); - agf->agf_flfirst =0 ; - agf->agf_fllast =cpu_to_be32 (XFS_AGFL_SIZE (mp) -1 ); + agf->agf_flfirst =cpu_to_be32 (1 ); + agf->agf_fllast =0 ; agf->agf_flcount =0 ; tmpsize = agsize -XFS_PREALLOC_BLOCKS (mp); agf->agf_freeblks =cpu_to_be32 (tmpsize);
fs/xfs/xfs_inode.c +18 -8
@@ -3225,13 +3225,14 @@ xfs_iflush_cluster(* We need to check under the i_flags_lock for a valid inode * here. Skip it if it is not valid or the wrong inode. */ -spin_lock (&ip->i_flags_lock); -if (!ip->i_ino || +spin_lock (&iq->i_flags_lock); +if (!iq->i_ino || +__xfs_iflags_test (iq,XFS_ISTALE ) || (XFS_INO_TO_AGINO (mp, iq->i_ino) & mask) != first_index) { -spin_unlock (&ip->i_flags_lock); +spin_unlock (&iq->i_flags_lock);continue ; } -spin_unlock (&ip->i_flags_lock); +spin_unlock (&iq->i_flags_lock);/* * Do an un-protected check to see if the inode is dirty and
@@ -3347,7 +3348,7 @@ xfs_iflush( struct xfs_buf **bpp) {struct xfs_mount *mp = ip->i_mount; -struct xfs_buf *bp; +struct xfs_buf *bp =NULL ;struct xfs_dinode *dip;int error;
@@ -3389,14 +3390,22 @@ xfs_iflush( }/* -* Get the buffer containing the on-disk inode. +* Get the buffer containing the on-disk inode. We are doing a try-lock +* operation here, so we may get an EAGAIN error. In that case, we +* simply want to return with the inode still dirty. +* +* If we get any other error, we effectively have a corruption situation +* and we cannot flush the inode, so we treat it the same as failing +* xfs_iflush_int(). */ error =xfs_imap_to_bp (mp,NULL , &ip->i_imap, &dip, &bp,XBF_TRYLOCK ,0 ); -if (error || !bp) { +if (error == -EAGAIN ) {xfs_ifunlock (ip);return error; } +if (error) + goto corrupt_out;/* * First flush out the inode that xfs_iflush was called with.
@@ -3424,7 +3433,8 @@ xfs_iflush(return 0 ; corrupt_out: -xfs_buf_relse (bp); +if (bp) +xfs_buf_relse (bp);xfs_force_shutdown (mp,SHUTDOWN_CORRUPT_INCORE ); cluster_corrupt_out: error = -EFSCORRUPTED ;
fs/xfs/xfs_super.c +10 -0
@@ -1233,6 +1233,16 @@ xfs_fs_remount(return -EINVAL ; } +if (XFS_SB_VERSION_NUM (sbp) ==XFS_SB_VERSION_5 && +xfs_sb_has_ro_compat_feature (sbp, +XFS_SB_FEAT_RO_COMPAT_UNKNOWN )) { +xfs_warn (mp, +"ro->rw transition prohibited on unknown (0x%x) ro-compat filesystem" , + (sbp->sb_features_ro_compat & +XFS_SB_FEAT_RO_COMPAT_UNKNOWN )); +return -EINVAL ; + } +
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.