mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
This is the 4.14.308 stable release
-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmQMngEACgkQONu9yGCS aT5ifBAAlRcsirDWn3jLJYYFuBv02tDCwZWOlkNUhobBYP6V5Qiu0clDb8GOW7px VLSy6uxKS3FSVFxv7Jg0tM0Kb4id6u3hn1OpXDgKFDpofwH1mF/pHHm0TszlwBkK 1d3X04HfowiGrmFEx0uz5RCJSFj/7xDcmq2AivRs2KmTvThHmOZBVSIiv5kr+t1z 7TJ5JNE3OK9IaHK/Ic9p3/8r3Xx0pwpZnS9vBL2KbPOjDiYIAnwtfQ5efg++Dfw8 rCeFpDFGVVW0Biau17Q+1NBN8GhVcn0A7C6oCZZhEgGhWdEPkTn3UVaYaYE8FPnV wM1zPhcYUus0QVUUE9wgsxmVFsiSc2KcSraii98PPgnNFdj2nYQzYNAfmiyByKnr U3wuQvF69L+Z9sRo4z3zjjVnO2gYNgdygdwekbXnVraTDv5NhbVwyJ7LngaseGXN QQZMD2AEJtAbng9zDi8kQbHM1MpdRWhtcUyhP2R9qZ2rcnXyk1cJz2Qw3oqJV6Av yLl8g74112CErNyVDJqMJV1TzQDtkN6A1xXzLwUtMLUJ8dYedlopduhhDRaM94Xx ZJjiduSsif1eeYMheNC82F3pR5As7FJFlnqTBcJIYSmfYQ3ooYUBGhyGhp3tFn1F HY7AXdIQRqtbRcJMx2Hs0ZA86FCWHYafQDr+4QO9WEU1d8y5vvg= =ch57 -----END PGP SIGNATURE----- Merge 4.14.308 into android-4.14-stable Changes in 4.14.308 ARM: dts: rockchip: add power-domains property to dp node on rk3288 btrfs: send: limit number of clones and allocated memory size IB/hfi1: Assign npages earlier net: Remove WARN_ON_ONCE(sk->sk_forward_alloc) from sk_stream_kill_queues(). bpf: Do not use ax register in interpreter on div/mod bpf: fix subprog verifier bypass by div/mod by 0 exception bpf: Fix 32 bit src register truncation on div/mod bpf: Fix truncation handling for mod32 dst reg wrt zero dmaengine: sh: rcar-dmac: Check for error num after dma_set_max_seg_size USB: serial: option: add support for VW/Skoda "Carstick LTE" USB: core: Don't hold device lock while reading the "descriptors" sysfs file HID: asus: Remove check for same LED brightness on set HID: asus: use spinlock to protect concurrent accesses HID: asus: use spinlock to safely schedule workers ARM: OMAP2+: Fix memory leak in realtime_counter_init() ARM: zynq: Fix refcount leak in zynq_early_slcr_init arm64: dts: meson-gx: Fix Ethernet MAC address unit name arm64: dts: meson-gx: Fix the SCPI DVFS node name and unit address ARM: OMAP1: call platform_device_put() in error case in omap1_dm_timer_init() ARM: dts: exynos: correct wr-active property in Exynos3250 Rinato arm64: dts: amlogic: meson-gx: fix SCPI clock dvfs node name arm64: dts: amlogic: meson-gx: add missing unit address to rng node name arm64: dts: amlogic: meson-gxl: add missing unit address to eth-phy-mux node name block: bio-integrity: Copy flags when bio_integrity_payload is cloned wifi: libertas: fix memory leak in lbs_init_adapter() wifi: rtl8xxxu: don't call dev_kfree_skb() under spin_lock_irqsave() wifi: ipw2200: fix memory leak in ipw_wdev_init() wifi: brcmfmac: fix potential memory leak in brcmf_netdev_start_xmit() wifi: brcmfmac: unmap dma buffer in brcmf_msgbuf_alloc_pktid() wifi: libertas: main: don't call kfree_skb() under spin_lock_irqsave() wifi: libertas: cmdresp: don't call kfree_skb() under spin_lock_irqsave() wifi: wl3501_cs: don't call kfree_skb() under spin_lock_irqsave() genirq: Fix the return type of kstat_cpu_irqs_sum() lib/mpi: Fix buffer overrun when SG is too long ACPICA: nsrepair: handle cases without a return value correctly wifi: orinoco: check return value of hermes_write_wordrec() wifi: ath9k: htc_hst: free skb in ath9k_htc_rx_msg() if there is no callback function wifi: ath9k: Fix potential stack-out-of-bounds write in ath9k_wmi_rsp_callback() ACPI: battery: Fix missing NUL-termination with large strings crypto: seqiv - Handle EBUSY correctly net/mlx5: Enhance debug print in page allocation failure irqchip/alpine-msi: Fix refcount leak in alpine_msix_init_domains irqchip/irq-mvebu-gicp: Fix refcount leak in mvebu_gicp_probe cpufreq: davinci: Fix clk use after free Bluetooth: L2CAP: Fix potential user-after-free crypto: rsa-pkcs1pad - Use akcipher_request_complete m68k: /proc/hardware should depend on PROC_FS wifi: mwifiex: fix loop iterator in mwifiex_update_ampdu_txwinsize() can: esd_usb: Move mislocated storage of SJA1000_ECC_SEG bits in case of a bus error irqchip/irq-bcm7120-l2: Set IRQ_LEVEL for level triggered interrupts drm: mxsfb: DRM_MXSFB should depend on ARCH_MXS || ARCH_MXC drm/bridge: megachips: Fix error handling in i2c_register_driver() gpu: ipu-v3: common: Add of_node_put() for reference returned by of_graph_get_port_by_id() drm/msm/hdmi: Add missing check for alloc_ordered_workqueue pinctrl: rockchip: Fix refcount leak in rockchip_pinctrl_parse_groups ALSA: hda/ca0132: minor fix for allocation size drm/mipi-dsi: Fix byte order of 16-bit DCS set/get brightness drm/mediatek: Drop unbalanced obj unref ASoC: soc-compress.c: fixup private_data on snd_soc_new_compress() gpio: vf610: connect GPIO label to dev name hwmon: (ltc2945) Handle error case in ltc2945_value_store scsi: aic94xx: Add missing check for dma_map_single() dm: remove flush_scheduled_work() during local_exit() mfd: pcf50633-adc: Fix potential memleak in pcf50633_adc_async_read() mtd: rawnand: sunxi: Fix the size of the last OOB region Input: ads7846 - don't report pressure for ads7845 Input: ads7846 - don't check penirq immediately for 7845 powerpc/powernv/ioda: Skip unallocated resources when mapping to PE powerpc/pseries/lparcfg: add missing RTAS retry status handling MIPS: vpe-mt: drop physical_memsize media: platform: ti: Add missing check for devm_regulator_get media: rc: Fix use-after-free bugs caused by ene_tx_irqsim() media: usb: siano: Fix use after free bugs caused by do_submit_urb rpmsg: glink: Avoid infinite loop on intent for missing channel udf: Define EFSCORRUPTED error code ARM: dts: exynos: Use Exynos5420 compatible for the MIPI video phy wifi: brcmfmac: Fix potential stack-out-of-bounds in brcmf_c_preinit_dcmds() rcu: Suppress smp_processor_id() complaint in synchronize_rcu_expedited_wait() thermal: intel: Fix unsigned comparison with less than zero timers: Prevent union confusion from unexpected restart_syscall() x86/bugs: Reset speculation control settings on init inet: fix fast path in __inet_hash_connect() ACPI: Don't build ACPICA with '-Os' net: bcmgenet: Add a check for oversized packets m68k: Check syscall_trace_enter() return code ACPI: video: Fix Lenovo Ideapad Z570 DMI match drm/radeon: free iio for atombios when driver shutdown drm/msm/dsi: Add missing check for alloc_ordered_workqueue docs/scripts/gdb: add necessary make scripts_gdb step ASoC: kirkwood: Iterate over array indexes instead of using pointer math regulator: max77802: Bounds check regulator id against opmode regulator: s5m8767: Bounds check id indexing into arrays pinctrl: at91: use devm_kasprintf() to avoid potential leaks dm thin: add cond_resched() to various workqueue loops dm cache: add cond_resched() to various workqueue loops spi: bcm63xx-hsspi: Fix multi-bit mode setting wifi: rtl8xxxu: fixing transmisison failure for rtl8192eu rtc: pm8xxx: fix set-alarm race s390/kprobes: fix irq mask clobbering on kprobe reenter from post_handler s390/kprobes: fix current_kprobe never cleared after kprobes reenter hfs: fix missing hfs_bnode_get() in __hfs_bnode_create fs: hfsplus: fix UAF issue in hfsplus_put_super f2fs: fix information leak in f2fs_move_inline_dirents() ocfs2: fix defrag path triggering jbd2 ASSERT ocfs2: fix non-auto defrag path not working issue udf: Truncate added extents on failed expansion udf: Do not bother merging very long extents udf: Do not update file length for failed writes to inline files udf: Fix file corruption when appending just after end of preallocated extent x86/virt: Force GIF=1 prior to disabling SVM (for reboot flows) x86/crash: Disable virt in core NMI crash handler to avoid double shootdown x86/reboot: Disable virtualization in an emergency if SVM is supported x86/reboot: Disable SVM, not just VMX, when stopping CPUs x86/kprobes: Fix __recover_optprobed_insn check optimizing logic x86/kprobes: Fix arch_check_optimized_kprobe check within optimized_kprobe range x86/microcode/amd: Remove load_microcode_amd()'s bsp parameter x86/microcode/AMD: Add a @cpu parameter to the reloading functions x86/microcode/AMD: Fix mixed steppings support x86/speculation: Allow enabling STIBP with legacy IBRS Documentation/hw-vuln: Document the interaction between IBRS and STIBP ima: Align ima_file_mmap() parameters with mmap_file LSM hook irqdomain: Fix association race irqdomain: Fix disassociation race irqdomain: Drop bogus fwspec-mapping error handling ALSA: ice1712: Do not left ice->gpio_mutex locked in aureon_add_controls() ext4: optimize ea_inode block expansion ext4: refuse to create ea block when umounted wifi: rtl8xxxu: Use a longer retry limit of 48 wifi: cfg80211: Fix use after free for wext dm flakey: fix logic when corrupting a bio dm flakey: don't corrupt the zero page ARM: dts: exynos: correct TMU phandle in Exynos4 ARM: dts: exynos: correct TMU phandle in Odroid XU rbd: avoid use-after-free in do_rbd_add() when rbd_dev_create() fails alpha: fix FEN fault handling mips: fix syscall_get_nr ktest.pl: Fix missing "end_monitor" when machine check fails scsi: qla2xxx: Fix link failure in NPIV environment scsi: qla2xxx: Fix erroneous link down scsi: ses: Don't attach if enclosure has no components scsi: ses: Fix slab-out-of-bounds in ses_enclosure_data_process() scsi: ses: Fix possible addl_desc_ptr out-of-bounds accesses scsi: ses: Fix possible desc_ptr out-of-bounds accesses scsi: ses: Fix slab-out-of-bounds in ses_intf_remove() PCI: Avoid FLR for AMD FCH AHCI adapters drm/radeon: Fix eDP for single-display iMac11,2 kbuild: Port silent mode detection to future gnu make. net/sched: Retire tcindex classifier fs/jfs: fix shift exponent db_agl2size negative pwm: stm32-lp: fix the check on arr and cmp registers update ubi: ensure that VID header offset + VID header size <= alloc, size ubifs: Rectify space budget for ubifs_xrename() ubifs: Fix wrong dirty space budget for dirty inode ubifs: Reserve one leb for each journal head while doing budget ubi: Fix use-after-free when volume resizing failed ubi: Fix unreferenced object reported by kmemleak in ubi_resize_volume() ubi: Fix possible null-ptr-deref in ubi_free_volume() ubifs: Re-statistic cleaned znode count if commit failed ubifs: dirty_cow_znode: Fix memleak in error handling path ubifs: ubifs_writepage: Mark page dirty after writing inode failed ubi: Fix UAF wear-leveling entry in eraseblk_count_seq_show() ubi: ubi_wl_put_peb: Fix infinite loop when wear-leveling work failed x86: um: vdso: Add '%rcx' and '%r11' to the syscall clobber list watchdog: at91sam9_wdt: use devm_request_irq to avoid missing free_irq() in error path watchdog: Fix kmemleak in watchdog_cdev_register watchdog: pcwd_usb: Fix attempting to access uninitialized memory netfilter: ctnetlink: fix possible refcount leak in ctnetlink_create_conntrack() net: fix __dev_kfree_skb_any() vs drop monitor 9p/xen: fix version parsing 9p/xen: fix connection sequence nfc: fix memory leak of se_io context in nfc_genl_se_io ARM: dts: spear320-hmi: correct STMPE GPIO compatible tcp: tcp_check_req() can be called from process context scsi: ipr: Work around fortify-string warning thermal: intel: quark_dts: fix error pointer dereference tracing: Add NULL checks for buffer in ring_buffer_free_read_page() firmware/efi sysfb_efi: Add quirk for Lenovo IdeaPad Duet 3 media: uvcvideo: Handle cameras with invalid descriptors tty: fix out-of-bounds access in tty_driver_lookup_tty() tty: serial: fsl_lpuart: disable the CTS when send break signal tools/iio/iio_utils:fix memory leak iio: accel: mma9551_core: Prevent uninitialized variable in mma9551_read_status_word() iio: accel: mma9551_core: Prevent uninitialized variable in mma9551_read_config_word() usb: host: xhci: mvebu: Iterate over array indexes instead of using pointer math USB: ene_usb6250: Allocate enough memory for full object usb: uvc: Enumerate valid values for color matching phy: rockchip-typec: Fix unsigned comparison with less than zero Bluetooth: hci_sock: purge socket queues in the destruct() callback s390/maccess: add no DAT mode to kernel_write s390/setup: init jump labels before command line parsing tcp: Fix listen() regression in 4.14.303. thermal: intel: powerclamp: Fix cur_state for multi package system Linux 4.14.308 Change-Id: Iad2a41de33ff004df8050f949aa00955604b4cf6 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
commit
dcf8e96bea
@ -479,8 +479,16 @@ Spectre variant 2
|
||||
On Intel Skylake-era systems the mitigation covers most, but not all,
|
||||
cases. See :ref:`[3] <spec_ref3>` for more details.
|
||||
|
||||
On CPUs with hardware mitigation for Spectre variant 2 (e.g. Enhanced
|
||||
IBRS on x86), retpoline is automatically disabled at run time.
|
||||
On CPUs with hardware mitigation for Spectre variant 2 (e.g. IBRS
|
||||
or enhanced IBRS on x86), retpoline is automatically disabled at run time.
|
||||
|
||||
Systems which support enhanced IBRS (eIBRS) enable IBRS protection once at
|
||||
boot, by setting the IBRS bit, and they're automatically protected against
|
||||
Spectre v2 variant attacks, including cross-thread branch target injections
|
||||
on SMT systems (STIBP). In other words, eIBRS enables STIBP too.
|
||||
|
||||
Legacy IBRS systems clear the IBRS bit on exit to userspace and
|
||||
therefore explicitly enable STIBP for that
|
||||
|
||||
The retpoline mitigation is turned on by default on vulnerable
|
||||
CPUs. It can be forced on or off by the administrator
|
||||
@ -504,9 +512,12 @@ Spectre variant 2
|
||||
For Spectre variant 2 mitigation, individual user programs
|
||||
can be compiled with return trampolines for indirect branches.
|
||||
This protects them from consuming poisoned entries in the branch
|
||||
target buffer left by malicious software. Alternatively, the
|
||||
programs can disable their indirect branch speculation via prctl()
|
||||
(See :ref:`Documentation/userspace-api/spec_ctrl.rst <set_spec_ctrl>`).
|
||||
target buffer left by malicious software.
|
||||
|
||||
On legacy IBRS systems, at return to userspace, implicit STIBP is disabled
|
||||
because the kernel clears the IBRS bit. In this case, the userspace programs
|
||||
can disable indirect branch speculation via prctl() (See
|
||||
:ref:`Documentation/userspace-api/spec_ctrl.rst <set_spec_ctrl>`).
|
||||
On x86, this will turn on STIBP to guard against attacks from the
|
||||
sibling thread when the user program is running, and use IBPB to
|
||||
flush the branch target buffer when switching to/from the program.
|
||||
|
@ -39,6 +39,10 @@ Setup
|
||||
this mode. In this case, you should build the kernel with
|
||||
CONFIG_RANDOMIZE_BASE disabled if the architecture supports KASLR.
|
||||
|
||||
- Build the gdb scripts (required on kernels v5.1 and above)::
|
||||
|
||||
make scripts_gdb
|
||||
|
||||
- Enable the gdb stub of QEMU/KVM, either
|
||||
|
||||
- at VM startup time by appending "-s" to the QEMU command line
|
||||
|
15
Makefile
15
Makefile
@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 4
|
||||
PATCHLEVEL = 14
|
||||
SUBLEVEL = 307
|
||||
SUBLEVEL = 308
|
||||
EXTRAVERSION =
|
||||
NAME = Petit Gorille
|
||||
|
||||
@ -88,10 +88,17 @@ endif
|
||||
|
||||
# If the user is running make -s (silent mode), suppress echoing of
|
||||
# commands
|
||||
# make-4.0 (and later) keep single letter options in the 1st word of MAKEFLAGS.
|
||||
|
||||
ifneq ($(findstring s,$(filter-out --%,$(MAKEFLAGS))),)
|
||||
quiet=silent_
|
||||
tools_silent=s
|
||||
ifeq ($(filter 3.%,$(MAKE_VERSION)),)
|
||||
silence:=$(findstring s,$(firstword -$(MAKEFLAGS)))
|
||||
else
|
||||
silence:=$(findstring s,$(filter-out --%,$(MAKEFLAGS)))
|
||||
endif
|
||||
|
||||
ifeq ($(silence),s)
|
||||
quiet=silent_
|
||||
tools_silent=s
|
||||
endif
|
||||
|
||||
export quiet Q KBUILD_VERBOSE
|
||||
|
@ -241,7 +241,21 @@ do_entIF(unsigned long type, struct pt_regs *regs)
|
||||
siginfo_t info;
|
||||
int signo, code;
|
||||
|
||||
if ((regs->ps & ~IPL_MAX) == 0) {
|
||||
if (type == 3) { /* FEN fault */
|
||||
/* Irritating users can call PAL_clrfen to disable the
|
||||
FPU for the process. The kernel will then trap in
|
||||
do_switch_stack and undo_switch_stack when we try
|
||||
to save and restore the FP registers.
|
||||
|
||||
Given that GCC by default generates code that uses the
|
||||
FP registers, PAL_clrfen is not useful except for DoS
|
||||
attacks. So turn the bleeding FPU back on and be done
|
||||
with it. */
|
||||
current_thread_info()->pcb.flags |= 1;
|
||||
__reload_thread(¤t_thread_info()->pcb);
|
||||
return;
|
||||
}
|
||||
if (!user_mode(regs)) {
|
||||
if (type == 1) {
|
||||
const unsigned int *data
|
||||
= (const unsigned int *) regs->pc;
|
||||
@ -390,20 +404,6 @@ do_entIF(unsigned long type, struct pt_regs *regs)
|
||||
}
|
||||
break;
|
||||
|
||||
case 3: /* FEN fault */
|
||||
/* Irritating users can call PAL_clrfen to disable the
|
||||
FPU for the process. The kernel will then trap in
|
||||
do_switch_stack and undo_switch_stack when we try
|
||||
to save and restore the FP registers.
|
||||
|
||||
Given that GCC by default generates code that uses the
|
||||
FP registers, PAL_clrfen is not useful except for DoS
|
||||
attacks. So turn the bleeding FPU back on and be done
|
||||
with it. */
|
||||
current_thread_info()->pcb.flags |= 1;
|
||||
__reload_thread(¤t_thread_info()->pcb);
|
||||
return;
|
||||
|
||||
case 5: /* illoc */
|
||||
default: /* unexpected instruction-fault type */
|
||||
;
|
||||
|
@ -258,7 +258,7 @@
|
||||
i80-if-timings {
|
||||
cs-setup = <0>;
|
||||
wr-setup = <0>;
|
||||
wr-act = <1>;
|
||||
wr-active = <1>;
|
||||
wr-hold = <0>;
|
||||
};
|
||||
};
|
||||
|
@ -14,7 +14,7 @@
|
||||
/ {
|
||||
thermal-zones {
|
||||
cpu_thermal: cpu-thermal {
|
||||
thermal-sensors = <&tmu 0>;
|
||||
thermal-sensors = <&tmu>;
|
||||
polling-delay-passive = <0>;
|
||||
polling-delay = <0>;
|
||||
trips {
|
||||
|
@ -116,7 +116,6 @@
|
||||
};
|
||||
|
||||
&cpu0_thermal {
|
||||
thermal-sensors = <&tmu_cpu0 0>;
|
||||
polling-delay-passive = <0>;
|
||||
polling-delay = <0>;
|
||||
|
||||
|
@ -536,7 +536,7 @@
|
||||
};
|
||||
|
||||
mipi_phy: mipi-video-phy {
|
||||
compatible = "samsung,s5pv210-mipi-video-phy";
|
||||
compatible = "samsung,exynos5420-mipi-video-phy";
|
||||
syscon = <&pmu_system_controller>;
|
||||
#phy-cells = <1>;
|
||||
};
|
||||
|
@ -1096,6 +1096,7 @@
|
||||
clock-names = "dp", "pclk";
|
||||
phys = <&edp_phy>;
|
||||
phy-names = "dp";
|
||||
power-domains = <&power RK3288_PD_VIO>;
|
||||
resets = <&cru SRST_EDP>;
|
||||
reset-names = "dp";
|
||||
rockchip,grf = <&grf>;
|
||||
|
@ -248,7 +248,7 @@
|
||||
irq-trigger = <0x1>;
|
||||
|
||||
stmpegpio: stmpe-gpio {
|
||||
compatible = "stmpe,gpio";
|
||||
compatible = "st,stmpe-gpio";
|
||||
reg = <0>;
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
|
@ -165,7 +165,7 @@ err_free_pdata:
|
||||
kfree(pdata);
|
||||
|
||||
err_free_pdev:
|
||||
platform_device_unregister(pdev);
|
||||
platform_device_put(pdev);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -562,6 +562,7 @@ static void __init realtime_counter_init(void)
|
||||
}
|
||||
|
||||
rate = clk_get_rate(sys_clk);
|
||||
clk_put(sys_clk);
|
||||
|
||||
if (soc_is_dra7xx()) {
|
||||
/*
|
||||
|
@ -222,6 +222,7 @@ int __init zynq_early_slcr_init(void)
|
||||
zynq_slcr_regmap = syscon_regmap_lookup_by_compatible("xlnx,zynq-slcr");
|
||||
if (IS_ERR(zynq_slcr_regmap)) {
|
||||
pr_err("%s: failed to find zynq-slcr\n", __func__);
|
||||
of_node_put(np);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
|
@ -174,7 +174,7 @@
|
||||
reg = <0x14 0x10>;
|
||||
};
|
||||
|
||||
eth_mac: eth_mac@34 {
|
||||
eth_mac: eth-mac@34 {
|
||||
reg = <0x34 0x10>;
|
||||
};
|
||||
|
||||
@ -191,7 +191,7 @@
|
||||
scpi_clocks: clocks {
|
||||
compatible = "arm,scpi-clocks";
|
||||
|
||||
scpi_dvfs: scpi_clocks@0 {
|
||||
scpi_dvfs: clocks-0 {
|
||||
compatible = "arm,scpi-dvfs-clocks";
|
||||
#clock-cells = <1>;
|
||||
clock-indices = <0>;
|
||||
@ -435,7 +435,7 @@
|
||||
#size-cells = <2>;
|
||||
ranges = <0x0 0x0 0x0 0xc8834000 0x0 0x2000>;
|
||||
|
||||
hwrng: rng {
|
||||
hwrng: rng@0 {
|
||||
compatible = "amlogic,meson-rng";
|
||||
reg = <0x0 0x0 0x0 0x4>;
|
||||
};
|
||||
|
@ -609,7 +609,7 @@
|
||||
};
|
||||
};
|
||||
|
||||
eth-phy-mux {
|
||||
eth-phy-mux@55c {
|
||||
compatible = "mdio-mux-mmioreg", "mdio-mux";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
@ -47,6 +47,8 @@ do_trace:
|
||||
jbsr syscall_trace_enter
|
||||
RESTORE_SWITCH_STACK
|
||||
addql #4,%sp
|
||||
addql #1,%d0
|
||||
jeq ret_from_exception
|
||||
movel %sp@(PT_OFF_ORIG_D0),%d1
|
||||
movel #-ENOSYS,%d0
|
||||
cmpl #NR_syscalls,%d1
|
||||
|
@ -19,6 +19,7 @@ config HEARTBEAT
|
||||
# We have a dedicated heartbeat LED. :-)
|
||||
config PROC_HARDWARE
|
||||
bool "/proc/hardware support"
|
||||
depends on PROC_FS
|
||||
help
|
||||
Say Y here to support the /proc/hardware file, which gives you
|
||||
access to information about the machine you're running on,
|
||||
|
@ -92,6 +92,8 @@ ENTRY(system_call)
|
||||
jbsr syscall_trace_enter
|
||||
RESTORE_SWITCH_STACK
|
||||
addql #4,%sp
|
||||
addql #1,%d0
|
||||
jeq ret_from_exception
|
||||
movel %d3,%a0
|
||||
jbsr %a0@
|
||||
movel %d0,%sp@(PT_OFF_D0) /* save the return value */
|
||||
|
@ -160,9 +160,12 @@ do_trace_entry:
|
||||
jbsr syscall_trace
|
||||
RESTORE_SWITCH_STACK
|
||||
addql #4,%sp
|
||||
addql #1,%d0 | optimization for cmpil #-1,%d0
|
||||
jeq ret_from_syscall
|
||||
movel %sp@(PT_OFF_ORIG_D0),%d0
|
||||
cmpl #NR_syscalls,%d0
|
||||
jcs syscall
|
||||
jra ret_from_syscall
|
||||
badsys:
|
||||
movel #-ENOSYS,%sp@(PT_OFF_D0)
|
||||
jra ret_from_syscall
|
||||
|
@ -29,7 +29,7 @@
|
||||
static inline long syscall_get_nr(struct task_struct *task,
|
||||
struct pt_regs *regs)
|
||||
{
|
||||
return current_thread_info()->syscall;
|
||||
return task_thread_info(task)->syscall;
|
||||
}
|
||||
|
||||
static inline unsigned long mips_get_syscall_arg(unsigned long *arg,
|
||||
|
@ -104,7 +104,6 @@ struct vpe_control {
|
||||
struct list_head tc_list; /* Thread contexts */
|
||||
};
|
||||
|
||||
extern unsigned long physical_memsize;
|
||||
extern struct vpe_control vpecontrol;
|
||||
extern const struct file_operations vpe_fops;
|
||||
|
||||
|
@ -92,12 +92,11 @@ int vpe_run(struct vpe *v)
|
||||
write_tc_c0_tchalt(read_tc_c0_tchalt() & ~TCHALT_H);
|
||||
|
||||
/*
|
||||
* The sde-kit passes 'memsize' to __start in $a3, so set something
|
||||
* here... Or set $a3 to zero and define DFLT_STACK_SIZE and
|
||||
* DFLT_HEAP_SIZE when you compile your program
|
||||
* We don't pass the memsize here, so VPE programs need to be
|
||||
* compiled with DFLT_STACK_SIZE and DFLT_HEAP_SIZE defined.
|
||||
*/
|
||||
mttgpr(7, 0);
|
||||
mttgpr(6, v->ntcs);
|
||||
mttgpr(7, physical_memsize);
|
||||
|
||||
/* set up VPE1 */
|
||||
/*
|
||||
|
@ -25,12 +25,6 @@
|
||||
DEFINE_SPINLOCK(ebu_lock);
|
||||
EXPORT_SYMBOL_GPL(ebu_lock);
|
||||
|
||||
/*
|
||||
* This is needed by the VPE loader code, just set it to 0 and assume
|
||||
* that the firmware hardcodes this value to something useful.
|
||||
*/
|
||||
unsigned long physical_memsize = 0L;
|
||||
|
||||
/*
|
||||
* this struct is filled by the soc specific detection code and holds
|
||||
* information about the specific soc type, revision and name
|
||||
|
@ -3155,7 +3155,8 @@ static void pnv_ioda_setup_pe_res(struct pnv_ioda_pe *pe,
|
||||
int index;
|
||||
int64_t rc;
|
||||
|
||||
if (!res || !res->flags || res->start > res->end)
|
||||
if (!res || !res->flags || res->start > res->end ||
|
||||
res->flags & IORESOURCE_UNSET)
|
||||
return;
|
||||
|
||||
if (res->flags & IORESOURCE_IO) {
|
||||
|
@ -289,6 +289,7 @@ static void parse_mpp_x_data(struct seq_file *m)
|
||||
*/
|
||||
static void parse_system_parameter_string(struct seq_file *m)
|
||||
{
|
||||
const s32 token = rtas_token("ibm,get-system-parameter");
|
||||
int call_status;
|
||||
|
||||
unsigned char *local_buffer = kmalloc(SPLPAR_MAXLENGTH, GFP_KERNEL);
|
||||
@ -298,16 +299,15 @@ static void parse_system_parameter_string(struct seq_file *m)
|
||||
return;
|
||||
}
|
||||
|
||||
spin_lock(&rtas_data_buf_lock);
|
||||
memset(rtas_data_buf, 0, SPLPAR_MAXLENGTH);
|
||||
call_status = rtas_call(rtas_token("ibm,get-system-parameter"), 3, 1,
|
||||
NULL,
|
||||
SPLPAR_CHARACTERISTICS_TOKEN,
|
||||
__pa(rtas_data_buf),
|
||||
RTAS_DATA_BUF_SIZE);
|
||||
memcpy(local_buffer, rtas_data_buf, SPLPAR_MAXLENGTH);
|
||||
local_buffer[SPLPAR_MAXLENGTH - 1] = '\0';
|
||||
spin_unlock(&rtas_data_buf_lock);
|
||||
do {
|
||||
spin_lock(&rtas_data_buf_lock);
|
||||
memset(rtas_data_buf, 0, SPLPAR_MAXLENGTH);
|
||||
call_status = rtas_call(token, 3, 1, NULL, SPLPAR_CHARACTERISTICS_TOKEN,
|
||||
__pa(rtas_data_buf), RTAS_DATA_BUF_SIZE);
|
||||
memcpy(local_buffer, rtas_data_buf, SPLPAR_MAXLENGTH);
|
||||
local_buffer[SPLPAR_MAXLENGTH - 1] = '\0';
|
||||
spin_unlock(&rtas_data_buf_lock);
|
||||
} while (rtas_busy_delay(call_status));
|
||||
|
||||
if (call_status != 0) {
|
||||
printk(KERN_INFO
|
||||
|
@ -272,6 +272,7 @@ static void pop_kprobe(struct kprobe_ctlblk *kcb)
|
||||
{
|
||||
__this_cpu_write(current_kprobe, kcb->prev_kprobe.kp);
|
||||
kcb->kprobe_status = kcb->prev_kprobe.status;
|
||||
kcb->prev_kprobe.kp = NULL;
|
||||
}
|
||||
NOKPROBE_SYMBOL(pop_kprobe);
|
||||
|
||||
@ -546,12 +547,11 @@ static int post_kprobe_handler(struct pt_regs *regs)
|
||||
if (!p)
|
||||
return 0;
|
||||
|
||||
resume_execution(p, regs);
|
||||
if (kcb->kprobe_status != KPROBE_REENTER && p->post_handler) {
|
||||
kcb->kprobe_status = KPROBE_HIT_SSDONE;
|
||||
p->post_handler(p, regs, 0);
|
||||
}
|
||||
|
||||
resume_execution(p, regs);
|
||||
pop_kprobe(kcb);
|
||||
preempt_enable_no_resched();
|
||||
|
||||
|
@ -911,6 +911,7 @@ void __init setup_arch(char **cmdline_p)
|
||||
if (IS_ENABLED(CONFIG_EXPOLINE_AUTO))
|
||||
nospec_auto_detect();
|
||||
|
||||
jump_label_init();
|
||||
parse_early_param();
|
||||
#ifdef CONFIG_CRASH_DUMP
|
||||
/* Deactivate elfcorehdr= kernel parameter */
|
||||
|
@ -58,13 +58,19 @@ static notrace long s390_kernel_write_odd(void *dst, const void *src, size_t siz
|
||||
*/
|
||||
void notrace s390_kernel_write(void *dst, const void *src, size_t size)
|
||||
{
|
||||
unsigned long flags;
|
||||
long copied;
|
||||
|
||||
while (size) {
|
||||
copied = s390_kernel_write_odd(dst, src, size);
|
||||
dst += copied;
|
||||
src += copied;
|
||||
size -= copied;
|
||||
flags = arch_local_save_flags();
|
||||
if (!(flags & PSW_MASK_DAT)) {
|
||||
memcpy(dst, src, size);
|
||||
} else {
|
||||
while (size) {
|
||||
copied = s390_kernel_write_odd(dst, src, size);
|
||||
dst += copied;
|
||||
src += copied;
|
||||
size -= copied;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -144,7 +144,7 @@ static inline unsigned int x86_cpuid_family(void)
|
||||
int __init microcode_init(void);
|
||||
extern void __init load_ucode_bsp(void);
|
||||
extern void load_ucode_ap(void);
|
||||
void reload_early_microcode(void);
|
||||
void reload_early_microcode(unsigned int cpu);
|
||||
extern bool get_builtin_firmware(struct cpio_data *cd, const char *name);
|
||||
extern bool initrd_gone;
|
||||
void microcode_bsp_resume(void);
|
||||
@ -152,7 +152,7 @@ void microcode_bsp_resume(void);
|
||||
static inline int __init microcode_init(void) { return 0; };
|
||||
static inline void __init load_ucode_bsp(void) { }
|
||||
static inline void load_ucode_ap(void) { }
|
||||
static inline void reload_early_microcode(void) { }
|
||||
static inline void reload_early_microcode(unsigned int cpu) { }
|
||||
static inline void microcode_bsp_resume(void) { }
|
||||
static inline bool
|
||||
get_builtin_firmware(struct cpio_data *cd, const char *name) { return false; }
|
||||
|
@ -47,12 +47,12 @@ struct microcode_amd {
|
||||
extern void __init load_ucode_amd_bsp(unsigned int family);
|
||||
extern void load_ucode_amd_ap(unsigned int family);
|
||||
extern int __init save_microcode_in_initrd_amd(unsigned int family);
|
||||
void reload_ucode_amd(void);
|
||||
void reload_ucode_amd(unsigned int cpu);
|
||||
#else
|
||||
static inline void __init load_ucode_amd_bsp(unsigned int family) {}
|
||||
static inline void load_ucode_amd_ap(unsigned int family) {}
|
||||
static inline int __init
|
||||
save_microcode_in_initrd_amd(unsigned int family) { return -EINVAL; }
|
||||
void reload_ucode_amd(void) {}
|
||||
static inline void reload_ucode_amd(unsigned int cpu) {}
|
||||
#endif
|
||||
#endif /* _ASM_X86_MICROCODE_AMD_H */
|
||||
|
@ -50,6 +50,10 @@
|
||||
#define SPEC_CTRL_RRSBA_DIS_S_SHIFT 6 /* Disable RRSBA behavior */
|
||||
#define SPEC_CTRL_RRSBA_DIS_S BIT(SPEC_CTRL_RRSBA_DIS_S_SHIFT)
|
||||
|
||||
/* A mask for bits which the kernel toggles when controlling mitigations */
|
||||
#define SPEC_CTRL_MITIGATIONS_MASK (SPEC_CTRL_IBRS | SPEC_CTRL_STIBP | SPEC_CTRL_SSBD \
|
||||
| SPEC_CTRL_RRSBA_DIS_S)
|
||||
|
||||
#define MSR_IA32_PRED_CMD 0x00000049 /* Prediction Command */
|
||||
#define PRED_CMD_IBPB BIT(0) /* Indirect Branch Prediction Barrier */
|
||||
|
||||
|
@ -25,6 +25,8 @@ void __noreturn machine_real_restart(unsigned int type);
|
||||
#define MRR_BIOS 0
|
||||
#define MRR_APM 1
|
||||
|
||||
void cpu_emergency_disable_virtualization(void);
|
||||
|
||||
typedef void (*nmi_shootdown_cb)(int, struct pt_regs*);
|
||||
void nmi_shootdown_cpus(nmi_shootdown_cb callback);
|
||||
void run_crash_ipi_callback(struct pt_regs *regs);
|
||||
|
@ -114,7 +114,21 @@ static inline void cpu_svm_disable(void)
|
||||
|
||||
wrmsrl(MSR_VM_HSAVE_PA, 0);
|
||||
rdmsrl(MSR_EFER, efer);
|
||||
wrmsrl(MSR_EFER, efer & ~EFER_SVME);
|
||||
if (efer & EFER_SVME) {
|
||||
/*
|
||||
* Force GIF=1 prior to disabling SVM to ensure INIT and NMI
|
||||
* aren't blocked, e.g. if a fatal error occurred between CLGI
|
||||
* and STGI. Note, STGI may #UD if SVM is disabled from NMI
|
||||
* context between reading EFER and executing STGI. In that
|
||||
* case, GIF must already be set, otherwise the NMI would have
|
||||
* been blocked, so just eat the fault.
|
||||
*/
|
||||
asm_volatile_goto("1: stgi\n\t"
|
||||
_ASM_EXTABLE(1b, %l[fault])
|
||||
::: "memory" : fault);
|
||||
fault:
|
||||
wrmsrl(MSR_EFER, efer & ~EFER_SVME);
|
||||
}
|
||||
}
|
||||
|
||||
/** Makes sure SVM is disabled, if it is supported on the CPU
|
||||
|
@ -135,9 +135,17 @@ void __init check_bugs(void)
|
||||
* have unknown values. AMD64_LS_CFG MSR is cached in the early AMD
|
||||
* init code as it is not enumerated and depends on the family.
|
||||
*/
|
||||
if (boot_cpu_has(X86_FEATURE_MSR_SPEC_CTRL))
|
||||
if (cpu_feature_enabled(X86_FEATURE_MSR_SPEC_CTRL)) {
|
||||
rdmsrl(MSR_IA32_SPEC_CTRL, x86_spec_ctrl_base);
|
||||
|
||||
/*
|
||||
* Previously running kernel (kexec), may have some controls
|
||||
* turned ON. Clear them and let the mitigations setup below
|
||||
* rediscover them based on configuration.
|
||||
*/
|
||||
x86_spec_ctrl_base &= ~SPEC_CTRL_MITIGATIONS_MASK;
|
||||
}
|
||||
|
||||
/* Select the proper CPU mitigations before patching alternatives: */
|
||||
spectre_v1_select_mitigation();
|
||||
spectre_v2_select_mitigation();
|
||||
@ -973,14 +981,18 @@ spectre_v2_parse_user_cmdline(void)
|
||||
return SPECTRE_V2_USER_CMD_AUTO;
|
||||
}
|
||||
|
||||
static inline bool spectre_v2_in_ibrs_mode(enum spectre_v2_mitigation mode)
|
||||
static inline bool spectre_v2_in_eibrs_mode(enum spectre_v2_mitigation mode)
|
||||
{
|
||||
return mode == SPECTRE_V2_IBRS ||
|
||||
mode == SPECTRE_V2_EIBRS ||
|
||||
return mode == SPECTRE_V2_EIBRS ||
|
||||
mode == SPECTRE_V2_EIBRS_RETPOLINE ||
|
||||
mode == SPECTRE_V2_EIBRS_LFENCE;
|
||||
}
|
||||
|
||||
static inline bool spectre_v2_in_ibrs_mode(enum spectre_v2_mitigation mode)
|
||||
{
|
||||
return spectre_v2_in_eibrs_mode(mode) || mode == SPECTRE_V2_IBRS;
|
||||
}
|
||||
|
||||
static void __init
|
||||
spectre_v2_user_select_mitigation(void)
|
||||
{
|
||||
@ -1043,12 +1055,19 @@ spectre_v2_user_select_mitigation(void)
|
||||
}
|
||||
|
||||
/*
|
||||
* If no STIBP, IBRS or enhanced IBRS is enabled, or SMT impossible,
|
||||
* STIBP is not required.
|
||||
* If no STIBP, enhanced IBRS is enabled, or SMT impossible, STIBP
|
||||
* is not required.
|
||||
*
|
||||
* Enhanced IBRS also protects against cross-thread branch target
|
||||
* injection in user-mode as the IBRS bit remains always set which
|
||||
* implicitly enables cross-thread protections. However, in legacy IBRS
|
||||
* mode, the IBRS bit is set only on kernel entry and cleared on return
|
||||
* to userspace. This disables the implicit cross-thread protection,
|
||||
* so allow for STIBP to be selected in that case.
|
||||
*/
|
||||
if (!boot_cpu_has(X86_FEATURE_STIBP) ||
|
||||
!smt_possible ||
|
||||
spectre_v2_in_ibrs_mode(spectre_v2_enabled))
|
||||
spectre_v2_in_eibrs_mode(spectre_v2_enabled))
|
||||
return;
|
||||
|
||||
/*
|
||||
@ -2100,7 +2119,7 @@ static ssize_t mmio_stale_data_show_state(char *buf)
|
||||
|
||||
static char *stibp_state(void)
|
||||
{
|
||||
if (spectre_v2_in_ibrs_mode(spectre_v2_enabled))
|
||||
if (spectre_v2_in_eibrs_mode(spectre_v2_enabled))
|
||||
return "";
|
||||
|
||||
switch (spectre_v2_user_stibp) {
|
||||
|
@ -54,7 +54,9 @@ struct cont_desc {
|
||||
};
|
||||
|
||||
static u32 ucode_new_rev;
|
||||
static u8 amd_ucode_patch[PATCH_MAX_SIZE];
|
||||
|
||||
/* One blob per node. */
|
||||
static u8 amd_ucode_patch[MAX_NUMNODES][PATCH_MAX_SIZE];
|
||||
|
||||
/*
|
||||
* Microcode patch container file is prepended to the initrd in cpio
|
||||
@ -210,7 +212,7 @@ apply_microcode_early_amd(u32 cpuid_1_eax, void *ucode, size_t size, bool save_p
|
||||
patch = (u8 (*)[PATCH_MAX_SIZE])__pa_nodebug(&amd_ucode_patch);
|
||||
#else
|
||||
new_rev = &ucode_new_rev;
|
||||
patch = &amd_ucode_patch;
|
||||
patch = &amd_ucode_patch[0];
|
||||
#endif
|
||||
|
||||
desc.cpuid_1_eax = cpuid_1_eax;
|
||||
@ -329,8 +331,7 @@ void load_ucode_amd_ap(unsigned int cpuid_1_eax)
|
||||
apply_microcode_early_amd(cpuid_1_eax, cp.data, cp.size, false);
|
||||
}
|
||||
|
||||
static enum ucode_state
|
||||
load_microcode_amd(bool save, u8 family, const u8 *data, size_t size);
|
||||
static enum ucode_state load_microcode_amd(u8 family, const u8 *data, size_t size);
|
||||
|
||||
int __init save_microcode_in_initrd_amd(unsigned int cpuid_1_eax)
|
||||
{
|
||||
@ -348,19 +349,19 @@ int __init save_microcode_in_initrd_amd(unsigned int cpuid_1_eax)
|
||||
if (!desc.mc)
|
||||
return -EINVAL;
|
||||
|
||||
ret = load_microcode_amd(true, x86_family(cpuid_1_eax), desc.data, desc.size);
|
||||
ret = load_microcode_amd(x86_family(cpuid_1_eax), desc.data, desc.size);
|
||||
if (ret > UCODE_UPDATED)
|
||||
return -EINVAL;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void reload_ucode_amd(void)
|
||||
void reload_ucode_amd(unsigned int cpu)
|
||||
{
|
||||
struct microcode_amd *mc;
|
||||
u32 rev, dummy;
|
||||
struct microcode_amd *mc;
|
||||
|
||||
mc = (struct microcode_amd *)amd_ucode_patch;
|
||||
mc = (struct microcode_amd *)amd_ucode_patch[cpu_to_node(cpu)];
|
||||
|
||||
rdmsr(MSR_AMD64_PATCH_LEVEL, rev, dummy);
|
||||
|
||||
@ -698,9 +699,10 @@ static enum ucode_state __load_microcode_amd(u8 family, const u8 *data,
|
||||
return UCODE_OK;
|
||||
}
|
||||
|
||||
static enum ucode_state
|
||||
load_microcode_amd(bool save, u8 family, const u8 *data, size_t size)
|
||||
static enum ucode_state load_microcode_amd(u8 family, const u8 *data, size_t size)
|
||||
{
|
||||
struct cpuinfo_x86 *c;
|
||||
unsigned int nid, cpu;
|
||||
struct ucode_patch *p;
|
||||
enum ucode_state ret;
|
||||
|
||||
@ -713,23 +715,23 @@ load_microcode_amd(bool save, u8 family, const u8 *data, size_t size)
|
||||
return ret;
|
||||
}
|
||||
|
||||
p = find_patch(0);
|
||||
if (!p) {
|
||||
return ret;
|
||||
} else {
|
||||
if (boot_cpu_data.microcode >= p->patch_id)
|
||||
return ret;
|
||||
for_each_node(nid) {
|
||||
cpu = cpumask_first(cpumask_of_node(nid));
|
||||
c = &cpu_data(cpu);
|
||||
|
||||
p = find_patch(cpu);
|
||||
if (!p)
|
||||
continue;
|
||||
|
||||
if (c->microcode >= p->patch_id)
|
||||
continue;
|
||||
|
||||
ret = UCODE_NEW;
|
||||
|
||||
memset(&amd_ucode_patch[nid], 0, PATCH_MAX_SIZE);
|
||||
memcpy(&amd_ucode_patch[nid], p->data, min_t(u32, ksize(p->data), PATCH_MAX_SIZE));
|
||||
}
|
||||
|
||||
/* save BSP's matching patch for early load */
|
||||
if (!save)
|
||||
return ret;
|
||||
|
||||
memset(amd_ucode_patch, 0, PATCH_MAX_SIZE);
|
||||
memcpy(amd_ucode_patch, p->data, min_t(u32, ksize(p->data), PATCH_MAX_SIZE));
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -754,12 +756,11 @@ static enum ucode_state request_microcode_amd(int cpu, struct device *device,
|
||||
{
|
||||
char fw_name[36] = "amd-ucode/microcode_amd.bin";
|
||||
struct cpuinfo_x86 *c = &cpu_data(cpu);
|
||||
bool bsp = c->cpu_index == boot_cpu_data.cpu_index;
|
||||
enum ucode_state ret = UCODE_NFOUND;
|
||||
const struct firmware *fw;
|
||||
|
||||
/* reload ucode container only on the boot cpu */
|
||||
if (!refresh_fw || !bsp)
|
||||
if (!refresh_fw)
|
||||
return UCODE_OK;
|
||||
|
||||
if (c->x86 >= 0x15)
|
||||
@ -776,7 +777,7 @@ static enum ucode_state request_microcode_amd(int cpu, struct device *device,
|
||||
goto fw_release;
|
||||
}
|
||||
|
||||
ret = load_microcode_amd(bsp, c->x86, fw->data, fw->size);
|
||||
ret = load_microcode_amd(c->x86, fw->data, fw->size);
|
||||
|
||||
fw_release:
|
||||
release_firmware(fw);
|
||||
|
@ -326,7 +326,7 @@ struct cpio_data find_microcode_in_initrd(const char *path, bool use_pa)
|
||||
#endif
|
||||
}
|
||||
|
||||
void reload_early_microcode(void)
|
||||
void reload_early_microcode(unsigned int cpu)
|
||||
{
|
||||
int vendor, family;
|
||||
|
||||
@ -340,7 +340,7 @@ void reload_early_microcode(void)
|
||||
break;
|
||||
case X86_VENDOR_AMD:
|
||||
if (family >= 0x10)
|
||||
reload_ucode_amd();
|
||||
reload_ucode_amd(cpu);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@ -783,7 +783,7 @@ void microcode_bsp_resume(void)
|
||||
if (uci->valid && uci->mc)
|
||||
microcode_ops->apply_microcode(cpu);
|
||||
else if (!uci->mc)
|
||||
reload_early_microcode();
|
||||
reload_early_microcode(cpu);
|
||||
}
|
||||
|
||||
static struct syscore_ops mc_syscore_ops = {
|
||||
|
@ -36,7 +36,6 @@
|
||||
#include <linux/kdebug.h>
|
||||
#include <asm/cpu.h>
|
||||
#include <asm/reboot.h>
|
||||
#include <asm/virtext.h>
|
||||
#include <asm/intel_pt.h>
|
||||
|
||||
/* Alignment required for elf header segment */
|
||||
@ -118,15 +117,6 @@ static void kdump_nmi_callback(int cpu, struct pt_regs *regs)
|
||||
*/
|
||||
cpu_crash_vmclear_loaded_vmcss();
|
||||
|
||||
/* Disable VMX or SVM if needed.
|
||||
*
|
||||
* We need to disable virtualization on all CPUs.
|
||||
* Having VMX or SVM enabled on any CPU may break rebooting
|
||||
* after the kdump kernel has finished its task.
|
||||
*/
|
||||
cpu_emergency_vmxoff();
|
||||
cpu_emergency_svm_disable();
|
||||
|
||||
/*
|
||||
* Disable Intel PT to stop its logging
|
||||
*/
|
||||
@ -185,12 +175,7 @@ void native_machine_crash_shutdown(struct pt_regs *regs)
|
||||
*/
|
||||
cpu_crash_vmclear_loaded_vmcss();
|
||||
|
||||
/* Booting kdump kernel with VMX or SVM enabled won't work,
|
||||
* because (among other limitations) we can't disable paging
|
||||
* with the virt flags.
|
||||
*/
|
||||
cpu_emergency_vmxoff();
|
||||
cpu_emergency_svm_disable();
|
||||
cpu_emergency_disable_virtualization();
|
||||
|
||||
/*
|
||||
* Disable Intel PT to stop its logging
|
||||
|
@ -56,8 +56,8 @@ unsigned long __recover_optprobed_insn(kprobe_opcode_t *buf, unsigned long addr)
|
||||
/* This function only handles jump-optimized kprobe */
|
||||
if (kp && kprobe_optimized(kp)) {
|
||||
op = container_of(kp, struct optimized_kprobe, kp);
|
||||
/* If op->list is not empty, op is under optimizing */
|
||||
if (list_empty(&op->list))
|
||||
/* If op is optimized or under unoptimizing */
|
||||
if (list_empty(&op->list) || optprobe_queued_unopt(op))
|
||||
goto found;
|
||||
}
|
||||
}
|
||||
@ -330,7 +330,7 @@ int arch_check_optimized_kprobe(struct optimized_kprobe *op)
|
||||
|
||||
for (i = 1; i < op->optinsn.size; i++) {
|
||||
p = get_kprobe(op->kp.addr + i);
|
||||
if (p && !kprobe_disabled(p))
|
||||
if (p && !kprobe_disarmed(p))
|
||||
return -EEXIST;
|
||||
}
|
||||
|
||||
|
@ -536,33 +536,29 @@ static inline void kb_wait(void)
|
||||
}
|
||||
}
|
||||
|
||||
static void vmxoff_nmi(int cpu, struct pt_regs *regs)
|
||||
{
|
||||
cpu_emergency_vmxoff();
|
||||
}
|
||||
static inline void nmi_shootdown_cpus_on_restart(void);
|
||||
|
||||
/* Use NMIs as IPIs to tell all CPUs to disable virtualization */
|
||||
static void emergency_vmx_disable_all(void)
|
||||
static void emergency_reboot_disable_virtualization(void)
|
||||
{
|
||||
/* Just make sure we won't change CPUs while doing this */
|
||||
local_irq_disable();
|
||||
|
||||
/*
|
||||
* Disable VMX on all CPUs before rebooting, otherwise we risk hanging
|
||||
* the machine, because the CPU blocks INIT when it's in VMX root.
|
||||
* Disable virtualization on all CPUs before rebooting to avoid hanging
|
||||
* the system, as VMX and SVM block INIT when running in the host.
|
||||
*
|
||||
* We can't take any locks and we may be on an inconsistent state, so
|
||||
* use NMIs as IPIs to tell the other CPUs to exit VMX root and halt.
|
||||
* use NMIs as IPIs to tell the other CPUs to disable VMX/SVM and halt.
|
||||
*
|
||||
* Do the NMI shootdown even if VMX if off on _this_ CPU, as that
|
||||
* doesn't prevent a different CPU from being in VMX root operation.
|
||||
* Do the NMI shootdown even if virtualization is off on _this_ CPU, as
|
||||
* other CPUs may have virtualization enabled.
|
||||
*/
|
||||
if (cpu_has_vmx()) {
|
||||
/* Safely force _this_ CPU out of VMX root operation. */
|
||||
__cpu_emergency_vmxoff();
|
||||
if (cpu_has_vmx() || cpu_has_svm(NULL)) {
|
||||
/* Safely force _this_ CPU out of VMX/SVM operation. */
|
||||
cpu_emergency_disable_virtualization();
|
||||
|
||||
/* Halt and exit VMX root operation on the other CPUs. */
|
||||
nmi_shootdown_cpus(vmxoff_nmi);
|
||||
/* Disable VMX/SVM and halt on other CPUs. */
|
||||
nmi_shootdown_cpus_on_restart();
|
||||
|
||||
}
|
||||
}
|
||||
@ -599,7 +595,7 @@ static void native_machine_emergency_restart(void)
|
||||
unsigned short mode;
|
||||
|
||||
if (reboot_emergency)
|
||||
emergency_vmx_disable_all();
|
||||
emergency_reboot_disable_virtualization();
|
||||
|
||||
tboot_shutdown(TB_SHUTDOWN_REBOOT);
|
||||
|
||||
@ -803,6 +799,17 @@ void machine_crash_shutdown(struct pt_regs *regs)
|
||||
/* This is the CPU performing the emergency shutdown work. */
|
||||
int crashing_cpu = -1;
|
||||
|
||||
/*
|
||||
* Disable virtualization, i.e. VMX or SVM, to ensure INIT is recognized during
|
||||
* reboot. VMX blocks INIT if the CPU is post-VMXON, and SVM blocks INIT if
|
||||
* GIF=0, i.e. if the crash occurred between CLGI and STGI.
|
||||
*/
|
||||
void cpu_emergency_disable_virtualization(void)
|
||||
{
|
||||
cpu_emergency_vmxoff();
|
||||
cpu_emergency_svm_disable();
|
||||
}
|
||||
|
||||
#if defined(CONFIG_SMP)
|
||||
|
||||
static nmi_shootdown_cb shootdown_callback;
|
||||
@ -825,7 +832,14 @@ static int crash_nmi_callback(unsigned int val, struct pt_regs *regs)
|
||||
return NMI_HANDLED;
|
||||
local_irq_disable();
|
||||
|
||||
shootdown_callback(cpu, regs);
|
||||
if (shootdown_callback)
|
||||
shootdown_callback(cpu, regs);
|
||||
|
||||
/*
|
||||
* Prepare the CPU for reboot _after_ invoking the callback so that the
|
||||
* callback can safely use virtualization instructions, e.g. VMCLEAR.
|
||||
*/
|
||||
cpu_emergency_disable_virtualization();
|
||||
|
||||
atomic_dec(&waiting_for_crash_ipi);
|
||||
/* Assume hlt works */
|
||||
@ -841,18 +855,32 @@ static void smp_send_nmi_allbutself(void)
|
||||
apic->send_IPI_allbutself(NMI_VECTOR);
|
||||
}
|
||||
|
||||
/*
|
||||
* Halt all other CPUs, calling the specified function on each of them
|
||||
/**
|
||||
* nmi_shootdown_cpus - Stop other CPUs via NMI
|
||||
* @callback: Optional callback to be invoked from the NMI handler
|
||||
*
|
||||
* This function can be used to halt all other CPUs on crash
|
||||
* or emergency reboot time. The function passed as parameter
|
||||
* will be called inside a NMI handler on all CPUs.
|
||||
* The NMI handler on the remote CPUs invokes @callback, if not
|
||||
* NULL, first and then disables virtualization to ensure that
|
||||
* INIT is recognized during reboot.
|
||||
*
|
||||
* nmi_shootdown_cpus() can only be invoked once. After the first
|
||||
* invocation all other CPUs are stuck in crash_nmi_callback() and
|
||||
* cannot respond to a second NMI.
|
||||
*/
|
||||
void nmi_shootdown_cpus(nmi_shootdown_cb callback)
|
||||
{
|
||||
unsigned long msecs;
|
||||
|
||||
local_irq_disable();
|
||||
|
||||
/*
|
||||
* Avoid certain doom if a shootdown already occurred; re-registering
|
||||
* the NMI handler will cause list corruption, modifying the callback
|
||||
* will do who knows what, etc...
|
||||
*/
|
||||
if (WARN_ON_ONCE(crash_ipi_issued))
|
||||
return;
|
||||
|
||||
/* Make a note of crashing cpu. Will be used in NMI callback. */
|
||||
crashing_cpu = safe_smp_processor_id();
|
||||
|
||||
@ -880,7 +908,17 @@ void nmi_shootdown_cpus(nmi_shootdown_cb callback)
|
||||
msecs--;
|
||||
}
|
||||
|
||||
/* Leave the nmi callback set */
|
||||
/*
|
||||
* Leave the nmi callback set, shootdown is a one-time thing. Clearing
|
||||
* the callback could result in a NULL pointer dereference if a CPU
|
||||
* (finally) responds after the timeout expires.
|
||||
*/
|
||||
}
|
||||
|
||||
static inline void nmi_shootdown_cpus_on_restart(void)
|
||||
{
|
||||
if (!crash_ipi_issued)
|
||||
nmi_shootdown_cpus(NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -910,6 +948,8 @@ void nmi_shootdown_cpus(nmi_shootdown_cb callback)
|
||||
/* No other CPUs to shoot down */
|
||||
}
|
||||
|
||||
static inline void nmi_shootdown_cpus_on_restart(void) { }
|
||||
|
||||
void run_crash_ipi_callback(struct pt_regs *regs)
|
||||
{
|
||||
}
|
||||
|
@ -33,7 +33,7 @@
|
||||
#include <asm/mce.h>
|
||||
#include <asm/trace/irq_vectors.h>
|
||||
#include <asm/kexec.h>
|
||||
#include <asm/virtext.h>
|
||||
#include <asm/reboot.h>
|
||||
|
||||
/*
|
||||
* Some notes on x86 processor bugs affecting SMP operation:
|
||||
@ -163,7 +163,7 @@ static int smp_stop_nmi_callback(unsigned int val, struct pt_regs *regs)
|
||||
if (raw_smp_processor_id() == atomic_read(&stopping_cpu))
|
||||
return NMI_HANDLED;
|
||||
|
||||
cpu_emergency_vmxoff();
|
||||
cpu_emergency_disable_virtualization();
|
||||
stop_this_cpu(NULL);
|
||||
|
||||
return NMI_HANDLED;
|
||||
@ -176,7 +176,7 @@ static int smp_stop_nmi_callback(unsigned int val, struct pt_regs *regs)
|
||||
asmlinkage __visible void smp_reboot_interrupt(void)
|
||||
{
|
||||
ipi_entering_ack_irq();
|
||||
cpu_emergency_vmxoff();
|
||||
cpu_emergency_disable_virtualization();
|
||||
stop_this_cpu(NULL);
|
||||
irq_exit();
|
||||
}
|
||||
|
@ -265,6 +265,14 @@ static const struct dmi_system_id efifb_dmi_swap_width_height[] __initconst = {
|
||||
"Lenovo ideapad D330-10IGM"),
|
||||
},
|
||||
},
|
||||
{
|
||||
/* Lenovo IdeaPad Duet 3 10IGL5 with 1200x1920 portrait screen */
|
||||
.matches = {
|
||||
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
DMI_EXACT_MATCH(DMI_PRODUCT_VERSION,
|
||||
"IdeaPad Duet 3 10IGL5"),
|
||||
},
|
||||
},
|
||||
{},
|
||||
};
|
||||
|
||||
|
@ -20,8 +20,10 @@ int __vdso_clock_gettime(clockid_t clock, struct timespec *ts)
|
||||
{
|
||||
long ret;
|
||||
|
||||
asm("syscall" : "=a" (ret) :
|
||||
"0" (__NR_clock_gettime), "D" (clock), "S" (ts) : "memory");
|
||||
asm("syscall"
|
||||
: "=a" (ret)
|
||||
: "0" (__NR_clock_gettime), "D" (clock), "S" (ts)
|
||||
: "rcx", "r11", "memory");
|
||||
|
||||
return ret;
|
||||
}
|
||||
@ -32,8 +34,10 @@ int __vdso_gettimeofday(struct timeval *tv, struct timezone *tz)
|
||||
{
|
||||
long ret;
|
||||
|
||||
asm("syscall" : "=a" (ret) :
|
||||
"0" (__NR_gettimeofday), "D" (tv), "S" (tz) : "memory");
|
||||
asm("syscall"
|
||||
: "=a" (ret)
|
||||
: "0" (__NR_gettimeofday), "D" (tv), "S" (tz)
|
||||
: "rcx", "r11", "memory");
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -462,6 +462,7 @@ int bio_integrity_clone(struct bio *bio, struct bio *bio_src,
|
||||
|
||||
bip->bip_vcnt = bip_src->bip_vcnt;
|
||||
bip->bip_iter = bip_src->bip_iter;
|
||||
bip->bip_flags = bip_src->bip_flags & ~BIP_BLOCK_INTEGRITY;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -216,16 +216,14 @@ static void pkcs1pad_encrypt_sign_complete_cb(
|
||||
struct crypto_async_request *child_async_req, int err)
|
||||
{
|
||||
struct akcipher_request *req = child_async_req->data;
|
||||
struct crypto_async_request async_req;
|
||||
|
||||
if (err == -EINPROGRESS)
|
||||
return;
|
||||
goto out;
|
||||
|
||||
async_req.data = req->base.data;
|
||||
async_req.tfm = crypto_akcipher_tfm(crypto_akcipher_reqtfm(req));
|
||||
async_req.flags = child_async_req->flags;
|
||||
req->base.complete(&async_req,
|
||||
pkcs1pad_encrypt_sign_complete(req, err));
|
||||
err = pkcs1pad_encrypt_sign_complete(req, err);
|
||||
|
||||
out:
|
||||
akcipher_request_complete(req, err);
|
||||
}
|
||||
|
||||
static int pkcs1pad_encrypt(struct akcipher_request *req)
|
||||
@ -336,15 +334,14 @@ static void pkcs1pad_decrypt_complete_cb(
|
||||
struct crypto_async_request *child_async_req, int err)
|
||||
{
|
||||
struct akcipher_request *req = child_async_req->data;
|
||||
struct crypto_async_request async_req;
|
||||
|
||||
if (err == -EINPROGRESS)
|
||||
return;
|
||||
goto out;
|
||||
|
||||
async_req.data = req->base.data;
|
||||
async_req.tfm = crypto_akcipher_tfm(crypto_akcipher_reqtfm(req));
|
||||
async_req.flags = child_async_req->flags;
|
||||
req->base.complete(&async_req, pkcs1pad_decrypt_complete(req, err));
|
||||
err = pkcs1pad_decrypt_complete(req, err);
|
||||
|
||||
out:
|
||||
akcipher_request_complete(req, err);
|
||||
}
|
||||
|
||||
static int pkcs1pad_decrypt(struct akcipher_request *req)
|
||||
@ -506,15 +503,14 @@ static void pkcs1pad_verify_complete_cb(
|
||||
struct crypto_async_request *child_async_req, int err)
|
||||
{
|
||||
struct akcipher_request *req = child_async_req->data;
|
||||
struct crypto_async_request async_req;
|
||||
|
||||
if (err == -EINPROGRESS)
|
||||
return;
|
||||
goto out;
|
||||
|
||||
async_req.data = req->base.data;
|
||||
async_req.tfm = crypto_akcipher_tfm(crypto_akcipher_reqtfm(req));
|
||||
async_req.flags = child_async_req->flags;
|
||||
req->base.complete(&async_req, pkcs1pad_verify_complete(req, err));
|
||||
err = pkcs1pad_verify_complete(req, err);
|
||||
|
||||
out:
|
||||
akcipher_request_complete(req, err);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -30,7 +30,7 @@ static void seqiv_aead_encrypt_complete2(struct aead_request *req, int err)
|
||||
struct aead_request *subreq = aead_request_ctx(req);
|
||||
struct crypto_aead *geniv;
|
||||
|
||||
if (err == -EINPROGRESS)
|
||||
if (err == -EINPROGRESS || err == -EBUSY)
|
||||
return;
|
||||
|
||||
if (err)
|
||||
|
@ -3,7 +3,7 @@
|
||||
# Makefile for ACPICA Core interpreter
|
||||
#
|
||||
|
||||
ccflags-y := -Os -D_LINUX -DBUILDING_ACPICA
|
||||
ccflags-y := -D_LINUX -DBUILDING_ACPICA
|
||||
ccflags-$(CONFIG_ACPI_DEBUG) += -DACPI_DEBUG_OUTPUT
|
||||
|
||||
# use acpi.o to put all files here into acpi.o modparam namespace
|
||||
|
@ -215,8 +215,9 @@ acpi_ns_simple_repair(struct acpi_evaluate_info *info,
|
||||
* Try to fix if there was no return object. Warning if failed to fix.
|
||||
*/
|
||||
if (!return_object) {
|
||||
if (expected_btypes && (!(expected_btypes & ACPI_RTYPE_NONE))) {
|
||||
if (package_index != ACPI_NOT_PACKAGE_ELEMENT) {
|
||||
if (expected_btypes) {
|
||||
if (!(expected_btypes & ACPI_RTYPE_NONE) &&
|
||||
package_index != ACPI_NOT_PACKAGE_ELEMENT) {
|
||||
ACPI_WARN_PREDEFINED((AE_INFO,
|
||||
info->full_pathname,
|
||||
ACPI_WARN_ALWAYS,
|
||||
@ -230,14 +231,15 @@ acpi_ns_simple_repair(struct acpi_evaluate_info *info,
|
||||
if (ACPI_SUCCESS(status)) {
|
||||
return (AE_OK); /* Repair was successful */
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
if (expected_btypes != ACPI_RTYPE_NONE) {
|
||||
ACPI_WARN_PREDEFINED((AE_INFO,
|
||||
info->full_pathname,
|
||||
ACPI_WARN_ALWAYS,
|
||||
"Missing expected return value"));
|
||||
return (AE_AML_NO_RETURN_VALUE);
|
||||
}
|
||||
|
||||
return (AE_AML_NO_RETURN_VALUE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -415,7 +415,7 @@ static int extract_package(struct acpi_battery *battery,
|
||||
u8 *ptr = (u8 *)battery + offsets[i].offset;
|
||||
if (element->type == ACPI_TYPE_STRING ||
|
||||
element->type == ACPI_TYPE_BUFFER)
|
||||
strncpy(ptr, element->string.pointer, 32);
|
||||
strscpy(ptr, element->string.pointer, 32);
|
||||
else if (element->type == ACPI_TYPE_INTEGER) {
|
||||
strncpy(ptr, (u8 *)&element->integer.value,
|
||||
sizeof(u64));
|
||||
|
@ -300,7 +300,7 @@ static const struct dmi_system_id video_detect_dmi_table[] = {
|
||||
.ident = "Lenovo Ideapad Z570",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "102434U"),
|
||||
DMI_MATCH(DMI_PRODUCT_VERSION, "Ideapad Z570"),
|
||||
},
|
||||
},
|
||||
{
|
||||
|
@ -4778,8 +4778,7 @@ static void rbd_dev_release(struct device *dev)
|
||||
module_put(THIS_MODULE);
|
||||
}
|
||||
|
||||
static struct rbd_device *__rbd_dev_create(struct rbd_client *rbdc,
|
||||
struct rbd_spec *spec)
|
||||
static struct rbd_device *__rbd_dev_create(struct rbd_spec *spec)
|
||||
{
|
||||
struct rbd_device *rbd_dev;
|
||||
|
||||
@ -4812,9 +4811,6 @@ static struct rbd_device *__rbd_dev_create(struct rbd_client *rbdc,
|
||||
rbd_dev->dev.parent = &rbd_root_dev;
|
||||
device_initialize(&rbd_dev->dev);
|
||||
|
||||
rbd_dev->rbd_client = rbdc;
|
||||
rbd_dev->spec = spec;
|
||||
|
||||
return rbd_dev;
|
||||
}
|
||||
|
||||
@ -4827,12 +4823,10 @@ static struct rbd_device *rbd_dev_create(struct rbd_client *rbdc,
|
||||
{
|
||||
struct rbd_device *rbd_dev;
|
||||
|
||||
rbd_dev = __rbd_dev_create(rbdc, spec);
|
||||
rbd_dev = __rbd_dev_create(spec);
|
||||
if (!rbd_dev)
|
||||
return NULL;
|
||||
|
||||
rbd_dev->opts = opts;
|
||||
|
||||
/* get an id and fill in device name */
|
||||
rbd_dev->dev_id = ida_simple_get(&rbd_dev_id_ida, 0,
|
||||
minor_to_rbd_dev_id(1 << MINORBITS),
|
||||
@ -4849,6 +4843,10 @@ static struct rbd_device *rbd_dev_create(struct rbd_client *rbdc,
|
||||
/* we have a ref from do_rbd_add() */
|
||||
__module_get(THIS_MODULE);
|
||||
|
||||
rbd_dev->rbd_client = rbdc;
|
||||
rbd_dev->spec = spec;
|
||||
rbd_dev->opts = opts;
|
||||
|
||||
dout("%s rbd_dev %p dev_id %d\n", __func__, rbd_dev, rbd_dev->dev_id);
|
||||
return rbd_dev;
|
||||
|
||||
@ -5934,7 +5932,7 @@ static int rbd_dev_probe_parent(struct rbd_device *rbd_dev, int depth)
|
||||
goto out_err;
|
||||
}
|
||||
|
||||
parent = __rbd_dev_create(rbd_dev->rbd_client, rbd_dev->parent_spec);
|
||||
parent = __rbd_dev_create(rbd_dev->parent_spec);
|
||||
if (!parent) {
|
||||
ret = -ENOMEM;
|
||||
goto out_err;
|
||||
@ -5944,8 +5942,8 @@ static int rbd_dev_probe_parent(struct rbd_device *rbd_dev, int depth)
|
||||
* Images related by parent/child relationships always share
|
||||
* rbd_client and spec/parent_spec, so bump their refcounts.
|
||||
*/
|
||||
__rbd_get_client(rbd_dev->rbd_client);
|
||||
rbd_spec_get(rbd_dev->parent_spec);
|
||||
parent->rbd_client = __rbd_get_client(rbd_dev->rbd_client);
|
||||
parent->spec = rbd_spec_get(rbd_dev->parent_spec);
|
||||
|
||||
ret = rbd_dev_image_probe(parent, depth);
|
||||
if (ret < 0)
|
||||
|
@ -138,12 +138,14 @@ static int __init davinci_cpufreq_probe(struct platform_device *pdev)
|
||||
|
||||
static int __exit davinci_cpufreq_remove(struct platform_device *pdev)
|
||||
{
|
||||
cpufreq_unregister_driver(&davinci_driver);
|
||||
|
||||
clk_put(cpufreq.armclk);
|
||||
|
||||
if (cpufreq.asyncclk)
|
||||
clk_put(cpufreq.asyncclk);
|
||||
|
||||
return cpufreq_unregister_driver(&davinci_driver);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct platform_driver davinci_cpufreq_driver = {
|
||||
|
@ -1766,7 +1766,10 @@ static int rcar_dmac_probe(struct platform_device *pdev)
|
||||
dmac->dev = &pdev->dev;
|
||||
platform_set_drvdata(pdev, dmac);
|
||||
dmac->dev->dma_parms = &dmac->parms;
|
||||
dma_set_max_seg_size(dmac->dev, RCAR_DMATCR_MASK);
|
||||
ret = dma_set_max_seg_size(dmac->dev, RCAR_DMATCR_MASK);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = dma_set_mask_and_coherent(dmac->dev, DMA_BIT_MASK(40));
|
||||
if (ret)
|
||||
return ret;
|
||||
|
@ -281,7 +281,7 @@ static int vf610_gpio_probe(struct platform_device *pdev)
|
||||
gc = &port->gc;
|
||||
gc->of_node = np;
|
||||
gc->parent = dev;
|
||||
gc->label = "vf610-gpio";
|
||||
gc->label = dev_name(dev);
|
||||
gc->ngpio = VF610_GPIO_PER_PORT;
|
||||
gc->base = of_alias_get_id(np, "gpio") * VF610_GPIO_PER_PORT;
|
||||
|
||||
|
@ -437,7 +437,11 @@ static int __init stdpxxxx_ge_b850v3_init(void)
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
return i2c_add_driver(&stdp2690_ge_b850v3_fw_driver);
|
||||
ret = i2c_add_driver(&stdp2690_ge_b850v3_fw_driver);
|
||||
if (ret)
|
||||
i2c_del_driver(&stdp4028_ge_b850v3_fw_driver);
|
||||
|
||||
return ret;
|
||||
}
|
||||
module_init(stdpxxxx_ge_b850v3_init);
|
||||
|
||||
|
@ -1091,6 +1091,58 @@ int mipi_dsi_dcs_get_display_brightness(struct mipi_dsi_device *dsi,
|
||||
}
|
||||
EXPORT_SYMBOL(mipi_dsi_dcs_get_display_brightness);
|
||||
|
||||
/**
|
||||
* mipi_dsi_dcs_set_display_brightness_large() - sets the 16-bit brightness value
|
||||
* of the display
|
||||
* @dsi: DSI peripheral device
|
||||
* @brightness: brightness value
|
||||
*
|
||||
* Return: 0 on success or a negative error code on failure.
|
||||
*/
|
||||
int mipi_dsi_dcs_set_display_brightness_large(struct mipi_dsi_device *dsi,
|
||||
u16 brightness)
|
||||
{
|
||||
u8 payload[2] = { brightness >> 8, brightness & 0xff };
|
||||
ssize_t err;
|
||||
|
||||
err = mipi_dsi_dcs_write(dsi, MIPI_DCS_SET_DISPLAY_BRIGHTNESS,
|
||||
payload, sizeof(payload));
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(mipi_dsi_dcs_set_display_brightness_large);
|
||||
|
||||
/**
|
||||
* mipi_dsi_dcs_get_display_brightness_large() - gets the current 16-bit
|
||||
* brightness value of the display
|
||||
* @dsi: DSI peripheral device
|
||||
* @brightness: brightness value
|
||||
*
|
||||
* Return: 0 on success or a negative error code on failure.
|
||||
*/
|
||||
int mipi_dsi_dcs_get_display_brightness_large(struct mipi_dsi_device *dsi,
|
||||
u16 *brightness)
|
||||
{
|
||||
u8 brightness_be[2];
|
||||
ssize_t err;
|
||||
|
||||
err = mipi_dsi_dcs_read(dsi, MIPI_DCS_GET_DISPLAY_BRIGHTNESS,
|
||||
brightness_be, sizeof(brightness_be));
|
||||
if (err <= 0) {
|
||||
if (err == 0)
|
||||
err = -ENODATA;
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
*brightness = (brightness_be[0] << 8) | brightness_be[1];
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(mipi_dsi_dcs_get_display_brightness_large);
|
||||
|
||||
static int mipi_dsi_drv_probe(struct device *dev)
|
||||
{
|
||||
struct mipi_dsi_driver *drv = to_mipi_dsi_driver(dev->driver);
|
||||
|
@ -148,8 +148,6 @@ static int mtk_drm_gem_object_mmap(struct drm_gem_object *obj,
|
||||
|
||||
ret = dma_mmap_attrs(priv->dma_dev, vma, mtk_gem->cookie,
|
||||
mtk_gem->dma_addr, obj->size, mtk_gem->dma_attrs);
|
||||
if (ret)
|
||||
drm_gem_vm_close(vma);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -1769,6 +1769,9 @@ int msm_dsi_host_init(struct msm_dsi *msm_dsi)
|
||||
|
||||
/* setup workqueue */
|
||||
msm_host->workqueue = alloc_ordered_workqueue("dsi_drm_work", 0);
|
||||
if (!msm_host->workqueue)
|
||||
return -ENOMEM;
|
||||
|
||||
INIT_WORK(&msm_host->err_work, dsi_err_worker);
|
||||
INIT_WORK(&msm_host->hpd_work, dsi_hpd_worker);
|
||||
|
||||
|
@ -246,6 +246,10 @@ static struct hdmi *msm_hdmi_init(struct platform_device *pdev)
|
||||
pm_runtime_enable(&pdev->dev);
|
||||
|
||||
hdmi->workq = alloc_ordered_workqueue("msm_hdmi", 0);
|
||||
if (!hdmi->workq) {
|
||||
ret = -ENOMEM;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
hdmi->i2c = msm_hdmi_i2c_init(hdmi);
|
||||
if (IS_ERR(hdmi->i2c)) {
|
||||
|
@ -7,6 +7,7 @@ config DRM_MXSFB
|
||||
tristate "i.MX23/i.MX28/i.MX6SX MXSFB LCD controller"
|
||||
depends on DRM && OF
|
||||
depends on COMMON_CLK
|
||||
depends on ARCH_MXS || ARCH_MXC || COMPILE_TEST
|
||||
select DRM_MXS
|
||||
select DRM_KMS_HELPER
|
||||
select DRM_KMS_CMA_HELPER
|
||||
|
@ -2188,11 +2188,12 @@ int radeon_atom_pick_dig_encoder(struct drm_encoder *encoder, int fe_idx)
|
||||
|
||||
/*
|
||||
* On DCE32 any encoder can drive any block so usually just use crtc id,
|
||||
* but Apple thinks different at least on iMac10,1, so there use linkb,
|
||||
* but Apple thinks different at least on iMac10,1 and iMac11,2, so there use linkb,
|
||||
* otherwise the internal eDP panel will stay dark.
|
||||
*/
|
||||
if (ASIC_IS_DCE32(rdev)) {
|
||||
if (dmi_match(DMI_PRODUCT_NAME, "iMac10,1"))
|
||||
if (dmi_match(DMI_PRODUCT_NAME, "iMac10,1") ||
|
||||
dmi_match(DMI_PRODUCT_NAME, "iMac11,2"))
|
||||
enc_idx = (dig->linkb) ? 1 : 0;
|
||||
else
|
||||
enc_idx = radeon_crtc->crtc_id;
|
||||
|
@ -1045,6 +1045,7 @@ void radeon_atombios_fini(struct radeon_device *rdev)
|
||||
{
|
||||
if (rdev->mode_info.atom_context) {
|
||||
kfree(rdev->mode_info.atom_context->scratch);
|
||||
kfree(rdev->mode_info.atom_context->iio);
|
||||
}
|
||||
kfree(rdev->mode_info.atom_context);
|
||||
rdev->mode_info.atom_context = NULL;
|
||||
|
@ -1234,6 +1234,7 @@ static int ipu_add_client_devices(struct ipu_soc *ipu, unsigned long ipu_base)
|
||||
pdev = platform_device_alloc(reg->name, id++);
|
||||
if (!pdev) {
|
||||
ret = -ENOMEM;
|
||||
of_node_put(of_node);
|
||||
goto err_register;
|
||||
}
|
||||
|
||||
|
@ -82,6 +82,7 @@ struct asus_kbd_leds {
|
||||
struct hid_device *hdev;
|
||||
struct work_struct work;
|
||||
unsigned int brightness;
|
||||
spinlock_t lock;
|
||||
bool removed;
|
||||
};
|
||||
|
||||
@ -293,24 +294,42 @@ static int asus_kbd_get_functions(struct hid_device *hdev,
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void asus_schedule_work(struct asus_kbd_leds *led)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&led->lock, flags);
|
||||
if (!led->removed)
|
||||
schedule_work(&led->work);
|
||||
spin_unlock_irqrestore(&led->lock, flags);
|
||||
}
|
||||
|
||||
static void asus_kbd_backlight_set(struct led_classdev *led_cdev,
|
||||
enum led_brightness brightness)
|
||||
{
|
||||
struct asus_kbd_leds *led = container_of(led_cdev, struct asus_kbd_leds,
|
||||
cdev);
|
||||
if (led->brightness == brightness)
|
||||
return;
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&led->lock, flags);
|
||||
led->brightness = brightness;
|
||||
schedule_work(&led->work);
|
||||
spin_unlock_irqrestore(&led->lock, flags);
|
||||
|
||||
asus_schedule_work(led);
|
||||
}
|
||||
|
||||
static enum led_brightness asus_kbd_backlight_get(struct led_classdev *led_cdev)
|
||||
{
|
||||
struct asus_kbd_leds *led = container_of(led_cdev, struct asus_kbd_leds,
|
||||
cdev);
|
||||
enum led_brightness brightness;
|
||||
unsigned long flags;
|
||||
|
||||
return led->brightness;
|
||||
spin_lock_irqsave(&led->lock, flags);
|
||||
brightness = led->brightness;
|
||||
spin_unlock_irqrestore(&led->lock, flags);
|
||||
|
||||
return brightness;
|
||||
}
|
||||
|
||||
static void asus_kbd_backlight_work(struct work_struct *work)
|
||||
@ -318,11 +337,11 @@ static void asus_kbd_backlight_work(struct work_struct *work)
|
||||
struct asus_kbd_leds *led = container_of(work, struct asus_kbd_leds, work);
|
||||
u8 buf[] = { FEATURE_KBD_REPORT_ID, 0xba, 0xc5, 0xc4, 0x00 };
|
||||
int ret;
|
||||
unsigned long flags;
|
||||
|
||||
if (led->removed)
|
||||
return;
|
||||
|
||||
spin_lock_irqsave(&led->lock, flags);
|
||||
buf[4] = led->brightness;
|
||||
spin_unlock_irqrestore(&led->lock, flags);
|
||||
|
||||
ret = asus_kbd_set_report(led->hdev, buf, sizeof(buf));
|
||||
if (ret < 0)
|
||||
@ -363,6 +382,7 @@ static int asus_kbd_register_leds(struct hid_device *hdev)
|
||||
drvdata->kbd_backlight->cdev.brightness_set = asus_kbd_backlight_set;
|
||||
drvdata->kbd_backlight->cdev.brightness_get = asus_kbd_backlight_get;
|
||||
INIT_WORK(&drvdata->kbd_backlight->work, asus_kbd_backlight_work);
|
||||
spin_lock_init(&drvdata->kbd_backlight->lock);
|
||||
|
||||
ret = devm_led_classdev_register(&hdev->dev, &drvdata->kbd_backlight->cdev);
|
||||
if (ret < 0) {
|
||||
@ -661,9 +681,13 @@ err_stop_hw:
|
||||
static void asus_remove(struct hid_device *hdev)
|
||||
{
|
||||
struct asus_drvdata *drvdata = hid_get_drvdata(hdev);
|
||||
unsigned long flags;
|
||||
|
||||
if (drvdata->kbd_backlight) {
|
||||
spin_lock_irqsave(&drvdata->kbd_backlight->lock, flags);
|
||||
drvdata->kbd_backlight->removed = true;
|
||||
spin_unlock_irqrestore(&drvdata->kbd_backlight->lock, flags);
|
||||
|
||||
cancel_work_sync(&drvdata->kbd_backlight->work);
|
||||
}
|
||||
|
||||
|
@ -257,6 +257,8 @@ static ssize_t ltc2945_set_value(struct device *dev,
|
||||
|
||||
/* convert to register value, then clamp and write result */
|
||||
regval = ltc2945_val_to_reg(dev, reg, val);
|
||||
if (regval < 0)
|
||||
return regval;
|
||||
if (is_power_reg(reg)) {
|
||||
regval = clamp_val(regval, 0, 0xffffff);
|
||||
regbuf[0] = regval >> 16;
|
||||
|
@ -304,9 +304,12 @@ int mma9551_read_config_word(struct i2c_client *client, u8 app_id,
|
||||
|
||||
ret = mma9551_transfer(client, app_id, MMA9551_CMD_READ_CONFIG,
|
||||
reg, NULL, 0, (u8 *)&v, 2);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
*val = be16_to_cpu(v);
|
||||
|
||||
return ret;
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(mma9551_read_config_word);
|
||||
|
||||
@ -362,9 +365,12 @@ int mma9551_read_status_word(struct i2c_client *client, u8 app_id,
|
||||
|
||||
ret = mma9551_transfer(client, app_id, MMA9551_CMD_READ_STATUS,
|
||||
reg, NULL, 0, (u8 *)&v, 2);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
*val = be16_to_cpu(v);
|
||||
|
||||
return ret;
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(mma9551_read_status_word);
|
||||
|
||||
|
@ -213,16 +213,11 @@ static void unpin_rcv_pages(struct hfi1_filedata *fd,
|
||||
static int pin_rcv_pages(struct hfi1_filedata *fd, struct tid_user_buf *tidbuf)
|
||||
{
|
||||
int pinned;
|
||||
unsigned int npages;
|
||||
unsigned int npages = tidbuf->npages;
|
||||
unsigned long vaddr = tidbuf->vaddr;
|
||||
struct page **pages = NULL;
|
||||
struct hfi1_devdata *dd = fd->uctxt->dd;
|
||||
|
||||
/* Get the number of pages the user buffer spans */
|
||||
npages = num_user_pages(vaddr, tidbuf->length);
|
||||
if (!npages)
|
||||
return -EINVAL;
|
||||
|
||||
if (npages > fd->uctxt->expected_count) {
|
||||
dd_dev_err(dd, "Expected buffer too big\n");
|
||||
return -EINVAL;
|
||||
@ -256,7 +251,6 @@ static int pin_rcv_pages(struct hfi1_filedata *fd, struct tid_user_buf *tidbuf)
|
||||
return pinned;
|
||||
}
|
||||
tidbuf->pages = pages;
|
||||
tidbuf->npages = npages;
|
||||
fd->tid_n_pinned += pinned;
|
||||
return pinned;
|
||||
}
|
||||
@ -332,6 +326,7 @@ int hfi1_user_exp_rcv_setup(struct hfi1_filedata *fd,
|
||||
|
||||
tidbuf->vaddr = tinfo->vaddr;
|
||||
tidbuf->length = tinfo->length;
|
||||
tidbuf->npages = num_user_pages(tidbuf->vaddr, tidbuf->length);
|
||||
tidbuf->psets = kcalloc(uctxt->expected_count, sizeof(*tidbuf->psets),
|
||||
GFP_KERNEL);
|
||||
if (!tidbuf->psets) {
|
||||
|
@ -790,14 +790,8 @@ static void ads7846_report_state(struct ads7846 *ts)
|
||||
if (x == MAX_12BIT)
|
||||
x = 0;
|
||||
|
||||
if (ts->model == 7843) {
|
||||
if (ts->model == 7843 || ts->model == 7845) {
|
||||
Rt = ts->pressure_max / 2;
|
||||
} else if (ts->model == 7845) {
|
||||
if (get_pendown_state(ts))
|
||||
Rt = ts->pressure_max / 2;
|
||||
else
|
||||
Rt = 0;
|
||||
dev_vdbg(&ts->spi->dev, "x/y: %d/%d, PD %d\n", x, y, Rt);
|
||||
} else if (likely(x && z1)) {
|
||||
/* compute touch pressure resistance using equation #2 */
|
||||
Rt = z2;
|
||||
@ -1374,8 +1368,9 @@ static int ads7846_probe(struct spi_device *spi)
|
||||
pdata->y_min ? : 0,
|
||||
pdata->y_max ? : MAX_12BIT,
|
||||
0, 0);
|
||||
input_set_abs_params(input_dev, ABS_PRESSURE,
|
||||
pdata->pressure_min, pdata->pressure_max, 0, 0);
|
||||
if (ts->model != 7845)
|
||||
input_set_abs_params(input_dev, ABS_PRESSURE,
|
||||
pdata->pressure_min, pdata->pressure_max, 0, 0);
|
||||
|
||||
ads7846_setup_spi_msg(ts, pdata);
|
||||
|
||||
|
@ -199,6 +199,7 @@ static int alpine_msix_init_domains(struct alpine_msix_data *priv,
|
||||
}
|
||||
|
||||
gic_domain = irq_find_host(gic_node);
|
||||
of_node_put(gic_node);
|
||||
if (!gic_domain) {
|
||||
pr_err("Failed to find the GIC domain\n");
|
||||
return -ENXIO;
|
||||
|
@ -271,7 +271,8 @@ static int __init bcm7120_l2_intc_probe(struct device_node *dn,
|
||||
flags |= IRQ_GC_BE_IO;
|
||||
|
||||
ret = irq_alloc_domain_generic_chips(data->domain, IRQS_PER_WORD, 1,
|
||||
dn->full_name, handle_level_irq, clr, 0, flags);
|
||||
dn->full_name, handle_level_irq, clr,
|
||||
IRQ_LEVEL, flags);
|
||||
if (ret) {
|
||||
pr_err("failed to allocate generic irq chip\n");
|
||||
goto out_free_domain;
|
||||
|
@ -239,6 +239,7 @@ static int mvebu_gicp_probe(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
parent_domain = irq_find_host(irq_parent_dn);
|
||||
of_node_put(irq_parent_dn);
|
||||
if (!parent_domain) {
|
||||
dev_err(&pdev->dev, "failed to find parent IRQ domain\n");
|
||||
return -ENODEV;
|
||||
|
@ -1952,6 +1952,7 @@ static void process_deferred_bios(struct work_struct *ws)
|
||||
|
||||
else
|
||||
commit_needed = process_bio(cache, bio) || commit_needed;
|
||||
cond_resched();
|
||||
}
|
||||
|
||||
if (commit_needed)
|
||||
@ -1974,6 +1975,7 @@ static void requeue_deferred_bios(struct cache *cache)
|
||||
while ((bio = bio_list_pop(&bios))) {
|
||||
bio->bi_status = BLK_STS_DM_REQUEUE;
|
||||
bio_endio(bio);
|
||||
cond_resched();
|
||||
}
|
||||
}
|
||||
|
||||
@ -2014,6 +2016,8 @@ static void check_migrations(struct work_struct *ws)
|
||||
r = mg_start(cache, op, NULL);
|
||||
if (r)
|
||||
break;
|
||||
|
||||
cond_resched();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -301,8 +301,11 @@ static void corrupt_bio_data(struct bio *bio, struct flakey_c *fc)
|
||||
*/
|
||||
bio_for_each_segment(bvec, bio, iter) {
|
||||
if (bio_iter_len(bio, iter) > corrupt_bio_byte) {
|
||||
char *segment = (page_address(bio_iter_page(bio, iter))
|
||||
+ bio_iter_offset(bio, iter));
|
||||
char *segment;
|
||||
struct page *page = bio_iter_page(bio, iter);
|
||||
if (unlikely(page == ZERO_PAGE(0)))
|
||||
break;
|
||||
segment = (page_address(page) + bio_iter_offset(bio, iter));
|
||||
segment[corrupt_bio_byte] = fc->corrupt_bio_value;
|
||||
DMDEBUG("Corrupting data bio=%p by writing %u to byte %u "
|
||||
"(rw=%c bi_opf=%u bi_sector=%llu size=%u)\n",
|
||||
@ -364,9 +367,11 @@ static int flakey_map(struct dm_target *ti, struct bio *bio)
|
||||
/*
|
||||
* Corrupt matching writes.
|
||||
*/
|
||||
if (fc->corrupt_bio_byte && (fc->corrupt_bio_rw == WRITE)) {
|
||||
if (all_corrupt_bio_flags_match(bio, fc))
|
||||
corrupt_bio_data(bio, fc);
|
||||
if (fc->corrupt_bio_byte) {
|
||||
if (fc->corrupt_bio_rw == WRITE) {
|
||||
if (all_corrupt_bio_flags_match(bio, fc))
|
||||
corrupt_bio_data(bio, fc);
|
||||
}
|
||||
goto map_bio;
|
||||
}
|
||||
|
||||
@ -397,13 +402,14 @@ static int flakey_end_io(struct dm_target *ti, struct bio *bio,
|
||||
}
|
||||
|
||||
if (!*error && pb->bio_submitted && (bio_data_dir(bio) == READ)) {
|
||||
if (fc->corrupt_bio_byte && (fc->corrupt_bio_rw == READ) &&
|
||||
all_corrupt_bio_flags_match(bio, fc)) {
|
||||
/*
|
||||
* Corrupt successful matching READs while in down state.
|
||||
*/
|
||||
corrupt_bio_data(bio, fc);
|
||||
|
||||
if (fc->corrupt_bio_byte) {
|
||||
if ((fc->corrupt_bio_rw == READ) &&
|
||||
all_corrupt_bio_flags_match(bio, fc)) {
|
||||
/*
|
||||
* Corrupt successful matching READs while in down state.
|
||||
*/
|
||||
corrupt_bio_data(bio, fc);
|
||||
}
|
||||
} else if (!test_bit(DROP_WRITES, &fc->flags) &&
|
||||
!test_bit(ERROR_WRITES, &fc->flags)) {
|
||||
/*
|
||||
|
@ -2233,6 +2233,7 @@ static void process_thin_deferred_bios(struct thin_c *tc)
|
||||
throttle_work_update(&pool->throttle);
|
||||
dm_pool_issue_prefetches(pool->pmd);
|
||||
}
|
||||
cond_resched();
|
||||
}
|
||||
blk_finish_plug(&plug);
|
||||
}
|
||||
@ -2316,6 +2317,7 @@ static void process_thin_deferred_cells(struct thin_c *tc)
|
||||
else
|
||||
pool->process_cell(tc, cell);
|
||||
}
|
||||
cond_resched();
|
||||
} while (!list_empty(&cells));
|
||||
}
|
||||
|
||||
|
@ -222,7 +222,6 @@ out_free_io_cache:
|
||||
|
||||
static void local_exit(void)
|
||||
{
|
||||
flush_scheduled_work();
|
||||
destroy_workqueue(deferred_remove_workqueue);
|
||||
|
||||
kmem_cache_destroy(_rq_cache);
|
||||
|
@ -2286,7 +2286,16 @@ static int isp_probe(struct platform_device *pdev)
|
||||
|
||||
/* Regulators */
|
||||
isp->isp_csiphy1.vdd = devm_regulator_get(&pdev->dev, "vdd-csiphy1");
|
||||
if (IS_ERR(isp->isp_csiphy1.vdd)) {
|
||||
ret = PTR_ERR(isp->isp_csiphy1.vdd);
|
||||
goto error;
|
||||
}
|
||||
|
||||
isp->isp_csiphy2.vdd = devm_regulator_get(&pdev->dev, "vdd-csiphy2");
|
||||
if (IS_ERR(isp->isp_csiphy2.vdd)) {
|
||||
ret = PTR_ERR(isp->isp_csiphy2.vdd);
|
||||
goto error;
|
||||
}
|
||||
|
||||
/* Clocks
|
||||
*
|
||||
|
@ -1117,6 +1117,8 @@ static void ene_remove(struct pnp_dev *pnp_dev)
|
||||
struct ene_device *dev = pnp_get_drvdata(pnp_dev);
|
||||
unsigned long flags;
|
||||
|
||||
rc_unregister_device(dev->rdev);
|
||||
del_timer_sync(&dev->tx_sim_timer);
|
||||
spin_lock_irqsave(&dev->hw_lock, flags);
|
||||
ene_rx_disable(dev);
|
||||
ene_rx_restore_hw_buffer(dev);
|
||||
@ -1124,7 +1126,6 @@ static void ene_remove(struct pnp_dev *pnp_dev)
|
||||
|
||||
free_irq(dev->irq, dev);
|
||||
release_region(dev->hw_io, ENE_IO_SIZE);
|
||||
rc_unregister_device(dev->rdev);
|
||||
kfree(dev);
|
||||
}
|
||||
|
||||
|
@ -191,6 +191,7 @@ static void smsusb_stop_streaming(struct smsusb_device_t *dev)
|
||||
|
||||
for (i = 0; i < MAX_URBS; i++) {
|
||||
usb_kill_urb(&dev->surbs[i].urb);
|
||||
cancel_work_sync(&dev->surbs[i].wq);
|
||||
|
||||
if (dev->surbs[i].cb) {
|
||||
smscore_putbuffer(dev->coredev, dev->surbs[i].cb);
|
||||
|
@ -42,7 +42,7 @@ static int uvc_mc_create_links(struct uvc_video_chain *chain,
|
||||
continue;
|
||||
|
||||
remote = uvc_entity_by_id(chain->dev, entity->baSourceID[i]);
|
||||
if (remote == NULL)
|
||||
if (remote == NULL || remote->num_pads == 0)
|
||||
return -EINVAL;
|
||||
|
||||
source = (UVC_ENTITY_TYPE(remote) == UVC_TT_STREAMING)
|
||||
|
@ -140,6 +140,7 @@ int pcf50633_adc_async_read(struct pcf50633 *pcf, int mux, int avg,
|
||||
void *callback_param)
|
||||
{
|
||||
struct pcf50633_adc_request *req;
|
||||
int ret;
|
||||
|
||||
/* req is freed when the result is ready, in interrupt handler */
|
||||
req = kmalloc(sizeof(*req), GFP_KERNEL);
|
||||
@ -151,7 +152,11 @@ int pcf50633_adc_async_read(struct pcf50633 *pcf, int mux, int avg,
|
||||
req->callback = callback;
|
||||
req->callback_param = callback_param;
|
||||
|
||||
return adc_enqueue_request(pcf, req);
|
||||
ret = adc_enqueue_request(pcf, req);
|
||||
if (ret)
|
||||
kfree(req);
|
||||
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(pcf50633_adc_async_read);
|
||||
|
||||
|
@ -1786,7 +1786,7 @@ static int sunxi_nand_ooblayout_free(struct mtd_info *mtd, int section,
|
||||
if (section < ecc->steps)
|
||||
oobregion->length = 4;
|
||||
else
|
||||
oobregion->offset = mtd->oobsize - oobregion->offset;
|
||||
oobregion->length = mtd->oobsize - oobregion->offset;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -480,6 +480,7 @@ static int uif_init(struct ubi_device *ubi)
|
||||
err = ubi_add_volume(ubi, ubi->volumes[i]);
|
||||
if (err) {
|
||||
ubi_err(ubi, "cannot add volume %d", i);
|
||||
ubi->volumes[i] = NULL;
|
||||
goto out_volumes;
|
||||
}
|
||||
}
|
||||
@ -647,6 +648,12 @@ static int io_init(struct ubi_device *ubi, int max_beb_per1024)
|
||||
ubi->ec_hdr_alsize = ALIGN(UBI_EC_HDR_SIZE, ubi->hdrs_min_io_size);
|
||||
ubi->vid_hdr_alsize = ALIGN(UBI_VID_HDR_SIZE, ubi->hdrs_min_io_size);
|
||||
|
||||
if (ubi->vid_hdr_offset && ((ubi->vid_hdr_offset + UBI_VID_HDR_SIZE) >
|
||||
ubi->vid_hdr_alsize)) {
|
||||
ubi_err(ubi, "VID header offset %d too large.", ubi->vid_hdr_offset);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
dbg_gen("min_io_size %d", ubi->min_io_size);
|
||||
dbg_gen("max_write_size %d", ubi->max_write_size);
|
||||
dbg_gen("hdrs_min_io_size %d", ubi->hdrs_min_io_size);
|
||||
|
@ -470,7 +470,7 @@ int ubi_resize_volume(struct ubi_volume_desc *desc, int reserved_pebs)
|
||||
for (i = 0; i < -pebs; i++) {
|
||||
err = ubi_eba_unmap_leb(ubi, vol, reserved_pebs + i);
|
||||
if (err)
|
||||
goto out_acc;
|
||||
goto out_free;
|
||||
}
|
||||
spin_lock(&ubi->volumes_lock);
|
||||
ubi->rsvd_pebs += pebs;
|
||||
@ -518,8 +518,10 @@ out_acc:
|
||||
ubi->avail_pebs += pebs;
|
||||
spin_unlock(&ubi->volumes_lock);
|
||||
}
|
||||
return err;
|
||||
|
||||
out_free:
|
||||
kfree(new_eba_tbl);
|
||||
ubi_eba_destroy_table(new_eba_tbl);
|
||||
return err;
|
||||
}
|
||||
|
||||
@ -586,6 +588,7 @@ int ubi_add_volume(struct ubi_device *ubi, struct ubi_volume *vol)
|
||||
if (err) {
|
||||
ubi_err(ubi, "cannot add character device for volume %d, error %d",
|
||||
vol_id, err);
|
||||
vol_release(&vol->dev);
|
||||
return err;
|
||||
}
|
||||
|
||||
@ -596,15 +599,14 @@ int ubi_add_volume(struct ubi_device *ubi, struct ubi_volume *vol)
|
||||
vol->dev.groups = volume_dev_groups;
|
||||
dev_set_name(&vol->dev, "%s_%d", ubi->ubi_name, vol->vol_id);
|
||||
err = device_register(&vol->dev);
|
||||
if (err)
|
||||
goto out_cdev;
|
||||
if (err) {
|
||||
cdev_del(&vol->cdev);
|
||||
put_device(&vol->dev);
|
||||
return err;
|
||||
}
|
||||
|
||||
self_check_volumes(ubi);
|
||||
return err;
|
||||
|
||||
out_cdev:
|
||||
cdev_del(&vol->cdev);
|
||||
return err;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -878,8 +878,11 @@ static int wear_leveling_worker(struct ubi_device *ubi, struct ubi_work *wrk,
|
||||
|
||||
err = do_sync_erase(ubi, e1, vol_id, lnum, 0);
|
||||
if (err) {
|
||||
if (e2)
|
||||
if (e2) {
|
||||
spin_lock(&ubi->wl_lock);
|
||||
wl_entry_destroy(ubi, e2);
|
||||
spin_unlock(&ubi->wl_lock);
|
||||
}
|
||||
goto out_ro;
|
||||
}
|
||||
|
||||
@ -961,11 +964,11 @@ out_error:
|
||||
spin_lock(&ubi->wl_lock);
|
||||
ubi->move_from = ubi->move_to = NULL;
|
||||
ubi->move_to_put = ubi->wl_scheduled = 0;
|
||||
wl_entry_destroy(ubi, e1);
|
||||
wl_entry_destroy(ubi, e2);
|
||||
spin_unlock(&ubi->wl_lock);
|
||||
|
||||
ubi_free_vid_buf(vidb);
|
||||
wl_entry_destroy(ubi, e1);
|
||||
wl_entry_destroy(ubi, e2);
|
||||
|
||||
out_ro:
|
||||
ubi_ro_mode(ubi);
|
||||
@ -1103,14 +1106,18 @@ static int __erase_worker(struct ubi_device *ubi, struct ubi_work *wl_wrk)
|
||||
/* Re-schedule the LEB for erasure */
|
||||
err1 = schedule_erase(ubi, e, vol_id, lnum, 0, false);
|
||||
if (err1) {
|
||||
spin_lock(&ubi->wl_lock);
|
||||
wl_entry_destroy(ubi, e);
|
||||
spin_unlock(&ubi->wl_lock);
|
||||
err = err1;
|
||||
goto out_ro;
|
||||
}
|
||||
return err;
|
||||
}
|
||||
|
||||
spin_lock(&ubi->wl_lock);
|
||||
wl_entry_destroy(ubi, e);
|
||||
spin_unlock(&ubi->wl_lock);
|
||||
if (err != -EIO)
|
||||
/*
|
||||
* If this is not %-EIO, we have no idea what to do. Scheduling
|
||||
@ -1226,6 +1233,18 @@ int ubi_wl_put_peb(struct ubi_device *ubi, int vol_id, int lnum,
|
||||
retry:
|
||||
spin_lock(&ubi->wl_lock);
|
||||
e = ubi->lookuptbl[pnum];
|
||||
if (!e) {
|
||||
/*
|
||||
* This wl entry has been removed for some errors by other
|
||||
* process (eg. wear leveling worker), corresponding process
|
||||
* (except __erase_worker, which cannot concurrent with
|
||||
* ubi_wl_put_peb) will set ubi ro_mode at the same time,
|
||||
* just ignore this wl entry.
|
||||
*/
|
||||
spin_unlock(&ubi->wl_lock);
|
||||
up_read(&ubi->fm_protect);
|
||||
return 0;
|
||||
}
|
||||
if (e == ubi->move_from) {
|
||||
/*
|
||||
* User is putting the physical eraseblock which was selected to
|
||||
|
@ -284,7 +284,6 @@ static void esd_usb2_rx_event(struct esd_usb2_net_priv *priv,
|
||||
cf->data[2] |= CAN_ERR_PROT_STUFF;
|
||||
break;
|
||||
default:
|
||||
cf->data[3] = ecc & SJA1000_ECC_SEG;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -292,6 +291,9 @@ static void esd_usb2_rx_event(struct esd_usb2_net_priv *priv,
|
||||
if (!(ecc & SJA1000_ECC_DIR))
|
||||
cf->data[2] |= CAN_ERR_PROT_TX;
|
||||
|
||||
/* Bit stream position in CAN frame as the error was detected */
|
||||
cf->data[3] = ecc & SJA1000_ECC_SEG;
|
||||
|
||||
if (priv->can.state == CAN_STATE_ERROR_WARNING ||
|
||||
priv->can.state == CAN_STATE_ERROR_PASSIVE) {
|
||||
cf->data[1] = (txerr > rxerr) ?
|
||||
|
@ -1799,6 +1799,14 @@ static unsigned int bcmgenet_desc_rx(struct bcmgenet_rx_ring *ring,
|
||||
__func__, p_index, ring->c_index,
|
||||
ring->read_ptr, dma_length_status);
|
||||
|
||||
if (unlikely(len > RX_BUF_LENGTH)) {
|
||||
netif_err(priv, rx_status, dev, "oversized packet\n");
|
||||
dev->stats.rx_length_errors++;
|
||||
dev->stats.rx_errors++;
|
||||
dev_kfree_skb_any(skb);
|
||||
goto next;
|
||||
}
|
||||
|
||||
if (unlikely(!(dma_flag & DMA_EOP) || !(dma_flag & DMA_SOP))) {
|
||||
netif_err(priv, rx_status, dev,
|
||||
"dropping fragmented packet!\n");
|
||||
|
@ -164,7 +164,8 @@ static int alloc_4k(struct mlx5_core_dev *dev, u64 *addr)
|
||||
fp = list_entry(dev->priv.free_list.next, struct fw_page, list);
|
||||
n = find_first_bit(&fp->bitmask, 8 * sizeof(fp->bitmask));
|
||||
if (n >= MLX5_NUM_4K_IN_PAGE) {
|
||||
mlx5_core_warn(dev, "alloc 4k bug\n");
|
||||
mlx5_core_warn(dev, "alloc 4k bug: fw page = 0x%llx, n = %u, bitmask: %lu, max num of 4K pages: %d\n",
|
||||
fp->addr, n, fp->bitmask, MLX5_NUM_4K_IN_PAGE);
|
||||
return -ENOENT;
|
||||
}
|
||||
clear_bit(n, &fp->bitmask);
|
||||
|
@ -394,7 +394,7 @@ static void ath9k_htc_fw_panic_report(struct htc_target *htc_handle,
|
||||
* HTC Messages are handled directly here and the obtained SKB
|
||||
* is freed.
|
||||
*
|
||||
* Service messages (Data, WMI) passed to the corresponding
|
||||
* Service messages (Data, WMI) are passed to the corresponding
|
||||
* endpoint RX handlers, which have to free the SKB.
|
||||
*/
|
||||
void ath9k_htc_rx_msg(struct htc_target *htc_handle,
|
||||
@ -481,6 +481,8 @@ invalid:
|
||||
if (endpoint->ep_callbacks.rx)
|
||||
endpoint->ep_callbacks.rx(endpoint->ep_callbacks.priv,
|
||||
skb, epid);
|
||||
else
|
||||
goto invalid;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -337,6 +337,7 @@ int ath9k_wmi_cmd(struct wmi *wmi, enum wmi_cmd_id cmd_id,
|
||||
if (!time_left) {
|
||||
ath_dbg(common, WMI, "Timeout waiting for WMI command: %s\n",
|
||||
wmi_cmd_to_name(cmd_id));
|
||||
wmi->last_seq_id = 0;
|
||||
mutex_unlock(&wmi->op_mutex);
|
||||
kfree_skb(skb);
|
||||
return -ETIMEDOUT;
|
||||
|
@ -157,6 +157,7 @@ int brcmf_c_preinit_dcmds(struct brcmf_if *ifp)
|
||||
err);
|
||||
goto done;
|
||||
}
|
||||
buf[sizeof(buf) - 1] = '\0';
|
||||
ptr = (char *)buf;
|
||||
strsep(&ptr, "\n");
|
||||
|
||||
|
@ -226,6 +226,7 @@ static netdev_tx_t brcmf_netdev_start_xmit(struct sk_buff *skb,
|
||||
brcmf_err("%s: failed to expand headroom\n",
|
||||
brcmf_ifname(ifp));
|
||||
atomic_inc(&drvr->bus_if->stats.pktcow_failed);
|
||||
dev_kfree_skb(skb);
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
|
@ -337,8 +337,11 @@ brcmf_msgbuf_alloc_pktid(struct device *dev,
|
||||
count++;
|
||||
} while (count < pktids->array_size);
|
||||
|
||||
if (count == pktids->array_size)
|
||||
if (count == pktids->array_size) {
|
||||
dma_unmap_single(dev, *physaddr, skb->len - data_offset,
|
||||
pktids->direction);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
array[*idx].data_offset = data_offset;
|
||||
array[*idx].physaddr = *physaddr;
|
||||
|
@ -11437,9 +11437,14 @@ static int ipw_wdev_init(struct net_device *dev)
|
||||
set_wiphy_dev(wdev->wiphy, &priv->pci_dev->dev);
|
||||
|
||||
/* With that information in place, we can now register the wiphy... */
|
||||
if (wiphy_register(wdev->wiphy))
|
||||
rc = -EIO;
|
||||
rc = wiphy_register(wdev->wiphy);
|
||||
if (rc)
|
||||
goto out;
|
||||
|
||||
return 0;
|
||||
out:
|
||||
kfree(priv->ieee->a_band.channels);
|
||||
kfree(priv->ieee->bg_band.channels);
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
@ -931,6 +931,8 @@ int __orinoco_hw_setup_enc(struct orinoco_private *priv)
|
||||
err = hermes_write_wordrec(hw, USER_BAP,
|
||||
HERMES_RID_CNFAUTHENTICATION_AGERE,
|
||||
auth_flag);
|
||||
if (err)
|
||||
return err;
|
||||
}
|
||||
err = hermes_write_wordrec(hw, USER_BAP,
|
||||
HERMES_RID_CNFWEPENABLED_AGERE,
|
||||
|
@ -48,7 +48,7 @@ void lbs_mac_event_disconnected(struct lbs_private *priv,
|
||||
|
||||
/* Free Tx and Rx packets */
|
||||
spin_lock_irqsave(&priv->driver_lock, flags);
|
||||
kfree_skb(priv->currenttxskb);
|
||||
dev_kfree_skb_irq(priv->currenttxskb);
|
||||
priv->currenttxskb = NULL;
|
||||
priv->tx_pending_len = 0;
|
||||
spin_unlock_irqrestore(&priv->driver_lock, flags);
|
||||
|
@ -216,7 +216,7 @@ int lbs_stop_iface(struct lbs_private *priv)
|
||||
|
||||
spin_lock_irqsave(&priv->driver_lock, flags);
|
||||
priv->iface_running = false;
|
||||
kfree_skb(priv->currenttxskb);
|
||||
dev_kfree_skb_irq(priv->currenttxskb);
|
||||
priv->currenttxskb = NULL;
|
||||
priv->tx_pending_len = 0;
|
||||
spin_unlock_irqrestore(&priv->driver_lock, flags);
|
||||
@ -872,6 +872,7 @@ static int lbs_init_adapter(struct lbs_private *priv)
|
||||
ret = kfifo_alloc(&priv->event_fifo, sizeof(u32) * 16, GFP_KERNEL);
|
||||
if (ret) {
|
||||
pr_err("Out of memory allocating event FIFO buffer\n");
|
||||
lbs_free_cmd_buffer(priv);
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
@ -878,7 +878,7 @@ mwifiex_send_delba_txbastream_tbl(struct mwifiex_private *priv, u8 tid)
|
||||
*/
|
||||
void mwifiex_update_ampdu_txwinsize(struct mwifiex_adapter *adapter)
|
||||
{
|
||||
u8 i;
|
||||
u8 i, j;
|
||||
u32 tx_win_size;
|
||||
struct mwifiex_private *priv;
|
||||
|
||||
@ -909,8 +909,8 @@ void mwifiex_update_ampdu_txwinsize(struct mwifiex_adapter *adapter)
|
||||
if (tx_win_size != priv->add_ba_param.tx_win_size) {
|
||||
if (!priv->media_connected)
|
||||
continue;
|
||||
for (i = 0; i < MAX_NUM_TID; i++)
|
||||
mwifiex_send_delba_txbastream_tbl(priv, i);
|
||||
for (j = 0; j < MAX_NUM_TID; j++)
|
||||
mwifiex_send_delba_txbastream_tbl(priv, j);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1629,6 +1629,11 @@ static void rtl8192e_enable_rf(struct rtl8xxxu_priv *priv)
|
||||
val8 = rtl8xxxu_read8(priv, REG_PAD_CTRL1);
|
||||
val8 &= ~BIT(0);
|
||||
rtl8xxxu_write8(priv, REG_PAD_CTRL1, val8);
|
||||
|
||||
/*
|
||||
* Fix transmission failure of rtl8192e.
|
||||
*/
|
||||
rtl8xxxu_write8(priv, REG_TXPAUSE, 0x00);
|
||||
}
|
||||
|
||||
struct rtl8xxxu_fileops rtl8192eu_fops = {
|
||||
|
@ -5101,7 +5101,7 @@ static void rtl8xxxu_queue_rx_urb(struct rtl8xxxu_priv *priv,
|
||||
pending = priv->rx_urb_pending_count;
|
||||
} else {
|
||||
skb = (struct sk_buff *)rx_urb->urb.context;
|
||||
dev_kfree_skb(skb);
|
||||
dev_kfree_skb_irq(skb);
|
||||
usb_free_urb(&rx_urb->urb);
|
||||
}
|
||||
|
||||
@ -5500,7 +5500,6 @@ static int rtl8xxxu_config(struct ieee80211_hw *hw, u32 changed)
|
||||
{
|
||||
struct rtl8xxxu_priv *priv = hw->priv;
|
||||
struct device *dev = &priv->udev->dev;
|
||||
u16 val16;
|
||||
int ret = 0, channel;
|
||||
bool ht40;
|
||||
|
||||
@ -5510,14 +5509,6 @@ static int rtl8xxxu_config(struct ieee80211_hw *hw, u32 changed)
|
||||
__func__, hw->conf.chandef.chan->hw_value,
|
||||
changed, hw->conf.chandef.width);
|
||||
|
||||
if (changed & IEEE80211_CONF_CHANGE_RETRY_LIMITS) {
|
||||
val16 = ((hw->conf.long_frame_max_tx_count <<
|
||||
RETRY_LIMIT_LONG_SHIFT) & RETRY_LIMIT_LONG_MASK) |
|
||||
((hw->conf.short_frame_max_tx_count <<
|
||||
RETRY_LIMIT_SHORT_SHIFT) & RETRY_LIMIT_SHORT_MASK);
|
||||
rtl8xxxu_write16(priv, REG_RETRY_LIMIT, val16);
|
||||
}
|
||||
|
||||
if (changed & IEEE80211_CONF_CHANGE_CHANNEL) {
|
||||
switch (hw->conf.chandef.width) {
|
||||
case NL80211_CHAN_WIDTH_20_NOHT:
|
||||
|
@ -1329,7 +1329,7 @@ static netdev_tx_t wl3501_hard_start_xmit(struct sk_buff *skb,
|
||||
} else {
|
||||
++dev->stats.tx_packets;
|
||||
dev->stats.tx_bytes += skb->len;
|
||||
kfree_skb(skb);
|
||||
dev_kfree_skb_irq(skb);
|
||||
|
||||
if (this->tx_buffer_cnt < 2)
|
||||
netif_stop_queue(dev);
|
||||
|
@ -676,6 +676,12 @@ int st_nci_se_io(struct nci_dev *ndev, u32 se_idx,
|
||||
ST_NCI_EVT_TRANSMIT_DATA, apdu,
|
||||
apdu_length);
|
||||
default:
|
||||
/* Need to free cb_context here as at the moment we can't
|
||||
* clearly indicate to the caller if the callback function
|
||||
* would be called (and free it) or not. In both cases a
|
||||
* negative value may be returned to the caller.
|
||||
*/
|
||||
kfree(cb_context);
|
||||
return -ENODEV;
|
||||
}
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user