mirror of
https://github.com/torvalds/linux.git
synced 2026-06-07 05:55:44 +02:00
Linux 5.8-rc5
-----BEGIN PGP SIGNATURE----- iQFSBAABCAA8FiEEq68RxlopcLEwq+PEeb4+QwBBGIYFAl8LnhoeHHRvcnZhbGRz QGxpbnV4LWZvdW5kYXRpb24ub3JnAAoJEHm+PkMAQRiGIOAH/jkWTYOGhrHEYy8A lOPz5JszK6XbG4+KPYsNZpZmB9pHO3mlnGVFzL1+nKG4RwheYW+sfjICVRMWiJeY 3N1ZvxisgK8E3F/VGOhIOLLQkddUns9VD1F6okYTfnIMmMwynI9Qd2Rk4MSusNv6 wxeAHS1+mgZo2F29N1zkssSUClwBvEe6q797Oeym0n1QSF5o7H9Ufj+pucaiZhLy 1VHIO7Sdo0oK4Bu2mOe5ucsz6KaXPaav8fRVc9ZOKwm/oA3ffbrZH3HO8z7O8Y56 ilZciWpFyaFmMVIB+6RaRv5FdJDG2lZtXr3S9Orqr/R77Y9/maYgB2P6c1toDbMC dEtOvh0= =VlHj -----END PGP SIGNATURE----- Merge 5.8-rc5 into android-mainline Linux 5.8-rc5 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: I0604003a73d4691fe7e3f78cb51d6605f5ac8f4a
This commit is contained in:
commit
6c201957b6
5
.mailmap
5
.mailmap
|
|
@ -90,11 +90,16 @@ Frank Rowand <frowand.list@gmail.com> <frank.rowand@sonymobile.com>
|
|||
Frank Zago <fzago@systemfabricworks.com>
|
||||
Gao Xiang <xiang@kernel.org> <gaoxiang25@huawei.com>
|
||||
Gao Xiang <xiang@kernel.org> <hsiangkao@aol.com>
|
||||
Gerald Schaefer <gerald.schaefer@linux.ibm.com> <gerald.schaefer@de.ibm.com>
|
||||
Gerald Schaefer <gerald.schaefer@linux.ibm.com> <geraldsc@de.ibm.com>
|
||||
Gerald Schaefer <gerald.schaefer@linux.ibm.com> <geraldsc@linux.vnet.ibm.com>
|
||||
Greg Kroah-Hartman <greg@echidna.(none)>
|
||||
Greg Kroah-Hartman <gregkh@suse.de>
|
||||
Greg Kroah-Hartman <greg@kroah.com>
|
||||
Gregory CLEMENT <gregory.clement@bootlin.com> <gregory.clement@free-electrons.com>
|
||||
Hanjun Guo <guohanjun@huawei.com> <hanjun.guo@linaro.org>
|
||||
Heiko Carstens <hca@linux.ibm.com> <h.carstens@de.ibm.com>
|
||||
Heiko Carstens <hca@linux.ibm.com> <heiko.carstens@de.ibm.com>
|
||||
Henk Vergonet <Henk.Vergonet@gmail.com>
|
||||
Henrik Kretzschmar <henne@nachtwindheim.de>
|
||||
Henrik Rydberg <rydberg@bitmath.org>
|
||||
|
|
|
|||
|
|
@ -258,7 +258,7 @@ Configuring the kernel
|
|||
Compiling the kernel
|
||||
--------------------
|
||||
|
||||
- Make sure you have at least gcc 4.6 available.
|
||||
- Make sure you have at least gcc 4.9 available.
|
||||
For more information, refer to :ref:`Documentation/process/changes.rst <changes>`.
|
||||
|
||||
Please note that you can still run a.out user programs with this kernel.
|
||||
|
|
|
|||
|
|
@ -171,6 +171,7 @@ infrastructure:
|
|||
|
||||
|
||||
3) ID_AA64PFR1_EL1 - Processor Feature Register 1
|
||||
|
||||
+------------------------------+---------+---------+
|
||||
| Name | bits | visible |
|
||||
+------------------------------+---------+---------+
|
||||
|
|
@ -181,6 +182,7 @@ infrastructure:
|
|||
|
||||
|
||||
4) MIDR_EL1 - Main ID Register
|
||||
|
||||
+------------------------------+---------+---------+
|
||||
| Name | bits | visible |
|
||||
+------------------------------+---------+---------+
|
||||
|
|
|
|||
|
|
@ -492,13 +492,6 @@ set max_budget to higher values than those to which BFQ would have set
|
|||
it with auto-tuning. An alternative way to achieve this goal is to
|
||||
just increase the value of timeout_sync, leaving max_budget equal to 0.
|
||||
|
||||
weights
|
||||
-------
|
||||
|
||||
Read-only parameter, used to show the weights of the currently active
|
||||
BFQ queues.
|
||||
|
||||
|
||||
4. Group scheduling with BFQ
|
||||
============================
|
||||
|
||||
|
|
@ -566,7 +559,7 @@ Parameters to set
|
|||
For each group, there is only the following parameter to set.
|
||||
|
||||
weight (namely blkio.bfq.weight or io.bfq-weight): the weight of the
|
||||
group inside its parent. Available values: 1..10000 (default 100). The
|
||||
group inside its parent. Available values: 1..1000 (default 100). The
|
||||
linear mapping between ioprio and weights, described at the beginning
|
||||
of the tunable section, is still valid, but all weights higher than
|
||||
IOPRIO_BE_NR*10 are mapped to ioprio 0.
|
||||
|
|
|
|||
|
|
@ -204,6 +204,14 @@ Returns the maximum size of a mapping for the device. The size parameter
|
|||
of the mapping functions like dma_map_single(), dma_map_page() and
|
||||
others should not be larger than the returned value.
|
||||
|
||||
::
|
||||
|
||||
bool
|
||||
dma_need_sync(struct device *dev, dma_addr_t dma_addr);
|
||||
|
||||
Returns %true if dma_sync_single_for_{device,cpu} calls are required to
|
||||
transfer memory ownership. Returns %false if those calls can be skipped.
|
||||
|
||||
::
|
||||
|
||||
unsigned long
|
||||
|
|
|
|||
|
|
@ -434,7 +434,7 @@ can set up your network then:
|
|||
ifconfig arc0 insight
|
||||
route add insight arc0
|
||||
route add freedom arc0 /* I would use the subnet here (like I said
|
||||
to to in "single protocol" above),
|
||||
to in "single protocol" above),
|
||||
but the rest of the subnet
|
||||
unfortunately lies across the PPP
|
||||
link on freedom, which confuses
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ AX.25
|
|||
|
||||
To use the amateur radio protocols within Linux you will need to get a
|
||||
suitable copy of the AX.25 Utilities. More detailed information about
|
||||
AX.25, NET/ROM and ROSE, associated programs and and utilities can be
|
||||
AX.25, NET/ROM and ROSE, associated programs and utilities can be
|
||||
found on http://www.linux-ax25.org.
|
||||
|
||||
There is an active mailing list for discussing Linux amateur radio matters
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ UCAN_COMMAND_SET_BITTIMING
|
|||
|
||||
*Host2Dev; mandatory*
|
||||
|
||||
Setup bittiming by sending the the structure
|
||||
Setup bittiming by sending the structure
|
||||
``ucan_ctl_payload_t.cmd_set_bittiming`` (see ``struct bittiming`` for
|
||||
details)
|
||||
|
||||
|
|
@ -232,7 +232,7 @@ UCAN_IN_TX_COMPLETE
|
|||
zero
|
||||
|
||||
The CAN device has sent a message to the CAN bus. It answers with a
|
||||
list of of tuples <echo-ids, flags>.
|
||||
list of tuples <echo-ids, flags>.
|
||||
|
||||
The echo-id identifies the frame from (echos the id from a previous
|
||||
UCAN_OUT_TX message). The flag indicates the result of the
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ Ethernet switch.
|
|||
Networking stack hooks
|
||||
----------------------
|
||||
|
||||
When a master netdev is used with DSA, a small hook is placed in in the
|
||||
When a master netdev is used with DSA, a small hook is placed in the
|
||||
networking stack is in order to have the DSA subsystem process the Ethernet
|
||||
switch specific tagging protocol. DSA accomplishes this by registering a
|
||||
specific (and fake) Ethernet type (later becoming ``skb->protocol``) with the
|
||||
|
|
|
|||
|
|
@ -741,7 +741,7 @@ tcp_fastopen - INTEGER
|
|||
|
||||
Default: 0x1
|
||||
|
||||
Note that that additional client or server features are only
|
||||
Note that additional client or server features are only
|
||||
effective if the basic support (0x1 and 0x2) are enabled respectively.
|
||||
|
||||
tcp_fastopen_blackhole_timeout_sec - INTEGER
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ drop_entry - INTEGER
|
|||
modes (when there is no enough available memory, the strategy
|
||||
is enabled and the variable is automatically set to 2,
|
||||
otherwise the strategy is disabled and the variable is set to
|
||||
1), and 3 means that that the strategy is always enabled.
|
||||
1), and 3 means that the strategy is always enabled.
|
||||
|
||||
drop_packet - INTEGER
|
||||
- 0 - disabled (default)
|
||||
|
|
|
|||
|
|
@ -186,7 +186,7 @@ About the AF_RXRPC driver:
|
|||
time [tunable] after the last connection using it discarded, in case a new
|
||||
connection is made that could use it.
|
||||
|
||||
(#) A client-side connection is only shared between calls if they have have
|
||||
(#) A client-side connection is only shared between calls if they have
|
||||
the same key struct describing their security (and assuming the calls
|
||||
would otherwise share the connection). Non-secured calls would also be
|
||||
able to share connections with each other.
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ you probably needn't concern yourself with pcmciautils.
|
|||
====================== =============== ========================================
|
||||
Program Minimal version Command to check the version
|
||||
====================== =============== ========================================
|
||||
GNU C 4.8 gcc --version
|
||||
GNU C 4.9 gcc --version
|
||||
GNU make 3.81 make --version
|
||||
binutils 2.23 ld -v
|
||||
flex 2.5.35 flex --version
|
||||
|
|
|
|||
|
|
@ -319,6 +319,26 @@ If you are afraid to mix up your local variable names, you have another
|
|||
problem, which is called the function-growth-hormone-imbalance syndrome.
|
||||
See chapter 6 (Functions).
|
||||
|
||||
For symbol names and documentation, avoid introducing new usage of
|
||||
'master / slave' (or 'slave' independent of 'master') and 'blacklist /
|
||||
whitelist'.
|
||||
|
||||
Recommended replacements for 'master / slave' are:
|
||||
'{primary,main} / {secondary,replica,subordinate}'
|
||||
'{initiator,requester} / {target,responder}'
|
||||
'{controller,host} / {device,worker,proxy}'
|
||||
'leader / follower'
|
||||
'director / performer'
|
||||
|
||||
Recommended replacements for 'blacklist/whitelist' are:
|
||||
'denylist / allowlist'
|
||||
'blocklist / passlist'
|
||||
|
||||
Exceptions for introducing new usage is to maintain a userspace ABI/API,
|
||||
or when updating code for an existing (as of 2020) hardware or protocol
|
||||
specification that mandates those terms. For new specifications
|
||||
translate specification usage of the terminology to the kernel coding
|
||||
standard where possible.
|
||||
|
||||
5) Typedefs
|
||||
-----------
|
||||
|
|
|
|||
|
|
@ -4339,14 +4339,15 @@ Errors:
|
|||
#define KVM_STATE_VMX_PREEMPTION_TIMER_DEADLINE 0x00000001
|
||||
|
||||
struct kvm_vmx_nested_state_hdr {
|
||||
__u32 flags;
|
||||
__u64 vmxon_pa;
|
||||
__u64 vmcs12_pa;
|
||||
__u64 preemption_timer_deadline;
|
||||
|
||||
struct {
|
||||
__u16 flags;
|
||||
} smm;
|
||||
|
||||
__u32 flags;
|
||||
__u64 preemption_timer_deadline;
|
||||
};
|
||||
|
||||
struct kvm_vmx_nested_state_data {
|
||||
|
|
|
|||
|
|
@ -2929,6 +2929,7 @@ F: include/uapi/linux/atm*
|
|||
|
||||
ATMEL MACB ETHERNET DRIVER
|
||||
M: Nicolas Ferre <nicolas.ferre@microchip.com>
|
||||
M: Claudiu Beznea <claudiu.beznea@microchip.com>
|
||||
S: Supported
|
||||
F: drivers/net/ethernet/cadence/
|
||||
|
||||
|
|
@ -3306,7 +3307,7 @@ X: arch/riscv/net/bpf_jit_comp32.c
|
|||
|
||||
BPF JIT for S390
|
||||
M: Ilya Leoshkevich <iii@linux.ibm.com>
|
||||
M: Heiko Carstens <heiko.carstens@de.ibm.com>
|
||||
M: Heiko Carstens <hca@linux.ibm.com>
|
||||
M: Vasily Gorbik <gor@linux.ibm.com>
|
||||
L: netdev@vger.kernel.org
|
||||
L: bpf@vger.kernel.org
|
||||
|
|
@ -14837,7 +14838,7 @@ S: Maintained
|
|||
F: drivers/video/fbdev/savage/
|
||||
|
||||
S390
|
||||
M: Heiko Carstens <heiko.carstens@de.ibm.com>
|
||||
M: Heiko Carstens <hca@linux.ibm.com>
|
||||
M: Vasily Gorbik <gor@linux.ibm.com>
|
||||
M: Christian Borntraeger <borntraeger@de.ibm.com>
|
||||
L: linux-s390@vger.kernel.org
|
||||
|
|
@ -14868,7 +14869,7 @@ F: drivers/s390/block/dasd*
|
|||
F: include/linux/dasd_mod.h
|
||||
|
||||
S390 IOMMU (PCI)
|
||||
M: Gerald Schaefer <gerald.schaefer@de.ibm.com>
|
||||
M: Gerald Schaefer <gerald.schaefer@linux.ibm.com>
|
||||
L: linux-s390@vger.kernel.org
|
||||
S: Supported
|
||||
W: http://www.ibm.com/developerworks/linux/linux390/
|
||||
|
|
@ -14896,7 +14897,7 @@ F: drivers/s390/net/
|
|||
|
||||
S390 PCI SUBSYSTEM
|
||||
M: Niklas Schnelle <schnelle@linux.ibm.com>
|
||||
M: Gerald Schaefer <gerald.schaefer@de.ibm.com>
|
||||
M: Gerald Schaefer <gerald.schaefer@linux.ibm.com>
|
||||
L: linux-s390@vger.kernel.org
|
||||
S: Supported
|
||||
W: http://www.ibm.com/developerworks/linux/linux390/
|
||||
|
|
|
|||
2
Makefile
2
Makefile
|
|
@ -2,7 +2,7 @@
|
|||
VERSION = 5
|
||||
PATCHLEVEL = 8
|
||||
SUBLEVEL = 0
|
||||
EXTRAVERSION = -rc4
|
||||
EXTRAVERSION = -rc5
|
||||
NAME = Kleptomaniac Octopus
|
||||
|
||||
# *DOCUMENTATION*
|
||||
|
|
|
|||
|
|
@ -170,6 +170,15 @@ config ARC_CPU_HS
|
|||
|
||||
endchoice
|
||||
|
||||
config ARC_TUNE_MCPU
|
||||
string "Override default -mcpu compiler flag"
|
||||
default ""
|
||||
help
|
||||
Override default -mcpu=xxx compiler flag (which is set depending on
|
||||
the ISA version) with the specified value.
|
||||
NOTE: If specified flag isn't supported by current compiler the
|
||||
ISA default value will be used as a fallback.
|
||||
|
||||
config CPU_BIG_ENDIAN
|
||||
bool "Enable Big Endian Mode"
|
||||
help
|
||||
|
|
@ -465,6 +474,12 @@ config ARC_IRQ_NO_AUTOSAVE
|
|||
This is programmable and can be optionally disabled in which case
|
||||
software INTERRUPT_PROLOGUE/EPILGUE do the needed work
|
||||
|
||||
config ARC_LPB_DISABLE
|
||||
bool "Disable loop buffer (LPB)"
|
||||
help
|
||||
On HS cores, loop buffer (LPB) is programmable in runtime and can
|
||||
be optionally disabled.
|
||||
|
||||
endif # ISA_ARCV2
|
||||
|
||||
endmenu # "ARC CPU Configuration"
|
||||
|
|
|
|||
|
|
@ -10,8 +10,25 @@ CROSS_COMPILE := $(call cc-cross-prefix, arc-linux- arceb-linux-)
|
|||
endif
|
||||
|
||||
cflags-y += -fno-common -pipe -fno-builtin -mmedium-calls -D__linux__
|
||||
cflags-$(CONFIG_ISA_ARCOMPACT) += -mA7
|
||||
cflags-$(CONFIG_ISA_ARCV2) += -mcpu=hs38
|
||||
|
||||
tune-mcpu-def-$(CONFIG_ISA_ARCOMPACT) := -mcpu=arc700
|
||||
tune-mcpu-def-$(CONFIG_ISA_ARCV2) := -mcpu=hs38
|
||||
|
||||
ifeq ($(CONFIG_ARC_TUNE_MCPU),"")
|
||||
cflags-y += $(tune-mcpu-def-y)
|
||||
else
|
||||
tune-mcpu := $(shell echo $(CONFIG_ARC_TUNE_MCPU))
|
||||
tune-mcpu-ok := $(call cc-option-yn, $(tune-mcpu))
|
||||
ifeq ($(tune-mcpu-ok),y)
|
||||
cflags-y += $(tune-mcpu)
|
||||
else
|
||||
# The flag provided by 'CONFIG_ARC_TUNE_MCPU' option isn't known by this compiler
|
||||
# (probably the compiler is too old). Use ISA default mcpu flag instead as a safe option.
|
||||
$(warning ** WARNING ** CONFIG_ARC_TUNE_MCPU flag '$(tune-mcpu)' is unknown, fallback to '$(tune-mcpu-def-y)')
|
||||
cflags-y += $(tune-mcpu-def-y)
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
ifdef CONFIG_ARC_CURR_IN_REG
|
||||
# For a global register defintion, make sure it gets passed to every file
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
#define R_ARC_32_PCREL 0x31
|
||||
|
||||
/*to set parameters in the core dumps */
|
||||
#define ELF_ARCH EM_ARCOMPACT
|
||||
#define ELF_ARCH EM_ARC_INUSE
|
||||
#define ELF_CLASS ELFCLASS32
|
||||
|
||||
#ifdef CONFIG_CPU_BIG_ENDIAN
|
||||
|
|
|
|||
|
|
@ -90,6 +90,9 @@ static inline void arch_local_irq_restore(unsigned long flags)
|
|||
/*
|
||||
* Unconditionally Enable IRQs
|
||||
*/
|
||||
#ifdef CONFIG_ARC_COMPACT_IRQ_LEVELS
|
||||
extern void arch_local_irq_enable(void);
|
||||
#else
|
||||
static inline void arch_local_irq_enable(void)
|
||||
{
|
||||
unsigned long temp;
|
||||
|
|
@ -102,7 +105,7 @@ static inline void arch_local_irq_enable(void)
|
|||
: "n"((STATUS_E1_MASK | STATUS_E2_MASK))
|
||||
: "cc", "memory");
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Unconditionally Disable IRQs
|
||||
|
|
|
|||
|
|
@ -165,7 +165,6 @@ END(EV_Extension)
|
|||
tracesys:
|
||||
; save EFA in case tracer wants the PC of traced task
|
||||
; using ERET won't work since next-PC has already committed
|
||||
lr r12, [efa]
|
||||
GET_CURR_TASK_FIELD_PTR TASK_THREAD, r11
|
||||
st r12, [r11, THREAD_FAULT_ADDR] ; thread.fault_address
|
||||
|
||||
|
|
@ -208,15 +207,9 @@ tracesys_exit:
|
|||
; Breakpoint TRAP
|
||||
; ---------------------------------------------
|
||||
trap_with_param:
|
||||
|
||||
; stop_pc info by gdb needs this info
|
||||
lr r0, [efa]
|
||||
mov r0, r12 ; EFA in case ptracer/gdb wants stop_pc
|
||||
mov r1, sp
|
||||
|
||||
; Now that we have read EFA, it is safe to do "fake" rtie
|
||||
; and get out of CPU exception mode
|
||||
FAKE_RET_FROM_EXCPN
|
||||
|
||||
; Save callee regs in case gdb wants to have a look
|
||||
; SP will grow up by size of CALLEE Reg-File
|
||||
; NOTE: clobbers r12
|
||||
|
|
@ -243,6 +236,10 @@ ENTRY(EV_Trap)
|
|||
|
||||
EXCEPTION_PROLOGUE
|
||||
|
||||
lr r12, [efa]
|
||||
|
||||
FAKE_RET_FROM_EXCPN
|
||||
|
||||
;============ TRAP 1 :breakpoints
|
||||
; Check ECR for trap with arg (PROLOGUE ensures r10 has ECR)
|
||||
bmsk.f 0, r10, 7
|
||||
|
|
@ -250,9 +247,6 @@ ENTRY(EV_Trap)
|
|||
|
||||
;============ TRAP (no param): syscall top level
|
||||
|
||||
; First return from Exception to pure K mode (Exception/IRQs renabled)
|
||||
FAKE_RET_FROM_EXCPN
|
||||
|
||||
; If syscall tracing ongoing, invoke pre-post-hooks
|
||||
GET_CURR_THR_INFO_FLAGS r10
|
||||
btst r10, TIF_SYSCALL_TRACE
|
||||
|
|
|
|||
|
|
@ -59,6 +59,14 @@
|
|||
bclr r5, r5, STATUS_AD_BIT
|
||||
#endif
|
||||
kflag r5
|
||||
|
||||
#ifdef CONFIG_ARC_LPB_DISABLE
|
||||
lr r5, [ARC_REG_LPB_BUILD]
|
||||
breq r5, 0, 1f ; LPB doesn't exist
|
||||
mov r5, 1
|
||||
sr r5, [ARC_REG_LPB_CTRL]
|
||||
1:
|
||||
#endif /* CONFIG_ARC_LPB_DISABLE */
|
||||
#endif
|
||||
; Config DSP_CTRL properly, so kernel may use integer multiply,
|
||||
; multiply-accumulate, and divide operations
|
||||
|
|
|
|||
|
|
@ -58,10 +58,12 @@ static const struct id_to_str arc_legacy_rel[] = {
|
|||
{ 0x00, NULL }
|
||||
};
|
||||
|
||||
static const struct id_to_str arc_cpu_rel[] = {
|
||||
static const struct id_to_str arc_hs_ver54_rel[] = {
|
||||
/* UARCH.MAJOR, Release */
|
||||
{ 0, "R3.10a"},
|
||||
{ 1, "R3.50a"},
|
||||
{ 2, "R3.60a"},
|
||||
{ 3, "R4.00a"},
|
||||
{ 0xFF, NULL }
|
||||
};
|
||||
|
||||
|
|
@ -117,12 +119,6 @@ static void decode_arc_core(struct cpuinfo_arc *cpu)
|
|||
struct bcr_uarch_build_arcv2 uarch;
|
||||
const struct id_to_str *tbl;
|
||||
|
||||
/*
|
||||
* Up until (including) the first core4 release (0x54) things were
|
||||
* simple: AUX IDENTITY.ARCVER was sufficient to identify arc family
|
||||
* and release: 0x50 to 0x53 was HS38, 0x54 was HS48 (dual issue)
|
||||
*/
|
||||
|
||||
if (cpu->core.family < 0x54) { /* includes arc700 */
|
||||
|
||||
for (tbl = &arc_legacy_rel[0]; tbl->id != 0; tbl++) {
|
||||
|
|
@ -143,11 +139,10 @@ static void decode_arc_core(struct cpuinfo_arc *cpu)
|
|||
}
|
||||
|
||||
/*
|
||||
* However the subsequent HS release (same 0x54) allow HS38 or HS48
|
||||
* configurations and encode this info in a different BCR.
|
||||
* The BCR was introduced in 0x54 so can't be read unconditionally.
|
||||
* Initial HS cores bumped AUX IDENTITY.ARCVER for each release until
|
||||
* ARCVER 0x54 which introduced AUX MICRO_ARCH_BUILD and subsequent
|
||||
* releases only update it.
|
||||
*/
|
||||
|
||||
READ_BCR(ARC_REG_MICRO_ARCH_BCR, uarch);
|
||||
|
||||
if (uarch.prod == 4) {
|
||||
|
|
@ -158,7 +153,7 @@ static void decode_arc_core(struct cpuinfo_arc *cpu)
|
|||
cpu->name = "HS38";
|
||||
}
|
||||
|
||||
for (tbl = &arc_cpu_rel[0]; tbl->id != 0xFF; tbl++) {
|
||||
for (tbl = &arc_hs_ver54_rel[0]; tbl->id != 0xFF; tbl++) {
|
||||
if (uarch.maj == tbl->id) {
|
||||
cpu->release = tbl->str;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -31,15 +31,6 @@
|
|||
#if defined(__APCS_26__)
|
||||
#error Sorry, your compiler targets APCS-26 but this kernel requires APCS-32
|
||||
#endif
|
||||
/*
|
||||
* GCC 4.8.0-4.8.2: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58854
|
||||
* miscompiles find_get_entry(), and can result in EXT3 and EXT4
|
||||
* filesystem corruption (possibly other FS too).
|
||||
*/
|
||||
#if defined(GCC_VERSION) && GCC_VERSION >= 40800 && GCC_VERSION < 40803
|
||||
#error Your compiler is too buggy; it is known to miscompile kernels
|
||||
#error and result in filesystem corruption and oopses.
|
||||
#endif
|
||||
|
||||
int main(void)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ static inline u32 gic_read_pmr(void)
|
|||
return read_sysreg_s(SYS_ICC_PMR_EL1);
|
||||
}
|
||||
|
||||
static inline void gic_write_pmr(u32 val)
|
||||
static __always_inline void gic_write_pmr(u32 val)
|
||||
{
|
||||
write_sysreg_s(val, SYS_ICC_PMR_EL1);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@ struct arch_timer_erratum_workaround {
|
|||
u64 (*read_cntvct_el0)(void);
|
||||
int (*set_next_event_phys)(unsigned long, struct clock_event_device *);
|
||||
int (*set_next_event_virt)(unsigned long, struct clock_event_device *);
|
||||
bool disable_compat_vdso;
|
||||
};
|
||||
|
||||
DECLARE_PER_CPU(const struct arch_timer_erratum_workaround *,
|
||||
|
|
|
|||
|
|
@ -675,7 +675,7 @@ static inline bool system_supports_generic_auth(void)
|
|||
cpus_have_const_cap(ARM64_HAS_GENERIC_AUTH);
|
||||
}
|
||||
|
||||
static inline bool system_uses_irq_prio_masking(void)
|
||||
static __always_inline bool system_uses_irq_prio_masking(void)
|
||||
{
|
||||
return IS_ENABLED(CONFIG_ARM64_PSEUDO_NMI) &&
|
||||
cpus_have_const_cap(ARM64_HAS_IRQ_PRIO_MASKING);
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ extern bool arm64_use_ng_mappings;
|
|||
#define PAGE_HYP __pgprot(_HYP_PAGE_DEFAULT | PTE_HYP | PTE_HYP_XN)
|
||||
#define PAGE_HYP_EXEC __pgprot(_HYP_PAGE_DEFAULT | PTE_HYP | PTE_RDONLY)
|
||||
#define PAGE_HYP_RO __pgprot(_HYP_PAGE_DEFAULT | PTE_HYP | PTE_RDONLY | PTE_HYP_XN)
|
||||
#define PAGE_HYP_DEVICE __pgprot(PROT_DEVICE_nGnRE | PTE_HYP)
|
||||
#define PAGE_HYP_DEVICE __pgprot(_PROT_DEFAULT | PTE_ATTRINDX(MT_DEVICE_nGnRE) | PTE_HYP | PTE_HYP_XN)
|
||||
|
||||
#define PAGE_S2_MEMATTR(attr) \
|
||||
({ \
|
||||
|
|
|
|||
|
|
@ -2,7 +2,10 @@
|
|||
#ifndef __ASM_VDSOCLOCKSOURCE_H
|
||||
#define __ASM_VDSOCLOCKSOURCE_H
|
||||
|
||||
#define VDSO_ARCH_CLOCKMODES \
|
||||
VDSO_CLOCKMODE_ARCHTIMER
|
||||
#define VDSO_ARCH_CLOCKMODES \
|
||||
/* vdso clocksource for both 32 and 64bit tasks */ \
|
||||
VDSO_CLOCKMODE_ARCHTIMER, \
|
||||
/* vdso clocksource for 64bit tasks only */ \
|
||||
VDSO_CLOCKMODE_ARCHTIMER_NOCOMPAT
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ static __always_inline u64 __arch_get_hw_counter(s32 clock_mode)
|
|||
* update. Return something. Core will do another round and then
|
||||
* see the mode change and fallback to the syscall.
|
||||
*/
|
||||
if (clock_mode == VDSO_CLOCKMODE_NONE)
|
||||
if (clock_mode != VDSO_CLOCKMODE_ARCHTIMER)
|
||||
return 0;
|
||||
|
||||
/*
|
||||
|
|
@ -152,6 +152,12 @@ static __always_inline const struct vdso_data *__arch_get_vdso_data(void)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static inline bool vdso_clocksource_ok(const struct vdso_data *vd)
|
||||
{
|
||||
return vd->clock_mode == VDSO_CLOCKMODE_ARCHTIMER;
|
||||
}
|
||||
#define vdso_clocksource_ok vdso_clocksource_ok
|
||||
|
||||
#endif /* !__ASSEMBLY__ */
|
||||
|
||||
#endif /* __ASM_VDSO_GETTIMEOFDAY_H */
|
||||
|
|
|
|||
|
|
@ -43,20 +43,8 @@ bool alternative_is_applied(u16 cpufeature)
|
|||
*/
|
||||
static bool branch_insn_requires_update(struct alt_instr *alt, unsigned long pc)
|
||||
{
|
||||
unsigned long replptr;
|
||||
|
||||
if (kernel_text_address(pc))
|
||||
return true;
|
||||
|
||||
replptr = (unsigned long)ALT_REPL_PTR(alt);
|
||||
if (pc >= replptr && pc <= (replptr + alt->alt_len))
|
||||
return false;
|
||||
|
||||
/*
|
||||
* Branching into *another* alternate sequence is doomed, and
|
||||
* we're not even trying to fix it up.
|
||||
*/
|
||||
BUG();
|
||||
unsigned long replptr = (unsigned long)ALT_REPL_PTR(alt);
|
||||
return !(pc >= replptr && pc <= (replptr + alt->alt_len));
|
||||
}
|
||||
|
||||
#define align_down(x, a) ((unsigned long)(x) & ~(((unsigned long)(a)) - 1))
|
||||
|
|
|
|||
|
|
@ -782,6 +782,7 @@ static const struct midr_range erratum_1463225[] = {
|
|||
MIDR_RANGE(MIDR_CORTEX_A76, 0, 0, 3, 1),
|
||||
/* Kryo4xx Gold (rcpe to rfpf) => (r0p0 to r3p1) */
|
||||
MIDR_RANGE(MIDR_QCOM_KRYO_4XX_GOLD, 0xc, 0xe, 0xf, 0xf),
|
||||
{},
|
||||
};
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ static void notrace el1_dbg(struct pt_regs *regs, unsigned long esr)
|
|||
/*
|
||||
* The CPU masked interrupts, and we are leaving them masked during
|
||||
* do_debug_exception(). Update PMR as if we had called
|
||||
* local_mask_daif().
|
||||
* local_daif_mask().
|
||||
*/
|
||||
if (system_uses_irq_prio_masking())
|
||||
gic_write_pmr(GIC_PRIO_IRQON | GIC_PRIO_PSR_I_SET);
|
||||
|
|
|
|||
|
|
@ -126,8 +126,10 @@ alternative_else_nop_endif
|
|||
add \dst, \dst, #(\sym - .entry.tramp.text)
|
||||
.endm
|
||||
|
||||
// This macro corrupts x0-x3. It is the caller's duty
|
||||
// to save/restore them if required.
|
||||
/*
|
||||
* This macro corrupts x0-x3. It is the caller's duty to save/restore
|
||||
* them if required.
|
||||
*/
|
||||
.macro apply_ssbd, state, tmp1, tmp2
|
||||
#ifdef CONFIG_ARM64_SSBD
|
||||
alternative_cb arm64_enable_wa2_handling
|
||||
|
|
@ -167,13 +169,28 @@ alternative_cb_end
|
|||
stp x28, x29, [sp, #16 * 14]
|
||||
|
||||
.if \el == 0
|
||||
.if \regsize == 32
|
||||
/*
|
||||
* If we're returning from a 32-bit task on a system affected by
|
||||
* 1418040 then re-enable userspace access to the virtual counter.
|
||||
*/
|
||||
#ifdef CONFIG_ARM64_ERRATUM_1418040
|
||||
alternative_if ARM64_WORKAROUND_1418040
|
||||
mrs x0, cntkctl_el1
|
||||
orr x0, x0, #2 // ARCH_TIMER_USR_VCT_ACCESS_EN
|
||||
msr cntkctl_el1, x0
|
||||
alternative_else_nop_endif
|
||||
#endif
|
||||
.endif
|
||||
clear_gp_regs
|
||||
mrs x21, sp_el0
|
||||
ldr_this_cpu tsk, __entry_task, x20
|
||||
msr sp_el0, tsk
|
||||
|
||||
// Ensure MDSCR_EL1.SS is clear, since we can unmask debug exceptions
|
||||
// when scheduling.
|
||||
/*
|
||||
* Ensure MDSCR_EL1.SS is clear, since we can unmask debug exceptions
|
||||
* when scheduling.
|
||||
*/
|
||||
ldr x19, [tsk, #TSK_TI_FLAGS]
|
||||
disable_step_tsk x19, x20
|
||||
|
||||
|
|
@ -320,6 +337,14 @@ alternative_else_nop_endif
|
|||
tst x22, #PSR_MODE32_BIT // native task?
|
||||
b.eq 3f
|
||||
|
||||
#ifdef CONFIG_ARM64_ERRATUM_1418040
|
||||
alternative_if ARM64_WORKAROUND_1418040
|
||||
mrs x0, cntkctl_el1
|
||||
bic x0, x0, #2 // ARCH_TIMER_USR_VCT_ACCESS_EN
|
||||
msr cntkctl_el1, x0
|
||||
alternative_else_nop_endif
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ARM64_ERRATUM_845719
|
||||
alternative_if ARM64_WORKAROUND_845719
|
||||
#ifdef CONFIG_PID_IN_CONTEXTIDR
|
||||
|
|
@ -331,21 +356,6 @@ alternative_if ARM64_WORKAROUND_845719
|
|||
alternative_else_nop_endif
|
||||
#endif
|
||||
3:
|
||||
#ifdef CONFIG_ARM64_ERRATUM_1418040
|
||||
alternative_if_not ARM64_WORKAROUND_1418040
|
||||
b 4f
|
||||
alternative_else_nop_endif
|
||||
/*
|
||||
* if (x22.mode32 == cntkctl_el1.el0vcten)
|
||||
* cntkctl_el1.el0vcten = ~cntkctl_el1.el0vcten
|
||||
*/
|
||||
mrs x1, cntkctl_el1
|
||||
eon x0, x1, x22, lsr #3
|
||||
tbz x0, #1, 4f
|
||||
eor x1, x1, #2 // ARCH_TIMER_USR_VCT_ACCESS_EN
|
||||
msr cntkctl_el1, x1
|
||||
4:
|
||||
#endif
|
||||
scs_save tsk, x0
|
||||
|
||||
/* No kernel C function calls after this as user keys are set. */
|
||||
|
|
@ -377,11 +387,11 @@ alternative_else_nop_endif
|
|||
.if \el == 0
|
||||
alternative_insn eret, nop, ARM64_UNMAP_KERNEL_AT_EL0
|
||||
#ifdef CONFIG_UNMAP_KERNEL_AT_EL0
|
||||
bne 5f
|
||||
bne 4f
|
||||
msr far_el1, x30
|
||||
tramp_alias x30, tramp_exit_native
|
||||
br x30
|
||||
5:
|
||||
4:
|
||||
tramp_alias x30, tramp_exit_compat
|
||||
br x30
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -252,7 +252,7 @@ static int kgdb_step_brk_fn(struct pt_regs *regs, unsigned int esr)
|
|||
if (!kgdb_single_step)
|
||||
return DBG_HOOK_ERROR;
|
||||
|
||||
kgdb_handle_exception(1, SIGTRAP, 0, regs);
|
||||
kgdb_handle_exception(0, SIGTRAP, 0, regs);
|
||||
return DBG_HOOK_HANDLED;
|
||||
}
|
||||
NOKPROBE_SYMBOL(kgdb_step_brk_fn);
|
||||
|
|
|
|||
|
|
@ -136,11 +136,15 @@ SYM_CODE_START(__kvm_handle_stub_hvc)
|
|||
|
||||
1: cmp x0, #HVC_RESET_VECTORS
|
||||
b.ne 1f
|
||||
reset:
|
||||
|
||||
/*
|
||||
* Reset kvm back to the hyp stub. Do not clobber x0-x4 in
|
||||
* case we coming via HVC_SOFT_RESTART.
|
||||
* Set the HVC_RESET_VECTORS return code before entering the common
|
||||
* path so that we do not clobber x0-x2 in case we are coming via
|
||||
* HVC_SOFT_RESTART.
|
||||
*/
|
||||
mov x0, xzr
|
||||
reset:
|
||||
/* Reset kvm back to the hyp stub. */
|
||||
mrs x5, sctlr_el2
|
||||
mov_q x6, SCTLR_ELx_FLAGS
|
||||
bic x5, x5, x6 // Clear SCTL_M and etc
|
||||
|
|
@ -151,7 +155,6 @@ reset:
|
|||
/* Install stub vectors */
|
||||
adr_l x5, __hyp_stub_vectors
|
||||
msr vbar_el2, x5
|
||||
mov x0, xzr
|
||||
eret
|
||||
|
||||
1: /* Bad stub call */
|
||||
|
|
|
|||
|
|
@ -159,7 +159,10 @@ static void kvm_vcpu_pmu_disable_el0(unsigned long events)
|
|||
}
|
||||
|
||||
/*
|
||||
* On VHE ensure that only guest events have EL0 counting enabled
|
||||
* On VHE ensure that only guest events have EL0 counting enabled.
|
||||
* This is called from both vcpu_{load,put} and the sysreg handling.
|
||||
* Since the latter is preemptible, special care must be taken to
|
||||
* disable preemption.
|
||||
*/
|
||||
void kvm_vcpu_pmu_restore_guest(struct kvm_vcpu *vcpu)
|
||||
{
|
||||
|
|
@ -169,12 +172,14 @@ void kvm_vcpu_pmu_restore_guest(struct kvm_vcpu *vcpu)
|
|||
if (!has_vhe())
|
||||
return;
|
||||
|
||||
preempt_disable();
|
||||
host = this_cpu_ptr(&kvm_host_data);
|
||||
events_guest = host->pmu_events.events_guest;
|
||||
events_host = host->pmu_events.events_host;
|
||||
|
||||
kvm_vcpu_pmu_enable_el0(events_guest);
|
||||
kvm_vcpu_pmu_disable_el0(events_host);
|
||||
preempt_enable();
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
#include <linux/arm-smccc.h>
|
||||
#include <linux/kvm_host.h>
|
||||
#include <linux/sched/stat.h>
|
||||
|
||||
#include <asm/kvm_mmu.h>
|
||||
#include <asm/pvclock-abi.h>
|
||||
|
|
@ -73,6 +74,11 @@ gpa_t kvm_init_stolen_time(struct kvm_vcpu *vcpu)
|
|||
return base;
|
||||
}
|
||||
|
||||
static bool kvm_arm_pvtime_supported(void)
|
||||
{
|
||||
return !!sched_info_on();
|
||||
}
|
||||
|
||||
int kvm_arm_pvtime_set_attr(struct kvm_vcpu *vcpu,
|
||||
struct kvm_device_attr *attr)
|
||||
{
|
||||
|
|
@ -82,7 +88,8 @@ int kvm_arm_pvtime_set_attr(struct kvm_vcpu *vcpu,
|
|||
int ret = 0;
|
||||
int idx;
|
||||
|
||||
if (attr->attr != KVM_ARM_VCPU_PVTIME_IPA)
|
||||
if (!kvm_arm_pvtime_supported() ||
|
||||
attr->attr != KVM_ARM_VCPU_PVTIME_IPA)
|
||||
return -ENXIO;
|
||||
|
||||
if (get_user(ipa, user))
|
||||
|
|
@ -110,7 +117,8 @@ int kvm_arm_pvtime_get_attr(struct kvm_vcpu *vcpu,
|
|||
u64 __user *user = (u64 __user *)attr->addr;
|
||||
u64 ipa;
|
||||
|
||||
if (attr->attr != KVM_ARM_VCPU_PVTIME_IPA)
|
||||
if (!kvm_arm_pvtime_supported() ||
|
||||
attr->attr != KVM_ARM_VCPU_PVTIME_IPA)
|
||||
return -ENXIO;
|
||||
|
||||
ipa = vcpu->arch.steal.base;
|
||||
|
|
@ -125,7 +133,8 @@ int kvm_arm_pvtime_has_attr(struct kvm_vcpu *vcpu,
|
|||
{
|
||||
switch (attr->attr) {
|
||||
case KVM_ARM_VCPU_PVTIME_IPA:
|
||||
return 0;
|
||||
if (kvm_arm_pvtime_supported())
|
||||
return 0;
|
||||
}
|
||||
return -ENXIO;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -245,7 +245,7 @@ static int kvm_vcpu_enable_ptrauth(struct kvm_vcpu *vcpu)
|
|||
*/
|
||||
int kvm_reset_vcpu(struct kvm_vcpu *vcpu)
|
||||
{
|
||||
int ret = -EINVAL;
|
||||
int ret;
|
||||
bool loaded;
|
||||
u32 pstate;
|
||||
|
||||
|
|
@ -269,15 +269,19 @@ int kvm_reset_vcpu(struct kvm_vcpu *vcpu)
|
|||
|
||||
if (test_bit(KVM_ARM_VCPU_PTRAUTH_ADDRESS, vcpu->arch.features) ||
|
||||
test_bit(KVM_ARM_VCPU_PTRAUTH_GENERIC, vcpu->arch.features)) {
|
||||
if (kvm_vcpu_enable_ptrauth(vcpu))
|
||||
if (kvm_vcpu_enable_ptrauth(vcpu)) {
|
||||
ret = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
||||
switch (vcpu->arch.target) {
|
||||
default:
|
||||
if (test_bit(KVM_ARM_VCPU_EL1_32BIT, vcpu->arch.features)) {
|
||||
if (!cpus_have_const_cap(ARM64_HAS_32BIT_EL1))
|
||||
if (!cpus_have_const_cap(ARM64_HAS_32BIT_EL1)) {
|
||||
ret = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
pstate = VCPU_RESET_PSTATE_SVC;
|
||||
} else {
|
||||
pstate = VCPU_RESET_PSTATE_EL1;
|
||||
|
|
|
|||
|
|
@ -90,7 +90,15 @@ static irqreturn_t vgic_v4_doorbell_handler(int irq, void *info)
|
|||
!irqd_irq_disabled(&irq_to_desc(irq)->irq_data))
|
||||
disable_irq_nosync(irq);
|
||||
|
||||
/*
|
||||
* The v4.1 doorbell can fire concurrently with the vPE being
|
||||
* made non-resident. Ensure we only update pending_last
|
||||
* *after* the non-residency sequence has completed.
|
||||
*/
|
||||
raw_spin_lock(&vcpu->arch.vgic_cpu.vgic_v3.its_vpe.vpe_lock);
|
||||
vcpu->arch.vgic_cpu.vgic_v3.its_vpe.pending_last = true;
|
||||
raw_spin_unlock(&vcpu->arch.vgic_cpu.vgic_v3.its_vpe.vpe_lock);
|
||||
|
||||
kvm_make_request(KVM_REQ_IRQ_PENDING, vcpu);
|
||||
kvm_vcpu_kick(vcpu);
|
||||
|
||||
|
|
|
|||
|
|
@ -19,15 +19,13 @@
|
|||
\
|
||||
/* \
|
||||
* We can't unroll if the number of iterations isn't \
|
||||
* compile-time constant. Unfortunately GCC versions \
|
||||
* up until 4.6 tend to miss obvious constants & cause \
|
||||
* compile-time constant. Unfortunately clang versions \
|
||||
* up until 8.0 tend to miss obvious constants & cause \
|
||||
* this check to fail, even though they go on to \
|
||||
* generate reasonable code for the switch statement, \
|
||||
* so we skip the sanity check for those compilers. \
|
||||
*/ \
|
||||
BUILD_BUG_ON((CONFIG_GCC_VERSION >= 40700 || \
|
||||
CONFIG_CLANG_VERSION >= 80000) && \
|
||||
!__builtin_constant_p(times)); \
|
||||
BUILD_BUG_ON(!__builtin_constant_p(times)); \
|
||||
\
|
||||
switch (times) { \
|
||||
case 32: fn(__VA_ARGS__); /* fall through */ \
|
||||
|
|
|
|||
|
|
@ -1722,6 +1722,7 @@ enum emulation_result kvm_mips_emulate_store(union mips_instruction inst,
|
|||
vcpu->arch.gprs[rt], *(u32 *)data);
|
||||
break;
|
||||
|
||||
#if defined(CONFIG_64BIT) && defined(CONFIG_KVM_MIPS_VZ)
|
||||
case sdl_op:
|
||||
run->mmio.phys_addr = kvm_mips_callbacks->gva_to_gpa(
|
||||
vcpu->arch.host_cp0_badvaddr) & (~0x7);
|
||||
|
|
@ -1815,6 +1816,7 @@ enum emulation_result kvm_mips_emulate_store(union mips_instruction inst,
|
|||
vcpu->arch.pc, vcpu->arch.host_cp0_badvaddr,
|
||||
vcpu->arch.gprs[rt], *(u64 *)data);
|
||||
break;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_CPU_LOONGSON64
|
||||
case sdc2_op:
|
||||
|
|
@ -2002,6 +2004,7 @@ enum emulation_result kvm_mips_emulate_load(union mips_instruction inst,
|
|||
}
|
||||
break;
|
||||
|
||||
#if defined(CONFIG_64BIT) && defined(CONFIG_KVM_MIPS_VZ)
|
||||
case ldl_op:
|
||||
run->mmio.phys_addr = kvm_mips_callbacks->gva_to_gpa(
|
||||
vcpu->arch.host_cp0_badvaddr) & (~0x7);
|
||||
|
|
@ -2073,6 +2076,7 @@ enum emulation_result kvm_mips_emulate_load(union mips_instruction inst,
|
|||
break;
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_CPU_LOONGSON64
|
||||
case ldc2_op:
|
||||
|
|
|
|||
|
|
@ -2551,7 +2551,7 @@ EXC_VIRT_NONE(0x5400, 0x100)
|
|||
INT_DEFINE_BEGIN(denorm_exception)
|
||||
IVEC=0x1500
|
||||
IHSRR=1
|
||||
IBRANCH_COMMON=0
|
||||
IBRANCH_TO_COMMON=0
|
||||
IKVM_REAL=1
|
||||
INT_DEFINE_END(denorm_exception)
|
||||
|
||||
|
|
|
|||
|
|
@ -23,6 +23,8 @@ config RISCV
|
|||
select ARCH_HAS_SET_DIRECT_MAP
|
||||
select ARCH_HAS_SET_MEMORY
|
||||
select ARCH_HAS_STRICT_KERNEL_RWX if MMU
|
||||
select ARCH_OPTIONAL_KERNEL_RWX if ARCH_HAS_STRICT_KERNEL_RWX
|
||||
select ARCH_OPTIONAL_KERNEL_RWX_DEFAULT
|
||||
select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT if MMU
|
||||
select ARCH_WANT_FRAME_POINTERS
|
||||
select ARCH_WANT_HUGE_PMD_SHARE if 64BIT
|
||||
|
|
|
|||
|
|
@ -3,8 +3,7 @@
|
|||
#ifndef __ASM_GDB_XML_H_
|
||||
#define __ASM_GDB_XML_H_
|
||||
|
||||
#define kgdb_arch_gdb_stub_feature riscv_gdb_stub_feature
|
||||
static const char riscv_gdb_stub_feature[64] =
|
||||
const char riscv_gdb_stub_feature[64] =
|
||||
"PacketSize=800;qXfer:features:read+;";
|
||||
|
||||
static const char gdb_xfer_read_target[31] = "qXfer:features:read:target.xml:";
|
||||
|
|
|
|||
|
|
@ -19,7 +19,6 @@
|
|||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
extern int kgdb_has_hit_break(unsigned long addr);
|
||||
extern unsigned long kgdb_compiled_break;
|
||||
|
||||
static inline void arch_kgdb_breakpoint(void)
|
||||
|
|
@ -106,7 +105,9 @@ static inline void arch_kgdb_breakpoint(void)
|
|||
#define DBG_REG_BADADDR_OFF 34
|
||||
#define DBG_REG_CAUSE_OFF 35
|
||||
|
||||
#include <asm/gdb_xml.h>
|
||||
extern const char riscv_gdb_stub_feature[64];
|
||||
|
||||
#define kgdb_arch_gdb_stub_feature riscv_gdb_stub_feature
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -44,18 +44,18 @@ DECLARE_INSN(c_beqz, MATCH_C_BEQZ, MASK_C_BEQZ)
|
|||
DECLARE_INSN(c_bnez, MATCH_C_BNEZ, MASK_C_BNEZ)
|
||||
DECLARE_INSN(sret, MATCH_SRET, MASK_SRET)
|
||||
|
||||
int decode_register_index(unsigned long opcode, int offset)
|
||||
static int decode_register_index(unsigned long opcode, int offset)
|
||||
{
|
||||
return (opcode >> offset) & 0x1F;
|
||||
}
|
||||
|
||||
int decode_register_index_short(unsigned long opcode, int offset)
|
||||
static int decode_register_index_short(unsigned long opcode, int offset)
|
||||
{
|
||||
return ((opcode >> offset) & 0x7) + 8;
|
||||
}
|
||||
|
||||
/* Calculate the new address for after a step */
|
||||
int get_step_address(struct pt_regs *regs, unsigned long *next_addr)
|
||||
static int get_step_address(struct pt_regs *regs, unsigned long *next_addr)
|
||||
{
|
||||
unsigned long pc = regs->epc;
|
||||
unsigned long *regs_ptr = (unsigned long *)regs;
|
||||
|
|
@ -136,7 +136,7 @@ int get_step_address(struct pt_regs *regs, unsigned long *next_addr)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int do_single_step(struct pt_regs *regs)
|
||||
static int do_single_step(struct pt_regs *regs)
|
||||
{
|
||||
/* Determine where the target instruction will send us to */
|
||||
unsigned long addr = 0;
|
||||
|
|
@ -320,7 +320,7 @@ int kgdb_arch_handle_exception(int vector, int signo, int err_code,
|
|||
return err;
|
||||
}
|
||||
|
||||
int kgdb_riscv_kgdbbreak(unsigned long addr)
|
||||
static int kgdb_riscv_kgdbbreak(unsigned long addr)
|
||||
{
|
||||
if (stepped_address == addr)
|
||||
return KGDB_SW_SINGLE_STEP;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
CONFIG_SYSVIPC=y
|
||||
CONFIG_POSIX_MQUEUE=y
|
||||
CONFIG_WATCH_QUEUE=y
|
||||
CONFIG_AUDIT=y
|
||||
CONFIG_NO_HZ_IDLE=y
|
||||
CONFIG_HIGH_RES_TIMERS=y
|
||||
|
|
@ -14,7 +15,6 @@ CONFIG_IKCONFIG=y
|
|||
CONFIG_IKCONFIG_PROC=y
|
||||
CONFIG_NUMA_BALANCING=y
|
||||
CONFIG_MEMCG=y
|
||||
CONFIG_MEMCG_SWAP=y
|
||||
CONFIG_BLK_CGROUP=y
|
||||
CONFIG_CFS_BANDWIDTH=y
|
||||
CONFIG_RT_GROUP_SCHED=y
|
||||
|
|
@ -31,9 +31,9 @@ CONFIG_NAMESPACES=y
|
|||
CONFIG_USER_NS=y
|
||||
CONFIG_CHECKPOINT_RESTORE=y
|
||||
CONFIG_SCHED_AUTOGROUP=y
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
CONFIG_EXPERT=y
|
||||
# CONFIG_SYSFS_SYSCALL is not set
|
||||
CONFIG_BPF_LSM=y
|
||||
CONFIG_BPF_SYSCALL=y
|
||||
CONFIG_USERFAULTFD=y
|
||||
# CONFIG_COMPAT_BRK is not set
|
||||
|
|
@ -51,14 +51,11 @@ CONFIG_CHSC_SCH=y
|
|||
CONFIG_VFIO_CCW=m
|
||||
CONFIG_VFIO_AP=m
|
||||
CONFIG_CRASH_DUMP=y
|
||||
CONFIG_HIBERNATION=y
|
||||
CONFIG_PM_DEBUG=y
|
||||
CONFIG_PROTECTED_VIRTUALIZATION_GUEST=y
|
||||
CONFIG_CMM=m
|
||||
CONFIG_APPLDATA_BASE=y
|
||||
CONFIG_KVM=m
|
||||
CONFIG_VHOST_NET=m
|
||||
CONFIG_VHOST_VSOCK=m
|
||||
CONFIG_S390_UNWIND_SELFTEST=y
|
||||
CONFIG_OPROFILE=m
|
||||
CONFIG_KPROBES=y
|
||||
CONFIG_JUMP_LABEL=y
|
||||
|
|
@ -77,6 +74,8 @@ CONFIG_BLK_DEV_THROTTLING=y
|
|||
CONFIG_BLK_WBT=y
|
||||
CONFIG_BLK_CGROUP_IOLATENCY=y
|
||||
CONFIG_BLK_CGROUP_IOCOST=y
|
||||
CONFIG_BLK_INLINE_ENCRYPTION=y
|
||||
CONFIG_BLK_INLINE_ENCRYPTION_FALLBACK=y
|
||||
CONFIG_PARTITION_ADVANCED=y
|
||||
CONFIG_IBM_PARTITION=y
|
||||
CONFIG_BSD_DISKLABEL=y
|
||||
|
|
@ -96,7 +95,6 @@ CONFIG_CMA_DEBUG=y
|
|||
CONFIG_CMA_DEBUGFS=y
|
||||
CONFIG_MEM_SOFT_DIRTY=y
|
||||
CONFIG_ZSWAP=y
|
||||
CONFIG_ZBUD=m
|
||||
CONFIG_ZSMALLOC=m
|
||||
CONFIG_ZSMALLOC_STAT=y
|
||||
CONFIG_DEFERRED_STRUCT_PAGE_INIT=y
|
||||
|
|
@ -130,6 +128,7 @@ CONFIG_SYN_COOKIES=y
|
|||
CONFIG_NET_IPVTI=m
|
||||
CONFIG_INET_AH=m
|
||||
CONFIG_INET_ESP=m
|
||||
CONFIG_INET_ESPINTCP=y
|
||||
CONFIG_INET_IPCOMP=m
|
||||
CONFIG_INET_DIAG=m
|
||||
CONFIG_INET_UDP_DIAG=m
|
||||
|
|
@ -144,6 +143,7 @@ CONFIG_TCP_CONG_ILLINOIS=m
|
|||
CONFIG_IPV6_ROUTER_PREF=y
|
||||
CONFIG_INET6_AH=m
|
||||
CONFIG_INET6_ESP=m
|
||||
CONFIG_INET6_ESPINTCP=y
|
||||
CONFIG_INET6_IPCOMP=m
|
||||
CONFIG_IPV6_MIP6=m
|
||||
CONFIG_IPV6_VTI=m
|
||||
|
|
@ -151,7 +151,10 @@ CONFIG_IPV6_SIT=m
|
|||
CONFIG_IPV6_GRE=m
|
||||
CONFIG_IPV6_MULTIPLE_TABLES=y
|
||||
CONFIG_IPV6_SUBTREES=y
|
||||
CONFIG_IPV6_RPL_LWTUNNEL=y
|
||||
CONFIG_MPTCP=y
|
||||
CONFIG_NETFILTER=y
|
||||
CONFIG_BRIDGE_NETFILTER=m
|
||||
CONFIG_NF_CONNTRACK=m
|
||||
CONFIG_NF_CONNTRACK_SECMARK=y
|
||||
CONFIG_NF_CONNTRACK_EVENTS=y
|
||||
|
|
@ -317,6 +320,7 @@ CONFIG_L2TP_V3=y
|
|||
CONFIG_L2TP_IP=m
|
||||
CONFIG_L2TP_ETH=m
|
||||
CONFIG_BRIDGE=m
|
||||
CONFIG_BRIDGE_MRP=y
|
||||
CONFIG_VLAN_8021Q=m
|
||||
CONFIG_VLAN_8021Q_GVRP=y
|
||||
CONFIG_NET_SCHED=y
|
||||
|
|
@ -341,6 +345,7 @@ CONFIG_NET_SCH_CODEL=m
|
|||
CONFIG_NET_SCH_FQ_CODEL=m
|
||||
CONFIG_NET_SCH_INGRESS=m
|
||||
CONFIG_NET_SCH_PLUG=m
|
||||
CONFIG_NET_SCH_ETS=m
|
||||
CONFIG_NET_CLS_BASIC=m
|
||||
CONFIG_NET_CLS_TCINDEX=m
|
||||
CONFIG_NET_CLS_ROUTE4=m
|
||||
|
|
@ -364,6 +369,7 @@ CONFIG_NET_ACT_PEDIT=m
|
|||
CONFIG_NET_ACT_SIMP=m
|
||||
CONFIG_NET_ACT_SKBEDIT=m
|
||||
CONFIG_NET_ACT_CSUM=m
|
||||
CONFIG_NET_ACT_GATE=m
|
||||
CONFIG_DNS_RESOLVER=y
|
||||
CONFIG_OPENVSWITCH=m
|
||||
CONFIG_VSOCKETS=m
|
||||
|
|
@ -374,6 +380,7 @@ CONFIG_BPF_JIT=y
|
|||
CONFIG_NET_PKTGEN=m
|
||||
# CONFIG_NET_DROP_MONITOR is not set
|
||||
CONFIG_PCI=y
|
||||
# CONFIG_PCIEASPM is not set
|
||||
CONFIG_PCI_DEBUG=y
|
||||
CONFIG_HOTPLUG_PCI=y
|
||||
CONFIG_HOTPLUG_PCI_S390=y
|
||||
|
|
@ -435,6 +442,7 @@ CONFIG_DM_ZERO=m
|
|||
CONFIG_DM_MULTIPATH=m
|
||||
CONFIG_DM_MULTIPATH_QL=m
|
||||
CONFIG_DM_MULTIPATH_ST=m
|
||||
CONFIG_DM_MULTIPATH_HST=m
|
||||
CONFIG_DM_DELAY=m
|
||||
CONFIG_DM_UEVENT=y
|
||||
CONFIG_DM_FLAKEY=m
|
||||
|
|
@ -448,6 +456,8 @@ CONFIG_EQUALIZER=m
|
|||
CONFIG_IFB=m
|
||||
CONFIG_MACVLAN=m
|
||||
CONFIG_MACVTAP=m
|
||||
CONFIG_VXLAN=m
|
||||
CONFIG_BAREUDP=m
|
||||
CONFIG_TUN=m
|
||||
CONFIG_VETH=m
|
||||
CONFIG_VIRTIO_NET=m
|
||||
|
|
@ -481,7 +491,6 @@ CONFIG_NLMON=m
|
|||
CONFIG_MLX4_EN=m
|
||||
CONFIG_MLX5_CORE=m
|
||||
CONFIG_MLX5_CORE_EN=y
|
||||
# CONFIG_MLXFW is not set
|
||||
# CONFIG_NET_VENDOR_MICREL is not set
|
||||
# CONFIG_NET_VENDOR_MICROCHIP is not set
|
||||
# CONFIG_NET_VENDOR_MICROSEMI is not set
|
||||
|
|
@ -514,6 +523,7 @@ CONFIG_MLX5_CORE_EN=y
|
|||
# CONFIG_NET_VENDOR_TI is not set
|
||||
# CONFIG_NET_VENDOR_VIA is not set
|
||||
# CONFIG_NET_VENDOR_WIZNET is not set
|
||||
# CONFIG_NET_VENDOR_XILINX is not set
|
||||
CONFIG_PPP=m
|
||||
CONFIG_PPP_BSDCOMP=m
|
||||
CONFIG_PPP_DEFLATE=m
|
||||
|
|
@ -561,6 +571,8 @@ CONFIG_VFIO_MDEV_DEVICE=m
|
|||
CONFIG_VIRTIO_PCI=m
|
||||
CONFIG_VIRTIO_BALLOON=m
|
||||
CONFIG_VIRTIO_INPUT=y
|
||||
CONFIG_VHOST_NET=m
|
||||
CONFIG_VHOST_VSOCK=m
|
||||
CONFIG_S390_CCW_IOMMU=y
|
||||
CONFIG_S390_AP_IOMMU=y
|
||||
CONFIG_EXT4_FS=y
|
||||
|
|
@ -608,6 +620,7 @@ CONFIG_ZISOFS=y
|
|||
CONFIG_UDF_FS=m
|
||||
CONFIG_MSDOS_FS=m
|
||||
CONFIG_VFAT_FS=m
|
||||
CONFIG_EXFAT_FS=m
|
||||
CONFIG_NTFS_FS=m
|
||||
CONFIG_NTFS_RW=y
|
||||
CONFIG_PROC_KCORE=y
|
||||
|
|
@ -650,8 +663,8 @@ CONFIG_NLS_UTF8=m
|
|||
CONFIG_DLM=m
|
||||
CONFIG_UNICODE=y
|
||||
CONFIG_PERSISTENT_KEYRINGS=y
|
||||
CONFIG_BIG_KEYS=y
|
||||
CONFIG_ENCRYPTED_KEYS=m
|
||||
CONFIG_KEY_NOTIFICATIONS=y
|
||||
CONFIG_SECURITY=y
|
||||
CONFIG_SECURITY_NETWORK=y
|
||||
CONFIG_FORTIFY_SOURCE=y
|
||||
|
|
@ -675,8 +688,11 @@ CONFIG_CRYPTO_TEST=m
|
|||
CONFIG_CRYPTO_DH=m
|
||||
CONFIG_CRYPTO_ECDH=m
|
||||
CONFIG_CRYPTO_ECRDSA=m
|
||||
CONFIG_CRYPTO_CURVE25519=m
|
||||
CONFIG_CRYPTO_GCM=y
|
||||
CONFIG_CRYPTO_CHACHA20POLY1305=m
|
||||
CONFIG_CRYPTO_AEGIS128=m
|
||||
CONFIG_CRYPTO_SEQIV=y
|
||||
CONFIG_CRYPTO_CFB=m
|
||||
CONFIG_CRYPTO_LRW=m
|
||||
CONFIG_CRYPTO_PCBC=m
|
||||
|
|
@ -685,6 +701,7 @@ CONFIG_CRYPTO_ADIANTUM=m
|
|||
CONFIG_CRYPTO_XCBC=m
|
||||
CONFIG_CRYPTO_VMAC=m
|
||||
CONFIG_CRYPTO_CRC32=m
|
||||
CONFIG_CRYPTO_BLAKE2S=m
|
||||
CONFIG_CRYPTO_MICHAEL_MIC=m
|
||||
CONFIG_CRYPTO_RMD128=m
|
||||
CONFIG_CRYPTO_RMD160=m
|
||||
|
|
@ -701,6 +718,7 @@ CONFIG_CRYPTO_BLOWFISH=m
|
|||
CONFIG_CRYPTO_CAMELLIA=m
|
||||
CONFIG_CRYPTO_CAST5=m
|
||||
CONFIG_CRYPTO_CAST6=m
|
||||
CONFIG_CRYPTO_DES=m
|
||||
CONFIG_CRYPTO_FCRYPT=m
|
||||
CONFIG_CRYPTO_KHAZAD=m
|
||||
CONFIG_CRYPTO_SALSA20=m
|
||||
|
|
@ -719,6 +737,9 @@ CONFIG_CRYPTO_USER_API_SKCIPHER=m
|
|||
CONFIG_CRYPTO_USER_API_RNG=m
|
||||
CONFIG_CRYPTO_USER_API_AEAD=m
|
||||
CONFIG_CRYPTO_STATS=y
|
||||
CONFIG_CRYPTO_LIB_BLAKE2S=m
|
||||
CONFIG_CRYPTO_LIB_CURVE25519=m
|
||||
CONFIG_CRYPTO_LIB_CHACHA20POLY1305=m
|
||||
CONFIG_ZCRYPT=m
|
||||
CONFIG_PKEY=m
|
||||
CONFIG_CRYPTO_PAES_S390=m
|
||||
|
|
@ -774,6 +795,7 @@ CONFIG_DEBUG_SHIRQ=y
|
|||
CONFIG_PANIC_ON_OOPS=y
|
||||
CONFIG_DETECT_HUNG_TASK=y
|
||||
CONFIG_WQ_WATCHDOG=y
|
||||
CONFIG_TEST_LOCKUP=m
|
||||
CONFIG_DEBUG_TIMEKEEPING=y
|
||||
CONFIG_PROVE_LOCKING=y
|
||||
CONFIG_LOCK_STAT=y
|
||||
|
|
@ -786,7 +808,9 @@ CONFIG_BUG_ON_DATA_CORRUPTION=y
|
|||
CONFIG_DEBUG_CREDENTIALS=y
|
||||
CONFIG_RCU_TORTURE_TEST=m
|
||||
CONFIG_RCU_CPU_STALL_TIMEOUT=300
|
||||
# CONFIG_RCU_TRACE is not set
|
||||
CONFIG_LATENCYTOP=y
|
||||
CONFIG_BOOTTIME_TRACING=y
|
||||
CONFIG_FUNCTION_PROFILER=y
|
||||
CONFIG_STACK_TRACER=y
|
||||
CONFIG_IRQSOFF_TRACER=y
|
||||
|
|
@ -808,10 +832,12 @@ CONFIG_FAULT_INJECTION_DEBUG_FS=y
|
|||
CONFIG_FAULT_INJECTION_STACKTRACE_FILTER=y
|
||||
CONFIG_LKDTM=m
|
||||
CONFIG_TEST_LIST_SORT=y
|
||||
CONFIG_TEST_MIN_HEAP=y
|
||||
CONFIG_TEST_SORT=y
|
||||
CONFIG_KPROBES_SANITY_TEST=y
|
||||
CONFIG_RBTREE_TEST=y
|
||||
CONFIG_INTERVAL_TREE_TEST=m
|
||||
CONFIG_PERCPU_TEST=m
|
||||
CONFIG_ATOMIC64_SELFTEST=y
|
||||
CONFIG_TEST_BITOPS=m
|
||||
CONFIG_TEST_BPF=m
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
CONFIG_SYSVIPC=y
|
||||
CONFIG_POSIX_MQUEUE=y
|
||||
CONFIG_WATCH_QUEUE=y
|
||||
CONFIG_AUDIT=y
|
||||
CONFIG_NO_HZ_IDLE=y
|
||||
CONFIG_HIGH_RES_TIMERS=y
|
||||
|
|
@ -13,7 +14,6 @@ CONFIG_IKCONFIG=y
|
|||
CONFIG_IKCONFIG_PROC=y
|
||||
CONFIG_NUMA_BALANCING=y
|
||||
CONFIG_MEMCG=y
|
||||
CONFIG_MEMCG_SWAP=y
|
||||
CONFIG_BLK_CGROUP=y
|
||||
CONFIG_CFS_BANDWIDTH=y
|
||||
CONFIG_RT_GROUP_SCHED=y
|
||||
|
|
@ -30,9 +30,9 @@ CONFIG_NAMESPACES=y
|
|||
CONFIG_USER_NS=y
|
||||
CONFIG_CHECKPOINT_RESTORE=y
|
||||
CONFIG_SCHED_AUTOGROUP=y
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
CONFIG_EXPERT=y
|
||||
# CONFIG_SYSFS_SYSCALL is not set
|
||||
CONFIG_BPF_LSM=y
|
||||
CONFIG_BPF_SYSCALL=y
|
||||
CONFIG_USERFAULTFD=y
|
||||
# CONFIG_COMPAT_BRK is not set
|
||||
|
|
@ -41,7 +41,6 @@ CONFIG_LIVEPATCH=y
|
|||
CONFIG_TUNE_ZEC12=y
|
||||
CONFIG_NR_CPUS=512
|
||||
CONFIG_NUMA=y
|
||||
# CONFIG_NUMA_EMU is not set
|
||||
CONFIG_HZ_100=y
|
||||
CONFIG_KEXEC_FILE=y
|
||||
CONFIG_KEXEC_SIG=y
|
||||
|
|
@ -51,14 +50,11 @@ CONFIG_CHSC_SCH=y
|
|||
CONFIG_VFIO_CCW=m
|
||||
CONFIG_VFIO_AP=m
|
||||
CONFIG_CRASH_DUMP=y
|
||||
CONFIG_HIBERNATION=y
|
||||
CONFIG_PM_DEBUG=y
|
||||
CONFIG_PROTECTED_VIRTUALIZATION_GUEST=y
|
||||
CONFIG_CMM=m
|
||||
CONFIG_APPLDATA_BASE=y
|
||||
CONFIG_KVM=m
|
||||
CONFIG_VHOST_NET=m
|
||||
CONFIG_VHOST_VSOCK=m
|
||||
CONFIG_S390_UNWIND_SELFTEST=m
|
||||
CONFIG_OPROFILE=m
|
||||
CONFIG_KPROBES=y
|
||||
CONFIG_JUMP_LABEL=y
|
||||
|
|
@ -74,6 +70,8 @@ CONFIG_BLK_DEV_THROTTLING=y
|
|||
CONFIG_BLK_WBT=y
|
||||
CONFIG_BLK_CGROUP_IOLATENCY=y
|
||||
CONFIG_BLK_CGROUP_IOCOST=y
|
||||
CONFIG_BLK_INLINE_ENCRYPTION=y
|
||||
CONFIG_BLK_INLINE_ENCRYPTION_FALLBACK=y
|
||||
CONFIG_PARTITION_ADVANCED=y
|
||||
CONFIG_IBM_PARTITION=y
|
||||
CONFIG_BSD_DISKLABEL=y
|
||||
|
|
@ -91,7 +89,6 @@ CONFIG_CLEANCACHE=y
|
|||
CONFIG_FRONTSWAP=y
|
||||
CONFIG_MEM_SOFT_DIRTY=y
|
||||
CONFIG_ZSWAP=y
|
||||
CONFIG_ZBUD=m
|
||||
CONFIG_ZSMALLOC=m
|
||||
CONFIG_ZSMALLOC_STAT=y
|
||||
CONFIG_DEFERRED_STRUCT_PAGE_INIT=y
|
||||
|
|
@ -125,6 +122,7 @@ CONFIG_SYN_COOKIES=y
|
|||
CONFIG_NET_IPVTI=m
|
||||
CONFIG_INET_AH=m
|
||||
CONFIG_INET_ESP=m
|
||||
CONFIG_INET_ESPINTCP=y
|
||||
CONFIG_INET_IPCOMP=m
|
||||
CONFIG_INET_DIAG=m
|
||||
CONFIG_INET_UDP_DIAG=m
|
||||
|
|
@ -139,6 +137,7 @@ CONFIG_TCP_CONG_ILLINOIS=m
|
|||
CONFIG_IPV6_ROUTER_PREF=y
|
||||
CONFIG_INET6_AH=m
|
||||
CONFIG_INET6_ESP=m
|
||||
CONFIG_INET6_ESPINTCP=y
|
||||
CONFIG_INET6_IPCOMP=m
|
||||
CONFIG_IPV6_MIP6=m
|
||||
CONFIG_IPV6_VTI=m
|
||||
|
|
@ -146,7 +145,10 @@ CONFIG_IPV6_SIT=m
|
|||
CONFIG_IPV6_GRE=m
|
||||
CONFIG_IPV6_MULTIPLE_TABLES=y
|
||||
CONFIG_IPV6_SUBTREES=y
|
||||
CONFIG_IPV6_RPL_LWTUNNEL=y
|
||||
CONFIG_MPTCP=y
|
||||
CONFIG_NETFILTER=y
|
||||
CONFIG_BRIDGE_NETFILTER=m
|
||||
CONFIG_NF_CONNTRACK=m
|
||||
CONFIG_NF_CONNTRACK_SECMARK=y
|
||||
CONFIG_NF_CONNTRACK_EVENTS=y
|
||||
|
|
@ -311,6 +313,7 @@ CONFIG_L2TP_V3=y
|
|||
CONFIG_L2TP_IP=m
|
||||
CONFIG_L2TP_ETH=m
|
||||
CONFIG_BRIDGE=m
|
||||
CONFIG_BRIDGE_MRP=y
|
||||
CONFIG_VLAN_8021Q=m
|
||||
CONFIG_VLAN_8021Q_GVRP=y
|
||||
CONFIG_NET_SCHED=y
|
||||
|
|
@ -335,6 +338,7 @@ CONFIG_NET_SCH_CODEL=m
|
|||
CONFIG_NET_SCH_FQ_CODEL=m
|
||||
CONFIG_NET_SCH_INGRESS=m
|
||||
CONFIG_NET_SCH_PLUG=m
|
||||
CONFIG_NET_SCH_ETS=m
|
||||
CONFIG_NET_CLS_BASIC=m
|
||||
CONFIG_NET_CLS_TCINDEX=m
|
||||
CONFIG_NET_CLS_ROUTE4=m
|
||||
|
|
@ -358,6 +362,7 @@ CONFIG_NET_ACT_PEDIT=m
|
|||
CONFIG_NET_ACT_SIMP=m
|
||||
CONFIG_NET_ACT_SKBEDIT=m
|
||||
CONFIG_NET_ACT_CSUM=m
|
||||
CONFIG_NET_ACT_GATE=m
|
||||
CONFIG_DNS_RESOLVER=y
|
||||
CONFIG_OPENVSWITCH=m
|
||||
CONFIG_VSOCKETS=m
|
||||
|
|
@ -368,6 +373,7 @@ CONFIG_BPF_JIT=y
|
|||
CONFIG_NET_PKTGEN=m
|
||||
# CONFIG_NET_DROP_MONITOR is not set
|
||||
CONFIG_PCI=y
|
||||
# CONFIG_PCIEASPM is not set
|
||||
CONFIG_HOTPLUG_PCI=y
|
||||
CONFIG_HOTPLUG_PCI_S390=y
|
||||
CONFIG_UEVENT_HELPER=y
|
||||
|
|
@ -430,6 +436,7 @@ CONFIG_DM_ZERO=m
|
|||
CONFIG_DM_MULTIPATH=m
|
||||
CONFIG_DM_MULTIPATH_QL=m
|
||||
CONFIG_DM_MULTIPATH_ST=m
|
||||
CONFIG_DM_MULTIPATH_HST=m
|
||||
CONFIG_DM_DELAY=m
|
||||
CONFIG_DM_UEVENT=y
|
||||
CONFIG_DM_FLAKEY=m
|
||||
|
|
@ -444,6 +451,8 @@ CONFIG_EQUALIZER=m
|
|||
CONFIG_IFB=m
|
||||
CONFIG_MACVLAN=m
|
||||
CONFIG_MACVTAP=m
|
||||
CONFIG_VXLAN=m
|
||||
CONFIG_BAREUDP=m
|
||||
CONFIG_TUN=m
|
||||
CONFIG_VETH=m
|
||||
CONFIG_VIRTIO_NET=m
|
||||
|
|
@ -477,7 +486,6 @@ CONFIG_NLMON=m
|
|||
CONFIG_MLX4_EN=m
|
||||
CONFIG_MLX5_CORE=m
|
||||
CONFIG_MLX5_CORE_EN=y
|
||||
# CONFIG_MLXFW is not set
|
||||
# CONFIG_NET_VENDOR_MICREL is not set
|
||||
# CONFIG_NET_VENDOR_MICROCHIP is not set
|
||||
# CONFIG_NET_VENDOR_MICROSEMI is not set
|
||||
|
|
@ -510,6 +518,7 @@ CONFIG_MLX5_CORE_EN=y
|
|||
# CONFIG_NET_VENDOR_TI is not set
|
||||
# CONFIG_NET_VENDOR_VIA is not set
|
||||
# CONFIG_NET_VENDOR_WIZNET is not set
|
||||
# CONFIG_NET_VENDOR_XILINX is not set
|
||||
CONFIG_PPP=m
|
||||
CONFIG_PPP_BSDCOMP=m
|
||||
CONFIG_PPP_DEFLATE=m
|
||||
|
|
@ -557,6 +566,8 @@ CONFIG_VFIO_MDEV_DEVICE=m
|
|||
CONFIG_VIRTIO_PCI=m
|
||||
CONFIG_VIRTIO_BALLOON=m
|
||||
CONFIG_VIRTIO_INPUT=y
|
||||
CONFIG_VHOST_NET=m
|
||||
CONFIG_VHOST_VSOCK=m
|
||||
CONFIG_S390_CCW_IOMMU=y
|
||||
CONFIG_S390_AP_IOMMU=y
|
||||
CONFIG_EXT4_FS=y
|
||||
|
|
@ -600,6 +611,7 @@ CONFIG_ZISOFS=y
|
|||
CONFIG_UDF_FS=m
|
||||
CONFIG_MSDOS_FS=m
|
||||
CONFIG_VFAT_FS=m
|
||||
CONFIG_EXFAT_FS=m
|
||||
CONFIG_NTFS_FS=m
|
||||
CONFIG_NTFS_RW=y
|
||||
CONFIG_PROC_KCORE=y
|
||||
|
|
@ -642,8 +654,8 @@ CONFIG_NLS_UTF8=m
|
|||
CONFIG_DLM=m
|
||||
CONFIG_UNICODE=y
|
||||
CONFIG_PERSISTENT_KEYRINGS=y
|
||||
CONFIG_BIG_KEYS=y
|
||||
CONFIG_ENCRYPTED_KEYS=m
|
||||
CONFIG_KEY_NOTIFICATIONS=y
|
||||
CONFIG_SECURITY=y
|
||||
CONFIG_SECURITY_NETWORK=y
|
||||
CONFIG_SECURITY_SELINUX=y
|
||||
|
|
@ -667,8 +679,11 @@ CONFIG_CRYPTO_TEST=m
|
|||
CONFIG_CRYPTO_DH=m
|
||||
CONFIG_CRYPTO_ECDH=m
|
||||
CONFIG_CRYPTO_ECRDSA=m
|
||||
CONFIG_CRYPTO_CURVE25519=m
|
||||
CONFIG_CRYPTO_GCM=y
|
||||
CONFIG_CRYPTO_CHACHA20POLY1305=m
|
||||
CONFIG_CRYPTO_AEGIS128=m
|
||||
CONFIG_CRYPTO_SEQIV=y
|
||||
CONFIG_CRYPTO_CFB=m
|
||||
CONFIG_CRYPTO_LRW=m
|
||||
CONFIG_CRYPTO_OFB=m
|
||||
|
|
@ -678,6 +693,7 @@ CONFIG_CRYPTO_ADIANTUM=m
|
|||
CONFIG_CRYPTO_XCBC=m
|
||||
CONFIG_CRYPTO_VMAC=m
|
||||
CONFIG_CRYPTO_CRC32=m
|
||||
CONFIG_CRYPTO_BLAKE2S=m
|
||||
CONFIG_CRYPTO_MICHAEL_MIC=m
|
||||
CONFIG_CRYPTO_RMD128=m
|
||||
CONFIG_CRYPTO_RMD160=m
|
||||
|
|
@ -694,6 +710,7 @@ CONFIG_CRYPTO_BLOWFISH=m
|
|||
CONFIG_CRYPTO_CAMELLIA=m
|
||||
CONFIG_CRYPTO_CAST5=m
|
||||
CONFIG_CRYPTO_CAST6=m
|
||||
CONFIG_CRYPTO_DES=m
|
||||
CONFIG_CRYPTO_FCRYPT=m
|
||||
CONFIG_CRYPTO_KHAZAD=m
|
||||
CONFIG_CRYPTO_SALSA20=m
|
||||
|
|
@ -712,6 +729,9 @@ CONFIG_CRYPTO_USER_API_SKCIPHER=m
|
|||
CONFIG_CRYPTO_USER_API_RNG=m
|
||||
CONFIG_CRYPTO_USER_API_AEAD=m
|
||||
CONFIG_CRYPTO_STATS=y
|
||||
CONFIG_CRYPTO_LIB_BLAKE2S=m
|
||||
CONFIG_CRYPTO_LIB_CURVE25519=m
|
||||
CONFIG_CRYPTO_LIB_CHACHA20POLY1305=m
|
||||
CONFIG_ZCRYPT=m
|
||||
CONFIG_PKEY=m
|
||||
CONFIG_CRYPTO_PAES_S390=m
|
||||
|
|
@ -725,6 +745,7 @@ CONFIG_CRYPTO_AES_S390=m
|
|||
CONFIG_CRYPTO_GHASH_S390=m
|
||||
CONFIG_CRYPTO_CRC32_S390=y
|
||||
CONFIG_CORDIC=m
|
||||
CONFIG_PRIME_NUMBERS=m
|
||||
CONFIG_CRC4=m
|
||||
CONFIG_CRC7=m
|
||||
CONFIG_CRC8=m
|
||||
|
|
@ -739,10 +760,12 @@ CONFIG_DEBUG_SECTION_MISMATCH=y
|
|||
CONFIG_MAGIC_SYSRQ=y
|
||||
CONFIG_DEBUG_MEMORY_INIT=y
|
||||
CONFIG_PANIC_ON_OOPS=y
|
||||
CONFIG_TEST_LOCKUP=m
|
||||
CONFIG_BUG_ON_DATA_CORRUPTION=y
|
||||
CONFIG_RCU_TORTURE_TEST=m
|
||||
CONFIG_RCU_CPU_STALL_TIMEOUT=60
|
||||
CONFIG_LATENCYTOP=y
|
||||
CONFIG_BOOTTIME_TRACING=y
|
||||
CONFIG_FUNCTION_PROFILER=y
|
||||
CONFIG_STACK_TRACER=y
|
||||
CONFIG_SCHED_TRACER=y
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ CONFIG_IBM_PARTITION=y
|
|||
# CONFIG_BOUNCE is not set
|
||||
CONFIG_NET=y
|
||||
# CONFIG_IUCV is not set
|
||||
# CONFIG_ETHTOOL_NETLINK is not set
|
||||
CONFIG_DEVTMPFS=y
|
||||
CONFIG_BLK_DEV_RAM=y
|
||||
# CONFIG_BLK_DEV_XPRAM is not set
|
||||
|
|
@ -55,6 +56,8 @@ CONFIG_RAW_DRIVER=y
|
|||
# CONFIG_MONWRITER is not set
|
||||
# CONFIG_S390_VMUR is not set
|
||||
# CONFIG_HID is not set
|
||||
# CONFIG_VIRTIO_MENU is not set
|
||||
# CONFIG_VHOST_MENU is not set
|
||||
# CONFIG_IOMMU_SUPPORT is not set
|
||||
# CONFIG_DNOTIFY is not set
|
||||
# CONFIG_INOTIFY_USER is not set
|
||||
|
|
@ -62,7 +65,9 @@ CONFIG_CONFIGFS_FS=y
|
|||
# CONFIG_MISC_FILESYSTEMS is not set
|
||||
# CONFIG_NETWORK_FILESYSTEMS is not set
|
||||
CONFIG_LSM="yama,loadpin,safesetid,integrity"
|
||||
# CONFIG_ZLIB_DFLTCC is not set
|
||||
CONFIG_PRINTK_TIME=y
|
||||
# CONFIG_SYMBOLIC_ERRNAME is not set
|
||||
CONFIG_DEBUG_INFO=y
|
||||
CONFIG_DEBUG_FS=y
|
||||
CONFIG_DEBUG_KERNEL=y
|
||||
|
|
|
|||
|
|
@ -31,12 +31,12 @@
|
|||
#define KVM_USER_MEM_SLOTS 32
|
||||
|
||||
/*
|
||||
* These seem to be used for allocating ->chip in the routing table,
|
||||
* which we don't use. 4096 is an out-of-thin-air value. If we need
|
||||
* to look at ->chip later on, we'll need to revisit this.
|
||||
* These seem to be used for allocating ->chip in the routing table, which we
|
||||
* don't use. 1 is as small as we can get to reduce the needed memory. If we
|
||||
* need to look at ->chip later on, we'll need to revisit this.
|
||||
*/
|
||||
#define KVM_NR_IRQCHIPS 1
|
||||
#define KVM_IRQCHIP_NUM_PINS 4096
|
||||
#define KVM_IRQCHIP_NUM_PINS 1
|
||||
#define KVM_HALT_POLL_NS_DEFAULT 50000
|
||||
|
||||
/* s390-specific vcpu->requests bit members */
|
||||
|
|
|
|||
|
|
@ -881,12 +881,21 @@ static int __hw_perf_event_init(struct perf_event *event)
|
|||
return err;
|
||||
}
|
||||
|
||||
static bool is_callchain_event(struct perf_event *event)
|
||||
{
|
||||
u64 sample_type = event->attr.sample_type;
|
||||
|
||||
return sample_type & (PERF_SAMPLE_CALLCHAIN | PERF_SAMPLE_REGS_USER |
|
||||
PERF_SAMPLE_STACK_USER);
|
||||
}
|
||||
|
||||
static int cpumsf_pmu_event_init(struct perf_event *event)
|
||||
{
|
||||
int err;
|
||||
|
||||
/* No support for taken branch sampling */
|
||||
if (has_branch_stack(event))
|
||||
/* No support for callchain, stacks and registers */
|
||||
if (has_branch_stack(event) || is_callchain_event(event))
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
switch (event->attr.type) {
|
||||
|
|
|
|||
|
|
@ -1100,6 +1100,7 @@ void __init setup_arch(char **cmdline_p)
|
|||
if (IS_ENABLED(CONFIG_EXPOLINE_AUTO))
|
||||
nospec_auto_detect();
|
||||
|
||||
jump_label_init();
|
||||
parse_early_param();
|
||||
#ifdef CONFIG_CRASH_DUMP
|
||||
/* Deactivate elfcorehdr= kernel parameter */
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ static inline pte_t __rste_to_pte(unsigned long rste)
|
|||
_PAGE_YOUNG);
|
||||
#ifdef CONFIG_MEM_SOFT_DIRTY
|
||||
pte_val(pte) |= move_set_bit(rste, _SEGMENT_ENTRY_SOFT_DIRTY,
|
||||
_PAGE_DIRTY);
|
||||
_PAGE_SOFT_DIRTY);
|
||||
#endif
|
||||
pte_val(pte) |= move_set_bit(rste, _SEGMENT_ENTRY_NOEXEC,
|
||||
_PAGE_NOEXEC);
|
||||
|
|
|
|||
|
|
@ -62,11 +62,15 @@ notrace void *s390_kernel_write(void *dst, const void *src, size_t size)
|
|||
long copied;
|
||||
|
||||
spin_lock_irqsave(&s390_kernel_write_lock, flags);
|
||||
while (size) {
|
||||
copied = s390_kernel_write_odd(tmp, src, size);
|
||||
tmp += copied;
|
||||
src += copied;
|
||||
size -= copied;
|
||||
if (!(flags & PSW_MASK_DAT)) {
|
||||
memcpy(dst, src, size);
|
||||
} else {
|
||||
while (size) {
|
||||
copied = s390_kernel_write_odd(tmp, src, size);
|
||||
tmp += copied;
|
||||
src += copied;
|
||||
size -= copied;
|
||||
}
|
||||
}
|
||||
spin_unlock_irqrestore(&s390_kernel_write_lock, flags);
|
||||
|
||||
|
|
|
|||
|
|
@ -94,7 +94,18 @@ static void __zpci_event_availability(struct zpci_ccdf_avail *ccdf)
|
|||
}
|
||||
zdev->fh = ccdf->fh;
|
||||
zdev->state = ZPCI_FN_STATE_CONFIGURED;
|
||||
zpci_create_device(zdev);
|
||||
ret = zpci_enable_device(zdev);
|
||||
if (ret)
|
||||
break;
|
||||
|
||||
pdev = pci_scan_single_device(zdev->zbus->bus, zdev->devfn);
|
||||
if (!pdev)
|
||||
break;
|
||||
|
||||
pci_bus_add_device(pdev);
|
||||
pci_lock_rescan_remove();
|
||||
pci_bus_add_devices(zdev->zbus->bus);
|
||||
pci_unlock_rescan_remove();
|
||||
break;
|
||||
case 0x0302: /* Reserved -> Standby */
|
||||
if (!zdev) {
|
||||
|
|
|
|||
|
|
@ -408,14 +408,15 @@ struct kvm_vmx_nested_state_data {
|
|||
};
|
||||
|
||||
struct kvm_vmx_nested_state_hdr {
|
||||
__u32 flags;
|
||||
__u64 vmxon_pa;
|
||||
__u64 vmcs12_pa;
|
||||
__u64 preemption_timer_deadline;
|
||||
|
||||
struct {
|
||||
__u16 flags;
|
||||
} smm;
|
||||
|
||||
__u32 flags;
|
||||
__u64 preemption_timer_deadline;
|
||||
};
|
||||
|
||||
struct kvm_svm_nested_state_data {
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
#define KVM_POSSIBLE_CR0_GUEST_BITS X86_CR0_TS
|
||||
#define KVM_POSSIBLE_CR4_GUEST_BITS \
|
||||
(X86_CR4_PVI | X86_CR4_DE | X86_CR4_PCE | X86_CR4_OSFXSR \
|
||||
| X86_CR4_OSXMMEXCPT | X86_CR4_LA57 | X86_CR4_PGE)
|
||||
| X86_CR4_OSXMMEXCPT | X86_CR4_LA57 | X86_CR4_PGE | X86_CR4_TSD)
|
||||
|
||||
#define BUILD_KVM_GPR_ACCESSORS(lname, uname) \
|
||||
static __always_inline unsigned long kvm_##lname##_read(struct kvm_vcpu *vcpu)\
|
||||
|
|
|
|||
|
|
@ -4449,7 +4449,7 @@ __reset_rsvds_bits_mask(struct kvm_vcpu *vcpu,
|
|||
nonleaf_bit8_rsvd | rsvd_bits(7, 7) |
|
||||
rsvd_bits(maxphyaddr, 51);
|
||||
rsvd_check->rsvd_bits_mask[0][2] = exb_bit_rsvd |
|
||||
nonleaf_bit8_rsvd | gbpages_bit_rsvd |
|
||||
gbpages_bit_rsvd |
|
||||
rsvd_bits(maxphyaddr, 51);
|
||||
rsvd_check->rsvd_bits_mask[0][1] = exb_bit_rsvd |
|
||||
rsvd_bits(maxphyaddr, 51);
|
||||
|
|
|
|||
|
|
@ -4109,7 +4109,7 @@ static void load_vmcs12_host_state(struct kvm_vcpu *vcpu,
|
|||
* CR0_GUEST_HOST_MASK is already set in the original vmcs01
|
||||
* (KVM doesn't change it);
|
||||
*/
|
||||
vcpu->arch.cr0_guest_owned_bits = X86_CR0_TS;
|
||||
vcpu->arch.cr0_guest_owned_bits = KVM_POSSIBLE_CR0_GUEST_BITS;
|
||||
vmx_set_cr0(vcpu, vmcs12->host_cr0);
|
||||
|
||||
/* Same as above - no reason to call set_cr4_guest_host_mask(). */
|
||||
|
|
@ -4259,7 +4259,7 @@ static void nested_vmx_restore_host_state(struct kvm_vcpu *vcpu)
|
|||
*/
|
||||
vmx_set_efer(vcpu, nested_vmx_get_vmcs01_guest_efer(vmx));
|
||||
|
||||
vcpu->arch.cr0_guest_owned_bits = X86_CR0_TS;
|
||||
vcpu->arch.cr0_guest_owned_bits = KVM_POSSIBLE_CR0_GUEST_BITS;
|
||||
vmx_set_cr0(vcpu, vmcs_readl(CR0_READ_SHADOW));
|
||||
|
||||
vcpu->arch.cr4_guest_owned_bits = ~vmcs_readl(CR4_GUEST_HOST_MASK);
|
||||
|
|
@ -6176,6 +6176,7 @@ static int vmx_set_nested_state(struct kvm_vcpu *vcpu,
|
|||
goto error_guest_mode;
|
||||
}
|
||||
|
||||
vmx->nested.has_preemption_timer_deadline = false;
|
||||
if (kvm_state->hdr.vmx.flags & KVM_STATE_VMX_PREEMPTION_TIMER_DEADLINE) {
|
||||
vmx->nested.has_preemption_timer_deadline = true;
|
||||
vmx->nested.preemption_timer_deadline =
|
||||
|
|
|
|||
|
|
@ -133,9 +133,6 @@ module_param_named(preemption_timer, enable_preemption_timer, bool, S_IRUGO);
|
|||
#define KVM_VM_CR0_ALWAYS_ON \
|
||||
(KVM_VM_CR0_ALWAYS_ON_UNRESTRICTED_GUEST | \
|
||||
X86_CR0_WP | X86_CR0_PG | X86_CR0_PE)
|
||||
#define KVM_CR4_GUEST_OWNED_BITS \
|
||||
(X86_CR4_PVI | X86_CR4_DE | X86_CR4_PCE | X86_CR4_OSFXSR \
|
||||
| X86_CR4_OSXMMEXCPT | X86_CR4_LA57 | X86_CR4_TSD)
|
||||
|
||||
#define KVM_VM_CR4_ALWAYS_ON_UNRESTRICTED_GUEST X86_CR4_VMXE
|
||||
#define KVM_PMODE_VM_CR4_ALWAYS_ON (X86_CR4_PAE | X86_CR4_VMXE)
|
||||
|
|
@ -4034,9 +4031,9 @@ void vmx_set_constant_host_state(struct vcpu_vmx *vmx)
|
|||
|
||||
void set_cr4_guest_host_mask(struct vcpu_vmx *vmx)
|
||||
{
|
||||
vmx->vcpu.arch.cr4_guest_owned_bits = KVM_CR4_GUEST_OWNED_BITS;
|
||||
if (enable_ept)
|
||||
vmx->vcpu.arch.cr4_guest_owned_bits |= X86_CR4_PGE;
|
||||
vmx->vcpu.arch.cr4_guest_owned_bits = KVM_POSSIBLE_CR4_GUEST_BITS;
|
||||
if (!enable_ept)
|
||||
vmx->vcpu.arch.cr4_guest_owned_bits &= ~X86_CR4_PGE;
|
||||
if (is_guest_mode(&vmx->vcpu))
|
||||
vmx->vcpu.arch.cr4_guest_owned_bits &=
|
||||
~get_vmcs12(&vmx->vcpu)->cr4_guest_host_mask;
|
||||
|
|
@ -4333,8 +4330,8 @@ static void init_vmcs(struct vcpu_vmx *vmx)
|
|||
/* 22.2.1, 20.8.1 */
|
||||
vm_entry_controls_set(vmx, vmx_vmentry_ctrl());
|
||||
|
||||
vmx->vcpu.arch.cr0_guest_owned_bits = X86_CR0_TS;
|
||||
vmcs_writel(CR0_GUEST_HOST_MASK, ~X86_CR0_TS);
|
||||
vmx->vcpu.arch.cr0_guest_owned_bits = KVM_POSSIBLE_CR0_GUEST_BITS;
|
||||
vmcs_writel(CR0_GUEST_HOST_MASK, ~vmx->vcpu.arch.cr0_guest_owned_bits);
|
||||
|
||||
set_cr4_guest_host_mask(vmx);
|
||||
|
||||
|
|
|
|||
|
|
@ -975,6 +975,8 @@ int kvm_set_cr4(struct kvm_vcpu *vcpu, unsigned long cr4)
|
|||
if (is_long_mode(vcpu)) {
|
||||
if (!(cr4 & X86_CR4_PAE))
|
||||
return 1;
|
||||
if ((cr4 ^ old_cr4) & X86_CR4_LA57)
|
||||
return 1;
|
||||
} else if (is_paging(vcpu) && (cr4 & X86_CR4_PAE)
|
||||
&& ((cr4 ^ old_cr4) & pdptr_bits)
|
||||
&& !load_pdptrs(vcpu, vcpu->arch.walk_mmu,
|
||||
|
|
@ -2693,6 +2695,9 @@ static int kvm_pv_enable_async_pf(struct kvm_vcpu *vcpu, u64 data)
|
|||
if (data & 0x30)
|
||||
return 1;
|
||||
|
||||
if (!lapic_in_kernel(vcpu))
|
||||
return 1;
|
||||
|
||||
vcpu->arch.apf.msr_en_val = data;
|
||||
|
||||
if (!kvm_pv_async_pf_enabled(vcpu)) {
|
||||
|
|
|
|||
|
|
@ -362,9 +362,7 @@ irqreturn_t xtensa_pmu_irq_handler(int irq, void *dev_id)
|
|||
struct xtensa_pmu_events *ev = this_cpu_ptr(&xtensa_pmu_events);
|
||||
unsigned i;
|
||||
|
||||
for (i = find_first_bit(ev->used_mask, XCHAL_NUM_PERF_COUNTERS);
|
||||
i < XCHAL_NUM_PERF_COUNTERS;
|
||||
i = find_next_bit(ev->used_mask, XCHAL_NUM_PERF_COUNTERS, i + 1)) {
|
||||
for_each_set_bit(i, ev->used_mask, XCHAL_NUM_PERF_COUNTERS) {
|
||||
uint32_t v = get_er(XTENSA_PMU_PMSTAT(i));
|
||||
struct perf_event *event = ev->event[i];
|
||||
struct hw_perf_event *hwc = &event->hw;
|
||||
|
|
|
|||
|
|
@ -724,7 +724,8 @@ c_start(struct seq_file *f, loff_t *pos)
|
|||
static void *
|
||||
c_next(struct seq_file *f, void *v, loff_t *pos)
|
||||
{
|
||||
return NULL;
|
||||
++*pos;
|
||||
return c_start(f, pos);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
|
|
@ -87,13 +87,13 @@ void __xtensa_libgcc_window_spill(void)
|
|||
}
|
||||
EXPORT_SYMBOL(__xtensa_libgcc_window_spill);
|
||||
|
||||
unsigned long __sync_fetch_and_and_4(unsigned long *p, unsigned long v)
|
||||
unsigned int __sync_fetch_and_and_4(volatile void *p, unsigned int v)
|
||||
{
|
||||
BUG();
|
||||
}
|
||||
EXPORT_SYMBOL(__sync_fetch_and_and_4);
|
||||
|
||||
unsigned long __sync_fetch_and_or_4(unsigned long *p, unsigned long v)
|
||||
unsigned int __sync_fetch_and_or_4(volatile void *p, unsigned int v)
|
||||
{
|
||||
BUG();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -828,10 +828,10 @@ static bool blk_mq_rq_inflight(struct blk_mq_hw_ctx *hctx, struct request *rq,
|
|||
void *priv, bool reserved)
|
||||
{
|
||||
/*
|
||||
* If we find a request that is inflight and the queue matches,
|
||||
* If we find a request that isn't idle and the queue matches,
|
||||
* we know the queue is busy. Return false to stop the iteration.
|
||||
*/
|
||||
if (rq->state == MQ_RQ_IN_FLIGHT && rq->q == hctx->queue) {
|
||||
if (blk_mq_request_started(rq) && rq->q == hctx->queue) {
|
||||
bool *busy = priv;
|
||||
|
||||
*busy = true;
|
||||
|
|
|
|||
|
|
@ -1033,25 +1033,26 @@ static int nbd_add_socket(struct nbd_device *nbd, unsigned long arg,
|
|||
test_bit(NBD_RT_BOUND, &config->runtime_flags))) {
|
||||
dev_err(disk_to_dev(nbd->disk),
|
||||
"Device being setup by another task");
|
||||
sockfd_put(sock);
|
||||
return -EBUSY;
|
||||
err = -EBUSY;
|
||||
goto put_socket;
|
||||
}
|
||||
|
||||
nsock = kzalloc(sizeof(*nsock), GFP_KERNEL);
|
||||
if (!nsock) {
|
||||
err = -ENOMEM;
|
||||
goto put_socket;
|
||||
}
|
||||
|
||||
socks = krealloc(config->socks, (config->num_connections + 1) *
|
||||
sizeof(struct nbd_sock *), GFP_KERNEL);
|
||||
if (!socks) {
|
||||
sockfd_put(sock);
|
||||
return -ENOMEM;
|
||||
kfree(nsock);
|
||||
err = -ENOMEM;
|
||||
goto put_socket;
|
||||
}
|
||||
|
||||
config->socks = socks;
|
||||
|
||||
nsock = kzalloc(sizeof(struct nbd_sock), GFP_KERNEL);
|
||||
if (!nsock) {
|
||||
sockfd_put(sock);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
nsock->fallback_index = -1;
|
||||
nsock->dead = false;
|
||||
mutex_init(&nsock->tx_lock);
|
||||
|
|
@ -1063,6 +1064,10 @@ static int nbd_add_socket(struct nbd_device *nbd, unsigned long arg,
|
|||
atomic_inc(&config->live_connections);
|
||||
|
||||
return 0;
|
||||
|
||||
put_socket:
|
||||
sockfd_put(sock);
|
||||
return err;
|
||||
}
|
||||
|
||||
static int nbd_reconnect_socket(struct nbd_device *nbd, unsigned long arg)
|
||||
|
|
|
|||
|
|
@ -235,9 +235,17 @@ static int tpm_tis_pnp_init(struct pnp_dev *pnp_dev,
|
|||
return tpm_tis_init(&pnp_dev->dev, &tpm_info);
|
||||
}
|
||||
|
||||
/*
|
||||
* There is a known bug caused by 93e1b7d42e1e ("[PATCH] tpm: add HID module
|
||||
* parameter"). This commit added IFX0102 device ID, which is also used by
|
||||
* tpm_infineon but ignored to add quirks to probe which driver ought to be
|
||||
* used.
|
||||
*/
|
||||
|
||||
static struct pnp_device_id tpm_pnp_tbl[] = {
|
||||
{"PNP0C31", 0}, /* TPM */
|
||||
{"ATM1200", 0}, /* Atmel */
|
||||
{"IFX0102", 0}, /* Infineon */
|
||||
{"BCM0101", 0}, /* Broadcom */
|
||||
{"BCM0102", 0}, /* Broadcom */
|
||||
{"NSC1200", 0}, /* National */
|
||||
|
|
|
|||
|
|
@ -480,6 +480,14 @@ static const struct arch_timer_erratum_workaround ool_workarounds[] = {
|
|||
.set_next_event_virt = erratum_set_next_event_tval_virt,
|
||||
},
|
||||
#endif
|
||||
#ifdef CONFIG_ARM64_ERRATUM_1418040
|
||||
{
|
||||
.match_type = ate_match_local_cap_id,
|
||||
.id = (void *)ARM64_WORKAROUND_1418040,
|
||||
.desc = "ARM erratum 1418040",
|
||||
.disable_compat_vdso = true,
|
||||
},
|
||||
#endif
|
||||
};
|
||||
|
||||
typedef bool (*ate_match_fn_t)(const struct arch_timer_erratum_workaround *,
|
||||
|
|
@ -566,6 +574,9 @@ void arch_timer_enable_workaround(const struct arch_timer_erratum_workaround *wa
|
|||
if (wa->read_cntvct_el0) {
|
||||
clocksource_counter.vdso_clock_mode = VDSO_CLOCKMODE_NONE;
|
||||
vdso_default = VDSO_CLOCKMODE_NONE;
|
||||
} else if (wa->disable_compat_vdso && vdso_default != VDSO_CLOCKMODE_NONE) {
|
||||
vdso_default = VDSO_CLOCKMODE_ARCHTIMER_NOCOMPAT;
|
||||
clocksource_counter.vdso_clock_mode = vdso_default;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -157,8 +157,10 @@ static int alloc_init_cpu_groups(cpumask_var_t **pcpu_groups)
|
|||
|
||||
cpu_groups = kcalloc(nb_available_cpus, sizeof(cpu_groups),
|
||||
GFP_KERNEL);
|
||||
if (!cpu_groups)
|
||||
if (!cpu_groups) {
|
||||
free_cpumask_var(tmp);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
cpumask_copy(tmp, cpu_online_mask);
|
||||
|
||||
|
|
@ -167,6 +169,7 @@ static int alloc_init_cpu_groups(cpumask_var_t **pcpu_groups)
|
|||
topology_core_cpumask(cpumask_any(tmp));
|
||||
|
||||
if (!alloc_cpumask_var(&cpu_groups[num_groups], GFP_KERNEL)) {
|
||||
free_cpumask_var(tmp);
|
||||
free_cpu_groups(num_groups, &cpu_groups);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
|
@ -196,13 +199,12 @@ static int hotplug_tests(void)
|
|||
if (!page_buf)
|
||||
goto out_free_cpu_groups;
|
||||
|
||||
err = 0;
|
||||
/*
|
||||
* Of course the last CPU cannot be powered down and cpu_down() should
|
||||
* refuse doing that.
|
||||
*/
|
||||
pr_info("Trying to turn off and on again all CPUs\n");
|
||||
err += down_and_up_cpus(cpu_online_mask, offlined_cpus);
|
||||
err = down_and_up_cpus(cpu_online_mask, offlined_cpus);
|
||||
|
||||
/*
|
||||
* Take down CPUs by cpu group this time. When the last CPU is turned
|
||||
|
|
|
|||
|
|
@ -64,6 +64,7 @@ static int arizona_gpio_get(struct gpio_chip *chip, unsigned offset)
|
|||
ret = pm_runtime_get_sync(chip->parent);
|
||||
if (ret < 0) {
|
||||
dev_err(chip->parent, "Failed to resume: %d\n", ret);
|
||||
pm_runtime_put_autosuspend(chip->parent);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
@ -72,12 +73,15 @@ static int arizona_gpio_get(struct gpio_chip *chip, unsigned offset)
|
|||
if (ret < 0) {
|
||||
dev_err(chip->parent, "Failed to drop cache: %d\n",
|
||||
ret);
|
||||
pm_runtime_put_autosuspend(chip->parent);
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = regmap_read(arizona->regmap, reg, &val);
|
||||
if (ret < 0)
|
||||
if (ret < 0) {
|
||||
pm_runtime_put_autosuspend(chip->parent);
|
||||
return ret;
|
||||
}
|
||||
|
||||
pm_runtime_mark_last_busy(chip->parent);
|
||||
pm_runtime_put_autosuspend(chip->parent);
|
||||
|
|
@ -106,6 +110,7 @@ static int arizona_gpio_direction_out(struct gpio_chip *chip,
|
|||
ret = pm_runtime_get_sync(chip->parent);
|
||||
if (ret < 0) {
|
||||
dev_err(chip->parent, "Failed to resume: %d\n", ret);
|
||||
pm_runtime_put(chip->parent);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -107,6 +107,84 @@ static const struct i2c_device_id pca953x_id[] = {
|
|||
};
|
||||
MODULE_DEVICE_TABLE(i2c, pca953x_id);
|
||||
|
||||
#ifdef CONFIG_GPIO_PCA953X_IRQ
|
||||
|
||||
#include <linux/dmi.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/list.h>
|
||||
|
||||
static const struct dmi_system_id pca953x_dmi_acpi_irq_info[] = {
|
||||
{
|
||||
/*
|
||||
* On Intel Galileo Gen 2 board the IRQ pin of one of
|
||||
* the I²C GPIO expanders, which has GpioInt() resource,
|
||||
* is provided as an absolute number instead of being
|
||||
* relative. Since first controller (gpio-sch.c) and
|
||||
* second (gpio-dwapb.c) are at the fixed bases, we may
|
||||
* safely refer to the number in the global space to get
|
||||
* an IRQ out of it.
|
||||
*/
|
||||
.matches = {
|
||||
DMI_EXACT_MATCH(DMI_BOARD_NAME, "GalileoGen2"),
|
||||
},
|
||||
},
|
||||
{}
|
||||
};
|
||||
|
||||
#ifdef CONFIG_ACPI
|
||||
static int pca953x_acpi_get_pin(struct acpi_resource *ares, void *data)
|
||||
{
|
||||
struct acpi_resource_gpio *agpio;
|
||||
int *pin = data;
|
||||
|
||||
if (acpi_gpio_get_irq_resource(ares, &agpio))
|
||||
*pin = agpio->pin_table[0];
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int pca953x_acpi_find_pin(struct device *dev)
|
||||
{
|
||||
struct acpi_device *adev = ACPI_COMPANION(dev);
|
||||
int pin = -ENOENT, ret;
|
||||
LIST_HEAD(r);
|
||||
|
||||
ret = acpi_dev_get_resources(adev, &r, pca953x_acpi_get_pin, &pin);
|
||||
acpi_dev_free_resource_list(&r);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
return pin;
|
||||
}
|
||||
#else
|
||||
static inline int pca953x_acpi_find_pin(struct device *dev) { return -ENXIO; }
|
||||
#endif
|
||||
|
||||
static int pca953x_acpi_get_irq(struct device *dev)
|
||||
{
|
||||
int pin, ret;
|
||||
|
||||
pin = pca953x_acpi_find_pin(dev);
|
||||
if (pin < 0)
|
||||
return pin;
|
||||
|
||||
dev_info(dev, "Applying ACPI interrupt quirk (GPIO %d)\n", pin);
|
||||
|
||||
if (!gpio_is_valid(pin))
|
||||
return -EINVAL;
|
||||
|
||||
ret = gpio_request(pin, "pca953x interrupt");
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = gpio_to_irq(pin);
|
||||
|
||||
/* When pin is used as an IRQ, no need to keep it requested */
|
||||
gpio_free(pin);
|
||||
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
static const struct acpi_device_id pca953x_acpi_ids[] = {
|
||||
{ "INT3491", 16 | PCA953X_TYPE | PCA_LATCH_INT, },
|
||||
{ }
|
||||
|
|
@ -322,6 +400,7 @@ static const struct regmap_config pca953x_ai_i2c_regmap = {
|
|||
.writeable_reg = pca953x_writeable_register,
|
||||
.volatile_reg = pca953x_volatile_register,
|
||||
|
||||
.disable_locking = true,
|
||||
.cache_type = REGCACHE_RBTREE,
|
||||
.max_register = 0x7f,
|
||||
};
|
||||
|
|
@ -623,8 +702,6 @@ static void pca953x_irq_bus_sync_unlock(struct irq_data *d)
|
|||
DECLARE_BITMAP(reg_direction, MAX_LINE);
|
||||
int level;
|
||||
|
||||
pca953x_read_regs(chip, chip->regs->direction, reg_direction);
|
||||
|
||||
if (chip->driver_data & PCA_PCAL) {
|
||||
/* Enable latch on interrupt-enabled inputs */
|
||||
pca953x_write_regs(chip, PCAL953X_IN_LATCH, chip->irq_mask);
|
||||
|
|
@ -635,7 +712,11 @@ static void pca953x_irq_bus_sync_unlock(struct irq_data *d)
|
|||
pca953x_write_regs(chip, PCAL953X_INT_MASK, irq_mask);
|
||||
}
|
||||
|
||||
/* Switch direction to input if needed */
|
||||
pca953x_read_regs(chip, chip->regs->direction, reg_direction);
|
||||
|
||||
bitmap_or(irq_mask, chip->irq_trig_fall, chip->irq_trig_raise, gc->ngpio);
|
||||
bitmap_complement(reg_direction, reg_direction, gc->ngpio);
|
||||
bitmap_and(irq_mask, irq_mask, reg_direction, gc->ngpio);
|
||||
|
||||
/* Look for any newly setup interrupt */
|
||||
|
|
@ -734,14 +815,16 @@ static irqreturn_t pca953x_irq_handler(int irq, void *devid)
|
|||
struct gpio_chip *gc = &chip->gpio_chip;
|
||||
DECLARE_BITMAP(pending, MAX_LINE);
|
||||
int level;
|
||||
bool ret;
|
||||
|
||||
if (!pca953x_irq_pending(chip, pending))
|
||||
return IRQ_NONE;
|
||||
mutex_lock(&chip->i2c_lock);
|
||||
ret = pca953x_irq_pending(chip, pending);
|
||||
mutex_unlock(&chip->i2c_lock);
|
||||
|
||||
for_each_set_bit(level, pending, gc->ngpio)
|
||||
handle_nested_irq(irq_find_mapping(gc->irq.domain, level));
|
||||
|
||||
return IRQ_HANDLED;
|
||||
return IRQ_RETVAL(ret);
|
||||
}
|
||||
|
||||
static int pca953x_irq_setup(struct pca953x_chip *chip, int irq_base)
|
||||
|
|
@ -752,6 +835,12 @@ static int pca953x_irq_setup(struct pca953x_chip *chip, int irq_base)
|
|||
DECLARE_BITMAP(irq_stat, MAX_LINE);
|
||||
int ret;
|
||||
|
||||
if (dmi_first_match(pca953x_dmi_acpi_irq_info)) {
|
||||
ret = pca953x_acpi_get_irq(&client->dev);
|
||||
if (ret > 0)
|
||||
client->irq = ret;
|
||||
}
|
||||
|
||||
if (!client->irq)
|
||||
return 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -37,7 +37,8 @@ static void amdgpu_job_timedout(struct drm_sched_job *s_job)
|
|||
|
||||
memset(&ti, 0, sizeof(struct amdgpu_task_info));
|
||||
|
||||
if (amdgpu_ring_soft_recovery(ring, job->vmid, s_job->s_fence->parent)) {
|
||||
if (amdgpu_gpu_recovery &&
|
||||
amdgpu_ring_soft_recovery(ring, job->vmid, s_job->s_fence->parent)) {
|
||||
DRM_ERROR("ring %s timeout, but soft recovered\n",
|
||||
s_job->sched->name);
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -372,6 +372,52 @@ static int psp_tmr_load(struct psp_context *psp)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static void psp_prep_tmr_unload_cmd_buf(struct psp_context *psp,
|
||||
struct psp_gfx_cmd_resp *cmd)
|
||||
{
|
||||
if (amdgpu_sriov_vf(psp->adev))
|
||||
cmd->cmd_id = GFX_CMD_ID_DESTROY_VMR;
|
||||
else
|
||||
cmd->cmd_id = GFX_CMD_ID_DESTROY_TMR;
|
||||
}
|
||||
|
||||
static int psp_tmr_unload(struct psp_context *psp)
|
||||
{
|
||||
int ret;
|
||||
struct psp_gfx_cmd_resp *cmd;
|
||||
|
||||
cmd = kzalloc(sizeof(struct psp_gfx_cmd_resp), GFP_KERNEL);
|
||||
if (!cmd)
|
||||
return -ENOMEM;
|
||||
|
||||
psp_prep_tmr_unload_cmd_buf(psp, cmd);
|
||||
DRM_INFO("free PSP TMR buffer\n");
|
||||
|
||||
ret = psp_cmd_submit_buf(psp, NULL, cmd,
|
||||
psp->fence_buf_mc_addr);
|
||||
|
||||
kfree(cmd);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int psp_tmr_terminate(struct psp_context *psp)
|
||||
{
|
||||
int ret;
|
||||
void *tmr_buf;
|
||||
void **pptr;
|
||||
|
||||
ret = psp_tmr_unload(psp);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
/* free TMR memory buffer */
|
||||
pptr = amdgpu_sriov_vf(psp->adev) ? &tmr_buf : NULL;
|
||||
amdgpu_bo_free_kernel(&psp->tmr_bo, &psp->tmr_mc_addr, pptr);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void psp_prep_asd_load_cmd_buf(struct psp_gfx_cmd_resp *cmd,
|
||||
uint64_t asd_mc, uint32_t size)
|
||||
{
|
||||
|
|
@ -1779,8 +1825,6 @@ static int psp_hw_fini(void *handle)
|
|||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
struct psp_context *psp = &adev->psp;
|
||||
void *tmr_buf;
|
||||
void **pptr;
|
||||
|
||||
if (psp->adev->psp.ta_fw) {
|
||||
psp_ras_terminate(psp);
|
||||
|
|
@ -1790,10 +1834,9 @@ static int psp_hw_fini(void *handle)
|
|||
|
||||
psp_asd_unload(psp);
|
||||
|
||||
psp_tmr_terminate(psp);
|
||||
psp_ring_destroy(psp, PSP_RING_TYPE__KM);
|
||||
|
||||
pptr = amdgpu_sriov_vf(psp->adev) ? &tmr_buf : NULL;
|
||||
amdgpu_bo_free_kernel(&psp->tmr_bo, &psp->tmr_mc_addr, pptr);
|
||||
amdgpu_bo_free_kernel(&psp->fw_pri_bo,
|
||||
&psp->fw_pri_mc_addr, &psp->fw_pri_buf);
|
||||
amdgpu_bo_free_kernel(&psp->fence_buf_bo,
|
||||
|
|
@ -1840,6 +1883,18 @@ static int psp_suspend(void *handle)
|
|||
}
|
||||
}
|
||||
|
||||
ret = psp_asd_unload(psp);
|
||||
if (ret) {
|
||||
DRM_ERROR("Failed to unload asd\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = psp_tmr_terminate(psp);
|
||||
if (ret) {
|
||||
DRM_ERROR("Falied to terminate tmr\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = psp_ring_stop(psp, PSP_RING_TYPE__KM);
|
||||
if (ret) {
|
||||
DRM_ERROR("PSP ring stop failed\n");
|
||||
|
|
|
|||
|
|
@ -1358,7 +1358,7 @@ static int dm_late_init(void *handle)
|
|||
struct dmcu *dmcu = NULL;
|
||||
bool ret;
|
||||
|
||||
if (!adev->dm.fw_dmcu)
|
||||
if (!adev->dm.fw_dmcu && !adev->dm.dmub_fw)
|
||||
return detect_mst_link_for_all_connectors(adev->ddev);
|
||||
|
||||
dmcu = adev->dm.dc->res_pool->dmcu;
|
||||
|
|
|
|||
|
|
@ -307,8 +307,6 @@ static int hibmc_load(struct drm_device *dev)
|
|||
/* reset all the states of crtc/plane/encoder/connector */
|
||||
drm_mode_config_reset(dev);
|
||||
|
||||
drm_fbdev_generic_setup(dev, dev->mode_config.preferred_depth);
|
||||
|
||||
return 0;
|
||||
|
||||
err:
|
||||
|
|
@ -355,6 +353,9 @@ static int hibmc_pci_probe(struct pci_dev *pdev,
|
|||
ret);
|
||||
goto err_unload;
|
||||
}
|
||||
|
||||
drm_fbdev_generic_setup(dev, dev->mode_config.preferred_depth);
|
||||
|
||||
return 0;
|
||||
|
||||
err_unload:
|
||||
|
|
|
|||
|
|
@ -3822,6 +3822,17 @@ skl_check_main_ccs_coordinates(struct intel_plane_state *plane_state,
|
|||
return true;
|
||||
}
|
||||
|
||||
unsigned int
|
||||
intel_plane_fence_y_offset(const struct intel_plane_state *plane_state)
|
||||
{
|
||||
int x = 0, y = 0;
|
||||
|
||||
intel_plane_adjust_aligned_offset(&x, &y, plane_state, 0,
|
||||
plane_state->color_plane[0].offset, 0);
|
||||
|
||||
return y;
|
||||
}
|
||||
|
||||
static int skl_check_main_surface(struct intel_plane_state *plane_state)
|
||||
{
|
||||
struct drm_i915_private *dev_priv = to_i915(plane_state->uapi.plane->dev);
|
||||
|
|
|
|||
|
|
@ -608,6 +608,7 @@ unsigned int i9xx_plane_max_stride(struct intel_plane *plane,
|
|||
u32 pixel_format, u64 modifier,
|
||||
unsigned int rotation);
|
||||
int bdw_get_pipemisc_bpp(struct intel_crtc *crtc);
|
||||
unsigned int intel_plane_fence_y_offset(const struct intel_plane_state *plane_state);
|
||||
|
||||
struct intel_display_error_state *
|
||||
intel_display_capture_error_state(struct drm_i915_private *dev_priv);
|
||||
|
|
|
|||
|
|
@ -47,19 +47,6 @@
|
|||
#include "intel_fbc.h"
|
||||
#include "intel_frontbuffer.h"
|
||||
|
||||
/*
|
||||
* In some platforms where the CRTC's x:0/y:0 coordinates doesn't match the
|
||||
* frontbuffer's x:0/y:0 coordinates we lie to the hardware about the plane's
|
||||
* origin so the x and y offsets can actually fit the registers. As a
|
||||
* consequence, the fence doesn't really start exactly at the display plane
|
||||
* address we program because it starts at the real start of the buffer, so we
|
||||
* have to take this into consideration here.
|
||||
*/
|
||||
static unsigned int get_crtc_fence_y_offset(struct intel_fbc *fbc)
|
||||
{
|
||||
return fbc->state_cache.plane.y - fbc->state_cache.plane.adjusted_y;
|
||||
}
|
||||
|
||||
/*
|
||||
* For SKL+, the plane source size used by the hardware is based on the value we
|
||||
* write to the PLANE_SIZE register. For BDW-, the hardware looks at the value
|
||||
|
|
@ -141,7 +128,7 @@ static void i8xx_fbc_activate(struct drm_i915_private *dev_priv)
|
|||
fbc_ctl2 |= FBC_CTL_CPU_FENCE;
|
||||
intel_de_write(dev_priv, FBC_CONTROL2, fbc_ctl2);
|
||||
intel_de_write(dev_priv, FBC_FENCE_OFF,
|
||||
params->crtc.fence_y_offset);
|
||||
params->fence_y_offset);
|
||||
}
|
||||
|
||||
/* enable it... */
|
||||
|
|
@ -175,7 +162,7 @@ static void g4x_fbc_activate(struct drm_i915_private *dev_priv)
|
|||
if (params->fence_id >= 0) {
|
||||
dpfc_ctl |= DPFC_CTL_FENCE_EN | params->fence_id;
|
||||
intel_de_write(dev_priv, DPFC_FENCE_YOFF,
|
||||
params->crtc.fence_y_offset);
|
||||
params->fence_y_offset);
|
||||
} else {
|
||||
intel_de_write(dev_priv, DPFC_FENCE_YOFF, 0);
|
||||
}
|
||||
|
|
@ -243,7 +230,7 @@ static void ilk_fbc_activate(struct drm_i915_private *dev_priv)
|
|||
intel_de_write(dev_priv, SNB_DPFC_CTL_SA,
|
||||
SNB_CPU_FENCE_ENABLE | params->fence_id);
|
||||
intel_de_write(dev_priv, DPFC_CPU_FENCE_OFFSET,
|
||||
params->crtc.fence_y_offset);
|
||||
params->fence_y_offset);
|
||||
}
|
||||
} else {
|
||||
if (IS_GEN(dev_priv, 6)) {
|
||||
|
|
@ -253,7 +240,7 @@ static void ilk_fbc_activate(struct drm_i915_private *dev_priv)
|
|||
}
|
||||
|
||||
intel_de_write(dev_priv, ILK_DPFC_FENCE_YOFF,
|
||||
params->crtc.fence_y_offset);
|
||||
params->fence_y_offset);
|
||||
/* enable it... */
|
||||
intel_de_write(dev_priv, ILK_DPFC_CONTROL, dpfc_ctl | DPFC_CTL_EN);
|
||||
|
||||
|
|
@ -320,7 +307,7 @@ static void gen7_fbc_activate(struct drm_i915_private *dev_priv)
|
|||
intel_de_write(dev_priv, SNB_DPFC_CTL_SA,
|
||||
SNB_CPU_FENCE_ENABLE | params->fence_id);
|
||||
intel_de_write(dev_priv, DPFC_CPU_FENCE_OFFSET,
|
||||
params->crtc.fence_y_offset);
|
||||
params->fence_y_offset);
|
||||
} else if (dev_priv->ggtt.num_fences) {
|
||||
intel_de_write(dev_priv, SNB_DPFC_CTL_SA, 0);
|
||||
intel_de_write(dev_priv, DPFC_CPU_FENCE_OFFSET, 0);
|
||||
|
|
@ -631,8 +618,8 @@ static bool rotation_is_valid(struct drm_i915_private *dev_priv,
|
|||
/*
|
||||
* For some reason, the hardware tracking starts looking at whatever we
|
||||
* programmed as the display plane base address register. It does not look at
|
||||
* the X and Y offset registers. That's why we look at the crtc->adjusted{x,y}
|
||||
* variables instead of just looking at the pipe/plane size.
|
||||
* the X and Y offset registers. That's why we include the src x/y offsets
|
||||
* instead of just looking at the plane size.
|
||||
*/
|
||||
static bool intel_fbc_hw_tracking_covers_screen(struct intel_crtc *crtc)
|
||||
{
|
||||
|
|
@ -705,7 +692,6 @@ static void intel_fbc_update_state_cache(struct intel_crtc *crtc,
|
|||
cache->plane.src_h = drm_rect_height(&plane_state->uapi.src) >> 16;
|
||||
cache->plane.adjusted_x = plane_state->color_plane[0].x;
|
||||
cache->plane.adjusted_y = plane_state->color_plane[0].y;
|
||||
cache->plane.y = plane_state->uapi.src.y1 >> 16;
|
||||
|
||||
cache->plane.pixel_blend_mode = plane_state->hw.pixel_blend_mode;
|
||||
|
||||
|
|
@ -713,6 +699,8 @@ static void intel_fbc_update_state_cache(struct intel_crtc *crtc,
|
|||
cache->fb.stride = fb->pitches[0];
|
||||
cache->fb.modifier = fb->modifier;
|
||||
|
||||
cache->fence_y_offset = intel_plane_fence_y_offset(plane_state);
|
||||
|
||||
drm_WARN_ON(&dev_priv->drm, plane_state->flags & PLANE_HAS_FENCE &&
|
||||
!plane_state->vma->fence);
|
||||
|
||||
|
|
@ -883,10 +871,10 @@ static void intel_fbc_get_reg_params(struct intel_crtc *crtc,
|
|||
memset(params, 0, sizeof(*params));
|
||||
|
||||
params->fence_id = cache->fence_id;
|
||||
params->fence_y_offset = cache->fence_y_offset;
|
||||
|
||||
params->crtc.pipe = crtc->pipe;
|
||||
params->crtc.i9xx_plane = to_intel_plane(crtc->base.primary)->i9xx_plane;
|
||||
params->crtc.fence_y_offset = get_crtc_fence_y_offset(fbc);
|
||||
|
||||
params->fb.format = cache->fb.format;
|
||||
params->fb.stride = cache->fb.stride;
|
||||
|
|
|
|||
|
|
@ -204,25 +204,25 @@ static int __ring_active(struct intel_ring *ring)
|
|||
{
|
||||
int err;
|
||||
|
||||
err = i915_active_acquire(&ring->vma->active);
|
||||
err = intel_ring_pin(ring);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
err = intel_ring_pin(ring);
|
||||
err = i915_active_acquire(&ring->vma->active);
|
||||
if (err)
|
||||
goto err_active;
|
||||
goto err_pin;
|
||||
|
||||
return 0;
|
||||
|
||||
err_active:
|
||||
i915_active_release(&ring->vma->active);
|
||||
err_pin:
|
||||
intel_ring_unpin(ring);
|
||||
return err;
|
||||
}
|
||||
|
||||
static void __ring_retire(struct intel_ring *ring)
|
||||
{
|
||||
intel_ring_unpin(ring);
|
||||
i915_active_release(&ring->vma->active);
|
||||
intel_ring_unpin(ring);
|
||||
}
|
||||
|
||||
__i915_active_call
|
||||
|
|
|
|||
|
|
@ -230,7 +230,7 @@ static int per_file_stats(int id, void *ptr, void *data)
|
|||
struct file_stats *stats = data;
|
||||
struct i915_vma *vma;
|
||||
|
||||
if (!kref_get_unless_zero(&obj->base.refcount))
|
||||
if (IS_ERR_OR_NULL(obj) || !kref_get_unless_zero(&obj->base.refcount))
|
||||
return 0;
|
||||
|
||||
stats->count++;
|
||||
|
|
|
|||
|
|
@ -410,8 +410,6 @@ struct intel_fbc {
|
|||
int adjusted_x;
|
||||
int adjusted_y;
|
||||
|
||||
int y;
|
||||
|
||||
u16 pixel_blend_mode;
|
||||
} plane;
|
||||
|
||||
|
|
@ -420,6 +418,8 @@ struct intel_fbc {
|
|||
unsigned int stride;
|
||||
u64 modifier;
|
||||
} fb;
|
||||
|
||||
unsigned int fence_y_offset;
|
||||
u16 gen9_wa_cfb_stride;
|
||||
s8 fence_id;
|
||||
} state_cache;
|
||||
|
|
@ -435,7 +435,6 @@ struct intel_fbc {
|
|||
struct {
|
||||
enum pipe pipe;
|
||||
enum i9xx_plane_id i9xx_plane;
|
||||
unsigned int fence_y_offset;
|
||||
} crtc;
|
||||
|
||||
struct {
|
||||
|
|
@ -444,6 +443,7 @@ struct intel_fbc {
|
|||
} fb;
|
||||
|
||||
int cfb_size;
|
||||
unsigned int fence_y_offset;
|
||||
u16 gen9_wa_cfb_stride;
|
||||
s8 fence_id;
|
||||
bool plane_visible;
|
||||
|
|
|
|||
|
|
@ -104,6 +104,7 @@ vma_create(struct drm_i915_gem_object *obj,
|
|||
struct i915_address_space *vm,
|
||||
const struct i915_ggtt_view *view)
|
||||
{
|
||||
struct i915_vma *pos = ERR_PTR(-E2BIG);
|
||||
struct i915_vma *vma;
|
||||
struct rb_node *rb, **p;
|
||||
|
||||
|
|
@ -184,7 +185,6 @@ vma_create(struct drm_i915_gem_object *obj,
|
|||
rb = NULL;
|
||||
p = &obj->vma.tree.rb_node;
|
||||
while (*p) {
|
||||
struct i915_vma *pos;
|
||||
long cmp;
|
||||
|
||||
rb = *p;
|
||||
|
|
@ -196,16 +196,12 @@ vma_create(struct drm_i915_gem_object *obj,
|
|||
* and dispose of ours.
|
||||
*/
|
||||
cmp = i915_vma_compare(pos, vm, view);
|
||||
if (cmp == 0) {
|
||||
spin_unlock(&obj->vma.lock);
|
||||
i915_vma_free(vma);
|
||||
return pos;
|
||||
}
|
||||
|
||||
if (cmp < 0)
|
||||
p = &rb->rb_right;
|
||||
else
|
||||
else if (cmp > 0)
|
||||
p = &rb->rb_left;
|
||||
else
|
||||
goto err_unlock;
|
||||
}
|
||||
rb_link_node(&vma->obj_node, rb, p);
|
||||
rb_insert_color(&vma->obj_node, &obj->vma.tree);
|
||||
|
|
@ -228,8 +224,9 @@ vma_create(struct drm_i915_gem_object *obj,
|
|||
err_unlock:
|
||||
spin_unlock(&obj->vma.lock);
|
||||
err_vma:
|
||||
i915_vm_put(vm);
|
||||
i915_vma_free(vma);
|
||||
return ERR_PTR(-E2BIG);
|
||||
return pos;
|
||||
}
|
||||
|
||||
static struct i915_vma *
|
||||
|
|
|
|||
|
|
@ -6,12 +6,12 @@ config DRM_MEDIATEK
|
|||
depends on COMMON_CLK
|
||||
depends on HAVE_ARM_SMCCC
|
||||
depends on OF
|
||||
depends on MTK_MMSYS
|
||||
select DRM_GEM_CMA_HELPER
|
||||
select DRM_KMS_HELPER
|
||||
select DRM_MIPI_DSI
|
||||
select DRM_PANEL
|
||||
select MEMORY
|
||||
select MTK_MMSYS
|
||||
select MTK_SMI
|
||||
select VIDEOMODE_HELPERS
|
||||
help
|
||||
|
|
|
|||
|
|
@ -193,7 +193,6 @@ static int mtk_crtc_ddp_clk_enable(struct mtk_drm_crtc *mtk_crtc)
|
|||
int ret;
|
||||
int i;
|
||||
|
||||
DRM_DEBUG_DRIVER("%s\n", __func__);
|
||||
for (i = 0; i < mtk_crtc->ddp_comp_nr; i++) {
|
||||
ret = clk_prepare_enable(mtk_crtc->ddp_comp[i]->clk);
|
||||
if (ret) {
|
||||
|
|
@ -213,7 +212,6 @@ static void mtk_crtc_ddp_clk_disable(struct mtk_drm_crtc *mtk_crtc)
|
|||
{
|
||||
int i;
|
||||
|
||||
DRM_DEBUG_DRIVER("%s\n", __func__);
|
||||
for (i = 0; i < mtk_crtc->ddp_comp_nr; i++)
|
||||
clk_disable_unprepare(mtk_crtc->ddp_comp[i]->clk);
|
||||
}
|
||||
|
|
@ -258,7 +256,6 @@ static int mtk_crtc_ddp_hw_init(struct mtk_drm_crtc *mtk_crtc)
|
|||
int ret;
|
||||
int i;
|
||||
|
||||
DRM_DEBUG_DRIVER("%s\n", __func__);
|
||||
if (WARN_ON(!crtc->state))
|
||||
return -EINVAL;
|
||||
|
||||
|
|
@ -299,7 +296,6 @@ static int mtk_crtc_ddp_hw_init(struct mtk_drm_crtc *mtk_crtc)
|
|||
goto err_mutex_unprepare;
|
||||
}
|
||||
|
||||
DRM_DEBUG_DRIVER("mediatek_ddp_ddp_path_setup\n");
|
||||
for (i = 0; i < mtk_crtc->ddp_comp_nr - 1; i++) {
|
||||
mtk_mmsys_ddp_connect(mtk_crtc->mmsys_dev,
|
||||
mtk_crtc->ddp_comp[i]->id,
|
||||
|
|
@ -349,7 +345,6 @@ static void mtk_crtc_ddp_hw_fini(struct mtk_drm_crtc *mtk_crtc)
|
|||
struct drm_crtc *crtc = &mtk_crtc->base;
|
||||
int i;
|
||||
|
||||
DRM_DEBUG_DRIVER("%s\n", __func__);
|
||||
for (i = 0; i < mtk_crtc->ddp_comp_nr; i++) {
|
||||
mtk_ddp_comp_stop(mtk_crtc->ddp_comp[i]);
|
||||
if (i == 1)
|
||||
|
|
@ -831,7 +826,8 @@ int mtk_drm_crtc_create(struct drm_device *drm_dev,
|
|||
|
||||
#if IS_REACHABLE(CONFIG_MTK_CMDQ)
|
||||
mtk_crtc->cmdq_client =
|
||||
cmdq_mbox_create(dev, drm_crtc_index(&mtk_crtc->base),
|
||||
cmdq_mbox_create(mtk_crtc->mmsys_dev,
|
||||
drm_crtc_index(&mtk_crtc->base),
|
||||
2000);
|
||||
if (IS_ERR(mtk_crtc->cmdq_client)) {
|
||||
dev_dbg(dev, "mtk_crtc %d failed to create mailbox client, writing register by CPU now\n",
|
||||
|
|
|
|||
|
|
@ -444,7 +444,6 @@ static int mtk_drm_probe(struct platform_device *pdev)
|
|||
if (!private)
|
||||
return -ENOMEM;
|
||||
|
||||
private->data = of_device_get_match_data(dev);
|
||||
private->mmsys_dev = dev->parent;
|
||||
if (!private->mmsys_dev) {
|
||||
dev_err(dev, "Failed to get MMSYS device\n");
|
||||
|
|
@ -514,7 +513,8 @@ static int mtk_drm_probe(struct platform_device *pdev)
|
|||
goto err_node;
|
||||
}
|
||||
|
||||
ret = mtk_ddp_comp_init(dev, node, comp, comp_id, NULL);
|
||||
ret = mtk_ddp_comp_init(dev->parent, node, comp,
|
||||
comp_id, NULL);
|
||||
if (ret) {
|
||||
of_node_put(node);
|
||||
goto err_node;
|
||||
|
|
@ -571,7 +571,6 @@ static int mtk_drm_sys_suspend(struct device *dev)
|
|||
int ret;
|
||||
|
||||
ret = drm_mode_config_helper_suspend(drm);
|
||||
DRM_DEBUG_DRIVER("mtk_drm_sys_suspend\n");
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
@ -583,7 +582,6 @@ static int mtk_drm_sys_resume(struct device *dev)
|
|||
int ret;
|
||||
|
||||
ret = drm_mode_config_helper_resume(drm);
|
||||
DRM_DEBUG_DRIVER("mtk_drm_sys_resume\n");
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -164,6 +164,16 @@ static int mtk_plane_atomic_check(struct drm_plane *plane,
|
|||
true, true);
|
||||
}
|
||||
|
||||
static void mtk_plane_atomic_disable(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
{
|
||||
struct mtk_plane_state *state = to_mtk_plane_state(plane->state);
|
||||
|
||||
state->pending.enable = false;
|
||||
wmb(); /* Make sure the above parameter is set before update */
|
||||
state->pending.dirty = true;
|
||||
}
|
||||
|
||||
static void mtk_plane_atomic_update(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
{
|
||||
|
|
@ -178,6 +188,11 @@ static void mtk_plane_atomic_update(struct drm_plane *plane,
|
|||
if (!crtc || WARN_ON(!fb))
|
||||
return;
|
||||
|
||||
if (!plane->state->visible) {
|
||||
mtk_plane_atomic_disable(plane, old_state);
|
||||
return;
|
||||
}
|
||||
|
||||
gem = fb->obj[0];
|
||||
mtk_gem = to_mtk_gem_obj(gem);
|
||||
addr = mtk_gem->dma_addr;
|
||||
|
|
@ -200,16 +215,6 @@ static void mtk_plane_atomic_update(struct drm_plane *plane,
|
|||
state->pending.dirty = true;
|
||||
}
|
||||
|
||||
static void mtk_plane_atomic_disable(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
{
|
||||
struct mtk_plane_state *state = to_mtk_plane_state(plane->state);
|
||||
|
||||
state->pending.enable = false;
|
||||
wmb(); /* Make sure the above parameter is set before update */
|
||||
state->pending.dirty = true;
|
||||
}
|
||||
|
||||
static const struct drm_plane_helper_funcs mtk_plane_helper_funcs = {
|
||||
.prepare_fb = drm_gem_fb_prepare_fb,
|
||||
.atomic_check = mtk_plane_atomic_check,
|
||||
|
|
|
|||
|
|
@ -316,10 +316,7 @@ static void mtk_dsi_lane0_ulp_mode_leave(struct mtk_dsi *dsi)
|
|||
|
||||
static bool mtk_dsi_clk_hs_state(struct mtk_dsi *dsi)
|
||||
{
|
||||
u32 tmp_reg1;
|
||||
|
||||
tmp_reg1 = readl(dsi->regs + DSI_PHY_LCCON);
|
||||
return ((tmp_reg1 & LC_HS_TX_EN) == 1) ? true : false;
|
||||
return readl(dsi->regs + DSI_PHY_LCCON) & LC_HS_TX_EN;
|
||||
}
|
||||
|
||||
static void mtk_dsi_clk_hs_mode(struct mtk_dsi *dsi, bool enter)
|
||||
|
|
|
|||
|
|
@ -1630,8 +1630,6 @@ static int mtk_hdmi_audio_startup(struct device *dev, void *data)
|
|||
{
|
||||
struct mtk_hdmi *hdmi = dev_get_drvdata(dev);
|
||||
|
||||
dev_dbg(dev, "%s\n", __func__);
|
||||
|
||||
mtk_hdmi_audio_enable(hdmi);
|
||||
|
||||
return 0;
|
||||
|
|
@ -1641,8 +1639,6 @@ static void mtk_hdmi_audio_shutdown(struct device *dev, void *data)
|
|||
{
|
||||
struct mtk_hdmi *hdmi = dev_get_drvdata(dev);
|
||||
|
||||
dev_dbg(dev, "%s\n", __func__);
|
||||
|
||||
mtk_hdmi_audio_disable(hdmi);
|
||||
}
|
||||
|
||||
|
|
@ -1651,8 +1647,6 @@ mtk_hdmi_audio_digital_mute(struct device *dev, void *data, bool enable)
|
|||
{
|
||||
struct mtk_hdmi *hdmi = dev_get_drvdata(dev);
|
||||
|
||||
dev_dbg(dev, "%s(%d)\n", __func__, enable);
|
||||
|
||||
if (enable)
|
||||
mtk_hdmi_hw_aud_mute(hdmi);
|
||||
else
|
||||
|
|
@ -1665,8 +1659,6 @@ static int mtk_hdmi_audio_get_eld(struct device *dev, void *data, uint8_t *buf,
|
|||
{
|
||||
struct mtk_hdmi *hdmi = dev_get_drvdata(dev);
|
||||
|
||||
dev_dbg(dev, "%s\n", __func__);
|
||||
|
||||
memcpy(buf, hdmi->conn.eld, min(sizeof(hdmi->conn.eld), len));
|
||||
|
||||
return 0;
|
||||
|
|
@ -1766,7 +1758,6 @@ static int mtk_drm_hdmi_probe(struct platform_device *pdev)
|
|||
goto err_bridge_remove;
|
||||
}
|
||||
|
||||
dev_dbg(dev, "mediatek hdmi probe success\n");
|
||||
return 0;
|
||||
|
||||
err_bridge_remove:
|
||||
|
|
@ -1789,7 +1780,7 @@ static int mtk_hdmi_suspend(struct device *dev)
|
|||
struct mtk_hdmi *hdmi = dev_get_drvdata(dev);
|
||||
|
||||
mtk_hdmi_clk_disable_audio(hdmi);
|
||||
dev_dbg(dev, "hdmi suspend success!\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -1804,7 +1795,6 @@ static int mtk_hdmi_resume(struct device *dev)
|
|||
return ret;
|
||||
}
|
||||
|
||||
dev_dbg(dev, "hdmi resume success!\n");
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -107,60 +107,10 @@
|
|||
#define RGS_HDMITX_5T1_EDG (0xf << 4)
|
||||
#define RGS_HDMITX_PLUG_TST BIT(0)
|
||||
|
||||
static const u8 PREDIV[3][4] = {
|
||||
{0x0, 0x0, 0x0, 0x0}, /* 27Mhz */
|
||||
{0x1, 0x1, 0x1, 0x1}, /* 74Mhz */
|
||||
{0x1, 0x1, 0x1, 0x1} /* 148Mhz */
|
||||
};
|
||||
|
||||
static const u8 TXDIV[3][4] = {
|
||||
{0x3, 0x3, 0x3, 0x2}, /* 27Mhz */
|
||||
{0x2, 0x1, 0x1, 0x1}, /* 74Mhz */
|
||||
{0x1, 0x0, 0x0, 0x0} /* 148Mhz */
|
||||
};
|
||||
|
||||
static const u8 FBKSEL[3][4] = {
|
||||
{0x1, 0x1, 0x1, 0x1}, /* 27Mhz */
|
||||
{0x1, 0x0, 0x1, 0x1}, /* 74Mhz */
|
||||
{0x1, 0x0, 0x1, 0x1} /* 148Mhz */
|
||||
};
|
||||
|
||||
static const u8 FBKDIV[3][4] = {
|
||||
{19, 24, 29, 19}, /* 27Mhz */
|
||||
{19, 24, 14, 19}, /* 74Mhz */
|
||||
{19, 24, 14, 19} /* 148Mhz */
|
||||
};
|
||||
|
||||
static const u8 DIVEN[3][4] = {
|
||||
{0x2, 0x1, 0x1, 0x2}, /* 27Mhz */
|
||||
{0x2, 0x2, 0x2, 0x2}, /* 74Mhz */
|
||||
{0x2, 0x2, 0x2, 0x2} /* 148Mhz */
|
||||
};
|
||||
|
||||
static const u8 HTPLLBP[3][4] = {
|
||||
{0xc, 0xc, 0x8, 0xc}, /* 27Mhz */
|
||||
{0xc, 0xf, 0xf, 0xc}, /* 74Mhz */
|
||||
{0xc, 0xf, 0xf, 0xc} /* 148Mhz */
|
||||
};
|
||||
|
||||
static const u8 HTPLLBC[3][4] = {
|
||||
{0x2, 0x3, 0x3, 0x2}, /* 27Mhz */
|
||||
{0x2, 0x3, 0x3, 0x2}, /* 74Mhz */
|
||||
{0x2, 0x3, 0x3, 0x2} /* 148Mhz */
|
||||
};
|
||||
|
||||
static const u8 HTPLLBR[3][4] = {
|
||||
{0x1, 0x1, 0x0, 0x1}, /* 27Mhz */
|
||||
{0x1, 0x2, 0x2, 0x1}, /* 74Mhz */
|
||||
{0x1, 0x2, 0x2, 0x1} /* 148Mhz */
|
||||
};
|
||||
|
||||
static int mtk_hdmi_pll_prepare(struct clk_hw *hw)
|
||||
{
|
||||
struct mtk_hdmi_phy *hdmi_phy = to_mtk_hdmi_phy(hw);
|
||||
|
||||
dev_dbg(hdmi_phy->dev, "%s\n", __func__);
|
||||
|
||||
mtk_hdmi_phy_set_bits(hdmi_phy, HDMI_CON1, RG_HDMITX_PLL_AUTOK_EN);
|
||||
mtk_hdmi_phy_set_bits(hdmi_phy, HDMI_CON0, RG_HDMITX_PLL_POSDIV);
|
||||
mtk_hdmi_phy_clear_bits(hdmi_phy, HDMI_CON3, RG_HDMITX_MHLCK_EN);
|
||||
|
|
@ -178,8 +128,6 @@ static void mtk_hdmi_pll_unprepare(struct clk_hw *hw)
|
|||
{
|
||||
struct mtk_hdmi_phy *hdmi_phy = to_mtk_hdmi_phy(hw);
|
||||
|
||||
dev_dbg(hdmi_phy->dev, "%s\n", __func__);
|
||||
|
||||
mtk_hdmi_phy_clear_bits(hdmi_phy, HDMI_CON1, RG_HDMITX_PLL_TXDIV_EN);
|
||||
mtk_hdmi_phy_clear_bits(hdmi_phy, HDMI_CON1, RG_HDMITX_PLL_BIAS_LPF_EN);
|
||||
usleep_range(100, 150);
|
||||
|
|
|
|||
|
|
@ -261,6 +261,12 @@
|
|||
#define VIU_OSD_FIFO_DEPTH_VAL(val) ((val & 0x7f) << 12)
|
||||
#define VIU_OSD_WORDS_PER_BURST(words) (((words & 0x4) >> 1) << 22)
|
||||
#define VIU_OSD_FIFO_LIMITS(size) ((size & 0xf) << 24)
|
||||
#define VIU_OSD_BURST_LENGTH_24 (0x0 << 31 | 0x0 << 10)
|
||||
#define VIU_OSD_BURST_LENGTH_32 (0x0 << 31 | 0x1 << 10)
|
||||
#define VIU_OSD_BURST_LENGTH_48 (0x0 << 31 | 0x2 << 10)
|
||||
#define VIU_OSD_BURST_LENGTH_64 (0x0 << 31 | 0x3 << 10)
|
||||
#define VIU_OSD_BURST_LENGTH_96 (0x1 << 31 | 0x0 << 10)
|
||||
#define VIU_OSD_BURST_LENGTH_128 (0x1 << 31 | 0x1 << 10)
|
||||
|
||||
#define VD1_IF0_GEN_REG 0x1a50
|
||||
#define VD1_IF0_CANVAS0 0x1a51
|
||||
|
|
|
|||
|
|
@ -411,13 +411,6 @@ void meson_viu_gxm_disable_osd1_afbc(struct meson_drm *priv)
|
|||
priv->io_base + _REG(VIU_MISC_CTRL1));
|
||||
}
|
||||
|
||||
static inline uint32_t meson_viu_osd_burst_length_reg(uint32_t length)
|
||||
{
|
||||
uint32_t val = (((length & 0x80) % 24) / 12);
|
||||
|
||||
return (((val & 0x3) << 10) | (((val & 0x4) >> 2) << 31));
|
||||
}
|
||||
|
||||
void meson_viu_init(struct meson_drm *priv)
|
||||
{
|
||||
uint32_t reg;
|
||||
|
|
@ -444,9 +437,9 @@ void meson_viu_init(struct meson_drm *priv)
|
|||
VIU_OSD_FIFO_LIMITS(2); /* fifo_lim: 2*16=32 */
|
||||
|
||||
if (meson_vpu_is_compatible(priv, VPU_COMPATIBLE_G12A))
|
||||
reg |= meson_viu_osd_burst_length_reg(32);
|
||||
reg |= VIU_OSD_BURST_LENGTH_32;
|
||||
else
|
||||
reg |= meson_viu_osd_burst_length_reg(64);
|
||||
reg |= VIU_OSD_BURST_LENGTH_64;
|
||||
|
||||
writel_relaxed(reg, priv->io_base + _REG(VIU_OSD1_FIFO_CTRL_STAT));
|
||||
writel_relaxed(reg, priv->io_base + _REG(VIU_OSD2_FIFO_CTRL_STAT));
|
||||
|
|
|
|||
|
|
@ -601,6 +601,9 @@ nv50_audio_disable(struct drm_encoder *encoder, struct nouveau_crtc *nv_crtc)
|
|||
(0x0100 << nv_crtc->index),
|
||||
};
|
||||
|
||||
if (!nv_encoder->audio)
|
||||
return;
|
||||
|
||||
nv_encoder->audio = false;
|
||||
nvif_mthd(&disp->disp->object, 0, &args, sizeof(args));
|
||||
|
||||
|
|
|
|||
|
|
@ -550,7 +550,7 @@ static unsigned long nouveau_dmem_migrate_copy_one(struct nouveau_drm *drm,
|
|||
DMA_BIDIRECTIONAL);
|
||||
if (dma_mapping_error(dev, *dma_addr))
|
||||
goto out_free_page;
|
||||
if (drm->dmem->migrate.copy_func(drm, page_size(spage),
|
||||
if (drm->dmem->migrate.copy_func(drm, 1,
|
||||
NOUVEAU_APER_VRAM, paddr, NOUVEAU_APER_HOST, *dma_addr))
|
||||
goto out_dma_unmap;
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -562,6 +562,7 @@ static int nouveau_range_fault(struct nouveau_svmm *svmm,
|
|||
.end = notifier->notifier.interval_tree.last + 1,
|
||||
.pfn_flags_mask = HMM_PFN_REQ_FAULT | HMM_PFN_REQ_WRITE,
|
||||
.hmm_pfns = hmm_pfns,
|
||||
.dev_private_owner = drm->dev,
|
||||
};
|
||||
struct mm_struct *mm = notifier->notifier.mm;
|
||||
int ret;
|
||||
|
|
|
|||
|
|
@ -118,10 +118,10 @@ g94_i2c_aux_xfer(struct nvkm_i2c_aux *obj, bool retry,
|
|||
if (retries)
|
||||
udelay(400);
|
||||
|
||||
/* transaction request, wait up to 1ms for it to complete */
|
||||
/* transaction request, wait up to 2ms for it to complete */
|
||||
nvkm_wr32(device, 0x00e4e4 + base, 0x00010000 | ctrl);
|
||||
|
||||
timeout = 1000;
|
||||
timeout = 2000;
|
||||
do {
|
||||
ctrl = nvkm_rd32(device, 0x00e4e4 + base);
|
||||
udelay(1);
|
||||
|
|
|
|||
|
|
@ -118,10 +118,10 @@ gm200_i2c_aux_xfer(struct nvkm_i2c_aux *obj, bool retry,
|
|||
if (retries)
|
||||
udelay(400);
|
||||
|
||||
/* transaction request, wait up to 1ms for it to complete */
|
||||
/* transaction request, wait up to 2ms for it to complete */
|
||||
nvkm_wr32(device, 0x00d954 + base, 0x00010000 | ctrl);
|
||||
|
||||
timeout = 1000;
|
||||
timeout = 2000;
|
||||
do {
|
||||
ctrl = nvkm_rd32(device, 0x00d954 + base);
|
||||
udelay(1);
|
||||
|
|
|
|||
|
|
@ -5563,6 +5563,7 @@ static int ci_parse_power_table(struct radeon_device *rdev)
|
|||
if (!rdev->pm.dpm.ps)
|
||||
return -ENOMEM;
|
||||
power_state_offset = (u8 *)state_array->states;
|
||||
rdev->pm.dpm.num_ps = 0;
|
||||
for (i = 0; i < state_array->ucNumEntries; i++) {
|
||||
u8 *idx;
|
||||
power_state = (union pplib_power_state *)power_state_offset;
|
||||
|
|
@ -5572,10 +5573,8 @@ static int ci_parse_power_table(struct radeon_device *rdev)
|
|||
if (!rdev->pm.power_state[i].clock_info)
|
||||
return -EINVAL;
|
||||
ps = kzalloc(sizeof(struct ci_ps), GFP_KERNEL);
|
||||
if (ps == NULL) {
|
||||
kfree(rdev->pm.dpm.ps);
|
||||
if (ps == NULL)
|
||||
return -ENOMEM;
|
||||
}
|
||||
rdev->pm.dpm.ps[i].ps_priv = ps;
|
||||
ci_parse_pplib_non_clock_info(rdev, &rdev->pm.dpm.ps[i],
|
||||
non_clock_info,
|
||||
|
|
@ -5597,8 +5596,8 @@ static int ci_parse_power_table(struct radeon_device *rdev)
|
|||
k++;
|
||||
}
|
||||
power_state_offset += 2 + power_state->v2.ucNumDPMLevels;
|
||||
rdev->pm.dpm.num_ps = i + 1;
|
||||
}
|
||||
rdev->pm.dpm.num_ps = state_array->ucNumEntries;
|
||||
|
||||
/* fill in the vce power states */
|
||||
for (i = 0; i < RADEON_MAX_VCE_LEVELS; i++) {
|
||||
|
|
|
|||
|
|
@ -829,13 +829,20 @@ static int ib_nl_get_path_rec_attrs_len(ib_sa_comp_mask comp_mask)
|
|||
return len;
|
||||
}
|
||||
|
||||
static int ib_nl_send_msg(struct ib_sa_query *query, gfp_t gfp_mask)
|
||||
static int ib_nl_make_request(struct ib_sa_query *query, gfp_t gfp_mask)
|
||||
{
|
||||
struct sk_buff *skb = NULL;
|
||||
struct nlmsghdr *nlh;
|
||||
void *data;
|
||||
struct ib_sa_mad *mad;
|
||||
int len;
|
||||
unsigned long flags;
|
||||
unsigned long delay;
|
||||
gfp_t gfp_flag;
|
||||
int ret;
|
||||
|
||||
INIT_LIST_HEAD(&query->list);
|
||||
query->seq = (u32)atomic_inc_return(&ib_nl_sa_request_seq);
|
||||
|
||||
mad = query->mad_buf->mad;
|
||||
len = ib_nl_get_path_rec_attrs_len(mad->sa_hdr.comp_mask);
|
||||
|
|
@ -860,36 +867,25 @@ static int ib_nl_send_msg(struct ib_sa_query *query, gfp_t gfp_mask)
|
|||
/* Repair the nlmsg header length */
|
||||
nlmsg_end(skb, nlh);
|
||||
|
||||
return rdma_nl_multicast(&init_net, skb, RDMA_NL_GROUP_LS, gfp_mask);
|
||||
}
|
||||
gfp_flag = ((gfp_mask & GFP_ATOMIC) == GFP_ATOMIC) ? GFP_ATOMIC :
|
||||
GFP_NOWAIT;
|
||||
|
||||
static int ib_nl_make_request(struct ib_sa_query *query, gfp_t gfp_mask)
|
||||
{
|
||||
unsigned long flags;
|
||||
unsigned long delay;
|
||||
int ret;
|
||||
|
||||
INIT_LIST_HEAD(&query->list);
|
||||
query->seq = (u32)atomic_inc_return(&ib_nl_sa_request_seq);
|
||||
|
||||
/* Put the request on the list first.*/
|
||||
spin_lock_irqsave(&ib_nl_request_lock, flags);
|
||||
ret = rdma_nl_multicast(&init_net, skb, RDMA_NL_GROUP_LS, gfp_flag);
|
||||
|
||||
if (ret)
|
||||
goto out;
|
||||
|
||||
/* Put the request on the list.*/
|
||||
delay = msecs_to_jiffies(sa_local_svc_timeout_ms);
|
||||
query->timeout = delay + jiffies;
|
||||
list_add_tail(&query->list, &ib_nl_request_list);
|
||||
/* Start the timeout if this is the only request */
|
||||
if (ib_nl_request_list.next == &query->list)
|
||||
queue_delayed_work(ib_nl_wq, &ib_nl_timed_work, delay);
|
||||
spin_unlock_irqrestore(&ib_nl_request_lock, flags);
|
||||
|
||||
ret = ib_nl_send_msg(query, gfp_mask);
|
||||
if (ret) {
|
||||
ret = -EIO;
|
||||
/* Remove the request */
|
||||
spin_lock_irqsave(&ib_nl_request_lock, flags);
|
||||
list_del(&query->list);
|
||||
spin_unlock_irqrestore(&ib_nl_request_lock, flags);
|
||||
}
|
||||
out:
|
||||
spin_unlock_irqrestore(&ib_nl_request_lock, flags);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user