mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
Merge android-4.14.111 (171fc23) into msm-4.14
* refs/heads/tmp-171fc23: Revert "usb: dwc3: gadget: Fix OTG events when gadget driver isn't loaded" Revert "coresight: etm4x: Add support to enable ETMv4.2" Linux 4.14.111 ACPI / video: Extend chassis-type detection with a "Lunch Box" check drm/dp/mst: Configure no_stop_bit correctly for remote i2c xfers dmaengine: tegra: avoid overflow of byte tracking clk: rockchip: fix frac settings of GPLL clock for rk3328 x86/build: Mark per-CPU symbols as absolute explicitly for LLD wlcore: Fix memory leak in case wl12xx_fetch_firmware failure selinux: do not override context on context mounts x86/build: Specify elf_i386 linker emulation explicitly for i386 objects drm/nouveau: Stop using drm_crtc_force_disable drm: Auto-set allow_fb_modifiers when given modifiers at plane init regulator: act8865: Fix act8600_sudcdc_voltage_ranges setting media: s5p-jpeg: Check for fmt_ver_flag when doing fmt enumeration netfilter: physdev: relax br_netfilter dependency dmaengine: qcom_hidma: initialize tx flags in hidma_prep_dma_* dmaengine: qcom_hidma: assign channel cookie correctly dmaengine: imx-dma: fix warning comparison of distinct pointer types cpu/hotplug: Mute hotplug lockdep during init hpet: Fix missing '=' character in the __setup() code of hpet_mmap_enable HID: intel-ish: ipc: handle PIMR before ish_wakeup also clear PISR busy_clear bit soc/tegra: fuse: Fix illegal free of IO base address hwrng: virtio - Avoid repeated init of completion media: mt9m111: set initial frame size other than 0x0 usb: dwc3: gadget: Fix OTG events when gadget driver isn't loaded powerpc/pseries: Perform full re-add of CPU for topology update post-migration tty: increase the default flip buffer limit to 2*640K backlight: pwm_bl: Use gpiod_get_value_cansleep() to get initial state cgroup/pids: turn cgroup_subsys->free() into cgroup_subsys->release() to fix the accounting bpf: fix missing prototype warnings ARM: avoid Cortex-A9 livelock on tight dmb loops ARM: 8830/1: NOMMU: Toggle only bits in EXC_RETURN we are really care of mt7601u: bump supported EEPROM version soc: qcom: gsbi: Fix error handling in gsbi_probe() efi/arm/arm64: Allow SetVirtualAddressMap() to be omitted ARM: dts: lpc32xx: Remove leading 0x and 0s from bindings notation efi/memattr: Don't bail on zero VA if it equals the region's PA sched/debug: Initialize sd_sysctl_cpus if !CONFIG_CPUMASK_OFFSTACK ASoC: fsl-asoc-card: fix object reference leaks in fsl_asoc_card_probe platform/x86: intel_pmc_core: Fix PCH IP sts reading e1000e: fix cyclic resets at link up with active tx cdrom: Fix race condition in cdrom_sysctl_register fbdev: fbmem: fix memory access if logo is bigger than the screen iw_cxgb4: fix srqidx leak during connection abort genirq: Avoid summation loops for /proc/stat bcache: improve sysfs_strtoul_clamp() bcache: fix input overflow to sequential_cutoff bcache: fix input overflow to cache set sysfs file io_error_halflife sched/topology: Fix percpu data types in struct sd_data & struct s_data usb: f_fs: Avoid crash due to out-of-scope stack ptr access ALSA: PCM: check if ops are defined before suspending PCM ARM: 8833/1: Ensure that NEON code always compiles with Clang netfilter: conntrack: fix cloned unconfirmed skb->_nfct race in __nf_conntrack_confirm kprobes: Prohibit probing on bsearch() ACPI / video: Refactor and fix dmi_is_desktop() iwlwifi: pcie: fix emergency path leds: lp55xx: fix null deref on firmware load failure jbd2: fix race when writing superblock HID: intel-ish-hid: avoid binding wrong ishtp_cl_device vfs: fix preadv64v2 and pwritev64v2 compat syscalls with offset == -1 media: mtk-jpeg: Correct return type for mem2mem buffer helpers media: mx2_emmaprp: Correct return type for mem2mem buffer helpers media: s5p-g2d: Correct return type for mem2mem buffer helpers media: s5p-jpeg: Correct return type for mem2mem buffer helpers media: sh_veu: Correct return type for mem2mem buffer helpers SoC: imx-sgtl5000: add missing put_device() perf test: Fix failure of 'evsel-tp-sched' test on s390 scsi: fcoe: make use of fip_mode enum complete scsi: megaraid_sas: return error when create DMA pool failed efi: cper: Fix possible out-of-bounds access cpufreq: acpi-cpufreq: Report if CPU doesn't support boost technologies clk: fractional-divider: check parent rate only if flag is set IB/mlx4: Increase the timeout for CM cache mlxsw: spectrum: Avoid -Wformat-truncation warnings e1000e: Fix -Wformat-truncation warnings mmc: omap: fix the maximum timeout setting powerpc/hugetlb: Handle mmap_min_addr correctly in get_unmapped_area callback iommu/io-pgtable-arm-v7s: Only kmemleak_ignore L2 tables ARM: 8840/1: use a raw_spinlock_t in unwind serial: 8250_pxa: honor the port number from devicetree coresight: etm4x: Add support to enable ETMv4.2 powerpc/xmon: Fix opcode being uninitialized in print_insn_powerpc scsi: core: replace GFP_ATOMIC with GFP_KERNEL in scsi_scan.c usb: chipidea: Grab the (legacy) USB PHY by phandle first crypto: cavium/zip - fix collision with generic cra_driver_name crypto: crypto4xx - add missing of_node_put after of_device_is_available wil6210: check null pointer in _wil_cfg80211_merge_extra_ies PCI/PME: Fix hotplug/sysfs remove deadlock in pcie_pme_remove() tools lib traceevent: Fix buffer overflow in arg_eval fs: fix guard_bio_eod to check for real EOD errors jbd2: fix invalid descriptor block checksum cifs: Fix NULL pointer dereference of devname dm thin: add sanity checks to thin-pool and external snapshot creation cifs: use correct format characters page_poison: play nicely with KASAN fs/file.c: initialize init_files.resize_wait f2fs: do not use mutex lock in atomic context ocfs2: fix a panic problem caused by o2cb_ctl mm/slab.c: kmemleak no scan alien caches mm/vmalloc.c: fix kernel BUG at mm/vmalloc.c:512! mm, mempolicy: fix uninit memory access mm/page_ext.c: fix an imbalance with kmemleak mm/cma.c: cma_declare_contiguous: correct err handling perf c2c: Fix c2c report for empty numa node iio: adc: fix warning in Qualcomm PM8xxx HK/XOADC driver scsi: hisi_sas: Set PHY linkrate when disconnected enic: fix build warning without CONFIG_CPUMASK_OFFSTACK sysctl: handle overflow for file-max include/linux/relay.h: fix percpu annotation in struct rchan gpio: gpio-omap: fix level interrupt idling net/mlx5: Avoid panic when setting vport mac, getting vport config net/mlx5: Avoid panic when setting vport rate tracing: kdb: Fix ftdump to not sleep f2fs: fix to avoid deadlock in f2fs_read_inline_dir() h8300: use cc-cross-prefix instead of hardcoding h8300-unknown-linux- CIFS: fix POSIX lock leak and invalid ptr deref mm: mempolicy: make mbind() return -EIO when MPOL_MF_STRICT is specified tty/serial: atmel: RS485 HD w/DMA: enable RX after TX is stopped tty/serial: atmel: Add is_half_duplex helper lib/int_sqrt: optimize initial value compute ext4: cleanup bh release code in ext4_ind_remove_space() arm64: debug: Don't propagate UNKNOWN FAR into si_code for debug signals ANDROID: cuttlefish_defconfig: Enable CONFIG_OVERLAY_FS ANDROID: cuttlefish: enable CONFIG_NET_SCH_INGRESS=y Conflicts: drivers/usb/gadget/function/f_fs.c mm/page_alloc.c net/netfilter/nf_conntrack_core.c Change-Id: I4a3db0717eb4f0f0d89e57f3167129bcd2419599 Signed-off-by: Blagovest Kolenichev <bkolenichev@codeaurora.org>
This commit is contained in:
commit
5d880f1ba0
@ -6,7 +6,7 @@ TL;DR summary
|
||||
* Use only NEON instructions, or VFP instructions that don't rely on support
|
||||
code
|
||||
* Isolate your NEON code in a separate compilation unit, and compile it with
|
||||
'-mfpu=neon -mfloat-abi=softfp'
|
||||
'-march=armv7-a -mfpu=neon -mfloat-abi=softfp'
|
||||
* Put kernel_neon_begin() and kernel_neon_end() calls around the calls into your
|
||||
NEON code
|
||||
* Don't sleep in your NEON code, and be aware that it will be executed with
|
||||
@ -87,7 +87,7 @@ instructions appearing in unexpected places if no special care is taken.
|
||||
Therefore, the recommended and only supported way of using NEON/VFP in the
|
||||
kernel is by adhering to the following rules:
|
||||
* isolate the NEON code in a separate compilation unit and compile it with
|
||||
'-mfpu=neon -mfloat-abi=softfp';
|
||||
'-march=armv7-a -mfpu=neon -mfloat-abi=softfp';
|
||||
* issue the calls to kernel_neon_begin(), kernel_neon_end() as well as the calls
|
||||
into the unit containing the NEON code from a compilation unit which is *not*
|
||||
built with the GCC flag '-mfpu=neon' set.
|
||||
|
2
Makefile
2
Makefile
@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 4
|
||||
PATCHLEVEL = 14
|
||||
SUBLEVEL = 110
|
||||
SUBLEVEL = 111
|
||||
EXTRAVERSION =
|
||||
NAME = Petit Gorille
|
||||
|
||||
|
@ -230,7 +230,7 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
i2s1: i2s@2009C000 {
|
||||
i2s1: i2s@2009c000 {
|
||||
compatible = "nxp,lpc3220-i2s";
|
||||
reg = <0x2009C000 0x1000>;
|
||||
};
|
||||
@ -273,7 +273,7 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
i2c1: i2c@400A0000 {
|
||||
i2c1: i2c@400a0000 {
|
||||
compatible = "nxp,pnx-i2c";
|
||||
reg = <0x400A0000 0x100>;
|
||||
interrupt-parent = <&sic1>;
|
||||
@ -284,7 +284,7 @@
|
||||
clocks = <&clk LPC32XX_CLK_I2C1>;
|
||||
};
|
||||
|
||||
i2c2: i2c@400A8000 {
|
||||
i2c2: i2c@400a8000 {
|
||||
compatible = "nxp,pnx-i2c";
|
||||
reg = <0x400A8000 0x100>;
|
||||
interrupt-parent = <&sic1>;
|
||||
@ -295,7 +295,7 @@
|
||||
clocks = <&clk LPC32XX_CLK_I2C2>;
|
||||
};
|
||||
|
||||
mpwm: mpwm@400E8000 {
|
||||
mpwm: mpwm@400e8000 {
|
||||
compatible = "nxp,lpc3220-motor-pwm";
|
||||
reg = <0x400E8000 0x78>;
|
||||
status = "disabled";
|
||||
@ -394,7 +394,7 @@
|
||||
#gpio-cells = <3>; /* bank, pin, flags */
|
||||
};
|
||||
|
||||
timer4: timer@4002C000 {
|
||||
timer4: timer@4002c000 {
|
||||
compatible = "nxp,lpc3220-timer";
|
||||
reg = <0x4002C000 0x1000>;
|
||||
interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
|
||||
@ -412,7 +412,7 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
watchdog: watchdog@4003C000 {
|
||||
watchdog: watchdog@4003c000 {
|
||||
compatible = "nxp,pnx4008-wdt";
|
||||
reg = <0x4003C000 0x1000>;
|
||||
clocks = <&clk LPC32XX_CLK_WDOG>;
|
||||
@ -451,7 +451,7 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
timer1: timer@4004C000 {
|
||||
timer1: timer@4004c000 {
|
||||
compatible = "nxp,lpc3220-timer";
|
||||
reg = <0x4004C000 0x1000>;
|
||||
interrupts = <17 IRQ_TYPE_LEVEL_LOW>;
|
||||
@ -475,7 +475,7 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
pwm1: pwm@4005C000 {
|
||||
pwm1: pwm@4005c000 {
|
||||
compatible = "nxp,lpc3220-pwm";
|
||||
reg = <0x4005C000 0x4>;
|
||||
clocks = <&clk LPC32XX_CLK_PWM1>;
|
||||
@ -484,7 +484,7 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
pwm2: pwm@4005C004 {
|
||||
pwm2: pwm@4005c004 {
|
||||
compatible = "nxp,lpc3220-pwm";
|
||||
reg = <0x4005C004 0x4>;
|
||||
clocks = <&clk LPC32XX_CLK_PWM2>;
|
||||
|
@ -11,6 +11,8 @@
|
||||
#define sev() __asm__ __volatile__ ("sev" : : : "memory")
|
||||
#define wfe() __asm__ __volatile__ ("wfe" : : : "memory")
|
||||
#define wfi() __asm__ __volatile__ ("wfi" : : : "memory")
|
||||
#else
|
||||
#define wfe() do { } while (0)
|
||||
#endif
|
||||
|
||||
#if __LINUX_ARM_ARCH__ >= 7
|
||||
|
@ -80,7 +80,11 @@ extern void release_thread(struct task_struct *);
|
||||
unsigned long get_wchan(struct task_struct *p);
|
||||
|
||||
#if __LINUX_ARM_ARCH__ == 6 || defined(CONFIG_ARM_ERRATA_754327)
|
||||
#define cpu_relax() smp_mb()
|
||||
#define cpu_relax() \
|
||||
do { \
|
||||
smp_mb(); \
|
||||
__asm__ __volatile__("nop; nop; nop; nop; nop; nop; nop; nop; nop; nop;"); \
|
||||
} while (0)
|
||||
#else
|
||||
#define cpu_relax() barrier()
|
||||
#endif
|
||||
|
@ -49,7 +49,7 @@
|
||||
* (0 -> msp; 1 -> psp). Bits [1:0] are fixed to 0b01.
|
||||
*/
|
||||
#define EXC_RET_STACK_MASK 0x00000004
|
||||
#define EXC_RET_THREADMODE_PROCESSSTACK 0xfffffffd
|
||||
#define EXC_RET_THREADMODE_PROCESSSTACK (3 << 2)
|
||||
|
||||
/* Cache related definitions */
|
||||
|
||||
|
@ -127,7 +127,8 @@
|
||||
*/
|
||||
.macro v7m_exception_slow_exit ret_r0
|
||||
cpsid i
|
||||
ldr lr, =EXC_RET_THREADMODE_PROCESSSTACK
|
||||
ldr lr, =exc_ret
|
||||
ldr lr, [lr]
|
||||
|
||||
@ read original r12, sp, lr, pc and xPSR
|
||||
add r12, sp, #S_IP
|
||||
|
@ -146,3 +146,7 @@ ENTRY(vector_table)
|
||||
.rept CONFIG_CPU_V7M_NUM_IRQ
|
||||
.long __irq_entry @ External Interrupts
|
||||
.endr
|
||||
.align 2
|
||||
.globl exc_ret
|
||||
exc_ret:
|
||||
.space 4
|
||||
|
@ -91,8 +91,11 @@ void machine_crash_nonpanic_core(void *unused)
|
||||
|
||||
set_cpu_online(smp_processor_id(), false);
|
||||
atomic_dec(&waiting_for_crash_ipi);
|
||||
while (1)
|
||||
|
||||
while (1) {
|
||||
cpu_relax();
|
||||
wfe();
|
||||
}
|
||||
}
|
||||
|
||||
void crash_smp_send_stop(void)
|
||||
|
@ -615,8 +615,10 @@ static void ipi_cpu_stop(unsigned int cpu)
|
||||
local_fiq_disable();
|
||||
local_irq_disable();
|
||||
|
||||
while (1)
|
||||
while (1) {
|
||||
cpu_relax();
|
||||
wfe();
|
||||
}
|
||||
}
|
||||
|
||||
static DEFINE_PER_CPU(struct completion *, cpu_completion);
|
||||
|
@ -93,7 +93,7 @@ extern const struct unwind_idx __start_unwind_idx[];
|
||||
static const struct unwind_idx *__origin_unwind_idx;
|
||||
extern const struct unwind_idx __stop_unwind_idx[];
|
||||
|
||||
static DEFINE_SPINLOCK(unwind_lock);
|
||||
static DEFINE_RAW_SPINLOCK(unwind_lock);
|
||||
static LIST_HEAD(unwind_tables);
|
||||
|
||||
/* Convert a prel31 symbol to an absolute address */
|
||||
@ -201,7 +201,7 @@ static const struct unwind_idx *unwind_find_idx(unsigned long addr)
|
||||
/* module unwind tables */
|
||||
struct unwind_table *table;
|
||||
|
||||
spin_lock_irqsave(&unwind_lock, flags);
|
||||
raw_spin_lock_irqsave(&unwind_lock, flags);
|
||||
list_for_each_entry(table, &unwind_tables, list) {
|
||||
if (addr >= table->begin_addr &&
|
||||
addr < table->end_addr) {
|
||||
@ -213,7 +213,7 @@ static const struct unwind_idx *unwind_find_idx(unsigned long addr)
|
||||
break;
|
||||
}
|
||||
}
|
||||
spin_unlock_irqrestore(&unwind_lock, flags);
|
||||
raw_spin_unlock_irqrestore(&unwind_lock, flags);
|
||||
}
|
||||
|
||||
pr_debug("%s: idx = %p\n", __func__, idx);
|
||||
@ -529,9 +529,9 @@ struct unwind_table *unwind_table_add(unsigned long start, unsigned long size,
|
||||
tab->begin_addr = text_addr;
|
||||
tab->end_addr = text_addr + text_size;
|
||||
|
||||
spin_lock_irqsave(&unwind_lock, flags);
|
||||
raw_spin_lock_irqsave(&unwind_lock, flags);
|
||||
list_add_tail(&tab->list, &unwind_tables);
|
||||
spin_unlock_irqrestore(&unwind_lock, flags);
|
||||
raw_spin_unlock_irqrestore(&unwind_lock, flags);
|
||||
|
||||
return tab;
|
||||
}
|
||||
@ -543,9 +543,9 @@ void unwind_table_del(struct unwind_table *tab)
|
||||
if (!tab)
|
||||
return;
|
||||
|
||||
spin_lock_irqsave(&unwind_lock, flags);
|
||||
raw_spin_lock_irqsave(&unwind_lock, flags);
|
||||
list_del(&tab->list);
|
||||
spin_unlock_irqrestore(&unwind_lock, flags);
|
||||
raw_spin_unlock_irqrestore(&unwind_lock, flags);
|
||||
|
||||
kfree(tab);
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ $(obj)/csumpartialcopy.o: $(obj)/csumpartialcopygeneric.S
|
||||
$(obj)/csumpartialcopyuser.o: $(obj)/csumpartialcopygeneric.S
|
||||
|
||||
ifeq ($(CONFIG_KERNEL_MODE_NEON),y)
|
||||
NEON_FLAGS := -mfloat-abi=softfp -mfpu=neon
|
||||
NEON_FLAGS := -march=armv7-a -mfloat-abi=softfp -mfpu=neon
|
||||
CFLAGS_xor-neon.o += $(NEON_FLAGS)
|
||||
obj-$(CONFIG_XOR_BLOCKS) += xor-neon.o
|
||||
endif
|
||||
|
@ -14,7 +14,7 @@
|
||||
MODULE_LICENSE("GPL");
|
||||
|
||||
#ifndef __ARM_NEON__
|
||||
#error You should compile this file with '-mfloat-abi=softfp -mfpu=neon'
|
||||
#error You should compile this file with '-march=armv7-a -mfloat-abi=softfp -mfpu=neon'
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
@ -528,8 +528,10 @@ void omap_prm_reset_system(void)
|
||||
|
||||
prm_ll_data->reset_system();
|
||||
|
||||
while (1)
|
||||
while (1) {
|
||||
cpu_relax();
|
||||
wfe();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -139,6 +139,9 @@ __v7m_setup_cont:
|
||||
cpsie i
|
||||
svc #0
|
||||
1: cpsid i
|
||||
ldr r0, =exc_ret
|
||||
orr lr, lr, #EXC_RET_THREADMODE_PROCESSSTACK
|
||||
str lr, [r0]
|
||||
ldmia sp, {r0-r3, r12}
|
||||
str r5, [r12, #11 * 4] @ restore the original SVC vector entry
|
||||
mov lr, r6 @ restore LR
|
||||
|
@ -183,6 +183,7 @@ CONFIG_L2TP=y
|
||||
CONFIG_NET_SCHED=y
|
||||
CONFIG_NET_SCH_HTB=y
|
||||
CONFIG_NET_SCH_NETEM=y
|
||||
CONFIG_NET_SCH_INGRESS=y
|
||||
CONFIG_NET_CLS_U32=y
|
||||
CONFIG_NET_CLS_BPF=y
|
||||
CONFIG_NET_EMATCH=y
|
||||
@ -412,6 +413,7 @@ CONFIG_F2FS_FS_ENCRYPTION=y
|
||||
# CONFIG_DNOTIFY is not set
|
||||
CONFIG_QUOTA=y
|
||||
CONFIG_QFMT_V2=y
|
||||
CONFIG_OVERLAY_FS=y
|
||||
CONFIG_MSDOS_FS=y
|
||||
CONFIG_VFAT_FS=y
|
||||
CONFIG_TMPFS=y
|
||||
|
@ -876,11 +876,12 @@ void __init hook_debug_fault_code(int nr,
|
||||
debug_fault_info[nr].name = name;
|
||||
}
|
||||
|
||||
asmlinkage int __exception do_debug_exception(unsigned long addr,
|
||||
asmlinkage int __exception do_debug_exception(unsigned long addr_if_watchpoint,
|
||||
unsigned int esr,
|
||||
struct pt_regs *regs)
|
||||
{
|
||||
const struct fault_info *inf = debug_fault_info + DBG_ESR_EVT(esr);
|
||||
unsigned long pc = instruction_pointer(regs);
|
||||
struct siginfo info;
|
||||
int rv;
|
||||
|
||||
@ -891,19 +892,19 @@ asmlinkage int __exception do_debug_exception(unsigned long addr,
|
||||
if (interrupts_enabled(regs))
|
||||
trace_hardirqs_off();
|
||||
|
||||
if (user_mode(regs) && instruction_pointer(regs) > TASK_SIZE)
|
||||
if (user_mode(regs) && pc > TASK_SIZE)
|
||||
arm64_apply_bp_hardening();
|
||||
|
||||
if (!inf->fn(addr, esr, regs)) {
|
||||
if (!inf->fn(addr_if_watchpoint, esr, regs)) {
|
||||
rv = 1;
|
||||
} else {
|
||||
pr_alert("Unhandled debug exception: %s (0x%08x) at 0x%016lx\n",
|
||||
inf->name, esr, addr);
|
||||
inf->name, esr, pc);
|
||||
|
||||
info.si_signo = inf->sig;
|
||||
info.si_errno = 0;
|
||||
info.si_code = inf->code;
|
||||
info.si_addr = (void __user *)addr;
|
||||
info.si_addr = (void __user *)pc;
|
||||
arm64_notify_die("", regs, &info, 0);
|
||||
rv = 0;
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ KBUILD_AFLAGS += $(aflags-y)
|
||||
LDFLAGS += $(ldflags-y)
|
||||
|
||||
ifeq ($(CROSS_COMPILE),)
|
||||
CROSS_COMPILE := h8300-unknown-linux-
|
||||
CROSS_COMPILE := $(call cc-cross-prefix, h8300-unknown-linux- h8300-linux-)
|
||||
endif
|
||||
|
||||
core-y += arch/$(ARCH)/kernel/ arch/$(ARCH)/mm/
|
||||
|
@ -117,6 +117,8 @@ static inline int prrn_is_enabled(void)
|
||||
#define topology_sibling_cpumask(cpu) (per_cpu(cpu_sibling_map, cpu))
|
||||
#define topology_core_cpumask(cpu) (per_cpu(cpu_core_map, cpu))
|
||||
#define topology_core_id(cpu) (cpu_to_core_id(cpu))
|
||||
|
||||
int dlpar_cpu_readd(int cpu);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
#include <linux/mm.h>
|
||||
#include <linux/hugetlb.h>
|
||||
#include <linux/security.h>
|
||||
#include <asm/pgtable.h>
|
||||
#include <asm/pgalloc.h>
|
||||
#include <asm/cacheflush.h>
|
||||
@ -79,7 +80,7 @@ radix__hugetlb_get_unmapped_area(struct file *file, unsigned long addr,
|
||||
if (addr) {
|
||||
addr = ALIGN(addr, huge_page_size(h));
|
||||
vma = find_vma(mm, addr);
|
||||
if (high_limit - len >= addr &&
|
||||
if (high_limit - len >= addr && addr >= mmap_min_addr &&
|
||||
(!vma || addr + len <= vm_start_gap(vma)))
|
||||
return addr;
|
||||
}
|
||||
@ -89,7 +90,7 @@ radix__hugetlb_get_unmapped_area(struct file *file, unsigned long addr,
|
||||
*/
|
||||
info.flags = VM_UNMAPPED_AREA_TOPDOWN;
|
||||
info.length = len;
|
||||
info.low_limit = PAGE_SIZE;
|
||||
info.low_limit = max(PAGE_SIZE, mmap_min_addr);
|
||||
info.high_limit = mm->mmap_base + (high_limit - DEFAULT_MAP_WINDOW);
|
||||
info.align_mask = PAGE_MASK & ~huge_page_mask(h);
|
||||
info.align_offset = 0;
|
||||
|
@ -1527,13 +1527,6 @@ static void reset_topology_timer(void)
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
|
||||
static void stage_topology_update(int core_id)
|
||||
{
|
||||
cpumask_or(&cpu_associativity_changes_mask,
|
||||
&cpu_associativity_changes_mask, cpu_sibling_mask(core_id));
|
||||
reset_topology_timer();
|
||||
}
|
||||
|
||||
static int dt_update_callback(struct notifier_block *nb,
|
||||
unsigned long action, void *data)
|
||||
{
|
||||
@ -1546,7 +1539,7 @@ static int dt_update_callback(struct notifier_block *nb,
|
||||
!of_prop_cmp(update->prop->name, "ibm,associativity")) {
|
||||
u32 core_id;
|
||||
of_property_read_u32(update->dn, "reg", &core_id);
|
||||
stage_topology_update(core_id);
|
||||
rc = dlpar_cpu_readd(core_id);
|
||||
rc = NOTIFY_OK;
|
||||
}
|
||||
break;
|
||||
|
@ -799,6 +799,25 @@ static int dlpar_cpu_add_by_count(u32 cpus_to_add)
|
||||
return rc;
|
||||
}
|
||||
|
||||
int dlpar_cpu_readd(int cpu)
|
||||
{
|
||||
struct device_node *dn;
|
||||
struct device *dev;
|
||||
u32 drc_index;
|
||||
int rc;
|
||||
|
||||
dev = get_cpu_device(cpu);
|
||||
dn = dev->of_node;
|
||||
|
||||
rc = of_property_read_u32(dn, "ibm,my-drc-index", &drc_index);
|
||||
|
||||
rc = dlpar_cpu_remove_by_index(drc_index);
|
||||
if (!rc)
|
||||
rc = dlpar_cpu_add(drc_index);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
int dlpar_cpu(struct pseries_hp_errorlog *hp_elog)
|
||||
{
|
||||
u32 count, drc_index;
|
||||
|
@ -162,7 +162,7 @@ int print_insn_powerpc (unsigned long insn, unsigned long memaddr)
|
||||
dialect |= (PPC_OPCODE_POWER5 | PPC_OPCODE_POWER6 | PPC_OPCODE_POWER7
|
||||
| PPC_OPCODE_POWER8 | PPC_OPCODE_POWER9 | PPC_OPCODE_HTM
|
||||
| PPC_OPCODE_ALTIVEC | PPC_OPCODE_ALTIVEC2
|
||||
| PPC_OPCODE_VSX | PPC_OPCODE_VSX3),
|
||||
| PPC_OPCODE_VSX | PPC_OPCODE_VSX3);
|
||||
|
||||
/* Get the major opcode of the insn. */
|
||||
opcode = NULL;
|
||||
|
@ -100,7 +100,7 @@ $(obj)/zoffset.h: $(obj)/compressed/vmlinux FORCE
|
||||
AFLAGS_header.o += -I$(objtree)/$(obj)
|
||||
$(obj)/header.o: $(obj)/zoffset.h
|
||||
|
||||
LDFLAGS_setup.elf := -T
|
||||
LDFLAGS_setup.elf := -m elf_i386 -T
|
||||
$(obj)/setup.elf: $(src)/setup.ld $(SETUP_OBJS) FORCE
|
||||
$(call if_changed,ld)
|
||||
|
||||
|
@ -191,6 +191,7 @@ CONFIG_IP6_NF_RAW=y
|
||||
CONFIG_NET_SCHED=y
|
||||
CONFIG_NET_SCH_HTB=y
|
||||
CONFIG_NET_SCH_NETEM=y
|
||||
CONFIG_NET_SCH_INGRESS=y
|
||||
CONFIG_NET_CLS_U32=y
|
||||
CONFIG_NET_CLS_BPF=y
|
||||
CONFIG_NET_EMATCH=y
|
||||
@ -425,6 +426,7 @@ CONFIG_QUOTA_NETLINK_INTERFACE=y
|
||||
# CONFIG_PRINT_QUOTA_WARNING is not set
|
||||
CONFIG_QFMT_V2=y
|
||||
CONFIG_AUTOFS4_FS=y
|
||||
CONFIG_OVERLAY_FS=y
|
||||
CONFIG_MSDOS_FS=y
|
||||
CONFIG_VFAT_FS=y
|
||||
CONFIG_PROC_KCORE=y
|
||||
|
@ -390,7 +390,7 @@ SECTIONS
|
||||
* Per-cpu symbols which need to be offset from __per_cpu_load
|
||||
* for the boot processor.
|
||||
*/
|
||||
#define INIT_PER_CPU(x) init_per_cpu__##x = x + __per_cpu_load
|
||||
#define INIT_PER_CPU(x) init_per_cpu__##x = ABSOLUTE(x) + __per_cpu_load
|
||||
INIT_PER_CPU(gdt_page);
|
||||
INIT_PER_CPU(irq_stack_union);
|
||||
|
||||
|
@ -47,7 +47,7 @@ $(obj)/pasyms.h: $(REALMODE_OBJS) FORCE
|
||||
targets += realmode.lds
|
||||
$(obj)/realmode.lds: $(obj)/pasyms.h
|
||||
|
||||
LDFLAGS_realmode.elf := --emit-relocs -T
|
||||
LDFLAGS_realmode.elf := -m elf_i386 --emit-relocs -T
|
||||
CPPFLAGS_realmode.lds += -P -C -I$(objtree)/$(obj)
|
||||
|
||||
targets += realmode.elf
|
||||
|
@ -2123,21 +2123,29 @@ static int __init intel_opregion_present(void)
|
||||
return opregion;
|
||||
}
|
||||
|
||||
/* Check if the chassis-type indicates there is no builtin LCD panel */
|
||||
static bool dmi_is_desktop(void)
|
||||
{
|
||||
const char *chassis_type;
|
||||
unsigned long type;
|
||||
|
||||
chassis_type = dmi_get_system_info(DMI_CHASSIS_TYPE);
|
||||
if (!chassis_type)
|
||||
return false;
|
||||
|
||||
if (!strcmp(chassis_type, "3") || /* 3: Desktop */
|
||||
!strcmp(chassis_type, "4") || /* 4: Low Profile Desktop */
|
||||
!strcmp(chassis_type, "5") || /* 5: Pizza Box */
|
||||
!strcmp(chassis_type, "6") || /* 6: Mini Tower */
|
||||
!strcmp(chassis_type, "7") || /* 7: Tower */
|
||||
!strcmp(chassis_type, "11")) /* 11: Main Server Chassis */
|
||||
if (kstrtoul(chassis_type, 10, &type) != 0)
|
||||
return false;
|
||||
|
||||
switch (type) {
|
||||
case 0x03: /* Desktop */
|
||||
case 0x04: /* Low Profile Desktop */
|
||||
case 0x05: /* Pizza Box */
|
||||
case 0x06: /* Mini Tower */
|
||||
case 0x07: /* Tower */
|
||||
case 0x10: /* Lunch Box */
|
||||
case 0x11: /* Main Server Chassis */
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -265,6 +265,7 @@
|
||||
/* #define ERRLOGMASK (CD_WARNING|CD_OPEN|CD_COUNT_TRACKS|CD_CLOSE) */
|
||||
/* #define ERRLOGMASK (CD_WARNING|CD_REG_UNREG|CD_DO_IOCTL|CD_OPEN|CD_CLOSE|CD_COUNT_TRACKS) */
|
||||
|
||||
#include <linux/atomic.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/major.h>
|
||||
@ -3689,9 +3690,9 @@ static struct ctl_table_header *cdrom_sysctl_header;
|
||||
|
||||
static void cdrom_sysctl_register(void)
|
||||
{
|
||||
static int initialized;
|
||||
static atomic_t initialized = ATOMIC_INIT(0);
|
||||
|
||||
if (initialized == 1)
|
||||
if (!atomic_add_unless(&initialized, 1, 1))
|
||||
return;
|
||||
|
||||
cdrom_sysctl_header = register_sysctl_table(cdrom_root_table);
|
||||
@ -3702,8 +3703,6 @@ static void cdrom_sysctl_register(void)
|
||||
cdrom_sysctl_settings.debug = debug;
|
||||
cdrom_sysctl_settings.lock = lockdoor;
|
||||
cdrom_sysctl_settings.check = check_media_type;
|
||||
|
||||
initialized = 1;
|
||||
}
|
||||
|
||||
static void cdrom_sysctl_unregister(void)
|
||||
|
@ -377,7 +377,7 @@ static __init int hpet_mmap_enable(char *str)
|
||||
pr_info("HPET mmap %s\n", hpet_mmap_enabled ? "enabled" : "disabled");
|
||||
return 1;
|
||||
}
|
||||
__setup("hpet_mmap", hpet_mmap_enable);
|
||||
__setup("hpet_mmap=", hpet_mmap_enable);
|
||||
|
||||
static int hpet_mmap(struct file *file, struct vm_area_struct *vma)
|
||||
{
|
||||
|
@ -73,7 +73,7 @@ static int virtio_read(struct hwrng *rng, void *buf, size_t size, bool wait)
|
||||
|
||||
if (!vi->busy) {
|
||||
vi->busy = true;
|
||||
init_completion(&vi->have_data);
|
||||
reinit_completion(&vi->have_data);
|
||||
register_buffer(vi, buf, size);
|
||||
}
|
||||
|
||||
|
@ -77,7 +77,7 @@ static long clk_fd_round_rate(struct clk_hw *hw, unsigned long rate,
|
||||
unsigned long m, n;
|
||||
u64 ret;
|
||||
|
||||
if (!rate || rate >= *parent_rate)
|
||||
if (!rate || (!clk_hw_can_set_rate_parent(hw) && rate >= *parent_rate))
|
||||
return *parent_rate;
|
||||
|
||||
if (fd->approximation)
|
||||
|
@ -78,17 +78,17 @@ static struct rockchip_pll_rate_table rk3328_pll_rates[] = {
|
||||
|
||||
static struct rockchip_pll_rate_table rk3328_pll_frac_rates[] = {
|
||||
/* _mhz, _refdiv, _fbdiv, _postdiv1, _postdiv2, _dsmpd, _frac */
|
||||
RK3036_PLL_RATE(1016064000, 3, 127, 1, 1, 0, 134217),
|
||||
RK3036_PLL_RATE(1016064000, 3, 127, 1, 1, 0, 134218),
|
||||
/* vco = 1016064000 */
|
||||
RK3036_PLL_RATE(983040000, 24, 983, 1, 1, 0, 671088),
|
||||
RK3036_PLL_RATE(983040000, 24, 983, 1, 1, 0, 671089),
|
||||
/* vco = 983040000 */
|
||||
RK3036_PLL_RATE(491520000, 24, 983, 2, 1, 0, 671088),
|
||||
RK3036_PLL_RATE(491520000, 24, 983, 2, 1, 0, 671089),
|
||||
/* vco = 983040000 */
|
||||
RK3036_PLL_RATE(61440000, 6, 215, 7, 2, 0, 671088),
|
||||
RK3036_PLL_RATE(61440000, 6, 215, 7, 2, 0, 671089),
|
||||
/* vco = 860156000 */
|
||||
RK3036_PLL_RATE(56448000, 12, 451, 4, 4, 0, 9797894),
|
||||
RK3036_PLL_RATE(56448000, 12, 451, 4, 4, 0, 9797895),
|
||||
/* vco = 903168000 */
|
||||
RK3036_PLL_RATE(40960000, 12, 409, 4, 5, 0, 10066329),
|
||||
RK3036_PLL_RATE(40960000, 12, 409, 4, 5, 0, 10066330),
|
||||
/* vco = 819200000 */
|
||||
{ /* sentinel */ },
|
||||
};
|
||||
|
@ -909,8 +909,10 @@ static void __init acpi_cpufreq_boost_init(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if (!(boot_cpu_has(X86_FEATURE_CPB) || boot_cpu_has(X86_FEATURE_IDA)))
|
||||
if (!(boot_cpu_has(X86_FEATURE_CPB) || boot_cpu_has(X86_FEATURE_IDA))) {
|
||||
pr_debug("Boost capabilities not present in the processor\n");
|
||||
return;
|
||||
}
|
||||
|
||||
acpi_cpufreq_driver.set_boost = set_boost;
|
||||
acpi_cpufreq_driver.boost_enabled = boost_state(0);
|
||||
|
@ -80,8 +80,10 @@ void ppc4xx_trng_probe(struct crypto4xx_core_device *core_dev)
|
||||
|
||||
/* Find the TRNG device node and map it */
|
||||
trng = of_find_matching_node(NULL, ppc4xx_trng_match);
|
||||
if (!trng || !of_device_is_available(trng))
|
||||
if (!trng || !of_device_is_available(trng)) {
|
||||
of_node_put(trng);
|
||||
return;
|
||||
}
|
||||
|
||||
dev->trng_base = of_iomap(trng, 0);
|
||||
of_node_put(trng);
|
||||
|
@ -351,6 +351,7 @@ static struct pci_driver zip_driver = {
|
||||
|
||||
static struct crypto_alg zip_comp_deflate = {
|
||||
.cra_name = "deflate",
|
||||
.cra_driver_name = "deflate-cavium",
|
||||
.cra_flags = CRYPTO_ALG_TYPE_COMPRESS,
|
||||
.cra_ctxsize = sizeof(struct zip_kernel_ctx),
|
||||
.cra_priority = 300,
|
||||
@ -365,6 +366,7 @@ static struct crypto_alg zip_comp_deflate = {
|
||||
|
||||
static struct crypto_alg zip_comp_lzs = {
|
||||
.cra_name = "lzs",
|
||||
.cra_driver_name = "lzs-cavium",
|
||||
.cra_flags = CRYPTO_ALG_TYPE_COMPRESS,
|
||||
.cra_ctxsize = sizeof(struct zip_kernel_ctx),
|
||||
.cra_priority = 300,
|
||||
@ -384,7 +386,7 @@ static struct scomp_alg zip_scomp_deflate = {
|
||||
.decompress = zip_scomp_decompress,
|
||||
.base = {
|
||||
.cra_name = "deflate",
|
||||
.cra_driver_name = "deflate-scomp",
|
||||
.cra_driver_name = "deflate-scomp-cavium",
|
||||
.cra_module = THIS_MODULE,
|
||||
.cra_priority = 300,
|
||||
}
|
||||
@ -397,7 +399,7 @@ static struct scomp_alg zip_scomp_lzs = {
|
||||
.decompress = zip_scomp_decompress,
|
||||
.base = {
|
||||
.cra_name = "lzs",
|
||||
.cra_driver_name = "lzs-scomp",
|
||||
.cra_driver_name = "lzs-scomp-cavium",
|
||||
.cra_module = THIS_MODULE,
|
||||
.cra_priority = 300,
|
||||
}
|
||||
|
@ -290,7 +290,7 @@ static inline int imxdma_sg_next(struct imxdma_desc *d)
|
||||
struct scatterlist *sg = d->sg;
|
||||
unsigned long now;
|
||||
|
||||
now = min(d->len, sg_dma_len(sg));
|
||||
now = min_t(size_t, d->len, sg_dma_len(sg));
|
||||
if (d->len != IMX_DMA_LENGTH_LOOP)
|
||||
d->len -= now;
|
||||
|
||||
|
@ -133,24 +133,25 @@ static void hidma_process_completed(struct hidma_chan *mchan)
|
||||
desc = &mdesc->desc;
|
||||
last_cookie = desc->cookie;
|
||||
|
||||
llstat = hidma_ll_status(mdma->lldev, mdesc->tre_ch);
|
||||
|
||||
spin_lock_irqsave(&mchan->lock, irqflags);
|
||||
if (llstat == DMA_COMPLETE) {
|
||||
mchan->last_success = last_cookie;
|
||||
result.result = DMA_TRANS_NOERROR;
|
||||
} else {
|
||||
result.result = DMA_TRANS_ABORTED;
|
||||
}
|
||||
|
||||
dma_cookie_complete(desc);
|
||||
spin_unlock_irqrestore(&mchan->lock, irqflags);
|
||||
|
||||
llstat = hidma_ll_status(mdma->lldev, mdesc->tre_ch);
|
||||
dmaengine_desc_get_callback(desc, &cb);
|
||||
|
||||
dma_run_dependencies(desc);
|
||||
|
||||
spin_lock_irqsave(&mchan->lock, irqflags);
|
||||
list_move(&mdesc->node, &mchan->free);
|
||||
|
||||
if (llstat == DMA_COMPLETE) {
|
||||
mchan->last_success = last_cookie;
|
||||
result.result = DMA_TRANS_NOERROR;
|
||||
} else
|
||||
result.result = DMA_TRANS_ABORTED;
|
||||
|
||||
spin_unlock_irqrestore(&mchan->lock, irqflags);
|
||||
|
||||
dmaengine_desc_callback_invoke(&cb, &result);
|
||||
@ -410,6 +411,7 @@ hidma_prep_dma_memcpy(struct dma_chan *dmach, dma_addr_t dest, dma_addr_t src,
|
||||
if (!mdesc)
|
||||
return NULL;
|
||||
|
||||
mdesc->desc.flags = flags;
|
||||
hidma_ll_set_transfer_params(mdma->lldev, mdesc->tre_ch,
|
||||
src, dest, len, flags,
|
||||
HIDMA_TRE_MEMCPY);
|
||||
@ -442,6 +444,7 @@ hidma_prep_dma_memset(struct dma_chan *dmach, dma_addr_t dest, int value,
|
||||
if (!mdesc)
|
||||
return NULL;
|
||||
|
||||
mdesc->desc.flags = flags;
|
||||
hidma_ll_set_transfer_params(mdma->lldev, mdesc->tre_ch,
|
||||
value, dest, len, flags,
|
||||
HIDMA_TRE_MEMSET);
|
||||
|
@ -635,7 +635,10 @@ static void handle_cont_sngl_cycle_dma_done(struct tegra_dma_channel *tdc,
|
||||
|
||||
sgreq = list_first_entry(&tdc->pending_sg_req, typeof(*sgreq), node);
|
||||
dma_desc = sgreq->dma_desc;
|
||||
dma_desc->bytes_transferred += sgreq->req_len;
|
||||
/* if we dma for long enough the transfer count will wrap */
|
||||
dma_desc->bytes_transferred =
|
||||
(dma_desc->bytes_transferred + sgreq->req_len) %
|
||||
dma_desc->bytes_requested;
|
||||
|
||||
/* Callback need to be call */
|
||||
if (!dma_desc->cb_count)
|
||||
|
@ -641,19 +641,24 @@ EXPORT_SYMBOL_GPL(cper_estatus_check_header);
|
||||
int cper_estatus_check(const struct acpi_hest_generic_status *estatus)
|
||||
{
|
||||
struct acpi_hest_generic_data *gdata;
|
||||
unsigned int data_len, gedata_len;
|
||||
unsigned int data_len, record_size;
|
||||
int rc;
|
||||
|
||||
rc = cper_estatus_check_header(estatus);
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
data_len = estatus->data_length;
|
||||
|
||||
apei_estatus_for_each_section(estatus, gdata) {
|
||||
gedata_len = acpi_hest_get_error_length(gdata);
|
||||
if (gedata_len > data_len - acpi_hest_get_size(gdata))
|
||||
if (sizeof(struct acpi_hest_generic_data) > data_len)
|
||||
return -EINVAL;
|
||||
data_len -= acpi_hest_get_record_size(gdata);
|
||||
|
||||
record_size = acpi_hest_get_record_size(gdata);
|
||||
if (record_size > data_len)
|
||||
return -EINVAL;
|
||||
|
||||
data_len -= record_size;
|
||||
}
|
||||
if (data_len)
|
||||
return -EINVAL;
|
||||
|
@ -364,6 +364,11 @@ void efi_get_virtmap(efi_memory_desc_t *memory_map, unsigned long map_size,
|
||||
paddr = in->phys_addr;
|
||||
size = in->num_pages * EFI_PAGE_SIZE;
|
||||
|
||||
if (novamap()) {
|
||||
in->virt_addr = in->phys_addr;
|
||||
continue;
|
||||
}
|
||||
|
||||
/*
|
||||
* Make the mapping compatible with 64k pages: this allows
|
||||
* a 4k page size kernel to kexec a 64k page size kernel and
|
||||
|
@ -34,6 +34,7 @@ static unsigned long __chunk_size = EFI_READ_CHUNK_SIZE;
|
||||
|
||||
static int __section(.data) __nokaslr;
|
||||
static int __section(.data) __quiet;
|
||||
static int __section(.data) __novamap;
|
||||
|
||||
int __pure nokaslr(void)
|
||||
{
|
||||
@ -43,6 +44,10 @@ int __pure is_quiet(void)
|
||||
{
|
||||
return __quiet;
|
||||
}
|
||||
int __pure novamap(void)
|
||||
{
|
||||
return __novamap;
|
||||
}
|
||||
|
||||
#define EFI_MMAP_NR_SLACK_SLOTS 8
|
||||
|
||||
@ -454,6 +459,11 @@ efi_status_t efi_parse_options(char const *cmdline)
|
||||
__chunk_size = -1UL;
|
||||
}
|
||||
|
||||
if (!strncmp(str, "novamap", 7)) {
|
||||
str += strlen("novamap");
|
||||
__novamap = 1;
|
||||
}
|
||||
|
||||
/* Group words together, delimited by "," */
|
||||
while (*str && *str != ' ' && *str != ',')
|
||||
str++;
|
||||
|
@ -27,6 +27,7 @@
|
||||
|
||||
extern int __pure nokaslr(void);
|
||||
extern int __pure is_quiet(void);
|
||||
extern int __pure novamap(void);
|
||||
|
||||
#define pr_efi(sys_table, msg) do { \
|
||||
if (!is_quiet()) efi_printk(sys_table, "EFI stub: "msg); \
|
||||
|
@ -327,6 +327,9 @@ efi_status_t allocate_new_fdt_and_exit_boot(efi_system_table_t *sys_table,
|
||||
if (status == EFI_SUCCESS) {
|
||||
efi_set_virtual_address_map_t *svam;
|
||||
|
||||
if (novamap())
|
||||
return EFI_SUCCESS;
|
||||
|
||||
/* Install the new virtual address map */
|
||||
svam = sys_table->runtime->set_virtual_address_map;
|
||||
status = svam(runtime_entry_count * desc_size, desc_size,
|
||||
|
@ -94,7 +94,7 @@ static bool entry_is_valid(const efi_memory_desc_t *in, efi_memory_desc_t *out)
|
||||
|
||||
if (!(md->attribute & EFI_MEMORY_RUNTIME))
|
||||
continue;
|
||||
if (md->virt_addr == 0) {
|
||||
if (md->virt_addr == 0 && md->phys_addr != 0) {
|
||||
/* no virtual mapping has been installed by the stub */
|
||||
break;
|
||||
}
|
||||
|
@ -841,14 +841,16 @@ static void omap_gpio_unmask_irq(struct irq_data *d)
|
||||
if (trigger)
|
||||
omap_set_gpio_triggering(bank, offset, trigger);
|
||||
|
||||
/* For level-triggered GPIOs, the clearing must be done after
|
||||
* the HW source is cleared, thus after the handler has run */
|
||||
if (bank->level_mask & BIT(offset)) {
|
||||
omap_set_gpio_irqenable(bank, offset, 0);
|
||||
omap_clear_gpio_irqstatus(bank, offset);
|
||||
}
|
||||
|
||||
omap_set_gpio_irqenable(bank, offset, 1);
|
||||
|
||||
/*
|
||||
* For level-triggered GPIOs, clearing must be done after the source
|
||||
* is cleared, thus after the handler has run. OMAP4 needs this done
|
||||
* after enabing the interrupt to clear the wakeup status.
|
||||
*/
|
||||
if (bank->level_mask & BIT(offset))
|
||||
omap_clear_gpio_irqstatus(bank, offset);
|
||||
|
||||
raw_spin_unlock_irqrestore(&bank->lock, flags);
|
||||
}
|
||||
|
||||
|
@ -3363,6 +3363,7 @@ static int drm_dp_mst_i2c_xfer(struct i2c_adapter *adapter, struct i2c_msg *msgs
|
||||
msg.u.i2c_read.transactions[i].i2c_dev_id = msgs[i].addr;
|
||||
msg.u.i2c_read.transactions[i].num_bytes = msgs[i].len;
|
||||
msg.u.i2c_read.transactions[i].bytes = msgs[i].buf;
|
||||
msg.u.i2c_read.transactions[i].no_stop_bit = !(msgs[i].flags & I2C_M_STOP);
|
||||
}
|
||||
msg.u.i2c_read.read_i2c_device_id = msgs[num - 1].addr;
|
||||
msg.u.i2c_read.num_bytes_read = msgs[num - 1].len;
|
||||
|
@ -203,6 +203,9 @@ int drm_universal_plane_init(struct drm_device *dev, struct drm_plane *plane,
|
||||
format_modifier_count++;
|
||||
}
|
||||
|
||||
if (format_modifier_count)
|
||||
config->allow_fb_modifiers = true;
|
||||
|
||||
plane->modifier_count = format_modifier_count;
|
||||
plane->modifiers = kmalloc_array(format_modifier_count,
|
||||
sizeof(format_modifiers[0]),
|
||||
|
@ -750,7 +750,9 @@ static int nv17_tv_set_property(struct drm_encoder *encoder,
|
||||
/* Disable the crtc to ensure a full modeset is
|
||||
* performed whenever it's turned on again. */
|
||||
if (crtc)
|
||||
drm_crtc_force_disable(crtc);
|
||||
drm_crtc_helper_set_mode(crtc, &crtc->mode,
|
||||
crtc->x, crtc->y,
|
||||
crtc->primary->fb);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -91,7 +91,10 @@ static bool check_generated_interrupt(struct ishtp_device *dev)
|
||||
IPC_INT_FROM_ISH_TO_HOST_CHV_AB(pisr_val);
|
||||
} else {
|
||||
pisr_val = ish_reg_read(dev, IPC_REG_PISR_BXT);
|
||||
interrupt_generated = IPC_INT_FROM_ISH_TO_HOST_BXT(pisr_val);
|
||||
interrupt_generated = !!pisr_val;
|
||||
/* only busy-clear bit is RW, others are RO */
|
||||
if (pisr_val)
|
||||
ish_reg_write(dev, IPC_REG_PISR_BXT, pisr_val);
|
||||
}
|
||||
|
||||
return interrupt_generated;
|
||||
@ -843,11 +846,11 @@ int ish_hw_start(struct ishtp_device *dev)
|
||||
{
|
||||
ish_set_host_rdy(dev);
|
||||
|
||||
set_host_ready(dev);
|
||||
|
||||
/* After that we can enable ISH DMA operation and wakeup ISHFW */
|
||||
ish_wakeup(dev);
|
||||
|
||||
set_host_ready(dev);
|
||||
|
||||
/* wait for FW-initiated reset flow */
|
||||
if (!dev->recvd_hw_ready)
|
||||
wait_event_interruptible_timeout(dev->wait_hw_ready,
|
||||
|
@ -623,7 +623,8 @@ int ishtp_cl_device_bind(struct ishtp_cl *cl)
|
||||
spin_lock_irqsave(&cl->dev->device_list_lock, flags);
|
||||
list_for_each_entry(cl_device, &cl->dev->device_list,
|
||||
device_link) {
|
||||
if (cl_device->fw_client->client_id == cl->fw_client_id) {
|
||||
if (cl_device->fw_client &&
|
||||
cl_device->fw_client->client_id == cl->fw_client_id) {
|
||||
cl->device = cl_device;
|
||||
rv = 0;
|
||||
break;
|
||||
@ -683,6 +684,7 @@ void ishtp_bus_remove_all_clients(struct ishtp_device *ishtp_dev,
|
||||
spin_lock_irqsave(&ishtp_dev->device_list_lock, flags);
|
||||
list_for_each_entry_safe(cl_device, n, &ishtp_dev->device_list,
|
||||
device_link) {
|
||||
cl_device->fw_client = NULL;
|
||||
if (warm_reset && cl_device->reference_count)
|
||||
continue;
|
||||
|
||||
|
@ -423,18 +423,14 @@ static irqreturn_t pm8xxx_eoc_irq(int irq, void *d)
|
||||
static struct pm8xxx_chan_info *
|
||||
pm8xxx_get_channel(struct pm8xxx_xoadc *adc, u8 chan)
|
||||
{
|
||||
struct pm8xxx_chan_info *ch;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < adc->nchans; i++) {
|
||||
ch = &adc->chans[i];
|
||||
struct pm8xxx_chan_info *ch = &adc->chans[i];
|
||||
if (ch->hwchan->amux_channel == chan)
|
||||
break;
|
||||
return ch;
|
||||
}
|
||||
if (i == adc->nchans)
|
||||
return NULL;
|
||||
|
||||
return ch;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static int pm8xxx_read_channel_rsv(struct pm8xxx_xoadc *adc,
|
||||
|
@ -1884,8 +1884,10 @@ static int abort_rpl(struct c4iw_dev *dev, struct sk_buff *skb)
|
||||
}
|
||||
mutex_unlock(&ep->com.mutex);
|
||||
|
||||
if (release)
|
||||
if (release) {
|
||||
close_complete_upcall(ep, -ECONNRESET);
|
||||
release_ep_resources(ep);
|
||||
}
|
||||
c4iw_put_ep(&ep->com);
|
||||
return 0;
|
||||
}
|
||||
@ -3584,7 +3586,6 @@ int c4iw_ep_disconnect(struct c4iw_ep *ep, int abrupt, gfp_t gfp)
|
||||
if (close) {
|
||||
if (abrupt) {
|
||||
set_bit(EP_DISC_ABORT, &ep->com.history);
|
||||
close_complete_upcall(ep, -ECONNRESET);
|
||||
ret = send_abort(ep);
|
||||
} else {
|
||||
set_bit(EP_DISC_CLOSE, &ep->com.history);
|
||||
|
@ -39,7 +39,7 @@
|
||||
|
||||
#include "mlx4_ib.h"
|
||||
|
||||
#define CM_CLEANUP_CACHE_TIMEOUT (5 * HZ)
|
||||
#define CM_CLEANUP_CACHE_TIMEOUT (30 * HZ)
|
||||
|
||||
struct id_map_entry {
|
||||
struct rb_node node;
|
||||
|
@ -217,7 +217,8 @@ static void *__arm_v7s_alloc_table(int lvl, gfp_t gfp,
|
||||
if (dma != phys)
|
||||
goto out_unmap;
|
||||
}
|
||||
kmemleak_ignore(table);
|
||||
if (lvl == 2)
|
||||
kmemleak_ignore(table);
|
||||
return table;
|
||||
|
||||
out_unmap:
|
||||
|
@ -201,7 +201,7 @@ static void lp55xx_firmware_loaded(const struct firmware *fw, void *context)
|
||||
|
||||
if (!fw) {
|
||||
dev_err(dev, "firmware request failed\n");
|
||||
goto out;
|
||||
return;
|
||||
}
|
||||
|
||||
/* handling firmware data is chip dependent */
|
||||
@ -214,9 +214,9 @@ static void lp55xx_firmware_loaded(const struct firmware *fw, void *context)
|
||||
|
||||
mutex_unlock(&chip->lock);
|
||||
|
||||
out:
|
||||
/* firmware should be released for other channel use */
|
||||
release_firmware(chip->fw);
|
||||
chip->fw = NULL;
|
||||
}
|
||||
|
||||
static int lp55xx_request_firmware(struct lp55xx_chip *chip)
|
||||
|
@ -217,7 +217,9 @@ STORE(__cached_dev)
|
||||
d_strtoul(writeback_rate_d_term);
|
||||
d_strtoul_nonzero(writeback_rate_p_term_inverse);
|
||||
|
||||
d_strtoi_h(sequential_cutoff);
|
||||
sysfs_strtoul_clamp(sequential_cutoff,
|
||||
dc->sequential_cutoff,
|
||||
0, UINT_MAX);
|
||||
d_strtoi_h(readahead);
|
||||
|
||||
if (attr == &sysfs_clear_stats)
|
||||
@ -660,8 +662,17 @@ STORE(__bch_cache_set)
|
||||
c->error_limit = strtoul_or_return(buf) << IO_ERROR_SHIFT;
|
||||
|
||||
/* See count_io_errors() for why 88 */
|
||||
if (attr == &sysfs_io_error_halflife)
|
||||
c->error_decay = strtoul_or_return(buf) / 88;
|
||||
if (attr == &sysfs_io_error_halflife) {
|
||||
unsigned long v = 0;
|
||||
ssize_t ret;
|
||||
|
||||
ret = strtoul_safe_clamp(buf, v, 0, UINT_MAX);
|
||||
if (!ret) {
|
||||
c->error_decay = v / 88;
|
||||
return size;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
sysfs_strtoul(journal_delay_ms, c->journal_delay_ms);
|
||||
sysfs_strtoul(verify, c->verify);
|
||||
|
@ -81,9 +81,16 @@ do { \
|
||||
|
||||
#define sysfs_strtoul_clamp(file, var, min, max) \
|
||||
do { \
|
||||
if (attr == &sysfs_ ## file) \
|
||||
return strtoul_safe_clamp(buf, var, min, max) \
|
||||
?: (ssize_t) size; \
|
||||
if (attr == &sysfs_ ## file) { \
|
||||
unsigned long v = 0; \
|
||||
ssize_t ret; \
|
||||
ret = strtoul_safe_clamp(buf, v, min, max); \
|
||||
if (!ret) { \
|
||||
var = v; \
|
||||
return size; \
|
||||
} \
|
||||
return ret; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define strtoul_or_return(cp) \
|
||||
|
@ -3292,6 +3292,13 @@ static int pool_ctr(struct dm_target *ti, unsigned argc, char **argv)
|
||||
as.argc = argc;
|
||||
as.argv = argv;
|
||||
|
||||
/* make sure metadata and data are different devices */
|
||||
if (!strcmp(argv[0], argv[1])) {
|
||||
ti->error = "Error setting metadata or data device";
|
||||
r = -EINVAL;
|
||||
goto out_unlock;
|
||||
}
|
||||
|
||||
/*
|
||||
* Set default pool features.
|
||||
*/
|
||||
@ -4173,6 +4180,12 @@ static int thin_ctr(struct dm_target *ti, unsigned argc, char **argv)
|
||||
tc->sort_bio_list = RB_ROOT;
|
||||
|
||||
if (argc == 3) {
|
||||
if (!strcmp(argv[0], argv[2])) {
|
||||
ti->error = "Error setting origin device";
|
||||
r = -EINVAL;
|
||||
goto bad_origin_dev;
|
||||
}
|
||||
|
||||
r = dm_get_device(ti, argv[2], FMODE_READ, &origin_dev);
|
||||
if (r) {
|
||||
ti->error = "Error opening origin device";
|
||||
|
@ -974,6 +974,8 @@ static int mt9m111_probe(struct i2c_client *client,
|
||||
mt9m111->rect.top = MT9M111_MIN_DARK_ROWS;
|
||||
mt9m111->rect.width = MT9M111_MAX_WIDTH;
|
||||
mt9m111->rect.height = MT9M111_MAX_HEIGHT;
|
||||
mt9m111->width = mt9m111->rect.width;
|
||||
mt9m111->height = mt9m111->rect.height;
|
||||
mt9m111->fmt = &mt9m111_colour_fmts[0];
|
||||
mt9m111->lastpage = -1;
|
||||
mutex_init(&mt9m111->power_lock);
|
||||
|
@ -702,7 +702,7 @@ end:
|
||||
v4l2_m2m_buf_queue(ctx->fh.m2m_ctx, to_vb2_v4l2_buffer(vb));
|
||||
}
|
||||
|
||||
static void *mtk_jpeg_buf_remove(struct mtk_jpeg_ctx *ctx,
|
||||
static struct vb2_v4l2_buffer *mtk_jpeg_buf_remove(struct mtk_jpeg_ctx *ctx,
|
||||
enum v4l2_buf_type type)
|
||||
{
|
||||
if (V4L2_TYPE_IS_OUTPUT(type))
|
||||
@ -714,7 +714,7 @@ static void *mtk_jpeg_buf_remove(struct mtk_jpeg_ctx *ctx,
|
||||
static int mtk_jpeg_start_streaming(struct vb2_queue *q, unsigned int count)
|
||||
{
|
||||
struct mtk_jpeg_ctx *ctx = vb2_get_drv_priv(q);
|
||||
struct vb2_buffer *vb;
|
||||
struct vb2_v4l2_buffer *vb;
|
||||
int ret = 0;
|
||||
|
||||
ret = pm_runtime_get_sync(ctx->jpeg->dev);
|
||||
@ -724,14 +724,14 @@ static int mtk_jpeg_start_streaming(struct vb2_queue *q, unsigned int count)
|
||||
return 0;
|
||||
err:
|
||||
while ((vb = mtk_jpeg_buf_remove(ctx, q->type)))
|
||||
v4l2_m2m_buf_done(to_vb2_v4l2_buffer(vb), VB2_BUF_STATE_QUEUED);
|
||||
v4l2_m2m_buf_done(vb, VB2_BUF_STATE_QUEUED);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void mtk_jpeg_stop_streaming(struct vb2_queue *q)
|
||||
{
|
||||
struct mtk_jpeg_ctx *ctx = vb2_get_drv_priv(q);
|
||||
struct vb2_buffer *vb;
|
||||
struct vb2_v4l2_buffer *vb;
|
||||
|
||||
/*
|
||||
* STREAMOFF is an acknowledgment for source change event.
|
||||
@ -743,7 +743,7 @@ static void mtk_jpeg_stop_streaming(struct vb2_queue *q)
|
||||
struct mtk_jpeg_src_buf *src_buf;
|
||||
|
||||
vb = v4l2_m2m_next_src_buf(ctx->fh.m2m_ctx);
|
||||
src_buf = mtk_jpeg_vb2_to_srcbuf(vb);
|
||||
src_buf = mtk_jpeg_vb2_to_srcbuf(&vb->vb2_buf);
|
||||
mtk_jpeg_set_queue_data(ctx, &src_buf->dec_param);
|
||||
ctx->state = MTK_JPEG_RUNNING;
|
||||
} else if (V4L2_TYPE_IS_OUTPUT(q->type)) {
|
||||
@ -751,7 +751,7 @@ static void mtk_jpeg_stop_streaming(struct vb2_queue *q)
|
||||
}
|
||||
|
||||
while ((vb = mtk_jpeg_buf_remove(ctx, q->type)))
|
||||
v4l2_m2m_buf_done(to_vb2_v4l2_buffer(vb), VB2_BUF_STATE_ERROR);
|
||||
v4l2_m2m_buf_done(vb, VB2_BUF_STATE_ERROR);
|
||||
|
||||
pm_runtime_put_sync(ctx->jpeg->dev);
|
||||
}
|
||||
@ -807,7 +807,7 @@ static void mtk_jpeg_device_run(void *priv)
|
||||
{
|
||||
struct mtk_jpeg_ctx *ctx = priv;
|
||||
struct mtk_jpeg_dev *jpeg = ctx->jpeg;
|
||||
struct vb2_buffer *src_buf, *dst_buf;
|
||||
struct vb2_v4l2_buffer *src_buf, *dst_buf;
|
||||
enum vb2_buffer_state buf_state = VB2_BUF_STATE_ERROR;
|
||||
unsigned long flags;
|
||||
struct mtk_jpeg_src_buf *jpeg_src_buf;
|
||||
@ -817,11 +817,11 @@ static void mtk_jpeg_device_run(void *priv)
|
||||
|
||||
src_buf = v4l2_m2m_next_src_buf(ctx->fh.m2m_ctx);
|
||||
dst_buf = v4l2_m2m_next_dst_buf(ctx->fh.m2m_ctx);
|
||||
jpeg_src_buf = mtk_jpeg_vb2_to_srcbuf(src_buf);
|
||||
jpeg_src_buf = mtk_jpeg_vb2_to_srcbuf(&src_buf->vb2_buf);
|
||||
|
||||
if (jpeg_src_buf->flags & MTK_JPEG_BUF_FLAGS_LAST_FRAME) {
|
||||
for (i = 0; i < dst_buf->num_planes; i++)
|
||||
vb2_set_plane_payload(dst_buf, i, 0);
|
||||
for (i = 0; i < dst_buf->vb2_buf.num_planes; i++)
|
||||
vb2_set_plane_payload(&dst_buf->vb2_buf, i, 0);
|
||||
buf_state = VB2_BUF_STATE_DONE;
|
||||
goto dec_end;
|
||||
}
|
||||
@ -833,8 +833,8 @@ static void mtk_jpeg_device_run(void *priv)
|
||||
return;
|
||||
}
|
||||
|
||||
mtk_jpeg_set_dec_src(ctx, src_buf, &bs);
|
||||
if (mtk_jpeg_set_dec_dst(ctx, &jpeg_src_buf->dec_param, dst_buf, &fb))
|
||||
mtk_jpeg_set_dec_src(ctx, &src_buf->vb2_buf, &bs);
|
||||
if (mtk_jpeg_set_dec_dst(ctx, &jpeg_src_buf->dec_param, &dst_buf->vb2_buf, &fb))
|
||||
goto dec_end;
|
||||
|
||||
spin_lock_irqsave(&jpeg->hw_lock, flags);
|
||||
@ -849,8 +849,8 @@ static void mtk_jpeg_device_run(void *priv)
|
||||
dec_end:
|
||||
v4l2_m2m_src_buf_remove(ctx->fh.m2m_ctx);
|
||||
v4l2_m2m_dst_buf_remove(ctx->fh.m2m_ctx);
|
||||
v4l2_m2m_buf_done(to_vb2_v4l2_buffer(src_buf), buf_state);
|
||||
v4l2_m2m_buf_done(to_vb2_v4l2_buffer(dst_buf), buf_state);
|
||||
v4l2_m2m_buf_done(src_buf, buf_state);
|
||||
v4l2_m2m_buf_done(dst_buf, buf_state);
|
||||
v4l2_m2m_job_finish(jpeg->m2m_dev, ctx->fh.m2m_ctx);
|
||||
}
|
||||
|
||||
@ -926,7 +926,7 @@ static irqreturn_t mtk_jpeg_dec_irq(int irq, void *priv)
|
||||
{
|
||||
struct mtk_jpeg_dev *jpeg = priv;
|
||||
struct mtk_jpeg_ctx *ctx;
|
||||
struct vb2_buffer *src_buf, *dst_buf;
|
||||
struct vb2_v4l2_buffer *src_buf, *dst_buf;
|
||||
struct mtk_jpeg_src_buf *jpeg_src_buf;
|
||||
enum vb2_buffer_state buf_state = VB2_BUF_STATE_ERROR;
|
||||
u32 dec_irq_ret;
|
||||
@ -943,7 +943,7 @@ static irqreturn_t mtk_jpeg_dec_irq(int irq, void *priv)
|
||||
|
||||
src_buf = v4l2_m2m_src_buf_remove(ctx->fh.m2m_ctx);
|
||||
dst_buf = v4l2_m2m_dst_buf_remove(ctx->fh.m2m_ctx);
|
||||
jpeg_src_buf = mtk_jpeg_vb2_to_srcbuf(src_buf);
|
||||
jpeg_src_buf = mtk_jpeg_vb2_to_srcbuf(&src_buf->vb2_buf);
|
||||
|
||||
if (dec_irq_ret >= MTK_JPEG_DEC_RESULT_UNDERFLOW)
|
||||
mtk_jpeg_dec_reset(jpeg->dec_reg_base);
|
||||
@ -953,15 +953,15 @@ static irqreturn_t mtk_jpeg_dec_irq(int irq, void *priv)
|
||||
goto dec_end;
|
||||
}
|
||||
|
||||
for (i = 0; i < dst_buf->num_planes; i++)
|
||||
vb2_set_plane_payload(dst_buf, i,
|
||||
for (i = 0; i < dst_buf->vb2_buf.num_planes; i++)
|
||||
vb2_set_plane_payload(&dst_buf->vb2_buf, i,
|
||||
jpeg_src_buf->dec_param.comp_size[i]);
|
||||
|
||||
buf_state = VB2_BUF_STATE_DONE;
|
||||
|
||||
dec_end:
|
||||
v4l2_m2m_buf_done(to_vb2_v4l2_buffer(src_buf), buf_state);
|
||||
v4l2_m2m_buf_done(to_vb2_v4l2_buffer(dst_buf), buf_state);
|
||||
v4l2_m2m_buf_done(src_buf, buf_state);
|
||||
v4l2_m2m_buf_done(dst_buf, buf_state);
|
||||
v4l2_m2m_job_finish(jpeg->m2m_dev, ctx->fh.m2m_ctx);
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
@ -288,7 +288,7 @@ static void emmaprp_device_run(void *priv)
|
||||
{
|
||||
struct emmaprp_ctx *ctx = priv;
|
||||
struct emmaprp_q_data *s_q_data, *d_q_data;
|
||||
struct vb2_buffer *src_buf, *dst_buf;
|
||||
struct vb2_v4l2_buffer *src_buf, *dst_buf;
|
||||
struct emmaprp_dev *pcdev = ctx->dev;
|
||||
unsigned int s_width, s_height;
|
||||
unsigned int d_width, d_height;
|
||||
@ -308,8 +308,8 @@ static void emmaprp_device_run(void *priv)
|
||||
d_height = d_q_data->height;
|
||||
d_size = d_width * d_height;
|
||||
|
||||
p_in = vb2_dma_contig_plane_dma_addr(src_buf, 0);
|
||||
p_out = vb2_dma_contig_plane_dma_addr(dst_buf, 0);
|
||||
p_in = vb2_dma_contig_plane_dma_addr(&src_buf->vb2_buf, 0);
|
||||
p_out = vb2_dma_contig_plane_dma_addr(&dst_buf->vb2_buf, 0);
|
||||
if (!p_in || !p_out) {
|
||||
v4l2_err(&pcdev->v4l2_dev,
|
||||
"Acquiring kernel pointers to buffers failed\n");
|
||||
|
@ -498,7 +498,7 @@ static void device_run(void *prv)
|
||||
{
|
||||
struct g2d_ctx *ctx = prv;
|
||||
struct g2d_dev *dev = ctx->dev;
|
||||
struct vb2_buffer *src, *dst;
|
||||
struct vb2_v4l2_buffer *src, *dst;
|
||||
unsigned long flags;
|
||||
u32 cmd = 0;
|
||||
|
||||
@ -513,10 +513,10 @@ static void device_run(void *prv)
|
||||
spin_lock_irqsave(&dev->ctrl_lock, flags);
|
||||
|
||||
g2d_set_src_size(dev, &ctx->in);
|
||||
g2d_set_src_addr(dev, vb2_dma_contig_plane_dma_addr(src, 0));
|
||||
g2d_set_src_addr(dev, vb2_dma_contig_plane_dma_addr(&src->vb2_buf, 0));
|
||||
|
||||
g2d_set_dst_size(dev, &ctx->out);
|
||||
g2d_set_dst_addr(dev, vb2_dma_contig_plane_dma_addr(dst, 0));
|
||||
g2d_set_dst_addr(dev, vb2_dma_contig_plane_dma_addr(&dst->vb2_buf, 0));
|
||||
|
||||
g2d_set_rop4(dev, ctx->rop);
|
||||
g2d_set_flip(dev, ctx->flip);
|
||||
|
@ -793,14 +793,14 @@ static void skip(struct s5p_jpeg_buffer *buf, long len);
|
||||
static void exynos4_jpeg_parse_decode_h_tbl(struct s5p_jpeg_ctx *ctx)
|
||||
{
|
||||
struct s5p_jpeg *jpeg = ctx->jpeg;
|
||||
struct vb2_buffer *vb = v4l2_m2m_next_src_buf(ctx->fh.m2m_ctx);
|
||||
struct vb2_v4l2_buffer *vb = v4l2_m2m_next_src_buf(ctx->fh.m2m_ctx);
|
||||
struct s5p_jpeg_buffer jpeg_buffer;
|
||||
unsigned int word;
|
||||
int c, x, components;
|
||||
|
||||
jpeg_buffer.size = 2; /* Ls */
|
||||
jpeg_buffer.data =
|
||||
(unsigned long)vb2_plane_vaddr(vb, 0) + ctx->out_q.sos + 2;
|
||||
(unsigned long)vb2_plane_vaddr(&vb->vb2_buf, 0) + ctx->out_q.sos + 2;
|
||||
jpeg_buffer.curr = 0;
|
||||
|
||||
word = 0;
|
||||
@ -830,14 +830,14 @@ static void exynos4_jpeg_parse_decode_h_tbl(struct s5p_jpeg_ctx *ctx)
|
||||
static void exynos4_jpeg_parse_huff_tbl(struct s5p_jpeg_ctx *ctx)
|
||||
{
|
||||
struct s5p_jpeg *jpeg = ctx->jpeg;
|
||||
struct vb2_buffer *vb = v4l2_m2m_next_src_buf(ctx->fh.m2m_ctx);
|
||||
struct vb2_v4l2_buffer *vb = v4l2_m2m_next_src_buf(ctx->fh.m2m_ctx);
|
||||
struct s5p_jpeg_buffer jpeg_buffer;
|
||||
unsigned int word;
|
||||
int c, i, n, j;
|
||||
|
||||
for (j = 0; j < ctx->out_q.dht.n; ++j) {
|
||||
jpeg_buffer.size = ctx->out_q.dht.len[j];
|
||||
jpeg_buffer.data = (unsigned long)vb2_plane_vaddr(vb, 0) +
|
||||
jpeg_buffer.data = (unsigned long)vb2_plane_vaddr(&vb->vb2_buf, 0) +
|
||||
ctx->out_q.dht.marker[j];
|
||||
jpeg_buffer.curr = 0;
|
||||
|
||||
@ -889,13 +889,13 @@ static void exynos4_jpeg_parse_huff_tbl(struct s5p_jpeg_ctx *ctx)
|
||||
static void exynos4_jpeg_parse_decode_q_tbl(struct s5p_jpeg_ctx *ctx)
|
||||
{
|
||||
struct s5p_jpeg *jpeg = ctx->jpeg;
|
||||
struct vb2_buffer *vb = v4l2_m2m_next_src_buf(ctx->fh.m2m_ctx);
|
||||
struct vb2_v4l2_buffer *vb = v4l2_m2m_next_src_buf(ctx->fh.m2m_ctx);
|
||||
struct s5p_jpeg_buffer jpeg_buffer;
|
||||
int c, x, components;
|
||||
|
||||
jpeg_buffer.size = ctx->out_q.sof_len;
|
||||
jpeg_buffer.data =
|
||||
(unsigned long)vb2_plane_vaddr(vb, 0) + ctx->out_q.sof;
|
||||
(unsigned long)vb2_plane_vaddr(&vb->vb2_buf, 0) + ctx->out_q.sof;
|
||||
jpeg_buffer.curr = 0;
|
||||
|
||||
skip(&jpeg_buffer, 5); /* P, Y, X */
|
||||
@ -920,14 +920,14 @@ static void exynos4_jpeg_parse_decode_q_tbl(struct s5p_jpeg_ctx *ctx)
|
||||
static void exynos4_jpeg_parse_q_tbl(struct s5p_jpeg_ctx *ctx)
|
||||
{
|
||||
struct s5p_jpeg *jpeg = ctx->jpeg;
|
||||
struct vb2_buffer *vb = v4l2_m2m_next_src_buf(ctx->fh.m2m_ctx);
|
||||
struct vb2_v4l2_buffer *vb = v4l2_m2m_next_src_buf(ctx->fh.m2m_ctx);
|
||||
struct s5p_jpeg_buffer jpeg_buffer;
|
||||
unsigned int word;
|
||||
int c, i, j;
|
||||
|
||||
for (j = 0; j < ctx->out_q.dqt.n; ++j) {
|
||||
jpeg_buffer.size = ctx->out_q.dqt.len[j];
|
||||
jpeg_buffer.data = (unsigned long)vb2_plane_vaddr(vb, 0) +
|
||||
jpeg_buffer.data = (unsigned long)vb2_plane_vaddr(&vb->vb2_buf, 0) +
|
||||
ctx->out_q.dqt.marker[j];
|
||||
jpeg_buffer.curr = 0;
|
||||
|
||||
@ -1293,13 +1293,16 @@ static int s5p_jpeg_querycap(struct file *file, void *priv,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int enum_fmt(struct s5p_jpeg_fmt *sjpeg_formats, int n,
|
||||
static int enum_fmt(struct s5p_jpeg_ctx *ctx,
|
||||
struct s5p_jpeg_fmt *sjpeg_formats, int n,
|
||||
struct v4l2_fmtdesc *f, u32 type)
|
||||
{
|
||||
int i, num = 0;
|
||||
unsigned int fmt_ver_flag = ctx->jpeg->variant->fmt_ver_flag;
|
||||
|
||||
for (i = 0; i < n; ++i) {
|
||||
if (sjpeg_formats[i].flags & type) {
|
||||
if (sjpeg_formats[i].flags & type &&
|
||||
sjpeg_formats[i].flags & fmt_ver_flag) {
|
||||
/* index-th format of type type found ? */
|
||||
if (num == f->index)
|
||||
break;
|
||||
@ -1326,11 +1329,11 @@ static int s5p_jpeg_enum_fmt_vid_cap(struct file *file, void *priv,
|
||||
struct s5p_jpeg_ctx *ctx = fh_to_ctx(priv);
|
||||
|
||||
if (ctx->mode == S5P_JPEG_ENCODE)
|
||||
return enum_fmt(sjpeg_formats, SJPEG_NUM_FORMATS, f,
|
||||
return enum_fmt(ctx, sjpeg_formats, SJPEG_NUM_FORMATS, f,
|
||||
SJPEG_FMT_FLAG_ENC_CAPTURE);
|
||||
|
||||
return enum_fmt(sjpeg_formats, SJPEG_NUM_FORMATS, f,
|
||||
SJPEG_FMT_FLAG_DEC_CAPTURE);
|
||||
return enum_fmt(ctx, sjpeg_formats, SJPEG_NUM_FORMATS, f,
|
||||
SJPEG_FMT_FLAG_DEC_CAPTURE);
|
||||
}
|
||||
|
||||
static int s5p_jpeg_enum_fmt_vid_out(struct file *file, void *priv,
|
||||
@ -1339,11 +1342,11 @@ static int s5p_jpeg_enum_fmt_vid_out(struct file *file, void *priv,
|
||||
struct s5p_jpeg_ctx *ctx = fh_to_ctx(priv);
|
||||
|
||||
if (ctx->mode == S5P_JPEG_ENCODE)
|
||||
return enum_fmt(sjpeg_formats, SJPEG_NUM_FORMATS, f,
|
||||
return enum_fmt(ctx, sjpeg_formats, SJPEG_NUM_FORMATS, f,
|
||||
SJPEG_FMT_FLAG_ENC_OUTPUT);
|
||||
|
||||
return enum_fmt(sjpeg_formats, SJPEG_NUM_FORMATS, f,
|
||||
SJPEG_FMT_FLAG_DEC_OUTPUT);
|
||||
return enum_fmt(ctx, sjpeg_formats, SJPEG_NUM_FORMATS, f,
|
||||
SJPEG_FMT_FLAG_DEC_OUTPUT);
|
||||
}
|
||||
|
||||
static struct s5p_jpeg_q_data *get_q_data(struct s5p_jpeg_ctx *ctx,
|
||||
@ -2072,15 +2075,15 @@ static void s5p_jpeg_device_run(void *priv)
|
||||
{
|
||||
struct s5p_jpeg_ctx *ctx = priv;
|
||||
struct s5p_jpeg *jpeg = ctx->jpeg;
|
||||
struct vb2_buffer *src_buf, *dst_buf;
|
||||
struct vb2_v4l2_buffer *src_buf, *dst_buf;
|
||||
unsigned long src_addr, dst_addr, flags;
|
||||
|
||||
spin_lock_irqsave(&ctx->jpeg->slock, flags);
|
||||
|
||||
src_buf = v4l2_m2m_next_src_buf(ctx->fh.m2m_ctx);
|
||||
dst_buf = v4l2_m2m_next_dst_buf(ctx->fh.m2m_ctx);
|
||||
src_addr = vb2_dma_contig_plane_dma_addr(src_buf, 0);
|
||||
dst_addr = vb2_dma_contig_plane_dma_addr(dst_buf, 0);
|
||||
src_addr = vb2_dma_contig_plane_dma_addr(&src_buf->vb2_buf, 0);
|
||||
dst_addr = vb2_dma_contig_plane_dma_addr(&dst_buf->vb2_buf, 0);
|
||||
|
||||
s5p_jpeg_reset(jpeg->regs);
|
||||
s5p_jpeg_poweron(jpeg->regs);
|
||||
@ -2153,7 +2156,7 @@ static void exynos4_jpeg_set_img_addr(struct s5p_jpeg_ctx *ctx)
|
||||
{
|
||||
struct s5p_jpeg *jpeg = ctx->jpeg;
|
||||
struct s5p_jpeg_fmt *fmt;
|
||||
struct vb2_buffer *vb;
|
||||
struct vb2_v4l2_buffer *vb;
|
||||
struct s5p_jpeg_addr jpeg_addr = {};
|
||||
u32 pix_size, padding_bytes = 0;
|
||||
|
||||
@ -2172,7 +2175,7 @@ static void exynos4_jpeg_set_img_addr(struct s5p_jpeg_ctx *ctx)
|
||||
vb = v4l2_m2m_next_dst_buf(ctx->fh.m2m_ctx);
|
||||
}
|
||||
|
||||
jpeg_addr.y = vb2_dma_contig_plane_dma_addr(vb, 0);
|
||||
jpeg_addr.y = vb2_dma_contig_plane_dma_addr(&vb->vb2_buf, 0);
|
||||
|
||||
if (fmt->colplanes == 2) {
|
||||
jpeg_addr.cb = jpeg_addr.y + pix_size - padding_bytes;
|
||||
@ -2190,7 +2193,7 @@ static void exynos4_jpeg_set_img_addr(struct s5p_jpeg_ctx *ctx)
|
||||
static void exynos4_jpeg_set_jpeg_addr(struct s5p_jpeg_ctx *ctx)
|
||||
{
|
||||
struct s5p_jpeg *jpeg = ctx->jpeg;
|
||||
struct vb2_buffer *vb;
|
||||
struct vb2_v4l2_buffer *vb;
|
||||
unsigned int jpeg_addr = 0;
|
||||
|
||||
if (ctx->mode == S5P_JPEG_ENCODE)
|
||||
@ -2198,7 +2201,7 @@ static void exynos4_jpeg_set_jpeg_addr(struct s5p_jpeg_ctx *ctx)
|
||||
else
|
||||
vb = v4l2_m2m_next_src_buf(ctx->fh.m2m_ctx);
|
||||
|
||||
jpeg_addr = vb2_dma_contig_plane_dma_addr(vb, 0);
|
||||
jpeg_addr = vb2_dma_contig_plane_dma_addr(&vb->vb2_buf, 0);
|
||||
if (jpeg->variant->version == SJPEG_EXYNOS5433 &&
|
||||
ctx->mode == S5P_JPEG_DECODE)
|
||||
jpeg_addr += ctx->out_q.sos;
|
||||
@ -2314,7 +2317,7 @@ static void exynos3250_jpeg_set_img_addr(struct s5p_jpeg_ctx *ctx)
|
||||
{
|
||||
struct s5p_jpeg *jpeg = ctx->jpeg;
|
||||
struct s5p_jpeg_fmt *fmt;
|
||||
struct vb2_buffer *vb;
|
||||
struct vb2_v4l2_buffer *vb;
|
||||
struct s5p_jpeg_addr jpeg_addr = {};
|
||||
u32 pix_size;
|
||||
|
||||
@ -2328,7 +2331,7 @@ static void exynos3250_jpeg_set_img_addr(struct s5p_jpeg_ctx *ctx)
|
||||
fmt = ctx->cap_q.fmt;
|
||||
}
|
||||
|
||||
jpeg_addr.y = vb2_dma_contig_plane_dma_addr(vb, 0);
|
||||
jpeg_addr.y = vb2_dma_contig_plane_dma_addr(&vb->vb2_buf, 0);
|
||||
|
||||
if (fmt->colplanes == 2) {
|
||||
jpeg_addr.cb = jpeg_addr.y + pix_size;
|
||||
@ -2346,7 +2349,7 @@ static void exynos3250_jpeg_set_img_addr(struct s5p_jpeg_ctx *ctx)
|
||||
static void exynos3250_jpeg_set_jpeg_addr(struct s5p_jpeg_ctx *ctx)
|
||||
{
|
||||
struct s5p_jpeg *jpeg = ctx->jpeg;
|
||||
struct vb2_buffer *vb;
|
||||
struct vb2_v4l2_buffer *vb;
|
||||
unsigned int jpeg_addr = 0;
|
||||
|
||||
if (ctx->mode == S5P_JPEG_ENCODE)
|
||||
@ -2354,7 +2357,7 @@ static void exynos3250_jpeg_set_jpeg_addr(struct s5p_jpeg_ctx *ctx)
|
||||
else
|
||||
vb = v4l2_m2m_next_src_buf(ctx->fh.m2m_ctx);
|
||||
|
||||
jpeg_addr = vb2_dma_contig_plane_dma_addr(vb, 0);
|
||||
jpeg_addr = vb2_dma_contig_plane_dma_addr(&vb->vb2_buf, 0);
|
||||
exynos3250_jpeg_jpgadr(jpeg->regs, jpeg_addr);
|
||||
}
|
||||
|
||||
|
@ -276,13 +276,13 @@ static void sh_veu_process(struct sh_veu_dev *veu,
|
||||
static void sh_veu_device_run(void *priv)
|
||||
{
|
||||
struct sh_veu_dev *veu = priv;
|
||||
struct vb2_buffer *src_buf, *dst_buf;
|
||||
struct vb2_v4l2_buffer *src_buf, *dst_buf;
|
||||
|
||||
src_buf = v4l2_m2m_next_src_buf(veu->m2m_ctx);
|
||||
dst_buf = v4l2_m2m_next_dst_buf(veu->m2m_ctx);
|
||||
|
||||
if (src_buf && dst_buf)
|
||||
sh_veu_process(veu, src_buf, dst_buf);
|
||||
sh_veu_process(veu, &src_buf->vb2_buf, &dst_buf->vb2_buf);
|
||||
}
|
||||
|
||||
/* ========== video ioctls ========== */
|
||||
|
@ -920,7 +920,7 @@ static inline void set_cmd_timeout(struct mmc_omap_host *host, struct mmc_reques
|
||||
reg &= ~(1 << 5);
|
||||
OMAP_MMC_WRITE(host, SDIO, reg);
|
||||
/* Set maximum timeout */
|
||||
OMAP_MMC_WRITE(host, CTO, 0xff);
|
||||
OMAP_MMC_WRITE(host, CTO, 0xfd);
|
||||
}
|
||||
|
||||
static inline void set_data_timeout(struct mmc_omap_host *host, struct mmc_request *req)
|
||||
|
@ -119,7 +119,7 @@ static void enic_init_affinity_hint(struct enic *enic)
|
||||
|
||||
for (i = 0; i < enic->intr_count; i++) {
|
||||
if (enic_is_err_intr(enic, i) || enic_is_notify_intr(enic, i) ||
|
||||
(enic->msix[i].affinity_mask &&
|
||||
(cpumask_available(enic->msix[i].affinity_mask) &&
|
||||
!cpumask_empty(enic->msix[i].affinity_mask)))
|
||||
continue;
|
||||
if (zalloc_cpumask_var(&enic->msix[i].affinity_mask,
|
||||
@ -148,7 +148,7 @@ static void enic_set_affinity_hint(struct enic *enic)
|
||||
for (i = 0; i < enic->intr_count; i++) {
|
||||
if (enic_is_err_intr(enic, i) ||
|
||||
enic_is_notify_intr(enic, i) ||
|
||||
!enic->msix[i].affinity_mask ||
|
||||
!cpumask_available(enic->msix[i].affinity_mask) ||
|
||||
cpumask_empty(enic->msix[i].affinity_mask))
|
||||
continue;
|
||||
err = irq_set_affinity_hint(enic->msix_entry[i].vector,
|
||||
@ -161,7 +161,7 @@ static void enic_set_affinity_hint(struct enic *enic)
|
||||
for (i = 0; i < enic->wq_count; i++) {
|
||||
int wq_intr = enic_msix_wq_intr(enic, i);
|
||||
|
||||
if (enic->msix[wq_intr].affinity_mask &&
|
||||
if (cpumask_available(enic->msix[wq_intr].affinity_mask) &&
|
||||
!cpumask_empty(enic->msix[wq_intr].affinity_mask))
|
||||
netif_set_xps_queue(enic->netdev,
|
||||
enic->msix[wq_intr].affinity_mask,
|
||||
|
@ -2120,7 +2120,7 @@ static int e1000_request_msix(struct e1000_adapter *adapter)
|
||||
if (strlen(netdev->name) < (IFNAMSIZ - 5))
|
||||
snprintf(adapter->rx_ring->name,
|
||||
sizeof(adapter->rx_ring->name) - 1,
|
||||
"%s-rx-0", netdev->name);
|
||||
"%.14s-rx-0", netdev->name);
|
||||
else
|
||||
memcpy(adapter->rx_ring->name, netdev->name, IFNAMSIZ);
|
||||
err = request_irq(adapter->msix_entries[vector].vector,
|
||||
@ -2136,7 +2136,7 @@ static int e1000_request_msix(struct e1000_adapter *adapter)
|
||||
if (strlen(netdev->name) < (IFNAMSIZ - 5))
|
||||
snprintf(adapter->tx_ring->name,
|
||||
sizeof(adapter->tx_ring->name) - 1,
|
||||
"%s-tx-0", netdev->name);
|
||||
"%.14s-tx-0", netdev->name);
|
||||
else
|
||||
memcpy(adapter->tx_ring->name, netdev->name, IFNAMSIZ);
|
||||
err = request_irq(adapter->msix_entries[vector].vector,
|
||||
@ -5306,8 +5306,13 @@ static void e1000_watchdog_task(struct work_struct *work)
|
||||
/* 8000ES2LAN requires a Rx packet buffer work-around
|
||||
* on link down event; reset the controller to flush
|
||||
* the Rx packet buffer.
|
||||
*
|
||||
* If the link is lost the controller stops DMA, but
|
||||
* if there is queued Tx work it cannot be done. So
|
||||
* reset the controller to flush the Tx packet buffers.
|
||||
*/
|
||||
if (adapter->flags & FLAG_RX_NEEDS_RESTART)
|
||||
if ((adapter->flags & FLAG_RX_NEEDS_RESTART) ||
|
||||
e1000_desc_unused(tx_ring) + 1 < tx_ring->count)
|
||||
adapter->flags |= FLAG_RESTART_NOW;
|
||||
else
|
||||
pm_schedule_suspend(netdev->dev.parent,
|
||||
@ -5330,14 +5335,6 @@ link_up:
|
||||
adapter->gotc_old = adapter->stats.gotc;
|
||||
spin_unlock(&adapter->stats64_lock);
|
||||
|
||||
/* If the link is lost the controller stops DMA, but
|
||||
* if there is queued Tx work it cannot be done. So
|
||||
* reset the controller to flush the Tx packet buffers.
|
||||
*/
|
||||
if (!netif_carrier_ok(netdev) &&
|
||||
(e1000_desc_unused(tx_ring) + 1 < tx_ring->count))
|
||||
adapter->flags |= FLAG_RESTART_NOW;
|
||||
|
||||
/* If reset is necessary, do it outside of interrupt context. */
|
||||
if (adapter->flags & FLAG_RESTART_NOW) {
|
||||
schedule_work(&adapter->reset_task);
|
||||
|
@ -1719,7 +1719,7 @@ int mlx5_eswitch_set_vport_mac(struct mlx5_eswitch *esw,
|
||||
u64 node_guid;
|
||||
int err = 0;
|
||||
|
||||
if (!MLX5_CAP_GEN(esw->dev, vport_group_manager))
|
||||
if (!esw || !MLX5_CAP_GEN(esw->dev, vport_group_manager))
|
||||
return -EPERM;
|
||||
if (!LEGAL_VPORT(esw, vport) || is_multicast_ether_addr(mac))
|
||||
return -EINVAL;
|
||||
@ -1793,7 +1793,7 @@ int mlx5_eswitch_get_vport_config(struct mlx5_eswitch *esw,
|
||||
{
|
||||
struct mlx5_vport *evport;
|
||||
|
||||
if (!MLX5_CAP_GEN(esw->dev, vport_group_manager))
|
||||
if (!esw || !MLX5_CAP_GEN(esw->dev, vport_group_manager))
|
||||
return -EPERM;
|
||||
if (!LEGAL_VPORT(esw, vport))
|
||||
return -EINVAL;
|
||||
@ -1966,19 +1966,24 @@ static int normalize_vports_min_rate(struct mlx5_eswitch *esw, u32 divider)
|
||||
int mlx5_eswitch_set_vport_rate(struct mlx5_eswitch *esw, int vport,
|
||||
u32 max_rate, u32 min_rate)
|
||||
{
|
||||
u32 fw_max_bw_share = MLX5_CAP_QOS(esw->dev, max_tsar_bw_share);
|
||||
bool min_rate_supported = MLX5_CAP_QOS(esw->dev, esw_bw_share) &&
|
||||
fw_max_bw_share >= MLX5_MIN_BW_SHARE;
|
||||
bool max_rate_supported = MLX5_CAP_QOS(esw->dev, esw_rate_limit);
|
||||
struct mlx5_vport *evport;
|
||||
u32 fw_max_bw_share;
|
||||
u32 previous_min_rate;
|
||||
u32 divider;
|
||||
bool min_rate_supported;
|
||||
bool max_rate_supported;
|
||||
int err = 0;
|
||||
|
||||
if (!ESW_ALLOWED(esw))
|
||||
return -EPERM;
|
||||
if (!LEGAL_VPORT(esw, vport))
|
||||
return -EINVAL;
|
||||
|
||||
fw_max_bw_share = MLX5_CAP_QOS(esw->dev, max_tsar_bw_share);
|
||||
min_rate_supported = MLX5_CAP_QOS(esw->dev, esw_bw_share) &&
|
||||
fw_max_bw_share >= MLX5_MIN_BW_SHARE;
|
||||
max_rate_supported = MLX5_CAP_QOS(esw->dev, esw_rate_limit);
|
||||
|
||||
if ((min_rate && !min_rate_supported) || (max_rate && !max_rate_supported))
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
|
@ -2019,7 +2019,7 @@ static void mlxsw_sp_port_get_prio_strings(u8 **p, int prio)
|
||||
int i;
|
||||
|
||||
for (i = 0; i < MLXSW_SP_PORT_HW_PRIO_STATS_LEN; i++) {
|
||||
snprintf(*p, ETH_GSTRING_LEN, "%s_%d",
|
||||
snprintf(*p, ETH_GSTRING_LEN, "%.29s_%.1d",
|
||||
mlxsw_sp_port_hw_prio_stats[i].str, prio);
|
||||
*p += ETH_GSTRING_LEN;
|
||||
}
|
||||
@ -2030,7 +2030,7 @@ static void mlxsw_sp_port_get_tc_strings(u8 **p, int tc)
|
||||
int i;
|
||||
|
||||
for (i = 0; i < MLXSW_SP_PORT_HW_TC_STATS_LEN; i++) {
|
||||
snprintf(*p, ETH_GSTRING_LEN, "%s_%d",
|
||||
snprintf(*p, ETH_GSTRING_LEN, "%.29s_%.1d",
|
||||
mlxsw_sp_port_hw_tc_stats[i].str, tc);
|
||||
*p += ETH_GSTRING_LEN;
|
||||
}
|
||||
|
@ -475,7 +475,7 @@ static void iwl_pcie_rx_allocator(struct iwl_trans *trans)
|
||||
struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
|
||||
struct iwl_rb_allocator *rba = &trans_pcie->rba;
|
||||
struct list_head local_empty;
|
||||
int pending = atomic_xchg(&rba->req_pending, 0);
|
||||
int pending = atomic_read(&rba->req_pending);
|
||||
|
||||
IWL_DEBUG_RX(trans, "Pending allocation requests = %d\n", pending);
|
||||
|
||||
@ -530,11 +530,13 @@ static void iwl_pcie_rx_allocator(struct iwl_trans *trans)
|
||||
i++;
|
||||
}
|
||||
|
||||
atomic_dec(&rba->req_pending);
|
||||
pending--;
|
||||
|
||||
if (!pending) {
|
||||
pending = atomic_xchg(&rba->req_pending, 0);
|
||||
pending = atomic_read(&rba->req_pending);
|
||||
IWL_DEBUG_RX(trans,
|
||||
"Pending allocation requests = %d\n",
|
||||
"Got more pending allocation requests = %d\n",
|
||||
pending);
|
||||
}
|
||||
|
||||
@ -546,12 +548,15 @@ static void iwl_pcie_rx_allocator(struct iwl_trans *trans)
|
||||
spin_unlock(&rba->lock);
|
||||
|
||||
atomic_inc(&rba->req_ready);
|
||||
|
||||
}
|
||||
|
||||
spin_lock(&rba->lock);
|
||||
/* return unused rbds to the allocator empty list */
|
||||
list_splice_tail(&local_empty, &rba->rbd_empty);
|
||||
spin_unlock(&rba->lock);
|
||||
|
||||
IWL_DEBUG_RX(trans, "%s, exit.\n", __func__);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
struct mt7601u_dev;
|
||||
|
||||
#define MT7601U_EE_MAX_VER 0x0c
|
||||
#define MT7601U_EE_MAX_VER 0x0d
|
||||
#define MT7601U_EEPROM_SIZE 256
|
||||
|
||||
#define MT7601U_DEFAULT_TX_POWER 6
|
||||
|
@ -1058,8 +1058,11 @@ static int wl12xx_chip_wakeup(struct wl1271 *wl, bool plt)
|
||||
goto out;
|
||||
|
||||
ret = wl12xx_fetch_firmware(wl, plt);
|
||||
if (ret < 0)
|
||||
goto out;
|
||||
if (ret < 0) {
|
||||
kfree(wl->fw_status);
|
||||
kfree(wl->raw_fw_status);
|
||||
kfree(wl->tx_res_if);
|
||||
}
|
||||
|
||||
out:
|
||||
return ret;
|
||||
|
@ -367,6 +367,16 @@ static bool pcie_pme_check_wakeup(struct pci_bus *bus)
|
||||
return false;
|
||||
}
|
||||
|
||||
static void pcie_pme_disable_interrupt(struct pci_dev *port,
|
||||
struct pcie_pme_service_data *data)
|
||||
{
|
||||
spin_lock_irq(&data->lock);
|
||||
pcie_pme_interrupt_enable(port, false);
|
||||
pcie_clear_root_pme_status(port);
|
||||
data->noirq = true;
|
||||
spin_unlock_irq(&data->lock);
|
||||
}
|
||||
|
||||
/**
|
||||
* pcie_pme_suspend - Suspend PCIe PME service device.
|
||||
* @srv: PCIe service device to suspend.
|
||||
@ -391,11 +401,7 @@ static int pcie_pme_suspend(struct pcie_device *srv)
|
||||
return 0;
|
||||
}
|
||||
|
||||
spin_lock_irq(&data->lock);
|
||||
pcie_pme_interrupt_enable(port, false);
|
||||
pcie_clear_root_pme_status(port);
|
||||
data->noirq = true;
|
||||
spin_unlock_irq(&data->lock);
|
||||
pcie_pme_disable_interrupt(port, data);
|
||||
|
||||
synchronize_irq(srv->irq);
|
||||
|
||||
@ -431,9 +437,11 @@ static int pcie_pme_resume(struct pcie_device *srv)
|
||||
*/
|
||||
static void pcie_pme_remove(struct pcie_device *srv)
|
||||
{
|
||||
pcie_pme_suspend(srv);
|
||||
struct pcie_pme_service_data *data = get_service_data(srv);
|
||||
|
||||
pcie_pme_disable_interrupt(srv->port, data);
|
||||
free_irq(srv->irq, srv);
|
||||
kfree(get_service_data(srv));
|
||||
kfree(data);
|
||||
}
|
||||
|
||||
static struct pcie_port_service_driver pcie_pme_driver = {
|
||||
|
@ -222,7 +222,8 @@ static int pmc_core_ppfear_sts_show(struct seq_file *s, void *unused)
|
||||
index < PPFEAR_MAX_NUM_ENTRIES; index++, iter++)
|
||||
pf_regs[index] = pmc_core_reg_read_byte(pmcdev, iter);
|
||||
|
||||
for (index = 0; map[index].name; index++)
|
||||
for (index = 0; map[index].name &&
|
||||
index < pmcdev->map->ppfear_buckets * 8; index++)
|
||||
pmc_core_display_map(s, index, pf_regs[index / 8], map);
|
||||
|
||||
return 0;
|
||||
|
@ -38,7 +38,7 @@
|
||||
#define SPT_PMC_SLP_S0_RES_COUNTER_STEP 0x64
|
||||
#define PMC_BASE_ADDR_MASK ~(SPT_PMC_MMIO_REG_LEN - 1)
|
||||
#define MTPMC_MASK 0xffff0000
|
||||
#define PPFEAR_MAX_NUM_ENTRIES 5
|
||||
#define PPFEAR_MAX_NUM_ENTRIES 12
|
||||
#define SPT_PPFEAR_NUM_ENTRIES 5
|
||||
#define SPT_PMC_READ_DISABLE_BIT 0x16
|
||||
#define SPT_PMC_MSG_FULL_STS_BIT 0x18
|
||||
|
@ -131,7 +131,7 @@
|
||||
* ACT8865 voltage number
|
||||
*/
|
||||
#define ACT8865_VOLTAGE_NUM 64
|
||||
#define ACT8600_SUDCDC_VOLTAGE_NUM 255
|
||||
#define ACT8600_SUDCDC_VOLTAGE_NUM 256
|
||||
|
||||
struct act8865 {
|
||||
struct regmap *regmap;
|
||||
@ -222,7 +222,8 @@ static const struct regulator_linear_range act8600_sudcdc_voltage_ranges[] = {
|
||||
REGULATOR_LINEAR_RANGE(3000000, 0, 63, 0),
|
||||
REGULATOR_LINEAR_RANGE(3000000, 64, 159, 100000),
|
||||
REGULATOR_LINEAR_RANGE(12600000, 160, 191, 200000),
|
||||
REGULATOR_LINEAR_RANGE(19000000, 191, 255, 400000),
|
||||
REGULATOR_LINEAR_RANGE(19000000, 192, 247, 400000),
|
||||
REGULATOR_LINEAR_RANGE(41400000, 248, 255, 0),
|
||||
};
|
||||
|
||||
static struct regulator_ops act8865_ops = {
|
||||
|
@ -1445,7 +1445,7 @@ bind_err:
|
||||
static struct bnx2fc_interface *
|
||||
bnx2fc_interface_create(struct bnx2fc_hba *hba,
|
||||
struct net_device *netdev,
|
||||
enum fip_state fip_mode)
|
||||
enum fip_mode fip_mode)
|
||||
{
|
||||
struct fcoe_ctlr_device *ctlr_dev;
|
||||
struct bnx2fc_interface *interface;
|
||||
|
@ -390,7 +390,7 @@ static int fcoe_interface_setup(struct fcoe_interface *fcoe,
|
||||
* Returns: pointer to a struct fcoe_interface or NULL on error
|
||||
*/
|
||||
static struct fcoe_interface *fcoe_interface_create(struct net_device *netdev,
|
||||
enum fip_state fip_mode)
|
||||
enum fip_mode fip_mode)
|
||||
{
|
||||
struct fcoe_ctlr_device *ctlr_dev;
|
||||
struct fcoe_ctlr *ctlr;
|
||||
|
@ -147,7 +147,7 @@ static void fcoe_ctlr_map_dest(struct fcoe_ctlr *fip)
|
||||
* fcoe_ctlr_init() - Initialize the FCoE Controller instance
|
||||
* @fip: The FCoE controller to initialize
|
||||
*/
|
||||
void fcoe_ctlr_init(struct fcoe_ctlr *fip, enum fip_state mode)
|
||||
void fcoe_ctlr_init(struct fcoe_ctlr *fip, enum fip_mode mode)
|
||||
{
|
||||
fcoe_ctlr_set_state(fip, FIP_ST_LINK_WAIT);
|
||||
fip->mode = mode;
|
||||
@ -454,7 +454,10 @@ void fcoe_ctlr_link_up(struct fcoe_ctlr *fip)
|
||||
mutex_unlock(&fip->ctlr_mutex);
|
||||
fc_linkup(fip->lp);
|
||||
} else if (fip->state == FIP_ST_LINK_WAIT) {
|
||||
fcoe_ctlr_set_state(fip, fip->mode);
|
||||
if (fip->mode == FIP_MODE_NON_FIP)
|
||||
fcoe_ctlr_set_state(fip, FIP_ST_NON_FIP);
|
||||
else
|
||||
fcoe_ctlr_set_state(fip, FIP_ST_AUTO);
|
||||
switch (fip->mode) {
|
||||
default:
|
||||
LIBFCOE_FIP_DBG(fip, "invalid mode %d\n", fip->mode);
|
||||
|
@ -871,7 +871,7 @@ static int fcoe_transport_create(const char *buffer,
|
||||
int rc = -ENODEV;
|
||||
struct net_device *netdev = NULL;
|
||||
struct fcoe_transport *ft = NULL;
|
||||
enum fip_state fip_mode = (enum fip_state)(long)kp->arg;
|
||||
enum fip_mode fip_mode = (enum fip_mode)kp->arg;
|
||||
|
||||
mutex_lock(&ft_mutex);
|
||||
|
||||
|
@ -10,6 +10,7 @@
|
||||
*/
|
||||
|
||||
#include "hisi_sas.h"
|
||||
#include "../libsas/sas_internal.h"
|
||||
#define DRV_NAME "hisi_sas"
|
||||
|
||||
#define DEV_IS_GONE(dev) \
|
||||
@ -1508,9 +1509,18 @@ static void hisi_sas_port_formed(struct asd_sas_phy *sas_phy)
|
||||
|
||||
static void hisi_sas_phy_disconnected(struct hisi_sas_phy *phy)
|
||||
{
|
||||
struct asd_sas_phy *sas_phy = &phy->sas_phy;
|
||||
struct sas_phy *sphy = sas_phy->phy;
|
||||
struct sas_phy_data *d = sphy->hostdata;
|
||||
|
||||
phy->phy_attached = 0;
|
||||
phy->phy_type = 0;
|
||||
phy->port = NULL;
|
||||
|
||||
if (d->enable)
|
||||
sphy->negotiated_linkrate = SAS_LINK_RATE_UNKNOWN;
|
||||
else
|
||||
sphy->negotiated_linkrate = SAS_PHY_DISABLED;
|
||||
}
|
||||
|
||||
void hisi_sas_phy_down(struct hisi_hba *hisi_hba, int phy_no, int rdy)
|
||||
|
@ -4087,6 +4087,7 @@ int megasas_alloc_cmds(struct megasas_instance *instance)
|
||||
if (megasas_create_frame_pool(instance)) {
|
||||
dev_printk(KERN_DEBUG, &instance->pdev->dev, "Error creating frame DMA pool\n");
|
||||
megasas_free_cmds(instance);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -1382,7 +1382,7 @@ static struct libfc_function_template qedf_lport_template = {
|
||||
|
||||
static void qedf_fcoe_ctlr_setup(struct qedf_ctx *qedf)
|
||||
{
|
||||
fcoe_ctlr_init(&qedf->ctlr, FIP_ST_AUTO);
|
||||
fcoe_ctlr_init(&qedf->ctlr, FIP_MODE_AUTO);
|
||||
|
||||
qedf->ctlr.send = qedf_fip_send;
|
||||
qedf->ctlr.get_src_addr = qedf_get_src_mac;
|
||||
|
@ -220,7 +220,7 @@ static struct scsi_device *scsi_alloc_sdev(struct scsi_target *starget,
|
||||
struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
|
||||
|
||||
sdev = kzalloc(sizeof(*sdev) + shost->transportt->device_size,
|
||||
GFP_ATOMIC);
|
||||
GFP_KERNEL);
|
||||
if (!sdev)
|
||||
goto out;
|
||||
|
||||
@ -796,7 +796,7 @@ static int scsi_add_lun(struct scsi_device *sdev, unsigned char *inq_result,
|
||||
*/
|
||||
sdev->inquiry = kmemdup(inq_result,
|
||||
max_t(size_t, sdev->inquiry_len, 36),
|
||||
GFP_ATOMIC);
|
||||
GFP_KERNEL);
|
||||
if (sdev->inquiry == NULL)
|
||||
return SCSI_SCAN_NO_RESPONSE;
|
||||
|
||||
@ -1084,7 +1084,7 @@ static int scsi_probe_and_add_lun(struct scsi_target *starget,
|
||||
if (!sdev)
|
||||
goto out;
|
||||
|
||||
result = kmalloc(result_len, GFP_ATOMIC |
|
||||
result = kmalloc(result_len, GFP_KERNEL |
|
||||
((shost->unchecked_isa_dma) ? __GFP_DMA : 0));
|
||||
if (!result)
|
||||
goto out_free_sdev;
|
||||
|
@ -138,7 +138,7 @@ static int gsbi_probe(struct platform_device *pdev)
|
||||
struct resource *res;
|
||||
void __iomem *base;
|
||||
struct gsbi_info *gsbi;
|
||||
int i;
|
||||
int i, ret;
|
||||
u32 mask, gsbi_num;
|
||||
const struct crci_config *config = NULL;
|
||||
|
||||
@ -221,7 +221,10 @@ static int gsbi_probe(struct platform_device *pdev)
|
||||
|
||||
platform_set_drvdata(pdev, gsbi);
|
||||
|
||||
return of_platform_populate(node, NULL, NULL, &pdev->dev);
|
||||
ret = of_platform_populate(node, NULL, NULL, &pdev->dev);
|
||||
if (ret)
|
||||
clk_disable_unprepare(gsbi->hclk);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int gsbi_remove(struct platform_device *pdev)
|
||||
|
@ -133,13 +133,17 @@ static int tegra_fuse_probe(struct platform_device *pdev)
|
||||
/* take over the memory region from the early initialization */
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
fuse->base = devm_ioremap_resource(&pdev->dev, res);
|
||||
if (IS_ERR(fuse->base))
|
||||
return PTR_ERR(fuse->base);
|
||||
if (IS_ERR(fuse->base)) {
|
||||
err = PTR_ERR(fuse->base);
|
||||
fuse->base = base;
|
||||
return err;
|
||||
}
|
||||
|
||||
fuse->clk = devm_clk_get(&pdev->dev, "fuse");
|
||||
if (IS_ERR(fuse->clk)) {
|
||||
dev_err(&pdev->dev, "failed to get FUSE clock: %ld",
|
||||
PTR_ERR(fuse->clk));
|
||||
fuse->base = base;
|
||||
return PTR_ERR(fuse->clk);
|
||||
}
|
||||
|
||||
@ -148,8 +152,10 @@ static int tegra_fuse_probe(struct platform_device *pdev)
|
||||
|
||||
if (fuse->soc->probe) {
|
||||
err = fuse->soc->probe(fuse);
|
||||
if (err < 0)
|
||||
if (err < 0) {
|
||||
fuse->base = base;
|
||||
return err;
|
||||
}
|
||||
}
|
||||
|
||||
if (tegra_fuse_create_sysfs(&pdev->dev, fuse->soc->info->size,
|
||||
|
@ -118,6 +118,10 @@ static int serial_pxa_probe(struct platform_device *pdev)
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = of_alias_get_id(pdev->dev.of_node, "serial");
|
||||
if (ret >= 0)
|
||||
uart.port.line = ret;
|
||||
|
||||
uart.port.type = PORT_XSCALE;
|
||||
uart.port.iotype = UPIO_MEM32;
|
||||
uart.port.mapbase = mmres->start;
|
||||
|
@ -176,6 +176,8 @@ struct atmel_uart_port {
|
||||
unsigned int pending_status;
|
||||
spinlock_t lock_suspended;
|
||||
|
||||
bool hd_start_rx; /* can start RX during half-duplex operation */
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
struct {
|
||||
u32 cr;
|
||||
@ -238,6 +240,12 @@ static inline void atmel_uart_write_char(struct uart_port *port, u8 value)
|
||||
__raw_writeb(value, port->membase + ATMEL_US_THR);
|
||||
}
|
||||
|
||||
static inline int atmel_uart_is_half_duplex(struct uart_port *port)
|
||||
{
|
||||
return (port->rs485.flags & SER_RS485_ENABLED) &&
|
||||
!(port->rs485.flags & SER_RS485_RX_DURING_TX);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SERIAL_ATMEL_PDC
|
||||
static bool atmel_use_pdc_rx(struct uart_port *port)
|
||||
{
|
||||
@ -489,9 +497,9 @@ static void atmel_stop_tx(struct uart_port *port)
|
||||
/* Disable interrupts */
|
||||
atmel_uart_writel(port, ATMEL_US_IDR, atmel_port->tx_done_mask);
|
||||
|
||||
if ((port->rs485.flags & SER_RS485_ENABLED) &&
|
||||
!(port->rs485.flags & SER_RS485_RX_DURING_TX))
|
||||
if (atmel_uart_is_half_duplex(port))
|
||||
atmel_start_rx(port);
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
@ -508,8 +516,7 @@ static void atmel_start_tx(struct uart_port *port)
|
||||
return;
|
||||
|
||||
if (atmel_use_pdc_tx(port) || atmel_use_dma_tx(port))
|
||||
if ((port->rs485.flags & SER_RS485_ENABLED) &&
|
||||
!(port->rs485.flags & SER_RS485_RX_DURING_TX))
|
||||
if (atmel_uart_is_half_duplex(port))
|
||||
atmel_stop_rx(port);
|
||||
|
||||
if (atmel_use_pdc_tx(port))
|
||||
@ -806,10 +813,14 @@ static void atmel_complete_tx_dma(void *arg)
|
||||
*/
|
||||
if (!uart_circ_empty(xmit))
|
||||
atmel_tasklet_schedule(atmel_port, &atmel_port->tasklet_tx);
|
||||
else if ((port->rs485.flags & SER_RS485_ENABLED) &&
|
||||
!(port->rs485.flags & SER_RS485_RX_DURING_TX)) {
|
||||
/* DMA done, stop TX, start RX for RS485 */
|
||||
atmel_start_rx(port);
|
||||
else if (atmel_uart_is_half_duplex(port)) {
|
||||
/*
|
||||
* DMA done, re-enable TXEMPTY and signal that we can stop
|
||||
* TX and start RX for RS485
|
||||
*/
|
||||
atmel_port->hd_start_rx = true;
|
||||
atmel_uart_writel(port, ATMEL_US_IER,
|
||||
atmel_port->tx_done_mask);
|
||||
}
|
||||
|
||||
spin_unlock_irqrestore(&port->lock, flags);
|
||||
@ -1254,9 +1265,20 @@ atmel_handle_transmit(struct uart_port *port, unsigned int pending)
|
||||
struct atmel_uart_port *atmel_port = to_atmel_uart_port(port);
|
||||
|
||||
if (pending & atmel_port->tx_done_mask) {
|
||||
/* Either PDC or interrupt transmission */
|
||||
atmel_uart_writel(port, ATMEL_US_IDR,
|
||||
atmel_port->tx_done_mask);
|
||||
|
||||
/* Start RX if flag was set and FIFO is empty */
|
||||
if (atmel_port->hd_start_rx) {
|
||||
if (!(atmel_uart_readl(port, ATMEL_US_CSR)
|
||||
& ATMEL_US_TXEMPTY))
|
||||
dev_warn(port->dev, "Should start RX, but TX fifo is not empty\n");
|
||||
|
||||
atmel_port->hd_start_rx = false;
|
||||
atmel_start_rx(port);
|
||||
return;
|
||||
}
|
||||
|
||||
atmel_tasklet_schedule(atmel_port, &atmel_port->tasklet_tx);
|
||||
}
|
||||
}
|
||||
@ -1383,8 +1405,7 @@ static void atmel_tx_pdc(struct uart_port *port)
|
||||
atmel_uart_writel(port, ATMEL_US_IER,
|
||||
atmel_port->tx_done_mask);
|
||||
} else {
|
||||
if ((port->rs485.flags & SER_RS485_ENABLED) &&
|
||||
!(port->rs485.flags & SER_RS485_RX_DURING_TX)) {
|
||||
if (atmel_uart_is_half_duplex(port)) {
|
||||
/* DMA done, stop TX, start RX for RS485 */
|
||||
atmel_start_rx(port);
|
||||
}
|
||||
|
@ -25,7 +25,7 @@
|
||||
* Byte threshold to limit memory consumption for flip buffers.
|
||||
* The actual memory limit is > 2x this amount.
|
||||
*/
|
||||
#define TTYB_DEFAULT_MEM_LIMIT 65536
|
||||
#define TTYB_DEFAULT_MEM_LIMIT (640 * 1024UL)
|
||||
|
||||
/*
|
||||
* We default to dicing tty buffer allocations to this many characters
|
||||
|
@ -938,8 +938,15 @@ static int ci_hdrc_probe(struct platform_device *pdev)
|
||||
} else if (ci->platdata->usb_phy) {
|
||||
ci->usb_phy = ci->platdata->usb_phy;
|
||||
} else {
|
||||
ci->usb_phy = devm_usb_get_phy_by_phandle(dev->parent, "phys",
|
||||
0);
|
||||
ci->phy = devm_phy_get(dev->parent, "usb-phy");
|
||||
ci->usb_phy = devm_usb_get_phy(dev->parent, USB_PHY_TYPE_USB2);
|
||||
|
||||
/* Fallback to grabbing any registered USB2 PHY */
|
||||
if (IS_ERR(ci->usb_phy) &&
|
||||
PTR_ERR(ci->usb_phy) != -EPROBE_DEFER)
|
||||
ci->usb_phy = devm_usb_get_phy(dev->parent,
|
||||
USB_PHY_TYPE_USB2);
|
||||
|
||||
/* if both generic PHY and USB PHY layers aren't enabled */
|
||||
if (PTR_ERR(ci->phy) == -ENOSYS &&
|
||||
|
@ -1093,9 +1093,12 @@ static ssize_t ffs_epfile_io(struct file *file, struct ffs_io_data *io_data)
|
||||
*/
|
||||
if (epfile->ep == ep) {
|
||||
usb_ep_dequeue(ep->ep, req);
|
||||
spin_unlock_irq(&epfile->ffs->eps_lock);
|
||||
wait_for_completion(&done);
|
||||
interrupted = ep->status < 0;
|
||||
} else {
|
||||
spin_unlock_irq(&epfile->ffs->eps_lock);
|
||||
}
|
||||
spin_unlock_irq(&epfile->ffs->eps_lock);
|
||||
}
|
||||
|
||||
ffs_log("ep status %d for req %pK", ep->status, req);
|
||||
|
@ -212,7 +212,7 @@ static int pwm_backlight_initial_power_state(const struct pwm_bl_data *pb)
|
||||
*/
|
||||
|
||||
/* if the enable GPIO is disabled, do not enable the backlight */
|
||||
if (pb->enable_gpio && gpiod_get_value(pb->enable_gpio) == 0)
|
||||
if (pb->enable_gpio && gpiod_get_value_cansleep(pb->enable_gpio) == 0)
|
||||
return FB_BLANK_POWERDOWN;
|
||||
|
||||
/* The regulator is disabled, do not enable the backlight */
|
||||
|
@ -427,6 +427,9 @@ static void fb_do_show_logo(struct fb_info *info, struct fb_image *image,
|
||||
{
|
||||
unsigned int x;
|
||||
|
||||
if (image->width > info->var.xres || image->height > info->var.yres)
|
||||
return;
|
||||
|
||||
if (rotate == FB_ROTATE_UR) {
|
||||
for (x = 0;
|
||||
x < num && image->dx + image->width <= info->var.xres;
|
||||
|
@ -3120,6 +3120,13 @@ void guard_bio_eod(int op, struct bio *bio)
|
||||
/* Uhhuh. We've got a bio that straddles the device size! */
|
||||
truncated_bytes = bio->bi_iter.bi_size - (maxsector << 9);
|
||||
|
||||
/*
|
||||
* The bio contains more than one segment which spans EOD, just return
|
||||
* and let IO layer turn it into an EIO
|
||||
*/
|
||||
if (truncated_bytes > bvec->bv_len)
|
||||
return;
|
||||
|
||||
/* Truncate the bio.. */
|
||||
bio->bi_iter.bi_size -= truncated_bytes;
|
||||
bvec->bv_len -= truncated_bytes;
|
||||
|
@ -271,9 +271,9 @@ static void dump_referral(const struct dfs_info3_param *ref)
|
||||
{
|
||||
cifs_dbg(FYI, "DFS: ref path: %s\n", ref->path_name);
|
||||
cifs_dbg(FYI, "DFS: node path: %s\n", ref->node_name);
|
||||
cifs_dbg(FYI, "DFS: fl: %hd, srv_type: %hd\n",
|
||||
cifs_dbg(FYI, "DFS: fl: %d, srv_type: %d\n",
|
||||
ref->flags, ref->server_type);
|
||||
cifs_dbg(FYI, "DFS: ref_flags: %hd, path_consumed: %hd\n",
|
||||
cifs_dbg(FYI, "DFS: ref_flags: %d, path_consumed: %d\n",
|
||||
ref->ref_flag, ref->path_consumed);
|
||||
}
|
||||
|
||||
|
@ -1265,6 +1265,11 @@ cifs_parse_devname(const char *devname, struct smb_vol *vol)
|
||||
const char *delims = "/\\";
|
||||
size_t len;
|
||||
|
||||
if (unlikely(!devname || !*devname)) {
|
||||
cifs_dbg(VFS, "Device name not specified.\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* make sure we have a valid UNC double delimiter prefix */
|
||||
len = strspn(devname, delims);
|
||||
if (len != 2)
|
||||
|
@ -1631,8 +1631,20 @@ cifs_setlk(struct file *file, struct file_lock *flock, __u32 type,
|
||||
rc = server->ops->mand_unlock_range(cfile, flock, xid);
|
||||
|
||||
out:
|
||||
if (flock->fl_flags & FL_POSIX && !rc)
|
||||
if (flock->fl_flags & FL_POSIX) {
|
||||
/*
|
||||
* If this is a request to remove all locks because we
|
||||
* are closing the file, it doesn't matter if the
|
||||
* unlocking failed as both cifs.ko and the SMB server
|
||||
* remove the lock on file close
|
||||
*/
|
||||
if (rc) {
|
||||
cifs_dbg(VFS, "%s failed rc=%d\n", __func__, rc);
|
||||
if (!(flock->fl_flags & FL_CLOSE))
|
||||
return rc;
|
||||
}
|
||||
rc = locks_lock_file_wait(file, flock);
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
@ -306,7 +306,7 @@ coalesce_t2(char *second_buf, struct smb_hdr *target_hdr)
|
||||
remaining = tgt_total_cnt - total_in_tgt;
|
||||
|
||||
if (remaining < 0) {
|
||||
cifs_dbg(FYI, "Server sent too much data. tgt_total_cnt=%hu total_in_tgt=%hu\n",
|
||||
cifs_dbg(FYI, "Server sent too much data. tgt_total_cnt=%hu total_in_tgt=%u\n",
|
||||
tgt_total_cnt, total_in_tgt);
|
||||
return -EPROTO;
|
||||
}
|
||||
|
@ -1219,6 +1219,7 @@ int ext4_ind_remove_space(handle_t *handle, struct inode *inode,
|
||||
ext4_lblk_t offsets[4], offsets2[4];
|
||||
Indirect chain[4], chain2[4];
|
||||
Indirect *partial, *partial2;
|
||||
Indirect *p = NULL, *p2 = NULL;
|
||||
ext4_lblk_t max_block;
|
||||
__le32 nr = 0, nr2 = 0;
|
||||
int n = 0, n2 = 0;
|
||||
@ -1260,7 +1261,7 @@ int ext4_ind_remove_space(handle_t *handle, struct inode *inode,
|
||||
}
|
||||
|
||||
|
||||
partial = ext4_find_shared(inode, n, offsets, chain, &nr);
|
||||
partial = p = ext4_find_shared(inode, n, offsets, chain, &nr);
|
||||
if (nr) {
|
||||
if (partial == chain) {
|
||||
/* Shared branch grows from the inode */
|
||||
@ -1285,13 +1286,11 @@ int ext4_ind_remove_space(handle_t *handle, struct inode *inode,
|
||||
partial->p + 1,
|
||||
(__le32 *)partial->bh->b_data+addr_per_block,
|
||||
(chain+n-1) - partial);
|
||||
BUFFER_TRACE(partial->bh, "call brelse");
|
||||
brelse(partial->bh);
|
||||
partial--;
|
||||
}
|
||||
|
||||
end_range:
|
||||
partial2 = ext4_find_shared(inode, n2, offsets2, chain2, &nr2);
|
||||
partial2 = p2 = ext4_find_shared(inode, n2, offsets2, chain2, &nr2);
|
||||
if (nr2) {
|
||||
if (partial2 == chain2) {
|
||||
/*
|
||||
@ -1321,16 +1320,14 @@ end_range:
|
||||
(__le32 *)partial2->bh->b_data,
|
||||
partial2->p,
|
||||
(chain2+n2-1) - partial2);
|
||||
BUFFER_TRACE(partial2->bh, "call brelse");
|
||||
brelse(partial2->bh);
|
||||
partial2--;
|
||||
}
|
||||
goto do_indirects;
|
||||
}
|
||||
|
||||
/* Punch happened within the same level (n == n2) */
|
||||
partial = ext4_find_shared(inode, n, offsets, chain, &nr);
|
||||
partial2 = ext4_find_shared(inode, n2, offsets2, chain2, &nr2);
|
||||
partial = p = ext4_find_shared(inode, n, offsets, chain, &nr);
|
||||
partial2 = p2 = ext4_find_shared(inode, n2, offsets2, chain2, &nr2);
|
||||
|
||||
/* Free top, but only if partial2 isn't its subtree. */
|
||||
if (nr) {
|
||||
@ -1387,15 +1384,7 @@ end_range:
|
||||
partial->p + 1,
|
||||
partial2->p,
|
||||
(chain+n-1) - partial);
|
||||
while (partial > chain) {
|
||||
BUFFER_TRACE(partial->bh, "call brelse");
|
||||
brelse(partial->bh);
|
||||
}
|
||||
while (partial2 > chain2) {
|
||||
BUFFER_TRACE(partial2->bh, "call brelse");
|
||||
brelse(partial2->bh);
|
||||
}
|
||||
return 0;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1410,8 +1399,6 @@ end_range:
|
||||
partial->p + 1,
|
||||
(__le32 *)partial->bh->b_data+addr_per_block,
|
||||
(chain+n-1) - partial);
|
||||
BUFFER_TRACE(partial->bh, "call brelse");
|
||||
brelse(partial->bh);
|
||||
partial--;
|
||||
}
|
||||
if (partial2 > chain2 && depth2 <= depth) {
|
||||
@ -1419,11 +1406,21 @@ end_range:
|
||||
(__le32 *)partial2->bh->b_data,
|
||||
partial2->p,
|
||||
(chain2+n2-1) - partial2);
|
||||
BUFFER_TRACE(partial2->bh, "call brelse");
|
||||
brelse(partial2->bh);
|
||||
partial2--;
|
||||
}
|
||||
}
|
||||
|
||||
cleanup:
|
||||
while (p && p > chain) {
|
||||
BUFFER_TRACE(p->bh, "call brelse");
|
||||
brelse(p->bh);
|
||||
p--;
|
||||
}
|
||||
while (p2 && p2 > chain2) {
|
||||
BUFFER_TRACE(p2->bh, "call brelse");
|
||||
brelse(p2->bh);
|
||||
p2--;
|
||||
}
|
||||
return 0;
|
||||
|
||||
do_indirects:
|
||||
@ -1431,7 +1428,7 @@ do_indirects:
|
||||
switch (offsets[0]) {
|
||||
default:
|
||||
if (++n >= n2)
|
||||
return 0;
|
||||
break;
|
||||
nr = i_data[EXT4_IND_BLOCK];
|
||||
if (nr) {
|
||||
ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 1);
|
||||
@ -1439,7 +1436,7 @@ do_indirects:
|
||||
}
|
||||
case EXT4_IND_BLOCK:
|
||||
if (++n >= n2)
|
||||
return 0;
|
||||
break;
|
||||
nr = i_data[EXT4_DIND_BLOCK];
|
||||
if (nr) {
|
||||
ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 2);
|
||||
@ -1447,7 +1444,7 @@ do_indirects:
|
||||
}
|
||||
case EXT4_DIND_BLOCK:
|
||||
if (++n >= n2)
|
||||
return 0;
|
||||
break;
|
||||
nr = i_data[EXT4_TIND_BLOCK];
|
||||
if (nr) {
|
||||
ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 3);
|
||||
@ -1456,5 +1453,5 @@ do_indirects:
|
||||
case EXT4_TIND_BLOCK:
|
||||
;
|
||||
}
|
||||
return 0;
|
||||
goto cleanup;
|
||||
}
|
||||
|
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