Merge 9ba18e400d ("bus: mhi: host: Fix conflict between power_up and SYSERR") into android12-5.10-lts
Steps on the way to 5.10.239 Resolves merge conflicts in: fs/nfsd/nfssvc.c Change-Id: I6ec7fe81e413b70f489b1ffc928de97aee99d433 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
7
Makefile
7
Makefile
@@ -602,8 +602,7 @@ else
|
||||
CLANG_FLAGS += -fno-integrated-as
|
||||
endif
|
||||
CLANG_FLAGS += -Werror=unknown-warning-option
|
||||
KBUILD_CFLAGS += $(CLANG_FLAGS)
|
||||
KBUILD_AFLAGS += $(CLANG_FLAGS)
|
||||
KBUILD_CPPFLAGS += $(CLANG_FLAGS)
|
||||
export CLANG_FLAGS
|
||||
endif
|
||||
|
||||
@@ -1099,8 +1098,8 @@ LDFLAGS_vmlinux += --orphan-handling=warn
|
||||
endif
|
||||
|
||||
# Align the bit size of userspace programs with the kernel
|
||||
KBUILD_USERCFLAGS += $(filter -m32 -m64 --target=%, $(KBUILD_CFLAGS))
|
||||
KBUILD_USERLDFLAGS += $(filter -m32 -m64 --target=%, $(KBUILD_CFLAGS))
|
||||
KBUILD_USERCFLAGS += $(filter -m32 -m64 --target=%, $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS))
|
||||
KBUILD_USERLDFLAGS += $(filter -m32 -m64 --target=%, $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS))
|
||||
|
||||
# userspace programs are linked via the compiler, use the correct linker
|
||||
ifeq ($(CONFIG_CC_IS_CLANG)$(CONFIG_LD_IS_LLD),yy)
|
||||
|
||||
@@ -264,7 +264,11 @@ int __init omap4_cpcap_init(void)
|
||||
|
||||
static int __init cpcap_late_init(void)
|
||||
{
|
||||
omap4_vc_set_pmic_signaling(PWRDM_POWER_RET);
|
||||
if (!of_find_compatible_node(NULL, NULL, "motorola,cpcap"))
|
||||
return 0;
|
||||
|
||||
if (soc_is_omap443x() || soc_is_omap446x() || soc_is_omap447x())
|
||||
omap4_vc_set_pmic_signaling(PWRDM_POWER_RET);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -483,7 +483,5 @@ void __init early_ioremap_init(void)
|
||||
bool arch_memremap_can_ram_remap(resource_size_t offset, size_t size,
|
||||
unsigned long flags)
|
||||
{
|
||||
unsigned long pfn = PHYS_PFN(offset);
|
||||
|
||||
return memblock_is_map_memory(pfn);
|
||||
return memblock_is_map_memory(offset);
|
||||
}
|
||||
|
||||
@@ -84,7 +84,26 @@ HYPERCALL1(tmem_op);
|
||||
HYPERCALL1(platform_op_raw);
|
||||
HYPERCALL2(multicall);
|
||||
HYPERCALL2(vm_assist);
|
||||
HYPERCALL3(dm_op);
|
||||
|
||||
SYM_FUNC_START(HYPERVISOR_dm_op)
|
||||
mov x16, #__HYPERVISOR_dm_op; \
|
||||
/*
|
||||
* dm_op hypercalls are issued by the userspace. The kernel needs to
|
||||
* enable access to TTBR0_EL1 as the hypervisor would issue stage 1
|
||||
* translations to user memory via AT instructions. Since AT
|
||||
* instructions are not affected by the PAN bit (ARMv8.1), we only
|
||||
* need the explicit uaccess_enable/disable if the TTBR0 PAN emulation
|
||||
* is enabled (it implies that hardware UAO and PAN disabled).
|
||||
*/
|
||||
uaccess_ttbr0_enable x6, x7, x8
|
||||
hvc XEN_IMM
|
||||
|
||||
/*
|
||||
* Disable userspace access from kernel once the hyp call completed.
|
||||
*/
|
||||
uaccess_ttbr0_disable x6, x7
|
||||
ret
|
||||
SYM_FUNC_END(HYPERVISOR_dm_op);
|
||||
|
||||
SYM_FUNC_START(privcmd_call)
|
||||
mov x16, x0
|
||||
|
||||
@@ -110,7 +110,7 @@ endif
|
||||
# (specifically newer than 2.24.51.20140728) we then also need to explicitly
|
||||
# set ".set hardfloat" in all files which manipulate floating point registers.
|
||||
#
|
||||
ifneq ($(call as-option,-Wa$(comma)-msoft-float,),)
|
||||
ifneq ($(call cc-option,$(cflags-y) -Wa$(comma)-msoft-float,),)
|
||||
cflags-y += -DGAS_HAS_SET_HARDFLOAT -Wa,-msoft-float
|
||||
endif
|
||||
|
||||
@@ -153,7 +153,7 @@ cflags-y += -fno-stack-check
|
||||
#
|
||||
# Avoid this by explicitly disabling that assembler behaviour.
|
||||
#
|
||||
cflags-y += $(call as-option,-Wa$(comma)-mno-fix-loongson3-llsc,)
|
||||
cflags-y += $(call cc-option,-Wa$(comma)-mno-fix-loongson3-llsc,)
|
||||
|
||||
#
|
||||
# CPU-dependent compiler/assembler options for optimization.
|
||||
@@ -319,7 +319,7 @@ KBUILD_CFLAGS += -fno-asynchronous-unwind-tables
|
||||
KBUILD_LDFLAGS += -m $(ld-emul)
|
||||
|
||||
ifdef CONFIG_MIPS
|
||||
CHECKFLAGS += $(shell $(CC) $(KBUILD_CFLAGS) -dM -E -x c /dev/null | \
|
||||
CHECKFLAGS += $(shell $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) -dM -E -x c /dev/null | \
|
||||
egrep -vw '__GNUC_(MINOR_|PATCHLEVEL_)?_' | \
|
||||
sed -e "s/^\#define /-D'/" -e "s/ /'='/" -e "s/$$/'/" -e 's/\$$/&&/g')
|
||||
endif
|
||||
|
||||
@@ -28,7 +28,7 @@ cflags-$(CONFIG_CPU_LOONGSON2F) += \
|
||||
# binutils does not merge support for the flag then we can revisit & remove
|
||||
# this later - for now it ensures vendor toolchains don't cause problems.
|
||||
#
|
||||
cflags-$(CONFIG_CPU_LOONGSON2EF) += $(call as-option,-Wa$(comma)-mno-fix-loongson3-llsc,)
|
||||
cflags-$(CONFIG_CPU_LOONGSON2EF) += $(call cc-option,-Wa$(comma)-mno-fix-loongson3-llsc,)
|
||||
|
||||
# Enable the workarounds for Loongson2f
|
||||
ifdef CONFIG_CPU_LOONGSON2F_WORKAROUNDS
|
||||
|
||||
@@ -162,6 +162,9 @@ int vas_copy_crb(void *crb, int offset);
|
||||
*/
|
||||
int vas_paste_crb(struct vas_window *win, int offset, bool re);
|
||||
|
||||
void vas_win_paste_addr(struct vas_window *window, u64 *addr,
|
||||
int *len);
|
||||
|
||||
/*
|
||||
* Register / unregister coprocessor type to VAS API which will be exported
|
||||
* to user space. Applications can use this API to open / close window
|
||||
|
||||
@@ -20,6 +20,7 @@ source "arch/powerpc/platforms/embedded6xx/Kconfig"
|
||||
source "arch/powerpc/platforms/44x/Kconfig"
|
||||
source "arch/powerpc/platforms/40x/Kconfig"
|
||||
source "arch/powerpc/platforms/amigaone/Kconfig"
|
||||
source "arch/powerpc/platforms/book3s/Kconfig"
|
||||
|
||||
config KVM_GUEST
|
||||
bool "KVM Guest support"
|
||||
|
||||
@@ -22,3 +22,4 @@ obj-$(CONFIG_PPC_CELL) += cell/
|
||||
obj-$(CONFIG_PPC_PS3) += ps3/
|
||||
obj-$(CONFIG_EMBEDDED6xx) += embedded6xx/
|
||||
obj-$(CONFIG_AMIGAONE) += amigaone/
|
||||
obj-$(CONFIG_PPC_BOOK3S) += book3s/
|
||||
|
||||
15
arch/powerpc/platforms/book3s/Kconfig
Normal file
15
arch/powerpc/platforms/book3s/Kconfig
Normal file
@@ -0,0 +1,15 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
config PPC_VAS
|
||||
bool "IBM Virtual Accelerator Switchboard (VAS)"
|
||||
depends on (PPC_POWERNV || PPC_PSERIES) && PPC_64K_PAGES
|
||||
default y
|
||||
help
|
||||
This enables support for IBM Virtual Accelerator Switchboard (VAS).
|
||||
|
||||
VAS devices are found in POWER9-based and later systems, they
|
||||
provide access to accelerator coprocessors such as NX-GZIP and
|
||||
NX-842. This config allows the kernel to use NX-842 accelerators,
|
||||
and user-mode APIs for the NX-GZIP accelerator on POWER9 PowerNV
|
||||
and POWER10 PowerVM platforms.
|
||||
|
||||
If unsure, say "N".
|
||||
2
arch/powerpc/platforms/book3s/Makefile
Normal file
2
arch/powerpc/platforms/book3s/Makefile
Normal file
@@ -0,0 +1,2 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
obj-$(CONFIG_PPC_VAS) += vas-api.o
|
||||
@@ -10,9 +10,9 @@
|
||||
#include <linux/fs.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/uaccess.h>
|
||||
#include <linux/io.h>
|
||||
#include <asm/vas.h>
|
||||
#include <uapi/asm/vas-api.h>
|
||||
#include "vas.h"
|
||||
|
||||
/*
|
||||
* The driver creates the device node that can be used as follows:
|
||||
@@ -162,6 +162,15 @@ static int coproc_mmap(struct file *fp, struct vm_area_struct *vma)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/*
|
||||
* Map complete page to the paste address. So the user
|
||||
* space should pass 0ULL to the offset parameter.
|
||||
*/
|
||||
if (vma->vm_pgoff) {
|
||||
pr_debug("Page offset unsupported to map paste address\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* Ensure instance has an open send window */
|
||||
if (!txwin) {
|
||||
pr_err("%s(): No send window open?\n", __func__);
|
||||
@@ -33,20 +33,6 @@ config PPC_MEMTRACE
|
||||
Enabling this option allows for the removal of memory (RAM)
|
||||
from the kernel mappings to be used for hardware tracing.
|
||||
|
||||
config PPC_VAS
|
||||
bool "IBM Virtual Accelerator Switchboard (VAS)"
|
||||
depends on PPC_POWERNV && PPC_64K_PAGES
|
||||
default y
|
||||
help
|
||||
This enables support for IBM Virtual Accelerator Switchboard (VAS).
|
||||
|
||||
VAS allows accelerators in co-processors like NX-GZIP and NX-842
|
||||
to be accessible to kernel subsystems and user processes.
|
||||
|
||||
VAS adapters are found in POWER9 based systems.
|
||||
|
||||
If unsure, say N.
|
||||
|
||||
config SCOM_DEBUGFS
|
||||
bool "Expose SCOM controllers via debugfs"
|
||||
depends on DEBUG_FS
|
||||
|
||||
@@ -18,7 +18,7 @@ obj-$(CONFIG_MEMORY_FAILURE) += opal-memory-errors.o
|
||||
obj-$(CONFIG_OPAL_PRD) += opal-prd.o
|
||||
obj-$(CONFIG_PERF_EVENTS) += opal-imc.o
|
||||
obj-$(CONFIG_PPC_MEMTRACE) += memtrace.o
|
||||
obj-$(CONFIG_PPC_VAS) += vas.o vas-window.o vas-debug.o vas-fault.o vas-api.o
|
||||
obj-$(CONFIG_PPC_VAS) += vas.o vas-window.o vas-debug.o vas-fault.o
|
||||
obj-$(CONFIG_OCXL_BASE) += ocxl.o
|
||||
obj-$(CONFIG_SCOM_DEBUGFS) += opal-xscom.o
|
||||
obj-$(CONFIG_PPC_SECURE_BOOT) += opal-secvar.o
|
||||
|
||||
@@ -437,8 +437,6 @@ extern irqreturn_t vas_fault_handler(int irq, void *dev_id);
|
||||
extern void vas_return_credit(struct vas_window *window, bool tx);
|
||||
extern struct vas_window *vas_pswid_to_window(struct vas_instance *vinst,
|
||||
uint32_t pswid);
|
||||
extern void vas_win_paste_addr(struct vas_window *window, u64 *addr,
|
||||
int *len);
|
||||
|
||||
static inline int vas_window_pid(struct vas_window *window)
|
||||
{
|
||||
|
||||
@@ -49,7 +49,7 @@ KBUILD_CFLAGS += $(call cc-option,-fmacro-prefix-map=$(srctree)/=)
|
||||
KBUILD_CFLAGS += -fno-asynchronous-unwind-tables
|
||||
KBUILD_CFLAGS += -D__DISABLE_EXPORTS
|
||||
# Disable relocation relaxation in case the link is not PIE.
|
||||
KBUILD_CFLAGS += $(call as-option,-Wa$(comma)-mrelax-relocations=no)
|
||||
KBUILD_CFLAGS += $(call cc-option,-Wa$(comma)-mrelax-relocations=no)
|
||||
KBUILD_CFLAGS += -include $(srctree)/include/linux/hidden.h
|
||||
|
||||
# sev-es.c indirectly inludes inat-table.h which is generated during
|
||||
|
||||
@@ -33,8 +33,9 @@ void io_bitmap_share(struct task_struct *tsk)
|
||||
set_tsk_thread_flag(tsk, TIF_IO_BITMAP);
|
||||
}
|
||||
|
||||
static void task_update_io_bitmap(struct task_struct *tsk)
|
||||
static void task_update_io_bitmap(void)
|
||||
{
|
||||
struct task_struct *tsk = current;
|
||||
struct thread_struct *t = &tsk->thread;
|
||||
|
||||
if (t->iopl_emul == 3 || t->io_bitmap) {
|
||||
@@ -54,7 +55,12 @@ void io_bitmap_exit(struct task_struct *tsk)
|
||||
struct io_bitmap *iobm = tsk->thread.io_bitmap;
|
||||
|
||||
tsk->thread.io_bitmap = NULL;
|
||||
task_update_io_bitmap(tsk);
|
||||
/*
|
||||
* Don't touch the TSS when invoked on a failed fork(). TSS
|
||||
* reflects the state of @current and not the state of @tsk.
|
||||
*/
|
||||
if (tsk == current)
|
||||
task_update_io_bitmap();
|
||||
if (iobm && refcount_dec_and_test(&iobm->refcnt))
|
||||
kfree(iobm);
|
||||
}
|
||||
@@ -192,8 +198,7 @@ SYSCALL_DEFINE1(iopl, unsigned int, level)
|
||||
}
|
||||
|
||||
t->iopl_emul = level;
|
||||
task_update_io_bitmap(current);
|
||||
|
||||
task_update_io_bitmap();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -143,6 +143,7 @@ int copy_thread(unsigned long clone_flags, unsigned long sp, unsigned long arg,
|
||||
frame->ret_addr = (unsigned long) ret_from_fork;
|
||||
p->thread.sp = (unsigned long) fork_frame;
|
||||
p->thread.io_bitmap = NULL;
|
||||
clear_tsk_thread_flag(p, TIF_IO_BITMAP);
|
||||
p->thread.iopl_warn = 0;
|
||||
memset(p->thread.ptrace_bps, 0, sizeof(p->thread.ptrace_bps));
|
||||
|
||||
@@ -401,6 +402,11 @@ void native_tss_update_io_bitmap(void)
|
||||
} else {
|
||||
struct io_bitmap *iobm = t->io_bitmap;
|
||||
|
||||
if (WARN_ON_ONCE(!iobm)) {
|
||||
clear_thread_flag(TIF_IO_BITMAP);
|
||||
native_tss_invalidate_io_bitmap();
|
||||
}
|
||||
|
||||
/*
|
||||
* Only copy bitmap data when the sequence number differs. The
|
||||
* update time is accounted to the incoming task.
|
||||
|
||||
@@ -454,6 +454,7 @@ static void mhi_pm_disable_transition(struct mhi_controller *mhi_cntrl,
|
||||
struct mhi_cmd *mhi_cmd;
|
||||
struct mhi_event_ctxt *er_ctxt;
|
||||
struct device *dev = &mhi_cntrl->mhi_dev->dev;
|
||||
bool reset_device = false;
|
||||
int ret, i;
|
||||
|
||||
dev_dbg(dev, "Transitioning from PM state: %s to: %s\n",
|
||||
@@ -485,8 +486,23 @@ static void mhi_pm_disable_transition(struct mhi_controller *mhi_cntrl,
|
||||
return;
|
||||
}
|
||||
|
||||
/* Trigger MHI RESET so that the device will not access host memory */
|
||||
if (MHI_REG_ACCESS_VALID(prev_state)) {
|
||||
/*
|
||||
* If the device is in PBL or SBL, it will only respond to
|
||||
* RESET if the device is in SYSERR state. SYSERR might
|
||||
* already be cleared at this point.
|
||||
*/
|
||||
enum mhi_state cur_state = mhi_get_mhi_state(mhi_cntrl);
|
||||
enum mhi_ee_type cur_ee = mhi_get_exec_env(mhi_cntrl);
|
||||
|
||||
if (cur_state == MHI_STATE_SYS_ERR)
|
||||
reset_device = true;
|
||||
else if (cur_ee != MHI_EE_PBL && cur_ee != MHI_EE_SBL)
|
||||
reset_device = true;
|
||||
}
|
||||
|
||||
/* Trigger MHI RESET so that the device will not access host memory */
|
||||
if (reset_device) {
|
||||
u32 in_reset = -1;
|
||||
unsigned long timeout = msecs_to_jiffies(mhi_cntrl->timeout_ms);
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@ static int mv_cesa_std_process(struct mv_cesa_engine *engine, u32 status)
|
||||
|
||||
static int mv_cesa_int_process(struct mv_cesa_engine *engine, u32 status)
|
||||
{
|
||||
if (engine->chain.first && engine->chain.last)
|
||||
if (engine->chain_hw.first && engine->chain_hw.last)
|
||||
return mv_cesa_tdma_process(engine, status);
|
||||
|
||||
return mv_cesa_std_process(engine, status);
|
||||
|
||||
@@ -439,8 +439,10 @@ struct mv_cesa_dev {
|
||||
* SRAM
|
||||
* @queue: fifo of the pending crypto requests
|
||||
* @load: engine load counter, useful for load balancing
|
||||
* @chain: list of the current tdma descriptors being processed
|
||||
* by this engine.
|
||||
* @chain_hw: list of the current tdma descriptors being processed
|
||||
* by the hardware.
|
||||
* @chain_sw: list of the current tdma descriptors that will be
|
||||
* submitted to the hardware.
|
||||
* @complete_queue: fifo of the processed requests by the engine
|
||||
*
|
||||
* Structure storing CESA engine information.
|
||||
@@ -459,7 +461,8 @@ struct mv_cesa_engine {
|
||||
struct gen_pool *pool;
|
||||
struct crypto_queue queue;
|
||||
atomic_t load;
|
||||
struct mv_cesa_tdma_chain chain;
|
||||
struct mv_cesa_tdma_chain chain_hw;
|
||||
struct mv_cesa_tdma_chain chain_sw;
|
||||
struct list_head complete_queue;
|
||||
int irq;
|
||||
};
|
||||
|
||||
@@ -38,6 +38,15 @@ void mv_cesa_dma_step(struct mv_cesa_req *dreq)
|
||||
{
|
||||
struct mv_cesa_engine *engine = dreq->engine;
|
||||
|
||||
spin_lock_bh(&engine->lock);
|
||||
if (engine->chain_sw.first == dreq->chain.first) {
|
||||
engine->chain_sw.first = NULL;
|
||||
engine->chain_sw.last = NULL;
|
||||
}
|
||||
engine->chain_hw.first = dreq->chain.first;
|
||||
engine->chain_hw.last = dreq->chain.last;
|
||||
spin_unlock_bh(&engine->lock);
|
||||
|
||||
writel_relaxed(0, engine->regs + CESA_SA_CFG);
|
||||
|
||||
mv_cesa_set_int_mask(engine, CESA_SA_INT_ACC0_IDMA_DONE);
|
||||
@@ -96,25 +105,27 @@ void mv_cesa_dma_prepare(struct mv_cesa_req *dreq,
|
||||
void mv_cesa_tdma_chain(struct mv_cesa_engine *engine,
|
||||
struct mv_cesa_req *dreq)
|
||||
{
|
||||
if (engine->chain.first == NULL && engine->chain.last == NULL) {
|
||||
engine->chain.first = dreq->chain.first;
|
||||
engine->chain.last = dreq->chain.last;
|
||||
} else {
|
||||
struct mv_cesa_tdma_desc *last;
|
||||
struct mv_cesa_tdma_desc *last = engine->chain_sw.last;
|
||||
|
||||
last = engine->chain.last;
|
||||
/*
|
||||
* Break the DMA chain if the request being queued needs the IV
|
||||
* regs to be set before lauching the request.
|
||||
*/
|
||||
if (!last || dreq->chain.first->flags & CESA_TDMA_SET_STATE)
|
||||
engine->chain_sw.first = dreq->chain.first;
|
||||
else {
|
||||
last->next = dreq->chain.first;
|
||||
engine->chain.last = dreq->chain.last;
|
||||
|
||||
/*
|
||||
* Break the DMA chain if the CESA_TDMA_BREAK_CHAIN is set on
|
||||
* the last element of the current chain, or if the request
|
||||
* being queued needs the IV regs to be set before lauching
|
||||
* the request.
|
||||
*/
|
||||
if (!(last->flags & CESA_TDMA_BREAK_CHAIN) &&
|
||||
!(dreq->chain.first->flags & CESA_TDMA_SET_STATE))
|
||||
last->next_dma = cpu_to_le32(dreq->chain.first->cur_dma);
|
||||
last->next_dma = cpu_to_le32(dreq->chain.first->cur_dma);
|
||||
}
|
||||
last = dreq->chain.last;
|
||||
engine->chain_sw.last = last;
|
||||
/*
|
||||
* Break the DMA chain if the CESA_TDMA_BREAK_CHAIN is set on
|
||||
* the last element of the current chain.
|
||||
*/
|
||||
if (last->flags & CESA_TDMA_BREAK_CHAIN) {
|
||||
engine->chain_sw.first = NULL;
|
||||
engine->chain_sw.last = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -127,7 +138,7 @@ int mv_cesa_tdma_process(struct mv_cesa_engine *engine, u32 status)
|
||||
|
||||
tdma_cur = readl(engine->regs + CESA_TDMA_CUR);
|
||||
|
||||
for (tdma = engine->chain.first; tdma; tdma = next) {
|
||||
for (tdma = engine->chain_hw.first; tdma; tdma = next) {
|
||||
spin_lock_bh(&engine->lock);
|
||||
next = tdma->next;
|
||||
spin_unlock_bh(&engine->lock);
|
||||
@@ -149,12 +160,12 @@ int mv_cesa_tdma_process(struct mv_cesa_engine *engine, u32 status)
|
||||
&backlog);
|
||||
|
||||
/* Re-chaining to the next request */
|
||||
engine->chain.first = tdma->next;
|
||||
engine->chain_hw.first = tdma->next;
|
||||
tdma->next = NULL;
|
||||
|
||||
/* If this is the last request, clear the chain */
|
||||
if (engine->chain.first == NULL)
|
||||
engine->chain.last = NULL;
|
||||
if (engine->chain_hw.first == NULL)
|
||||
engine->chain_hw.last = NULL;
|
||||
spin_unlock_bh(&engine->lock);
|
||||
|
||||
ctx = crypto_tfm_ctx(req->tfm);
|
||||
|
||||
@@ -10,7 +10,7 @@ DCN20 = dcn20_resource.o dcn20_init.o dcn20_hwseq.o dcn20_dpp.o dcn20_dpp_cm.o d
|
||||
DCN20 += dcn20_dsc.o
|
||||
|
||||
ifdef CONFIG_X86
|
||||
CFLAGS_$(AMDDALPATH)/dc/dcn20/dcn20_resource.o := -mhard-float -msse
|
||||
CFLAGS_$(AMDDALPATH)/dc/dcn20/dcn20_resource.o := $(if $(CONFIG_CC_IS_GCC), -mhard-float) -msse
|
||||
endif
|
||||
|
||||
ifdef CONFIG_PPC64
|
||||
|
||||
@@ -6,7 +6,7 @@ DCN21 = dcn21_init.o dcn21_hubp.o dcn21_hubbub.o dcn21_resource.o \
|
||||
dcn21_hwseq.o dcn21_link_encoder.o
|
||||
|
||||
ifdef CONFIG_X86
|
||||
CFLAGS_$(AMDDALPATH)/dc/dcn21/dcn21_resource.o := -mhard-float -msse
|
||||
CFLAGS_$(AMDDALPATH)/dc/dcn21/dcn21_resource.o := $(if $(CONFIG_CC_IS_GCC), -mhard-float) -msse
|
||||
endif
|
||||
|
||||
ifdef CONFIG_PPC64
|
||||
|
||||
@@ -26,7 +26,8 @@
|
||||
# subcomponents.
|
||||
|
||||
ifdef CONFIG_X86
|
||||
dml_ccflags := -mhard-float -msse
|
||||
dml_ccflags-$(CONFIG_CC_IS_GCC) := -mhard-float
|
||||
dml_ccflags := $(dml_ccflags-y) -msse
|
||||
endif
|
||||
|
||||
ifdef CONFIG_PPC64
|
||||
|
||||
@@ -465,7 +465,7 @@ vb2_dma_sg_dmabuf_ops_begin_cpu_access(struct dma_buf *dbuf,
|
||||
struct vb2_dma_sg_buf *buf = dbuf->priv;
|
||||
struct sg_table *sgt = buf->dma_sgt;
|
||||
|
||||
dma_sync_sg_for_cpu(buf->dev, sgt->sgl, sgt->nents, buf->dma_dir);
|
||||
dma_sync_sgtable_for_cpu(buf->dev, sgt, buf->dma_dir);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -476,7 +476,7 @@ vb2_dma_sg_dmabuf_ops_end_cpu_access(struct dma_buf *dbuf,
|
||||
struct vb2_dma_sg_buf *buf = dbuf->priv;
|
||||
struct sg_table *sgt = buf->dma_sgt;
|
||||
|
||||
dma_sync_sg_for_device(buf->dev, sgt->sgl, sgt->nents, buf->dma_dir);
|
||||
dma_sync_sgtable_for_device(buf->dev, sgt, buf->dma_dir);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -1663,8 +1663,8 @@ static int ov8856_get_hwcfg(struct ov8856 *ov8856, struct device *dev)
|
||||
if (!is_acpi_node(fwnode)) {
|
||||
ov8856->xvclk = devm_clk_get(dev, "xvclk");
|
||||
if (IS_ERR(ov8856->xvclk)) {
|
||||
dev_err(dev, "could not get xvclk clock (%pe)\n",
|
||||
ov8856->xvclk);
|
||||
dev_err_probe(dev, PTR_ERR(ov8856->xvclk),
|
||||
"could not get xvclk clock\n");
|
||||
return PTR_ERR(ov8856->xvclk);
|
||||
}
|
||||
|
||||
@@ -1758,11 +1758,8 @@ static int ov8856_probe(struct i2c_client *client)
|
||||
return -ENOMEM;
|
||||
|
||||
ret = ov8856_get_hwcfg(ov8856, &client->dev);
|
||||
if (ret) {
|
||||
dev_err(&client->dev, "failed to get HW configuration: %d",
|
||||
ret);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
v4l2_i2c_subdev_init(&ov8856->sd, client, &ov8856_subdev_ops);
|
||||
|
||||
|
||||
@@ -290,7 +290,7 @@ static int venus_probe(struct platform_device *pdev)
|
||||
|
||||
ret = v4l2_device_register(dev, &core->v4l2_dev);
|
||||
if (ret)
|
||||
goto err_core_deinit;
|
||||
goto err_hfi_destroy;
|
||||
|
||||
platform_set_drvdata(pdev, core);
|
||||
|
||||
@@ -322,24 +322,24 @@ static int venus_probe(struct platform_device *pdev)
|
||||
|
||||
ret = venus_enumerate_codecs(core, VIDC_SESSION_TYPE_DEC);
|
||||
if (ret)
|
||||
goto err_venus_shutdown;
|
||||
goto err_core_deinit;
|
||||
|
||||
ret = venus_enumerate_codecs(core, VIDC_SESSION_TYPE_ENC);
|
||||
if (ret)
|
||||
goto err_venus_shutdown;
|
||||
goto err_core_deinit;
|
||||
|
||||
ret = pm_runtime_put_sync(dev);
|
||||
if (ret) {
|
||||
pm_runtime_get_noresume(dev);
|
||||
goto err_dev_unregister;
|
||||
goto err_core_deinit;
|
||||
}
|
||||
|
||||
venus_dbgfs_init(core);
|
||||
|
||||
return 0;
|
||||
|
||||
err_dev_unregister:
|
||||
v4l2_device_unregister(&core->v4l2_dev);
|
||||
err_core_deinit:
|
||||
hfi_core_deinit(core, false);
|
||||
err_venus_shutdown:
|
||||
venus_shutdown(core);
|
||||
err_firmware_deinit:
|
||||
@@ -350,9 +350,9 @@ err_runtime_disable:
|
||||
pm_runtime_put_noidle(dev);
|
||||
pm_runtime_disable(dev);
|
||||
pm_runtime_set_suspended(dev);
|
||||
v4l2_device_unregister(&core->v4l2_dev);
|
||||
err_hfi_destroy:
|
||||
hfi_destroy(core);
|
||||
err_core_deinit:
|
||||
hfi_core_deinit(core, false);
|
||||
err_core_put:
|
||||
if (core->pm_ops->core_put)
|
||||
core->pm_ops->core_put(core);
|
||||
|
||||
@@ -497,7 +497,7 @@ free_sdt:
|
||||
vidtv_psi_sdt_table_destroy(m->si.sdt);
|
||||
free_pat:
|
||||
vidtv_psi_pat_table_destroy(m->si.pat);
|
||||
return 0;
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
void vidtv_channel_si_destroy(struct vidtv_mux *m)
|
||||
|
||||
@@ -962,8 +962,8 @@ int vivid_vid_cap_s_selection(struct file *file, void *fh, struct v4l2_selection
|
||||
if (dev->has_compose_cap) {
|
||||
v4l2_rect_set_min_size(compose, &min_rect);
|
||||
v4l2_rect_set_max_size(compose, &max_rect);
|
||||
v4l2_rect_map_inside(compose, &fmt);
|
||||
}
|
||||
v4l2_rect_map_inside(compose, &fmt);
|
||||
dev->fmt_cap_rect = fmt;
|
||||
tpg_s_buf_height(&dev->tpg, fmt.height);
|
||||
} else if (dev->has_compose_cap) {
|
||||
|
||||
@@ -119,9 +119,8 @@ static void cxusb_gpio_tuner(struct dvb_usb_device *d, int onoff)
|
||||
|
||||
o[0] = GPIO_TUNER;
|
||||
o[1] = onoff;
|
||||
cxusb_ctrl_msg(d, CMD_GPIO_WRITE, o, 2, &i, 1);
|
||||
|
||||
if (i != 0x01)
|
||||
if (!cxusb_ctrl_msg(d, CMD_GPIO_WRITE, o, 2, &i, 1) && i != 0x01)
|
||||
dev_info(&d->udev->dev, "gpio_write failed.\n");
|
||||
|
||||
st->gpio_write_state[GPIO_TUNER] = onoff;
|
||||
|
||||
@@ -520,12 +520,13 @@ static int hdcs_init(struct sd *sd)
|
||||
static int hdcs_dump(struct sd *sd)
|
||||
{
|
||||
u16 reg, val;
|
||||
int err = 0;
|
||||
|
||||
pr_info("Dumping sensor registers:\n");
|
||||
|
||||
for (reg = HDCS_IDENT; reg <= HDCS_ROWEXPH; reg++) {
|
||||
stv06xx_read_sensor(sd, reg, &val);
|
||||
for (reg = HDCS_IDENT; reg <= HDCS_ROWEXPH && !err; reg++) {
|
||||
err = stv06xx_read_sensor(sd, reg, &val);
|
||||
pr_info("reg 0x%02x = 0x%02x\n", reg, val);
|
||||
}
|
||||
return 0;
|
||||
return (err < 0) ? err : 0;
|
||||
}
|
||||
|
||||
@@ -1029,25 +1029,25 @@ int __video_register_device(struct video_device *vdev,
|
||||
vdev->dev.class = &video_class;
|
||||
vdev->dev.devt = MKDEV(VIDEO_MAJOR, vdev->minor);
|
||||
vdev->dev.parent = vdev->dev_parent;
|
||||
vdev->dev.release = v4l2_device_release;
|
||||
dev_set_name(&vdev->dev, "%s%d", name_base, vdev->num);
|
||||
|
||||
/* Increase v4l2_device refcount */
|
||||
v4l2_device_get(vdev->v4l2_dev);
|
||||
|
||||
mutex_lock(&videodev_lock);
|
||||
ret = device_register(&vdev->dev);
|
||||
if (ret < 0) {
|
||||
mutex_unlock(&videodev_lock);
|
||||
pr_err("%s: device_register failed\n", __func__);
|
||||
goto cleanup;
|
||||
put_device(&vdev->dev);
|
||||
return ret;
|
||||
}
|
||||
/* Register the release callback that will be called when the last
|
||||
reference to the device goes away. */
|
||||
vdev->dev.release = v4l2_device_release;
|
||||
|
||||
if (nr != -1 && nr != vdev->num && warn_if_nr_in_use)
|
||||
pr_warn("%s: requested %s%d, got %s\n", __func__,
|
||||
name_base, nr, video_device_node_name(vdev));
|
||||
|
||||
/* Increase v4l2_device refcount */
|
||||
v4l2_device_get(vdev->v4l2_dev);
|
||||
|
||||
/* Part 5: Register the entity. */
|
||||
ret = video_register_media_controller(vdev);
|
||||
|
||||
|
||||
@@ -1495,8 +1495,8 @@ static void i40e_cleanup_reset_vf(struct i40e_vf *vf)
|
||||
* @vf: pointer to the VF structure
|
||||
* @flr: VFLR was issued or not
|
||||
*
|
||||
* Returns true if the VF is in reset, resets successfully, or resets
|
||||
* are disabled and false otherwise.
|
||||
* Return: True if reset was performed successfully or if resets are disabled.
|
||||
* False if reset is already in progress.
|
||||
**/
|
||||
bool i40e_reset_vf(struct i40e_vf *vf, bool flr)
|
||||
{
|
||||
@@ -1515,7 +1515,7 @@ bool i40e_reset_vf(struct i40e_vf *vf, bool flr)
|
||||
|
||||
/* If VF is being reset already we don't need to continue. */
|
||||
if (test_and_set_bit(I40E_VF_STATE_RESETTING, &vf->vf_states))
|
||||
return true;
|
||||
return false;
|
||||
|
||||
i40e_trigger_vf_reset(vf, flr);
|
||||
|
||||
@@ -4170,7 +4170,10 @@ int i40e_vc_process_vflr_event(struct i40e_pf *pf)
|
||||
reg = rd32(hw, I40E_GLGEN_VFLRSTAT(reg_idx));
|
||||
if (reg & BIT(bit_idx))
|
||||
/* i40e_reset_vf will clear the bit in GLGEN_VFLRSTAT */
|
||||
i40e_reset_vf(vf, true);
|
||||
if (!i40e_reset_vf(vf, true)) {
|
||||
/* At least one VF did not finish resetting, retry next time */
|
||||
set_bit(__I40E_VFLR_EVENT_PENDING, pf->state);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -1869,6 +1869,7 @@ try_add_to_existing_fg(struct mlx5_flow_table *ft,
|
||||
struct mlx5_flow_handle *rule;
|
||||
struct match_list *iter;
|
||||
bool take_write = false;
|
||||
bool try_again = false;
|
||||
struct fs_fte *fte;
|
||||
u64 version = 0;
|
||||
int err;
|
||||
@@ -1928,6 +1929,7 @@ skip_search:
|
||||
nested_down_write_ref_node(&g->node, FS_LOCK_PARENT);
|
||||
|
||||
if (!g->node.active) {
|
||||
try_again = true;
|
||||
up_write_ref_node(&g->node, false);
|
||||
continue;
|
||||
}
|
||||
@@ -1949,7 +1951,8 @@ skip_search:
|
||||
tree_put_node(&fte->node, false);
|
||||
return rule;
|
||||
}
|
||||
rule = ERR_PTR(-ENOENT);
|
||||
err = try_again ? -EAGAIN : -ENOENT;
|
||||
rule = ERR_PTR(err);
|
||||
out:
|
||||
kmem_cache_free(steering->ftes_cache, fte);
|
||||
return rule;
|
||||
|
||||
@@ -272,7 +272,7 @@ static void free_4k(struct mlx5_core_dev *dev, u64 addr, u32 function)
|
||||
static int alloc_system_page(struct mlx5_core_dev *dev, u32 function)
|
||||
{
|
||||
struct device *device = mlx5_core_dma_dev(dev);
|
||||
int nid = dev_to_node(device);
|
||||
int nid = dev->priv.numa_node;
|
||||
struct page *page;
|
||||
u64 zero_addr = 1;
|
||||
u64 addr;
|
||||
|
||||
@@ -440,19 +440,22 @@ int mlx5_query_nic_vport_node_guid(struct mlx5_core_dev *mdev, u64 *node_guid)
|
||||
{
|
||||
u32 *out;
|
||||
int outlen = MLX5_ST_SZ_BYTES(query_nic_vport_context_out);
|
||||
int err;
|
||||
|
||||
out = kvzalloc(outlen, GFP_KERNEL);
|
||||
if (!out)
|
||||
return -ENOMEM;
|
||||
|
||||
mlx5_query_nic_vport_context(mdev, 0, out);
|
||||
err = mlx5_query_nic_vport_context(mdev, 0, out);
|
||||
if (err)
|
||||
goto out;
|
||||
|
||||
*node_guid = MLX5_GET64(query_nic_vport_context_out, out,
|
||||
nic_vport_context.node_guid);
|
||||
|
||||
out:
|
||||
kvfree(out);
|
||||
|
||||
return 0;
|
||||
return err;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mlx5_query_nic_vport_node_guid);
|
||||
|
||||
@@ -494,19 +497,22 @@ int mlx5_query_nic_vport_qkey_viol_cntr(struct mlx5_core_dev *mdev,
|
||||
{
|
||||
u32 *out;
|
||||
int outlen = MLX5_ST_SZ_BYTES(query_nic_vport_context_out);
|
||||
int err;
|
||||
|
||||
out = kvzalloc(outlen, GFP_KERNEL);
|
||||
if (!out)
|
||||
return -ENOMEM;
|
||||
|
||||
mlx5_query_nic_vport_context(mdev, 0, out);
|
||||
err = mlx5_query_nic_vport_context(mdev, 0, out);
|
||||
if (err)
|
||||
goto out;
|
||||
|
||||
*qkey_viol_cntr = MLX5_GET(query_nic_vport_context_out, out,
|
||||
nic_vport_context.qkey_violation_counter);
|
||||
|
||||
out:
|
||||
kvfree(out);
|
||||
|
||||
return 0;
|
||||
return err;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mlx5_query_nic_vport_qkey_viol_cntr);
|
||||
|
||||
|
||||
@@ -260,15 +260,39 @@ static sci_t make_sci(u8 *addr, __be16 port)
|
||||
return sci;
|
||||
}
|
||||
|
||||
static sci_t macsec_frame_sci(struct macsec_eth_header *hdr, bool sci_present)
|
||||
static sci_t macsec_active_sci(struct macsec_secy *secy)
|
||||
{
|
||||
sci_t sci;
|
||||
struct macsec_rx_sc *rx_sc = rcu_dereference_bh(secy->rx_sc);
|
||||
|
||||
if (sci_present)
|
||||
/* Case single RX SC */
|
||||
if (rx_sc && !rcu_dereference_bh(rx_sc->next))
|
||||
return (rx_sc->active) ? rx_sc->sci : 0;
|
||||
/* Case no RX SC or multiple */
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
static sci_t macsec_frame_sci(struct macsec_eth_header *hdr, bool sci_present,
|
||||
struct macsec_rxh_data *rxd)
|
||||
{
|
||||
struct macsec_dev *macsec;
|
||||
sci_t sci = 0;
|
||||
|
||||
/* SC = 1 */
|
||||
if (sci_present) {
|
||||
memcpy(&sci, hdr->secure_channel_id,
|
||||
sizeof(hdr->secure_channel_id));
|
||||
else
|
||||
/* SC = 0; ES = 0 */
|
||||
} else if ((!(hdr->tci_an & (MACSEC_TCI_ES | MACSEC_TCI_SC))) &&
|
||||
(list_is_singular(&rxd->secys))) {
|
||||
/* Only one SECY should exist on this scenario */
|
||||
macsec = list_first_or_null_rcu(&rxd->secys, struct macsec_dev,
|
||||
secys);
|
||||
if (macsec)
|
||||
return macsec_active_sci(&macsec->secy);
|
||||
} else {
|
||||
sci = make_sci(hdr->eth.h_source, MACSEC_PORT_ES);
|
||||
}
|
||||
|
||||
return sci;
|
||||
}
|
||||
@@ -1079,7 +1103,7 @@ static rx_handler_result_t macsec_handle_frame(struct sk_buff **pskb)
|
||||
struct macsec_rxh_data *rxd;
|
||||
struct macsec_dev *macsec;
|
||||
unsigned int len;
|
||||
sci_t sci;
|
||||
sci_t sci = 0;
|
||||
u32 hdr_pn;
|
||||
bool cbit;
|
||||
struct pcpu_rx_sc_stats *rxsc_stats;
|
||||
@@ -1126,11 +1150,14 @@ static rx_handler_result_t macsec_handle_frame(struct sk_buff **pskb)
|
||||
|
||||
macsec_skb_cb(skb)->has_sci = !!(hdr->tci_an & MACSEC_TCI_SC);
|
||||
macsec_skb_cb(skb)->assoc_num = hdr->tci_an & MACSEC_AN_MASK;
|
||||
sci = macsec_frame_sci(hdr, macsec_skb_cb(skb)->has_sci);
|
||||
|
||||
rcu_read_lock();
|
||||
rxd = macsec_data_rcu(skb->dev);
|
||||
|
||||
sci = macsec_frame_sci(hdr, macsec_skb_cb(skb)->has_sci, rxd);
|
||||
if (!sci)
|
||||
goto drop_nosc;
|
||||
|
||||
list_for_each_entry_rcu(macsec, &rxd->secys, secys) {
|
||||
struct macsec_rx_sc *sc = find_rx_sc(&macsec->secy, sci);
|
||||
|
||||
@@ -1250,6 +1277,7 @@ drop:
|
||||
macsec_rxsa_put(rx_sa);
|
||||
drop_nosa:
|
||||
macsec_rxsc_put(rx_sc);
|
||||
drop_nosc:
|
||||
rcu_read_unlock();
|
||||
drop_direct:
|
||||
kfree_skb(skb);
|
||||
|
||||
@@ -754,7 +754,13 @@ int __mdiobus_read(struct mii_bus *bus, int addr, u32 regnum)
|
||||
|
||||
WARN_ON_ONCE(!mutex_is_locked(&bus->mdio_lock));
|
||||
|
||||
retval = bus->read(bus, addr, regnum);
|
||||
if (addr >= PHY_MAX_ADDR)
|
||||
return -ENXIO;
|
||||
|
||||
if (bus->read)
|
||||
retval = bus->read(bus, addr, regnum);
|
||||
else
|
||||
retval = -EOPNOTSUPP;
|
||||
|
||||
trace_mdio_access(bus, 1, addr, regnum, retval, retval);
|
||||
mdiobus_stats_acct(&bus->stats[addr], true, retval);
|
||||
@@ -780,7 +786,13 @@ int __mdiobus_write(struct mii_bus *bus, int addr, u32 regnum, u16 val)
|
||||
|
||||
WARN_ON_ONCE(!mutex_is_locked(&bus->mdio_lock));
|
||||
|
||||
err = bus->write(bus, addr, regnum, val);
|
||||
if (addr >= PHY_MAX_ADDR)
|
||||
return -ENXIO;
|
||||
|
||||
if (bus->write)
|
||||
err = bus->write(bus, addr, regnum, val);
|
||||
else
|
||||
err = -EOPNOTSUPP;
|
||||
|
||||
trace_mdio_access(bus, 0, addr, regnum, val, err);
|
||||
mdiobus_stats_acct(&bus->stats[addr], false, err);
|
||||
|
||||
@@ -31,11 +31,11 @@ static int aqc111_read_cmd_nopm(struct usbnet *dev, u8 cmd, u16 value,
|
||||
USB_RECIP_DEVICE, value, index, data, size);
|
||||
|
||||
if (unlikely(ret < size)) {
|
||||
ret = ret < 0 ? ret : -ENODATA;
|
||||
|
||||
netdev_warn(dev->net,
|
||||
"Failed to read(0x%x) reg index 0x%04x: %d\n",
|
||||
cmd, index, ret);
|
||||
|
||||
ret = ret < 0 ? ret : -ENODATA;
|
||||
}
|
||||
|
||||
return ret;
|
||||
@@ -50,11 +50,11 @@ static int aqc111_read_cmd(struct usbnet *dev, u8 cmd, u16 value,
|
||||
USB_RECIP_DEVICE, value, index, data, size);
|
||||
|
||||
if (unlikely(ret < size)) {
|
||||
ret = ret < 0 ? ret : -ENODATA;
|
||||
|
||||
netdev_warn(dev->net,
|
||||
"Failed to read(0x%x) reg index 0x%04x: %d\n",
|
||||
cmd, index, ret);
|
||||
|
||||
ret = ret < 0 ? ret : -ENODATA;
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
||||
@@ -233,6 +233,7 @@ int p54_download_eeprom(struct p54_common *priv, void *buf,
|
||||
|
||||
mutex_lock(&priv->eeprom_mutex);
|
||||
priv->eeprom = buf;
|
||||
priv->eeprom_slice_size = len;
|
||||
eeprom_hdr = skb_put(skb, eeprom_hdr_size + len);
|
||||
|
||||
if (priv->fw_var < 0x509) {
|
||||
@@ -255,6 +256,7 @@ int p54_download_eeprom(struct p54_common *priv, void *buf,
|
||||
ret = -EBUSY;
|
||||
}
|
||||
priv->eeprom = NULL;
|
||||
priv->eeprom_slice_size = 0;
|
||||
mutex_unlock(&priv->eeprom_mutex);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -258,6 +258,7 @@ struct p54_common {
|
||||
|
||||
/* eeprom handling */
|
||||
void *eeprom;
|
||||
size_t eeprom_slice_size;
|
||||
struct completion eeprom_comp;
|
||||
struct mutex eeprom_mutex;
|
||||
};
|
||||
|
||||
@@ -500,14 +500,19 @@ static void p54_rx_eeprom_readback(struct p54_common *priv,
|
||||
return ;
|
||||
|
||||
if (priv->fw_var >= 0x509) {
|
||||
memcpy(priv->eeprom, eeprom->v2.data,
|
||||
le16_to_cpu(eeprom->v2.len));
|
||||
if (le16_to_cpu(eeprom->v2.len) != priv->eeprom_slice_size)
|
||||
return;
|
||||
|
||||
memcpy(priv->eeprom, eeprom->v2.data, priv->eeprom_slice_size);
|
||||
} else {
|
||||
memcpy(priv->eeprom, eeprom->v1.data,
|
||||
le16_to_cpu(eeprom->v1.len));
|
||||
if (le16_to_cpu(eeprom->v1.len) != priv->eeprom_slice_size)
|
||||
return;
|
||||
|
||||
memcpy(priv->eeprom, eeprom->v1.data, priv->eeprom_slice_size);
|
||||
}
|
||||
|
||||
priv->eeprom = NULL;
|
||||
priv->eeprom_slice_size = 0;
|
||||
tmp = p54_find_and_unlink_skb(priv, hdr->req_id);
|
||||
dev_kfree_skb_any(tmp);
|
||||
complete(&priv->eeprom_comp);
|
||||
|
||||
@@ -155,6 +155,16 @@ static void _rtl_pci_update_default_setting(struct ieee80211_hw *hw)
|
||||
if (rtlpriv->rtlhal.hw_type == HARDWARE_TYPE_RTL8192SE &&
|
||||
init_aspm == 0x43)
|
||||
ppsc->support_aspm = false;
|
||||
|
||||
/* RTL8723BE found on some ASUSTek laptops, such as F441U and
|
||||
* X555UQ with subsystem ID 11ad:1723 are known to output large
|
||||
* amounts of PCIe AER errors during and after boot up, causing
|
||||
* heavy lags, poor network throughput, and occasional lock-ups.
|
||||
*/
|
||||
if (rtlpriv->rtlhal.hw_type == HARDWARE_TYPE_RTL8723BE &&
|
||||
(rtlpci->pdev->subsystem_vendor == 0x11ad &&
|
||||
rtlpci->pdev->subsystem_device == 0x1723))
|
||||
ppsc->support_aspm = false;
|
||||
}
|
||||
|
||||
static bool _rtl_pci_platform_switch_device_pci_aspm(
|
||||
|
||||
@@ -3502,7 +3502,7 @@ static int iscsi_new_flashnode(struct iscsi_transport *transport,
|
||||
pr_err("%s could not find host no %u\n",
|
||||
__func__, ev->u.new_flashnode.host_no);
|
||||
err = -ENODEV;
|
||||
goto put_host;
|
||||
goto exit_new_fnode;
|
||||
}
|
||||
|
||||
index = transport->new_flashnode(shost, data, len);
|
||||
@@ -3512,7 +3512,6 @@ static int iscsi_new_flashnode(struct iscsi_transport *transport,
|
||||
else
|
||||
err = -EIO;
|
||||
|
||||
put_host:
|
||||
scsi_host_put(shost);
|
||||
|
||||
exit_new_fnode:
|
||||
@@ -3537,7 +3536,7 @@ static int iscsi_del_flashnode(struct iscsi_transport *transport,
|
||||
pr_err("%s could not find host no %u\n",
|
||||
__func__, ev->u.del_flashnode.host_no);
|
||||
err = -ENODEV;
|
||||
goto put_host;
|
||||
goto exit_del_fnode;
|
||||
}
|
||||
|
||||
idx = ev->u.del_flashnode.flashnode_idx;
|
||||
@@ -3579,7 +3578,7 @@ static int iscsi_login_flashnode(struct iscsi_transport *transport,
|
||||
pr_err("%s could not find host no %u\n",
|
||||
__func__, ev->u.login_flashnode.host_no);
|
||||
err = -ENODEV;
|
||||
goto put_host;
|
||||
goto exit_login_fnode;
|
||||
}
|
||||
|
||||
idx = ev->u.login_flashnode.flashnode_idx;
|
||||
@@ -3631,7 +3630,7 @@ static int iscsi_logout_flashnode(struct iscsi_transport *transport,
|
||||
pr_err("%s could not find host no %u\n",
|
||||
__func__, ev->u.logout_flashnode.host_no);
|
||||
err = -ENODEV;
|
||||
goto put_host;
|
||||
goto exit_logout_fnode;
|
||||
}
|
||||
|
||||
idx = ev->u.logout_flashnode.flashnode_idx;
|
||||
@@ -3681,7 +3680,7 @@ static int iscsi_logout_flashnode_sid(struct iscsi_transport *transport,
|
||||
pr_err("%s could not find host no %u\n",
|
||||
__func__, ev->u.logout_flashnode.host_no);
|
||||
err = -ENODEV;
|
||||
goto put_host;
|
||||
goto exit_logout_sid;
|
||||
}
|
||||
|
||||
session = iscsi_session_lookup(ev->u.logout_flashnode_sid.sid);
|
||||
|
||||
@@ -5935,6 +5935,7 @@ static int usb_reset_and_verify_device(struct usb_device *udev)
|
||||
struct usb_hub *parent_hub;
|
||||
struct usb_hcd *hcd = bus_to_hcd(udev->bus);
|
||||
struct usb_device_descriptor descriptor;
|
||||
struct usb_interface *intf;
|
||||
struct usb_host_bos *bos;
|
||||
int i, j, ret = 0;
|
||||
int port1 = udev->portnum;
|
||||
@@ -5995,6 +5996,18 @@ static int usb_reset_and_verify_device(struct usb_device *udev)
|
||||
if (!udev->actconfig)
|
||||
goto done;
|
||||
|
||||
/*
|
||||
* Some devices can't handle setting default altsetting 0 with a
|
||||
* Set-Interface request. Disable host-side endpoints of those
|
||||
* interfaces here. Enable and reset them back after host has set
|
||||
* its internal endpoint structures during usb_hcd_alloc_bandwith()
|
||||
*/
|
||||
for (i = 0; i < udev->actconfig->desc.bNumInterfaces; i++) {
|
||||
intf = udev->actconfig->interface[i];
|
||||
if (intf->cur_altsetting->desc.bAlternateSetting == 0)
|
||||
usb_disable_interface(udev, intf, true);
|
||||
}
|
||||
|
||||
mutex_lock(hcd->bandwidth_mutex);
|
||||
ret = usb_hcd_alloc_bandwidth(udev, udev->actconfig, NULL, NULL);
|
||||
if (ret < 0) {
|
||||
@@ -6026,12 +6039,11 @@ static int usb_reset_and_verify_device(struct usb_device *udev)
|
||||
*/
|
||||
for (i = 0; i < udev->actconfig->desc.bNumInterfaces; i++) {
|
||||
struct usb_host_config *config = udev->actconfig;
|
||||
struct usb_interface *intf = config->interface[i];
|
||||
struct usb_interface_descriptor *desc;
|
||||
|
||||
intf = config->interface[i];
|
||||
desc = &intf->cur_altsetting->desc;
|
||||
if (desc->bAlternateSetting == 0) {
|
||||
usb_disable_interface(udev, intf, true);
|
||||
usb_enable_interface(udev, intf, true);
|
||||
ret = 0;
|
||||
} else {
|
||||
|
||||
@@ -619,7 +619,7 @@ static int populate_attrs(struct config_item *item)
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (t->ct_bin_attrs) {
|
||||
if (!error && t->ct_bin_attrs) {
|
||||
for (i = 0; (bin_attr = t->ct_bin_attrs[i]) != NULL; i++) {
|
||||
error = configfs_create_bin_file(item, bin_attr);
|
||||
if (error)
|
||||
|
||||
@@ -156,15 +156,19 @@ static int fs_index(const char __user * __name)
|
||||
static int fs_name(unsigned int index, char __user * buf)
|
||||
{
|
||||
struct file_system_type * tmp;
|
||||
int len, res;
|
||||
int len, res = -EINVAL;
|
||||
|
||||
read_lock(&file_systems_lock);
|
||||
for (tmp = file_systems; tmp; tmp = tmp->next, index--)
|
||||
if (index <= 0 && try_module_get(tmp->owner))
|
||||
for (tmp = file_systems; tmp; tmp = tmp->next, index--) {
|
||||
if (index == 0) {
|
||||
if (try_module_get(tmp->owner))
|
||||
res = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
read_unlock(&file_systems_lock);
|
||||
if (!tmp)
|
||||
return -EINVAL;
|
||||
if (res)
|
||||
return res;
|
||||
|
||||
/* OK, we got the reference, so we can safely block */
|
||||
len = strlen(tmp->name) + 1;
|
||||
|
||||
@@ -939,14 +939,15 @@ locks_done:
|
||||
if (sdp->sd_args.ar_spectator) {
|
||||
fs_info(sdp, "Recovery is required. Waiting for a "
|
||||
"non-spectator to mount.\n");
|
||||
spin_unlock(&ls->ls_recover_spin);
|
||||
msleep_interruptible(1000);
|
||||
} else {
|
||||
fs_info(sdp, "control_mount wait1 block %u start %u "
|
||||
"mount %u lvb %u flags %lx\n", block_gen,
|
||||
start_gen, mount_gen, lvb_gen,
|
||||
ls->ls_recover_flags);
|
||||
spin_unlock(&ls->ls_recover_spin);
|
||||
}
|
||||
spin_unlock(&ls->ls_recover_spin);
|
||||
goto restart;
|
||||
}
|
||||
|
||||
|
||||
@@ -1492,7 +1492,7 @@ int jbd2_journal_dirty_metadata(handle_t *handle, struct buffer_head *bh)
|
||||
jh->b_next_transaction == transaction);
|
||||
spin_unlock(&jh->b_state_lock);
|
||||
}
|
||||
if (jh->b_modified == 1) {
|
||||
if (data_race(jh->b_modified == 1)) {
|
||||
/* If it's in our transaction it must be in BJ_Metadata list. */
|
||||
if (data_race(jh->b_transaction == transaction &&
|
||||
jh->b_jlist != BJ_Metadata)) {
|
||||
@@ -1511,7 +1511,6 @@ int jbd2_journal_dirty_metadata(handle_t *handle, struct buffer_head *bh)
|
||||
goto out;
|
||||
}
|
||||
|
||||
journal = transaction->t_journal;
|
||||
spin_lock(&jh->b_state_lock);
|
||||
|
||||
if (is_handle_aborted(handle)) {
|
||||
@@ -1526,6 +1525,8 @@ int jbd2_journal_dirty_metadata(handle_t *handle, struct buffer_head *bh)
|
||||
goto out_unlock_bh;
|
||||
}
|
||||
|
||||
journal = transaction->t_journal;
|
||||
|
||||
if (jh->b_modified == 0) {
|
||||
/*
|
||||
* This buffer's got modified and becoming part
|
||||
|
||||
@@ -3243,7 +3243,8 @@ bool nfsd4_spo_must_allow(struct svc_rqst *rqstp)
|
||||
struct nfs4_op_map *allow = &cstate->clp->cl_spo_must_allow;
|
||||
u32 opiter;
|
||||
|
||||
if (!cstate->minorversion)
|
||||
if (rqstp->rq_procinfo != &nfsd_version4.vs_proc[NFSPROC4_COMPOUND] ||
|
||||
cstate->minorversion == 0)
|
||||
return false;
|
||||
|
||||
if (cstate->spo_must_allowed)
|
||||
|
||||
@@ -1799,7 +1799,7 @@ static inline void bpf_map_offload_map_free(struct bpf_map *map)
|
||||
}
|
||||
#endif /* CONFIG_NET && CONFIG_BPF_SYSCALL */
|
||||
|
||||
#if defined(CONFIG_BPF_STREAM_PARSER)
|
||||
#if defined(CONFIG_INET) && defined(CONFIG_BPF_SYSCALL)
|
||||
int sock_map_prog_update(struct bpf_map *map, struct bpf_prog *prog,
|
||||
struct bpf_prog *old, u32 which);
|
||||
int sock_map_get_from_fd(const union bpf_attr *attr, struct bpf_prog *prog);
|
||||
@@ -1808,7 +1808,18 @@ int sock_map_update_elem_sys(struct bpf_map *map, void *key, void *value, u64 fl
|
||||
void sock_map_unhash(struct sock *sk);
|
||||
void sock_map_destroy(struct sock *sk);
|
||||
void sock_map_close(struct sock *sk, long timeout);
|
||||
|
||||
void bpf_sk_reuseport_detach(struct sock *sk);
|
||||
int bpf_fd_reuseport_array_lookup_elem(struct bpf_map *map, void *key,
|
||||
void *value);
|
||||
int bpf_fd_reuseport_array_update_elem(struct bpf_map *map, void *key,
|
||||
void *value, u64 map_flags);
|
||||
#else
|
||||
static inline void bpf_sk_reuseport_detach(struct sock *sk)
|
||||
{
|
||||
}
|
||||
|
||||
#ifdef CONFIG_BPF_SYSCALL
|
||||
static inline int sock_map_prog_update(struct bpf_map *map,
|
||||
struct bpf_prog *prog,
|
||||
struct bpf_prog *old, u32 which)
|
||||
@@ -1833,20 +1844,7 @@ static inline int sock_map_update_elem_sys(struct bpf_map *map, void *key, void
|
||||
{
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
#endif /* CONFIG_BPF_STREAM_PARSER */
|
||||
|
||||
#if defined(CONFIG_INET) && defined(CONFIG_BPF_SYSCALL)
|
||||
void bpf_sk_reuseport_detach(struct sock *sk);
|
||||
int bpf_fd_reuseport_array_lookup_elem(struct bpf_map *map, void *key,
|
||||
void *value);
|
||||
int bpf_fd_reuseport_array_update_elem(struct bpf_map *map, void *key,
|
||||
void *value, u64 map_flags);
|
||||
#else
|
||||
static inline void bpf_sk_reuseport_detach(struct sock *sk)
|
||||
{
|
||||
}
|
||||
|
||||
#ifdef CONFIG_BPF_SYSCALL
|
||||
static inline int bpf_fd_reuseport_array_lookup_elem(struct bpf_map *map,
|
||||
void *key, void *value)
|
||||
{
|
||||
|
||||
@@ -103,10 +103,6 @@ BPF_MAP_TYPE(BPF_MAP_TYPE_HASH_OF_MAPS, htab_of_maps_map_ops)
|
||||
BPF_MAP_TYPE(BPF_MAP_TYPE_DEVMAP, dev_map_ops)
|
||||
BPF_MAP_TYPE(BPF_MAP_TYPE_DEVMAP_HASH, dev_map_hash_ops)
|
||||
BPF_MAP_TYPE(BPF_MAP_TYPE_SK_STORAGE, sk_storage_map_ops)
|
||||
#if defined(CONFIG_BPF_STREAM_PARSER)
|
||||
BPF_MAP_TYPE(BPF_MAP_TYPE_SOCKMAP, sock_map_ops)
|
||||
BPF_MAP_TYPE(BPF_MAP_TYPE_SOCKHASH, sock_hash_ops)
|
||||
#endif
|
||||
#ifdef CONFIG_BPF_LSM
|
||||
BPF_MAP_TYPE(BPF_MAP_TYPE_INODE_STORAGE, inode_storage_map_ops)
|
||||
#endif
|
||||
@@ -115,6 +111,8 @@ BPF_MAP_TYPE(BPF_MAP_TYPE_CPUMAP, cpu_map_ops)
|
||||
BPF_MAP_TYPE(BPF_MAP_TYPE_XSKMAP, xsk_map_ops)
|
||||
#endif
|
||||
#ifdef CONFIG_INET
|
||||
BPF_MAP_TYPE(BPF_MAP_TYPE_SOCKMAP, sock_map_ops)
|
||||
BPF_MAP_TYPE(BPF_MAP_TYPE_SOCKHASH, sock_hash_ops)
|
||||
BPF_MAP_TYPE(BPF_MAP_TYPE_REUSEPORT_SOCKARRAY, reuseport_array_ops)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -71,7 +71,9 @@ struct sk_psock_link {
|
||||
};
|
||||
|
||||
struct sk_psock_parser {
|
||||
#if IS_ENABLED(CONFIG_BPF_STREAM_PARSER)
|
||||
struct strparser strp;
|
||||
#endif
|
||||
bool enabled;
|
||||
void (*saved_data_ready)(struct sock *sk);
|
||||
};
|
||||
@@ -307,9 +309,25 @@ static inline void sk_psock_report_error(struct sk_psock *psock, int err)
|
||||
|
||||
struct sk_psock *sk_psock_init(struct sock *sk, int node);
|
||||
|
||||
#if IS_ENABLED(CONFIG_BPF_STREAM_PARSER)
|
||||
int sk_psock_init_strp(struct sock *sk, struct sk_psock *psock);
|
||||
void sk_psock_start_strp(struct sock *sk, struct sk_psock *psock);
|
||||
void sk_psock_stop_strp(struct sock *sk, struct sk_psock *psock);
|
||||
#else
|
||||
static inline int sk_psock_init_strp(struct sock *sk, struct sk_psock *psock)
|
||||
{
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
static inline void sk_psock_start_strp(struct sock *sk, struct sk_psock *psock)
|
||||
{
|
||||
}
|
||||
|
||||
static inline void sk_psock_stop_strp(struct sock *sk, struct sk_psock *psock)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
void sk_psock_start_verdict(struct sock *sk, struct sk_psock *psock);
|
||||
void sk_psock_stop_verdict(struct sock *sk, struct sk_psock *psock);
|
||||
|
||||
|
||||
@@ -1241,7 +1241,7 @@ struct proto {
|
||||
#endif
|
||||
|
||||
bool (*stream_memory_free)(const struct sock *sk, int wake);
|
||||
bool (*stream_memory_read)(const struct sock *sk);
|
||||
bool (*sock_is_readable)(struct sock *sk);
|
||||
/* Memory pressure */
|
||||
void (*enter_memory_pressure)(struct sock *sk);
|
||||
void (*leave_memory_pressure)(struct sock *sk);
|
||||
@@ -2848,4 +2848,13 @@ void sock_set_sndtimeo(struct sock *sk, s64 secs);
|
||||
|
||||
int sock_bind_add(struct sock *sk, struct sockaddr *addr, int addr_len);
|
||||
|
||||
static inline bool sk_is_readable(struct sock *sk)
|
||||
{
|
||||
const struct proto *prot = READ_ONCE(sk->sk_prot);
|
||||
|
||||
if (prot->sock_is_readable)
|
||||
return prot->sock_is_readable(sk);
|
||||
|
||||
return false;
|
||||
}
|
||||
#endif /* _SOCK_H */
|
||||
|
||||
@@ -1449,6 +1449,18 @@ static inline bool tcp_rmem_pressure(const struct sock *sk)
|
||||
return atomic_read(&sk->sk_rmem_alloc) > threshold;
|
||||
}
|
||||
|
||||
static inline bool tcp_epollin_ready(const struct sock *sk, int target)
|
||||
{
|
||||
const struct tcp_sock *tp = tcp_sk(sk);
|
||||
int avail = READ_ONCE(tp->rcv_nxt) - READ_ONCE(tp->copied_seq);
|
||||
|
||||
if (avail <= 0)
|
||||
return false;
|
||||
|
||||
return (avail >= target) || tcp_rmem_pressure(sk) ||
|
||||
(tcp_receive_window(tp) <= inet_csk(sk)->icsk_ack.rcv_mss);
|
||||
}
|
||||
|
||||
extern void tcp_openreq_init_rwin(struct request_sock *req,
|
||||
const struct sock *sk_listener,
|
||||
const struct dst_entry *dst);
|
||||
@@ -2266,25 +2278,27 @@ void tcp_update_ulp(struct sock *sk, struct proto *p,
|
||||
__MODULE_INFO(alias, alias_userspace, name); \
|
||||
__MODULE_INFO(alias, alias_tcp_ulp, "tcp-ulp-" name)
|
||||
|
||||
#ifdef CONFIG_NET_SOCK_MSG
|
||||
struct sk_msg;
|
||||
struct sk_psock;
|
||||
|
||||
#ifdef CONFIG_BPF_STREAM_PARSER
|
||||
#ifdef CONFIG_BPF_SYSCALL
|
||||
struct proto *tcp_bpf_get_proto(struct sock *sk, struct sk_psock *psock);
|
||||
void tcp_bpf_clone(const struct sock *sk, struct sock *newsk);
|
||||
#else
|
||||
static inline void tcp_bpf_clone(const struct sock *sk, struct sock *newsk)
|
||||
{
|
||||
}
|
||||
#endif /* CONFIG_BPF_STREAM_PARSER */
|
||||
#endif /* CONFIG_BPF_SYSCALL */
|
||||
|
||||
#ifdef CONFIG_NET_SOCK_MSG
|
||||
int tcp_bpf_sendmsg_redir(struct sock *sk, struct sk_msg *msg, u32 bytes,
|
||||
int flags);
|
||||
int __tcp_bpf_recvmsg(struct sock *sk, struct sk_psock *psock,
|
||||
struct msghdr *msg, int len, int flags);
|
||||
#endif /* CONFIG_NET_SOCK_MSG */
|
||||
|
||||
#if !defined(CONFIG_BPF_SYSCALL) || !defined(CONFIG_NET_SOCK_MSG)
|
||||
static inline void tcp_bpf_clone(const struct sock *sk, struct sock *newsk)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_CGROUP_BPF
|
||||
static inline void bpf_skops_init_skb(struct bpf_sock_ops_kern *skops,
|
||||
struct sk_buff *skb,
|
||||
|
||||
@@ -391,7 +391,7 @@ void tls_sw_release_resources_rx(struct sock *sk);
|
||||
void tls_sw_free_ctx_rx(struct tls_context *tls_ctx);
|
||||
int tls_sw_recvmsg(struct sock *sk, struct msghdr *msg, size_t len,
|
||||
int nonblock, int flags, int *addr_len);
|
||||
bool tls_sw_stream_read(const struct sock *sk);
|
||||
bool tls_sw_sock_is_readable(struct sock *sk);
|
||||
ssize_t tls_sw_splice_read(struct socket *sock, loff_t *ppos,
|
||||
struct pipe_inode_info *pipe,
|
||||
size_t len, unsigned int flags);
|
||||
|
||||
@@ -514,9 +514,9 @@ static inline struct sk_buff *udp_rcv_segment(struct sock *sk,
|
||||
return segs;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_BPF_STREAM_PARSER
|
||||
#ifdef CONFIG_BPF_SYSCALL
|
||||
struct sk_psock;
|
||||
struct proto *udp_bpf_get_proto(struct sock *sk, struct sk_psock *psock);
|
||||
#endif /* BPF_STREAM_PARSER */
|
||||
#endif
|
||||
|
||||
#endif /* _UDP_H */
|
||||
|
||||
@@ -1750,6 +1750,7 @@ config BPF_SYSCALL
|
||||
select BPF
|
||||
select IRQ_WORK
|
||||
select TASKS_TRACE_RCU
|
||||
select NET_SOCK_MSG if INET
|
||||
default n
|
||||
help
|
||||
Enable the bpf() system call that allows to manipulate eBPF
|
||||
|
||||
@@ -1373,6 +1373,15 @@ void run_posix_cpu_timers(void)
|
||||
|
||||
lockdep_assert_irqs_disabled();
|
||||
|
||||
/*
|
||||
* Ensure that release_task(tsk) can't happen while
|
||||
* handle_posix_cpu_timers() is running. Otherwise, a concurrent
|
||||
* posix_cpu_timer_del() may fail to lock_task_sighand(tsk) and
|
||||
* miss timer->it.cpu.firing != 0.
|
||||
*/
|
||||
if (tsk->exit_state)
|
||||
return;
|
||||
|
||||
/*
|
||||
* If the actual expiry is deferred to task work context and the
|
||||
* work is already scheduled there is no point to do anything here.
|
||||
|
||||
@@ -311,13 +311,9 @@ config BPF_STREAM_PARSER
|
||||
select STREAM_PARSER
|
||||
select NET_SOCK_MSG
|
||||
help
|
||||
Enabling this allows a stream parser to be used with
|
||||
Enabling this allows a TCP stream parser to be used with
|
||||
BPF_MAP_TYPE_SOCKMAP.
|
||||
|
||||
BPF_MAP_TYPE_SOCKMAP provides a map type to use with network sockets.
|
||||
It can be used to enforce socket policy, implement socket redirects,
|
||||
etc.
|
||||
|
||||
config NET_FLOW_LIMIT
|
||||
bool
|
||||
depends on RPS
|
||||
|
||||
@@ -16,7 +16,6 @@ obj-y += dev.o dev_addr_lists.o dst.o netevent.o \
|
||||
obj-y += net-sysfs.o
|
||||
obj-$(CONFIG_PAGE_POOL) += page_pool.o
|
||||
obj-$(CONFIG_PROC_FS) += net-procfs.o
|
||||
obj-$(CONFIG_NET_SOCK_MSG) += skmsg.o
|
||||
obj-$(CONFIG_NET_PKTGEN) += pktgen.o
|
||||
obj-$(CONFIG_NETPOLL) += netpoll.o
|
||||
obj-$(CONFIG_FIB_RULES) += fib_rules.o
|
||||
@@ -28,10 +27,13 @@ obj-$(CONFIG_CGROUP_NET_PRIO) += netprio_cgroup.o
|
||||
obj-$(CONFIG_CGROUP_NET_CLASSID) += netclassid_cgroup.o
|
||||
obj-$(CONFIG_LWTUNNEL) += lwtunnel.o
|
||||
obj-$(CONFIG_LWTUNNEL_BPF) += lwt_bpf.o
|
||||
obj-$(CONFIG_BPF_STREAM_PARSER) += sock_map.o
|
||||
obj-$(CONFIG_DST_CACHE) += dst_cache.o
|
||||
obj-$(CONFIG_HWBM) += hwbm.o
|
||||
obj-$(CONFIG_NET_DEVLINK) += devlink.o
|
||||
obj-$(CONFIG_GRO_CELLS) += gro_cells.o
|
||||
obj-$(CONFIG_FAILOVER) += failover.o
|
||||
ifeq ($(CONFIG_INET),y)
|
||||
obj-$(CONFIG_NET_SOCK_MSG) += skmsg.o
|
||||
obj-$(CONFIG_BPF_SYSCALL) += sock_map.o
|
||||
endif
|
||||
obj-$(CONFIG_BPF_SYSCALL) += bpf_sk_storage.o
|
||||
|
||||
145
net/core/skmsg.c
145
net/core/skmsg.c
@@ -664,15 +664,15 @@ static void sk_psock_link_destroy(struct sk_psock *psock)
|
||||
}
|
||||
}
|
||||
|
||||
static void sk_psock_done_strp(struct sk_psock *psock);
|
||||
|
||||
static void sk_psock_destroy_deferred(struct work_struct *gc)
|
||||
{
|
||||
struct sk_psock *psock = container_of(gc, struct sk_psock, gc);
|
||||
|
||||
/* No sk_callback_lock since already detached. */
|
||||
|
||||
/* Parser has been stopped */
|
||||
if (psock->progs.skb_parser)
|
||||
strp_done(&psock->parser.strp);
|
||||
sk_psock_done_strp(psock);
|
||||
|
||||
cancel_work_sync(&psock->work);
|
||||
|
||||
@@ -769,14 +769,6 @@ static int sk_psock_bpf_run(struct sk_psock *psock, struct bpf_prog *prog,
|
||||
return bpf_prog_run_pin_on_cpu(prog, skb);
|
||||
}
|
||||
|
||||
static struct sk_psock *sk_psock_from_strp(struct strparser *strp)
|
||||
{
|
||||
struct sk_psock_parser *parser;
|
||||
|
||||
parser = container_of(strp, struct sk_psock_parser, strp);
|
||||
return container_of(parser, struct sk_psock, parser);
|
||||
}
|
||||
|
||||
static void sk_psock_skb_redirect(struct sk_buff *skb)
|
||||
{
|
||||
struct sk_psock *psock_other;
|
||||
@@ -880,6 +872,24 @@ out_free:
|
||||
}
|
||||
}
|
||||
|
||||
static void sk_psock_write_space(struct sock *sk)
|
||||
{
|
||||
struct sk_psock *psock;
|
||||
void (*write_space)(struct sock *sk) = NULL;
|
||||
|
||||
rcu_read_lock();
|
||||
psock = sk_psock(sk);
|
||||
if (likely(psock)) {
|
||||
if (sk_psock_test_state(psock, SK_PSOCK_TX_ENABLED))
|
||||
schedule_work(&psock->work);
|
||||
write_space = psock->saved_write_space;
|
||||
}
|
||||
rcu_read_unlock();
|
||||
if (write_space)
|
||||
write_space(sk);
|
||||
}
|
||||
|
||||
#if IS_ENABLED(CONFIG_BPF_STREAM_PARSER)
|
||||
static void sk_psock_strp_read(struct strparser *strp, struct sk_buff *skb)
|
||||
{
|
||||
struct sk_psock *psock;
|
||||
@@ -912,6 +922,14 @@ static int sk_psock_strp_read_done(struct strparser *strp, int err)
|
||||
return err;
|
||||
}
|
||||
|
||||
static struct sk_psock *sk_psock_from_strp(struct strparser *strp)
|
||||
{
|
||||
struct sk_psock_parser *parser;
|
||||
|
||||
parser = container_of(strp, struct sk_psock_parser, strp);
|
||||
return container_of(parser, struct sk_psock, parser);
|
||||
}
|
||||
|
||||
static int sk_psock_strp_parse(struct strparser *strp, struct sk_buff *skb)
|
||||
{
|
||||
struct sk_psock *psock = sk_psock_from_strp(strp);
|
||||
@@ -948,6 +966,56 @@ static void sk_psock_strp_data_ready(struct sock *sk)
|
||||
rcu_read_unlock();
|
||||
}
|
||||
|
||||
int sk_psock_init_strp(struct sock *sk, struct sk_psock *psock)
|
||||
{
|
||||
static const struct strp_callbacks cb = {
|
||||
.rcv_msg = sk_psock_strp_read,
|
||||
.read_sock_done = sk_psock_strp_read_done,
|
||||
.parse_msg = sk_psock_strp_parse,
|
||||
};
|
||||
|
||||
psock->parser.enabled = false;
|
||||
return strp_init(&psock->parser.strp, sk, &cb);
|
||||
}
|
||||
|
||||
void sk_psock_start_strp(struct sock *sk, struct sk_psock *psock)
|
||||
{
|
||||
struct sk_psock_parser *parser = &psock->parser;
|
||||
|
||||
if (parser->enabled)
|
||||
return;
|
||||
|
||||
parser->saved_data_ready = sk->sk_data_ready;
|
||||
sk->sk_data_ready = sk_psock_strp_data_ready;
|
||||
sk->sk_write_space = sk_psock_write_space;
|
||||
parser->enabled = true;
|
||||
}
|
||||
|
||||
void sk_psock_stop_strp(struct sock *sk, struct sk_psock *psock)
|
||||
{
|
||||
struct sk_psock_parser *parser = &psock->parser;
|
||||
|
||||
if (!parser->enabled)
|
||||
return;
|
||||
|
||||
sk->sk_data_ready = parser->saved_data_ready;
|
||||
parser->saved_data_ready = NULL;
|
||||
strp_stop(&parser->strp);
|
||||
parser->enabled = false;
|
||||
}
|
||||
|
||||
static void sk_psock_done_strp(struct sk_psock *psock)
|
||||
{
|
||||
/* Parser has been stopped */
|
||||
if (psock->progs.skb_parser)
|
||||
strp_done(&psock->parser.strp);
|
||||
}
|
||||
#else
|
||||
static void sk_psock_done_strp(struct sk_psock *psock)
|
||||
{
|
||||
}
|
||||
#endif /* CONFIG_BPF_STREAM_PARSER */
|
||||
|
||||
static int sk_psock_verdict_recv(read_descriptor_t *desc, struct sk_buff *skb,
|
||||
unsigned int offset, size_t orig_len)
|
||||
{
|
||||
@@ -1000,35 +1068,6 @@ static void sk_psock_verdict_data_ready(struct sock *sk)
|
||||
sock->ops->read_sock(sk, &desc, sk_psock_verdict_recv);
|
||||
}
|
||||
|
||||
static void sk_psock_write_space(struct sock *sk)
|
||||
{
|
||||
struct sk_psock *psock;
|
||||
void (*write_space)(struct sock *sk) = NULL;
|
||||
|
||||
rcu_read_lock();
|
||||
psock = sk_psock(sk);
|
||||
if (likely(psock)) {
|
||||
if (sk_psock_test_state(psock, SK_PSOCK_TX_ENABLED))
|
||||
schedule_work(&psock->work);
|
||||
write_space = psock->saved_write_space;
|
||||
}
|
||||
rcu_read_unlock();
|
||||
if (write_space)
|
||||
write_space(sk);
|
||||
}
|
||||
|
||||
int sk_psock_init_strp(struct sock *sk, struct sk_psock *psock)
|
||||
{
|
||||
static const struct strp_callbacks cb = {
|
||||
.rcv_msg = sk_psock_strp_read,
|
||||
.read_sock_done = sk_psock_strp_read_done,
|
||||
.parse_msg = sk_psock_strp_parse,
|
||||
};
|
||||
|
||||
psock->parser.enabled = false;
|
||||
return strp_init(&psock->parser.strp, sk, &cb);
|
||||
}
|
||||
|
||||
void sk_psock_start_verdict(struct sock *sk, struct sk_psock *psock)
|
||||
{
|
||||
struct sk_psock_parser *parser = &psock->parser;
|
||||
@@ -1042,32 +1081,6 @@ void sk_psock_start_verdict(struct sock *sk, struct sk_psock *psock)
|
||||
parser->enabled = true;
|
||||
}
|
||||
|
||||
void sk_psock_start_strp(struct sock *sk, struct sk_psock *psock)
|
||||
{
|
||||
struct sk_psock_parser *parser = &psock->parser;
|
||||
|
||||
if (parser->enabled)
|
||||
return;
|
||||
|
||||
parser->saved_data_ready = sk->sk_data_ready;
|
||||
sk->sk_data_ready = sk_psock_strp_data_ready;
|
||||
sk->sk_write_space = sk_psock_write_space;
|
||||
parser->enabled = true;
|
||||
}
|
||||
|
||||
void sk_psock_stop_strp(struct sock *sk, struct sk_psock *psock)
|
||||
{
|
||||
struct sk_psock_parser *parser = &psock->parser;
|
||||
|
||||
if (!parser->enabled)
|
||||
return;
|
||||
|
||||
sk->sk_data_ready = parser->saved_data_ready;
|
||||
parser->saved_data_ready = NULL;
|
||||
strp_stop(&parser->strp);
|
||||
parser->enabled = false;
|
||||
}
|
||||
|
||||
void sk_psock_stop_verdict(struct sock *sk, struct sk_psock *psock)
|
||||
{
|
||||
struct sk_psock_parser *parser = &psock->parser;
|
||||
|
||||
@@ -1506,9 +1506,11 @@ int sock_map_prog_update(struct bpf_map *map, struct bpf_prog *prog,
|
||||
case BPF_SK_MSG_VERDICT:
|
||||
pprog = &progs->msg_parser;
|
||||
break;
|
||||
#if IS_ENABLED(CONFIG_BPF_STREAM_PARSER)
|
||||
case BPF_SK_SKB_STREAM_PARSER:
|
||||
pprog = &progs->skb_parser;
|
||||
break;
|
||||
#endif
|
||||
case BPF_SK_SKB_STREAM_VERDICT:
|
||||
pprog = &progs->skb_verdict;
|
||||
break;
|
||||
|
||||
@@ -62,7 +62,7 @@ obj-$(CONFIG_TCP_CONG_LP) += tcp_lp.o
|
||||
obj-$(CONFIG_TCP_CONG_YEAH) += tcp_yeah.o
|
||||
obj-$(CONFIG_TCP_CONG_ILLINOIS) += tcp_illinois.o
|
||||
obj-$(CONFIG_NET_SOCK_MSG) += tcp_bpf.o
|
||||
obj-$(CONFIG_BPF_STREAM_PARSER) += udp_bpf.o
|
||||
obj-$(CONFIG_BPF_SYSCALL) += udp_bpf.o
|
||||
obj-$(CONFIG_NETLABEL) += cipso_ipv4.o
|
||||
|
||||
obj-$(CONFIG_XFRM) += xfrm4_policy.o xfrm4_state.o xfrm4_input.o \
|
||||
|
||||
@@ -478,22 +478,11 @@ static void tcp_tx_timestamp(struct sock *sk, u16 tsflags)
|
||||
}
|
||||
}
|
||||
|
||||
static inline bool tcp_stream_is_readable(const struct tcp_sock *tp,
|
||||
int target, struct sock *sk)
|
||||
static bool tcp_stream_is_readable(struct sock *sk, int target)
|
||||
{
|
||||
int avail = READ_ONCE(tp->rcv_nxt) - READ_ONCE(tp->copied_seq);
|
||||
|
||||
if (avail > 0) {
|
||||
if (avail >= target)
|
||||
return true;
|
||||
if (tcp_rmem_pressure(sk))
|
||||
return true;
|
||||
if (tcp_receive_window(tp) <= inet_csk(sk)->icsk_ack.rcv_mss)
|
||||
return true;
|
||||
}
|
||||
if (sk->sk_prot->stream_memory_read)
|
||||
return sk->sk_prot->stream_memory_read(sk);
|
||||
return false;
|
||||
if (tcp_epollin_ready(sk, target))
|
||||
return true;
|
||||
return sk_is_readable(sk);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -567,7 +556,7 @@ __poll_t tcp_poll(struct file *file, struct socket *sock, poll_table *wait)
|
||||
tp->urg_data)
|
||||
target++;
|
||||
|
||||
if (tcp_stream_is_readable(tp, target, sk))
|
||||
if (tcp_stream_is_readable(sk, target))
|
||||
mask |= EPOLLIN | EPOLLRDNORM;
|
||||
|
||||
if (!(shutdown & SEND_SHUTDOWN)) {
|
||||
|
||||
@@ -232,8 +232,8 @@ int tcp_bpf_sendmsg_redir(struct sock *sk, struct sk_msg *msg,
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(tcp_bpf_sendmsg_redir);
|
||||
|
||||
#ifdef CONFIG_BPF_STREAM_PARSER
|
||||
static bool tcp_bpf_stream_read(const struct sock *sk)
|
||||
#ifdef CONFIG_BPF_SYSCALL
|
||||
static bool tcp_bpf_sock_is_readable(struct sock *sk)
|
||||
{
|
||||
struct sk_psock *psock;
|
||||
bool empty = true;
|
||||
@@ -582,7 +582,7 @@ static void tcp_bpf_rebuild_protos(struct proto prot[TCP_BPF_NUM_CFGS],
|
||||
prot[TCP_BPF_BASE].destroy = sock_map_destroy;
|
||||
prot[TCP_BPF_BASE].close = sock_map_close;
|
||||
prot[TCP_BPF_BASE].recvmsg = tcp_bpf_recvmsg;
|
||||
prot[TCP_BPF_BASE].stream_memory_read = tcp_bpf_stream_read;
|
||||
prot[TCP_BPF_BASE].sock_is_readable = tcp_bpf_sock_is_readable;
|
||||
|
||||
prot[TCP_BPF_TX] = prot[TCP_BPF_BASE];
|
||||
prot[TCP_BPF_TX].sendmsg = tcp_bpf_sendmsg;
|
||||
@@ -646,4 +646,4 @@ void tcp_bpf_clone(const struct sock *sk, struct sock *newsk)
|
||||
if (is_insidevar(prot, tcp_bpf_prots))
|
||||
newsk->sk_prot = sk->sk_prot_creator;
|
||||
}
|
||||
#endif /* CONFIG_BPF_STREAM_PARSER */
|
||||
#endif /* CONFIG_BPF_SYSCALL */
|
||||
|
||||
@@ -5030,15 +5030,8 @@ err:
|
||||
|
||||
void tcp_data_ready(struct sock *sk)
|
||||
{
|
||||
const struct tcp_sock *tp = tcp_sk(sk);
|
||||
int avail = tp->rcv_nxt - tp->copied_seq;
|
||||
|
||||
if (avail < sk->sk_rcvlowat && !tcp_rmem_pressure(sk) &&
|
||||
!sock_flag(sk, SOCK_DONE) &&
|
||||
tcp_receive_window(tp) > inet_csk(sk)->icsk_ack.rcv_mss)
|
||||
return;
|
||||
|
||||
sk->sk_data_ready(sk);
|
||||
if (tcp_epollin_ready(sk, sk->sk_rcvlowat) || sock_flag(sk, SOCK_DONE))
|
||||
sk->sk_data_ready(sk);
|
||||
}
|
||||
|
||||
static void tcp_data_queue(struct sock *sk, struct sk_buff *skb)
|
||||
|
||||
@@ -1140,8 +1140,10 @@ int netlbl_conn_setattr(struct sock *sk,
|
||||
break;
|
||||
#if IS_ENABLED(CONFIG_IPV6)
|
||||
case AF_INET6:
|
||||
if (sk->sk_family != AF_INET6)
|
||||
return -EAFNOSUPPORT;
|
||||
if (sk->sk_family != AF_INET6) {
|
||||
ret_val = -EAFNOSUPPORT;
|
||||
goto conn_setattr_return;
|
||||
}
|
||||
|
||||
addr6 = (struct sockaddr_in6 *)addr;
|
||||
entry = netlbl_domhsh_getentry_af6(secattr->domain,
|
||||
|
||||
@@ -298,7 +298,7 @@ static void ets_class_qlen_notify(struct Qdisc *sch, unsigned long arg)
|
||||
* to remove them.
|
||||
*/
|
||||
if (!ets_class_is_strict(q, cl) && sch->q.qlen)
|
||||
list_del(&cl->alist);
|
||||
list_del_init(&cl->alist);
|
||||
}
|
||||
|
||||
static int ets_class_dump(struct Qdisc *sch, unsigned long arg,
|
||||
@@ -499,7 +499,7 @@ static struct sk_buff *ets_qdisc_dequeue(struct Qdisc *sch)
|
||||
if (unlikely(!skb))
|
||||
goto out;
|
||||
if (cl->qdisc->q.qlen == 0)
|
||||
list_del(&cl->alist);
|
||||
list_del_init(&cl->alist);
|
||||
return ets_qdisc_dequeue_skb(sch, skb);
|
||||
}
|
||||
|
||||
@@ -674,8 +674,8 @@ static int ets_qdisc_change(struct Qdisc *sch, struct nlattr *opt,
|
||||
}
|
||||
for (i = q->nbands; i < oldbands; i++) {
|
||||
if (i >= q->nstrict && q->classes[i].qdisc->q.qlen)
|
||||
list_del(&q->classes[i].alist);
|
||||
qdisc_tree_flush_backlog(q->classes[i].qdisc);
|
||||
list_del_init(&q->classes[i].alist);
|
||||
qdisc_purge_queue(q->classes[i].qdisc);
|
||||
}
|
||||
q->nstrict = nstrict;
|
||||
memcpy(q->prio2band, priomap, sizeof(priomap));
|
||||
@@ -723,7 +723,7 @@ static void ets_qdisc_reset(struct Qdisc *sch)
|
||||
|
||||
for (band = q->nstrict; band < q->nbands; band++) {
|
||||
if (q->classes[band].qdisc->q.qlen)
|
||||
list_del(&q->classes[band].alist);
|
||||
list_del_init(&q->classes[band].alist);
|
||||
}
|
||||
for (band = 0; band < q->nbands; band++)
|
||||
qdisc_reset(q->classes[band].qdisc);
|
||||
|
||||
@@ -211,7 +211,7 @@ static int prio_tune(struct Qdisc *sch, struct nlattr *opt,
|
||||
memcpy(q->prio2band, qopt->priomap, TC_PRIO_MAX+1);
|
||||
|
||||
for (i = q->bands; i < oldbands; i++)
|
||||
qdisc_tree_flush_backlog(q->queues[i]);
|
||||
qdisc_purge_queue(q->queues[i]);
|
||||
|
||||
for (i = oldbands; i < q->bands; i++) {
|
||||
q->queues[i] = queues[i];
|
||||
|
||||
@@ -283,7 +283,7 @@ static int __red_change(struct Qdisc *sch, struct nlattr **tb,
|
||||
q->userbits = userbits;
|
||||
q->limit = ctl->limit;
|
||||
if (child) {
|
||||
qdisc_tree_flush_backlog(q->qdisc);
|
||||
qdisc_purge_queue(q->qdisc);
|
||||
old_child = q->qdisc;
|
||||
q->qdisc = child;
|
||||
}
|
||||
|
||||
@@ -317,7 +317,10 @@ drop:
|
||||
/* It is difficult to believe, but ALL THE SLOTS HAVE LENGTH 1. */
|
||||
x = q->tail->next;
|
||||
slot = &q->slots[x];
|
||||
q->tail->next = slot->next;
|
||||
if (slot->next == x)
|
||||
q->tail = NULL; /* no more active slots */
|
||||
else
|
||||
q->tail->next = slot->next;
|
||||
q->ht[slot->hash] = SFQ_EMPTY_SLOT;
|
||||
goto drop;
|
||||
}
|
||||
|
||||
@@ -437,7 +437,7 @@ static int tbf_change(struct Qdisc *sch, struct nlattr *opt,
|
||||
|
||||
sch_tree_lock(sch);
|
||||
if (child) {
|
||||
qdisc_tree_flush_backlog(q->qdisc);
|
||||
qdisc_purge_queue(q->qdisc);
|
||||
old = q->qdisc;
|
||||
q->qdisc = child;
|
||||
}
|
||||
|
||||
@@ -731,12 +731,12 @@ static void build_protos(struct proto prot[TLS_NUM_CONFIG][TLS_NUM_CONFIG],
|
||||
|
||||
prot[TLS_BASE][TLS_SW] = prot[TLS_BASE][TLS_BASE];
|
||||
prot[TLS_BASE][TLS_SW].recvmsg = tls_sw_recvmsg;
|
||||
prot[TLS_BASE][TLS_SW].stream_memory_read = tls_sw_stream_read;
|
||||
prot[TLS_BASE][TLS_SW].sock_is_readable = tls_sw_sock_is_readable;
|
||||
prot[TLS_BASE][TLS_SW].close = tls_sk_proto_close;
|
||||
|
||||
prot[TLS_SW][TLS_SW] = prot[TLS_SW][TLS_BASE];
|
||||
prot[TLS_SW][TLS_SW].recvmsg = tls_sw_recvmsg;
|
||||
prot[TLS_SW][TLS_SW].stream_memory_read = tls_sw_stream_read;
|
||||
prot[TLS_SW][TLS_SW].sock_is_readable = tls_sw_sock_is_readable;
|
||||
prot[TLS_SW][TLS_SW].close = tls_sk_proto_close;
|
||||
|
||||
#ifdef CONFIG_TLS_DEVICE
|
||||
|
||||
@@ -2047,7 +2047,7 @@ splice_read_end:
|
||||
return copied ? : err;
|
||||
}
|
||||
|
||||
bool tls_sw_stream_read(const struct sock *sk)
|
||||
bool tls_sw_sock_is_readable(struct sock *sk)
|
||||
{
|
||||
struct tls_context *tls_ctx = tls_get_ctx(sk);
|
||||
struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx);
|
||||
|
||||
@@ -101,16 +101,16 @@ try-run = $(shell set -e; \
|
||||
fi)
|
||||
|
||||
# as-option
|
||||
# Usage: cflags-y += $(call as-option,-Wa$(comma)-isa=foo,)
|
||||
# Usage: aflags-y += $(call as-option,-Wa$(comma)-isa=foo,)
|
||||
|
||||
as-option = $(call try-run,\
|
||||
$(CC) $(KBUILD_CFLAGS) $(1) -c -x assembler /dev/null -o "$$TMP",$(1),$(2))
|
||||
$(CC) -Werror $(KBUILD_CPPFLAGS) $(KBUILD_AFLAGS) $(1) -c -x assembler-with-cpp /dev/null -o "$$TMP",$(1),$(2))
|
||||
|
||||
# as-instr
|
||||
# Usage: cflags-y += $(call as-instr,instr,option1,option2)
|
||||
# Usage: aflags-y += $(call as-instr,instr,option1,option2)
|
||||
|
||||
as-instr = $(call try-run,\
|
||||
printf "%b\n" "$(1)" | $(CC) $(KBUILD_AFLAGS) -c -x assembler -o "$$TMP" -,$(2),$(3))
|
||||
printf "%b\n" "$(1)" | $(CC) -Werror $(CLANG_FLAGS) $(KBUILD_AFLAGS) -c -x assembler-with-cpp -o "$$TMP" -,$(2),$(3))
|
||||
|
||||
# __cc-option
|
||||
# Usage: MY_CFLAGS += $(call __cc-option,$(CC),$(MY_CFLAGS),-march=winchip-c6,-march=i586)
|
||||
|
||||
@@ -33,7 +33,7 @@ ld-option = $(success,$(LD) -v $(1))
|
||||
|
||||
# $(as-instr,<instr>)
|
||||
# Return y if the assembler supports <instr>, n otherwise
|
||||
as-instr = $(success,printf "%b\n" "$(1)" | $(CC) $(CLANG_FLAGS) -c -x assembler -o /dev/null -)
|
||||
as-instr = $(success,printf "%b\n" "$(1)" | $(CC) $(CLANG_FLAGS) -c -x assembler-with-cpp -o /dev/null -)
|
||||
|
||||
# check if $(CC) and $(LD) exist
|
||||
$(error-if,$(failure,command -v $(CC)),compiler '$(CC)' not found)
|
||||
|
||||
@@ -45,7 +45,7 @@ orig_args="$@"
|
||||
# Get the first line of the --version output.
|
||||
IFS='
|
||||
'
|
||||
set -- $(LC_ALL=C "$@" -Wa,--version -c -x assembler /dev/null -o /dev/null 2>/dev/null)
|
||||
set -- $(LC_ALL=C "$@" -Wa,--version -c -x assembler-with-cpp /dev/null -o /dev/null 2>/dev/null)
|
||||
|
||||
# Split the line on spaces.
|
||||
IFS=' '
|
||||
|
||||
@@ -245,7 +245,7 @@ static int meson_card_parse_of_optional(struct snd_soc_card *card,
|
||||
const char *p))
|
||||
{
|
||||
/* If property is not provided, don't fail ... */
|
||||
if (!of_property_read_bool(card->dev->of_node, propname))
|
||||
if (!of_property_present(card->dev->of_node, propname))
|
||||
return 0;
|
||||
|
||||
/* ... but do fail if it is provided and the parsing fails */
|
||||
|
||||
@@ -78,6 +78,10 @@ static int sdm845_slim_snd_hw_params(struct snd_pcm_substream *substream,
|
||||
else
|
||||
ret = snd_soc_dai_set_channel_map(cpu_dai, tx_ch_cnt,
|
||||
tx_ch, 0, NULL);
|
||||
if (ret != 0 && ret != -ENOTSUPP) {
|
||||
dev_err(rtd->dev, "failed to set cpu chan map, err:%d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -10,7 +10,7 @@ UAPI_CFLAGS := -std=c90 -Wall -Werror=implicit-function-declaration
|
||||
|
||||
# In theory, we do not care -m32 or -m64 for header compile tests.
|
||||
# It is here just because CONFIG_CC_CAN_LINK is tested with -m32 or -m64.
|
||||
UAPI_CFLAGS += $(filter -m32 -m64, $(KBUILD_CFLAGS))
|
||||
UAPI_CFLAGS += $(filter -m32 -m64, $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS))
|
||||
|
||||
# USERCFLAGS might contain sysroot location for CC.
|
||||
UAPI_CFLAGS += $(USERCFLAGS)
|
||||
|
||||
Reference in New Issue
Block a user