mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 22:21:40 +00:00
Merge branch 'linus' into perf/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
commit
93da8b221d
@ -228,7 +228,7 @@ Learning on the device port should be enabled, as well as learning_sync:
|
||||
bridge link set dev DEV learning on self
|
||||
bridge link set dev DEV learning_sync on self
|
||||
|
||||
Learning_sync attribute enables syncing of the learned/forgotton FDB entry to
|
||||
Learning_sync attribute enables syncing of the learned/forgotten FDB entry to
|
||||
the bridge's FDB. It's possible, but not optimal, to enable learning on the
|
||||
device port and on the bridge port, and disable learning_sync.
|
||||
|
||||
@ -245,7 +245,7 @@ the responsibility of the port driver/device to age out these entries. If the
|
||||
port device supports ageing, when the FDB entry expires, it will notify the
|
||||
driver which in turn will notify the bridge with SWITCHDEV_FDB_DEL. If the
|
||||
device does not support ageing, the driver can simulate ageing using a
|
||||
garbage collection timer to monitor FBD entries. Expired entries will be
|
||||
garbage collection timer to monitor FDB entries. Expired entries will be
|
||||
notified to the bridge using SWITCHDEV_FDB_DEL. See rocker driver for
|
||||
example of driver running ageing timer.
|
||||
|
||||
|
@ -58,20 +58,23 @@ Symbols/Function Pointers
|
||||
%ps versatile_init
|
||||
%pB prev_fn_of_versatile_init+0x88/0x88
|
||||
|
||||
For printing symbols and function pointers. The ``S`` and ``s`` specifiers
|
||||
result in the symbol name with (``S``) or without (``s``) offsets. Where
|
||||
this is used on a kernel without KALLSYMS - the symbol address is
|
||||
printed instead.
|
||||
The ``F`` and ``f`` specifiers are for printing function pointers,
|
||||
for example, f->func, &gettimeofday. They have the same result as
|
||||
``S`` and ``s`` specifiers. But they do an extra conversion on
|
||||
ia64, ppc64 and parisc64 architectures where the function pointers
|
||||
are actually function descriptors.
|
||||
|
||||
The ``S`` and ``s`` specifiers can be used for printing symbols
|
||||
from direct addresses, for example, __builtin_return_address(0),
|
||||
(void *)regs->ip. They result in the symbol name with (``S``) or
|
||||
without (``s``) offsets. If KALLSYMS are disabled then the symbol
|
||||
address is printed instead.
|
||||
|
||||
The ``B`` specifier results in the symbol name with offsets and should be
|
||||
used when printing stack backtraces. The specifier takes into
|
||||
consideration the effect of compiler optimisations which may occur
|
||||
when tail-call``s are used and marked with the noreturn GCC attribute.
|
||||
|
||||
On ia64, ppc64 and parisc64 architectures function pointers are
|
||||
actually function descriptors which must first be resolved. The ``F`` and
|
||||
``f`` specifiers perform this resolution and then provide the same
|
||||
functionality as the ``S`` and ``s`` specifiers.
|
||||
|
||||
Kernel Pointers
|
||||
===============
|
||||
|
@ -35,9 +35,34 @@ Table : Subdirectories in /proc/sys/net
|
||||
bpf_jit_enable
|
||||
--------------
|
||||
|
||||
This enables Berkeley Packet Filter Just in Time compiler.
|
||||
Currently supported on x86_64 architecture, bpf_jit provides a framework
|
||||
to speed packet filtering, the one used by tcpdump/libpcap for example.
|
||||
This enables the BPF Just in Time (JIT) compiler. BPF is a flexible
|
||||
and efficient infrastructure allowing to execute bytecode at various
|
||||
hook points. It is used in a number of Linux kernel subsystems such
|
||||
as networking (e.g. XDP, tc), tracing (e.g. kprobes, uprobes, tracepoints)
|
||||
and security (e.g. seccomp). LLVM has a BPF back end that can compile
|
||||
restricted C into a sequence of BPF instructions. After program load
|
||||
through bpf(2) and passing a verifier in the kernel, a JIT will then
|
||||
translate these BPF proglets into native CPU instructions. There are
|
||||
two flavors of JITs, the newer eBPF JIT currently supported on:
|
||||
- x86_64
|
||||
- arm64
|
||||
- ppc64
|
||||
- sparc64
|
||||
- mips64
|
||||
- s390x
|
||||
|
||||
And the older cBPF JIT supported on the following archs:
|
||||
- arm
|
||||
- mips
|
||||
- ppc
|
||||
- sparc
|
||||
|
||||
eBPF JITs are a superset of cBPF JITs, meaning the kernel will
|
||||
migrate cBPF instructions into eBPF instructions and then JIT
|
||||
compile them transparently. Older cBPF JITs can only translate
|
||||
tcpdump filters, seccomp rules, etc, but not mentioned eBPF
|
||||
programs loaded through bpf(2).
|
||||
|
||||
Values :
|
||||
0 - disable the JIT (default value)
|
||||
1 - enable the JIT
|
||||
@ -46,9 +71,9 @@ Values :
|
||||
bpf_jit_harden
|
||||
--------------
|
||||
|
||||
This enables hardening for the Berkeley Packet Filter Just in Time compiler.
|
||||
Supported are eBPF JIT backends. Enabling hardening trades off performance,
|
||||
but can mitigate JIT spraying.
|
||||
This enables hardening for the BPF JIT compiler. Supported are eBPF
|
||||
JIT backends. Enabling hardening trades off performance, but can
|
||||
mitigate JIT spraying.
|
||||
Values :
|
||||
0 - disable JIT hardening (default value)
|
||||
1 - enable JIT hardening for unprivileged users only
|
||||
@ -57,11 +82,11 @@ Values :
|
||||
bpf_jit_kallsyms
|
||||
----------------
|
||||
|
||||
When Berkeley Packet Filter Just in Time compiler is enabled, then compiled
|
||||
images are unknown addresses to the kernel, meaning they neither show up in
|
||||
traces nor in /proc/kallsyms. This enables export of these addresses, which
|
||||
can be used for debugging/tracing. If bpf_jit_harden is enabled, this feature
|
||||
is disabled.
|
||||
When BPF JIT compiler is enabled, then compiled images are unknown
|
||||
addresses to the kernel, meaning they neither show up in traces nor
|
||||
in /proc/kallsyms. This enables export of these addresses, which can
|
||||
be used for debugging/tracing. If bpf_jit_harden is enabled, this
|
||||
feature is disabled.
|
||||
Values :
|
||||
0 - disable JIT kallsyms export (default value)
|
||||
1 - enable JIT kallsyms export for privileged users only
|
||||
|
@ -7110,7 +7110,6 @@ M: Marc Zyngier <marc.zyngier@arm.com>
|
||||
L: linux-kernel@vger.kernel.org
|
||||
S: Maintained
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git irq/core
|
||||
T: git git://git.infradead.org/users/jcooper/linux.git irqchip/core
|
||||
F: Documentation/devicetree/bindings/interrupt-controller/
|
||||
F: drivers/irqchip/
|
||||
|
||||
|
2
Makefile
2
Makefile
@ -1,7 +1,7 @@
|
||||
VERSION = 4
|
||||
PATCHLEVEL = 13
|
||||
SUBLEVEL = 0
|
||||
EXTRAVERSION = -rc5
|
||||
EXTRAVERSION = -rc6
|
||||
NAME = Fearless Coyote
|
||||
|
||||
# *DOCUMENTATION*
|
||||
|
@ -96,7 +96,6 @@ menu "ARC Architecture Configuration"
|
||||
|
||||
menu "ARC Platform/SoC/Board"
|
||||
|
||||
source "arch/arc/plat-sim/Kconfig"
|
||||
source "arch/arc/plat-tb10x/Kconfig"
|
||||
source "arch/arc/plat-axs10x/Kconfig"
|
||||
#New platform adds here
|
||||
|
@ -107,7 +107,7 @@ core-y += arch/arc/
|
||||
# w/o this dtb won't embed into kernel binary
|
||||
core-y += arch/arc/boot/dts/
|
||||
|
||||
core-$(CONFIG_ARC_PLAT_SIM) += arch/arc/plat-sim/
|
||||
core-y += arch/arc/plat-sim/
|
||||
core-$(CONFIG_ARC_PLAT_TB10X) += arch/arc/plat-tb10x/
|
||||
core-$(CONFIG_ARC_PLAT_AXS10X) += arch/arc/plat-axs10x/
|
||||
core-$(CONFIG_ARC_PLAT_EZNPS) += arch/arc/plat-eznps/
|
||||
|
@ -15,15 +15,15 @@
|
||||
|
||||
/ {
|
||||
compatible = "snps,arc";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
#address-cells = <2>;
|
||||
#size-cells = <2>;
|
||||
|
||||
cpu_card {
|
||||
compatible = "simple-bus";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
ranges = <0x00000000 0xf0000000 0x10000000>;
|
||||
ranges = <0x00000000 0x0 0xf0000000 0x10000000>;
|
||||
|
||||
core_clk: core_clk {
|
||||
#clock-cells = <0>;
|
||||
@ -91,23 +91,21 @@
|
||||
mb_intc: dw-apb-ictl@0xe0012000 {
|
||||
#interrupt-cells = <1>;
|
||||
compatible = "snps,dw-apb-ictl";
|
||||
reg = < 0xe0012000 0x200 >;
|
||||
reg = < 0x0 0xe0012000 0x0 0x200 >;
|
||||
interrupt-controller;
|
||||
interrupt-parent = <&core_intc>;
|
||||
interrupts = < 7 >;
|
||||
};
|
||||
|
||||
memory {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
ranges = <0x00000000 0x80000000 0x20000000>;
|
||||
device_type = "memory";
|
||||
reg = <0x80000000 0x1b000000>; /* (512 - 32) MiB */
|
||||
/* CONFIG_KERNEL_RAM_BASE_ADDRESS needs to match low mem start */
|
||||
reg = <0x0 0x80000000 0x0 0x1b000000>; /* (512 - 32) MiB */
|
||||
};
|
||||
|
||||
reserved-memory {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
#address-cells = <2>;
|
||||
#size-cells = <2>;
|
||||
ranges;
|
||||
/*
|
||||
* We just move frame buffer area to the very end of
|
||||
@ -118,7 +116,7 @@
|
||||
*/
|
||||
frame_buffer: frame_buffer@9e000000 {
|
||||
compatible = "shared-dma-pool";
|
||||
reg = <0x9e000000 0x2000000>;
|
||||
reg = <0x0 0x9e000000 0x0 0x2000000>;
|
||||
no-map;
|
||||
};
|
||||
};
|
||||
|
@ -14,15 +14,15 @@
|
||||
|
||||
/ {
|
||||
compatible = "snps,arc";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
#address-cells = <2>;
|
||||
#size-cells = <2>;
|
||||
|
||||
cpu_card {
|
||||
compatible = "simple-bus";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
ranges = <0x00000000 0xf0000000 0x10000000>;
|
||||
ranges = <0x00000000 0x0 0xf0000000 0x10000000>;
|
||||
|
||||
core_clk: core_clk {
|
||||
#clock-cells = <0>;
|
||||
@ -94,30 +94,29 @@
|
||||
mb_intc: dw-apb-ictl@0xe0012000 {
|
||||
#interrupt-cells = <1>;
|
||||
compatible = "snps,dw-apb-ictl";
|
||||
reg = < 0xe0012000 0x200 >;
|
||||
reg = < 0x0 0xe0012000 0x0 0x200 >;
|
||||
interrupt-controller;
|
||||
interrupt-parent = <&core_intc>;
|
||||
interrupts = < 24 >;
|
||||
};
|
||||
|
||||
memory {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
ranges = <0x00000000 0x80000000 0x40000000>;
|
||||
device_type = "memory";
|
||||
reg = <0x80000000 0x20000000>; /* 512MiB */
|
||||
/* CONFIG_KERNEL_RAM_BASE_ADDRESS needs to match low mem start */
|
||||
reg = <0x0 0x80000000 0x0 0x20000000 /* 512 MiB low mem */
|
||||
0x1 0xc0000000 0x0 0x40000000>; /* 1 GiB highmem */
|
||||
};
|
||||
|
||||
reserved-memory {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
#address-cells = <2>;
|
||||
#size-cells = <2>;
|
||||
ranges;
|
||||
/*
|
||||
* Move frame buffer out of IOC aperture (0x8z-0xAz).
|
||||
*/
|
||||
frame_buffer: frame_buffer@be000000 {
|
||||
compatible = "shared-dma-pool";
|
||||
reg = <0xbe000000 0x2000000>;
|
||||
reg = <0x0 0xbe000000 0x0 0x2000000>;
|
||||
no-map;
|
||||
};
|
||||
};
|
||||
|
@ -14,15 +14,15 @@
|
||||
|
||||
/ {
|
||||
compatible = "snps,arc";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
#address-cells = <2>;
|
||||
#size-cells = <2>;
|
||||
|
||||
cpu_card {
|
||||
compatible = "simple-bus";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
ranges = <0x00000000 0xf0000000 0x10000000>;
|
||||
ranges = <0x00000000 0x0 0xf0000000 0x10000000>;
|
||||
|
||||
core_clk: core_clk {
|
||||
#clock-cells = <0>;
|
||||
@ -100,30 +100,29 @@
|
||||
mb_intc: dw-apb-ictl@0xe0012000 {
|
||||
#interrupt-cells = <1>;
|
||||
compatible = "snps,dw-apb-ictl";
|
||||
reg = < 0xe0012000 0x200 >;
|
||||
reg = < 0x0 0xe0012000 0x0 0x200 >;
|
||||
interrupt-controller;
|
||||
interrupt-parent = <&idu_intc>;
|
||||
interrupts = <0>;
|
||||
};
|
||||
|
||||
memory {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
ranges = <0x00000000 0x80000000 0x40000000>;
|
||||
device_type = "memory";
|
||||
reg = <0x80000000 0x20000000>; /* 512MiB */
|
||||
/* CONFIG_KERNEL_RAM_BASE_ADDRESS needs to match low mem start */
|
||||
reg = <0x0 0x80000000 0x0 0x20000000 /* 512 MiB low mem */
|
||||
0x1 0xc0000000 0x0 0x40000000>; /* 1 GiB highmem */
|
||||
};
|
||||
|
||||
reserved-memory {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
#address-cells = <2>;
|
||||
#size-cells = <2>;
|
||||
ranges;
|
||||
/*
|
||||
* Move frame buffer out of IOC aperture (0x8z-0xAz).
|
||||
*/
|
||||
frame_buffer: frame_buffer@be000000 {
|
||||
compatible = "shared-dma-pool";
|
||||
reg = <0xbe000000 0x2000000>;
|
||||
reg = <0x0 0xbe000000 0x0 0x2000000>;
|
||||
no-map;
|
||||
};
|
||||
};
|
||||
|
@ -13,7 +13,7 @@
|
||||
compatible = "simple-bus";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
ranges = <0x00000000 0xe0000000 0x10000000>;
|
||||
ranges = <0x00000000 0x0 0xe0000000 0x10000000>;
|
||||
interrupt-parent = <&mb_intc>;
|
||||
|
||||
i2sclk: i2sclk@100a0 {
|
||||
|
@ -21,7 +21,6 @@ CONFIG_MODULES=y
|
||||
# CONFIG_BLK_DEV_BSG is not set
|
||||
# CONFIG_IOSCHED_DEADLINE is not set
|
||||
# CONFIG_IOSCHED_CFQ is not set
|
||||
CONFIG_ARC_PLAT_SIM=y
|
||||
CONFIG_ISA_ARCV2=y
|
||||
CONFIG_ARC_BUILTIN_DTB_NAME="haps_hs"
|
||||
CONFIG_PREEMPT=y
|
||||
|
@ -23,7 +23,6 @@ CONFIG_MODULES=y
|
||||
# CONFIG_BLK_DEV_BSG is not set
|
||||
# CONFIG_IOSCHED_DEADLINE is not set
|
||||
# CONFIG_IOSCHED_CFQ is not set
|
||||
CONFIG_ARC_PLAT_SIM=y
|
||||
CONFIG_ISA_ARCV2=y
|
||||
CONFIG_SMP=y
|
||||
CONFIG_ARC_BUILTIN_DTB_NAME="haps_hs_idu"
|
||||
|
@ -39,7 +39,6 @@ CONFIG_IP_PNP=y
|
||||
# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
|
||||
# CONFIG_INET_XFRM_MODE_TUNNEL is not set
|
||||
# CONFIG_INET_XFRM_MODE_BEET is not set
|
||||
# CONFIG_INET_LRO is not set
|
||||
# CONFIG_INET_DIAG is not set
|
||||
# CONFIG_IPV6 is not set
|
||||
# CONFIG_WIRELESS is not set
|
||||
|
@ -23,7 +23,6 @@ CONFIG_MODULES=y
|
||||
# CONFIG_BLK_DEV_BSG is not set
|
||||
# CONFIG_IOSCHED_DEADLINE is not set
|
||||
# CONFIG_IOSCHED_CFQ is not set
|
||||
CONFIG_ARC_PLAT_SIM=y
|
||||
CONFIG_ARC_BUILTIN_DTB_NAME="nsim_700"
|
||||
CONFIG_PREEMPT=y
|
||||
# CONFIG_COMPACTION is not set
|
||||
|
@ -26,7 +26,6 @@ CONFIG_MODULE_FORCE_UNLOAD=y
|
||||
# CONFIG_BLK_DEV_BSG is not set
|
||||
# CONFIG_IOSCHED_DEADLINE is not set
|
||||
# CONFIG_IOSCHED_CFQ is not set
|
||||
CONFIG_ARC_PLAT_SIM=y
|
||||
CONFIG_ISA_ARCV2=y
|
||||
CONFIG_ARC_BUILTIN_DTB_NAME="nsim_hs"
|
||||
CONFIG_PREEMPT=y
|
||||
|
@ -24,7 +24,6 @@ CONFIG_MODULE_FORCE_UNLOAD=y
|
||||
# CONFIG_BLK_DEV_BSG is not set
|
||||
# CONFIG_IOSCHED_DEADLINE is not set
|
||||
# CONFIG_IOSCHED_CFQ is not set
|
||||
CONFIG_ARC_PLAT_SIM=y
|
||||
CONFIG_ISA_ARCV2=y
|
||||
CONFIG_SMP=y
|
||||
CONFIG_ARC_BUILTIN_DTB_NAME="nsim_hs_idu"
|
||||
|
@ -23,7 +23,6 @@ CONFIG_MODULES=y
|
||||
# CONFIG_BLK_DEV_BSG is not set
|
||||
# CONFIG_IOSCHED_DEADLINE is not set
|
||||
# CONFIG_IOSCHED_CFQ is not set
|
||||
CONFIG_ARC_PLAT_SIM=y
|
||||
CONFIG_ARC_BUILTIN_DTB_NAME="nsimosci"
|
||||
# CONFIG_COMPACTION is not set
|
||||
CONFIG_NET=y
|
||||
|
@ -23,7 +23,6 @@ CONFIG_MODULES=y
|
||||
# CONFIG_BLK_DEV_BSG is not set
|
||||
# CONFIG_IOSCHED_DEADLINE is not set
|
||||
# CONFIG_IOSCHED_CFQ is not set
|
||||
CONFIG_ARC_PLAT_SIM=y
|
||||
CONFIG_ISA_ARCV2=y
|
||||
CONFIG_ARC_BUILTIN_DTB_NAME="nsimosci_hs"
|
||||
# CONFIG_COMPACTION is not set
|
||||
|
@ -18,7 +18,6 @@ CONFIG_MODULES=y
|
||||
# CONFIG_BLK_DEV_BSG is not set
|
||||
# CONFIG_IOSCHED_DEADLINE is not set
|
||||
# CONFIG_IOSCHED_CFQ is not set
|
||||
CONFIG_ARC_PLAT_SIM=y
|
||||
CONFIG_ISA_ARCV2=y
|
||||
CONFIG_SMP=y
|
||||
# CONFIG_ARC_TIMERS_64BIT is not set
|
||||
|
@ -38,7 +38,6 @@ CONFIG_IP_MULTICAST=y
|
||||
# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
|
||||
# CONFIG_INET_XFRM_MODE_TUNNEL is not set
|
||||
# CONFIG_INET_XFRM_MODE_BEET is not set
|
||||
# CONFIG_INET_LRO is not set
|
||||
# CONFIG_INET_DIAG is not set
|
||||
# CONFIG_IPV6 is not set
|
||||
# CONFIG_WIRELESS is not set
|
||||
|
@ -96,7 +96,9 @@ extern unsigned long perip_base, perip_end;
|
||||
#define ARC_REG_SLC_FLUSH 0x904
|
||||
#define ARC_REG_SLC_INVALIDATE 0x905
|
||||
#define ARC_REG_SLC_RGN_START 0x914
|
||||
#define ARC_REG_SLC_RGN_START1 0x915
|
||||
#define ARC_REG_SLC_RGN_END 0x916
|
||||
#define ARC_REG_SLC_RGN_END1 0x917
|
||||
|
||||
/* Bit val in SLC_CONTROL */
|
||||
#define SLC_CTRL_DIS 0x001
|
||||
|
@ -94,6 +94,8 @@ static inline int is_pae40_enabled(void)
|
||||
return IS_ENABLED(CONFIG_ARC_HAS_PAE40);
|
||||
}
|
||||
|
||||
extern int pae40_exist_but_not_enab(void);
|
||||
|
||||
#endif /* !__ASSEMBLY__ */
|
||||
|
||||
#endif
|
||||
|
@ -75,10 +75,13 @@ void arc_init_IRQ(void)
|
||||
* Set a default priority for all available interrupts to prevent
|
||||
* switching of register banks if Fast IRQ and multiple register banks
|
||||
* are supported by CPU.
|
||||
* Also disable all IRQ lines so faulty external hardware won't
|
||||
* trigger interrupt that kernel is not ready to handle.
|
||||
*/
|
||||
for (i = NR_EXCEPTIONS; i < irq_bcr.irqs + NR_EXCEPTIONS; i++) {
|
||||
write_aux_reg(AUX_IRQ_SELECT, i);
|
||||
write_aux_reg(AUX_IRQ_PRIORITY, ARCV2_IRQ_DEF_PRIO);
|
||||
write_aux_reg(AUX_IRQ_ENABLE, 0);
|
||||
}
|
||||
|
||||
/* setup status32, don't enable intr yet as kernel doesn't want */
|
||||
|
@ -27,7 +27,7 @@
|
||||
*/
|
||||
void arc_init_IRQ(void)
|
||||
{
|
||||
int level_mask = 0;
|
||||
int level_mask = 0, i;
|
||||
|
||||
/* Is timer high priority Interrupt (Level2 in ARCompact jargon) */
|
||||
level_mask |= IS_ENABLED(CONFIG_ARC_COMPACT_IRQ_LEVELS) << TIMER0_IRQ;
|
||||
@ -40,6 +40,18 @@ void arc_init_IRQ(void)
|
||||
|
||||
if (level_mask)
|
||||
pr_info("Level-2 interrupts bitset %x\n", level_mask);
|
||||
|
||||
/*
|
||||
* Disable all IRQ lines so faulty external hardware won't
|
||||
* trigger interrupt that kernel is not ready to handle.
|
||||
*/
|
||||
for (i = TIMER0_IRQ; i < NR_CPU_IRQS; i++) {
|
||||
unsigned int ienb;
|
||||
|
||||
ienb = read_aux_reg(AUX_IENABLE);
|
||||
ienb &= ~(1 << i);
|
||||
write_aux_reg(AUX_IENABLE, ienb);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -665,6 +665,7 @@ noinline void slc_op(phys_addr_t paddr, unsigned long sz, const int op)
|
||||
static DEFINE_SPINLOCK(lock);
|
||||
unsigned long flags;
|
||||
unsigned int ctrl;
|
||||
phys_addr_t end;
|
||||
|
||||
spin_lock_irqsave(&lock, flags);
|
||||
|
||||
@ -694,8 +695,19 @@ noinline void slc_op(phys_addr_t paddr, unsigned long sz, const int op)
|
||||
* END needs to be setup before START (latter triggers the operation)
|
||||
* END can't be same as START, so add (l2_line_sz - 1) to sz
|
||||
*/
|
||||
write_aux_reg(ARC_REG_SLC_RGN_END, (paddr + sz + l2_line_sz - 1));
|
||||
write_aux_reg(ARC_REG_SLC_RGN_START, paddr);
|
||||
end = paddr + sz + l2_line_sz - 1;
|
||||
if (is_pae40_enabled())
|
||||
write_aux_reg(ARC_REG_SLC_RGN_END1, upper_32_bits(end));
|
||||
|
||||
write_aux_reg(ARC_REG_SLC_RGN_END, lower_32_bits(end));
|
||||
|
||||
if (is_pae40_enabled())
|
||||
write_aux_reg(ARC_REG_SLC_RGN_START1, upper_32_bits(paddr));
|
||||
|
||||
write_aux_reg(ARC_REG_SLC_RGN_START, lower_32_bits(paddr));
|
||||
|
||||
/* Make sure "busy" bit reports correct stataus, see STAR 9001165532 */
|
||||
read_aux_reg(ARC_REG_SLC_CTRL);
|
||||
|
||||
while (read_aux_reg(ARC_REG_SLC_CTRL) & SLC_CTRL_BUSY);
|
||||
|
||||
@ -1111,6 +1123,13 @@ noinline void __init arc_ioc_setup(void)
|
||||
__dc_enable();
|
||||
}
|
||||
|
||||
/*
|
||||
* Cache related boot time checks/setups only needed on master CPU:
|
||||
* - Geometry checks (kernel build and hardware agree: e.g. L1_CACHE_BYTES)
|
||||
* Assume SMP only, so all cores will have same cache config. A check on
|
||||
* one core suffices for all
|
||||
* - IOC setup / dma callbacks only need to be done once
|
||||
*/
|
||||
void __init arc_cache_init_master(void)
|
||||
{
|
||||
unsigned int __maybe_unused cpu = smp_processor_id();
|
||||
@ -1190,12 +1209,27 @@ void __ref arc_cache_init(void)
|
||||
|
||||
printk(arc_cache_mumbojumbo(0, str, sizeof(str)));
|
||||
|
||||
/*
|
||||
* Only master CPU needs to execute rest of function:
|
||||
* - Assume SMP so all cores will have same cache config so
|
||||
* any geomtry checks will be same for all
|
||||
* - IOC setup / dma callbacks only need to be setup once
|
||||
*/
|
||||
if (!cpu)
|
||||
arc_cache_init_master();
|
||||
|
||||
/*
|
||||
* In PAE regime, TLB and cache maintenance ops take wider addresses
|
||||
* And even if PAE is not enabled in kernel, the upper 32-bits still need
|
||||
* to be zeroed to keep the ops sane.
|
||||
* As an optimization for more common !PAE enabled case, zero them out
|
||||
* once at init, rather than checking/setting to 0 for every runtime op
|
||||
*/
|
||||
if (is_isa_arcv2() && pae40_exist_but_not_enab()) {
|
||||
|
||||
if (IS_ENABLED(CONFIG_ARC_HAS_ICACHE))
|
||||
write_aux_reg(ARC_REG_IC_PTAG_HI, 0);
|
||||
|
||||
if (IS_ENABLED(CONFIG_ARC_HAS_DCACHE))
|
||||
write_aux_reg(ARC_REG_DC_PTAG_HI, 0);
|
||||
|
||||
if (l2_line_sz) {
|
||||
write_aux_reg(ARC_REG_SLC_RGN_END1, 0);
|
||||
write_aux_reg(ARC_REG_SLC_RGN_START1, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -153,6 +153,19 @@ static void _dma_cache_sync(phys_addr_t paddr, size_t size,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* arc_dma_map_page - map a portion of a page for streaming DMA
|
||||
*
|
||||
* Ensure that any data held in the cache is appropriately discarded
|
||||
* or written back.
|
||||
*
|
||||
* The device owns this memory once this call has completed. The CPU
|
||||
* can regain ownership by calling dma_unmap_page().
|
||||
*
|
||||
* Note: while it takes struct page as arg, caller can "abuse" it to pass
|
||||
* a region larger than PAGE_SIZE, provided it is physically contiguous
|
||||
* and this still works correctly
|
||||
*/
|
||||
static dma_addr_t arc_dma_map_page(struct device *dev, struct page *page,
|
||||
unsigned long offset, size_t size, enum dma_data_direction dir,
|
||||
unsigned long attrs)
|
||||
@ -165,6 +178,24 @@ static dma_addr_t arc_dma_map_page(struct device *dev, struct page *page,
|
||||
return plat_phys_to_dma(dev, paddr);
|
||||
}
|
||||
|
||||
/*
|
||||
* arc_dma_unmap_page - unmap a buffer previously mapped through dma_map_page()
|
||||
*
|
||||
* After this call, reads by the CPU to the buffer are guaranteed to see
|
||||
* whatever the device wrote there.
|
||||
*
|
||||
* Note: historically this routine was not implemented for ARC
|
||||
*/
|
||||
static void arc_dma_unmap_page(struct device *dev, dma_addr_t handle,
|
||||
size_t size, enum dma_data_direction dir,
|
||||
unsigned long attrs)
|
||||
{
|
||||
phys_addr_t paddr = plat_dma_to_phys(dev, handle);
|
||||
|
||||
if (!(attrs & DMA_ATTR_SKIP_CPU_SYNC))
|
||||
_dma_cache_sync(paddr, size, dir);
|
||||
}
|
||||
|
||||
static int arc_dma_map_sg(struct device *dev, struct scatterlist *sg,
|
||||
int nents, enum dma_data_direction dir, unsigned long attrs)
|
||||
{
|
||||
@ -178,6 +209,18 @@ static int arc_dma_map_sg(struct device *dev, struct scatterlist *sg,
|
||||
return nents;
|
||||
}
|
||||
|
||||
static void arc_dma_unmap_sg(struct device *dev, struct scatterlist *sg,
|
||||
int nents, enum dma_data_direction dir,
|
||||
unsigned long attrs)
|
||||
{
|
||||
struct scatterlist *s;
|
||||
int i;
|
||||
|
||||
for_each_sg(sg, s, nents, i)
|
||||
arc_dma_unmap_page(dev, sg_dma_address(s), sg_dma_len(s), dir,
|
||||
attrs);
|
||||
}
|
||||
|
||||
static void arc_dma_sync_single_for_cpu(struct device *dev,
|
||||
dma_addr_t dma_handle, size_t size, enum dma_data_direction dir)
|
||||
{
|
||||
@ -223,7 +266,9 @@ const struct dma_map_ops arc_dma_ops = {
|
||||
.free = arc_dma_free,
|
||||
.mmap = arc_dma_mmap,
|
||||
.map_page = arc_dma_map_page,
|
||||
.unmap_page = arc_dma_unmap_page,
|
||||
.map_sg = arc_dma_map_sg,
|
||||
.unmap_sg = arc_dma_unmap_sg,
|
||||
.sync_single_for_device = arc_dma_sync_single_for_device,
|
||||
.sync_single_for_cpu = arc_dma_sync_single_for_cpu,
|
||||
.sync_sg_for_cpu = arc_dma_sync_sg_for_cpu,
|
||||
|
@ -104,6 +104,8 @@
|
||||
/* A copy of the ASID from the PID reg is kept in asid_cache */
|
||||
DEFINE_PER_CPU(unsigned int, asid_cache) = MM_CTXT_FIRST_CYCLE;
|
||||
|
||||
static int __read_mostly pae_exists;
|
||||
|
||||
/*
|
||||
* Utility Routine to erase a J-TLB entry
|
||||
* Caller needs to setup Index Reg (manually or via getIndex)
|
||||
@ -784,7 +786,7 @@ void read_decode_mmu_bcr(void)
|
||||
mmu->u_dtlb = mmu4->u_dtlb * 4;
|
||||
mmu->u_itlb = mmu4->u_itlb * 4;
|
||||
mmu->sasid = mmu4->sasid;
|
||||
mmu->pae = mmu4->pae;
|
||||
pae_exists = mmu->pae = mmu4->pae;
|
||||
}
|
||||
}
|
||||
|
||||
@ -809,6 +811,11 @@ char *arc_mmu_mumbojumbo(int cpu_id, char *buf, int len)
|
||||
return buf;
|
||||
}
|
||||
|
||||
int pae40_exist_but_not_enab(void)
|
||||
{
|
||||
return pae_exists && !is_pae40_enabled();
|
||||
}
|
||||
|
||||
void arc_mmu_init(void)
|
||||
{
|
||||
char str[256];
|
||||
@ -859,6 +866,9 @@ void arc_mmu_init(void)
|
||||
/* swapper_pg_dir is the pgd for the kernel, used by vmalloc */
|
||||
write_aux_reg(ARC_REG_SCRATCH_DATA0, swapper_pg_dir);
|
||||
#endif
|
||||
|
||||
if (pae40_exist_but_not_enab())
|
||||
write_aux_reg(ARC_REG_TLBPD1HI, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1,13 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License version 2 as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
|
||||
menuconfig ARC_PLAT_SIM
|
||||
bool "ARC nSIM based simulation virtual platforms"
|
||||
help
|
||||
Support for nSIM based ARC simulation platforms
|
||||
This includes the standalone nSIM (uart only) vs. System C OSCI VP
|
@ -20,11 +20,14 @@
|
||||
*/
|
||||
|
||||
static const char *simulation_compat[] __initconst = {
|
||||
#ifdef CONFIG_ISA_ARCOMPACT
|
||||
"snps,nsim",
|
||||
"snps,nsim_hs",
|
||||
"snps,nsimosci",
|
||||
#else
|
||||
"snps,nsim_hs",
|
||||
"snps,nsimosci_hs",
|
||||
"snps,zebu_hs",
|
||||
#endif
|
||||
NULL,
|
||||
};
|
||||
|
||||
|
@ -297,6 +297,7 @@
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
status = "disabled";
|
||||
ranges;
|
||||
|
||||
adc: adc@50030800 {
|
||||
compatible = "fsl,imx25-gcq";
|
||||
|
@ -507,7 +507,7 @@
|
||||
pinctrl_pcie: pciegrp {
|
||||
fsl,pins = <
|
||||
/* PCIe reset */
|
||||
MX6QDL_PAD_EIM_BCLK__GPIO6_IO31 0x030b0
|
||||
MX6QDL_PAD_EIM_DA0__GPIO3_IO00 0x030b0
|
||||
MX6QDL_PAD_EIM_DA4__GPIO3_IO04 0x030b0
|
||||
>;
|
||||
};
|
||||
@ -668,7 +668,7 @@
|
||||
&pcie {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_pcie>;
|
||||
reset-gpio = <&gpio6 31 GPIO_ACTIVE_LOW>;
|
||||
reset-gpio = <&gpio3 0 GPIO_ACTIVE_LOW>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
|
@ -557,6 +557,14 @@
|
||||
>;
|
||||
};
|
||||
|
||||
pinctrl_spi4: spi4grp {
|
||||
fsl,pins = <
|
||||
MX7D_PAD_GPIO1_IO09__GPIO1_IO9 0x59
|
||||
MX7D_PAD_GPIO1_IO12__GPIO1_IO12 0x59
|
||||
MX7D_PAD_GPIO1_IO13__GPIO1_IO13 0x59
|
||||
>;
|
||||
};
|
||||
|
||||
pinctrl_tsc2046_pendown: tsc2046_pendown {
|
||||
fsl,pins = <
|
||||
MX7D_PAD_EPDC_BDR1__GPIO2_IO29 0x59
|
||||
@ -697,13 +705,5 @@
|
||||
fsl,pins = <
|
||||
MX7D_PAD_LPSR_GPIO1_IO01__PWM1_OUT 0x110b0
|
||||
>;
|
||||
|
||||
pinctrl_spi4: spi4grp {
|
||||
fsl,pins = <
|
||||
MX7D_PAD_GPIO1_IO09__GPIO1_IO9 0x59
|
||||
MX7D_PAD_GPIO1_IO12__GPIO1_IO12 0x59
|
||||
MX7D_PAD_GPIO1_IO13__GPIO1_IO13 0x59
|
||||
>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -303,7 +303,7 @@
|
||||
#size-cells = <1>;
|
||||
atmel,smc = <&hsmc>;
|
||||
reg = <0x10000000 0x10000000
|
||||
0x40000000 0x30000000>;
|
||||
0x60000000 0x30000000>;
|
||||
ranges = <0x0 0x0 0x10000000 0x10000000
|
||||
0x1 0x0 0x60000000 0x10000000
|
||||
0x2 0x0 0x70000000 0x10000000
|
||||
@ -1048,18 +1048,18 @@
|
||||
};
|
||||
|
||||
hsmc: hsmc@f8014000 {
|
||||
compatible = "atmel,sama5d3-smc", "syscon", "simple-mfd";
|
||||
compatible = "atmel,sama5d2-smc", "syscon", "simple-mfd";
|
||||
reg = <0xf8014000 0x1000>;
|
||||
interrupts = <5 IRQ_TYPE_LEVEL_HIGH 6>;
|
||||
interrupts = <17 IRQ_TYPE_LEVEL_HIGH 6>;
|
||||
clocks = <&hsmc_clk>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
ranges;
|
||||
|
||||
pmecc: ecc-engine@ffffc070 {
|
||||
pmecc: ecc-engine@f8014070 {
|
||||
compatible = "atmel,sama5d2-pmecc";
|
||||
reg = <0xffffc070 0x490>,
|
||||
<0xffffc500 0x100>;
|
||||
reg = <0xf8014070 0x490>,
|
||||
<0xf8014500 0x100>;
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -51,6 +51,7 @@
|
||||
compatible = "sinovoip,bananapi-m64", "allwinner,sun50i-a64";
|
||||
|
||||
aliases {
|
||||
ethernet0 = &emac;
|
||||
serial0 = &uart0;
|
||||
serial1 = &uart1;
|
||||
};
|
||||
|
@ -51,6 +51,7 @@
|
||||
compatible = "pine64,pine64", "allwinner,sun50i-a64";
|
||||
|
||||
aliases {
|
||||
ethernet0 = &emac;
|
||||
serial0 = &uart0;
|
||||
serial1 = &uart1;
|
||||
serial2 = &uart2;
|
||||
|
@ -53,6 +53,7 @@
|
||||
"allwinner,sun50i-a64";
|
||||
|
||||
aliases {
|
||||
ethernet0 = &emac;
|
||||
serial0 = &uart0;
|
||||
};
|
||||
|
||||
|
@ -120,5 +120,8 @@
|
||||
};
|
||||
|
||||
&pio {
|
||||
interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
|
||||
compatible = "allwinner,sun50i-h5-pinctrl";
|
||||
};
|
||||
|
@ -45,7 +45,7 @@
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
|
||||
audio_clkout: audio_clkout {
|
||||
audio_clkout: audio-clkout {
|
||||
/*
|
||||
* This is same as <&rcar_sound 0>
|
||||
* but needed to avoid cs2000/rcar_sound probe dead-lock
|
||||
|
@ -65,13 +65,13 @@ DECLARE_PER_CPU(const struct arch_timer_erratum_workaround *,
|
||||
u64 _val; \
|
||||
if (needs_unstable_timer_counter_workaround()) { \
|
||||
const struct arch_timer_erratum_workaround *wa; \
|
||||
preempt_disable(); \
|
||||
preempt_disable_notrace(); \
|
||||
wa = __this_cpu_read(timer_unstable_counter_workaround); \
|
||||
if (wa && wa->read_##reg) \
|
||||
_val = wa->read_##reg(); \
|
||||
else \
|
||||
_val = read_sysreg(reg); \
|
||||
preempt_enable(); \
|
||||
preempt_enable_notrace(); \
|
||||
} else { \
|
||||
_val = read_sysreg(reg); \
|
||||
} \
|
||||
|
@ -114,10 +114,10 @@
|
||||
|
||||
/*
|
||||
* This is the base location for PIE (ET_DYN with INTERP) loads. On
|
||||
* 64-bit, this is raised to 4GB to leave the entire 32-bit address
|
||||
* 64-bit, this is above 4GB to leave the entire 32-bit address
|
||||
* space open for things that want to use the area for 32-bit pointers.
|
||||
*/
|
||||
#define ELF_ET_DYN_BASE 0x100000000UL
|
||||
#define ELF_ET_DYN_BASE (2 * TASK_SIZE_64 / 3)
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
|
@ -161,9 +161,11 @@ void fpsimd_flush_thread(void)
|
||||
{
|
||||
if (!system_supports_fpsimd())
|
||||
return;
|
||||
preempt_disable();
|
||||
memset(¤t->thread.fpsimd_state, 0, sizeof(struct fpsimd_state));
|
||||
fpsimd_flush_task_state(current);
|
||||
set_thread_flag(TIF_FOREIGN_FPSTATE);
|
||||
preempt_enable();
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -354,7 +354,6 @@ __primary_switched:
|
||||
tst x23, ~(MIN_KIMG_ALIGN - 1) // already running randomized?
|
||||
b.ne 0f
|
||||
mov x0, x21 // pass FDT address in x0
|
||||
mov x1, x23 // pass modulo offset in x1
|
||||
bl kaslr_early_init // parse FDT for KASLR options
|
||||
cbz x0, 0f // KASLR disabled? just proceed
|
||||
orr x23, x23, x0 // record KASLR offset
|
||||
|
@ -75,7 +75,7 @@ extern void *__init __fixmap_remap_fdt(phys_addr_t dt_phys, int *size,
|
||||
* containing function pointers) to be reinitialized, and zero-initialized
|
||||
* .bss variables will be reset to 0.
|
||||
*/
|
||||
u64 __init kaslr_early_init(u64 dt_phys, u64 modulo_offset)
|
||||
u64 __init kaslr_early_init(u64 dt_phys)
|
||||
{
|
||||
void *fdt;
|
||||
u64 seed, offset, mask, module_range;
|
||||
@ -131,15 +131,17 @@ u64 __init kaslr_early_init(u64 dt_phys, u64 modulo_offset)
|
||||
/*
|
||||
* The kernel Image should not extend across a 1GB/32MB/512MB alignment
|
||||
* boundary (for 4KB/16KB/64KB granule kernels, respectively). If this
|
||||
* happens, increase the KASLR offset by the size of the kernel image
|
||||
* rounded up by SWAPPER_BLOCK_SIZE.
|
||||
* happens, round down the KASLR offset by (1 << SWAPPER_TABLE_SHIFT).
|
||||
*
|
||||
* NOTE: The references to _text and _end below will already take the
|
||||
* modulo offset (the physical displacement modulo 2 MB) into
|
||||
* account, given that the physical placement is controlled by
|
||||
* the loader, and will not change as a result of the virtual
|
||||
* mapping we choose.
|
||||
*/
|
||||
if ((((u64)_text + offset + modulo_offset) >> SWAPPER_TABLE_SHIFT) !=
|
||||
(((u64)_end + offset + modulo_offset) >> SWAPPER_TABLE_SHIFT)) {
|
||||
u64 kimg_sz = _end - _text;
|
||||
offset = (offset + round_up(kimg_sz, SWAPPER_BLOCK_SIZE))
|
||||
& mask;
|
||||
}
|
||||
if ((((u64)_text + offset) >> SWAPPER_TABLE_SHIFT) !=
|
||||
(((u64)_end + offset) >> SWAPPER_TABLE_SHIFT))
|
||||
offset = round_down(offset, 1 << SWAPPER_TABLE_SHIFT);
|
||||
|
||||
if (IS_ENABLED(CONFIG_KASAN))
|
||||
/*
|
||||
|
@ -435,8 +435,11 @@ retry:
|
||||
* the mmap_sem because it would already be released
|
||||
* in __lock_page_or_retry in mm/filemap.c.
|
||||
*/
|
||||
if (fatal_signal_pending(current))
|
||||
if (fatal_signal_pending(current)) {
|
||||
if (!user_mode(regs))
|
||||
goto no_context;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Clear FAULT_FLAG_ALLOW_RETRY to avoid any risk of
|
||||
|
@ -199,7 +199,7 @@ config PPC
|
||||
select HAVE_OPTPROBES if PPC64
|
||||
select HAVE_PERF_EVENTS
|
||||
select HAVE_PERF_EVENTS_NMI if PPC64
|
||||
select HAVE_HARDLOCKUP_DETECTOR_PERF if HAVE_PERF_EVENTS_NMI && !HAVE_HARDLOCKUP_DETECTOR_ARCH
|
||||
select HAVE_HARDLOCKUP_DETECTOR_PERF if PERF_EVENTS && HAVE_PERF_EVENTS_NMI && !HAVE_HARDLOCKUP_DETECTOR_ARCH
|
||||
select HAVE_PERF_REGS
|
||||
select HAVE_PERF_USER_STACK_DUMP
|
||||
select HAVE_RCU_TABLE_FREE if SMP
|
||||
|
@ -362,7 +362,8 @@ void enable_kernel_vsx(void)
|
||||
|
||||
cpumsr = msr_check_and_set(MSR_FP|MSR_VEC|MSR_VSX);
|
||||
|
||||
if (current->thread.regs && (current->thread.regs->msr & MSR_VSX)) {
|
||||
if (current->thread.regs &&
|
||||
(current->thread.regs->msr & (MSR_VSX|MSR_VEC|MSR_FP))) {
|
||||
check_if_tm_restore_required(current);
|
||||
/*
|
||||
* If a thread has already been reclaimed then the
|
||||
@ -386,7 +387,7 @@ void flush_vsx_to_thread(struct task_struct *tsk)
|
||||
{
|
||||
if (tsk->thread.regs) {
|
||||
preempt_disable();
|
||||
if (tsk->thread.regs->msr & MSR_VSX) {
|
||||
if (tsk->thread.regs->msr & (MSR_VSX|MSR_VEC|MSR_FP)) {
|
||||
BUG_ON(tsk != current);
|
||||
giveup_vsx(tsk);
|
||||
}
|
||||
|
@ -68,6 +68,7 @@ typedef struct { unsigned long iopgprot; } iopgprot_t;
|
||||
#define iopgprot_val(x) ((x).iopgprot)
|
||||
|
||||
#define __pte(x) ((pte_t) { (x) } )
|
||||
#define __pmd(x) ((pmd_t) { { (x) }, })
|
||||
#define __iopte(x) ((iopte_t) { (x) } )
|
||||
#define __pgd(x) ((pgd_t) { (x) } )
|
||||
#define __ctxd(x) ((ctxd_t) { (x) } )
|
||||
@ -95,6 +96,7 @@ typedef unsigned long iopgprot_t;
|
||||
#define iopgprot_val(x) (x)
|
||||
|
||||
#define __pte(x) (x)
|
||||
#define __pmd(x) ((pmd_t) { { (x) }, })
|
||||
#define __iopte(x) (x)
|
||||
#define __pgd(x) (x)
|
||||
#define __ctxd(x) (x)
|
||||
|
@ -1266,8 +1266,6 @@ static int pci_sun4v_probe(struct platform_device *op)
|
||||
* ATU group, but ATU hcalls won't be available.
|
||||
*/
|
||||
hv_atu = false;
|
||||
pr_err(PFX "Could not register hvapi ATU err=%d\n",
|
||||
err);
|
||||
} else {
|
||||
pr_info(PFX "Registered hvapi ATU major[%lu] minor[%lu]\n",
|
||||
vatu_major, vatu_minor);
|
||||
|
@ -602,7 +602,7 @@ void pcibios_fixup_bus(struct pci_bus *bus)
|
||||
{
|
||||
struct pci_dev *dev;
|
||||
int i, has_io, has_mem;
|
||||
unsigned int cmd;
|
||||
unsigned int cmd = 0;
|
||||
struct linux_pcic *pcic;
|
||||
/* struct linux_pbm_info* pbm = &pcic->pbm; */
|
||||
int node;
|
||||
|
@ -5,26 +5,26 @@
|
||||
.align 4
|
||||
ENTRY(__multi3) /* %o0 = u, %o1 = v */
|
||||
mov %o1, %g1
|
||||
srl %o3, 0, %g4
|
||||
mulx %g4, %g1, %o1
|
||||
srl %o3, 0, %o4
|
||||
mulx %o4, %g1, %o1
|
||||
srlx %g1, 0x20, %g3
|
||||
mulx %g3, %g4, %g5
|
||||
sllx %g5, 0x20, %o5
|
||||
srl %g1, 0, %g4
|
||||
mulx %g3, %o4, %g7
|
||||
sllx %g7, 0x20, %o5
|
||||
srl %g1, 0, %o4
|
||||
sub %o1, %o5, %o5
|
||||
srlx %o5, 0x20, %o5
|
||||
addcc %g5, %o5, %g5
|
||||
addcc %g7, %o5, %g7
|
||||
srlx %o3, 0x20, %o5
|
||||
mulx %g4, %o5, %g4
|
||||
mulx %o4, %o5, %o4
|
||||
mulx %g3, %o5, %o5
|
||||
sethi %hi(0x80000000), %g3
|
||||
addcc %g5, %g4, %g5
|
||||
srlx %g5, 0x20, %g5
|
||||
addcc %g7, %o4, %g7
|
||||
srlx %g7, 0x20, %g7
|
||||
add %g3, %g3, %g3
|
||||
movcc %xcc, %g0, %g3
|
||||
addcc %o5, %g5, %o5
|
||||
sllx %g4, 0x20, %g4
|
||||
add %o1, %g4, %o1
|
||||
addcc %o5, %g7, %o5
|
||||
sllx %o4, 0x20, %o4
|
||||
add %o1, %o4, %o1
|
||||
add %o5, %g3, %g2
|
||||
mulx %g1, %o2, %g1
|
||||
add %g1, %g2, %g1
|
||||
|
@ -100,6 +100,7 @@ config X86
|
||||
select GENERIC_STRNCPY_FROM_USER
|
||||
select GENERIC_STRNLEN_USER
|
||||
select GENERIC_TIME_VSYSCALL
|
||||
select HARDLOCKUP_CHECK_TIMESTAMP if X86_64
|
||||
select HAVE_ACPI_APEI if ACPI
|
||||
select HAVE_ACPI_APEI_NMI if ACPI
|
||||
select HAVE_ALIGNED_STRUCT_PAGE if SLUB
|
||||
@ -163,7 +164,7 @@ config X86
|
||||
select HAVE_PCSPKR_PLATFORM
|
||||
select HAVE_PERF_EVENTS
|
||||
select HAVE_PERF_EVENTS_NMI
|
||||
select HAVE_HARDLOCKUP_DETECTOR_PERF if HAVE_PERF_EVENTS_NMI
|
||||
select HAVE_HARDLOCKUP_DETECTOR_PERF if PERF_EVENTS && HAVE_PERF_EVENTS_NMI
|
||||
select HAVE_PERF_REGS
|
||||
select HAVE_PERF_USER_STACK_DUMP
|
||||
select HAVE_REGS_AND_STACK_ACCESS_API
|
||||
|
@ -1206,6 +1206,8 @@ ENTRY(nmi)
|
||||
* other IST entries.
|
||||
*/
|
||||
|
||||
ASM_CLAC
|
||||
|
||||
/* Use %rdx as our temp variable throughout */
|
||||
pushq %rdx
|
||||
|
||||
|
@ -69,7 +69,7 @@ struct bts_buffer {
|
||||
struct bts_phys buf[0];
|
||||
};
|
||||
|
||||
struct pmu bts_pmu;
|
||||
static struct pmu bts_pmu;
|
||||
|
||||
static size_t buf_size(struct page *page)
|
||||
{
|
||||
|
@ -587,7 +587,7 @@ static __initconst const u64 p4_hw_cache_event_ids
|
||||
* P4_CONFIG_ALIASABLE or bits for P4_PEBS_METRIC, they are
|
||||
* either up to date automatically or not applicable at all.
|
||||
*/
|
||||
struct p4_event_alias {
|
||||
static struct p4_event_alias {
|
||||
u64 original;
|
||||
u64 alternative;
|
||||
} p4_event_aliases[] = {
|
||||
|
@ -559,7 +559,7 @@ static struct attribute_group rapl_pmu_format_group = {
|
||||
.attrs = rapl_formats_attr,
|
||||
};
|
||||
|
||||
const struct attribute_group *rapl_attr_groups[] = {
|
||||
static const struct attribute_group *rapl_attr_groups[] = {
|
||||
&rapl_pmu_attr_group,
|
||||
&rapl_pmu_format_group,
|
||||
&rapl_pmu_events_group,
|
||||
|
@ -721,7 +721,7 @@ static struct attribute *uncore_pmu_attrs[] = {
|
||||
NULL,
|
||||
};
|
||||
|
||||
static struct attribute_group uncore_pmu_attr_group = {
|
||||
static const struct attribute_group uncore_pmu_attr_group = {
|
||||
.attrs = uncore_pmu_attrs,
|
||||
};
|
||||
|
||||
|
@ -272,7 +272,7 @@ static struct attribute *nhmex_uncore_ubox_formats_attr[] = {
|
||||
NULL,
|
||||
};
|
||||
|
||||
static struct attribute_group nhmex_uncore_ubox_format_group = {
|
||||
static const struct attribute_group nhmex_uncore_ubox_format_group = {
|
||||
.name = "format",
|
||||
.attrs = nhmex_uncore_ubox_formats_attr,
|
||||
};
|
||||
@ -299,7 +299,7 @@ static struct attribute *nhmex_uncore_cbox_formats_attr[] = {
|
||||
NULL,
|
||||
};
|
||||
|
||||
static struct attribute_group nhmex_uncore_cbox_format_group = {
|
||||
static const struct attribute_group nhmex_uncore_cbox_format_group = {
|
||||
.name = "format",
|
||||
.attrs = nhmex_uncore_cbox_formats_attr,
|
||||
};
|
||||
@ -407,7 +407,7 @@ static struct attribute *nhmex_uncore_bbox_formats_attr[] = {
|
||||
NULL,
|
||||
};
|
||||
|
||||
static struct attribute_group nhmex_uncore_bbox_format_group = {
|
||||
static const struct attribute_group nhmex_uncore_bbox_format_group = {
|
||||
.name = "format",
|
||||
.attrs = nhmex_uncore_bbox_formats_attr,
|
||||
};
|
||||
@ -484,7 +484,7 @@ static struct attribute *nhmex_uncore_sbox_formats_attr[] = {
|
||||
NULL,
|
||||
};
|
||||
|
||||
static struct attribute_group nhmex_uncore_sbox_format_group = {
|
||||
static const struct attribute_group nhmex_uncore_sbox_format_group = {
|
||||
.name = "format",
|
||||
.attrs = nhmex_uncore_sbox_formats_attr,
|
||||
};
|
||||
@ -898,7 +898,7 @@ static struct attribute *nhmex_uncore_mbox_formats_attr[] = {
|
||||
NULL,
|
||||
};
|
||||
|
||||
static struct attribute_group nhmex_uncore_mbox_format_group = {
|
||||
static const struct attribute_group nhmex_uncore_mbox_format_group = {
|
||||
.name = "format",
|
||||
.attrs = nhmex_uncore_mbox_formats_attr,
|
||||
};
|
||||
@ -1163,7 +1163,7 @@ static struct attribute *nhmex_uncore_rbox_formats_attr[] = {
|
||||
NULL,
|
||||
};
|
||||
|
||||
static struct attribute_group nhmex_uncore_rbox_format_group = {
|
||||
static const struct attribute_group nhmex_uncore_rbox_format_group = {
|
||||
.name = "format",
|
||||
.attrs = nhmex_uncore_rbox_formats_attr,
|
||||
};
|
||||
|
@ -130,7 +130,7 @@ static struct attribute *snb_uncore_formats_attr[] = {
|
||||
NULL,
|
||||
};
|
||||
|
||||
static struct attribute_group snb_uncore_format_group = {
|
||||
static const struct attribute_group snb_uncore_format_group = {
|
||||
.name = "format",
|
||||
.attrs = snb_uncore_formats_attr,
|
||||
};
|
||||
@ -289,7 +289,7 @@ static struct attribute *snb_uncore_imc_formats_attr[] = {
|
||||
NULL,
|
||||
};
|
||||
|
||||
static struct attribute_group snb_uncore_imc_format_group = {
|
||||
static const struct attribute_group snb_uncore_imc_format_group = {
|
||||
.name = "format",
|
||||
.attrs = snb_uncore_imc_formats_attr,
|
||||
};
|
||||
@ -769,7 +769,7 @@ static struct attribute *nhm_uncore_formats_attr[] = {
|
||||
NULL,
|
||||
};
|
||||
|
||||
static struct attribute_group nhm_uncore_format_group = {
|
||||
static const struct attribute_group nhm_uncore_format_group = {
|
||||
.name = "format",
|
||||
.attrs = nhm_uncore_formats_attr,
|
||||
};
|
||||
|
@ -602,27 +602,27 @@ static struct uncore_event_desc snbep_uncore_qpi_events[] = {
|
||||
{ /* end: all zeroes */ },
|
||||
};
|
||||
|
||||
static struct attribute_group snbep_uncore_format_group = {
|
||||
static const struct attribute_group snbep_uncore_format_group = {
|
||||
.name = "format",
|
||||
.attrs = snbep_uncore_formats_attr,
|
||||
};
|
||||
|
||||
static struct attribute_group snbep_uncore_ubox_format_group = {
|
||||
static const struct attribute_group snbep_uncore_ubox_format_group = {
|
||||
.name = "format",
|
||||
.attrs = snbep_uncore_ubox_formats_attr,
|
||||
};
|
||||
|
||||
static struct attribute_group snbep_uncore_cbox_format_group = {
|
||||
static const struct attribute_group snbep_uncore_cbox_format_group = {
|
||||
.name = "format",
|
||||
.attrs = snbep_uncore_cbox_formats_attr,
|
||||
};
|
||||
|
||||
static struct attribute_group snbep_uncore_pcu_format_group = {
|
||||
static const struct attribute_group snbep_uncore_pcu_format_group = {
|
||||
.name = "format",
|
||||
.attrs = snbep_uncore_pcu_formats_attr,
|
||||
};
|
||||
|
||||
static struct attribute_group snbep_uncore_qpi_format_group = {
|
||||
static const struct attribute_group snbep_uncore_qpi_format_group = {
|
||||
.name = "format",
|
||||
.attrs = snbep_uncore_qpi_formats_attr,
|
||||
};
|
||||
@ -1431,27 +1431,27 @@ static struct attribute *ivbep_uncore_qpi_formats_attr[] = {
|
||||
NULL,
|
||||
};
|
||||
|
||||
static struct attribute_group ivbep_uncore_format_group = {
|
||||
static const struct attribute_group ivbep_uncore_format_group = {
|
||||
.name = "format",
|
||||
.attrs = ivbep_uncore_formats_attr,
|
||||
};
|
||||
|
||||
static struct attribute_group ivbep_uncore_ubox_format_group = {
|
||||
static const struct attribute_group ivbep_uncore_ubox_format_group = {
|
||||
.name = "format",
|
||||
.attrs = ivbep_uncore_ubox_formats_attr,
|
||||
};
|
||||
|
||||
static struct attribute_group ivbep_uncore_cbox_format_group = {
|
||||
static const struct attribute_group ivbep_uncore_cbox_format_group = {
|
||||
.name = "format",
|
||||
.attrs = ivbep_uncore_cbox_formats_attr,
|
||||
};
|
||||
|
||||
static struct attribute_group ivbep_uncore_pcu_format_group = {
|
||||
static const struct attribute_group ivbep_uncore_pcu_format_group = {
|
||||
.name = "format",
|
||||
.attrs = ivbep_uncore_pcu_formats_attr,
|
||||
};
|
||||
|
||||
static struct attribute_group ivbep_uncore_qpi_format_group = {
|
||||
static const struct attribute_group ivbep_uncore_qpi_format_group = {
|
||||
.name = "format",
|
||||
.attrs = ivbep_uncore_qpi_formats_attr,
|
||||
};
|
||||
@ -1887,7 +1887,7 @@ static struct attribute *knl_uncore_ubox_formats_attr[] = {
|
||||
NULL,
|
||||
};
|
||||
|
||||
static struct attribute_group knl_uncore_ubox_format_group = {
|
||||
static const struct attribute_group knl_uncore_ubox_format_group = {
|
||||
.name = "format",
|
||||
.attrs = knl_uncore_ubox_formats_attr,
|
||||
};
|
||||
@ -1927,7 +1927,7 @@ static struct attribute *knl_uncore_cha_formats_attr[] = {
|
||||
NULL,
|
||||
};
|
||||
|
||||
static struct attribute_group knl_uncore_cha_format_group = {
|
||||
static const struct attribute_group knl_uncore_cha_format_group = {
|
||||
.name = "format",
|
||||
.attrs = knl_uncore_cha_formats_attr,
|
||||
};
|
||||
@ -2037,7 +2037,7 @@ static struct attribute *knl_uncore_pcu_formats_attr[] = {
|
||||
NULL,
|
||||
};
|
||||
|
||||
static struct attribute_group knl_uncore_pcu_format_group = {
|
||||
static const struct attribute_group knl_uncore_pcu_format_group = {
|
||||
.name = "format",
|
||||
.attrs = knl_uncore_pcu_formats_attr,
|
||||
};
|
||||
@ -2187,7 +2187,7 @@ static struct attribute *knl_uncore_irp_formats_attr[] = {
|
||||
NULL,
|
||||
};
|
||||
|
||||
static struct attribute_group knl_uncore_irp_format_group = {
|
||||
static const struct attribute_group knl_uncore_irp_format_group = {
|
||||
.name = "format",
|
||||
.attrs = knl_uncore_irp_formats_attr,
|
||||
};
|
||||
@ -2385,7 +2385,7 @@ static struct attribute *hswep_uncore_ubox_formats_attr[] = {
|
||||
NULL,
|
||||
};
|
||||
|
||||
static struct attribute_group hswep_uncore_ubox_format_group = {
|
||||
static const struct attribute_group hswep_uncore_ubox_format_group = {
|
||||
.name = "format",
|
||||
.attrs = hswep_uncore_ubox_formats_attr,
|
||||
};
|
||||
@ -2439,7 +2439,7 @@ static struct attribute *hswep_uncore_cbox_formats_attr[] = {
|
||||
NULL,
|
||||
};
|
||||
|
||||
static struct attribute_group hswep_uncore_cbox_format_group = {
|
||||
static const struct attribute_group hswep_uncore_cbox_format_group = {
|
||||
.name = "format",
|
||||
.attrs = hswep_uncore_cbox_formats_attr,
|
||||
};
|
||||
@ -2621,7 +2621,7 @@ static struct attribute *hswep_uncore_sbox_formats_attr[] = {
|
||||
NULL,
|
||||
};
|
||||
|
||||
static struct attribute_group hswep_uncore_sbox_format_group = {
|
||||
static const struct attribute_group hswep_uncore_sbox_format_group = {
|
||||
.name = "format",
|
||||
.attrs = hswep_uncore_sbox_formats_attr,
|
||||
};
|
||||
@ -3314,7 +3314,7 @@ static struct attribute *skx_uncore_cha_formats_attr[] = {
|
||||
NULL,
|
||||
};
|
||||
|
||||
static struct attribute_group skx_uncore_chabox_format_group = {
|
||||
static const struct attribute_group skx_uncore_chabox_format_group = {
|
||||
.name = "format",
|
||||
.attrs = skx_uncore_cha_formats_attr,
|
||||
};
|
||||
@ -3427,7 +3427,7 @@ static struct attribute *skx_uncore_iio_formats_attr[] = {
|
||||
NULL,
|
||||
};
|
||||
|
||||
static struct attribute_group skx_uncore_iio_format_group = {
|
||||
static const struct attribute_group skx_uncore_iio_format_group = {
|
||||
.name = "format",
|
||||
.attrs = skx_uncore_iio_formats_attr,
|
||||
};
|
||||
@ -3484,7 +3484,7 @@ static struct attribute *skx_uncore_formats_attr[] = {
|
||||
NULL,
|
||||
};
|
||||
|
||||
static struct attribute_group skx_uncore_format_group = {
|
||||
static const struct attribute_group skx_uncore_format_group = {
|
||||
.name = "format",
|
||||
.attrs = skx_uncore_formats_attr,
|
||||
};
|
||||
@ -3605,7 +3605,7 @@ static struct attribute *skx_upi_uncore_formats_attr[] = {
|
||||
NULL,
|
||||
};
|
||||
|
||||
static struct attribute_group skx_upi_uncore_format_group = {
|
||||
static const struct attribute_group skx_upi_uncore_format_group = {
|
||||
.name = "format",
|
||||
.attrs = skx_upi_uncore_formats_attr,
|
||||
};
|
||||
|
@ -286,7 +286,7 @@
|
||||
#define X86_FEATURE_PAUSEFILTER (15*32+10) /* filtered pause intercept */
|
||||
#define X86_FEATURE_PFTHRESHOLD (15*32+12) /* pause filter threshold */
|
||||
#define X86_FEATURE_AVIC (15*32+13) /* Virtual Interrupt Controller */
|
||||
#define X86_FEATURE_VIRTUAL_VMLOAD_VMSAVE (15*32+15) /* Virtual VMLOAD VMSAVE */
|
||||
#define X86_FEATURE_V_VMSAVE_VMLOAD (15*32+15) /* Virtual VMSAVE VMLOAD */
|
||||
|
||||
/* Intel-defined CPU features, CPUID level 0x00000007:0 (ecx), word 16 */
|
||||
#define X86_FEATURE_AVX512VBMI (16*32+ 1) /* AVX512 Vector Bit Manipulation instructions*/
|
||||
|
@ -247,11 +247,11 @@ extern int force_personality32;
|
||||
|
||||
/*
|
||||
* This is the base location for PIE (ET_DYN with INTERP) loads. On
|
||||
* 64-bit, this is raised to 4GB to leave the entire 32-bit address
|
||||
* 64-bit, this is above 4GB to leave the entire 32-bit address
|
||||
* space open for things that want to use the area for 32-bit pointers.
|
||||
*/
|
||||
#define ELF_ET_DYN_BASE (mmap_is_ia32() ? 0x000400000UL : \
|
||||
0x100000000UL)
|
||||
(TASK_SIZE / 3 * 2))
|
||||
|
||||
/* This yields a mask that user programs can use to figure out what
|
||||
instruction set this CPU supports. This could be done in user space,
|
||||
|
@ -40,13 +40,16 @@ static void aperfmperf_snapshot_khz(void *dummy)
|
||||
struct aperfmperf_sample *s = this_cpu_ptr(&samples);
|
||||
ktime_t now = ktime_get();
|
||||
s64 time_delta = ktime_ms_delta(now, s->time);
|
||||
unsigned long flags;
|
||||
|
||||
/* Don't bother re-computing within the cache threshold time. */
|
||||
if (time_delta < APERFMPERF_CACHE_THRESHOLD_MS)
|
||||
return;
|
||||
|
||||
local_irq_save(flags);
|
||||
rdmsrl(MSR_IA32_APERF, aperf);
|
||||
rdmsrl(MSR_IA32_MPERF, mperf);
|
||||
local_irq_restore(flags);
|
||||
|
||||
aperf_delta = aperf - s->aperf;
|
||||
mperf_delta = mperf - s->mperf;
|
||||
|
@ -122,7 +122,7 @@ static struct attribute *thermal_throttle_attrs[] = {
|
||||
NULL
|
||||
};
|
||||
|
||||
static struct attribute_group thermal_attr_group = {
|
||||
static const struct attribute_group thermal_attr_group = {
|
||||
.attrs = thermal_throttle_attrs,
|
||||
.name = "thermal_throttle"
|
||||
};
|
||||
|
@ -561,7 +561,7 @@ static struct attribute *mc_default_attrs[] = {
|
||||
NULL
|
||||
};
|
||||
|
||||
static struct attribute_group mc_attr_group = {
|
||||
static const struct attribute_group mc_attr_group = {
|
||||
.attrs = mc_default_attrs,
|
||||
.name = "microcode",
|
||||
};
|
||||
@ -707,7 +707,7 @@ static struct attribute *cpu_root_microcode_attrs[] = {
|
||||
NULL
|
||||
};
|
||||
|
||||
static struct attribute_group cpu_root_microcode_group = {
|
||||
static const struct attribute_group cpu_root_microcode_group = {
|
||||
.name = "microcode",
|
||||
.attrs = cpu_root_microcode_attrs,
|
||||
};
|
||||
|
@ -237,6 +237,18 @@ set_mtrr(unsigned int reg, unsigned long base, unsigned long size, mtrr_type typ
|
||||
stop_machine(mtrr_rendezvous_handler, &data, cpu_online_mask);
|
||||
}
|
||||
|
||||
static void set_mtrr_cpuslocked(unsigned int reg, unsigned long base,
|
||||
unsigned long size, mtrr_type type)
|
||||
{
|
||||
struct set_mtrr_data data = { .smp_reg = reg,
|
||||
.smp_base = base,
|
||||
.smp_size = size,
|
||||
.smp_type = type
|
||||
};
|
||||
|
||||
stop_machine_cpuslocked(mtrr_rendezvous_handler, &data, cpu_online_mask);
|
||||
}
|
||||
|
||||
static void set_mtrr_from_inactive_cpu(unsigned int reg, unsigned long base,
|
||||
unsigned long size, mtrr_type type)
|
||||
{
|
||||
@ -370,7 +382,7 @@ int mtrr_add_page(unsigned long base, unsigned long size,
|
||||
/* Search for an empty MTRR */
|
||||
i = mtrr_if->get_free_region(base, size, replace);
|
||||
if (i >= 0) {
|
||||
set_mtrr(i, base, size, type);
|
||||
set_mtrr_cpuslocked(i, base, size, type);
|
||||
if (likely(replace < 0)) {
|
||||
mtrr_usage_table[i] = 1;
|
||||
} else {
|
||||
@ -378,7 +390,7 @@ int mtrr_add_page(unsigned long base, unsigned long size,
|
||||
if (increment)
|
||||
mtrr_usage_table[i]++;
|
||||
if (unlikely(replace != i)) {
|
||||
set_mtrr(replace, 0, 0, 0);
|
||||
set_mtrr_cpuslocked(replace, 0, 0, 0);
|
||||
mtrr_usage_table[replace] = 0;
|
||||
}
|
||||
}
|
||||
@ -506,7 +518,7 @@ int mtrr_del_page(int reg, unsigned long base, unsigned long size)
|
||||
goto out;
|
||||
}
|
||||
if (--mtrr_usage_table[reg] < 1)
|
||||
set_mtrr(reg, 0, 0, 0);
|
||||
set_mtrr_cpuslocked(reg, 0, 0, 0);
|
||||
error = reg;
|
||||
out:
|
||||
mutex_unlock(&mtrr_mutex);
|
||||
|
@ -53,6 +53,7 @@ void __head __startup_64(unsigned long physaddr)
|
||||
pudval_t *pud;
|
||||
pmdval_t *pmd, pmd_entry;
|
||||
int i;
|
||||
unsigned int *next_pgt_ptr;
|
||||
|
||||
/* Is the address too large? */
|
||||
if (physaddr >> MAX_PHYSMEM_BITS)
|
||||
@ -91,9 +92,9 @@ void __head __startup_64(unsigned long physaddr)
|
||||
* creates a bunch of nonsense entries but that is fine --
|
||||
* it avoids problems around wraparound.
|
||||
*/
|
||||
|
||||
pud = fixup_pointer(early_dynamic_pgts[next_early_pgt++], physaddr);
|
||||
pmd = fixup_pointer(early_dynamic_pgts[next_early_pgt++], physaddr);
|
||||
next_pgt_ptr = fixup_pointer(&next_early_pgt, physaddr);
|
||||
pud = fixup_pointer(early_dynamic_pgts[(*next_pgt_ptr)++], physaddr);
|
||||
pmd = fixup_pointer(early_dynamic_pgts[(*next_pgt_ptr)++], physaddr);
|
||||
|
||||
if (IS_ENABLED(CONFIG_X86_5LEVEL)) {
|
||||
p4d = fixup_pointer(early_dynamic_pgts[next_early_pgt++], physaddr);
|
||||
|
@ -55,7 +55,7 @@ static struct bin_attribute *boot_params_data_attrs[] = {
|
||||
NULL,
|
||||
};
|
||||
|
||||
static struct attribute_group boot_params_attr_group = {
|
||||
static const struct attribute_group boot_params_attr_group = {
|
||||
.attrs = boot_params_version_attrs,
|
||||
.bin_attrs = boot_params_data_attrs,
|
||||
};
|
||||
@ -202,7 +202,7 @@ static struct bin_attribute *setup_data_data_attrs[] = {
|
||||
NULL,
|
||||
};
|
||||
|
||||
static struct attribute_group setup_data_attr_group = {
|
||||
static const struct attribute_group setup_data_attr_group = {
|
||||
.attrs = setup_data_type_attrs,
|
||||
.bin_attrs = setup_data_data_attrs,
|
||||
};
|
||||
|
@ -971,7 +971,8 @@ void common_cpu_up(unsigned int cpu, struct task_struct *idle)
|
||||
* Returns zero if CPU booted OK, else error code from
|
||||
* ->wakeup_secondary_cpu.
|
||||
*/
|
||||
static int do_boot_cpu(int apicid, int cpu, struct task_struct *idle)
|
||||
static int do_boot_cpu(int apicid, int cpu, struct task_struct *idle,
|
||||
int *cpu0_nmi_registered)
|
||||
{
|
||||
volatile u32 *trampoline_status =
|
||||
(volatile u32 *) __va(real_mode_header->trampoline_status);
|
||||
@ -979,7 +980,6 @@ static int do_boot_cpu(int apicid, int cpu, struct task_struct *idle)
|
||||
unsigned long start_ip = real_mode_header->trampoline_start;
|
||||
|
||||
unsigned long boot_error = 0;
|
||||
int cpu0_nmi_registered = 0;
|
||||
unsigned long timeout;
|
||||
|
||||
idle->thread.sp = (unsigned long)task_pt_regs(idle);
|
||||
@ -1035,7 +1035,7 @@ static int do_boot_cpu(int apicid, int cpu, struct task_struct *idle)
|
||||
boot_error = apic->wakeup_secondary_cpu(apicid, start_ip);
|
||||
else
|
||||
boot_error = wakeup_cpu_via_init_nmi(cpu, start_ip, apicid,
|
||||
&cpu0_nmi_registered);
|
||||
cpu0_nmi_registered);
|
||||
|
||||
if (!boot_error) {
|
||||
/*
|
||||
@ -1080,12 +1080,6 @@ static int do_boot_cpu(int apicid, int cpu, struct task_struct *idle)
|
||||
*/
|
||||
smpboot_restore_warm_reset_vector();
|
||||
}
|
||||
/*
|
||||
* Clean up the nmi handler. Do this after the callin and callout sync
|
||||
* to avoid impact of possible long unregister time.
|
||||
*/
|
||||
if (cpu0_nmi_registered)
|
||||
unregister_nmi_handler(NMI_LOCAL, "wake_cpu0");
|
||||
|
||||
return boot_error;
|
||||
}
|
||||
@ -1093,8 +1087,9 @@ static int do_boot_cpu(int apicid, int cpu, struct task_struct *idle)
|
||||
int native_cpu_up(unsigned int cpu, struct task_struct *tidle)
|
||||
{
|
||||
int apicid = apic->cpu_present_to_apicid(cpu);
|
||||
int cpu0_nmi_registered = 0;
|
||||
unsigned long flags;
|
||||
int err;
|
||||
int err, ret = 0;
|
||||
|
||||
WARN_ON(irqs_disabled());
|
||||
|
||||
@ -1131,10 +1126,11 @@ int native_cpu_up(unsigned int cpu, struct task_struct *tidle)
|
||||
|
||||
common_cpu_up(cpu, tidle);
|
||||
|
||||
err = do_boot_cpu(apicid, cpu, tidle);
|
||||
err = do_boot_cpu(apicid, cpu, tidle, &cpu0_nmi_registered);
|
||||
if (err) {
|
||||
pr_err("do_boot_cpu failed(%d) to wakeup CPU#%u\n", err, cpu);
|
||||
return -EIO;
|
||||
ret = -EIO;
|
||||
goto unreg_nmi;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1150,7 +1146,15 @@ int native_cpu_up(unsigned int cpu, struct task_struct *tidle)
|
||||
touch_nmi_watchdog();
|
||||
}
|
||||
|
||||
return 0;
|
||||
unreg_nmi:
|
||||
/*
|
||||
* Clean up the nmi handler. Do this after the callin and callout sync
|
||||
* to avoid impact of possible long unregister time.
|
||||
*/
|
||||
if (cpu0_nmi_registered)
|
||||
unregister_nmi_handler(NMI_LOCAL, "wake_cpu0");
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1100,7 +1100,7 @@ static __init int svm_hardware_setup(void)
|
||||
|
||||
if (vls) {
|
||||
if (!npt_enabled ||
|
||||
!boot_cpu_has(X86_FEATURE_VIRTUAL_VMLOAD_VMSAVE) ||
|
||||
!boot_cpu_has(X86_FEATURE_V_VMSAVE_VMLOAD) ||
|
||||
!IS_ENABLED(CONFIG_X86_64)) {
|
||||
vls = false;
|
||||
} else {
|
||||
|
@ -50,8 +50,7 @@ unsigned long tasksize_64bit(void)
|
||||
static unsigned long stack_maxrandom_size(unsigned long task_size)
|
||||
{
|
||||
unsigned long max = 0;
|
||||
if ((current->flags & PF_RANDOMIZE) &&
|
||||
!(current->personality & ADDR_NO_RANDOMIZE)) {
|
||||
if (current->flags & PF_RANDOMIZE) {
|
||||
max = (-1UL) & __STACK_RND_MASK(task_size == tasksize_32bit());
|
||||
max <<= PAGE_SHIFT;
|
||||
}
|
||||
@ -79,13 +78,13 @@ static int mmap_is_legacy(void)
|
||||
|
||||
static unsigned long arch_rnd(unsigned int rndbits)
|
||||
{
|
||||
if (!(current->flags & PF_RANDOMIZE))
|
||||
return 0;
|
||||
return (get_random_long() & ((1UL << rndbits) - 1)) << PAGE_SHIFT;
|
||||
}
|
||||
|
||||
unsigned long arch_mmap_rnd(void)
|
||||
{
|
||||
if (!(current->flags & PF_RANDOMIZE))
|
||||
return 0;
|
||||
return arch_rnd(mmap_is_ia32() ? mmap32_rnd_bits : mmap64_rnd_bits);
|
||||
}
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
||||
static struct bau_operations ops __ro_after_init;
|
||||
|
||||
/* timeouts in nanoseconds (indexed by UVH_AGING_PRESCALE_SEL urgency7 30:28) */
|
||||
static int timeout_base_ns[] = {
|
||||
static const int timeout_base_ns[] = {
|
||||
20,
|
||||
160,
|
||||
1280,
|
||||
@ -1216,7 +1216,7 @@ static struct bau_pq_entry *find_another_by_swack(struct bau_pq_entry *msg,
|
||||
* set a bit in the UVH_LB_BAU_INTD_SOFTWARE_ACKNOWLEDGE register.
|
||||
* Such a message must be ignored.
|
||||
*/
|
||||
void process_uv2_message(struct msg_desc *mdp, struct bau_control *bcp)
|
||||
static void process_uv2_message(struct msg_desc *mdp, struct bau_control *bcp)
|
||||
{
|
||||
unsigned long mmr_image;
|
||||
unsigned char swack_vec;
|
||||
|
@ -36,12 +36,18 @@ int blk_mq_pci_map_queues(struct blk_mq_tag_set *set, struct pci_dev *pdev)
|
||||
for (queue = 0; queue < set->nr_hw_queues; queue++) {
|
||||
mask = pci_irq_get_affinity(pdev, queue);
|
||||
if (!mask)
|
||||
return -EINVAL;
|
||||
goto fallback;
|
||||
|
||||
for_each_cpu(cpu, mask)
|
||||
set->mq_map[cpu] = queue;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
fallback:
|
||||
WARN_ON_ONCE(set->nr_hw_queues > 1);
|
||||
for_each_possible_cpu(cpu)
|
||||
set->mq_map[cpu] = 0;
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(blk_mq_pci_map_queues);
|
||||
|
@ -360,12 +360,12 @@ struct request *blk_mq_alloc_request(struct request_queue *q, unsigned int op,
|
||||
return ERR_PTR(ret);
|
||||
|
||||
rq = blk_mq_get_request(q, NULL, op, &alloc_data);
|
||||
blk_queue_exit(q);
|
||||
|
||||
if (!rq)
|
||||
return ERR_PTR(-EWOULDBLOCK);
|
||||
|
||||
blk_mq_put_ctx(alloc_data.ctx);
|
||||
blk_queue_exit(q);
|
||||
|
||||
rq->__data_len = 0;
|
||||
rq->__sector = (sector_t) -1;
|
||||
@ -411,12 +411,11 @@ struct request *blk_mq_alloc_request_hctx(struct request_queue *q,
|
||||
alloc_data.ctx = __blk_mq_get_ctx(q, cpu);
|
||||
|
||||
rq = blk_mq_get_request(q, NULL, op, &alloc_data);
|
||||
blk_queue_exit(q);
|
||||
|
||||
if (!rq)
|
||||
return ERR_PTR(-EWOULDBLOCK);
|
||||
|
||||
blk_queue_exit(q);
|
||||
|
||||
return rq;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(blk_mq_alloc_request_hctx);
|
||||
|
@ -2075,9 +2075,9 @@ static int blkfront_resume(struct xenbus_device *dev)
|
||||
/*
|
||||
* Get the bios in the request so we can re-queue them.
|
||||
*/
|
||||
if (req_op(shadow[i].request) == REQ_OP_FLUSH ||
|
||||
req_op(shadow[i].request) == REQ_OP_DISCARD ||
|
||||
req_op(shadow[i].request) == REQ_OP_SECURE_ERASE ||
|
||||
if (req_op(shadow[j].request) == REQ_OP_FLUSH ||
|
||||
req_op(shadow[j].request) == REQ_OP_DISCARD ||
|
||||
req_op(shadow[j].request) == REQ_OP_SECURE_ERASE ||
|
||||
shadow[j].request->cmd_flags & REQ_FUA) {
|
||||
/*
|
||||
* Flush operations don't contain bios, so
|
||||
|
@ -262,7 +262,7 @@ config CLKSRC_LPC32XX
|
||||
|
||||
config CLKSRC_PISTACHIO
|
||||
bool "Clocksource for Pistachio SoC" if COMPILE_TEST
|
||||
depends on HAS_IOMEM
|
||||
depends on GENERIC_CLOCKEVENTS && HAS_IOMEM
|
||||
select TIMER_OF
|
||||
help
|
||||
Enables the clocksource for the Pistachio SoC.
|
||||
|
@ -1440,7 +1440,7 @@ static int __init arch_timer_mem_acpi_init(int platform_timer_count)
|
||||
* While unlikely, it's theoretically possible that none of the frames
|
||||
* in a timer expose the combination of feature we want.
|
||||
*/
|
||||
for (i = i; i < timer_count; i++) {
|
||||
for (i = 0; i < timer_count; i++) {
|
||||
timer = &timers[i];
|
||||
|
||||
frame = arch_timer_mem_find_best_frame(timer);
|
||||
|
@ -305,7 +305,7 @@ static int em_sti_probe(struct platform_device *pdev)
|
||||
irq = platform_get_irq(pdev, 0);
|
||||
if (irq < 0) {
|
||||
dev_err(&pdev->dev, "failed to get irq\n");
|
||||
return -EINVAL;
|
||||
return irq;
|
||||
}
|
||||
|
||||
/* map memory, let base point to the STI instance */
|
||||
@ -314,11 +314,12 @@ static int em_sti_probe(struct platform_device *pdev)
|
||||
if (IS_ERR(p->base))
|
||||
return PTR_ERR(p->base);
|
||||
|
||||
if (devm_request_irq(&pdev->dev, irq, em_sti_interrupt,
|
||||
IRQF_TIMER | IRQF_IRQPOLL | IRQF_NOBALANCING,
|
||||
dev_name(&pdev->dev), p)) {
|
||||
ret = devm_request_irq(&pdev->dev, irq, em_sti_interrupt,
|
||||
IRQF_TIMER | IRQF_IRQPOLL | IRQF_NOBALANCING,
|
||||
dev_name(&pdev->dev), p);
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "failed to request low IRQ\n");
|
||||
return -ENOENT;
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* get hold of clock */
|
||||
|
@ -128,9 +128,9 @@ static __init int timer_base_init(struct device_node *np,
|
||||
const char *name = of_base->name ? of_base->name : np->full_name;
|
||||
|
||||
of_base->base = of_io_request_and_map(np, of_base->index, name);
|
||||
if (!of_base->base) {
|
||||
if (IS_ERR(of_base->base)) {
|
||||
pr_err("Failed to iomap (%s)\n", name);
|
||||
return -ENXIO;
|
||||
return PTR_ERR(of_base->base);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -1613,8 +1613,7 @@ static inline bool intel_pstate_sample(struct cpudata *cpu, u64 time)
|
||||
|
||||
static inline int32_t get_avg_frequency(struct cpudata *cpu)
|
||||
{
|
||||
return mul_ext_fp(cpu->sample.core_avg_perf,
|
||||
cpu->pstate.max_pstate_physical * cpu->pstate.scaling);
|
||||
return mul_ext_fp(cpu->sample.core_avg_perf, cpu_khz);
|
||||
}
|
||||
|
||||
static inline int32_t get_avg_pstate(struct cpudata *cpu)
|
||||
|
@ -557,7 +557,7 @@ static void mvebu_gpio_irq_handler(struct irq_desc *desc)
|
||||
edge_cause = mvebu_gpio_read_edge_cause(mvchip);
|
||||
edge_mask = mvebu_gpio_read_edge_mask(mvchip);
|
||||
|
||||
cause = (data_in ^ level_mask) | (edge_cause & edge_mask);
|
||||
cause = (data_in & level_mask) | (edge_cause & edge_mask);
|
||||
|
||||
for (i = 0; i < mvchip->chip.ngpio; i++) {
|
||||
int irq;
|
||||
|
@ -2,6 +2,7 @@
|
||||
#include <linux/mutex.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/sysfs.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/gpio/consumer.h>
|
||||
#include <linux/gpio/driver.h>
|
||||
#include <linux/interrupt.h>
|
||||
@ -432,6 +433,11 @@ static struct attribute *gpiochip_attrs[] = {
|
||||
};
|
||||
ATTRIBUTE_GROUPS(gpiochip);
|
||||
|
||||
static struct gpio_desc *gpio_to_valid_desc(int gpio)
|
||||
{
|
||||
return gpio_is_valid(gpio) ? gpio_to_desc(gpio) : NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* /sys/class/gpio/export ... write-only
|
||||
* integer N ... number of GPIO to export (full access)
|
||||
@ -450,7 +456,7 @@ static ssize_t export_store(struct class *class,
|
||||
if (status < 0)
|
||||
goto done;
|
||||
|
||||
desc = gpio_to_desc(gpio);
|
||||
desc = gpio_to_valid_desc(gpio);
|
||||
/* reject invalid GPIOs */
|
||||
if (!desc) {
|
||||
pr_warn("%s: invalid GPIO %ld\n", __func__, gpio);
|
||||
@ -493,7 +499,7 @@ static ssize_t unexport_store(struct class *class,
|
||||
if (status < 0)
|
||||
goto done;
|
||||
|
||||
desc = gpio_to_desc(gpio);
|
||||
desc = gpio_to_valid_desc(gpio);
|
||||
/* reject bogus commands (gpio_unexport ignores them) */
|
||||
if (!desc) {
|
||||
pr_warn("%s: invalid GPIO %ld\n", __func__, gpio);
|
||||
|
@ -244,6 +244,12 @@ struct dma_fence *amdgpu_sync_peek_fence(struct amdgpu_sync *sync,
|
||||
struct dma_fence *f = e->fence;
|
||||
struct amd_sched_fence *s_fence = to_amd_sched_fence(f);
|
||||
|
||||
if (dma_fence_is_signaled(f)) {
|
||||
hash_del(&e->node);
|
||||
dma_fence_put(f);
|
||||
kmem_cache_free(amdgpu_sync_slab, e);
|
||||
continue;
|
||||
}
|
||||
if (ring && s_fence) {
|
||||
/* For fences from the same ring it is sufficient
|
||||
* when they are scheduled.
|
||||
@ -256,13 +262,6 @@ struct dma_fence *amdgpu_sync_peek_fence(struct amdgpu_sync *sync,
|
||||
}
|
||||
}
|
||||
|
||||
if (dma_fence_is_signaled(f)) {
|
||||
hash_del(&e->node);
|
||||
dma_fence_put(f);
|
||||
kmem_cache_free(amdgpu_sync_slab, e);
|
||||
continue;
|
||||
}
|
||||
|
||||
return f;
|
||||
}
|
||||
|
||||
|
@ -4580,7 +4580,7 @@ static void gen9_sseu_device_status(struct drm_i915_private *dev_priv,
|
||||
|
||||
sseu->slice_mask |= BIT(s);
|
||||
|
||||
if (IS_GEN9_BC(dev_priv))
|
||||
if (IS_GEN9_BC(dev_priv) || IS_CANNONLAKE(dev_priv))
|
||||
sseu->subslice_mask =
|
||||
INTEL_INFO(dev_priv)->sseu.subslice_mask;
|
||||
|
||||
|
@ -688,19 +688,19 @@ static inline bool skip_rcs_switch(struct i915_hw_ppgtt *ppgtt,
|
||||
}
|
||||
|
||||
static bool
|
||||
needs_pd_load_pre(struct i915_hw_ppgtt *ppgtt,
|
||||
struct intel_engine_cs *engine,
|
||||
struct i915_gem_context *to)
|
||||
needs_pd_load_pre(struct i915_hw_ppgtt *ppgtt, struct intel_engine_cs *engine)
|
||||
{
|
||||
struct i915_gem_context *from = engine->legacy_active_context;
|
||||
|
||||
if (!ppgtt)
|
||||
return false;
|
||||
|
||||
/* Always load the ppgtt on first use */
|
||||
if (!engine->legacy_active_context)
|
||||
if (!from)
|
||||
return true;
|
||||
|
||||
/* Same context without new entries, skip */
|
||||
if (engine->legacy_active_context == to &&
|
||||
if ((!from->ppgtt || from->ppgtt == ppgtt) &&
|
||||
!(intel_engine_flag(engine) & ppgtt->pd_dirty_rings))
|
||||
return false;
|
||||
|
||||
@ -744,7 +744,7 @@ static int do_rcs_switch(struct drm_i915_gem_request *req)
|
||||
if (skip_rcs_switch(ppgtt, engine, to))
|
||||
return 0;
|
||||
|
||||
if (needs_pd_load_pre(ppgtt, engine, to)) {
|
||||
if (needs_pd_load_pre(ppgtt, engine)) {
|
||||
/* Older GENs and non render rings still want the load first,
|
||||
* "PP_DCLV followed by PP_DIR_BASE register through Load
|
||||
* Register Immediate commands in Ring Buffer before submitting
|
||||
@ -841,7 +841,7 @@ int i915_switch_context(struct drm_i915_gem_request *req)
|
||||
struct i915_hw_ppgtt *ppgtt =
|
||||
to->ppgtt ?: req->i915->mm.aliasing_ppgtt;
|
||||
|
||||
if (needs_pd_load_pre(ppgtt, engine, to)) {
|
||||
if (needs_pd_load_pre(ppgtt, engine)) {
|
||||
int ret;
|
||||
|
||||
trace_switch_mm(engine, to);
|
||||
@ -852,6 +852,7 @@ int i915_switch_context(struct drm_i915_gem_request *req)
|
||||
ppgtt->pd_dirty_rings &= ~intel_engine_flag(engine);
|
||||
}
|
||||
|
||||
engine->legacy_active_context = to;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -242,6 +242,10 @@ int i915_gem_render_state_emit(struct drm_i915_gem_request *req)
|
||||
goto err_unpin;
|
||||
}
|
||||
|
||||
ret = req->engine->emit_flush(req, EMIT_INVALIDATE);
|
||||
if (ret)
|
||||
goto err_unpin;
|
||||
|
||||
ret = req->engine->emit_bb_start(req,
|
||||
so->batch_offset, so->batch_size,
|
||||
I915_DISPATCH_SECURE);
|
||||
|
@ -1762,7 +1762,7 @@ cnl_get_buf_trans_edp(struct drm_i915_private *dev_priv,
|
||||
if (dev_priv->vbt.edp.low_vswing) {
|
||||
if (voltage == VOLTAGE_INFO_0_85V) {
|
||||
*n_entries = ARRAY_SIZE(cnl_ddi_translations_edp_0_85V);
|
||||
return cnl_ddi_translations_dp_0_85V;
|
||||
return cnl_ddi_translations_edp_0_85V;
|
||||
} else if (voltage == VOLTAGE_INFO_0_95V) {
|
||||
*n_entries = ARRAY_SIZE(cnl_ddi_translations_edp_0_95V);
|
||||
return cnl_ddi_translations_edp_0_95V;
|
||||
|
@ -3485,6 +3485,13 @@ void intel_prepare_reset(struct drm_i915_private *dev_priv)
|
||||
!gpu_reset_clobbers_display(dev_priv))
|
||||
return;
|
||||
|
||||
/* We have a modeset vs reset deadlock, defensively unbreak it.
|
||||
*
|
||||
* FIXME: We can do a _lot_ better, this is just a first iteration.
|
||||
*/
|
||||
i915_gem_set_wedged(dev_priv);
|
||||
DRM_DEBUG_DRIVER("Wedging GPU to avoid deadlocks with pending modeset updates\n");
|
||||
|
||||
/*
|
||||
* Need mode_config.mutex so that we don't
|
||||
* trample ongoing ->detect() and whatnot.
|
||||
|
@ -63,7 +63,6 @@ enum {
|
||||
};
|
||||
|
||||
/* Logical Rings */
|
||||
void intel_logical_ring_stop(struct intel_engine_cs *engine);
|
||||
void intel_logical_ring_cleanup(struct intel_engine_cs *engine);
|
||||
int logical_render_ring_init(struct intel_engine_cs *engine);
|
||||
int logical_xcs_ring_init(struct intel_engine_cs *engine);
|
||||
|
@ -537,10 +537,11 @@ void ib_unregister_device(struct ib_device *device)
|
||||
}
|
||||
up_read(&lists_rwsem);
|
||||
|
||||
mutex_unlock(&device_mutex);
|
||||
|
||||
ib_device_unregister_rdmacg(device);
|
||||
ib_device_unregister_sysfs(device);
|
||||
|
||||
mutex_unlock(&device_mutex);
|
||||
|
||||
ib_cache_cleanup_one(device);
|
||||
|
||||
ib_security_destroy_port_pkey_list(device);
|
||||
|
@ -1153,7 +1153,6 @@ static void ib_uverbs_free_hw_resources(struct ib_uverbs_device *uverbs_dev,
|
||||
kref_get(&file->ref);
|
||||
mutex_unlock(&uverbs_dev->lists_mutex);
|
||||
|
||||
ib_uverbs_event_handler(&file->event_handler, &event);
|
||||
|
||||
mutex_lock(&file->cleanup_mutex);
|
||||
ucontext = file->ucontext;
|
||||
@ -1170,6 +1169,7 @@ static void ib_uverbs_free_hw_resources(struct ib_uverbs_device *uverbs_dev,
|
||||
* for example due to freeing the resources
|
||||
* (e.g mmput).
|
||||
*/
|
||||
ib_uverbs_event_handler(&file->event_handler, &event);
|
||||
ib_dev->disassociate_ucontext(ucontext);
|
||||
mutex_lock(&file->cleanup_mutex);
|
||||
ib_uverbs_cleanup_ucontext(file, ucontext, true);
|
||||
|
@ -661,7 +661,7 @@ struct ib_mr *c4iw_alloc_mr(struct ib_pd *pd,
|
||||
rhp = php->rhp;
|
||||
|
||||
if (mr_type != IB_MR_TYPE_MEM_REG ||
|
||||
max_num_sg > t4_max_fr_depth(&rhp->rdev.lldi.ulptx_memwrite_dsgl &&
|
||||
max_num_sg > t4_max_fr_depth(rhp->rdev.lldi.ulptx_memwrite_dsgl &&
|
||||
use_dsgl))
|
||||
return ERR_PTR(-EINVAL);
|
||||
|
||||
|
@ -64,8 +64,10 @@ struct ib_ah *hns_roce_create_ah(struct ib_pd *ibpd,
|
||||
} else {
|
||||
u8 *dmac = rdma_ah_retrieve_dmac(ah_attr);
|
||||
|
||||
if (!dmac)
|
||||
if (!dmac) {
|
||||
kfree(ah);
|
||||
return ERR_PTR(-EINVAL);
|
||||
}
|
||||
memcpy(ah->av.mac, dmac, ETH_ALEN);
|
||||
}
|
||||
|
||||
|
@ -130,20 +130,32 @@ static enum i40iw_status_code i40iw_sc_parse_fpm_commit_buf(
|
||||
u64 base = 0;
|
||||
u32 i, j;
|
||||
u32 k = 0;
|
||||
u32 low;
|
||||
|
||||
/* copy base values in obj_info */
|
||||
for (i = I40IW_HMC_IW_QP, j = 0;
|
||||
i <= I40IW_HMC_IW_PBLE; i++, j += 8) {
|
||||
for (i = I40IW_HMC_IW_QP, j = 0; i <= I40IW_HMC_IW_PBLE; i++, j += 8) {
|
||||
if ((i == I40IW_HMC_IW_SRQ) ||
|
||||
(i == I40IW_HMC_IW_FSIMC) ||
|
||||
(i == I40IW_HMC_IW_FSIAV)) {
|
||||
info[i].base = 0;
|
||||
info[i].cnt = 0;
|
||||
continue;
|
||||
}
|
||||
get_64bit_val(buf, j, &temp);
|
||||
info[i].base = RS_64_1(temp, 32) * 512;
|
||||
if (info[i].base > base) {
|
||||
base = info[i].base;
|
||||
k = i;
|
||||
}
|
||||
low = (u32)(temp);
|
||||
if (low)
|
||||
info[i].cnt = low;
|
||||
if (i == I40IW_HMC_IW_APBVT_ENTRY) {
|
||||
info[i].cnt = 1;
|
||||
continue;
|
||||
}
|
||||
if (i == I40IW_HMC_IW_QP)
|
||||
info[i].cnt = (u32)RS_64(temp, I40IW_QUERY_FPM_MAX_QPS);
|
||||
else if (i == I40IW_HMC_IW_CQ)
|
||||
info[i].cnt = (u32)RS_64(temp, I40IW_QUERY_FPM_MAX_CQS);
|
||||
else
|
||||
info[i].cnt = (u32)(temp);
|
||||
}
|
||||
size = info[k].cnt * info[k].size + info[k].base;
|
||||
if (size & 0x1FFFFF)
|
||||
@ -154,6 +166,31 @@ static enum i40iw_status_code i40iw_sc_parse_fpm_commit_buf(
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* i40iw_sc_decode_fpm_query() - Decode a 64 bit value into max count and size
|
||||
* @buf: ptr to fpm query buffer
|
||||
* @buf_idx: index into buf
|
||||
* @info: ptr to i40iw_hmc_obj_info struct
|
||||
* @rsrc_idx: resource index into info
|
||||
*
|
||||
* Decode a 64 bit value from fpm query buffer into max count and size
|
||||
*/
|
||||
static u64 i40iw_sc_decode_fpm_query(u64 *buf,
|
||||
u32 buf_idx,
|
||||
struct i40iw_hmc_obj_info *obj_info,
|
||||
u32 rsrc_idx)
|
||||
{
|
||||
u64 temp;
|
||||
u32 size;
|
||||
|
||||
get_64bit_val(buf, buf_idx, &temp);
|
||||
obj_info[rsrc_idx].max_cnt = (u32)temp;
|
||||
size = (u32)RS_64_1(temp, 32);
|
||||
obj_info[rsrc_idx].size = LS_64_1(1, size);
|
||||
|
||||
return temp;
|
||||
}
|
||||
|
||||
/**
|
||||
* i40iw_sc_parse_fpm_query_buf() - parses fpm query buffer
|
||||
* @buf: ptr to fpm query buffer
|
||||
@ -168,9 +205,9 @@ static enum i40iw_status_code i40iw_sc_parse_fpm_query_buf(
|
||||
struct i40iw_hmc_info *hmc_info,
|
||||
struct i40iw_hmc_fpm_misc *hmc_fpm_misc)
|
||||
{
|
||||
u64 temp;
|
||||
struct i40iw_hmc_obj_info *obj_info;
|
||||
u32 i, j, size;
|
||||
u64 temp;
|
||||
u32 size;
|
||||
u16 max_pe_sds;
|
||||
|
||||
obj_info = hmc_info->hmc_obj;
|
||||
@ -185,41 +222,52 @@ static enum i40iw_status_code i40iw_sc_parse_fpm_query_buf(
|
||||
hmc_fpm_misc->max_sds = max_pe_sds;
|
||||
hmc_info->sd_table.sd_cnt = max_pe_sds + hmc_info->first_sd_index;
|
||||
|
||||
for (i = I40IW_HMC_IW_QP, j = 8;
|
||||
i <= I40IW_HMC_IW_ARP; i++, j += 8) {
|
||||
get_64bit_val(buf, j, &temp);
|
||||
if (i == I40IW_HMC_IW_QP)
|
||||
obj_info[i].max_cnt = (u32)RS_64(temp, I40IW_QUERY_FPM_MAX_QPS);
|
||||
else if (i == I40IW_HMC_IW_CQ)
|
||||
obj_info[i].max_cnt = (u32)RS_64(temp, I40IW_QUERY_FPM_MAX_CQS);
|
||||
else
|
||||
obj_info[i].max_cnt = (u32)temp;
|
||||
get_64bit_val(buf, 8, &temp);
|
||||
obj_info[I40IW_HMC_IW_QP].max_cnt = (u32)RS_64(temp, I40IW_QUERY_FPM_MAX_QPS);
|
||||
size = (u32)RS_64_1(temp, 32);
|
||||
obj_info[I40IW_HMC_IW_QP].size = LS_64_1(1, size);
|
||||
|
||||
size = (u32)RS_64_1(temp, 32);
|
||||
obj_info[i].size = ((u64)1 << size);
|
||||
}
|
||||
for (i = I40IW_HMC_IW_MR, j = 48;
|
||||
i <= I40IW_HMC_IW_PBLE; i++, j += 8) {
|
||||
get_64bit_val(buf, j, &temp);
|
||||
obj_info[i].max_cnt = (u32)temp;
|
||||
size = (u32)RS_64_1(temp, 32);
|
||||
obj_info[i].size = LS_64_1(1, size);
|
||||
}
|
||||
get_64bit_val(buf, 16, &temp);
|
||||
obj_info[I40IW_HMC_IW_CQ].max_cnt = (u32)RS_64(temp, I40IW_QUERY_FPM_MAX_CQS);
|
||||
size = (u32)RS_64_1(temp, 32);
|
||||
obj_info[I40IW_HMC_IW_CQ].size = LS_64_1(1, size);
|
||||
|
||||
i40iw_sc_decode_fpm_query(buf, 32, obj_info, I40IW_HMC_IW_HTE);
|
||||
i40iw_sc_decode_fpm_query(buf, 40, obj_info, I40IW_HMC_IW_ARP);
|
||||
|
||||
obj_info[I40IW_HMC_IW_APBVT_ENTRY].size = 8192;
|
||||
obj_info[I40IW_HMC_IW_APBVT_ENTRY].max_cnt = 1;
|
||||
|
||||
i40iw_sc_decode_fpm_query(buf, 48, obj_info, I40IW_HMC_IW_MR);
|
||||
i40iw_sc_decode_fpm_query(buf, 56, obj_info, I40IW_HMC_IW_XF);
|
||||
|
||||
get_64bit_val(buf, 120, &temp);
|
||||
hmc_fpm_misc->max_ceqs = (u8)RS_64(temp, I40IW_QUERY_FPM_MAX_CEQS);
|
||||
get_64bit_val(buf, 120, &temp);
|
||||
hmc_fpm_misc->ht_multiplier = RS_64(temp, I40IW_QUERY_FPM_HTMULTIPLIER);
|
||||
get_64bit_val(buf, 120, &temp);
|
||||
hmc_fpm_misc->timer_bucket = RS_64(temp, I40IW_QUERY_FPM_TIMERBUCKET);
|
||||
get_64bit_val(buf, 64, &temp);
|
||||
obj_info[I40IW_HMC_IW_XFFL].max_cnt = (u32)temp;
|
||||
obj_info[I40IW_HMC_IW_XFFL].size = 4;
|
||||
hmc_fpm_misc->xf_block_size = RS_64(temp, I40IW_QUERY_FPM_XFBLOCKSIZE);
|
||||
if (!hmc_fpm_misc->xf_block_size)
|
||||
return I40IW_ERR_INVALID_SIZE;
|
||||
|
||||
i40iw_sc_decode_fpm_query(buf, 72, obj_info, I40IW_HMC_IW_Q1);
|
||||
|
||||
get_64bit_val(buf, 80, &temp);
|
||||
obj_info[I40IW_HMC_IW_Q1FL].max_cnt = (u32)temp;
|
||||
obj_info[I40IW_HMC_IW_Q1FL].size = 4;
|
||||
hmc_fpm_misc->q1_block_size = RS_64(temp, I40IW_QUERY_FPM_Q1BLOCKSIZE);
|
||||
if (!hmc_fpm_misc->q1_block_size)
|
||||
return I40IW_ERR_INVALID_SIZE;
|
||||
|
||||
i40iw_sc_decode_fpm_query(buf, 88, obj_info, I40IW_HMC_IW_TIMER);
|
||||
|
||||
get_64bit_val(buf, 112, &temp);
|
||||
obj_info[I40IW_HMC_IW_PBLE].max_cnt = (u32)temp;
|
||||
obj_info[I40IW_HMC_IW_PBLE].size = 8;
|
||||
|
||||
get_64bit_val(buf, 120, &temp);
|
||||
hmc_fpm_misc->max_ceqs = (u8)RS_64(temp, I40IW_QUERY_FPM_MAX_CEQS);
|
||||
hmc_fpm_misc->ht_multiplier = RS_64(temp, I40IW_QUERY_FPM_HTMULTIPLIER);
|
||||
hmc_fpm_misc->timer_bucket = RS_64(temp, I40IW_QUERY_FPM_TIMERBUCKET);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -3392,13 +3440,6 @@ enum i40iw_status_code i40iw_sc_init_iw_hmc(struct i40iw_sc_dev *dev, u8 hmc_fn_
|
||||
hmc_info->sd_table.sd_entry = virt_mem.va;
|
||||
}
|
||||
|
||||
/* fill size of objects which are fixed */
|
||||
hmc_info->hmc_obj[I40IW_HMC_IW_XFFL].size = 4;
|
||||
hmc_info->hmc_obj[I40IW_HMC_IW_Q1FL].size = 4;
|
||||
hmc_info->hmc_obj[I40IW_HMC_IW_PBLE].size = 8;
|
||||
hmc_info->hmc_obj[I40IW_HMC_IW_APBVT_ENTRY].size = 8192;
|
||||
hmc_info->hmc_obj[I40IW_HMC_IW_APBVT_ENTRY].max_cnt = 1;
|
||||
|
||||
return ret_code;
|
||||
}
|
||||
|
||||
@ -4840,7 +4881,7 @@ void i40iw_vsi_stats_free(struct i40iw_sc_vsi *vsi)
|
||||
{
|
||||
u8 fcn_id = vsi->fcn_id;
|
||||
|
||||
if ((vsi->stats_fcn_id_alloc) && (fcn_id != I40IW_INVALID_FCN_ID))
|
||||
if (vsi->stats_fcn_id_alloc && fcn_id < I40IW_MAX_STATS_COUNT)
|
||||
vsi->dev->fcn_id_array[fcn_id] = false;
|
||||
i40iw_hw_stats_stop_timer(vsi);
|
||||
}
|
||||
|
@ -1507,8 +1507,8 @@ enum {
|
||||
I40IW_CQ0_ALIGNMENT_MASK = (256 - 1),
|
||||
I40IW_HOST_CTX_ALIGNMENT_MASK = (4 - 1),
|
||||
I40IW_SHADOWAREA_MASK = (128 - 1),
|
||||
I40IW_FPM_QUERY_BUF_ALIGNMENT_MASK = 0,
|
||||
I40IW_FPM_COMMIT_BUF_ALIGNMENT_MASK = 0
|
||||
I40IW_FPM_QUERY_BUF_ALIGNMENT_MASK = (4 - 1),
|
||||
I40IW_FPM_COMMIT_BUF_ALIGNMENT_MASK = (4 - 1)
|
||||
};
|
||||
|
||||
enum i40iw_alignment {
|
||||
|
@ -685,7 +685,7 @@ static enum i40iw_status_code i40iw_puda_cq_create(struct i40iw_puda_rsrc *rsrc)
|
||||
cqsize = rsrc->cq_size * (sizeof(struct i40iw_cqe));
|
||||
tsize = cqsize + sizeof(struct i40iw_cq_shadow_area);
|
||||
ret = i40iw_allocate_dma_mem(dev->hw, &rsrc->cqmem, tsize,
|
||||
I40IW_CQ0_ALIGNMENT_MASK);
|
||||
I40IW_CQ0_ALIGNMENT);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
|
@ -62,7 +62,7 @@ enum i40iw_status_code {
|
||||
I40IW_ERR_INVALID_ALIGNMENT = -23,
|
||||
I40IW_ERR_FLUSHED_QUEUE = -24,
|
||||
I40IW_ERR_INVALID_PUSH_PAGE_INDEX = -25,
|
||||
I40IW_ERR_INVALID_IMM_DATA_SIZE = -26,
|
||||
I40IW_ERR_INVALID_INLINE_DATA_SIZE = -26,
|
||||
I40IW_ERR_TIMEOUT = -27,
|
||||
I40IW_ERR_OPCODE_MISMATCH = -28,
|
||||
I40IW_ERR_CQP_COMPL_ERROR = -29,
|
||||
|
@ -435,7 +435,7 @@ static enum i40iw_status_code i40iw_inline_rdma_write(struct i40iw_qp_uk *qp,
|
||||
|
||||
op_info = &info->op.inline_rdma_write;
|
||||
if (op_info->len > I40IW_MAX_INLINE_DATA_SIZE)
|
||||
return I40IW_ERR_INVALID_IMM_DATA_SIZE;
|
||||
return I40IW_ERR_INVALID_INLINE_DATA_SIZE;
|
||||
|
||||
ret_code = i40iw_inline_data_size_to_wqesize(op_info->len, &wqe_size);
|
||||
if (ret_code)
|
||||
@ -511,7 +511,7 @@ static enum i40iw_status_code i40iw_inline_send(struct i40iw_qp_uk *qp,
|
||||
|
||||
op_info = &info->op.inline_send;
|
||||
if (op_info->len > I40IW_MAX_INLINE_DATA_SIZE)
|
||||
return I40IW_ERR_INVALID_IMM_DATA_SIZE;
|
||||
return I40IW_ERR_INVALID_INLINE_DATA_SIZE;
|
||||
|
||||
ret_code = i40iw_inline_data_size_to_wqesize(op_info->len, &wqe_size);
|
||||
if (ret_code)
|
||||
@ -784,7 +784,7 @@ static enum i40iw_status_code i40iw_cq_poll_completion(struct i40iw_cq_uk *cq,
|
||||
get_64bit_val(cqe, 0, &qword0);
|
||||
get_64bit_val(cqe, 16, &qword2);
|
||||
|
||||
info->tcp_seq_num = (u8)RS_64(qword0, I40IWCQ_TCPSEQNUM);
|
||||
info->tcp_seq_num = (u32)RS_64(qword0, I40IWCQ_TCPSEQNUM);
|
||||
|
||||
info->qp_id = (u32)RS_64(qword2, I40IWCQ_QPID);
|
||||
|
||||
@ -1187,7 +1187,7 @@ enum i40iw_status_code i40iw_inline_data_size_to_wqesize(u32 data_size,
|
||||
u8 *wqe_size)
|
||||
{
|
||||
if (data_size > I40IW_MAX_INLINE_DATA_SIZE)
|
||||
return I40IW_ERR_INVALID_IMM_DATA_SIZE;
|
||||
return I40IW_ERR_INVALID_INLINE_DATA_SIZE;
|
||||
|
||||
if (data_size <= 16)
|
||||
*wqe_size = I40IW_QP_WQE_MIN_SIZE;
|
||||
|
@ -65,13 +65,28 @@ int pvrdma_req_notify_cq(struct ib_cq *ibcq,
|
||||
struct pvrdma_dev *dev = to_vdev(ibcq->device);
|
||||
struct pvrdma_cq *cq = to_vcq(ibcq);
|
||||
u32 val = cq->cq_handle;
|
||||
unsigned long flags;
|
||||
int has_data = 0;
|
||||
|
||||
val |= (notify_flags & IB_CQ_SOLICITED_MASK) == IB_CQ_SOLICITED ?
|
||||
PVRDMA_UAR_CQ_ARM_SOL : PVRDMA_UAR_CQ_ARM;
|
||||
|
||||
spin_lock_irqsave(&cq->cq_lock, flags);
|
||||
|
||||
pvrdma_write_uar_cq(dev, val);
|
||||
|
||||
return 0;
|
||||
if (notify_flags & IB_CQ_REPORT_MISSED_EVENTS) {
|
||||
unsigned int head;
|
||||
|
||||
has_data = pvrdma_idx_ring_has_data(&cq->ring_state->rx,
|
||||
cq->ibcq.cqe, &head);
|
||||
if (unlikely(has_data == PVRDMA_INVALID_IDX))
|
||||
dev_err(&dev->pdev->dev, "CQ ring state invalid\n");
|
||||
}
|
||||
|
||||
spin_unlock_irqrestore(&cq->cq_lock, flags);
|
||||
|
||||
return has_data;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1248,6 +1248,10 @@ static const struct acpi_device_id elan_acpi_id[] = {
|
||||
{ "ELAN0100", 0 },
|
||||
{ "ELAN0600", 0 },
|
||||
{ "ELAN0605", 0 },
|
||||
{ "ELAN0608", 0 },
|
||||
{ "ELAN0605", 0 },
|
||||
{ "ELAN0609", 0 },
|
||||
{ "ELAN060B", 0 },
|
||||
{ "ELAN1000", 0 },
|
||||
{ }
|
||||
};
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user