Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Conflicts: drivers/net/ethernet/ibm/ibmvnic.c Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Коммит
55fd59b003
|
@ -137,15 +137,24 @@ Boot Kernel With a Boot Config
|
|||
==============================
|
||||
|
||||
Since the boot configuration file is loaded with initrd, it will be added
|
||||
to the end of the initrd (initramfs) image file with size, checksum and
|
||||
12-byte magic word as below.
|
||||
to the end of the initrd (initramfs) image file with padding, size,
|
||||
checksum and 12-byte magic word as below.
|
||||
|
||||
[initrd][bootconfig][size(u32)][checksum(u32)][#BOOTCONFIG\n]
|
||||
[initrd][bootconfig][padding][size(le32)][checksum(le32)][#BOOTCONFIG\n]
|
||||
|
||||
The size and checksum fields are unsigned 32bit little endian value.
|
||||
|
||||
When the boot configuration is added to the initrd image, the total
|
||||
file size is aligned to 4 bytes. To fill the gap, null characters
|
||||
(``\0``) will be added. Thus the ``size`` is the length of the bootconfig
|
||||
file + padding bytes.
|
||||
|
||||
The Linux kernel decodes the last part of the initrd image in memory to
|
||||
get the boot configuration data.
|
||||
Because of this "piggyback" method, there is no need to change or
|
||||
update the boot loader and the kernel image itself.
|
||||
update the boot loader and the kernel image itself as long as the boot
|
||||
loader passes the correct initrd file size. If by any chance, the boot
|
||||
loader passes a longer size, the kernel feils to find the bootconfig data.
|
||||
|
||||
To do this operation, Linux kernel provides "bootconfig" command under
|
||||
tools/bootconfig, which allows admin to apply or delete the config file
|
||||
|
@ -176,7 +185,8 @@ up to 512 key-value pairs. If keys contains 3 words in average, it can
|
|||
contain 256 key-value pairs. In most cases, the number of config items
|
||||
will be under 100 entries and smaller than 8KB, so it would be enough.
|
||||
If the node number exceeds 1024, parser returns an error even if the file
|
||||
size is smaller than 32KB.
|
||||
size is smaller than 32KB. (Note that this maximum size is not including
|
||||
the padding null characters.)
|
||||
Anyway, since bootconfig command verifies it when appending a boot config
|
||||
to initrd image, user can notice it before boot.
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ tcan4x5x: tcan4x5x@0 {
|
|||
spi-max-frequency = <10000000>;
|
||||
bosch,mram-cfg = <0x0 0 0 32 0 0 1 1>;
|
||||
interrupt-parent = <&gpio1>;
|
||||
interrupts = <14 GPIO_ACTIVE_LOW>;
|
||||
interrupts = <14 IRQ_TYPE_LEVEL_LOW>;
|
||||
device-state-gpios = <&gpio3 21 GPIO_ACTIVE_HIGH>;
|
||||
device-wake-gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
|
||||
reset-gpios = <&gpio1 27 GPIO_ACTIVE_HIGH>;
|
||||
|
|
|
@ -25,7 +25,7 @@ Example (for ARM-based BeagleBone with NPC100 NFC controller on I2C2):
|
|||
clock-frequency = <100000>;
|
||||
|
||||
interrupt-parent = <&gpio1>;
|
||||
interrupts = <29 GPIO_ACTIVE_HIGH>;
|
||||
interrupts = <29 IRQ_TYPE_LEVEL_HIGH>;
|
||||
|
||||
enable-gpios = <&gpio0 30 GPIO_ACTIVE_HIGH>;
|
||||
firmware-gpios = <&gpio0 31 GPIO_ACTIVE_HIGH>;
|
||||
|
|
|
@ -25,7 +25,7 @@ Example (for ARM-based BeagleBone with PN544 on I2C2):
|
|||
clock-frequency = <400000>;
|
||||
|
||||
interrupt-parent = <&gpio1>;
|
||||
interrupts = <17 GPIO_ACTIVE_HIGH>;
|
||||
interrupts = <17 IRQ_TYPE_LEVEL_HIGH>;
|
||||
|
||||
enable-gpios = <&gpio3 21 GPIO_ACTIVE_HIGH>;
|
||||
firmware-gpios = <&gpio3 19 GPIO_ACTIVE_HIGH>;
|
||||
|
|
|
@ -57,9 +57,8 @@ to enable them. ::
|
|||
They can be enabled individually. The full list of the parameters: ::
|
||||
|
||||
make CC=clang LD=ld.lld AR=llvm-ar NM=llvm-nm STRIP=llvm-strip \
|
||||
OBJCOPY=llvm-objcopy OBJDUMP=llvm-objdump OBJSIZE=llvm-size \
|
||||
READELF=llvm-readelf HOSTCC=clang HOSTCXX=clang++ HOSTAR=llvm-ar \
|
||||
HOSTLD=ld.lld
|
||||
OBJCOPY=llvm-objcopy OBJDUMP=llvm-objdump READELF=llvm-readelf \
|
||||
HOSTCC=clang HOSTCXX=clang++ HOSTAR=llvm-ar HOSTLD=ld.lld
|
||||
|
||||
Currently, the integrated assembler is disabled by default. You can pass
|
||||
``LLVM_IAS=1`` to enable it.
|
||||
|
|
30
MAINTAINERS
30
MAINTAINERS
|
@ -1724,11 +1724,13 @@ F: arch/arm/mach-ep93xx/micro9.c
|
|||
|
||||
ARM/CORESIGHT FRAMEWORK AND DRIVERS
|
||||
M: Mathieu Poirier <mathieu.poirier@linaro.org>
|
||||
R: Suzuki K Poulose <suzuki.poulose@arm.com>
|
||||
M: Suzuki K Poulose <suzuki.poulose@arm.com>
|
||||
R: Mike Leach <mike.leach@linaro.org>
|
||||
R: Leo Yan <leo.yan@linaro.org>
|
||||
L: coresight@lists.linaro.org (moderated for non-subscribers)
|
||||
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
|
||||
S: Maintained
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/coresight/linux.git
|
||||
F: Documentation/ABI/testing/sysfs-bus-coresight-devices-*
|
||||
F: Documentation/devicetree/bindings/arm/coresight-cpu-debug.txt
|
||||
F: Documentation/devicetree/bindings/arm/coresight-cti.yaml
|
||||
|
@ -3355,6 +3357,17 @@ S: Supported
|
|||
F: arch/x86/net/
|
||||
X: arch/x86/net/bpf_jit_comp32.c
|
||||
|
||||
BPF LSM (Security Audit and Enforcement using BPF)
|
||||
M: KP Singh <kpsingh@chromium.org>
|
||||
R: Florent Revest <revest@chromium.org>
|
||||
R: Brendan Jackman <jackmanb@chromium.org>
|
||||
L: bpf@vger.kernel.org
|
||||
S: Maintained
|
||||
F: Documentation/bpf/bpf_lsm.rst
|
||||
F: include/linux/bpf_lsm.h
|
||||
F: kernel/bpf/bpf_lsm.c
|
||||
F: security/bpf/
|
||||
|
||||
BROADCOM B44 10/100 ETHERNET DRIVER
|
||||
M: Michael Chan <michael.chan@broadcom.com>
|
||||
L: netdev@vger.kernel.org
|
||||
|
@ -9070,10 +9083,7 @@ S: Supported
|
|||
F: drivers/net/wireless/intel/iwlegacy/
|
||||
|
||||
INTEL WIRELESS WIFI LINK (iwlwifi)
|
||||
M: Johannes Berg <johannes.berg@intel.com>
|
||||
M: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
|
||||
M: Luca Coelho <luciano.coelho@intel.com>
|
||||
M: Intel Linux Wireless <linuxwifi@intel.com>
|
||||
L: linux-wireless@vger.kernel.org
|
||||
S: Supported
|
||||
W: https://wireless.wiki.kernel.org/en/users/drivers/iwlwifi
|
||||
|
@ -19096,12 +19106,17 @@ L: netdev@vger.kernel.org
|
|||
L: bpf@vger.kernel.org
|
||||
S: Supported
|
||||
F: include/net/xdp.h
|
||||
F: include/net/xdp_priv.h
|
||||
F: include/trace/events/xdp.h
|
||||
F: kernel/bpf/cpumap.c
|
||||
F: kernel/bpf/devmap.c
|
||||
F: net/core/xdp.c
|
||||
N: xdp
|
||||
K: xdp
|
||||
F: samples/bpf/xdp*
|
||||
F: tools/testing/selftests/bpf/*xdp*
|
||||
F: tools/testing/selftests/bpf/*/*xdp*
|
||||
F: drivers/net/ethernet/*/*/*/*/*xdp*
|
||||
F: drivers/net/ethernet/*/*/*xdp*
|
||||
K: (?:\b|_)xdp(?:\b|_)
|
||||
|
||||
XDP SOCKETS (AF_XDP)
|
||||
M: Björn Töpel <bjorn.topel@intel.com>
|
||||
|
@ -19110,9 +19125,12 @@ R: Jonathan Lemon <jonathan.lemon@gmail.com>
|
|||
L: netdev@vger.kernel.org
|
||||
L: bpf@vger.kernel.org
|
||||
S: Maintained
|
||||
F: Documentation/networking/af_xdp.rst
|
||||
F: include/net/xdp_sock*
|
||||
F: include/net/xsk_buff_pool.h
|
||||
F: include/uapi/linux/if_xdp.h
|
||||
F: include/uapi/linux/xdp_diag.h
|
||||
F: include/net/netns/xdp.h
|
||||
F: net/xdp/
|
||||
F: samples/bpf/xdpsock*
|
||||
F: tools/lib/bpf/xsk*
|
||||
|
|
6
Makefile
6
Makefile
|
@ -2,7 +2,7 @@
|
|||
VERSION = 5
|
||||
PATCHLEVEL = 10
|
||||
SUBLEVEL = 0
|
||||
EXTRAVERSION = -rc5
|
||||
EXTRAVERSION = -rc6
|
||||
NAME = Kleptomaniac Octopus
|
||||
|
||||
# *DOCUMENTATION*
|
||||
|
@ -433,7 +433,6 @@ NM = llvm-nm
|
|||
OBJCOPY = llvm-objcopy
|
||||
OBJDUMP = llvm-objdump
|
||||
READELF = llvm-readelf
|
||||
OBJSIZE = llvm-size
|
||||
STRIP = llvm-strip
|
||||
else
|
||||
CC = $(CROSS_COMPILE)gcc
|
||||
|
@ -443,7 +442,6 @@ NM = $(CROSS_COMPILE)nm
|
|||
OBJCOPY = $(CROSS_COMPILE)objcopy
|
||||
OBJDUMP = $(CROSS_COMPILE)objdump
|
||||
READELF = $(CROSS_COMPILE)readelf
|
||||
OBJSIZE = $(CROSS_COMPILE)size
|
||||
STRIP = $(CROSS_COMPILE)strip
|
||||
endif
|
||||
PAHOLE = pahole
|
||||
|
@ -509,7 +507,7 @@ KBUILD_LDFLAGS :=
|
|||
CLANG_FLAGS :=
|
||||
|
||||
export ARCH SRCARCH CONFIG_SHELL BASH HOSTCC KBUILD_HOSTCFLAGS CROSS_COMPILE LD CC
|
||||
export CPP AR NM STRIP OBJCOPY OBJDUMP OBJSIZE READELF PAHOLE RESOLVE_BTFIDS LEX YACC AWK INSTALLKERNEL
|
||||
export CPP AR NM STRIP OBJCOPY OBJDUMP READELF PAHOLE RESOLVE_BTFIDS LEX YACC AWK INSTALLKERNEL
|
||||
export PERL PYTHON PYTHON3 CHECK CHECKFLAGS MAKE UTS_MACHINE HOSTCXX
|
||||
export KGZIP KBZIP2 KLZOP LZMA LZ4 XZ ZSTD
|
||||
export KBUILD_HOSTCXXFLAGS KBUILD_HOSTLDFLAGS KBUILD_HOSTLDLIBS LDFLAGS_MODULE
|
||||
|
|
|
@ -57,7 +57,7 @@ EXPORT_SYMBOL(pm_power_off);
|
|||
void arch_cpu_idle(void)
|
||||
{
|
||||
wtint(0);
|
||||
local_irq_enable();
|
||||
raw_local_irq_enable();
|
||||
}
|
||||
|
||||
void arch_cpu_idle_dead(void)
|
||||
|
|
|
@ -71,7 +71,7 @@ void arch_cpu_idle(void)
|
|||
arm_pm_idle();
|
||||
else
|
||||
cpu_do_idle();
|
||||
local_irq_enable();
|
||||
raw_local_irq_enable();
|
||||
}
|
||||
|
||||
void arch_cpu_idle_prepare(void)
|
||||
|
|
|
@ -128,6 +128,9 @@ static inline void local_daif_inherit(struct pt_regs *regs)
|
|||
{
|
||||
unsigned long flags = regs->pstate & DAIF_MASK;
|
||||
|
||||
if (interrupts_enabled(regs))
|
||||
trace_hardirqs_on();
|
||||
|
||||
/*
|
||||
* We can't use local_daif_restore(regs->pstate) here as
|
||||
* system_has_prio_mask_debugging() won't restore the I bit if it can
|
||||
|
|
|
@ -31,7 +31,12 @@ static inline u32 disr_to_esr(u64 disr)
|
|||
return esr;
|
||||
}
|
||||
|
||||
asmlinkage void noinstr enter_el1_irq_or_nmi(struct pt_regs *regs);
|
||||
asmlinkage void noinstr exit_el1_irq_or_nmi(struct pt_regs *regs);
|
||||
asmlinkage void enter_from_user_mode(void);
|
||||
asmlinkage void exit_to_user_mode(void);
|
||||
void arm64_enter_nmi(struct pt_regs *regs);
|
||||
void arm64_exit_nmi(struct pt_regs *regs);
|
||||
void do_mem_abort(unsigned long addr, unsigned int esr, struct pt_regs *regs);
|
||||
void do_undefinstr(struct pt_regs *regs);
|
||||
void do_bti(struct pt_regs *regs);
|
||||
|
|
|
@ -193,6 +193,10 @@ struct pt_regs {
|
|||
/* Only valid when ARM64_HAS_IRQ_PRIO_MASKING is enabled. */
|
||||
u64 pmr_save;
|
||||
u64 stackframe[2];
|
||||
|
||||
/* Only valid for some EL1 exceptions. */
|
||||
u64 lockdep_hardirqs;
|
||||
u64 exit_rcu;
|
||||
};
|
||||
|
||||
static inline bool in_syscall(struct pt_regs const *regs)
|
||||
|
|
|
@ -987,7 +987,7 @@
|
|||
#define SYS_TFSR_EL1_TF0_SHIFT 0
|
||||
#define SYS_TFSR_EL1_TF1_SHIFT 1
|
||||
#define SYS_TFSR_EL1_TF0 (UL(1) << SYS_TFSR_EL1_TF0_SHIFT)
|
||||
#define SYS_TFSR_EL1_TF1 (UK(2) << SYS_TFSR_EL1_TF1_SHIFT)
|
||||
#define SYS_TFSR_EL1_TF1 (UL(1) << SYS_TFSR_EL1_TF1_SHIFT)
|
||||
|
||||
/* Safe value for MPIDR_EL1: Bit31:RES1, Bit30:U:0, Bit24:MT:0 */
|
||||
#define SYS_MPIDR_SAFE_VAL (BIT(31))
|
||||
|
|
|
@ -17,40 +17,164 @@
|
|||
#include <asm/mmu.h>
|
||||
#include <asm/sysreg.h>
|
||||
|
||||
static void notrace el1_abort(struct pt_regs *regs, unsigned long esr)
|
||||
/*
|
||||
* This is intended to match the logic in irqentry_enter(), handling the kernel
|
||||
* mode transitions only.
|
||||
*/
|
||||
static void noinstr enter_from_kernel_mode(struct pt_regs *regs)
|
||||
{
|
||||
regs->exit_rcu = false;
|
||||
|
||||
if (!IS_ENABLED(CONFIG_TINY_RCU) && is_idle_task(current)) {
|
||||
lockdep_hardirqs_off(CALLER_ADDR0);
|
||||
rcu_irq_enter();
|
||||
trace_hardirqs_off_finish();
|
||||
|
||||
regs->exit_rcu = true;
|
||||
return;
|
||||
}
|
||||
|
||||
lockdep_hardirqs_off(CALLER_ADDR0);
|
||||
rcu_irq_enter_check_tick();
|
||||
trace_hardirqs_off_finish();
|
||||
}
|
||||
|
||||
/*
|
||||
* This is intended to match the logic in irqentry_exit(), handling the kernel
|
||||
* mode transitions only, and with preemption handled elsewhere.
|
||||
*/
|
||||
static void noinstr exit_to_kernel_mode(struct pt_regs *regs)
|
||||
{
|
||||
lockdep_assert_irqs_disabled();
|
||||
|
||||
if (interrupts_enabled(regs)) {
|
||||
if (regs->exit_rcu) {
|
||||
trace_hardirqs_on_prepare();
|
||||
lockdep_hardirqs_on_prepare(CALLER_ADDR0);
|
||||
rcu_irq_exit();
|
||||
lockdep_hardirqs_on(CALLER_ADDR0);
|
||||
return;
|
||||
}
|
||||
|
||||
trace_hardirqs_on();
|
||||
} else {
|
||||
if (regs->exit_rcu)
|
||||
rcu_irq_exit();
|
||||
}
|
||||
}
|
||||
|
||||
void noinstr arm64_enter_nmi(struct pt_regs *regs)
|
||||
{
|
||||
regs->lockdep_hardirqs = lockdep_hardirqs_enabled();
|
||||
|
||||
__nmi_enter();
|
||||
lockdep_hardirqs_off(CALLER_ADDR0);
|
||||
lockdep_hardirq_enter();
|
||||
rcu_nmi_enter();
|
||||
|
||||
trace_hardirqs_off_finish();
|
||||
ftrace_nmi_enter();
|
||||
}
|
||||
|
||||
void noinstr arm64_exit_nmi(struct pt_regs *regs)
|
||||
{
|
||||
bool restore = regs->lockdep_hardirqs;
|
||||
|
||||
ftrace_nmi_exit();
|
||||
if (restore) {
|
||||
trace_hardirqs_on_prepare();
|
||||
lockdep_hardirqs_on_prepare(CALLER_ADDR0);
|
||||
}
|
||||
|
||||
rcu_nmi_exit();
|
||||
lockdep_hardirq_exit();
|
||||
if (restore)
|
||||
lockdep_hardirqs_on(CALLER_ADDR0);
|
||||
__nmi_exit();
|
||||
}
|
||||
|
||||
asmlinkage void noinstr enter_el1_irq_or_nmi(struct pt_regs *regs)
|
||||
{
|
||||
if (IS_ENABLED(CONFIG_ARM64_PSEUDO_NMI) && !interrupts_enabled(regs))
|
||||
arm64_enter_nmi(regs);
|
||||
else
|
||||
enter_from_kernel_mode(regs);
|
||||
}
|
||||
|
||||
asmlinkage void noinstr exit_el1_irq_or_nmi(struct pt_regs *regs)
|
||||
{
|
||||
if (IS_ENABLED(CONFIG_ARM64_PSEUDO_NMI) && !interrupts_enabled(regs))
|
||||
arm64_exit_nmi(regs);
|
||||
else
|
||||
exit_to_kernel_mode(regs);
|
||||
}
|
||||
|
||||
static void noinstr el1_abort(struct pt_regs *regs, unsigned long esr)
|
||||
{
|
||||
unsigned long far = read_sysreg(far_el1);
|
||||
|
||||
enter_from_kernel_mode(regs);
|
||||
local_daif_inherit(regs);
|
||||
far = untagged_addr(far);
|
||||
do_mem_abort(far, esr, regs);
|
||||
local_daif_mask();
|
||||
exit_to_kernel_mode(regs);
|
||||
}
|
||||
NOKPROBE_SYMBOL(el1_abort);
|
||||
|
||||
static void notrace el1_pc(struct pt_regs *regs, unsigned long esr)
|
||||
static void noinstr el1_pc(struct pt_regs *regs, unsigned long esr)
|
||||
{
|
||||
unsigned long far = read_sysreg(far_el1);
|
||||
|
||||
enter_from_kernel_mode(regs);
|
||||
local_daif_inherit(regs);
|
||||
do_sp_pc_abort(far, esr, regs);
|
||||
local_daif_mask();
|
||||
exit_to_kernel_mode(regs);
|
||||
}
|
||||
NOKPROBE_SYMBOL(el1_pc);
|
||||
|
||||
static void notrace el1_undef(struct pt_regs *regs)
|
||||
static void noinstr el1_undef(struct pt_regs *regs)
|
||||
{
|
||||
enter_from_kernel_mode(regs);
|
||||
local_daif_inherit(regs);
|
||||
do_undefinstr(regs);
|
||||
local_daif_mask();
|
||||
exit_to_kernel_mode(regs);
|
||||
}
|
||||
NOKPROBE_SYMBOL(el1_undef);
|
||||
|
||||
static void notrace el1_inv(struct pt_regs *regs, unsigned long esr)
|
||||
static void noinstr el1_inv(struct pt_regs *regs, unsigned long esr)
|
||||
{
|
||||
enter_from_kernel_mode(regs);
|
||||
local_daif_inherit(regs);
|
||||
bad_mode(regs, 0, esr);
|
||||
local_daif_mask();
|
||||
exit_to_kernel_mode(regs);
|
||||
}
|
||||
NOKPROBE_SYMBOL(el1_inv);
|
||||
|
||||
static void notrace el1_dbg(struct pt_regs *regs, unsigned long esr)
|
||||
static void noinstr arm64_enter_el1_dbg(struct pt_regs *regs)
|
||||
{
|
||||
regs->lockdep_hardirqs = lockdep_hardirqs_enabled();
|
||||
|
||||
lockdep_hardirqs_off(CALLER_ADDR0);
|
||||
rcu_nmi_enter();
|
||||
|
||||
trace_hardirqs_off_finish();
|
||||
}
|
||||
|
||||
static void noinstr arm64_exit_el1_dbg(struct pt_regs *regs)
|
||||
{
|
||||
bool restore = regs->lockdep_hardirqs;
|
||||
|
||||
if (restore) {
|
||||
trace_hardirqs_on_prepare();
|
||||
lockdep_hardirqs_on_prepare(CALLER_ADDR0);
|
||||
}
|
||||
|
||||
rcu_nmi_exit();
|
||||
if (restore)
|
||||
lockdep_hardirqs_on(CALLER_ADDR0);
|
||||
}
|
||||
|
||||
static void noinstr el1_dbg(struct pt_regs *regs, unsigned long esr)
|
||||
{
|
||||
unsigned long far = read_sysreg(far_el1);
|
||||
|
||||
|
@ -62,18 +186,21 @@ static void notrace el1_dbg(struct pt_regs *regs, unsigned long esr)
|
|||
if (system_uses_irq_prio_masking())
|
||||
gic_write_pmr(GIC_PRIO_IRQON | GIC_PRIO_PSR_I_SET);
|
||||
|
||||
arm64_enter_el1_dbg(regs);
|
||||
do_debug_exception(far, esr, regs);
|
||||
arm64_exit_el1_dbg(regs);
|
||||
}
|
||||
NOKPROBE_SYMBOL(el1_dbg);
|
||||
|
||||
static void notrace el1_fpac(struct pt_regs *regs, unsigned long esr)
|
||||
static void noinstr el1_fpac(struct pt_regs *regs, unsigned long esr)
|
||||
{
|
||||
enter_from_kernel_mode(regs);
|
||||
local_daif_inherit(regs);
|
||||
do_ptrauth_fault(regs, esr);
|
||||
local_daif_mask();
|
||||
exit_to_kernel_mode(regs);
|
||||
}
|
||||
NOKPROBE_SYMBOL(el1_fpac);
|
||||
|
||||
asmlinkage void notrace el1_sync_handler(struct pt_regs *regs)
|
||||
asmlinkage void noinstr el1_sync_handler(struct pt_regs *regs)
|
||||
{
|
||||
unsigned long esr = read_sysreg(esr_el1);
|
||||
|
||||
|
@ -106,20 +233,34 @@ asmlinkage void notrace el1_sync_handler(struct pt_regs *regs)
|
|||
el1_inv(regs, esr);
|
||||
}
|
||||
}
|
||||
NOKPROBE_SYMBOL(el1_sync_handler);
|
||||
|
||||
static void notrace el0_da(struct pt_regs *regs, unsigned long esr)
|
||||
asmlinkage void noinstr enter_from_user_mode(void)
|
||||
{
|
||||
lockdep_hardirqs_off(CALLER_ADDR0);
|
||||
CT_WARN_ON(ct_state() != CONTEXT_USER);
|
||||
user_exit_irqoff();
|
||||
trace_hardirqs_off_finish();
|
||||
}
|
||||
|
||||
asmlinkage void noinstr exit_to_user_mode(void)
|
||||
{
|
||||
trace_hardirqs_on_prepare();
|
||||
lockdep_hardirqs_on_prepare(CALLER_ADDR0);
|
||||
user_enter_irqoff();
|
||||
lockdep_hardirqs_on(CALLER_ADDR0);
|
||||
}
|
||||
|
||||
static void noinstr el0_da(struct pt_regs *regs, unsigned long esr)
|
||||
{
|
||||
unsigned long far = read_sysreg(far_el1);
|
||||
|
||||
user_exit_irqoff();
|
||||
enter_from_user_mode();
|
||||
local_daif_restore(DAIF_PROCCTX);
|
||||
far = untagged_addr(far);
|
||||
do_mem_abort(far, esr, regs);
|
||||
}
|
||||
NOKPROBE_SYMBOL(el0_da);
|
||||
|
||||
static void notrace el0_ia(struct pt_regs *regs, unsigned long esr)
|
||||
static void noinstr el0_ia(struct pt_regs *regs, unsigned long esr)
|
||||
{
|
||||
unsigned long far = read_sysreg(far_el1);
|
||||
|
||||
|
@ -131,90 +272,80 @@ static void notrace el0_ia(struct pt_regs *regs, unsigned long esr)
|
|||
if (!is_ttbr0_addr(far))
|
||||
arm64_apply_bp_hardening();
|
||||
|
||||
user_exit_irqoff();
|
||||
enter_from_user_mode();
|
||||
local_daif_restore(DAIF_PROCCTX);
|
||||
do_mem_abort(far, esr, regs);
|
||||
}
|
||||
NOKPROBE_SYMBOL(el0_ia);
|
||||
|
||||
static void notrace el0_fpsimd_acc(struct pt_regs *regs, unsigned long esr)
|
||||
static void noinstr el0_fpsimd_acc(struct pt_regs *regs, unsigned long esr)
|
||||
{
|
||||
user_exit_irqoff();
|
||||
enter_from_user_mode();
|
||||
local_daif_restore(DAIF_PROCCTX);
|
||||
do_fpsimd_acc(esr, regs);
|
||||
}
|
||||
NOKPROBE_SYMBOL(el0_fpsimd_acc);
|
||||
|
||||
static void notrace el0_sve_acc(struct pt_regs *regs, unsigned long esr)
|
||||
static void noinstr el0_sve_acc(struct pt_regs *regs, unsigned long esr)
|
||||
{
|
||||
user_exit_irqoff();
|
||||
enter_from_user_mode();
|
||||
local_daif_restore(DAIF_PROCCTX);
|
||||
do_sve_acc(esr, regs);
|
||||
}
|
||||
NOKPROBE_SYMBOL(el0_sve_acc);
|
||||
|
||||
static void notrace el0_fpsimd_exc(struct pt_regs *regs, unsigned long esr)
|
||||
static void noinstr el0_fpsimd_exc(struct pt_regs *regs, unsigned long esr)
|
||||
{
|
||||
user_exit_irqoff();
|
||||
enter_from_user_mode();
|
||||
local_daif_restore(DAIF_PROCCTX);
|
||||
do_fpsimd_exc(esr, regs);
|
||||
}
|
||||
NOKPROBE_SYMBOL(el0_fpsimd_exc);
|
||||
|
||||
static void notrace el0_sys(struct pt_regs *regs, unsigned long esr)
|
||||
static void noinstr el0_sys(struct pt_regs *regs, unsigned long esr)
|
||||
{
|
||||
user_exit_irqoff();
|
||||
enter_from_user_mode();
|
||||
local_daif_restore(DAIF_PROCCTX);
|
||||
do_sysinstr(esr, regs);
|
||||
}
|
||||
NOKPROBE_SYMBOL(el0_sys);
|
||||
|
||||
static void notrace el0_pc(struct pt_regs *regs, unsigned long esr)
|
||||
static void noinstr el0_pc(struct pt_regs *regs, unsigned long esr)
|
||||
{
|
||||
unsigned long far = read_sysreg(far_el1);
|
||||
|
||||
if (!is_ttbr0_addr(instruction_pointer(regs)))
|
||||
arm64_apply_bp_hardening();
|
||||
|
||||
user_exit_irqoff();
|
||||
enter_from_user_mode();
|
||||
local_daif_restore(DAIF_PROCCTX);
|
||||
do_sp_pc_abort(far, esr, regs);
|
||||
}
|
||||
NOKPROBE_SYMBOL(el0_pc);
|
||||
|
||||
static void notrace el0_sp(struct pt_regs *regs, unsigned long esr)
|
||||
static void noinstr el0_sp(struct pt_regs *regs, unsigned long esr)
|
||||
{
|
||||
user_exit_irqoff();
|
||||
enter_from_user_mode();
|
||||
local_daif_restore(DAIF_PROCCTX);
|
||||
do_sp_pc_abort(regs->sp, esr, regs);
|
||||
}
|
||||
NOKPROBE_SYMBOL(el0_sp);
|
||||
|
||||
static void notrace el0_undef(struct pt_regs *regs)
|
||||
static void noinstr el0_undef(struct pt_regs *regs)
|
||||
{
|
||||
user_exit_irqoff();
|
||||
enter_from_user_mode();
|
||||
local_daif_restore(DAIF_PROCCTX);
|
||||
do_undefinstr(regs);
|
||||
}
|
||||
NOKPROBE_SYMBOL(el0_undef);
|
||||
|
||||
static void notrace el0_bti(struct pt_regs *regs)
|
||||
static void noinstr el0_bti(struct pt_regs *regs)
|
||||
{
|
||||
user_exit_irqoff();
|
||||
enter_from_user_mode();
|
||||
local_daif_restore(DAIF_PROCCTX);
|
||||
do_bti(regs);
|
||||
}
|
||||
NOKPROBE_SYMBOL(el0_bti);
|
||||
|
||||
static void notrace el0_inv(struct pt_regs *regs, unsigned long esr)
|
||||
static void noinstr el0_inv(struct pt_regs *regs, unsigned long esr)
|
||||
{
|
||||
user_exit_irqoff();
|
||||
enter_from_user_mode();
|
||||
local_daif_restore(DAIF_PROCCTX);
|
||||
bad_el0_sync(regs, 0, esr);
|
||||
}
|
||||
NOKPROBE_SYMBOL(el0_inv);
|
||||
|
||||
static void notrace el0_dbg(struct pt_regs *regs, unsigned long esr)
|
||||
static void noinstr el0_dbg(struct pt_regs *regs, unsigned long esr)
|
||||
{
|
||||
/* Only watchpoints write FAR_EL1, otherwise its UNKNOWN */
|
||||
unsigned long far = read_sysreg(far_el1);
|
||||
|
@ -222,30 +353,28 @@ static void notrace el0_dbg(struct pt_regs *regs, unsigned long esr)
|
|||
if (system_uses_irq_prio_masking())
|
||||
gic_write_pmr(GIC_PRIO_IRQON | GIC_PRIO_PSR_I_SET);
|
||||
|
||||
user_exit_irqoff();
|
||||
enter_from_user_mode();
|
||||
do_debug_exception(far, esr, regs);
|
||||
local_daif_restore(DAIF_PROCCTX_NOIRQ);
|
||||
}
|
||||
NOKPROBE_SYMBOL(el0_dbg);
|
||||
|
||||
static void notrace el0_svc(struct pt_regs *regs)
|
||||
static void noinstr el0_svc(struct pt_regs *regs)
|
||||
{
|
||||
if (system_uses_irq_prio_masking())
|
||||
gic_write_pmr(GIC_PRIO_IRQON | GIC_PRIO_PSR_I_SET);
|
||||
|
||||
enter_from_user_mode();
|
||||
do_el0_svc(regs);
|
||||
}
|
||||
NOKPROBE_SYMBOL(el0_svc);
|
||||
|
||||
static void notrace el0_fpac(struct pt_regs *regs, unsigned long esr)
|
||||
static void noinstr el0_fpac(struct pt_regs *regs, unsigned long esr)
|
||||
{
|
||||
user_exit_irqoff();
|
||||
enter_from_user_mode();
|
||||
local_daif_restore(DAIF_PROCCTX);
|
||||
do_ptrauth_fault(regs, esr);
|
||||
}
|
||||
NOKPROBE_SYMBOL(el0_fpac);
|
||||
|
||||
asmlinkage void notrace el0_sync_handler(struct pt_regs *regs)
|
||||
asmlinkage void noinstr el0_sync_handler(struct pt_regs *regs)
|
||||
{
|
||||
unsigned long esr = read_sysreg(esr_el1);
|
||||
|
||||
|
@ -297,27 +426,25 @@ asmlinkage void notrace el0_sync_handler(struct pt_regs *regs)
|
|||
el0_inv(regs, esr);
|
||||
}
|
||||
}
|
||||
NOKPROBE_SYMBOL(el0_sync_handler);
|
||||
|
||||
#ifdef CONFIG_COMPAT
|
||||
static void notrace el0_cp15(struct pt_regs *regs, unsigned long esr)
|
||||
static void noinstr el0_cp15(struct pt_regs *regs, unsigned long esr)
|
||||
{
|
||||
user_exit_irqoff();
|
||||
enter_from_user_mode();
|
||||
local_daif_restore(DAIF_PROCCTX);
|
||||
do_cp15instr(esr, regs);
|
||||
}
|
||||
NOKPROBE_SYMBOL(el0_cp15);
|
||||
|
||||
static void notrace el0_svc_compat(struct pt_regs *regs)
|
||||
static void noinstr el0_svc_compat(struct pt_regs *regs)
|
||||
{
|
||||
if (system_uses_irq_prio_masking())
|
||||
gic_write_pmr(GIC_PRIO_IRQON | GIC_PRIO_PSR_I_SET);
|
||||
|
||||
enter_from_user_mode();
|
||||
do_el0_svc_compat(regs);
|
||||
}
|
||||
NOKPROBE_SYMBOL(el0_svc_compat);
|
||||
|
||||
asmlinkage void notrace el0_sync_compat_handler(struct pt_regs *regs)
|
||||
asmlinkage void noinstr el0_sync_compat_handler(struct pt_regs *regs)
|
||||
{
|
||||
unsigned long esr = read_sysreg(esr_el1);
|
||||
|
||||
|
@ -360,5 +487,4 @@ asmlinkage void notrace el0_sync_compat_handler(struct pt_regs *regs)
|
|||
el0_inv(regs, esr);
|
||||
}
|
||||
}
|
||||
NOKPROBE_SYMBOL(el0_sync_compat_handler);
|
||||
#endif /* CONFIG_COMPAT */
|
||||
|
|
|
@ -30,18 +30,18 @@
|
|||
#include <asm/unistd.h>
|
||||
|
||||
/*
|
||||
* Context tracking subsystem. Used to instrument transitions
|
||||
* between user and kernel mode.
|
||||
* Context tracking and irqflag tracing need to instrument transitions between
|
||||
* user and kernel mode.
|
||||
*/
|
||||
.macro ct_user_exit_irqoff
|
||||
#ifdef CONFIG_CONTEXT_TRACKING
|
||||
.macro user_exit_irqoff
|
||||
#if defined(CONFIG_CONTEXT_TRACKING) || defined(CONFIG_TRACE_IRQFLAGS)
|
||||
bl enter_from_user_mode
|
||||
#endif
|
||||
.endm
|
||||
|
||||
.macro ct_user_enter
|
||||
#ifdef CONFIG_CONTEXT_TRACKING
|
||||
bl context_tracking_user_enter
|
||||
.macro user_enter_irqoff
|
||||
#if defined(CONFIG_CONTEXT_TRACKING) || defined(CONFIG_TRACE_IRQFLAGS)
|
||||
bl exit_to_user_mode
|
||||
#endif
|
||||
.endm
|
||||
|
||||
|
@ -298,9 +298,6 @@ alternative_if ARM64_HAS_IRQ_PRIO_MASKING
|
|||
alternative_else_nop_endif
|
||||
|
||||
ldp x21, x22, [sp, #S_PC] // load ELR, SPSR
|
||||
.if \el == 0
|
||||
ct_user_enter
|
||||
.endif
|
||||
|
||||
#ifdef CONFIG_ARM64_SW_TTBR0_PAN
|
||||
alternative_if_not ARM64_HAS_PAN
|
||||
|
@ -637,16 +634,8 @@ SYM_CODE_START_LOCAL_NOALIGN(el1_irq)
|
|||
gic_prio_irq_setup pmr=x20, tmp=x1
|
||||
enable_da_f
|
||||
|
||||
#ifdef CONFIG_ARM64_PSEUDO_NMI
|
||||
test_irqs_unmasked res=x0, pmr=x20
|
||||
cbz x0, 1f
|
||||
bl asm_nmi_enter
|
||||
1:
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_TRACE_IRQFLAGS
|
||||
bl trace_hardirqs_off
|
||||
#endif
|
||||
mov x0, sp
|
||||
bl enter_el1_irq_or_nmi
|
||||
|
||||
irq_handler
|
||||
|
||||
|
@ -665,26 +654,8 @@ alternative_else_nop_endif
|
|||
1:
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ARM64_PSEUDO_NMI
|
||||
/*
|
||||
* When using IRQ priority masking, we can get spurious interrupts while
|
||||
* PMR is set to GIC_PRIO_IRQOFF. An NMI might also have occurred in a
|
||||
* section with interrupts disabled. Skip tracing in those cases.
|
||||
*/
|
||||
test_irqs_unmasked res=x0, pmr=x20
|
||||
cbz x0, 1f
|
||||
bl asm_nmi_exit
|
||||
1:
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_TRACE_IRQFLAGS
|
||||
#ifdef CONFIG_ARM64_PSEUDO_NMI
|
||||
test_irqs_unmasked res=x0, pmr=x20
|
||||
cbnz x0, 1f
|
||||
#endif
|
||||
bl trace_hardirqs_on
|
||||
1:
|
||||
#endif
|
||||
mov x0, sp
|
||||
bl exit_el1_irq_or_nmi
|
||||
|
||||
kernel_exit 1
|
||||
SYM_CODE_END(el1_irq)
|
||||
|
@ -726,21 +697,14 @@ SYM_CODE_START_LOCAL_NOALIGN(el0_irq)
|
|||
kernel_entry 0
|
||||
el0_irq_naked:
|
||||
gic_prio_irq_setup pmr=x20, tmp=x0
|
||||
ct_user_exit_irqoff
|
||||
user_exit_irqoff
|
||||
enable_da_f
|
||||
|
||||
#ifdef CONFIG_TRACE_IRQFLAGS
|
||||
bl trace_hardirqs_off
|
||||
#endif
|
||||
|
||||
tbz x22, #55, 1f
|
||||
bl do_el0_irq_bp_hardening
|
||||
1:
|
||||
irq_handler
|
||||
|
||||
#ifdef CONFIG_TRACE_IRQFLAGS
|
||||
bl trace_hardirqs_on
|
||||
#endif
|
||||
b ret_to_user
|
||||
SYM_CODE_END(el0_irq)
|
||||
|
||||
|
@ -759,7 +723,7 @@ SYM_CODE_START_LOCAL(el0_error)
|
|||
el0_error_naked:
|
||||
mrs x25, esr_el1
|
||||
gic_prio_kentry_setup tmp=x2
|
||||
ct_user_exit_irqoff
|
||||
user_exit_irqoff
|
||||
enable_dbg
|
||||
mov x0, sp
|
||||
mov x1, x25
|
||||
|
@ -774,13 +738,17 @@ SYM_CODE_END(el0_error)
|
|||
SYM_CODE_START_LOCAL(ret_to_user)
|
||||
disable_daif
|
||||
gic_prio_kentry_setup tmp=x3
|
||||
ldr x1, [tsk, #TSK_TI_FLAGS]
|
||||
and x2, x1, #_TIF_WORK_MASK
|
||||
#ifdef CONFIG_TRACE_IRQFLAGS
|
||||
bl trace_hardirqs_off
|
||||
#endif
|
||||
ldr x19, [tsk, #TSK_TI_FLAGS]
|
||||
and x2, x19, #_TIF_WORK_MASK
|
||||
cbnz x2, work_pending
|
||||
finish_ret_to_user:
|
||||
user_enter_irqoff
|
||||
/* Ignore asynchronous tag check faults in the uaccess routines */
|
||||
clear_mte_async_tcf
|
||||
enable_step_tsk x1, x2
|
||||
enable_step_tsk x19, x2
|
||||
#ifdef CONFIG_GCC_PLUGIN_STACKLEAK
|
||||
bl stackleak_erase
|
||||
#endif
|
||||
|
@ -791,11 +759,9 @@ finish_ret_to_user:
|
|||
*/
|
||||
work_pending:
|
||||
mov x0, sp // 'regs'
|
||||
mov x1, x19
|
||||
bl do_notify_resume
|
||||
#ifdef CONFIG_TRACE_IRQFLAGS
|
||||
bl trace_hardirqs_on // enabled while in userspace
|
||||
#endif
|
||||
ldr x1, [tsk, #TSK_TI_FLAGS] // re-check for single-step
|
||||
ldr x19, [tsk, #TSK_TI_FLAGS] // re-check for single-step
|
||||
b finish_ret_to_user
|
||||
SYM_CODE_END(ret_to_user)
|
||||
|
||||
|
|
|
@ -67,18 +67,3 @@ void __init init_IRQ(void)
|
|||
local_daif_restore(DAIF_PROCCTX_NOIRQ);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Stubs to make nmi_enter/exit() code callable from ASM
|
||||
*/
|
||||
asmlinkage void notrace asm_nmi_enter(void)
|
||||
{
|
||||
nmi_enter();
|
||||
}
|
||||
NOKPROBE_SYMBOL(asm_nmi_enter);
|
||||
|
||||
asmlinkage void notrace asm_nmi_exit(void)
|
||||
{
|
||||
nmi_exit();
|
||||
}
|
||||
NOKPROBE_SYMBOL(asm_nmi_exit);
|
||||
|
|
|
@ -72,13 +72,13 @@ EXPORT_SYMBOL_GPL(pm_power_off);
|
|||
|
||||
void (*arm_pm_restart)(enum reboot_mode reboot_mode, const char *cmd);
|
||||
|
||||
static void __cpu_do_idle(void)
|
||||
static void noinstr __cpu_do_idle(void)
|
||||
{
|
||||
dsb(sy);
|
||||
wfi();
|
||||
}
|
||||
|
||||
static void __cpu_do_idle_irqprio(void)
|
||||
static void noinstr __cpu_do_idle_irqprio(void)
|
||||
{
|
||||
unsigned long pmr;
|
||||
unsigned long daif_bits;
|
||||
|
@ -108,7 +108,7 @@ static void __cpu_do_idle_irqprio(void)
|
|||
* ensure that interrupts are not masked at the PMR (because the core will
|
||||
* not wake up if we block the wake up signal in the interrupt controller).
|
||||
*/
|
||||
void cpu_do_idle(void)
|
||||
void noinstr cpu_do_idle(void)
|
||||
{
|
||||
if (system_uses_irq_prio_masking())
|
||||
__cpu_do_idle_irqprio();
|
||||
|
@ -119,14 +119,14 @@ void cpu_do_idle(void)
|
|||
/*
|
||||
* This is our default idle handler.
|
||||
*/
|
||||
void arch_cpu_idle(void)
|
||||
void noinstr arch_cpu_idle(void)
|
||||
{
|
||||
/*
|
||||
* This should do all the clock switching and wait for interrupt
|
||||
* tricks
|
||||
*/
|
||||
cpu_do_idle();
|
||||
local_irq_enable();
|
||||
raw_local_irq_enable();
|
||||
}
|
||||
|
||||
#ifdef CONFIG_HOTPLUG_CPU
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include <linux/uaccess.h>
|
||||
|
||||
#include <asm/alternative.h>
|
||||
#include <asm/exception.h>
|
||||
#include <asm/kprobes.h>
|
||||
#include <asm/mmu.h>
|
||||
#include <asm/ptrace.h>
|
||||
|
@ -223,16 +224,16 @@ static __kprobes unsigned long _sdei_handler(struct pt_regs *regs,
|
|||
}
|
||||
|
||||
|
||||
asmlinkage __kprobes notrace unsigned long
|
||||
asmlinkage noinstr unsigned long
|
||||
__sdei_handler(struct pt_regs *regs, struct sdei_registered_event *arg)
|
||||
{
|
||||
unsigned long ret;
|
||||
|
||||
nmi_enter();
|
||||
arm64_enter_nmi(regs);
|
||||
|
||||
ret = _sdei_handler(regs, arg);
|
||||
|
||||
nmi_exit();
|
||||
arm64_exit_nmi(regs);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -121,7 +121,6 @@ static void el0_svc_common(struct pt_regs *regs, int scno, int sc_nr,
|
|||
|
||||
cortex_a76_erratum_1463225_svc_handler();
|
||||
local_daif_restore(DAIF_PROCCTX);
|
||||
user_exit();
|
||||
|
||||
if (system_supports_mte() && (flags & _TIF_MTE_ASYNC_FAULT)) {
|
||||
/*
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
#include <asm/daifflags.h>
|
||||
#include <asm/debug-monitors.h>
|
||||
#include <asm/esr.h>
|
||||
#include <asm/exception.h>
|
||||
#include <asm/extable.h>
|
||||
#include <asm/insn.h>
|
||||
#include <asm/kprobes.h>
|
||||
|
@ -753,8 +754,10 @@ const char *esr_get_class_string(u32 esr)
|
|||
* bad_mode handles the impossible case in the exception vector. This is always
|
||||
* fatal.
|
||||
*/
|
||||
asmlinkage void bad_mode(struct pt_regs *regs, int reason, unsigned int esr)
|
||||
asmlinkage void notrace bad_mode(struct pt_regs *regs, int reason, unsigned int esr)
|
||||
{
|
||||
arm64_enter_nmi(regs);
|
||||
|
||||
console_verbose();
|
||||
|
||||
pr_crit("Bad mode in %s handler detected on CPU%d, code 0x%08x -- %s\n",
|
||||
|
@ -786,7 +789,7 @@ void bad_el0_sync(struct pt_regs *regs, int reason, unsigned int esr)
|
|||
DEFINE_PER_CPU(unsigned long [OVERFLOW_STACK_SIZE/sizeof(long)], overflow_stack)
|
||||
__aligned(16);
|
||||
|
||||
asmlinkage void handle_bad_stack(struct pt_regs *regs)
|
||||
asmlinkage void noinstr handle_bad_stack(struct pt_regs *regs)
|
||||
{
|
||||
unsigned long tsk_stk = (unsigned long)current->stack;
|
||||
unsigned long irq_stk = (unsigned long)this_cpu_read(irq_stack_ptr);
|
||||
|
@ -794,6 +797,8 @@ asmlinkage void handle_bad_stack(struct pt_regs *regs)
|
|||
unsigned int esr = read_sysreg(esr_el1);
|
||||
unsigned long far = read_sysreg(far_el1);
|
||||
|
||||
arm64_enter_nmi(regs);
|
||||
|
||||
console_verbose();
|
||||
pr_emerg("Insufficient stack space to handle exception!");
|
||||
|
||||
|
@ -865,24 +870,17 @@ bool arm64_is_fatal_ras_serror(struct pt_regs *regs, unsigned int esr)
|
|||
}
|
||||
}
|
||||
|
||||
asmlinkage void do_serror(struct pt_regs *regs, unsigned int esr)
|
||||
asmlinkage void noinstr do_serror(struct pt_regs *regs, unsigned int esr)
|
||||
{
|
||||
nmi_enter();
|
||||
arm64_enter_nmi(regs);
|
||||
|
||||
/* non-RAS errors are not containable */
|
||||
if (!arm64_is_ras_serror(esr) || arm64_is_fatal_ras_serror(regs, esr))
|
||||
arm64_serror_panic(regs, esr);
|
||||
|
||||
nmi_exit();
|
||||
arm64_exit_nmi(regs);
|
||||
}
|
||||
|
||||
asmlinkage void enter_from_user_mode(void)
|
||||
{
|
||||
CT_WARN_ON(ct_state() != CONTEXT_USER);
|
||||
user_exit_irqoff();
|
||||
}
|
||||
NOKPROBE_SYMBOL(enter_from_user_mode);
|
||||
|
||||
/* GENERIC_BUG traps */
|
||||
|
||||
int is_valid_bugaddr(unsigned long addr)
|
||||
|
|
|
@ -789,25 +789,6 @@ void __init hook_debug_fault_code(int nr,
|
|||
*/
|
||||
static void debug_exception_enter(struct pt_regs *regs)
|
||||
{
|
||||
/*
|
||||
* Tell lockdep we disabled irqs in entry.S. Do nothing if they were
|
||||
* already disabled to preserve the last enabled/disabled addresses.
|
||||
*/
|
||||
if (interrupts_enabled(regs))
|
||||
trace_hardirqs_off();
|
||||
|
||||
if (user_mode(regs)) {
|
||||
RCU_LOCKDEP_WARN(!rcu_is_watching(), "entry code didn't wake RCU");
|
||||
} else {
|
||||
/*
|
||||
* We might have interrupted pretty much anything. In
|
||||
* fact, if we're a debug exception, we can even interrupt
|
||||
* NMI processing. We don't want this code makes in_nmi()
|
||||
* to return true, but we need to notify RCU.
|
||||
*/
|
||||
rcu_nmi_enter();
|
||||
}
|
||||
|
||||
preempt_disable();
|
||||
|
||||
/* This code is a bit fragile. Test it. */
|
||||
|
@ -818,12 +799,6 @@ NOKPROBE_SYMBOL(debug_exception_enter);
|
|||
static void debug_exception_exit(struct pt_regs *regs)
|
||||
{
|
||||
preempt_enable_no_resched();
|
||||
|
||||
if (!user_mode(regs))
|
||||
rcu_nmi_exit();
|
||||
|
||||
if (interrupts_enabled(regs))
|
||||
trace_hardirqs_on();
|
||||
}
|
||||
NOKPROBE_SYMBOL(debug_exception_exit);
|
||||
|
||||
|
|
|
@ -102,6 +102,6 @@ void arch_cpu_idle(void)
|
|||
#ifdef CONFIG_CPU_PM_STOP
|
||||
asm volatile("stop\n");
|
||||
#endif
|
||||
local_irq_enable();
|
||||
raw_local_irq_enable();
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -57,7 +57,7 @@ asmlinkage void ret_from_kernel_thread(void);
|
|||
*/
|
||||
void arch_cpu_idle(void)
|
||||
{
|
||||
local_irq_enable();
|
||||
raw_local_irq_enable();
|
||||
__asm__("sleep");
|
||||
}
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ void arch_cpu_idle(void)
|
|||
{
|
||||
__vmwait();
|
||||
/* interrupts wake us up, but irqs are still disabled */
|
||||
local_irq_enable();
|
||||
raw_local_irq_enable();
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -239,7 +239,7 @@ void arch_cpu_idle(void)
|
|||
if (mark_idle)
|
||||
(*mark_idle)(1);
|
||||
|
||||
safe_halt();
|
||||
raw_safe_halt();
|
||||
|
||||
if (mark_idle)
|
||||
(*mark_idle)(0);
|
||||
|
|
|
@ -149,5 +149,5 @@ int dump_fpu(struct pt_regs *regs, elf_fpregset_t *fpregs)
|
|||
|
||||
void arch_cpu_idle(void)
|
||||
{
|
||||
local_irq_enable();
|
||||
raw_local_irq_enable();
|
||||
}
|
||||
|
|
|
@ -33,19 +33,19 @@ static void __cpuidle r3081_wait(void)
|
|||
{
|
||||
unsigned long cfg = read_c0_conf();
|
||||
write_c0_conf(cfg | R30XX_CONF_HALT);
|
||||
local_irq_enable();
|
||||
raw_local_irq_enable();
|
||||
}
|
||||
|
||||
static void __cpuidle r39xx_wait(void)
|
||||
{
|
||||
if (!need_resched())
|
||||
write_c0_conf(read_c0_conf() | TX39_CONF_HALT);
|
||||
local_irq_enable();
|
||||
raw_local_irq_enable();
|
||||
}
|
||||
|
||||
void __cpuidle r4k_wait(void)
|
||||
{
|
||||
local_irq_enable();
|
||||
raw_local_irq_enable();
|
||||
__r4k_wait();
|
||||
}
|
||||
|
||||
|
@ -64,7 +64,7 @@ void __cpuidle r4k_wait_irqoff(void)
|
|||
" .set arch=r4000 \n"
|
||||
" wait \n"
|
||||
" .set pop \n");
|
||||
local_irq_enable();
|
||||
raw_local_irq_enable();
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -84,7 +84,7 @@ static void __cpuidle rm7k_wait_irqoff(void)
|
|||
" wait \n"
|
||||
" mtc0 $1, $12 # stalls until W stage \n"
|
||||
" .set pop \n");
|
||||
local_irq_enable();
|
||||
raw_local_irq_enable();
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -257,7 +257,7 @@ void arch_cpu_idle(void)
|
|||
if (cpu_wait)
|
||||
cpu_wait();
|
||||
else
|
||||
local_irq_enable();
|
||||
raw_local_irq_enable();
|
||||
}
|
||||
|
||||
#ifdef CONFIG_CPU_IDLE
|
||||
|
|
|
@ -33,7 +33,7 @@ EXPORT_SYMBOL(pm_power_off);
|
|||
|
||||
void arch_cpu_idle(void)
|
||||
{
|
||||
local_irq_enable();
|
||||
raw_local_irq_enable();
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -79,7 +79,7 @@ void machine_power_off(void)
|
|||
*/
|
||||
void arch_cpu_idle(void)
|
||||
{
|
||||
local_irq_enable();
|
||||
raw_local_irq_enable();
|
||||
if (mfspr(SPR_UPR) & SPR_UPR_PMP)
|
||||
mtspr(SPR_PMR, mfspr(SPR_PMR) | SPR_PMR_DME);
|
||||
}
|
||||
|
|
|
@ -169,7 +169,7 @@ void __cpuidle arch_cpu_idle_dead(void)
|
|||
|
||||
void __cpuidle arch_cpu_idle(void)
|
||||
{
|
||||
local_irq_enable();
|
||||
raw_local_irq_enable();
|
||||
|
||||
/* nop on real hardware, qemu will idle sleep. */
|
||||
asm volatile("or %%r10,%%r10,%%r10\n":::);
|
||||
|
|
|
@ -52,9 +52,9 @@ void arch_cpu_idle(void)
|
|||
* interrupts enabled, some don't.
|
||||
*/
|
||||
if (irqs_disabled())
|
||||
local_irq_enable();
|
||||
raw_local_irq_enable();
|
||||
} else {
|
||||
local_irq_enable();
|
||||
raw_local_irq_enable();
|
||||
/*
|
||||
* Go into low thread priority and possibly
|
||||
* low power mode.
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
#include <asm/barrier.h>
|
||||
|
||||
static inline void cpu_relax(void)
|
||||
{
|
||||
#ifdef __riscv_muldiv
|
||||
|
|
|
@ -36,7 +36,7 @@ extern asmlinkage void ret_from_kernel_thread(void);
|
|||
void arch_cpu_idle(void)
|
||||
{
|
||||
wait_for_interrupt();
|
||||
local_irq_enable();
|
||||
raw_local_irq_enable();
|
||||
}
|
||||
|
||||
void show_regs(struct pt_regs *regs)
|
||||
|
|
|
@ -75,6 +75,7 @@ void __init setup_arch(char **cmdline_p)
|
|||
*cmdline_p = boot_command_line;
|
||||
|
||||
early_ioremap_setup();
|
||||
jump_label_init();
|
||||
parse_early_param();
|
||||
|
||||
efi_init();
|
||||
|
|
|
@ -44,7 +44,7 @@ SYSCFLAGS_vdso.so.dbg = $(c_flags)
|
|||
$(obj)/vdso.so.dbg: $(src)/vdso.lds $(obj-vdso) FORCE
|
||||
$(call if_changed,vdsold)
|
||||
SYSCFLAGS_vdso.so.dbg = -shared -s -Wl,-soname=linux-vdso.so.1 \
|
||||
-Wl,--build-id -Wl,--hash-style=both
|
||||
-Wl,--build-id=sha1 -Wl,--hash-style=both
|
||||
|
||||
# We also create a special relocatable object that should mirror the symbol
|
||||
# table and layout of the linked DSO. With ld --just-symbols we can then
|
||||
|
|
|
@ -763,12 +763,7 @@ ENTRY(io_int_handler)
|
|||
xc __PT_FLAGS(8,%r11),__PT_FLAGS(%r11)
|
||||
TSTMSK __LC_CPU_FLAGS,_CIF_IGNORE_IRQ
|
||||
jo .Lio_restore
|
||||
#if IS_ENABLED(CONFIG_TRACE_IRQFLAGS)
|
||||
tmhh %r8,0x300
|
||||
jz 1f
|
||||
TRACE_IRQS_OFF
|
||||
1:
|
||||
#endif
|
||||
xc __SF_BACKCHAIN(8,%r15),__SF_BACKCHAIN(%r15)
|
||||
.Lio_loop:
|
||||
lgr %r2,%r11 # pass pointer to pt_regs
|
||||
|
@ -791,12 +786,7 @@ ENTRY(io_int_handler)
|
|||
TSTMSK __LC_CPU_FLAGS,_CIF_WORK
|
||||
jnz .Lio_work
|
||||
.Lio_restore:
|
||||
#if IS_ENABLED(CONFIG_TRACE_IRQFLAGS)
|
||||
tm __PT_PSW(%r11),3
|
||||
jno 0f
|
||||
TRACE_IRQS_ON
|
||||
0:
|
||||
#endif
|
||||
mvc __LC_RETURN_PSW(16),__PT_PSW(%r11)
|
||||
tm __PT_PSW+1(%r11),0x01 # returning to user ?
|
||||
jno .Lio_exit_kernel
|
||||
|
@ -976,12 +966,7 @@ ENTRY(ext_int_handler)
|
|||
xc __PT_FLAGS(8,%r11),__PT_FLAGS(%r11)
|
||||
TSTMSK __LC_CPU_FLAGS,_CIF_IGNORE_IRQ
|
||||
jo .Lio_restore
|
||||
#if IS_ENABLED(CONFIG_TRACE_IRQFLAGS)
|
||||
tmhh %r8,0x300
|
||||
jz 1f
|
||||
TRACE_IRQS_OFF
|
||||
1:
|
||||
#endif
|
||||
xc __SF_BACKCHAIN(8,%r15),__SF_BACKCHAIN(%r15)
|
||||
lgr %r2,%r11 # pass pointer to pt_regs
|
||||
lghi %r3,EXT_INTERRUPT
|
||||
|
|
|
@ -33,10 +33,10 @@ void enabled_wait(void)
|
|||
PSW_MASK_IO | PSW_MASK_EXT | PSW_MASK_MCHECK;
|
||||
clear_cpu_flag(CIF_NOHZ_DELAY);
|
||||
|
||||
local_irq_save(flags);
|
||||
raw_local_irq_save(flags);
|
||||
/* Call the assembler magic in entry.S */
|
||||
psw_idle(idle, psw_mask);
|
||||
local_irq_restore(flags);
|
||||
raw_local_irq_restore(flags);
|
||||
|
||||
/* Account time spent with enabled wait psw loaded as idle time. */
|
||||
raw_write_seqcount_begin(&idle->seqcount);
|
||||
|
@ -123,7 +123,7 @@ void arch_cpu_idle_enter(void)
|
|||
void arch_cpu_idle(void)
|
||||
{
|
||||
enabled_wait();
|
||||
local_irq_enable();
|
||||
raw_local_irq_enable();
|
||||
}
|
||||
|
||||
void arch_cpu_idle_exit(void)
|
||||
|
|
|
@ -33,7 +33,7 @@ EXPORT_SYMBOL(__delay);
|
|||
|
||||
static void __udelay_disabled(unsigned long long usecs)
|
||||
{
|
||||
unsigned long cr0, cr0_new, psw_mask, flags;
|
||||
unsigned long cr0, cr0_new, psw_mask;
|
||||
struct s390_idle_data idle;
|
||||
u64 end;
|
||||
|
||||
|
@ -45,9 +45,8 @@ static void __udelay_disabled(unsigned long long usecs)
|
|||
psw_mask = __extract_psw() | PSW_MASK_EXT | PSW_MASK_WAIT;
|
||||
set_clock_comparator(end);
|
||||
set_cpu_flag(CIF_IGNORE_IRQ);
|
||||
local_irq_save(flags);
|
||||
psw_idle(&idle, psw_mask);
|
||||
local_irq_restore(flags);
|
||||
trace_hardirqs_off();
|
||||
clear_cpu_flag(CIF_IGNORE_IRQ);
|
||||
set_clock_comparator(S390_lowcore.clock_comparator);
|
||||
__ctl_load(cr0, 0, 0);
|
||||
|
|
|
@ -103,9 +103,10 @@ static int zpci_set_irq_affinity(struct irq_data *data, const struct cpumask *de
|
|||
{
|
||||
struct msi_desc *entry = irq_get_msi_desc(data->irq);
|
||||
struct msi_msg msg = entry->msg;
|
||||
int cpu_addr = smp_cpu_get_cpu_address(cpumask_first(dest));
|
||||
|
||||
msg.address_lo &= 0xff0000ff;
|
||||
msg.address_lo |= (cpumask_first(dest) << 8);
|
||||
msg.address_lo |= (cpu_addr << 8);
|
||||
pci_write_msi_msg(data->irq, &msg);
|
||||
|
||||
return IRQ_SET_MASK_OK;
|
||||
|
@ -238,6 +239,7 @@ int arch_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
|
|||
unsigned long bit;
|
||||
struct msi_desc *msi;
|
||||
struct msi_msg msg;
|
||||
int cpu_addr;
|
||||
int rc, irq;
|
||||
|
||||
zdev->aisb = -1UL;
|
||||
|
@ -287,9 +289,15 @@ int arch_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
|
|||
handle_percpu_irq);
|
||||
msg.data = hwirq - bit;
|
||||
if (irq_delivery == DIRECTED) {
|
||||
if (msi->affinity)
|
||||
cpu = cpumask_first(&msi->affinity->mask);
|
||||
else
|
||||
cpu = 0;
|
||||
cpu_addr = smp_cpu_get_cpu_address(cpu);
|
||||
|
||||
msg.address_lo = zdev->msi_addr & 0xff0000ff;
|
||||
msg.address_lo |= msi->affinity ?
|
||||
(cpumask_first(&msi->affinity->mask) << 8) : 0;
|
||||
msg.address_lo |= (cpu_addr << 8);
|
||||
|
||||
for_each_possible_cpu(cpu) {
|
||||
airq_iv_set_data(zpci_ibv[cpu], hwirq, irq);
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ static void (*sh_idle)(void);
|
|||
void default_idle(void)
|
||||
{
|
||||
set_bl_bit();
|
||||
local_irq_enable();
|
||||
raw_local_irq_enable();
|
||||
/* Isn't this racy ? */
|
||||
cpu_sleep();
|
||||
clear_bl_bit();
|
||||
|
|
|
@ -50,7 +50,7 @@ static void pmc_leon_idle_fixup(void)
|
|||
register unsigned int address = (unsigned int)leon3_irqctrl_regs;
|
||||
|
||||
/* Interrupts need to be enabled to not hang the CPU */
|
||||
local_irq_enable();
|
||||
raw_local_irq_enable();
|
||||
|
||||
__asm__ __volatile__ (
|
||||
"wr %%g0, %%asr19\n"
|
||||
|
@ -66,7 +66,7 @@ static void pmc_leon_idle_fixup(void)
|
|||
static void pmc_leon_idle(void)
|
||||
{
|
||||
/* Interrupts need to be enabled to not hang the CPU */
|
||||
local_irq_enable();
|
||||
raw_local_irq_enable();
|
||||
|
||||
/* For systems without power-down, this will be no-op */
|
||||
__asm__ __volatile__ ("wr %g0, %asr19\n\t");
|
||||
|
|
|
@ -74,7 +74,7 @@ void arch_cpu_idle(void)
|
|||
{
|
||||
if (sparc_idle)
|
||||
(*sparc_idle)();
|
||||
local_irq_enable();
|
||||
raw_local_irq_enable();
|
||||
}
|
||||
|
||||
/* XXX cli/sti -> local_irq_xxx here, check this works once SMP is fixed. */
|
||||
|
|
|
@ -62,11 +62,11 @@ void arch_cpu_idle(void)
|
|||
{
|
||||
if (tlb_type != hypervisor) {
|
||||
touch_nmi_watchdog();
|
||||
local_irq_enable();
|
||||
raw_local_irq_enable();
|
||||
} else {
|
||||
unsigned long pstate;
|
||||
|
||||
local_irq_enable();
|
||||
raw_local_irq_enable();
|
||||
|
||||
/* The sun4v sleeping code requires that we have PSTATE.IE cleared over
|
||||
* the cpu sleep hypervisor call.
|
||||
|
|
|
@ -217,7 +217,7 @@ void arch_cpu_idle(void)
|
|||
{
|
||||
cpu_tasks[current_thread_info()->cpu].pid = os_getpid();
|
||||
um_idle_sleep();
|
||||
local_irq_enable();
|
||||
raw_local_irq_enable();
|
||||
}
|
||||
|
||||
int __cant_sleep(void) {
|
||||
|
|
|
@ -88,8 +88,6 @@ static inline void __mwaitx(unsigned long eax, unsigned long ebx,
|
|||
|
||||
static inline void __sti_mwait(unsigned long eax, unsigned long ecx)
|
||||
{
|
||||
trace_hardirqs_on();
|
||||
|
||||
mds_idle_clear_cpu_buffers();
|
||||
/* "mwait %eax, %ecx;" */
|
||||
asm volatile("sti; .byte 0x0f, 0x01, 0xc9;"
|
||||
|
|
|
@ -739,11 +739,13 @@ spectre_v2_user_select_mitigation(enum spectre_v2_mitigation_cmd v2_cmd)
|
|||
if (boot_cpu_has(X86_FEATURE_IBPB)) {
|
||||
setup_force_cpu_cap(X86_FEATURE_USE_IBPB);
|
||||
|
||||
spectre_v2_user_ibpb = mode;
|
||||
switch (cmd) {
|
||||
case SPECTRE_V2_USER_CMD_FORCE:
|
||||
case SPECTRE_V2_USER_CMD_PRCTL_IBPB:
|
||||
case SPECTRE_V2_USER_CMD_SECCOMP_IBPB:
|
||||
static_branch_enable(&switch_mm_always_ibpb);
|
||||
spectre_v2_user_ibpb = SPECTRE_V2_USER_STRICT;
|
||||
break;
|
||||
case SPECTRE_V2_USER_CMD_PRCTL:
|
||||
case SPECTRE_V2_USER_CMD_AUTO:
|
||||
|
@ -757,8 +759,6 @@ spectre_v2_user_select_mitigation(enum spectre_v2_mitigation_cmd v2_cmd)
|
|||
pr_info("mitigation: Enabling %s Indirect Branch Prediction Barrier\n",
|
||||
static_key_enabled(&switch_mm_always_ibpb) ?
|
||||
"always-on" : "conditional");
|
||||
|
||||
spectre_v2_user_ibpb = mode;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -1384,8 +1384,10 @@ noinstr void do_machine_check(struct pt_regs *regs)
|
|||
* When there's any problem use only local no_way_out state.
|
||||
*/
|
||||
if (!lmce) {
|
||||
if (mce_end(order) < 0)
|
||||
no_way_out = worst >= MCE_PANIC_SEVERITY;
|
||||
if (mce_end(order) < 0) {
|
||||
if (!no_way_out)
|
||||
no_way_out = worst >= MCE_PANIC_SEVERITY;
|
||||
}
|
||||
} else {
|
||||
/*
|
||||
* If there was a fatal machine check we should have
|
||||
|
|
|
@ -507,6 +507,24 @@ unlock:
|
|||
return ret ?: nbytes;
|
||||
}
|
||||
|
||||
/**
|
||||
* rdtgroup_remove - the helper to remove resource group safely
|
||||
* @rdtgrp: resource group to remove
|
||||
*
|
||||
* On resource group creation via a mkdir, an extra kernfs_node reference is
|
||||
* taken to ensure that the rdtgroup structure remains accessible for the
|
||||
* rdtgroup_kn_unlock() calls where it is removed.
|
||||
*
|
||||
* Drop the extra reference here, then free the rdtgroup structure.
|
||||
*
|
||||
* Return: void
|
||||
*/
|
||||
static void rdtgroup_remove(struct rdtgroup *rdtgrp)
|
||||
{
|
||||
kernfs_put(rdtgrp->kn);
|
||||
kfree(rdtgrp);
|
||||
}
|
||||
|
||||
struct task_move_callback {
|
||||
struct callback_head work;
|
||||
struct rdtgroup *rdtgrp;
|
||||
|
@ -529,7 +547,7 @@ static void move_myself(struct callback_head *head)
|
|||
(rdtgrp->flags & RDT_DELETED)) {
|
||||
current->closid = 0;
|
||||
current->rmid = 0;
|
||||
kfree(rdtgrp);
|
||||
rdtgroup_remove(rdtgrp);
|
||||
}
|
||||
|
||||
if (unlikely(current->flags & PF_EXITING))
|
||||
|
@ -1769,7 +1787,6 @@ static int rdtgroup_mkdir_info_resdir(struct rdt_resource *r, char *name,
|
|||
if (IS_ERR(kn_subdir))
|
||||
return PTR_ERR(kn_subdir);
|
||||
|
||||
kernfs_get(kn_subdir);
|
||||
ret = rdtgroup_kn_set_ugid(kn_subdir);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
@ -1792,7 +1809,6 @@ static int rdtgroup_create_info_dir(struct kernfs_node *parent_kn)
|
|||
kn_info = kernfs_create_dir(parent_kn, "info", parent_kn->mode, NULL);
|
||||
if (IS_ERR(kn_info))
|
||||
return PTR_ERR(kn_info);
|
||||
kernfs_get(kn_info);
|
||||
|
||||
ret = rdtgroup_add_files(kn_info, RF_TOP_INFO);
|
||||
if (ret)
|
||||
|
@ -1813,12 +1829,6 @@ static int rdtgroup_create_info_dir(struct kernfs_node *parent_kn)
|
|||
goto out_destroy;
|
||||
}
|
||||
|
||||
/*
|
||||
* This extra ref will be put in kernfs_remove() and guarantees
|
||||
* that @rdtgrp->kn is always accessible.
|
||||
*/
|
||||
kernfs_get(kn_info);
|
||||
|
||||
ret = rdtgroup_kn_set_ugid(kn_info);
|
||||
if (ret)
|
||||
goto out_destroy;
|
||||
|
@ -1847,12 +1857,6 @@ mongroup_create_dir(struct kernfs_node *parent_kn, struct rdtgroup *prgrp,
|
|||
if (dest_kn)
|
||||
*dest_kn = kn;
|
||||
|
||||
/*
|
||||
* This extra ref will be put in kernfs_remove() and guarantees
|
||||
* that @rdtgrp->kn is always accessible.
|
||||
*/
|
||||
kernfs_get(kn);
|
||||
|
||||
ret = rdtgroup_kn_set_ugid(kn);
|
||||
if (ret)
|
||||
goto out_destroy;
|
||||
|
@ -2079,8 +2083,7 @@ void rdtgroup_kn_unlock(struct kernfs_node *kn)
|
|||
rdtgrp->mode == RDT_MODE_PSEUDO_LOCKED)
|
||||
rdtgroup_pseudo_lock_remove(rdtgrp);
|
||||
kernfs_unbreak_active_protection(kn);
|
||||
kernfs_put(rdtgrp->kn);
|
||||
kfree(rdtgrp);
|
||||
rdtgroup_remove(rdtgrp);
|
||||
} else {
|
||||
kernfs_unbreak_active_protection(kn);
|
||||
}
|
||||
|
@ -2139,13 +2142,11 @@ static int rdt_get_tree(struct fs_context *fc)
|
|||
&kn_mongrp);
|
||||
if (ret < 0)
|
||||
goto out_info;
|
||||
kernfs_get(kn_mongrp);
|
||||
|
||||
ret = mkdir_mondata_all(rdtgroup_default.kn,
|
||||
&rdtgroup_default, &kn_mondata);
|
||||
if (ret < 0)
|
||||
goto out_mongrp;
|
||||
kernfs_get(kn_mondata);
|
||||
rdtgroup_default.mon.mon_data_kn = kn_mondata;
|
||||
}
|
||||
|
||||
|
@ -2357,7 +2358,7 @@ static void free_all_child_rdtgrp(struct rdtgroup *rdtgrp)
|
|||
if (atomic_read(&sentry->waitcount) != 0)
|
||||
sentry->flags = RDT_DELETED;
|
||||
else
|
||||
kfree(sentry);
|
||||
rdtgroup_remove(sentry);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2399,7 +2400,7 @@ static void rmdir_all_sub(void)
|
|||
if (atomic_read(&rdtgrp->waitcount) != 0)
|
||||
rdtgrp->flags = RDT_DELETED;
|
||||
else
|
||||
kfree(rdtgrp);
|
||||
rdtgroup_remove(rdtgrp);
|
||||
}
|
||||
/* Notify online CPUs to update per cpu storage and PQR_ASSOC MSR */
|
||||
update_closid_rmid(cpu_online_mask, &rdtgroup_default);
|
||||
|
@ -2499,11 +2500,6 @@ static int mkdir_mondata_subdir(struct kernfs_node *parent_kn,
|
|||
if (IS_ERR(kn))
|
||||
return PTR_ERR(kn);
|
||||
|
||||
/*
|
||||
* This extra ref will be put in kernfs_remove() and guarantees
|
||||
* that kn is always accessible.
|
||||
*/
|
||||
kernfs_get(kn);
|
||||
ret = rdtgroup_kn_set_ugid(kn);
|
||||
if (ret)
|
||||
goto out_destroy;
|
||||
|
@ -2838,8 +2834,8 @@ static int mkdir_rdt_prepare(struct kernfs_node *parent_kn,
|
|||
/*
|
||||
* kernfs_remove() will drop the reference count on "kn" which
|
||||
* will free it. But we still need it to stick around for the
|
||||
* rdtgroup_kn_unlock(kn} call below. Take one extra reference
|
||||
* here, which will be dropped inside rdtgroup_kn_unlock().
|
||||
* rdtgroup_kn_unlock(kn) call. Take one extra reference here,
|
||||
* which will be dropped by kernfs_put() in rdtgroup_remove().
|
||||
*/
|
||||
kernfs_get(kn);
|
||||
|
||||
|
@ -2880,6 +2876,7 @@ static int mkdir_rdt_prepare(struct kernfs_node *parent_kn,
|
|||
out_idfree:
|
||||
free_rmid(rdtgrp->mon.rmid);
|
||||
out_destroy:
|
||||
kernfs_put(rdtgrp->kn);
|
||||
kernfs_remove(rdtgrp->kn);
|
||||
out_free_rgrp:
|
||||
kfree(rdtgrp);
|
||||
|
@ -2892,7 +2889,7 @@ static void mkdir_rdt_prepare_clean(struct rdtgroup *rgrp)
|
|||
{
|
||||
kernfs_remove(rgrp->kn);
|
||||
free_rmid(rgrp->mon.rmid);
|
||||
kfree(rgrp);
|
||||
rdtgroup_remove(rgrp);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -3049,11 +3046,6 @@ static int rdtgroup_rmdir_mon(struct kernfs_node *kn, struct rdtgroup *rdtgrp,
|
|||
WARN_ON(list_empty(&prdtgrp->mon.crdtgrp_list));
|
||||
list_del(&rdtgrp->mon.crdtgrp_list);
|
||||
|
||||
/*
|
||||
* one extra hold on this, will drop when we kfree(rdtgrp)
|
||||
* in rdtgroup_kn_unlock()
|
||||
*/
|
||||
kernfs_get(kn);
|
||||
kernfs_remove(rdtgrp->kn);
|
||||
|
||||
return 0;
|
||||
|
@ -3065,11 +3057,6 @@ static int rdtgroup_ctrl_remove(struct kernfs_node *kn,
|
|||
rdtgrp->flags = RDT_DELETED;
|
||||
list_del(&rdtgrp->rdtgroup_list);
|
||||
|
||||
/*
|
||||
* one extra hold on this, will drop when we kfree(rdtgrp)
|
||||
* in rdtgroup_kn_unlock()
|
||||
*/
|
||||
kernfs_get(kn);
|
||||
kernfs_remove(rdtgrp->kn);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -685,7 +685,7 @@ void arch_cpu_idle(void)
|
|||
*/
|
||||
void __cpuidle default_idle(void)
|
||||
{
|
||||
safe_halt();
|
||||
raw_safe_halt();
|
||||
}
|
||||
#if defined(CONFIG_APM_MODULE) || defined(CONFIG_HALTPOLL_CPUIDLE_MODULE)
|
||||
EXPORT_SYMBOL(default_idle);
|
||||
|
@ -736,6 +736,8 @@ void stop_this_cpu(void *dummy)
|
|||
/*
|
||||
* AMD Erratum 400 aware idle routine. We handle it the same way as C3 power
|
||||
* states (local apic timer and TSC stop).
|
||||
*
|
||||
* XXX this function is completely buggered vs RCU and tracing.
|
||||
*/
|
||||
static void amd_e400_idle(void)
|
||||
{
|
||||
|
@ -757,9 +759,9 @@ static void amd_e400_idle(void)
|
|||
* The switch back from broadcast mode needs to be called with
|
||||
* interrupts disabled.
|
||||
*/
|
||||
local_irq_disable();
|
||||
raw_local_irq_disable();
|
||||
tick_broadcast_exit();
|
||||
local_irq_enable();
|
||||
raw_local_irq_enable();
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -801,9 +803,9 @@ static __cpuidle void mwait_idle(void)
|
|||
if (!need_resched())
|
||||
__sti_mwait(0, 0);
|
||||
else
|
||||
local_irq_enable();
|
||||
raw_local_irq_enable();
|
||||
} else {
|
||||
local_irq_enable();
|
||||
raw_local_irq_enable();
|
||||
}
|
||||
__current_clr_polling();
|
||||
}
|
||||
|
|
|
@ -145,6 +145,7 @@ obj-$(CONFIG_OF) += of/
|
|||
obj-$(CONFIG_SSB) += ssb/
|
||||
obj-$(CONFIG_BCMA) += bcma/
|
||||
obj-$(CONFIG_VHOST_RING) += vhost/
|
||||
obj-$(CONFIG_VHOST_IOTLB) += vhost/
|
||||
obj-$(CONFIG_VHOST) += vhost/
|
||||
obj-$(CONFIG_VLYNQ) += vlynq/
|
||||
obj-$(CONFIG_GREYBUS) += greybus/
|
||||
|
|
|
@ -270,7 +270,7 @@ config EFI_DEV_PATH_PARSER
|
|||
|
||||
config EFI_EARLYCON
|
||||
def_bool y
|
||||
depends on SERIAL_EARLYCON && !ARM && !IA64
|
||||
depends on EFI && SERIAL_EARLYCON && !ARM && !IA64
|
||||
select FONT_SUPPORT
|
||||
select ARCH_USE_MEMREMAP_PROT
|
||||
|
||||
|
|
|
@ -390,10 +390,10 @@ static int __init efisubsys_init(void)
|
|||
|
||||
if (efi_rt_services_supported(EFI_RT_SUPPORTED_GET_VARIABLE |
|
||||
EFI_RT_SUPPORTED_GET_NEXT_VARIABLE_NAME)) {
|
||||
efivar_ssdt_load();
|
||||
error = generic_ops_register();
|
||||
if (error)
|
||||
goto err_put;
|
||||
efivar_ssdt_load();
|
||||
platform_device_register_simple("efivars", 0, NULL, 0);
|
||||
}
|
||||
|
||||
|
|
|
@ -126,26 +126,9 @@ static __cpuidle int intel_idle(struct cpuidle_device *dev,
|
|||
struct cpuidle_state *state = &drv->states[index];
|
||||
unsigned long eax = flg2MWAIT(state->flags);
|
||||
unsigned long ecx = 1; /* break on interrupt flag */
|
||||
bool tick;
|
||||
|
||||
if (!static_cpu_has(X86_FEATURE_ARAT)) {
|
||||
/*
|
||||
* Switch over to one-shot tick broadcast if the target C-state
|
||||
* is deeper than C1.
|
||||
*/
|
||||
if ((eax >> MWAIT_SUBSTATE_SIZE) & MWAIT_CSTATE_MASK) {
|
||||
tick = true;
|
||||
tick_broadcast_enter();
|
||||
} else {
|
||||
tick = false;
|
||||
}
|
||||
}
|
||||
|
||||
mwait_idle_with_hints(eax, ecx);
|
||||
|
||||
if (!static_cpu_has(X86_FEATURE_ARAT) && tick)
|
||||
tick_broadcast_exit();
|
||||
|
||||
return index;
|
||||
}
|
||||
|
||||
|
@ -1227,6 +1210,20 @@ static bool __init intel_idle_acpi_cst_extract(void)
|
|||
return false;
|
||||
}
|
||||
|
||||
static bool __init intel_idle_state_needs_timer_stop(struct cpuidle_state *state)
|
||||
{
|
||||
unsigned long eax = flg2MWAIT(state->flags);
|
||||
|
||||
if (boot_cpu_has(X86_FEATURE_ARAT))
|
||||
return false;
|
||||
|
||||
/*
|
||||
* Switch over to one-shot tick broadcast if the target C-state
|
||||
* is deeper than C1.
|
||||
*/
|
||||
return !!((eax >> MWAIT_SUBSTATE_SIZE) & MWAIT_CSTATE_MASK);
|
||||
}
|
||||
|
||||
static void __init intel_idle_init_cstates_acpi(struct cpuidle_driver *drv)
|
||||
{
|
||||
int cstate, limit = min_t(int, CPUIDLE_STATE_MAX, acpi_state_table.count);
|
||||
|
@ -1269,6 +1266,9 @@ static void __init intel_idle_init_cstates_acpi(struct cpuidle_driver *drv)
|
|||
if (disabled_states_mask & BIT(cstate))
|
||||
state->flags |= CPUIDLE_FLAG_OFF;
|
||||
|
||||
if (intel_idle_state_needs_timer_stop(state))
|
||||
state->flags |= CPUIDLE_FLAG_TIMER_STOP;
|
||||
|
||||
state->enter = intel_idle;
|
||||
state->enter_s2idle = intel_idle_s2idle;
|
||||
}
|
||||
|
@ -1507,6 +1507,9 @@ static void __init intel_idle_init_cstates_icpu(struct cpuidle_driver *drv)
|
|||
!(cpuidle_state_table[cstate].flags & CPUIDLE_FLAG_ALWAYS_ENABLE)))
|
||||
drv->states[drv->state_count].flags |= CPUIDLE_FLAG_OFF;
|
||||
|
||||
if (intel_idle_state_needs_timer_stop(&drv->states[drv->state_count]))
|
||||
drv->states[drv->state_count].flags |= CPUIDLE_FLAG_TIMER_STOP;
|
||||
|
||||
drv->state_count++;
|
||||
}
|
||||
|
||||
|
|
|
@ -1083,7 +1083,6 @@ static int of_count_icc_providers(struct device_node *np)
|
|||
count++;
|
||||
count += of_count_icc_providers(child);
|
||||
}
|
||||
of_node_put(np);
|
||||
|
||||
return count;
|
||||
}
|
||||
|
|
|
@ -182,7 +182,7 @@ DEFINE_QNODE(mas_pcnoc_sdcc_1, MSM8916_MASTER_SDCC_1, 8, -1, -1, MSM8916_PNOC_IN
|
|||
DEFINE_QNODE(mas_pcnoc_sdcc_2, MSM8916_MASTER_SDCC_2, 8, -1, -1, MSM8916_PNOC_INT_1);
|
||||
DEFINE_QNODE(mas_qdss_bam, MSM8916_MASTER_QDSS_BAM, 8, -1, -1, MSM8916_SNOC_QDSS_INT);
|
||||
DEFINE_QNODE(mas_qdss_etr, MSM8916_MASTER_QDSS_ETR, 8, -1, -1, MSM8916_SNOC_QDSS_INT);
|
||||
DEFINE_QNODE(mas_snoc_cfg, MSM8916_MASTER_SNOC_CFG, 4, 20, -1, MSM8916_SNOC_QDSS_INT);
|
||||
DEFINE_QNODE(mas_snoc_cfg, MSM8916_MASTER_SNOC_CFG, 4, -1, -1, MSM8916_SNOC_QDSS_INT);
|
||||
DEFINE_QNODE(mas_spdm, MSM8916_MASTER_SPDM, 4, -1, -1, MSM8916_PNOC_MAS_0);
|
||||
DEFINE_QNODE(mas_tcu0, MSM8916_MASTER_TCU0, 8, -1, -1, MSM8916_SLAVE_EBI_CH0, MSM8916_BIMC_SNOC_MAS, MSM8916_SLAVE_AMPSS_L2);
|
||||
DEFINE_QNODE(mas_tcu1, MSM8916_MASTER_TCU1, 8, -1, -1, MSM8916_SLAVE_EBI_CH0, MSM8916_BIMC_SNOC_MAS, MSM8916_SLAVE_AMPSS_L2);
|
||||
|
@ -208,14 +208,14 @@ DEFINE_QNODE(pcnoc_snoc_mas, MSM8916_PNOC_SNOC_MAS, 8, 29, -1, MSM8916_PNOC_SNOC
|
|||
DEFINE_QNODE(pcnoc_snoc_slv, MSM8916_PNOC_SNOC_SLV, 8, -1, 45, MSM8916_SNOC_INT_0, MSM8916_SNOC_INT_BIMC, MSM8916_SNOC_INT_1);
|
||||
DEFINE_QNODE(qdss_int, MSM8916_SNOC_QDSS_INT, 8, -1, -1, MSM8916_SNOC_INT_0, MSM8916_SNOC_INT_BIMC);
|
||||
DEFINE_QNODE(slv_apps_l2, MSM8916_SLAVE_AMPSS_L2, 8, -1, -1, 0);
|
||||
DEFINE_QNODE(slv_apss, MSM8916_SLAVE_APSS, 4, -1, 20, 0);
|
||||
DEFINE_QNODE(slv_apss, MSM8916_SLAVE_APSS, 4, -1, -1, 0);
|
||||
DEFINE_QNODE(slv_audio, MSM8916_SLAVE_LPASS, 4, -1, -1, 0);
|
||||
DEFINE_QNODE(slv_bimc_cfg, MSM8916_SLAVE_BIMC_CFG, 4, -1, -1, 0);
|
||||
DEFINE_QNODE(slv_blsp_1, MSM8916_SLAVE_BLSP_1, 4, -1, -1, 0);
|
||||
DEFINE_QNODE(slv_boot_rom, MSM8916_SLAVE_BOOT_ROM, 4, -1, -1, 0);
|
||||
DEFINE_QNODE(slv_camera_cfg, MSM8916_SLAVE_CAMERA_CFG, 4, -1, -1, 0);
|
||||
DEFINE_QNODE(slv_cats_0, MSM8916_SLAVE_CATS_128, 16, -1, 106, 0);
|
||||
DEFINE_QNODE(slv_cats_1, MSM8916_SLAVE_OCMEM_64, 8, -1, 107, 0);
|
||||
DEFINE_QNODE(slv_cats_0, MSM8916_SLAVE_CATS_128, 16, -1, -1, 0);
|
||||
DEFINE_QNODE(slv_cats_1, MSM8916_SLAVE_OCMEM_64, 8, -1, -1, 0);
|
||||
DEFINE_QNODE(slv_clk_ctl, MSM8916_SLAVE_CLK_CTL, 4, -1, -1, 0);
|
||||
DEFINE_QNODE(slv_crypto_0_cfg, MSM8916_SLAVE_CRYPTO_0_CFG, 4, -1, -1, 0);
|
||||
DEFINE_QNODE(slv_dehr_cfg, MSM8916_SLAVE_DEHR_CFG, 4, -1, -1, 0);
|
||||
|
@ -239,7 +239,7 @@ DEFINE_QNODE(slv_sdcc_2, MSM8916_SLAVE_SDCC_2, 4, -1, -1, 0);
|
|||
DEFINE_QNODE(slv_security, MSM8916_SLAVE_SECURITY, 4, -1, -1, 0);
|
||||
DEFINE_QNODE(slv_snoc_cfg, MSM8916_SLAVE_SNOC_CFG, 4, -1, -1, 0);
|
||||
DEFINE_QNODE(slv_spdm, MSM8916_SLAVE_SPDM, 4, -1, -1, 0);
|
||||
DEFINE_QNODE(slv_srvc_snoc, MSM8916_SLAVE_SRVC_SNOC, 8, -1, 29, 0);
|
||||
DEFINE_QNODE(slv_srvc_snoc, MSM8916_SLAVE_SRVC_SNOC, 8, -1, -1, 0);
|
||||
DEFINE_QNODE(slv_tcsr, MSM8916_SLAVE_TCSR, 4, -1, -1, 0);
|
||||
DEFINE_QNODE(slv_tlmm, MSM8916_SLAVE_TLMM, 4, -1, -1, 0);
|
||||
DEFINE_QNODE(slv_usb_hs, MSM8916_SLAVE_USB_HS, 4, -1, -1, 0);
|
||||
|
@ -249,7 +249,7 @@ DEFINE_QNODE(snoc_bimc_0_slv, MSM8916_SNOC_BIMC_0_SLV, 8, -1, 24, MSM8916_SLAVE_
|
|||
DEFINE_QNODE(snoc_bimc_1_mas, MSM8916_SNOC_BIMC_1_MAS, 16, -1, -1, MSM8916_SNOC_BIMC_1_SLV);
|
||||
DEFINE_QNODE(snoc_bimc_1_slv, MSM8916_SNOC_BIMC_1_SLV, 8, -1, -1, MSM8916_SLAVE_EBI_CH0);
|
||||
DEFINE_QNODE(snoc_int_0, MSM8916_SNOC_INT_0, 8, 99, 130, MSM8916_SLAVE_QDSS_STM, MSM8916_SLAVE_IMEM, MSM8916_SNOC_PNOC_MAS);
|
||||
DEFINE_QNODE(snoc_int_1, MSM8916_SNOC_INT_1, 8, 100, 131, MSM8916_SLAVE_APSS, MSM8916_SLAVE_CATS_128, MSM8916_SLAVE_OCMEM_64);
|
||||
DEFINE_QNODE(snoc_int_1, MSM8916_SNOC_INT_1, 8, -1, -1, MSM8916_SLAVE_APSS, MSM8916_SLAVE_CATS_128, MSM8916_SLAVE_OCMEM_64);
|
||||
DEFINE_QNODE(snoc_int_bimc, MSM8916_SNOC_INT_BIMC, 8, 101, 132, MSM8916_SNOC_BIMC_0_MAS);
|
||||
DEFINE_QNODE(snoc_pcnoc_mas, MSM8916_SNOC_PNOC_MAS, 8, -1, -1, MSM8916_SNOC_PNOC_SLV);
|
||||
DEFINE_QNODE(snoc_pcnoc_slv, MSM8916_SNOC_PNOC_SLV, 8, -1, -1, MSM8916_PNOC_INT_0);
|
||||
|
|
|
@ -618,6 +618,8 @@ static int msm8974_icc_set(struct icc_node *src, struct icc_node *dst)
|
|||
|
||||
do_div(rate, src_qn->buswidth);
|
||||
|
||||
rate = min_t(u32, rate, INT_MAX);
|
||||
|
||||
if (src_qn->rate == rate)
|
||||
return 0;
|
||||
|
||||
|
@ -635,6 +637,14 @@ static int msm8974_icc_set(struct icc_node *src, struct icc_node *dst)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int msm8974_get_bw(struct icc_node *node, u32 *avg, u32 *peak)
|
||||
{
|
||||
*avg = 0;
|
||||
*peak = 0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int msm8974_icc_probe(struct platform_device *pdev)
|
||||
{
|
||||
const struct msm8974_icc_desc *desc;
|
||||
|
@ -688,6 +698,7 @@ static int msm8974_icc_probe(struct platform_device *pdev)
|
|||
provider->aggregate = icc_std_aggregate;
|
||||
provider->xlate = of_icc_xlate_onecell;
|
||||
provider->data = data;
|
||||
provider->get_bw = msm8974_get_bw;
|
||||
|
||||
ret = icc_provider_add(provider);
|
||||
if (ret) {
|
||||
|
@ -758,6 +769,7 @@ static struct platform_driver msm8974_noc_driver = {
|
|||
.driver = {
|
||||
.name = "qnoc-msm8974",
|
||||
.of_match_table = msm8974_noc_of_match,
|
||||
.sync_state = icc_sync_state,
|
||||
},
|
||||
};
|
||||
module_platform_driver(msm8974_noc_driver);
|
||||
|
|
|
@ -157,8 +157,8 @@ struct qcom_icc_desc {
|
|||
}
|
||||
|
||||
DEFINE_QNODE(mas_apps_proc, QCS404_MASTER_AMPSS_M0, 8, 0, -1, QCS404_SLAVE_EBI_CH0, QCS404_BIMC_SNOC_SLV);
|
||||
DEFINE_QNODE(mas_oxili, QCS404_MASTER_GRAPHICS_3D, 8, 6, -1, QCS404_SLAVE_EBI_CH0, QCS404_BIMC_SNOC_SLV);
|
||||
DEFINE_QNODE(mas_mdp, QCS404_MASTER_MDP_PORT0, 8, 8, -1, QCS404_SLAVE_EBI_CH0, QCS404_BIMC_SNOC_SLV);
|
||||
DEFINE_QNODE(mas_oxili, QCS404_MASTER_GRAPHICS_3D, 8, -1, -1, QCS404_SLAVE_EBI_CH0, QCS404_BIMC_SNOC_SLV);
|
||||
DEFINE_QNODE(mas_mdp, QCS404_MASTER_MDP_PORT0, 8, -1, -1, QCS404_SLAVE_EBI_CH0, QCS404_BIMC_SNOC_SLV);
|
||||
DEFINE_QNODE(mas_snoc_bimc_1, QCS404_SNOC_BIMC_1_MAS, 8, 76, -1, QCS404_SLAVE_EBI_CH0);
|
||||
DEFINE_QNODE(mas_tcu_0, QCS404_MASTER_TCU_0, 8, -1, -1, QCS404_SLAVE_EBI_CH0, QCS404_BIMC_SNOC_SLV);
|
||||
DEFINE_QNODE(mas_spdm, QCS404_MASTER_SPDM, 4, -1, -1, QCS404_PNOC_INT_3);
|
||||
|
|
|
@ -42,7 +42,6 @@
|
|||
#define ITS_FLAGS_CMDQ_NEEDS_FLUSHING (1ULL << 0)
|
||||
#define ITS_FLAGS_WORKAROUND_CAVIUM_22375 (1ULL << 1)
|
||||
#define ITS_FLAGS_WORKAROUND_CAVIUM_23144 (1ULL << 2)
|
||||
#define ITS_FLAGS_SAVE_SUSPEND_STATE (1ULL << 3)
|
||||
|
||||
#define RDIST_FLAGS_PROPBASE_NEEDS_FLUSHING (1 << 0)
|
||||
#define RDIST_FLAGS_RD_TABLES_PREALLOCATED (1 << 1)
|
||||
|
@ -4741,9 +4740,6 @@ static int its_save_disable(void)
|
|||
list_for_each_entry(its, &its_nodes, entry) {
|
||||
void __iomem *base;
|
||||
|
||||
if (!(its->flags & ITS_FLAGS_SAVE_SUSPEND_STATE))
|
||||
continue;
|
||||
|
||||
base = its->base;
|
||||
its->ctlr_save = readl_relaxed(base + GITS_CTLR);
|
||||
err = its_force_quiescent(base);
|
||||
|
@ -4762,9 +4758,6 @@ err:
|
|||
list_for_each_entry_continue_reverse(its, &its_nodes, entry) {
|
||||
void __iomem *base;
|
||||
|
||||
if (!(its->flags & ITS_FLAGS_SAVE_SUSPEND_STATE))
|
||||
continue;
|
||||
|
||||
base = its->base;
|
||||
writel_relaxed(its->ctlr_save, base + GITS_CTLR);
|
||||
}
|
||||
|
@ -4784,9 +4777,6 @@ static void its_restore_enable(void)
|
|||
void __iomem *base;
|
||||
int i;
|
||||
|
||||
if (!(its->flags & ITS_FLAGS_SAVE_SUSPEND_STATE))
|
||||
continue;
|
||||
|
||||
base = its->base;
|
||||
|
||||
/*
|
||||
|
@ -4794,7 +4784,10 @@ static void its_restore_enable(void)
|
|||
* don't restore it since writing to CBASER or BASER<n>
|
||||
* registers is undefined according to the GIC v3 ITS
|
||||
* Specification.
|
||||
*
|
||||
* Firmware resuming with the ITS enabled is terminally broken.
|
||||
*/
|
||||
WARN_ON(readl_relaxed(base + GITS_CTLR) & GITS_CTLR_ENABLE);
|
||||
ret = its_force_quiescent(base);
|
||||
if (ret) {
|
||||
pr_err("ITS@%pa: failed to quiesce on resume: %d\n",
|
||||
|
@ -5074,9 +5067,6 @@ static int __init its_probe_one(struct resource *res,
|
|||
ctlr |= GITS_CTLR_ImDe;
|
||||
writel_relaxed(ctlr, its->base + GITS_CTLR);
|
||||
|
||||
if (GITS_TYPER_HCC(typer))
|
||||
its->flags |= ITS_FLAGS_SAVE_SUSPEND_STATE;
|
||||
|
||||
err = its_init_domain(handle, its);
|
||||
if (err)
|
||||
goto out_free_tables;
|
||||
|
|
|
@ -136,7 +136,7 @@ static int exiu_domain_translate(struct irq_domain *domain,
|
|||
if (fwspec->param_count != 2)
|
||||
return -EINVAL;
|
||||
*hwirq = fwspec->param[0];
|
||||
*type = fwspec->param[2] & IRQ_TYPE_SENSE_MASK;
|
||||
*type = fwspec->param[1] & IRQ_TYPE_SENSE_MASK;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -5436,6 +5436,8 @@ static void gaudi_handle_ecc_event(struct hl_device *hdev, u16 event_type,
|
|||
params.num_memories = 33;
|
||||
params.derr = true;
|
||||
params.disable_clock_gating = true;
|
||||
extract_info_from_fw = false;
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -1295,12 +1295,22 @@ int c_can_power_up(struct net_device *dev)
|
|||
time_after(time_out, jiffies))
|
||||
cpu_relax();
|
||||
|
||||
if (time_after(jiffies, time_out))
|
||||
return -ETIMEDOUT;
|
||||
if (time_after(jiffies, time_out)) {
|
||||
ret = -ETIMEDOUT;
|
||||
goto err_out;
|
||||
}
|
||||
|
||||
ret = c_can_start(dev);
|
||||
if (!ret)
|
||||
c_can_irq_control(priv, true);
|
||||
if (ret)
|
||||
goto err_out;
|
||||
|
||||
c_can_irq_control(priv, true);
|
||||
|
||||
return 0;
|
||||
|
||||
err_out:
|
||||
c_can_reset_ram(priv, false);
|
||||
c_can_pm_runtime_put_sync(priv);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -692,8 +692,10 @@ static int kvaser_pciefd_open(struct net_device *netdev)
|
|||
return err;
|
||||
|
||||
err = kvaser_pciefd_bus_on(can);
|
||||
if (err)
|
||||
if (err) {
|
||||
close_candev(netdev);
|
||||
return err;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -479,18 +479,18 @@ static int tcan4x5x_can_probe(struct spi_device *spi)
|
|||
spi->bits_per_word = 32;
|
||||
ret = spi_setup(spi);
|
||||
if (ret)
|
||||
goto out_clk;
|
||||
goto out_m_can_class_free_dev;
|
||||
|
||||
priv->regmap = devm_regmap_init(&spi->dev, &tcan4x5x_bus,
|
||||
&spi->dev, &tcan4x5x_regmap);
|
||||
if (IS_ERR(priv->regmap)) {
|
||||
ret = PTR_ERR(priv->regmap);
|
||||
goto out_clk;
|
||||
goto out_m_can_class_free_dev;
|
||||
}
|
||||
|
||||
ret = tcan4x5x_power_enable(priv->power, 1);
|
||||
if (ret)
|
||||
goto out_clk;
|
||||
goto out_m_can_class_free_dev;
|
||||
|
||||
ret = tcan4x5x_get_gpios(mcan_class);
|
||||
if (ret)
|
||||
|
@ -509,11 +509,6 @@ static int tcan4x5x_can_probe(struct spi_device *spi)
|
|||
|
||||
out_power:
|
||||
tcan4x5x_power_enable(priv->power, 0);
|
||||
out_clk:
|
||||
if (!IS_ERR(mcan_class->cclk)) {
|
||||
clk_disable_unprepare(mcan_class->cclk);
|
||||
clk_disable_unprepare(mcan_class->hclk);
|
||||
}
|
||||
out_m_can_class_free_dev:
|
||||
m_can_class_free_dev(mcan_class->net);
|
||||
return ret;
|
||||
|
|
|
@ -473,7 +473,6 @@ static int sja1000_err(struct net_device *dev, uint8_t isrc, uint8_t status)
|
|||
netdev_dbg(dev, "arbitration lost interrupt\n");
|
||||
alc = priv->read_reg(priv, SJA1000_ALC);
|
||||
priv->can.can_stats.arbitration_lost++;
|
||||
stats->tx_errors++;
|
||||
cf->can_id |= CAN_ERR_LOSTARB;
|
||||
cf->data[0] = alc & 0x1f;
|
||||
}
|
||||
|
|
|
@ -604,7 +604,6 @@ static int sun4i_can_err(struct net_device *dev, u8 isrc, u8 status)
|
|||
netdev_dbg(dev, "arbitration lost interrupt\n");
|
||||
alc = readl(priv->base + SUN4I_REG_STA_ADDR);
|
||||
priv->can.can_stats.arbitration_lost++;
|
||||
stats->tx_errors++;
|
||||
if (likely(skb)) {
|
||||
cf->can_id |= CAN_ERR_LOSTARB;
|
||||
cf->data[0] = (alc >> 8) & 0x1f;
|
||||
|
|
|
@ -88,6 +88,7 @@ config BNX2
|
|||
config CNIC
|
||||
tristate "QLogic CNIC support"
|
||||
depends on PCI && (IPV6 || IPV6=n)
|
||||
depends on MMU
|
||||
select BNX2
|
||||
select UIO
|
||||
help
|
||||
|
|
|
@ -3175,6 +3175,7 @@ int t3_sge_alloc_qset(struct adapter *adapter, unsigned int id, int nports,
|
|||
GFP_KERNEL | __GFP_COMP);
|
||||
if (!avail) {
|
||||
CH_ALERT(adapter, "free list queue 0 initialization failed\n");
|
||||
ret = -ENOMEM;
|
||||
goto err;
|
||||
}
|
||||
if (avail < q->fl[0].size)
|
||||
|
|
|
@ -1206,6 +1206,7 @@ static struct sock *chtls_recv_sock(struct sock *lsk,
|
|||
sk_setup_caps(newsk, dst);
|
||||
ctx = tls_get_ctx(lsk);
|
||||
newsk->sk_destruct = ctx->sk_destruct;
|
||||
newsk->sk_prot_creator = lsk->sk_prot_creator;
|
||||
csk->sk = newsk;
|
||||
csk->passive_reap_next = oreq;
|
||||
csk->tx_chan = cxgb4_port_chan(ndev);
|
||||
|
|
|
@ -391,6 +391,7 @@ int chtls_setkey(struct chtls_sock *csk, u32 keylen,
|
|||
csk->wr_unacked += DIV_ROUND_UP(len, 16);
|
||||
enqueue_wr(csk, skb);
|
||||
cxgb4_ofld_send(csk->egress_dev, skb);
|
||||
skb = NULL;
|
||||
|
||||
chtls_set_scmd(csk);
|
||||
/* Clear quiesce for Rx key */
|
||||
|
|
|
@ -2158,6 +2158,15 @@ workaround:
|
|||
skb_copy_header(new_skb, skb);
|
||||
new_skb->dev = skb->dev;
|
||||
|
||||
/* Copy relevant timestamp info from the old skb to the new */
|
||||
if (priv->tx_tstamp) {
|
||||
skb_shinfo(new_skb)->tx_flags = skb_shinfo(skb)->tx_flags;
|
||||
skb_shinfo(new_skb)->hwtstamps = skb_shinfo(skb)->hwtstamps;
|
||||
skb_shinfo(new_skb)->tskey = skb_shinfo(skb)->tskey;
|
||||
if (skb->sk)
|
||||
skb_set_owner_w(new_skb, skb->sk);
|
||||
}
|
||||
|
||||
/* We move the headroom when we align it so we have to reset the
|
||||
* network and transport header offsets relative to the new data
|
||||
* pointer. The checksum offload relies on these offsets.
|
||||
|
@ -2165,7 +2174,6 @@ workaround:
|
|||
skb_set_network_header(new_skb, skb_network_offset(skb));
|
||||
skb_set_transport_header(new_skb, skb_transport_offset(skb));
|
||||
|
||||
/* TODO: does timestamping need the result in the old skb? */
|
||||
dev_kfree_skb(skb);
|
||||
*s = new_skb;
|
||||
|
||||
|
|
|
@ -852,7 +852,7 @@ static void release_napi(struct ibmvnic_adapter *adapter)
|
|||
static int ibmvnic_login(struct net_device *netdev)
|
||||
{
|
||||
struct ibmvnic_adapter *adapter = netdev_priv(netdev);
|
||||
unsigned long timeout = msecs_to_jiffies(30000);
|
||||
unsigned long timeout = msecs_to_jiffies(20000);
|
||||
int retry_count = 0;
|
||||
int retries = 10;
|
||||
bool retry;
|
||||
|
@ -868,10 +868,8 @@ static int ibmvnic_login(struct net_device *netdev)
|
|||
adapter->init_done_rc = 0;
|
||||
reinit_completion(&adapter->init_done);
|
||||
rc = send_login(adapter);
|
||||
if (rc) {
|
||||
netdev_warn(netdev, "Unable to login\n");
|
||||
if (rc)
|
||||
return rc;
|
||||
}
|
||||
|
||||
if (!wait_for_completion_timeout(&adapter->init_done,
|
||||
timeout)) {
|
||||
|
@ -958,7 +956,7 @@ static void release_resources(struct ibmvnic_adapter *adapter)
|
|||
static int set_link_state(struct ibmvnic_adapter *adapter, u8 link_state)
|
||||
{
|
||||
struct net_device *netdev = adapter->netdev;
|
||||
unsigned long timeout = msecs_to_jiffies(30000);
|
||||
unsigned long timeout = msecs_to_jiffies(20000);
|
||||
union ibmvnic_crq crq;
|
||||
bool resend;
|
||||
int rc;
|
||||
|
@ -1939,7 +1937,7 @@ static int do_change_param_reset(struct ibmvnic_adapter *adapter,
|
|||
if (reset_state == VNIC_OPEN) {
|
||||
rc = __ibmvnic_close(netdev);
|
||||
if (rc)
|
||||
return rc;
|
||||
goto out;
|
||||
}
|
||||
|
||||
release_resources(adapter);
|
||||
|
@ -1957,24 +1955,25 @@ static int do_change_param_reset(struct ibmvnic_adapter *adapter,
|
|||
}
|
||||
|
||||
rc = ibmvnic_reset_init(adapter, true);
|
||||
if (rc)
|
||||
return IBMVNIC_INIT_FAILED;
|
||||
if (rc) {
|
||||
rc = IBMVNIC_INIT_FAILED;
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* If the adapter was in PROBE state prior to the reset,
|
||||
* exit here.
|
||||
*/
|
||||
if (reset_state == VNIC_PROBED)
|
||||
return 0;
|
||||
goto out;
|
||||
|
||||
rc = ibmvnic_login(netdev);
|
||||
if (rc) {
|
||||
adapter->state = reset_state;
|
||||
return rc;
|
||||
goto out;
|
||||
}
|
||||
|
||||
rc = init_resources(adapter);
|
||||
if (rc)
|
||||
return rc;
|
||||
goto out;
|
||||
|
||||
ibmvnic_disable_irqs(adapter);
|
||||
|
||||
|
@ -1984,8 +1983,10 @@ static int do_change_param_reset(struct ibmvnic_adapter *adapter,
|
|||
return 0;
|
||||
|
||||
rc = __ibmvnic_open(netdev);
|
||||
if (rc)
|
||||
return IBMVNIC_OPEN_FAILED;
|
||||
if (rc) {
|
||||
rc = IBMVNIC_OPEN_FAILED;
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* refresh device's multicast list */
|
||||
ibmvnic_set_multi(netdev);
|
||||
|
@ -1994,7 +1995,10 @@ static int do_change_param_reset(struct ibmvnic_adapter *adapter,
|
|||
for (i = 0; i < adapter->req_rx_queues; i++)
|
||||
napi_schedule(&adapter->napi[i]);
|
||||
|
||||
return 0;
|
||||
out:
|
||||
if (rc)
|
||||
adapter->state = reset_state;
|
||||
return rc;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2097,7 +2101,6 @@ static int do_reset(struct ibmvnic_adapter *adapter,
|
|||
|
||||
rc = ibmvnic_login(netdev);
|
||||
if (rc) {
|
||||
adapter->state = reset_state;
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
@ -2165,6 +2168,9 @@ static int do_reset(struct ibmvnic_adapter *adapter,
|
|||
rc = 0;
|
||||
|
||||
out:
|
||||
/* restore the adapter state if reset failed */
|
||||
if (rc)
|
||||
adapter->state = reset_state;
|
||||
rtnl_unlock();
|
||||
|
||||
return rc;
|
||||
|
@ -2197,43 +2203,46 @@ static int do_hard_reset(struct ibmvnic_adapter *adapter,
|
|||
if (rc) {
|
||||
netdev_err(adapter->netdev,
|
||||
"Couldn't initialize crq. rc=%d\n", rc);
|
||||
return rc;
|
||||
goto out;
|
||||
}
|
||||
|
||||
rc = ibmvnic_reset_init(adapter, false);
|
||||
if (rc)
|
||||
return rc;
|
||||
goto out;
|
||||
|
||||
/* If the adapter was in PROBE state prior to the reset,
|
||||
* exit here.
|
||||
*/
|
||||
if (reset_state == VNIC_PROBED)
|
||||
return 0;
|
||||
goto out;
|
||||
|
||||
rc = ibmvnic_login(netdev);
|
||||
if (rc) {
|
||||
adapter->state = VNIC_PROBED;
|
||||
return 0;
|
||||
}
|
||||
if (rc)
|
||||
goto out;
|
||||
|
||||
rc = init_resources(adapter);
|
||||
if (rc)
|
||||
return rc;
|
||||
goto out;
|
||||
|
||||
ibmvnic_disable_irqs(adapter);
|
||||
adapter->state = VNIC_CLOSED;
|
||||
|
||||
if (reset_state == VNIC_CLOSED)
|
||||
return 0;
|
||||
goto out;
|
||||
|
||||
rc = __ibmvnic_open(netdev);
|
||||
if (rc)
|
||||
return IBMVNIC_OPEN_FAILED;
|
||||
if (rc) {
|
||||
rc = IBMVNIC_OPEN_FAILED;
|
||||
goto out;
|
||||
}
|
||||
|
||||
call_netdevice_notifiers(NETDEV_NOTIFY_PEERS, netdev);
|
||||
call_netdevice_notifiers(NETDEV_RESEND_IGMP, netdev);
|
||||
|
||||
return 0;
|
||||
out:
|
||||
/* restore adapter state if reset failed */
|
||||
if (rc)
|
||||
adapter->state = reset_state;
|
||||
return rc;
|
||||
}
|
||||
|
||||
static struct ibmvnic_rwi *get_next_rwi(struct ibmvnic_adapter *adapter)
|
||||
|
@ -2255,17 +2264,6 @@ static struct ibmvnic_rwi *get_next_rwi(struct ibmvnic_adapter *adapter)
|
|||
return rwi;
|
||||
}
|
||||
|
||||
static void free_all_rwi(struct ibmvnic_adapter *adapter)
|
||||
{
|
||||
struct ibmvnic_rwi *rwi;
|
||||
|
||||
rwi = get_next_rwi(adapter);
|
||||
while (rwi) {
|
||||
kfree(rwi);
|
||||
rwi = get_next_rwi(adapter);
|
||||
}
|
||||
}
|
||||
|
||||
static void __ibmvnic_reset(struct work_struct *work)
|
||||
{
|
||||
struct ibmvnic_rwi *rwi;
|
||||
|
@ -2323,20 +2321,23 @@ static void __ibmvnic_reset(struct work_struct *work)
|
|||
rc = do_hard_reset(adapter, rwi, reset_state);
|
||||
rtnl_unlock();
|
||||
}
|
||||
if (rc) {
|
||||
/* give backing device time to settle down */
|
||||
netdev_dbg(adapter->netdev,
|
||||
"[S:%d] Hard reset failed, waiting 60 secs\n",
|
||||
adapter->state);
|
||||
set_current_state(TASK_UNINTERRUPTIBLE);
|
||||
schedule_timeout(60 * HZ);
|
||||
}
|
||||
} else if (!(rwi->reset_reason == VNIC_RESET_FATAL &&
|
||||
adapter->from_passive_init)) {
|
||||
rc = do_reset(adapter, rwi, reset_state);
|
||||
}
|
||||
kfree(rwi);
|
||||
if (rc == IBMVNIC_OPEN_FAILED) {
|
||||
if (list_empty(&adapter->rwi_list))
|
||||
adapter->state = VNIC_CLOSED;
|
||||
else
|
||||
adapter->state = reset_state;
|
||||
rc = 0;
|
||||
} else if (rc && rc != IBMVNIC_INIT_FAILED &&
|
||||
!adapter->force_reset_recovery)
|
||||
break;
|
||||
adapter->last_reset_time = jiffies;
|
||||
|
||||
if (rc)
|
||||
netdev_dbg(adapter->netdev, "Reset failed, rc=%d\n", rc);
|
||||
|
||||
rwi = get_next_rwi(adapter);
|
||||
|
||||
|
@ -2350,11 +2351,6 @@ static void __ibmvnic_reset(struct work_struct *work)
|
|||
complete(&adapter->reset_done);
|
||||
}
|
||||
|
||||
if (rc) {
|
||||
netdev_dbg(adapter->netdev, "Reset failed\n");
|
||||
free_all_rwi(adapter);
|
||||
}
|
||||
|
||||
clear_bit_unlock(0, &adapter->resetting);
|
||||
}
|
||||
|
||||
|
@ -2442,7 +2438,13 @@ static void ibmvnic_tx_timeout(struct net_device *dev, unsigned int txqueue)
|
|||
"Adapter is resetting, skip timeout reset\n");
|
||||
return;
|
||||
}
|
||||
|
||||
/* No queuing up reset until at least 5 seconds (default watchdog val)
|
||||
* after last reset
|
||||
*/
|
||||
if (time_before(jiffies, (adapter->last_reset_time + dev->watchdog_timeo))) {
|
||||
netdev_dbg(dev, "Not yet time to tx timeout.\n");
|
||||
return;
|
||||
}
|
||||
ibmvnic_reset(adapter, VNIC_RESET_TIMEOUT);
|
||||
}
|
||||
|
||||
|
@ -2491,6 +2493,12 @@ restart_poll:
|
|||
|
||||
if (!pending_scrq(adapter, rx_scrq))
|
||||
break;
|
||||
/* The queue entry at the current index is peeked at above
|
||||
* to determine that there is a valid descriptor awaiting
|
||||
* processing. We want to be sure that the current slot
|
||||
* holds a valid descriptor before reading its contents.
|
||||
*/
|
||||
dma_rmb();
|
||||
next = ibmvnic_next_scrq(adapter, rx_scrq);
|
||||
rx_buff =
|
||||
(struct ibmvnic_rx_buff *)be64_to_cpu(next->
|
||||
|
@ -2954,16 +2962,28 @@ static int reset_one_sub_crq_queue(struct ibmvnic_adapter *adapter,
|
|||
{
|
||||
int rc;
|
||||
|
||||
if (!scrq) {
|
||||
netdev_dbg(adapter->netdev,
|
||||
"Invalid scrq reset. irq (%d) or msgs (%p).\n",
|
||||
scrq->irq, scrq->msgs);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (scrq->irq) {
|
||||
free_irq(scrq->irq, scrq);
|
||||
irq_dispose_mapping(scrq->irq);
|
||||
scrq->irq = 0;
|
||||
}
|
||||
|
||||
memset(scrq->msgs, 0, 4 * PAGE_SIZE);
|
||||
atomic_set(&scrq->used, 0);
|
||||
scrq->cur = 0;
|
||||
scrq->ind_buf.index = 0;
|
||||
if (scrq->msgs) {
|
||||
memset(scrq->msgs, 0, 4 * PAGE_SIZE);
|
||||
atomic_set(&scrq->used, 0);
|
||||
scrq->cur = 0;
|
||||
scrq->ind_buf.index = 0;
|
||||
} else {
|
||||
netdev_dbg(adapter->netdev, "Invalid scrq reset\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
rc = h_reg_sub_crq(adapter->vdev->unit_address, scrq->msg_token,
|
||||
4 * PAGE_SIZE, &scrq->crq_num, &scrq->hw_irq);
|
||||
|
@ -3220,13 +3240,18 @@ restart_loop:
|
|||
int total_bytes = 0;
|
||||
int num_packets = 0;
|
||||
|
||||
/* The queue entry at the current index is peeked at above
|
||||
* to determine that there is a valid descriptor awaiting
|
||||
* processing. We want to be sure that the current slot
|
||||
* holds a valid descriptor before reading its contents.
|
||||
*/
|
||||
dma_rmb();
|
||||
|
||||
next = ibmvnic_next_scrq(adapter, scrq);
|
||||
for (i = 0; i < next->tx_comp.num_comps; i++) {
|
||||
if (next->tx_comp.rcs[i]) {
|
||||
if (next->tx_comp.rcs[i])
|
||||
dev_err(dev, "tx error %x\n",
|
||||
next->tx_comp.rcs[i]);
|
||||
continue;
|
||||
}
|
||||
index = be32_to_cpu(next->tx_comp.correlators[i]);
|
||||
if (index & IBMVNIC_TSO_POOL_MASK) {
|
||||
tx_pool = &adapter->tso_pool[pool];
|
||||
|
@ -3618,6 +3643,11 @@ static union sub_crq *ibmvnic_next_scrq(struct ibmvnic_adapter *adapter,
|
|||
}
|
||||
spin_unlock_irqrestore(&scrq->lock, flags);
|
||||
|
||||
/* Ensure that the entire buffer descriptor has been
|
||||
* loaded before reading its contents
|
||||
*/
|
||||
dma_rmb();
|
||||
|
||||
return entry;
|
||||
}
|
||||
|
||||
|
@ -3807,15 +3837,16 @@ static int send_login(struct ibmvnic_adapter *adapter)
|
|||
struct ibmvnic_login_rsp_buffer *login_rsp_buffer;
|
||||
struct ibmvnic_login_buffer *login_buffer;
|
||||
struct device *dev = &adapter->vdev->dev;
|
||||
struct vnic_login_client_data *vlcd;
|
||||
dma_addr_t rsp_buffer_token;
|
||||
dma_addr_t buffer_token;
|
||||
size_t rsp_buffer_size;
|
||||
union ibmvnic_crq crq;
|
||||
int client_data_len;
|
||||
size_t buffer_size;
|
||||
__be64 *tx_list_p;
|
||||
__be64 *rx_list_p;
|
||||
int client_data_len;
|
||||
struct vnic_login_client_data *vlcd;
|
||||
int rc;
|
||||
int i;
|
||||
|
||||
if (!adapter->tx_scrq || !adapter->rx_scrq) {
|
||||
|
@ -3919,16 +3950,25 @@ static int send_login(struct ibmvnic_adapter *adapter)
|
|||
crq.login.cmd = LOGIN;
|
||||
crq.login.ioba = cpu_to_be32(buffer_token);
|
||||
crq.login.len = cpu_to_be32(buffer_size);
|
||||
ibmvnic_send_crq(adapter, &crq);
|
||||
|
||||
adapter->login_pending = true;
|
||||
rc = ibmvnic_send_crq(adapter, &crq);
|
||||
if (rc) {
|
||||
adapter->login_pending = false;
|
||||
netdev_err(adapter->netdev, "Failed to send login, rc=%d\n", rc);
|
||||
goto buf_rsp_map_failed;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
buf_rsp_map_failed:
|
||||
kfree(login_rsp_buffer);
|
||||
adapter->login_rsp_buf = NULL;
|
||||
buf_rsp_alloc_failed:
|
||||
dma_unmap_single(dev, buffer_token, buffer_size, DMA_TO_DEVICE);
|
||||
buf_map_failed:
|
||||
kfree(login_buffer);
|
||||
adapter->login_buf = NULL;
|
||||
buf_alloc_failed:
|
||||
return -1;
|
||||
}
|
||||
|
@ -4471,6 +4511,15 @@ static int handle_login_rsp(union ibmvnic_crq *login_rsp_crq,
|
|||
u64 *size_array;
|
||||
int i;
|
||||
|
||||
/* CHECK: Test/set of login_pending does not need to be atomic
|
||||
* because only ibmvnic_tasklet tests/clears this.
|
||||
*/
|
||||
if (!adapter->login_pending) {
|
||||
netdev_warn(netdev, "Ignoring unexpected login response\n");
|
||||
return 0;
|
||||
}
|
||||
adapter->login_pending = false;
|
||||
|
||||
dma_unmap_single(dev, adapter->login_buf_token, adapter->login_buf_sz,
|
||||
DMA_TO_DEVICE);
|
||||
dma_unmap_single(dev, adapter->login_rsp_buf_token,
|
||||
|
@ -4500,7 +4549,7 @@ static int handle_login_rsp(union ibmvnic_crq *login_rsp_crq,
|
|||
adapter->req_rx_add_queues !=
|
||||
be32_to_cpu(login_rsp->num_rxadd_subcrqs))) {
|
||||
dev_err(dev, "FATAL: Inconsistent login and login rsp\n");
|
||||
ibmvnic_remove(adapter->vdev);
|
||||
ibmvnic_reset(adapter, VNIC_RESET_FATAL);
|
||||
return -EIO;
|
||||
}
|
||||
size_array = (u64 *)((u8 *)(adapter->login_rsp_buf) +
|
||||
|
@ -4842,6 +4891,11 @@ static void ibmvnic_handle_crq(union ibmvnic_crq *crq,
|
|||
case IBMVNIC_CRQ_INIT:
|
||||
dev_info(dev, "Partner initialized\n");
|
||||
adapter->from_passive_init = true;
|
||||
/* Discard any stale login responses from prev reset.
|
||||
* CHECK: should we clear even on INIT_COMPLETE?
|
||||
*/
|
||||
adapter->login_pending = false;
|
||||
|
||||
if (!completion_done(&adapter->init_done)) {
|
||||
complete(&adapter->init_done);
|
||||
adapter->init_done_rc = -EIO;
|
||||
|
@ -5179,7 +5233,7 @@ map_failed:
|
|||
static int ibmvnic_reset_init(struct ibmvnic_adapter *adapter, bool reset)
|
||||
{
|
||||
struct device *dev = &adapter->vdev->dev;
|
||||
unsigned long timeout = msecs_to_jiffies(30000);
|
||||
unsigned long timeout = msecs_to_jiffies(20000);
|
||||
u64 old_num_rx_queues, old_num_tx_queues;
|
||||
int rc;
|
||||
|
||||
|
@ -5274,6 +5328,7 @@ static int ibmvnic_probe(struct vio_dev *dev, const struct vio_device_id *id)
|
|||
dev_set_drvdata(&dev->dev, netdev);
|
||||
adapter->vdev = dev;
|
||||
adapter->netdev = netdev;
|
||||
adapter->login_pending = false;
|
||||
|
||||
ether_addr_copy(adapter->mac_addr, mac_addr_p);
|
||||
ether_addr_copy(netdev->dev_addr, adapter->mac_addr);
|
||||
|
@ -5337,7 +5392,7 @@ static int ibmvnic_probe(struct vio_dev *dev, const struct vio_device_id *id)
|
|||
adapter->state = VNIC_PROBED;
|
||||
|
||||
adapter->wait_for_reset = false;
|
||||
|
||||
adapter->last_reset_time = jiffies;
|
||||
return 0;
|
||||
|
||||
ibmvnic_register_fail:
|
||||
|
|
|
@ -1087,6 +1087,9 @@ struct ibmvnic_adapter {
|
|||
struct delayed_work ibmvnic_delayed_reset;
|
||||
unsigned long resetting;
|
||||
bool napi_enabled, from_passive_init;
|
||||
bool login_pending;
|
||||
/* last device reset time */
|
||||
unsigned long last_reset_time;
|
||||
|
||||
bool failover_pending;
|
||||
bool force_reset_recovery;
|
||||
|
|
|
@ -4434,6 +4434,7 @@ static int mvpp2_open(struct net_device *dev)
|
|||
if (!valid) {
|
||||
netdev_err(port->dev,
|
||||
"invalid configuration: no dt or link IRQ");
|
||||
err = -ENOENT;
|
||||
goto err_free_irq;
|
||||
}
|
||||
|
||||
|
|
|
@ -44,6 +44,7 @@ static void accel_fs_tcp_set_ipv4_flow(struct mlx5_flow_spec *spec, struct sock
|
|||
outer_headers.dst_ipv4_dst_ipv6.ipv4_layout.ipv4);
|
||||
}
|
||||
|
||||
#if IS_ENABLED(CONFIG_IPV6)
|
||||
static void accel_fs_tcp_set_ipv6_flow(struct mlx5_flow_spec *spec, struct sock *sk)
|
||||
{
|
||||
MLX5_SET_TO_ONES(fte_match_param, spec->match_criteria, outer_headers.ip_protocol);
|
||||
|
@ -63,6 +64,7 @@ static void accel_fs_tcp_set_ipv6_flow(struct mlx5_flow_spec *spec, struct sock
|
|||
outer_headers.dst_ipv4_dst_ipv6.ipv6_layout.ipv6),
|
||||
0xff, 16);
|
||||
}
|
||||
#endif
|
||||
|
||||
void mlx5e_accel_fs_del_sk(struct mlx5_flow_handle *rule)
|
||||
{
|
||||
|
|
|
@ -161,7 +161,9 @@ ipsec_txwqe_build_eseg_csum(struct mlx5e_txqsq *sq, struct sk_buff *skb,
|
|||
}
|
||||
|
||||
static inline void
|
||||
mlx5e_txwqe_build_eseg_csum(struct mlx5e_txqsq *sq, struct sk_buff *skb, struct mlx5_wqe_eth_seg *eseg)
|
||||
mlx5e_txwqe_build_eseg_csum(struct mlx5e_txqsq *sq, struct sk_buff *skb,
|
||||
struct mlx5e_accel_tx_state *accel,
|
||||
struct mlx5_wqe_eth_seg *eseg)
|
||||
{
|
||||
if (likely(skb->ip_summed == CHECKSUM_PARTIAL)) {
|
||||
eseg->cs_flags = MLX5_ETH_WQE_L3_CSUM;
|
||||
|
@ -173,6 +175,11 @@ mlx5e_txwqe_build_eseg_csum(struct mlx5e_txqsq *sq, struct sk_buff *skb, struct
|
|||
eseg->cs_flags |= MLX5_ETH_WQE_L4_CSUM;
|
||||
sq->stats->csum_partial++;
|
||||
}
|
||||
#ifdef CONFIG_MLX5_EN_TLS
|
||||
} else if (unlikely(accel && accel->tls.tls_tisn)) {
|
||||
eseg->cs_flags = MLX5_ETH_WQE_L3_CSUM | MLX5_ETH_WQE_L4_CSUM;
|
||||
sq->stats->csum_partial++;
|
||||
#endif
|
||||
} else if (unlikely(eseg->flow_table_metadata & cpu_to_be32(MLX5_ETH_WQE_FT_META_IPSEC))) {
|
||||
ipsec_txwqe_build_eseg_csum(sq, skb, eseg);
|
||||
|
||||
|
@ -607,12 +614,13 @@ void mlx5e_tx_mpwqe_ensure_complete(struct mlx5e_txqsq *sq)
|
|||
}
|
||||
|
||||
static bool mlx5e_txwqe_build_eseg(struct mlx5e_priv *priv, struct mlx5e_txqsq *sq,
|
||||
struct sk_buff *skb, struct mlx5_wqe_eth_seg *eseg)
|
||||
struct sk_buff *skb, struct mlx5e_accel_tx_state *accel,
|
||||
struct mlx5_wqe_eth_seg *eseg)
|
||||
{
|
||||
if (unlikely(!mlx5e_accel_tx_eseg(priv, skb, eseg)))
|
||||
return false;
|
||||
|
||||
mlx5e_txwqe_build_eseg_csum(sq, skb, eseg);
|
||||
mlx5e_txwqe_build_eseg_csum(sq, skb, accel, eseg);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -639,7 +647,7 @@ netdev_tx_t mlx5e_xmit(struct sk_buff *skb, struct net_device *dev)
|
|||
if (mlx5e_tx_skb_supports_mpwqe(skb, &attr)) {
|
||||
struct mlx5_wqe_eth_seg eseg = {};
|
||||
|
||||
if (unlikely(!mlx5e_txwqe_build_eseg(priv, sq, skb, &eseg)))
|
||||
if (unlikely(!mlx5e_txwqe_build_eseg(priv, sq, skb, &accel, &eseg)))
|
||||
return NETDEV_TX_OK;
|
||||
|
||||
mlx5e_sq_xmit_mpwqe(sq, skb, &eseg, netdev_xmit_more());
|
||||
|
@ -656,7 +664,7 @@ netdev_tx_t mlx5e_xmit(struct sk_buff *skb, struct net_device *dev)
|
|||
/* May update the WQE, but may not post other WQEs. */
|
||||
mlx5e_accel_tx_finish(sq, wqe, &accel,
|
||||
(struct mlx5_wqe_inline_seg *)(wqe->data + wqe_attr.ds_cnt_inl));
|
||||
if (unlikely(!mlx5e_txwqe_build_eseg(priv, sq, skb, &wqe->eth)))
|
||||
if (unlikely(!mlx5e_txwqe_build_eseg(priv, sq, skb, &accel, &wqe->eth)))
|
||||
return NETDEV_TX_OK;
|
||||
|
||||
mlx5e_sq_xmit_wqe(sq, skb, &attr, &wqe_attr, wqe, pi, netdev_xmit_more());
|
||||
|
@ -675,7 +683,7 @@ void mlx5e_sq_xmit_simple(struct mlx5e_txqsq *sq, struct sk_buff *skb, bool xmit
|
|||
mlx5e_sq_calc_wqe_attr(skb, &attr, &wqe_attr);
|
||||
pi = mlx5e_txqsq_get_next_pi(sq, wqe_attr.num_wqebbs);
|
||||
wqe = MLX5E_TX_FETCH_WQE(sq, pi);
|
||||
mlx5e_txwqe_build_eseg_csum(sq, skb, &wqe->eth);
|
||||
mlx5e_txwqe_build_eseg_csum(sq, skb, NULL, &wqe->eth);
|
||||
mlx5e_sq_xmit_wqe(sq, skb, &attr, &wqe_attr, wqe, pi, xmit_more);
|
||||
}
|
||||
|
||||
|
@ -944,7 +952,7 @@ void mlx5i_sq_xmit(struct mlx5e_txqsq *sq, struct sk_buff *skb,
|
|||
|
||||
mlx5i_txwqe_build_datagram(av, dqpn, dqkey, datagram);
|
||||
|
||||
mlx5e_txwqe_build_eseg_csum(sq, skb, eseg);
|
||||
mlx5e_txwqe_build_eseg_csum(sq, skb, NULL, eseg);
|
||||
|
||||
eseg->mss = attr.mss;
|
||||
|
||||
|
|
|
@ -422,6 +422,24 @@ static void release_all_pages(struct mlx5_core_dev *dev, u32 func_id,
|
|||
npages, ec_function, func_id);
|
||||
}
|
||||
|
||||
static u32 fwp_fill_manage_pages_out(struct fw_page *fwp, u32 *out, u32 index,
|
||||
u32 npages)
|
||||
{
|
||||
u32 pages_set = 0;
|
||||
unsigned int n;
|
||||
|
||||
for_each_clear_bit(n, &fwp->bitmask, MLX5_NUM_4K_IN_PAGE) {
|
||||
MLX5_ARRAY_SET64(manage_pages_out, out, pas, index + pages_set,
|
||||
fwp->addr + (n * MLX5_ADAPTER_PAGE_SIZE));
|
||||
pages_set++;
|
||||
|
||||
if (!--npages)
|
||||
break;
|
||||
}
|
||||
|
||||
return pages_set;
|
||||
}
|
||||
|
||||
static int reclaim_pages_cmd(struct mlx5_core_dev *dev,
|
||||
u32 *in, int in_size, u32 *out, int out_size)
|
||||
{
|
||||
|
@ -448,8 +466,7 @@ static int reclaim_pages_cmd(struct mlx5_core_dev *dev,
|
|||
fwp = rb_entry(p, struct fw_page, rb_node);
|
||||
p = rb_next(p);
|
||||
|
||||
MLX5_ARRAY_SET64(manage_pages_out, out, pas, i, fwp->addr);
|
||||
i++;
|
||||
i += fwp_fill_manage_pages_out(fwp, out, i, npages - i);
|
||||
}
|
||||
|
||||
MLX5_SET(manage_pages_out, out, output_num_entries, i);
|
||||
|
|
|
@ -92,6 +92,7 @@ int mlx5dr_cmd_query_device(struct mlx5_core_dev *mdev,
|
|||
caps->eswitch_manager = MLX5_CAP_GEN(mdev, eswitch_manager);
|
||||
caps->gvmi = MLX5_CAP_GEN(mdev, vhca_id);
|
||||
caps->flex_protocols = MLX5_CAP_GEN(mdev, flex_parser_protocols);
|
||||
caps->sw_format_ver = MLX5_CAP_GEN(mdev, steering_format_version);
|
||||
|
||||
if (caps->flex_protocols & MLX5_FLEX_PARSER_ICMP_V4_ENABLED) {
|
||||
caps->flex_parser_id_icmp_dw0 = MLX5_CAP_GEN(mdev, flex_parser_id_icmp_dw0);
|
||||
|
|
|
@ -223,6 +223,11 @@ static int dr_domain_caps_init(struct mlx5_core_dev *mdev,
|
|||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (dmn->info.caps.sw_format_ver != MLX5_STEERING_FORMAT_CONNECTX_5) {
|
||||
mlx5dr_err(dmn, "SW steering is not supported on this device\n");
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
ret = dr_domain_query_fdb_caps(mdev, dmn);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
|
|
@ -626,6 +626,7 @@ struct mlx5dr_cmd_caps {
|
|||
u8 max_ft_level;
|
||||
u16 roce_min_src_udp;
|
||||
u8 num_esw_ports;
|
||||
u8 sw_format_ver;
|
||||
bool eswitch_manager;
|
||||
bool rx_sw_owner;
|
||||
bool tx_sw_owner;
|
||||
|
|
|
@ -1078,16 +1078,20 @@ static int pasemi_mac_open(struct net_device *dev)
|
|||
|
||||
mac->tx = pasemi_mac_setup_tx_resources(dev);
|
||||
|
||||
if (!mac->tx)
|
||||
if (!mac->tx) {
|
||||
ret = -ENOMEM;
|
||||
goto out_tx_ring;
|
||||
}
|
||||
|
||||
/* We might already have allocated rings in case mtu was changed
|
||||
* before interface was brought up.
|
||||
*/
|
||||
if (dev->mtu > 1500 && !mac->num_cs) {
|
||||
pasemi_mac_setup_csrings(mac);
|
||||
if (!mac->num_cs)
|
||||
if (!mac->num_cs) {
|
||||
ret = -ENOMEM;
|
||||
goto out_tx_ring;
|
||||
}
|
||||
}
|
||||
|
||||
/* Zero out rmon counters */
|
||||
|
|
|
@ -258,11 +258,21 @@ static void geneve_rx(struct geneve_dev *geneve, struct geneve_sock *gs,
|
|||
skb_dst_set(skb, &tun_dst->dst);
|
||||
|
||||
/* Ignore packet loops (and multicast echo) */
|
||||
if (ether_addr_equal(eth_hdr(skb)->h_source, geneve->dev->dev_addr)) {
|
||||
geneve->dev->stats.rx_errors++;
|
||||
goto drop;
|
||||
}
|
||||
if (ether_addr_equal(eth_hdr(skb)->h_source, geneve->dev->dev_addr))
|
||||
goto rx_error;
|
||||
|
||||
switch (skb_protocol(skb, true)) {
|
||||
case htons(ETH_P_IP):
|
||||
if (pskb_may_pull(skb, sizeof(struct iphdr)))
|
||||
goto rx_error;
|
||||
break;
|
||||
case htons(ETH_P_IPV6):
|
||||
if (pskb_may_pull(skb, sizeof(struct ipv6hdr)))
|
||||
goto rx_error;
|
||||
break;
|
||||
default:
|
||||
goto rx_error;
|
||||
}
|
||||
oiph = skb_network_header(skb);
|
||||
skb_reset_network_header(skb);
|
||||
|
||||
|
@ -299,6 +309,8 @@ static void geneve_rx(struct geneve_dev *geneve, struct geneve_sock *gs,
|
|||
dev_sw_netstats_rx_add(geneve->dev, len);
|
||||
|
||||
return;
|
||||
rx_error:
|
||||
geneve->dev->stats.rx_errors++;
|
||||
drop:
|
||||
/* Consume bad packet */
|
||||
kfree_skb(skb);
|
||||
|
|
|
@ -3799,6 +3799,9 @@ static void vxlan_config_apply(struct net_device *dev,
|
|||
dev->gso_max_segs = lowerdev->gso_max_segs;
|
||||
|
||||
needed_headroom = lowerdev->hard_header_len;
|
||||
needed_headroom += lowerdev->needed_headroom;
|
||||
|
||||
dev->needed_tailroom = lowerdev->needed_tailroom;
|
||||
|
||||
max_mtu = lowerdev->mtu - (use_ipv6 ? VXLAN6_HEADROOM :
|
||||
VXLAN_HEADROOM);
|
||||
|
@ -3878,8 +3881,10 @@ static int __vxlan_dev_create(struct net *net, struct net_device *dev,
|
|||
|
||||
if (dst->remote_ifindex) {
|
||||
remote_dev = __dev_get_by_index(net, dst->remote_ifindex);
|
||||
if (!remote_dev)
|
||||
if (!remote_dev) {
|
||||
err = -ENODEV;
|
||||
goto errout;
|
||||
}
|
||||
|
||||
err = netdev_upper_dev_link(remote_dev, dev, extack);
|
||||
if (err)
|
||||
|
|
|
@ -491,8 +491,8 @@ struct iwl_cfg {
|
|||
#define IWL_CFG_RF_ID_HR 0x7
|
||||
#define IWL_CFG_RF_ID_HR1 0x4
|
||||
|
||||
#define IWL_CFG_NO_160 0x0
|
||||
#define IWL_CFG_160 0x1
|
||||
#define IWL_CFG_NO_160 0x1
|
||||
#define IWL_CFG_160 0x0
|
||||
|
||||
#define IWL_CFG_CORES_BT 0x0
|
||||
#define IWL_CFG_CORES_BT_GNSS 0x5
|
||||
|
|
|
@ -536,9 +536,15 @@ static const struct pci_device_id iwl_hw_card_ids[] = {
|
|||
|
||||
{IWL_PCI_DEVICE(0x2725, 0x0090, iwlax211_2ax_cfg_so_gf_a0)},
|
||||
{IWL_PCI_DEVICE(0x2725, 0x0020, iwlax210_2ax_cfg_ty_gf_a0)},
|
||||
{IWL_PCI_DEVICE(0x2725, 0x0024, iwlax210_2ax_cfg_ty_gf_a0)},
|
||||
{IWL_PCI_DEVICE(0x2725, 0x0310, iwlax210_2ax_cfg_ty_gf_a0)},
|
||||
{IWL_PCI_DEVICE(0x2725, 0x0510, iwlax210_2ax_cfg_ty_gf_a0)},
|
||||
{IWL_PCI_DEVICE(0x2725, 0x0A10, iwlax210_2ax_cfg_ty_gf_a0)},
|
||||
{IWL_PCI_DEVICE(0x2725, 0xE020, iwlax210_2ax_cfg_ty_gf_a0)},
|
||||
{IWL_PCI_DEVICE(0x2725, 0xE024, iwlax210_2ax_cfg_ty_gf_a0)},
|
||||
{IWL_PCI_DEVICE(0x2725, 0x4020, iwlax210_2ax_cfg_ty_gf_a0)},
|
||||
{IWL_PCI_DEVICE(0x2725, 0x6020, iwlax210_2ax_cfg_ty_gf_a0)},
|
||||
{IWL_PCI_DEVICE(0x2725, 0x6024, iwlax210_2ax_cfg_ty_gf_a0)},
|
||||
{IWL_PCI_DEVICE(0x2725, 0x00B0, iwlax411_2ax_cfg_sosnj_gf4_a0)},
|
||||
{IWL_PCI_DEVICE(0x2726, 0x0070, iwlax201_cfg_snj_hr_b0)},
|
||||
{IWL_PCI_DEVICE(0x2726, 0x0074, iwlax201_cfg_snj_hr_b0)},
|
||||
|
|
|
@ -1020,8 +1020,6 @@ void mt76u_stop_tx(struct mt76_dev *dev)
|
|||
{
|
||||
int ret;
|
||||
|
||||
mt76_worker_disable(&dev->tx_worker);
|
||||
|
||||
ret = wait_event_timeout(dev->tx_wait, !mt76_has_tx_pending(&dev->phy),
|
||||
HZ / 5);
|
||||
if (!ret) {
|
||||
|
@ -1040,6 +1038,8 @@ void mt76u_stop_tx(struct mt76_dev *dev)
|
|||
usb_kill_urb(q->entry[j].urb);
|
||||
}
|
||||
|
||||
mt76_worker_disable(&dev->tx_worker);
|
||||
|
||||
/* On device removal we maight queue skb's, but mt76u_tx_kick()
|
||||
* will fail to submit urb, cleanup those skb's manually.
|
||||
*/
|
||||
|
@ -1048,18 +1048,19 @@ void mt76u_stop_tx(struct mt76_dev *dev)
|
|||
if (!q)
|
||||
continue;
|
||||
|
||||
entry = q->entry[q->tail];
|
||||
q->entry[q->tail].done = false;
|
||||
|
||||
mt76_queue_tx_complete(dev, q, &entry);
|
||||
while (q->queued > 0) {
|
||||
entry = q->entry[q->tail];
|
||||
q->entry[q->tail].done = false;
|
||||
mt76_queue_tx_complete(dev, q, &entry);
|
||||
}
|
||||
}
|
||||
|
||||
mt76_worker_enable(&dev->tx_worker);
|
||||
}
|
||||
|
||||
cancel_work_sync(&dev->usb.stat_work);
|
||||
clear_bit(MT76_READING_STATS, &dev->phy.state);
|
||||
|
||||
mt76_worker_enable(&dev->tx_worker);
|
||||
|
||||
mt76_tx_status_check(dev, NULL, true);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mt76u_stop_tx);
|
||||
|
|
|
@ -147,6 +147,8 @@ static int rtw_debugfs_copy_from_user(char tmp[], int size,
|
|||
{
|
||||
int tmp_len;
|
||||
|
||||
memset(tmp, 0, size);
|
||||
|
||||
if (count < num)
|
||||
return -EFAULT;
|
||||
|
||||
|
|
|
@ -270,11 +270,6 @@ static void usb_init_common_7211b0(struct brcm_usb_init_params *params)
|
|||
reg |= params->mode << USB_PHY_UTMI_CTL_1_PHY_MODE_SHIFT;
|
||||
brcm_usb_writel(reg, usb_phy + USB_PHY_UTMI_CTL_1);
|
||||
|
||||
/* Fix the incorrect default */
|
||||
reg = brcm_usb_readl(ctrl + USB_CTRL_SETUP);
|
||||
reg &= ~USB_CTRL_SETUP_tca_drv_sel_MASK;
|
||||
brcm_usb_writel(reg, ctrl + USB_CTRL_SETUP);
|
||||
|
||||
usb_init_common(params);
|
||||
|
||||
/*
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#
|
||||
config PHY_INTEL_KEEMBAY_EMMC
|
||||
tristate "Intel Keem Bay EMMC PHY driver"
|
||||
depends on (OF && ARM64) || COMPILE_TEST
|
||||
depends on ARCH_KEEMBAY || COMPILE_TEST
|
||||
depends on HAS_IOMEM
|
||||
select GENERIC_PHY
|
||||
select REGMAP_MMIO
|
||||
|
|
|
@ -12,7 +12,7 @@ config PHY_MTK_TPHY
|
|||
it supports multiple usb2.0, usb3.0 ports, PCIe and
|
||||
SATA, and meanwhile supports two version T-PHY which have
|
||||
different banks layout, the T-PHY with shared banks between
|
||||
multi-ports is first version, otherwise is second veriosn,
|
||||
multi-ports is first version, otherwise is second version,
|
||||
so you can easily distinguish them by banks layout.
|
||||
|
||||
config PHY_MTK_UFS
|
||||
|
|
|
@ -364,7 +364,8 @@ static int cpcap_usb_init_irq(struct platform_device *pdev,
|
|||
|
||||
error = devm_request_threaded_irq(ddata->dev, irq, NULL,
|
||||
cpcap_phy_irq_thread,
|
||||
IRQF_SHARED,
|
||||
IRQF_SHARED |
|
||||
IRQF_ONESHOT,
|
||||
name, ddata);
|
||||
if (error) {
|
||||
dev_err(ddata->dev, "could not get irq %s: %i\n",
|
||||
|
|
|
@ -87,7 +87,7 @@ config PHY_QCOM_USB_HSIC
|
|||
|
||||
config PHY_QCOM_USB_HS_28NM
|
||||
tristate "Qualcomm 28nm High-Speed PHY"
|
||||
depends on ARCH_QCOM || COMPILE_TEST
|
||||
depends on OF && (ARCH_QCOM || COMPILE_TEST)
|
||||
depends on EXTCON || !EXTCON # if EXTCON=m, this cannot be built-in
|
||||
select GENERIC_PHY
|
||||
help
|
||||
|
@ -98,7 +98,7 @@ config PHY_QCOM_USB_HS_28NM
|
|||
|
||||
config PHY_QCOM_USB_SS
|
||||
tristate "Qualcomm USB Super-Speed PHY driver"
|
||||
depends on ARCH_QCOM || COMPILE_TEST
|
||||
depends on OF && (ARCH_QCOM || COMPILE_TEST)
|
||||
depends on EXTCON || !EXTCON # if EXTCON=m, this cannot be built-in
|
||||
select GENERIC_PHY
|
||||
help
|
||||
|
|
|
@ -3926,7 +3926,7 @@ static int qcom_qmp_phy_probe(struct platform_device *pdev)
|
|||
struct phy_provider *phy_provider;
|
||||
void __iomem *serdes;
|
||||
void __iomem *usb_serdes;
|
||||
void __iomem *dp_serdes;
|
||||
void __iomem *dp_serdes = NULL;
|
||||
const struct qmp_phy_combo_cfg *combo_cfg = NULL;
|
||||
const struct qmp_phy_cfg *cfg = NULL;
|
||||
const struct qmp_phy_cfg *usb_cfg = NULL;
|
||||
|
|
|
@ -1242,6 +1242,7 @@ power_down:
|
|||
reset:
|
||||
reset_control_assert(padctl->rst);
|
||||
remove:
|
||||
platform_set_drvdata(pdev, NULL);
|
||||
soc->ops->remove(padctl);
|
||||
return err;
|
||||
}
|
||||
|
|
|
@ -84,12 +84,14 @@ struct sl28cpld_pwm {
|
|||
struct regmap *regmap;
|
||||
u32 offset;
|
||||
};
|
||||
#define sl28cpld_pwm_from_chip(_chip) \
|
||||
container_of(_chip, struct sl28cpld_pwm, pwm_chip)
|
||||
|
||||
static void sl28cpld_pwm_get_state(struct pwm_chip *chip,
|
||||
struct pwm_device *pwm,
|
||||
struct pwm_state *state)
|
||||
{
|
||||
struct sl28cpld_pwm *priv = dev_get_drvdata(chip->dev);
|
||||
struct sl28cpld_pwm *priv = sl28cpld_pwm_from_chip(chip);
|
||||
unsigned int reg;
|
||||
int prescaler;
|
||||
|
||||
|
@ -118,7 +120,7 @@ static void sl28cpld_pwm_get_state(struct pwm_chip *chip,
|
|||
static int sl28cpld_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
|
||||
const struct pwm_state *state)
|
||||
{
|
||||
struct sl28cpld_pwm *priv = dev_get_drvdata(chip->dev);
|
||||
struct sl28cpld_pwm *priv = sl28cpld_pwm_from_chip(chip);
|
||||
unsigned int cycle, prescaler;
|
||||
bool write_duty_cycle_first;
|
||||
int ret;
|
||||
|
|
|
@ -1114,7 +1114,7 @@ static int cdns3_ep_run_transfer(struct cdns3_endpoint *priv_ep,
|
|||
struct cdns3_device *priv_dev = priv_ep->cdns3_dev;
|
||||
struct cdns3_request *priv_req;
|
||||
struct cdns3_trb *trb;
|
||||
struct cdns3_trb *link_trb;
|
||||
struct cdns3_trb *link_trb = NULL;
|
||||
dma_addr_t trb_dma;
|
||||
u32 togle_pcs = 1;
|
||||
int sg_iter = 0;
|
||||
|
@ -1193,10 +1193,20 @@ static int cdns3_ep_run_transfer(struct cdns3_endpoint *priv_ep,
|
|||
|
||||
/* set incorrect Cycle Bit for first trb*/
|
||||
control = priv_ep->pcs ? 0 : TRB_CYCLE;
|
||||
trb->length = 0;
|
||||
if (priv_dev->dev_ver >= DEV_VER_V2) {
|
||||
u16 td_size;
|
||||
|
||||
td_size = DIV_ROUND_UP(request->length,
|
||||
priv_ep->endpoint.maxpacket);
|
||||
if (priv_dev->gadget.speed == USB_SPEED_SUPER)
|
||||
trb->length = TRB_TDL_SS_SIZE(td_size);
|
||||
else
|
||||
control |= TRB_TDL_HS_SIZE(td_size);
|
||||
}
|
||||
|
||||
do {
|
||||
u32 length;
|
||||
u16 td_size = 0;
|
||||
|
||||
/* fill TRB */
|
||||
control |= TRB_TYPE(TRB_NORMAL);
|
||||
|
@ -1208,20 +1218,12 @@ static int cdns3_ep_run_transfer(struct cdns3_endpoint *priv_ep,
|
|||
length = request->length;
|
||||
}
|
||||
|
||||
if (likely(priv_dev->dev_ver >= DEV_VER_V2))
|
||||
td_size = DIV_ROUND_UP(length,
|
||||
priv_ep->endpoint.maxpacket);
|
||||
else if (priv_ep->flags & EP_TDLCHK_EN)
|
||||
if (priv_ep->flags & EP_TDLCHK_EN)
|
||||
total_tdl += DIV_ROUND_UP(length,
|
||||
priv_ep->endpoint.maxpacket);
|
||||
|
||||
trb->length = cpu_to_le32(TRB_BURST_LEN(priv_ep->trb_burst_size) |
|
||||
trb->length |= cpu_to_le32(TRB_BURST_LEN(priv_ep->trb_burst_size) |
|
||||
TRB_LEN(length));
|
||||
if (priv_dev->gadget.speed == USB_SPEED_SUPER)
|
||||
trb->length |= cpu_to_le32(TRB_TDL_SS_SIZE(td_size));
|
||||
else
|
||||
control |= TRB_TDL_HS_SIZE(td_size);
|
||||
|
||||
pcs = priv_ep->pcs ? TRB_CYCLE : 0;
|
||||
|
||||
/*
|
||||
|
|
|
@ -482,11 +482,11 @@ static void snoop_urb(struct usb_device *udev,
|
|||
|
||||
if (userurb) { /* Async */
|
||||
if (when == SUBMIT)
|
||||
dev_info(&udev->dev, "userurb %pK, ep%d %s-%s, "
|
||||
dev_info(&udev->dev, "userurb %px, ep%d %s-%s, "
|
||||
"length %u\n",
|
||||
userurb, ep, t, d, length);
|
||||
else
|
||||
dev_info(&udev->dev, "userurb %pK, ep%d %s-%s, "
|
||||
dev_info(&udev->dev, "userurb %px, ep%d %s-%s, "
|
||||
"actual_length %u status %d\n",
|
||||
userurb, ep, t, d, length,
|
||||
timeout_or_status);
|
||||
|
@ -1997,7 +1997,7 @@ static int proc_reapurb(struct usb_dev_state *ps, void __user *arg)
|
|||
if (as) {
|
||||
int retval;
|
||||
|
||||
snoop(&ps->dev->dev, "reap %pK\n", as->userurb);
|
||||
snoop(&ps->dev->dev, "reap %px\n", as->userurb);
|
||||
retval = processcompl(as, (void __user * __user *)arg);
|
||||
free_async(as);
|
||||
return retval;
|
||||
|
@ -2014,7 +2014,7 @@ static int proc_reapurbnonblock(struct usb_dev_state *ps, void __user *arg)
|
|||
|
||||
as = async_getcompleted(ps);
|
||||
if (as) {
|
||||
snoop(&ps->dev->dev, "reap %pK\n", as->userurb);
|
||||
snoop(&ps->dev->dev, "reap %px\n", as->userurb);
|
||||
retval = processcompl(as, (void __user * __user *)arg);
|
||||
free_async(as);
|
||||
} else {
|
||||
|
@ -2142,7 +2142,7 @@ static int proc_reapurb_compat(struct usb_dev_state *ps, void __user *arg)
|
|||
if (as) {
|
||||
int retval;
|
||||
|
||||
snoop(&ps->dev->dev, "reap %pK\n", as->userurb);
|
||||
snoop(&ps->dev->dev, "reap %px\n", as->userurb);
|
||||
retval = processcompl_compat(as, (void __user * __user *)arg);
|
||||
free_async(as);
|
||||
return retval;
|
||||
|
@ -2159,7 +2159,7 @@ static int proc_reapurbnonblock_compat(struct usb_dev_state *ps, void __user *ar
|
|||
|
||||
as = async_getcompleted(ps);
|
||||
if (as) {
|
||||
snoop(&ps->dev->dev, "reap %pK\n", as->userurb);
|
||||
snoop(&ps->dev->dev, "reap %px\n", as->userurb);
|
||||
retval = processcompl_compat(as, (void __user * __user *)arg);
|
||||
free_async(as);
|
||||
} else {
|
||||
|
@ -2624,7 +2624,7 @@ static long usbdev_do_ioctl(struct file *file, unsigned int cmd,
|
|||
#endif
|
||||
|
||||
case USBDEVFS_DISCARDURB:
|
||||
snoop(&dev->dev, "%s: DISCARDURB %pK\n", __func__, p);
|
||||
snoop(&dev->dev, "%s: DISCARDURB %px\n", __func__, p);
|
||||
ret = proc_unlinkurb(ps, p);
|
||||
break;
|
||||
|
||||
|
|
|
@ -348,6 +348,10 @@ static const struct usb_device_id usb_quirk_list[] = {
|
|||
/* Guillemot Webcam Hercules Dualpix Exchange*/
|
||||
{ USB_DEVICE(0x06f8, 0x3005), .driver_info = USB_QUIRK_RESET_RESUME },
|
||||
|
||||
/* Guillemot Hercules DJ Console audio card (BZ 208357) */
|
||||
{ USB_DEVICE(0x06f8, 0xb000), .driver_info =
|
||||
USB_QUIRK_ENDPOINT_IGNORE },
|
||||
|
||||
/* Midiman M-Audio Keystation 88es */
|
||||
{ USB_DEVICE(0x0763, 0x0192), .driver_info = USB_QUIRK_RESET_RESUME },
|
||||
|
||||
|
@ -421,6 +425,10 @@ static const struct usb_device_id usb_quirk_list[] = {
|
|||
{ USB_DEVICE(0x1532, 0x0116), .driver_info =
|
||||
USB_QUIRK_LINEAR_UFRAME_INTR_BINTERVAL },
|
||||
|
||||
/* Lenovo ThinkCenter A630Z TI024Gen3 usb-audio */
|
||||
{ USB_DEVICE(0x17ef, 0xa012), .driver_info =
|
||||
USB_QUIRK_DISCONNECT_SUSPEND },
|
||||
|
||||
/* BUILDWIN Photo Frame */
|
||||
{ USB_DEVICE(0x1908, 0x1315), .driver_info =
|
||||
USB_QUIRK_HONOR_BNUMINTERFACES },
|
||||
|
@ -521,6 +529,8 @@ static const struct usb_device_id usb_amd_resume_quirk_list[] = {
|
|||
* Matched for devices with USB_QUIRK_ENDPOINT_IGNORE.
|
||||
*/
|
||||
static const struct usb_device_id usb_endpoint_ignore[] = {
|
||||
{ USB_DEVICE_INTERFACE_NUMBER(0x06f8, 0xb000, 5), .driver_info = 0x01 },
|
||||
{ USB_DEVICE_INTERFACE_NUMBER(0x06f8, 0xb000, 5), .driver_info = 0x81 },
|
||||
{ USB_DEVICE_INTERFACE_NUMBER(0x0926, 0x0202, 1), .driver_info = 0x85 },
|
||||
{ USB_DEVICE_INTERFACE_NUMBER(0x0926, 0x0208, 1), .driver_info = 0x85 },
|
||||
{ }
|
||||
|
|
|
@ -1315,7 +1315,7 @@ static struct usb_function *f_midi_alloc(struct usb_function_instance *fi)
|
|||
midi->id = kstrdup(opts->id, GFP_KERNEL);
|
||||
if (opts->id && !midi->id) {
|
||||
status = -ENOMEM;
|
||||
goto setup_fail;
|
||||
goto midi_free;
|
||||
}
|
||||
midi->in_ports = opts->in_ports;
|
||||
midi->out_ports = opts->out_ports;
|
||||
|
@ -1327,7 +1327,7 @@ static struct usb_function *f_midi_alloc(struct usb_function_instance *fi)
|
|||
|
||||
status = kfifo_alloc(&midi->in_req_fifo, midi->qlen, GFP_KERNEL);
|
||||
if (status)
|
||||
goto setup_fail;
|
||||
goto midi_free;
|
||||
|
||||
spin_lock_init(&midi->transmit_lock);
|
||||
|
||||
|
@ -1343,9 +1343,13 @@ static struct usb_function *f_midi_alloc(struct usb_function_instance *fi)
|
|||
|
||||
return &midi->func;
|
||||
|
||||
midi_free:
|
||||
if (midi)
|
||||
kfree(midi->id);
|
||||
kfree(midi);
|
||||
setup_fail:
|
||||
mutex_unlock(&opts->lock);
|
||||
kfree(midi);
|
||||
|
||||
return ERR_PTR(status);
|
||||
}
|
||||
|
||||
|
|
|
@ -2039,6 +2039,9 @@ gadgetfs_fill_super (struct super_block *sb, struct fs_context *fc)
|
|||
return 0;
|
||||
|
||||
Enomem:
|
||||
kfree(CHIP);
|
||||
CHIP = NULL;
|
||||
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
|
|
|
@ -88,6 +88,7 @@ config TYPEC_STUSB160X
|
|||
config TYPEC_QCOM_PMIC
|
||||
tristate "Qualcomm PMIC USB Type-C driver"
|
||||
depends on ARCH_QCOM || COMPILE_TEST
|
||||
depends on USB_ROLE_SWITCH || !USB_ROLE_SWITCH
|
||||
help
|
||||
Driver for supporting role switch over the Qualcomm PMIC. This will
|
||||
handle the USB Type-C role and orientation detection reported by the
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче