Merge 5.8-rc4 into android-mainline
Linux 5.8-rc4 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: Iccdf79fdb94208b33796eca02bb813482e646ab1
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -143,6 +143,9 @@ x509.genkey
|
||||
/allrandom.config
|
||||
/allyes.config
|
||||
|
||||
# Kconfig savedefconfig output
|
||||
/defconfig
|
||||
|
||||
# Kdevelop4
|
||||
*.kdev4
|
||||
|
||||
|
@@ -147,6 +147,14 @@ stable kernels.
|
||||
+----------------+-----------------+-----------------+-----------------------------+
|
||||
| Qualcomm Tech. | Falkor v{1,2} | E1041 | QCOM_FALKOR_ERRATUM_1041 |
|
||||
+----------------+-----------------+-----------------+-----------------------------+
|
||||
| Qualcomm Tech. | Kryo4xx Gold | N/A | ARM64_ERRATUM_1463225 |
|
||||
+----------------+-----------------+-----------------+-----------------------------+
|
||||
| Qualcomm Tech. | Kryo4xx Gold | N/A | ARM64_ERRATUM_1418040 |
|
||||
+----------------+-----------------+-----------------+-----------------------------+
|
||||
| Qualcomm Tech. | Kryo4xx Silver | N/A | ARM64_ERRATUM_1530923 |
|
||||
+----------------+-----------------+-----------------+-----------------------------+
|
||||
| Qualcomm Tech. | Kryo4xx Silver | N/A | ARM64_ERRATUM_1024718 |
|
||||
+----------------+-----------------+-----------------+-----------------------------+
|
||||
+----------------+-----------------+-----------------+-----------------------------+
|
||||
| Fujitsu | A64FX | E#010001 | FUJITSU_ERRATUM_010001 |
|
||||
+----------------+-----------------+-----------------+-----------------------------+
|
||||
|
@@ -61,3 +61,43 @@ test, or an end-to-end test.
|
||||
kernel by installing a production configuration of the kernel on production
|
||||
hardware with a production userspace and then trying to exercise some behavior
|
||||
that depends on interactions between the hardware, the kernel, and userspace.
|
||||
|
||||
KUnit isn't working, what should I do?
|
||||
======================================
|
||||
|
||||
Unfortunately, there are a number of things which can break, but here are some
|
||||
things to try.
|
||||
|
||||
1. Try running ``./tools/testing/kunit/kunit.py run`` with the ``--raw_output``
|
||||
parameter. This might show details or error messages hidden by the kunit_tool
|
||||
parser.
|
||||
2. Instead of running ``kunit.py run``, try running ``kunit.py config``,
|
||||
``kunit.py build``, and ``kunit.py exec`` independently. This can help track
|
||||
down where an issue is occurring. (If you think the parser is at fault, you
|
||||
can run it manually against stdin or a file with ``kunit.py parse``.)
|
||||
3. Running the UML kernel directly can often reveal issues or error messages
|
||||
kunit_tool ignores. This should be as simple as running ``./vmlinux`` after
|
||||
building the UML kernel (e.g., by using ``kunit.py build``). Note that UML
|
||||
has some unusual requirements (such as the host having a tmpfs filesystem
|
||||
mounted), and has had issues in the past when built statically and the host
|
||||
has KASLR enabled. (On older host kernels, you may need to run ``setarch
|
||||
`uname -m` -R ./vmlinux`` to disable KASLR.)
|
||||
4. Make sure the kernel .config has ``CONFIG_KUNIT=y`` and at least one test
|
||||
(e.g. ``CONFIG_KUNIT_EXAMPLE_TEST=y``). kunit_tool will keep its .config
|
||||
around, so you can see what config was used after running ``kunit.py run``.
|
||||
It also preserves any config changes you might make, so you can
|
||||
enable/disable things with ``make ARCH=um menuconfig`` or similar, and then
|
||||
re-run kunit_tool.
|
||||
5. Try to run ``make ARCH=um defconfig`` before running ``kunit.py run``. This
|
||||
may help clean up any residual config items which could be causing problems.
|
||||
6. Finally, try running KUnit outside UML. KUnit and KUnit tests can run be
|
||||
built into any kernel, or can be built as a module and loaded at runtime.
|
||||
Doing so should allow you to determine if UML is causing the issue you're
|
||||
seeing. When tests are built-in, they will execute when the kernel boots, and
|
||||
modules will automatically execute associated tests when loaded. Test results
|
||||
can be collected from ``/sys/kernel/debug/kunit/<test suite>/results``, and
|
||||
can be parsed with ``kunit.py parse``. For more details, see "KUnit on
|
||||
non-UML architectures" in :doc:`usage`.
|
||||
|
||||
If none of the above tricks help, you are always welcome to email any issues to
|
||||
kunit-dev@googlegroups.com.
|
||||
|
@@ -2,7 +2,6 @@
|
||||
DT_DOC_CHECKER ?= dt-doc-validate
|
||||
DT_EXTRACT_EX ?= dt-extract-example
|
||||
DT_MK_SCHEMA ?= dt-mk-schema
|
||||
DT_MK_SCHEMA_USERONLY_FLAG := $(if $(DT_SCHEMA_FILES), -u)
|
||||
|
||||
DT_SCHEMA_MIN_VERSION = 2020.5
|
||||
|
||||
@@ -35,21 +34,40 @@ quiet_cmd_mk_schema = SCHEMA $@
|
||||
|
||||
DT_DOCS = $(shell $(find_cmd) | sed -e 's|^$(srctree)/||')
|
||||
|
||||
DT_SCHEMA_FILES ?= $(DT_DOCS)
|
||||
|
||||
extra-$(CHECK_DT_BINDING) += $(patsubst $(src)/%.yaml,%.example.dts, $(DT_SCHEMA_FILES))
|
||||
extra-$(CHECK_DT_BINDING) += $(patsubst $(src)/%.yaml,%.example.dt.yaml, $(DT_SCHEMA_FILES))
|
||||
extra-$(CHECK_DT_BINDING) += processed-schema-examples.yaml
|
||||
|
||||
override DTC_FLAGS := \
|
||||
-Wno-avoid_unnecessary_addr_size \
|
||||
-Wno-graph_child_address
|
||||
-Wno-graph_child_address \
|
||||
-Wno-interrupt_provider
|
||||
|
||||
$(obj)/processed-schema-examples.yaml: $(DT_DOCS) check_dtschema_version FORCE
|
||||
$(call if_changed,mk_schema)
|
||||
|
||||
$(obj)/processed-schema.yaml: DT_MK_SCHEMA_FLAGS := $(DT_MK_SCHEMA_USERONLY_FLAG)
|
||||
ifeq ($(DT_SCHEMA_FILES),)
|
||||
|
||||
# Unless DT_SCHEMA_FILES is specified, use the full schema for dtbs_check too.
|
||||
# Just copy processed-schema-examples.yaml
|
||||
|
||||
$(obj)/processed-schema.yaml: $(obj)/processed-schema-examples.yaml FORCE
|
||||
$(call if_changed,copy)
|
||||
|
||||
DT_SCHEMA_FILES = $(DT_DOCS)
|
||||
|
||||
else
|
||||
|
||||
# If DT_SCHEMA_FILES is specified, use it for processed-schema.yaml
|
||||
|
||||
$(obj)/processed-schema.yaml: DT_MK_SCHEMA_FLAGS := -u
|
||||
$(obj)/processed-schema.yaml: $(DT_SCHEMA_FILES) check_dtschema_version FORCE
|
||||
$(call if_changed,mk_schema)
|
||||
|
||||
extra-y += processed-schema.yaml
|
||||
endif
|
||||
|
||||
extra-$(CHECK_DT_BINDING) += $(patsubst $(src)/%.yaml,%.example.dts, $(DT_SCHEMA_FILES))
|
||||
extra-$(CHECK_DT_BINDING) += $(patsubst $(src)/%.yaml,%.example.dt.yaml, $(DT_SCHEMA_FILES))
|
||||
extra-$(CHECK_DT_BINDING) += processed-schema-examples.yaml
|
||||
extra-$(CHECK_DTBS) += processed-schema.yaml
|
||||
|
||||
# Hack: avoid 'Argument list too long' error for 'make clean'. Remove most of
|
||||
# build artifacts here before they are processed by scripts/Makefile.clean
|
||||
clean-files = $(shell find $(obj) \( -name '*.example.dts' -o \
|
||||
-name '*.example.dt.yaml' \) -delete 2>/dev/null)
|
||||
|
@@ -47,7 +47,7 @@ Required properties:
|
||||
&lsio_mu1 1 2
|
||||
&lsio_mu1 1 3
|
||||
&lsio_mu1 3 3>;
|
||||
See Documentation/devicetree/bindings/mailbox/fsl,mu.txt
|
||||
See Documentation/devicetree/bindings/mailbox/fsl,mu.yaml
|
||||
for detailed mailbox binding.
|
||||
|
||||
Note: Each mu which supports general interrupt should have an alias correctly
|
||||
|
@@ -80,14 +80,14 @@ examples:
|
||||
ranges = <1 0x00000000 0x42000000 0x02000000>,
|
||||
<5 0x00000000 0x46000000 0x01000000>;
|
||||
|
||||
ethernet@1,01f00000 {
|
||||
ethernet@1,1f00000 {
|
||||
compatible = "smsc,lan9115";
|
||||
reg = <1 0x01f00000 0x1000>;
|
||||
interrupts = <0 48 4>;
|
||||
phy-mode = "mii";
|
||||
};
|
||||
|
||||
uart@5,00200000 {
|
||||
serial@5,200000 {
|
||||
compatible = "ns16550a";
|
||||
reg = <5 0x00200000 0x20>;
|
||||
interrupts = <0 49 4>;
|
||||
|
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
title: Clock bindings for Freescale i.MX27
|
||||
|
||||
maintainers:
|
||||
- Fabio Estevam <fabio.estevam@freescale.com>
|
||||
- Fabio Estevam <fabio.estevam@nxp.com>
|
||||
|
||||
description: |
|
||||
The clock consumer should specify the desired clock by having the clock
|
||||
|
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
title: Clock bindings for Freescale i.MX31
|
||||
|
||||
maintainers:
|
||||
- Fabio Estevam <fabio.estevam@freescale.com>
|
||||
- Fabio Estevam <fabio.estevam@nxp.com>
|
||||
|
||||
description: |
|
||||
The clock consumer should specify the desired clock by having the clock
|
||||
|
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
title: Clock bindings for Freescale i.MX5
|
||||
|
||||
maintainers:
|
||||
- Fabio Estevam <fabio.estevam@freescale.com>
|
||||
- Fabio Estevam <fabio.estevam@nxp.com>
|
||||
|
||||
description: |
|
||||
The clock consumer should specify the desired clock by having the clock
|
||||
|
@@ -37,7 +37,7 @@ Optional properties:
|
||||
simple-card or audio-graph-card binding. See their binding
|
||||
documents on how to describe the way the sii902x device is
|
||||
connected to the rest of the audio system:
|
||||
Documentation/devicetree/bindings/sound/simple-card.txt
|
||||
Documentation/devicetree/bindings/sound/simple-card.yaml
|
||||
Documentation/devicetree/bindings/sound/audio-graph-card.txt
|
||||
Note: In case of the audio-graph-card binding the used port
|
||||
index should be 3.
|
||||
|
@@ -68,7 +68,7 @@ Required properties:
|
||||
datasheet
|
||||
- clocks : phandle to the PRE axi clock input, as described
|
||||
in Documentation/devicetree/bindings/clock/clock-bindings.txt and
|
||||
Documentation/devicetree/bindings/clock/imx6q-clock.txt.
|
||||
Documentation/devicetree/bindings/clock/imx6q-clock.yaml.
|
||||
- clock-names: should be "axi"
|
||||
- interrupts: should contain the PRE interrupt
|
||||
- fsl,iram: phandle pointing to the mmio-sram device node, that should be
|
||||
@@ -94,7 +94,7 @@ Required properties:
|
||||
datasheet
|
||||
- clocks : phandles to the PRG ipg and axi clock inputs, as described
|
||||
in Documentation/devicetree/bindings/clock/clock-bindings.txt and
|
||||
Documentation/devicetree/bindings/clock/imx6q-clock.txt.
|
||||
Documentation/devicetree/bindings/clock/imx6q-clock.yaml.
|
||||
- clock-names: should be "ipg" and "axi"
|
||||
- fsl,pres: phandles to the PRE units attached to this PRG, with the fixed
|
||||
PRE as the first entry and the muxable PREs following.
|
||||
|
@@ -30,8 +30,8 @@ Required properties:
|
||||
"di2_sel" - IPU2 DI0 mux
|
||||
"di3_sel" - IPU2 DI1 mux
|
||||
The needed clock numbers for each are documented in
|
||||
Documentation/devicetree/bindings/clock/imx5-clock.txt, and in
|
||||
Documentation/devicetree/bindings/clock/imx6q-clock.txt.
|
||||
Documentation/devicetree/bindings/clock/imx5-clock.yaml, and in
|
||||
Documentation/devicetree/bindings/clock/imx6q-clock.yaml.
|
||||
|
||||
Optional properties:
|
||||
- pinctrl-names : should be "default" on i.MX53, not used on i.MX6q
|
||||
|
@@ -33,7 +33,7 @@ additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
sysreg {
|
||||
sysreg@0 {
|
||||
compatible = "arm,versatile-sysreg", "syscon", "simple-mfd";
|
||||
reg = <0x00000 0x1000>;
|
||||
|
||||
|
@@ -24,7 +24,7 @@ properties:
|
||||
description: |
|
||||
Should contain a list of phandles pointing to display interface port
|
||||
of vop devices. vop definitions as defined in
|
||||
Documentation/devicetree/bindings/display/rockchip/rockchip-vop.txt
|
||||
Documentation/devicetree/bindings/display/rockchip/rockchip-vop.yaml
|
||||
|
||||
required:
|
||||
- compatible
|
||||
|
@@ -12,7 +12,7 @@ Required properties for the top level node:
|
||||
Only the GPIO_ACTIVE_HIGH and GPIO_ACTIVE_LOW flags are supported.
|
||||
- #interrupt-cells : Specifies the number of cells needed to encode an
|
||||
interrupt. Should be 2. The first cell defines the interrupt number,
|
||||
the second encodes the triger flags encoded as described in
|
||||
the second encodes the trigger flags encoded as described in
|
||||
Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
|
||||
- compatible:
|
||||
- "mediatek,mt7621-gpio" for Mediatek controllers
|
||||
|
@@ -10,7 +10,7 @@ Interrupt number definition:
|
||||
16-31 : private irq, and we use 16 as the co-processor timer.
|
||||
31-1024: common irq for soc ip.
|
||||
|
||||
Interrupt triger mode: (Defined in dt-bindings/interrupt-controller/irq.h)
|
||||
Interrupt trigger mode: (Defined in dt-bindings/interrupt-controller/irq.h)
|
||||
IRQ_TYPE_LEVEL_HIGH (default)
|
||||
IRQ_TYPE_LEVEL_LOW
|
||||
IRQ_TYPE_EDGE_RISING
|
||||
|
@@ -87,7 +87,7 @@ Example:
|
||||
ranges;
|
||||
|
||||
/* APU<->RPU0 IPI mailbox controller */
|
||||
ipi_mailbox_rpu0: mailbox@ff90400 {
|
||||
ipi_mailbox_rpu0: mailbox@ff990400 {
|
||||
reg = <0xff990400 0x20>,
|
||||
<0xff990420 0x20>,
|
||||
<0xff990080 0x20>,
|
||||
|
@@ -8,7 +8,7 @@ The embedded controller requires the SPI controller driver to signal readiness
|
||||
to receive a transfer (that is, when TX FIFO contains the response data) by
|
||||
strobing the ACK pin with the ready signal. See the "ready-gpios" property of the
|
||||
SSP binding as documented in:
|
||||
<Documentation/devicetree/bindings/spi/spi-pxa2xx.txt>.
|
||||
<Documentation/devicetree/bindings/spi/marvell,mmp2-ssp.yaml>.
|
||||
|
||||
Example:
|
||||
&ssp3 {
|
||||
|
@@ -3,7 +3,7 @@ MediaTek SoC built-in Bluetooth Devices
|
||||
|
||||
This device is a serial attached device to BTIF device and thus it must be a
|
||||
child node of the serial node with BTIF. The dt-bindings details for BTIF
|
||||
device can be known via Documentation/devicetree/bindings/serial/8250.txt.
|
||||
device can be known via Documentation/devicetree/bindings/serial/8250.yaml.
|
||||
|
||||
Required properties:
|
||||
|
||||
|
@@ -114,7 +114,7 @@ with values derived from the SoC user manual.
|
||||
[flags]>
|
||||
|
||||
On other mach-shmobile platforms GPIO is handled by the gpio-rcar driver.
|
||||
Please refer to Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt
|
||||
Please refer to Documentation/devicetree/bindings/gpio/renesas,rcar-gpio.yaml
|
||||
for documentation of the GPIO device tree bindings on those platforms.
|
||||
|
||||
|
||||
|
@@ -5,7 +5,7 @@ It is based on common bindings for device graphs.
|
||||
see ${LINUX}/Documentation/devicetree/bindings/graph.txt
|
||||
|
||||
Basically, Audio Graph Card property is same as Simple Card.
|
||||
see ${LINUX}/Documentation/devicetree/bindings/sound/simple-card.txt
|
||||
see ${LINUX}/Documentation/devicetree/bindings/sound/simple-card.yaml
|
||||
|
||||
Below are same as Simple-Card.
|
||||
|
||||
|
@@ -5,7 +5,7 @@ codec or external codecs.
|
||||
|
||||
sti sound drivers allows to expose sti SoC audio interface through the
|
||||
generic ASoC simple card. For details about sound card declaration please refer to
|
||||
Documentation/devicetree/bindings/sound/simple-card.txt.
|
||||
Documentation/devicetree/bindings/sound/simple-card.yaml.
|
||||
|
||||
1) sti-uniperiph-dai: audio dai device.
|
||||
---------------------------------------
|
||||
|
@@ -19,7 +19,7 @@ Required properties:
|
||||
|
||||
SPI Controller nodes must be child of GENI based Qualcomm Universal
|
||||
Peripharal. Please refer GENI based QUP wrapper controller node bindings
|
||||
described in Documentation/devicetree/bindings/soc/qcom/qcom,geni-se.txt.
|
||||
described in Documentation/devicetree/bindings/soc/qcom/qcom,geni-se.yaml.
|
||||
|
||||
SPI slave nodes must be children of the SPI master node and conform to SPI bus
|
||||
binding as described in Documentation/devicetree/bindings/spi/spi-bus.txt.
|
||||
|
@@ -41,7 +41,7 @@ examples:
|
||||
#include <dt-bindings/interrupt-controller/arm-gic.h>
|
||||
|
||||
// Example 1: SDM845 TSENS
|
||||
soc: soc@0 {
|
||||
soc: soc {
|
||||
#address-cells = <2>;
|
||||
#size-cells = <2>;
|
||||
|
||||
|
@@ -224,7 +224,7 @@ examples:
|
||||
#include <dt-bindings/thermal/thermal.h>
|
||||
|
||||
// Example 1: SDM845 TSENS
|
||||
soc: soc@0 {
|
||||
soc {
|
||||
#address-cells = <2>;
|
||||
#size-cells = <2>;
|
||||
|
||||
|
@@ -35,7 +35,7 @@ examples:
|
||||
#include <dt-bindings/soc/ti,sci_pm_domain.h>
|
||||
vtm: thermal@42050000 {
|
||||
compatible = "ti,am654-vtm";
|
||||
reg = <0x0 0x42050000 0x0 0x25c>;
|
||||
reg = <0x42050000 0x25c>;
|
||||
power-domains = <&k3_pds 80 TI_SCI_PD_EXCLUSIVE>;
|
||||
#thermal-sensor-cells = <1>;
|
||||
};
|
||||
|
@@ -8,7 +8,7 @@ regs is accessed by cpu co-processor 4 registers with mtcr/mfcr.
|
||||
- PTIM_CTLR "cr<0, 14>" Control reg to start reset timer.
|
||||
- PTIM_TSR "cr<1, 14>" Interrupt cleanup status reg.
|
||||
- PTIM_CCVR "cr<3, 14>" Current counter value reg.
|
||||
- PTIM_LVR "cr<6, 14>" Window value reg to triger next event.
|
||||
- PTIM_LVR "cr<6, 14>" Window value reg to trigger next event.
|
||||
|
||||
==============================
|
||||
timer node bindings definition
|
||||
|
@@ -127,8 +127,8 @@ examples:
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
string@0409 {
|
||||
reg = <0x0409>;
|
||||
string@409 {
|
||||
reg = <0x409>;
|
||||
manufacturer = "ASPEED";
|
||||
product = "USB Virtual Hub";
|
||||
serial-number = "0000";
|
||||
|
@@ -1,4 +1,4 @@
|
||||
:orphan:
|
||||
.. SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
Writing DeviceTree Bindings in json-schema
|
||||
==========================================
|
||||
@@ -124,9 +124,12 @@ dtc must also be built with YAML output support enabled. This requires that
|
||||
libyaml and its headers be installed on the host system. For some distributions
|
||||
that involves installing the development package, such as:
|
||||
|
||||
Debian:
|
||||
Debian::
|
||||
|
||||
apt-get install libyaml-dev
|
||||
Fedora:
|
||||
|
||||
Fedora::
|
||||
|
||||
dnf -y install libyaml-devel
|
||||
|
||||
Running checks
|
||||
|
@@ -1,14 +1,26 @@
|
||||
==============================
|
||||
Linux I2C slave eeprom backend
|
||||
Linux I2C slave EEPROM backend
|
||||
==============================
|
||||
|
||||
by Wolfram Sang <wsa@sang-engineering.com> in 2014-15
|
||||
by Wolfram Sang <wsa@sang-engineering.com> in 2014-20
|
||||
|
||||
This is a proof-of-concept backend which acts like an EEPROM on the connected
|
||||
I2C bus. The memory contents can be modified from userspace via this file
|
||||
located in sysfs::
|
||||
This backend simulates an EEPROM on the connected I2C bus. Its memory contents
|
||||
can be accessed from userspace via this file located in sysfs::
|
||||
|
||||
/sys/bus/i2c/devices/<device-directory>/slave-eeprom
|
||||
|
||||
The following types are available: 24c02, 24c32, 24c64, and 24c512. Read-only
|
||||
variants are also supported. The name needed for instantiating has the form
|
||||
'slave-<type>[ro]'. Examples follow:
|
||||
|
||||
24c02, read/write, address 0x64:
|
||||
# echo slave-24c02 0x1064 > /sys/bus/i2c/devices/i2c-1/new_device
|
||||
|
||||
24c512, read-only, address 0x42:
|
||||
# echo slave-24c512ro 0x1042 > /sys/bus/i2c/devices/i2c-1/new_device
|
||||
|
||||
You can also preload data during boot if a device-property named
|
||||
'firmware-name' contains a valid filename (DT or ACPI only).
|
||||
|
||||
As of 2015, Linux doesn't support poll on binary sysfs files, so there is no
|
||||
notification when another master changed the content.
|
||||
|
@@ -182,7 +182,8 @@ module 8123.ko, which is built from the following files::
|
||||
8123_pci.c
|
||||
8123_bin.o_shipped <= Binary blob
|
||||
|
||||
--- 3.1 Shared Makefile
|
||||
3.1 Shared Makefile
|
||||
-------------------
|
||||
|
||||
An external module always includes a wrapper makefile that
|
||||
supports building the module using "make" with no arguments.
|
||||
@@ -470,9 +471,9 @@ build.
|
||||
|
||||
The syntax of the Module.symvers file is::
|
||||
|
||||
<CRC> <Symbol> <Module> <Export Type> <Namespace>
|
||||
<CRC> <Symbol> <Module> <Export Type> <Namespace>
|
||||
|
||||
0xe1cc2a05 usb_stor_suspend drivers/usb/storage/usb-storage EXPORT_SYMBOL_GPL USB_STORAGE
|
||||
0xe1cc2a05 usb_stor_suspend drivers/usb/storage/usb-storage EXPORT_SYMBOL_GPL USB_STORAGE
|
||||
|
||||
The fields are separated by tabs and values may be empty (e.g.
|
||||
if no namespace is defined for an exported symbol).
|
||||
|
@@ -101,7 +101,7 @@ Structure randomisation
|
||||
|
||||
If you enable ``CONFIG_GCC_PLUGIN_RANDSTRUCT``, you will need to
|
||||
pre-generate the random seed in
|
||||
``scripts/gcc-plgins/randomize_layout_seed.h`` so the same value
|
||||
``scripts/gcc-plugins/randomize_layout_seed.h`` so the same value
|
||||
is used in rebuilds.
|
||||
|
||||
Debug info conflicts
|
||||
|
@@ -68,4 +68,4 @@ and frameworks can be controlled from the same registers, all of these
|
||||
drivers access their registers through the same regmap.
|
||||
|
||||
For more information regarding the devicetree bindings of the TCU drivers,
|
||||
have a look at Documentation/devicetree/bindings/timer/ingenic,tcu.txt.
|
||||
have a look at Documentation/devicetree/bindings/timer/ingenic,tcu.yaml.
|
||||
|
@@ -3946,7 +3946,7 @@ L: linux-crypto@vger.kernel.org
|
||||
S: Supported
|
||||
F: drivers/char/hw_random/cctrng.c
|
||||
F: drivers/char/hw_random/cctrng.h
|
||||
F: Documentation/devicetree/bindings/rng/arm-cctrng.txt
|
||||
F: Documentation/devicetree/bindings/rng/arm-cctrng.yaml
|
||||
W: https://developer.arm.com/products/system-ip/trustzone-cryptocell/cryptocell-700-family
|
||||
|
||||
CEC FRAMEWORK
|
||||
@@ -5490,7 +5490,7 @@ F: include/uapi/drm/r128_drm.h
|
||||
DRM DRIVER FOR RAYDIUM RM67191 PANELS
|
||||
M: Robert Chiras <robert.chiras@nxp.com>
|
||||
S: Maintained
|
||||
F: Documentation/devicetree/bindings/display/panel/raydium,rm67191.txt
|
||||
F: Documentation/devicetree/bindings/display/panel/raydium,rm67191.yaml
|
||||
F: drivers/gpu/drm/panel/panel-raydium-rm67191.c
|
||||
|
||||
DRM DRIVER FOR ROCKTECH JH057N00900 PANELS
|
||||
@@ -14580,8 +14580,8 @@ RENESAS R-CAR THERMAL DRIVERS
|
||||
M: Niklas Söderlund <niklas.soderlund@ragnatech.se>
|
||||
L: linux-renesas-soc@vger.kernel.org
|
||||
S: Supported
|
||||
F: Documentation/devicetree/bindings/thermal/rcar-gen3-thermal.txt
|
||||
F: Documentation/devicetree/bindings/thermal/rcar-thermal.txt
|
||||
F: Documentation/devicetree/bindings/thermal/rcar-gen3-thermal.yaml
|
||||
F: Documentation/devicetree/bindings/thermal/rcar-thermal.yaml
|
||||
F: drivers/thermal/rcar_gen3_thermal.c
|
||||
F: drivers/thermal/rcar_thermal.c
|
||||
|
||||
|
6
Makefile
6
Makefile
@@ -2,7 +2,7 @@
|
||||
VERSION = 5
|
||||
PATCHLEVEL = 8
|
||||
SUBLEVEL = 0
|
||||
EXTRAVERSION = -rc3
|
||||
EXTRAVERSION = -rc4
|
||||
NAME = Kleptomaniac Octopus
|
||||
|
||||
# *DOCUMENTATION*
|
||||
@@ -994,8 +994,8 @@ LDFLAGS_vmlinux += --pack-dyn-relocs=relr
|
||||
endif
|
||||
|
||||
# Align the bit size of userspace programs with the kernel
|
||||
KBUILD_USERCFLAGS += $(filter -m32 -m64, $(KBUILD_CFLAGS))
|
||||
KBUILD_USERLDFLAGS += $(filter -m32 -m64, $(KBUILD_CFLAGS))
|
||||
KBUILD_USERCFLAGS += $(filter -m32 -m64 --target=%, $(KBUILD_CFLAGS))
|
||||
KBUILD_USERLDFLAGS += $(filter -m32 -m64 --target=%, $(KBUILD_CFLAGS))
|
||||
|
||||
# make the checker run with the right architecture
|
||||
CHECKFLAGS += --arch=$(ARCH)
|
||||
|
@@ -241,7 +241,6 @@ static int __init fdt_find_hyper_node(unsigned long node, const char *uname,
|
||||
* see Documentation/devicetree/bindings/arm/xen.txt for the
|
||||
* documentation of the Xen Device Tree format.
|
||||
*/
|
||||
#define GRANT_TABLE_PHYSADDR 0
|
||||
void __init xen_early_init(void)
|
||||
{
|
||||
of_scan_flat_dt(fdt_find_hyper_node, NULL);
|
||||
|
@@ -73,11 +73,11 @@ static inline void apply_alternatives_module(void *start, size_t length) { }
|
||||
".pushsection .altinstructions,\"a\"\n" \
|
||||
ALTINSTR_ENTRY(feature) \
|
||||
".popsection\n" \
|
||||
".pushsection .altinstr_replacement, \"a\"\n" \
|
||||
".subsection 1\n" \
|
||||
"663:\n\t" \
|
||||
newinstr "\n" \
|
||||
"664:\n\t" \
|
||||
".popsection\n\t" \
|
||||
".previous\n\t" \
|
||||
".org . - (664b-663b) + (662b-661b)\n\t" \
|
||||
".org . - (662b-661b) + (664b-663b)\n" \
|
||||
".endif\n"
|
||||
@@ -117,9 +117,9 @@ static inline void apply_alternatives_module(void *start, size_t length) { }
|
||||
662: .pushsection .altinstructions, "a"
|
||||
altinstruction_entry 661b, 663f, \cap, 662b-661b, 664f-663f
|
||||
.popsection
|
||||
.pushsection .altinstr_replacement, "ax"
|
||||
.subsection 1
|
||||
663: \insn2
|
||||
664: .popsection
|
||||
664: .previous
|
||||
.org . - (664b-663b) + (662b-661b)
|
||||
.org . - (662b-661b) + (664b-663b)
|
||||
.endif
|
||||
@@ -160,7 +160,7 @@ static inline void apply_alternatives_module(void *start, size_t length) { }
|
||||
.pushsection .altinstructions, "a"
|
||||
altinstruction_entry 663f, 661f, \cap, 664f-663f, 662f-661f
|
||||
.popsection
|
||||
.pushsection .altinstr_replacement, "ax"
|
||||
.subsection 1
|
||||
.align 2 /* So GAS knows label 661 is suitably aligned */
|
||||
661:
|
||||
.endm
|
||||
@@ -179,9 +179,9 @@ static inline void apply_alternatives_module(void *start, size_t length) { }
|
||||
.macro alternative_else
|
||||
662:
|
||||
.if .Lasm_alt_mode==0
|
||||
.pushsection .altinstr_replacement, "ax"
|
||||
.subsection 1
|
||||
.else
|
||||
.popsection
|
||||
.previous
|
||||
.endif
|
||||
663:
|
||||
.endm
|
||||
@@ -192,7 +192,7 @@ static inline void apply_alternatives_module(void *start, size_t length) { }
|
||||
.macro alternative_endif
|
||||
664:
|
||||
.if .Lasm_alt_mode==0
|
||||
.popsection
|
||||
.previous
|
||||
.endif
|
||||
.org . - (664b-663b) + (662b-661b)
|
||||
.org . - (662b-661b) + (664b-663b)
|
||||
|
@@ -86,6 +86,7 @@
|
||||
#define QCOM_CPU_PART_FALKOR 0xC00
|
||||
#define QCOM_CPU_PART_KRYO 0x200
|
||||
#define QCOM_CPU_PART_KRYO_3XX_SILVER 0x803
|
||||
#define QCOM_CPU_PART_KRYO_4XX_GOLD 0x804
|
||||
#define QCOM_CPU_PART_KRYO_4XX_SILVER 0x805
|
||||
|
||||
#define NVIDIA_CPU_PART_DENVER 0x003
|
||||
@@ -114,6 +115,7 @@
|
||||
#define MIDR_QCOM_FALKOR MIDR_CPU_MODEL(ARM_CPU_IMP_QCOM, QCOM_CPU_PART_FALKOR)
|
||||
#define MIDR_QCOM_KRYO MIDR_CPU_MODEL(ARM_CPU_IMP_QCOM, QCOM_CPU_PART_KRYO)
|
||||
#define MIDR_QCOM_KRYO_3XX_SILVER MIDR_CPU_MODEL(ARM_CPU_IMP_QCOM, QCOM_CPU_PART_KRYO_3XX_SILVER)
|
||||
#define MIDR_QCOM_KRYO_4XX_GOLD MIDR_CPU_MODEL(ARM_CPU_IMP_QCOM, QCOM_CPU_PART_KRYO_4XX_GOLD)
|
||||
#define MIDR_QCOM_KRYO_4XX_SILVER MIDR_CPU_MODEL(ARM_CPU_IMP_QCOM, QCOM_CPU_PART_KRYO_4XX_SILVER)
|
||||
#define MIDR_NVIDIA_DENVER MIDR_CPU_MODEL(ARM_CPU_IMP_NVIDIA, NVIDIA_CPU_PART_DENVER)
|
||||
#define MIDR_NVIDIA_CARMEL MIDR_CPU_MODEL(ARM_CPU_IMP_NVIDIA, NVIDIA_CPU_PART_CARMEL)
|
||||
|
@@ -472,12 +472,7 @@ static bool
|
||||
has_cortex_a76_erratum_1463225(const struct arm64_cpu_capabilities *entry,
|
||||
int scope)
|
||||
{
|
||||
u32 midr = read_cpuid_id();
|
||||
/* Cortex-A76 r0p0 - r3p1 */
|
||||
struct midr_range range = MIDR_RANGE(MIDR_CORTEX_A76, 0, 0, 3, 1);
|
||||
|
||||
WARN_ON(scope != SCOPE_LOCAL_CPU || preemptible());
|
||||
return is_midr_in_range(midr, &range) && is_kernel_in_hyp_mode();
|
||||
return is_affected_midr_range_list(entry, scope) && is_kernel_in_hyp_mode();
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -728,6 +723,8 @@ static const struct midr_range erratum_1418040_list[] = {
|
||||
MIDR_RANGE(MIDR_CORTEX_A76, 0, 0, 3, 1),
|
||||
/* Neoverse-N1 r0p0 to r3p1 */
|
||||
MIDR_RANGE(MIDR_NEOVERSE_N1, 0, 0, 3, 1),
|
||||
/* Kryo4xx Gold (rcpe to rfpf) => (r0p0 to r3p1) */
|
||||
MIDR_RANGE(MIDR_QCOM_KRYO_4XX_GOLD, 0xc, 0xe, 0xf, 0xf),
|
||||
{},
|
||||
};
|
||||
#endif
|
||||
@@ -772,11 +769,22 @@ static const struct midr_range erratum_speculative_at_list[] = {
|
||||
#ifdef CONFIG_ARM64_ERRATUM_1530923
|
||||
/* Cortex A55 r0p0 to r2p0 */
|
||||
MIDR_RANGE(MIDR_CORTEX_A55, 0, 0, 2, 0),
|
||||
/* Kryo4xx Silver (rdpe => r1p0) */
|
||||
MIDR_REV(MIDR_QCOM_KRYO_4XX_SILVER, 0xd, 0xe),
|
||||
#endif
|
||||
{},
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ARM64_ERRATUM_1463225
|
||||
static const struct midr_range erratum_1463225[] = {
|
||||
/* Cortex-A76 r0p0 - r3p1 */
|
||||
MIDR_RANGE(MIDR_CORTEX_A76, 0, 0, 3, 1),
|
||||
/* Kryo4xx Gold (rcpe to rfpf) => (r0p0 to r3p1) */
|
||||
MIDR_RANGE(MIDR_QCOM_KRYO_4XX_GOLD, 0xc, 0xe, 0xf, 0xf),
|
||||
};
|
||||
#endif
|
||||
|
||||
const struct arm64_cpu_capabilities arm64_errata[] = {
|
||||
#ifdef CONFIG_ARM64_WORKAROUND_CLEAN_CACHE
|
||||
{
|
||||
@@ -916,6 +924,7 @@ const struct arm64_cpu_capabilities arm64_errata[] = {
|
||||
.capability = ARM64_WORKAROUND_1463225,
|
||||
.type = ARM64_CPUCAP_LOCAL_CPU_ERRATUM,
|
||||
.matches = has_cortex_a76_erratum_1463225,
|
||||
.midr_range_list = erratum_1463225,
|
||||
},
|
||||
#endif
|
||||
#ifdef CONFIG_CAVIUM_TX2_ERRATUM_219
|
||||
|
@@ -1408,6 +1408,8 @@ static bool cpu_has_broken_dbm(void)
|
||||
static const struct midr_range cpus[] = {
|
||||
#ifdef CONFIG_ARM64_ERRATUM_1024718
|
||||
MIDR_RANGE(MIDR_CORTEX_A55, 0, 0, 1, 0), // A55 r0p0 -r1p0
|
||||
/* Kryo4xx Silver (rdpe => r1p0) */
|
||||
MIDR_REV(MIDR_QCOM_KRYO_4XX_SILVER, 0xd, 0xe),
|
||||
#endif
|
||||
{},
|
||||
};
|
||||
|
@@ -122,7 +122,7 @@ void *alloc_insn_page(void)
|
||||
{
|
||||
return __vmalloc_node_range(PAGE_SIZE, 1, VMALLOC_START, VMALLOC_END,
|
||||
GFP_KERNEL, PAGE_KERNEL_ROX, VM_FLUSH_RESET_PERMS,
|
||||
NUMA_NO_NODE, __func__);
|
||||
NUMA_NO_NODE, __builtin_return_address(0));
|
||||
}
|
||||
|
||||
/* arm kprobe: install breakpoint in text */
|
||||
|
@@ -165,9 +165,6 @@ SECTIONS
|
||||
*(.altinstructions)
|
||||
__alt_instructions_end = .;
|
||||
}
|
||||
.altinstr_replacement : {
|
||||
*(.altinstr_replacement)
|
||||
}
|
||||
|
||||
. = ALIGN(SEGMENT_ALIGN);
|
||||
__inittext_end = .;
|
||||
|
@@ -138,7 +138,8 @@ void __init setup_arch(char **cmdline_p)
|
||||
pr_debug("MEMORY -> ROMFS=0x%p-0x%06lx MEM=0x%06lx-0x%06lx\n ",
|
||||
__bss_stop, memory_start, memory_start, memory_end);
|
||||
|
||||
memblock_add(memory_start, memory_end - memory_start);
|
||||
memblock_add(_rambase, memory_end - _rambase);
|
||||
memblock_reserve(_rambase, memory_start - _rambase);
|
||||
|
||||
/* Keep a copy of command line */
|
||||
*cmdline_p = &command_line[0];
|
||||
|
@@ -174,7 +174,7 @@ void __init cf_bootmem_alloc(void)
|
||||
m68k_memory[0].addr = _rambase;
|
||||
m68k_memory[0].size = _ramend - _rambase;
|
||||
|
||||
memblock_add(m68k_memory[0].addr, m68k_memory[0].size);
|
||||
memblock_add_node(m68k_memory[0].addr, m68k_memory[0].size, 0);
|
||||
|
||||
/* compute total pages in system */
|
||||
num_pages = PFN_DOWN(_ramend - _rambase);
|
||||
|
@@ -92,7 +92,7 @@
|
||||
"MIC1N", "Built-in Mic";
|
||||
simple-audio-card,pin-switches = "Speaker", "Headphones";
|
||||
|
||||
simple-audio-card,hp-det-gpio = <&gpf 21 GPIO_ACTIVE_HIGH>;
|
||||
simple-audio-card,hp-det-gpio = <&gpf 21 GPIO_ACTIVE_LOW>;
|
||||
simple-audio-card,aux-devs = <&speaker_amp>, <&headphones_amp>;
|
||||
|
||||
simple-audio-card,bitclock-master = <&dai_codec>;
|
||||
|
@@ -723,12 +723,14 @@ static int simulate_loongson3_cpucfg(struct pt_regs *regs,
|
||||
perf_sw_event(PERF_COUNT_SW_EMULATION_FAULTS, 1, regs, 0);
|
||||
|
||||
/* Do not emulate on unsupported core models. */
|
||||
if (!loongson3_cpucfg_emulation_enabled(¤t_cpu_data))
|
||||
preempt_disable();
|
||||
if (!loongson3_cpucfg_emulation_enabled(¤t_cpu_data)) {
|
||||
preempt_enable();
|
||||
return -1;
|
||||
|
||||
}
|
||||
regs->regs[rd] = loongson3_cpucfg_read_synthesized(
|
||||
¤t_cpu_data, sel);
|
||||
|
||||
preempt_enable();
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -2169,6 +2171,7 @@ static void configure_status(void)
|
||||
|
||||
change_c0_status(ST0_CU|ST0_MX|ST0_RE|ST0_FR|ST0_BEV|ST0_TS|ST0_KX|ST0_SX|ST0_UX,
|
||||
status_set);
|
||||
back_to_back_c0_hazard();
|
||||
}
|
||||
|
||||
unsigned int hwrena;
|
||||
|
@@ -514,8 +514,8 @@ void __init ltq_soc_init(void)
|
||||
clkdev_add_pmu("1e10b308.eth", NULL, 0, 0, PMU_SWITCH |
|
||||
PMU_PPE_DP | PMU_PPE_TC);
|
||||
clkdev_add_pmu("1da00000.usif", "NULL", 1, 0, PMU_USIF);
|
||||
clkdev_add_pmu("1e108000.gswip", "gphy0", 0, 0, PMU_GPHY);
|
||||
clkdev_add_pmu("1e108000.gswip", "gphy1", 0, 0, PMU_GPHY);
|
||||
clkdev_add_pmu("1e108000.switch", "gphy0", 0, 0, PMU_GPHY);
|
||||
clkdev_add_pmu("1e108000.switch", "gphy1", 0, 0, PMU_GPHY);
|
||||
clkdev_add_pmu("1e103100.deu", NULL, 1, 0, PMU_DEU);
|
||||
clkdev_add_pmu("1e116000.mei", "afe", 1, 2, PMU_ANALOG_DSL_AFE);
|
||||
clkdev_add_pmu("1e116000.mei", "dfe", 1, 0, PMU_DFE);
|
||||
@@ -538,8 +538,8 @@ void __init ltq_soc_init(void)
|
||||
PMU_SWITCH | PMU_PPE_DPLUS | PMU_PPE_DPLUM |
|
||||
PMU_PPE_EMA | PMU_PPE_TC | PMU_PPE_SLL01 |
|
||||
PMU_PPE_QSB | PMU_PPE_TOP);
|
||||
clkdev_add_pmu("1e108000.gswip", "gphy0", 0, 0, PMU_GPHY);
|
||||
clkdev_add_pmu("1e108000.gswip", "gphy1", 0, 0, PMU_GPHY);
|
||||
clkdev_add_pmu("1e108000.switch", "gphy0", 0, 0, PMU_GPHY);
|
||||
clkdev_add_pmu("1e108000.switch", "gphy1", 0, 0, PMU_GPHY);
|
||||
clkdev_add_pmu("1e103000.sdio", NULL, 1, 0, PMU_SDIO);
|
||||
clkdev_add_pmu("1e103100.deu", NULL, 1, 0, PMU_DEU);
|
||||
clkdev_add_pmu("1e116000.mei", "dfe", 1, 0, PMU_DFE);
|
||||
|
@@ -353,9 +353,6 @@ static bool pkey_access_permitted(int pkey, bool write, bool execute)
|
||||
int pkey_shift;
|
||||
u64 amr;
|
||||
|
||||
if (!is_pkey_enabled(pkey))
|
||||
return true;
|
||||
|
||||
pkey_shift = pkeyshift(pkey);
|
||||
if (execute && !(read_iamr() & (IAMR_EX_BIT << pkey_shift)))
|
||||
return true;
|
||||
|
@@ -45,6 +45,32 @@
|
||||
#define CREATE_TRACE_POINTS
|
||||
#include <trace/events/syscalls.h>
|
||||
|
||||
/* Check that the stack and regs on entry from user mode are sane. */
|
||||
static void check_user_regs(struct pt_regs *regs)
|
||||
{
|
||||
if (IS_ENABLED(CONFIG_DEBUG_ENTRY)) {
|
||||
/*
|
||||
* Make sure that the entry code gave us a sensible EFLAGS
|
||||
* register. Native because we want to check the actual CPU
|
||||
* state, not the interrupt state as imagined by Xen.
|
||||
*/
|
||||
unsigned long flags = native_save_fl();
|
||||
WARN_ON_ONCE(flags & (X86_EFLAGS_AC | X86_EFLAGS_DF |
|
||||
X86_EFLAGS_NT));
|
||||
|
||||
/* We think we came from user mode. Make sure pt_regs agrees. */
|
||||
WARN_ON_ONCE(!user_mode(regs));
|
||||
|
||||
/*
|
||||
* All entries from user mode (except #DF) should be on the
|
||||
* normal thread stack and should have user pt_regs in the
|
||||
* correct location.
|
||||
*/
|
||||
WARN_ON_ONCE(!on_thread_stack());
|
||||
WARN_ON_ONCE(regs != task_pt_regs(current));
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef CONFIG_CONTEXT_TRACKING
|
||||
/**
|
||||
* enter_from_user_mode - Establish state when coming from user mode
|
||||
@@ -127,9 +153,6 @@ static long syscall_trace_enter(struct pt_regs *regs)
|
||||
unsigned long ret = 0;
|
||||
u32 work;
|
||||
|
||||
if (IS_ENABLED(CONFIG_DEBUG_ENTRY))
|
||||
BUG_ON(regs != task_pt_regs(current));
|
||||
|
||||
work = READ_ONCE(ti->flags);
|
||||
|
||||
if (work & (_TIF_SYSCALL_TRACE | _TIF_SYSCALL_EMU)) {
|
||||
@@ -346,6 +369,8 @@ __visible noinstr void do_syscall_64(unsigned long nr, struct pt_regs *regs)
|
||||
{
|
||||
struct thread_info *ti;
|
||||
|
||||
check_user_regs(regs);
|
||||
|
||||
enter_from_user_mode();
|
||||
instrumentation_begin();
|
||||
|
||||
@@ -409,6 +434,8 @@ static void do_syscall_32_irqs_on(struct pt_regs *regs)
|
||||
/* Handles int $0x80 */
|
||||
__visible noinstr void do_int80_syscall_32(struct pt_regs *regs)
|
||||
{
|
||||
check_user_regs(regs);
|
||||
|
||||
enter_from_user_mode();
|
||||
instrumentation_begin();
|
||||
|
||||
@@ -460,6 +487,8 @@ __visible noinstr long do_fast_syscall_32(struct pt_regs *regs)
|
||||
vdso_image_32.sym_int80_landing_pad;
|
||||
bool success;
|
||||
|
||||
check_user_regs(regs);
|
||||
|
||||
/*
|
||||
* SYSENTER loses EIP, and even SYSCALL32 needs us to skip forward
|
||||
* so that 'regs->ip -= 2' lands back on an int $0x80 instruction.
|
||||
@@ -510,6 +539,18 @@ __visible noinstr long do_fast_syscall_32(struct pt_regs *regs)
|
||||
(regs->flags & (X86_EFLAGS_RF | X86_EFLAGS_TF | X86_EFLAGS_VM)) == 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Returns 0 to return using IRET or 1 to return using SYSEXIT/SYSRETL. */
|
||||
__visible noinstr long do_SYSENTER_32(struct pt_regs *regs)
|
||||
{
|
||||
/* SYSENTER loses RSP, but the vDSO saved it in RBP. */
|
||||
regs->sp = regs->bp;
|
||||
|
||||
/* SYSENTER clobbers EFLAGS.IF. Assume it was set in usermode. */
|
||||
regs->flags |= X86_EFLAGS_IF;
|
||||
|
||||
return do_fast_syscall_32(regs);
|
||||
}
|
||||
#endif
|
||||
|
||||
SYSCALL_DEFINE0(ni_syscall)
|
||||
@@ -553,6 +594,7 @@ SYSCALL_DEFINE0(ni_syscall)
|
||||
bool noinstr idtentry_enter_cond_rcu(struct pt_regs *regs)
|
||||
{
|
||||
if (user_mode(regs)) {
|
||||
check_user_regs(regs);
|
||||
enter_from_user_mode();
|
||||
return false;
|
||||
}
|
||||
@@ -686,6 +728,7 @@ void noinstr idtentry_exit_cond_rcu(struct pt_regs *regs, bool rcu_exit)
|
||||
*/
|
||||
void noinstr idtentry_enter_user(struct pt_regs *regs)
|
||||
{
|
||||
check_user_regs(regs);
|
||||
enter_from_user_mode();
|
||||
}
|
||||
|
||||
|
@@ -933,9 +933,8 @@ SYM_FUNC_START(entry_SYSENTER_32)
|
||||
|
||||
.Lsysenter_past_esp:
|
||||
pushl $__USER_DS /* pt_regs->ss */
|
||||
pushl %ebp /* pt_regs->sp (stashed in bp) */
|
||||
pushl $0 /* pt_regs->sp (placeholder) */
|
||||
pushfl /* pt_regs->flags (except IF = 0) */
|
||||
orl $X86_EFLAGS_IF, (%esp) /* Fix IF */
|
||||
pushl $__USER_CS /* pt_regs->cs */
|
||||
pushl $0 /* pt_regs->ip = 0 (placeholder) */
|
||||
pushl %eax /* pt_regs->orig_ax */
|
||||
@@ -965,7 +964,7 @@ SYM_FUNC_START(entry_SYSENTER_32)
|
||||
.Lsysenter_flags_fixed:
|
||||
|
||||
movl %esp, %eax
|
||||
call do_fast_syscall_32
|
||||
call do_SYSENTER_32
|
||||
/* XEN PV guests always use IRET path */
|
||||
ALTERNATIVE "testl %eax, %eax; jz .Lsyscall_32_done", \
|
||||
"jmp .Lsyscall_32_done", X86_FEATURE_XENPV
|
||||
|
@@ -57,6 +57,21 @@ SYM_CODE_START(entry_SYSENTER_compat)
|
||||
|
||||
movq PER_CPU_VAR(cpu_current_top_of_stack), %rsp
|
||||
|
||||
/* Construct struct pt_regs on stack */
|
||||
pushq $__USER32_DS /* pt_regs->ss */
|
||||
pushq $0 /* pt_regs->sp = 0 (placeholder) */
|
||||
|
||||
/*
|
||||
* Push flags. This is nasty. First, interrupts are currently
|
||||
* off, but we need pt_regs->flags to have IF set. Second, if TS
|
||||
* was set in usermode, it's still set, and we're singlestepping
|
||||
* through this code. do_SYSENTER_32() will fix up IF.
|
||||
*/
|
||||
pushfq /* pt_regs->flags (except IF = 0) */
|
||||
pushq $__USER32_CS /* pt_regs->cs */
|
||||
pushq $0 /* pt_regs->ip = 0 (placeholder) */
|
||||
SYM_INNER_LABEL(entry_SYSENTER_compat_after_hwframe, SYM_L_GLOBAL)
|
||||
|
||||
/*
|
||||
* User tracing code (ptrace or signal handlers) might assume that
|
||||
* the saved RAX contains a 32-bit number when we're invoking a 32-bit
|
||||
@@ -66,20 +81,6 @@ SYM_CODE_START(entry_SYSENTER_compat)
|
||||
*/
|
||||
movl %eax, %eax
|
||||
|
||||
/* Construct struct pt_regs on stack */
|
||||
pushq $__USER32_DS /* pt_regs->ss */
|
||||
pushq %rbp /* pt_regs->sp (stashed in bp) */
|
||||
|
||||
/*
|
||||
* Push flags. This is nasty. First, interrupts are currently
|
||||
* off, but we need pt_regs->flags to have IF set. Second, even
|
||||
* if TF was set when SYSENTER started, it's clear by now. We fix
|
||||
* that later using TIF_SINGLESTEP.
|
||||
*/
|
||||
pushfq /* pt_regs->flags (except IF = 0) */
|
||||
orl $X86_EFLAGS_IF, (%rsp) /* Fix saved flags */
|
||||
pushq $__USER32_CS /* pt_regs->cs */
|
||||
pushq $0 /* pt_regs->ip = 0 (placeholder) */
|
||||
pushq %rax /* pt_regs->orig_ax */
|
||||
pushq %rdi /* pt_regs->di */
|
||||
pushq %rsi /* pt_regs->si */
|
||||
@@ -135,7 +136,7 @@ SYM_CODE_START(entry_SYSENTER_compat)
|
||||
.Lsysenter_flags_fixed:
|
||||
|
||||
movq %rsp, %rdi
|
||||
call do_fast_syscall_32
|
||||
call do_SYSENTER_32
|
||||
/* XEN PV guests always use IRET path */
|
||||
ALTERNATIVE "testl %eax, %eax; jz swapgs_restore_regs_and_return_to_usermode", \
|
||||
"jmp swapgs_restore_regs_and_return_to_usermode", X86_FEATURE_XENPV
|
||||
|
@@ -377,7 +377,8 @@ void __init hyperv_init(void)
|
||||
|
||||
hv_hypercall_pg = __vmalloc_node_range(PAGE_SIZE, 1, VMALLOC_START,
|
||||
VMALLOC_END, GFP_KERNEL, PAGE_KERNEL_ROX,
|
||||
VM_FLUSH_RESET_PERMS, NUMA_NO_NODE, __func__);
|
||||
VM_FLUSH_RESET_PERMS, NUMA_NO_NODE,
|
||||
__builtin_return_address(0));
|
||||
if (hv_hypercall_pg == NULL) {
|
||||
wrmsrl(HV_X64_MSR_GUEST_OS_ID, 0);
|
||||
goto remove_cpuhp_state;
|
||||
|
@@ -623,6 +623,11 @@ static inline void switch_fpu_finish(struct fpu *new_fpu)
|
||||
* MXCSR and XCR definitions:
|
||||
*/
|
||||
|
||||
static inline void ldmxcsr(u32 mxcsr)
|
||||
{
|
||||
asm volatile("ldmxcsr %0" :: "m" (mxcsr));
|
||||
}
|
||||
|
||||
extern unsigned int mxcsr_feature_mask;
|
||||
|
||||
#define XCR_XFEATURE_ENABLED_MASK 0x00000000
|
||||
|
@@ -353,10 +353,6 @@ static __always_inline void __##func(struct pt_regs *regs)
|
||||
|
||||
#else /* CONFIG_X86_64 */
|
||||
|
||||
/* Maps to a regular IDTENTRY on 32bit for now */
|
||||
# define DECLARE_IDTENTRY_IST DECLARE_IDTENTRY
|
||||
# define DEFINE_IDTENTRY_IST DEFINE_IDTENTRY
|
||||
|
||||
/**
|
||||
* DECLARE_IDTENTRY_DF - Declare functions for double fault 32bit variant
|
||||
* @vector: Vector number (ignored for C)
|
||||
@@ -387,28 +383,18 @@ __visible noinstr void func(struct pt_regs *regs, \
|
||||
#endif /* !CONFIG_X86_64 */
|
||||
|
||||
/* C-Code mapping */
|
||||
#define DECLARE_IDTENTRY_NMI DECLARE_IDTENTRY_RAW
|
||||
#define DEFINE_IDTENTRY_NMI DEFINE_IDTENTRY_RAW
|
||||
|
||||
#ifdef CONFIG_X86_64
|
||||
#define DECLARE_IDTENTRY_MCE DECLARE_IDTENTRY_IST
|
||||
#define DEFINE_IDTENTRY_MCE DEFINE_IDTENTRY_IST
|
||||
#define DEFINE_IDTENTRY_MCE_USER DEFINE_IDTENTRY_NOIST
|
||||
|
||||
#define DECLARE_IDTENTRY_NMI DECLARE_IDTENTRY_RAW
|
||||
#define DEFINE_IDTENTRY_NMI DEFINE_IDTENTRY_RAW
|
||||
|
||||
#define DECLARE_IDTENTRY_DEBUG DECLARE_IDTENTRY_IST
|
||||
#define DEFINE_IDTENTRY_DEBUG DEFINE_IDTENTRY_IST
|
||||
#define DEFINE_IDTENTRY_DEBUG_USER DEFINE_IDTENTRY_NOIST
|
||||
|
||||
/**
|
||||
* DECLARE_IDTENTRY_XEN - Declare functions for XEN redirect IDT entry points
|
||||
* @vector: Vector number (ignored for C)
|
||||
* @func: Function name of the entry point
|
||||
*
|
||||
* Used for xennmi and xendebug redirections. No DEFINE as this is all ASM
|
||||
* indirection magic.
|
||||
*/
|
||||
#define DECLARE_IDTENTRY_XEN(vector, func) \
|
||||
asmlinkage void xen_asm_exc_xen##func(void); \
|
||||
asmlinkage void asm_exc_xen##func(void)
|
||||
#endif
|
||||
|
||||
#else /* !__ASSEMBLY__ */
|
||||
|
||||
@@ -455,9 +441,6 @@ __visible noinstr void func(struct pt_regs *regs, \
|
||||
# define DECLARE_IDTENTRY_MCE(vector, func) \
|
||||
DECLARE_IDTENTRY(vector, func)
|
||||
|
||||
# define DECLARE_IDTENTRY_DEBUG(vector, func) \
|
||||
DECLARE_IDTENTRY(vector, func)
|
||||
|
||||
/* No ASM emitted for DF as this goes through a C shim */
|
||||
# define DECLARE_IDTENTRY_DF(vector, func)
|
||||
|
||||
@@ -469,10 +452,6 @@ __visible noinstr void func(struct pt_regs *regs, \
|
||||
/* No ASM code emitted for NMI */
|
||||
#define DECLARE_IDTENTRY_NMI(vector, func)
|
||||
|
||||
/* XEN NMI and DB wrapper */
|
||||
#define DECLARE_IDTENTRY_XEN(vector, func) \
|
||||
idtentry vector asm_exc_xen##func exc_##func has_error_code=0
|
||||
|
||||
/*
|
||||
* ASM code to emit the common vector entry stubs where each stub is
|
||||
* packed into 8 bytes.
|
||||
@@ -565,16 +544,28 @@ DECLARE_IDTENTRY_RAW(X86_TRAP_BP, exc_int3);
|
||||
DECLARE_IDTENTRY_RAW_ERRORCODE(X86_TRAP_PF, exc_page_fault);
|
||||
|
||||
#ifdef CONFIG_X86_MCE
|
||||
#ifdef CONFIG_X86_64
|
||||
DECLARE_IDTENTRY_MCE(X86_TRAP_MC, exc_machine_check);
|
||||
#else
|
||||
DECLARE_IDTENTRY_RAW(X86_TRAP_MC, exc_machine_check);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* NMI */
|
||||
DECLARE_IDTENTRY_NMI(X86_TRAP_NMI, exc_nmi);
|
||||
DECLARE_IDTENTRY_XEN(X86_TRAP_NMI, nmi);
|
||||
#ifdef CONFIG_XEN_PV
|
||||
DECLARE_IDTENTRY_RAW(X86_TRAP_NMI, xenpv_exc_nmi);
|
||||
#endif
|
||||
|
||||
/* #DB */
|
||||
#ifdef CONFIG_X86_64
|
||||
DECLARE_IDTENTRY_DEBUG(X86_TRAP_DB, exc_debug);
|
||||
DECLARE_IDTENTRY_XEN(X86_TRAP_DB, debug);
|
||||
#else
|
||||
DECLARE_IDTENTRY_RAW(X86_TRAP_DB, exc_debug);
|
||||
#endif
|
||||
#ifdef CONFIG_XEN_PV
|
||||
DECLARE_IDTENTRY_RAW(X86_TRAP_DB, xenpv_exc_debug);
|
||||
#endif
|
||||
|
||||
/* #DF */
|
||||
DECLARE_IDTENTRY_DF(X86_TRAP_DF, exc_double_fault);
|
||||
|
@@ -49,6 +49,13 @@ enum split_lock_detect_state {
|
||||
static enum split_lock_detect_state sld_state __ro_after_init = sld_off;
|
||||
static u64 msr_test_ctrl_cache __ro_after_init;
|
||||
|
||||
/*
|
||||
* With a name like MSR_TEST_CTL it should go without saying, but don't touch
|
||||
* MSR_TEST_CTL unless the CPU is one of the whitelisted models. Writing it
|
||||
* on CPUs that do not support SLD can cause fireworks, even when writing '0'.
|
||||
*/
|
||||
static bool cpu_model_supports_sld __ro_after_init;
|
||||
|
||||
/*
|
||||
* Processors which have self-snooping capability can handle conflicting
|
||||
* memory type across CPUs by snooping its own cache. However, there exists
|
||||
@@ -1071,7 +1078,8 @@ static void sld_update_msr(bool on)
|
||||
|
||||
static void split_lock_init(void)
|
||||
{
|
||||
split_lock_verify_msr(sld_state != sld_off);
|
||||
if (cpu_model_supports_sld)
|
||||
split_lock_verify_msr(sld_state != sld_off);
|
||||
}
|
||||
|
||||
static void split_lock_warn(unsigned long ip)
|
||||
@@ -1177,5 +1185,6 @@ void __init cpu_set_core_cap_bits(struct cpuinfo_x86 *c)
|
||||
return;
|
||||
}
|
||||
|
||||
cpu_model_supports_sld = true;
|
||||
split_lock_setup();
|
||||
}
|
||||
|
@@ -1901,6 +1901,8 @@ void (*machine_check_vector)(struct pt_regs *) = unexpected_machine_check;
|
||||
|
||||
static __always_inline void exc_machine_check_kernel(struct pt_regs *regs)
|
||||
{
|
||||
WARN_ON_ONCE(user_mode(regs));
|
||||
|
||||
/*
|
||||
* Only required when from kernel mode. See
|
||||
* mce_check_crashing_cpu() for details.
|
||||
@@ -1954,7 +1956,7 @@ DEFINE_IDTENTRY_MCE_USER(exc_machine_check)
|
||||
}
|
||||
#else
|
||||
/* 32bit unified entry point */
|
||||
DEFINE_IDTENTRY_MCE(exc_machine_check)
|
||||
DEFINE_IDTENTRY_RAW(exc_machine_check)
|
||||
{
|
||||
unsigned long dr7;
|
||||
|
||||
|
@@ -101,6 +101,12 @@ void kernel_fpu_begin(void)
|
||||
copy_fpregs_to_fpstate(¤t->thread.fpu);
|
||||
}
|
||||
__cpu_invalidate_fpregs_state();
|
||||
|
||||
if (boot_cpu_has(X86_FEATURE_XMM))
|
||||
ldmxcsr(MXCSR_DEFAULT);
|
||||
|
||||
if (boot_cpu_has(X86_FEATURE_FPU))
|
||||
asm volatile ("fninit");
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(kernel_fpu_begin);
|
||||
|
||||
|
@@ -29,6 +29,8 @@
|
||||
#include <asm/mmu_context.h>
|
||||
#include <asm/pgtable_areas.h>
|
||||
|
||||
#include <xen/xen.h>
|
||||
|
||||
/* This is a multiple of PAGE_SIZE. */
|
||||
#define LDT_SLOT_STRIDE (LDT_ENTRIES * LDT_ENTRY_SIZE)
|
||||
|
||||
@@ -543,6 +545,28 @@ static int read_default_ldt(void __user *ptr, unsigned long bytecount)
|
||||
return bytecount;
|
||||
}
|
||||
|
||||
static bool allow_16bit_segments(void)
|
||||
{
|
||||
if (!IS_ENABLED(CONFIG_X86_16BIT))
|
||||
return false;
|
||||
|
||||
#ifdef CONFIG_XEN_PV
|
||||
/*
|
||||
* Xen PV does not implement ESPFIX64, which means that 16-bit
|
||||
* segments will not work correctly. Until either Xen PV implements
|
||||
* ESPFIX64 and can signal this fact to the guest or unless someone
|
||||
* provides compelling evidence that allowing broken 16-bit segments
|
||||
* is worthwhile, disallow 16-bit segments under Xen PV.
|
||||
*/
|
||||
if (xen_pv_domain()) {
|
||||
pr_info_once("Warning: 16-bit segments do not work correctly in a Xen PV guest\n");
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static int write_ldt(void __user *ptr, unsigned long bytecount, int oldmode)
|
||||
{
|
||||
struct mm_struct *mm = current->mm;
|
||||
@@ -574,7 +598,7 @@ static int write_ldt(void __user *ptr, unsigned long bytecount, int oldmode)
|
||||
/* The user wants to clear the entry. */
|
||||
memset(&ldt, 0, sizeof(ldt));
|
||||
} else {
|
||||
if (!IS_ENABLED(CONFIG_X86_16BIT) && !ldt_info.seg_32bit) {
|
||||
if (!ldt_info.seg_32bit && !allow_16bit_segments()) {
|
||||
error = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
|
@@ -869,6 +869,12 @@ static __always_inline void exc_debug_kernel(struct pt_regs *regs,
|
||||
instrumentation_begin();
|
||||
trace_hardirqs_off_finish();
|
||||
|
||||
/*
|
||||
* If something gets miswired and we end up here for a user mode
|
||||
* #DB, we will malfunction.
|
||||
*/
|
||||
WARN_ON_ONCE(user_mode(regs));
|
||||
|
||||
/*
|
||||
* Catch SYSENTER with TF set and clear DR_STEP. If this hit a
|
||||
* watchpoint at the same time then that will still be handled.
|
||||
@@ -887,6 +893,12 @@ static __always_inline void exc_debug_kernel(struct pt_regs *regs,
|
||||
static __always_inline void exc_debug_user(struct pt_regs *regs,
|
||||
unsigned long dr6)
|
||||
{
|
||||
/*
|
||||
* If something gets miswired and we end up here for a kernel mode
|
||||
* #DB, we will malfunction.
|
||||
*/
|
||||
WARN_ON_ONCE(!user_mode(regs));
|
||||
|
||||
idtentry_enter_user(regs);
|
||||
instrumentation_begin();
|
||||
|
||||
@@ -917,7 +929,7 @@ DEFINE_IDTENTRY_DEBUG_USER(exc_debug)
|
||||
}
|
||||
#else
|
||||
/* 32 bit does not have separate entry points. */
|
||||
DEFINE_IDTENTRY_DEBUG(exc_debug)
|
||||
DEFINE_IDTENTRY_RAW(exc_debug)
|
||||
{
|
||||
unsigned long dr6, dr7;
|
||||
|
||||
|
@@ -598,6 +598,26 @@ static void xen_write_ldt_entry(struct desc_struct *dt, int entrynum,
|
||||
}
|
||||
|
||||
#ifdef CONFIG_X86_64
|
||||
void noist_exc_debug(struct pt_regs *regs);
|
||||
|
||||
DEFINE_IDTENTRY_RAW(xenpv_exc_nmi)
|
||||
{
|
||||
/* On Xen PV, NMI doesn't use IST. The C part is the sane as native. */
|
||||
exc_nmi(regs);
|
||||
}
|
||||
|
||||
DEFINE_IDTENTRY_RAW(xenpv_exc_debug)
|
||||
{
|
||||
/*
|
||||
* There's no IST on Xen PV, but we still need to dispatch
|
||||
* to the correct handler.
|
||||
*/
|
||||
if (user_mode(regs))
|
||||
noist_exc_debug(regs);
|
||||
else
|
||||
exc_debug(regs);
|
||||
}
|
||||
|
||||
struct trap_array_entry {
|
||||
void (*orig)(void);
|
||||
void (*xen)(void);
|
||||
@@ -609,18 +629,18 @@ struct trap_array_entry {
|
||||
.xen = xen_asm_##func, \
|
||||
.ist_okay = ist_ok }
|
||||
|
||||
#define TRAP_ENTRY_REDIR(func, xenfunc, ist_ok) { \
|
||||
#define TRAP_ENTRY_REDIR(func, ist_ok) { \
|
||||
.orig = asm_##func, \
|
||||
.xen = xen_asm_##xenfunc, \
|
||||
.xen = xen_asm_xenpv_##func, \
|
||||
.ist_okay = ist_ok }
|
||||
|
||||
static struct trap_array_entry trap_array[] = {
|
||||
TRAP_ENTRY_REDIR(exc_debug, exc_xendebug, true ),
|
||||
TRAP_ENTRY_REDIR(exc_debug, true ),
|
||||
TRAP_ENTRY(exc_double_fault, true ),
|
||||
#ifdef CONFIG_X86_MCE
|
||||
TRAP_ENTRY(exc_machine_check, true ),
|
||||
#endif
|
||||
TRAP_ENTRY_REDIR(exc_nmi, exc_xennmi, true ),
|
||||
TRAP_ENTRY_REDIR(exc_nmi, true ),
|
||||
TRAP_ENTRY(exc_int3, false ),
|
||||
TRAP_ENTRY(exc_overflow, false ),
|
||||
#ifdef CONFIG_IA32_EMULATION
|
||||
|
@@ -29,10 +29,9 @@ _ASM_NOKPROBE(xen_\name)
|
||||
.endm
|
||||
|
||||
xen_pv_trap asm_exc_divide_error
|
||||
xen_pv_trap asm_exc_debug
|
||||
xen_pv_trap asm_exc_xendebug
|
||||
xen_pv_trap asm_xenpv_exc_debug
|
||||
xen_pv_trap asm_exc_int3
|
||||
xen_pv_trap asm_exc_xennmi
|
||||
xen_pv_trap asm_xenpv_exc_nmi
|
||||
xen_pv_trap asm_exc_overflow
|
||||
xen_pv_trap asm_exc_bounds
|
||||
xen_pv_trap asm_exc_invalid_op
|
||||
@@ -161,10 +160,22 @@ SYM_FUNC_END(xen_syscall32_target)
|
||||
|
||||
/* 32-bit compat sysenter target */
|
||||
SYM_FUNC_START(xen_sysenter_target)
|
||||
mov 0*8(%rsp), %rcx
|
||||
mov 1*8(%rsp), %r11
|
||||
mov 5*8(%rsp), %rsp
|
||||
jmp entry_SYSENTER_compat
|
||||
/*
|
||||
* NB: Xen is polite and clears TF from EFLAGS for us. This means
|
||||
* that we don't need to guard against single step exceptions here.
|
||||
*/
|
||||
popq %rcx
|
||||
popq %r11
|
||||
|
||||
/*
|
||||
* Neither Xen nor the kernel really knows what the old SS and
|
||||
* CS were. The kernel expects __USER32_DS and __USER32_CS, so
|
||||
* report those values even though Xen will guess its own values.
|
||||
*/
|
||||
movq $__USER32_DS, 4*8(%rsp)
|
||||
movq $__USER32_CS, 1*8(%rsp)
|
||||
|
||||
jmp entry_SYSENTER_compat_after_hwframe
|
||||
SYM_FUNC_END(xen_sysenter_target)
|
||||
|
||||
#else /* !CONFIG_IA32_EMULATION */
|
||||
|
@@ -24,7 +24,8 @@ void blk_flush_integrity(void)
|
||||
flush_workqueue(kintegrityd_wq);
|
||||
}
|
||||
|
||||
void __bio_integrity_free(struct bio_set *bs, struct bio_integrity_payload *bip)
|
||||
static void __bio_integrity_free(struct bio_set *bs,
|
||||
struct bio_integrity_payload *bip)
|
||||
{
|
||||
if (bs && mempool_initialized(&bs->bio_integrity_pool)) {
|
||||
if (bip->bip_vec)
|
||||
|
@@ -125,6 +125,9 @@ static const char *const blk_queue_flag_name[] = {
|
||||
QUEUE_FLAG_NAME(REGISTERED),
|
||||
QUEUE_FLAG_NAME(SCSI_PASSTHROUGH),
|
||||
QUEUE_FLAG_NAME(QUIESCED),
|
||||
QUEUE_FLAG_NAME(PCI_P2PDMA),
|
||||
QUEUE_FLAG_NAME(ZONE_RESETALL),
|
||||
QUEUE_FLAG_NAME(RQ_ALLOC_TIME),
|
||||
};
|
||||
#undef QUEUE_FLAG_NAME
|
||||
|
||||
|
@@ -403,8 +403,7 @@ void blk_ksm_destroy(struct blk_keyslot_manager *ksm)
|
||||
if (!ksm)
|
||||
return;
|
||||
kvfree(ksm->slot_hashtable);
|
||||
memzero_explicit(ksm->slots, sizeof(ksm->slots[0]) * ksm->num_slots);
|
||||
kvfree(ksm->slots);
|
||||
kvfree_sensitive(ksm->slots, sizeof(ksm->slots[0]) * ksm->num_slots);
|
||||
memzero_explicit(ksm, sizeof(*ksm));
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(blk_ksm_destroy);
|
||||
|
@@ -128,21 +128,15 @@ EXPORT_SYMBOL_GPL(af_alg_release);
|
||||
void af_alg_release_parent(struct sock *sk)
|
||||
{
|
||||
struct alg_sock *ask = alg_sk(sk);
|
||||
unsigned int nokey = ask->nokey_refcnt;
|
||||
bool last = nokey && !ask->refcnt;
|
||||
unsigned int nokey = atomic_read(&ask->nokey_refcnt);
|
||||
|
||||
sk = ask->parent;
|
||||
ask = alg_sk(sk);
|
||||
|
||||
local_bh_disable();
|
||||
bh_lock_sock(sk);
|
||||
ask->nokey_refcnt -= nokey;
|
||||
if (!last)
|
||||
last = !--ask->refcnt;
|
||||
bh_unlock_sock(sk);
|
||||
local_bh_enable();
|
||||
if (nokey)
|
||||
atomic_dec(&ask->nokey_refcnt);
|
||||
|
||||
if (last)
|
||||
if (atomic_dec_and_test(&ask->refcnt))
|
||||
sock_put(sk);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(af_alg_release_parent);
|
||||
@@ -187,7 +181,7 @@ static int alg_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
|
||||
|
||||
err = -EBUSY;
|
||||
lock_sock(sk);
|
||||
if (ask->refcnt | ask->nokey_refcnt)
|
||||
if (atomic_read(&ask->refcnt))
|
||||
goto unlock;
|
||||
|
||||
swap(ask->type, type);
|
||||
@@ -236,7 +230,7 @@ static int alg_setsockopt(struct socket *sock, int level, int optname,
|
||||
int err = -EBUSY;
|
||||
|
||||
lock_sock(sk);
|
||||
if (ask->refcnt)
|
||||
if (atomic_read(&ask->refcnt) != atomic_read(&ask->nokey_refcnt))
|
||||
goto unlock;
|
||||
|
||||
type = ask->type;
|
||||
@@ -301,12 +295,14 @@ int af_alg_accept(struct sock *sk, struct socket *newsock, bool kern)
|
||||
if (err)
|
||||
goto unlock;
|
||||
|
||||
if (nokey || !ask->refcnt++)
|
||||
if (atomic_inc_return_relaxed(&ask->refcnt) == 1)
|
||||
sock_hold(sk);
|
||||
ask->nokey_refcnt += nokey;
|
||||
if (nokey) {
|
||||
atomic_inc(&ask->nokey_refcnt);
|
||||
atomic_set(&alg_sk(sk2)->nokey_refcnt, 1);
|
||||
}
|
||||
alg_sk(sk2)->parent = sk;
|
||||
alg_sk(sk2)->type = type;
|
||||
alg_sk(sk2)->nokey_refcnt = nokey;
|
||||
|
||||
newsock->ops = type->ops;
|
||||
newsock->state = SS_CONNECTED;
|
||||
|
@@ -384,7 +384,7 @@ static int aead_check_key(struct socket *sock)
|
||||
struct alg_sock *ask = alg_sk(sk);
|
||||
|
||||
lock_sock(sk);
|
||||
if (ask->refcnt)
|
||||
if (!atomic_read(&ask->nokey_refcnt))
|
||||
goto unlock_child;
|
||||
|
||||
psk = ask->parent;
|
||||
@@ -396,11 +396,8 @@ static int aead_check_key(struct socket *sock)
|
||||
if (crypto_aead_get_flags(tfm->aead) & CRYPTO_TFM_NEED_KEY)
|
||||
goto unlock;
|
||||
|
||||
if (!pask->refcnt++)
|
||||
sock_hold(psk);
|
||||
|
||||
ask->refcnt = 1;
|
||||
sock_put(psk);
|
||||
atomic_dec(&pask->nokey_refcnt);
|
||||
atomic_set(&ask->nokey_refcnt, 0);
|
||||
|
||||
err = 0;
|
||||
|
||||
|
@@ -301,7 +301,7 @@ static int hash_check_key(struct socket *sock)
|
||||
struct alg_sock *ask = alg_sk(sk);
|
||||
|
||||
lock_sock(sk);
|
||||
if (ask->refcnt)
|
||||
if (!atomic_read(&ask->nokey_refcnt))
|
||||
goto unlock_child;
|
||||
|
||||
psk = ask->parent;
|
||||
@@ -313,11 +313,8 @@ static int hash_check_key(struct socket *sock)
|
||||
if (crypto_ahash_get_flags(tfm) & CRYPTO_TFM_NEED_KEY)
|
||||
goto unlock;
|
||||
|
||||
if (!pask->refcnt++)
|
||||
sock_hold(psk);
|
||||
|
||||
ask->refcnt = 1;
|
||||
sock_put(psk);
|
||||
atomic_dec(&pask->nokey_refcnt);
|
||||
atomic_set(&ask->nokey_refcnt, 0);
|
||||
|
||||
err = 0;
|
||||
|
||||
|
@@ -211,7 +211,7 @@ static int skcipher_check_key(struct socket *sock)
|
||||
struct alg_sock *ask = alg_sk(sk);
|
||||
|
||||
lock_sock(sk);
|
||||
if (ask->refcnt)
|
||||
if (!atomic_read(&ask->nokey_refcnt))
|
||||
goto unlock_child;
|
||||
|
||||
psk = ask->parent;
|
||||
@@ -223,11 +223,8 @@ static int skcipher_check_key(struct socket *sock)
|
||||
if (crypto_skcipher_get_flags(tfm) & CRYPTO_TFM_NEED_KEY)
|
||||
goto unlock;
|
||||
|
||||
if (!pask->refcnt++)
|
||||
sock_hold(psk);
|
||||
|
||||
ask->refcnt = 1;
|
||||
sock_put(psk);
|
||||
atomic_dec(&pask->nokey_refcnt);
|
||||
atomic_set(&ask->nokey_refcnt, 0);
|
||||
|
||||
err = 0;
|
||||
|
||||
|
@@ -228,6 +228,7 @@ static const struct acpi_device_id int3407_device_ids[] = {
|
||||
{"INT3407", 0},
|
||||
{"INT3532", 0},
|
||||
{"INTC1047", 0},
|
||||
{"INTC1050", 0},
|
||||
{"", 0},
|
||||
};
|
||||
MODULE_DEVICE_TABLE(acpi, int3407_device_ids);
|
||||
|
@@ -25,8 +25,8 @@ static int acpi_fan_remove(struct platform_device *pdev);
|
||||
|
||||
static const struct acpi_device_id fan_device_ids[] = {
|
||||
{"PNP0C0B", 0},
|
||||
{"INT1044", 0},
|
||||
{"INT3404", 0},
|
||||
{"INTC1044", 0},
|
||||
{"", 0},
|
||||
};
|
||||
MODULE_DEVICE_TABLE(acpi, fan_device_ids);
|
||||
|
@@ -880,6 +880,7 @@ out_put_disk:
|
||||
put_disk(vblk->disk);
|
||||
out_free_vq:
|
||||
vdev->config->del_vqs(vdev);
|
||||
kfree(vblk->vqs);
|
||||
out_free_vblk:
|
||||
kfree(vblk);
|
||||
out_free_index:
|
||||
|
@@ -210,7 +210,7 @@ static int st33zp24_i2c_request_resources(struct i2c_client *client)
|
||||
|
||||
/*
|
||||
* st33zp24_i2c_probe initialize the TPM device
|
||||
* @param: client, the i2c_client drescription (TPM I2C description).
|
||||
* @param: client, the i2c_client description (TPM I2C description).
|
||||
* @param: id, the i2c_device_id struct.
|
||||
* @return: 0 in case of success.
|
||||
* -1 in other case.
|
||||
|
@@ -329,7 +329,7 @@ static int st33zp24_spi_request_resources(struct spi_device *dev)
|
||||
|
||||
/*
|
||||
* st33zp24_spi_probe initialize the TPM device
|
||||
* @param: dev, the spi_device drescription (TPM SPI description).
|
||||
* @param: dev, the spi_device description (TPM SPI description).
|
||||
* @return: 0 in case of success.
|
||||
* or a negative value describing the error.
|
||||
*/
|
||||
@@ -378,7 +378,7 @@ static int st33zp24_spi_probe(struct spi_device *dev)
|
||||
|
||||
/*
|
||||
* st33zp24_spi_remove remove the TPM device
|
||||
* @param: client, the spi_device drescription (TPM SPI description).
|
||||
* @param: client, the spi_device description (TPM SPI description).
|
||||
* @return: 0 in case of success.
|
||||
*/
|
||||
static int st33zp24_spi_remove(struct spi_device *dev)
|
||||
|
@@ -502,7 +502,7 @@ static const struct tpm_class_ops st33zp24_tpm = {
|
||||
|
||||
/*
|
||||
* st33zp24_probe initialize the TPM device
|
||||
* @param: client, the i2c_client drescription (TPM I2C description).
|
||||
* @param: client, the i2c_client description (TPM I2C description).
|
||||
* @param: id, the i2c_device_id struct.
|
||||
* @return: 0 in case of success.
|
||||
* -1 in other case.
|
||||
|
@@ -189,15 +189,6 @@ ssize_t tpm_common_write(struct file *file, const char __user *buf,
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* atomic tpm command send and result receive. We only hold the ops
|
||||
* lock during this period so that the tpm can be unregistered even if
|
||||
* the char dev is held open.
|
||||
*/
|
||||
if (tpm_try_get_ops(priv->chip)) {
|
||||
ret = -EPIPE;
|
||||
goto out;
|
||||
}
|
||||
|
||||
priv->response_length = 0;
|
||||
priv->response_read = false;
|
||||
*off = 0;
|
||||
@@ -211,11 +202,19 @@ ssize_t tpm_common_write(struct file *file, const char __user *buf,
|
||||
if (file->f_flags & O_NONBLOCK) {
|
||||
priv->command_enqueued = true;
|
||||
queue_work(tpm_dev_wq, &priv->async_work);
|
||||
tpm_put_ops(priv->chip);
|
||||
mutex_unlock(&priv->buffer_mutex);
|
||||
return size;
|
||||
}
|
||||
|
||||
/* atomic tpm command send and result receive. We only hold the ops
|
||||
* lock during this period so that the tpm can be unregistered even if
|
||||
* the char dev is held open.
|
||||
*/
|
||||
if (tpm_try_get_ops(priv->chip)) {
|
||||
ret = -EPIPE;
|
||||
goto out;
|
||||
}
|
||||
|
||||
ret = tpm_dev_transmit(priv->chip, priv->space, priv->data_buffer,
|
||||
sizeof(priv->data_buffer));
|
||||
tpm_put_ops(priv->chip);
|
||||
|
@@ -683,13 +683,6 @@ static int tpm_ibmvtpm_probe(struct vio_dev *vio_dev,
|
||||
if (rc)
|
||||
goto init_irq_cleanup;
|
||||
|
||||
if (!strcmp(id->compat, "IBM,vtpm20")) {
|
||||
chip->flags |= TPM_CHIP_FLAG_TPM2;
|
||||
rc = tpm2_get_cc_attrs_tbl(chip);
|
||||
if (rc)
|
||||
goto init_irq_cleanup;
|
||||
}
|
||||
|
||||
if (!wait_event_timeout(ibmvtpm->crq_queue.wq,
|
||||
ibmvtpm->rtce_buf != NULL,
|
||||
HZ)) {
|
||||
@@ -697,6 +690,13 @@ static int tpm_ibmvtpm_probe(struct vio_dev *vio_dev,
|
||||
goto init_irq_cleanup;
|
||||
}
|
||||
|
||||
if (!strcmp(id->compat, "IBM,vtpm20")) {
|
||||
chip->flags |= TPM_CHIP_FLAG_TPM2;
|
||||
rc = tpm2_get_cc_attrs_tbl(chip);
|
||||
if (rc)
|
||||
goto init_irq_cleanup;
|
||||
}
|
||||
|
||||
return tpm_chip_register(chip);
|
||||
init_irq_cleanup:
|
||||
do {
|
||||
|
@@ -238,7 +238,6 @@ static int tpm_tis_pnp_init(struct pnp_dev *pnp_dev,
|
||||
static struct pnp_device_id tpm_pnp_tbl[] = {
|
||||
{"PNP0C31", 0}, /* TPM */
|
||||
{"ATM1200", 0}, /* Atmel */
|
||||
{"IFX0102", 0}, /* Infineon */
|
||||
{"BCM0101", 0}, /* Broadcom */
|
||||
{"BCM0102", 0}, /* Broadcom */
|
||||
{"NSC1200", 0}, /* National */
|
||||
|
@@ -1085,7 +1085,7 @@ int tpm_tis_core_init(struct device *dev, struct tpm_tis_data *priv, int irq,
|
||||
|
||||
return 0;
|
||||
out_err:
|
||||
if ((chip->ops != NULL) && (chip->ops->clk_enable != NULL))
|
||||
if (chip->ops->clk_enable != NULL)
|
||||
chip->ops->clk_enable(chip, false);
|
||||
|
||||
tpm_tis_remove(chip);
|
||||
|
@@ -53,8 +53,6 @@ static int tpm_tis_spi_flow_control(struct tpm_tis_spi_phy *phy,
|
||||
|
||||
if ((phy->iobuf[3] & 0x01) == 0) {
|
||||
// handle SPI wait states
|
||||
phy->iobuf[0] = 0;
|
||||
|
||||
for (i = 0; i < TPM_RETRY; i++) {
|
||||
spi_xfer->len = 1;
|
||||
spi_message_init(&m);
|
||||
@@ -104,6 +102,8 @@ int tpm_tis_spi_transfer(struct tpm_tis_data *data, u32 addr, u16 len,
|
||||
if (ret < 0)
|
||||
goto exit;
|
||||
|
||||
/* Flow control transfers are receive only */
|
||||
spi_xfer.tx_buf = NULL;
|
||||
ret = phy->flow_control(phy, &spi_xfer);
|
||||
if (ret < 0)
|
||||
goto exit;
|
||||
@@ -113,9 +113,8 @@ int tpm_tis_spi_transfer(struct tpm_tis_data *data, u32 addr, u16 len,
|
||||
spi_xfer.delay.value = 5;
|
||||
spi_xfer.delay.unit = SPI_DELAY_UNIT_USECS;
|
||||
|
||||
if (in) {
|
||||
spi_xfer.tx_buf = NULL;
|
||||
} else if (out) {
|
||||
if (out) {
|
||||
spi_xfer.tx_buf = phy->iobuf;
|
||||
spi_xfer.rx_buf = NULL;
|
||||
memcpy(phy->iobuf, out, transfer_len);
|
||||
out += transfer_len;
|
||||
@@ -288,6 +287,7 @@ static struct spi_driver tpm_tis_spi_driver = {
|
||||
.pm = &tpm_tis_pm,
|
||||
.of_match_table = of_match_ptr(of_tis_spi_match),
|
||||
.acpi_match_table = ACPI_PTR(acpi_tis_spi_match),
|
||||
.probe_type = PROBE_PREFER_ASYNCHRONOUS,
|
||||
},
|
||||
.probe = tpm_tis_spi_driver_probe,
|
||||
.remove = tpm_tis_spi_remove,
|
||||
|
@@ -54,37 +54,11 @@ static char *dmabuffs_dname(struct dentry *dentry, char *buffer, int buflen)
|
||||
dentry->d_name.name, ret > 0 ? name : "");
|
||||
}
|
||||
|
||||
static const struct dentry_operations dma_buf_dentry_ops = {
|
||||
.d_dname = dmabuffs_dname,
|
||||
};
|
||||
|
||||
static struct vfsmount *dma_buf_mnt;
|
||||
|
||||
static int dma_buf_fs_init_context(struct fs_context *fc)
|
||||
{
|
||||
struct pseudo_fs_context *ctx;
|
||||
|
||||
ctx = init_pseudo(fc, DMA_BUF_MAGIC);
|
||||
if (!ctx)
|
||||
return -ENOMEM;
|
||||
ctx->dops = &dma_buf_dentry_ops;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct file_system_type dma_buf_fs_type = {
|
||||
.name = "dmabuf",
|
||||
.init_fs_context = dma_buf_fs_init_context,
|
||||
.kill_sb = kill_anon_super,
|
||||
};
|
||||
|
||||
static int dma_buf_release(struct inode *inode, struct file *file)
|
||||
static void dma_buf_release(struct dentry *dentry)
|
||||
{
|
||||
struct dma_buf *dmabuf;
|
||||
|
||||
if (!is_dma_buf_file(file))
|
||||
return -EINVAL;
|
||||
|
||||
dmabuf = file->private_data;
|
||||
dmabuf = dentry->d_fsdata;
|
||||
|
||||
BUG_ON(dmabuf->vmapping_counter);
|
||||
|
||||
@@ -110,9 +84,32 @@ static int dma_buf_release(struct inode *inode, struct file *file)
|
||||
module_put(dmabuf->owner);
|
||||
kfree(dmabuf->name);
|
||||
kfree(dmabuf);
|
||||
}
|
||||
|
||||
static const struct dentry_operations dma_buf_dentry_ops = {
|
||||
.d_dname = dmabuffs_dname,
|
||||
.d_release = dma_buf_release,
|
||||
};
|
||||
|
||||
static struct vfsmount *dma_buf_mnt;
|
||||
|
||||
static int dma_buf_fs_init_context(struct fs_context *fc)
|
||||
{
|
||||
struct pseudo_fs_context *ctx;
|
||||
|
||||
ctx = init_pseudo(fc, DMA_BUF_MAGIC);
|
||||
if (!ctx)
|
||||
return -ENOMEM;
|
||||
ctx->dops = &dma_buf_dentry_ops;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct file_system_type dma_buf_fs_type = {
|
||||
.name = "dmabuf",
|
||||
.init_fs_context = dma_buf_fs_init_context,
|
||||
.kill_sb = kill_anon_super,
|
||||
};
|
||||
|
||||
static int dma_buf_mmap_internal(struct file *file, struct vm_area_struct *vma)
|
||||
{
|
||||
struct dma_buf *dmabuf;
|
||||
@@ -412,7 +409,6 @@ static void dma_buf_show_fdinfo(struct seq_file *m, struct file *file)
|
||||
}
|
||||
|
||||
static const struct file_operations dma_buf_fops = {
|
||||
.release = dma_buf_release,
|
||||
.mmap = dma_buf_mmap_internal,
|
||||
.llseek = dma_buf_llseek,
|
||||
.poll = dma_buf_poll,
|
||||
|
@@ -204,6 +204,7 @@ amdgpu_atomfirmware_get_vram_info(struct amdgpu_device *adev,
|
||||
(mode_info->atom_context->bios + data_offset);
|
||||
switch (crev) {
|
||||
case 11:
|
||||
case 12:
|
||||
mem_channel_number = igp_info->v11.umachannelnumber;
|
||||
/* channel width is 64 */
|
||||
if (vram_width)
|
||||
|
@@ -2784,7 +2784,7 @@ static ssize_t amdgpu_hwmon_show_sclk(struct device *dev,
|
||||
if (r)
|
||||
return r;
|
||||
|
||||
return snprintf(buf, PAGE_SIZE, "%d\n", sclk * 10 * 1000);
|
||||
return snprintf(buf, PAGE_SIZE, "%u\n", sclk * 10 * 1000);
|
||||
}
|
||||
|
||||
static ssize_t amdgpu_hwmon_show_sclk_label(struct device *dev,
|
||||
@@ -2819,7 +2819,7 @@ static ssize_t amdgpu_hwmon_show_mclk(struct device *dev,
|
||||
if (r)
|
||||
return r;
|
||||
|
||||
return snprintf(buf, PAGE_SIZE, "%d\n", mclk * 10 * 1000);
|
||||
return snprintf(buf, PAGE_SIZE, "%u\n", mclk * 10 * 1000);
|
||||
}
|
||||
|
||||
static ssize_t amdgpu_hwmon_show_mclk_label(struct device *dev,
|
||||
|
@@ -2538,10 +2538,12 @@ void dc_commit_updates_for_stream(struct dc *dc,
|
||||
|
||||
copy_stream_update_to_stream(dc, context, stream, stream_update);
|
||||
|
||||
if (!dc->res_pool->funcs->validate_bandwidth(dc, context, false)) {
|
||||
DC_ERROR("Mode validation failed for stream update!\n");
|
||||
dc_release_state(context);
|
||||
return;
|
||||
if (update_type > UPDATE_TYPE_FAST) {
|
||||
if (!dc->res_pool->funcs->validate_bandwidth(dc, context, false)) {
|
||||
DC_ERROR("Mode validation failed for stream update!\n");
|
||||
dc_release_state(context);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
commit_planes_for_stream(
|
||||
|
@@ -522,9 +522,11 @@ static int vega20_smu_init(struct pp_hwmgr *hwmgr)
|
||||
priv->smu_tables.entry[TABLE_ACTIVITY_MONITOR_COEFF].version = 0x01;
|
||||
priv->smu_tables.entry[TABLE_ACTIVITY_MONITOR_COEFF].size = sizeof(DpmActivityMonitorCoeffInt_t);
|
||||
|
||||
ret = smu_v11_0_i2c_eeprom_control_init(&adev->pm.smu_i2c);
|
||||
if (ret)
|
||||
goto err4;
|
||||
if (adev->psp.ras.ras) {
|
||||
ret = smu_v11_0_i2c_eeprom_control_init(&adev->pm.smu_i2c);
|
||||
if (ret)
|
||||
goto err4;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -560,7 +562,8 @@ static int vega20_smu_fini(struct pp_hwmgr *hwmgr)
|
||||
(struct vega20_smumgr *)(hwmgr->smu_backend);
|
||||
struct amdgpu_device *adev = hwmgr->adev;
|
||||
|
||||
smu_v11_0_i2c_eeprom_control_fini(&adev->pm.smu_i2c);
|
||||
if (adev->psp.ras.ras)
|
||||
smu_v11_0_i2c_eeprom_control_fini(&adev->pm.smu_i2c);
|
||||
|
||||
if (priv) {
|
||||
amdgpu_bo_free_kernel(&priv->smu_tables.entry[TABLE_PPTABLE].handle,
|
||||
|
@@ -61,7 +61,7 @@ static int drm_iommu_attach_device(struct drm_device *drm_dev,
|
||||
struct device *subdrv_dev, void **dma_priv)
|
||||
{
|
||||
struct exynos_drm_private *priv = drm_dev->dev_private;
|
||||
int ret;
|
||||
int ret = 0;
|
||||
|
||||
if (get_dma_ops(priv->dma_dev) != get_dma_ops(subdrv_dev)) {
|
||||
DRM_DEV_ERROR(subdrv_dev, "Device %s lacks support for IOMMU\n",
|
||||
@@ -92,7 +92,7 @@ static int drm_iommu_attach_device(struct drm_device *drm_dev,
|
||||
if (ret)
|
||||
clear_dma_max_seg_size(subdrv_dev);
|
||||
|
||||
return 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@@ -1498,7 +1498,6 @@ static int g2d_probe(struct platform_device *pdev)
|
||||
|
||||
g2d->irq = platform_get_irq(pdev, 0);
|
||||
if (g2d->irq < 0) {
|
||||
dev_err(dev, "failed to get irq\n");
|
||||
ret = g2d->irq;
|
||||
goto err_put_clk;
|
||||
}
|
||||
|
@@ -269,8 +269,10 @@ static void mic_pre_enable(struct drm_bridge *bridge)
|
||||
goto unlock;
|
||||
|
||||
ret = pm_runtime_get_sync(mic->dev);
|
||||
if (ret < 0)
|
||||
if (ret < 0) {
|
||||
pm_runtime_put_noidle(mic->dev);
|
||||
goto unlock;
|
||||
}
|
||||
|
||||
mic_set_path(mic, 1);
|
||||
|
||||
|
46
drivers/gpu/drm/i915/gt/shaders/README
Normal file
46
drivers/gpu/drm/i915/gt/shaders/README
Normal file
@@ -0,0 +1,46 @@
|
||||
ASM sources for auto generated shaders
|
||||
======================================
|
||||
|
||||
The i915/gt/hsw_clear_kernel.c and i915/gt/ivb_clear_kernel.c files contain
|
||||
pre-compiled batch chunks that will clear any residual render cache during
|
||||
context switch.
|
||||
|
||||
They are generated from their respective platform ASM files present on
|
||||
i915/gt/shaders/clear_kernel directory.
|
||||
|
||||
The generated .c files should never be modified directly. Instead, any modification
|
||||
needs to be done on the on their respective ASM files and build instructions below
|
||||
needes to be followed.
|
||||
|
||||
Building
|
||||
========
|
||||
|
||||
Environment
|
||||
-----------
|
||||
|
||||
IGT GPU tool scripts and the Mesa's i965 instruction assembler tool are used
|
||||
on building.
|
||||
|
||||
Please make sure your Mesa tool is compiled with "-Dtools=intel" and
|
||||
"-Ddri-drivers=i965", and run this script from IGT source root directory"
|
||||
|
||||
The instructions bellow assume:
|
||||
* IGT gpu tools source code is located on your home directory (~) as ~/igt
|
||||
* Mesa source code is located on your home directory (~) as ~/mesa
|
||||
and built under the ~/mesa/build directory
|
||||
* Linux kernel source code is under your home directory (~) as ~/linux
|
||||
|
||||
Instructions
|
||||
------------
|
||||
|
||||
~ $ cp ~/linux/drivers/gpu/drm/i915/gt/shaders/clear_kernel/ivb.asm \
|
||||
~/igt/lib/i915/shaders/clear_kernel/ivb.asm
|
||||
~ $ cd ~/igt
|
||||
igt $ ./scripts/generate_clear_kernel.sh -g ivb \
|
||||
-m ~/mesa/build/src/intel/tools/i965_asm
|
||||
|
||||
~ $ cp ~/linux/drivers/gpu/drm/i915/gt/shaders/clear_kernel/hsw.asm \
|
||||
~/igt/lib/i915/shaders/clear_kernel/hsw.asm
|
||||
~ $ cd ~/igt
|
||||
igt $ ./scripts/generate_clear_kernel.sh -g hsw \
|
||||
-m ~/mesa/build/src/intel/tools/i965_asm
|
119
drivers/gpu/drm/i915/gt/shaders/clear_kernel/hsw.asm
Normal file
119
drivers/gpu/drm/i915/gt/shaders/clear_kernel/hsw.asm
Normal file
@@ -0,0 +1,119 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
/*
|
||||
* Copyright © 2020 Intel Corporation
|
||||
*/
|
||||
|
||||
/*
|
||||
* Kernel for PAVP buffer clear.
|
||||
*
|
||||
* 1. Clear all 64 GRF registers assigned to the kernel with designated value;
|
||||
* 2. Write 32x16 block of all "0" to render target buffer which indirectly clears
|
||||
* 512 bytes of Render Cache.
|
||||
*/
|
||||
|
||||
/* Store designated "clear GRF" value */
|
||||
mov(1) f0.1<1>UW g1.2<0,1,0>UW { align1 1N };
|
||||
|
||||
/**
|
||||
* Curbe Format
|
||||
*
|
||||
* DW 1.0 - Block Offset to write Render Cache
|
||||
* DW 1.1 [15:0] - Clear Word
|
||||
* DW 1.2 - Delay iterations
|
||||
* DW 1.3 - Enable Instrumentation (only for debug)
|
||||
* DW 1.4 - Rsvd (intended for context ID)
|
||||
* DW 1.5 - [31:16]:SliceCount, [15:0]:SubSlicePerSliceCount
|
||||
* DW 1.6 - Rsvd MBZ (intended for Enable Wait on Total Thread Count)
|
||||
* DW 1.7 - Rsvd MBZ (inteded for Total Thread Count)
|
||||
*
|
||||
* Binding Table
|
||||
*
|
||||
* BTI 0: 2D Surface to help clear L3 (Render/Data Cache)
|
||||
* BTI 1: Wait/Instrumentation Buffer
|
||||
* Size : (SliceCount * SubSliceCount * 16 EUs/SubSlice) rows * (16 threads/EU) cols (Format R32_UINT)
|
||||
* Expected to be initialized to 0 by driver/another kernel
|
||||
* Layout:
|
||||
* RowN: Histogram for EU-N: (SliceID*SubSlicePerSliceCount + SSID)*16 + EUID [assume max 16 EUs / SS]
|
||||
* Col-k[DW-k]: Threads Executed on ThreadID-k for EU-N
|
||||
*/
|
||||
add(1) g1.2<1>UD g1.2<0,1,0>UD 0x00000001UD { align1 1N }; /* Loop count to delay kernel: Init to (g1.2 + 1) */
|
||||
cmp.z.f0.0(1) null<1>UD g1.3<0,1,0>UD 0x00000000UD { align1 1N };
|
||||
(+f0.0) jmpi(1) 352D { align1 WE_all 1N };
|
||||
|
||||
/**
|
||||
* State Register has info on where this thread is running
|
||||
* IVB: sr0.0 :: [15:13]: MBZ, 12: HSID (Half-Slice ID), [11:8]EUID, [2:0] ThreadSlotID
|
||||
* HSW: sr0.0 :: 15: MBZ, [14:13]: SliceID, 12: HSID (Half-Slice ID), [11:8]EUID, [2:0] ThreadSlotID
|
||||
*/
|
||||
mov(8) g3<1>UD 0x00000000UD { align1 1Q };
|
||||
shr(1) g3<1>D sr0<0,1,0>D 12D { align1 1N };
|
||||
and(1) g3<1>D g3<0,1,0>D 1D { align1 1N }; /* g3 has HSID */
|
||||
shr(1) g3.1<1>D sr0<0,1,0>D 13D { align1 1N };
|
||||
and(1) g3.1<1>D g3.1<0,1,0>D 3D { align1 1N }; /* g3.1 has sliceID */
|
||||
mul(1) g3.5<1>D g3.1<0,1,0>D g1.10<0,1,0>UW { align1 1N };
|
||||
add(1) g3<1>D g3<0,1,0>D g3.5<0,1,0>D { align1 1N }; /* g3 = sliceID * SubSlicePerSliceCount + HSID */
|
||||
shr(1) g3.2<1>D sr0<0,1,0>D 8D { align1 1N };
|
||||
and(1) g3.2<1>D g3.2<0,1,0>D 15D { align1 1N }; /* g3.2 = EUID */
|
||||
mul(1) g3.4<1>D g3<0,1,0>D 16D { align1 1N };
|
||||
add(1) g3.2<1>D g3.2<0,1,0>D g3.4<0,1,0>D { align1 1N }; /* g3.2 now points to EU row number (Y-pixel = V address ) in instrumentation surf */
|
||||
|
||||
mov(8) g5<1>UD 0x00000000UD { align1 1Q };
|
||||
and(1) g3.3<1>D sr0<0,1,0>D 7D { align1 1N };
|
||||
mul(1) g3.3<1>D g3.3<0,1,0>D 4D { align1 1N };
|
||||
|
||||
mov(8) g4<1>UD g0<8,8,1>UD { align1 1Q }; /* Initialize message header with g0 */
|
||||
mov(1) g4<1>UD g3.3<0,1,0>UD { align1 1N }; /* Block offset */
|
||||
mov(1) g4.1<1>UD g3.2<0,1,0>UD { align1 1N }; /* Block offset */
|
||||
mov(1) g4.2<1>UD 0x00000003UD { align1 1N }; /* Block size (1 row x 4 bytes) */
|
||||
and(1) g4.3<1>UD g4.3<0,1,0>UW 0xffffffffUD { align1 1N };
|
||||
|
||||
/* Media block read to fetch current value at specified location in instrumentation buffer */
|
||||
sendc(8) g5<1>UD g4<8,8,1>F 0x02190001
|
||||
|
||||
render MsgDesc: media block read MsgCtrl = 0x0 Surface = 1 mlen 1 rlen 1 { align1 1Q };
|
||||
add(1) g5<1>D g5<0,1,0>D 1D { align1 1N };
|
||||
|
||||
/* Media block write for updated value at specified location in instrumentation buffer */
|
||||
sendc(8) g5<1>UD g4<8,8,1>F 0x040a8001
|
||||
render MsgDesc: media block write MsgCtrl = 0x0 Surface = 1 mlen 2 rlen 0 { align1 1Q };
|
||||
|
||||
/* Delay thread for specified parameter */
|
||||
add.nz.f0.0(1) g1.2<1>UD g1.2<0,1,0>UD -1D { align1 1N };
|
||||
(+f0.0) jmpi(1) -32D { align1 WE_all 1N };
|
||||
|
||||
/* Store designated "clear GRF" value */
|
||||
mov(1) f0.1<1>UW g1.2<0,1,0>UW { align1 1N };
|
||||
|
||||
/* Initialize looping parameters */
|
||||
mov(1) a0<1>D 0D { align1 1N }; /* Initialize a0.0:w=0 */
|
||||
mov(1) a0.4<1>W 127W { align1 1N }; /* Loop count. Each loop contains 16 GRF's */
|
||||
|
||||
/* Write 32x16 all "0" block */
|
||||
mov(8) g2<1>UD g0<8,8,1>UD { align1 1Q };
|
||||
mov(8) g127<1>UD g0<8,8,1>UD { align1 1Q };
|
||||
mov(2) g2<1>UD g1<2,2,1>UW { align1 1N };
|
||||
mov(1) g2.2<1>UD 0x000f000fUD { align1 1N }; /* Block size (16x16) */
|
||||
and(1) g2.3<1>UD g2.3<0,1,0>UW 0xffffffefUD { align1 1N };
|
||||
mov(16) g3<1>UD 0x00000000UD { align1 1H };
|
||||
mov(16) g4<1>UD 0x00000000UD { align1 1H };
|
||||
mov(16) g5<1>UD 0x00000000UD { align1 1H };
|
||||
mov(16) g6<1>UD 0x00000000UD { align1 1H };
|
||||
mov(16) g7<1>UD 0x00000000UD { align1 1H };
|
||||
mov(16) g8<1>UD 0x00000000UD { align1 1H };
|
||||
mov(16) g9<1>UD 0x00000000UD { align1 1H };
|
||||
mov(16) g10<1>UD 0x00000000UD { align1 1H };
|
||||
sendc(8) null<1>UD g2<8,8,1>F 0x120a8000
|
||||
render MsgDesc: media block write MsgCtrl = 0x0 Surface = 0 mlen 9 rlen 0 { align1 1Q };
|
||||
add(1) g2<1>UD g1<0,1,0>UW 0x0010UW { align1 1N };
|
||||
sendc(8) null<1>UD g2<8,8,1>F 0x120a8000
|
||||
render MsgDesc: media block write MsgCtrl = 0x0 Surface = 0 mlen 9 rlen 0 { align1 1Q };
|
||||
|
||||
/* Now, clear all GRF registers */
|
||||
add.nz.f0.0(1) a0.4<1>W a0.4<0,1,0>W -1W { align1 1N };
|
||||
mov(16) g[a0]<1>UW f0.1<0,1,0>UW { align1 1H };
|
||||
add(1) a0<1>D a0<0,1,0>D 32D { align1 1N };
|
||||
(+f0.0) jmpi(1) -64D { align1 WE_all 1N };
|
||||
|
||||
/* Terminante the thread */
|
||||
sendc(8) null<1>UD g127<8,8,1>F 0x82000010
|
||||
thread_spawner MsgDesc: mlen 1 rlen 0 { align1 1Q EOT };
|
117
drivers/gpu/drm/i915/gt/shaders/clear_kernel/ivb.asm
Normal file
117
drivers/gpu/drm/i915/gt/shaders/clear_kernel/ivb.asm
Normal file
@@ -0,0 +1,117 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
/*
|
||||
* Copyright © 2020 Intel Corporation
|
||||
*/
|
||||
|
||||
/*
|
||||
* Kernel for PAVP buffer clear.
|
||||
*
|
||||
* 1. Clear all 64 GRF registers assigned to the kernel with designated value;
|
||||
* 2. Write 32x16 block of all "0" to render target buffer which indirectly clears
|
||||
* 512 bytes of Render Cache.
|
||||
*/
|
||||
|
||||
/* Store designated "clear GRF" value */
|
||||
mov(1) f0.1<1>UW g1.2<0,1,0>UW { align1 1N };
|
||||
|
||||
/**
|
||||
* Curbe Format
|
||||
*
|
||||
* DW 1.0 - Block Offset to write Render Cache
|
||||
* DW 1.1 [15:0] - Clear Word
|
||||
* DW 1.2 - Delay iterations
|
||||
* DW 1.3 - Enable Instrumentation (only for debug)
|
||||
* DW 1.4 - Rsvd (intended for context ID)
|
||||
* DW 1.5 - [31:16]:SliceCount, [15:0]:SubSlicePerSliceCount
|
||||
* DW 1.6 - Rsvd MBZ (intended for Enable Wait on Total Thread Count)
|
||||
* DW 1.7 - Rsvd MBZ (inteded for Total Thread Count)
|
||||
*
|
||||
* Binding Table
|
||||
*
|
||||
* BTI 0: 2D Surface to help clear L3 (Render/Data Cache)
|
||||
* BTI 1: Wait/Instrumentation Buffer
|
||||
* Size : (SliceCount * SubSliceCount * 16 EUs/SubSlice) rows * (16 threads/EU) cols (Format R32_UINT)
|
||||
* Expected to be initialized to 0 by driver/another kernel
|
||||
* Layout :
|
||||
* RowN: Histogram for EU-N: (SliceID*SubSlicePerSliceCount + SSID)*16 + EUID [assume max 16 EUs / SS]
|
||||
* Col-k[DW-k]: Threads Executed on ThreadID-k for EU-N
|
||||
*/
|
||||
add(1) g1.2<1>UD g1.2<0,1,0>UD 0x00000001UD { align1 1N }; /* Loop count to delay kernel: Init to (g1.2 + 1) */
|
||||
cmp.z.f0.0(1) null<1>UD g1.3<0,1,0>UD 0x00000000UD { align1 1N };
|
||||
(+f0.0) jmpi(1) 44D { align1 WE_all 1N };
|
||||
|
||||
/**
|
||||
* State Register has info on where this thread is running
|
||||
* IVB: sr0.0 :: [15:13]: MBZ, 12: HSID (Half-Slice ID), [11:8]EUID, [2:0] ThreadSlotID
|
||||
* HSW: sr0.0 :: 15: MBZ, [14:13]: SliceID, 12: HSID (Half-Slice ID), [11:8]EUID, [2:0] ThreadSlotID
|
||||
*/
|
||||
mov(8) g3<1>UD 0x00000000UD { align1 1Q };
|
||||
shr(1) g3<1>D sr0<0,1,0>D 12D { align1 1N };
|
||||
and(1) g3<1>D g3<0,1,0>D 1D { align1 1N }; /* g3 has HSID */
|
||||
shr(1) g3.1<1>D sr0<0,1,0>D 13D { align1 1N };
|
||||
and(1) g3.1<1>D g3.1<0,1,0>D 3D { align1 1N }; /* g3.1 has sliceID */
|
||||
mul(1) g3.5<1>D g3.1<0,1,0>D g1.10<0,1,0>UW { align1 1N };
|
||||
add(1) g3<1>D g3<0,1,0>D g3.5<0,1,0>D { align1 1N }; /* g3 = sliceID * SubSlicePerSliceCount + HSID */
|
||||
shr(1) g3.2<1>D sr0<0,1,0>D 8D { align1 1N };
|
||||
and(1) g3.2<1>D g3.2<0,1,0>D 15D { align1 1N }; /* g3.2 = EUID */
|
||||
mul(1) g3.4<1>D g3<0,1,0>D 16D { align1 1N };
|
||||
add(1) g3.2<1>D g3.2<0,1,0>D g3.4<0,1,0>D { align1 1N }; /* g3.2 now points to EU row number (Y-pixel = V address ) in instrumentation surf */
|
||||
|
||||
mov(8) g5<1>UD 0x00000000UD { align1 1Q };
|
||||
and(1) g3.3<1>D sr0<0,1,0>D 7D { align1 1N };
|
||||
mul(1) g3.3<1>D g3.3<0,1,0>D 4D { align1 1N };
|
||||
|
||||
mov(8) g4<1>UD g0<8,8,1>UD { align1 1Q }; /* Initialize message header with g0 */
|
||||
mov(1) g4<1>UD g3.3<0,1,0>UD { align1 1N }; /* Block offset */
|
||||
mov(1) g4.1<1>UD g3.2<0,1,0>UD { align1 1N }; /* Block offset */
|
||||
mov(1) g4.2<1>UD 0x00000003UD { align1 1N }; /* Block size (1 row x 4 bytes) */
|
||||
and(1) g4.3<1>UD g4.3<0,1,0>UW 0xffffffffUD { align1 1N };
|
||||
|
||||
/* Media block read to fetch current value at specified location in instrumentation buffer */
|
||||
sendc(8) g5<1>UD g4<8,8,1>F 0x02190001
|
||||
render MsgDesc: media block read MsgCtrl = 0x0 Surface = 1 mlen 1 rlen 1 { align1 1Q };
|
||||
add(1) g5<1>D g5<0,1,0>D 1D { align1 1N };
|
||||
|
||||
/* Media block write for updated value at specified location in instrumentation buffer */
|
||||
sendc(8) g5<1>UD g4<8,8,1>F 0x040a8001
|
||||
render MsgDesc: media block write MsgCtrl = 0x0 Surface = 1 mlen 2 rlen 0 { align1 1Q };
|
||||
/* Delay thread for specified parameter */
|
||||
add.nz.f0.0(1) g1.2<1>UD g1.2<0,1,0>UD -1D { align1 1N };
|
||||
(+f0.0) jmpi(1) -4D { align1 WE_all 1N };
|
||||
|
||||
/* Store designated "clear GRF" value */
|
||||
mov(1) f0.1<1>UW g1.2<0,1,0>UW { align1 1N };
|
||||
|
||||
/* Initialize looping parameters */
|
||||
mov(1) a0<1>D 0D { align1 1N }; /* Initialize a0.0:w=0 */
|
||||
mov(1) a0.4<1>W 127W { align1 1N }; /* Loop count. Each loop contains 16 GRF's */
|
||||
|
||||
/* Write 32x16 all "0" block */
|
||||
mov(8) g2<1>UD g0<8,8,1>UD { align1 1Q };
|
||||
mov(8) g127<1>UD g0<8,8,1>UD { align1 1Q };
|
||||
mov(2) g2<1>UD g1<2,2,1>UW { align1 1N };
|
||||
mov(1) g2.2<1>UD 0x000f000fUD { align1 1N }; /* Block size (16x16) */
|
||||
and(1) g2.3<1>UD g2.3<0,1,0>UW 0xffffffefUD { align1 1N };
|
||||
mov(16) g3<1>UD 0x00000000UD { align1 1H };
|
||||
mov(16) g4<1>UD 0x00000000UD { align1 1H };
|
||||
mov(16) g5<1>UD 0x00000000UD { align1 1H };
|
||||
mov(16) g6<1>UD 0x00000000UD { align1 1H };
|
||||
mov(16) g7<1>UD 0x00000000UD { align1 1H };
|
||||
mov(16) g8<1>UD 0x00000000UD { align1 1H };
|
||||
mov(16) g9<1>UD 0x00000000UD { align1 1H };
|
||||
mov(16) g10<1>UD 0x00000000UD { align1 1H };
|
||||
sendc(8) null<1>UD g2<8,8,1>F 0x120a8000
|
||||
render MsgDesc: media block write MsgCtrl = 0x0 Surface = 0 mlen 9 rlen 0 { align1 1Q };
|
||||
add(1) g2<1>UD g1<0,1,0>UW 0x0010UW { align1 1N };
|
||||
sendc(8) null<1>UD g2<8,8,1>F 0x120a8000
|
||||
render MsgDesc: media block write MsgCtrl = 0x0 Surface = 0 mlen 9 rlen 0 { align1 1Q };
|
||||
|
||||
/* Now, clear all GRF registers */
|
||||
add.nz.f0.0(1) a0.4<1>W a0.4<0,1,0>W -1W { align1 1N };
|
||||
mov(16) g[a0]<1>UW f0.1<0,1,0>UW { align1 1H };
|
||||
add(1) a0<1>D a0<0,1,0>D 32D { align1 1N };
|
||||
(+f0.0) jmpi(1) -8D { align1 WE_all 1N };
|
||||
|
||||
/* Terminante the thread */
|
||||
sendc(8) null<1>UD g127<8,8,1>F 0x82000010
|
||||
thread_spawner MsgDesc: mlen 1 rlen 0 { align1 1Q EOT };
|
@@ -66,7 +66,7 @@ static inline int mmio_diff_handler(struct intel_gvt *gvt,
|
||||
vreg = vgpu_vreg(param->vgpu, offset);
|
||||
|
||||
if (preg != vreg) {
|
||||
node = kmalloc(sizeof(*node), GFP_KERNEL);
|
||||
node = kmalloc(sizeof(*node), GFP_ATOMIC);
|
||||
if (!node)
|
||||
return -ENOMEM;
|
||||
|
||||
|
@@ -1726,13 +1726,13 @@ static int ring_mode_mmio_write(struct intel_vgpu *vgpu, unsigned int offset,
|
||||
(*(u32 *)p_data) &= ~_MASKED_BIT_ENABLE(2);
|
||||
write_vreg(vgpu, offset, p_data, bytes);
|
||||
|
||||
if (data & _MASKED_BIT_ENABLE(1)) {
|
||||
if (IS_MASKED_BITS_ENABLED(data, 1)) {
|
||||
enter_failsafe_mode(vgpu, GVT_FAILSAFE_UNSUPPORTED_GUEST);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (IS_COFFEELAKE(vgpu->gvt->gt->i915) &&
|
||||
data & _MASKED_BIT_ENABLE(2)) {
|
||||
IS_MASKED_BITS_ENABLED(data, 2)) {
|
||||
enter_failsafe_mode(vgpu, GVT_FAILSAFE_UNSUPPORTED_GUEST);
|
||||
return 0;
|
||||
}
|
||||
@@ -1741,14 +1741,14 @@ static int ring_mode_mmio_write(struct intel_vgpu *vgpu, unsigned int offset,
|
||||
* pvinfo, if not, we will treat this guest as non-gvtg-aware
|
||||
* guest, and stop emulating its cfg space, mmio, gtt, etc.
|
||||
*/
|
||||
if (((data & _MASKED_BIT_ENABLE(GFX_PPGTT_ENABLE)) ||
|
||||
(data & _MASKED_BIT_ENABLE(GFX_RUN_LIST_ENABLE)))
|
||||
&& !vgpu->pv_notified) {
|
||||
if ((IS_MASKED_BITS_ENABLED(data, GFX_PPGTT_ENABLE) ||
|
||||
IS_MASKED_BITS_ENABLED(data, GFX_RUN_LIST_ENABLE)) &&
|
||||
!vgpu->pv_notified) {
|
||||
enter_failsafe_mode(vgpu, GVT_FAILSAFE_UNSUPPORTED_GUEST);
|
||||
return 0;
|
||||
}
|
||||
if ((data & _MASKED_BIT_ENABLE(GFX_RUN_LIST_ENABLE))
|
||||
|| (data & _MASKED_BIT_DISABLE(GFX_RUN_LIST_ENABLE))) {
|
||||
if (IS_MASKED_BITS_ENABLED(data, GFX_RUN_LIST_ENABLE) ||
|
||||
IS_MASKED_BITS_DISABLED(data, GFX_RUN_LIST_ENABLE)) {
|
||||
enable_execlist = !!(data & GFX_RUN_LIST_ENABLE);
|
||||
|
||||
gvt_dbg_core("EXECLIST %s on ring %s\n",
|
||||
@@ -1809,7 +1809,7 @@ static int ring_reset_ctl_write(struct intel_vgpu *vgpu,
|
||||
write_vreg(vgpu, offset, p_data, bytes);
|
||||
data = vgpu_vreg(vgpu, offset);
|
||||
|
||||
if (data & _MASKED_BIT_ENABLE(RESET_CTL_REQUEST_RESET))
|
||||
if (IS_MASKED_BITS_ENABLED(data, RESET_CTL_REQUEST_RESET))
|
||||
data |= RESET_CTL_READY_TO_RESET;
|
||||
else if (data & _MASKED_BIT_DISABLE(RESET_CTL_REQUEST_RESET))
|
||||
data &= ~RESET_CTL_READY_TO_RESET;
|
||||
@@ -1827,7 +1827,8 @@ static int csfe_chicken1_mmio_write(struct intel_vgpu *vgpu,
|
||||
(*(u32 *)p_data) &= ~_MASKED_BIT_ENABLE(0x18);
|
||||
write_vreg(vgpu, offset, p_data, bytes);
|
||||
|
||||
if (data & _MASKED_BIT_ENABLE(0x10) || data & _MASKED_BIT_ENABLE(0x8))
|
||||
if (IS_MASKED_BITS_ENABLED(data, 0x10) ||
|
||||
IS_MASKED_BITS_ENABLED(data, 0x8))
|
||||
enter_failsafe_mode(vgpu, GVT_FAILSAFE_UNSUPPORTED_GUEST);
|
||||
|
||||
return 0;
|
||||
@@ -3055,6 +3056,7 @@ static int init_skl_mmio_info(struct intel_gvt *gvt)
|
||||
MMIO_D(_MMIO(0x72380), D_SKL_PLUS);
|
||||
MMIO_D(_MMIO(0x7239c), D_SKL_PLUS);
|
||||
MMIO_D(_MMIO(_PLANE_SURF_3_A), D_SKL_PLUS);
|
||||
MMIO_D(_MMIO(_PLANE_SURF_3_B), D_SKL_PLUS);
|
||||
|
||||
MMIO_D(CSR_SSP_BASE, D_SKL_PLUS);
|
||||
MMIO_D(CSR_HTP_SKL, D_SKL_PLUS);
|
||||
@@ -3131,8 +3133,8 @@ static int init_skl_mmio_info(struct intel_gvt *gvt)
|
||||
MMIO_DFH(GEN9_WM_CHICKEN3, D_SKL_PLUS, F_MODE_MASK | F_CMD_ACCESS,
|
||||
NULL, NULL);
|
||||
|
||||
MMIO_D(GAMT_CHKN_BIT_REG, D_KBL);
|
||||
MMIO_D(GEN9_CTX_PREEMPT_REG, D_KBL | D_SKL);
|
||||
MMIO_D(GAMT_CHKN_BIT_REG, D_KBL | D_CFL);
|
||||
MMIO_D(GEN9_CTX_PREEMPT_REG, D_SKL_PLUS);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@@ -54,8 +54,8 @@ bool is_inhibit_context(struct intel_context *ce);
|
||||
|
||||
int intel_vgpu_restore_inhibit_context(struct intel_vgpu *vgpu,
|
||||
struct i915_request *req);
|
||||
#define IS_RESTORE_INHIBIT(a) \
|
||||
(_MASKED_BIT_ENABLE(CTX_CTRL_ENGINE_CTX_RESTORE_INHIBIT) == \
|
||||
((a) & _MASKED_BIT_ENABLE(CTX_CTRL_ENGINE_CTX_RESTORE_INHIBIT)))
|
||||
|
||||
#define IS_RESTORE_INHIBIT(a) \
|
||||
IS_MASKED_BITS_ENABLED(a, CTX_CTRL_ENGINE_CTX_RESTORE_INHIBIT)
|
||||
|
||||
#endif
|
||||
|
@@ -94,6 +94,11 @@
|
||||
#define GFX_MODE_BIT_SET_IN_MASK(val, bit) \
|
||||
((((bit) & 0xffff0000) == 0) && !!((val) & (((bit) << 16))))
|
||||
|
||||
#define IS_MASKED_BITS_ENABLED(_val, _b) \
|
||||
(((_val) & _MASKED_BIT_ENABLE(_b)) == _MASKED_BIT_ENABLE(_b))
|
||||
#define IS_MASKED_BITS_DISABLED(_val, _b) \
|
||||
((_val) & _MASKED_BIT_DISABLE(_b))
|
||||
|
||||
#define FORCEWAKE_RENDER_GEN9_REG 0xa278
|
||||
#define FORCEWAKE_ACK_RENDER_GEN9_REG 0x0D84
|
||||
#define FORCEWAKE_BLITTER_GEN9_REG 0xa188
|
||||
|
@@ -408,7 +408,7 @@ a2xx_create_address_space(struct msm_gpu *gpu, struct platform_device *pdev)
|
||||
struct msm_gem_address_space *aspace;
|
||||
|
||||
aspace = msm_gem_address_space_create(mmu, "gpu", SZ_16M,
|
||||
SZ_16M + 0xfff * SZ_64K);
|
||||
0xfff * SZ_64K);
|
||||
|
||||
if (IS_ERR(aspace) && !IS_ERR(mmu))
|
||||
mmu->funcs->destroy(mmu);
|
||||
|
@@ -1121,7 +1121,7 @@ static int a6xx_gmu_memory_probe(struct a6xx_gmu *gmu)
|
||||
return -ENODEV;
|
||||
|
||||
mmu = msm_iommu_new(gmu->dev, domain);
|
||||
gmu->aspace = msm_gem_address_space_create(mmu, "gmu", 0x0, 0x7fffffff);
|
||||
gmu->aspace = msm_gem_address_space_create(mmu, "gmu", 0x0, 0x80000000);
|
||||
if (IS_ERR(gmu->aspace)) {
|
||||
iommu_domain_free(domain);
|
||||
return PTR_ERR(gmu->aspace);
|
||||
|
@@ -893,8 +893,8 @@ static const struct adreno_gpu_funcs funcs = {
|
||||
#if defined(CONFIG_DRM_MSM_GPU_STATE)
|
||||
.gpu_state_get = a6xx_gpu_state_get,
|
||||
.gpu_state_put = a6xx_gpu_state_put,
|
||||
.create_address_space = adreno_iommu_create_address_space,
|
||||
#endif
|
||||
.create_address_space = adreno_iommu_create_address_space,
|
||||
},
|
||||
.get_timestamp = a6xx_get_timestamp,
|
||||
};
|
||||
|
@@ -194,7 +194,7 @@ adreno_iommu_create_address_space(struct msm_gpu *gpu,
|
||||
struct msm_gem_address_space *aspace;
|
||||
|
||||
aspace = msm_gem_address_space_create(mmu, "gpu", SZ_16M,
|
||||
0xffffffff);
|
||||
0xffffffff - SZ_16M);
|
||||
|
||||
if (IS_ERR(aspace) && !IS_ERR(mmu))
|
||||
mmu->funcs->destroy(mmu);
|
||||
|
@@ -2140,7 +2140,6 @@ int dpu_encoder_setup(struct drm_device *dev, struct drm_encoder *enc,
|
||||
|
||||
dpu_enc = to_dpu_encoder_virt(enc);
|
||||
|
||||
mutex_init(&dpu_enc->enc_lock);
|
||||
ret = dpu_encoder_setup_display(dpu_enc, dpu_kms, disp_info);
|
||||
if (ret)
|
||||
goto fail;
|
||||
@@ -2155,7 +2154,6 @@ int dpu_encoder_setup(struct drm_device *dev, struct drm_encoder *enc,
|
||||
0);
|
||||
|
||||
|
||||
mutex_init(&dpu_enc->rc_lock);
|
||||
INIT_DELAYED_WORK(&dpu_enc->delayed_off_work,
|
||||
dpu_encoder_off_work);
|
||||
dpu_enc->idle_timeout = IDLE_TIMEOUT;
|
||||
@@ -2187,7 +2185,7 @@ struct drm_encoder *dpu_encoder_init(struct drm_device *dev,
|
||||
|
||||
dpu_enc = devm_kzalloc(dev->dev, sizeof(*dpu_enc), GFP_KERNEL);
|
||||
if (!dpu_enc)
|
||||
return ERR_PTR(ENOMEM);
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
rc = drm_encoder_init(dev, &dpu_enc->base, &dpu_encoder_funcs,
|
||||
drm_enc_mode, NULL);
|
||||
@@ -2200,6 +2198,8 @@ struct drm_encoder *dpu_encoder_init(struct drm_device *dev,
|
||||
|
||||
spin_lock_init(&dpu_enc->enc_spinlock);
|
||||
dpu_enc->enabled = false;
|
||||
mutex_init(&dpu_enc->enc_lock);
|
||||
mutex_init(&dpu_enc->rc_lock);
|
||||
|
||||
return &dpu_enc->base;
|
||||
}
|
||||
|
@@ -780,7 +780,7 @@ static int _dpu_kms_mmu_init(struct dpu_kms *dpu_kms)
|
||||
|
||||
mmu = msm_iommu_new(dpu_kms->dev->dev, domain);
|
||||
aspace = msm_gem_address_space_create(mmu, "dpu1",
|
||||
0x1000, 0xfffffff);
|
||||
0x1000, 0x100000000 - 0x1000);
|
||||
|
||||
if (IS_ERR(aspace)) {
|
||||
mmu->funcs->destroy(mmu);
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user