mirror of
https://github.com/torvalds/linux.git
synced 2026-06-07 22:14:04 +02:00
This is the 5.10.39 stable release
-----BEGIN PGP SIGNATURE-----
iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmCo0hsACgkQONu9yGCS
aT7cVQ/+JJ1ZLbQdcwsaVcfUW4U7CkJl/bF9tLwfSVurUaUshcTIVvf8gUNU4qfz
PaNMxMuHv04XWyjAMHOyD8LX4TSyZTE6UFMzkFhNRU9f4X8rkqeVuTk/YDE6cpEV
CkaXQ3hZAAL77TEOaa0Ljl6bUZK1W7i0ar52LZc2u+M+olUDsxl1+qbCMCi9akjo
kaMBllxmukAglPxLuQNr7+MD9lpgLypZneA45YJCBEdwhYmw31beQuBXHExtCZtz
GYTVUNtNjKaeXNhYJmooXiW8uzt19MU7dnL2JQDj7IKTC+LPsOLFcTWPTV7yKEFV
W/HZVmYYva1A9gO1QiXFV1pK2qO1YIYGYPps+QGpI4VF2t8QvhYw22xTq9kmsbAW
Y0SSQqdGNweSNX+vC/S3lVYFZM3jabr6ECf6oqtvtGBoIWf/03PVVvUHhUfZuR2R
iJmbnKePgteK1d4z4qJy9RIChVOjOrQ7ACiRFU1MrPVHo0sSW3AEtLGYgsWDfbbG
Le0FMukUroFwdkWrRqSTEyTT9JVAgpVVzdU1C1dWrTRBr/sVgu6TAbCJDn+lgqzK
X1/TvNoQVsEuLdj1jx8UGS2ePRezPGWFpGpcoWmTF7P0D1KJ/sS7DgQ3iUV99t+4
H8TgpHGjwiPi+ks/sfzZA7iINvdwwDFs2841HnNqJONhRX5aYdI=
=pLOV
-----END PGP SIGNATURE-----
Merge 5.10.39 into android12-5.10
Changes in 5.10.39
x86/msr: Fix wr/rdmsr_safe_regs_on_cpu() prototypes
drm/i915/display: fix compiler warning about array overrun
airo: work around stack usage warning
kgdb: fix gcc-11 warning on indentation
usb: sl811-hcd: improve misleading indentation
cxgb4: Fix the -Wmisleading-indentation warning
isdn: capi: fix mismatched prototypes
virtio_net: Do not pull payload in skb->head
PCI: thunder: Fix compile testing
dmaengine: dw-edma: Fix crash on loading/unloading driver
ARM: 9066/1: ftrace: pause/unpause function graph tracer in cpu_suspend()
ACPI / hotplug / PCI: Fix reference count leak in enable_slot()
PCI: tegra: Fix runtime PM imbalance in pex_ep_event_pex_rst_deassert()
Input: elants_i2c - do not bind to i2c-hid compatible ACPI instantiated devices
Input: silead - add workaround for x86 BIOS-es which bring the chip up in a stuck state
NFS: NFS_INO_REVAL_PAGECACHE should mark the change attribute invalid
um: Mark all kernel symbols as local
um: Disable CONFIG_GCOV with MODULES
ARM: 9075/1: kernel: Fix interrupted SMC calls
platform/chrome: cros_ec_typec: Add DP mode check
riscv: Use $(LD) instead of $(CC) to link vDSO
scripts/recordmcount.pl: Fix RISC-V regex for clang
riscv: Workaround mcount name prior to clang-13
scsi: lpfc: Fix illegal memory access on Abort IOCBs
ceph: fix fscache invalidation
ceph: don't clobber i_snap_caps on non-I_NEW inode
ceph: don't allow access to MDS-private inodes
scsi: target: tcmu: Return from tcmu_handle_completions() if cmd_id not found
amdgpu/pm: Prevent force of DCEFCLK on NAVI10 and SIENNA_CICHLID
bridge: Fix possible races between assigning rx_handler_data and setting IFF_BRIDGE_PORT bit
net: hsr: check skb can contain struct hsr_ethhdr in fill_frame_info
nvmet: remove unsupported command noise
drm/amd/display: Fix two cursor duplication when using overlay
gpiolib: acpi: Add quirk to ignore EC wakeups on Dell Venue 10 Pro 5055
net:CXGB4: fix leak if sk_buff is not used
ALSA: hda: generic: change the DAC ctl name for LO+SPK or LO+HP
block: reexpand iov_iter after read/write
lib: stackdepot: turn depot_lock spinlock to raw_spinlock
net: stmmac: Do not enable RX FIFO overflow interrupts
ip6_gre: proper dev_{hold|put} in ndo_[un]init methods
sit: proper dev_{hold|put} in ndo_[un]init methods
ip6_tunnel: sit: proper dev_{hold|put} in ndo_[un]init methods
ipv6: remove extra dev_hold() for fallback tunnels
tweewide: Fix most Shebang lines
scripts: switch explicitly to Python 3
Linux 5.10.39
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I8406e9c091597f1b08395c84e3728d640d91cbb9
This commit is contained in:
commit
855f802610
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/perl
|
#!/usr/bin/env perl
|
||||||
use strict;
|
use strict;
|
||||||
use Text::Tabs;
|
use Text::Tabs;
|
||||||
use Getopt::Long;
|
use Getopt::Long;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/python
|
#!/usr/bin/env python
|
||||||
# The TCM v4 multi-protocol fabric module generation script for drivers/target/$NEW_MOD
|
# The TCM v4 multi-protocol fabric module generation script for drivers/target/$NEW_MOD
|
||||||
#
|
#
|
||||||
# Copyright (c) 2010 Rising Tide Systems
|
# Copyright (c) 2010 Rising Tide Systems
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/python
|
#!/usr/bin/env python
|
||||||
# add symbolic names to read_msr / write_msr in trace
|
# add symbolic names to read_msr / write_msr in trace
|
||||||
# decode_msr msr-index.h < trace
|
# decode_msr msr-index.h < trace
|
||||||
import sys
|
import sys
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/perl
|
#!/usr/bin/env perl
|
||||||
# This is a POC (proof of concept or piece of crap, take your pick) for reading the
|
# This is a POC (proof of concept or piece of crap, take your pick) for reading the
|
||||||
# text representation of trace output related to page allocation. It makes an attempt
|
# text representation of trace output related to page allocation. It makes an attempt
|
||||||
# to extract some high-level information on what is going on. The accuracy of the parser
|
# to extract some high-level information on what is going on. The accuracy of the parser
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/perl
|
#!/usr/bin/env perl
|
||||||
# This is a POC for reading the text representation of trace output related to
|
# This is a POC for reading the text representation of trace output related to
|
||||||
# page reclaim. It makes an attempt to extract some high-level information on
|
# page reclaim. It makes an attempt to extract some high-level information on
|
||||||
# what is going on. The accuracy of the parser may vary
|
# what is going on. The accuracy of the parser may vary
|
||||||
|
|
|
||||||
2
Makefile
2
Makefile
|
|
@ -1,7 +1,7 @@
|
||||||
# SPDX-License-Identifier: GPL-2.0
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
VERSION = 5
|
VERSION = 5
|
||||||
PATCHLEVEL = 10
|
PATCHLEVEL = 10
|
||||||
SUBLEVEL = 38
|
SUBLEVEL = 39
|
||||||
EXTRAVERSION =
|
EXTRAVERSION =
|
||||||
NAME = Dare mighty things
|
NAME = Dare mighty things
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,7 @@
|
||||||
#include <asm/vdso_datapage.h>
|
#include <asm/vdso_datapage.h>
|
||||||
#include <asm/hardware/cache-l2x0.h>
|
#include <asm/hardware/cache-l2x0.h>
|
||||||
#include <linux/kbuild.h>
|
#include <linux/kbuild.h>
|
||||||
|
#include <linux/arm-smccc.h>
|
||||||
#include "signal.h"
|
#include "signal.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -148,6 +149,8 @@ int main(void)
|
||||||
DEFINE(SLEEP_SAVE_SP_PHYS, offsetof(struct sleep_save_sp, save_ptr_stash_phys));
|
DEFINE(SLEEP_SAVE_SP_PHYS, offsetof(struct sleep_save_sp, save_ptr_stash_phys));
|
||||||
DEFINE(SLEEP_SAVE_SP_VIRT, offsetof(struct sleep_save_sp, save_ptr_stash));
|
DEFINE(SLEEP_SAVE_SP_VIRT, offsetof(struct sleep_save_sp, save_ptr_stash));
|
||||||
#endif
|
#endif
|
||||||
|
DEFINE(ARM_SMCCC_QUIRK_ID_OFFS, offsetof(struct arm_smccc_quirk, id));
|
||||||
|
DEFINE(ARM_SMCCC_QUIRK_STATE_OFFS, offsetof(struct arm_smccc_quirk, state));
|
||||||
BLANK();
|
BLANK();
|
||||||
DEFINE(DMA_BIDIRECTIONAL, DMA_BIDIRECTIONAL);
|
DEFINE(DMA_BIDIRECTIONAL, DMA_BIDIRECTIONAL);
|
||||||
DEFINE(DMA_TO_DEVICE, DMA_TO_DEVICE);
|
DEFINE(DMA_TO_DEVICE, DMA_TO_DEVICE);
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,9 @@
|
||||||
* Copyright (c) 2015, Linaro Limited
|
* Copyright (c) 2015, Linaro Limited
|
||||||
*/
|
*/
|
||||||
#include <linux/linkage.h>
|
#include <linux/linkage.h>
|
||||||
|
#include <linux/arm-smccc.h>
|
||||||
|
|
||||||
|
#include <asm/asm-offsets.h>
|
||||||
#include <asm/opcodes-sec.h>
|
#include <asm/opcodes-sec.h>
|
||||||
#include <asm/opcodes-virt.h>
|
#include <asm/opcodes-virt.h>
|
||||||
#include <asm/unwind.h>
|
#include <asm/unwind.h>
|
||||||
|
|
@ -27,7 +29,14 @@ UNWIND( .fnstart)
|
||||||
UNWIND( .save {r4-r7})
|
UNWIND( .save {r4-r7})
|
||||||
ldm r12, {r4-r7}
|
ldm r12, {r4-r7}
|
||||||
\instr
|
\instr
|
||||||
pop {r4-r7}
|
ldr r4, [sp, #36]
|
||||||
|
cmp r4, #0
|
||||||
|
beq 1f // No quirk structure
|
||||||
|
ldr r5, [r4, #ARM_SMCCC_QUIRK_ID_OFFS]
|
||||||
|
cmp r5, #ARM_SMCCC_QUIRK_QCOM_A6
|
||||||
|
bne 1f // No quirk present
|
||||||
|
str r6, [r4, #ARM_SMCCC_QUIRK_STATE_OFFS]
|
||||||
|
1: pop {r4-r7}
|
||||||
ldr r12, [sp, #(4 * 4)]
|
ldr r12, [sp, #(4 * 4)]
|
||||||
stm r12, {r0-r3}
|
stm r12, {r0-r3}
|
||||||
bx lr
|
bx lr
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
// SPDX-License-Identifier: GPL-2.0
|
// SPDX-License-Identifier: GPL-2.0
|
||||||
|
#include <linux/ftrace.h>
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
#include <linux/mm_types.h>
|
#include <linux/mm_types.h>
|
||||||
|
|
@ -25,6 +26,13 @@ int cpu_suspend(unsigned long arg, int (*fn)(unsigned long))
|
||||||
if (!idmap_pgd)
|
if (!idmap_pgd)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Function graph tracer state gets incosistent when the kernel
|
||||||
|
* calls functions that never return (aka suspend finishers) hence
|
||||||
|
* disable graph tracing during their execution.
|
||||||
|
*/
|
||||||
|
pause_graph_tracing();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Provide a temporary page table with an identity mapping for
|
* Provide a temporary page table with an identity mapping for
|
||||||
* the MMU-enable code, required for resuming. On successful
|
* the MMU-enable code, required for resuming. On successful
|
||||||
|
|
@ -32,6 +40,9 @@ int cpu_suspend(unsigned long arg, int (*fn)(unsigned long))
|
||||||
* back to the correct page tables.
|
* back to the correct page tables.
|
||||||
*/
|
*/
|
||||||
ret = __cpu_suspend(arg, fn, __mpidr);
|
ret = __cpu_suspend(arg, fn, __mpidr);
|
||||||
|
|
||||||
|
unpause_graph_tracing();
|
||||||
|
|
||||||
if (ret == 0) {
|
if (ret == 0) {
|
||||||
cpu_switch_mm(mm->pgd, mm);
|
cpu_switch_mm(mm->pgd, mm);
|
||||||
local_flush_bp_all();
|
local_flush_bp_all();
|
||||||
|
|
@ -45,7 +56,13 @@ int cpu_suspend(unsigned long arg, int (*fn)(unsigned long))
|
||||||
int cpu_suspend(unsigned long arg, int (*fn)(unsigned long))
|
int cpu_suspend(unsigned long arg, int (*fn)(unsigned long))
|
||||||
{
|
{
|
||||||
u32 __mpidr = cpu_logical_map(smp_processor_id());
|
u32 __mpidr = cpu_logical_map(smp_processor_id());
|
||||||
return __cpu_suspend(arg, fn, __mpidr);
|
int ret;
|
||||||
|
|
||||||
|
pause_graph_tracing();
|
||||||
|
ret = __cpu_suspend(arg, fn, __mpidr);
|
||||||
|
unpause_graph_tracing();
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
#define idmap_pgd NULL
|
#define idmap_pgd NULL
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/python
|
#!/usr/bin/env python
|
||||||
# SPDX-License-Identifier: GPL-2.0
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
#
|
#
|
||||||
# Usage: unwcheck.py FILE
|
# Usage: unwcheck.py FILE
|
||||||
|
|
|
||||||
|
|
@ -13,9 +13,19 @@
|
||||||
#endif
|
#endif
|
||||||
#define HAVE_FUNCTION_GRAPH_RET_ADDR_PTR
|
#define HAVE_FUNCTION_GRAPH_RET_ADDR_PTR
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Clang prior to 13 had "mcount" instead of "_mcount":
|
||||||
|
* https://reviews.llvm.org/D98881
|
||||||
|
*/
|
||||||
|
#if defined(CONFIG_CC_IS_GCC) || CONFIG_CLANG_VERSION >= 130000
|
||||||
|
#define MCOUNT_NAME _mcount
|
||||||
|
#else
|
||||||
|
#define MCOUNT_NAME mcount
|
||||||
|
#endif
|
||||||
|
|
||||||
#define ARCH_SUPPORTS_FTRACE_OPS 1
|
#define ARCH_SUPPORTS_FTRACE_OPS 1
|
||||||
#ifndef __ASSEMBLY__
|
#ifndef __ASSEMBLY__
|
||||||
void _mcount(void);
|
void MCOUNT_NAME(void);
|
||||||
static inline unsigned long ftrace_call_adjust(unsigned long addr)
|
static inline unsigned long ftrace_call_adjust(unsigned long addr)
|
||||||
{
|
{
|
||||||
return addr;
|
return addr;
|
||||||
|
|
@ -36,7 +46,7 @@ struct dyn_arch_ftrace {
|
||||||
* both auipc and jalr at the same time.
|
* both auipc and jalr at the same time.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define MCOUNT_ADDR ((unsigned long)_mcount)
|
#define MCOUNT_ADDR ((unsigned long)MCOUNT_NAME)
|
||||||
#define JALR_SIGN_MASK (0x00000800)
|
#define JALR_SIGN_MASK (0x00000800)
|
||||||
#define JALR_OFFSET_MASK (0x00000fff)
|
#define JALR_OFFSET_MASK (0x00000fff)
|
||||||
#define AUIPC_OFFSET_MASK (0xfffff000)
|
#define AUIPC_OFFSET_MASK (0xfffff000)
|
||||||
|
|
|
||||||
|
|
@ -47,8 +47,8 @@
|
||||||
|
|
||||||
ENTRY(ftrace_stub)
|
ENTRY(ftrace_stub)
|
||||||
#ifdef CONFIG_DYNAMIC_FTRACE
|
#ifdef CONFIG_DYNAMIC_FTRACE
|
||||||
.global _mcount
|
.global MCOUNT_NAME
|
||||||
.set _mcount, ftrace_stub
|
.set MCOUNT_NAME, ftrace_stub
|
||||||
#endif
|
#endif
|
||||||
ret
|
ret
|
||||||
ENDPROC(ftrace_stub)
|
ENDPROC(ftrace_stub)
|
||||||
|
|
@ -78,7 +78,7 @@ ENDPROC(return_to_handler)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CONFIG_DYNAMIC_FTRACE
|
#ifndef CONFIG_DYNAMIC_FTRACE
|
||||||
ENTRY(_mcount)
|
ENTRY(MCOUNT_NAME)
|
||||||
la t4, ftrace_stub
|
la t4, ftrace_stub
|
||||||
#ifdef CONFIG_FUNCTION_GRAPH_TRACER
|
#ifdef CONFIG_FUNCTION_GRAPH_TRACER
|
||||||
la t0, ftrace_graph_return
|
la t0, ftrace_graph_return
|
||||||
|
|
@ -124,6 +124,6 @@ do_trace:
|
||||||
jalr t5
|
jalr t5
|
||||||
RESTORE_ABI_STATE
|
RESTORE_ABI_STATE
|
||||||
ret
|
ret
|
||||||
ENDPROC(_mcount)
|
ENDPROC(MCOUNT_NAME)
|
||||||
#endif
|
#endif
|
||||||
EXPORT_SYMBOL(_mcount)
|
EXPORT_SYMBOL(MCOUNT_NAME)
|
||||||
|
|
|
||||||
|
|
@ -41,11 +41,10 @@ KASAN_SANITIZE := n
|
||||||
$(obj)/vdso.o: $(obj)/vdso.so
|
$(obj)/vdso.o: $(obj)/vdso.so
|
||||||
|
|
||||||
# link rule for the .so file, .lds has to be first
|
# link rule for the .so file, .lds has to be first
|
||||||
SYSCFLAGS_vdso.so.dbg = $(c_flags)
|
|
||||||
$(obj)/vdso.so.dbg: $(src)/vdso.lds $(obj-vdso) FORCE
|
$(obj)/vdso.so.dbg: $(src)/vdso.lds $(obj-vdso) FORCE
|
||||||
$(call if_changed,vdsold)
|
$(call if_changed,vdsold)
|
||||||
SYSCFLAGS_vdso.so.dbg = -shared -s -Wl,-soname=linux-vdso.so.1 \
|
LDFLAGS_vdso.so.dbg = -shared -s -soname=linux-vdso.so.1 \
|
||||||
-Wl,--build-id=sha1 -Wl,--hash-style=both
|
--build-id=sha1 --hash-style=both --eh-frame-hdr
|
||||||
|
|
||||||
# We also create a special relocatable object that should mirror the symbol
|
# 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
|
# table and layout of the linked DSO. With ld --just-symbols we can then
|
||||||
|
|
@ -60,13 +59,10 @@ $(obj)/%.so: $(obj)/%.so.dbg FORCE
|
||||||
|
|
||||||
# actual build commands
|
# actual build commands
|
||||||
# The DSO images are built using a special linker script
|
# The DSO images are built using a special linker script
|
||||||
# Add -lgcc so rv32 gets static muldi3 and lshrdi3 definitions.
|
|
||||||
# Make sure only to export the intended __vdso_xxx symbol offsets.
|
# Make sure only to export the intended __vdso_xxx symbol offsets.
|
||||||
quiet_cmd_vdsold = VDSOLD $@
|
quiet_cmd_vdsold = VDSOLD $@
|
||||||
cmd_vdsold = $(CC) $(KBUILD_CFLAGS) $(call cc-option, -no-pie) -nostdlib -nostartfiles $(SYSCFLAGS_$(@F)) \
|
cmd_vdsold = $(LD) $(ld_flags) -T $(filter-out FORCE,$^) -o $@.tmp && \
|
||||||
-Wl,-T,$(filter-out FORCE,$^) -o $@.tmp && \
|
$(OBJCOPY) $(patsubst %, -G __vdso_%, $(vdso-syms)) $@.tmp $@ && \
|
||||||
$(CROSS_COMPILE)objcopy \
|
|
||||||
$(patsubst %, -G __vdso_%, $(vdso-syms)) $@.tmp $@ && \
|
|
||||||
rm $@.tmp
|
rm $@.tmp
|
||||||
|
|
||||||
# Extracts symbol offsets from the VDSO, converting them into an assembly file
|
# Extracts symbol offsets from the VDSO, converting them into an assembly file
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@ config GCOV
|
||||||
bool "Enable gcov support"
|
bool "Enable gcov support"
|
||||||
depends on DEBUG_INFO
|
depends on DEBUG_INFO
|
||||||
depends on !KCOV
|
depends on !KCOV
|
||||||
|
depends on !MODULES
|
||||||
help
|
help
|
||||||
This option allows developers to retrieve coverage data from a UML
|
This option allows developers to retrieve coverage data from a UML
|
||||||
session.
|
session.
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,6 @@ obj-y = config.o exec.o exitcode.o irq.o ksyms.o mem.o \
|
||||||
|
|
||||||
obj-$(CONFIG_BLK_DEV_INITRD) += initrd.o
|
obj-$(CONFIG_BLK_DEV_INITRD) += initrd.o
|
||||||
obj-$(CONFIG_GPROF) += gprof_syms.o
|
obj-$(CONFIG_GPROF) += gprof_syms.o
|
||||||
obj-$(CONFIG_GCOV) += gmon_syms.o
|
|
||||||
obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
|
obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
|
||||||
obj-$(CONFIG_STACKTRACE) += stacktrace.o
|
obj-$(CONFIG_STACKTRACE) += stacktrace.o
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,12 @@ OUTPUT_ARCH(ELF_ARCH)
|
||||||
ENTRY(_start)
|
ENTRY(_start)
|
||||||
jiffies = jiffies_64;
|
jiffies = jiffies_64;
|
||||||
|
|
||||||
|
VERSION {
|
||||||
|
{
|
||||||
|
local: *;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
SECTIONS
|
SECTIONS
|
||||||
{
|
{
|
||||||
PROVIDE (__executable_start = START);
|
PROVIDE (__executable_start = START);
|
||||||
|
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
||||||
// SPDX-License-Identifier: GPL-2.0
|
|
||||||
/*
|
|
||||||
* Copyright (C) 2001 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <linux/module.h>
|
|
||||||
|
|
||||||
extern void __bb_init_func(void *) __attribute__((weak));
|
|
||||||
EXPORT_SYMBOL(__bb_init_func);
|
|
||||||
|
|
||||||
extern void __gcov_init(void *) __attribute__((weak));
|
|
||||||
EXPORT_SYMBOL(__gcov_init);
|
|
||||||
extern void __gcov_merge_add(void *, unsigned int) __attribute__((weak));
|
|
||||||
EXPORT_SYMBOL(__gcov_merge_add);
|
|
||||||
extern void __gcov_exit(void) __attribute__((weak));
|
|
||||||
EXPORT_SYMBOL(__gcov_exit);
|
|
||||||
|
|
@ -7,6 +7,12 @@ OUTPUT_ARCH(ELF_ARCH)
|
||||||
ENTRY(_start)
|
ENTRY(_start)
|
||||||
jiffies = jiffies_64;
|
jiffies = jiffies_64;
|
||||||
|
|
||||||
|
VERSION {
|
||||||
|
{
|
||||||
|
local: *;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
SECTIONS
|
SECTIONS
|
||||||
{
|
{
|
||||||
/* This must contain the right address - not quite the default ELF one.*/
|
/* This must contain the right address - not quite the default ELF one.*/
|
||||||
|
|
|
||||||
|
|
@ -253,7 +253,7 @@ static void __wrmsr_safe_regs_on_cpu(void *info)
|
||||||
rv->err = wrmsr_safe_regs(rv->regs);
|
rv->err = wrmsr_safe_regs(rv->regs);
|
||||||
}
|
}
|
||||||
|
|
||||||
int rdmsr_safe_regs_on_cpu(unsigned int cpu, u32 *regs)
|
int rdmsr_safe_regs_on_cpu(unsigned int cpu, u32 regs[8])
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
struct msr_regs_info rv;
|
struct msr_regs_info rv;
|
||||||
|
|
@ -266,7 +266,7 @@ int rdmsr_safe_regs_on_cpu(unsigned int cpu, u32 *regs)
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(rdmsr_safe_regs_on_cpu);
|
EXPORT_SYMBOL(rdmsr_safe_regs_on_cpu);
|
||||||
|
|
||||||
int wrmsr_safe_regs_on_cpu(unsigned int cpu, u32 *regs)
|
int wrmsr_safe_regs_on_cpu(unsigned int cpu, u32 regs[8])
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
struct msr_regs_info rv;
|
struct msr_regs_info rv;
|
||||||
|
|
|
||||||
|
|
@ -937,21 +937,20 @@ int dw_edma_remove(struct dw_edma_chip *chip)
|
||||||
/* Power management */
|
/* Power management */
|
||||||
pm_runtime_disable(dev);
|
pm_runtime_disable(dev);
|
||||||
|
|
||||||
list_for_each_entry_safe(chan, _chan, &dw->wr_edma.channels,
|
|
||||||
vc.chan.device_node) {
|
|
||||||
list_del(&chan->vc.chan.device_node);
|
|
||||||
tasklet_kill(&chan->vc.task);
|
|
||||||
}
|
|
||||||
|
|
||||||
list_for_each_entry_safe(chan, _chan, &dw->rd_edma.channels,
|
|
||||||
vc.chan.device_node) {
|
|
||||||
list_del(&chan->vc.chan.device_node);
|
|
||||||
tasklet_kill(&chan->vc.task);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Deregister eDMA device */
|
/* Deregister eDMA device */
|
||||||
dma_async_device_unregister(&dw->wr_edma);
|
dma_async_device_unregister(&dw->wr_edma);
|
||||||
|
list_for_each_entry_safe(chan, _chan, &dw->wr_edma.channels,
|
||||||
|
vc.chan.device_node) {
|
||||||
|
tasklet_kill(&chan->vc.task);
|
||||||
|
list_del(&chan->vc.chan.device_node);
|
||||||
|
}
|
||||||
|
|
||||||
dma_async_device_unregister(&dw->rd_edma);
|
dma_async_device_unregister(&dw->rd_edma);
|
||||||
|
list_for_each_entry_safe(chan, _chan, &dw->rd_edma.channels,
|
||||||
|
vc.chan.device_node) {
|
||||||
|
tasklet_kill(&chan->vc.task);
|
||||||
|
list_del(&chan->vc.chan.device_node);
|
||||||
|
}
|
||||||
|
|
||||||
/* Turn debugfs off */
|
/* Turn debugfs off */
|
||||||
dw_edma_v0_core_debugfs_off();
|
dw_edma_v0_core_debugfs_off();
|
||||||
|
|
|
||||||
|
|
@ -1407,6 +1407,20 @@ static const struct dmi_system_id gpiolib_acpi_quirks[] __initconst = {
|
||||||
.no_edge_events_on_boot = true,
|
.no_edge_events_on_boot = true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* The Dell Venue 10 Pro 5055, with Bay Trail SoC + TI PMIC uses an
|
||||||
|
* external embedded-controller connected via I2C + an ACPI GPIO
|
||||||
|
* event handler on INT33FFC:02 pin 12, causing spurious wakeups.
|
||||||
|
*/
|
||||||
|
.matches = {
|
||||||
|
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
|
||||||
|
DMI_MATCH(DMI_PRODUCT_NAME, "Venue 10 Pro 5055"),
|
||||||
|
},
|
||||||
|
.driver_data = &(struct acpi_gpiolib_dmi_quirk) {
|
||||||
|
.ignore_wake = "INT33FC:02@12",
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* HP X2 10 models with Cherry Trail SoC + TI PMIC use an
|
* HP X2 10 models with Cherry Trail SoC + TI PMIC use an
|
||||||
|
|
|
||||||
|
|
@ -8611,6 +8611,53 @@ static int add_affected_mst_dsc_crtcs(struct drm_atomic_state *state, struct drm
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
static int validate_overlay(struct drm_atomic_state *state)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
struct drm_plane *plane;
|
||||||
|
struct drm_plane_state *old_plane_state, *new_plane_state;
|
||||||
|
struct drm_plane_state *primary_state, *overlay_state = NULL;
|
||||||
|
|
||||||
|
/* Check if primary plane is contained inside overlay */
|
||||||
|
for_each_oldnew_plane_in_state_reverse(state, plane, old_plane_state, new_plane_state, i) {
|
||||||
|
if (plane->type == DRM_PLANE_TYPE_OVERLAY) {
|
||||||
|
if (drm_atomic_plane_disabling(plane->state, new_plane_state))
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
overlay_state = new_plane_state;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* check if we're making changes to the overlay plane */
|
||||||
|
if (!overlay_state)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
/* check if overlay plane is enabled */
|
||||||
|
if (!overlay_state->crtc)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
/* find the primary plane for the CRTC that the overlay is enabled on */
|
||||||
|
primary_state = drm_atomic_get_plane_state(state, overlay_state->crtc->primary);
|
||||||
|
if (IS_ERR(primary_state))
|
||||||
|
return PTR_ERR(primary_state);
|
||||||
|
|
||||||
|
/* check if primary plane is enabled */
|
||||||
|
if (!primary_state->crtc)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
/* Perform the bounds check to ensure the overlay plane covers the primary */
|
||||||
|
if (primary_state->crtc_x < overlay_state->crtc_x ||
|
||||||
|
primary_state->crtc_y < overlay_state->crtc_y ||
|
||||||
|
primary_state->crtc_x + primary_state->crtc_w > overlay_state->crtc_x + overlay_state->crtc_w ||
|
||||||
|
primary_state->crtc_y + primary_state->crtc_h > overlay_state->crtc_y + overlay_state->crtc_h) {
|
||||||
|
DRM_DEBUG_ATOMIC("Overlay plane is enabled with hardware cursor but does not fully cover primary plane\n");
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* amdgpu_dm_atomic_check() - Atomic check implementation for AMDgpu DM.
|
* amdgpu_dm_atomic_check() - Atomic check implementation for AMDgpu DM.
|
||||||
* @dev: The DRM device
|
* @dev: The DRM device
|
||||||
|
|
@ -8789,6 +8836,10 @@ static int amdgpu_dm_atomic_check(struct drm_device *dev,
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ret = validate_overlay(state);
|
||||||
|
if (ret)
|
||||||
|
goto fail;
|
||||||
|
|
||||||
/* Add new/modified planes */
|
/* Add new/modified planes */
|
||||||
for_each_oldnew_plane_in_state_reverse(state, plane, old_plane_state, new_plane_state, i) {
|
for_each_oldnew_plane_in_state_reverse(state, plane, old_plane_state, new_plane_state, i) {
|
||||||
ret = dm_update_plane_state(dc, state, plane,
|
ret = dm_update_plane_state(dc, state, plane,
|
||||||
|
|
|
||||||
|
|
@ -1110,7 +1110,6 @@ static int navi10_force_clk_levels(struct smu_context *smu,
|
||||||
case SMU_SOCCLK:
|
case SMU_SOCCLK:
|
||||||
case SMU_MCLK:
|
case SMU_MCLK:
|
||||||
case SMU_UCLK:
|
case SMU_UCLK:
|
||||||
case SMU_DCEFCLK:
|
|
||||||
case SMU_FCLK:
|
case SMU_FCLK:
|
||||||
/* There is only 2 levels for fine grained DPM */
|
/* There is only 2 levels for fine grained DPM */
|
||||||
if (navi10_is_support_fine_grained_dpm(smu, clk_type)) {
|
if (navi10_is_support_fine_grained_dpm(smu, clk_type)) {
|
||||||
|
|
@ -1130,6 +1129,10 @@ static int navi10_force_clk_levels(struct smu_context *smu,
|
||||||
if (ret)
|
if (ret)
|
||||||
return size;
|
return size;
|
||||||
break;
|
break;
|
||||||
|
case SMU_DCEFCLK:
|
||||||
|
dev_info(smu->adev->dev,"Setting DCEFCLK min/max dpm level is not supported!\n");
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1018,7 +1018,6 @@ static int sienna_cichlid_force_clk_levels(struct smu_context *smu,
|
||||||
case SMU_SOCCLK:
|
case SMU_SOCCLK:
|
||||||
case SMU_MCLK:
|
case SMU_MCLK:
|
||||||
case SMU_UCLK:
|
case SMU_UCLK:
|
||||||
case SMU_DCEFCLK:
|
|
||||||
case SMU_FCLK:
|
case SMU_FCLK:
|
||||||
/* There is only 2 levels for fine grained DPM */
|
/* There is only 2 levels for fine grained DPM */
|
||||||
if (sienna_cichlid_is_support_fine_grained_dpm(smu, clk_type)) {
|
if (sienna_cichlid_is_support_fine_grained_dpm(smu, clk_type)) {
|
||||||
|
|
@ -1038,6 +1037,9 @@ static int sienna_cichlid_force_clk_levels(struct smu_context *smu,
|
||||||
if (ret)
|
if (ret)
|
||||||
goto forec_level_out;
|
goto forec_level_out;
|
||||||
break;
|
break;
|
||||||
|
case SMU_DCEFCLK:
|
||||||
|
dev_info(smu->adev->dev,"Setting DCEFCLK min/max dpm level is not supported!\n");
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5655,7 +5655,18 @@ intel_dp_check_mst_status(struct intel_dp *intel_dp)
|
||||||
drm_WARN_ON_ONCE(&i915->drm, intel_dp->active_mst_links < 0);
|
drm_WARN_ON_ONCE(&i915->drm, intel_dp->active_mst_links < 0);
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
u8 esi[DP_DPRX_ESI_LEN] = {};
|
/*
|
||||||
|
* The +2 is because DP_DPRX_ESI_LEN is 14, but we then
|
||||||
|
* pass in "esi+10" to drm_dp_channel_eq_ok(), which
|
||||||
|
* takes a 6-byte array. So we actually need 16 bytes
|
||||||
|
* here.
|
||||||
|
*
|
||||||
|
* Somebody who knows what the limits actually are
|
||||||
|
* should check this, but for now this is at least
|
||||||
|
* harmless and avoids a valid compiler warning about
|
||||||
|
* using more of the array than we have allocated.
|
||||||
|
*/
|
||||||
|
u8 esi[DP_DPRX_ESI_LEN+2] = {};
|
||||||
bool handled;
|
bool handled;
|
||||||
int retry;
|
int retry;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,7 @@
|
||||||
#include <linux/of.h>
|
#include <linux/of.h>
|
||||||
#include <linux/gpio/consumer.h>
|
#include <linux/gpio/consumer.h>
|
||||||
#include <linux/regulator/consumer.h>
|
#include <linux/regulator/consumer.h>
|
||||||
|
#include <linux/uuid.h>
|
||||||
#include <asm/unaligned.h>
|
#include <asm/unaligned.h>
|
||||||
|
|
||||||
/* Device, Driver information */
|
/* Device, Driver information */
|
||||||
|
|
@ -1224,6 +1225,40 @@ static void elants_i2c_power_off(void *_data)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_ACPI
|
||||||
|
static const struct acpi_device_id i2c_hid_ids[] = {
|
||||||
|
{"ACPI0C50", 0 },
|
||||||
|
{"PNP0C50", 0 },
|
||||||
|
{ },
|
||||||
|
};
|
||||||
|
|
||||||
|
static const guid_t i2c_hid_guid =
|
||||||
|
GUID_INIT(0x3CDFF6F7, 0x4267, 0x4555,
|
||||||
|
0xAD, 0x05, 0xB3, 0x0A, 0x3D, 0x89, 0x38, 0xDE);
|
||||||
|
|
||||||
|
static bool elants_acpi_is_hid_device(struct device *dev)
|
||||||
|
{
|
||||||
|
acpi_handle handle = ACPI_HANDLE(dev);
|
||||||
|
union acpi_object *obj;
|
||||||
|
|
||||||
|
if (acpi_match_device_ids(ACPI_COMPANION(dev), i2c_hid_ids))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
obj = acpi_evaluate_dsm_typed(handle, &i2c_hid_guid, 1, 1, NULL, ACPI_TYPE_INTEGER);
|
||||||
|
if (obj) {
|
||||||
|
ACPI_FREE(obj);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
static bool elants_acpi_is_hid_device(struct device *dev)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static int elants_i2c_probe(struct i2c_client *client,
|
static int elants_i2c_probe(struct i2c_client *client,
|
||||||
const struct i2c_device_id *id)
|
const struct i2c_device_id *id)
|
||||||
{
|
{
|
||||||
|
|
@ -1232,9 +1267,14 @@ static int elants_i2c_probe(struct i2c_client *client,
|
||||||
unsigned long irqflags;
|
unsigned long irqflags;
|
||||||
int error;
|
int error;
|
||||||
|
|
||||||
|
/* Don't bind to i2c-hid compatible devices, these are handled by the i2c-hid drv. */
|
||||||
|
if (elants_acpi_is_hid_device(&client->dev)) {
|
||||||
|
dev_warn(&client->dev, "This device appears to be an I2C-HID device, not binding\n");
|
||||||
|
return -ENODEV;
|
||||||
|
}
|
||||||
|
|
||||||
if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) {
|
if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) {
|
||||||
dev_err(&client->dev,
|
dev_err(&client->dev, "I2C check functionality error\n");
|
||||||
"%s: i2c check functionality error\n", DEVICE_NAME);
|
|
||||||
return -ENXIO;
|
return -ENXIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@
|
||||||
#include <linux/input/mt.h>
|
#include <linux/input/mt.h>
|
||||||
#include <linux/input/touchscreen.h>
|
#include <linux/input/touchscreen.h>
|
||||||
#include <linux/pm.h>
|
#include <linux/pm.h>
|
||||||
|
#include <linux/pm_runtime.h>
|
||||||
#include <linux/irq.h>
|
#include <linux/irq.h>
|
||||||
#include <linux/regulator/consumer.h>
|
#include <linux/regulator/consumer.h>
|
||||||
|
|
||||||
|
|
@ -335,10 +336,8 @@ static int silead_ts_get_id(struct i2c_client *client)
|
||||||
|
|
||||||
error = i2c_smbus_read_i2c_block_data(client, SILEAD_REG_ID,
|
error = i2c_smbus_read_i2c_block_data(client, SILEAD_REG_ID,
|
||||||
sizeof(chip_id), (u8 *)&chip_id);
|
sizeof(chip_id), (u8 *)&chip_id);
|
||||||
if (error < 0) {
|
if (error < 0)
|
||||||
dev_err(&client->dev, "Chip ID read error %d\n", error);
|
|
||||||
return error;
|
return error;
|
||||||
}
|
|
||||||
|
|
||||||
data->chip_id = le32_to_cpu(chip_id);
|
data->chip_id = le32_to_cpu(chip_id);
|
||||||
dev_info(&client->dev, "Silead chip ID: 0x%8X", data->chip_id);
|
dev_info(&client->dev, "Silead chip ID: 0x%8X", data->chip_id);
|
||||||
|
|
@ -351,12 +350,49 @@ static int silead_ts_setup(struct i2c_client *client)
|
||||||
int error;
|
int error;
|
||||||
u32 status;
|
u32 status;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Some buggy BIOS-es bring up the chip in a stuck state where it
|
||||||
|
* blocks the I2C bus. The following steps are necessary to
|
||||||
|
* unstuck the chip / bus:
|
||||||
|
* 1. Turn off the Silead chip.
|
||||||
|
* 2. Try to do an I2C transfer with the chip, this will fail in
|
||||||
|
* response to which the I2C-bus-driver will call:
|
||||||
|
* i2c_recover_bus() which will unstuck the I2C-bus. Note the
|
||||||
|
* unstuck-ing of the I2C bus only works if we first drop the
|
||||||
|
* chip off the bus by turning it off.
|
||||||
|
* 3. Turn the chip back on.
|
||||||
|
*
|
||||||
|
* On the x86/ACPI systems were this problem is seen, step 1. and
|
||||||
|
* 3. require making ACPI calls and dealing with ACPI Power
|
||||||
|
* Resources. The workaround below runtime-suspends the chip to
|
||||||
|
* turn it off, leaving it up to the ACPI subsystem to deal with
|
||||||
|
* this.
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (device_property_read_bool(&client->dev,
|
||||||
|
"silead,stuck-controller-bug")) {
|
||||||
|
pm_runtime_set_active(&client->dev);
|
||||||
|
pm_runtime_enable(&client->dev);
|
||||||
|
pm_runtime_allow(&client->dev);
|
||||||
|
|
||||||
|
pm_runtime_suspend(&client->dev);
|
||||||
|
|
||||||
|
dev_warn(&client->dev, FW_BUG "Stuck I2C bus: please ignore the next 'controller timed out' error\n");
|
||||||
|
silead_ts_get_id(client);
|
||||||
|
|
||||||
|
/* The forbid will also resume the device */
|
||||||
|
pm_runtime_forbid(&client->dev);
|
||||||
|
pm_runtime_disable(&client->dev);
|
||||||
|
}
|
||||||
|
|
||||||
silead_ts_set_power(client, SILEAD_POWER_OFF);
|
silead_ts_set_power(client, SILEAD_POWER_OFF);
|
||||||
silead_ts_set_power(client, SILEAD_POWER_ON);
|
silead_ts_set_power(client, SILEAD_POWER_ON);
|
||||||
|
|
||||||
error = silead_ts_get_id(client);
|
error = silead_ts_get_id(client);
|
||||||
if (error)
|
if (error) {
|
||||||
|
dev_err(&client->dev, "Chip ID read error %d\n", error);
|
||||||
return error;
|
return error;
|
||||||
|
}
|
||||||
|
|
||||||
error = silead_ts_init(client);
|
error = silead_ts_init(client);
|
||||||
if (error)
|
if (error)
|
||||||
|
|
|
||||||
|
|
@ -721,7 +721,7 @@ u16 capi20_put_message(struct capi20_appl *ap, struct sk_buff *skb)
|
||||||
* Return value: CAPI result code
|
* Return value: CAPI result code
|
||||||
*/
|
*/
|
||||||
|
|
||||||
u16 capi20_get_manufacturer(u32 contr, u8 *buf)
|
u16 capi20_get_manufacturer(u32 contr, u8 buf[CAPI_MANUFACTURER_LEN])
|
||||||
{
|
{
|
||||||
struct capi_ctr *ctr;
|
struct capi_ctr *ctr;
|
||||||
u16 ret;
|
u16 ret;
|
||||||
|
|
@ -787,7 +787,7 @@ u16 capi20_get_version(u32 contr, struct capi_version *verp)
|
||||||
* Return value: CAPI result code
|
* Return value: CAPI result code
|
||||||
*/
|
*/
|
||||||
|
|
||||||
u16 capi20_get_serial(u32 contr, u8 *serial)
|
u16 capi20_get_serial(u32 contr, u8 serial[CAPI_SERIAL_LEN])
|
||||||
{
|
{
|
||||||
struct capi_ctr *ctr;
|
struct capi_ctr *ctr;
|
||||||
u16 ret;
|
u16 ret;
|
||||||
|
|
|
||||||
|
|
@ -95,19 +95,19 @@
|
||||||
|
|
||||||
#include <asm/sections.h>
|
#include <asm/sections.h>
|
||||||
|
|
||||||
#define v1printk(a...) do { \
|
#define v1printk(a...) do { \
|
||||||
if (verbose) \
|
if (verbose) \
|
||||||
printk(KERN_INFO a); \
|
printk(KERN_INFO a); \
|
||||||
} while (0)
|
} while (0)
|
||||||
#define v2printk(a...) do { \
|
#define v2printk(a...) do { \
|
||||||
if (verbose > 1) \
|
if (verbose > 1) \
|
||||||
printk(KERN_INFO a); \
|
printk(KERN_INFO a); \
|
||||||
touch_nmi_watchdog(); \
|
touch_nmi_watchdog(); \
|
||||||
} while (0)
|
} while (0)
|
||||||
#define eprintk(a...) do { \
|
#define eprintk(a...) do { \
|
||||||
printk(KERN_ERR a); \
|
printk(KERN_ERR a); \
|
||||||
WARN_ON(1); \
|
WARN_ON(1); \
|
||||||
} while (0)
|
} while (0)
|
||||||
#define MAX_CONFIG_LEN 40
|
#define MAX_CONFIG_LEN 40
|
||||||
|
|
||||||
static struct kgdb_io kgdbts_io_ops;
|
static struct kgdb_io kgdbts_io_ops;
|
||||||
|
|
|
||||||
|
|
@ -2671,7 +2671,7 @@ do { \
|
||||||
seq_printf(seq, "%-12s", s); \
|
seq_printf(seq, "%-12s", s); \
|
||||||
for (i = 0; i < n; ++i) \
|
for (i = 0; i < n; ++i) \
|
||||||
seq_printf(seq, " %16" fmt_spec, v); \
|
seq_printf(seq, " %16" fmt_spec, v); \
|
||||||
seq_putc(seq, '\n'); \
|
seq_putc(seq, '\n'); \
|
||||||
} while (0)
|
} while (0)
|
||||||
#define S(s, v) S3("s", s, v)
|
#define S(s, v) S3("s", s, v)
|
||||||
#define T3(fmt_spec, s, v) S3(fmt_spec, s, tx[i].v)
|
#define T3(fmt_spec, s, v) S3(fmt_spec, s, tx[i].v)
|
||||||
|
|
|
||||||
|
|
@ -2559,12 +2559,12 @@ int cxgb4_ethofld_send_flowc(struct net_device *dev, u32 eotid, u32 tc)
|
||||||
spin_lock_bh(&eosw_txq->lock);
|
spin_lock_bh(&eosw_txq->lock);
|
||||||
if (tc != FW_SCHED_CLS_NONE) {
|
if (tc != FW_SCHED_CLS_NONE) {
|
||||||
if (eosw_txq->state != CXGB4_EO_STATE_CLOSED)
|
if (eosw_txq->state != CXGB4_EO_STATE_CLOSED)
|
||||||
goto out_unlock;
|
goto out_free_skb;
|
||||||
|
|
||||||
next_state = CXGB4_EO_STATE_FLOWC_OPEN_SEND;
|
next_state = CXGB4_EO_STATE_FLOWC_OPEN_SEND;
|
||||||
} else {
|
} else {
|
||||||
if (eosw_txq->state != CXGB4_EO_STATE_ACTIVE)
|
if (eosw_txq->state != CXGB4_EO_STATE_ACTIVE)
|
||||||
goto out_unlock;
|
goto out_free_skb;
|
||||||
|
|
||||||
next_state = CXGB4_EO_STATE_FLOWC_CLOSE_SEND;
|
next_state = CXGB4_EO_STATE_FLOWC_CLOSE_SEND;
|
||||||
}
|
}
|
||||||
|
|
@ -2600,17 +2600,19 @@ int cxgb4_ethofld_send_flowc(struct net_device *dev, u32 eotid, u32 tc)
|
||||||
eosw_txq_flush_pending_skbs(eosw_txq);
|
eosw_txq_flush_pending_skbs(eosw_txq);
|
||||||
|
|
||||||
ret = eosw_txq_enqueue(eosw_txq, skb);
|
ret = eosw_txq_enqueue(eosw_txq, skb);
|
||||||
if (ret) {
|
if (ret)
|
||||||
dev_consume_skb_any(skb);
|
goto out_free_skb;
|
||||||
goto out_unlock;
|
|
||||||
}
|
|
||||||
|
|
||||||
eosw_txq->state = next_state;
|
eosw_txq->state = next_state;
|
||||||
eosw_txq->flowc_idx = eosw_txq->pidx;
|
eosw_txq->flowc_idx = eosw_txq->pidx;
|
||||||
eosw_txq_advance(eosw_txq, 1);
|
eosw_txq_advance(eosw_txq, 1);
|
||||||
ethofld_xmit(dev, eosw_txq);
|
ethofld_xmit(dev, eosw_txq);
|
||||||
|
|
||||||
out_unlock:
|
spin_unlock_bh(&eosw_txq->lock);
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
out_free_skb:
|
||||||
|
dev_consume_skb_any(skb);
|
||||||
spin_unlock_bh(&eosw_txq->lock);
|
spin_unlock_bh(&eosw_txq->lock);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -222,7 +222,7 @@ static void dwmac4_dma_rx_chan_op_mode(void __iomem *ioaddr, int mode,
|
||||||
u32 channel, int fifosz, u8 qmode)
|
u32 channel, int fifosz, u8 qmode)
|
||||||
{
|
{
|
||||||
unsigned int rqs = fifosz / 256 - 1;
|
unsigned int rqs = fifosz / 256 - 1;
|
||||||
u32 mtl_rx_op, mtl_rx_int;
|
u32 mtl_rx_op;
|
||||||
|
|
||||||
mtl_rx_op = readl(ioaddr + MTL_CHAN_RX_OP_MODE(channel));
|
mtl_rx_op = readl(ioaddr + MTL_CHAN_RX_OP_MODE(channel));
|
||||||
|
|
||||||
|
|
@ -283,11 +283,6 @@ static void dwmac4_dma_rx_chan_op_mode(void __iomem *ioaddr, int mode,
|
||||||
}
|
}
|
||||||
|
|
||||||
writel(mtl_rx_op, ioaddr + MTL_CHAN_RX_OP_MODE(channel));
|
writel(mtl_rx_op, ioaddr + MTL_CHAN_RX_OP_MODE(channel));
|
||||||
|
|
||||||
/* Enable MTL RX overflow */
|
|
||||||
mtl_rx_int = readl(ioaddr + MTL_CHAN_INT_CTRL(channel));
|
|
||||||
writel(mtl_rx_int | MTL_RX_OVERFLOW_INT_EN,
|
|
||||||
ioaddr + MTL_CHAN_INT_CTRL(channel));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void dwmac4_dma_tx_chan_op_mode(void __iomem *ioaddr, int mode,
|
static void dwmac4_dma_tx_chan_op_mode(void __iomem *ioaddr, int mode,
|
||||||
|
|
|
||||||
|
|
@ -4138,7 +4138,6 @@ static irqreturn_t stmmac_interrupt(int irq, void *dev_id)
|
||||||
/* To handle GMAC own interrupts */
|
/* To handle GMAC own interrupts */
|
||||||
if ((priv->plat->has_gmac) || xmac) {
|
if ((priv->plat->has_gmac) || xmac) {
|
||||||
int status = stmmac_host_irq_status(priv, priv->hw, &priv->xstats);
|
int status = stmmac_host_irq_status(priv, priv->hw, &priv->xstats);
|
||||||
int mtl_status;
|
|
||||||
|
|
||||||
if (unlikely(status)) {
|
if (unlikely(status)) {
|
||||||
/* For LPI we need to save the tx status */
|
/* For LPI we need to save the tx status */
|
||||||
|
|
@ -4149,17 +4148,8 @@ static irqreturn_t stmmac_interrupt(int irq, void *dev_id)
|
||||||
}
|
}
|
||||||
|
|
||||||
for (queue = 0; queue < queues_count; queue++) {
|
for (queue = 0; queue < queues_count; queue++) {
|
||||||
struct stmmac_rx_queue *rx_q = &priv->rx_queue[queue];
|
status = stmmac_host_mtl_irq_status(priv, priv->hw,
|
||||||
|
queue);
|
||||||
mtl_status = stmmac_host_mtl_irq_status(priv, priv->hw,
|
|
||||||
queue);
|
|
||||||
if (mtl_status != -EINVAL)
|
|
||||||
status |= mtl_status;
|
|
||||||
|
|
||||||
if (status & CORE_IRQ_MTL_RX_OVERFLOW)
|
|
||||||
stmmac_set_rx_tail_ptr(priv, priv->ioaddr,
|
|
||||||
rx_q->rx_tail_addr,
|
|
||||||
queue);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* PCS link status */
|
/* PCS link status */
|
||||||
|
|
|
||||||
|
|
@ -406,9 +406,13 @@ static struct sk_buff *page_to_skb(struct virtnet_info *vi,
|
||||||
offset += hdr_padded_len;
|
offset += hdr_padded_len;
|
||||||
p += hdr_padded_len;
|
p += hdr_padded_len;
|
||||||
|
|
||||||
copy = len;
|
/* Copy all frame if it fits skb->head, otherwise
|
||||||
if (copy > skb_tailroom(skb))
|
* we let virtio_net_hdr_to_skb() and GRO pull headers as needed.
|
||||||
copy = skb_tailroom(skb);
|
*/
|
||||||
|
if (len <= skb_tailroom(skb))
|
||||||
|
copy = len;
|
||||||
|
else
|
||||||
|
copy = ETH_HLEN + metasize;
|
||||||
skb_put_data(skb, p, copy);
|
skb_put_data(skb, p, copy);
|
||||||
|
|
||||||
if (metasize) {
|
if (metasize) {
|
||||||
|
|
|
||||||
|
|
@ -3825,6 +3825,68 @@ static inline void set_auth_type(struct airo_info *local, int auth_type)
|
||||||
local->last_auth = auth_type;
|
local->last_auth = auth_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int noinline_for_stack airo_readconfig(struct airo_info *ai, u8 *mac, int lock)
|
||||||
|
{
|
||||||
|
int i, status;
|
||||||
|
/* large variables, so don't inline this function,
|
||||||
|
* maybe change to kmalloc
|
||||||
|
*/
|
||||||
|
tdsRssiRid rssi_rid;
|
||||||
|
CapabilityRid cap_rid;
|
||||||
|
|
||||||
|
kfree(ai->SSID);
|
||||||
|
ai->SSID = NULL;
|
||||||
|
// general configuration (read/modify/write)
|
||||||
|
status = readConfigRid(ai, lock);
|
||||||
|
if (status != SUCCESS) return ERROR;
|
||||||
|
|
||||||
|
status = readCapabilityRid(ai, &cap_rid, lock);
|
||||||
|
if (status != SUCCESS) return ERROR;
|
||||||
|
|
||||||
|
status = PC4500_readrid(ai, RID_RSSI, &rssi_rid, sizeof(rssi_rid), lock);
|
||||||
|
if (status == SUCCESS) {
|
||||||
|
if (ai->rssi || (ai->rssi = kmalloc(512, GFP_KERNEL)) != NULL)
|
||||||
|
memcpy(ai->rssi, (u8*)&rssi_rid + 2, 512); /* Skip RID length member */
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
kfree(ai->rssi);
|
||||||
|
ai->rssi = NULL;
|
||||||
|
if (cap_rid.softCap & cpu_to_le16(8))
|
||||||
|
ai->config.rmode |= RXMODE_NORMALIZED_RSSI;
|
||||||
|
else
|
||||||
|
airo_print_warn(ai->dev->name, "unknown received signal "
|
||||||
|
"level scale");
|
||||||
|
}
|
||||||
|
ai->config.opmode = adhoc ? MODE_STA_IBSS : MODE_STA_ESS;
|
||||||
|
set_auth_type(ai, AUTH_OPEN);
|
||||||
|
ai->config.modulation = MOD_CCK;
|
||||||
|
|
||||||
|
if (le16_to_cpu(cap_rid.len) >= sizeof(cap_rid) &&
|
||||||
|
(cap_rid.extSoftCap & cpu_to_le16(1)) &&
|
||||||
|
micsetup(ai) == SUCCESS) {
|
||||||
|
ai->config.opmode |= MODE_MIC;
|
||||||
|
set_bit(FLAG_MIC_CAPABLE, &ai->flags);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Save off the MAC */
|
||||||
|
for (i = 0; i < ETH_ALEN; i++) {
|
||||||
|
mac[i] = ai->config.macAddr[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Check to see if there are any insmod configured
|
||||||
|
rates to add */
|
||||||
|
if (rates[0]) {
|
||||||
|
memset(ai->config.rates, 0, sizeof(ai->config.rates));
|
||||||
|
for (i = 0; i < 8 && rates[i]; i++) {
|
||||||
|
ai->config.rates[i] = rates[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
set_bit (FLAG_COMMIT, &ai->flags);
|
||||||
|
|
||||||
|
return SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static u16 setup_card(struct airo_info *ai, u8 *mac, int lock)
|
static u16 setup_card(struct airo_info *ai, u8 *mac, int lock)
|
||||||
{
|
{
|
||||||
Cmd cmd;
|
Cmd cmd;
|
||||||
|
|
@ -3871,58 +3933,9 @@ static u16 setup_card(struct airo_info *ai, u8 *mac, int lock)
|
||||||
if (lock)
|
if (lock)
|
||||||
up(&ai->sem);
|
up(&ai->sem);
|
||||||
if (ai->config.len == 0) {
|
if (ai->config.len == 0) {
|
||||||
int i;
|
status = airo_readconfig(ai, mac, lock);
|
||||||
tdsRssiRid rssi_rid;
|
if (status != SUCCESS)
|
||||||
CapabilityRid cap_rid;
|
return ERROR;
|
||||||
|
|
||||||
kfree(ai->SSID);
|
|
||||||
ai->SSID = NULL;
|
|
||||||
// general configuration (read/modify/write)
|
|
||||||
status = readConfigRid(ai, lock);
|
|
||||||
if (status != SUCCESS) return ERROR;
|
|
||||||
|
|
||||||
status = readCapabilityRid(ai, &cap_rid, lock);
|
|
||||||
if (status != SUCCESS) return ERROR;
|
|
||||||
|
|
||||||
status = PC4500_readrid(ai, RID_RSSI,&rssi_rid, sizeof(rssi_rid), lock);
|
|
||||||
if (status == SUCCESS) {
|
|
||||||
if (ai->rssi || (ai->rssi = kmalloc(512, GFP_KERNEL)) != NULL)
|
|
||||||
memcpy(ai->rssi, (u8*)&rssi_rid + 2, 512); /* Skip RID length member */
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
kfree(ai->rssi);
|
|
||||||
ai->rssi = NULL;
|
|
||||||
if (cap_rid.softCap & cpu_to_le16(8))
|
|
||||||
ai->config.rmode |= RXMODE_NORMALIZED_RSSI;
|
|
||||||
else
|
|
||||||
airo_print_warn(ai->dev->name, "unknown received signal "
|
|
||||||
"level scale");
|
|
||||||
}
|
|
||||||
ai->config.opmode = adhoc ? MODE_STA_IBSS : MODE_STA_ESS;
|
|
||||||
set_auth_type(ai, AUTH_OPEN);
|
|
||||||
ai->config.modulation = MOD_CCK;
|
|
||||||
|
|
||||||
if (le16_to_cpu(cap_rid.len) >= sizeof(cap_rid) &&
|
|
||||||
(cap_rid.extSoftCap & cpu_to_le16(1)) &&
|
|
||||||
micsetup(ai) == SUCCESS) {
|
|
||||||
ai->config.opmode |= MODE_MIC;
|
|
||||||
set_bit(FLAG_MIC_CAPABLE, &ai->flags);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Save off the MAC */
|
|
||||||
for (i = 0; i < ETH_ALEN; i++) {
|
|
||||||
mac[i] = ai->config.macAddr[i];
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Check to see if there are any insmod configured
|
|
||||||
rates to add */
|
|
||||||
if (rates[0]) {
|
|
||||||
memset(ai->config.rates, 0, sizeof(ai->config.rates));
|
|
||||||
for (i = 0; i < 8 && rates[i]; i++) {
|
|
||||||
ai->config.rates[i] = rates[i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
set_bit (FLAG_COMMIT, &ai->flags);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Setup the SSIDs if present */
|
/* Setup the SSIDs if present */
|
||||||
|
|
|
||||||
|
|
@ -313,7 +313,7 @@ static void nvmet_execute_get_log_page(struct nvmet_req *req)
|
||||||
case NVME_LOG_ANA:
|
case NVME_LOG_ANA:
|
||||||
return nvmet_execute_get_log_page_ana(req);
|
return nvmet_execute_get_log_page_ana(req);
|
||||||
}
|
}
|
||||||
pr_err("unhandled lid %d on qid %d\n",
|
pr_debug("unhandled lid %d on qid %d\n",
|
||||||
req->cmd->get_log_page.lid, req->sq->qid);
|
req->cmd->get_log_page.lid, req->sq->qid);
|
||||||
req->error_loc = offsetof(struct nvme_get_log_page_command, lid);
|
req->error_loc = offsetof(struct nvme_get_log_page_command, lid);
|
||||||
nvmet_req_complete(req, NVME_SC_INVALID_FIELD | NVME_SC_DNR);
|
nvmet_req_complete(req, NVME_SC_INVALID_FIELD | NVME_SC_DNR);
|
||||||
|
|
@ -657,7 +657,7 @@ static void nvmet_execute_identify(struct nvmet_req *req)
|
||||||
return nvmet_execute_identify_desclist(req);
|
return nvmet_execute_identify_desclist(req);
|
||||||
}
|
}
|
||||||
|
|
||||||
pr_err("unhandled identify cns %d on qid %d\n",
|
pr_debug("unhandled identify cns %d on qid %d\n",
|
||||||
req->cmd->identify.cns, req->sq->qid);
|
req->cmd->identify.cns, req->sq->qid);
|
||||||
req->error_loc = offsetof(struct nvme_identify, cns);
|
req->error_loc = offsetof(struct nvme_identify, cns);
|
||||||
nvmet_req_complete(req, NVME_SC_INVALID_FIELD | NVME_SC_DNR);
|
nvmet_req_complete(req, NVME_SC_INVALID_FIELD | NVME_SC_DNR);
|
||||||
|
|
@ -972,7 +972,7 @@ u16 nvmet_parse_admin_cmd(struct nvmet_req *req)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
pr_err("unhandled cmd %d on qid %d\n", cmd->common.opcode,
|
pr_debug("unhandled cmd %d on qid %d\n", cmd->common.opcode,
|
||||||
req->sq->qid);
|
req->sq->qid);
|
||||||
req->error_loc = offsetof(struct nvme_common_command, opcode);
|
req->error_loc = offsetof(struct nvme_common_command, opcode);
|
||||||
return NVME_SC_INVALID_OPCODE | NVME_SC_DNR;
|
return NVME_SC_INVALID_OPCODE | NVME_SC_DNR;
|
||||||
|
|
|
||||||
|
|
@ -1660,7 +1660,7 @@ static void pex_ep_event_pex_rst_deassert(struct tegra_pcie_dw *pcie)
|
||||||
if (pcie->ep_state == EP_STATE_ENABLED)
|
if (pcie->ep_state == EP_STATE_ENABLED)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ret = pm_runtime_get_sync(dev);
|
ret = pm_runtime_resume_and_get(dev);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
dev_err(dev, "Failed to get runtime sync for PCIe dev: %d\n",
|
dev_err(dev, "Failed to get runtime sync for PCIe dev: %d\n",
|
||||||
ret);
|
ret);
|
||||||
|
|
|
||||||
|
|
@ -116,7 +116,7 @@ static int thunder_ecam_p2_config_read(struct pci_bus *bus, unsigned int devfn,
|
||||||
* the config space access window. Since we are working with
|
* the config space access window. Since we are working with
|
||||||
* the high-order 32 bits, shift everything down by 32 bits.
|
* the high-order 32 bits, shift everything down by 32 bits.
|
||||||
*/
|
*/
|
||||||
node_bits = (cfg->res.start >> 32) & (1 << 12);
|
node_bits = upper_32_bits(cfg->res.start) & (1 << 12);
|
||||||
|
|
||||||
v |= node_bits;
|
v |= node_bits;
|
||||||
set_val(v, where, size, val);
|
set_val(v, where, size, val);
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@
|
||||||
#include <linux/pci-acpi.h>
|
#include <linux/pci-acpi.h>
|
||||||
#include <linux/pci-ecam.h>
|
#include <linux/pci-ecam.h>
|
||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
|
#include <linux/io-64-nonatomic-lo-hi.h>
|
||||||
#include "../pci.h"
|
#include "../pci.h"
|
||||||
|
|
||||||
#if defined(CONFIG_PCI_HOST_THUNDER_PEM) || (defined(CONFIG_ACPI) && defined(CONFIG_PCI_QUIRKS))
|
#if defined(CONFIG_PCI_HOST_THUNDER_PEM) || (defined(CONFIG_ACPI) && defined(CONFIG_PCI_QUIRKS))
|
||||||
|
|
@ -315,9 +316,9 @@ static int thunder_pem_init(struct device *dev, struct pci_config_window *cfg,
|
||||||
* structure here for the BAR.
|
* structure here for the BAR.
|
||||||
*/
|
*/
|
||||||
bar4_start = res_pem->start + 0xf00000;
|
bar4_start = res_pem->start + 0xf00000;
|
||||||
pem_pci->ea_entry[0] = (u32)bar4_start | 2;
|
pem_pci->ea_entry[0] = lower_32_bits(bar4_start) | 2;
|
||||||
pem_pci->ea_entry[1] = (u32)(res_pem->end - bar4_start) & ~3u;
|
pem_pci->ea_entry[1] = lower_32_bits(res_pem->end - bar4_start) & ~3u;
|
||||||
pem_pci->ea_entry[2] = (u32)(bar4_start >> 32);
|
pem_pci->ea_entry[2] = upper_32_bits(bar4_start);
|
||||||
|
|
||||||
cfg->priv = pem_pci;
|
cfg->priv = pem_pci;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
@ -325,9 +326,9 @@ static int thunder_pem_init(struct device *dev, struct pci_config_window *cfg,
|
||||||
|
|
||||||
#if defined(CONFIG_ACPI) && defined(CONFIG_PCI_QUIRKS)
|
#if defined(CONFIG_ACPI) && defined(CONFIG_PCI_QUIRKS)
|
||||||
|
|
||||||
#define PEM_RES_BASE 0x87e0c0000000UL
|
#define PEM_RES_BASE 0x87e0c0000000ULL
|
||||||
#define PEM_NODE_MASK GENMASK(45, 44)
|
#define PEM_NODE_MASK GENMASK_ULL(45, 44)
|
||||||
#define PEM_INDX_MASK GENMASK(26, 24)
|
#define PEM_INDX_MASK GENMASK_ULL(26, 24)
|
||||||
#define PEM_MIN_DOM_IN_NODE 4
|
#define PEM_MIN_DOM_IN_NODE 4
|
||||||
#define PEM_MAX_DOM_IN_NODE 10
|
#define PEM_MAX_DOM_IN_NODE 10
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -533,6 +533,7 @@ static void enable_slot(struct acpiphp_slot *slot, bool bridge)
|
||||||
slot->flags &= ~SLOT_ENABLED;
|
slot->flags &= ~SLOT_ENABLED;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
pci_dev_put(dev);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -612,6 +612,12 @@ static inline int pci_dev_specific_reset(struct pci_dev *dev, int probe)
|
||||||
#if defined(CONFIG_PCI_QUIRKS) && defined(CONFIG_ARM64)
|
#if defined(CONFIG_PCI_QUIRKS) && defined(CONFIG_ARM64)
|
||||||
int acpi_get_rc_resources(struct device *dev, const char *hid, u16 segment,
|
int acpi_get_rc_resources(struct device *dev, const char *hid, u16 segment,
|
||||||
struct resource *res);
|
struct resource *res);
|
||||||
|
#else
|
||||||
|
static inline int acpi_get_rc_resources(struct device *dev, const char *hid,
|
||||||
|
u16 segment, struct resource *res)
|
||||||
|
{
|
||||||
|
return -ENODEV;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
u32 pci_rebar_get_possible_sizes(struct pci_dev *pdev, int bar);
|
u32 pci_rebar_get_possible_sizes(struct pci_dev *pdev, int bar);
|
||||||
|
|
|
||||||
|
|
@ -474,6 +474,11 @@ static int cros_typec_enable_dp(struct cros_typec_data *typec,
|
||||||
return -ENOTSUPP;
|
return -ENOTSUPP;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!pd_ctrl->dp_mode) {
|
||||||
|
dev_err(typec->dev, "No valid DP mode provided.\n");
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
/* Status VDO. */
|
/* Status VDO. */
|
||||||
dp_data.status = DP_STATUS_ENABLED;
|
dp_data.status = DP_STATUS_ENABLED;
|
||||||
if (port->mux_flags & USB_PD_MUX_HPD_IRQ)
|
if (port->mux_flags & USB_PD_MUX_HPD_IRQ)
|
||||||
|
|
|
||||||
|
|
@ -11590,13 +11590,20 @@ lpfc_sli_validate_fcp_iocb(struct lpfc_iocbq *iocbq, struct lpfc_vport *vport,
|
||||||
lpfc_ctx_cmd ctx_cmd)
|
lpfc_ctx_cmd ctx_cmd)
|
||||||
{
|
{
|
||||||
struct lpfc_io_buf *lpfc_cmd;
|
struct lpfc_io_buf *lpfc_cmd;
|
||||||
|
IOCB_t *icmd = NULL;
|
||||||
int rc = 1;
|
int rc = 1;
|
||||||
|
|
||||||
if (iocbq->vport != vport)
|
if (iocbq->vport != vport)
|
||||||
return rc;
|
return rc;
|
||||||
|
|
||||||
if (!(iocbq->iocb_flag & LPFC_IO_FCP) ||
|
if (!(iocbq->iocb_flag & LPFC_IO_FCP) ||
|
||||||
!(iocbq->iocb_flag & LPFC_IO_ON_TXCMPLQ))
|
!(iocbq->iocb_flag & LPFC_IO_ON_TXCMPLQ) ||
|
||||||
|
iocbq->iocb_flag & LPFC_DRIVER_ABORTED)
|
||||||
|
return rc;
|
||||||
|
|
||||||
|
icmd = &iocbq->iocb;
|
||||||
|
if (icmd->ulpCommand == CMD_ABORT_XRI_CN ||
|
||||||
|
icmd->ulpCommand == CMD_CLOSE_XRI_CN)
|
||||||
return rc;
|
return rc;
|
||||||
|
|
||||||
lpfc_cmd = container_of(iocbq, struct lpfc_io_buf, cur_iocbq);
|
lpfc_cmd = container_of(iocbq, struct lpfc_io_buf, cur_iocbq);
|
||||||
|
|
|
||||||
|
|
@ -1391,7 +1391,7 @@ static int tcmu_run_tmr_queue(struct tcmu_dev *udev)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static unsigned int tcmu_handle_completions(struct tcmu_dev *udev)
|
static bool tcmu_handle_completions(struct tcmu_dev *udev)
|
||||||
{
|
{
|
||||||
struct tcmu_mailbox *mb;
|
struct tcmu_mailbox *mb;
|
||||||
struct tcmu_cmd *cmd;
|
struct tcmu_cmd *cmd;
|
||||||
|
|
@ -1434,7 +1434,7 @@ static unsigned int tcmu_handle_completions(struct tcmu_dev *udev)
|
||||||
pr_err("cmd_id %u not found, ring is broken\n",
|
pr_err("cmd_id %u not found, ring is broken\n",
|
||||||
entry->hdr.cmd_id);
|
entry->hdr.cmd_id);
|
||||||
set_bit(TCMU_DEV_BIT_BROKEN, &udev->flags);
|
set_bit(TCMU_DEV_BIT_BROKEN, &udev->flags);
|
||||||
break;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
tcmu_handle_completion(cmd, entry);
|
tcmu_handle_completion(cmd, entry);
|
||||||
|
|
|
||||||
|
|
@ -1287,11 +1287,10 @@ sl811h_hub_control(
|
||||||
goto error;
|
goto error;
|
||||||
put_unaligned_le32(sl811->port1, buf);
|
put_unaligned_le32(sl811->port1, buf);
|
||||||
|
|
||||||
#ifndef VERBOSE
|
if (__is_defined(VERBOSE) ||
|
||||||
if (*(u16*)(buf+2)) /* only if wPortChange is interesting */
|
*(u16*)(buf+2)) /* only if wPortChange is interesting */
|
||||||
#endif
|
dev_dbg(hcd->self.controller, "GetPortStatus %08x\n",
|
||||||
dev_dbg(hcd->self.controller, "GetPortStatus %08x\n",
|
sl811->port1);
|
||||||
sl811->port1);
|
|
||||||
break;
|
break;
|
||||||
case SetPortFeature:
|
case SetPortFeature:
|
||||||
if (wIndex != 1 || wLength != 0)
|
if (wIndex != 1 || wLength != 0)
|
||||||
|
|
|
||||||
|
|
@ -1896,6 +1896,7 @@ ssize_t blkdev_write_iter(struct kiocb *iocb, struct iov_iter *from)
|
||||||
struct inode *bd_inode = bdev_file_inode(file);
|
struct inode *bd_inode = bdev_file_inode(file);
|
||||||
loff_t size = i_size_read(bd_inode);
|
loff_t size = i_size_read(bd_inode);
|
||||||
struct blk_plug plug;
|
struct blk_plug plug;
|
||||||
|
size_t shorted = 0;
|
||||||
ssize_t ret;
|
ssize_t ret;
|
||||||
|
|
||||||
if (bdev_read_only(I_BDEV(bd_inode)))
|
if (bdev_read_only(I_BDEV(bd_inode)))
|
||||||
|
|
@ -1913,12 +1914,17 @@ ssize_t blkdev_write_iter(struct kiocb *iocb, struct iov_iter *from)
|
||||||
if ((iocb->ki_flags & (IOCB_NOWAIT | IOCB_DIRECT)) == IOCB_NOWAIT)
|
if ((iocb->ki_flags & (IOCB_NOWAIT | IOCB_DIRECT)) == IOCB_NOWAIT)
|
||||||
return -EOPNOTSUPP;
|
return -EOPNOTSUPP;
|
||||||
|
|
||||||
iov_iter_truncate(from, size - iocb->ki_pos);
|
size -= iocb->ki_pos;
|
||||||
|
if (iov_iter_count(from) > size) {
|
||||||
|
shorted = iov_iter_count(from) - size;
|
||||||
|
iov_iter_truncate(from, size);
|
||||||
|
}
|
||||||
|
|
||||||
blk_start_plug(&plug);
|
blk_start_plug(&plug);
|
||||||
ret = __generic_file_write_iter(iocb, from);
|
ret = __generic_file_write_iter(iocb, from);
|
||||||
if (ret > 0)
|
if (ret > 0)
|
||||||
ret = generic_write_sync(iocb, ret);
|
ret = generic_write_sync(iocb, ret);
|
||||||
|
iov_iter_reexpand(from, iov_iter_count(from) + shorted);
|
||||||
blk_finish_plug(&plug);
|
blk_finish_plug(&plug);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
@ -1930,13 +1936,21 @@ ssize_t blkdev_read_iter(struct kiocb *iocb, struct iov_iter *to)
|
||||||
struct inode *bd_inode = bdev_file_inode(file);
|
struct inode *bd_inode = bdev_file_inode(file);
|
||||||
loff_t size = i_size_read(bd_inode);
|
loff_t size = i_size_read(bd_inode);
|
||||||
loff_t pos = iocb->ki_pos;
|
loff_t pos = iocb->ki_pos;
|
||||||
|
size_t shorted = 0;
|
||||||
|
ssize_t ret;
|
||||||
|
|
||||||
if (pos >= size)
|
if (pos >= size)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
size -= pos;
|
size -= pos;
|
||||||
iov_iter_truncate(to, size);
|
if (iov_iter_count(to) > size) {
|
||||||
return generic_file_read_iter(iocb, to);
|
shorted = iov_iter_count(to) - size;
|
||||||
|
iov_iter_truncate(to, size);
|
||||||
|
}
|
||||||
|
|
||||||
|
ret = generic_file_read_iter(iocb, to);
|
||||||
|
iov_iter_reexpand(to, iov_iter_count(to) + shorted);
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(blkdev_read_iter);
|
EXPORT_SYMBOL_GPL(blkdev_read_iter);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1866,6 +1866,7 @@ static int try_nonblocking_invalidate(struct inode *inode)
|
||||||
u32 invalidating_gen = ci->i_rdcache_gen;
|
u32 invalidating_gen = ci->i_rdcache_gen;
|
||||||
|
|
||||||
spin_unlock(&ci->i_ceph_lock);
|
spin_unlock(&ci->i_ceph_lock);
|
||||||
|
ceph_fscache_invalidate(inode);
|
||||||
invalidate_mapping_pages(&inode->i_data, 0, -1);
|
invalidate_mapping_pages(&inode->i_data, 0, -1);
|
||||||
spin_lock(&ci->i_ceph_lock);
|
spin_lock(&ci->i_ceph_lock);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -129,6 +129,10 @@ static struct inode *__lookup_inode(struct super_block *sb, u64 ino)
|
||||||
|
|
||||||
vino.ino = ino;
|
vino.ino = ino;
|
||||||
vino.snap = CEPH_NOSNAP;
|
vino.snap = CEPH_NOSNAP;
|
||||||
|
|
||||||
|
if (ceph_vino_is_reserved(vino))
|
||||||
|
return ERR_PTR(-ESTALE);
|
||||||
|
|
||||||
inode = ceph_find_inode(sb, vino);
|
inode = ceph_find_inode(sb, vino);
|
||||||
if (!inode) {
|
if (!inode) {
|
||||||
struct ceph_mds_request *req;
|
struct ceph_mds_request *req;
|
||||||
|
|
@ -214,6 +218,10 @@ static struct dentry *__snapfh_to_dentry(struct super_block *sb,
|
||||||
vino.ino = sfh->ino;
|
vino.ino = sfh->ino;
|
||||||
vino.snap = sfh->snapid;
|
vino.snap = sfh->snapid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ceph_vino_is_reserved(vino))
|
||||||
|
return ERR_PTR(-ESTALE);
|
||||||
|
|
||||||
inode = ceph_find_inode(sb, vino);
|
inode = ceph_find_inode(sb, vino);
|
||||||
if (inode)
|
if (inode)
|
||||||
return d_obtain_alias(inode);
|
return d_obtain_alias(inode);
|
||||||
|
|
|
||||||
|
|
@ -56,6 +56,9 @@ struct inode *ceph_get_inode(struct super_block *sb, struct ceph_vino vino)
|
||||||
{
|
{
|
||||||
struct inode *inode;
|
struct inode *inode;
|
||||||
|
|
||||||
|
if (ceph_vino_is_reserved(vino))
|
||||||
|
return ERR_PTR(-EREMOTEIO);
|
||||||
|
|
||||||
inode = iget5_locked(sb, (unsigned long)vino.ino, ceph_ino_compare,
|
inode = iget5_locked(sb, (unsigned long)vino.ino, ceph_ino_compare,
|
||||||
ceph_set_ino_cb, &vino);
|
ceph_set_ino_cb, &vino);
|
||||||
if (!inode)
|
if (!inode)
|
||||||
|
|
@ -87,14 +90,15 @@ struct inode *ceph_get_snapdir(struct inode *parent)
|
||||||
inode->i_mtime = parent->i_mtime;
|
inode->i_mtime = parent->i_mtime;
|
||||||
inode->i_ctime = parent->i_ctime;
|
inode->i_ctime = parent->i_ctime;
|
||||||
inode->i_atime = parent->i_atime;
|
inode->i_atime = parent->i_atime;
|
||||||
inode->i_op = &ceph_snapdir_iops;
|
|
||||||
inode->i_fop = &ceph_snapdir_fops;
|
|
||||||
ci->i_snap_caps = CEPH_CAP_PIN; /* so we can open */
|
|
||||||
ci->i_rbytes = 0;
|
ci->i_rbytes = 0;
|
||||||
ci->i_btime = ceph_inode(parent)->i_btime;
|
ci->i_btime = ceph_inode(parent)->i_btime;
|
||||||
|
|
||||||
if (inode->i_state & I_NEW)
|
if (inode->i_state & I_NEW) {
|
||||||
|
inode->i_op = &ceph_snapdir_iops;
|
||||||
|
inode->i_fop = &ceph_snapdir_fops;
|
||||||
|
ci->i_snap_caps = CEPH_CAP_PIN; /* so we can open */
|
||||||
unlock_new_inode(inode);
|
unlock_new_inode(inode);
|
||||||
|
}
|
||||||
|
|
||||||
return inode;
|
return inode;
|
||||||
}
|
}
|
||||||
|
|
@ -1912,6 +1916,7 @@ static void ceph_do_invalidate_pages(struct inode *inode)
|
||||||
orig_gen = ci->i_rdcache_gen;
|
orig_gen = ci->i_rdcache_gen;
|
||||||
spin_unlock(&ci->i_ceph_lock);
|
spin_unlock(&ci->i_ceph_lock);
|
||||||
|
|
||||||
|
ceph_fscache_invalidate(inode);
|
||||||
if (invalidate_inode_pages2(inode->i_mapping) < 0) {
|
if (invalidate_inode_pages2(inode->i_mapping) < 0) {
|
||||||
pr_err("invalidate_pages %p fails\n", inode);
|
pr_err("invalidate_pages %p fails\n", inode);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -433,6 +433,13 @@ static int ceph_parse_deleg_inos(void **p, void *end,
|
||||||
|
|
||||||
ceph_decode_64_safe(p, end, start, bad);
|
ceph_decode_64_safe(p, end, start, bad);
|
||||||
ceph_decode_64_safe(p, end, len, bad);
|
ceph_decode_64_safe(p, end, len, bad);
|
||||||
|
|
||||||
|
/* Don't accept a delegation of system inodes */
|
||||||
|
if (start < CEPH_INO_SYSTEM_BASE) {
|
||||||
|
pr_warn_ratelimited("ceph: ignoring reserved inode range delegation (start=0x%llx len=0x%llx)\n",
|
||||||
|
start, len);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
while (len--) {
|
while (len--) {
|
||||||
int err = xa_insert(&s->s_delegated_inos, ino = start++,
|
int err = xa_insert(&s->s_delegated_inos, ino = start++,
|
||||||
DELEGATED_INO_AVAILABLE,
|
DELEGATED_INO_AVAILABLE,
|
||||||
|
|
|
||||||
|
|
@ -529,10 +529,34 @@ static inline int ceph_ino_compare(struct inode *inode, void *data)
|
||||||
ci->i_vino.snap == pvino->snap;
|
ci->i_vino.snap == pvino->snap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The MDS reserves a set of inodes for its own usage. These should never
|
||||||
|
* be accessible by clients, and so the MDS has no reason to ever hand these
|
||||||
|
* out. The range is CEPH_MDS_INO_MDSDIR_OFFSET..CEPH_INO_SYSTEM_BASE.
|
||||||
|
*
|
||||||
|
* These come from src/mds/mdstypes.h in the ceph sources.
|
||||||
|
*/
|
||||||
|
#define CEPH_MAX_MDS 0x100
|
||||||
|
#define CEPH_NUM_STRAY 10
|
||||||
|
#define CEPH_MDS_INO_MDSDIR_OFFSET (1 * CEPH_MAX_MDS)
|
||||||
|
#define CEPH_INO_SYSTEM_BASE ((6*CEPH_MAX_MDS) + (CEPH_MAX_MDS * CEPH_NUM_STRAY))
|
||||||
|
|
||||||
|
static inline bool ceph_vino_is_reserved(const struct ceph_vino vino)
|
||||||
|
{
|
||||||
|
if (vino.ino < CEPH_INO_SYSTEM_BASE &&
|
||||||
|
vino.ino >= CEPH_MDS_INO_MDSDIR_OFFSET) {
|
||||||
|
WARN_RATELIMIT(1, "Attempt to access reserved inode number 0x%llx", vino.ino);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
static inline struct inode *ceph_find_inode(struct super_block *sb,
|
static inline struct inode *ceph_find_inode(struct super_block *sb,
|
||||||
struct ceph_vino vino)
|
struct ceph_vino vino)
|
||||||
{
|
{
|
||||||
|
if (ceph_vino_is_reserved(vino))
|
||||||
|
return NULL;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* NB: The hashval will be run through the fs/inode.c hash function
|
* NB: The hashval will be run through the fs/inode.c hash function
|
||||||
* anyway, so there is no need to squash the inode number down to
|
* anyway, so there is no need to squash the inode number down to
|
||||||
|
|
|
||||||
|
|
@ -207,7 +207,8 @@ static void nfs_set_cache_invalid(struct inode *inode, unsigned long flags)
|
||||||
| NFS_INO_INVALID_SIZE
|
| NFS_INO_INVALID_SIZE
|
||||||
| NFS_INO_REVAL_PAGECACHE
|
| NFS_INO_REVAL_PAGECACHE
|
||||||
| NFS_INO_INVALID_XATTR);
|
| NFS_INO_INVALID_XATTR);
|
||||||
}
|
} else if (flags & NFS_INO_REVAL_PAGECACHE)
|
||||||
|
flags |= NFS_INO_INVALID_CHANGE | NFS_INO_INVALID_SIZE;
|
||||||
|
|
||||||
if (inode->i_mapping->nrpages == 0)
|
if (inode->i_mapping->nrpages == 0)
|
||||||
flags &= ~(NFS_INO_INVALID_DATA|NFS_INO_DATA_INVAL_DEFER);
|
flags &= ~(NFS_INO_INVALID_DATA|NFS_INO_DATA_INVAL_DEFER);
|
||||||
|
|
|
||||||
|
|
@ -65,14 +65,18 @@ static inline int virtio_net_hdr_to_skb(struct sk_buff *skb,
|
||||||
skb_reset_mac_header(skb);
|
skb_reset_mac_header(skb);
|
||||||
|
|
||||||
if (hdr->flags & VIRTIO_NET_HDR_F_NEEDS_CSUM) {
|
if (hdr->flags & VIRTIO_NET_HDR_F_NEEDS_CSUM) {
|
||||||
u16 start = __virtio16_to_cpu(little_endian, hdr->csum_start);
|
u32 start = __virtio16_to_cpu(little_endian, hdr->csum_start);
|
||||||
u16 off = __virtio16_to_cpu(little_endian, hdr->csum_offset);
|
u32 off = __virtio16_to_cpu(little_endian, hdr->csum_offset);
|
||||||
|
u32 needed = start + max_t(u32, thlen, off + sizeof(__sum16));
|
||||||
|
|
||||||
|
if (!pskb_may_pull(skb, needed))
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
if (!skb_partial_csum_set(skb, start, off))
|
if (!skb_partial_csum_set(skb, start, off))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
p_off = skb_transport_offset(skb) + thlen;
|
p_off = skb_transport_offset(skb) + thlen;
|
||||||
if (p_off > skb_headlen(skb))
|
if (!pskb_may_pull(skb, p_off))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
} else {
|
} else {
|
||||||
/* gso packets without NEEDS_CSUM do not set transport_offset.
|
/* gso packets without NEEDS_CSUM do not set transport_offset.
|
||||||
|
|
@ -102,14 +106,14 @@ static inline int virtio_net_hdr_to_skb(struct sk_buff *skb,
|
||||||
}
|
}
|
||||||
|
|
||||||
p_off = keys.control.thoff + thlen;
|
p_off = keys.control.thoff + thlen;
|
||||||
if (p_off > skb_headlen(skb) ||
|
if (!pskb_may_pull(skb, p_off) ||
|
||||||
keys.basic.ip_proto != ip_proto)
|
keys.basic.ip_proto != ip_proto)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
skb_set_transport_header(skb, keys.control.thoff);
|
skb_set_transport_header(skb, keys.control.thoff);
|
||||||
} else if (gso_type) {
|
} else if (gso_type) {
|
||||||
p_off = thlen;
|
p_off = thlen;
|
||||||
if (p_off > skb_headlen(skb))
|
if (!pskb_may_pull(skb, p_off))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,7 @@ static void *stack_slabs[STACK_ALLOC_MAX_SLABS];
|
||||||
static int depot_index;
|
static int depot_index;
|
||||||
static int next_slab_inited;
|
static int next_slab_inited;
|
||||||
static size_t depot_offset;
|
static size_t depot_offset;
|
||||||
static DEFINE_SPINLOCK(depot_lock);
|
static DEFINE_RAW_SPINLOCK(depot_lock);
|
||||||
|
|
||||||
static bool init_stack_slab(void **prealloc)
|
static bool init_stack_slab(void **prealloc)
|
||||||
{
|
{
|
||||||
|
|
@ -305,7 +305,7 @@ depot_stack_handle_t stack_depot_save(unsigned long *entries,
|
||||||
prealloc = page_address(page);
|
prealloc = page_address(page);
|
||||||
}
|
}
|
||||||
|
|
||||||
spin_lock_irqsave(&depot_lock, flags);
|
raw_spin_lock_irqsave(&depot_lock, flags);
|
||||||
|
|
||||||
found = find_stack(*bucket, entries, nr_entries, hash);
|
found = find_stack(*bucket, entries, nr_entries, hash);
|
||||||
if (!found) {
|
if (!found) {
|
||||||
|
|
@ -329,7 +329,7 @@ depot_stack_handle_t stack_depot_save(unsigned long *entries,
|
||||||
WARN_ON(!init_stack_slab(&prealloc));
|
WARN_ON(!init_stack_slab(&prealloc));
|
||||||
}
|
}
|
||||||
|
|
||||||
spin_unlock_irqrestore(&depot_lock, flags);
|
raw_spin_unlock_irqrestore(&depot_lock, flags);
|
||||||
exit:
|
exit:
|
||||||
if (prealloc) {
|
if (prealloc) {
|
||||||
/* Nobody used this memory, ok to free it. */
|
/* Nobody used this memory, ok to free it. */
|
||||||
|
|
|
||||||
|
|
@ -99,8 +99,9 @@ static size_t br_get_link_af_size_filtered(const struct net_device *dev,
|
||||||
|
|
||||||
rcu_read_lock();
|
rcu_read_lock();
|
||||||
if (netif_is_bridge_port(dev)) {
|
if (netif_is_bridge_port(dev)) {
|
||||||
p = br_port_get_rcu(dev);
|
p = br_port_get_check_rcu(dev);
|
||||||
vg = nbp_vlan_group_rcu(p);
|
if (p)
|
||||||
|
vg = nbp_vlan_group_rcu(p);
|
||||||
} else if (dev->priv_flags & IFF_EBRIDGE) {
|
} else if (dev->priv_flags & IFF_EBRIDGE) {
|
||||||
br = netdev_priv(dev);
|
br = netdev_priv(dev);
|
||||||
vg = br_vlan_group_rcu(br);
|
vg = br_vlan_group_rcu(br);
|
||||||
|
|
|
||||||
|
|
@ -493,6 +493,10 @@ static int fill_frame_info(struct hsr_frame_info *frame,
|
||||||
struct ethhdr *ethhdr;
|
struct ethhdr *ethhdr;
|
||||||
__be16 proto;
|
__be16 proto;
|
||||||
|
|
||||||
|
/* Check if skb contains hsr_ethhdr */
|
||||||
|
if (skb->mac_len < sizeof(struct hsr_ethhdr))
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
memset(frame, 0, sizeof(*frame));
|
memset(frame, 0, sizeof(*frame));
|
||||||
frame->is_supervision = is_supervision_frame(port->hsr, skb);
|
frame->is_supervision = is_supervision_frame(port->hsr, skb);
|
||||||
frame->node_src = hsr_get_node(port, &hsr->node_db, skb,
|
frame->node_src = hsr_get_node(port, &hsr->node_db, skb,
|
||||||
|
|
|
||||||
|
|
@ -387,7 +387,6 @@ static struct ip6_tnl *ip6gre_tunnel_locate(struct net *net,
|
||||||
if (!(nt->parms.o_flags & TUNNEL_SEQ))
|
if (!(nt->parms.o_flags & TUNNEL_SEQ))
|
||||||
dev->features |= NETIF_F_LLTX;
|
dev->features |= NETIF_F_LLTX;
|
||||||
|
|
||||||
dev_hold(dev);
|
|
||||||
ip6gre_tunnel_link(ign, nt);
|
ip6gre_tunnel_link(ign, nt);
|
||||||
return nt;
|
return nt;
|
||||||
|
|
||||||
|
|
@ -1496,6 +1495,7 @@ static int ip6gre_tunnel_init_common(struct net_device *dev)
|
||||||
}
|
}
|
||||||
ip6gre_tnl_init_features(dev);
|
ip6gre_tnl_init_features(dev);
|
||||||
|
|
||||||
|
dev_hold(dev);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
cleanup_dst_cache_init:
|
cleanup_dst_cache_init:
|
||||||
|
|
@ -1538,8 +1538,6 @@ static void ip6gre_fb_tunnel_init(struct net_device *dev)
|
||||||
strcpy(tunnel->parms.name, dev->name);
|
strcpy(tunnel->parms.name, dev->name);
|
||||||
|
|
||||||
tunnel->hlen = sizeof(struct ipv6hdr) + 4;
|
tunnel->hlen = sizeof(struct ipv6hdr) + 4;
|
||||||
|
|
||||||
dev_hold(dev);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct inet6_protocol ip6gre_protocol __read_mostly = {
|
static struct inet6_protocol ip6gre_protocol __read_mostly = {
|
||||||
|
|
@ -1889,6 +1887,7 @@ static int ip6erspan_tap_init(struct net_device *dev)
|
||||||
dev->priv_flags |= IFF_LIVE_ADDR_CHANGE;
|
dev->priv_flags |= IFF_LIVE_ADDR_CHANGE;
|
||||||
ip6erspan_tnl_link_config(tunnel, 1);
|
ip6erspan_tnl_link_config(tunnel, 1);
|
||||||
|
|
||||||
|
dev_hold(dev);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
cleanup_dst_cache_init:
|
cleanup_dst_cache_init:
|
||||||
|
|
@ -1988,8 +1987,6 @@ static int ip6gre_newlink_common(struct net *src_net, struct net_device *dev,
|
||||||
if (tb[IFLA_MTU])
|
if (tb[IFLA_MTU])
|
||||||
ip6_tnl_change_mtu(dev, nla_get_u32(tb[IFLA_MTU]));
|
ip6_tnl_change_mtu(dev, nla_get_u32(tb[IFLA_MTU]));
|
||||||
|
|
||||||
dev_hold(dev);
|
|
||||||
|
|
||||||
out:
|
out:
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -293,7 +293,6 @@ static int ip6_tnl_create2(struct net_device *dev)
|
||||||
|
|
||||||
strcpy(t->parms.name, dev->name);
|
strcpy(t->parms.name, dev->name);
|
||||||
|
|
||||||
dev_hold(dev);
|
|
||||||
ip6_tnl_link(ip6n, t);
|
ip6_tnl_link(ip6n, t);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|
@ -1913,6 +1912,7 @@ ip6_tnl_dev_init_gen(struct net_device *dev)
|
||||||
dev->min_mtu = ETH_MIN_MTU;
|
dev->min_mtu = ETH_MIN_MTU;
|
||||||
dev->max_mtu = IP6_MAX_MTU - dev->hard_header_len;
|
dev->max_mtu = IP6_MAX_MTU - dev->hard_header_len;
|
||||||
|
|
||||||
|
dev_hold(dev);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
destroy_dst:
|
destroy_dst:
|
||||||
|
|
@ -1956,7 +1956,6 @@ static int __net_init ip6_fb_tnl_dev_init(struct net_device *dev)
|
||||||
struct ip6_tnl_net *ip6n = net_generic(net, ip6_tnl_net_id);
|
struct ip6_tnl_net *ip6n = net_generic(net, ip6_tnl_net_id);
|
||||||
|
|
||||||
t->parms.proto = IPPROTO_IPV6;
|
t->parms.proto = IPPROTO_IPV6;
|
||||||
dev_hold(dev);
|
|
||||||
|
|
||||||
rcu_assign_pointer(ip6n->tnls_wc[0], t);
|
rcu_assign_pointer(ip6n->tnls_wc[0], t);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
|
|
@ -962,7 +962,6 @@ static int __net_init vti6_fb_tnl_dev_init(struct net_device *dev)
|
||||||
struct vti6_net *ip6n = net_generic(net, vti6_net_id);
|
struct vti6_net *ip6n = net_generic(net, vti6_net_id);
|
||||||
|
|
||||||
t->parms.proto = IPPROTO_IPV6;
|
t->parms.proto = IPPROTO_IPV6;
|
||||||
dev_hold(dev);
|
|
||||||
|
|
||||||
rcu_assign_pointer(ip6n->tnls_wc[0], t);
|
rcu_assign_pointer(ip6n->tnls_wc[0], t);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
|
|
@ -218,8 +218,6 @@ static int ipip6_tunnel_create(struct net_device *dev)
|
||||||
|
|
||||||
ipip6_tunnel_clone_6rd(dev, sitn);
|
ipip6_tunnel_clone_6rd(dev, sitn);
|
||||||
|
|
||||||
dev_hold(dev);
|
|
||||||
|
|
||||||
ipip6_tunnel_link(sitn, t);
|
ipip6_tunnel_link(sitn, t);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|
@ -1456,7 +1454,7 @@ static int ipip6_tunnel_init(struct net_device *dev)
|
||||||
dev->tstats = NULL;
|
dev->tstats = NULL;
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
dev_hold(dev);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1472,7 +1470,6 @@ static void __net_init ipip6_fb_tunnel_init(struct net_device *dev)
|
||||||
iph->ihl = 5;
|
iph->ihl = 5;
|
||||||
iph->ttl = 64;
|
iph->ttl = 64;
|
||||||
|
|
||||||
dev_hold(dev);
|
|
||||||
rcu_assign_pointer(sitn->tunnels_wc[0], tunnel);
|
rcu_assign_pointer(sitn->tunnels_wc[0], tunnel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/python
|
#!/usr/bin/env python3
|
||||||
#
|
#
|
||||||
# Copyright 2004 Matt Mackall <mpm@selenic.com>
|
# Copyright 2004 Matt Mackall <mpm@selenic.com>
|
||||||
#
|
#
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/bash
|
#!/usr/bin/env bash
|
||||||
# SPDX-License-Identifier: GPL-2.0
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
# Manipulate options in a .config file from the command line
|
# Manipulate options in a .config file from the command line
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/python
|
#!/usr/bin/env python3
|
||||||
# SPDX-License-Identifier: GPL-2.0
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
#
|
#
|
||||||
# diffconfig - a tool to compare .config files.
|
# diffconfig - a tool to compare .config files.
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/perl
|
#!/usr/bin/env perl
|
||||||
# SPDX-License-Identifier: GPL-2.0
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
|
|
|
||||||
|
|
@ -395,7 +395,7 @@ if ($arch eq "x86_64") {
|
||||||
$mcount_regex = "^\\s*([0-9a-fA-F]+):.*\\s_mcount\$";
|
$mcount_regex = "^\\s*([0-9a-fA-F]+):.*\\s_mcount\$";
|
||||||
} elsif ($arch eq "riscv") {
|
} elsif ($arch eq "riscv") {
|
||||||
$function_regex = "^([0-9a-fA-F]+)\\s+<([^.0-9][0-9a-zA-Z_\\.]+)>:";
|
$function_regex = "^([0-9a-fA-F]+)\\s+<([^.0-9][0-9a-zA-Z_\\.]+)>:";
|
||||||
$mcount_regex = "^\\s*([0-9a-fA-F]+):\\sR_RISCV_CALL\\s_mcount\$";
|
$mcount_regex = "^\\s*([0-9a-fA-F]+):\\sR_RISCV_CALL(_PLT)?\\s_?mcount\$";
|
||||||
$type = ".quad";
|
$type = ".quad";
|
||||||
$alignment = 2;
|
$alignment = 2;
|
||||||
} elsif ($arch eq "nds32") {
|
} elsif ($arch eq "nds32") {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/python
|
#!/usr/bin/env python
|
||||||
# SPDX-License-Identifier: GPL-2.0-only
|
# SPDX-License-Identifier: GPL-2.0-only
|
||||||
#
|
#
|
||||||
# show_deltas: Read list of printk messages instrumented with
|
# show_deltas: Read list of printk messages instrumented with
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/perl
|
#!/usr/bin/env perl
|
||||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
use strict;
|
use strict;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/perl
|
#!/usr/bin/env perl
|
||||||
# SPDX-License-Identifier: GPL-2.0
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
#
|
#
|
||||||
# Author: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
|
# Author: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/python
|
#!/usr/bin/env python
|
||||||
# SPDX-License-Identifier: GPL-2.0-only
|
# SPDX-License-Identifier: GPL-2.0-only
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
|
|
@ -1202,11 +1202,17 @@ static const char *get_line_out_pfx(struct hda_codec *codec, int ch,
|
||||||
*index = ch;
|
*index = ch;
|
||||||
return "Headphone";
|
return "Headphone";
|
||||||
case AUTO_PIN_LINE_OUT:
|
case AUTO_PIN_LINE_OUT:
|
||||||
/* This deals with the case where we have two DACs and
|
/* This deals with the case where one HP or one Speaker or
|
||||||
* one LO, one HP and one Speaker */
|
* one HP + one Speaker need to share the DAC with LO
|
||||||
if (!ch && cfg->speaker_outs && cfg->hp_outs) {
|
*/
|
||||||
bool hp_lo_shared = !path_has_mixer(codec, spec->hp_paths[0], ctl_type);
|
if (!ch) {
|
||||||
bool spk_lo_shared = !path_has_mixer(codec, spec->speaker_paths[0], ctl_type);
|
bool hp_lo_shared = false, spk_lo_shared = false;
|
||||||
|
|
||||||
|
if (cfg->speaker_outs)
|
||||||
|
spk_lo_shared = !path_has_mixer(codec,
|
||||||
|
spec->speaker_paths[0], ctl_type);
|
||||||
|
if (cfg->hp_outs)
|
||||||
|
hp_lo_shared = !path_has_mixer(codec, spec->hp_paths[0], ctl_type);
|
||||||
if (hp_lo_shared && spk_lo_shared)
|
if (hp_lo_shared && spk_lo_shared)
|
||||||
return spec->vmaster_mute.hook ? "PCM" : "Master";
|
return spec->vmaster_mute.hook ? "PCM" : "Master";
|
||||||
if (hp_lo_shared)
|
if (hp_lo_shared)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#! /usr/bin/python
|
#! /usr/bin/env python
|
||||||
# SPDX-License-Identifier: GPL-2.0
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
# -*- python -*-
|
# -*- python -*-
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#! /usr/bin/python
|
#! /usr/bin/env python
|
||||||
# SPDX-License-Identifier: GPL-2.0-only
|
# SPDX-License-Identifier: GPL-2.0-only
|
||||||
# -*- python -*-
|
# -*- python -*-
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/python
|
#!/usr/bin/env python
|
||||||
# SPDX-License-Identifier: GPL-2.0-only
|
# SPDX-License-Identifier: GPL-2.0-only
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
#
|
#
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/perl
|
#!/usr/bin/env perl
|
||||||
# SPDX-License-Identifier: GPL-2.0
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
|
|
||||||
open (IN,"ktest.pl");
|
open (IN,"ktest.pl");
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/python3
|
#!/usr/bin/env python3
|
||||||
# SPDX-License-Identifier: GPL-2.0
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
#
|
#
|
||||||
# A thin wrapper on top of the KUnit Kernel
|
# A thin wrapper on top of the KUnit Kernel
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/python3
|
#!/usr/bin/env python3
|
||||||
# SPDX-License-Identifier: GPL-2.0
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
#
|
#
|
||||||
# A collection of tests for tools/testing/kunit/kunit.py
|
# A collection of tests for tools/testing/kunit/kunit.py
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
# Copyright (C) 2017 Netronome Systems, Inc.
|
# Copyright (C) 2017 Netronome Systems, Inc.
|
||||||
# Copyright (c) 2019 Mellanox Technologies. All rights reserved
|
# Copyright (c) 2019 Mellanox Technologies. All rights reserved
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/python
|
#!/usr/bin/env python
|
||||||
# SPDX-License-Identifier: GPL-2.0
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
|
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/perl
|
#!/usr/bin/env perl
|
||||||
# SPDX-License-Identifier: GPL-2.0
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
# Prefix all lines with "# ", unbuffered. Command being piped in may need
|
# Prefix all lines with "# ", unbuffered. Command being piped in may need
|
||||||
# to have unbuffering forced with "stdbuf -i0 -o0 -e0 $cmd".
|
# to have unbuffering forced with "stdbuf -i0 -o0 -e0 $cmd".
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/python3
|
#!/usr/bin/env python3
|
||||||
# SPDX-License-Identifier: GPL-2.0
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
|
|
||||||
from subprocess import PIPE, Popen
|
from subprocess import PIPE, Popen
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
"""
|
"""
|
||||||
tdc_batch.py - a script to generate TC batch file
|
tdc_batch.py - a script to generate TC batch file
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/python3
|
#!/usr/bin/env python3
|
||||||
# SPDX-License-Identifier: GPL-2.0
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
"""
|
"""
|
||||||
tdc_multibatch.py - a thin wrapper over tdc_batch.py to generate multiple batch
|
tdc_multibatch.py - a thin wrapper over tdc_batch.py to generate multiple batch
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user