Merge remote-tracking branch 'aosp/android-4.19-stable' into android12-base
* aosp/android-4.19-stable: Revert "USB: HCD: Fix URB giveback issue in tasklet function" drm/msm/mdp5: Fix global state lock backoff drm: bridge: sii8620: fix possible off-by-one drm/mediatek: dpi: Remove output format of YUV drm/rockchip: vop: Don't crash for invalid duplicate_state() drm/vc4: dsi: Correct DSI divider calculations media: hdpvr: fix error value returns in hdpvr_read drm: bridge: adv7511: Add check for mipi_dsi_driver_register wifi: iwlegacy: 4965: fix potential off-by-one overflow in il4965_rs_fill_link_cmd() ath9k: fix use-after-free in ath9k_hif_usb_rx_cb media: tw686x: Register the irq at the end of probe i2c: Fix a potential use after free drm/mediatek: Add pull-down MIPI operation in mtk_dsi_poweroff function drm/radeon: fix potential buffer overflow in ni_set_mc_special_registers() wifi: rtlwifi: fix error codes in rtl_debugfs_set_write_h2c() ath10k: do not enforce interrupt trigger type dm: return early from dm_pr_call() if DM device is suspended thermal/tools/tmon: Include pthread and time headers in tmon.h nohz/full, sched/rt: Fix missed tick-reenabling bug in dequeue_task_rt() regulator: of: Fix refcount leak bug in of_get_regulation_constraints() arm64: dts: qcom: msm8916: Fix typo in pronto remoteproc node bus: hisi_lpc: fix missing platform_device_put() in hisi_lpc_acpi_probe() ARM: dts: qcom: pm8841: add required thermal-sensor-cells cpufreq: zynq: Fix refcount leak in zynq_get_revision ARM: OMAP2+: Fix refcount leak in omap3xxx_prm_late_init soc: fsl: guts: machine variable might be unset ARM: dts: ast2500-evb: fix board compatible x86/pmem: Fix platform-device leak in error path ARM: bcm: Fix refcount leak in bcm_kona_smc_init meson-mx-socinfo: Fix refcount leak in meson_mx_socinfo_init ARM: findbit: fix overflowing offset selinux: Add boundary check in put_entry() PM: hibernate: defer device probing when resuming from hibernation arm64: dts: qcom: ipq8074: fix NAND node name ACPI: LPSS: Fix missing check in register_device_clock() ACPI: PM: save NVS memory for Lenovo G40-45 ACPI: EC: Remove duplicate ThinkPad X1 Carbon 6th entry from DMI quirks ARM: OMAP2+: display: Fix refcount leak bug ARM: dts: imx6ul: fix qspi node compatible ARM: dts: imx6ul: fix lcdif node compatible ARM: dts: imx6ul: change operating-points to uint32-matrix ARM: dts: imx6ul: add missing properties for sram ext2: Add more validity checks for inode counts USB: HCD: Fix URB giveback issue in tasklet function arm64: fix oops in concurrently setting insn_emulation sysctls arm64: Do not forget syscall when starting a new thread. netfilter: nf_tables: fix null deref due to zeroed list head netfilter: nf_tables: do not allow SET_ID to refer to another table MIPS: cpuinfo: Fix a warning for CONFIG_CPUMASK_OFFSTACK powerpc/powernv: Avoid crashing if rng is NULL powerpc/fsl-pci: Fix Class Code of PCIe Root Port PCI: Add defines for normal and subtractive PCI bridges ia64, processor: fix -Wincompatible-pointer-types in ia64_get_irr() md-raid10: fix KASAN warning serial: mvebu-uart: uart2 error bits clearing fuse: limit nsec iio: light: isl29028: Fix the warning in isl29028_remove() bpf: Verifer, adjust_scalar_min_max_vals to always call update_reg_bounds() drm/amdgpu: Check BO's requested pinning domains against its preferred_domains drm/nouveau: fix another off-by-one in nvbios_addr parisc: Fix device names in /proc/iomem ovl: drop WARN_ON() dentry is NULL in ovl_encode_fh() usbnet: Fix linkwatch use-after-free on disconnect fbcon: Fix boundary checks for fbcon=vc:n1-n2 parameters thermal: sysfs: Fix cooling_device_stats_setup() error code path fs: Add missing umask strip in vfs_tmpfile vfs: Check the truncate maximum size in inode_newsize_ok() tty: vt: initialize unicode screen buffer ALSA: hda/cirrus - support for iMac 12,1 model ALSA: hda/conexant: Add quirk for LENOVO 20149 Notebook model KVM: x86: Set error code to segment selector on LLDT/LTR non-canonical #GP KVM: x86: Mark TSS busy during LTR emulation _after_ all fault checks KVM: SVM: Don't BUG if userspace injects an interrupt with GIF=0 HID: wacom: Don't register pad_input for touch switch add barriers to buffer_uptodate and set_buffer_uptodate wifi: mac80211_hwsim: use 32-bit skb cookie wifi: mac80211_hwsim: add back erroneously removed cast wifi: mac80211_hwsim: fix race condition in pending packet ALSA: bcd2000: Fix a UAF bug on the error path of probing x86: link vdso and boot with -z noexecstack --no-warn-rwx-segments Makefile: link with -z noexecstack --no-warn-rwx-segments Change-Id: Ibfdbdf88770193213d228f96ea0fd937b1eb8409 Signed-off-by: UtsavBalar1231 <utsavbalar1231@gmail.com>
This commit is contained in:
commit
779b095234
3
Makefile
3
Makefile
@ -989,6 +989,9 @@ LDFLAGS_BUILD_ID := $(call ld-option, --build-id)
|
||||
KBUILD_LDFLAGS_MODULE += $(LDFLAGS_BUILD_ID)
|
||||
LDFLAGS_vmlinux += $(LDFLAGS_BUILD_ID)
|
||||
|
||||
KBUILD_LDFLAGS += -z noexecstack
|
||||
KBUILD_LDFLAGS += $(call ld-option,--no-warn-rwx-segments)
|
||||
|
||||
ifeq ($(CONFIG_STRIP_ASM_SYMS),y)
|
||||
LDFLAGS_vmlinux += $(call ld-option, -X,)
|
||||
endif
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
/ {
|
||||
model = "AST2500 EVB";
|
||||
compatible = "aspeed,ast2500";
|
||||
compatible = "aspeed,ast2500-evb", "aspeed,ast2500";
|
||||
|
||||
aliases {
|
||||
serial4 = &uart5;
|
||||
|
@ -61,20 +61,18 @@
|
||||
reg = <0>;
|
||||
clock-latency = <61036>; /* two CLK32 periods */
|
||||
#cooling-cells = <2>;
|
||||
operating-points = <
|
||||
operating-points =
|
||||
/* kHz uV */
|
||||
696000 1275000
|
||||
528000 1175000
|
||||
396000 1025000
|
||||
198000 950000
|
||||
>;
|
||||
fsl,soc-operating-points = <
|
||||
<696000 1275000>,
|
||||
<528000 1175000>,
|
||||
<396000 1025000>,
|
||||
<198000 950000>;
|
||||
fsl,soc-operating-points =
|
||||
/* KHz uV */
|
||||
696000 1275000
|
||||
528000 1175000
|
||||
396000 1175000
|
||||
198000 1175000
|
||||
>;
|
||||
<696000 1275000>,
|
||||
<528000 1175000>,
|
||||
<396000 1175000>,
|
||||
<198000 1175000>;
|
||||
clocks = <&clks IMX6UL_CLK_ARM>,
|
||||
<&clks IMX6UL_CLK_PLL2_BUS>,
|
||||
<&clks IMX6UL_CLK_PLL2_PFD2>,
|
||||
@ -169,6 +167,9 @@
|
||||
ocram: sram@900000 {
|
||||
compatible = "mmio-sram";
|
||||
reg = <0x00900000 0x20000>;
|
||||
ranges = <0 0x00900000 0x20000>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
};
|
||||
|
||||
dma_apbh: dma-apbh@1804000 {
|
||||
@ -939,7 +940,7 @@
|
||||
};
|
||||
|
||||
lcdif: lcdif@21c8000 {
|
||||
compatible = "fsl,imx6ul-lcdif", "fsl,imx28-lcdif";
|
||||
compatible = "fsl,imx6ul-lcdif", "fsl,imx6sx-lcdif";
|
||||
reg = <0x021c8000 0x4000>;
|
||||
interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clks IMX6UL_CLK_LCDIF_PIX>,
|
||||
@ -952,7 +953,7 @@
|
||||
qspi: qspi@21e0000 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
compatible = "fsl,imx6ul-qspi", "fsl,imx6sx-qspi";
|
||||
compatible = "fsl,imx6ul-qspi";
|
||||
reg = <0x021e0000 0x4000>, <0x60000000 0x10000000>;
|
||||
reg-names = "QuadSPI", "QuadSPI-memory";
|
||||
interrupts = <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>;
|
||||
|
@ -25,6 +25,7 @@
|
||||
compatible = "qcom,spmi-temp-alarm";
|
||||
reg = <0x2400>;
|
||||
interrupts = <4 0x24 0 IRQ_TYPE_EDGE_RISING>;
|
||||
#thermal-sensor-cells = <0>;
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -43,8 +43,8 @@ ENDPROC(_find_first_zero_bit_le)
|
||||
* Prototype: int find_next_zero_bit(void *addr, unsigned int maxbit, int offset)
|
||||
*/
|
||||
ENTRY(_find_next_zero_bit_le)
|
||||
teq r1, #0
|
||||
beq 3b
|
||||
cmp r2, r1
|
||||
bhs 3b
|
||||
ands ip, r2, #7
|
||||
beq 1b @ If new byte, goto old routine
|
||||
ARM( ldrb r3, [r0, r2, lsr #3] )
|
||||
@ -84,8 +84,8 @@ ENDPROC(_find_first_bit_le)
|
||||
* Prototype: int find_next_zero_bit(void *addr, unsigned int maxbit, int offset)
|
||||
*/
|
||||
ENTRY(_find_next_bit_le)
|
||||
teq r1, #0
|
||||
beq 3b
|
||||
cmp r2, r1
|
||||
bhs 3b
|
||||
ands ip, r2, #7
|
||||
beq 1b @ If new byte, goto old routine
|
||||
ARM( ldrb r3, [r0, r2, lsr #3] )
|
||||
@ -118,8 +118,8 @@ ENTRY(_find_first_zero_bit_be)
|
||||
ENDPROC(_find_first_zero_bit_be)
|
||||
|
||||
ENTRY(_find_next_zero_bit_be)
|
||||
teq r1, #0
|
||||
beq 3b
|
||||
cmp r2, r1
|
||||
bhs 3b
|
||||
ands ip, r2, #7
|
||||
beq 1b @ If new byte, goto old routine
|
||||
eor r3, r2, #0x18 @ big endian byte ordering
|
||||
@ -152,8 +152,8 @@ ENTRY(_find_first_bit_be)
|
||||
ENDPROC(_find_first_bit_be)
|
||||
|
||||
ENTRY(_find_next_bit_be)
|
||||
teq r1, #0
|
||||
beq 3b
|
||||
cmp r2, r1
|
||||
bhs 3b
|
||||
ands ip, r2, #7
|
||||
beq 1b @ If new byte, goto old routine
|
||||
eor r3, r2, #0x18 @ big endian byte ordering
|
||||
|
@ -54,6 +54,7 @@ int __init bcm_kona_smc_init(void)
|
||||
return -ENODEV;
|
||||
|
||||
prop_val = of_get_address(node, 0, &prop_size, NULL);
|
||||
of_node_put(node);
|
||||
if (!prop_val)
|
||||
return -EINVAL;
|
||||
|
||||
|
@ -211,6 +211,7 @@ static int __init omapdss_init_fbdev(void)
|
||||
node = of_find_node_by_name(NULL, "omap4_padconf_global");
|
||||
if (node)
|
||||
omap4_dsi_mux_syscon = syscon_node_to_regmap(node);
|
||||
of_node_put(node);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -711,6 +711,7 @@ static int omap3xxx_prm_late_init(void)
|
||||
}
|
||||
|
||||
irq_num = of_irq_get(np, 0);
|
||||
of_node_put(np);
|
||||
if (irq_num == -EPROBE_DEFER)
|
||||
return irq_num;
|
||||
|
||||
|
@ -84,6 +84,7 @@ static int __init zynq_get_revision(void)
|
||||
}
|
||||
|
||||
zynq_devcfg_base = of_iomap(np, 0);
|
||||
of_node_put(np);
|
||||
if (!zynq_devcfg_base) {
|
||||
pr_err("%s: Unable to map I/O memory\n", __func__);
|
||||
return -1;
|
||||
|
@ -261,7 +261,7 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
qpic_nand: nand@79b0000 {
|
||||
qpic_nand: nand-controller@79b0000 {
|
||||
compatible = "qcom,ipq8074-nand";
|
||||
reg = <0x79b0000 0x10000>;
|
||||
#address-cells = <1>;
|
||||
|
@ -1039,8 +1039,8 @@
|
||||
vddmx-supply = <&pm8916_l3>;
|
||||
vddpx-supply = <&pm8916_l7>;
|
||||
|
||||
qcom,state = <&wcnss_smp2p_out 0>;
|
||||
qcom,state-names = "stop";
|
||||
qcom,smem-states = <&wcnss_smp2p_out 0>;
|
||||
qcom,smem-state-names = "stop";
|
||||
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&wcnss_pin_a>;
|
||||
|
@ -177,8 +177,9 @@ void tls_preserve_current_state(void);
|
||||
|
||||
static inline void start_thread_common(struct pt_regs *regs, unsigned long pc)
|
||||
{
|
||||
s32 previous_syscall = regs->syscallno;
|
||||
memset(regs, 0, sizeof(*regs));
|
||||
forget_syscall(regs);
|
||||
regs->syscallno = previous_syscall;
|
||||
regs->pc = pc;
|
||||
}
|
||||
|
||||
|
@ -552,7 +552,7 @@ ia64_get_irr(unsigned int vector)
|
||||
{
|
||||
unsigned int reg = vector / 64;
|
||||
unsigned int bit = vector % 64;
|
||||
u64 irr;
|
||||
unsigned long irr;
|
||||
|
||||
switch (reg) {
|
||||
case 0: irr = ia64_getreg(_IA64_REG_CR_IRR0); break;
|
||||
|
@ -168,7 +168,7 @@ static void *c_start(struct seq_file *m, loff_t *pos)
|
||||
{
|
||||
unsigned long i = *pos;
|
||||
|
||||
return i < NR_CPUS ? (void *) (i + 1) : NULL;
|
||||
return i < nr_cpu_ids ? (void *) (i + 1) : NULL;
|
||||
}
|
||||
|
||||
static void *c_next(struct seq_file *m, void *v, loff_t *pos)
|
||||
|
@ -499,7 +499,6 @@ alloc_pa_dev(unsigned long hpa, struct hardware_path *mod_path)
|
||||
dev->id.hversion_rev = iodc_data[1] & 0x0f;
|
||||
dev->id.sversion = ((iodc_data[4] & 0x0f) << 16) |
|
||||
(iodc_data[5] << 8) | iodc_data[6];
|
||||
dev->hpa.name = parisc_pathname(dev);
|
||||
dev->hpa.start = hpa;
|
||||
/* This is awkward. The STI spec says that gfx devices may occupy
|
||||
* 32MB or 64MB. Unfortunately, we don't know how to tell whether
|
||||
@ -513,10 +512,10 @@ alloc_pa_dev(unsigned long hpa, struct hardware_path *mod_path)
|
||||
dev->hpa.end = hpa + 0xfff;
|
||||
}
|
||||
dev->hpa.flags = IORESOURCE_MEM;
|
||||
name = parisc_hardware_description(&dev->id);
|
||||
if (name) {
|
||||
strlcpy(dev->name, name, sizeof(dev->name));
|
||||
}
|
||||
dev->hpa.name = dev->name;
|
||||
name = parisc_hardware_description(&dev->id) ? : "unknown";
|
||||
snprintf(dev->name, sizeof(dev->name), "%s [%s]",
|
||||
name, parisc_pathname(dev));
|
||||
|
||||
/* Silently fail things like mouse ports which are subsumed within
|
||||
* the keyboard controller
|
||||
|
@ -67,6 +67,8 @@ int powernv_get_random_real_mode(unsigned long *v)
|
||||
struct powernv_rng *rng;
|
||||
|
||||
rng = raw_cpu_read(powernv_rng);
|
||||
if (!rng)
|
||||
return 0;
|
||||
|
||||
*v = rng_whiten(rng, __raw_rm_readq(rng->regs_real));
|
||||
|
||||
|
@ -523,6 +523,7 @@ int fsl_add_bridge(struct platform_device *pdev, int is_primary)
|
||||
struct resource rsrc;
|
||||
const int *bus_range;
|
||||
u8 hdr_type, progif;
|
||||
u32 class_code;
|
||||
struct device_node *dev;
|
||||
struct ccsr_pci __iomem *pci;
|
||||
u16 temp;
|
||||
@ -596,6 +597,13 @@ int fsl_add_bridge(struct platform_device *pdev, int is_primary)
|
||||
PPC_INDIRECT_TYPE_SURPRESS_PRIMARY_BUS;
|
||||
if (fsl_pcie_check_link(hose))
|
||||
hose->indirect_type |= PPC_INDIRECT_TYPE_NO_PCIE_LINK;
|
||||
/* Fix Class Code to PCI_CLASS_BRIDGE_PCI_NORMAL for pre-3.0 controller */
|
||||
if (in_be32(&pci->block_rev1) < PCIE_IP_REV_3_0) {
|
||||
early_read_config_dword(hose, 0, 0, PCIE_FSL_CSR_CLASSCODE, &class_code);
|
||||
class_code &= 0xff;
|
||||
class_code |= PCI_CLASS_BRIDGE_PCI_NORMAL << 8;
|
||||
early_write_config_dword(hose, 0, 0, PCIE_FSL_CSR_CLASSCODE, class_code);
|
||||
}
|
||||
} else {
|
||||
/*
|
||||
* Set PBFR(PCI Bus Function Register)[10] = 1 to
|
||||
|
@ -23,6 +23,7 @@ struct platform_device;
|
||||
|
||||
#define PCIE_LTSSM 0x0404 /* PCIE Link Training and Status */
|
||||
#define PCIE_LTSSM_L0 0x16 /* L0 state */
|
||||
#define PCIE_FSL_CSR_CLASSCODE 0x474 /* FSL GPEX CSR */
|
||||
#define PCIE_IP_REV_2_2 0x02080202 /* PCIE IP block version Rev2.2 */
|
||||
#define PCIE_IP_REV_3_0 0x02080300 /* PCIE IP block version Rev3.0 */
|
||||
#define PIWAR_EN 0x80000000 /* Enable */
|
||||
|
@ -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 := -m elf_i386 -T
|
||||
LDFLAGS_setup.elf := -m elf_i386 -z noexecstack -T
|
||||
$(obj)/setup.elf: $(src)/setup.ld $(SETUP_OBJS) FORCE
|
||||
$(call if_changed,ld)
|
||||
|
||||
|
@ -57,6 +57,10 @@ else
|
||||
KBUILD_LDFLAGS += $(shell $(LD) --help 2>&1 | grep -q "\-z noreloc-overflow" \
|
||||
&& echo "-z noreloc-overflow -pie --no-dynamic-linker")
|
||||
endif
|
||||
|
||||
KBUILD_LDFLAGS += -z noexecstack
|
||||
KBUILD_LDFLAGS += $(call ld-option,--no-warn-rwx-segments)
|
||||
|
||||
LDFLAGS_vmlinux := -T
|
||||
|
||||
hostprogs-y := mkpiggy
|
||||
|
@ -180,7 +180,7 @@ quiet_cmd_vdso = VDSO $@
|
||||
|
||||
VDSO_LDFLAGS = -shared $(call ld-option, --hash-style=both) \
|
||||
$(call ld-option, --build-id) $(call ld-option, --eh-frame-hdr) \
|
||||
-Bsymbolic
|
||||
-Bsymbolic -z noexecstack
|
||||
GCOV_PROFILE := n
|
||||
|
||||
quiet_cmd_vdso_and_check = VDSO $@
|
||||
|
@ -27,6 +27,11 @@ static __init int register_e820_pmem(void)
|
||||
* simply here to trigger the module to load on demand.
|
||||
*/
|
||||
pdev = platform_device_alloc("e820_pmem", -1);
|
||||
return platform_device_add(pdev);
|
||||
|
||||
rc = platform_device_add(pdev);
|
||||
if (rc)
|
||||
platform_device_put(pdev);
|
||||
|
||||
return rc;
|
||||
}
|
||||
device_initcall(register_e820_pmem);
|
||||
|
@ -1708,16 +1708,6 @@ static int __load_segment_descriptor(struct x86_emulate_ctxt *ctxt,
|
||||
case VCPU_SREG_TR:
|
||||
if (seg_desc.s || (seg_desc.type != 1 && seg_desc.type != 9))
|
||||
goto exception;
|
||||
if (!seg_desc.p) {
|
||||
err_vec = NP_VECTOR;
|
||||
goto exception;
|
||||
}
|
||||
old_desc = seg_desc;
|
||||
seg_desc.type |= 2; /* busy */
|
||||
ret = ctxt->ops->cmpxchg_emulated(ctxt, desc_addr, &old_desc, &seg_desc,
|
||||
sizeof(seg_desc), &ctxt->exception);
|
||||
if (ret != X86EMUL_CONTINUE)
|
||||
return ret;
|
||||
break;
|
||||
case VCPU_SREG_LDTR:
|
||||
if (seg_desc.s || seg_desc.type != 2)
|
||||
@ -1755,8 +1745,17 @@ static int __load_segment_descriptor(struct x86_emulate_ctxt *ctxt,
|
||||
if (ret != X86EMUL_CONTINUE)
|
||||
return ret;
|
||||
if (emul_is_noncanonical_address(get_desc_base(&seg_desc) |
|
||||
((u64)base3 << 32), ctxt))
|
||||
return emulate_gp(ctxt, 0);
|
||||
((u64)base3 << 32), ctxt))
|
||||
return emulate_gp(ctxt, err_code);
|
||||
}
|
||||
|
||||
if (seg == VCPU_SREG_TR) {
|
||||
old_desc = seg_desc;
|
||||
seg_desc.type |= 2; /* busy */
|
||||
ret = ctxt->ops->cmpxchg_emulated(ctxt, desc_addr, &old_desc, &seg_desc,
|
||||
sizeof(seg_desc), &ctxt->exception);
|
||||
if (ret != X86EMUL_CONTINUE)
|
||||
return ret;
|
||||
}
|
||||
load:
|
||||
ctxt->ops->set_segment(ctxt, selector, &seg_desc, base3, seg);
|
||||
|
@ -5142,8 +5142,6 @@ static void svm_set_irq(struct kvm_vcpu *vcpu)
|
||||
{
|
||||
struct vcpu_svm *svm = to_svm(vcpu);
|
||||
|
||||
BUG_ON(!(gif_set(svm)));
|
||||
|
||||
trace_kvm_inj_virq(vcpu->arch.interrupt.nr);
|
||||
++vcpu->stat.irq_injections;
|
||||
|
||||
|
@ -401,6 +401,9 @@ static int register_device_clock(struct acpi_device *adev,
|
||||
if (!lpss_clk_dev)
|
||||
lpt_register_clock_device();
|
||||
|
||||
if (IS_ERR(lpss_clk_dev))
|
||||
return PTR_ERR(lpss_clk_dev);
|
||||
|
||||
clk_data = platform_get_drvdata(lpss_clk_dev);
|
||||
if (!clk_data)
|
||||
return -ENODEV;
|
||||
|
@ -2118,13 +2118,6 @@ static const struct dmi_system_id acpi_ec_no_wakeup[] = {
|
||||
DMI_MATCH(DMI_PRODUCT_FAMILY, "Thinkpad X1 Carbon 6th"),
|
||||
},
|
||||
},
|
||||
{
|
||||
.ident = "ThinkPad X1 Carbon 6th",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
DMI_MATCH(DMI_PRODUCT_FAMILY, "ThinkPad X1 Carbon 6th"),
|
||||
},
|
||||
},
|
||||
{
|
||||
.ident = "ThinkPad X1 Yoga 3rd",
|
||||
.matches = {
|
||||
|
@ -359,6 +359,14 @@ static const struct dmi_system_id acpisleep_dmi_table[] __initconst = {
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "80E3"),
|
||||
},
|
||||
},
|
||||
{
|
||||
.callback = init_nvs_save_s3,
|
||||
.ident = "Lenovo G40-45",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "80E1"),
|
||||
},
|
||||
},
|
||||
/*
|
||||
* https://bugzilla.kernel.org/show_bug.cgi?id=196907
|
||||
* Some Dell XPS13 9360 cannot do suspend-to-idle using the Low Power
|
||||
|
@ -504,13 +504,13 @@ static int hisi_lpc_acpi_probe(struct device *hostdev)
|
||||
{
|
||||
struct acpi_device *adev = ACPI_COMPANION(hostdev);
|
||||
struct acpi_device *child;
|
||||
struct platform_device *pdev;
|
||||
int ret;
|
||||
|
||||
/* Only consider the children of the host */
|
||||
list_for_each_entry(child, &adev->children, node) {
|
||||
const char *hid = acpi_device_hid(child);
|
||||
const struct hisi_lpc_acpi_cell *cell;
|
||||
struct platform_device *pdev;
|
||||
const struct resource *res;
|
||||
bool found = false;
|
||||
int num_res;
|
||||
@ -573,22 +573,24 @@ static int hisi_lpc_acpi_probe(struct device *hostdev)
|
||||
|
||||
ret = platform_device_add_resources(pdev, res, num_res);
|
||||
if (ret)
|
||||
goto fail;
|
||||
goto fail_put_device;
|
||||
|
||||
ret = platform_device_add_data(pdev, cell->pdata,
|
||||
cell->pdata_size);
|
||||
if (ret)
|
||||
goto fail;
|
||||
goto fail_put_device;
|
||||
|
||||
ret = platform_device_add(pdev);
|
||||
if (ret)
|
||||
goto fail;
|
||||
goto fail_put_device;
|
||||
|
||||
acpi_device_set_enumerated(child);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
fail_put_device:
|
||||
platform_device_put(pdev);
|
||||
fail:
|
||||
hisi_lpc_acpi_remove(hostdev);
|
||||
return ret;
|
||||
|
@ -883,6 +883,10 @@ int amdgpu_bo_pin_restricted(struct amdgpu_bo *bo, u32 domain,
|
||||
if (WARN_ON_ONCE(min_offset > max_offset))
|
||||
return -EINVAL;
|
||||
|
||||
/* Check domain to be pinned to against preferred domains */
|
||||
if (bo->preferred_domains & domain)
|
||||
domain = bo->preferred_domains & domain;
|
||||
|
||||
/* A shared bo cannot be migrated to VRAM */
|
||||
if (bo->prime_shared_count) {
|
||||
if (domain & AMDGPU_GEM_DOMAIN_GTT)
|
||||
|
@ -1301,10 +1301,21 @@ static struct i2c_driver adv7511_driver = {
|
||||
|
||||
static int __init adv7511_init(void)
|
||||
{
|
||||
if (IS_ENABLED(CONFIG_DRM_MIPI_DSI))
|
||||
mipi_dsi_driver_register(&adv7533_dsi_driver);
|
||||
int ret;
|
||||
|
||||
return i2c_add_driver(&adv7511_driver);
|
||||
if (IS_ENABLED(CONFIG_DRM_MIPI_DSI)) {
|
||||
ret = mipi_dsi_driver_register(&adv7533_dsi_driver);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = i2c_add_driver(&adv7511_driver);
|
||||
if (ret) {
|
||||
if (IS_ENABLED(CONFIG_DRM_MIPI_DSI))
|
||||
mipi_dsi_driver_unregister(&adv7533_dsi_driver);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
module_init(adv7511_init);
|
||||
|
||||
|
@ -607,7 +607,7 @@ static void *sii8620_burst_get_tx_buf(struct sii8620 *ctx, int len)
|
||||
u8 *buf = &ctx->burst.tx_buf[ctx->burst.tx_count];
|
||||
int size = len + 2;
|
||||
|
||||
if (ctx->burst.tx_count + size > ARRAY_SIZE(ctx->burst.tx_buf)) {
|
||||
if (ctx->burst.tx_count + size >= ARRAY_SIZE(ctx->burst.tx_buf)) {
|
||||
dev_err(ctx->dev, "TX-BLK buffer exhausted\n");
|
||||
ctx->error = -EINVAL;
|
||||
return NULL;
|
||||
@ -624,7 +624,7 @@ static u8 *sii8620_burst_get_rx_buf(struct sii8620 *ctx, int len)
|
||||
u8 *buf = &ctx->burst.rx_buf[ctx->burst.rx_count];
|
||||
int size = len + 1;
|
||||
|
||||
if (ctx->burst.tx_count + size > ARRAY_SIZE(ctx->burst.tx_buf)) {
|
||||
if (ctx->burst.rx_count + size >= ARRAY_SIZE(ctx->burst.rx_buf)) {
|
||||
dev_err(ctx->dev, "RX-BLK buffer exhausted\n");
|
||||
ctx->error = -EINVAL;
|
||||
return NULL;
|
||||
|
@ -52,13 +52,7 @@ enum mtk_dpi_out_channel_swap {
|
||||
};
|
||||
|
||||
enum mtk_dpi_out_color_format {
|
||||
MTK_DPI_COLOR_FORMAT_RGB,
|
||||
MTK_DPI_COLOR_FORMAT_RGB_FULL,
|
||||
MTK_DPI_COLOR_FORMAT_YCBCR_444,
|
||||
MTK_DPI_COLOR_FORMAT_YCBCR_422,
|
||||
MTK_DPI_COLOR_FORMAT_XV_YCC,
|
||||
MTK_DPI_COLOR_FORMAT_YCBCR_444_FULL,
|
||||
MTK_DPI_COLOR_FORMAT_YCBCR_422_FULL
|
||||
MTK_DPI_COLOR_FORMAT_RGB
|
||||
};
|
||||
|
||||
struct mtk_dpi {
|
||||
@ -347,24 +341,11 @@ static void mtk_dpi_config_2n_h_fre(struct mtk_dpi *dpi)
|
||||
static void mtk_dpi_config_color_format(struct mtk_dpi *dpi,
|
||||
enum mtk_dpi_out_color_format format)
|
||||
{
|
||||
if ((format == MTK_DPI_COLOR_FORMAT_YCBCR_444) ||
|
||||
(format == MTK_DPI_COLOR_FORMAT_YCBCR_444_FULL)) {
|
||||
mtk_dpi_config_yuv422_enable(dpi, false);
|
||||
mtk_dpi_config_csc_enable(dpi, true);
|
||||
mtk_dpi_config_swap_input(dpi, false);
|
||||
mtk_dpi_config_channel_swap(dpi, MTK_DPI_OUT_CHANNEL_SWAP_BGR);
|
||||
} else if ((format == MTK_DPI_COLOR_FORMAT_YCBCR_422) ||
|
||||
(format == MTK_DPI_COLOR_FORMAT_YCBCR_422_FULL)) {
|
||||
mtk_dpi_config_yuv422_enable(dpi, true);
|
||||
mtk_dpi_config_csc_enable(dpi, true);
|
||||
mtk_dpi_config_swap_input(dpi, true);
|
||||
mtk_dpi_config_channel_swap(dpi, MTK_DPI_OUT_CHANNEL_SWAP_RGB);
|
||||
} else {
|
||||
mtk_dpi_config_yuv422_enable(dpi, false);
|
||||
mtk_dpi_config_csc_enable(dpi, false);
|
||||
mtk_dpi_config_swap_input(dpi, false);
|
||||
mtk_dpi_config_channel_swap(dpi, MTK_DPI_OUT_CHANNEL_SWAP_RGB);
|
||||
}
|
||||
/* only support RGB888 */
|
||||
mtk_dpi_config_yuv422_enable(dpi, false);
|
||||
mtk_dpi_config_csc_enable(dpi, false);
|
||||
mtk_dpi_config_swap_input(dpi, false);
|
||||
mtk_dpi_config_channel_swap(dpi, MTK_DPI_OUT_CHANNEL_SWAP_RGB);
|
||||
}
|
||||
|
||||
static void mtk_dpi_power_off(struct mtk_dpi *dpi, enum mtk_dpi_power_ctl pctl)
|
||||
|
@ -651,6 +651,8 @@ static void mtk_dsi_poweroff(struct mtk_dsi *dsi)
|
||||
mtk_dsi_reset_engine(dsi);
|
||||
mtk_dsi_lane0_ulp_mode_enter(dsi);
|
||||
mtk_dsi_clk_ulp_mode_enter(dsi);
|
||||
/* set the lane number as 0 to pull down mipi */
|
||||
writel(0, dsi->regs + DSI_TXRX_CTRL);
|
||||
|
||||
mtk_dsi_disable(dsi);
|
||||
|
||||
|
@ -134,12 +134,13 @@ int mdp5_pipe_release(struct drm_atomic_state *s, struct mdp5_hw_pipe *hwpipe)
|
||||
{
|
||||
struct msm_drm_private *priv = s->dev->dev_private;
|
||||
struct mdp5_kms *mdp5_kms = to_mdp5_kms(to_mdp_kms(priv->kms));
|
||||
struct mdp5_global_state *state = mdp5_get_global_state(s);
|
||||
struct mdp5_global_state *state;
|
||||
struct mdp5_hw_pipe_state *new_state;
|
||||
|
||||
if (!hwpipe)
|
||||
return 0;
|
||||
|
||||
state = mdp5_get_global_state(s);
|
||||
if (IS_ERR(state))
|
||||
return PTR_ERR(state);
|
||||
|
||||
|
@ -33,7 +33,7 @@ nvbios_addr(struct nvkm_bios *bios, u32 *addr, u8 size)
|
||||
{
|
||||
u32 p = *addr;
|
||||
|
||||
if (*addr > bios->image0_size && bios->imaged_addr) {
|
||||
if (*addr >= bios->image0_size && bios->imaged_addr) {
|
||||
*addr -= bios->image0_size;
|
||||
*addr += bios->imaged_addr;
|
||||
}
|
||||
|
@ -2738,10 +2738,10 @@ static int ni_set_mc_special_registers(struct radeon_device *rdev,
|
||||
table->mc_reg_table_entry[k].mc_data[j] |= 0x100;
|
||||
}
|
||||
j++;
|
||||
if (j > SMC_NISLANDS_MC_REGISTER_ARRAY_SIZE)
|
||||
return -EINVAL;
|
||||
break;
|
||||
case MC_SEQ_RESERVE_M >> 2:
|
||||
if (j >= SMC_NISLANDS_MC_REGISTER_ARRAY_SIZE)
|
||||
return -EINVAL;
|
||||
temp_reg = RREG32(MC_PMG_CMD_MRS1);
|
||||
table->mc_reg_address[j].s1 = MC_PMG_CMD_MRS1 >> 2;
|
||||
table->mc_reg_address[j].s0 = MC_SEQ_PMG_CMD_MRS1_LP >> 2;
|
||||
@ -2750,8 +2750,6 @@ static int ni_set_mc_special_registers(struct radeon_device *rdev,
|
||||
(temp_reg & 0xffff0000) |
|
||||
(table->mc_reg_table_entry[k].mc_data[i] & 0x0000ffff);
|
||||
j++;
|
||||
if (j > SMC_NISLANDS_MC_REGISTER_ARRAY_SIZE)
|
||||
return -EINVAL;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -1088,6 +1088,9 @@ static struct drm_crtc_state *vop_crtc_duplicate_state(struct drm_crtc *crtc)
|
||||
{
|
||||
struct rockchip_crtc_state *rockchip_state;
|
||||
|
||||
if (WARN_ON(!crtc->state))
|
||||
return NULL;
|
||||
|
||||
rockchip_state = kzalloc(sizeof(*rockchip_state), GFP_KERNEL);
|
||||
if (!rockchip_state)
|
||||
return NULL;
|
||||
|
@ -853,11 +853,9 @@ static bool vc4_dsi_encoder_mode_fixup(struct drm_encoder *encoder,
|
||||
/* Find what divider gets us a faster clock than the requested
|
||||
* pixel clock.
|
||||
*/
|
||||
for (divider = 1; divider < 8; divider++) {
|
||||
if (parent_rate / divider < pll_clock) {
|
||||
divider--;
|
||||
for (divider = 1; divider < 255; divider++) {
|
||||
if (parent_rate / (divider + 1) < pll_clock)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* Now that we've picked a PLL divider, calculate back to its
|
||||
|
@ -2095,7 +2095,7 @@ static int wacom_register_inputs(struct wacom *wacom)
|
||||
|
||||
error = wacom_setup_pad_input_capabilities(pad_input_dev, wacom_wac);
|
||||
if (error) {
|
||||
/* no pad in use on this interface */
|
||||
/* no pad events using this interface */
|
||||
input_free_device(pad_input_dev);
|
||||
wacom_wac->pad_input = NULL;
|
||||
pad_input_dev = NULL;
|
||||
|
@ -1954,7 +1954,6 @@ static void wacom_wac_pad_usage_mapping(struct hid_device *hdev,
|
||||
wacom_wac->has_mute_touch_switch = true;
|
||||
usage->type = EV_SW;
|
||||
usage->code = SW_MUTE_DEVICE;
|
||||
features->device_type |= WACOM_DEVICETYPE_PAD;
|
||||
break;
|
||||
case WACOM_HID_WD_TOUCHSTRIP:
|
||||
wacom_map_usage(input, usage, field, EV_ABS, ABS_RX, 0);
|
||||
@ -2034,6 +2033,30 @@ static void wacom_wac_pad_event(struct hid_device *hdev, struct hid_field *field
|
||||
wacom_wac->hid_data.inrange_state |= value;
|
||||
}
|
||||
|
||||
/* Process touch switch state first since it is reported through touch interface,
|
||||
* which is indepentent of pad interface. In the case when there are no other pad
|
||||
* events, the pad interface will not even be created.
|
||||
*/
|
||||
if ((equivalent_usage == WACOM_HID_WD_MUTE_DEVICE) ||
|
||||
(equivalent_usage == WACOM_HID_WD_TOUCHONOFF)) {
|
||||
if (wacom_wac->shared->touch_input) {
|
||||
bool *is_touch_on = &wacom_wac->shared->is_touch_on;
|
||||
|
||||
if (equivalent_usage == WACOM_HID_WD_MUTE_DEVICE && value)
|
||||
*is_touch_on = !(*is_touch_on);
|
||||
else if (equivalent_usage == WACOM_HID_WD_TOUCHONOFF)
|
||||
*is_touch_on = value;
|
||||
|
||||
input_report_switch(wacom_wac->shared->touch_input,
|
||||
SW_MUTE_DEVICE, !(*is_touch_on));
|
||||
input_sync(wacom_wac->shared->touch_input);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (!input)
|
||||
return;
|
||||
|
||||
switch (equivalent_usage) {
|
||||
case WACOM_HID_WD_TOUCHRING:
|
||||
/*
|
||||
@ -2063,22 +2086,6 @@ static void wacom_wac_pad_event(struct hid_device *hdev, struct hid_field *field
|
||||
input_event(input, usage->type, usage->code, 0);
|
||||
break;
|
||||
|
||||
case WACOM_HID_WD_MUTE_DEVICE:
|
||||
case WACOM_HID_WD_TOUCHONOFF:
|
||||
if (wacom_wac->shared->touch_input) {
|
||||
bool *is_touch_on = &wacom_wac->shared->is_touch_on;
|
||||
|
||||
if (equivalent_usage == WACOM_HID_WD_MUTE_DEVICE && value)
|
||||
*is_touch_on = !(*is_touch_on);
|
||||
else if (equivalent_usage == WACOM_HID_WD_TOUCHONOFF)
|
||||
*is_touch_on = value;
|
||||
|
||||
input_report_switch(wacom_wac->shared->touch_input,
|
||||
SW_MUTE_DEVICE, !(*is_touch_on));
|
||||
input_sync(wacom_wac->shared->touch_input);
|
||||
}
|
||||
break;
|
||||
|
||||
case WACOM_HID_WD_MODE_CHANGE:
|
||||
if (wacom_wac->is_direct_mode != value) {
|
||||
wacom_wac->is_direct_mode = value;
|
||||
@ -2719,7 +2726,7 @@ void wacom_wac_event(struct hid_device *hdev, struct hid_field *field,
|
||||
/* usage tests must precede field tests */
|
||||
if (WACOM_BATTERY_USAGE(usage))
|
||||
wacom_wac_battery_event(hdev, field, usage, value);
|
||||
else if (WACOM_PAD_FIELD(field) && wacom->wacom_wac.pad_input)
|
||||
else if (WACOM_PAD_FIELD(field))
|
||||
wacom_wac_pad_event(hdev, field, usage, value);
|
||||
else if (WACOM_PEN_FIELD(field) && wacom->wacom_wac.pen_input)
|
||||
wacom_wac_pen_event(hdev, field, usage, value);
|
||||
|
@ -2273,8 +2273,9 @@ void i2c_put_adapter(struct i2c_adapter *adap)
|
||||
if (!adap)
|
||||
return;
|
||||
|
||||
put_device(&adap->dev);
|
||||
module_put(adap->owner);
|
||||
/* Should be last, otherwise we risk use-after-free with 'adap' */
|
||||
put_device(&adap->dev);
|
||||
}
|
||||
EXPORT_SYMBOL(i2c_put_adapter);
|
||||
|
||||
|
@ -639,7 +639,7 @@ static int isl29028_probe(struct i2c_client *client,
|
||||
ISL29028_POWER_OFF_DELAY_MS);
|
||||
pm_runtime_use_autosuspend(&client->dev);
|
||||
|
||||
ret = devm_iio_device_register(indio_dev->dev.parent, indio_dev);
|
||||
ret = iio_device_register(indio_dev);
|
||||
if (ret < 0) {
|
||||
dev_err(&client->dev,
|
||||
"%s(): iio registration failed with error %d\n",
|
||||
|
@ -3239,6 +3239,11 @@ static int dm_call_pr(struct block_device *bdev, iterate_devices_callout_fn fn,
|
||||
goto out;
|
||||
ti = dm_table_get_target(table, 0);
|
||||
|
||||
if (dm_suspended_md(md)) {
|
||||
ret = -EAGAIN;
|
||||
goto out;
|
||||
}
|
||||
|
||||
ret = -EINVAL;
|
||||
if (!ti->type->iterate_devices)
|
||||
goto out;
|
||||
|
@ -1863,9 +1863,12 @@ static int raid10_remove_disk(struct mddev *mddev, struct md_rdev *rdev)
|
||||
int err = 0;
|
||||
int number = rdev->raid_disk;
|
||||
struct md_rdev **rdevp;
|
||||
struct raid10_info *p = conf->mirrors + number;
|
||||
struct raid10_info *p;
|
||||
|
||||
print_conf(conf);
|
||||
if (unlikely(number >= mddev->raid_disks))
|
||||
return 0;
|
||||
p = conf->mirrors + number;
|
||||
if (rdev == p->rdev)
|
||||
rdevp = &p->rdev;
|
||||
else if (rdev == p->replacement)
|
||||
|
@ -318,13 +318,6 @@ static int tw686x_probe(struct pci_dev *pci_dev,
|
||||
|
||||
spin_lock_init(&dev->lock);
|
||||
|
||||
err = request_irq(pci_dev->irq, tw686x_irq, IRQF_SHARED,
|
||||
dev->name, dev);
|
||||
if (err < 0) {
|
||||
dev_err(&pci_dev->dev, "unable to request interrupt\n");
|
||||
goto iounmap;
|
||||
}
|
||||
|
||||
timer_setup(&dev->dma_delay_timer, tw686x_dma_delay, 0);
|
||||
|
||||
/*
|
||||
@ -336,18 +329,23 @@ static int tw686x_probe(struct pci_dev *pci_dev,
|
||||
err = tw686x_video_init(dev);
|
||||
if (err) {
|
||||
dev_err(&pci_dev->dev, "can't register video\n");
|
||||
goto free_irq;
|
||||
goto iounmap;
|
||||
}
|
||||
|
||||
err = tw686x_audio_init(dev);
|
||||
if (err)
|
||||
dev_warn(&pci_dev->dev, "can't register audio\n");
|
||||
|
||||
err = request_irq(pci_dev->irq, tw686x_irq, IRQF_SHARED,
|
||||
dev->name, dev);
|
||||
if (err < 0) {
|
||||
dev_err(&pci_dev->dev, "unable to request interrupt\n");
|
||||
goto iounmap;
|
||||
}
|
||||
|
||||
pci_set_drvdata(pci_dev, dev);
|
||||
return 0;
|
||||
|
||||
free_irq:
|
||||
free_irq(pci_dev->irq, dev);
|
||||
iounmap:
|
||||
pci_iounmap(pci_dev, dev->mmio);
|
||||
free_region:
|
||||
|
@ -413,7 +413,7 @@ static ssize_t hdpvr_read(struct file *file, char __user *buffer, size_t count,
|
||||
struct hdpvr_device *dev = video_drvdata(file);
|
||||
struct hdpvr_buffer *buf = NULL;
|
||||
struct urb *urb;
|
||||
unsigned int ret = 0;
|
||||
int ret = 0;
|
||||
int rem, cnt;
|
||||
|
||||
if (*pos)
|
||||
|
@ -845,13 +845,11 @@ int usbnet_stop (struct net_device *net)
|
||||
|
||||
mpn = !test_and_clear_bit(EVENT_NO_RUNTIME_PM, &dev->flags);
|
||||
|
||||
/* deferred work (task, timer, softirq) must also stop.
|
||||
* can't flush_scheduled_work() until we drop rtnl (later),
|
||||
* else workers could deadlock; so make workers a NOP.
|
||||
*/
|
||||
/* deferred work (timer, softirq, task) must also stop */
|
||||
dev->flags = 0;
|
||||
del_timer_sync (&dev->delay);
|
||||
tasklet_kill (&dev->bh);
|
||||
cancel_work_sync(&dev->kevent);
|
||||
if (!pm)
|
||||
usb_autopm_put_interface(dev->intf);
|
||||
|
||||
@ -1621,8 +1619,6 @@ void usbnet_disconnect (struct usb_interface *intf)
|
||||
net = dev->net;
|
||||
unregister_netdev (net);
|
||||
|
||||
cancel_work_sync(&dev->kevent);
|
||||
|
||||
usb_scuttle_anchored_urbs(&dev->deferred);
|
||||
|
||||
if (dev->driver_info->unbind)
|
||||
|
@ -879,13 +879,12 @@ static void ath10k_snoc_init_napi(struct ath10k *ar)
|
||||
static int ath10k_snoc_request_irq(struct ath10k *ar)
|
||||
{
|
||||
struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar);
|
||||
int irqflags = IRQF_TRIGGER_RISING;
|
||||
int ret, id;
|
||||
|
||||
for (id = 0; id < CE_COUNT_MAX; id++) {
|
||||
ret = request_irq(ar_snoc->ce_irqs[id].irq_line,
|
||||
ath10k_snoc_per_engine_handler,
|
||||
irqflags, ce_name[id], ar);
|
||||
ath10k_snoc_per_engine_handler, 0,
|
||||
ce_name[id], ar);
|
||||
if (ret) {
|
||||
ath10k_err(ar,
|
||||
"failed to register IRQ handler for CE %d: %d",
|
||||
|
@ -325,11 +325,11 @@ static inline struct ath9k_htc_tx_ctl *HTC_SKB_CB(struct sk_buff *skb)
|
||||
}
|
||||
|
||||
#ifdef CONFIG_ATH9K_HTC_DEBUGFS
|
||||
|
||||
#define TX_STAT_INC(c) (hif_dev->htc_handle->drv_priv->debug.tx_stats.c++)
|
||||
#define TX_STAT_ADD(c, a) (hif_dev->htc_handle->drv_priv->debug.tx_stats.c += a)
|
||||
#define RX_STAT_INC(c) (hif_dev->htc_handle->drv_priv->debug.skbrx_stats.c++)
|
||||
#define RX_STAT_ADD(c, a) (hif_dev->htc_handle->drv_priv->debug.skbrx_stats.c += a)
|
||||
#define __STAT_SAFE(expr) (hif_dev->htc_handle->drv_priv ? (expr) : 0)
|
||||
#define TX_STAT_INC(c) __STAT_SAFE(hif_dev->htc_handle->drv_priv->debug.tx_stats.c++)
|
||||
#define TX_STAT_ADD(c, a) __STAT_SAFE(hif_dev->htc_handle->drv_priv->debug.tx_stats.c += a)
|
||||
#define RX_STAT_INC(c) __STAT_SAFE(hif_dev->htc_handle->drv_priv->debug.skbrx_stats.c++)
|
||||
#define RX_STAT_ADD(c, a) __STAT_SAFE(hif_dev->htc_handle->drv_priv->debug.skbrx_stats.c += a)
|
||||
#define CAB_STAT_INC priv->debug.tx_stats.cab_queued++
|
||||
|
||||
#define TX_QSTAT_INC(q) (priv->debug.tx_stats.queue_stats[q]++)
|
||||
|
@ -946,7 +946,6 @@ int ath9k_htc_probe_device(struct htc_target *htc_handle, struct device *dev,
|
||||
priv->hw = hw;
|
||||
priv->htc = htc_handle;
|
||||
priv->dev = dev;
|
||||
htc_handle->drv_priv = priv;
|
||||
SET_IEEE80211_DEV(hw, priv->dev);
|
||||
|
||||
ret = ath9k_htc_wait_for_target(priv);
|
||||
@ -967,6 +966,8 @@ int ath9k_htc_probe_device(struct htc_target *htc_handle, struct device *dev,
|
||||
if (ret)
|
||||
goto err_init;
|
||||
|
||||
htc_handle->drv_priv = priv;
|
||||
|
||||
return 0;
|
||||
|
||||
err_init:
|
||||
|
@ -2422,7 +2422,7 @@ il4965_rs_fill_link_cmd(struct il_priv *il, struct il_lq_sta *lq_sta,
|
||||
/* Repeat initial/next rate.
|
||||
* For legacy IL_NUMBER_TRY == 1, this loop will not execute.
|
||||
* For HT IL_HT_NUMBER_TRY == 3, this executes twice. */
|
||||
while (repeat_rate > 0 && idx < LINK_QUAL_MAX_RETRY_NUM) {
|
||||
while (repeat_rate > 0) {
|
||||
if (is_legacy(tbl_type.lq_type)) {
|
||||
if (ant_toggle_cnt < NUM_TRY_BEFORE_ANT_TOGGLE)
|
||||
ant_toggle_cnt++;
|
||||
@ -2441,6 +2441,8 @@ il4965_rs_fill_link_cmd(struct il_priv *il, struct il_lq_sta *lq_sta,
|
||||
cpu_to_le32(new_rate);
|
||||
repeat_rate--;
|
||||
idx++;
|
||||
if (idx >= LINK_QUAL_MAX_RETRY_NUM)
|
||||
goto out;
|
||||
}
|
||||
|
||||
il4965_rs_get_tbl_info_from_mcs(new_rate, lq_sta->band,
|
||||
@ -2485,6 +2487,7 @@ il4965_rs_fill_link_cmd(struct il_priv *il, struct il_lq_sta *lq_sta,
|
||||
repeat_rate--;
|
||||
}
|
||||
|
||||
out:
|
||||
lq_cmd->agg_params.agg_frame_cnt_limit = LINK_QUAL_AGG_FRAME_LIMIT_DEF;
|
||||
lq_cmd->agg_params.agg_dis_start_th = LINK_QUAL_AGG_DISABLE_START_DEF;
|
||||
|
||||
|
@ -553,7 +553,7 @@ struct mac80211_hwsim_data {
|
||||
bool ps_poll_pending;
|
||||
struct dentry *debugfs;
|
||||
|
||||
uintptr_t pending_cookie;
|
||||
atomic_t pending_cookie;
|
||||
struct sk_buff_head pending; /* packets pending */
|
||||
/*
|
||||
* Only radios in the same group can communicate together (the
|
||||
@ -1137,8 +1137,7 @@ static void mac80211_hwsim_tx_frame_nl(struct ieee80211_hw *hw,
|
||||
goto nla_put_failure;
|
||||
|
||||
/* We create a cookie to identify this skb */
|
||||
data->pending_cookie++;
|
||||
cookie = data->pending_cookie;
|
||||
cookie = atomic_inc_return(&data->pending_cookie);
|
||||
info->rate_driver_data[0] = (void *)cookie;
|
||||
if (nla_put_u64_64bit(skb, HWSIM_ATTR_COOKIE, cookie, HWSIM_ATTR_PAD))
|
||||
goto nla_put_failure;
|
||||
@ -3116,6 +3115,7 @@ static int hwsim_tx_info_frame_received_nl(struct sk_buff *skb_2,
|
||||
const u8 *src;
|
||||
unsigned int hwsim_flags;
|
||||
int i;
|
||||
unsigned long flags;
|
||||
bool found = false;
|
||||
|
||||
if (!info->attrs[HWSIM_ATTR_ADDR_TRANSMITTER] ||
|
||||
@ -3140,18 +3140,20 @@ static int hwsim_tx_info_frame_received_nl(struct sk_buff *skb_2,
|
||||
goto out;
|
||||
|
||||
/* look for the skb matching the cookie passed back from user */
|
||||
spin_lock_irqsave(&data2->pending.lock, flags);
|
||||
skb_queue_walk_safe(&data2->pending, skb, tmp) {
|
||||
u64 skb_cookie;
|
||||
uintptr_t skb_cookie;
|
||||
|
||||
txi = IEEE80211_SKB_CB(skb);
|
||||
skb_cookie = (u64)(uintptr_t)txi->rate_driver_data[0];
|
||||
skb_cookie = (uintptr_t)txi->rate_driver_data[0];
|
||||
|
||||
if (skb_cookie == ret_skb_cookie) {
|
||||
skb_unlink(skb, &data2->pending);
|
||||
__skb_unlink(skb, &data2->pending);
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
spin_unlock_irqrestore(&data2->pending.lock, flags);
|
||||
|
||||
/* not found */
|
||||
if (!found)
|
||||
|
@ -370,8 +370,8 @@ static ssize_t rtl_debugfs_set_write_h2c(struct file *filp,
|
||||
|
||||
tmp_len = (count > sizeof(tmp) - 1 ? sizeof(tmp) - 1 : count);
|
||||
|
||||
if (!buffer || copy_from_user(tmp, buffer, tmp_len))
|
||||
return count;
|
||||
if (copy_from_user(tmp, buffer, tmp_len))
|
||||
return -EFAULT;
|
||||
|
||||
tmp[tmp_len] = '\0';
|
||||
|
||||
@ -381,8 +381,8 @@ static ssize_t rtl_debugfs_set_write_h2c(struct file *filp,
|
||||
&h2c_data[4], &h2c_data[5],
|
||||
&h2c_data[6], &h2c_data[7]);
|
||||
|
||||
if (h2c_len <= 0)
|
||||
return count;
|
||||
if (h2c_len == 0)
|
||||
return -EINVAL;
|
||||
|
||||
for (i = 0; i < h2c_len; i++)
|
||||
h2c_data_packed[i] = (u8)h2c_data[i];
|
||||
|
@ -189,8 +189,12 @@ static void of_get_regulation_constraints(struct device_node *np,
|
||||
}
|
||||
|
||||
suspend_np = of_get_child_by_name(np, regulator_states[i]);
|
||||
if (!suspend_np || !suspend_state)
|
||||
if (!suspend_np)
|
||||
continue;
|
||||
if (!suspend_state) {
|
||||
of_node_put(suspend_np);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!of_property_read_u32(suspend_np, "regulator-mode",
|
||||
&pval)) {
|
||||
|
@ -126,6 +126,7 @@ static int __init meson_mx_socinfo_init(void)
|
||||
np = of_find_matching_node(NULL, meson_mx_socinfo_analog_top_ids);
|
||||
if (np) {
|
||||
analog_top_regmap = syscon_node_to_regmap(np);
|
||||
of_node_put(np);
|
||||
if (IS_ERR(analog_top_regmap))
|
||||
return PTR_ERR(analog_top_regmap);
|
||||
|
||||
|
@ -136,7 +136,7 @@ static int fsl_guts_probe(struct platform_device *pdev)
|
||||
struct device *dev = &pdev->dev;
|
||||
struct resource *res;
|
||||
const struct fsl_soc_die_attr *soc_die;
|
||||
const char *machine;
|
||||
const char *machine = NULL;
|
||||
u32 svr;
|
||||
|
||||
/* Initialize guts */
|
||||
|
@ -1050,12 +1050,13 @@ static const struct attribute_group cooling_device_stats_attr_group = {
|
||||
|
||||
static void cooling_device_stats_setup(struct thermal_cooling_device *cdev)
|
||||
{
|
||||
const struct attribute_group *stats_attr_group = NULL;
|
||||
struct cooling_dev_stats *stats;
|
||||
unsigned long states;
|
||||
int var;
|
||||
|
||||
if (cdev->ops->get_max_state(cdev, &states))
|
||||
return;
|
||||
goto out;
|
||||
|
||||
states++; /* Total number of states is highest state + 1 */
|
||||
|
||||
@ -1065,7 +1066,7 @@ static void cooling_device_stats_setup(struct thermal_cooling_device *cdev)
|
||||
|
||||
stats = kzalloc(var, GFP_KERNEL);
|
||||
if (!stats)
|
||||
return;
|
||||
goto out;
|
||||
|
||||
stats->time_in_state = (ktime_t *)(stats + 1);
|
||||
stats->trans_table = (unsigned int *)(stats->time_in_state + states);
|
||||
@ -1075,9 +1076,12 @@ static void cooling_device_stats_setup(struct thermal_cooling_device *cdev)
|
||||
|
||||
spin_lock_init(&stats->lock);
|
||||
|
||||
stats_attr_group = &cooling_device_stats_attr_group;
|
||||
|
||||
out:
|
||||
/* Fill the empty slot left in cooling_device_attr_groups */
|
||||
var = ARRAY_SIZE(cooling_device_attr_groups) - 2;
|
||||
cooling_device_attr_groups[var] = &cooling_device_stats_attr_group;
|
||||
cooling_device_attr_groups[var] = stats_attr_group;
|
||||
}
|
||||
|
||||
static void cooling_device_stats_destroy(struct thermal_cooling_device *cdev)
|
||||
|
@ -237,6 +237,7 @@ static void mvebu_uart_rx_chars(struct uart_port *port, unsigned int status)
|
||||
struct tty_port *tport = &port->state->port;
|
||||
unsigned char ch = 0;
|
||||
char flag = 0;
|
||||
int ret;
|
||||
|
||||
do {
|
||||
if (status & STAT_RX_RDY(port)) {
|
||||
@ -249,6 +250,16 @@ static void mvebu_uart_rx_chars(struct uart_port *port, unsigned int status)
|
||||
port->icount.parity++;
|
||||
}
|
||||
|
||||
/*
|
||||
* For UART2, error bits are not cleared on buffer read.
|
||||
* This causes interrupt loop and system hang.
|
||||
*/
|
||||
if (IS_EXTENDED(port) && (status & STAT_BRK_ERR)) {
|
||||
ret = readl(port->membase + UART_STAT);
|
||||
ret |= STAT_BRK_ERR;
|
||||
writel(ret, port->membase + UART_STAT);
|
||||
}
|
||||
|
||||
if (status & STAT_BRK_DET) {
|
||||
port->icount.brk++;
|
||||
status &= ~(STAT_FRM_ERR | STAT_PAR_ERR);
|
||||
|
@ -351,7 +351,7 @@ static struct uni_screen *vc_uniscr_alloc(unsigned int cols, unsigned int rows)
|
||||
/* allocate everything in one go */
|
||||
memsize = cols * rows * sizeof(char32_t);
|
||||
memsize += rows * sizeof(char32_t *);
|
||||
p = vmalloc(memsize);
|
||||
p = vzalloc(memsize);
|
||||
if (!p)
|
||||
return NULL;
|
||||
|
||||
|
@ -103,8 +103,8 @@ static int logo_lines;
|
||||
enums. */
|
||||
static int logo_shown = FBCON_LOGO_CANSHOW;
|
||||
/* console mappings */
|
||||
static int first_fb_vc;
|
||||
static int last_fb_vc = MAX_NR_CONSOLES - 1;
|
||||
static unsigned int first_fb_vc;
|
||||
static unsigned int last_fb_vc = MAX_NR_CONSOLES - 1;
|
||||
static int fbcon_is_default = 1;
|
||||
static int fbcon_has_exited;
|
||||
static int primary_device = -1;
|
||||
@ -456,10 +456,12 @@ static int __init fb_console_setup(char *this_opt)
|
||||
options += 3;
|
||||
if (*options)
|
||||
first_fb_vc = simple_strtoul(options, &options, 10) - 1;
|
||||
if (first_fb_vc < 0)
|
||||
if (first_fb_vc >= MAX_NR_CONSOLES)
|
||||
first_fb_vc = 0;
|
||||
if (*options++ == '-')
|
||||
last_fb_vc = simple_strtoul(options, &options, 10) - 1;
|
||||
if (last_fb_vc < first_fb_vc || last_fb_vc >= MAX_NR_CONSOLES)
|
||||
last_fb_vc = MAX_NR_CONSOLES - 1;
|
||||
fbcon_is_default = 0;
|
||||
continue;
|
||||
}
|
||||
|
@ -134,6 +134,8 @@ EXPORT_SYMBOL(setattr_prepare);
|
||||
*/
|
||||
int inode_newsize_ok(const struct inode *inode, loff_t offset)
|
||||
{
|
||||
if (offset < 0)
|
||||
return -EINVAL;
|
||||
if (inode->i_size < offset) {
|
||||
unsigned long limit;
|
||||
|
||||
|
@ -1088,9 +1088,10 @@ static int ext2_fill_super(struct super_block *sb, void *data, int silent)
|
||||
sbi->s_frags_per_group);
|
||||
goto failed_mount;
|
||||
}
|
||||
if (sbi->s_inodes_per_group > sb->s_blocksize * 8) {
|
||||
if (sbi->s_inodes_per_group < sbi->s_inodes_per_block ||
|
||||
sbi->s_inodes_per_group > sb->s_blocksize * 8) {
|
||||
ext2_msg(sb, KERN_ERR,
|
||||
"error: #inodes per group too big: %lu",
|
||||
"error: invalid #inodes per group: %lu",
|
||||
sbi->s_inodes_per_group);
|
||||
goto failed_mount;
|
||||
}
|
||||
@ -1100,6 +1101,13 @@ static int ext2_fill_super(struct super_block *sb, void *data, int silent)
|
||||
sbi->s_groups_count = ((le32_to_cpu(es->s_blocks_count) -
|
||||
le32_to_cpu(es->s_first_data_block) - 1)
|
||||
/ EXT2_BLOCKS_PER_GROUP(sb)) + 1;
|
||||
if ((u64)sbi->s_groups_count * sbi->s_inodes_per_group !=
|
||||
le32_to_cpu(es->s_inodes_count)) {
|
||||
ext2_msg(sb, KERN_ERR, "error: invalid #inodes: %u vs computed %llu",
|
||||
le32_to_cpu(es->s_inodes_count),
|
||||
(u64)sbi->s_groups_count * sbi->s_inodes_per_group);
|
||||
goto failed_mount;
|
||||
}
|
||||
db_count = (sbi->s_groups_count + EXT2_DESC_PER_BLOCK(sb) - 1) /
|
||||
EXT2_DESC_PER_BLOCK(sb);
|
||||
sbi->s_group_desc = kmalloc_array (db_count,
|
||||
|
@ -174,6 +174,12 @@ void fuse_change_attributes_common(struct inode *inode, struct fuse_attr *attr,
|
||||
inode->i_uid = make_kuid(fc->user_ns, attr->uid);
|
||||
inode->i_gid = make_kgid(fc->user_ns, attr->gid);
|
||||
inode->i_blocks = attr->blocks;
|
||||
|
||||
/* Sanitize nsecs */
|
||||
attr->atimensec = min_t(u32, attr->atimensec, NSEC_PER_SEC - 1);
|
||||
attr->mtimensec = min_t(u32, attr->mtimensec, NSEC_PER_SEC - 1);
|
||||
attr->ctimensec = min_t(u32, attr->ctimensec, NSEC_PER_SEC - 1);
|
||||
|
||||
inode->i_atime.tv_sec = attr->atime;
|
||||
inode->i_atime.tv_nsec = attr->atimensec;
|
||||
/* mtime from server may be stale due to local buffered write */
|
||||
|
@ -3571,6 +3571,8 @@ struct dentry *vfs_tmpfile(struct dentry *dentry, umode_t mode, int open_flag)
|
||||
child = d_alloc(dentry, &slash_name);
|
||||
if (unlikely(!child))
|
||||
goto out_err;
|
||||
if (!IS_POSIXACL(dir))
|
||||
mode &= ~current_umask();
|
||||
error = dir->i_op->tmpfile(dir, child, mode);
|
||||
if (error)
|
||||
goto out_err;
|
||||
|
@ -277,7 +277,7 @@ static int ovl_encode_fh(struct inode *inode, u32 *fid, int *max_len,
|
||||
return FILEID_INVALID;
|
||||
|
||||
dentry = d_find_any_alias(inode);
|
||||
if (WARN_ON(!dentry))
|
||||
if (!dentry)
|
||||
return FILEID_INVALID;
|
||||
|
||||
type = ovl_dentry_to_fh(dentry, fid, max_len);
|
||||
|
@ -117,7 +117,6 @@ static __always_inline int test_clear_buffer_##name(struct buffer_head *bh) \
|
||||
* of the form "mark_buffer_foo()". These are higher-level functions which
|
||||
* do something in addition to setting a b_state bit.
|
||||
*/
|
||||
BUFFER_FNS(Uptodate, uptodate)
|
||||
BUFFER_FNS(Dirty, dirty)
|
||||
TAS_BUFFER_FNS(Dirty, dirty)
|
||||
BUFFER_FNS(Lock, locked)
|
||||
@ -135,6 +134,30 @@ BUFFER_FNS(Meta, meta)
|
||||
BUFFER_FNS(Prio, prio)
|
||||
BUFFER_FNS(Defer_Completion, defer_completion)
|
||||
|
||||
static __always_inline void set_buffer_uptodate(struct buffer_head *bh)
|
||||
{
|
||||
/*
|
||||
* make it consistent with folio_mark_uptodate
|
||||
* pairs with smp_load_acquire in buffer_uptodate
|
||||
*/
|
||||
smp_mb__before_atomic();
|
||||
set_bit(BH_Uptodate, &bh->b_state);
|
||||
}
|
||||
|
||||
static __always_inline void clear_buffer_uptodate(struct buffer_head *bh)
|
||||
{
|
||||
clear_bit(BH_Uptodate, &bh->b_state);
|
||||
}
|
||||
|
||||
static __always_inline int buffer_uptodate(const struct buffer_head *bh)
|
||||
{
|
||||
/*
|
||||
* make it consistent with folio_test_uptodate
|
||||
* pairs with smp_mb__before_atomic in set_buffer_uptodate
|
||||
*/
|
||||
return (smp_load_acquire(&bh->b_state) & (1UL << BH_Uptodate)) != 0;
|
||||
}
|
||||
|
||||
#define bh_offset(bh) ((unsigned long)(bh)->b_data & ~PAGE_MASK)
|
||||
|
||||
/* If we *know* page->private refers to buffer_heads */
|
||||
|
@ -59,6 +59,8 @@
|
||||
#define PCI_CLASS_BRIDGE_EISA 0x0602
|
||||
#define PCI_CLASS_BRIDGE_MC 0x0603
|
||||
#define PCI_CLASS_BRIDGE_PCI 0x0604
|
||||
#define PCI_CLASS_BRIDGE_PCI_NORMAL 0x060400
|
||||
#define PCI_CLASS_BRIDGE_PCI_SUBTRACTIVE 0x060401
|
||||
#define PCI_CLASS_BRIDGE_PCMCIA 0x0605
|
||||
#define PCI_CLASS_BRIDGE_NUBUS 0x0606
|
||||
#define PCI_CLASS_BRIDGE_CARDBUS 0x0607
|
||||
|
@ -3496,6 +3496,7 @@ static int adjust_scalar_min_max_vals(struct bpf_verifier_env *env,
|
||||
coerce_reg_to_size(dst_reg, 4);
|
||||
}
|
||||
|
||||
__update_reg_bounds(dst_reg);
|
||||
__reg_deduce_bounds(dst_reg);
|
||||
__reg_bound_offset(dst_reg);
|
||||
return 0;
|
||||
|
@ -29,6 +29,7 @@
|
||||
|
||||
#include "power.h"
|
||||
|
||||
static bool need_wait;
|
||||
|
||||
#define SNAPSHOT_MINOR 231
|
||||
|
||||
@ -82,7 +83,7 @@ static int snapshot_open(struct inode *inode, struct file *filp)
|
||||
* Resuming. We may need to wait for the image device to
|
||||
* appear.
|
||||
*/
|
||||
wait_for_device_probe();
|
||||
need_wait = true;
|
||||
|
||||
data->swap = -1;
|
||||
data->mode = O_WRONLY;
|
||||
@ -174,6 +175,11 @@ static ssize_t snapshot_write(struct file *filp, const char __user *buf,
|
||||
ssize_t res;
|
||||
loff_t pg_offp = *offp & ~PAGE_MASK;
|
||||
|
||||
if (need_wait) {
|
||||
wait_for_device_probe();
|
||||
need_wait = false;
|
||||
}
|
||||
|
||||
lock_system_sleep();
|
||||
|
||||
data = filp->private_data;
|
||||
@ -209,6 +215,11 @@ static long snapshot_ioctl(struct file *filp, unsigned int cmd,
|
||||
loff_t size;
|
||||
sector_t offset;
|
||||
|
||||
if (need_wait) {
|
||||
wait_for_device_probe();
|
||||
need_wait = false;
|
||||
}
|
||||
|
||||
if (_IOC_TYPE(cmd) != SNAPSHOT_IOC_MAGIC)
|
||||
return -ENOTTY;
|
||||
if (_IOC_NR(cmd) > SNAPSHOT_IOC_MAXNR)
|
||||
|
@ -444,7 +444,7 @@ static inline void rt_queue_push_tasks(struct rq *rq)
|
||||
#endif /* CONFIG_SMP */
|
||||
|
||||
static void enqueue_top_rt_rq(struct rt_rq *rt_rq);
|
||||
static void dequeue_top_rt_rq(struct rt_rq *rt_rq);
|
||||
static void dequeue_top_rt_rq(struct rt_rq *rt_rq, unsigned int count);
|
||||
|
||||
static inline int on_rt_rq(struct sched_rt_entity *rt_se)
|
||||
{
|
||||
@ -526,7 +526,7 @@ static void sched_rt_rq_dequeue(struct rt_rq *rt_rq)
|
||||
rt_se = rt_rq->tg->rt_se[cpu];
|
||||
|
||||
if (!rt_se) {
|
||||
dequeue_top_rt_rq(rt_rq);
|
||||
dequeue_top_rt_rq(rt_rq, rt_rq->rt_nr_running);
|
||||
/* Kick cpufreq (see the comment in kernel/sched/sched.h). */
|
||||
cpufreq_update_util(rq_of_rt_rq(rt_rq), 0);
|
||||
}
|
||||
@ -612,7 +612,7 @@ static inline void sched_rt_rq_enqueue(struct rt_rq *rt_rq)
|
||||
|
||||
static inline void sched_rt_rq_dequeue(struct rt_rq *rt_rq)
|
||||
{
|
||||
dequeue_top_rt_rq(rt_rq);
|
||||
dequeue_top_rt_rq(rt_rq, rt_rq->rt_nr_running);
|
||||
}
|
||||
|
||||
static inline int rt_rq_throttled(struct rt_rq *rt_rq)
|
||||
@ -1078,7 +1078,7 @@ static void update_curr_rt(struct rq *rq)
|
||||
}
|
||||
|
||||
static void
|
||||
dequeue_top_rt_rq(struct rt_rq *rt_rq)
|
||||
dequeue_top_rt_rq(struct rt_rq *rt_rq, unsigned int count)
|
||||
{
|
||||
struct rq *rq = rq_of_rt_rq(rt_rq);
|
||||
|
||||
@ -1089,7 +1089,7 @@ dequeue_top_rt_rq(struct rt_rq *rt_rq)
|
||||
|
||||
BUG_ON(!rq->nr_running);
|
||||
|
||||
sub_nr_running(rq, rt_rq->rt_nr_running);
|
||||
sub_nr_running(rq, count);
|
||||
rt_rq->rt_queued = 0;
|
||||
|
||||
}
|
||||
@ -1368,18 +1368,21 @@ static void __dequeue_rt_entity(struct sched_rt_entity *rt_se, unsigned int flag
|
||||
static void dequeue_rt_stack(struct sched_rt_entity *rt_se, unsigned int flags)
|
||||
{
|
||||
struct sched_rt_entity *back = NULL;
|
||||
unsigned int rt_nr_running;
|
||||
|
||||
for_each_sched_rt_entity(rt_se) {
|
||||
rt_se->back = back;
|
||||
back = rt_se;
|
||||
}
|
||||
|
||||
dequeue_top_rt_rq(rt_rq_of_se(back));
|
||||
rt_nr_running = rt_rq_of_se(back)->rt_nr_running;
|
||||
|
||||
for (rt_se = back; rt_se; rt_se = rt_se->back) {
|
||||
if (on_rt_rq(rt_se))
|
||||
__dequeue_rt_entity(rt_se, flags);
|
||||
}
|
||||
|
||||
dequeue_top_rt_rq(rt_rq_of_se(back), rt_nr_running);
|
||||
}
|
||||
|
||||
static void enqueue_rt_entity(struct sched_rt_entity *rt_se, unsigned int flags)
|
||||
|
@ -96,6 +96,7 @@ static struct nft_trans *nft_trans_alloc_gfp(const struct nft_ctx *ctx,
|
||||
if (trans == NULL)
|
||||
return NULL;
|
||||
|
||||
INIT_LIST_HEAD(&trans->list);
|
||||
trans->msg_type = msg_type;
|
||||
trans->ctx = *ctx;
|
||||
|
||||
@ -3039,6 +3040,7 @@ static struct nft_set *nft_set_lookup_byhandle(const struct nft_table *table,
|
||||
}
|
||||
|
||||
static struct nft_set *nft_set_lookup_byid(const struct net *net,
|
||||
const struct nft_table *table,
|
||||
const struct nlattr *nla, u8 genmask)
|
||||
{
|
||||
struct nft_trans *trans;
|
||||
@ -3049,6 +3051,7 @@ static struct nft_set *nft_set_lookup_byid(const struct net *net,
|
||||
struct nft_set *set = nft_trans_set(trans);
|
||||
|
||||
if (id == nft_trans_set_id(trans) &&
|
||||
set->table == table &&
|
||||
nft_active_genmask(set, genmask))
|
||||
return set;
|
||||
}
|
||||
@ -3069,7 +3072,7 @@ struct nft_set *nft_set_lookup_global(const struct net *net,
|
||||
if (!nla_set_id)
|
||||
return set;
|
||||
|
||||
set = nft_set_lookup_byid(net, nla_set_id, genmask);
|
||||
set = nft_set_lookup_byid(net, table, nla_set_id, genmask);
|
||||
}
|
||||
return set;
|
||||
}
|
||||
|
@ -364,6 +364,8 @@ static inline int put_entry(const void *buf, size_t bytes, int num, struct polic
|
||||
{
|
||||
size_t len = bytes * num;
|
||||
|
||||
if (len > fp->len)
|
||||
return -EINVAL;
|
||||
memcpy(fp->data, buf, len);
|
||||
fp->data += len;
|
||||
fp->len -= len;
|
||||
|
@ -409,6 +409,7 @@ static const struct snd_pci_quirk cs420x_fixup_tbl[] = {
|
||||
|
||||
/* codec SSID */
|
||||
SND_PCI_QUIRK(0x106b, 0x0600, "iMac 14,1", CS420X_IMAC27_122),
|
||||
SND_PCI_QUIRK(0x106b, 0x0900, "iMac 12,1", CS420X_IMAC27_122),
|
||||
SND_PCI_QUIRK(0x106b, 0x1c00, "MacBookPro 8,1", CS420X_MBP81),
|
||||
SND_PCI_QUIRK(0x106b, 0x2000, "iMac 12,2", CS420X_IMAC27_122),
|
||||
SND_PCI_QUIRK(0x106b, 0x2800, "MacBookPro 10,1", CS420X_MBP101),
|
||||
|
@ -210,6 +210,7 @@ enum {
|
||||
CXT_PINCFG_LEMOTE_A1205,
|
||||
CXT_PINCFG_COMPAQ_CQ60,
|
||||
CXT_FIXUP_STEREO_DMIC,
|
||||
CXT_PINCFG_LENOVO_NOTEBOOK,
|
||||
CXT_FIXUP_INC_MIC_BOOST,
|
||||
CXT_FIXUP_HEADPHONE_MIC_PIN,
|
||||
CXT_FIXUP_HEADPHONE_MIC,
|
||||
@ -750,6 +751,14 @@ static const struct hda_fixup cxt_fixups[] = {
|
||||
.type = HDA_FIXUP_FUNC,
|
||||
.v.func = cxt_fixup_stereo_dmic,
|
||||
},
|
||||
[CXT_PINCFG_LENOVO_NOTEBOOK] = {
|
||||
.type = HDA_FIXUP_PINS,
|
||||
.v.pins = (const struct hda_pintbl[]) {
|
||||
{ 0x1a, 0x05d71030 },
|
||||
{ }
|
||||
},
|
||||
.chain_id = CXT_FIXUP_STEREO_DMIC,
|
||||
},
|
||||
[CXT_FIXUP_INC_MIC_BOOST] = {
|
||||
.type = HDA_FIXUP_FUNC,
|
||||
.v.func = cxt5066_increase_mic_boost,
|
||||
@ -943,7 +952,7 @@ static const struct snd_pci_quirk cxt5066_fixups[] = {
|
||||
SND_PCI_QUIRK(0x17aa, 0x3905, "Lenovo G50-30", CXT_FIXUP_STEREO_DMIC),
|
||||
SND_PCI_QUIRK(0x17aa, 0x390b, "Lenovo G50-80", CXT_FIXUP_STEREO_DMIC),
|
||||
SND_PCI_QUIRK(0x17aa, 0x3975, "Lenovo U300s", CXT_FIXUP_STEREO_DMIC),
|
||||
SND_PCI_QUIRK(0x17aa, 0x3977, "Lenovo IdeaPad U310", CXT_FIXUP_STEREO_DMIC),
|
||||
SND_PCI_QUIRK(0x17aa, 0x3977, "Lenovo IdeaPad U310", CXT_PINCFG_LENOVO_NOTEBOOK),
|
||||
SND_PCI_QUIRK(0x17aa, 0x3978, "Lenovo G50-70", CXT_FIXUP_STEREO_DMIC),
|
||||
SND_PCI_QUIRK(0x17aa, 0x397b, "Lenovo S205", CXT_FIXUP_STEREO_DMIC),
|
||||
SND_PCI_QUIRK_VENDOR(0x17aa, "Thinkpad", CXT_FIXUP_THINKPAD_ACPI),
|
||||
|
@ -357,7 +357,8 @@ static int bcd2000_init_midi(struct bcd2000 *bcd2k)
|
||||
static void bcd2000_free_usb_related_resources(struct bcd2000 *bcd2k,
|
||||
struct usb_interface *interface)
|
||||
{
|
||||
/* usb_kill_urb not necessary, urb is aborted automatically */
|
||||
usb_kill_urb(bcd2k->midi_out_urb);
|
||||
usb_kill_urb(bcd2k->midi_in_urb);
|
||||
|
||||
usb_free_urb(bcd2k->midi_out_urb);
|
||||
usb_free_urb(bcd2k->midi_in_urb);
|
||||
|
@ -36,6 +36,9 @@
|
||||
#define NR_LINES_TZDATA 1
|
||||
#define TMON_LOG_FILE "/var/tmp/tmon.log"
|
||||
|
||||
#include <sys/time.h>
|
||||
#include <pthread.h>
|
||||
|
||||
extern unsigned long ticktime;
|
||||
extern double time_elapsed;
|
||||
extern unsigned long target_temp_user;
|
||||
|
Loading…
Reference in New Issue
Block a user