Linux 5.10-rc6
-----BEGIN PGP SIGNATURE----- iQFSBAABCAA8FiEEq68RxlopcLEwq+PEeb4+QwBBGIYFAl/EM9oeHHRvcnZhbGRz QGxpbnV4LWZvdW5kYXRpb24ub3JnAAoJEHm+PkMAQRiG/3kH/RNkFyTlHlUkZpJx 8Ks2yWgUln7YhZcmOaG/IcIyWnhCgo3l35kiaH7XxM+rPMZzidp51MHUllaTAQDc u+5EFHMJsmTWUfE8ocHPb1cPdYEDSoVr6QUsixbL9+uADpRz+VZVtWMb89EiyMrC wvLIzpnqY5UNriWWBxD0hrmSsT4g9XCsauer4k2KB+zvebwg6vFOMCFLFc2qz7fb ABsrPFqLZOMp+16chGxyHP7LJ6ygI/Hwf7tPW8ppv4c+hes4HZg7yqJxXhV02QbJ s10s6BTcEWMqKg/T6L/VoScsMHWUcNdvrr3uuPQhgup240XdmB1XO8rOKddw27e7 VIjrjNw= =4ZaP -----END PGP SIGNATURE----- Merge tag 'v5.10-rc6' into rdma.git for-next For dependencies in following patches Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
This commit is contained in:
commit
2b0a999ba0
1
.mailmap
1
.mailmap
|
@ -290,6 +290,7 @@ Santosh Shilimkar <ssantosh@kernel.org>
|
|||
Sarangdhar Joshi <spjoshi@codeaurora.org>
|
||||
Sascha Hauer <s.hauer@pengutronix.de>
|
||||
S.Çağlar Onur <caglar@pardus.org.tr>
|
||||
Sean Christopherson <seanjc@google.com> <sean.j.christopherson@intel.com>
|
||||
Sean Nyekjaer <sean@geanix.com> <sean.nyekjaer@prevas.dk>
|
||||
Sebastian Reichel <sre@kernel.org> <sebastian.reichel@collabora.co.uk>
|
||||
Sebastian Reichel <sre@kernel.org> <sre@debian.org>
|
||||
|
|
|
@ -76,6 +76,12 @@ properties:
|
|||
resets:
|
||||
maxItems: 1
|
||||
|
||||
wifi-2.4ghz-coexistence:
|
||||
type: boolean
|
||||
description: >
|
||||
Should the pixel frequencies in the WiFi frequencies range be
|
||||
avoided?
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
|
|
|
@ -149,11 +149,11 @@ vidtv_psi.[ch]
|
|||
Because the generator is implemented in a separate file, it can be
|
||||
reused elsewhere in the media subsystem.
|
||||
|
||||
Currently vidtv supports working with 3 PSI tables: PAT, PMT and
|
||||
SDT.
|
||||
Currently vidtv supports working with 5 PSI tables: PAT, PMT,
|
||||
SDT, NIT and EIT.
|
||||
|
||||
The specification for PAT and PMT can be found in *ISO 13818-1:
|
||||
Systems*, while the specification for the SDT can be found in *ETSI
|
||||
Systems*, while the specification for the SDT, NIT, EIT can be found in *ETSI
|
||||
EN 300 468: Specification for Service Information (SI) in DVB
|
||||
systems*.
|
||||
|
||||
|
@ -197,6 +197,8 @@ vidtv_channel.[ch]
|
|||
|
||||
#. Their programs will be concatenated to populate the PAT
|
||||
|
||||
#. Their events will be concatenated to populate the EIT
|
||||
|
||||
#. For each program in the PAT, a PMT section will be created
|
||||
|
||||
#. The PMT section for a channel will be assigned its streams.
|
||||
|
@ -256,6 +258,42 @@ Using dvb-fe-tool
|
|||
The first step to check whether the demod loaded successfully is to run::
|
||||
|
||||
$ dvb-fe-tool
|
||||
Device Dummy demod for DVB-T/T2/C/S/S2 (/dev/dvb/adapter0/frontend0) capabilities:
|
||||
CAN_FEC_1_2
|
||||
CAN_FEC_2_3
|
||||
CAN_FEC_3_4
|
||||
CAN_FEC_4_5
|
||||
CAN_FEC_5_6
|
||||
CAN_FEC_6_7
|
||||
CAN_FEC_7_8
|
||||
CAN_FEC_8_9
|
||||
CAN_FEC_AUTO
|
||||
CAN_GUARD_INTERVAL_AUTO
|
||||
CAN_HIERARCHY_AUTO
|
||||
CAN_INVERSION_AUTO
|
||||
CAN_QAM_16
|
||||
CAN_QAM_32
|
||||
CAN_QAM_64
|
||||
CAN_QAM_128
|
||||
CAN_QAM_256
|
||||
CAN_QAM_AUTO
|
||||
CAN_QPSK
|
||||
CAN_TRANSMISSION_MODE_AUTO
|
||||
DVB API Version 5.11, Current v5 delivery system: DVBC/ANNEX_A
|
||||
Supported delivery systems:
|
||||
DVBT
|
||||
DVBT2
|
||||
[DVBC/ANNEX_A]
|
||||
DVBS
|
||||
DVBS2
|
||||
Frequency range for the current standard:
|
||||
From: 51.0 MHz
|
||||
To: 2.15 GHz
|
||||
Step: 62.5 kHz
|
||||
Tolerance: 29.5 MHz
|
||||
Symbol rate ranges for the current standard:
|
||||
From: 1.00 MBauds
|
||||
To: 45.0 MBauds
|
||||
|
||||
This should return what is currently set up at the demod struct, i.e.::
|
||||
|
||||
|
@ -314,7 +352,7 @@ For this, one should provide a configuration file known as a 'scan file',
|
|||
here's an example::
|
||||
|
||||
[Channel]
|
||||
FREQUENCY = 330000000
|
||||
FREQUENCY = 474000000
|
||||
MODULATION = QAM/AUTO
|
||||
SYMBOL_RATE = 6940000
|
||||
INNER_FEC = AUTO
|
||||
|
@ -335,6 +373,14 @@ You can browse scan tables online here: `dvb-scan-tables
|
|||
Assuming this channel is named 'channel.conf', you can then run::
|
||||
|
||||
$ dvbv5-scan channel.conf
|
||||
dvbv5-scan ~/vidtv.conf
|
||||
ERROR command BANDWIDTH_HZ (5) not found during retrieve
|
||||
Cannot calc frequency shift. Either bandwidth/symbol-rate is unavailable (yet).
|
||||
Scanning frequency #1 330000000
|
||||
(0x00) Signal= -68.00dBm
|
||||
Scanning frequency #2 474000000
|
||||
Lock (0x1f) Signal= -34.45dBm C/N= 33.74dB UCB= 0
|
||||
Service Beethoven, provider LinuxTV.org: digital television
|
||||
|
||||
For more information on dvb-scan, check its documentation online here:
|
||||
`dvb-scan Documentation <https://www.linuxtv.org/wiki/index.php/Dvbscan>`_.
|
||||
|
@ -344,23 +390,38 @@ Using dvb-zap
|
|||
|
||||
dvbv5-zap is a command line tool that can be used to record MPEG-TS to disk. The
|
||||
typical use is to tune into a channel and put it into record mode. The example
|
||||
below - which is taken from the documentation - illustrates that::
|
||||
below - which is taken from the documentation - illustrates that\ [1]_::
|
||||
|
||||
$ dvbv5-zap -c dvb_channel.conf "trilhas sonoras" -r
|
||||
using demux '/dev/dvb/adapter0/demux0'
|
||||
$ dvbv5-zap -c dvb_channel.conf "beethoven" -o music.ts -P -t 10
|
||||
using demux 'dvb0.demux0'
|
||||
reading channels from file 'dvb_channel.conf'
|
||||
service has pid type 05: 204
|
||||
tuning to 573000000 Hz
|
||||
audio pid 104
|
||||
dvb_set_pesfilter 104
|
||||
Lock (0x1f) Quality= Good Signal= 100.00% C/N= -13.80dB UCB= 70 postBER= 3.14x10^-3 PER= 0
|
||||
DVR interface '/dev/dvb/adapter0/dvr0' can now be opened
|
||||
tuning to 474000000 Hz
|
||||
pass all PID's to TS
|
||||
dvb_set_pesfilter 8192
|
||||
dvb_dev_set_bufsize: buffer set to 6160384
|
||||
Lock (0x1f) Quality= Good Signal= -34.66dBm C/N= 33.41dB UCB= 0 postBER= 0 preBER= 1.05x10^-3 PER= 0
|
||||
Lock (0x1f) Quality= Good Signal= -34.57dBm C/N= 33.46dB UCB= 0 postBER= 0 preBER= 1.05x10^-3 PER= 0
|
||||
Record to file 'music.ts' started
|
||||
received 24587768 bytes (2401 Kbytes/sec)
|
||||
Lock (0x1f) Quality= Good Signal= -34.42dBm C/N= 33.89dB UCB= 0 postBER= 0 preBER= 2.44x10^-3 PER= 0
|
||||
|
||||
The channel can be watched by playing the contents of the DVR interface, with
|
||||
some player that recognizes the MPEG-TS format, such as *mplayer* or *vlc*.
|
||||
.. [1] In this example, it records 10 seconds with all program ID's stored
|
||||
at the music.ts file.
|
||||
|
||||
|
||||
The channel can be watched by playing the contents of the stream with some
|
||||
player that recognizes the MPEG-TS format, such as ``mplayer`` or ``vlc``.
|
||||
|
||||
By playing the contents of the stream one can visually inspect the workings of
|
||||
vidtv, e.g.::
|
||||
vidtv, e.g., to play a recorded TS file with::
|
||||
|
||||
$ mplayer music.ts
|
||||
|
||||
or, alternatively, running this command on one terminal::
|
||||
|
||||
$ dvbv5-zap -c dvb_channel.conf "beethoven" -P -r &
|
||||
|
||||
And, on a second terminal, playing the contents from DVR interface with::
|
||||
|
||||
$ mplayer /dev/dvb/adapter0/dvr0
|
||||
|
||||
|
@ -423,3 +484,30 @@ A nice addition is to simulate some noise when the signal quality is bad by:
|
|||
- Updating the error statistics accordingly (e.g. BER, etc).
|
||||
|
||||
- Simulating some noise in the encoded data.
|
||||
|
||||
Functions and structs used within vidtv
|
||||
---------------------------------------
|
||||
|
||||
.. kernel-doc:: drivers/media/test-drivers/vidtv/vidtv_bridge.h
|
||||
|
||||
.. kernel-doc:: drivers/media/test-drivers/vidtv/vidtv_channel.h
|
||||
|
||||
.. kernel-doc:: drivers/media/test-drivers/vidtv/vidtv_demod.h
|
||||
|
||||
.. kernel-doc:: drivers/media/test-drivers/vidtv/vidtv_encoder.h
|
||||
|
||||
.. kernel-doc:: drivers/media/test-drivers/vidtv/vidtv_mux.h
|
||||
|
||||
.. kernel-doc:: drivers/media/test-drivers/vidtv/vidtv_pes.h
|
||||
|
||||
.. kernel-doc:: drivers/media/test-drivers/vidtv/vidtv_psi.h
|
||||
|
||||
.. kernel-doc:: drivers/media/test-drivers/vidtv/vidtv_s302m.h
|
||||
|
||||
.. kernel-doc:: drivers/media/test-drivers/vidtv/vidtv_ts.h
|
||||
|
||||
.. kernel-doc:: drivers/media/test-drivers/vidtv/vidtv_tuner.h
|
||||
|
||||
.. kernel-doc:: drivers/media/test-drivers/vidtv/vidtv_common.c
|
||||
|
||||
.. kernel-doc:: drivers/media/test-drivers/vidtv/vidtv_tuner.c
|
||||
|
|
|
@ -57,9 +57,8 @@ to enable them. ::
|
|||
They can be enabled individually. The full list of the parameters: ::
|
||||
|
||||
make CC=clang LD=ld.lld AR=llvm-ar NM=llvm-nm STRIP=llvm-strip \
|
||||
OBJCOPY=llvm-objcopy OBJDUMP=llvm-objdump OBJSIZE=llvm-size \
|
||||
READELF=llvm-readelf HOSTCC=clang HOSTCXX=clang++ HOSTAR=llvm-ar \
|
||||
HOSTLD=ld.lld
|
||||
OBJCOPY=llvm-objcopy OBJDUMP=llvm-objdump READELF=llvm-readelf \
|
||||
HOSTCC=clang HOSTCXX=clang++ HOSTAR=llvm-ar HOSTLD=ld.lld
|
||||
|
||||
Currently, the integrated assembler is disabled by default. You can pass
|
||||
``LLVM_IAS=1`` to enable it.
|
||||
|
|
|
@ -254,6 +254,32 @@ you will have done run-time testing specific to your change, but at a
|
|||
minimum, your changes should survive an ``allyesconfig`` and an
|
||||
``allmodconfig`` build without new warnings or failures.
|
||||
|
||||
Q: How do I post corresponding changes to user space components?
|
||||
----------------------------------------------------------------
|
||||
A: User space code exercising kernel features should be posted
|
||||
alongside kernel patches. This gives reviewers a chance to see
|
||||
how any new interface is used and how well it works.
|
||||
|
||||
When user space tools reside in the kernel repo itself all changes
|
||||
should generally come as one series. If series becomes too large
|
||||
or the user space project is not reviewed on netdev include a link
|
||||
to a public repo where user space patches can be seen.
|
||||
|
||||
In case user space tooling lives in a separate repository but is
|
||||
reviewed on netdev (e.g. patches to `iproute2` tools) kernel and
|
||||
user space patches should form separate series (threads) when posted
|
||||
to the mailing list, e.g.::
|
||||
|
||||
[PATCH net-next 0/3] net: some feature cover letter
|
||||
└─ [PATCH net-next 1/3] net: some feature prep
|
||||
└─ [PATCH net-next 2/3] net: some feature do it
|
||||
└─ [PATCH net-next 3/3] selftest: net: some feature
|
||||
|
||||
[PATCH iproute2-next] ip: add support for some feature
|
||||
|
||||
Posting as one thread is discouraged because it confuses patchwork
|
||||
(as of patchwork 2.2.2).
|
||||
|
||||
Q: Any other tips to help ensure my net/net-next patch gets OK'd?
|
||||
-----------------------------------------------------------------
|
||||
A: Attention to detail. Re-read your own work as if you were the
|
||||
|
|
22
MAINTAINERS
22
MAINTAINERS
|
@ -1724,11 +1724,13 @@ F: arch/arm/mach-ep93xx/micro9.c
|
|||
|
||||
ARM/CORESIGHT FRAMEWORK AND DRIVERS
|
||||
M: Mathieu Poirier <mathieu.poirier@linaro.org>
|
||||
R: Suzuki K Poulose <suzuki.poulose@arm.com>
|
||||
M: Suzuki K Poulose <suzuki.poulose@arm.com>
|
||||
R: Mike Leach <mike.leach@linaro.org>
|
||||
R: Leo Yan <leo.yan@linaro.org>
|
||||
L: coresight@lists.linaro.org (moderated for non-subscribers)
|
||||
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
|
||||
S: Maintained
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/coresight/linux.git
|
||||
F: Documentation/ABI/testing/sysfs-bus-coresight-devices-*
|
||||
F: Documentation/devicetree/bindings/arm/coresight-cpu-debug.txt
|
||||
F: Documentation/devicetree/bindings/arm/coresight-cti.yaml
|
||||
|
@ -1995,7 +1997,6 @@ N: lpc18xx
|
|||
|
||||
ARM/LPC32XX SOC SUPPORT
|
||||
M: Vladimir Zapolskiy <vz@mleia.com>
|
||||
M: Sylvain Lemieux <slemieux.tyco@gmail.com>
|
||||
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
|
||||
S: Maintained
|
||||
T: git git://github.com/vzapolskiy/linux-lpc32xx.git
|
||||
|
@ -3528,11 +3529,12 @@ BROADCOM BRCM80211 IEEE802.11n WIRELESS DRIVER
|
|||
M: Arend van Spriel <arend.vanspriel@broadcom.com>
|
||||
M: Franky Lin <franky.lin@broadcom.com>
|
||||
M: Hante Meuleman <hante.meuleman@broadcom.com>
|
||||
M: Chi-Hsien Lin <chi-hsien.lin@cypress.com>
|
||||
M: Wright Feng <wright.feng@cypress.com>
|
||||
M: Chi-hsien Lin <chi-hsien.lin@infineon.com>
|
||||
M: Wright Feng <wright.feng@infineon.com>
|
||||
M: Chung-hsien Hsu <chung-hsien.hsu@infineon.com>
|
||||
L: linux-wireless@vger.kernel.org
|
||||
L: brcm80211-dev-list.pdl@broadcom.com
|
||||
L: brcm80211-dev-list@cypress.com
|
||||
L: SHA-cyfmac-dev-list@infineon.com
|
||||
S: Supported
|
||||
F: drivers/net/wireless/broadcom/brcm80211/
|
||||
|
||||
|
@ -9646,6 +9648,7 @@ F: Documentation/virt/kvm/s390*
|
|||
F: arch/s390/include/asm/gmap.h
|
||||
F: arch/s390/include/asm/kvm*
|
||||
F: arch/s390/include/uapi/asm/kvm*
|
||||
F: arch/s390/kernel/uv.c
|
||||
F: arch/s390/kvm/
|
||||
F: arch/s390/mm/gmap.c
|
||||
F: tools/testing/selftests/kvm/*/s390x/
|
||||
|
@ -13161,7 +13164,9 @@ M: Jesper Dangaard Brouer <hawk@kernel.org>
|
|||
M: Ilias Apalodimas <ilias.apalodimas@linaro.org>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
F: Documentation/networking/page_pool.rst
|
||||
F: include/net/page_pool.h
|
||||
F: include/trace/events/page_pool.h
|
||||
F: net/core/page_pool.c
|
||||
|
||||
PANASONIC LAPTOP ACPI EXTRAS DRIVER
|
||||
|
@ -14803,7 +14808,7 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-testing.g
|
|||
F: drivers/net/wireless/realtek/rtlwifi/
|
||||
|
||||
REALTEK WIRELESS DRIVER (rtw88)
|
||||
M: Yan-Hsuan Chuang <yhchuang@realtek.com>
|
||||
M: Yan-Hsuan Chuang <tony0620emma@gmail.com>
|
||||
L: linux-wireless@vger.kernel.org
|
||||
S: Maintained
|
||||
F: drivers/net/wireless/realtek/rtw88/
|
||||
|
@ -15776,9 +15781,8 @@ F: drivers/slimbus/
|
|||
F: include/linux/slimbus.h
|
||||
|
||||
SFC NETWORK DRIVER
|
||||
M: Solarflare linux maintainers <linux-net-drivers@solarflare.com>
|
||||
M: Edward Cree <ecree@solarflare.com>
|
||||
M: Martin Habets <mhabets@solarflare.com>
|
||||
M: Edward Cree <ecree.xilinx@gmail.com>
|
||||
M: Martin Habets <habetsm.xilinx@gmail.com>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
F: drivers/net/ethernet/sfc/
|
||||
|
|
6
Makefile
6
Makefile
|
@ -2,7 +2,7 @@
|
|||
VERSION = 5
|
||||
PATCHLEVEL = 10
|
||||
SUBLEVEL = 0
|
||||
EXTRAVERSION = -rc5
|
||||
EXTRAVERSION = -rc6
|
||||
NAME = Kleptomaniac Octopus
|
||||
|
||||
# *DOCUMENTATION*
|
||||
|
@ -433,7 +433,6 @@ NM = llvm-nm
|
|||
OBJCOPY = llvm-objcopy
|
||||
OBJDUMP = llvm-objdump
|
||||
READELF = llvm-readelf
|
||||
OBJSIZE = llvm-size
|
||||
STRIP = llvm-strip
|
||||
else
|
||||
CC = $(CROSS_COMPILE)gcc
|
||||
|
@ -443,7 +442,6 @@ NM = $(CROSS_COMPILE)nm
|
|||
OBJCOPY = $(CROSS_COMPILE)objcopy
|
||||
OBJDUMP = $(CROSS_COMPILE)objdump
|
||||
READELF = $(CROSS_COMPILE)readelf
|
||||
OBJSIZE = $(CROSS_COMPILE)size
|
||||
STRIP = $(CROSS_COMPILE)strip
|
||||
endif
|
||||
PAHOLE = pahole
|
||||
|
@ -509,7 +507,7 @@ KBUILD_LDFLAGS :=
|
|||
CLANG_FLAGS :=
|
||||
|
||||
export ARCH SRCARCH CONFIG_SHELL BASH HOSTCC KBUILD_HOSTCFLAGS CROSS_COMPILE LD CC
|
||||
export CPP AR NM STRIP OBJCOPY OBJDUMP OBJSIZE READELF PAHOLE RESOLVE_BTFIDS LEX YACC AWK INSTALLKERNEL
|
||||
export CPP AR NM STRIP OBJCOPY OBJDUMP READELF PAHOLE RESOLVE_BTFIDS LEX YACC AWK INSTALLKERNEL
|
||||
export PERL PYTHON PYTHON3 CHECK CHECKFLAGS MAKE UTS_MACHINE HOSTCXX
|
||||
export KGZIP KBZIP2 KLZOP LZMA LZ4 XZ ZSTD
|
||||
export KBUILD_HOSTCXXFLAGS KBUILD_HOSTLDFLAGS KBUILD_HOSTLDLIBS LDFLAGS_MODULE
|
||||
|
|
|
@ -57,7 +57,7 @@ EXPORT_SYMBOL(pm_power_off);
|
|||
void arch_cpu_idle(void)
|
||||
{
|
||||
wtint(0);
|
||||
local_irq_enable();
|
||||
raw_local_irq_enable();
|
||||
}
|
||||
|
||||
void arch_cpu_idle_dead(void)
|
||||
|
|
|
@ -243,10 +243,8 @@ static inline int constant_fls(unsigned int x)
|
|||
x <<= 2;
|
||||
r -= 2;
|
||||
}
|
||||
if (!(x & 0x80000000u)) {
|
||||
x <<= 1;
|
||||
if (!(x & 0x80000000u))
|
||||
r -= 1;
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
|
|
|
@ -134,8 +134,10 @@
|
|||
|
||||
#ifdef CONFIG_ARC_HAS_PAE40
|
||||
#define PTE_BITS_NON_RWX_IN_PD1 (0xff00000000 | PAGE_MASK | _PAGE_CACHEABLE)
|
||||
#define MAX_POSSIBLE_PHYSMEM_BITS 40
|
||||
#else
|
||||
#define PTE_BITS_NON_RWX_IN_PD1 (PAGE_MASK | _PAGE_CACHEABLE)
|
||||
#define MAX_POSSIBLE_PHYSMEM_BITS 32
|
||||
#endif
|
||||
|
||||
/**************************************************************************
|
||||
|
|
|
@ -38,15 +38,27 @@
|
|||
|
||||
#ifdef CONFIG_ARC_DW2_UNWIND
|
||||
|
||||
static void seed_unwind_frame_info(struct task_struct *tsk,
|
||||
struct pt_regs *regs,
|
||||
struct unwind_frame_info *frame_info)
|
||||
static int
|
||||
seed_unwind_frame_info(struct task_struct *tsk, struct pt_regs *regs,
|
||||
struct unwind_frame_info *frame_info)
|
||||
{
|
||||
/*
|
||||
* synchronous unwinding (e.g. dump_stack)
|
||||
* - uses current values of SP and friends
|
||||
*/
|
||||
if (tsk == NULL && regs == NULL) {
|
||||
if (regs) {
|
||||
/*
|
||||
* Asynchronous unwinding of intr/exception
|
||||
* - Just uses the pt_regs passed
|
||||
*/
|
||||
frame_info->task = tsk;
|
||||
|
||||
frame_info->regs.r27 = regs->fp;
|
||||
frame_info->regs.r28 = regs->sp;
|
||||
frame_info->regs.r31 = regs->blink;
|
||||
frame_info->regs.r63 = regs->ret;
|
||||
frame_info->call_frame = 0;
|
||||
} else if (tsk == NULL || tsk == current) {
|
||||
/*
|
||||
* synchronous unwinding (e.g. dump_stack)
|
||||
* - uses current values of SP and friends
|
||||
*/
|
||||
unsigned long fp, sp, blink, ret;
|
||||
frame_info->task = current;
|
||||
|
||||
|
@ -63,13 +75,17 @@ static void seed_unwind_frame_info(struct task_struct *tsk,
|
|||
frame_info->regs.r31 = blink;
|
||||
frame_info->regs.r63 = ret;
|
||||
frame_info->call_frame = 0;
|
||||
} else if (regs == NULL) {
|
||||
} else {
|
||||
/*
|
||||
* Asynchronous unwinding of sleeping task
|
||||
* - Gets SP etc from task's pt_regs (saved bottom of kernel
|
||||
* mode stack of task)
|
||||
* Asynchronous unwinding of a likely sleeping task
|
||||
* - first ensure it is actually sleeping
|
||||
* - if so, it will be in __switch_to, kernel mode SP of task
|
||||
* is safe-kept and BLINK at a well known location in there
|
||||
*/
|
||||
|
||||
if (tsk->state == TASK_RUNNING)
|
||||
return -1;
|
||||
|
||||
frame_info->task = tsk;
|
||||
|
||||
frame_info->regs.r27 = TSK_K_FP(tsk);
|
||||
|
@ -90,19 +106,8 @@ static void seed_unwind_frame_info(struct task_struct *tsk,
|
|||
frame_info->regs.r28 += 60;
|
||||
frame_info->call_frame = 0;
|
||||
|
||||
} else {
|
||||
/*
|
||||
* Asynchronous unwinding of intr/exception
|
||||
* - Just uses the pt_regs passed
|
||||
*/
|
||||
frame_info->task = tsk;
|
||||
|
||||
frame_info->regs.r27 = regs->fp;
|
||||
frame_info->regs.r28 = regs->sp;
|
||||
frame_info->regs.r31 = regs->blink;
|
||||
frame_info->regs.r63 = regs->ret;
|
||||
frame_info->call_frame = 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -116,7 +121,8 @@ arc_unwind_core(struct task_struct *tsk, struct pt_regs *regs,
|
|||
unsigned int address;
|
||||
struct unwind_frame_info frame_info;
|
||||
|
||||
seed_unwind_frame_info(tsk, regs, &frame_info);
|
||||
if (seed_unwind_frame_info(tsk, regs, &frame_info))
|
||||
return 0;
|
||||
|
||||
while (1) {
|
||||
address = UNW_PC(&frame_info);
|
||||
|
|
|
@ -30,14 +30,14 @@
|
|||
* -Changes related to MMU v2 (Rel 4.8)
|
||||
*
|
||||
* Vineetg: Aug 29th 2008
|
||||
* -In TLB Flush operations (Metal Fix MMU) there is a explict command to
|
||||
* -In TLB Flush operations (Metal Fix MMU) there is a explicit command to
|
||||
* flush Micro-TLBS. If TLB Index Reg is invalid prior to TLBIVUTLB cmd,
|
||||
* it fails. Thus need to load it with ANY valid value before invoking
|
||||
* TLBIVUTLB cmd
|
||||
*
|
||||
* Vineetg: Aug 21th 2008:
|
||||
* -Reduced the duration of IRQ lockouts in TLB Flush routines
|
||||
* -Multiple copies of TLB erase code seperated into a "single" function
|
||||
* -Multiple copies of TLB erase code separated into a "single" function
|
||||
* -In TLB Flush routines, interrupt disabling moved UP to retrieve ASID
|
||||
* in interrupt-safe region.
|
||||
*
|
||||
|
@ -66,7 +66,7 @@
|
|||
*
|
||||
* Although J-TLB is 2 way set assoc, ARC700 caches J-TLB into uTLBS which has
|
||||
* much higher associativity. u-D-TLB is 8 ways, u-I-TLB is 4 ways.
|
||||
* Given this, the thrasing problem should never happen because once the 3
|
||||
* Given this, the thrashing problem should never happen because once the 3
|
||||
* J-TLB entries are created (even though 3rd will knock out one of the prev
|
||||
* two), the u-D-TLB and u-I-TLB will have what is required to accomplish memcpy
|
||||
*
|
||||
|
@ -127,7 +127,7 @@ static void utlb_invalidate(void)
|
|||
* There was however an obscure hardware bug, where uTLB flush would
|
||||
* fail when a prior probe for J-TLB (both totally unrelated) would
|
||||
* return lkup err - because the entry didn't exist in MMU.
|
||||
* The Workround was to set Index reg with some valid value, prior to
|
||||
* The Workaround was to set Index reg with some valid value, prior to
|
||||
* flush. This was fixed in MMU v3
|
||||
*/
|
||||
unsigned int idx;
|
||||
|
@ -272,7 +272,7 @@ noinline void local_flush_tlb_all(void)
|
|||
}
|
||||
|
||||
/*
|
||||
* Flush the entrie MM for userland. The fastest way is to move to Next ASID
|
||||
* Flush the entire MM for userland. The fastest way is to move to Next ASID
|
||||
*/
|
||||
noinline void local_flush_tlb_mm(struct mm_struct *mm)
|
||||
{
|
||||
|
@ -303,7 +303,7 @@ noinline void local_flush_tlb_mm(struct mm_struct *mm)
|
|||
* Difference between this and Kernel Range Flush is
|
||||
* -Here the fastest way (if range is too large) is to move to next ASID
|
||||
* without doing any explicit Shootdown
|
||||
* -In case of kernel Flush, entry has to be shot down explictly
|
||||
* -In case of kernel Flush, entry has to be shot down explicitly
|
||||
*/
|
||||
void local_flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
|
||||
unsigned long end)
|
||||
|
@ -620,7 +620,7 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long vaddr_unaligned,
|
|||
* Super Page size is configurable in hardware (4K to 16M), but fixed once
|
||||
* RTL builds.
|
||||
*
|
||||
* The exact THP size a Linx configuration will support is a function of:
|
||||
* The exact THP size a Linux configuration will support is a function of:
|
||||
* - MMU page size (typical 8K, RTL fixed)
|
||||
* - software page walker address split between PGD:PTE:PFN (typical
|
||||
* 11:8:13, but can be changed with 1 line)
|
||||
|
@ -698,7 +698,7 @@ void local_flush_pmd_tlb_range(struct vm_area_struct *vma, unsigned long start,
|
|||
|
||||
#endif
|
||||
|
||||
/* Read the Cache Build Confuration Registers, Decode them and save into
|
||||
/* Read the Cache Build Configuration Registers, Decode them and save into
|
||||
* the cpuinfo structure for later use.
|
||||
* No Validation is done here, simply read/convert the BCRs
|
||||
*/
|
||||
|
@ -803,13 +803,13 @@ void arc_mmu_init(void)
|
|||
pr_info("%s", arc_mmu_mumbojumbo(0, str, sizeof(str)));
|
||||
|
||||
/*
|
||||
* Can't be done in processor.h due to header include depenedencies
|
||||
* Can't be done in processor.h due to header include dependencies
|
||||
*/
|
||||
BUILD_BUG_ON(!IS_ALIGNED((CONFIG_ARC_KVADDR_SIZE << 20), PMD_SIZE));
|
||||
|
||||
/*
|
||||
* stack top size sanity check,
|
||||
* Can't be done in processor.h due to header include depenedencies
|
||||
* Can't be done in processor.h due to header include dependencies
|
||||
*/
|
||||
BUILD_BUG_ON(!IS_ALIGNED(STACK_TOP, PMD_SIZE));
|
||||
|
||||
|
@ -881,7 +881,7 @@ void arc_mmu_init(void)
|
|||
* the duplicate one.
|
||||
* -Knob to be verbose abt it.(TODO: hook them up to debugfs)
|
||||
*/
|
||||
volatile int dup_pd_silent; /* Be slient abt it or complain (default) */
|
||||
volatile int dup_pd_silent; /* Be silent abt it or complain (default) */
|
||||
|
||||
void do_tlb_overlap_fault(unsigned long cause, unsigned long address,
|
||||
struct pt_regs *regs)
|
||||
|
@ -948,7 +948,7 @@ void do_tlb_overlap_fault(unsigned long cause, unsigned long address,
|
|||
|
||||
/***********************************************************************
|
||||
* Diagnostic Routines
|
||||
* -Called from Low Level TLB Hanlders if things don;t look good
|
||||
* -Called from Low Level TLB Handlers if things don;t look good
|
||||
**********************************************************************/
|
||||
|
||||
#ifdef CONFIG_ARC_DBG_TLB_PARANOIA
|
||||
|
|
|
@ -521,7 +521,7 @@
|
|||
ranges = <0x0 0x100000 0x8000>;
|
||||
|
||||
mac_sw: switch@0 {
|
||||
compatible = "ti,am4372-cpsw","ti,cpsw-switch";
|
||||
compatible = "ti,am4372-cpsw-switch", "ti,cpsw-switch";
|
||||
reg = <0x0 0x4000>;
|
||||
ranges = <0 0 0x4000>;
|
||||
clocks = <&cpsw_125mhz_gclk>, <&dpll_clksel_mac_clk>;
|
||||
|
|
|
@ -32,8 +32,8 @@
|
|||
interrupts = <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "int0", "int1";
|
||||
clocks = <&mcan_clk>, <&l3_iclk_div>;
|
||||
clock-names = "cclk", "hclk";
|
||||
clocks = <&l3_iclk_div>, <&mcan_clk>;
|
||||
clock-names = "hclk", "cclk";
|
||||
bosch,mram-cfg = <0x0 0 0 32 0 0 1 1>;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -75,6 +75,8 @@
|
|||
#define PTE_HWTABLE_OFF (PTE_HWTABLE_PTRS * sizeof(pte_t))
|
||||
#define PTE_HWTABLE_SIZE (PTRS_PER_PTE * sizeof(u32))
|
||||
|
||||
#define MAX_POSSIBLE_PHYSMEM_BITS 32
|
||||
|
||||
/*
|
||||
* PMD_SHIFT determines the size of the area a second-level page table can map
|
||||
* PGDIR_SHIFT determines what a third-level page table entry can map
|
||||
|
|
|
@ -25,6 +25,8 @@
|
|||
#define PTE_HWTABLE_OFF (0)
|
||||
#define PTE_HWTABLE_SIZE (PTRS_PER_PTE * sizeof(u64))
|
||||
|
||||
#define MAX_POSSIBLE_PHYSMEM_BITS 40
|
||||
|
||||
/*
|
||||
* PGDIR_SHIFT determines the size a top-level page table entry can map.
|
||||
*/
|
||||
|
|
|
@ -71,7 +71,7 @@ void arch_cpu_idle(void)
|
|||
arm_pm_idle();
|
||||
else
|
||||
cpu_do_idle();
|
||||
local_irq_enable();
|
||||
raw_local_irq_enable();
|
||||
}
|
||||
|
||||
void arch_cpu_idle_prepare(void)
|
||||
|
|
|
@ -7,7 +7,6 @@ config ARCH_OMAP2
|
|||
depends on ARCH_MULTI_V6
|
||||
select ARCH_OMAP2PLUS
|
||||
select CPU_V6
|
||||
select PM_GENERIC_DOMAINS if PM
|
||||
select SOC_HAS_OMAP2_SDRC
|
||||
|
||||
config ARCH_OMAP3
|
||||
|
@ -106,6 +105,8 @@ config ARCH_OMAP2PLUS
|
|||
select OMAP_DM_TIMER
|
||||
select OMAP_GPMC
|
||||
select PINCTRL
|
||||
select PM_GENERIC_DOMAINS if PM
|
||||
select PM_GENERIC_DOMAINS_OF if PM
|
||||
select RESET_CONTROLLER
|
||||
select SOC_BUS
|
||||
select TI_SYSC
|
||||
|
|
|
@ -175,8 +175,11 @@ static int omap_enter_idle_coupled(struct cpuidle_device *dev,
|
|||
if (mpuss_can_lose_context) {
|
||||
error = cpu_cluster_pm_enter();
|
||||
if (error) {
|
||||
omap_set_pwrdm_state(mpu_pd, PWRDM_POWER_ON);
|
||||
goto cpu_cluster_pm_out;
|
||||
index = 0;
|
||||
cx = state_ptr + index;
|
||||
pwrdm_set_logic_retst(mpu_pd, cx->mpu_logic_state);
|
||||
omap_set_pwrdm_state(mpu_pd, cx->mpu_state);
|
||||
mpuss_can_lose_context = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -184,7 +187,6 @@ static int omap_enter_idle_coupled(struct cpuidle_device *dev,
|
|||
omap4_enter_lowpower(dev->cpu, cx->cpu_state);
|
||||
cpu_done[dev->cpu] = true;
|
||||
|
||||
cpu_cluster_pm_out:
|
||||
/* Wakeup CPU1 only if it is not offlined */
|
||||
if (dev->cpu == 0 && cpumask_test_cpu(1, cpu_online_mask)) {
|
||||
|
||||
|
|
|
@ -5,20 +5,20 @@
|
|||
usb {
|
||||
compatible = "simple-bus";
|
||||
dma-ranges;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
ranges = <0x0 0x0 0x68500000 0x00400000>;
|
||||
#address-cells = <2>;
|
||||
#size-cells = <2>;
|
||||
ranges = <0x0 0x0 0x0 0x68500000 0x0 0x00400000>;
|
||||
|
||||
usbphy0: usb-phy@0 {
|
||||
compatible = "brcm,sr-usb-combo-phy";
|
||||
reg = <0x00000000 0x100>;
|
||||
reg = <0x0 0x00000000 0x0 0x100>;
|
||||
#phy-cells = <1>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
xhci0: usb@1000 {
|
||||
compatible = "generic-xhci";
|
||||
reg = <0x00001000 0x1000>;
|
||||
reg = <0x0 0x00001000 0x0 0x1000>;
|
||||
interrupts = <GIC_SPI 256 IRQ_TYPE_LEVEL_HIGH>;
|
||||
phys = <&usbphy0 1>, <&usbphy0 0>;
|
||||
phy-names = "phy0", "phy1";
|
||||
|
@ -28,7 +28,7 @@
|
|||
|
||||
bdc0: usb@2000 {
|
||||
compatible = "brcm,bdc-v0.16";
|
||||
reg = <0x00002000 0x1000>;
|
||||
reg = <0x0 0x00002000 0x0 0x1000>;
|
||||
interrupts = <GIC_SPI 259 IRQ_TYPE_LEVEL_HIGH>;
|
||||
phys = <&usbphy0 0>, <&usbphy0 1>;
|
||||
phy-names = "phy0", "phy1";
|
||||
|
@ -38,21 +38,21 @@
|
|||
|
||||
usbphy1: usb-phy@10000 {
|
||||
compatible = "brcm,sr-usb-combo-phy";
|
||||
reg = <0x00010000 0x100>;
|
||||
reg = <0x0 0x00010000 0x0 0x100>;
|
||||
#phy-cells = <1>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
usbphy2: usb-phy@20000 {
|
||||
compatible = "brcm,sr-usb-hs-phy";
|
||||
reg = <0x00020000 0x100>;
|
||||
reg = <0x0 0x00020000 0x0 0x100>;
|
||||
#phy-cells = <0>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
xhci1: usb@11000 {
|
||||
compatible = "generic-xhci";
|
||||
reg = <0x00011000 0x1000>;
|
||||
reg = <0x0 0x00011000 0x0 0x1000>;
|
||||
interrupts = <GIC_SPI 263 IRQ_TYPE_LEVEL_HIGH>;
|
||||
phys = <&usbphy1 1>, <&usbphy2>, <&usbphy1 0>;
|
||||
phy-names = "phy0", "phy1", "phy2";
|
||||
|
@ -62,7 +62,7 @@
|
|||
|
||||
bdc1: usb@21000 {
|
||||
compatible = "brcm,bdc-v0.16";
|
||||
reg = <0x00021000 0x1000>;
|
||||
reg = <0x0 0x00021000 0x0 0x1000>;
|
||||
interrupts = <GIC_SPI 266 IRQ_TYPE_LEVEL_HIGH>;
|
||||
phys = <&usbphy2>;
|
||||
phy-names = "phy0";
|
||||
|
|
|
@ -10,18 +10,6 @@
|
|||
model = "NVIDIA Jetson TX2 Developer Kit";
|
||||
compatible = "nvidia,p2771-0000", "nvidia,tegra186";
|
||||
|
||||
aconnect {
|
||||
status = "okay";
|
||||
|
||||
dma-controller@2930000 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
interrupt-controller@2a40000 {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
||||
i2c@3160000 {
|
||||
power-monitor@42 {
|
||||
compatible = "ti,ina3221";
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
status = "okay";
|
||||
};
|
||||
|
||||
serial@c280000 {
|
||||
serial@3100000 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
|
|
|
@ -1161,7 +1161,7 @@
|
|||
|
||||
hsp_aon: hsp@c150000 {
|
||||
compatible = "nvidia,tegra194-hsp", "nvidia,tegra186-hsp";
|
||||
reg = <0x0c150000 0xa0000>;
|
||||
reg = <0x0c150000 0x90000>;
|
||||
interrupts = <GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 134 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 135 IRQ_TYPE_LEVEL_HIGH>,
|
||||
|
|
|
@ -1663,16 +1663,6 @@
|
|||
vin-supply = <&vdd_5v0_sys>;
|
||||
};
|
||||
|
||||
vdd_usb_vbus_otg: regulator@11 {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "USB_VBUS_EN0";
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
gpio = <&gpio TEGRA_GPIO(CC, 4) GPIO_ACTIVE_HIGH>;
|
||||
enable-active-high;
|
||||
vin-supply = <&vdd_5v0_sys>;
|
||||
};
|
||||
|
||||
vdd_hdmi: regulator@10 {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "VDD_HDMI_5V0";
|
||||
|
@ -1712,4 +1702,14 @@
|
|||
enable-active-high;
|
||||
vin-supply = <&vdd_3v3_sys>;
|
||||
};
|
||||
|
||||
vdd_usb_vbus_otg: regulator@14 {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "USB_VBUS_EN0";
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
gpio = <&gpio TEGRA_GPIO(CC, 4) GPIO_ACTIVE_HIGH>;
|
||||
enable-active-high;
|
||||
vin-supply = <&vdd_5v0_sys>;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
compatible = "nvidia,tegra234-vdk", "nvidia,tegra234";
|
||||
|
||||
aliases {
|
||||
sdhci3 = "/cbb@0/sdhci@3460000";
|
||||
mmc3 = "/bus@0/mmc@3460000";
|
||||
serial0 = &uarta;
|
||||
};
|
||||
|
||||
|
@ -17,12 +17,12 @@
|
|||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
|
||||
cbb@0 {
|
||||
bus@0 {
|
||||
serial@3100000 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
sdhci@3460000 {
|
||||
mmc@3460000 {
|
||||
status = "okay";
|
||||
bus-width = <8>;
|
||||
non-removable;
|
||||
|
|
|
@ -179,22 +179,22 @@
|
|||
};
|
||||
|
||||
soc: soc {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
ranges = <0 0 0 0xffffffff>;
|
||||
#address-cells = <2>;
|
||||
#size-cells = <2>;
|
||||
ranges = <0 0 0 0 0x0 0xffffffff>;
|
||||
dma-ranges;
|
||||
compatible = "simple-bus";
|
||||
|
||||
prng: qrng@e1000 {
|
||||
compatible = "qcom,prng-ee";
|
||||
reg = <0xe3000 0x1000>;
|
||||
reg = <0x0 0xe3000 0x0 0x1000>;
|
||||
clocks = <&gcc GCC_PRNG_AHB_CLK>;
|
||||
clock-names = "core";
|
||||
};
|
||||
|
||||
cryptobam: dma@704000 {
|
||||
compatible = "qcom,bam-v1.7.0";
|
||||
reg = <0x00704000 0x20000>;
|
||||
reg = <0x0 0x00704000 0x0 0x20000>;
|
||||
interrupts = <GIC_SPI 207 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&gcc GCC_CRYPTO_AHB_CLK>;
|
||||
clock-names = "bam_clk";
|
||||
|
@ -206,7 +206,7 @@
|
|||
|
||||
crypto: crypto@73a000 {
|
||||
compatible = "qcom,crypto-v5.1";
|
||||
reg = <0x0073a000 0x6000>;
|
||||
reg = <0x0 0x0073a000 0x0 0x6000>;
|
||||
clocks = <&gcc GCC_CRYPTO_AHB_CLK>,
|
||||
<&gcc GCC_CRYPTO_AXI_CLK>,
|
||||
<&gcc GCC_CRYPTO_CLK>;
|
||||
|
@ -217,7 +217,7 @@
|
|||
|
||||
tlmm: pinctrl@1000000 {
|
||||
compatible = "qcom,ipq6018-pinctrl";
|
||||
reg = <0x01000000 0x300000>;
|
||||
reg = <0x0 0x01000000 0x0 0x300000>;
|
||||
interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>;
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
|
@ -235,7 +235,7 @@
|
|||
|
||||
gcc: gcc@1800000 {
|
||||
compatible = "qcom,gcc-ipq6018";
|
||||
reg = <0x01800000 0x80000>;
|
||||
reg = <0x0 0x01800000 0x0 0x80000>;
|
||||
clocks = <&xo>, <&sleep_clk>;
|
||||
clock-names = "xo", "sleep_clk";
|
||||
#clock-cells = <1>;
|
||||
|
@ -244,17 +244,17 @@
|
|||
|
||||
tcsr_mutex_regs: syscon@1905000 {
|
||||
compatible = "syscon";
|
||||
reg = <0x01905000 0x8000>;
|
||||
reg = <0x0 0x01905000 0x0 0x8000>;
|
||||
};
|
||||
|
||||
tcsr_q6: syscon@1945000 {
|
||||
compatible = "syscon";
|
||||
reg = <0x01945000 0xe000>;
|
||||
reg = <0x0 0x01945000 0x0 0xe000>;
|
||||
};
|
||||
|
||||
blsp_dma: dma@7884000 {
|
||||
compatible = "qcom,bam-v1.7.0";
|
||||
reg = <0x07884000 0x2b000>;
|
||||
reg = <0x0 0x07884000 0x0 0x2b000>;
|
||||
interrupts = <GIC_SPI 238 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&gcc GCC_BLSP1_AHB_CLK>;
|
||||
clock-names = "bam_clk";
|
||||
|
@ -264,7 +264,7 @@
|
|||
|
||||
blsp1_uart3: serial@78b1000 {
|
||||
compatible = "qcom,msm-uartdm-v1.4", "qcom,msm-uartdm";
|
||||
reg = <0x078b1000 0x200>;
|
||||
reg = <0x0 0x078b1000 0x0 0x200>;
|
||||
interrupts = <GIC_SPI 306 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&gcc GCC_BLSP1_UART3_APPS_CLK>,
|
||||
<&gcc GCC_BLSP1_AHB_CLK>;
|
||||
|
@ -276,7 +276,7 @@
|
|||
compatible = "qcom,spi-qup-v2.2.1";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <0x078b5000 0x600>;
|
||||
reg = <0x0 0x078b5000 0x0 0x600>;
|
||||
interrupts = <GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>;
|
||||
spi-max-frequency = <50000000>;
|
||||
clocks = <&gcc GCC_BLSP1_QUP1_SPI_APPS_CLK>,
|
||||
|
@ -291,7 +291,7 @@
|
|||
compatible = "qcom,spi-qup-v2.2.1";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <0x078b6000 0x600>;
|
||||
reg = <0x0 0x078b6000 0x0 0x600>;
|
||||
interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>;
|
||||
spi-max-frequency = <50000000>;
|
||||
clocks = <&gcc GCC_BLSP1_QUP2_SPI_APPS_CLK>,
|
||||
|
@ -306,7 +306,7 @@
|
|||
compatible = "qcom,i2c-qup-v2.2.1";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <0x078b6000 0x600>;
|
||||
reg = <0x0 0x078b6000 0x0 0x600>;
|
||||
interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&gcc GCC_BLSP1_AHB_CLK>,
|
||||
<&gcc GCC_BLSP1_QUP2_I2C_APPS_CLK>;
|
||||
|
@ -321,7 +321,7 @@
|
|||
compatible = "qcom,i2c-qup-v2.2.1";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <0x078b7000 0x600>;
|
||||
reg = <0x0 0x078b7000 0x0 0x600>;
|
||||
interrupts = <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&gcc GCC_BLSP1_AHB_CLK>,
|
||||
<&gcc GCC_BLSP1_QUP3_I2C_APPS_CLK>;
|
||||
|
@ -336,24 +336,24 @@
|
|||
compatible = "qcom,msm-qgic2";
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <0x3>;
|
||||
reg = <0x0b000000 0x1000>, /*GICD*/
|
||||
<0x0b002000 0x1000>, /*GICC*/
|
||||
<0x0b001000 0x1000>, /*GICH*/
|
||||
<0x0b004000 0x1000>; /*GICV*/
|
||||
reg = <0x0 0x0b000000 0x0 0x1000>, /*GICD*/
|
||||
<0x0 0x0b002000 0x0 0x1000>, /*GICC*/
|
||||
<0x0 0x0b001000 0x0 0x1000>, /*GICH*/
|
||||
<0x0 0x0b004000 0x0 0x1000>; /*GICV*/
|
||||
interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
|
||||
watchdog@b017000 {
|
||||
compatible = "qcom,kpss-wdt";
|
||||
interrupts = <GIC_SPI 3 IRQ_TYPE_EDGE_RISING>;
|
||||
reg = <0x0b017000 0x40>;
|
||||
reg = <0x0 0x0b017000 0x0 0x40>;
|
||||
clocks = <&sleep_clk>;
|
||||
timeout-sec = <10>;
|
||||
};
|
||||
|
||||
apcs_glb: mailbox@b111000 {
|
||||
compatible = "qcom,ipq6018-apcs-apps-global";
|
||||
reg = <0x0b111000 0x1000>;
|
||||
reg = <0x0 0x0b111000 0x0 0x1000>;
|
||||
#clock-cells = <1>;
|
||||
clocks = <&a53pll>, <&xo>;
|
||||
clock-names = "pll", "xo";
|
||||
|
@ -362,7 +362,7 @@
|
|||
|
||||
a53pll: clock@b116000 {
|
||||
compatible = "qcom,ipq6018-a53pll";
|
||||
reg = <0x0b116000 0x40>;
|
||||
reg = <0x0 0x0b116000 0x0 0x40>;
|
||||
#clock-cells = <0>;
|
||||
clocks = <&xo>;
|
||||
clock-names = "xo";
|
||||
|
@ -377,68 +377,68 @@
|
|||
};
|
||||
|
||||
timer@b120000 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
#address-cells = <2>;
|
||||
#size-cells = <2>;
|
||||
ranges;
|
||||
compatible = "arm,armv7-timer-mem";
|
||||
reg = <0x0b120000 0x1000>;
|
||||
reg = <0x0 0x0b120000 0x0 0x1000>;
|
||||
clock-frequency = <19200000>;
|
||||
|
||||
frame@b120000 {
|
||||
frame-number = <0>;
|
||||
interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
|
||||
reg = <0x0b121000 0x1000>,
|
||||
<0x0b122000 0x1000>;
|
||||
reg = <0x0 0x0b121000 0x0 0x1000>,
|
||||
<0x0 0x0b122000 0x0 0x1000>;
|
||||
};
|
||||
|
||||
frame@b123000 {
|
||||
frame-number = <1>;
|
||||
interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>;
|
||||
reg = <0xb123000 0x1000>;
|
||||
reg = <0x0 0xb123000 0x0 0x1000>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
frame@b124000 {
|
||||
frame-number = <2>;
|
||||
interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
|
||||
reg = <0x0b124000 0x1000>;
|
||||
reg = <0x0 0x0b124000 0x0 0x1000>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
frame@b125000 {
|
||||
frame-number = <3>;
|
||||
interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>;
|
||||
reg = <0x0b125000 0x1000>;
|
||||
reg = <0x0 0x0b125000 0x0 0x1000>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
frame@b126000 {
|
||||
frame-number = <4>;
|
||||
interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>;
|
||||
reg = <0x0b126000 0x1000>;
|
||||
reg = <0x0 0x0b126000 0x0 0x1000>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
frame@b127000 {
|
||||
frame-number = <5>;
|
||||
interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>;
|
||||
reg = <0x0b127000 0x1000>;
|
||||
reg = <0x0 0x0b127000 0x0 0x1000>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
frame@b128000 {
|
||||
frame-number = <6>;
|
||||
interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
|
||||
reg = <0x0b128000 0x1000>;
|
||||
reg = <0x0 0x0b128000 0x0 0x1000>;
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
|
||||
q6v5_wcss: remoteproc@cd00000 {
|
||||
compatible = "qcom,ipq8074-wcss-pil";
|
||||
reg = <0x0cd00000 0x4040>,
|
||||
<0x004ab000 0x20>;
|
||||
reg = <0x0 0x0cd00000 0x0 0x4040>,
|
||||
<0x0 0x004ab000 0x0 0x20>;
|
||||
reg-names = "qdsp6",
|
||||
"rmb";
|
||||
interrupts-extended = <&intc GIC_SPI 325 IRQ_TYPE_EDGE_RISING>,
|
||||
|
|
|
@ -243,7 +243,6 @@
|
|||
interrupts = <RK_PB2 IRQ_TYPE_LEVEL_LOW>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pmic_int>;
|
||||
rockchip,system-power-controller;
|
||||
wakeup-source;
|
||||
#clock-cells = <1>;
|
||||
clock-output-names = "rk808-clkout1", "xin32k";
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
gmac_clk: gmac-clock {
|
||||
compatible = "fixed-clock";
|
||||
clock-frequency = <125000000>;
|
||||
clock-output-names = "gmac_clk";
|
||||
clock-output-names = "gmac_clkin";
|
||||
#clock-cells = <0>;
|
||||
};
|
||||
|
||||
|
|
|
@ -74,14 +74,14 @@
|
|||
label = "red:diy";
|
||||
gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>;
|
||||
default-state = "off";
|
||||
linux,default-trigger = "mmc1";
|
||||
linux,default-trigger = "mmc2";
|
||||
};
|
||||
|
||||
yellow_led: led-2 {
|
||||
label = "yellow:yellow-led";
|
||||
gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>;
|
||||
default-state = "off";
|
||||
linux,default-trigger = "mmc0";
|
||||
linux,default-trigger = "mmc1";
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -29,6 +29,9 @@
|
|||
i2c6 = &i2c6;
|
||||
i2c7 = &i2c7;
|
||||
i2c8 = &i2c8;
|
||||
mmc0 = &sdio0;
|
||||
mmc1 = &sdmmc;
|
||||
mmc2 = &sdhci;
|
||||
serial0 = &uart0;
|
||||
serial1 = &uart1;
|
||||
serial2 = &uart2;
|
||||
|
|
|
@ -115,8 +115,6 @@ extern unsigned long empty_zero_page[PAGE_SIZE / sizeof(unsigned long)];
|
|||
#define pte_valid(pte) (!!(pte_val(pte) & PTE_VALID))
|
||||
#define pte_valid_not_user(pte) \
|
||||
((pte_val(pte) & (PTE_VALID | PTE_USER)) == PTE_VALID)
|
||||
#define pte_valid_young(pte) \
|
||||
((pte_val(pte) & (PTE_VALID | PTE_AF)) == (PTE_VALID | PTE_AF))
|
||||
#define pte_valid_user(pte) \
|
||||
((pte_val(pte) & (PTE_VALID | PTE_USER)) == (PTE_VALID | PTE_USER))
|
||||
|
||||
|
@ -124,9 +122,12 @@ extern unsigned long empty_zero_page[PAGE_SIZE / sizeof(unsigned long)];
|
|||
* Could the pte be present in the TLB? We must check mm_tlb_flush_pending
|
||||
* so that we don't erroneously return false for pages that have been
|
||||
* remapped as PROT_NONE but are yet to be flushed from the TLB.
|
||||
* Note that we can't make any assumptions based on the state of the access
|
||||
* flag, since ptep_clear_flush_young() elides a DSB when invalidating the
|
||||
* TLB.
|
||||
*/
|
||||
#define pte_accessible(mm, pte) \
|
||||
(mm_tlb_flush_pending(mm) ? pte_present(pte) : pte_valid_young(pte))
|
||||
(mm_tlb_flush_pending(mm) ? pte_present(pte) : pte_valid(pte))
|
||||
|
||||
/*
|
||||
* p??_access_permitted() is true for valid user mappings (subject to the
|
||||
|
@ -164,13 +165,6 @@ static inline pmd_t set_pmd_bit(pmd_t pmd, pgprot_t prot)
|
|||
return pmd;
|
||||
}
|
||||
|
||||
static inline pte_t pte_wrprotect(pte_t pte)
|
||||
{
|
||||
pte = clear_pte_bit(pte, __pgprot(PTE_WRITE));
|
||||
pte = set_pte_bit(pte, __pgprot(PTE_RDONLY));
|
||||
return pte;
|
||||
}
|
||||
|
||||
static inline pte_t pte_mkwrite(pte_t pte)
|
||||
{
|
||||
pte = set_pte_bit(pte, __pgprot(PTE_WRITE));
|
||||
|
@ -196,6 +190,20 @@ static inline pte_t pte_mkdirty(pte_t pte)
|
|||
return pte;
|
||||
}
|
||||
|
||||
static inline pte_t pte_wrprotect(pte_t pte)
|
||||
{
|
||||
/*
|
||||
* If hardware-dirty (PTE_WRITE/DBM bit set and PTE_RDONLY
|
||||
* clear), set the PTE_DIRTY bit.
|
||||
*/
|
||||
if (pte_hw_dirty(pte))
|
||||
pte = pte_mkdirty(pte);
|
||||
|
||||
pte = clear_pte_bit(pte, __pgprot(PTE_WRITE));
|
||||
pte = set_pte_bit(pte, __pgprot(PTE_RDONLY));
|
||||
return pte;
|
||||
}
|
||||
|
||||
static inline pte_t pte_mkold(pte_t pte)
|
||||
{
|
||||
return clear_pte_bit(pte, __pgprot(PTE_AF));
|
||||
|
@ -845,12 +853,6 @@ static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addres
|
|||
pte = READ_ONCE(*ptep);
|
||||
do {
|
||||
old_pte = pte;
|
||||
/*
|
||||
* If hardware-dirty (PTE_WRITE/DBM bit set and PTE_RDONLY
|
||||
* clear), set the PTE_DIRTY bit.
|
||||
*/
|
||||
if (pte_hw_dirty(pte))
|
||||
pte = pte_mkdirty(pte);
|
||||
pte = pte_wrprotect(pte);
|
||||
pte_val(pte) = cmpxchg_relaxed(&pte_val(*ptep),
|
||||
pte_val(old_pte), pte_val(pte));
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
#ifndef _ARM_PROBES_H
|
||||
#define _ARM_PROBES_H
|
||||
|
||||
#include <asm/insn.h>
|
||||
|
||||
typedef u32 probe_opcode_t;
|
||||
typedef void (probes_handler_t) (u32 opcode, long addr, struct pt_regs *);
|
||||
|
||||
|
|
|
@ -126,7 +126,7 @@ void arch_cpu_idle(void)
|
|||
* tricks
|
||||
*/
|
||||
cpu_do_idle();
|
||||
local_irq_enable();
|
||||
raw_local_irq_enable();
|
||||
}
|
||||
|
||||
#ifdef CONFIG_HOTPLUG_CPU
|
||||
|
|
|
@ -13,6 +13,11 @@
|
|||
|
||||
SECTIONS {
|
||||
HYP_SECTION(.text)
|
||||
/*
|
||||
* .hyp..data..percpu needs to be page aligned to maintain the same
|
||||
* alignment for when linking into vmlinux.
|
||||
*/
|
||||
. = ALIGN(PAGE_SIZE);
|
||||
HYP_SECTION_NAME(.data..percpu) : {
|
||||
PERCPU_INPUT(L1_CACHE_BYTES)
|
||||
}
|
||||
|
|
|
@ -273,6 +273,23 @@ static unsigned long vgic_mmio_read_v3r_typer(struct kvm_vcpu *vcpu,
|
|||
return extract_bytes(value, addr & 7, len);
|
||||
}
|
||||
|
||||
static unsigned long vgic_uaccess_read_v3r_typer(struct kvm_vcpu *vcpu,
|
||||
gpa_t addr, unsigned int len)
|
||||
{
|
||||
unsigned long mpidr = kvm_vcpu_get_mpidr_aff(vcpu);
|
||||
int target_vcpu_id = vcpu->vcpu_id;
|
||||
u64 value;
|
||||
|
||||
value = (u64)(mpidr & GENMASK(23, 0)) << 32;
|
||||
value |= ((target_vcpu_id & 0xffff) << 8);
|
||||
|
||||
if (vgic_has_its(vcpu->kvm))
|
||||
value |= GICR_TYPER_PLPIS;
|
||||
|
||||
/* reporting of the Last bit is not supported for userspace */
|
||||
return extract_bytes(value, addr & 7, len);
|
||||
}
|
||||
|
||||
static unsigned long vgic_mmio_read_v3r_iidr(struct kvm_vcpu *vcpu,
|
||||
gpa_t addr, unsigned int len)
|
||||
{
|
||||
|
@ -593,8 +610,9 @@ static const struct vgic_register_region vgic_v3_rd_registers[] = {
|
|||
REGISTER_DESC_WITH_LENGTH(GICR_IIDR,
|
||||
vgic_mmio_read_v3r_iidr, vgic_mmio_write_wi, 4,
|
||||
VGIC_ACCESS_32bit),
|
||||
REGISTER_DESC_WITH_LENGTH(GICR_TYPER,
|
||||
vgic_mmio_read_v3r_typer, vgic_mmio_write_wi, 8,
|
||||
REGISTER_DESC_WITH_LENGTH_UACCESS(GICR_TYPER,
|
||||
vgic_mmio_read_v3r_typer, vgic_mmio_write_wi,
|
||||
vgic_uaccess_read_v3r_typer, vgic_mmio_uaccess_write_wi, 8,
|
||||
VGIC_ACCESS_64bit | VGIC_ACCESS_32bit),
|
||||
REGISTER_DESC_WITH_LENGTH(GICR_WAKER,
|
||||
vgic_mmio_read_raz, vgic_mmio_write_wi, 4,
|
||||
|
|
|
@ -102,6 +102,6 @@ void arch_cpu_idle(void)
|
|||
#ifdef CONFIG_CPU_PM_STOP
|
||||
asm volatile("stop\n");
|
||||
#endif
|
||||
local_irq_enable();
|
||||
raw_local_irq_enable();
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -57,7 +57,7 @@ asmlinkage void ret_from_kernel_thread(void);
|
|||
*/
|
||||
void arch_cpu_idle(void)
|
||||
{
|
||||
local_irq_enable();
|
||||
raw_local_irq_enable();
|
||||
__asm__("sleep");
|
||||
}
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ void arch_cpu_idle(void)
|
|||
{
|
||||
__vmwait();
|
||||
/* interrupts wake us up, but irqs are still disabled */
|
||||
local_irq_enable();
|
||||
raw_local_irq_enable();
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -239,7 +239,7 @@ void arch_cpu_idle(void)
|
|||
if (mark_idle)
|
||||
(*mark_idle)(1);
|
||||
|
||||
safe_halt();
|
||||
raw_safe_halt();
|
||||
|
||||
if (mark_idle)
|
||||
(*mark_idle)(0);
|
||||
|
|
|
@ -149,5 +149,5 @@ int dump_fpu(struct pt_regs *regs, elf_fpregset_t *fpregs)
|
|||
|
||||
void arch_cpu_idle(void)
|
||||
{
|
||||
local_irq_enable();
|
||||
raw_local_irq_enable();
|
||||
}
|
||||
|
|
|
@ -154,6 +154,7 @@ static inline void pmd_clear(pmd_t *pmdp)
|
|||
|
||||
#if defined(CONFIG_XPA)
|
||||
|
||||
#define MAX_POSSIBLE_PHYSMEM_BITS 40
|
||||
#define pte_pfn(x) (((unsigned long)((x).pte_high >> _PFN_SHIFT)) | (unsigned long)((x).pte_low << _PAGE_PRESENT_SHIFT))
|
||||
static inline pte_t
|
||||
pfn_pte(unsigned long pfn, pgprot_t prot)
|
||||
|
@ -169,6 +170,7 @@ pfn_pte(unsigned long pfn, pgprot_t prot)
|
|||
|
||||
#elif defined(CONFIG_PHYS_ADDR_T_64BIT) && defined(CONFIG_CPU_MIPS32)
|
||||
|
||||
#define MAX_POSSIBLE_PHYSMEM_BITS 36
|
||||
#define pte_pfn(x) ((unsigned long)((x).pte_high >> 6))
|
||||
|
||||
static inline pte_t pfn_pte(unsigned long pfn, pgprot_t prot)
|
||||
|
@ -183,6 +185,7 @@ static inline pte_t pfn_pte(unsigned long pfn, pgprot_t prot)
|
|||
|
||||
#else
|
||||
|
||||
#define MAX_POSSIBLE_PHYSMEM_BITS 32
|
||||
#ifdef CONFIG_CPU_VR41XX
|
||||
#define pte_pfn(x) ((unsigned long)((x).pte >> (PAGE_SHIFT + 2)))
|
||||
#define pfn_pte(pfn, prot) __pte(((pfn) << (PAGE_SHIFT + 2)) | pgprot_val(prot))
|
||||
|
|
|
@ -33,19 +33,19 @@ static void __cpuidle r3081_wait(void)
|
|||
{
|
||||
unsigned long cfg = read_c0_conf();
|
||||
write_c0_conf(cfg | R30XX_CONF_HALT);
|
||||
local_irq_enable();
|
||||
raw_local_irq_enable();
|
||||
}
|
||||
|
||||
static void __cpuidle r39xx_wait(void)
|
||||
{
|
||||
if (!need_resched())
|
||||
write_c0_conf(read_c0_conf() | TX39_CONF_HALT);
|
||||
local_irq_enable();
|
||||
raw_local_irq_enable();
|
||||
}
|
||||
|
||||
void __cpuidle r4k_wait(void)
|
||||
{
|
||||
local_irq_enable();
|
||||
raw_local_irq_enable();
|
||||
__r4k_wait();
|
||||
}
|
||||
|
||||
|
@ -64,7 +64,7 @@ void __cpuidle r4k_wait_irqoff(void)
|
|||
" .set arch=r4000 \n"
|
||||
" wait \n"
|
||||
" .set pop \n");
|
||||
local_irq_enable();
|
||||
raw_local_irq_enable();
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -84,7 +84,7 @@ static void __cpuidle rm7k_wait_irqoff(void)
|
|||
" wait \n"
|
||||
" mtc0 $1, $12 # stalls until W stage \n"
|
||||
" .set pop \n");
|
||||
local_irq_enable();
|
||||
raw_local_irq_enable();
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -257,7 +257,7 @@ void arch_cpu_idle(void)
|
|||
if (cpu_wait)
|
||||
cpu_wait();
|
||||
else
|
||||
local_irq_enable();
|
||||
raw_local_irq_enable();
|
||||
}
|
||||
|
||||
#ifdef CONFIG_CPU_IDLE
|
||||
|
|
|
@ -33,7 +33,7 @@ EXPORT_SYMBOL(pm_power_off);
|
|||
|
||||
void arch_cpu_idle(void)
|
||||
{
|
||||
local_irq_enable();
|
||||
raw_local_irq_enable();
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -79,7 +79,7 @@ void machine_power_off(void)
|
|||
*/
|
||||
void arch_cpu_idle(void)
|
||||
{
|
||||
local_irq_enable();
|
||||
raw_local_irq_enable();
|
||||
if (mfspr(SPR_UPR) & SPR_UPR_PMP)
|
||||
mtspr(SPR_PMR, mfspr(SPR_PMR) | SPR_PMR_DME);
|
||||
}
|
||||
|
|
|
@ -169,7 +169,7 @@ void __cpuidle arch_cpu_idle_dead(void)
|
|||
|
||||
void __cpuidle arch_cpu_idle(void)
|
||||
{
|
||||
local_irq_enable();
|
||||
raw_local_irq_enable();
|
||||
|
||||
/* nop on real hardware, qemu will idle sleep. */
|
||||
asm volatile("or %%r10,%%r10,%%r10\n":::);
|
||||
|
|
|
@ -248,7 +248,6 @@ KBUILD_CFLAGS += $(call cc-option,-mno-string)
|
|||
cpu-as-$(CONFIG_40x) += -Wa,-m405
|
||||
cpu-as-$(CONFIG_44x) += -Wa,-m440
|
||||
cpu-as-$(CONFIG_ALTIVEC) += $(call as-option,-Wa$(comma)-maltivec)
|
||||
cpu-as-$(CONFIG_E200) += -Wa,-me200
|
||||
cpu-as-$(CONFIG_E500) += -Wa,-me500
|
||||
|
||||
# When using '-many -mpower4' gas will first try and find a matching power4
|
||||
|
|
|
@ -36,8 +36,10 @@ static inline bool pte_user(pte_t pte)
|
|||
*/
|
||||
#ifdef CONFIG_PTE_64BIT
|
||||
#define PTE_RPN_MASK (~((1ULL << PTE_RPN_SHIFT) - 1))
|
||||
#define MAX_POSSIBLE_PHYSMEM_BITS 36
|
||||
#else
|
||||
#define PTE_RPN_MASK (~((1UL << PTE_RPN_SHIFT) - 1))
|
||||
#define MAX_POSSIBLE_PHYSMEM_BITS 32
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
|
|
@ -63,6 +63,8 @@
|
|||
|
||||
#else /* !__ASSEMBLY__ */
|
||||
|
||||
#include <linux/jump_label.h>
|
||||
|
||||
DECLARE_STATIC_KEY_FALSE(uaccess_flush_key);
|
||||
|
||||
#ifdef CONFIG_PPC_KUAP
|
||||
|
|
|
@ -153,8 +153,10 @@ int map_kernel_page(unsigned long va, phys_addr_t pa, pgprot_t prot);
|
|||
*/
|
||||
#if defined(CONFIG_PPC32) && defined(CONFIG_PTE_64BIT)
|
||||
#define PTE_RPN_MASK (~((1ULL << PTE_RPN_SHIFT) - 1))
|
||||
#define MAX_POSSIBLE_PHYSMEM_BITS 36
|
||||
#else
|
||||
#define PTE_RPN_MASK (~((1UL << PTE_RPN_SHIFT) - 1))
|
||||
#define MAX_POSSIBLE_PHYSMEM_BITS 32
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
|
|
@ -1000,8 +1000,6 @@ TRAMP_REAL_BEGIN(system_reset_idle_wake)
|
|||
* Vectors for the FWNMI option. Share common code.
|
||||
*/
|
||||
TRAMP_REAL_BEGIN(system_reset_fwnmi)
|
||||
/* XXX: fwnmi guest could run a nested/PR guest, so why no test? */
|
||||
__IKVM_REAL(system_reset)=0
|
||||
GEN_INT_ENTRY system_reset, virt=0
|
||||
|
||||
#endif /* CONFIG_PPC_PSERIES */
|
||||
|
@ -1412,6 +1410,11 @@ END_FTR_SECTION_IFSET(CPU_FTR_HVMODE)
|
|||
* If none is found, do a Linux page fault. Linux page faults can happen in
|
||||
* kernel mode due to user copy operations of course.
|
||||
*
|
||||
* KVM: The KVM HDSI handler may perform a load with MSR[DR]=1 in guest
|
||||
* MMU context, which may cause a DSI in the host, which must go to the
|
||||
* KVM handler. MSR[IR] is not enabled, so the real-mode handler will
|
||||
* always be used regardless of AIL setting.
|
||||
*
|
||||
* - Radix MMU
|
||||
* The hardware loads from the Linux page table directly, so a fault goes
|
||||
* immediately to Linux page fault.
|
||||
|
@ -1422,10 +1425,8 @@ INT_DEFINE_BEGIN(data_access)
|
|||
IVEC=0x300
|
||||
IDAR=1
|
||||
IDSISR=1
|
||||
#ifdef CONFIG_KVM_BOOK3S_PR_POSSIBLE
|
||||
IKVM_SKIP=1
|
||||
IKVM_REAL=1
|
||||
#endif
|
||||
INT_DEFINE_END(data_access)
|
||||
|
||||
EXC_REAL_BEGIN(data_access, 0x300, 0x80)
|
||||
|
@ -1464,6 +1465,8 @@ ALT_MMU_FTR_SECTION_END_IFCLR(MMU_FTR_TYPE_RADIX)
|
|||
* ppc64_bolted_size (first segment). The kernel handler must avoid stomping
|
||||
* on user-handler data structures.
|
||||
*
|
||||
* KVM: Same as 0x300, DSLB must test for KVM guest.
|
||||
*
|
||||
* A dedicated save area EXSLB is used (XXX: but it actually need not be
|
||||
* these days, we could use EXGEN).
|
||||
*/
|
||||
|
@ -1472,10 +1475,8 @@ INT_DEFINE_BEGIN(data_access_slb)
|
|||
IAREA=PACA_EXSLB
|
||||
IRECONCILE=0
|
||||
IDAR=1
|
||||
#ifdef CONFIG_KVM_BOOK3S_PR_POSSIBLE
|
||||
IKVM_SKIP=1
|
||||
IKVM_REAL=1
|
||||
#endif
|
||||
INT_DEFINE_END(data_access_slb)
|
||||
|
||||
EXC_REAL_BEGIN(data_access_slb, 0x380, 0x80)
|
||||
|
|
|
@ -156,6 +156,7 @@ __after_mmu_off:
|
|||
bl initial_bats
|
||||
bl load_segment_registers
|
||||
BEGIN_MMU_FTR_SECTION
|
||||
bl reloc_offset
|
||||
bl early_hash_table
|
||||
END_MMU_FTR_SECTION_IFSET(MMU_FTR_HPTE_TABLE)
|
||||
#if defined(CONFIG_BOOTX_TEXT)
|
||||
|
@ -920,7 +921,7 @@ early_hash_table:
|
|||
ori r6, r6, 3 /* 256kB table */
|
||||
mtspr SPRN_SDR1, r6
|
||||
lis r6, early_hash@h
|
||||
lis r3, Hash@ha
|
||||
addis r3, r3, Hash@ha
|
||||
stw r6, Hash@l(r3)
|
||||
blr
|
||||
|
||||
|
|
|
@ -52,9 +52,9 @@ void arch_cpu_idle(void)
|
|||
* interrupts enabled, some don't.
|
||||
*/
|
||||
if (irqs_disabled())
|
||||
local_irq_enable();
|
||||
raw_local_irq_enable();
|
||||
} else {
|
||||
local_irq_enable();
|
||||
raw_local_irq_enable();
|
||||
/*
|
||||
* Go into low thread priority and possibly
|
||||
* low power mode.
|
||||
|
|
|
@ -251,6 +251,13 @@ static vm_fault_t xive_native_esb_fault(struct vm_fault *vmf)
|
|||
}
|
||||
|
||||
state = &sb->irq_state[src];
|
||||
|
||||
/* Some sanity checking */
|
||||
if (!state->valid) {
|
||||
pr_devel("%s: source %lx invalid !\n", __func__, irq);
|
||||
return VM_FAULT_SIGBUS;
|
||||
}
|
||||
|
||||
kvmppc_xive_select_irq(state, &hw_num, &xd);
|
||||
|
||||
arch_spin_lock(&sb->lock);
|
||||
|
|
|
@ -14,4 +14,6 @@
|
|||
#define PGDIR_SIZE (_AC(1, UL) << PGDIR_SHIFT)
|
||||
#define PGDIR_MASK (~(PGDIR_SIZE - 1))
|
||||
|
||||
#define MAX_POSSIBLE_PHYSMEM_BITS 34
|
||||
|
||||
#endif /* _ASM_RISCV_PGTABLE_32_H */
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
#include <asm/barrier.h>
|
||||
|
||||
static inline void cpu_relax(void)
|
||||
{
|
||||
#ifdef __riscv_muldiv
|
||||
|
|
|
@ -36,7 +36,7 @@ extern asmlinkage void ret_from_kernel_thread(void);
|
|||
void arch_cpu_idle(void)
|
||||
{
|
||||
wait_for_interrupt();
|
||||
local_irq_enable();
|
||||
raw_local_irq_enable();
|
||||
}
|
||||
|
||||
void show_regs(struct pt_regs *regs)
|
||||
|
|
|
@ -75,6 +75,7 @@ void __init setup_arch(char **cmdline_p)
|
|||
*cmdline_p = boot_command_line;
|
||||
|
||||
early_ioremap_setup();
|
||||
jump_label_init();
|
||||
parse_early_param();
|
||||
|
||||
efi_init();
|
||||
|
|
|
@ -44,7 +44,7 @@ SYSCFLAGS_vdso.so.dbg = $(c_flags)
|
|||
$(obj)/vdso.so.dbg: $(src)/vdso.lds $(obj-vdso) FORCE
|
||||
$(call if_changed,vdsold)
|
||||
SYSCFLAGS_vdso.so.dbg = -shared -s -Wl,-soname=linux-vdso.so.1 \
|
||||
-Wl,--build-id -Wl,--hash-style=both
|
||||
-Wl,--build-id=sha1 -Wl,--hash-style=both
|
||||
|
||||
# We also create a special relocatable object that should mirror the symbol
|
||||
# table and layout of the linked DSO. With ld --just-symbols we can then
|
||||
|
|
|
@ -53,11 +53,11 @@ int main(void)
|
|||
/* stack_frame offsets */
|
||||
OFFSET(__SF_BACKCHAIN, stack_frame, back_chain);
|
||||
OFFSET(__SF_GPRS, stack_frame, gprs);
|
||||
OFFSET(__SF_EMPTY, stack_frame, empty1);
|
||||
OFFSET(__SF_SIE_CONTROL, stack_frame, empty1[0]);
|
||||
OFFSET(__SF_SIE_SAVEAREA, stack_frame, empty1[1]);
|
||||
OFFSET(__SF_SIE_REASON, stack_frame, empty1[2]);
|
||||
OFFSET(__SF_SIE_FLAGS, stack_frame, empty1[3]);
|
||||
OFFSET(__SF_EMPTY, stack_frame, empty1[0]);
|
||||
OFFSET(__SF_SIE_CONTROL, stack_frame, empty1[1]);
|
||||
OFFSET(__SF_SIE_SAVEAREA, stack_frame, empty1[2]);
|
||||
OFFSET(__SF_SIE_REASON, stack_frame, empty1[3]);
|
||||
OFFSET(__SF_SIE_FLAGS, stack_frame, empty1[4]);
|
||||
BLANK();
|
||||
OFFSET(__VDSO_GETCPU_VAL, vdso_per_cpu_data, getcpu_val);
|
||||
BLANK();
|
||||
|
|
|
@ -1068,6 +1068,7 @@ EXPORT_SYMBOL(save_fpu_regs)
|
|||
* %r4
|
||||
*/
|
||||
load_fpu_regs:
|
||||
stnsm __SF_EMPTY(%r15),0xfc
|
||||
lg %r4,__LC_CURRENT
|
||||
aghi %r4,__TASK_thread
|
||||
TSTMSK __LC_CPU_FLAGS,_CIF_FPU
|
||||
|
@ -1099,6 +1100,7 @@ load_fpu_regs:
|
|||
.Lload_fpu_regs_done:
|
||||
ni __LC_CPU_FLAGS+7,255-_CIF_FPU
|
||||
.Lload_fpu_regs_exit:
|
||||
ssm __SF_EMPTY(%r15)
|
||||
BR_EX %r14
|
||||
.Lload_fpu_regs_end:
|
||||
ENDPROC(load_fpu_regs)
|
||||
|
|
|
@ -33,10 +33,10 @@ void enabled_wait(void)
|
|||
PSW_MASK_IO | PSW_MASK_EXT | PSW_MASK_MCHECK;
|
||||
clear_cpu_flag(CIF_NOHZ_DELAY);
|
||||
|
||||
local_irq_save(flags);
|
||||
raw_local_irq_save(flags);
|
||||
/* Call the assembler magic in entry.S */
|
||||
psw_idle(idle, psw_mask);
|
||||
local_irq_restore(flags);
|
||||
raw_local_irq_restore(flags);
|
||||
|
||||
/* Account time spent with enabled wait psw loaded as idle time. */
|
||||
raw_write_seqcount_begin(&idle->seqcount);
|
||||
|
@ -123,7 +123,7 @@ void arch_cpu_idle_enter(void)
|
|||
void arch_cpu_idle(void)
|
||||
{
|
||||
enabled_wait();
|
||||
local_irq_enable();
|
||||
raw_local_irq_enable();
|
||||
}
|
||||
|
||||
void arch_cpu_idle_exit(void)
|
||||
|
|
|
@ -129,8 +129,15 @@ int uv_destroy_page(unsigned long paddr)
|
|||
.paddr = paddr
|
||||
};
|
||||
|
||||
if (uv_call(0, (u64)&uvcb))
|
||||
if (uv_call(0, (u64)&uvcb)) {
|
||||
/*
|
||||
* Older firmware uses 107/d as an indication of a non secure
|
||||
* page. Let us emulate the newer variant (no-op).
|
||||
*/
|
||||
if (uvcb.header.rc == 0x107 && uvcb.header.rrc == 0xd)
|
||||
return 0;
|
||||
return -EINVAL;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -2312,7 +2312,7 @@ static int kvm_s390_handle_pv(struct kvm *kvm, struct kvm_pv_cmd *cmd)
|
|||
struct kvm_s390_pv_unp unp = {};
|
||||
|
||||
r = -EINVAL;
|
||||
if (!kvm_s390_pv_is_protected(kvm))
|
||||
if (!kvm_s390_pv_is_protected(kvm) || !mm_is_protected(kvm->mm))
|
||||
break;
|
||||
|
||||
r = -EFAULT;
|
||||
|
@ -3564,7 +3564,6 @@ static void kvm_arch_vcpu_ioctl_initial_reset(struct kvm_vcpu *vcpu)
|
|||
vcpu->arch.sie_block->pp = 0;
|
||||
vcpu->arch.sie_block->fpf &= ~FPF_BPBC;
|
||||
vcpu->arch.sie_block->todpr = 0;
|
||||
vcpu->arch.sie_block->cpnc = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3582,7 +3581,6 @@ static void kvm_arch_vcpu_ioctl_clear_reset(struct kvm_vcpu *vcpu)
|
|||
|
||||
regs->etoken = 0;
|
||||
regs->etoken_extension = 0;
|
||||
regs->diag318 = 0;
|
||||
}
|
||||
|
||||
int kvm_arch_vcpu_ioctl_set_regs(struct kvm_vcpu *vcpu, struct kvm_regs *regs)
|
||||
|
|
|
@ -208,7 +208,6 @@ int kvm_s390_pv_init_vm(struct kvm *kvm, u16 *rc, u16 *rrc)
|
|||
return -EIO;
|
||||
}
|
||||
kvm->arch.gmap->guest_handle = uvcb.guest_handle;
|
||||
atomic_set(&kvm->mm->context.is_protected, 1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -228,6 +227,8 @@ int kvm_s390_pv_set_sec_parms(struct kvm *kvm, void *hdr, u64 length, u16 *rc,
|
|||
*rrc = uvcb.header.rrc;
|
||||
KVM_UV_EVENT(kvm, 3, "PROTVIRT VM SET PARMS: rc %x rrc %x",
|
||||
*rc, *rrc);
|
||||
if (!cc)
|
||||
atomic_set(&kvm->mm->context.is_protected, 1);
|
||||
return cc ? -EINVAL : 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -2690,6 +2690,8 @@ static const struct mm_walk_ops reset_acc_walk_ops = {
|
|||
#include <linux/sched/mm.h>
|
||||
void s390_reset_acc(struct mm_struct *mm)
|
||||
{
|
||||
if (!mm_is_protected(mm))
|
||||
return;
|
||||
/*
|
||||
* we might be called during
|
||||
* reset: we walk the pages and clear
|
||||
|
|
|
@ -22,7 +22,7 @@ static void (*sh_idle)(void);
|
|||
void default_idle(void)
|
||||
{
|
||||
set_bl_bit();
|
||||
local_irq_enable();
|
||||
raw_local_irq_enable();
|
||||
/* Isn't this racy ? */
|
||||
cpu_sleep();
|
||||
clear_bl_bit();
|
||||
|
|
|
@ -50,7 +50,7 @@ static void pmc_leon_idle_fixup(void)
|
|||
register unsigned int address = (unsigned int)leon3_irqctrl_regs;
|
||||
|
||||
/* Interrupts need to be enabled to not hang the CPU */
|
||||
local_irq_enable();
|
||||
raw_local_irq_enable();
|
||||
|
||||
__asm__ __volatile__ (
|
||||
"wr %%g0, %%asr19\n"
|
||||
|
@ -66,7 +66,7 @@ static void pmc_leon_idle_fixup(void)
|
|||
static void pmc_leon_idle(void)
|
||||
{
|
||||
/* Interrupts need to be enabled to not hang the CPU */
|
||||
local_irq_enable();
|
||||
raw_local_irq_enable();
|
||||
|
||||
/* For systems without power-down, this will be no-op */
|
||||
__asm__ __volatile__ ("wr %g0, %asr19\n\t");
|
||||
|
|
|
@ -74,7 +74,7 @@ void arch_cpu_idle(void)
|
|||
{
|
||||
if (sparc_idle)
|
||||
(*sparc_idle)();
|
||||
local_irq_enable();
|
||||
raw_local_irq_enable();
|
||||
}
|
||||
|
||||
/* XXX cli/sti -> local_irq_xxx here, check this works once SMP is fixed. */
|
||||
|
|
|
@ -62,11 +62,11 @@ void arch_cpu_idle(void)
|
|||
{
|
||||
if (tlb_type != hypervisor) {
|
||||
touch_nmi_watchdog();
|
||||
local_irq_enable();
|
||||
raw_local_irq_enable();
|
||||
} else {
|
||||
unsigned long pstate;
|
||||
|
||||
local_irq_enable();
|
||||
raw_local_irq_enable();
|
||||
|
||||
/* The sun4v sleeping code requires that we have PSTATE.IE cleared over
|
||||
* the cpu sleep hypervisor call.
|
||||
|
|
|
@ -217,7 +217,7 @@ void arch_cpu_idle(void)
|
|||
{
|
||||
cpu_tasks[current_thread_info()->cpu].pid = os_getpid();
|
||||
um_idle_sleep();
|
||||
local_irq_enable();
|
||||
raw_local_irq_enable();
|
||||
}
|
||||
|
||||
int __cant_sleep(void) {
|
||||
|
|
|
@ -1656,6 +1656,7 @@ int kvm_test_age_hva(struct kvm *kvm, unsigned long hva);
|
|||
int kvm_set_spte_hva(struct kvm *kvm, unsigned long hva, pte_t pte);
|
||||
int kvm_cpu_has_injectable_intr(struct kvm_vcpu *v);
|
||||
int kvm_cpu_has_interrupt(struct kvm_vcpu *vcpu);
|
||||
int kvm_cpu_has_extint(struct kvm_vcpu *v);
|
||||
int kvm_arch_interrupt_allowed(struct kvm_vcpu *vcpu);
|
||||
int kvm_cpu_get_interrupt(struct kvm_vcpu *v);
|
||||
void kvm_vcpu_reset(struct kvm_vcpu *vcpu, bool init_event);
|
||||
|
|
|
@ -88,8 +88,6 @@ static inline void __mwaitx(unsigned long eax, unsigned long ebx,
|
|||
|
||||
static inline void __sti_mwait(unsigned long eax, unsigned long ecx)
|
||||
{
|
||||
trace_hardirqs_on();
|
||||
|
||||
mds_idle_clear_cpu_buffers();
|
||||
/* "mwait %eax, %ecx;" */
|
||||
asm volatile("sti; .byte 0x0f, 0x01, 0xc9;"
|
||||
|
|
|
@ -739,11 +739,13 @@ spectre_v2_user_select_mitigation(enum spectre_v2_mitigation_cmd v2_cmd)
|
|||
if (boot_cpu_has(X86_FEATURE_IBPB)) {
|
||||
setup_force_cpu_cap(X86_FEATURE_USE_IBPB);
|
||||
|
||||
spectre_v2_user_ibpb = mode;
|
||||
switch (cmd) {
|
||||
case SPECTRE_V2_USER_CMD_FORCE:
|
||||
case SPECTRE_V2_USER_CMD_PRCTL_IBPB:
|
||||
case SPECTRE_V2_USER_CMD_SECCOMP_IBPB:
|
||||
static_branch_enable(&switch_mm_always_ibpb);
|
||||
spectre_v2_user_ibpb = SPECTRE_V2_USER_STRICT;
|
||||
break;
|
||||
case SPECTRE_V2_USER_CMD_PRCTL:
|
||||
case SPECTRE_V2_USER_CMD_AUTO:
|
||||
|
@ -757,8 +759,6 @@ spectre_v2_user_select_mitigation(enum spectre_v2_mitigation_cmd v2_cmd)
|
|||
pr_info("mitigation: Enabling %s Indirect Branch Prediction Barrier\n",
|
||||
static_key_enabled(&switch_mm_always_ibpb) ?
|
||||
"always-on" : "conditional");
|
||||
|
||||
spectre_v2_user_ibpb = mode;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -1384,8 +1384,10 @@ noinstr void do_machine_check(struct pt_regs *regs)
|
|||
* When there's any problem use only local no_way_out state.
|
||||
*/
|
||||
if (!lmce) {
|
||||
if (mce_end(order) < 0)
|
||||
no_way_out = worst >= MCE_PANIC_SEVERITY;
|
||||
if (mce_end(order) < 0) {
|
||||
if (!no_way_out)
|
||||
no_way_out = worst >= MCE_PANIC_SEVERITY;
|
||||
}
|
||||
} else {
|
||||
/*
|
||||
* If there was a fatal machine check we should have
|
||||
|
|
|
@ -507,6 +507,24 @@ unlock:
|
|||
return ret ?: nbytes;
|
||||
}
|
||||
|
||||
/**
|
||||
* rdtgroup_remove - the helper to remove resource group safely
|
||||
* @rdtgrp: resource group to remove
|
||||
*
|
||||
* On resource group creation via a mkdir, an extra kernfs_node reference is
|
||||
* taken to ensure that the rdtgroup structure remains accessible for the
|
||||
* rdtgroup_kn_unlock() calls where it is removed.
|
||||
*
|
||||
* Drop the extra reference here, then free the rdtgroup structure.
|
||||
*
|
||||
* Return: void
|
||||
*/
|
||||
static void rdtgroup_remove(struct rdtgroup *rdtgrp)
|
||||
{
|
||||
kernfs_put(rdtgrp->kn);
|
||||
kfree(rdtgrp);
|
||||
}
|
||||
|
||||
struct task_move_callback {
|
||||
struct callback_head work;
|
||||
struct rdtgroup *rdtgrp;
|
||||
|
@ -529,7 +547,7 @@ static void move_myself(struct callback_head *head)
|
|||
(rdtgrp->flags & RDT_DELETED)) {
|
||||
current->closid = 0;
|
||||
current->rmid = 0;
|
||||
kfree(rdtgrp);
|
||||
rdtgroup_remove(rdtgrp);
|
||||
}
|
||||
|
||||
if (unlikely(current->flags & PF_EXITING))
|
||||
|
@ -1769,7 +1787,6 @@ static int rdtgroup_mkdir_info_resdir(struct rdt_resource *r, char *name,
|
|||
if (IS_ERR(kn_subdir))
|
||||
return PTR_ERR(kn_subdir);
|
||||
|
||||
kernfs_get(kn_subdir);
|
||||
ret = rdtgroup_kn_set_ugid(kn_subdir);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
@ -1792,7 +1809,6 @@ static int rdtgroup_create_info_dir(struct kernfs_node *parent_kn)
|
|||
kn_info = kernfs_create_dir(parent_kn, "info", parent_kn->mode, NULL);
|
||||
if (IS_ERR(kn_info))
|
||||
return PTR_ERR(kn_info);
|
||||
kernfs_get(kn_info);
|
||||
|
||||
ret = rdtgroup_add_files(kn_info, RF_TOP_INFO);
|
||||
if (ret)
|
||||
|
@ -1813,12 +1829,6 @@ static int rdtgroup_create_info_dir(struct kernfs_node *parent_kn)
|
|||
goto out_destroy;
|
||||
}
|
||||
|
||||
/*
|
||||
* This extra ref will be put in kernfs_remove() and guarantees
|
||||
* that @rdtgrp->kn is always accessible.
|
||||
*/
|
||||
kernfs_get(kn_info);
|
||||
|
||||
ret = rdtgroup_kn_set_ugid(kn_info);
|
||||
if (ret)
|
||||
goto out_destroy;
|
||||
|
@ -1847,12 +1857,6 @@ mongroup_create_dir(struct kernfs_node *parent_kn, struct rdtgroup *prgrp,
|
|||
if (dest_kn)
|
||||
*dest_kn = kn;
|
||||
|
||||
/*
|
||||
* This extra ref will be put in kernfs_remove() and guarantees
|
||||
* that @rdtgrp->kn is always accessible.
|
||||
*/
|
||||
kernfs_get(kn);
|
||||
|
||||
ret = rdtgroup_kn_set_ugid(kn);
|
||||
if (ret)
|
||||
goto out_destroy;
|
||||
|
@ -2079,8 +2083,7 @@ void rdtgroup_kn_unlock(struct kernfs_node *kn)
|
|||
rdtgrp->mode == RDT_MODE_PSEUDO_LOCKED)
|
||||
rdtgroup_pseudo_lock_remove(rdtgrp);
|
||||
kernfs_unbreak_active_protection(kn);
|
||||
kernfs_put(rdtgrp->kn);
|
||||
kfree(rdtgrp);
|
||||
rdtgroup_remove(rdtgrp);
|
||||
} else {
|
||||
kernfs_unbreak_active_protection(kn);
|
||||
}
|
||||
|
@ -2139,13 +2142,11 @@ static int rdt_get_tree(struct fs_context *fc)
|
|||
&kn_mongrp);
|
||||
if (ret < 0)
|
||||
goto out_info;
|
||||
kernfs_get(kn_mongrp);
|
||||
|
||||
ret = mkdir_mondata_all(rdtgroup_default.kn,
|
||||
&rdtgroup_default, &kn_mondata);
|
||||
if (ret < 0)
|
||||
goto out_mongrp;
|
||||
kernfs_get(kn_mondata);
|
||||
rdtgroup_default.mon.mon_data_kn = kn_mondata;
|
||||
}
|
||||
|
||||
|
@ -2357,7 +2358,7 @@ static void free_all_child_rdtgrp(struct rdtgroup *rdtgrp)
|
|||
if (atomic_read(&sentry->waitcount) != 0)
|
||||
sentry->flags = RDT_DELETED;
|
||||
else
|
||||
kfree(sentry);
|
||||
rdtgroup_remove(sentry);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2399,7 +2400,7 @@ static void rmdir_all_sub(void)
|
|||
if (atomic_read(&rdtgrp->waitcount) != 0)
|
||||
rdtgrp->flags = RDT_DELETED;
|
||||
else
|
||||
kfree(rdtgrp);
|
||||
rdtgroup_remove(rdtgrp);
|
||||
}
|
||||
/* Notify online CPUs to update per cpu storage and PQR_ASSOC MSR */
|
||||
update_closid_rmid(cpu_online_mask, &rdtgroup_default);
|
||||
|
@ -2499,11 +2500,6 @@ static int mkdir_mondata_subdir(struct kernfs_node *parent_kn,
|
|||
if (IS_ERR(kn))
|
||||
return PTR_ERR(kn);
|
||||
|
||||
/*
|
||||
* This extra ref will be put in kernfs_remove() and guarantees
|
||||
* that kn is always accessible.
|
||||
*/
|
||||
kernfs_get(kn);
|
||||
ret = rdtgroup_kn_set_ugid(kn);
|
||||
if (ret)
|
||||
goto out_destroy;
|
||||
|
@ -2838,8 +2834,8 @@ static int mkdir_rdt_prepare(struct kernfs_node *parent_kn,
|
|||
/*
|
||||
* kernfs_remove() will drop the reference count on "kn" which
|
||||
* will free it. But we still need it to stick around for the
|
||||
* rdtgroup_kn_unlock(kn} call below. Take one extra reference
|
||||
* here, which will be dropped inside rdtgroup_kn_unlock().
|
||||
* rdtgroup_kn_unlock(kn) call. Take one extra reference here,
|
||||
* which will be dropped by kernfs_put() in rdtgroup_remove().
|
||||
*/
|
||||
kernfs_get(kn);
|
||||
|
||||
|
@ -2880,6 +2876,7 @@ static int mkdir_rdt_prepare(struct kernfs_node *parent_kn,
|
|||
out_idfree:
|
||||
free_rmid(rdtgrp->mon.rmid);
|
||||
out_destroy:
|
||||
kernfs_put(rdtgrp->kn);
|
||||
kernfs_remove(rdtgrp->kn);
|
||||
out_free_rgrp:
|
||||
kfree(rdtgrp);
|
||||
|
@ -2892,7 +2889,7 @@ static void mkdir_rdt_prepare_clean(struct rdtgroup *rgrp)
|
|||
{
|
||||
kernfs_remove(rgrp->kn);
|
||||
free_rmid(rgrp->mon.rmid);
|
||||
kfree(rgrp);
|
||||
rdtgroup_remove(rgrp);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -3049,11 +3046,6 @@ static int rdtgroup_rmdir_mon(struct kernfs_node *kn, struct rdtgroup *rdtgrp,
|
|||
WARN_ON(list_empty(&prdtgrp->mon.crdtgrp_list));
|
||||
list_del(&rdtgrp->mon.crdtgrp_list);
|
||||
|
||||
/*
|
||||
* one extra hold on this, will drop when we kfree(rdtgrp)
|
||||
* in rdtgroup_kn_unlock()
|
||||
*/
|
||||
kernfs_get(kn);
|
||||
kernfs_remove(rdtgrp->kn);
|
||||
|
||||
return 0;
|
||||
|
@ -3065,11 +3057,6 @@ static int rdtgroup_ctrl_remove(struct kernfs_node *kn,
|
|||
rdtgrp->flags = RDT_DELETED;
|
||||
list_del(&rdtgrp->rdtgroup_list);
|
||||
|
||||
/*
|
||||
* one extra hold on this, will drop when we kfree(rdtgrp)
|
||||
* in rdtgroup_kn_unlock()
|
||||
*/
|
||||
kernfs_get(kn);
|
||||
kernfs_remove(rdtgrp->kn);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -685,7 +685,7 @@ void arch_cpu_idle(void)
|
|||
*/
|
||||
void __cpuidle default_idle(void)
|
||||
{
|
||||
safe_halt();
|
||||
raw_safe_halt();
|
||||
}
|
||||
#if defined(CONFIG_APM_MODULE) || defined(CONFIG_HALTPOLL_CPUIDLE_MODULE)
|
||||
EXPORT_SYMBOL(default_idle);
|
||||
|
@ -736,6 +736,8 @@ void stop_this_cpu(void *dummy)
|
|||
/*
|
||||
* AMD Erratum 400 aware idle routine. We handle it the same way as C3 power
|
||||
* states (local apic timer and TSC stop).
|
||||
*
|
||||
* XXX this function is completely buggered vs RCU and tracing.
|
||||
*/
|
||||
static void amd_e400_idle(void)
|
||||
{
|
||||
|
@ -757,9 +759,9 @@ static void amd_e400_idle(void)
|
|||
* The switch back from broadcast mode needs to be called with
|
||||
* interrupts disabled.
|
||||
*/
|
||||
local_irq_disable();
|
||||
raw_local_irq_disable();
|
||||
tick_broadcast_exit();
|
||||
local_irq_enable();
|
||||
raw_local_irq_enable();
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -801,9 +803,9 @@ static __cpuidle void mwait_idle(void)
|
|||
if (!need_resched())
|
||||
__sti_mwait(0, 0);
|
||||
else
|
||||
local_irq_enable();
|
||||
raw_local_irq_enable();
|
||||
} else {
|
||||
local_irq_enable();
|
||||
raw_local_irq_enable();
|
||||
}
|
||||
__current_clr_polling();
|
||||
}
|
||||
|
|
|
@ -514,13 +514,10 @@ int tboot_force_iommu(void)
|
|||
if (!tboot_enabled())
|
||||
return 0;
|
||||
|
||||
if (no_iommu || swiotlb || dmar_disabled)
|
||||
if (no_iommu || dmar_disabled)
|
||||
pr_warn("Forcing Intel-IOMMU to enabled\n");
|
||||
|
||||
dmar_disabled = 0;
|
||||
#ifdef CONFIG_SWIOTLB
|
||||
swiotlb = 0;
|
||||
#endif
|
||||
no_iommu = 0;
|
||||
|
||||
return 1;
|
||||
|
|
|
@ -40,29 +40,10 @@ static int pending_userspace_extint(struct kvm_vcpu *v)
|
|||
* check if there is pending interrupt from
|
||||
* non-APIC source without intack.
|
||||
*/
|
||||
static int kvm_cpu_has_extint(struct kvm_vcpu *v)
|
||||
{
|
||||
u8 accept = kvm_apic_accept_pic_intr(v);
|
||||
|
||||
if (accept) {
|
||||
if (irqchip_split(v->kvm))
|
||||
return pending_userspace_extint(v);
|
||||
else
|
||||
return v->kvm->arch.vpic->output;
|
||||
} else
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* check if there is injectable interrupt:
|
||||
* when virtual interrupt delivery enabled,
|
||||
* interrupt from apic will handled by hardware,
|
||||
* we don't need to check it here.
|
||||
*/
|
||||
int kvm_cpu_has_injectable_intr(struct kvm_vcpu *v)
|
||||
int kvm_cpu_has_extint(struct kvm_vcpu *v)
|
||||
{
|
||||
/*
|
||||
* FIXME: interrupt.injected represents an interrupt that it's
|
||||
* FIXME: interrupt.injected represents an interrupt whose
|
||||
* side-effects have already been applied (e.g. bit from IRR
|
||||
* already moved to ISR). Therefore, it is incorrect to rely
|
||||
* on interrupt.injected to know if there is a pending
|
||||
|
@ -75,6 +56,23 @@ int kvm_cpu_has_injectable_intr(struct kvm_vcpu *v)
|
|||
if (!lapic_in_kernel(v))
|
||||
return v->arch.interrupt.injected;
|
||||
|
||||
if (!kvm_apic_accept_pic_intr(v))
|
||||
return 0;
|
||||
|
||||
if (irqchip_split(v->kvm))
|
||||
return pending_userspace_extint(v);
|
||||
else
|
||||
return v->kvm->arch.vpic->output;
|
||||
}
|
||||
|
||||
/*
|
||||
* check if there is injectable interrupt:
|
||||
* when virtual interrupt delivery enabled,
|
||||
* interrupt from apic will handled by hardware,
|
||||
* we don't need to check it here.
|
||||
*/
|
||||
int kvm_cpu_has_injectable_intr(struct kvm_vcpu *v)
|
||||
{
|
||||
if (kvm_cpu_has_extint(v))
|
||||
return 1;
|
||||
|
||||
|
@ -91,20 +89,6 @@ EXPORT_SYMBOL_GPL(kvm_cpu_has_injectable_intr);
|
|||
*/
|
||||
int kvm_cpu_has_interrupt(struct kvm_vcpu *v)
|
||||
{
|
||||
/*
|
||||
* FIXME: interrupt.injected represents an interrupt that it's
|
||||
* side-effects have already been applied (e.g. bit from IRR
|
||||
* already moved to ISR). Therefore, it is incorrect to rely
|
||||
* on interrupt.injected to know if there is a pending
|
||||
* interrupt in the user-mode LAPIC.
|
||||
* This leads to nVMX/nSVM not be able to distinguish
|
||||
* if it should exit from L2 to L1 on EXTERNAL_INTERRUPT on
|
||||
* pending interrupt or should re-inject an injected
|
||||
* interrupt.
|
||||
*/
|
||||
if (!lapic_in_kernel(v))
|
||||
return v->arch.interrupt.injected;
|
||||
|
||||
if (kvm_cpu_has_extint(v))
|
||||
return 1;
|
||||
|
||||
|
@ -118,16 +102,21 @@ EXPORT_SYMBOL_GPL(kvm_cpu_has_interrupt);
|
|||
*/
|
||||
static int kvm_cpu_get_extint(struct kvm_vcpu *v)
|
||||
{
|
||||
if (kvm_cpu_has_extint(v)) {
|
||||
if (irqchip_split(v->kvm)) {
|
||||
int vector = v->arch.pending_external_vector;
|
||||
|
||||
v->arch.pending_external_vector = -1;
|
||||
return vector;
|
||||
} else
|
||||
return kvm_pic_read_irq(v->kvm); /* PIC */
|
||||
} else
|
||||
if (!kvm_cpu_has_extint(v)) {
|
||||
WARN_ON(!lapic_in_kernel(v));
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!lapic_in_kernel(v))
|
||||
return v->arch.interrupt.nr;
|
||||
|
||||
if (irqchip_split(v->kvm)) {
|
||||
int vector = v->arch.pending_external_vector;
|
||||
|
||||
v->arch.pending_external_vector = -1;
|
||||
return vector;
|
||||
} else
|
||||
return kvm_pic_read_irq(v->kvm); /* PIC */
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -135,13 +124,7 @@ static int kvm_cpu_get_extint(struct kvm_vcpu *v)
|
|||
*/
|
||||
int kvm_cpu_get_interrupt(struct kvm_vcpu *v)
|
||||
{
|
||||
int vector;
|
||||
|
||||
if (!lapic_in_kernel(v))
|
||||
return v->arch.interrupt.nr;
|
||||
|
||||
vector = kvm_cpu_get_extint(v);
|
||||
|
||||
int vector = kvm_cpu_get_extint(v);
|
||||
if (vector != -1)
|
||||
return vector; /* PIC */
|
||||
|
||||
|
|
|
@ -2465,7 +2465,7 @@ int kvm_apic_has_interrupt(struct kvm_vcpu *vcpu)
|
|||
struct kvm_lapic *apic = vcpu->arch.apic;
|
||||
u32 ppr;
|
||||
|
||||
if (!kvm_apic_hw_enabled(apic))
|
||||
if (!kvm_apic_present(vcpu))
|
||||
return -1;
|
||||
|
||||
__apic_update_ppr(apic, &ppr);
|
||||
|
|
|
@ -3517,7 +3517,7 @@ static bool get_mmio_spte(struct kvm_vcpu *vcpu, u64 addr, u64 *sptep)
|
|||
{
|
||||
u64 sptes[PT64_ROOT_MAX_LEVEL];
|
||||
struct rsvd_bits_validate *rsvd_check;
|
||||
int root = vcpu->arch.mmu->root_level;
|
||||
int root = vcpu->arch.mmu->shadow_root_level;
|
||||
int leaf;
|
||||
int level;
|
||||
bool reserved = false;
|
||||
|
|
|
@ -642,8 +642,8 @@ static int __sev_dbg_decrypt(struct kvm *kvm, unsigned long src_paddr,
|
|||
* Its safe to read more than we are asked, caller should ensure that
|
||||
* destination has enough space.
|
||||
*/
|
||||
src_paddr = round_down(src_paddr, 16);
|
||||
offset = src_paddr & 15;
|
||||
src_paddr = round_down(src_paddr, 16);
|
||||
sz = round_up(sz + offset, 16);
|
||||
|
||||
return __sev_issue_dbg_cmd(kvm, src_paddr, dst_paddr, sz, err, false);
|
||||
|
|
|
@ -1309,8 +1309,10 @@ static int svm_create_vcpu(struct kvm_vcpu *vcpu)
|
|||
svm->avic_is_running = true;
|
||||
|
||||
svm->msrpm = svm_vcpu_alloc_msrpm();
|
||||
if (!svm->msrpm)
|
||||
if (!svm->msrpm) {
|
||||
err = -ENOMEM;
|
||||
goto error_free_vmcb_page;
|
||||
}
|
||||
|
||||
svm_vcpu_init_msrpm(vcpu, svm->msrpm);
|
||||
|
||||
|
|
|
@ -4051,21 +4051,23 @@ static int kvm_vcpu_ioctl_set_lapic(struct kvm_vcpu *vcpu,
|
|||
|
||||
static int kvm_cpu_accept_dm_intr(struct kvm_vcpu *vcpu)
|
||||
{
|
||||
/*
|
||||
* We can accept userspace's request for interrupt injection
|
||||
* as long as we have a place to store the interrupt number.
|
||||
* The actual injection will happen when the CPU is able to
|
||||
* deliver the interrupt.
|
||||
*/
|
||||
if (kvm_cpu_has_extint(vcpu))
|
||||
return false;
|
||||
|
||||
/* Acknowledging ExtINT does not happen if LINT0 is masked. */
|
||||
return (!lapic_in_kernel(vcpu) ||
|
||||
kvm_apic_accept_pic_intr(vcpu));
|
||||
}
|
||||
|
||||
/*
|
||||
* if userspace requested an interrupt window, check that the
|
||||
* interrupt window is open.
|
||||
*
|
||||
* No need to exit to userspace if we already have an interrupt queued.
|
||||
*/
|
||||
static int kvm_vcpu_ready_for_interrupt_injection(struct kvm_vcpu *vcpu)
|
||||
{
|
||||
return kvm_arch_interrupt_allowed(vcpu) &&
|
||||
!kvm_cpu_has_interrupt(vcpu) &&
|
||||
!kvm_event_needs_reinjection(vcpu) &&
|
||||
kvm_cpu_accept_dm_intr(vcpu);
|
||||
}
|
||||
|
||||
|
|
|
@ -103,6 +103,13 @@ int blk_ksm_init(struct blk_keyslot_manager *ksm, unsigned int num_slots)
|
|||
spin_lock_init(&ksm->idle_slots_lock);
|
||||
|
||||
slot_hashtable_size = roundup_pow_of_two(num_slots);
|
||||
/*
|
||||
* hash_ptr() assumes bits != 0, so ensure the hash table has at least 2
|
||||
* buckets. This only makes a difference when there is only 1 keyslot.
|
||||
*/
|
||||
if (slot_hashtable_size < 2)
|
||||
slot_hashtable_size = 2;
|
||||
|
||||
ksm->log_slot_ht_size = ilog2(slot_hashtable_size);
|
||||
ksm->slot_hashtable = kvmalloc_array(slot_hashtable_size,
|
||||
sizeof(ksm->slot_hashtable[0]),
|
||||
|
|
|
@ -44,7 +44,7 @@ static DEFINE_SPINLOCK(iort_fwnode_lock);
|
|||
* iort_set_fwnode() - Create iort_fwnode and use it to register
|
||||
* iommu data in the iort_fwnode_list
|
||||
*
|
||||
* @node: IORT table node associated with the IOMMU
|
||||
* @iort_node: IORT table node associated with the IOMMU
|
||||
* @fwnode: fwnode associated with the IORT node
|
||||
*
|
||||
* Returns: 0 on success
|
||||
|
@ -673,7 +673,8 @@ static int iort_dev_find_its_id(struct device *dev, u32 id,
|
|||
/**
|
||||
* iort_get_device_domain() - Find MSI domain related to a device
|
||||
* @dev: The device.
|
||||
* @req_id: Requester ID for the device.
|
||||
* @id: Requester ID for the device.
|
||||
* @bus_token: irq domain bus token.
|
||||
*
|
||||
* Returns: the MSI domain for this device, NULL otherwise
|
||||
*/
|
||||
|
@ -1136,7 +1137,7 @@ static int rc_dma_get_range(struct device *dev, u64 *size)
|
|||
*
|
||||
* @dev: device to configure
|
||||
* @dma_addr: device DMA address result pointer
|
||||
* @size: DMA range size result pointer
|
||||
* @dma_size: DMA range size result pointer
|
||||
*/
|
||||
void iort_dma_setup(struct device *dev, u64 *dma_addr, u64 *dma_size)
|
||||
{
|
||||
|
@ -1526,6 +1527,7 @@ static __init const struct iort_dev_config *iort_get_dev_cfg(
|
|||
/**
|
||||
* iort_add_platform_device() - Allocate a platform device for IORT node
|
||||
* @node: Pointer to device ACPI IORT node
|
||||
* @ops: Pointer to IORT device config struct
|
||||
*
|
||||
* Returns: 0 on success, <0 failure
|
||||
*/
|
||||
|
|
|
@ -227,6 +227,9 @@ static int sysc_wait_softreset(struct sysc *ddata)
|
|||
u32 sysc_mask, syss_done, rstval;
|
||||
int syss_offset, error = 0;
|
||||
|
||||
if (ddata->cap->regbits->srst_shift < 0)
|
||||
return 0;
|
||||
|
||||
syss_offset = ddata->offsets[SYSC_SYSSTATUS];
|
||||
sysc_mask = BIT(ddata->cap->regbits->srst_shift);
|
||||
|
||||
|
@ -970,9 +973,15 @@ static int sysc_enable_module(struct device *dev)
|
|||
return error;
|
||||
}
|
||||
}
|
||||
error = sysc_wait_softreset(ddata);
|
||||
if (error)
|
||||
dev_warn(ddata->dev, "OCP softreset timed out\n");
|
||||
/*
|
||||
* Some modules like i2c and hdq1w have unusable reset status unless
|
||||
* the module reset quirk is enabled. Skip status check on enable.
|
||||
*/
|
||||
if (!(ddata->cfg.quirks & SYSC_MODULE_QUIRK_ENA_RESETDONE)) {
|
||||
error = sysc_wait_softreset(ddata);
|
||||
if (error)
|
||||
dev_warn(ddata->dev, "OCP softreset timed out\n");
|
||||
}
|
||||
if (ddata->cfg.quirks & SYSC_QUIRK_OPT_CLKS_IN_RESET)
|
||||
sysc_disable_opt_clocks(ddata);
|
||||
|
||||
|
@ -1373,17 +1382,17 @@ static const struct sysc_revision_quirk sysc_revision_quirks[] = {
|
|||
SYSC_QUIRK("hdmi", 0, 0, 0x10, -ENODEV, 0x50030200, 0xffffffff,
|
||||
SYSC_QUIRK_OPT_CLKS_NEEDED),
|
||||
SYSC_QUIRK("hdq1w", 0, 0, 0x14, 0x18, 0x00000006, 0xffffffff,
|
||||
SYSC_MODULE_QUIRK_HDQ1W),
|
||||
SYSC_MODULE_QUIRK_HDQ1W | SYSC_MODULE_QUIRK_ENA_RESETDONE),
|
||||
SYSC_QUIRK("hdq1w", 0, 0, 0x14, 0x18, 0x0000000a, 0xffffffff,
|
||||
SYSC_MODULE_QUIRK_HDQ1W),
|
||||
SYSC_MODULE_QUIRK_HDQ1W | SYSC_MODULE_QUIRK_ENA_RESETDONE),
|
||||
SYSC_QUIRK("i2c", 0, 0, 0x20, 0x10, 0x00000036, 0x000000ff,
|
||||
SYSC_MODULE_QUIRK_I2C),
|
||||
SYSC_MODULE_QUIRK_I2C | SYSC_MODULE_QUIRK_ENA_RESETDONE),
|
||||
SYSC_QUIRK("i2c", 0, 0, 0x20, 0x10, 0x0000003c, 0x000000ff,
|
||||
SYSC_MODULE_QUIRK_I2C),
|
||||
SYSC_MODULE_QUIRK_I2C | SYSC_MODULE_QUIRK_ENA_RESETDONE),
|
||||
SYSC_QUIRK("i2c", 0, 0, 0x20, 0x10, 0x00000040, 0x000000ff,
|
||||
SYSC_MODULE_QUIRK_I2C),
|
||||
SYSC_MODULE_QUIRK_I2C | SYSC_MODULE_QUIRK_ENA_RESETDONE),
|
||||
SYSC_QUIRK("i2c", 0, 0, 0x10, 0x90, 0x5040000a, 0xfffff0f0,
|
||||
SYSC_MODULE_QUIRK_I2C),
|
||||
SYSC_MODULE_QUIRK_I2C | SYSC_MODULE_QUIRK_ENA_RESETDONE),
|
||||
SYSC_QUIRK("gpu", 0x50000000, 0x14, -ENODEV, -ENODEV, 0x00010201, 0xffffffff, 0),
|
||||
SYSC_QUIRK("gpu", 0x50000000, 0xfe00, 0xfe10, -ENODEV, 0x40000000 , 0xffffffff,
|
||||
SYSC_MODULE_QUIRK_SGX),
|
||||
|
@ -2880,7 +2889,7 @@ static int sysc_check_active_timer(struct sysc *ddata)
|
|||
|
||||
if ((ddata->cfg.quirks & SYSC_QUIRK_NO_RESET_ON_INIT) &&
|
||||
(ddata->cfg.quirks & SYSC_QUIRK_NO_IDLE))
|
||||
return -EBUSY;
|
||||
return -ENXIO;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -236,13 +236,15 @@ static int scmi_cpufreq_probe(struct scmi_device *sdev)
|
|||
if (!handle || !handle->perf_ops)
|
||||
return -ENODEV;
|
||||
|
||||
#ifdef CONFIG_COMMON_CLK
|
||||
/* dummy clock provider as needed by OPP if clocks property is used */
|
||||
if (of_find_property(dev->of_node, "#clock-cells", NULL))
|
||||
devm_of_clk_add_hw_provider(dev, of_clk_hw_simple_get, NULL);
|
||||
#endif
|
||||
|
||||
ret = cpufreq_register_driver(&scmi_cpufreq_driver);
|
||||
if (ret) {
|
||||
dev_err(&sdev->dev, "%s: registering cpufreq failed, err: %d\n",
|
||||
dev_err(dev, "%s: registering cpufreq failed, err: %d\n",
|
||||
__func__, ret);
|
||||
}
|
||||
|
||||
|
|
|
@ -270,7 +270,7 @@ config EFI_DEV_PATH_PARSER
|
|||
|
||||
config EFI_EARLYCON
|
||||
def_bool y
|
||||
depends on SERIAL_EARLYCON && !ARM && !IA64
|
||||
depends on EFI && SERIAL_EARLYCON && !ARM && !IA64
|
||||
select FONT_SUPPORT
|
||||
select ARCH_USE_MEMREMAP_PROT
|
||||
|
||||
|
|
|
@ -390,10 +390,10 @@ static int __init efisubsys_init(void)
|
|||
|
||||
if (efi_rt_services_supported(EFI_RT_SUPPORTED_GET_VARIABLE |
|
||||
EFI_RT_SUPPORTED_GET_NEXT_VARIABLE_NAME)) {
|
||||
efivar_ssdt_load();
|
||||
error = generic_ops_register();
|
||||
if (error)
|
||||
goto err_put;
|
||||
efivar_ssdt_load();
|
||||
platform_device_register_simple("efivars", 0, NULL, 0);
|
||||
}
|
||||
|
||||
|
|
|
@ -20,12 +20,28 @@
|
|||
#include <linux/of_platform.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/uaccess.h>
|
||||
#include <linux/hashtable.h>
|
||||
|
||||
#include <linux/firmware/xlnx-zynqmp.h>
|
||||
#include "zynqmp-debug.h"
|
||||
|
||||
/* Max HashMap Order for PM API feature check (1<<7 = 128) */
|
||||
#define PM_API_FEATURE_CHECK_MAX_ORDER 7
|
||||
|
||||
static bool feature_check_enabled;
|
||||
static u32 zynqmp_pm_features[PM_API_MAX];
|
||||
DEFINE_HASHTABLE(pm_api_features_map, PM_API_FEATURE_CHECK_MAX_ORDER);
|
||||
|
||||
/**
|
||||
* struct pm_api_feature_data - PM API Feature data
|
||||
* @pm_api_id: PM API Id, used as key to index into hashmap
|
||||
* @feature_status: status of PM API feature: valid, invalid
|
||||
* @hentry: hlist_node that hooks this entry into hashtable
|
||||
*/
|
||||
struct pm_api_feature_data {
|
||||
u32 pm_api_id;
|
||||
int feature_status;
|
||||
struct hlist_node hentry;
|
||||
};
|
||||
|
||||
static const struct mfd_cell firmware_devs[] = {
|
||||
{
|
||||
|
@ -142,29 +158,37 @@ static int zynqmp_pm_feature(u32 api_id)
|
|||
int ret;
|
||||
u32 ret_payload[PAYLOAD_ARG_CNT];
|
||||
u64 smc_arg[2];
|
||||
struct pm_api_feature_data *feature_data;
|
||||
|
||||
if (!feature_check_enabled)
|
||||
return 0;
|
||||
|
||||
/* Return value if feature is already checked */
|
||||
if (api_id > ARRAY_SIZE(zynqmp_pm_features))
|
||||
return PM_FEATURE_INVALID;
|
||||
/* Check for existing entry in hash table for given api */
|
||||
hash_for_each_possible(pm_api_features_map, feature_data, hentry,
|
||||
api_id) {
|
||||
if (feature_data->pm_api_id == api_id)
|
||||
return feature_data->feature_status;
|
||||
}
|
||||
|
||||
if (zynqmp_pm_features[api_id] != PM_FEATURE_UNCHECKED)
|
||||
return zynqmp_pm_features[api_id];
|
||||
/* Add new entry if not present */
|
||||
feature_data = kmalloc(sizeof(*feature_data), GFP_KERNEL);
|
||||
if (!feature_data)
|
||||
return -ENOMEM;
|
||||
|
||||
feature_data->pm_api_id = api_id;
|
||||
smc_arg[0] = PM_SIP_SVC | PM_FEATURE_CHECK;
|
||||
smc_arg[1] = api_id;
|
||||
|
||||
ret = do_fw_call(smc_arg[0], smc_arg[1], 0, ret_payload);
|
||||
if (ret) {
|
||||
zynqmp_pm_features[api_id] = PM_FEATURE_INVALID;
|
||||
return PM_FEATURE_INVALID;
|
||||
}
|
||||
if (ret)
|
||||
ret = -EOPNOTSUPP;
|
||||
else
|
||||
ret = ret_payload[1];
|
||||
|
||||
zynqmp_pm_features[api_id] = ret_payload[1];
|
||||
feature_data->feature_status = ret;
|
||||
hash_add(pm_api_features_map, &feature_data->hentry, api_id);
|
||||
|
||||
return zynqmp_pm_features[api_id];
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -200,9 +224,12 @@ int zynqmp_pm_invoke_fn(u32 pm_api_id, u32 arg0, u32 arg1,
|
|||
* Make sure to stay in x0 register
|
||||
*/
|
||||
u64 smc_arg[4];
|
||||
int ret;
|
||||
|
||||
if (zynqmp_pm_feature(pm_api_id) == PM_FEATURE_INVALID)
|
||||
return -ENOTSUPP;
|
||||
/* Check if feature is supported or not */
|
||||
ret = zynqmp_pm_feature(pm_api_id);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
smc_arg[0] = PM_SIP_SVC | pm_api_id;
|
||||
smc_arg[1] = ((u64)arg1 << 32) | arg0;
|
||||
|
@ -615,7 +642,7 @@ EXPORT_SYMBOL_GPL(zynqmp_pm_set_sd_tapdelay);
|
|||
*/
|
||||
int zynqmp_pm_sd_dll_reset(u32 node_id, u32 type)
|
||||
{
|
||||
return zynqmp_pm_invoke_fn(PM_IOCTL, node_id, IOCTL_SET_SD_TAPDELAY,
|
||||
return zynqmp_pm_invoke_fn(PM_IOCTL, node_id, IOCTL_SD_DLL_RESET,
|
||||
type, 0, NULL);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(zynqmp_pm_sd_dll_reset);
|
||||
|
@ -1252,9 +1279,17 @@ static int zynqmp_firmware_probe(struct platform_device *pdev)
|
|||
|
||||
static int zynqmp_firmware_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct pm_api_feature_data *feature_data;
|
||||
int i;
|
||||
|
||||
mfd_remove_devices(&pdev->dev);
|
||||
zynqmp_pm_api_debugfs_exit();
|
||||
|
||||
hash_for_each(pm_api_features_map, i, feature_data, hentry) {
|
||||
hash_del(&feature_data->hentry);
|
||||
kfree(feature_data);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -4852,7 +4852,7 @@ int amdgpu_device_baco_enter(struct drm_device *dev)
|
|||
if (!amdgpu_device_supports_baco(adev_to_drm(adev)))
|
||||
return -ENOTSUPP;
|
||||
|
||||
if (ras && ras->supported)
|
||||
if (ras && ras->supported && adev->nbio.funcs->enable_doorbell_interrupt)
|
||||
adev->nbio.funcs->enable_doorbell_interrupt(adev, false);
|
||||
|
||||
return amdgpu_dpm_baco_enter(adev);
|
||||
|
@ -4871,7 +4871,7 @@ int amdgpu_device_baco_exit(struct drm_device *dev)
|
|||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (ras && ras->supported)
|
||||
if (ras && ras->supported && adev->nbio.funcs->enable_doorbell_interrupt)
|
||||
adev->nbio.funcs->enable_doorbell_interrupt(adev, true);
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -69,10 +69,10 @@ static int amdgpu_ttm_backend_bind(struct ttm_bo_device *bdev,
|
|||
|
||||
static int amdgpu_ttm_init_on_chip(struct amdgpu_device *adev,
|
||||
unsigned int type,
|
||||
uint64_t size)
|
||||
uint64_t size_in_page)
|
||||
{
|
||||
return ttm_range_man_init(&adev->mman.bdev, type,
|
||||
false, size >> PAGE_SHIFT);
|
||||
false, size_in_page);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -67,6 +67,7 @@ struct amdgpu_uvd {
|
|||
unsigned harvest_config;
|
||||
/* store image width to adjust nb memory state */
|
||||
unsigned decode_image_width;
|
||||
uint32_t keyselect;
|
||||
};
|
||||
|
||||
int amdgpu_uvd_sw_init(struct amdgpu_device *adev);
|
||||
|
|
|
@ -3105,6 +3105,8 @@ static const struct soc15_reg_golden golden_settings_gc_10_3[] =
|
|||
SOC15_REG_GOLDEN_VALUE(GC, 0, mmDB_DEBUG3, 0xffffffff, 0x00000280),
|
||||
SOC15_REG_GOLDEN_VALUE(GC, 0, mmDB_DEBUG4, 0xffffffff, 0x00800000),
|
||||
SOC15_REG_GOLDEN_VALUE(GC, 0, mmDB_EXCEPTION_CONTROL, 0x7fff0f1f, 0x00b80000),
|
||||
SOC15_REG_GOLDEN_VALUE(GC, 0 ,mmGCEA_SDP_TAG_RESERVE0, 0xffffffff, 0x10100100),
|
||||
SOC15_REG_GOLDEN_VALUE(GC, 0, mmGCEA_SDP_TAG_RESERVE1, 0xffffffff, 0x17000088),
|
||||
SOC15_REG_GOLDEN_VALUE(GC, 0, mmGCR_GENERAL_CNTL_Sienna_Cichlid, 0x1ff1ffff, 0x00000500),
|
||||
SOC15_REG_GOLDEN_VALUE(GC, 0, mmGE_PC_CNTL, 0x003fffff, 0x00280400),
|
||||
SOC15_REG_GOLDEN_VALUE(GC, 0, mmGL2A_ADDR_MATCH_MASK, 0xffffffff, 0xffffffcf),
|
||||
|
|
|
@ -277,15 +277,8 @@ static void uvd_v3_1_mc_resume(struct amdgpu_device *adev)
|
|||
*/
|
||||
static int uvd_v3_1_fw_validate(struct amdgpu_device *adev)
|
||||
{
|
||||
void *ptr;
|
||||
uint32_t ucode_len, i;
|
||||
uint32_t keysel;
|
||||
|
||||
ptr = adev->uvd.inst[0].cpu_addr;
|
||||
ptr += 192 + 16;
|
||||
memcpy(&ucode_len, ptr, 4);
|
||||
ptr += ucode_len;
|
||||
memcpy(&keysel, ptr, 4);
|
||||
int i;
|
||||
uint32_t keysel = adev->uvd.keyselect;
|
||||
|
||||
WREG32(mmUVD_FW_START, keysel);
|
||||
|
||||
|
@ -550,6 +543,8 @@ static int uvd_v3_1_sw_init(void *handle)
|
|||
struct amdgpu_ring *ring;
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
int r;
|
||||
void *ptr;
|
||||
uint32_t ucode_len;
|
||||
|
||||
/* UVD TRAP */
|
||||
r = amdgpu_irq_add_id(adev, AMDGPU_IRQ_CLIENTID_LEGACY, 124, &adev->uvd.inst->irq);
|
||||
|
@ -571,6 +566,13 @@ static int uvd_v3_1_sw_init(void *handle)
|
|||
if (r)
|
||||
return r;
|
||||
|
||||
/* Retrieval firmware validate key */
|
||||
ptr = adev->uvd.inst[0].cpu_addr;
|
||||
ptr += 192 + 16;
|
||||
memcpy(&ucode_len, ptr, 4);
|
||||
ptr += ucode_len;
|
||||
memcpy(&adev->uvd.keyselect, ptr, 4);
|
||||
|
||||
r = amdgpu_uvd_entity_init(adev);
|
||||
|
||||
return r;
|
||||
|
|
|
@ -1041,7 +1041,7 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
|
|||
amdgpu_dm_init_color_mod();
|
||||
|
||||
#ifdef CONFIG_DRM_AMD_DC_HDCP
|
||||
if (adev->asic_type >= CHIP_RAVEN) {
|
||||
if (adev->dm.dc->caps.max_links > 0 && adev->asic_type >= CHIP_RAVEN) {
|
||||
adev->dm.hdcp_workqueue = hdcp_create_workqueue(adev, &init_params.cp_psp, adev->dm.dc);
|
||||
|
||||
if (!adev->dm.hdcp_workqueue)
|
||||
|
|
|
@ -742,7 +742,6 @@ static void ast_crtc_dpms(struct drm_crtc *crtc, int mode)
|
|||
case DRM_MODE_DPMS_SUSPEND:
|
||||
if (ast->tx_chip_type == AST_TX_DP501)
|
||||
ast_set_dp501_video_output(crtc->dev, 1);
|
||||
ast_crtc_load_lut(ast, crtc);
|
||||
break;
|
||||
case DRM_MODE_DPMS_OFF:
|
||||
if (ast->tx_chip_type == AST_TX_DP501)
|
||||
|
@ -777,6 +776,21 @@ static int ast_crtc_helper_atomic_check(struct drm_crtc *crtc,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
ast_crtc_helper_atomic_flush(struct drm_crtc *crtc, struct drm_crtc_state *old_crtc_state)
|
||||
{
|
||||
struct ast_private *ast = to_ast_private(crtc->dev);
|
||||
struct ast_crtc_state *ast_crtc_state = to_ast_crtc_state(crtc->state);
|
||||
struct ast_crtc_state *old_ast_crtc_state = to_ast_crtc_state(old_crtc_state);
|
||||
|
||||
/*
|
||||
* The gamma LUT has to be reloaded after changing the primary
|
||||
* plane's color format.
|
||||
*/
|
||||
if (old_ast_crtc_state->format != ast_crtc_state->format)
|
||||
ast_crtc_load_lut(ast, crtc);
|
||||
}
|
||||
|
||||
static void
|
||||
ast_crtc_helper_atomic_enable(struct drm_crtc *crtc,
|
||||
struct drm_crtc_state *old_crtc_state)
|
||||
|
@ -830,6 +844,7 @@ ast_crtc_helper_atomic_disable(struct drm_crtc *crtc,
|
|||
|
||||
static const struct drm_crtc_helper_funcs ast_crtc_helper_funcs = {
|
||||
.atomic_check = ast_crtc_helper_atomic_check,
|
||||
.atomic_flush = ast_crtc_helper_atomic_flush,
|
||||
.atomic_enable = ast_crtc_helper_atomic_enable,
|
||||
.atomic_disable = ast_crtc_helper_atomic_disable,
|
||||
};
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
config DRM_EXYNOS
|
||||
tristate "DRM Support for Samsung SoC Exynos Series"
|
||||
depends on OF && DRM && (ARCH_S3C64XX || ARCH_S5PV210 || ARCH_EXYNOS || ARCH_MULTIPLATFORM || COMPILE_TEST)
|
||||
depends on OF && DRM && COMMON_CLK
|
||||
depends on ARCH_S3C64XX || ARCH_S5PV210 || ARCH_EXYNOS || ARCH_MULTIPLATFORM || COMPILE_TEST
|
||||
depends on MMU
|
||||
select DRM_KMS_HELPER
|
||||
select VIDEOMODE_HELPERS
|
||||
|
|
|
@ -30,18 +30,21 @@
|
|||
#include "i915_trace.h"
|
||||
#include "intel_breadcrumbs.h"
|
||||
#include "intel_context.h"
|
||||
#include "intel_engine_pm.h"
|
||||
#include "intel_gt_pm.h"
|
||||
#include "intel_gt_requests.h"
|
||||
|
||||
static void irq_enable(struct intel_engine_cs *engine)
|
||||
static bool irq_enable(struct intel_engine_cs *engine)
|
||||
{
|
||||
if (!engine->irq_enable)
|
||||
return;
|
||||
return false;
|
||||
|
||||
/* Caller disables interrupts */
|
||||
spin_lock(&engine->gt->irq_lock);
|
||||
engine->irq_enable(engine);
|
||||
spin_unlock(&engine->gt->irq_lock);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static void irq_disable(struct intel_engine_cs *engine)
|
||||
|
@ -57,12 +60,11 @@ static void irq_disable(struct intel_engine_cs *engine)
|
|||
|
||||
static void __intel_breadcrumbs_arm_irq(struct intel_breadcrumbs *b)
|
||||
{
|
||||
lockdep_assert_held(&b->irq_lock);
|
||||
|
||||
if (!b->irq_engine || b->irq_armed)
|
||||
return;
|
||||
|
||||
if (!intel_gt_pm_get_if_awake(b->irq_engine->gt))
|
||||
/*
|
||||
* Since we are waiting on a request, the GPU should be busy
|
||||
* and should have its own rpm reference.
|
||||
*/
|
||||
if (GEM_WARN_ON(!intel_gt_pm_get_if_awake(b->irq_engine->gt)))
|
||||
return;
|
||||
|
||||
/*
|
||||
|
@ -73,25 +75,24 @@ static void __intel_breadcrumbs_arm_irq(struct intel_breadcrumbs *b)
|
|||
*/
|
||||
WRITE_ONCE(b->irq_armed, true);
|
||||
|
||||
/*
|
||||
* Since we are waiting on a request, the GPU should be busy
|
||||
* and should have its own rpm reference. This is tracked
|
||||
* by i915->gt.awake, we can forgo holding our own wakref
|
||||
* for the interrupt as before i915->gt.awake is released (when
|
||||
* the driver is idle) we disarm the breadcrumbs.
|
||||
*/
|
||||
/* Requests may have completed before we could enable the interrupt. */
|
||||
if (!b->irq_enabled++ && irq_enable(b->irq_engine))
|
||||
irq_work_queue(&b->irq_work);
|
||||
}
|
||||
|
||||
if (!b->irq_enabled++)
|
||||
irq_enable(b->irq_engine);
|
||||
static void intel_breadcrumbs_arm_irq(struct intel_breadcrumbs *b)
|
||||
{
|
||||
if (!b->irq_engine)
|
||||
return;
|
||||
|
||||
spin_lock(&b->irq_lock);
|
||||
if (!b->irq_armed)
|
||||
__intel_breadcrumbs_arm_irq(b);
|
||||
spin_unlock(&b->irq_lock);
|
||||
}
|
||||
|
||||
static void __intel_breadcrumbs_disarm_irq(struct intel_breadcrumbs *b)
|
||||
{
|
||||
lockdep_assert_held(&b->irq_lock);
|
||||
|
||||
if (!b->irq_engine || !b->irq_armed)
|
||||
return;
|
||||
|
||||
GEM_BUG_ON(!b->irq_enabled);
|
||||
if (!--b->irq_enabled)
|
||||
irq_disable(b->irq_engine);
|
||||
|
@ -105,8 +106,6 @@ static void add_signaling_context(struct intel_breadcrumbs *b,
|
|||
{
|
||||
intel_context_get(ce);
|
||||
list_add_tail(&ce->signal_link, &b->signalers);
|
||||
if (list_is_first(&ce->signal_link, &b->signalers))
|
||||
__intel_breadcrumbs_arm_irq(b);
|
||||
}
|
||||
|
||||
static void remove_signaling_context(struct intel_breadcrumbs *b,
|
||||
|
@ -174,34 +173,65 @@ static void add_retire(struct intel_breadcrumbs *b, struct intel_timeline *tl)
|
|||
intel_engine_add_retire(b->irq_engine, tl);
|
||||
}
|
||||
|
||||
static bool __signal_request(struct i915_request *rq, struct list_head *signals)
|
||||
static bool __signal_request(struct i915_request *rq)
|
||||
{
|
||||
clear_bit(I915_FENCE_FLAG_SIGNAL, &rq->fence.flags);
|
||||
|
||||
if (!__dma_fence_signal(&rq->fence)) {
|
||||
i915_request_put(rq);
|
||||
return false;
|
||||
}
|
||||
|
||||
list_add_tail(&rq->signal_link, signals);
|
||||
return true;
|
||||
}
|
||||
|
||||
static struct llist_node *
|
||||
slist_add(struct llist_node *node, struct llist_node *head)
|
||||
{
|
||||
node->next = head;
|
||||
return node;
|
||||
}
|
||||
|
||||
static void signal_irq_work(struct irq_work *work)
|
||||
{
|
||||
struct intel_breadcrumbs *b = container_of(work, typeof(*b), irq_work);
|
||||
const ktime_t timestamp = ktime_get();
|
||||
struct llist_node *signal, *sn;
|
||||
struct intel_context *ce, *cn;
|
||||
struct list_head *pos, *next;
|
||||
LIST_HEAD(signal);
|
||||
|
||||
signal = NULL;
|
||||
if (unlikely(!llist_empty(&b->signaled_requests)))
|
||||
signal = llist_del_all(&b->signaled_requests);
|
||||
|
||||
spin_lock(&b->irq_lock);
|
||||
|
||||
if (list_empty(&b->signalers))
|
||||
/*
|
||||
* Keep the irq armed until the interrupt after all listeners are gone.
|
||||
*
|
||||
* Enabling/disabling the interrupt is rather costly, roughly a couple
|
||||
* of hundred microseconds. If we are proactive and enable/disable
|
||||
* the interrupt around every request that wants a breadcrumb, we
|
||||
* quickly drown in the extra orders of magnitude of latency imposed
|
||||
* on request submission.
|
||||
*
|
||||
* So we try to be lazy, and keep the interrupts enabled until no
|
||||
* more listeners appear within a breadcrumb interrupt interval (that
|
||||
* is until a request completes that no one cares about). The
|
||||
* observation is that listeners come in batches, and will often
|
||||
* listen to a bunch of requests in succession. Though note on icl+,
|
||||
* interrupts are always enabled due to concerns with rc6 being
|
||||
* dysfunctional with per-engine interrupt masking.
|
||||
*
|
||||
* We also try to avoid raising too many interrupts, as they may
|
||||
* be generated by userspace batches and it is unfortunately rather
|
||||
* too easy to drown the CPU under a flood of GPU interrupts. Thus
|
||||
* whenever no one appears to be listening, we turn off the interrupts.
|
||||
* Fewer interrupts should conserve power -- at the very least, fewer
|
||||
* interrupt draw less ire from other users of the system and tools
|
||||
* like powertop.
|
||||
*/
|
||||
if (!signal && b->irq_armed && list_empty(&b->signalers))
|
||||
__intel_breadcrumbs_disarm_irq(b);
|
||||
|
||||
list_splice_init(&b->signaled_requests, &signal);
|
||||
|
||||
list_for_each_entry_safe(ce, cn, &b->signalers, signal_link) {
|
||||
GEM_BUG_ON(list_empty(&ce->signals));
|
||||
|
||||
|
@ -218,7 +248,10 @@ static void signal_irq_work(struct irq_work *work)
|
|||
* spinlock as the callback chain may end up adding
|
||||
* more signalers to the same context or engine.
|
||||
*/
|
||||
__signal_request(rq, &signal);
|
||||
clear_bit(I915_FENCE_FLAG_SIGNAL, &rq->fence.flags);
|
||||
if (__signal_request(rq))
|
||||
/* We own signal_node now, xfer to local list */
|
||||
signal = slist_add(&rq->signal_node, signal);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -238,9 +271,9 @@ static void signal_irq_work(struct irq_work *work)
|
|||
|
||||
spin_unlock(&b->irq_lock);
|
||||
|
||||
list_for_each_safe(pos, next, &signal) {
|
||||
llist_for_each_safe(signal, sn, signal) {
|
||||
struct i915_request *rq =
|
||||
list_entry(pos, typeof(*rq), signal_link);
|
||||
llist_entry(signal, typeof(*rq), signal_node);
|
||||
struct list_head cb_list;
|
||||
|
||||
spin_lock(&rq->lock);
|
||||
|
@ -251,6 +284,9 @@ static void signal_irq_work(struct irq_work *work)
|
|||
|
||||
i915_request_put(rq);
|
||||
}
|
||||
|
||||
if (!READ_ONCE(b->irq_armed) && !list_empty(&b->signalers))
|
||||
intel_breadcrumbs_arm_irq(b);
|
||||
}
|
||||
|
||||
struct intel_breadcrumbs *
|
||||
|
@ -264,7 +300,7 @@ intel_breadcrumbs_create(struct intel_engine_cs *irq_engine)
|
|||
|
||||
spin_lock_init(&b->irq_lock);
|
||||
INIT_LIST_HEAD(&b->signalers);
|
||||
INIT_LIST_HEAD(&b->signaled_requests);
|
||||
init_llist_head(&b->signaled_requests);
|
||||
|
||||
init_irq_work(&b->irq_work, signal_irq_work);
|
||||
|
||||
|
@ -292,21 +328,22 @@ void intel_breadcrumbs_reset(struct intel_breadcrumbs *b)
|
|||
|
||||
void intel_breadcrumbs_park(struct intel_breadcrumbs *b)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
||||
if (!READ_ONCE(b->irq_armed))
|
||||
return;
|
||||
|
||||
spin_lock_irqsave(&b->irq_lock, flags);
|
||||
__intel_breadcrumbs_disarm_irq(b);
|
||||
spin_unlock_irqrestore(&b->irq_lock, flags);
|
||||
|
||||
if (!list_empty(&b->signalers))
|
||||
irq_work_queue(&b->irq_work);
|
||||
/* Kick the work once more to drain the signalers */
|
||||
irq_work_sync(&b->irq_work);
|
||||
while (unlikely(READ_ONCE(b->irq_armed))) {
|
||||
local_irq_disable();
|
||||
signal_irq_work(&b->irq_work);
|
||||
local_irq_enable();
|
||||
cond_resched();
|
||||
}
|
||||
GEM_BUG_ON(!list_empty(&b->signalers));
|
||||
}
|
||||
|
||||
void intel_breadcrumbs_free(struct intel_breadcrumbs *b)
|
||||
{
|
||||
irq_work_sync(&b->irq_work);
|
||||
GEM_BUG_ON(!list_empty(&b->signalers));
|
||||
GEM_BUG_ON(b->irq_armed);
|
||||
kfree(b);
|
||||
}
|
||||
|
||||
|
@ -327,7 +364,8 @@ static void insert_breadcrumb(struct i915_request *rq,
|
|||
* its signal completion.
|
||||
*/
|
||||
if (__request_completed(rq)) {
|
||||
if (__signal_request(rq, &b->signaled_requests))
|
||||
if (__signal_request(rq) &&
|
||||
llist_add(&rq->signal_node, &b->signaled_requests))
|
||||
irq_work_queue(&b->irq_work);
|
||||
return;
|
||||
}
|
||||
|
@ -362,9 +400,12 @@ static void insert_breadcrumb(struct i915_request *rq,
|
|||
GEM_BUG_ON(!check_signal_order(ce, rq));
|
||||
set_bit(I915_FENCE_FLAG_SIGNAL, &rq->fence.flags);
|
||||
|
||||
/* Check after attaching to irq, interrupt may have already fired. */
|
||||
if (__request_completed(rq))
|
||||
irq_work_queue(&b->irq_work);
|
||||
/*
|
||||
* Defer enabling the interrupt to after HW submission and recheck
|
||||
* the request as it may have completed and raised the interrupt as
|
||||
* we were attaching it into the lists.
|
||||
*/
|
||||
irq_work_queue(&b->irq_work);
|
||||
}
|
||||
|
||||
bool i915_request_enable_breadcrumb(struct i915_request *rq)
|
||||
|
|
|
@ -35,7 +35,7 @@ struct intel_breadcrumbs {
|
|||
struct intel_engine_cs *irq_engine;
|
||||
|
||||
struct list_head signalers;
|
||||
struct list_head signaled_requests;
|
||||
struct llist_head signaled_requests;
|
||||
|
||||
struct irq_work irq_work; /* for use from inside irq_lock */
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue