Merge 6.1.61 into android14-6.1-lts
Changes in 6.1.61
KVM: x86/pmu: Truncate counter value to allowed width on write
mmc: core: Align to common busy polling behaviour for mmc ioctls
mmc: block: ioctl: do write error check for spi
mmc: core: Fix error propagation for some ioctl commands
ASoC: codecs: wcd938x: Convert to platform remove callback returning void
ASoC: codecs: wcd938x: Simplify with dev_err_probe
ASoC: codecs: wcd938x: fix regulator leaks on probe errors
ASoC: codecs: wcd938x: fix runtime PM imbalance on remove
pinctrl: qcom: lpass-lpi: fix concurrent register updates
mcb: Return actual parsed size when reading chameleon table
mcb-lpc: Reallocate memory region to avoid memory overlapping
virtio_balloon: Fix endless deflation and inflation on arm64
virtio-mmio: fix memory leak of vm_dev
virtio-crypto: handle config changed by work queue
virtio_pci: fix the common cfg map size
vsock/virtio: initialize the_virtio_vsock before using VQs
vhost: Allow null msg.size on VHOST_IOTLB_INVALIDATE
arm64: dts: rockchip: Add i2s0-2ch-bus-bclk-off pins to RK3399
arm64: dts: rockchip: Fix i2s0 pin conflict on ROCK Pi 4 boards
mm: fix vm_brk_flags() to not bail out while holding lock
hugetlbfs: clear resv_map pointer if mmap fails
mm/page_alloc: correct start page when guard page debug is enabled
mm/migrate: fix do_pages_move for compat pointers
hugetlbfs: extend hugetlb_vma_lock to private VMAs
maple_tree: add GFP_KERNEL to allocations in mas_expected_entries()
nfsd: lock_rename() needs both directories to live on the same fs
drm/i915/pmu: Check if pmu is closed before stopping event
drm/amd: Disable ASPM for VI w/ all Intel systems
drm/dp_mst: Fix NULL deref in get_mst_branch_device_by_guid_helper()
ARM: OMAP: timer32K: fix all kernel-doc warnings
firmware/imx-dsp: Fix use_after_free in imx_dsp_setup_channels()
clk: ti: Fix missing omap4 mcbsp functional clock and aliases
clk: ti: Fix missing omap5 mcbsp functional clock and aliases
r8169: fix the KCSAN reported data-race in rtl_tx() while reading tp->cur_tx
r8169: fix the KCSAN reported data-race in rtl_tx while reading TxDescArray[entry].opts1
r8169: fix the KCSAN reported data race in rtl_rx while reading desc->opts1
iavf: initialize waitqueues before starting watchdog_task
i40e: Fix I40E_FLAG_VF_VLAN_PRUNING value
treewide: Spelling fix in comment
igb: Fix potential memory leak in igb_add_ethtool_nfc_entry
neighbour: fix various data-races
igc: Fix ambiguity in the ethtool advertising
net: ethernet: adi: adin1110: Fix uninitialized variable
net: ieee802154: adf7242: Fix some potential buffer overflow in adf7242_stats_show()
net: usb: smsc95xx: Fix uninit-value access in smsc95xx_read_reg
r8152: Increase USB control msg timeout to 5000ms as per spec
r8152: Run the unload routine if we have errors during probe
r8152: Cancel hw_phy_work if we have an error in probe
r8152: Release firmware if we have an error in probe
tcp: fix wrong RTO timeout when received SACK reneging
gtp: uapi: fix GTPA_MAX
gtp: fix fragmentation needed check with gso
i40e: Fix wrong check for I40E_TXR_FLAGS_WB_ON_ITR
drm/logicvc: Kconfig: select REGMAP and REGMAP_MMIO
iavf: in iavf_down, disable queues when removing the driver
scsi: sd: Introduce manage_shutdown device flag
blk-throttle: check for overflow in calculate_bytes_allowed
kasan: print the original fault addr when access invalid shadow
io_uring/fdinfo: lock SQ thread while retrieving thread cpu/pid
iio: afe: rescale: Accept only offset channels
iio: exynos-adc: request second interupt only when touchscreen mode is used
iio: adc: xilinx-xadc: Don't clobber preset voltage/temperature thresholds
iio: adc: xilinx-xadc: Correct temperature offset/scale for UltraScale
i2c: muxes: i2c-mux-pinctrl: Use of_get_i2c_adapter_by_node()
i2c: muxes: i2c-mux-gpmux: Use of_get_i2c_adapter_by_node()
i2c: muxes: i2c-demux-pinctrl: Use of_get_i2c_adapter_by_node()
i2c: stm32f7: Fix PEC handling in case of SMBUS transfers
i2c: aspeed: Fix i2c bus hang in slave read
tracing/kprobes: Fix the description of variable length arguments
misc: fastrpc: Reset metadata buffer to avoid incorrect free
misc: fastrpc: Free DMA handles for RPC calls with no arguments
misc: fastrpc: Clean buffers on remote invocation failures
misc: fastrpc: Unmap only if buffer is unmapped from DSP
nvmem: imx: correct nregs for i.MX6ULL
nvmem: imx: correct nregs for i.MX6SLL
nvmem: imx: correct nregs for i.MX6UL
x86/i8259: Skip probing when ACPI/MADT advertises PCAT compatibility
x86/cpu: Add model number for Intel Arrow Lake mobile processor
perf/core: Fix potential NULL deref
sparc32: fix a braino in fault handling in csum_and_copy_..._user()
clk: Sanitize possible_parent_show to Handle Return Value of of_clk_get_parent_name
platform/x86: Add s2idle quirk for more Lenovo laptops
ext4: add two helper functions extent_logical_end() and pa_logical_end()
ext4: fix BUG in ext4_mb_new_inode_pa() due to overflow
ext4: avoid overlapping preallocations due to overflow
objtool/x86: add missing embedded_insn check
Linux 6.1.61
Note, this merge point also reverts commit
bb20a245df
which is commit
24eca2dce0f8d19db808c972b0281298d0bafe99 upstream, as it conflicts with
the previous reverts for ABI issues, AND is an ABI break in itself. If
it is needed in the future, it can be brought back in an abi-safe way.
Change-Id: I425bfa3be6d65328e23affd52d10b827aea6e44a
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
commit
2cd386b08b
2
Makefile
2
Makefile
@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 6
|
||||
PATCHLEVEL = 1
|
||||
SUBLEVEL = 60
|
||||
SUBLEVEL = 61
|
||||
EXTRAVERSION =
|
||||
NAME = Curry Ramen
|
||||
|
||||
|
@ -109,6 +109,8 @@ mcbsp1: mcbsp@0 {
|
||||
reg = <0x0 0xff>, /* MPU private access */
|
||||
<0x49022000 0xff>; /* L3 Interconnect */
|
||||
reg-names = "mpu", "dma";
|
||||
clocks = <&abe_clkctrl OMAP4_MCBSP1_CLKCTRL 24>;
|
||||
clock-names = "fck";
|
||||
interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "common";
|
||||
ti,buffer-size = <128>;
|
||||
@ -142,6 +144,8 @@ mcbsp2: mcbsp@0 {
|
||||
reg = <0x0 0xff>, /* MPU private access */
|
||||
<0x49024000 0xff>; /* L3 Interconnect */
|
||||
reg-names = "mpu", "dma";
|
||||
clocks = <&abe_clkctrl OMAP4_MCBSP2_CLKCTRL 24>;
|
||||
clock-names = "fck";
|
||||
interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "common";
|
||||
ti,buffer-size = <128>;
|
||||
@ -175,6 +179,8 @@ mcbsp3: mcbsp@0 {
|
||||
reg = <0x0 0xff>, /* MPU private access */
|
||||
<0x49026000 0xff>; /* L3 Interconnect */
|
||||
reg-names = "mpu", "dma";
|
||||
clocks = <&abe_clkctrl OMAP4_MCBSP3_CLKCTRL 24>;
|
||||
clock-names = "fck";
|
||||
interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "common";
|
||||
ti,buffer-size = <128>;
|
||||
|
@ -2043,6 +2043,8 @@ mcbsp4: mcbsp@0 {
|
||||
compatible = "ti,omap4-mcbsp";
|
||||
reg = <0x0 0xff>; /* L4 Interconnect */
|
||||
reg-names = "mpu";
|
||||
clocks = <&l4_per_clkctrl OMAP4_MCBSP4_CLKCTRL 24>;
|
||||
clock-names = "fck";
|
||||
interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "common";
|
||||
ti,buffer-size = <128>;
|
||||
|
@ -109,6 +109,8 @@ mcbsp1: mcbsp@0 {
|
||||
reg = <0x0 0xff>, /* MPU private access */
|
||||
<0x49022000 0xff>; /* L3 Interconnect */
|
||||
reg-names = "mpu", "dma";
|
||||
clocks = <&abe_clkctrl OMAP5_MCBSP1_CLKCTRL 24>;
|
||||
clock-names = "fck";
|
||||
interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "common";
|
||||
ti,buffer-size = <128>;
|
||||
@ -142,6 +144,8 @@ mcbsp2: mcbsp@0 {
|
||||
reg = <0x0 0xff>, /* MPU private access */
|
||||
<0x49024000 0xff>; /* L3 Interconnect */
|
||||
reg-names = "mpu", "dma";
|
||||
clocks = <&abe_clkctrl OMAP5_MCBSP2_CLKCTRL 24>;
|
||||
clock-names = "fck";
|
||||
interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "common";
|
||||
ti,buffer-size = <128>;
|
||||
@ -175,6 +179,8 @@ mcbsp3: mcbsp@0 {
|
||||
reg = <0x0 0xff>, /* MPU private access */
|
||||
<0x49026000 0xff>; /* L3 Interconnect */
|
||||
reg-names = "mpu", "dma";
|
||||
clocks = <&abe_clkctrl OMAP5_MCBSP3_CLKCTRL 24>;
|
||||
clock-names = "fck";
|
||||
interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "common";
|
||||
ti,buffer-size = <128>;
|
||||
|
@ -176,17 +176,18 @@ static u64 notrace omap_32k_read_sched_clock(void)
|
||||
return sync32k_cnt_reg ? readl_relaxed(sync32k_cnt_reg) : 0;
|
||||
}
|
||||
|
||||
static struct timespec64 persistent_ts;
|
||||
static cycles_t cycles;
|
||||
static unsigned int persistent_mult, persistent_shift;
|
||||
|
||||
/**
|
||||
* omap_read_persistent_clock64 - Return time from a persistent clock.
|
||||
* @ts: &struct timespec64 for the returned time
|
||||
*
|
||||
* Reads the time from a source which isn't disabled during PM, the
|
||||
* 32k sync timer. Convert the cycles elapsed since last read into
|
||||
* nsecs and adds to a monotonically increasing timespec64.
|
||||
*/
|
||||
static struct timespec64 persistent_ts;
|
||||
static cycles_t cycles;
|
||||
static unsigned int persistent_mult, persistent_shift;
|
||||
|
||||
static void omap_read_persistent_clock64(struct timespec64 *ts)
|
||||
{
|
||||
unsigned long long nsecs;
|
||||
@ -206,10 +207,9 @@ static void omap_read_persistent_clock64(struct timespec64 *ts)
|
||||
/**
|
||||
* omap_init_clocksource_32k - setup and register counter 32k as a
|
||||
* kernel clocksource
|
||||
* @pbase: base addr of counter_32k module
|
||||
* @size: size of counter_32k to map
|
||||
* @vbase: base addr of counter_32k module
|
||||
*
|
||||
* Returns 0 upon success or negative error code upon failure.
|
||||
* Returns: %0 upon success or negative error code upon failure.
|
||||
*
|
||||
*/
|
||||
static int __init omap_init_clocksource_32k(void __iomem *vbase)
|
||||
|
@ -493,6 +493,7 @@ &i2c4 {
|
||||
|
||||
&i2s0 {
|
||||
pinctrl-0 = <&i2s0_2ch_bus>;
|
||||
pinctrl-1 = <&i2s0_2ch_bus_bclk_off>;
|
||||
rockchip,capture-channels = <2>;
|
||||
rockchip,playback-channels = <2>;
|
||||
status = "okay";
|
||||
|
@ -2396,6 +2396,16 @@ i2s0_2ch_bus: i2s0-2ch-bus {
|
||||
<4 RK_PA0 1 &pcfg_pull_none>;
|
||||
};
|
||||
|
||||
i2s0_2ch_bus_bclk_off: i2s0-2ch-bus-bclk-off {
|
||||
rockchip,pins =
|
||||
<3 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>,
|
||||
<3 RK_PD1 1 &pcfg_pull_none>,
|
||||
<3 RK_PD2 1 &pcfg_pull_none>,
|
||||
<3 RK_PD3 1 &pcfg_pull_none>,
|
||||
<3 RK_PD7 1 &pcfg_pull_none>,
|
||||
<4 RK_PA0 1 &pcfg_pull_none>;
|
||||
};
|
||||
|
||||
i2s0_8ch_bus: i2s0-8ch-bus {
|
||||
rockchip,pins =
|
||||
<3 RK_PD0 1 &pcfg_pull_none>,
|
||||
|
@ -453,5 +453,5 @@ ccslow: cmp %g1, 0
|
||||
* we only bother with faults on loads... */
|
||||
|
||||
cc_fault:
|
||||
ret
|
||||
retl
|
||||
clr %o0
|
||||
|
@ -69,6 +69,8 @@ struct legacy_pic {
|
||||
void (*make_irq)(unsigned int irq);
|
||||
};
|
||||
|
||||
void legacy_pic_pcat_compat(void);
|
||||
|
||||
extern struct legacy_pic *legacy_pic;
|
||||
extern struct legacy_pic null_legacy_pic;
|
||||
|
||||
|
@ -27,6 +27,7 @@
|
||||
* _X - regular server parts
|
||||
* _D - micro server parts
|
||||
* _N,_P - other mobile parts
|
||||
* _H - premium mobile parts
|
||||
* _S - other client parts
|
||||
*
|
||||
* Historical OPTDIFFs:
|
||||
@ -125,6 +126,7 @@
|
||||
|
||||
#define INTEL_FAM6_LUNARLAKE_M 0xBD
|
||||
|
||||
#define INTEL_FAM6_ARROWLAKE_H 0xC5
|
||||
#define INTEL_FAM6_ARROWLAKE 0xC6
|
||||
|
||||
/* "Small Core" Processors (Atom/E-Core) */
|
||||
|
@ -147,6 +147,9 @@ static int __init acpi_parse_madt(struct acpi_table_header *table)
|
||||
pr_debug("Local APIC address 0x%08x\n", madt->address);
|
||||
}
|
||||
|
||||
if (madt->flags & ACPI_MADT_PCAT_COMPAT)
|
||||
legacy_pic_pcat_compat();
|
||||
|
||||
/* ACPI 6.3 and newer support the online capable bit. */
|
||||
if (acpi_gbl_FADT.header.revision > 6 ||
|
||||
(acpi_gbl_FADT.header.revision == 6 &&
|
||||
|
@ -32,6 +32,7 @@
|
||||
*/
|
||||
static void init_8259A(int auto_eoi);
|
||||
|
||||
static bool pcat_compat __ro_after_init;
|
||||
static int i8259A_auto_eoi;
|
||||
DEFINE_RAW_SPINLOCK(i8259A_lock);
|
||||
|
||||
@ -301,15 +302,32 @@ static void unmask_8259A(void)
|
||||
|
||||
static int probe_8259A(void)
|
||||
{
|
||||
unsigned char new_val, probe_val = ~(1 << PIC_CASCADE_IR);
|
||||
unsigned long flags;
|
||||
unsigned char probe_val = ~(1 << PIC_CASCADE_IR);
|
||||
unsigned char new_val;
|
||||
|
||||
/*
|
||||
* Check to see if we have a PIC.
|
||||
* Mask all except the cascade and read
|
||||
* back the value we just wrote. If we don't
|
||||
* have a PIC, we will read 0xff as opposed to the
|
||||
* value we wrote.
|
||||
* If MADT has the PCAT_COMPAT flag set, then do not bother probing
|
||||
* for the PIC. Some BIOSes leave the PIC uninitialized and probing
|
||||
* fails.
|
||||
*
|
||||
* Right now this causes problems as quite some code depends on
|
||||
* nr_legacy_irqs() > 0 or has_legacy_pic() == true. This is silly
|
||||
* when the system has an IO/APIC because then PIC is not required
|
||||
* at all, except for really old machines where the timer interrupt
|
||||
* must be routed through the PIC. So just pretend that the PIC is
|
||||
* there and let legacy_pic->init() initialize it for nothing.
|
||||
*
|
||||
* Alternatively this could just try to initialize the PIC and
|
||||
* repeat the probe, but for cases where there is no PIC that's
|
||||
* just pointless.
|
||||
*/
|
||||
if (pcat_compat)
|
||||
return nr_legacy_irqs();
|
||||
|
||||
/*
|
||||
* Check to see if we have a PIC. Mask all except the cascade and
|
||||
* read back the value we just wrote. If we don't have a PIC, we
|
||||
* will read 0xff as opposed to the value we wrote.
|
||||
*/
|
||||
raw_spin_lock_irqsave(&i8259A_lock, flags);
|
||||
|
||||
@ -431,5 +449,9 @@ static int __init i8259A_init_ops(void)
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
device_initcall(i8259A_init_ops);
|
||||
|
||||
void __init legacy_pic_pcat_compat(void)
|
||||
{
|
||||
pcat_compat = true;
|
||||
}
|
||||
|
@ -63,6 +63,12 @@ static inline u64 pmc_read_counter(struct kvm_pmc *pmc)
|
||||
return counter & pmc_bitmask(pmc);
|
||||
}
|
||||
|
||||
static inline void pmc_write_counter(struct kvm_pmc *pmc, u64 val)
|
||||
{
|
||||
pmc->counter += val - pmc_read_counter(pmc);
|
||||
pmc->counter &= pmc_bitmask(pmc);
|
||||
}
|
||||
|
||||
static inline void pmc_release_perf_event(struct kvm_pmc *pmc)
|
||||
{
|
||||
if (pmc->perf_event) {
|
||||
|
@ -149,7 +149,7 @@ static int amd_pmu_set_msr(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
|
||||
/* MSR_PERFCTRn */
|
||||
pmc = get_gp_pmc_amd(pmu, msr, PMU_TYPE_COUNTER);
|
||||
if (pmc) {
|
||||
pmc->counter += data - pmc_read_counter(pmc);
|
||||
pmc_write_counter(pmc, data);
|
||||
pmc_update_sample_period(pmc);
|
||||
return 0;
|
||||
}
|
||||
|
@ -461,11 +461,11 @@ static int intel_pmu_set_msr(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
|
||||
if (!msr_info->host_initiated &&
|
||||
!(msr & MSR_PMC_FULL_WIDTH_BIT))
|
||||
data = (s64)(s32)data;
|
||||
pmc->counter += data - pmc_read_counter(pmc);
|
||||
pmc_write_counter(pmc, data);
|
||||
pmc_update_sample_period(pmc);
|
||||
return 0;
|
||||
} else if ((pmc = get_fixed_pmc(pmu, msr))) {
|
||||
pmc->counter += data - pmc_read_counter(pmc);
|
||||
pmc_write_counter(pmc, data);
|
||||
pmc_update_sample_period(pmc);
|
||||
return 0;
|
||||
} else if ((pmc = get_gp_pmc(pmu, msr, MSR_P6_EVNTSEL0))) {
|
||||
|
@ -723,6 +723,12 @@ static unsigned int calculate_io_allowed(u32 iops_limit,
|
||||
|
||||
static u64 calculate_bytes_allowed(u64 bps_limit, unsigned long jiffy_elapsed)
|
||||
{
|
||||
/*
|
||||
* Can result be wider than 64 bits?
|
||||
* We check against 62, not 64, due to ilog2 truncation.
|
||||
*/
|
||||
if (ilog2(bps_limit) + ilog2(jiffy_elapsed) - ilog2(HZ) > 62)
|
||||
return U64_MAX;
|
||||
return mul_u64_u64_div_u64(bps_limit, (u64)jiffy_elapsed, (u64)HZ);
|
||||
}
|
||||
|
||||
|
@ -3419,6 +3419,7 @@ static void possible_parent_show(struct seq_file *s, struct clk_core *core,
|
||||
unsigned int i, char terminator)
|
||||
{
|
||||
struct clk_core *parent;
|
||||
const char *name = NULL;
|
||||
|
||||
/*
|
||||
* Go through the following options to fetch a parent's name.
|
||||
@ -3433,18 +3434,20 @@ static void possible_parent_show(struct seq_file *s, struct clk_core *core,
|
||||
* registered (yet).
|
||||
*/
|
||||
parent = clk_core_get_parent_by_index(core, i);
|
||||
if (parent)
|
||||
if (parent) {
|
||||
seq_puts(s, parent->name);
|
||||
else if (core->parents[i].name)
|
||||
} else if (core->parents[i].name) {
|
||||
seq_puts(s, core->parents[i].name);
|
||||
else if (core->parents[i].fw_name)
|
||||
} else if (core->parents[i].fw_name) {
|
||||
seq_printf(s, "<%s>(fw)", core->parents[i].fw_name);
|
||||
else if (core->parents[i].index >= 0)
|
||||
seq_puts(s,
|
||||
of_clk_get_parent_name(core->of_node,
|
||||
core->parents[i].index));
|
||||
else
|
||||
seq_puts(s, "(missing)");
|
||||
} else {
|
||||
if (core->parents[i].index >= 0)
|
||||
name = of_clk_get_parent_name(core->of_node, core->parents[i].index);
|
||||
if (!name)
|
||||
name = "(missing)";
|
||||
|
||||
seq_puts(s, name);
|
||||
}
|
||||
|
||||
seq_putc(s, terminator);
|
||||
}
|
||||
|
@ -749,9 +749,14 @@ static struct ti_dt_clk omap44xx_clks[] = {
|
||||
DT_CLK(NULL, "mcbsp1_sync_mux_ck", "abe-clkctrl:0028:26"),
|
||||
DT_CLK(NULL, "mcbsp2_sync_mux_ck", "abe-clkctrl:0030:26"),
|
||||
DT_CLK(NULL, "mcbsp3_sync_mux_ck", "abe-clkctrl:0038:26"),
|
||||
DT_CLK("40122000.mcbsp", "prcm_fck", "abe-clkctrl:0028:26"),
|
||||
DT_CLK("40124000.mcbsp", "prcm_fck", "abe-clkctrl:0030:26"),
|
||||
DT_CLK("40126000.mcbsp", "prcm_fck", "abe-clkctrl:0038:26"),
|
||||
DT_CLK(NULL, "mcbsp4_sync_mux_ck", "l4-per-clkctrl:00c0:26"),
|
||||
DT_CLK("48096000.mcbsp", "prcm_fck", "l4-per-clkctrl:00c0:26"),
|
||||
DT_CLK(NULL, "ocp2scp_usb_phy_phy_48m", "l3-init-clkctrl:00c0:8"),
|
||||
DT_CLK(NULL, "otg_60m_gfclk", "l3-init-clkctrl:0040:24"),
|
||||
DT_CLK(NULL, "pad_fck", "pad_clks_ck"),
|
||||
DT_CLK(NULL, "per_mcbsp4_gfclk", "l4-per-clkctrl:00c0:24"),
|
||||
DT_CLK(NULL, "pmd_stm_clock_mux_ck", "emu-sys-clkctrl:0000:20"),
|
||||
DT_CLK(NULL, "pmd_trace_clk_mux_ck", "emu-sys-clkctrl:0000:22"),
|
||||
|
@ -565,15 +565,19 @@ static struct ti_dt_clk omap54xx_clks[] = {
|
||||
DT_CLK(NULL, "gpio8_dbclk", "l4per-clkctrl:00f8:8"),
|
||||
DT_CLK(NULL, "mcbsp1_gfclk", "abe-clkctrl:0028:24"),
|
||||
DT_CLK(NULL, "mcbsp1_sync_mux_ck", "abe-clkctrl:0028:26"),
|
||||
DT_CLK("40122000.mcbsp", "prcm_fck", "abe-clkctrl:0028:26"),
|
||||
DT_CLK(NULL, "mcbsp2_gfclk", "abe-clkctrl:0030:24"),
|
||||
DT_CLK(NULL, "mcbsp2_sync_mux_ck", "abe-clkctrl:0030:26"),
|
||||
DT_CLK("40124000.mcbsp", "prcm_fck", "abe-clkctrl:0030:26"),
|
||||
DT_CLK(NULL, "mcbsp3_gfclk", "abe-clkctrl:0038:24"),
|
||||
DT_CLK(NULL, "mcbsp3_sync_mux_ck", "abe-clkctrl:0038:26"),
|
||||
DT_CLK("40126000.mcbsp", "prcm_fck", "abe-clkctrl:0038:26"),
|
||||
DT_CLK(NULL, "mmc1_32khz_clk", "l3init-clkctrl:0008:8"),
|
||||
DT_CLK(NULL, "mmc1_fclk", "l3init-clkctrl:0008:25"),
|
||||
DT_CLK(NULL, "mmc1_fclk_mux", "l3init-clkctrl:0008:24"),
|
||||
DT_CLK(NULL, "mmc2_fclk", "l3init-clkctrl:0010:25"),
|
||||
DT_CLK(NULL, "mmc2_fclk_mux", "l3init-clkctrl:0010:24"),
|
||||
DT_CLK(NULL, "pad_fck", "pad_clks_ck"),
|
||||
DT_CLK(NULL, "sata_ref_clk", "l3init-clkctrl:0068:8"),
|
||||
DT_CLK(NULL, "timer10_gfclk_mux", "l4per-clkctrl:0008:24"),
|
||||
DT_CLK(NULL, "timer11_gfclk_mux", "l4per-clkctrl:0010:24"),
|
||||
|
@ -35,6 +35,9 @@ struct virtio_crypto {
|
||||
struct virtqueue *ctrl_vq;
|
||||
struct data_queue *data_vq;
|
||||
|
||||
/* Work struct for config space updates */
|
||||
struct work_struct config_work;
|
||||
|
||||
/* To protect the vq operations for the controlq */
|
||||
spinlock_t ctrl_lock;
|
||||
|
||||
|
@ -335,6 +335,14 @@ static void virtcrypto_del_vqs(struct virtio_crypto *vcrypto)
|
||||
virtcrypto_free_queues(vcrypto);
|
||||
}
|
||||
|
||||
static void vcrypto_config_changed_work(struct work_struct *work)
|
||||
{
|
||||
struct virtio_crypto *vcrypto =
|
||||
container_of(work, struct virtio_crypto, config_work);
|
||||
|
||||
virtcrypto_update_status(vcrypto);
|
||||
}
|
||||
|
||||
static int virtcrypto_probe(struct virtio_device *vdev)
|
||||
{
|
||||
int err = -EFAULT;
|
||||
@ -454,6 +462,8 @@ static int virtcrypto_probe(struct virtio_device *vdev)
|
||||
if (err)
|
||||
goto free_engines;
|
||||
|
||||
INIT_WORK(&vcrypto->config_work, vcrypto_config_changed_work);
|
||||
|
||||
return 0;
|
||||
|
||||
free_engines:
|
||||
@ -489,6 +499,7 @@ static void virtcrypto_remove(struct virtio_device *vdev)
|
||||
|
||||
dev_info(&vdev->dev, "Start virtcrypto_remove.\n");
|
||||
|
||||
flush_work(&vcrypto->config_work);
|
||||
if (virtcrypto_dev_started(vcrypto))
|
||||
virtcrypto_dev_stop(vcrypto);
|
||||
virtio_reset_device(vdev);
|
||||
@ -503,7 +514,7 @@ static void virtcrypto_config_changed(struct virtio_device *vdev)
|
||||
{
|
||||
struct virtio_crypto *vcrypto = vdev->priv;
|
||||
|
||||
virtcrypto_update_status(vcrypto);
|
||||
schedule_work(&vcrypto->config_work);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
@ -511,6 +522,7 @@ static int virtcrypto_freeze(struct virtio_device *vdev)
|
||||
{
|
||||
struct virtio_crypto *vcrypto = vdev->priv;
|
||||
|
||||
flush_work(&vcrypto->config_work);
|
||||
virtio_reset_device(vdev);
|
||||
virtcrypto_free_unused_reqs(vcrypto);
|
||||
if (virtcrypto_dev_started(vcrypto))
|
||||
|
@ -115,11 +115,11 @@ static int imx_dsp_setup_channels(struct imx_dsp_ipc *dsp_ipc)
|
||||
dsp_chan->idx = i % 2;
|
||||
dsp_chan->ch = mbox_request_channel_byname(cl, chan_name);
|
||||
if (IS_ERR(dsp_chan->ch)) {
|
||||
kfree(dsp_chan->name);
|
||||
ret = PTR_ERR(dsp_chan->ch);
|
||||
if (ret != -EPROBE_DEFER)
|
||||
dev_err(dev, "Failed to request mbox chan %s ret %d\n",
|
||||
chan_name, ret);
|
||||
kfree(dsp_chan->name);
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
@ -1147,7 +1147,7 @@ static void vi_program_aspm(struct amdgpu_device *adev)
|
||||
bool bL1SS = false;
|
||||
bool bClkReqSupport = true;
|
||||
|
||||
if (!amdgpu_device_should_use_aspm(adev) || !amdgpu_device_aspm_support_quirk())
|
||||
if (!amdgpu_device_should_use_aspm(adev) || !amdgpu_device_pcie_dynamic_switching_supported())
|
||||
return;
|
||||
|
||||
if (adev->flags & AMD_IS_APU ||
|
||||
|
@ -2574,14 +2574,14 @@ static struct drm_dp_mst_branch *get_mst_branch_device_by_guid_helper(
|
||||
struct drm_dp_mst_branch *found_mstb;
|
||||
struct drm_dp_mst_port *port;
|
||||
|
||||
if (!mstb)
|
||||
return NULL;
|
||||
|
||||
if (memcmp(mstb->guid, guid, 16) == 0)
|
||||
return mstb;
|
||||
|
||||
|
||||
list_for_each_entry(port, &mstb->ports, next) {
|
||||
if (!port->mstb)
|
||||
continue;
|
||||
|
||||
found_mstb = get_mst_branch_device_by_guid_helper(port->mstb, guid);
|
||||
|
||||
if (found_mstb)
|
||||
|
@ -760,9 +760,18 @@ static void i915_pmu_event_start(struct perf_event *event, int flags)
|
||||
|
||||
static void i915_pmu_event_stop(struct perf_event *event, int flags)
|
||||
{
|
||||
struct drm_i915_private *i915 =
|
||||
container_of(event->pmu, typeof(*i915), pmu.base);
|
||||
struct i915_pmu *pmu = &i915->pmu;
|
||||
|
||||
if (pmu->closed)
|
||||
goto out;
|
||||
|
||||
if (flags & PERF_EF_UPDATE)
|
||||
i915_pmu_event_read(event);
|
||||
i915_pmu_disable(event);
|
||||
|
||||
out:
|
||||
event->hw.state = PERF_HES_STOPPED;
|
||||
}
|
||||
|
||||
|
@ -5,5 +5,7 @@ config DRM_LOGICVC
|
||||
select DRM_KMS_HELPER
|
||||
select DRM_KMS_DMA_HELPER
|
||||
select DRM_GEM_DMA_HELPER
|
||||
select REGMAP
|
||||
select REGMAP_MMIO
|
||||
help
|
||||
DRM display driver for the logiCVC programmable logic block from Xylon
|
||||
|
@ -749,6 +749,8 @@ static void __aspeed_i2c_reg_slave(struct aspeed_i2c_bus *bus, u16 slave_addr)
|
||||
func_ctrl_reg_val = readl(bus->base + ASPEED_I2C_FUN_CTRL_REG);
|
||||
func_ctrl_reg_val |= ASPEED_I2CD_SLAVE_EN;
|
||||
writel(func_ctrl_reg_val, bus->base + ASPEED_I2C_FUN_CTRL_REG);
|
||||
|
||||
bus->slave_state = ASPEED_I2C_SLAVE_INACTIVE;
|
||||
}
|
||||
|
||||
static int aspeed_i2c_reg_slave(struct i2c_client *client)
|
||||
@ -765,7 +767,6 @@ static int aspeed_i2c_reg_slave(struct i2c_client *client)
|
||||
__aspeed_i2c_reg_slave(bus, client->addr);
|
||||
|
||||
bus->slave = client;
|
||||
bus->slave_state = ASPEED_I2C_SLAVE_INACTIVE;
|
||||
spin_unlock_irqrestore(&bus->lock, flags);
|
||||
|
||||
return 0;
|
||||
|
@ -1059,9 +1059,10 @@ static int stm32f7_i2c_smbus_xfer_msg(struct stm32f7_i2c_dev *i2c_dev,
|
||||
/* Configure PEC */
|
||||
if ((flags & I2C_CLIENT_PEC) && f7_msg->size != I2C_SMBUS_QUICK) {
|
||||
cr1 |= STM32F7_I2C_CR1_PECEN;
|
||||
if (!f7_msg->read_write) {
|
||||
cr2 |= STM32F7_I2C_CR2_PECBYTE;
|
||||
if (!f7_msg->read_write)
|
||||
f7_msg->count++;
|
||||
}
|
||||
} else {
|
||||
cr1 &= ~STM32F7_I2C_CR1_PECEN;
|
||||
cr2 &= ~STM32F7_I2C_CR2_PECBYTE;
|
||||
@ -1149,8 +1150,10 @@ static void stm32f7_i2c_smbus_rep_start(struct stm32f7_i2c_dev *i2c_dev)
|
||||
f7_msg->stop = true;
|
||||
|
||||
/* Add one byte for PEC if needed */
|
||||
if (cr1 & STM32F7_I2C_CR1_PECEN)
|
||||
if (cr1 & STM32F7_I2C_CR1_PECEN) {
|
||||
cr2 |= STM32F7_I2C_CR2_PECBYTE;
|
||||
f7_msg->count++;
|
||||
}
|
||||
|
||||
/* Set number of bytes to be transferred */
|
||||
cr2 &= ~(STM32F7_I2C_CR2_NBYTES_MASK);
|
||||
|
@ -61,7 +61,7 @@ static int i2c_demux_activate_master(struct i2c_demux_pinctrl_priv *priv, u32 ne
|
||||
if (ret)
|
||||
goto err;
|
||||
|
||||
adap = of_find_i2c_adapter_by_node(priv->chan[new_chan].parent_np);
|
||||
adap = of_get_i2c_adapter_by_node(priv->chan[new_chan].parent_np);
|
||||
if (!adap) {
|
||||
ret = -ENODEV;
|
||||
goto err_with_revert;
|
||||
|
@ -52,7 +52,7 @@ static struct i2c_adapter *mux_parent_adapter(struct device *dev)
|
||||
dev_err(dev, "Cannot parse i2c-parent\n");
|
||||
return ERR_PTR(-ENODEV);
|
||||
}
|
||||
parent = of_find_i2c_adapter_by_node(parent_np);
|
||||
parent = of_get_i2c_adapter_by_node(parent_np);
|
||||
of_node_put(parent_np);
|
||||
if (!parent)
|
||||
return ERR_PTR(-EPROBE_DEFER);
|
||||
|
@ -62,7 +62,7 @@ static struct i2c_adapter *i2c_mux_pinctrl_parent_adapter(struct device *dev)
|
||||
dev_err(dev, "Cannot parse i2c-parent\n");
|
||||
return ERR_PTR(-ENODEV);
|
||||
}
|
||||
parent = of_find_i2c_adapter_by_node(parent_np);
|
||||
parent = of_get_i2c_adapter_by_node(parent_np);
|
||||
of_node_put(parent_np);
|
||||
if (!parent)
|
||||
return ERR_PTR(-EPROBE_DEFER);
|
||||
|
@ -826,16 +826,26 @@ static int exynos_adc_probe(struct platform_device *pdev)
|
||||
}
|
||||
}
|
||||
|
||||
/* leave out any TS related code if unreachable */
|
||||
if (IS_REACHABLE(CONFIG_INPUT)) {
|
||||
has_ts = of_property_read_bool(pdev->dev.of_node,
|
||||
"has-touchscreen") || pdata;
|
||||
}
|
||||
|
||||
irq = platform_get_irq(pdev, 0);
|
||||
if (irq < 0)
|
||||
return irq;
|
||||
info->irq = irq;
|
||||
|
||||
if (has_ts) {
|
||||
irq = platform_get_irq(pdev, 1);
|
||||
if (irq == -EPROBE_DEFER)
|
||||
return irq;
|
||||
|
||||
info->tsirq = irq;
|
||||
} else {
|
||||
info->tsirq = -1;
|
||||
}
|
||||
|
||||
info->dev = &pdev->dev;
|
||||
|
||||
@ -900,12 +910,6 @@ static int exynos_adc_probe(struct platform_device *pdev)
|
||||
if (info->data->init_hw)
|
||||
info->data->init_hw(info);
|
||||
|
||||
/* leave out any TS related code if unreachable */
|
||||
if (IS_REACHABLE(CONFIG_INPUT)) {
|
||||
has_ts = of_property_read_bool(pdev->dev.of_node,
|
||||
"has-touchscreen") || pdata;
|
||||
}
|
||||
|
||||
if (pdata)
|
||||
info->delay = pdata->delay;
|
||||
else
|
||||
|
@ -456,6 +456,9 @@ static const struct xadc_ops xadc_zynq_ops = {
|
||||
.interrupt_handler = xadc_zynq_interrupt_handler,
|
||||
.update_alarm = xadc_zynq_update_alarm,
|
||||
.type = XADC_TYPE_S7,
|
||||
/* Temp in C = (val * 503.975) / 2**bits - 273.15 */
|
||||
.temp_scale = 503975,
|
||||
.temp_offset = 273150,
|
||||
};
|
||||
|
||||
static const unsigned int xadc_axi_reg_offsets[] = {
|
||||
@ -566,6 +569,9 @@ static const struct xadc_ops xadc_7s_axi_ops = {
|
||||
.interrupt_handler = xadc_axi_interrupt_handler,
|
||||
.flags = XADC_FLAGS_BUFFERED | XADC_FLAGS_IRQ_OPTIONAL,
|
||||
.type = XADC_TYPE_S7,
|
||||
/* Temp in C = (val * 503.975) / 2**bits - 273.15 */
|
||||
.temp_scale = 503975,
|
||||
.temp_offset = 273150,
|
||||
};
|
||||
|
||||
static const struct xadc_ops xadc_us_axi_ops = {
|
||||
@ -577,6 +583,12 @@ static const struct xadc_ops xadc_us_axi_ops = {
|
||||
.interrupt_handler = xadc_axi_interrupt_handler,
|
||||
.flags = XADC_FLAGS_BUFFERED | XADC_FLAGS_IRQ_OPTIONAL,
|
||||
.type = XADC_TYPE_US,
|
||||
/**
|
||||
* Values below are for UltraScale+ (SYSMONE4) using internal reference.
|
||||
* See https://docs.xilinx.com/v/u/en-US/ug580-ultrascale-sysmon
|
||||
*/
|
||||
.temp_scale = 509314,
|
||||
.temp_offset = 280231,
|
||||
};
|
||||
|
||||
static int _xadc_update_adc_reg(struct xadc *xadc, unsigned int reg,
|
||||
@ -948,8 +960,7 @@ static int xadc_read_raw(struct iio_dev *indio_dev,
|
||||
*val2 = bits;
|
||||
return IIO_VAL_FRACTIONAL_LOG2;
|
||||
case IIO_TEMP:
|
||||
/* Temp in C = (val * 503.975) / 2**bits - 273.15 */
|
||||
*val = 503975;
|
||||
*val = xadc->ops->temp_scale;
|
||||
*val2 = bits;
|
||||
return IIO_VAL_FRACTIONAL_LOG2;
|
||||
default:
|
||||
@ -957,7 +968,7 @@ static int xadc_read_raw(struct iio_dev *indio_dev,
|
||||
}
|
||||
case IIO_CHAN_INFO_OFFSET:
|
||||
/* Only the temperature channel has an offset */
|
||||
*val = -((273150 << bits) / 503975);
|
||||
*val = -((xadc->ops->temp_offset << bits) / xadc->ops->temp_scale);
|
||||
return IIO_VAL_INT;
|
||||
case IIO_CHAN_INFO_SAMP_FREQ:
|
||||
ret = xadc_read_samplerate(xadc);
|
||||
@ -1426,28 +1437,6 @@ static int xadc_probe(struct platform_device *pdev)
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
/* Disable all alarms */
|
||||
ret = xadc_update_adc_reg(xadc, XADC_REG_CONF1, XADC_CONF1_ALARM_MASK,
|
||||
XADC_CONF1_ALARM_MASK);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
/* Set thresholds to min/max */
|
||||
for (i = 0; i < 16; i++) {
|
||||
/*
|
||||
* Set max voltage threshold and both temperature thresholds to
|
||||
* 0xffff, min voltage threshold to 0.
|
||||
*/
|
||||
if (i % 8 < 4 || i == 7)
|
||||
xadc->threshold[i] = 0xffff;
|
||||
else
|
||||
xadc->threshold[i] = 0;
|
||||
ret = xadc_write_adc_reg(xadc, XADC_REG_THRESHOLD(i),
|
||||
xadc->threshold[i]);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Go to non-buffered mode */
|
||||
xadc_postdisable(indio_dev);
|
||||
|
||||
|
@ -85,6 +85,8 @@ struct xadc_ops {
|
||||
|
||||
unsigned int flags;
|
||||
enum xadc_type type;
|
||||
int temp_scale;
|
||||
int temp_offset;
|
||||
};
|
||||
|
||||
static inline int _xadc_read_adc_reg(struct xadc *xadc, unsigned int reg,
|
||||
|
@ -214,9 +214,19 @@ static int rescale_read_raw(struct iio_dev *indio_dev,
|
||||
return ret < 0 ? ret : -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
if (iio_channel_has_info(rescale->source->channel,
|
||||
IIO_CHAN_INFO_SCALE)) {
|
||||
ret = iio_read_channel_scale(rescale->source, &scale, &scale2);
|
||||
return rescale_process_offset(rescale, ret, scale, scale2,
|
||||
schan_off, val, val2);
|
||||
}
|
||||
|
||||
/*
|
||||
* If we get here we have no scale so scale 1:1 but apply
|
||||
* rescaler and offset, if any.
|
||||
*/
|
||||
return rescale_process_offset(rescale, IIO_VAL_FRACTIONAL, 1, 1,
|
||||
schan_off, val, val2);
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
@ -280,8 +290,9 @@ static int rescale_configure_channel(struct device *dev,
|
||||
chan->type = rescale->cfg->type;
|
||||
|
||||
if (iio_channel_has_info(schan, IIO_CHAN_INFO_RAW) &&
|
||||
iio_channel_has_info(schan, IIO_CHAN_INFO_SCALE)) {
|
||||
dev_info(dev, "using raw+scale source channel\n");
|
||||
(iio_channel_has_info(schan, IIO_CHAN_INFO_SCALE) ||
|
||||
iio_channel_has_info(schan, IIO_CHAN_INFO_OFFSET))) {
|
||||
dev_info(dev, "using raw+scale/offset source channel\n");
|
||||
} else if (iio_channel_has_info(schan, IIO_CHAN_INFO_PROCESSED)) {
|
||||
dev_info(dev, "using processed channel\n");
|
||||
rescale->chan_processed = true;
|
||||
|
@ -23,7 +23,7 @@ static int mcb_lpc_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct resource *res;
|
||||
struct priv *priv;
|
||||
int ret = 0;
|
||||
int ret = 0, table_size;
|
||||
|
||||
priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
|
||||
if (!priv)
|
||||
@ -58,16 +58,43 @@ static int mcb_lpc_probe(struct platform_device *pdev)
|
||||
|
||||
ret = chameleon_parse_cells(priv->bus, priv->mem->start, priv->base);
|
||||
if (ret < 0) {
|
||||
mcb_release_bus(priv->bus);
|
||||
return ret;
|
||||
goto out_mcb_bus;
|
||||
}
|
||||
|
||||
dev_dbg(&pdev->dev, "Found %d cells\n", ret);
|
||||
table_size = ret;
|
||||
|
||||
if (table_size < CHAM_HEADER_SIZE) {
|
||||
/* Release the previous resources */
|
||||
devm_iounmap(&pdev->dev, priv->base);
|
||||
devm_release_mem_region(&pdev->dev, priv->mem->start, resource_size(priv->mem));
|
||||
|
||||
/* Then, allocate it again with the actual chameleon table size */
|
||||
res = devm_request_mem_region(&pdev->dev, priv->mem->start,
|
||||
table_size,
|
||||
KBUILD_MODNAME);
|
||||
if (!res) {
|
||||
dev_err(&pdev->dev, "Failed to request PCI memory\n");
|
||||
ret = -EBUSY;
|
||||
goto out_mcb_bus;
|
||||
}
|
||||
|
||||
priv->base = devm_ioremap(&pdev->dev, priv->mem->start, table_size);
|
||||
if (!priv->base) {
|
||||
dev_err(&pdev->dev, "Cannot ioremap\n");
|
||||
ret = -ENOMEM;
|
||||
goto out_mcb_bus;
|
||||
}
|
||||
|
||||
platform_set_drvdata(pdev, priv);
|
||||
}
|
||||
|
||||
mcb_bus_add_devices(priv->bus);
|
||||
|
||||
return 0;
|
||||
|
||||
out_mcb_bus:
|
||||
mcb_release_bus(priv->bus);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int mcb_lpc_remove(struct platform_device *pdev)
|
||||
|
@ -128,7 +128,7 @@ static void chameleon_parse_bar(void __iomem *base,
|
||||
}
|
||||
}
|
||||
|
||||
static int chameleon_get_bar(char __iomem **base, phys_addr_t mapbase,
|
||||
static int chameleon_get_bar(void __iomem **base, phys_addr_t mapbase,
|
||||
struct chameleon_bar **cb)
|
||||
{
|
||||
struct chameleon_bar *c;
|
||||
@ -177,12 +177,13 @@ int chameleon_parse_cells(struct mcb_bus *bus, phys_addr_t mapbase,
|
||||
{
|
||||
struct chameleon_fpga_header *header;
|
||||
struct chameleon_bar *cb;
|
||||
char __iomem *p = base;
|
||||
void __iomem *p = base;
|
||||
int num_cells = 0;
|
||||
uint32_t dtype;
|
||||
int bar_count;
|
||||
int ret;
|
||||
u32 hsize;
|
||||
u32 table_size;
|
||||
|
||||
hsize = sizeof(struct chameleon_fpga_header);
|
||||
|
||||
@ -237,12 +238,16 @@ int chameleon_parse_cells(struct mcb_bus *bus, phys_addr_t mapbase,
|
||||
num_cells++;
|
||||
}
|
||||
|
||||
if (num_cells == 0)
|
||||
num_cells = -EINVAL;
|
||||
if (num_cells == 0) {
|
||||
ret = -EINVAL;
|
||||
goto free_bar;
|
||||
}
|
||||
|
||||
table_size = p - base;
|
||||
pr_debug("%d cell(s) found. Chameleon table size: 0x%04x bytes\n", num_cells, table_size);
|
||||
kfree(cb);
|
||||
kfree(header);
|
||||
return num_cells;
|
||||
return table_size;
|
||||
|
||||
free_bar:
|
||||
kfree(cb);
|
||||
|
@ -901,6 +901,7 @@ static int fastrpc_get_args(u32 kernel, struct fastrpc_invoke_ctx *ctx)
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
memset(ctx->buf->virt, 0, pkt_size);
|
||||
rpra = ctx->buf->virt;
|
||||
list = fastrpc_invoke_buf_start(rpra, ctx->nscalars);
|
||||
pages = fastrpc_phy_page_start(list, ctx->nscalars);
|
||||
@ -1033,6 +1034,7 @@ static int fastrpc_put_args(struct fastrpc_invoke_ctx *ctx,
|
||||
}
|
||||
}
|
||||
|
||||
/* Clean up fdlist which is updated by DSP */
|
||||
for (i = 0; i < FASTRPC_MAX_FDLIST; i++) {
|
||||
if (!fdlist[i])
|
||||
break;
|
||||
@ -1097,11 +1099,9 @@ static int fastrpc_internal_invoke(struct fastrpc_user *fl, u32 kernel,
|
||||
if (IS_ERR(ctx))
|
||||
return PTR_ERR(ctx);
|
||||
|
||||
if (ctx->nscalars) {
|
||||
err = fastrpc_get_args(kernel, ctx);
|
||||
if (err)
|
||||
goto bail;
|
||||
}
|
||||
|
||||
/* make sure that all CPU memory writes are seen by DSP */
|
||||
dma_wmb();
|
||||
@ -1120,19 +1120,17 @@ static int fastrpc_internal_invoke(struct fastrpc_user *fl, u32 kernel,
|
||||
if (err)
|
||||
goto bail;
|
||||
|
||||
/* Check the response from remote dsp */
|
||||
err = ctx->retval;
|
||||
if (err)
|
||||
goto bail;
|
||||
|
||||
if (ctx->nscalars) {
|
||||
/* make sure that all memory writes by DSP are seen by CPU */
|
||||
dma_rmb();
|
||||
/* populate all the output buffers with results */
|
||||
err = fastrpc_put_args(ctx, kernel);
|
||||
if (err)
|
||||
goto bail;
|
||||
}
|
||||
|
||||
/* Check the response from remote dsp */
|
||||
err = ctx->retval;
|
||||
if (err)
|
||||
goto bail;
|
||||
|
||||
bail:
|
||||
if (err != -ERESTARTSYS && err != -ETIMEDOUT) {
|
||||
@ -1783,12 +1781,14 @@ static int fastrpc_req_mem_unmap_impl(struct fastrpc_user *fl, struct fastrpc_me
|
||||
sc = FASTRPC_SCALARS(FASTRPC_RMID_INIT_MEM_UNMAP, 1, 0);
|
||||
err = fastrpc_internal_invoke(fl, true, FASTRPC_INIT_HANDLE, sc,
|
||||
&args[0]);
|
||||
fastrpc_map_put(map);
|
||||
if (err)
|
||||
if (err) {
|
||||
dev_err(dev, "unmmap\tpt fd = %d, 0x%09llx error\n", map->fd, map->raddr);
|
||||
|
||||
return err;
|
||||
}
|
||||
fastrpc_map_put(map);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int fastrpc_req_mem_unmap(struct fastrpc_user *fl, char __user *argp)
|
||||
{
|
||||
|
@ -180,6 +180,8 @@ static void mmc_blk_rw_rq_prep(struct mmc_queue_req *mqrq,
|
||||
int recovery_mode,
|
||||
struct mmc_queue *mq);
|
||||
static void mmc_blk_hsq_req_done(struct mmc_request *mrq);
|
||||
static int mmc_spi_err_check(struct mmc_card *card);
|
||||
static int mmc_blk_busy_cb(void *cb_data, bool *busy);
|
||||
|
||||
static struct mmc_blk_data *mmc_blk_get(struct gendisk *disk)
|
||||
{
|
||||
@ -471,6 +473,8 @@ static int __mmc_blk_ioctl_cmd(struct mmc_card *card, struct mmc_blk_data *md,
|
||||
struct mmc_data data = {};
|
||||
struct mmc_request mrq = {};
|
||||
struct scatterlist sg;
|
||||
bool r1b_resp;
|
||||
unsigned int busy_timeout_ms;
|
||||
int err;
|
||||
unsigned int target_part;
|
||||
|
||||
@ -559,6 +563,12 @@ static int __mmc_blk_ioctl_cmd(struct mmc_card *card, struct mmc_blk_data *md,
|
||||
(cmd.opcode == MMC_SWITCH))
|
||||
return mmc_sanitize(card, idata->ic.cmd_timeout_ms);
|
||||
|
||||
/* If it's an R1B response we need some more preparations. */
|
||||
busy_timeout_ms = idata->ic.cmd_timeout_ms ? : MMC_BLK_TIMEOUT_MS;
|
||||
r1b_resp = (cmd.flags & MMC_RSP_R1B) == MMC_RSP_R1B;
|
||||
if (r1b_resp)
|
||||
mmc_prepare_busy_cmd(card->host, &cmd, busy_timeout_ms);
|
||||
|
||||
mmc_wait_for_req(card->host, &mrq);
|
||||
memcpy(&idata->ic.response, cmd.resp, sizeof(cmd.resp));
|
||||
|
||||
@ -610,13 +620,27 @@ static int __mmc_blk_ioctl_cmd(struct mmc_card *card, struct mmc_blk_data *md,
|
||||
if (idata->ic.postsleep_min_us)
|
||||
usleep_range(idata->ic.postsleep_min_us, idata->ic.postsleep_max_us);
|
||||
|
||||
if (idata->rpmb || (cmd.flags & MMC_RSP_R1B) == MMC_RSP_R1B) {
|
||||
if (mmc_host_is_spi(card->host)) {
|
||||
if (idata->ic.write_flag || r1b_resp || cmd.flags & MMC_RSP_SPI_BUSY)
|
||||
return mmc_spi_err_check(card);
|
||||
return err;
|
||||
}
|
||||
|
||||
/*
|
||||
* Ensure RPMB/R1B command has completed by polling CMD13 "Send Status". Here we
|
||||
* allow to override the default timeout value if a custom timeout is specified.
|
||||
* Ensure RPMB, writes and R1B responses are completed by polling with
|
||||
* CMD13. Note that, usually we don't need to poll when using HW busy
|
||||
* detection, but here it's needed since some commands may indicate the
|
||||
* error through the R1 status bits.
|
||||
*/
|
||||
err = mmc_poll_for_busy(card, idata->ic.cmd_timeout_ms ? : MMC_BLK_TIMEOUT_MS,
|
||||
false, MMC_BUSY_IO);
|
||||
if (idata->rpmb || idata->ic.write_flag || r1b_resp) {
|
||||
struct mmc_blk_busy_data cb_data = {
|
||||
.card = card,
|
||||
};
|
||||
|
||||
err = __mmc_poll_for_busy(card->host, 0, busy_timeout_ms,
|
||||
&mmc_blk_busy_cb, &cb_data);
|
||||
|
||||
idata->ic.response[0] = cb_data.status;
|
||||
}
|
||||
|
||||
return err;
|
||||
|
@ -294,7 +294,7 @@ static int adin1110_read_fifo(struct adin1110_port_priv *port_priv)
|
||||
{
|
||||
struct adin1110_priv *priv = port_priv->priv;
|
||||
u32 header_len = ADIN1110_RD_HEADER_LEN;
|
||||
struct spi_transfer t;
|
||||
struct spi_transfer t = {0};
|
||||
u32 frame_size_no_fcs;
|
||||
struct sk_buff *rxb;
|
||||
u32 frame_size;
|
||||
|
@ -580,7 +580,6 @@ struct i40e_pf {
|
||||
#define I40E_FLAG_DISABLE_FW_LLDP BIT(24)
|
||||
#define I40E_FLAG_RS_FEC BIT(25)
|
||||
#define I40E_FLAG_BASE_R_FEC BIT(26)
|
||||
#define I40E_FLAG_VF_VLAN_PRUNING BIT(27)
|
||||
/* TOTAL_PORT_SHUTDOWN
|
||||
* Allows to physically disable the link on the NIC's port.
|
||||
* If enabled, (after link down request from the OS)
|
||||
@ -603,6 +602,7 @@ struct i40e_pf {
|
||||
* in abilities field of i40e_aq_set_phy_config structure
|
||||
*/
|
||||
#define I40E_FLAG_TOTAL_PORT_SHUTDOWN_ENABLED BIT(27)
|
||||
#define I40E_FLAG_VF_VLAN_PRUNING BIT(28)
|
||||
|
||||
struct i40e_client_instance *cinst;
|
||||
bool stat_offsets_loaded;
|
||||
|
@ -2770,7 +2770,7 @@ int i40e_napi_poll(struct napi_struct *napi, int budget)
|
||||
return budget;
|
||||
}
|
||||
|
||||
if (vsi->back->flags & I40E_TXR_FLAGS_WB_ON_ITR)
|
||||
if (q_vector->tx.ring[0].flags & I40E_TXR_FLAGS_WB_ON_ITR)
|
||||
q_vector->arm_wb_state = false;
|
||||
|
||||
/* Exit the polling mode, but don't re-enable interrupts if stack might
|
||||
|
@ -1449,9 +1449,9 @@ void iavf_down(struct iavf_adapter *adapter)
|
||||
adapter->aq_required |= IAVF_FLAG_AQ_DEL_FDIR_FILTER;
|
||||
if (!list_empty(&adapter->adv_rss_list_head))
|
||||
adapter->aq_required |= IAVF_FLAG_AQ_DEL_ADV_RSS_CFG;
|
||||
adapter->aq_required |= IAVF_FLAG_AQ_DISABLE_QUEUES;
|
||||
}
|
||||
|
||||
adapter->aq_required |= IAVF_FLAG_AQ_DISABLE_QUEUES;
|
||||
mod_delayed_work(adapter->wq, &adapter->watchdog_task, 0);
|
||||
}
|
||||
|
||||
@ -5020,8 +5020,6 @@ static int iavf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
INIT_WORK(&adapter->finish_config, iavf_finish_config);
|
||||
INIT_DELAYED_WORK(&adapter->watchdog_task, iavf_watchdog_task);
|
||||
INIT_DELAYED_WORK(&adapter->client_task, iavf_client_task);
|
||||
queue_delayed_work(adapter->wq, &adapter->watchdog_task,
|
||||
msecs_to_jiffies(5 * (pdev->devfn & 0x07)));
|
||||
|
||||
/* Setup the wait queue for indicating transition to down status */
|
||||
init_waitqueue_head(&adapter->down_waitqueue);
|
||||
@ -5032,6 +5030,9 @@ static int iavf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
/* Setup the wait queue for indicating virtchannel events */
|
||||
init_waitqueue_head(&adapter->vc_waitqueue);
|
||||
|
||||
queue_delayed_work(adapter->wq, &adapter->watchdog_task,
|
||||
msecs_to_jiffies(5 * (pdev->devfn & 0x07)));
|
||||
/* Initialization goes on in the work. Do not add more of it below. */
|
||||
return 0;
|
||||
|
||||
err_ioremap:
|
||||
|
@ -2978,11 +2978,15 @@ static int igb_add_ethtool_nfc_entry(struct igb_adapter *adapter,
|
||||
if (err)
|
||||
goto err_out_w_lock;
|
||||
|
||||
igb_update_ethtool_nfc_entry(adapter, input, input->sw_idx);
|
||||
err = igb_update_ethtool_nfc_entry(adapter, input, input->sw_idx);
|
||||
if (err)
|
||||
goto err_out_input_filter;
|
||||
|
||||
spin_unlock(&adapter->nfc_lock);
|
||||
return 0;
|
||||
|
||||
err_out_input_filter:
|
||||
igb_erase_filter(adapter, input);
|
||||
err_out_w_lock:
|
||||
spin_unlock(&adapter->nfc_lock);
|
||||
err_out:
|
||||
|
@ -1817,7 +1817,7 @@ igc_ethtool_set_link_ksettings(struct net_device *netdev,
|
||||
struct igc_adapter *adapter = netdev_priv(netdev);
|
||||
struct net_device *dev = adapter->netdev;
|
||||
struct igc_hw *hw = &adapter->hw;
|
||||
u32 advertising;
|
||||
u16 advertised = 0;
|
||||
|
||||
/* When adapter in resetting mode, autoneg/speed/duplex
|
||||
* cannot be changed
|
||||
@ -1842,18 +1842,33 @@ igc_ethtool_set_link_ksettings(struct net_device *netdev,
|
||||
while (test_and_set_bit(__IGC_RESETTING, &adapter->state))
|
||||
usleep_range(1000, 2000);
|
||||
|
||||
ethtool_convert_link_mode_to_legacy_u32(&advertising,
|
||||
cmd->link_modes.advertising);
|
||||
/* Converting to legacy u32 drops ETHTOOL_LINK_MODE_2500baseT_Full_BIT.
|
||||
* We have to check this and convert it to ADVERTISE_2500_FULL
|
||||
* (aka ETHTOOL_LINK_MODE_2500baseX_Full_BIT) explicitly.
|
||||
*/
|
||||
if (ethtool_link_ksettings_test_link_mode(cmd, advertising, 2500baseT_Full))
|
||||
advertising |= ADVERTISE_2500_FULL;
|
||||
if (ethtool_link_ksettings_test_link_mode(cmd, advertising,
|
||||
2500baseT_Full))
|
||||
advertised |= ADVERTISE_2500_FULL;
|
||||
|
||||
if (ethtool_link_ksettings_test_link_mode(cmd, advertising,
|
||||
1000baseT_Full))
|
||||
advertised |= ADVERTISE_1000_FULL;
|
||||
|
||||
if (ethtool_link_ksettings_test_link_mode(cmd, advertising,
|
||||
100baseT_Full))
|
||||
advertised |= ADVERTISE_100_FULL;
|
||||
|
||||
if (ethtool_link_ksettings_test_link_mode(cmd, advertising,
|
||||
100baseT_Half))
|
||||
advertised |= ADVERTISE_100_HALF;
|
||||
|
||||
if (ethtool_link_ksettings_test_link_mode(cmd, advertising,
|
||||
10baseT_Full))
|
||||
advertised |= ADVERTISE_10_FULL;
|
||||
|
||||
if (ethtool_link_ksettings_test_link_mode(cmd, advertising,
|
||||
10baseT_Half))
|
||||
advertised |= ADVERTISE_10_HALF;
|
||||
|
||||
if (cmd->base.autoneg == AUTONEG_ENABLE) {
|
||||
hw->mac.autoneg = 1;
|
||||
hw->phy.autoneg_advertised = advertising;
|
||||
hw->phy.autoneg_advertised = advertised;
|
||||
if (adapter->fc_autoneg)
|
||||
hw->fc.requested_mode = igc_fc_default;
|
||||
} else {
|
||||
|
@ -4343,7 +4343,7 @@ static void rtl_tx(struct net_device *dev, struct rtl8169_private *tp,
|
||||
unsigned int entry = dirty_tx % NUM_TX_DESC;
|
||||
u32 status;
|
||||
|
||||
status = le32_to_cpu(tp->TxDescArray[entry].opts1);
|
||||
status = le32_to_cpu(READ_ONCE(tp->TxDescArray[entry].opts1));
|
||||
if (status & DescOwn)
|
||||
break;
|
||||
|
||||
@ -4380,7 +4380,7 @@ static void rtl_tx(struct net_device *dev, struct rtl8169_private *tp,
|
||||
* If skb is NULL then we come here again once a tx irq is
|
||||
* triggered after the last fragment is marked transmitted.
|
||||
*/
|
||||
if (tp->cur_tx != dirty_tx && skb)
|
||||
if (READ_ONCE(tp->cur_tx) != dirty_tx && skb)
|
||||
rtl8169_doorbell(tp);
|
||||
}
|
||||
}
|
||||
@ -4413,7 +4413,7 @@ static int rtl_rx(struct net_device *dev, struct rtl8169_private *tp, int budget
|
||||
dma_addr_t addr;
|
||||
u32 status;
|
||||
|
||||
status = le32_to_cpu(desc->opts1);
|
||||
status = le32_to_cpu(READ_ONCE(desc->opts1));
|
||||
if (status & DescOwn)
|
||||
break;
|
||||
|
||||
|
@ -1217,7 +1217,7 @@ static int gelic_wl_set_encodeext(struct net_device *netdev,
|
||||
key_index = wl->current_key;
|
||||
|
||||
if (!enc->length && (ext->ext_flags & IW_ENCODE_EXT_SET_TX_KEY)) {
|
||||
/* reques to change default key index */
|
||||
/* request to change default key index */
|
||||
pr_debug("%s: request to change default key to %d\n",
|
||||
__func__, key_index);
|
||||
wl->current_key = key_index;
|
||||
|
@ -871,8 +871,9 @@ static int gtp_build_skb_ip4(struct sk_buff *skb, struct net_device *dev,
|
||||
|
||||
skb_dst_update_pmtu_no_confirm(skb, mtu);
|
||||
|
||||
if (!skb_is_gso(skb) && (iph->frag_off & htons(IP_DF)) &&
|
||||
mtu < ntohs(iph->tot_len)) {
|
||||
if (iph->frag_off & htons(IP_DF) &&
|
||||
((!skb_is_gso(skb) && skb->len > mtu) ||
|
||||
(skb_is_gso(skb) && !skb_gso_validate_network_len(skb, mtu)))) {
|
||||
netdev_dbg(dev, "packet too big, fragmentation needed\n");
|
||||
icmp_ndo_send(skb, ICMP_DEST_UNREACH, ICMP_FRAG_NEEDED,
|
||||
htonl(mtu));
|
||||
|
@ -1162,9 +1162,10 @@ static int adf7242_stats_show(struct seq_file *file, void *offset)
|
||||
|
||||
static void adf7242_debugfs_init(struct adf7242_local *lp)
|
||||
{
|
||||
char debugfs_dir_name[DNAME_INLINE_LEN + 1] = "adf7242-";
|
||||
char debugfs_dir_name[DNAME_INLINE_LEN + 1];
|
||||
|
||||
strncat(debugfs_dir_name, dev_name(&lp->spi->dev), DNAME_INLINE_LEN);
|
||||
snprintf(debugfs_dir_name, sizeof(debugfs_dir_name),
|
||||
"adf7242-%s", dev_name(&lp->spi->dev));
|
||||
|
||||
lp->debugfs_root = debugfs_create_dir(debugfs_dir_name, NULL);
|
||||
|
||||
|
@ -1211,7 +1211,7 @@ int get_registers(struct r8152 *tp, u16 value, u16 index, u16 size, void *data)
|
||||
|
||||
ret = usb_control_msg(tp->udev, tp->pipe_ctrl_in,
|
||||
RTL8152_REQ_GET_REGS, RTL8152_REQT_READ,
|
||||
value, index, tmp, size, 500);
|
||||
value, index, tmp, size, USB_CTRL_GET_TIMEOUT);
|
||||
if (ret < 0)
|
||||
memset(data, 0xff, size);
|
||||
else
|
||||
@ -1234,7 +1234,7 @@ int set_registers(struct r8152 *tp, u16 value, u16 index, u16 size, void *data)
|
||||
|
||||
ret = usb_control_msg(tp->udev, tp->pipe_ctrl_out,
|
||||
RTL8152_REQ_SET_REGS, RTL8152_REQT_WRITE,
|
||||
value, index, tmp, size, 500);
|
||||
value, index, tmp, size, USB_CTRL_SET_TIMEOUT);
|
||||
|
||||
kfree(tmp);
|
||||
|
||||
@ -9549,7 +9549,8 @@ u8 rtl8152_get_version(struct usb_interface *intf)
|
||||
|
||||
ret = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0),
|
||||
RTL8152_REQ_GET_REGS, RTL8152_REQT_READ,
|
||||
PLA_TCR0, MCU_TYPE_PLA, tmp, sizeof(*tmp), 500);
|
||||
PLA_TCR0, MCU_TYPE_PLA, tmp, sizeof(*tmp),
|
||||
USB_CTRL_GET_TIMEOUT);
|
||||
if (ret > 0)
|
||||
ocp_data = (__le32_to_cpu(*tmp) >> 16) & VERSION_MASK;
|
||||
|
||||
@ -9825,6 +9826,10 @@ static int rtl8152_probe(struct usb_interface *intf,
|
||||
|
||||
out1:
|
||||
tasklet_kill(&tp->tx_tl);
|
||||
cancel_delayed_work_sync(&tp->hw_phy_work);
|
||||
if (tp->rtl_ops.unload)
|
||||
tp->rtl_ops.unload(tp);
|
||||
rtl8152_release_firmware(tp);
|
||||
usb_set_intfdata(intf, NULL);
|
||||
out:
|
||||
free_netdev(netdev);
|
||||
|
@ -95,7 +95,9 @@ static int __must_check smsc95xx_read_reg(struct usbnet *dev, u32 index,
|
||||
ret = fn(dev, USB_VENDOR_REQUEST_READ_REGISTER, USB_DIR_IN
|
||||
| USB_TYPE_VENDOR | USB_RECIP_DEVICE,
|
||||
0, index, &buf, 4);
|
||||
if (ret < 0) {
|
||||
if (ret < 4) {
|
||||
ret = ret < 0 ? ret : -ENODATA;
|
||||
|
||||
if (ret != -ENODEV)
|
||||
netdev_warn(dev->net, "Failed to read reg index 0x%08x: %d\n",
|
||||
index, ret);
|
||||
|
@ -506,7 +506,7 @@ static const struct ocotp_params imx6sl_params = {
|
||||
};
|
||||
|
||||
static const struct ocotp_params imx6sll_params = {
|
||||
.nregs = 128,
|
||||
.nregs = 80,
|
||||
.bank_address_words = 0,
|
||||
.set_timing = imx_ocotp_set_imx6_timing,
|
||||
.ctrl = IMX_OCOTP_BM_CTRL_DEFAULT,
|
||||
@ -520,14 +520,14 @@ static const struct ocotp_params imx6sx_params = {
|
||||
};
|
||||
|
||||
static const struct ocotp_params imx6ul_params = {
|
||||
.nregs = 128,
|
||||
.nregs = 144,
|
||||
.bank_address_words = 0,
|
||||
.set_timing = imx_ocotp_set_imx6_timing,
|
||||
.ctrl = IMX_OCOTP_BM_CTRL_DEFAULT,
|
||||
};
|
||||
|
||||
static const struct ocotp_params imx6ull_params = {
|
||||
.nregs = 64,
|
||||
.nregs = 80,
|
||||
.bank_address_words = 0,
|
||||
.set_timing = imx_ocotp_set_imx6_timing,
|
||||
.ctrl = IMX_OCOTP_BM_CTRL_DEFAULT,
|
||||
|
@ -24,7 +24,8 @@ struct lpi_pinctrl {
|
||||
char __iomem *tlmm_base;
|
||||
char __iomem *slew_base;
|
||||
struct clk_bulk_data clks[MAX_LPI_NUM_CLKS];
|
||||
struct mutex slew_access_lock;
|
||||
/* Protects from concurrent register updates */
|
||||
struct mutex lock;
|
||||
const struct lpi_pinctrl_variant_data *data;
|
||||
};
|
||||
|
||||
@ -94,9 +95,11 @@ static int lpi_gpio_set_mux(struct pinctrl_dev *pctldev, unsigned int function,
|
||||
if (WARN_ON(i == g->nfuncs))
|
||||
return -EINVAL;
|
||||
|
||||
mutex_lock(&pctrl->lock);
|
||||
val = lpi_gpio_read(pctrl, pin, LPI_GPIO_CFG_REG);
|
||||
u32p_replace_bits(&val, i, LPI_GPIO_FUNCTION_MASK);
|
||||
lpi_gpio_write(pctrl, pin, LPI_GPIO_CFG_REG, val);
|
||||
mutex_unlock(&pctrl->lock);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -202,14 +205,14 @@ static int lpi_config_set(struct pinctrl_dev *pctldev, unsigned int group,
|
||||
if (slew_offset == LPI_NO_SLEW)
|
||||
break;
|
||||
|
||||
mutex_lock(&pctrl->slew_access_lock);
|
||||
mutex_lock(&pctrl->lock);
|
||||
|
||||
sval = ioread32(pctrl->slew_base + LPI_SLEW_RATE_CTL_REG);
|
||||
sval &= ~(LPI_SLEW_RATE_MASK << slew_offset);
|
||||
sval |= arg << slew_offset;
|
||||
iowrite32(sval, pctrl->slew_base + LPI_SLEW_RATE_CTL_REG);
|
||||
|
||||
mutex_unlock(&pctrl->slew_access_lock);
|
||||
mutex_unlock(&pctrl->lock);
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
@ -225,6 +228,7 @@ static int lpi_config_set(struct pinctrl_dev *pctldev, unsigned int group,
|
||||
lpi_gpio_write(pctrl, group, LPI_GPIO_VALUE_REG, val);
|
||||
}
|
||||
|
||||
mutex_lock(&pctrl->lock);
|
||||
val = lpi_gpio_read(pctrl, group, LPI_GPIO_CFG_REG);
|
||||
|
||||
u32p_replace_bits(&val, pullup, LPI_GPIO_PULL_MASK);
|
||||
@ -233,6 +237,7 @@ static int lpi_config_set(struct pinctrl_dev *pctldev, unsigned int group,
|
||||
u32p_replace_bits(&val, output_enabled, LPI_GPIO_OE_MASK);
|
||||
|
||||
lpi_gpio_write(pctrl, group, LPI_GPIO_CFG_REG, val);
|
||||
mutex_unlock(&pctrl->lock);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -432,7 +437,7 @@ int lpi_pinctrl_probe(struct platform_device *pdev)
|
||||
pctrl->chip.of_gpio_n_cells = 2;
|
||||
pctrl->chip.can_sleep = false;
|
||||
|
||||
mutex_init(&pctrl->slew_access_lock);
|
||||
mutex_init(&pctrl->lock);
|
||||
|
||||
pctrl->ctrl = devm_pinctrl_register(dev, &pctrl->desc, pctrl);
|
||||
if (IS_ERR(pctrl->ctrl)) {
|
||||
@ -454,7 +459,7 @@ int lpi_pinctrl_probe(struct platform_device *pdev)
|
||||
return 0;
|
||||
|
||||
err_pinctrl:
|
||||
mutex_destroy(&pctrl->slew_access_lock);
|
||||
mutex_destroy(&pctrl->lock);
|
||||
clk_bulk_disable_unprepare(MAX_LPI_NUM_CLKS, pctrl->clks);
|
||||
|
||||
return ret;
|
||||
@ -466,7 +471,7 @@ int lpi_pinctrl_remove(struct platform_device *pdev)
|
||||
struct lpi_pinctrl *pctrl = platform_get_drvdata(pdev);
|
||||
int i;
|
||||
|
||||
mutex_destroy(&pctrl->slew_access_lock);
|
||||
mutex_destroy(&pctrl->lock);
|
||||
clk_bulk_disable_unprepare(MAX_LPI_NUM_CLKS, pctrl->clks);
|
||||
|
||||
for (i = 0; i < pctrl->data->npins; i++)
|
||||
|
@ -4513,6 +4513,79 @@ static const struct dmi_system_id fwbug_list[] __initconst = {
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "21A1"),
|
||||
}
|
||||
},
|
||||
/* https://bugzilla.kernel.org/show_bug.cgi?id=218024 */
|
||||
{
|
||||
.ident = "V14 G4 AMN",
|
||||
.driver_data = &quirk_s2idle_bug,
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "82YT"),
|
||||
}
|
||||
},
|
||||
{
|
||||
.ident = "V14 G4 AMN",
|
||||
.driver_data = &quirk_s2idle_bug,
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "83GE"),
|
||||
}
|
||||
},
|
||||
{
|
||||
.ident = "V15 G4 AMN",
|
||||
.driver_data = &quirk_s2idle_bug,
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "82YU"),
|
||||
}
|
||||
},
|
||||
{
|
||||
.ident = "V15 G4 AMN",
|
||||
.driver_data = &quirk_s2idle_bug,
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "83CQ"),
|
||||
}
|
||||
},
|
||||
{
|
||||
.ident = "IdeaPad 1 14AMN7",
|
||||
.driver_data = &quirk_s2idle_bug,
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "82VF"),
|
||||
}
|
||||
},
|
||||
{
|
||||
.ident = "IdeaPad 1 15AMN7",
|
||||
.driver_data = &quirk_s2idle_bug,
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "82VG"),
|
||||
}
|
||||
},
|
||||
{
|
||||
.ident = "IdeaPad 1 15AMN7",
|
||||
.driver_data = &quirk_s2idle_bug,
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "82X5"),
|
||||
}
|
||||
},
|
||||
{
|
||||
.ident = "IdeaPad Slim 3 14AMN8",
|
||||
.driver_data = &quirk_s2idle_bug,
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "82XN"),
|
||||
}
|
||||
},
|
||||
{
|
||||
.ident = "IdeaPad Slim 3 15AMN8",
|
||||
.driver_data = &quirk_s2idle_bug,
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "82XQ"),
|
||||
}
|
||||
},
|
||||
{}
|
||||
};
|
||||
|
||||
|
@ -1176,9 +1176,7 @@ ssize_t vhost_chr_write_iter(struct vhost_dev *dev,
|
||||
goto done;
|
||||
}
|
||||
|
||||
if ((msg.type == VHOST_IOTLB_UPDATE ||
|
||||
msg.type == VHOST_IOTLB_INVALIDATE) &&
|
||||
msg.size == 0) {
|
||||
if (msg.type == VHOST_IOTLB_UPDATE && msg.size == 0) {
|
||||
ret = -EINVAL;
|
||||
goto done;
|
||||
}
|
||||
|
@ -395,7 +395,11 @@ static inline s64 towards_target(struct virtio_balloon *vb)
|
||||
virtio_cread_le(vb->vdev, struct virtio_balloon_config, num_pages,
|
||||
&num_pages);
|
||||
|
||||
target = num_pages;
|
||||
/*
|
||||
* Aligned up to guest page size to avoid inflating and deflating
|
||||
* balloon endlessly.
|
||||
*/
|
||||
target = ALIGN(num_pages, VIRTIO_BALLOON_PAGES_PER_PAGE);
|
||||
return target - vb->num_pages;
|
||||
}
|
||||
|
||||
|
@ -614,14 +614,17 @@ static int virtio_mmio_probe(struct platform_device *pdev)
|
||||
spin_lock_init(&vm_dev->lock);
|
||||
|
||||
vm_dev->base = devm_platform_ioremap_resource(pdev, 0);
|
||||
if (IS_ERR(vm_dev->base))
|
||||
return PTR_ERR(vm_dev->base);
|
||||
if (IS_ERR(vm_dev->base)) {
|
||||
rc = PTR_ERR(vm_dev->base);
|
||||
goto free_vm_dev;
|
||||
}
|
||||
|
||||
/* Check magic value */
|
||||
magic = readl(vm_dev->base + VIRTIO_MMIO_MAGIC_VALUE);
|
||||
if (magic != ('v' | 'i' << 8 | 'r' << 16 | 't' << 24)) {
|
||||
dev_warn(&pdev->dev, "Wrong magic value 0x%08lx!\n", magic);
|
||||
return -ENODEV;
|
||||
rc = -ENODEV;
|
||||
goto free_vm_dev;
|
||||
}
|
||||
|
||||
/* Check device version */
|
||||
@ -629,7 +632,8 @@ static int virtio_mmio_probe(struct platform_device *pdev)
|
||||
if (vm_dev->version < 1 || vm_dev->version > 2) {
|
||||
dev_err(&pdev->dev, "Version %ld not supported!\n",
|
||||
vm_dev->version);
|
||||
return -ENXIO;
|
||||
rc = -ENXIO;
|
||||
goto free_vm_dev;
|
||||
}
|
||||
|
||||
vm_dev->vdev.id.device = readl(vm_dev->base + VIRTIO_MMIO_DEVICE_ID);
|
||||
@ -638,7 +642,8 @@ static int virtio_mmio_probe(struct platform_device *pdev)
|
||||
* virtio-mmio device with an ID 0 is a (dummy) placeholder
|
||||
* with no function. End probing now with no error reported.
|
||||
*/
|
||||
return -ENODEV;
|
||||
rc = -ENODEV;
|
||||
goto free_vm_dev;
|
||||
}
|
||||
vm_dev->vdev.id.vendor = readl(vm_dev->base + VIRTIO_MMIO_VENDOR_ID);
|
||||
|
||||
@ -668,6 +673,10 @@ static int virtio_mmio_probe(struct platform_device *pdev)
|
||||
put_device(&vm_dev->vdev.dev);
|
||||
|
||||
return rc;
|
||||
|
||||
free_vm_dev:
|
||||
kfree(vm_dev);
|
||||
return rc;
|
||||
}
|
||||
|
||||
static int virtio_mmio_remove(struct platform_device *pdev)
|
||||
|
@ -282,7 +282,7 @@ int vp_modern_probe(struct virtio_pci_modern_device *mdev)
|
||||
err = -EINVAL;
|
||||
mdev->common = vp_modern_map_capability(mdev, common,
|
||||
sizeof(struct virtio_pci_common_cfg), 4,
|
||||
0, sizeof(struct virtio_pci_common_cfg),
|
||||
0, sizeof(struct virtio_pci_modern_common_cfg),
|
||||
NULL, NULL);
|
||||
if (!mdev->common)
|
||||
goto err_map_common;
|
||||
|
@ -4022,8 +4022,7 @@ ext4_mb_normalize_request(struct ext4_allocation_context *ac,
|
||||
struct ext4_sb_info *sbi = EXT4_SB(ac->ac_sb);
|
||||
struct ext4_super_block *es = sbi->s_es;
|
||||
int bsbits, max;
|
||||
ext4_lblk_t end;
|
||||
loff_t size, start_off;
|
||||
loff_t size, start_off, end;
|
||||
loff_t orig_size __maybe_unused;
|
||||
ext4_lblk_t start;
|
||||
struct ext4_inode_info *ei = EXT4_I(ac->ac_inode);
|
||||
@ -4052,7 +4051,7 @@ ext4_mb_normalize_request(struct ext4_allocation_context *ac,
|
||||
|
||||
/* first, let's learn actual file size
|
||||
* given current request is allocated */
|
||||
size = ac->ac_o_ex.fe_logical + EXT4_C2B(sbi, ac->ac_o_ex.fe_len);
|
||||
size = extent_logical_end(sbi, &ac->ac_o_ex);
|
||||
size = size << bsbits;
|
||||
if (size < i_size_read(ac->ac_inode))
|
||||
size = i_size_read(ac->ac_inode);
|
||||
@ -4131,7 +4130,7 @@ ext4_mb_normalize_request(struct ext4_allocation_context *ac,
|
||||
/* check we don't cross already preallocated blocks */
|
||||
rcu_read_lock();
|
||||
list_for_each_entry_rcu(pa, &ei->i_prealloc_list, pa_inode_list) {
|
||||
ext4_lblk_t pa_end;
|
||||
loff_t pa_end;
|
||||
|
||||
if (pa->pa_deleted)
|
||||
continue;
|
||||
@ -4141,8 +4140,7 @@ ext4_mb_normalize_request(struct ext4_allocation_context *ac,
|
||||
continue;
|
||||
}
|
||||
|
||||
pa_end = pa->pa_lstart + EXT4_C2B(EXT4_SB(ac->ac_sb),
|
||||
pa->pa_len);
|
||||
pa_end = pa_logical_end(EXT4_SB(ac->ac_sb), pa);
|
||||
|
||||
/* PA must not overlap original request */
|
||||
BUG_ON(!(ac->ac_o_ex.fe_logical >= pa_end ||
|
||||
@ -4171,12 +4169,11 @@ ext4_mb_normalize_request(struct ext4_allocation_context *ac,
|
||||
/* XXX: extra loop to check we really don't overlap preallocations */
|
||||
rcu_read_lock();
|
||||
list_for_each_entry_rcu(pa, &ei->i_prealloc_list, pa_inode_list) {
|
||||
ext4_lblk_t pa_end;
|
||||
loff_t pa_end;
|
||||
|
||||
spin_lock(&pa->pa_lock);
|
||||
if (pa->pa_deleted == 0) {
|
||||
pa_end = pa->pa_lstart + EXT4_C2B(EXT4_SB(ac->ac_sb),
|
||||
pa->pa_len);
|
||||
pa_end = pa_logical_end(EXT4_SB(ac->ac_sb), pa);
|
||||
BUG_ON(!(start >= pa_end || end <= pa->pa_lstart));
|
||||
}
|
||||
spin_unlock(&pa->pa_lock);
|
||||
@ -4407,8 +4404,7 @@ ext4_mb_use_preallocated(struct ext4_allocation_context *ac)
|
||||
/* all fields in this condition don't change,
|
||||
* so we can skip locking for them */
|
||||
if (ac->ac_o_ex.fe_logical < pa->pa_lstart ||
|
||||
ac->ac_o_ex.fe_logical >= (pa->pa_lstart +
|
||||
EXT4_C2B(sbi, pa->pa_len)))
|
||||
ac->ac_o_ex.fe_logical >= pa_logical_end(sbi, pa))
|
||||
continue;
|
||||
|
||||
/* non-extent files can't have physical blocks past 2^32 */
|
||||
@ -4653,8 +4649,11 @@ ext4_mb_new_inode_pa(struct ext4_allocation_context *ac)
|
||||
pa = ac->ac_pa;
|
||||
|
||||
if (ac->ac_b_ex.fe_len < ac->ac_g_ex.fe_len) {
|
||||
int new_bex_start;
|
||||
int new_bex_end;
|
||||
struct ext4_free_extent ex = {
|
||||
.fe_logical = ac->ac_g_ex.fe_logical,
|
||||
.fe_len = ac->ac_g_ex.fe_len,
|
||||
};
|
||||
loff_t orig_goal_end = extent_logical_end(sbi, &ex);
|
||||
|
||||
/* we can't allocate as much as normalizer wants.
|
||||
* so, found space must get proper lstart
|
||||
@ -4673,29 +4672,23 @@ ext4_mb_new_inode_pa(struct ext4_allocation_context *ac)
|
||||
* still cover original start
|
||||
* 3. Else, keep the best ex at start of original request.
|
||||
*/
|
||||
new_bex_end = ac->ac_g_ex.fe_logical +
|
||||
EXT4_C2B(sbi, ac->ac_g_ex.fe_len);
|
||||
new_bex_start = new_bex_end - EXT4_C2B(sbi, ac->ac_b_ex.fe_len);
|
||||
if (ac->ac_o_ex.fe_logical >= new_bex_start)
|
||||
ex.fe_len = ac->ac_b_ex.fe_len;
|
||||
|
||||
ex.fe_logical = orig_goal_end - EXT4_C2B(sbi, ex.fe_len);
|
||||
if (ac->ac_o_ex.fe_logical >= ex.fe_logical)
|
||||
goto adjust_bex;
|
||||
|
||||
new_bex_start = ac->ac_g_ex.fe_logical;
|
||||
new_bex_end =
|
||||
new_bex_start + EXT4_C2B(sbi, ac->ac_b_ex.fe_len);
|
||||
if (ac->ac_o_ex.fe_logical < new_bex_end)
|
||||
ex.fe_logical = ac->ac_g_ex.fe_logical;
|
||||
if (ac->ac_o_ex.fe_logical < extent_logical_end(sbi, &ex))
|
||||
goto adjust_bex;
|
||||
|
||||
new_bex_start = ac->ac_o_ex.fe_logical;
|
||||
new_bex_end =
|
||||
new_bex_start + EXT4_C2B(sbi, ac->ac_b_ex.fe_len);
|
||||
|
||||
ex.fe_logical = ac->ac_o_ex.fe_logical;
|
||||
adjust_bex:
|
||||
ac->ac_b_ex.fe_logical = new_bex_start;
|
||||
ac->ac_b_ex.fe_logical = ex.fe_logical;
|
||||
|
||||
BUG_ON(ac->ac_o_ex.fe_logical < ac->ac_b_ex.fe_logical);
|
||||
BUG_ON(ac->ac_o_ex.fe_len > ac->ac_b_ex.fe_len);
|
||||
BUG_ON(new_bex_end > (ac->ac_g_ex.fe_logical +
|
||||
EXT4_C2B(sbi, ac->ac_g_ex.fe_len)));
|
||||
BUG_ON(extent_logical_end(sbi, &ex) > orig_goal_end);
|
||||
}
|
||||
|
||||
/* preallocation can change ac_b_ex, thus we store actually
|
||||
@ -5229,7 +5222,7 @@ static void ext4_mb_group_or_file(struct ext4_allocation_context *ac)
|
||||
|
||||
group_pa_eligible = sbi->s_mb_group_prealloc > 0;
|
||||
inode_pa_eligible = true;
|
||||
size = ac->ac_o_ex.fe_logical + EXT4_C2B(sbi, ac->ac_o_ex.fe_len);
|
||||
size = extent_logical_end(sbi, &ac->ac_o_ex);
|
||||
isize = (i_size_read(ac->ac_inode) + ac->ac_sb->s_blocksize - 1)
|
||||
>> bsbits;
|
||||
|
||||
|
@ -218,6 +218,20 @@ static inline ext4_fsblk_t ext4_grp_offs_to_block(struct super_block *sb,
|
||||
(fex->fe_start << EXT4_SB(sb)->s_cluster_bits);
|
||||
}
|
||||
|
||||
static inline loff_t extent_logical_end(struct ext4_sb_info *sbi,
|
||||
struct ext4_free_extent *fex)
|
||||
{
|
||||
/* Use loff_t to avoid end exceeding ext4_lblk_t max. */
|
||||
return (loff_t)fex->fe_logical + EXT4_C2B(sbi, fex->fe_len);
|
||||
}
|
||||
|
||||
static inline loff_t pa_logical_end(struct ext4_sb_info *sbi,
|
||||
struct ext4_prealloc_space *pa)
|
||||
{
|
||||
/* Use loff_t to avoid end exceeding ext4_lblk_t max. */
|
||||
return (loff_t)pa->pa_lstart + EXT4_C2B(sbi, pa->pa_len);
|
||||
}
|
||||
|
||||
typedef int (*ext4_mballoc_query_range_fn)(
|
||||
struct super_block *sb,
|
||||
ext4_group_t agno,
|
||||
|
@ -1659,6 +1659,12 @@ nfsd_rename(struct svc_rqst *rqstp, struct svc_fh *ffhp, char *fname, int flen,
|
||||
if (!flen || isdotent(fname, flen) || !tlen || isdotent(tname, tlen))
|
||||
goto out;
|
||||
|
||||
err = (rqstp->rq_vers == 2) ? nfserr_acces : nfserr_xdev;
|
||||
if (ffhp->fh_export->ex_path.mnt != tfhp->fh_export->ex_path.mnt)
|
||||
goto out;
|
||||
if (ffhp->fh_export->ex_path.dentry != tfhp->fh_export->ex_path.dentry)
|
||||
goto out;
|
||||
|
||||
retry:
|
||||
host_err = fh_want_write(ffhp);
|
||||
if (host_err) {
|
||||
@ -1690,12 +1696,6 @@ nfsd_rename(struct svc_rqst *rqstp, struct svc_fh *ffhp, char *fname, int flen,
|
||||
if (ndentry == trap)
|
||||
goto out_dput_new;
|
||||
|
||||
host_err = -EXDEV;
|
||||
if (ffhp->fh_export->ex_path.mnt != tfhp->fh_export->ex_path.mnt)
|
||||
goto out_dput_new;
|
||||
if (ffhp->fh_export->ex_path.dentry != tfhp->fh_export->ex_path.dentry)
|
||||
goto out_dput_new;
|
||||
|
||||
if ((ndentry->d_sb->s_export_op->flags & EXPORT_OP_CLOSE_BEFORE_UNLINK) &&
|
||||
nfsd_has_cached_files(ndentry)) {
|
||||
close_cached = true;
|
||||
|
@ -70,6 +70,7 @@ struct resv_map {
|
||||
long adds_in_progress;
|
||||
struct list_head region_cache;
|
||||
long region_cache_count;
|
||||
struct rw_semaphore rw_sema;
|
||||
#ifdef CONFIG_CGROUP_HUGETLB
|
||||
/*
|
||||
* On private mappings, the counter to uncharge reservations is stored
|
||||
@ -879,6 +880,11 @@ static inline bool hugepage_migration_supported(struct hstate *h)
|
||||
return arch_hugetlb_migration_supported(h);
|
||||
}
|
||||
|
||||
static inline bool __vma_private_lock(struct vm_area_struct *vma)
|
||||
{
|
||||
return (!(vma->vm_flags & VM_MAYSHARE)) && vma->vm_private_data;
|
||||
}
|
||||
|
||||
/*
|
||||
* Movability check is different as compared to migration check.
|
||||
* It determines whether or not a huge page should be placed on
|
||||
|
@ -475,10 +475,10 @@ static inline void kasan_free_module_shadow(const struct vm_struct *vm) {}
|
||||
|
||||
#endif /* (CONFIG_KASAN_GENERIC || CONFIG_KASAN_SW_TAGS) && !CONFIG_KASAN_VMALLOC */
|
||||
|
||||
#ifdef CONFIG_KASAN_INLINE
|
||||
#ifdef CONFIG_KASAN
|
||||
void kasan_non_canonical_hook(unsigned long addr);
|
||||
#else /* CONFIG_KASAN_INLINE */
|
||||
#else /* CONFIG_KASAN */
|
||||
static inline void kasan_non_canonical_hook(unsigned long addr) { }
|
||||
#endif /* CONFIG_KASAN_INLINE */
|
||||
#endif /* CONFIG_KASAN */
|
||||
|
||||
#endif /* LINUX_KASAN_H */
|
||||
|
@ -33,6 +33,6 @@ enum gtp_attrs {
|
||||
GTPA_PAD,
|
||||
__GTPA_MAX,
|
||||
};
|
||||
#define GTPA_MAX (__GTPA_MAX + 1)
|
||||
#define GTPA_MAX (__GTPA_MAX - 1)
|
||||
|
||||
#endif /* _UAPI_LINUX_GTP_H_ */
|
||||
|
@ -51,7 +51,6 @@ static __cold int io_uring_show_cred(struct seq_file *m, unsigned int id,
|
||||
static __cold void __io_uring_show_fdinfo(struct io_ring_ctx *ctx,
|
||||
struct seq_file *m)
|
||||
{
|
||||
struct io_sq_data *sq = NULL;
|
||||
struct io_overflow_cqe *ocqe;
|
||||
struct io_rings *r = ctx->rings;
|
||||
unsigned int sq_mask = ctx->sq_entries - 1, cq_mask = ctx->cq_entries - 1;
|
||||
@ -62,6 +61,7 @@ static __cold void __io_uring_show_fdinfo(struct io_ring_ctx *ctx,
|
||||
unsigned int cq_shift = 0;
|
||||
unsigned int sq_shift = 0;
|
||||
unsigned int sq_entries, cq_entries;
|
||||
int sq_pid = -1, sq_cpu = -1;
|
||||
bool has_lock;
|
||||
unsigned int i;
|
||||
|
||||
@ -139,13 +139,19 @@ static __cold void __io_uring_show_fdinfo(struct io_ring_ctx *ctx,
|
||||
has_lock = mutex_trylock(&ctx->uring_lock);
|
||||
|
||||
if (has_lock && (ctx->flags & IORING_SETUP_SQPOLL)) {
|
||||
sq = ctx->sq_data;
|
||||
if (!sq->thread)
|
||||
sq = NULL;
|
||||
struct io_sq_data *sq = ctx->sq_data;
|
||||
|
||||
if (mutex_trylock(&sq->lock)) {
|
||||
if (sq->thread) {
|
||||
sq_pid = task_pid_nr(sq->thread);
|
||||
sq_cpu = task_cpu(sq->thread);
|
||||
}
|
||||
mutex_unlock(&sq->lock);
|
||||
}
|
||||
}
|
||||
|
||||
seq_printf(m, "SqThread:\t%d\n", sq ? task_pid_nr(sq->thread) : -1);
|
||||
seq_printf(m, "SqThreadCpu:\t%d\n", sq ? task_cpu(sq->thread) : -1);
|
||||
seq_printf(m, "SqThread:\t%d\n", sq_pid);
|
||||
seq_printf(m, "SqThreadCpu:\t%d\n", sq_cpu);
|
||||
seq_printf(m, "UserFiles:\t%u\n", ctx->nr_user_files);
|
||||
for (i = 0; has_lock && i < ctx->nr_user_files; i++) {
|
||||
struct file *f = io_file_from_index(&ctx->file_table, i);
|
||||
|
@ -989,7 +989,7 @@ EXPORT_SYMBOL_GPL(kprobe_event_cmd_init);
|
||||
* @name: The name of the kprobe event
|
||||
* @loc: The location of the kprobe event
|
||||
* @kretprobe: Is this a return probe?
|
||||
* @args: Variable number of arg (pairs), one pair for each field
|
||||
* @...: Variable number of arg (pairs), one pair for each field
|
||||
*
|
||||
* NOTE: Users normally won't want to call this function directly, but
|
||||
* rather use the kprobe_event_gen_cmd_start() wrapper, which automatically
|
||||
@ -1062,7 +1062,7 @@ EXPORT_SYMBOL_GPL(__kprobe_event_gen_cmd_start);
|
||||
/**
|
||||
* __kprobe_event_add_fields - Add probe fields to a kprobe command from arg list
|
||||
* @cmd: A pointer to the dynevent_cmd struct representing the new event
|
||||
* @args: Variable number of arg (pairs), one pair for each field
|
||||
* @...: Variable number of arg (pairs), one pair for each field
|
||||
*
|
||||
* NOTE: Users normally won't want to call this function directly, but
|
||||
* rather use the kprobe_event_add_fields() wrapper, which
|
||||
|
46
mm/hugetlb.c
46
mm/hugetlb.c
@ -96,6 +96,7 @@ static void hugetlb_vma_lock_alloc(struct vm_area_struct *vma);
|
||||
static void __hugetlb_vma_unlock_write_free(struct vm_area_struct *vma);
|
||||
static void hugetlb_unshare_pmds(struct vm_area_struct *vma,
|
||||
unsigned long start, unsigned long end);
|
||||
static struct resv_map *vma_resv_map(struct vm_area_struct *vma);
|
||||
|
||||
static inline bool subpool_is_free(struct hugepage_subpool *spool)
|
||||
{
|
||||
@ -272,6 +273,10 @@ void hugetlb_vma_lock_read(struct vm_area_struct *vma)
|
||||
struct hugetlb_vma_lock *vma_lock = vma->vm_private_data;
|
||||
|
||||
down_read(&vma_lock->rw_sema);
|
||||
} else if (__vma_private_lock(vma)) {
|
||||
struct resv_map *resv_map = vma_resv_map(vma);
|
||||
|
||||
down_read(&resv_map->rw_sema);
|
||||
}
|
||||
}
|
||||
|
||||
@ -281,6 +286,10 @@ void hugetlb_vma_unlock_read(struct vm_area_struct *vma)
|
||||
struct hugetlb_vma_lock *vma_lock = vma->vm_private_data;
|
||||
|
||||
up_read(&vma_lock->rw_sema);
|
||||
} else if (__vma_private_lock(vma)) {
|
||||
struct resv_map *resv_map = vma_resv_map(vma);
|
||||
|
||||
up_read(&resv_map->rw_sema);
|
||||
}
|
||||
}
|
||||
|
||||
@ -290,6 +299,10 @@ void hugetlb_vma_lock_write(struct vm_area_struct *vma)
|
||||
struct hugetlb_vma_lock *vma_lock = vma->vm_private_data;
|
||||
|
||||
down_write(&vma_lock->rw_sema);
|
||||
} else if (__vma_private_lock(vma)) {
|
||||
struct resv_map *resv_map = vma_resv_map(vma);
|
||||
|
||||
down_write(&resv_map->rw_sema);
|
||||
}
|
||||
}
|
||||
|
||||
@ -299,17 +312,27 @@ void hugetlb_vma_unlock_write(struct vm_area_struct *vma)
|
||||
struct hugetlb_vma_lock *vma_lock = vma->vm_private_data;
|
||||
|
||||
up_write(&vma_lock->rw_sema);
|
||||
} else if (__vma_private_lock(vma)) {
|
||||
struct resv_map *resv_map = vma_resv_map(vma);
|
||||
|
||||
up_write(&resv_map->rw_sema);
|
||||
}
|
||||
}
|
||||
|
||||
int hugetlb_vma_trylock_write(struct vm_area_struct *vma)
|
||||
{
|
||||
|
||||
if (__vma_shareable_lock(vma)) {
|
||||
struct hugetlb_vma_lock *vma_lock = vma->vm_private_data;
|
||||
|
||||
if (!__vma_shareable_lock(vma))
|
||||
return 1;
|
||||
|
||||
return down_write_trylock(&vma_lock->rw_sema);
|
||||
} else if (__vma_private_lock(vma)) {
|
||||
struct resv_map *resv_map = vma_resv_map(vma);
|
||||
|
||||
return down_write_trylock(&resv_map->rw_sema);
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
void hugetlb_vma_assert_locked(struct vm_area_struct *vma)
|
||||
@ -318,6 +341,10 @@ void hugetlb_vma_assert_locked(struct vm_area_struct *vma)
|
||||
struct hugetlb_vma_lock *vma_lock = vma->vm_private_data;
|
||||
|
||||
lockdep_assert_held(&vma_lock->rw_sema);
|
||||
} else if (__vma_private_lock(vma)) {
|
||||
struct resv_map *resv_map = vma_resv_map(vma);
|
||||
|
||||
lockdep_assert_held(&resv_map->rw_sema);
|
||||
}
|
||||
}
|
||||
|
||||
@ -350,6 +377,11 @@ static void __hugetlb_vma_unlock_write_free(struct vm_area_struct *vma)
|
||||
struct hugetlb_vma_lock *vma_lock = vma->vm_private_data;
|
||||
|
||||
__hugetlb_vma_unlock_write_put(vma_lock);
|
||||
} else if (__vma_private_lock(vma)) {
|
||||
struct resv_map *resv_map = vma_resv_map(vma);
|
||||
|
||||
/* no free for anon vmas, but still need to unlock */
|
||||
up_write(&resv_map->rw_sema);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1068,6 +1100,7 @@ struct resv_map *resv_map_alloc(void)
|
||||
kref_init(&resv_map->refs);
|
||||
spin_lock_init(&resv_map->lock);
|
||||
INIT_LIST_HEAD(&resv_map->regions);
|
||||
init_rwsem(&resv_map->rw_sema);
|
||||
|
||||
resv_map->adds_in_progress = 0;
|
||||
/*
|
||||
@ -1138,8 +1171,7 @@ static void set_vma_resv_map(struct vm_area_struct *vma, struct resv_map *map)
|
||||
VM_BUG_ON_VMA(!is_vm_hugetlb_page(vma), vma);
|
||||
VM_BUG_ON_VMA(vma->vm_flags & VM_MAYSHARE, vma);
|
||||
|
||||
set_vma_private_data(vma, (get_vma_private_data(vma) &
|
||||
HPAGE_RESV_MASK) | (unsigned long)map);
|
||||
set_vma_private_data(vma, (unsigned long)map);
|
||||
}
|
||||
|
||||
static void set_vma_resv_flags(struct vm_area_struct *vma, unsigned long flags)
|
||||
@ -6904,8 +6936,10 @@ bool hugetlb_reserve_pages(struct inode *inode,
|
||||
*/
|
||||
if (chg >= 0 && add < 0)
|
||||
region_abort(resv_map, from, to, regions_needed);
|
||||
if (vma && is_vma_resv_set(vma, HPAGE_RESV_OWNER))
|
||||
if (vma && is_vma_resv_set(vma, HPAGE_RESV_OWNER)) {
|
||||
kref_put(&resv_map->refs, resv_map_release);
|
||||
set_vma_resv_map(vma, NULL);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -560,9 +560,8 @@ void kasan_report_async(void)
|
||||
}
|
||||
#endif /* CONFIG_KASAN_HW_TAGS */
|
||||
|
||||
#ifdef CONFIG_KASAN_INLINE
|
||||
/*
|
||||
* With CONFIG_KASAN_INLINE, accesses to bogus pointers (outside the high
|
||||
* With CONFIG_KASAN, accesses to bogus pointers (outside the high
|
||||
* canonical half of the address space) cause out-of-bounds shadow memory reads
|
||||
* before the actual access. For addresses in the low canonical half of the
|
||||
* address space, as well as most non-canonical addresses, that out-of-bounds
|
||||
@ -598,4 +597,3 @@ void kasan_non_canonical_hook(unsigned long addr)
|
||||
pr_alert("KASAN: %s in range [0x%016lx-0x%016lx]\n", bug_type,
|
||||
orig_addr, orig_addr + KASAN_GRANULE_SIZE - 1);
|
||||
}
|
||||
#endif
|
||||
|
10
mm/migrate.c
10
mm/migrate.c
@ -1795,6 +1795,7 @@ static int do_pages_move(struct mm_struct *mm, nodemask_t task_nodes,
|
||||
const int __user *nodes,
|
||||
int __user *status, int flags)
|
||||
{
|
||||
compat_uptr_t __user *compat_pages = (void __user *)pages;
|
||||
int current_node = NUMA_NO_NODE;
|
||||
LIST_HEAD(pagelist);
|
||||
int start, i;
|
||||
@ -1808,8 +1809,17 @@ static int do_pages_move(struct mm_struct *mm, nodemask_t task_nodes,
|
||||
int node;
|
||||
|
||||
err = -EFAULT;
|
||||
if (in_compat_syscall()) {
|
||||
compat_uptr_t cp;
|
||||
|
||||
if (get_user(cp, compat_pages + i))
|
||||
goto out_flush;
|
||||
|
||||
p = compat_ptr(cp);
|
||||
} else {
|
||||
if (get_user(p, pages + i))
|
||||
goto out_flush;
|
||||
}
|
||||
if (get_user(node, nodes + i))
|
||||
goto out_flush;
|
||||
addr = (unsigned long)untagged_addr(p);
|
||||
|
@ -3250,13 +3250,13 @@ int vm_brk_flags(unsigned long addr, unsigned long request, unsigned long flags)
|
||||
if (!len)
|
||||
return 0;
|
||||
|
||||
if (mmap_write_lock_killable(mm))
|
||||
return -EINTR;
|
||||
|
||||
/* Until we need other flags, refuse anything except VM_EXEC. */
|
||||
if ((flags & (~VM_EXEC)) != 0)
|
||||
return -EINVAL;
|
||||
|
||||
if (mmap_write_lock_killable(mm))
|
||||
return -EINTR;
|
||||
|
||||
ret = check_brk_limits(addr, len);
|
||||
if (ret)
|
||||
goto limits_failed;
|
||||
|
@ -9760,6 +9760,7 @@ static void break_down_buddy_pages(struct zone *zone, struct page *page,
|
||||
next_page = page;
|
||||
current_buddy = page + size;
|
||||
}
|
||||
page = next_page;
|
||||
|
||||
if (set_page_guard(zone, current_buddy, high, migratetype))
|
||||
continue;
|
||||
@ -9767,7 +9768,6 @@ static void break_down_buddy_pages(struct zone *zone, struct page *page,
|
||||
if (current_buddy != target) {
|
||||
add_to_free_list(current_buddy, zone, high, migratetype);
|
||||
set_buddy_order(current_buddy, high);
|
||||
page = next_page;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -251,7 +251,8 @@ bool neigh_remove_one(struct neighbour *ndel, struct neigh_table *tbl)
|
||||
|
||||
static int neigh_forced_gc(struct neigh_table *tbl)
|
||||
{
|
||||
int max_clean = atomic_read(&tbl->gc_entries) - tbl->gc_thresh2;
|
||||
int max_clean = atomic_read(&tbl->gc_entries) -
|
||||
READ_ONCE(tbl->gc_thresh2);
|
||||
unsigned long tref = jiffies - 5 * HZ;
|
||||
struct neighbour *n, *tmp;
|
||||
int shrunk = 0;
|
||||
@ -280,7 +281,7 @@ static int neigh_forced_gc(struct neigh_table *tbl)
|
||||
}
|
||||
}
|
||||
|
||||
tbl->last_flush = jiffies;
|
||||
WRITE_ONCE(tbl->last_flush, jiffies);
|
||||
|
||||
write_unlock_bh(&tbl->lock);
|
||||
|
||||
@ -464,17 +465,17 @@ static struct neighbour *neigh_alloc(struct neigh_table *tbl,
|
||||
{
|
||||
struct neighbour *n = NULL;
|
||||
unsigned long now = jiffies;
|
||||
int entries;
|
||||
int entries, gc_thresh3;
|
||||
|
||||
if (exempt_from_gc)
|
||||
goto do_alloc;
|
||||
|
||||
entries = atomic_inc_return(&tbl->gc_entries) - 1;
|
||||
if (entries >= tbl->gc_thresh3 ||
|
||||
(entries >= tbl->gc_thresh2 &&
|
||||
time_after(now, tbl->last_flush + 5 * HZ))) {
|
||||
if (!neigh_forced_gc(tbl) &&
|
||||
entries >= tbl->gc_thresh3) {
|
||||
gc_thresh3 = READ_ONCE(tbl->gc_thresh3);
|
||||
if (entries >= gc_thresh3 ||
|
||||
(entries >= READ_ONCE(tbl->gc_thresh2) &&
|
||||
time_after(now, READ_ONCE(tbl->last_flush) + 5 * HZ))) {
|
||||
if (!neigh_forced_gc(tbl) && entries >= gc_thresh3) {
|
||||
net_info_ratelimited("%s: neighbor table overflow!\n",
|
||||
tbl->id);
|
||||
NEIGH_CACHE_STAT_INC(tbl, table_fulls);
|
||||
@ -955,13 +956,14 @@ static void neigh_periodic_work(struct work_struct *work)
|
||||
|
||||
if (time_after(jiffies, tbl->last_rand + 300 * HZ)) {
|
||||
struct neigh_parms *p;
|
||||
tbl->last_rand = jiffies;
|
||||
|
||||
WRITE_ONCE(tbl->last_rand, jiffies);
|
||||
list_for_each_entry(p, &tbl->parms_list, list)
|
||||
p->reachable_time =
|
||||
neigh_rand_reach_time(NEIGH_VAR(p, BASE_REACHABLE_TIME));
|
||||
}
|
||||
|
||||
if (atomic_read(&tbl->entries) < tbl->gc_thresh1)
|
||||
if (atomic_read(&tbl->entries) < READ_ONCE(tbl->gc_thresh1))
|
||||
goto out;
|
||||
|
||||
for (i = 0 ; i < (1 << nht->hash_shift); i++) {
|
||||
@ -2157,15 +2159,16 @@ static int neightbl_fill_info(struct sk_buff *skb, struct neigh_table *tbl,
|
||||
ndtmsg->ndtm_pad2 = 0;
|
||||
|
||||
if (nla_put_string(skb, NDTA_NAME, tbl->id) ||
|
||||
nla_put_msecs(skb, NDTA_GC_INTERVAL, tbl->gc_interval, NDTA_PAD) ||
|
||||
nla_put_u32(skb, NDTA_THRESH1, tbl->gc_thresh1) ||
|
||||
nla_put_u32(skb, NDTA_THRESH2, tbl->gc_thresh2) ||
|
||||
nla_put_u32(skb, NDTA_THRESH3, tbl->gc_thresh3))
|
||||
nla_put_msecs(skb, NDTA_GC_INTERVAL, READ_ONCE(tbl->gc_interval),
|
||||
NDTA_PAD) ||
|
||||
nla_put_u32(skb, NDTA_THRESH1, READ_ONCE(tbl->gc_thresh1)) ||
|
||||
nla_put_u32(skb, NDTA_THRESH2, READ_ONCE(tbl->gc_thresh2)) ||
|
||||
nla_put_u32(skb, NDTA_THRESH3, READ_ONCE(tbl->gc_thresh3)))
|
||||
goto nla_put_failure;
|
||||
{
|
||||
unsigned long now = jiffies;
|
||||
long flush_delta = now - tbl->last_flush;
|
||||
long rand_delta = now - tbl->last_rand;
|
||||
long flush_delta = now - READ_ONCE(tbl->last_flush);
|
||||
long rand_delta = now - READ_ONCE(tbl->last_rand);
|
||||
struct neigh_hash_table *nht;
|
||||
struct ndt_config ndc = {
|
||||
.ndtc_key_len = tbl->key_len,
|
||||
@ -2173,7 +2176,7 @@ static int neightbl_fill_info(struct sk_buff *skb, struct neigh_table *tbl,
|
||||
.ndtc_entries = atomic_read(&tbl->entries),
|
||||
.ndtc_last_flush = jiffies_to_msecs(flush_delta),
|
||||
.ndtc_last_rand = jiffies_to_msecs(rand_delta),
|
||||
.ndtc_proxy_qlen = tbl->proxy_queue.qlen,
|
||||
.ndtc_proxy_qlen = READ_ONCE(tbl->proxy_queue.qlen),
|
||||
};
|
||||
|
||||
rcu_read_lock();
|
||||
@ -2196,17 +2199,17 @@ static int neightbl_fill_info(struct sk_buff *skb, struct neigh_table *tbl,
|
||||
struct neigh_statistics *st;
|
||||
|
||||
st = per_cpu_ptr(tbl->stats, cpu);
|
||||
ndst.ndts_allocs += st->allocs;
|
||||
ndst.ndts_destroys += st->destroys;
|
||||
ndst.ndts_hash_grows += st->hash_grows;
|
||||
ndst.ndts_res_failed += st->res_failed;
|
||||
ndst.ndts_lookups += st->lookups;
|
||||
ndst.ndts_hits += st->hits;
|
||||
ndst.ndts_rcv_probes_mcast += st->rcv_probes_mcast;
|
||||
ndst.ndts_rcv_probes_ucast += st->rcv_probes_ucast;
|
||||
ndst.ndts_periodic_gc_runs += st->periodic_gc_runs;
|
||||
ndst.ndts_forced_gc_runs += st->forced_gc_runs;
|
||||
ndst.ndts_table_fulls += st->table_fulls;
|
||||
ndst.ndts_allocs += READ_ONCE(st->allocs);
|
||||
ndst.ndts_destroys += READ_ONCE(st->destroys);
|
||||
ndst.ndts_hash_grows += READ_ONCE(st->hash_grows);
|
||||
ndst.ndts_res_failed += READ_ONCE(st->res_failed);
|
||||
ndst.ndts_lookups += READ_ONCE(st->lookups);
|
||||
ndst.ndts_hits += READ_ONCE(st->hits);
|
||||
ndst.ndts_rcv_probes_mcast += READ_ONCE(st->rcv_probes_mcast);
|
||||
ndst.ndts_rcv_probes_ucast += READ_ONCE(st->rcv_probes_ucast);
|
||||
ndst.ndts_periodic_gc_runs += READ_ONCE(st->periodic_gc_runs);
|
||||
ndst.ndts_forced_gc_runs += READ_ONCE(st->forced_gc_runs);
|
||||
ndst.ndts_table_fulls += READ_ONCE(st->table_fulls);
|
||||
}
|
||||
|
||||
if (nla_put_64bit(skb, NDTA_STATS, sizeof(ndst), &ndst,
|
||||
@ -2435,16 +2438,16 @@ static int neightbl_set(struct sk_buff *skb, struct nlmsghdr *nlh,
|
||||
goto errout_tbl_lock;
|
||||
|
||||
if (tb[NDTA_THRESH1])
|
||||
tbl->gc_thresh1 = nla_get_u32(tb[NDTA_THRESH1]);
|
||||
WRITE_ONCE(tbl->gc_thresh1, nla_get_u32(tb[NDTA_THRESH1]));
|
||||
|
||||
if (tb[NDTA_THRESH2])
|
||||
tbl->gc_thresh2 = nla_get_u32(tb[NDTA_THRESH2]);
|
||||
WRITE_ONCE(tbl->gc_thresh2, nla_get_u32(tb[NDTA_THRESH2]));
|
||||
|
||||
if (tb[NDTA_THRESH3])
|
||||
tbl->gc_thresh3 = nla_get_u32(tb[NDTA_THRESH3]);
|
||||
WRITE_ONCE(tbl->gc_thresh3, nla_get_u32(tb[NDTA_THRESH3]));
|
||||
|
||||
if (tb[NDTA_GC_INTERVAL])
|
||||
tbl->gc_interval = nla_get_msecs(tb[NDTA_GC_INTERVAL]);
|
||||
WRITE_ONCE(tbl->gc_interval, nla_get_msecs(tb[NDTA_GC_INTERVAL]));
|
||||
|
||||
err = 0;
|
||||
|
||||
|
@ -2202,16 +2202,17 @@ void tcp_enter_loss(struct sock *sk)
|
||||
* restore sanity to the SACK scoreboard. If the apparent reneging
|
||||
* persists until this RTO then we'll clear the SACK scoreboard.
|
||||
*/
|
||||
static bool tcp_check_sack_reneging(struct sock *sk, int flag)
|
||||
static bool tcp_check_sack_reneging(struct sock *sk, int *ack_flag)
|
||||
{
|
||||
if (flag & FLAG_SACK_RENEGING &&
|
||||
flag & FLAG_SND_UNA_ADVANCED) {
|
||||
if (*ack_flag & FLAG_SACK_RENEGING &&
|
||||
*ack_flag & FLAG_SND_UNA_ADVANCED) {
|
||||
struct tcp_sock *tp = tcp_sk(sk);
|
||||
unsigned long delay = max(usecs_to_jiffies(tp->srtt_us >> 4),
|
||||
msecs_to_jiffies(10));
|
||||
|
||||
inet_csk_reset_xmit_timer(sk, ICSK_TIME_RETRANS,
|
||||
delay, TCP_RTO_MAX);
|
||||
*ack_flag &= ~FLAG_SET_XMIT_TIMER;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@ -2981,7 +2982,7 @@ static void tcp_fastretrans_alert(struct sock *sk, const u32 prior_snd_una,
|
||||
tp->prior_ssthresh = 0;
|
||||
|
||||
/* B. In all the states check for reneging SACKs. */
|
||||
if (tcp_check_sack_reneging(sk, flag))
|
||||
if (tcp_check_sack_reneging(sk, ack_flag))
|
||||
return;
|
||||
|
||||
/* C. Check consistency of the current state. */
|
||||
|
@ -590,6 +590,11 @@ static int virtio_vsock_vqs_init(struct virtio_vsock *vsock)
|
||||
|
||||
virtio_device_ready(vdev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void virtio_vsock_vqs_start(struct virtio_vsock *vsock)
|
||||
{
|
||||
mutex_lock(&vsock->tx_lock);
|
||||
vsock->tx_run = true;
|
||||
mutex_unlock(&vsock->tx_lock);
|
||||
@ -604,7 +609,16 @@ static int virtio_vsock_vqs_init(struct virtio_vsock *vsock)
|
||||
vsock->event_run = true;
|
||||
mutex_unlock(&vsock->event_lock);
|
||||
|
||||
return 0;
|
||||
/* virtio_transport_send_pkt() can queue packets once
|
||||
* the_virtio_vsock is set, but they won't be processed until
|
||||
* vsock->tx_run is set to true. We queue vsock->send_pkt_work
|
||||
* when initialization finishes to send those packets queued
|
||||
* earlier.
|
||||
* We don't need to queue the other workers (rx, event) because
|
||||
* as long as we don't fill the queues with empty buffers, the
|
||||
* host can't send us any notification.
|
||||
*/
|
||||
queue_work(virtio_vsock_workqueue, &vsock->send_pkt_work);
|
||||
}
|
||||
|
||||
static void virtio_vsock_vqs_del(struct virtio_vsock *vsock)
|
||||
@ -707,6 +721,7 @@ static int virtio_vsock_probe(struct virtio_device *vdev)
|
||||
goto out;
|
||||
|
||||
rcu_assign_pointer(the_virtio_vsock, vsock);
|
||||
virtio_vsock_vqs_start(vsock);
|
||||
|
||||
mutex_unlock(&the_virtio_vsock_mutex);
|
||||
|
||||
@ -779,6 +794,7 @@ static int virtio_vsock_restore(struct virtio_device *vdev)
|
||||
goto out;
|
||||
|
||||
rcu_assign_pointer(the_virtio_vsock, vsock);
|
||||
virtio_vsock_vqs_start(vsock);
|
||||
|
||||
out:
|
||||
mutex_unlock(&the_virtio_vsock_mutex);
|
||||
|
@ -3302,18 +3302,15 @@ static int wcd938x_populate_dt_data(struct wcd938x_priv *wcd938x, struct device
|
||||
int ret;
|
||||
|
||||
wcd938x->reset_gpio = of_get_named_gpio(dev->of_node, "reset-gpios", 0);
|
||||
if (wcd938x->reset_gpio < 0) {
|
||||
dev_err(dev, "Failed to get reset gpio: err = %d\n",
|
||||
wcd938x->reset_gpio);
|
||||
return wcd938x->reset_gpio;
|
||||
}
|
||||
if (wcd938x->reset_gpio < 0)
|
||||
return dev_err_probe(dev, wcd938x->reset_gpio,
|
||||
"Failed to get reset gpio\n");
|
||||
|
||||
wcd938x->us_euro_gpio = devm_gpiod_get_optional(dev, "us-euro",
|
||||
GPIOD_OUT_LOW);
|
||||
if (IS_ERR(wcd938x->us_euro_gpio)) {
|
||||
dev_err(dev, "us-euro swap Control GPIO not found\n");
|
||||
return PTR_ERR(wcd938x->us_euro_gpio);
|
||||
}
|
||||
if (IS_ERR(wcd938x->us_euro_gpio))
|
||||
return dev_err_probe(dev, PTR_ERR(wcd938x->us_euro_gpio),
|
||||
"us-euro swap Control GPIO not found\n");
|
||||
|
||||
cfg->swap_gnd_mic = wcd938x_swap_gnd_mic;
|
||||
|
||||
@ -3323,15 +3320,13 @@ static int wcd938x_populate_dt_data(struct wcd938x_priv *wcd938x, struct device
|
||||
wcd938x->supplies[3].supply = "vdd-mic-bias";
|
||||
|
||||
ret = regulator_bulk_get(dev, WCD938X_MAX_SUPPLY, wcd938x->supplies);
|
||||
if (ret) {
|
||||
dev_err(dev, "Failed to get supplies: err = %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
if (ret)
|
||||
return dev_err_probe(dev, ret, "Failed to get supplies\n");
|
||||
|
||||
ret = regulator_bulk_enable(WCD938X_MAX_SUPPLY, wcd938x->supplies);
|
||||
if (ret) {
|
||||
dev_err(dev, "Failed to enable supplies: err = %d\n", ret);
|
||||
return ret;
|
||||
regulator_bulk_free(WCD938X_MAX_SUPPLY, wcd938x->supplies);
|
||||
return dev_err_probe(dev, ret, "Failed to enable supplies\n");
|
||||
}
|
||||
|
||||
wcd938x_dt_parse_micbias_info(dev, wcd938x);
|
||||
@ -3598,13 +3593,13 @@ static int wcd938x_probe(struct platform_device *pdev)
|
||||
|
||||
ret = wcd938x_add_slave_components(wcd938x, dev, &match);
|
||||
if (ret)
|
||||
return ret;
|
||||
goto err_disable_regulators;
|
||||
|
||||
wcd938x_reset(wcd938x);
|
||||
|
||||
ret = component_master_add_with_match(dev, &wcd938x_comp_ops, match);
|
||||
if (ret)
|
||||
return ret;
|
||||
goto err_disable_regulators;
|
||||
|
||||
pm_runtime_set_autosuspend_delay(dev, 1000);
|
||||
pm_runtime_use_autosuspend(dev);
|
||||
@ -3614,13 +3609,27 @@ static int wcd938x_probe(struct platform_device *pdev)
|
||||
pm_runtime_idle(dev);
|
||||
|
||||
return 0;
|
||||
|
||||
err_disable_regulators:
|
||||
regulator_bulk_disable(WCD938X_MAX_SUPPLY, wcd938x->supplies);
|
||||
regulator_bulk_free(WCD938X_MAX_SUPPLY, wcd938x->supplies);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int wcd938x_remove(struct platform_device *pdev)
|
||||
static void wcd938x_remove(struct platform_device *pdev)
|
||||
{
|
||||
component_master_del(&pdev->dev, &wcd938x_comp_ops);
|
||||
struct device *dev = &pdev->dev;
|
||||
struct wcd938x_priv *wcd938x = dev_get_drvdata(dev);
|
||||
|
||||
return 0;
|
||||
component_master_del(dev, &wcd938x_comp_ops);
|
||||
|
||||
pm_runtime_disable(dev);
|
||||
pm_runtime_set_suspended(dev);
|
||||
pm_runtime_dont_use_autosuspend(dev);
|
||||
|
||||
regulator_bulk_disable(WCD938X_MAX_SUPPLY, wcd938x->supplies);
|
||||
regulator_bulk_free(WCD938X_MAX_SUPPLY, wcd938x->supplies);
|
||||
}
|
||||
|
||||
#if defined(CONFIG_OF)
|
||||
@ -3634,7 +3643,7 @@ MODULE_DEVICE_TABLE(of, wcd938x_dt_match);
|
||||
|
||||
static struct platform_driver wcd938x_codec_driver = {
|
||||
.probe = wcd938x_probe,
|
||||
.remove = wcd938x_remove,
|
||||
.remove_new = wcd938x_remove,
|
||||
.driver = {
|
||||
.name = "wcd938x_codec",
|
||||
.of_match_table = of_match_ptr(wcd938x_dt_match),
|
||||
|
@ -2478,7 +2478,7 @@ static bool is_special_call(struct instruction *insn)
|
||||
if (!dest)
|
||||
return false;
|
||||
|
||||
if (dest->fentry)
|
||||
if (dest->fentry || dest->embedded_insn)
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user