Merge tag 'v6.6-rc5' into android-mainline
Linux 6.6-rc5 Change-Id: Icbea273c6232072458b245816885fcf0bc4e966f Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
@@ -377,6 +377,7 @@ Matthew Wilcox <willy@infradead.org> <willy@debian.org>
|
||||
Matthew Wilcox <willy@infradead.org> <willy@linux.intel.com>
|
||||
Matthew Wilcox <willy@infradead.org> <willy@parisc-linux.org>
|
||||
Matthias Fuchs <socketcan@esd.eu> <matthias.fuchs@esd.eu>
|
||||
Matthieu Baerts <matttbe@kernel.org> <matthieu.baerts@tessares.net>
|
||||
Matthieu CASTET <castet.matthieu@free.fr>
|
||||
Matti Vaittinen <mazziesaccount@gmail.com> <matti.vaittinen@fi.rohmeurope.com>
|
||||
Matt Ranostay <matt.ranostay@konsulko.com> <matt@ranostay.consulting>
|
||||
|
||||
@@ -71,6 +71,8 @@ stable kernels.
|
||||
+----------------+-----------------+-----------------+-----------------------------+
|
||||
| ARM | Cortex-A510 | #2658417 | ARM64_ERRATUM_2658417 |
|
||||
+----------------+-----------------+-----------------+-----------------------------+
|
||||
| ARM | Cortex-A520 | #2966298 | ARM64_ERRATUM_2966298 |
|
||||
+----------------+-----------------+-----------------+-----------------------------+
|
||||
| ARM | Cortex-A53 | #826319 | ARM64_ERRATUM_826319 |
|
||||
+----------------+-----------------+-----------------+-----------------------------+
|
||||
| ARM | Cortex-A53 | #827319 | ARM64_ERRATUM_827319 |
|
||||
|
||||
@@ -73,9 +73,6 @@ patternProperties:
|
||||
"^.*@[0-9a-f]+$":
|
||||
description: Devices attached to the bus
|
||||
type: object
|
||||
properties:
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
required:
|
||||
- reg
|
||||
|
||||
@@ -69,7 +69,7 @@ examples:
|
||||
- |
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
|
||||
cache-controller@2010000 {
|
||||
cache-controller@13400000 {
|
||||
compatible = "andestech,ax45mp-cache", "cache";
|
||||
reg = <0x13400000 0x100000>;
|
||||
interrupts = <508 IRQ_TYPE_LEVEL_HIGH>;
|
||||
|
||||
@@ -87,7 +87,7 @@ required:
|
||||
- interrupts
|
||||
- ports
|
||||
|
||||
additionalProperties: false
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
|
||||
@@ -270,6 +270,7 @@ allOf:
|
||||
contains:
|
||||
enum:
|
||||
- qcom,msm8998-smmu-v2
|
||||
- qcom,sdm630-smmu-v2
|
||||
then:
|
||||
anyOf:
|
||||
- properties:
|
||||
@@ -311,7 +312,6 @@ allOf:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- qcom,sdm630-smmu-v2
|
||||
- qcom,sm6375-smmu-v2
|
||||
then:
|
||||
anyOf:
|
||||
|
||||
@@ -54,6 +54,7 @@ properties:
|
||||
|
||||
port:
|
||||
$ref: /schemas/graph.yaml#/$defs/port-base
|
||||
unevaluatedProperties: false
|
||||
|
||||
properties:
|
||||
endpoint:
|
||||
|
||||
@@ -69,6 +69,7 @@ properties:
|
||||
properties:
|
||||
port@0:
|
||||
$ref: /schemas/graph.yaml#/$defs/port-base
|
||||
unevaluatedProperties: false
|
||||
description: Input port
|
||||
|
||||
properties:
|
||||
@@ -89,6 +90,7 @@ properties:
|
||||
|
||||
port@1:
|
||||
$ref: /schemas/graph.yaml#/$defs/port-base
|
||||
unevaluatedProperties: false
|
||||
description: Output port
|
||||
|
||||
properties:
|
||||
|
||||
@@ -59,7 +59,6 @@ allOf:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- fsl,imx8mq-csi
|
||||
- fsl,imx8mm-csi
|
||||
then:
|
||||
required:
|
||||
|
||||
@@ -95,7 +95,7 @@ properties:
|
||||
synchronization is selected.
|
||||
default: 1
|
||||
|
||||
field-active-even: true
|
||||
field-even-active: true
|
||||
|
||||
bus-width: true
|
||||
|
||||
@@ -144,7 +144,7 @@ properties:
|
||||
synchronization is selected.
|
||||
default: 1
|
||||
|
||||
field-active-even: true
|
||||
field-even-active: true
|
||||
|
||||
bus-width: true
|
||||
|
||||
|
||||
@@ -57,6 +57,7 @@ properties:
|
||||
patternProperties:
|
||||
"^port@[01]$":
|
||||
$ref: /schemas/graph.yaml#/$defs/port-base
|
||||
unevaluatedProperties: false
|
||||
description:
|
||||
Camera A and camera B inputs.
|
||||
|
||||
|
||||
@@ -31,10 +31,6 @@ properties:
|
||||
charger:
|
||||
$ref: /schemas/power/supply/maxim,max77693.yaml
|
||||
|
||||
connector:
|
||||
$ref: /schemas/connector/usb-connector.yaml#
|
||||
unevaluatedProperties: false
|
||||
|
||||
led:
|
||||
$ref: /schemas/leds/maxim,max77693.yaml
|
||||
|
||||
|
||||
@@ -12,7 +12,6 @@ maintainers:
|
||||
|
||||
allOf:
|
||||
- $ref: /schemas/pci/pci-bus.yaml#
|
||||
- $ref: /schemas/interrupt-controller/msi-controller.yaml#
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
@@ -34,13 +33,6 @@ properties:
|
||||
description: >
|
||||
Base address and length of the PCIe controller I/O register space
|
||||
|
||||
interrupt-map: true
|
||||
|
||||
interrupt-map-mask: true
|
||||
|
||||
"#interrupt-cells":
|
||||
const: 1
|
||||
|
||||
ranges:
|
||||
minItems: 1
|
||||
maxItems: 2
|
||||
@@ -54,16 +46,8 @@ properties:
|
||||
items:
|
||||
- const: pcie-phy
|
||||
|
||||
bus-range: true
|
||||
|
||||
dma-coherent: true
|
||||
|
||||
"#address-cells": true
|
||||
|
||||
"#size-cells": true
|
||||
|
||||
device_type: true
|
||||
|
||||
brcm,pcie-ob:
|
||||
type: boolean
|
||||
description: >
|
||||
@@ -78,21 +62,25 @@ properties:
|
||||
|
||||
msi:
|
||||
type: object
|
||||
$ref: /schemas/interrupt-controller/msi-controller.yaml#
|
||||
unevaluatedProperties: false
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
items:
|
||||
- const: brcm,iproc-msi
|
||||
|
||||
interrupts:
|
||||
maxItems: 4
|
||||
|
||||
brcm,pcie-msi-inten:
|
||||
type: boolean
|
||||
description:
|
||||
Needs to be present for some older iProc platforms that require the
|
||||
interrupt enable registers to be set explicitly to enable MSI
|
||||
|
||||
msi-parent: true
|
||||
|
||||
msi-controller: true
|
||||
|
||||
brcm,pcie-msi-inten:
|
||||
type: boolean
|
||||
description: >
|
||||
Needs to be present for some older iProc platforms that require the
|
||||
interrupt enable registers to be set explicitly to enable MSI
|
||||
|
||||
dependencies:
|
||||
brcm,pcie-ob-axi-offset: ["brcm,pcie-ob"]
|
||||
brcm,pcie-msi-inten: [msi-controller]
|
||||
@@ -117,68 +105,69 @@ unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/interrupt-controller/arm-gic.h>
|
||||
#include <dt-bindings/interrupt-controller/arm-gic.h>
|
||||
|
||||
bus {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
pcie0: pcie@18012000 {
|
||||
compatible = "brcm,iproc-pcie";
|
||||
reg = <0x18012000 0x1000>;
|
||||
|
||||
#interrupt-cells = <1>;
|
||||
interrupt-map-mask = <0 0 0 0>;
|
||||
interrupt-map = <0 0 0 0 &gic GIC_SPI 100 IRQ_TYPE_NONE>;
|
||||
|
||||
linux,pci-domain = <0>;
|
||||
|
||||
bus-range = <0x00 0xff>;
|
||||
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
device_type = "pci";
|
||||
ranges = <0x81000000 0 0 0x28000000 0 0x00010000>,
|
||||
<0x82000000 0 0x20000000 0x20000000 0 0x04000000>;
|
||||
|
||||
phys = <&phy 0 5>;
|
||||
phy-names = "pcie-phy";
|
||||
|
||||
brcm,pcie-ob;
|
||||
brcm,pcie-ob-axi-offset = <0x00000000>;
|
||||
|
||||
msi-parent = <&msi0>;
|
||||
|
||||
/* iProc event queue based MSI */
|
||||
msi0: msi {
|
||||
compatible = "brcm,iproc-msi";
|
||||
msi-controller;
|
||||
interrupt-parent = <&gic>;
|
||||
interrupts = <GIC_SPI 96 IRQ_TYPE_NONE>,
|
||||
<GIC_SPI 97 IRQ_TYPE_NONE>,
|
||||
<GIC_SPI 98 IRQ_TYPE_NONE>,
|
||||
<GIC_SPI 99 IRQ_TYPE_NONE>;
|
||||
};
|
||||
};
|
||||
|
||||
pcie1: pcie@18013000 {
|
||||
compatible = "brcm,iproc-pcie";
|
||||
reg = <0x18013000 0x1000>;
|
||||
|
||||
#interrupt-cells = <1>;
|
||||
interrupt-map-mask = <0 0 0 0>;
|
||||
interrupt-map = <0 0 0 0 &gic GIC_SPI 106 IRQ_TYPE_NONE>;
|
||||
|
||||
linux,pci-domain = <1>;
|
||||
|
||||
bus-range = <0x00 0xff>;
|
||||
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
device_type = "pci";
|
||||
ranges = <0x81000000 0 0 0x48000000 0 0x00010000>,
|
||||
<0x82000000 0 0x40000000 0x40000000 0 0x04000000>;
|
||||
|
||||
phys = <&phy 1 6>;
|
||||
phy-names = "pcie-phy";
|
||||
};
|
||||
gic: interrupt-controller {
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <3>;
|
||||
};
|
||||
|
||||
pcie@18012000 {
|
||||
compatible = "brcm,iproc-pcie";
|
||||
reg = <0x18012000 0x1000>;
|
||||
|
||||
#interrupt-cells = <1>;
|
||||
interrupt-map-mask = <0 0 0 0>;
|
||||
interrupt-map = <0 0 0 0 &gic GIC_SPI 100 IRQ_TYPE_NONE>;
|
||||
|
||||
linux,pci-domain = <0>;
|
||||
|
||||
bus-range = <0x00 0xff>;
|
||||
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
device_type = "pci";
|
||||
ranges = <0x81000000 0 0 0x28000000 0 0x00010000>,
|
||||
<0x82000000 0 0x20000000 0x20000000 0 0x04000000>;
|
||||
|
||||
phys = <&phy 0 5>;
|
||||
phy-names = "pcie-phy";
|
||||
|
||||
brcm,pcie-ob;
|
||||
brcm,pcie-ob-axi-offset = <0x00000000>;
|
||||
|
||||
msi-parent = <&msi0>;
|
||||
|
||||
/* iProc event queue based MSI */
|
||||
msi0: msi {
|
||||
compatible = "brcm,iproc-msi";
|
||||
msi-controller;
|
||||
interrupt-parent = <&gic>;
|
||||
interrupts = <GIC_SPI 96 IRQ_TYPE_NONE>,
|
||||
<GIC_SPI 97 IRQ_TYPE_NONE>,
|
||||
<GIC_SPI 98 IRQ_TYPE_NONE>,
|
||||
<GIC_SPI 99 IRQ_TYPE_NONE>;
|
||||
};
|
||||
};
|
||||
- |
|
||||
pcie@18013000 {
|
||||
compatible = "brcm,iproc-pcie";
|
||||
reg = <0x18013000 0x1000>;
|
||||
|
||||
#interrupt-cells = <1>;
|
||||
interrupt-map-mask = <0 0 0 0>;
|
||||
interrupt-map = <0 0 0 0 &gic GIC_SPI 106 IRQ_TYPE_NONE>;
|
||||
|
||||
linux,pci-domain = <1>;
|
||||
|
||||
bus-range = <0x00 0xff>;
|
||||
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
device_type = "pci";
|
||||
ranges = <0x81000000 0 0 0x48000000 0 0x00010000>,
|
||||
<0x82000000 0 0x40000000 0x40000000 0 0x04000000>;
|
||||
|
||||
phys = <&phy 1 6>;
|
||||
phy-names = "pcie-phy";
|
||||
};
|
||||
|
||||
@@ -91,6 +91,7 @@ properties:
|
||||
|
||||
interrupt-controller:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
description: Describes the CPU's local interrupt controller
|
||||
|
||||
properties:
|
||||
|
||||
@@ -232,7 +232,7 @@ properties:
|
||||
# MEMSIC magnetometer
|
||||
- memsic,mmc35240
|
||||
# MEMSIC 3-axis accelerometer
|
||||
- memsic,mx4005
|
||||
- memsic,mxc4005
|
||||
# MEMSIC 2-axis 8-bit digital accelerometer
|
||||
- memsic,mxc6225
|
||||
# MEMSIC 2-axis 8-bit digital accelerometer
|
||||
|
||||
@@ -58,12 +58,14 @@ Here are the main features of EROFS:
|
||||
|
||||
- Support extended attributes as an option;
|
||||
|
||||
- Support a bloom filter that speeds up negative extended attribute lookups;
|
||||
|
||||
- Support POSIX.1e ACLs by using extended attributes;
|
||||
|
||||
- Support transparent data compression as an option:
|
||||
LZ4 and MicroLZMA algorithms can be used on a per-file basis; In addition,
|
||||
inplace decompression is also supported to avoid bounce compressed buffers
|
||||
and page cache thrashing.
|
||||
LZ4, MicroLZMA and DEFLATE algorithms can be used on a per-file basis; In
|
||||
addition, inplace decompression is also supported to avoid bounce compressed
|
||||
buffers and unnecessary page cache thrashing.
|
||||
|
||||
- Support chunk-based data deduplication and rolling-hash compressed data
|
||||
deduplication;
|
||||
@@ -268,6 +270,38 @@ details.)
|
||||
|
||||
By the way, chunk-based files are all uncompressed for now.
|
||||
|
||||
Long extended attribute name prefixes
|
||||
-------------------------------------
|
||||
There are use cases where extended attributes with different values can have
|
||||
only a few common prefixes (such as overlayfs xattrs). The predefined prefixes
|
||||
work inefficiently in both image size and runtime performance in such cases.
|
||||
|
||||
The long xattr name prefixes feature is introduced to address this issue. The
|
||||
overall idea is that, apart from the existing predefined prefixes, the xattr
|
||||
entry could also refer to user-specified long xattr name prefixes, e.g.
|
||||
"trusted.overlay.".
|
||||
|
||||
When referring to a long xattr name prefix, the highest bit (bit 7) of
|
||||
erofs_xattr_entry.e_name_index is set, while the lower bits (bit 0-6) as a whole
|
||||
represent the index of the referred long name prefix among all long name
|
||||
prefixes. Therefore, only the trailing part of the name apart from the long
|
||||
xattr name prefix is stored in erofs_xattr_entry.e_name, which could be empty if
|
||||
the full xattr name matches exactly as its long xattr name prefix.
|
||||
|
||||
All long xattr prefixes are stored one by one in the packed inode as long as
|
||||
the packed inode is valid, or in the meta inode otherwise. The
|
||||
xattr_prefix_count (of the on-disk superblock) indicates the total number of
|
||||
long xattr name prefixes, while (xattr_prefix_start * 4) indicates the start
|
||||
offset of long name prefixes in the packed/meta inode. Note that, long extended
|
||||
attribute name prefixes are disabled if xattr_prefix_count is 0.
|
||||
|
||||
Each long name prefix is stored in the format: ALIGN({__le16 len, data}, 4),
|
||||
where len represents the total size of the data part. The data part is actually
|
||||
represented by 'struct erofs_xattr_long_prefix', where base_index represents the
|
||||
index of the predefined xattr name prefix, e.g. EROFS_XATTR_INDEX_TRUSTED for
|
||||
"trusted.overlay." long name prefix, while the infix string keeps the string
|
||||
after stripping the short prefix, e.g. "overlay." for the example above.
|
||||
|
||||
Data compression
|
||||
----------------
|
||||
EROFS implements fixed-sized output compression which generates fixed-sized
|
||||
|
||||
@@ -36,11 +36,11 @@ EXAMPLE
|
||||
In the example below, **rtla timerlat hist** is set to run for *10* minutes,
|
||||
in the cpus *0-4*, *skipping zero* only lines. Moreover, **rtla timerlat
|
||||
hist** will change the priority of the *timerlat* threads to run under
|
||||
*SCHED_DEADLINE* priority, with a *10us* runtime every *1ms* period. The
|
||||
*SCHED_DEADLINE* priority, with a *100us* runtime every *1ms* period. The
|
||||
*1ms* period is also passed to the *timerlat* tracer. Auto-analysis is disabled
|
||||
to reduce overhead ::
|
||||
|
||||
[root@alien ~]# timerlat hist -d 10m -c 0-4 -P d:100us:1ms -p 1ms --no-aa
|
||||
[root@alien ~]# timerlat hist -d 10m -c 0-4 -P d:100us:1ms -p 1000 --no-aa
|
||||
# RTLA timerlat histogram
|
||||
# Time unit is microseconds (us)
|
||||
# Duration: 0 00:10:00
|
||||
|
||||
+4
-12
@@ -470,7 +470,6 @@ F: drivers/hwmon/adm1029.c
|
||||
ADM8211 WIRELESS DRIVER
|
||||
L: linux-wireless@vger.kernel.org
|
||||
S: Orphan
|
||||
W: https://wireless.wiki.kernel.org/
|
||||
F: drivers/net/wireless/admtek/adm8211.*
|
||||
|
||||
ADP1653 FLASH CONTROLLER DRIVER
|
||||
@@ -5985,8 +5984,8 @@ F: include/linux/devm-helpers.h
|
||||
DEVICE-MAPPER (LVM)
|
||||
M: Alasdair Kergon <agk@redhat.com>
|
||||
M: Mike Snitzer <snitzer@kernel.org>
|
||||
M: dm-devel@redhat.com
|
||||
L: dm-devel@redhat.com
|
||||
M: dm-devel@lists.linux.dev
|
||||
L: dm-devel@lists.linux.dev
|
||||
S: Maintained
|
||||
W: http://sources.redhat.com/dm
|
||||
Q: http://patchwork.kernel.org/project/dm-devel/list/
|
||||
@@ -9531,10 +9530,8 @@ F: Documentation/devicetree/bindings/iio/pressure/honeywell,mprls0025pa.yaml
|
||||
F: drivers/iio/pressure/mprls0025pa.c
|
||||
|
||||
HOST AP DRIVER
|
||||
M: Jouni Malinen <j@w1.fi>
|
||||
L: linux-wireless@vger.kernel.org
|
||||
S: Obsolete
|
||||
W: http://w1.fi/hostap-driver.html
|
||||
F: drivers/net/wireless/intersil/hostap/
|
||||
|
||||
HP BIOSCFG DRIVER
|
||||
@@ -14954,7 +14951,7 @@ K: macsec
|
||||
K: \bmdo_
|
||||
|
||||
NETWORKING [MPTCP]
|
||||
M: Matthieu Baerts <matthieu.baerts@tessares.net>
|
||||
M: Matthieu Baerts <matttbe@kernel.org>
|
||||
M: Mat Martineau <martineau@kernel.org>
|
||||
L: netdev@vger.kernel.org
|
||||
L: mptcp@lists.linux.dev
|
||||
@@ -17609,6 +17606,7 @@ M: Kalle Valo <kvalo@kernel.org>
|
||||
M: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
L: ath12k@lists.infradead.org
|
||||
S: Supported
|
||||
W: https://wireless.wiki.kernel.org/en/users/Drivers/ath12k
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
|
||||
F: drivers/net/wireless/ath/ath12k/
|
||||
|
||||
@@ -18139,8 +18137,6 @@ REALTEK WIRELESS DRIVER (rtlwifi family)
|
||||
M: Ping-Ke Shih <pkshih@realtek.com>
|
||||
L: linux-wireless@vger.kernel.org
|
||||
S: Maintained
|
||||
W: https://wireless.wiki.kernel.org/
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-testing.git
|
||||
F: drivers/net/wireless/realtek/rtlwifi/
|
||||
|
||||
REALTEK WIRELESS DRIVER (rtw88)
|
||||
@@ -18668,7 +18664,6 @@ F: drivers/media/dvb-frontends/rtl2832_sdr*
|
||||
RTL8180 WIRELESS DRIVER
|
||||
L: linux-wireless@vger.kernel.org
|
||||
S: Orphan
|
||||
W: https://wireless.wiki.kernel.org/
|
||||
F: drivers/net/wireless/realtek/rtl818x/rtl8180/
|
||||
|
||||
RTL8187 WIRELESS DRIVER
|
||||
@@ -18676,14 +18671,12 @@ M: Hin-Tak Leung <hintak.leung@gmail.com>
|
||||
M: Larry Finger <Larry.Finger@lwfinger.net>
|
||||
L: linux-wireless@vger.kernel.org
|
||||
S: Maintained
|
||||
W: https://wireless.wiki.kernel.org/
|
||||
F: drivers/net/wireless/realtek/rtl818x/rtl8187/
|
||||
|
||||
RTL8XXXU WIRELESS DRIVER (rtl8xxxu)
|
||||
M: Jes Sorensen <Jes.Sorensen@gmail.com>
|
||||
L: linux-wireless@vger.kernel.org
|
||||
S: Maintained
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/jes/linux.git rtl8xxxu-devel
|
||||
F: drivers/net/wireless/realtek/rtl8xxxu/
|
||||
|
||||
RTRS TRANSPORT DRIVERS
|
||||
@@ -21665,7 +21658,6 @@ L: linux-wireless@vger.kernel.org
|
||||
S: Orphan
|
||||
W: https://wireless.wiki.kernel.org/en/users/Drivers/wl12xx
|
||||
W: https://wireless.wiki.kernel.org/en/users/Drivers/wl1251
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/luca/wl12xx.git
|
||||
F: drivers/net/wireless/ti/
|
||||
|
||||
TIMEKEEPING, CLOCKSOURCE CORE, NTP, ALARMTIMER
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
VERSION = 6
|
||||
PATCHLEVEL = 6
|
||||
SUBLEVEL = 0
|
||||
EXTRAVERSION = -rc4
|
||||
EXTRAVERSION = -rc5
|
||||
NAME = Hurr durr I'ma ninja sloth
|
||||
|
||||
# *DOCUMENTATION*
|
||||
|
||||
@@ -1037,6 +1037,19 @@ config ARM64_ERRATUM_2645198
|
||||
|
||||
If unsure, say Y.
|
||||
|
||||
config ARM64_ERRATUM_2966298
|
||||
bool "Cortex-A520: 2966298: workaround for speculatively executed unprivileged load"
|
||||
default y
|
||||
help
|
||||
This option adds the workaround for ARM Cortex-A520 erratum 2966298.
|
||||
|
||||
On an affected Cortex-A520 core, a speculatively executed unprivileged
|
||||
load might leak data from a privileged level via a cache side channel.
|
||||
|
||||
Work around this problem by executing a TLBI before returning to EL0.
|
||||
|
||||
If unsure, say Y.
|
||||
|
||||
config CAVIUM_ERRATUM_22375
|
||||
bool "Cavium erratum 22375, 24313"
|
||||
default y
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#ifndef _ASM_ACPI_H
|
||||
#define _ASM_ACPI_H
|
||||
|
||||
#include <linux/cpuidle.h>
|
||||
#include <linux/efi.h>
|
||||
#include <linux/memblock.h>
|
||||
#include <linux/psci.h>
|
||||
@@ -44,6 +45,24 @@
|
||||
|
||||
#define ACPI_MADT_GICC_TRBE (offsetof(struct acpi_madt_generic_interrupt, \
|
||||
trbe_interrupt) + sizeof(u16))
|
||||
/*
|
||||
* Arm® Functional Fixed Hardware Specification Version 1.2.
|
||||
* Table 2: Arm Architecture context loss flags
|
||||
*/
|
||||
#define CPUIDLE_CORE_CTXT BIT(0) /* Core context Lost */
|
||||
|
||||
static inline unsigned int arch_get_idle_state_flags(u32 arch_flags)
|
||||
{
|
||||
if (arch_flags & CPUIDLE_CORE_CTXT)
|
||||
return CPUIDLE_FLAG_TIMER_STOP;
|
||||
|
||||
return 0;
|
||||
}
|
||||
#define arch_get_idle_state_flags arch_get_idle_state_flags
|
||||
|
||||
#define CPUIDLE_TRACE_CTXT BIT(1) /* Trace context loss */
|
||||
#define CPUIDLE_GICR_CTXT BIT(2) /* GICR */
|
||||
#define CPUIDLE_GICD_CTXT BIT(3) /* GICD */
|
||||
|
||||
/* Basic configuration for ACPI */
|
||||
#ifdef CONFIG_ACPI
|
||||
|
||||
@@ -79,6 +79,7 @@
|
||||
#define ARM_CPU_PART_CORTEX_A78AE 0xD42
|
||||
#define ARM_CPU_PART_CORTEX_X1 0xD44
|
||||
#define ARM_CPU_PART_CORTEX_A510 0xD46
|
||||
#define ARM_CPU_PART_CORTEX_A520 0xD80
|
||||
#define ARM_CPU_PART_CORTEX_A710 0xD47
|
||||
#define ARM_CPU_PART_CORTEX_A715 0xD4D
|
||||
#define ARM_CPU_PART_CORTEX_X2 0xD48
|
||||
@@ -148,6 +149,7 @@
|
||||
#define MIDR_CORTEX_A78AE MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A78AE)
|
||||
#define MIDR_CORTEX_X1 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_X1)
|
||||
#define MIDR_CORTEX_A510 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A510)
|
||||
#define MIDR_CORTEX_A520 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A520)
|
||||
#define MIDR_CORTEX_A710 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A710)
|
||||
#define MIDR_CORTEX_A715 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A715)
|
||||
#define MIDR_CORTEX_X2 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_X2)
|
||||
|
||||
@@ -730,6 +730,14 @@ const struct arm64_cpu_capabilities arm64_errata[] = {
|
||||
.cpu_enable = cpu_clear_bf16_from_user_emulation,
|
||||
},
|
||||
#endif
|
||||
#ifdef CONFIG_ARM64_ERRATUM_2966298
|
||||
{
|
||||
.desc = "ARM erratum 2966298",
|
||||
.capability = ARM64_WORKAROUND_2966298,
|
||||
/* Cortex-A520 r0p0 - r0p1 */
|
||||
ERRATA_MIDR_REV_RANGE(MIDR_CORTEX_A520, 0, 0, 1),
|
||||
},
|
||||
#endif
|
||||
#ifdef CONFIG_AMPERE_ERRATUM_AC03_CPU_38
|
||||
{
|
||||
.desc = "AmpereOne erratum AC03_CPU_38",
|
||||
|
||||
@@ -428,6 +428,10 @@ alternative_else_nop_endif
|
||||
ldp x28, x29, [sp, #16 * 14]
|
||||
|
||||
.if \el == 0
|
||||
alternative_if ARM64_WORKAROUND_2966298
|
||||
tlbi vale1, xzr
|
||||
dsb nsh
|
||||
alternative_else_nop_endif
|
||||
alternative_if_not ARM64_UNMAP_KERNEL_AT_EL0
|
||||
ldr lr, [sp, #S_LR]
|
||||
add sp, sp, #PT_REGS_SIZE // restore sp
|
||||
|
||||
@@ -84,6 +84,7 @@ WORKAROUND_2077057
|
||||
WORKAROUND_2457168
|
||||
WORKAROUND_2645198
|
||||
WORKAROUND_2658417
|
||||
WORKAROUND_2966298
|
||||
WORKAROUND_AMPERE_AC03_CPU_38
|
||||
WORKAROUND_TRBE_OVERWRITE_FILL_MODE
|
||||
WORKAROUND_TSB_FLUSH_FAILURE
|
||||
|
||||
@@ -2,39 +2,42 @@
|
||||
#ifndef __PARISC_LDCW_H
|
||||
#define __PARISC_LDCW_H
|
||||
|
||||
#ifndef CONFIG_PA20
|
||||
/* Because kmalloc only guarantees 8-byte alignment for kmalloc'd data,
|
||||
and GCC only guarantees 8-byte alignment for stack locals, we can't
|
||||
be assured of 16-byte alignment for atomic lock data even if we
|
||||
specify "__attribute ((aligned(16)))" in the type declaration. So,
|
||||
we use a struct containing an array of four ints for the atomic lock
|
||||
type and dynamically select the 16-byte aligned int from the array
|
||||
for the semaphore. */
|
||||
for the semaphore. */
|
||||
|
||||
/* From: "Jim Hull" <jim.hull of hp.com>
|
||||
I've attached a summary of the change, but basically, for PA 2.0, as
|
||||
long as the ",CO" (coherent operation) completer is implemented, then the
|
||||
16-byte alignment requirement for ldcw and ldcd is relaxed, and instead
|
||||
they only require "natural" alignment (4-byte for ldcw, 8-byte for
|
||||
ldcd).
|
||||
|
||||
Although the cache control hint is accepted by all PA 2.0 processors,
|
||||
it is only implemented on PA8800/PA8900 CPUs. Prior PA8X00 CPUs still
|
||||
require 16-byte alignment. If the address is unaligned, the operation
|
||||
of the instruction is undefined. The ldcw instruction does not generate
|
||||
unaligned data reference traps so misaligned accesses are not detected.
|
||||
This hid the problem for years. So, restore the 16-byte alignment dropped
|
||||
by Kyle McMartin in "Remove __ldcw_align for PA-RISC 2.0 processors". */
|
||||
|
||||
#define __PA_LDCW_ALIGNMENT 16
|
||||
#define __PA_LDCW_ALIGN_ORDER 4
|
||||
#define __ldcw_align(a) ({ \
|
||||
unsigned long __ret = (unsigned long) &(a)->lock[0]; \
|
||||
__ret = (__ret + __PA_LDCW_ALIGNMENT - 1) \
|
||||
& ~(__PA_LDCW_ALIGNMENT - 1); \
|
||||
(volatile unsigned int *) __ret; \
|
||||
})
|
||||
#define __LDCW "ldcw"
|
||||
|
||||
#else /*CONFIG_PA20*/
|
||||
/* From: "Jim Hull" <jim.hull of hp.com>
|
||||
I've attached a summary of the change, but basically, for PA 2.0, as
|
||||
long as the ",CO" (coherent operation) completer is specified, then the
|
||||
16-byte alignment requirement for ldcw and ldcd is relaxed, and instead
|
||||
they only require "natural" alignment (4-byte for ldcw, 8-byte for
|
||||
ldcd). */
|
||||
|
||||
#define __PA_LDCW_ALIGNMENT 4
|
||||
#define __PA_LDCW_ALIGN_ORDER 2
|
||||
#define __ldcw_align(a) (&(a)->slock)
|
||||
#ifdef CONFIG_PA20
|
||||
#define __LDCW "ldcw,co"
|
||||
|
||||
#endif /*!CONFIG_PA20*/
|
||||
#else
|
||||
#define __LDCW "ldcw"
|
||||
#endif
|
||||
|
||||
/* LDCW, the only atomic read-write operation PA-RISC has. *sigh*.
|
||||
We don't explicitly expose that "*a" may be written as reload
|
||||
|
||||
@@ -9,15 +9,10 @@
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
typedef struct {
|
||||
#ifdef CONFIG_PA20
|
||||
volatile unsigned int slock;
|
||||
# define __ARCH_SPIN_LOCK_UNLOCKED { __ARCH_SPIN_LOCK_UNLOCKED_VAL }
|
||||
#else
|
||||
volatile unsigned int lock[4];
|
||||
# define __ARCH_SPIN_LOCK_UNLOCKED \
|
||||
{ { __ARCH_SPIN_LOCK_UNLOCKED_VAL, __ARCH_SPIN_LOCK_UNLOCKED_VAL, \
|
||||
__ARCH_SPIN_LOCK_UNLOCKED_VAL, __ARCH_SPIN_LOCK_UNLOCKED_VAL } }
|
||||
#endif
|
||||
} arch_spinlock_t;
|
||||
|
||||
|
||||
|
||||
@@ -440,7 +440,9 @@ int __cpu_up(unsigned int cpu, struct task_struct *tidle)
|
||||
if (cpu_online(cpu))
|
||||
return 0;
|
||||
|
||||
if (num_online_cpus() < setup_max_cpus && smp_boot_one_cpu(cpu, tidle))
|
||||
if (num_online_cpus() < nr_cpu_ids &&
|
||||
num_online_cpus() < setup_max_cpus &&
|
||||
smp_boot_one_cpu(cpu, tidle))
|
||||
return -EIO;
|
||||
|
||||
return cpu_online(cpu) ? 0 : -EIO;
|
||||
|
||||
@@ -2513,7 +2513,7 @@ int arch_prepare_bpf_trampoline(struct bpf_tramp_image *im, void *image,
|
||||
return -E2BIG;
|
||||
}
|
||||
|
||||
return ret;
|
||||
return tjit.common.prg;
|
||||
}
|
||||
|
||||
bool bpf_jit_supports_subprog_tailcalls(void)
|
||||
|
||||
@@ -256,7 +256,7 @@ static int __sev_cpuid_hv(u32 fn, int reg_idx, u32 *reg)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int sev_cpuid_hv(struct cpuid_leaf *leaf)
|
||||
static int __sev_cpuid_hv_msr(struct cpuid_leaf *leaf)
|
||||
{
|
||||
int ret;
|
||||
|
||||
@@ -279,6 +279,45 @@ static int sev_cpuid_hv(struct cpuid_leaf *leaf)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int __sev_cpuid_hv_ghcb(struct ghcb *ghcb, struct es_em_ctxt *ctxt, struct cpuid_leaf *leaf)
|
||||
{
|
||||
u32 cr4 = native_read_cr4();
|
||||
int ret;
|
||||
|
||||
ghcb_set_rax(ghcb, leaf->fn);
|
||||
ghcb_set_rcx(ghcb, leaf->subfn);
|
||||
|
||||
if (cr4 & X86_CR4_OSXSAVE)
|
||||
/* Safe to read xcr0 */
|
||||
ghcb_set_xcr0(ghcb, xgetbv(XCR_XFEATURE_ENABLED_MASK));
|
||||
else
|
||||
/* xgetbv will cause #UD - use reset value for xcr0 */
|
||||
ghcb_set_xcr0(ghcb, 1);
|
||||
|
||||
ret = sev_es_ghcb_hv_call(ghcb, ctxt, SVM_EXIT_CPUID, 0, 0);
|
||||
if (ret != ES_OK)
|
||||
return ret;
|
||||
|
||||
if (!(ghcb_rax_is_valid(ghcb) &&
|
||||
ghcb_rbx_is_valid(ghcb) &&
|
||||
ghcb_rcx_is_valid(ghcb) &&
|
||||
ghcb_rdx_is_valid(ghcb)))
|
||||
return ES_VMM_ERROR;
|
||||
|
||||
leaf->eax = ghcb->save.rax;
|
||||
leaf->ebx = ghcb->save.rbx;
|
||||
leaf->ecx = ghcb->save.rcx;
|
||||
leaf->edx = ghcb->save.rdx;
|
||||
|
||||
return ES_OK;
|
||||
}
|
||||
|
||||
static int sev_cpuid_hv(struct ghcb *ghcb, struct es_em_ctxt *ctxt, struct cpuid_leaf *leaf)
|
||||
{
|
||||
return ghcb ? __sev_cpuid_hv_ghcb(ghcb, ctxt, leaf)
|
||||
: __sev_cpuid_hv_msr(leaf);
|
||||
}
|
||||
|
||||
/*
|
||||
* This may be called early while still running on the initial identity
|
||||
* mapping. Use RIP-relative addressing to obtain the correct address
|
||||
@@ -388,19 +427,20 @@ snp_cpuid_get_validated_func(struct cpuid_leaf *leaf)
|
||||
return false;
|
||||
}
|
||||
|
||||
static void snp_cpuid_hv(struct cpuid_leaf *leaf)
|
||||
static void snp_cpuid_hv(struct ghcb *ghcb, struct es_em_ctxt *ctxt, struct cpuid_leaf *leaf)
|
||||
{
|
||||
if (sev_cpuid_hv(leaf))
|
||||
if (sev_cpuid_hv(ghcb, ctxt, leaf))
|
||||
sev_es_terminate(SEV_TERM_SET_LINUX, GHCB_TERM_CPUID_HV);
|
||||
}
|
||||
|
||||
static int snp_cpuid_postprocess(struct cpuid_leaf *leaf)
|
||||
static int snp_cpuid_postprocess(struct ghcb *ghcb, struct es_em_ctxt *ctxt,
|
||||
struct cpuid_leaf *leaf)
|
||||
{
|
||||
struct cpuid_leaf leaf_hv = *leaf;
|
||||
|
||||
switch (leaf->fn) {
|
||||
case 0x1:
|
||||
snp_cpuid_hv(&leaf_hv);
|
||||
snp_cpuid_hv(ghcb, ctxt, &leaf_hv);
|
||||
|
||||
/* initial APIC ID */
|
||||
leaf->ebx = (leaf_hv.ebx & GENMASK(31, 24)) | (leaf->ebx & GENMASK(23, 0));
|
||||
@@ -419,7 +459,7 @@ static int snp_cpuid_postprocess(struct cpuid_leaf *leaf)
|
||||
break;
|
||||
case 0xB:
|
||||
leaf_hv.subfn = 0;
|
||||
snp_cpuid_hv(&leaf_hv);
|
||||
snp_cpuid_hv(ghcb, ctxt, &leaf_hv);
|
||||
|
||||
/* extended APIC ID */
|
||||
leaf->edx = leaf_hv.edx;
|
||||
@@ -467,7 +507,7 @@ static int snp_cpuid_postprocess(struct cpuid_leaf *leaf)
|
||||
}
|
||||
break;
|
||||
case 0x8000001E:
|
||||
snp_cpuid_hv(&leaf_hv);
|
||||
snp_cpuid_hv(ghcb, ctxt, &leaf_hv);
|
||||
|
||||
/* extended APIC ID */
|
||||
leaf->eax = leaf_hv.eax;
|
||||
@@ -488,7 +528,7 @@ static int snp_cpuid_postprocess(struct cpuid_leaf *leaf)
|
||||
* Returns -EOPNOTSUPP if feature not enabled. Any other non-zero return value
|
||||
* should be treated as fatal by caller.
|
||||
*/
|
||||
static int snp_cpuid(struct cpuid_leaf *leaf)
|
||||
static int snp_cpuid(struct ghcb *ghcb, struct es_em_ctxt *ctxt, struct cpuid_leaf *leaf)
|
||||
{
|
||||
const struct snp_cpuid_table *cpuid_table = snp_cpuid_get_table();
|
||||
|
||||
@@ -522,7 +562,7 @@ static int snp_cpuid(struct cpuid_leaf *leaf)
|
||||
return 0;
|
||||
}
|
||||
|
||||
return snp_cpuid_postprocess(leaf);
|
||||
return snp_cpuid_postprocess(ghcb, ctxt, leaf);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -544,14 +584,14 @@ void __init do_vc_no_ghcb(struct pt_regs *regs, unsigned long exit_code)
|
||||
leaf.fn = fn;
|
||||
leaf.subfn = subfn;
|
||||
|
||||
ret = snp_cpuid(&leaf);
|
||||
ret = snp_cpuid(NULL, NULL, &leaf);
|
||||
if (!ret)
|
||||
goto cpuid_done;
|
||||
|
||||
if (ret != -EOPNOTSUPP)
|
||||
goto fail;
|
||||
|
||||
if (sev_cpuid_hv(&leaf))
|
||||
if (__sev_cpuid_hv_msr(&leaf))
|
||||
goto fail;
|
||||
|
||||
cpuid_done:
|
||||
@@ -848,14 +888,15 @@ static enum es_result vc_handle_ioio(struct ghcb *ghcb, struct es_em_ctxt *ctxt)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int vc_handle_cpuid_snp(struct pt_regs *regs)
|
||||
static int vc_handle_cpuid_snp(struct ghcb *ghcb, struct es_em_ctxt *ctxt)
|
||||
{
|
||||
struct pt_regs *regs = ctxt->regs;
|
||||
struct cpuid_leaf leaf;
|
||||
int ret;
|
||||
|
||||
leaf.fn = regs->ax;
|
||||
leaf.subfn = regs->cx;
|
||||
ret = snp_cpuid(&leaf);
|
||||
ret = snp_cpuid(ghcb, ctxt, &leaf);
|
||||
if (!ret) {
|
||||
regs->ax = leaf.eax;
|
||||
regs->bx = leaf.ebx;
|
||||
@@ -874,7 +915,7 @@ static enum es_result vc_handle_cpuid(struct ghcb *ghcb,
|
||||
enum es_result ret;
|
||||
int snp_cpuid_ret;
|
||||
|
||||
snp_cpuid_ret = vc_handle_cpuid_snp(regs);
|
||||
snp_cpuid_ret = vc_handle_cpuid_snp(ghcb, ctxt);
|
||||
if (!snp_cpuid_ret)
|
||||
return ES_OK;
|
||||
if (snp_cpuid_ret != -EOPNOTSUPP)
|
||||
|
||||
@@ -868,8 +868,7 @@ void snp_set_memory_private(unsigned long vaddr, unsigned long npages)
|
||||
|
||||
void snp_accept_memory(phys_addr_t start, phys_addr_t end)
|
||||
{
|
||||
unsigned long vaddr;
|
||||
unsigned int npages;
|
||||
unsigned long vaddr, npages;
|
||||
|
||||
if (!cc_platform_has(CC_ATTR_GUEST_SEV_SNP))
|
||||
return;
|
||||
|
||||
@@ -855,7 +855,7 @@ static size_t sizeof_idt(struct acpi_nfit_interleave *idt)
|
||||
{
|
||||
if (idt->header.length < sizeof(*idt))
|
||||
return 0;
|
||||
return sizeof(*idt) + sizeof(u32) * (idt->line_count - 1);
|
||||
return sizeof(*idt) + sizeof(u32) * idt->line_count;
|
||||
}
|
||||
|
||||
static bool add_idt(struct acpi_nfit_desc *acpi_desc,
|
||||
|
||||
@@ -1217,8 +1217,7 @@ static int acpi_processor_setup_lpi_states(struct acpi_processor *pr)
|
||||
strscpy(state->desc, lpi->desc, CPUIDLE_DESC_LEN);
|
||||
state->exit_latency = lpi->wake_latency;
|
||||
state->target_residency = lpi->min_residency;
|
||||
if (lpi->arch_flags)
|
||||
state->flags |= CPUIDLE_FLAG_TIMER_STOP;
|
||||
state->flags |= arch_get_idle_state_flags(lpi->arch_flags);
|
||||
if (i != 0 && lpi->entry_method == ACPI_CSTATE_FFH)
|
||||
state->flags |= CPUIDLE_FLAG_RCU_IDLE;
|
||||
state->enter = acpi_idle_lpi_enter;
|
||||
|
||||
@@ -453,7 +453,8 @@ static int regcache_rbtree_write(struct regmap *map, unsigned int reg,
|
||||
if (!rbnode)
|
||||
return -ENOMEM;
|
||||
regcache_rbtree_set_register(map, rbnode,
|
||||
reg - rbnode->base_reg, value);
|
||||
(reg - rbnode->base_reg) / map->reg_stride,
|
||||
value);
|
||||
regcache_rbtree_insert(map, &rbtree_ctx->root, rbnode);
|
||||
rbtree_ctx->cached_rbnode = rbnode;
|
||||
}
|
||||
|
||||
+2
-1
@@ -1436,8 +1436,9 @@ static int nbd_start_device_ioctl(struct nbd_device *nbd)
|
||||
|
||||
static void nbd_clear_sock_ioctl(struct nbd_device *nbd)
|
||||
{
|
||||
blk_mark_disk_dead(nbd->disk);
|
||||
nbd_clear_sock(nbd);
|
||||
disk_force_media_change(nbd->disk);
|
||||
nbd_bdev_reset(nbd);
|
||||
if (test_and_clear_bit(NBD_RT_HAS_CONFIG_REF,
|
||||
&nbd->config->runtime_flags))
|
||||
nbd_config_put(nbd);
|
||||
|
||||
@@ -4419,6 +4419,7 @@ static int btusb_probe(struct usb_interface *intf,
|
||||
|
||||
if (id->driver_info & BTUSB_QCA_ROME) {
|
||||
data->setup_on_usb = btusb_setup_qca;
|
||||
hdev->shutdown = btusb_shutdown_qca;
|
||||
hdev->set_bdaddr = btusb_set_bdaddr_ath3012;
|
||||
hdev->cmd_timeout = btusb_qca_cmd_timeout;
|
||||
set_bit(HCI_QUIRK_SIMULTANEOUS_DISCOVERY, &hdev->quirks);
|
||||
|
||||
@@ -558,6 +558,9 @@ int k3_udma_glue_tx_get_irq(struct k3_udma_glue_tx_channel *tx_chn)
|
||||
tx_chn->virq = k3_ringacc_get_ring_irq_num(tx_chn->ringtxcq);
|
||||
}
|
||||
|
||||
if (!tx_chn->virq)
|
||||
return -ENXIO;
|
||||
|
||||
return tx_chn->virq;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(k3_udma_glue_tx_get_irq);
|
||||
|
||||
@@ -973,7 +973,7 @@ static int aspeed_gpio_set_config(struct gpio_chip *chip, unsigned int offset,
|
||||
else if (param == PIN_CONFIG_BIAS_DISABLE ||
|
||||
param == PIN_CONFIG_BIAS_PULL_DOWN ||
|
||||
param == PIN_CONFIG_DRIVE_STRENGTH)
|
||||
return pinctrl_gpio_set_config(offset, config);
|
||||
return pinctrl_gpio_set_config(chip->base + offset, config);
|
||||
else if (param == PIN_CONFIG_DRIVE_OPEN_DRAIN ||
|
||||
param == PIN_CONFIG_DRIVE_OPEN_SOURCE)
|
||||
/* Return -ENOTSUPP to trigger emulation, as per datasheet */
|
||||
|
||||
@@ -237,6 +237,7 @@ static bool pxa_gpio_has_pinctrl(void)
|
||||
switch (gpio_type) {
|
||||
case PXA3XX_GPIO:
|
||||
case MMP2_GPIO:
|
||||
case MMP_GPIO:
|
||||
return false;
|
||||
|
||||
default:
|
||||
|
||||
@@ -2093,7 +2093,7 @@ static int amdgpu_device_ip_early_init(struct amdgpu_device *adev)
|
||||
adev->flags |= AMD_IS_PX;
|
||||
|
||||
if (!(adev->flags & AMD_IS_APU)) {
|
||||
parent = pci_upstream_bridge(adev->pdev);
|
||||
parent = pcie_find_root_port(adev->pdev);
|
||||
adev->has_pr3 = parent ? pci_pr3_present(parent) : false;
|
||||
}
|
||||
|
||||
|
||||
@@ -170,6 +170,7 @@ int amdgpu_fru_get_product_info(struct amdgpu_device *adev)
|
||||
csum += pia[size - 1];
|
||||
if (csum) {
|
||||
DRM_ERROR("Bad Product Info Area checksum: 0x%02x", csum);
|
||||
kfree(pia);
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
|
||||
@@ -157,7 +157,7 @@ void dcn20_update_clocks_update_dentist(struct clk_mgr_internal *clk_mgr, struct
|
||||
int32_t N;
|
||||
int32_t j;
|
||||
|
||||
if (!pipe_ctx->stream)
|
||||
if (!resource_is_pipe_type(pipe_ctx, OTG_MASTER))
|
||||
continue;
|
||||
/* Virtual encoders don't have this function */
|
||||
if (!stream_enc->funcs->get_fifo_cal_average_level)
|
||||
@@ -188,7 +188,7 @@ void dcn20_update_clocks_update_dentist(struct clk_mgr_internal *clk_mgr, struct
|
||||
int32_t N;
|
||||
int32_t j;
|
||||
|
||||
if (!pipe_ctx->stream)
|
||||
if (!resource_is_pipe_type(pipe_ctx, OTG_MASTER))
|
||||
continue;
|
||||
/* Virtual encoders don't have this function */
|
||||
if (!stream_enc->funcs->get_fifo_cal_average_level)
|
||||
|
||||
@@ -355,7 +355,7 @@ static void dcn32_update_clocks_update_dentist(
|
||||
int32_t N;
|
||||
int32_t j;
|
||||
|
||||
if (!pipe_ctx->stream)
|
||||
if (!resource_is_pipe_type(pipe_ctx, OTG_MASTER))
|
||||
continue;
|
||||
/* Virtual encoders don't have this function */
|
||||
if (!stream_enc->funcs->get_fifo_cal_average_level)
|
||||
@@ -401,7 +401,7 @@ static void dcn32_update_clocks_update_dentist(
|
||||
int32_t N;
|
||||
int32_t j;
|
||||
|
||||
if (!pipe_ctx->stream)
|
||||
if (!resource_is_pipe_type(pipe_ctx, OTG_MASTER))
|
||||
continue;
|
||||
/* Virtual encoders don't have this function */
|
||||
if (!stream_enc->funcs->get_fifo_cal_average_level)
|
||||
|
||||
@@ -2040,6 +2040,7 @@ static int default_attr_update(struct amdgpu_device *adev, struct amdgpu_device_
|
||||
case IP_VERSION(11, 0, 0):
|
||||
case IP_VERSION(11, 0, 1):
|
||||
case IP_VERSION(11, 0, 2):
|
||||
case IP_VERSION(11, 0, 3):
|
||||
*states = ATTR_STATE_SUPPORTED;
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -2082,36 +2082,41 @@ static int sienna_cichlid_display_disable_memory_clock_switch(struct smu_context
|
||||
return ret;
|
||||
}
|
||||
|
||||
#define MAX(a, b) ((a) > (b) ? (a) : (b))
|
||||
|
||||
static int sienna_cichlid_update_pcie_parameters(struct smu_context *smu,
|
||||
uint32_t pcie_gen_cap,
|
||||
uint32_t pcie_width_cap)
|
||||
{
|
||||
struct smu_11_0_dpm_context *dpm_context = smu->smu_dpm.dpm_context;
|
||||
struct smu_11_0_pcie_table *pcie_table = &dpm_context->dpm_tables.pcie_table;
|
||||
u32 smu_pcie_arg;
|
||||
uint8_t *table_member1, *table_member2;
|
||||
uint32_t min_gen_speed, max_gen_speed;
|
||||
uint32_t min_lane_width, max_lane_width;
|
||||
uint32_t smu_pcie_arg;
|
||||
int ret, i;
|
||||
|
||||
/* PCIE gen speed and lane width override */
|
||||
GET_PPTABLE_MEMBER(PcieGenSpeed, &table_member1);
|
||||
GET_PPTABLE_MEMBER(PcieLaneCount, &table_member2);
|
||||
|
||||
min_gen_speed = MAX(0, table_member1[0]);
|
||||
max_gen_speed = MIN(pcie_gen_cap, table_member1[1]);
|
||||
min_gen_speed = min_gen_speed > max_gen_speed ?
|
||||
max_gen_speed : min_gen_speed;
|
||||
min_lane_width = MAX(1, table_member2[0]);
|
||||
max_lane_width = MIN(pcie_width_cap, table_member2[1]);
|
||||
min_lane_width = min_lane_width > max_lane_width ?
|
||||
max_lane_width : min_lane_width;
|
||||
|
||||
if (!amdgpu_device_pcie_dynamic_switching_supported()) {
|
||||
if (pcie_table->pcie_gen[NUM_LINK_LEVELS - 1] < pcie_gen_cap)
|
||||
pcie_gen_cap = pcie_table->pcie_gen[NUM_LINK_LEVELS - 1];
|
||||
|
||||
if (pcie_table->pcie_lane[NUM_LINK_LEVELS - 1] < pcie_width_cap)
|
||||
pcie_width_cap = pcie_table->pcie_lane[NUM_LINK_LEVELS - 1];
|
||||
|
||||
/* Force all levels to use the same settings */
|
||||
for (i = 0; i < NUM_LINK_LEVELS; i++) {
|
||||
pcie_table->pcie_gen[i] = pcie_gen_cap;
|
||||
pcie_table->pcie_lane[i] = pcie_width_cap;
|
||||
}
|
||||
pcie_table->pcie_gen[0] = max_gen_speed;
|
||||
pcie_table->pcie_lane[0] = max_lane_width;
|
||||
} else {
|
||||
for (i = 0; i < NUM_LINK_LEVELS; i++) {
|
||||
if (pcie_table->pcie_gen[i] > pcie_gen_cap)
|
||||
pcie_table->pcie_gen[i] = pcie_gen_cap;
|
||||
if (pcie_table->pcie_lane[i] > pcie_width_cap)
|
||||
pcie_table->pcie_lane[i] = pcie_width_cap;
|
||||
}
|
||||
pcie_table->pcie_gen[0] = min_gen_speed;
|
||||
pcie_table->pcie_lane[0] = min_lane_width;
|
||||
}
|
||||
pcie_table->pcie_gen[1] = max_gen_speed;
|
||||
pcie_table->pcie_lane[1] = max_lane_width;
|
||||
|
||||
for (i = 0; i < NUM_LINK_LEVELS; i++) {
|
||||
smu_pcie_arg = (i << 16 |
|
||||
|
||||
@@ -38,6 +38,14 @@ static const struct drm_dmi_panel_orientation_data gpd_micropc = {
|
||||
.orientation = DRM_MODE_PANEL_ORIENTATION_RIGHT_UP,
|
||||
};
|
||||
|
||||
static const struct drm_dmi_panel_orientation_data gpd_onemix2s = {
|
||||
.width = 1200,
|
||||
.height = 1920,
|
||||
.bios_dates = (const char * const []){ "05/21/2018", "10/26/2018",
|
||||
"03/04/2019", NULL },
|
||||
.orientation = DRM_MODE_PANEL_ORIENTATION_RIGHT_UP,
|
||||
};
|
||||
|
||||
static const struct drm_dmi_panel_orientation_data gpd_pocket = {
|
||||
.width = 1200,
|
||||
.height = 1920,
|
||||
@@ -401,6 +409,14 @@ static const struct dmi_system_id orientation_data[] = {
|
||||
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "LTH17"),
|
||||
},
|
||||
.driver_data = (void *)&lcd800x1280_rightside_up,
|
||||
}, { /* One Mix 2S (generic strings, also match on bios date) */
|
||||
.matches = {
|
||||
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Default string"),
|
||||
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Default string"),
|
||||
DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "Default string"),
|
||||
DMI_EXACT_MATCH(DMI_BOARD_NAME, "Default string"),
|
||||
},
|
||||
.driver_data = (void *)&gpd_onemix2s,
|
||||
},
|
||||
{}
|
||||
};
|
||||
|
||||
@@ -198,7 +198,7 @@ static void flush_tlb_invalidate(struct drm_i915_gem_object *obj)
|
||||
|
||||
for_each_gt(gt, i915, id) {
|
||||
if (!obj->mm.tlb[id])
|
||||
return;
|
||||
continue;
|
||||
|
||||
intel_gt_invalidate_tlb_full(gt, obj->mm.tlb[id]);
|
||||
obj->mm.tlb[id] = 0;
|
||||
|
||||
@@ -271,8 +271,17 @@ int gen12_emit_flush_rcs(struct i915_request *rq, u32 mode)
|
||||
if (GRAPHICS_VER_FULL(rq->i915) >= IP_VER(12, 70))
|
||||
bit_group_0 |= PIPE_CONTROL_CCS_FLUSH;
|
||||
|
||||
/*
|
||||
* L3 fabric flush is needed for AUX CCS invalidation
|
||||
* which happens as part of pipe-control so we can
|
||||
* ignore PIPE_CONTROL_FLUSH_L3. Also PIPE_CONTROL_FLUSH_L3
|
||||
* deals with Protected Memory which is not needed for
|
||||
* AUX CCS invalidation and lead to unwanted side effects.
|
||||
*/
|
||||
if (mode & EMIT_FLUSH)
|
||||
bit_group_1 |= PIPE_CONTROL_FLUSH_L3;
|
||||
|
||||
bit_group_1 |= PIPE_CONTROL_TILE_CACHE_FLUSH;
|
||||
bit_group_1 |= PIPE_CONTROL_FLUSH_L3;
|
||||
bit_group_1 |= PIPE_CONTROL_RENDER_TARGET_CACHE_FLUSH;
|
||||
bit_group_1 |= PIPE_CONTROL_DEPTH_CACHE_FLUSH;
|
||||
/* Wa_1409600907:tgl,adl-p */
|
||||
|
||||
@@ -1199,6 +1199,13 @@ int i915_gem_init(struct drm_i915_private *dev_priv)
|
||||
goto err_unlock;
|
||||
}
|
||||
|
||||
/*
|
||||
* Register engines early to ensure the engine list is in its final
|
||||
* rb-tree form, lowering the amount of code that has to deal with
|
||||
* the intermediate llist state.
|
||||
*/
|
||||
intel_engines_driver_register(dev_priv);
|
||||
|
||||
return 0;
|
||||
|
||||
/*
|
||||
@@ -1246,8 +1253,6 @@ err_unlock:
|
||||
void i915_gem_driver_register(struct drm_i915_private *i915)
|
||||
{
|
||||
i915_gem_driver_register__shrinker(i915);
|
||||
|
||||
intel_engines_driver_register(i915);
|
||||
}
|
||||
|
||||
void i915_gem_driver_unregister(struct drm_i915_private *i915)
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
|
||||
#include "nouveau_drv.h"
|
||||
#include "nouveau_dma.h"
|
||||
#include "nouveau_exec.h"
|
||||
#include "nouveau_gem.h"
|
||||
#include "nouveau_chan.h"
|
||||
#include "nouveau_abi16.h"
|
||||
@@ -183,6 +184,20 @@ nouveau_abi16_fini(struct nouveau_abi16 *abi16)
|
||||
cli->abi16 = NULL;
|
||||
}
|
||||
|
||||
static inline int
|
||||
getparam_dma_ib_max(struct nvif_device *device)
|
||||
{
|
||||
const struct nvif_mclass dmas[] = {
|
||||
{ NV03_CHANNEL_DMA, 0 },
|
||||
{ NV10_CHANNEL_DMA, 0 },
|
||||
{ NV17_CHANNEL_DMA, 0 },
|
||||
{ NV40_CHANNEL_DMA, 0 },
|
||||
{}
|
||||
};
|
||||
|
||||
return nvif_mclass(&device->object, dmas) < 0 ? NV50_DMA_IB_MAX : 0;
|
||||
}
|
||||
|
||||
int
|
||||
nouveau_abi16_ioctl_getparam(ABI16_IOCTL_ARGS)
|
||||
{
|
||||
@@ -247,6 +262,12 @@ nouveau_abi16_ioctl_getparam(ABI16_IOCTL_ARGS)
|
||||
case NOUVEAU_GETPARAM_GRAPH_UNITS:
|
||||
getparam->value = nvkm_gr_units(gr);
|
||||
break;
|
||||
case NOUVEAU_GETPARAM_EXEC_PUSH_MAX: {
|
||||
int ib_max = getparam_dma_ib_max(device);
|
||||
|
||||
getparam->value = nouveau_exec_push_max_from_ib_max(ib_max);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
NV_PRINTK(dbg, cli, "unknown parameter %lld\n", getparam->param);
|
||||
return -EINVAL;
|
||||
|
||||
@@ -257,10 +257,7 @@ static int
|
||||
nouveau_channel_ctor(struct nouveau_drm *drm, struct nvif_device *device, bool priv, u64 runm,
|
||||
struct nouveau_channel **pchan)
|
||||
{
|
||||
static const struct {
|
||||
s32 oclass;
|
||||
int version;
|
||||
} hosts[] = {
|
||||
const struct nvif_mclass hosts[] = {
|
||||
{ AMPERE_CHANNEL_GPFIFO_B, 0 },
|
||||
{ AMPERE_CHANNEL_GPFIFO_A, 0 },
|
||||
{ TURING_CHANNEL_GPFIFO_A, 0 },
|
||||
@@ -443,9 +440,11 @@ nouveau_channel_init(struct nouveau_channel *chan, u32 vram, u32 gart)
|
||||
}
|
||||
|
||||
/* initialise dma tracking parameters */
|
||||
switch (chan->user.oclass & 0x00ff) {
|
||||
case 0x006b:
|
||||
case 0x006e:
|
||||
switch (chan->user.oclass) {
|
||||
case NV03_CHANNEL_DMA:
|
||||
case NV10_CHANNEL_DMA:
|
||||
case NV17_CHANNEL_DMA:
|
||||
case NV40_CHANNEL_DMA:
|
||||
chan->user_put = 0x40;
|
||||
chan->user_get = 0x44;
|
||||
chan->dma.max = (0x10000 / 4) - 2;
|
||||
@@ -455,7 +454,7 @@ nouveau_channel_init(struct nouveau_channel *chan, u32 vram, u32 gart)
|
||||
chan->user_get = 0x44;
|
||||
chan->user_get_hi = 0x60;
|
||||
chan->dma.ib_base = 0x10000 / 4;
|
||||
chan->dma.ib_max = (0x02000 / 8) - 1;
|
||||
chan->dma.ib_max = NV50_DMA_IB_MAX;
|
||||
chan->dma.ib_put = 0;
|
||||
chan->dma.ib_free = chan->dma.ib_max - chan->dma.ib_put;
|
||||
chan->dma.max = chan->dma.ib_base;
|
||||
|
||||
@@ -49,6 +49,9 @@ void nv50_dma_push(struct nouveau_channel *, u64 addr, u32 length,
|
||||
/* Maximum push buffer size. */
|
||||
#define NV50_DMA_PUSH_MAX_LENGTH 0x7fffff
|
||||
|
||||
/* Maximum IBs per ring. */
|
||||
#define NV50_DMA_IB_MAX ((0x02000 / 8) - 1)
|
||||
|
||||
/* Object handles - for stuff that's doesn't use handle == oclass. */
|
||||
enum {
|
||||
NvDmaFB = 0x80000002,
|
||||
|
||||
@@ -379,7 +379,7 @@ nouveau_exec_ioctl_exec(struct drm_device *dev,
|
||||
struct nouveau_channel *chan = NULL;
|
||||
struct nouveau_exec_job_args args = {};
|
||||
struct drm_nouveau_exec *req = data;
|
||||
int ret = 0;
|
||||
int push_max, ret = 0;
|
||||
|
||||
if (unlikely(!abi16))
|
||||
return -ENOMEM;
|
||||
@@ -404,9 +404,10 @@ nouveau_exec_ioctl_exec(struct drm_device *dev,
|
||||
if (!chan->dma.ib_max)
|
||||
return nouveau_abi16_put(abi16, -ENOSYS);
|
||||
|
||||
if (unlikely(req->push_count > NOUVEAU_GEM_MAX_PUSH)) {
|
||||
push_max = nouveau_exec_push_max_from_ib_max(chan->dma.ib_max);
|
||||
if (unlikely(req->push_count > push_max)) {
|
||||
NV_PRINTK(err, cli, "pushbuf push count exceeds limit: %d max %d\n",
|
||||
req->push_count, NOUVEAU_GEM_MAX_PUSH);
|
||||
req->push_count, push_max);
|
||||
return nouveau_abi16_put(abi16, -EINVAL);
|
||||
}
|
||||
|
||||
|
||||
@@ -51,4 +51,14 @@ int nouveau_exec_job_init(struct nouveau_exec_job **job,
|
||||
int nouveau_exec_ioctl_exec(struct drm_device *dev, void *data,
|
||||
struct drm_file *file_priv);
|
||||
|
||||
static inline unsigned int
|
||||
nouveau_exec_push_max_from_ib_max(int ib_max)
|
||||
{
|
||||
/* Limit the number of IBs per job to half the size of the ring in order
|
||||
* to avoid the ring running dry between submissions and preserve one
|
||||
* more slot for the job's HW fence.
|
||||
*/
|
||||
return ib_max > 1 ? ib_max / 2 - 1 : 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -118,7 +118,7 @@ void drm_kunit_helper_free_device(struct kunit *test, struct device *dev)
|
||||
|
||||
kunit_release_action(test,
|
||||
kunit_action_platform_driver_unregister,
|
||||
pdev);
|
||||
&fake_platform_driver);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(drm_kunit_helper_free_device);
|
||||
|
||||
|
||||
@@ -799,6 +799,8 @@ config HID_NVIDIA_SHIELD
|
||||
tristate "NVIDIA SHIELD devices"
|
||||
depends on USB_HID
|
||||
depends on BT_HIDP
|
||||
depends on LEDS_CLASS
|
||||
select POWER_SUPPLY
|
||||
help
|
||||
Support for NVIDIA SHIELD accessories.
|
||||
|
||||
|
||||
@@ -130,6 +130,10 @@ static int holtek_kbd_input_event(struct input_dev *dev, unsigned int type,
|
||||
return -ENODEV;
|
||||
|
||||
boot_hid = usb_get_intfdata(boot_interface);
|
||||
if (list_empty(&boot_hid->inputs)) {
|
||||
hid_err(hid, "no inputs found\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
boot_hid_input = list_first_entry(&boot_hid->inputs,
|
||||
struct hid_input, list);
|
||||
|
||||
|
||||
@@ -425,6 +425,7 @@
|
||||
#define I2C_DEVICE_ID_HP_SPECTRE_X360_13T_AW100 0x29F5
|
||||
#define I2C_DEVICE_ID_HP_SPECTRE_X360_14T_EA100_V1 0x2BED
|
||||
#define I2C_DEVICE_ID_HP_SPECTRE_X360_14T_EA100_V2 0x2BEE
|
||||
#define I2C_DEVICE_ID_HP_ENVY_X360_15_EU0556NG 0x2D02
|
||||
|
||||
#define USB_VENDOR_ID_ELECOM 0x056e
|
||||
#define USB_DEVICE_ID_ELECOM_BM084 0x0061
|
||||
|
||||
@@ -409,6 +409,8 @@ static const struct hid_device_id hid_battery_quirks[] = {
|
||||
HID_BATTERY_QUIRK_IGNORE },
|
||||
{ HID_I2C_DEVICE(USB_VENDOR_ID_ELAN, I2C_DEVICE_ID_HP_SPECTRE_X360_14T_EA100_V2),
|
||||
HID_BATTERY_QUIRK_IGNORE },
|
||||
{ HID_I2C_DEVICE(USB_VENDOR_ID_ELAN, I2C_DEVICE_ID_HP_ENVY_X360_15_EU0556NG),
|
||||
HID_BATTERY_QUIRK_IGNORE },
|
||||
{}
|
||||
};
|
||||
|
||||
|
||||
@@ -4677,6 +4677,8 @@ static const struct hid_device_id hidpp_devices[] = {
|
||||
HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_LOGITECH, 0xb008) },
|
||||
{ /* MX Master mouse over Bluetooth */
|
||||
HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_LOGITECH, 0xb012) },
|
||||
{ /* M720 Triathlon mouse over Bluetooth */
|
||||
HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_LOGITECH, 0xb015) },
|
||||
{ /* MX Ergo trackball over Bluetooth */
|
||||
HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_LOGITECH, 0xb01d) },
|
||||
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_LOGITECH, 0xb01e) },
|
||||
|
||||
@@ -2144,6 +2144,10 @@ static const struct hid_device_id mt_devices[] = {
|
||||
USB_DEVICE_ID_MTP_STM)},
|
||||
|
||||
/* Synaptics devices */
|
||||
{ .driver_data = MT_CLS_WIN_8_FORCE_MULTI_INPUT,
|
||||
HID_DEVICE(BUS_I2C, HID_GROUP_MULTITOUCH_WIN_8,
|
||||
USB_VENDOR_ID_SYNAPTICS, 0xcd7e) },
|
||||
|
||||
{ .driver_data = MT_CLS_WIN_8_FORCE_MULTI_INPUT,
|
||||
HID_DEVICE(BUS_I2C, HID_GROUP_MULTITOUCH_WIN_8,
|
||||
USB_VENDOR_ID_SYNAPTICS, 0xce08) },
|
||||
|
||||
+103
-72
@@ -2088,7 +2088,9 @@ static int joycon_read_info(struct joycon_ctlr *ctlr)
|
||||
struct joycon_input_report *report;
|
||||
|
||||
req.subcmd_id = JC_SUBCMD_REQ_DEV_INFO;
|
||||
mutex_lock(&ctlr->output_mutex);
|
||||
ret = joycon_send_subcmd(ctlr, &req, 0, HZ);
|
||||
mutex_unlock(&ctlr->output_mutex);
|
||||
if (ret) {
|
||||
hid_err(ctlr->hdev, "Failed to get joycon info; ret=%d\n", ret);
|
||||
return ret;
|
||||
@@ -2117,6 +2119,85 @@ static int joycon_read_info(struct joycon_ctlr *ctlr)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int joycon_init(struct hid_device *hdev)
|
||||
{
|
||||
struct joycon_ctlr *ctlr = hid_get_drvdata(hdev);
|
||||
int ret = 0;
|
||||
|
||||
mutex_lock(&ctlr->output_mutex);
|
||||
/* if handshake command fails, assume ble pro controller */
|
||||
if ((jc_type_is_procon(ctlr) || jc_type_is_chrggrip(ctlr)) &&
|
||||
!joycon_send_usb(ctlr, JC_USB_CMD_HANDSHAKE, HZ)) {
|
||||
hid_dbg(hdev, "detected USB controller\n");
|
||||
/* set baudrate for improved latency */
|
||||
ret = joycon_send_usb(ctlr, JC_USB_CMD_BAUDRATE_3M, HZ);
|
||||
if (ret) {
|
||||
hid_err(hdev, "Failed to set baudrate; ret=%d\n", ret);
|
||||
goto out_unlock;
|
||||
}
|
||||
/* handshake */
|
||||
ret = joycon_send_usb(ctlr, JC_USB_CMD_HANDSHAKE, HZ);
|
||||
if (ret) {
|
||||
hid_err(hdev, "Failed handshake; ret=%d\n", ret);
|
||||
goto out_unlock;
|
||||
}
|
||||
/*
|
||||
* Set no timeout (to keep controller in USB mode).
|
||||
* This doesn't send a response, so ignore the timeout.
|
||||
*/
|
||||
joycon_send_usb(ctlr, JC_USB_CMD_NO_TIMEOUT, HZ/10);
|
||||
} else if (jc_type_is_chrggrip(ctlr)) {
|
||||
hid_err(hdev, "Failed charging grip handshake\n");
|
||||
ret = -ETIMEDOUT;
|
||||
goto out_unlock;
|
||||
}
|
||||
|
||||
/* get controller calibration data, and parse it */
|
||||
ret = joycon_request_calibration(ctlr);
|
||||
if (ret) {
|
||||
/*
|
||||
* We can function with default calibration, but it may be
|
||||
* inaccurate. Provide a warning, and continue on.
|
||||
*/
|
||||
hid_warn(hdev, "Analog stick positions may be inaccurate\n");
|
||||
}
|
||||
|
||||
/* get IMU calibration data, and parse it */
|
||||
ret = joycon_request_imu_calibration(ctlr);
|
||||
if (ret) {
|
||||
/*
|
||||
* We can function with default calibration, but it may be
|
||||
* inaccurate. Provide a warning, and continue on.
|
||||
*/
|
||||
hid_warn(hdev, "Unable to read IMU calibration data\n");
|
||||
}
|
||||
|
||||
/* Set the reporting mode to 0x30, which is the full report mode */
|
||||
ret = joycon_set_report_mode(ctlr);
|
||||
if (ret) {
|
||||
hid_err(hdev, "Failed to set report mode; ret=%d\n", ret);
|
||||
goto out_unlock;
|
||||
}
|
||||
|
||||
/* Enable rumble */
|
||||
ret = joycon_enable_rumble(ctlr);
|
||||
if (ret) {
|
||||
hid_err(hdev, "Failed to enable rumble; ret=%d\n", ret);
|
||||
goto out_unlock;
|
||||
}
|
||||
|
||||
/* Enable the IMU */
|
||||
ret = joycon_enable_imu(ctlr);
|
||||
if (ret) {
|
||||
hid_err(hdev, "Failed to enable the IMU; ret=%d\n", ret);
|
||||
goto out_unlock;
|
||||
}
|
||||
|
||||
out_unlock:
|
||||
mutex_unlock(&ctlr->output_mutex);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Common handler for parsing inputs */
|
||||
static int joycon_ctlr_read_handler(struct joycon_ctlr *ctlr, u8 *data,
|
||||
int size)
|
||||
@@ -2248,85 +2329,19 @@ static int nintendo_hid_probe(struct hid_device *hdev,
|
||||
|
||||
hid_device_io_start(hdev);
|
||||
|
||||
/* Initialize the controller */
|
||||
mutex_lock(&ctlr->output_mutex);
|
||||
/* if handshake command fails, assume ble pro controller */
|
||||
if ((jc_type_is_procon(ctlr) || jc_type_is_chrggrip(ctlr)) &&
|
||||
!joycon_send_usb(ctlr, JC_USB_CMD_HANDSHAKE, HZ)) {
|
||||
hid_dbg(hdev, "detected USB controller\n");
|
||||
/* set baudrate for improved latency */
|
||||
ret = joycon_send_usb(ctlr, JC_USB_CMD_BAUDRATE_3M, HZ);
|
||||
if (ret) {
|
||||
hid_err(hdev, "Failed to set baudrate; ret=%d\n", ret);
|
||||
goto err_mutex;
|
||||
}
|
||||
/* handshake */
|
||||
ret = joycon_send_usb(ctlr, JC_USB_CMD_HANDSHAKE, HZ);
|
||||
if (ret) {
|
||||
hid_err(hdev, "Failed handshake; ret=%d\n", ret);
|
||||
goto err_mutex;
|
||||
}
|
||||
/*
|
||||
* Set no timeout (to keep controller in USB mode).
|
||||
* This doesn't send a response, so ignore the timeout.
|
||||
*/
|
||||
joycon_send_usb(ctlr, JC_USB_CMD_NO_TIMEOUT, HZ/10);
|
||||
} else if (jc_type_is_chrggrip(ctlr)) {
|
||||
hid_err(hdev, "Failed charging grip handshake\n");
|
||||
ret = -ETIMEDOUT;
|
||||
goto err_mutex;
|
||||
}
|
||||
|
||||
/* get controller calibration data, and parse it */
|
||||
ret = joycon_request_calibration(ctlr);
|
||||
ret = joycon_init(hdev);
|
||||
if (ret) {
|
||||
/*
|
||||
* We can function with default calibration, but it may be
|
||||
* inaccurate. Provide a warning, and continue on.
|
||||
*/
|
||||
hid_warn(hdev, "Analog stick positions may be inaccurate\n");
|
||||
}
|
||||
|
||||
/* get IMU calibration data, and parse it */
|
||||
ret = joycon_request_imu_calibration(ctlr);
|
||||
if (ret) {
|
||||
/*
|
||||
* We can function with default calibration, but it may be
|
||||
* inaccurate. Provide a warning, and continue on.
|
||||
*/
|
||||
hid_warn(hdev, "Unable to read IMU calibration data\n");
|
||||
}
|
||||
|
||||
/* Set the reporting mode to 0x30, which is the full report mode */
|
||||
ret = joycon_set_report_mode(ctlr);
|
||||
if (ret) {
|
||||
hid_err(hdev, "Failed to set report mode; ret=%d\n", ret);
|
||||
goto err_mutex;
|
||||
}
|
||||
|
||||
/* Enable rumble */
|
||||
ret = joycon_enable_rumble(ctlr);
|
||||
if (ret) {
|
||||
hid_err(hdev, "Failed to enable rumble; ret=%d\n", ret);
|
||||
goto err_mutex;
|
||||
}
|
||||
|
||||
/* Enable the IMU */
|
||||
ret = joycon_enable_imu(ctlr);
|
||||
if (ret) {
|
||||
hid_err(hdev, "Failed to enable the IMU; ret=%d\n", ret);
|
||||
goto err_mutex;
|
||||
hid_err(hdev, "Failed to initialize controller; ret=%d\n", ret);
|
||||
goto err_close;
|
||||
}
|
||||
|
||||
ret = joycon_read_info(ctlr);
|
||||
if (ret) {
|
||||
hid_err(hdev, "Failed to retrieve controller info; ret=%d\n",
|
||||
ret);
|
||||
goto err_mutex;
|
||||
goto err_close;
|
||||
}
|
||||
|
||||
mutex_unlock(&ctlr->output_mutex);
|
||||
|
||||
/* Initialize the leds */
|
||||
ret = joycon_leds_create(ctlr);
|
||||
if (ret) {
|
||||
@@ -2352,8 +2367,6 @@ static int nintendo_hid_probe(struct hid_device *hdev,
|
||||
hid_dbg(hdev, "probe - success\n");
|
||||
return 0;
|
||||
|
||||
err_mutex:
|
||||
mutex_unlock(&ctlr->output_mutex);
|
||||
err_close:
|
||||
hid_hw_close(hdev);
|
||||
err_stop:
|
||||
@@ -2383,6 +2396,20 @@ static void nintendo_hid_remove(struct hid_device *hdev)
|
||||
hid_hw_stop(hdev);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
|
||||
static int nintendo_hid_resume(struct hid_device *hdev)
|
||||
{
|
||||
int ret = joycon_init(hdev);
|
||||
|
||||
if (ret)
|
||||
hid_err(hdev, "Failed to restore controller after resume");
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
static const struct hid_device_id nintendo_hid_devices[] = {
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_NINTENDO,
|
||||
USB_DEVICE_ID_NINTENDO_PROCON) },
|
||||
@@ -2404,6 +2431,10 @@ static struct hid_driver nintendo_hid_driver = {
|
||||
.probe = nintendo_hid_probe,
|
||||
.remove = nintendo_hid_remove,
|
||||
.raw_event = nintendo_hid_event,
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
.resume = nintendo_hid_resume,
|
||||
#endif
|
||||
};
|
||||
module_hid_driver(nintendo_hid_driver);
|
||||
|
||||
|
||||
@@ -801,7 +801,7 @@ static inline int thunderstrike_led_create(struct thunderstrike *ts)
|
||||
led->name = devm_kasprintf(&ts->base.hdev->dev, GFP_KERNEL,
|
||||
"thunderstrike%d:blue:led", ts->id);
|
||||
led->max_brightness = 1;
|
||||
led->flags = LED_CORE_SUSPENDRESUME;
|
||||
led->flags = LED_CORE_SUSPENDRESUME | LED_RETAIN_AT_SHUTDOWN;
|
||||
led->brightness_get = &thunderstrike_led_get_brightness;
|
||||
led->brightness_set = &thunderstrike_led_set_brightness;
|
||||
|
||||
@@ -1058,7 +1058,7 @@ static int shield_probe(struct hid_device *hdev, const struct hid_device_id *id)
|
||||
ret = hid_hw_start(hdev, HID_CONNECT_HIDINPUT);
|
||||
if (ret) {
|
||||
hid_err(hdev, "Failed to start HID device\n");
|
||||
goto err_haptics;
|
||||
goto err_ts_create;
|
||||
}
|
||||
|
||||
ret = hid_hw_open(hdev);
|
||||
@@ -1073,9 +1073,12 @@ static int shield_probe(struct hid_device *hdev, const struct hid_device_id *id)
|
||||
|
||||
err_stop:
|
||||
hid_hw_stop(hdev);
|
||||
err_haptics:
|
||||
err_ts_create:
|
||||
power_supply_unregister(ts->base.battery_dev.psy);
|
||||
if (ts->haptics_dev)
|
||||
input_unregister_device(ts->haptics_dev);
|
||||
led_classdev_unregister(&ts->led_dev);
|
||||
ida_free(&thunderstrike_ida, ts->id);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -2155,6 +2155,8 @@ static int sony_probe(struct hid_device *hdev, const struct hid_device_id *id)
|
||||
return ret;
|
||||
|
||||
err:
|
||||
usb_free_urb(sc->ghl_urb);
|
||||
|
||||
hid_hw_stop(hdev);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -390,7 +390,7 @@ static int steelseries_headset_arctis_1_fetch_battery(struct hid_device *hdev)
|
||||
ret = hid_hw_raw_request(hdev, arctis_1_battery_request[0],
|
||||
write_buf, sizeof(arctis_1_battery_request),
|
||||
HID_OUTPUT_REPORT, HID_REQ_SET_REPORT);
|
||||
if (ret < sizeof(arctis_1_battery_request)) {
|
||||
if (ret < (int)sizeof(arctis_1_battery_request)) {
|
||||
hid_err(hdev, "hid_hw_raw_request() failed with %d\n", ret);
|
||||
ret = -ENODATA;
|
||||
}
|
||||
|
||||
@@ -133,6 +133,14 @@ static int enable_gpe(struct device *dev)
|
||||
}
|
||||
wakeup = &adev->wakeup;
|
||||
|
||||
/*
|
||||
* Call acpi_disable_gpe(), so that reference count
|
||||
* gpe_event_info->runtime_count doesn't overflow.
|
||||
* When gpe_event_info->runtime_count = 0, the call
|
||||
* to acpi_disable_gpe() simply return.
|
||||
*/
|
||||
acpi_disable_gpe(wakeup->gpe_device, wakeup->gpe_number);
|
||||
|
||||
acpi_sts = acpi_enable_gpe(wakeup->gpe_device, wakeup->gpe_number);
|
||||
if (ACPI_FAILURE(acpi_sts)) {
|
||||
dev_err(dev, "enable ose_gpe failed\n");
|
||||
|
||||
@@ -4968,7 +4968,7 @@ static int cma_iboe_join_multicast(struct rdma_id_private *id_priv,
|
||||
int err = 0;
|
||||
struct sockaddr *addr = (struct sockaddr *)&mc->addr;
|
||||
struct net_device *ndev = NULL;
|
||||
struct ib_sa_multicast ib;
|
||||
struct ib_sa_multicast ib = {};
|
||||
enum ib_gid_type gid_type;
|
||||
bool send_only;
|
||||
|
||||
|
||||
@@ -217,7 +217,7 @@ static int make_cma_ports(struct cma_dev_group *cma_dev_group,
|
||||
return -ENOMEM;
|
||||
|
||||
for (i = 0; i < ports_num; i++) {
|
||||
char port_str[10];
|
||||
char port_str[11];
|
||||
|
||||
ports[i].port_num = i + 1;
|
||||
snprintf(port_str, sizeof(port_str), "%u", i + 1);
|
||||
|
||||
@@ -2529,6 +2529,7 @@ static const struct rdma_nl_cbs nldev_cb_table[RDMA_NLDEV_NUM_OPS] = {
|
||||
},
|
||||
[RDMA_NLDEV_CMD_SYS_SET] = {
|
||||
.doit = nldev_set_sys_set_doit,
|
||||
.flags = RDMA_NL_ADMIN_PERM,
|
||||
},
|
||||
[RDMA_NLDEV_CMD_STAT_SET] = {
|
||||
.doit = nldev_stat_set_doit,
|
||||
|
||||
@@ -546,7 +546,7 @@ static ssize_t verify_hdr(struct ib_uverbs_cmd_hdr *hdr,
|
||||
if (hdr->in_words * 4 != count)
|
||||
return -EINVAL;
|
||||
|
||||
if (count < method_elm->req_size + sizeof(hdr)) {
|
||||
if (count < method_elm->req_size + sizeof(*hdr)) {
|
||||
/*
|
||||
* rdma-core v18 and v19 have a bug where they send DESTROY_CQ
|
||||
* with a 16 byte write instead of 24. Old kernels didn't
|
||||
|
||||
@@ -910,6 +910,10 @@ int bnxt_re_destroy_qp(struct ib_qp *ib_qp, struct ib_udata *udata)
|
||||
list_del(&qp->list);
|
||||
mutex_unlock(&rdev->qp_lock);
|
||||
atomic_dec(&rdev->stats.res.qp_count);
|
||||
if (qp->qplib_qp.type == CMDQ_CREATE_QP_TYPE_RC)
|
||||
atomic_dec(&rdev->stats.res.rc_qp_count);
|
||||
else if (qp->qplib_qp.type == CMDQ_CREATE_QP_TYPE_UD)
|
||||
atomic_dec(&rdev->stats.res.ud_qp_count);
|
||||
|
||||
ib_umem_release(qp->rumem);
|
||||
ib_umem_release(qp->sumem);
|
||||
|
||||
@@ -665,7 +665,6 @@ static int bnxt_qplib_process_qp_event(struct bnxt_qplib_rcfw *rcfw,
|
||||
blocked = cookie & RCFW_CMD_IS_BLOCKING;
|
||||
cookie &= RCFW_MAX_COOKIE_VALUE;
|
||||
crsqe = &rcfw->crsqe_tbl[cookie];
|
||||
crsqe->is_in_used = false;
|
||||
|
||||
if (WARN_ONCE(test_bit(FIRMWARE_STALL_DETECTED,
|
||||
&rcfw->cmdq.flags),
|
||||
@@ -681,8 +680,14 @@ static int bnxt_qplib_process_qp_event(struct bnxt_qplib_rcfw *rcfw,
|
||||
atomic_dec(&rcfw->timeout_send);
|
||||
|
||||
if (crsqe->is_waiter_alive) {
|
||||
if (crsqe->resp)
|
||||
if (crsqe->resp) {
|
||||
memcpy(crsqe->resp, qp_event, sizeof(*qp_event));
|
||||
/* Insert write memory barrier to ensure that
|
||||
* response data is copied before clearing the
|
||||
* flags
|
||||
*/
|
||||
smp_wmb();
|
||||
}
|
||||
if (!blocked)
|
||||
wait_cmds++;
|
||||
}
|
||||
@@ -694,6 +699,8 @@ static int bnxt_qplib_process_qp_event(struct bnxt_qplib_rcfw *rcfw,
|
||||
if (!is_waiter_alive)
|
||||
crsqe->resp = NULL;
|
||||
|
||||
crsqe->is_in_used = false;
|
||||
|
||||
hwq->cons += req_size;
|
||||
|
||||
/* This is a case to handle below scenario -
|
||||
|
||||
@@ -1965,6 +1965,9 @@ static int send_fw_act_open_req(struct c4iw_ep *ep, unsigned int atid)
|
||||
int win;
|
||||
|
||||
skb = get_skb(NULL, sizeof(*req), GFP_KERNEL);
|
||||
if (!skb)
|
||||
return -ENOMEM;
|
||||
|
||||
req = __skb_put_zero(skb, sizeof(*req));
|
||||
req->op_compl = htonl(WR_OP_V(FW_OFLD_CONNECTION_WR));
|
||||
req->len16_pkd = htonl(FW_WR_LEN16_V(DIV_ROUND_UP(sizeof(*req), 16)));
|
||||
|
||||
@@ -133,8 +133,8 @@ static int create_qp_cmd(struct erdma_ucontext *uctx, struct erdma_qp *qp)
|
||||
static int regmr_cmd(struct erdma_dev *dev, struct erdma_mr *mr)
|
||||
{
|
||||
struct erdma_pd *pd = to_epd(mr->ibmr.pd);
|
||||
u32 mtt_level = ERDMA_MR_MTT_0LEVEL;
|
||||
struct erdma_cmdq_reg_mr_req req;
|
||||
u32 mtt_level;
|
||||
|
||||
erdma_cmdq_build_reqhdr(&req.hdr, CMDQ_SUBMOD_RDMA, CMDQ_OPCODE_REG_MR);
|
||||
|
||||
@@ -147,10 +147,9 @@ static int regmr_cmd(struct erdma_dev *dev, struct erdma_mr *mr)
|
||||
req.phy_addr[0] = sg_dma_address(mr->mem.mtt->sglist);
|
||||
mtt_level = mr->mem.mtt->level;
|
||||
}
|
||||
} else {
|
||||
} else if (mr->type != ERDMA_MR_TYPE_DMA) {
|
||||
memcpy(req.phy_addr, mr->mem.mtt->buf,
|
||||
MTT_SIZE(mr->mem.page_cnt));
|
||||
mtt_level = ERDMA_MR_MTT_0LEVEL;
|
||||
}
|
||||
|
||||
req.cfg0 = FIELD_PREP(ERDMA_CMD_MR_VALID_MASK, mr->valid) |
|
||||
@@ -655,7 +654,7 @@ static struct erdma_mtt *erdma_create_scatter_mtt(struct erdma_dev *dev,
|
||||
|
||||
mtt = kzalloc(sizeof(*mtt), GFP_KERNEL);
|
||||
if (!mtt)
|
||||
return NULL;
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
mtt->size = ALIGN(size, PAGE_SIZE);
|
||||
mtt->buf = vzalloc(mtt->size);
|
||||
|
||||
@@ -223,7 +223,7 @@ void del_sysfs_port_mcg_attr(struct mlx4_ib_dev *device, int port_num,
|
||||
static int add_port_entries(struct mlx4_ib_dev *device, int port_num)
|
||||
{
|
||||
int i;
|
||||
char buff[11];
|
||||
char buff[12];
|
||||
struct mlx4_ib_iov_port *port = NULL;
|
||||
int ret = 0 ;
|
||||
struct ib_port_attr attr;
|
||||
|
||||
@@ -2470,8 +2470,8 @@ destroy_res:
|
||||
mlx5_steering_anchor_destroy_res(ft_prio);
|
||||
put_flow_table:
|
||||
put_flow_table(dev, ft_prio, true);
|
||||
mutex_unlock(&dev->flow_db->lock);
|
||||
free_obj:
|
||||
mutex_unlock(&dev->flow_db->lock);
|
||||
kfree(obj);
|
||||
|
||||
return err;
|
||||
|
||||
@@ -2084,7 +2084,7 @@ static inline char *mmap_cmd2str(enum mlx5_ib_mmap_cmd cmd)
|
||||
case MLX5_IB_MMAP_DEVICE_MEM:
|
||||
return "Device Memory";
|
||||
default:
|
||||
return NULL;
|
||||
return "Unknown";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -301,7 +301,8 @@ static int get_mkc_octo_size(unsigned int access_mode, unsigned int ndescs)
|
||||
|
||||
static void set_cache_mkc(struct mlx5_cache_ent *ent, void *mkc)
|
||||
{
|
||||
set_mkc_access_pd_addr_fields(mkc, 0, 0, ent->dev->umrc.pd);
|
||||
set_mkc_access_pd_addr_fields(mkc, ent->rb_key.access_flags, 0,
|
||||
ent->dev->umrc.pd);
|
||||
MLX5_SET(mkc, mkc, free, 1);
|
||||
MLX5_SET(mkc, mkc, umr_en, 1);
|
||||
MLX5_SET(mkc, mkc, access_mode_1_0, ent->rb_key.access_mode & 0x3);
|
||||
@@ -1024,19 +1025,26 @@ void mlx5_mkey_cache_cleanup(struct mlx5_ib_dev *dev)
|
||||
if (!dev->cache.wq)
|
||||
return;
|
||||
|
||||
cancel_delayed_work_sync(&dev->cache.remove_ent_dwork);
|
||||
mutex_lock(&dev->cache.rb_lock);
|
||||
for (node = rb_first(root); node; node = rb_next(node)) {
|
||||
ent = rb_entry(node, struct mlx5_cache_ent, node);
|
||||
xa_lock_irq(&ent->mkeys);
|
||||
ent->disabled = true;
|
||||
xa_unlock_irq(&ent->mkeys);
|
||||
cancel_delayed_work_sync(&ent->dwork);
|
||||
}
|
||||
mutex_unlock(&dev->cache.rb_lock);
|
||||
|
||||
/*
|
||||
* After all entries are disabled and will not reschedule on WQ,
|
||||
* flush it and all async commands.
|
||||
*/
|
||||
flush_workqueue(dev->cache.wq);
|
||||
|
||||
mlx5_mkey_cache_debugfs_cleanup(dev);
|
||||
mlx5_cmd_cleanup_async_ctx(&dev->async_ctx);
|
||||
|
||||
/* At this point all entries are disabled and have no concurrent work. */
|
||||
mutex_lock(&dev->cache.rb_lock);
|
||||
node = rb_first(root);
|
||||
while (node) {
|
||||
ent = rb_entry(node, struct mlx5_cache_ent, node);
|
||||
|
||||
@@ -976,6 +976,7 @@ static void siw_accept_newconn(struct siw_cep *cep)
|
||||
siw_cep_put(cep);
|
||||
new_cep->listen_cep = NULL;
|
||||
if (rv) {
|
||||
siw_cancel_mpatimer(new_cep);
|
||||
siw_cep_set_free(new_cep);
|
||||
goto error;
|
||||
}
|
||||
@@ -1100,9 +1101,12 @@ static void siw_cm_work_handler(struct work_struct *w)
|
||||
/*
|
||||
* Socket close before MPA request received.
|
||||
*/
|
||||
siw_dbg_cep(cep, "no mpareq: drop listener\n");
|
||||
siw_cep_put(cep->listen_cep);
|
||||
cep->listen_cep = NULL;
|
||||
if (cep->listen_cep) {
|
||||
siw_dbg_cep(cep,
|
||||
"no mpareq: drop listener\n");
|
||||
siw_cep_put(cep->listen_cep);
|
||||
cep->listen_cep = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
release_cep = 1;
|
||||
@@ -1227,7 +1231,11 @@ static void siw_cm_llp_data_ready(struct sock *sk)
|
||||
if (!cep)
|
||||
goto out;
|
||||
|
||||
siw_dbg_cep(cep, "state: %d\n", cep->state);
|
||||
siw_dbg_cep(cep, "cep state: %d, socket state %d\n",
|
||||
cep->state, sk->sk_state);
|
||||
|
||||
if (sk->sk_state != TCP_ESTABLISHED)
|
||||
goto out;
|
||||
|
||||
switch (cep->state) {
|
||||
case SIW_EPSTATE_RDMA_MODE:
|
||||
|
||||
@@ -2784,7 +2784,6 @@ static int srp_abort(struct scsi_cmnd *scmnd)
|
||||
u32 tag;
|
||||
u16 ch_idx;
|
||||
struct srp_rdma_ch *ch;
|
||||
int ret;
|
||||
|
||||
shost_printk(KERN_ERR, target->scsi_host, "SRP abort called\n");
|
||||
|
||||
@@ -2798,19 +2797,14 @@ static int srp_abort(struct scsi_cmnd *scmnd)
|
||||
shost_printk(KERN_ERR, target->scsi_host,
|
||||
"Sending SRP abort for tag %#x\n", tag);
|
||||
if (srp_send_tsk_mgmt(ch, tag, scmnd->device->lun,
|
||||
SRP_TSK_ABORT_TASK, NULL) == 0)
|
||||
ret = SUCCESS;
|
||||
else if (target->rport->state == SRP_RPORT_LOST)
|
||||
ret = FAST_IO_FAIL;
|
||||
else
|
||||
ret = FAILED;
|
||||
if (ret == SUCCESS) {
|
||||
SRP_TSK_ABORT_TASK, NULL) == 0) {
|
||||
srp_free_req(ch, req, scmnd, 0);
|
||||
scmnd->result = DID_ABORT << 16;
|
||||
scsi_done(scmnd);
|
||||
return SUCCESS;
|
||||
}
|
||||
if (target->rport->state == SRP_RPORT_LOST)
|
||||
return FAST_IO_FAIL;
|
||||
|
||||
return ret;
|
||||
return FAILED;
|
||||
}
|
||||
|
||||
static int srp_reset_device(struct scsi_cmnd *scmnd)
|
||||
|
||||
@@ -671,8 +671,7 @@ static int apple_dart_attach_dev(struct iommu_domain *domain,
|
||||
return ret;
|
||||
|
||||
switch (domain->type) {
|
||||
case IOMMU_DOMAIN_DMA:
|
||||
case IOMMU_DOMAIN_UNMANAGED:
|
||||
default:
|
||||
ret = apple_dart_domain_add_streams(dart_domain, cfg);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
@@ -186,6 +186,15 @@ static void arm_smmu_free_shared_cd(struct arm_smmu_ctx_desc *cd)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Cloned from the MAX_TLBI_OPS in arch/arm64/include/asm/tlbflush.h, this
|
||||
* is used as a threshold to replace per-page TLBI commands to issue in the
|
||||
* command queue with an address-space TLBI command, when SMMU w/o a range
|
||||
* invalidation feature handles too many per-page TLBI commands, which will
|
||||
* otherwise result in a soft lockup.
|
||||
*/
|
||||
#define CMDQ_MAX_TLBI_OPS (1 << (PAGE_SHIFT - 3))
|
||||
|
||||
static void arm_smmu_mm_arch_invalidate_secondary_tlbs(struct mmu_notifier *mn,
|
||||
struct mm_struct *mm,
|
||||
unsigned long start,
|
||||
@@ -201,8 +210,13 @@ static void arm_smmu_mm_arch_invalidate_secondary_tlbs(struct mmu_notifier *mn,
|
||||
* range. So do a simple translation here by calculating size correctly.
|
||||
*/
|
||||
size = end - start;
|
||||
if (size == ULONG_MAX)
|
||||
size = 0;
|
||||
if (!(smmu_domain->smmu->features & ARM_SMMU_FEAT_RANGE_INV)) {
|
||||
if (size >= CMDQ_MAX_TLBI_OPS * PAGE_SIZE)
|
||||
size = 0;
|
||||
} else {
|
||||
if (size == ULONG_MAX)
|
||||
size = 0;
|
||||
}
|
||||
|
||||
if (!(smmu_domain->smmu->features & ARM_SMMU_FEAT_BTM)) {
|
||||
if (!size)
|
||||
|
||||
@@ -1895,18 +1895,23 @@ static void __arm_smmu_tlb_inv_range(struct arm_smmu_cmdq_ent *cmd,
|
||||
/* Get the leaf page size */
|
||||
tg = __ffs(smmu_domain->domain.pgsize_bitmap);
|
||||
|
||||
num_pages = size >> tg;
|
||||
|
||||
/* Convert page size of 12,14,16 (log2) to 1,2,3 */
|
||||
cmd->tlbi.tg = (tg - 10) / 2;
|
||||
|
||||
/*
|
||||
* Determine what level the granule is at. For non-leaf, io-pgtable
|
||||
* assumes .tlb_flush_walk can invalidate multiple levels at once,
|
||||
* so ignore the nominal last-level granule and leave TTL=0.
|
||||
* Determine what level the granule is at. For non-leaf, both
|
||||
* io-pgtable and SVA pass a nominal last-level granule because
|
||||
* they don't know what level(s) actually apply, so ignore that
|
||||
* and leave TTL=0. However for various errata reasons we still
|
||||
* want to use a range command, so avoid the SVA corner case
|
||||
* where both scale and num could be 0 as well.
|
||||
*/
|
||||
if (cmd->tlbi.leaf)
|
||||
cmd->tlbi.ttl = 4 - ((ilog2(granule) - 3) / (tg - 3));
|
||||
|
||||
num_pages = size >> tg;
|
||||
else if ((num_pages & CMDQ_TLBI_RANGE_NUM_MAX) == 1)
|
||||
num_pages++;
|
||||
}
|
||||
|
||||
cmds.num = 0;
|
||||
|
||||
@@ -2998,13 +2998,6 @@ static int iommu_suspend(void)
|
||||
struct intel_iommu *iommu = NULL;
|
||||
unsigned long flag;
|
||||
|
||||
for_each_active_iommu(iommu, drhd) {
|
||||
iommu->iommu_state = kcalloc(MAX_SR_DMAR_REGS, sizeof(u32),
|
||||
GFP_KERNEL);
|
||||
if (!iommu->iommu_state)
|
||||
goto nomem;
|
||||
}
|
||||
|
||||
iommu_flush_all();
|
||||
|
||||
for_each_active_iommu(iommu, drhd) {
|
||||
@@ -3024,12 +3017,6 @@ static int iommu_suspend(void)
|
||||
raw_spin_unlock_irqrestore(&iommu->register_lock, flag);
|
||||
}
|
||||
return 0;
|
||||
|
||||
nomem:
|
||||
for_each_active_iommu(iommu, drhd)
|
||||
kfree(iommu->iommu_state);
|
||||
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
static void iommu_resume(void)
|
||||
@@ -3061,9 +3048,6 @@ static void iommu_resume(void)
|
||||
|
||||
raw_spin_unlock_irqrestore(&iommu->register_lock, flag);
|
||||
}
|
||||
|
||||
for_each_active_iommu(iommu, drhd)
|
||||
kfree(iommu->iommu_state);
|
||||
}
|
||||
|
||||
static struct syscore_ops iommu_syscore_ops = {
|
||||
|
||||
@@ -681,7 +681,7 @@ struct intel_iommu {
|
||||
struct iopf_queue *iopf_queue;
|
||||
unsigned char iopfq_name[16];
|
||||
struct q_inval *qi; /* Queued invalidation info */
|
||||
u32 *iommu_state; /* Store iommu states between suspend and resume.*/
|
||||
u32 iommu_state[MAX_SR_DMAR_REGS]; /* Store iommu states between suspend and resume.*/
|
||||
|
||||
#ifdef CONFIG_IRQ_REMAP
|
||||
struct ir_table *ir_table; /* Interrupt remapping info */
|
||||
|
||||
@@ -262,7 +262,7 @@ struct mtk_iommu_data {
|
||||
struct device *smicomm_dev;
|
||||
|
||||
struct mtk_iommu_bank_data *bank;
|
||||
struct mtk_iommu_domain *share_dom; /* For 2 HWs share pgtable */
|
||||
struct mtk_iommu_domain *share_dom;
|
||||
|
||||
struct regmap *pericfg;
|
||||
struct mutex mutex; /* Protect m4u_group/m4u_dom above */
|
||||
@@ -643,8 +643,8 @@ static int mtk_iommu_domain_finalise(struct mtk_iommu_domain *dom,
|
||||
struct mtk_iommu_domain *share_dom = data->share_dom;
|
||||
const struct mtk_iommu_iova_region *region;
|
||||
|
||||
/* Always use share domain in sharing pgtable case */
|
||||
if (MTK_IOMMU_HAS_FLAG(data->plat_data, SHARE_PGTABLE) && share_dom) {
|
||||
/* Share pgtable when 2 MM IOMMU share the pgtable or one IOMMU use multiple iova ranges */
|
||||
if (share_dom) {
|
||||
dom->iop = share_dom->iop;
|
||||
dom->cfg = share_dom->cfg;
|
||||
dom->domain.pgsize_bitmap = share_dom->cfg.pgsize_bitmap;
|
||||
@@ -677,8 +677,7 @@ static int mtk_iommu_domain_finalise(struct mtk_iommu_domain *dom,
|
||||
/* Update our support page sizes bitmap */
|
||||
dom->domain.pgsize_bitmap = dom->cfg.pgsize_bitmap;
|
||||
|
||||
if (MTK_IOMMU_HAS_FLAG(data->plat_data, SHARE_PGTABLE))
|
||||
data->share_dom = dom;
|
||||
data->share_dom = dom;
|
||||
|
||||
update_iova_region:
|
||||
/* Update the iova region for this domain */
|
||||
|
||||
@@ -479,10 +479,6 @@ int led_compose_name(struct device *dev, struct led_init_data *init_data,
|
||||
|
||||
led_parse_fwnode_props(dev, fwnode, &props);
|
||||
|
||||
/* We want to label LEDs that can produce full range of colors
|
||||
* as RGB, not multicolor */
|
||||
BUG_ON(props.color == LED_COLOR_ID_MULTI);
|
||||
|
||||
if (props.label) {
|
||||
/*
|
||||
* If init_data.devicename is NULL, then it indicates that
|
||||
|
||||
@@ -748,17 +748,16 @@ err:
|
||||
/*
|
||||
* Cleanup zoned device information.
|
||||
*/
|
||||
static void dmz_put_zoned_device(struct dm_target *ti)
|
||||
static void dmz_put_zoned_devices(struct dm_target *ti)
|
||||
{
|
||||
struct dmz_target *dmz = ti->private;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < dmz->nr_ddevs; i++) {
|
||||
if (dmz->ddev[i]) {
|
||||
for (i = 0; i < dmz->nr_ddevs; i++)
|
||||
if (dmz->ddev[i])
|
||||
dm_put_device(ti, dmz->ddev[i]);
|
||||
dmz->ddev[i] = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
kfree(dmz->ddev);
|
||||
}
|
||||
|
||||
static int dmz_fixup_devices(struct dm_target *ti)
|
||||
@@ -948,7 +947,7 @@ err_bio:
|
||||
err_meta:
|
||||
dmz_dtr_metadata(dmz->metadata);
|
||||
err_dev:
|
||||
dmz_put_zoned_device(ti);
|
||||
dmz_put_zoned_devices(ti);
|
||||
err:
|
||||
kfree(dmz->dev);
|
||||
kfree(dmz);
|
||||
@@ -978,7 +977,7 @@ static void dmz_dtr(struct dm_target *ti)
|
||||
|
||||
bioset_exit(&dmz->bio_set);
|
||||
|
||||
dmz_put_zoned_device(ti);
|
||||
dmz_put_zoned_devices(ti);
|
||||
|
||||
mutex_destroy(&dmz->chunk_lock);
|
||||
|
||||
|
||||
@@ -854,6 +854,13 @@ struct stripe_head *raid5_get_active_stripe(struct r5conf *conf,
|
||||
|
||||
set_bit(R5_INACTIVE_BLOCKED, &conf->cache_state);
|
||||
r5l_wake_reclaim(conf->log, 0);
|
||||
|
||||
/* release batch_last before wait to avoid risk of deadlock */
|
||||
if (ctx && ctx->batch_last) {
|
||||
raid5_release_stripe(ctx->batch_last);
|
||||
ctx->batch_last = NULL;
|
||||
}
|
||||
|
||||
wait_event_lock_irq(conf->wait_for_stripe,
|
||||
is_inactive_blocked(conf, hash),
|
||||
*(conf->hash_locks + hash));
|
||||
|
||||
@@ -1,11 +1,19 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
config IPU_BRIDGE
|
||||
tristate
|
||||
depends on I2C && ACPI
|
||||
help
|
||||
This is a helper module for the IPU bridge, which can be
|
||||
used by ipu3 and other drivers. In order to handle module
|
||||
dependencies, this is selected by each driver that needs it.
|
||||
|
||||
source "drivers/media/pci/intel/ipu3/Kconfig"
|
||||
source "drivers/media/pci/intel/ivsc/Kconfig"
|
||||
|
||||
config IPU_BRIDGE
|
||||
tristate "Intel IPU Bridge"
|
||||
depends on I2C && ACPI
|
||||
help
|
||||
The IPU bridge is a helper library for Intel IPU drivers to
|
||||
function on systems shipped with Windows.
|
||||
|
||||
Currently used by the ipu3-cio2 and atomisp drivers.
|
||||
|
||||
Supported systems include:
|
||||
|
||||
- Microsoft Surface models (except Surface Pro 3)
|
||||
- The Lenovo Miix line (for example the 510, 520, 710 and 720)
|
||||
- Dell 7285
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
config VIDEO_IPU3_CIO2
|
||||
tristate "Intel ipu3-cio2 driver"
|
||||
depends on VIDEO_DEV && PCI
|
||||
depends on IPU_BRIDGE || !IPU_BRIDGE
|
||||
depends on ACPI || COMPILE_TEST
|
||||
depends on X86
|
||||
select MEDIA_CONTROLLER
|
||||
select VIDEO_V4L2_SUBDEV_API
|
||||
select V4L2_FWNODE
|
||||
select VIDEOBUF2_DMA_SG
|
||||
select IPU_BRIDGE if CIO2_BRIDGE
|
||||
|
||||
help
|
||||
This is the Intel IPU3 CIO2 CSI-2 receiver unit, found in Intel
|
||||
@@ -18,22 +18,3 @@ config VIDEO_IPU3_CIO2
|
||||
Say Y or M here if you have a Skylake/Kaby Lake SoC with MIPI CSI-2
|
||||
connected camera.
|
||||
The module will be called ipu3-cio2.
|
||||
|
||||
config CIO2_BRIDGE
|
||||
bool "IPU3 CIO2 Sensors Bridge"
|
||||
depends on VIDEO_IPU3_CIO2 && ACPI
|
||||
depends on I2C
|
||||
help
|
||||
This extension provides an API for the ipu3-cio2 driver to create
|
||||
connections to cameras that are hidden in the SSDB buffer in ACPI.
|
||||
It can be used to enable support for cameras in detachable / hybrid
|
||||
devices that ship with Windows.
|
||||
|
||||
Say Y here if your device is a detachable / hybrid laptop that comes
|
||||
with Windows installed by the OEM, for example:
|
||||
|
||||
- Microsoft Surface models (except Surface Pro 3)
|
||||
- The Lenovo Miix line (for example the 510, 520, 710 and 720)
|
||||
- Dell 7285
|
||||
|
||||
If in doubt, say N here.
|
||||
|
||||
@@ -6,7 +6,7 @@ config INTEL_VSC
|
||||
depends on INTEL_MEI && ACPI && VIDEO_DEV
|
||||
select MEDIA_CONTROLLER
|
||||
select VIDEO_V4L2_SUBDEV_API
|
||||
select V4L2_ASYNC
|
||||
select V4L2_FWNODE
|
||||
help
|
||||
This adds support for Intel Visual Sensing Controller (IVSC).
|
||||
|
||||
|
||||
@@ -2398,7 +2398,7 @@ static int pxa_camera_probe(struct platform_device *pdev)
|
||||
PXA_CAM_DRV_NAME, pcdev);
|
||||
if (err) {
|
||||
dev_err(&pdev->dev, "Camera interrupt register failed\n");
|
||||
goto exit_v4l2_device_unregister;
|
||||
goto exit_deactivate;
|
||||
}
|
||||
|
||||
pcdev->notifier.ops = &pxa_camera_sensor_ops;
|
||||
|
||||
@@ -138,7 +138,8 @@ int vpu_enc_init(struct venc_vpu_inst *vpu)
|
||||
vpu->ctx->vpu_inst = vpu;
|
||||
|
||||
status = mtk_vcodec_fw_ipi_register(vpu->ctx->dev->fw_handler, vpu->id,
|
||||
vpu_enc_ipi_handler, "venc", NULL);
|
||||
vpu_enc_ipi_handler, "venc",
|
||||
vpu->ctx->dev);
|
||||
|
||||
if (status) {
|
||||
mtk_venc_err(vpu->ctx, "vpu_ipi_register fail %d", status);
|
||||
|
||||
@@ -241,6 +241,7 @@ config MFD_CS42L43
|
||||
tristate
|
||||
select MFD_CORE
|
||||
select REGMAP
|
||||
select REGMAP_IRQ
|
||||
|
||||
config MFD_CS42L43_I2C
|
||||
tristate "Cirrus Logic CS42L43 (I2C)"
|
||||
|
||||
@@ -894,6 +894,13 @@ int ubi_attach_mtd_dev(struct mtd_info *mtd, int ubi_num,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* UBI cannot work on flashes with zero erasesize. */
|
||||
if (!mtd->erasesize) {
|
||||
pr_err("ubi: refuse attaching mtd%d - zero erasesize flash is not supported\n",
|
||||
mtd->index);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (ubi_num == UBI_DEV_NUM_AUTO) {
|
||||
/* Search for an empty slot in the @ubi_devices array */
|
||||
for (ubi_num = 0; ubi_num < UBI_MAX_DEVICES; ubi_num++)
|
||||
|
||||
@@ -2958,14 +2958,16 @@ static void mv88e6xxx_hardware_reset(struct mv88e6xxx_chip *chip)
|
||||
* from the wrong location resulting in the switch booting
|
||||
* to wrong mode and inoperable.
|
||||
*/
|
||||
mv88e6xxx_g1_wait_eeprom_done(chip);
|
||||
if (chip->info->ops->get_eeprom)
|
||||
mv88e6xxx_g2_eeprom_wait(chip);
|
||||
|
||||
gpiod_set_value_cansleep(gpiod, 1);
|
||||
usleep_range(10000, 20000);
|
||||
gpiod_set_value_cansleep(gpiod, 0);
|
||||
usleep_range(10000, 20000);
|
||||
|
||||
mv88e6xxx_g1_wait_eeprom_done(chip);
|
||||
if (chip->info->ops->get_eeprom)
|
||||
mv88e6xxx_g2_eeprom_wait(chip);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -75,37 +75,6 @@ static int mv88e6xxx_g1_wait_init_ready(struct mv88e6xxx_chip *chip)
|
||||
return mv88e6xxx_g1_wait_bit(chip, MV88E6XXX_G1_STS, bit, 1);
|
||||
}
|
||||
|
||||
void mv88e6xxx_g1_wait_eeprom_done(struct mv88e6xxx_chip *chip)
|
||||
{
|
||||
const unsigned long timeout = jiffies + 1 * HZ;
|
||||
u16 val;
|
||||
int err;
|
||||
|
||||
/* Wait up to 1 second for the switch to finish reading the
|
||||
* EEPROM.
|
||||
*/
|
||||
while (time_before(jiffies, timeout)) {
|
||||
err = mv88e6xxx_g1_read(chip, MV88E6XXX_G1_STS, &val);
|
||||
if (err) {
|
||||
dev_err(chip->dev, "Error reading status");
|
||||
return;
|
||||
}
|
||||
|
||||
/* If the switch is still resetting, it may not
|
||||
* respond on the bus, and so MDIO read returns
|
||||
* 0xffff. Differentiate between that, and waiting for
|
||||
* the EEPROM to be done by bit 0 being set.
|
||||
*/
|
||||
if (val != 0xffff &&
|
||||
val & BIT(MV88E6XXX_G1_STS_IRQ_EEPROM_DONE))
|
||||
return;
|
||||
|
||||
usleep_range(1000, 2000);
|
||||
}
|
||||
|
||||
dev_err(chip->dev, "Timeout waiting for EEPROM done");
|
||||
}
|
||||
|
||||
/* Offset 0x01: Switch MAC Address Register Bytes 0 & 1
|
||||
* Offset 0x02: Switch MAC Address Register Bytes 2 & 3
|
||||
* Offset 0x03: Switch MAC Address Register Bytes 4 & 5
|
||||
|
||||
@@ -282,7 +282,6 @@ int mv88e6xxx_g1_set_switch_mac(struct mv88e6xxx_chip *chip, u8 *addr);
|
||||
int mv88e6185_g1_reset(struct mv88e6xxx_chip *chip);
|
||||
int mv88e6352_g1_reset(struct mv88e6xxx_chip *chip);
|
||||
int mv88e6250_g1_reset(struct mv88e6xxx_chip *chip);
|
||||
void mv88e6xxx_g1_wait_eeprom_done(struct mv88e6xxx_chip *chip);
|
||||
|
||||
int mv88e6185_g1_ppu_enable(struct mv88e6xxx_chip *chip);
|
||||
int mv88e6185_g1_ppu_disable(struct mv88e6xxx_chip *chip);
|
||||
|
||||
@@ -340,7 +340,7 @@ int mv88e6xxx_g2_pot_clear(struct mv88e6xxx_chip *chip)
|
||||
* Offset 0x15: EEPROM Addr (for 8-bit data access)
|
||||
*/
|
||||
|
||||
static int mv88e6xxx_g2_eeprom_wait(struct mv88e6xxx_chip *chip)
|
||||
int mv88e6xxx_g2_eeprom_wait(struct mv88e6xxx_chip *chip)
|
||||
{
|
||||
int bit = __bf_shf(MV88E6XXX_G2_EEPROM_CMD_BUSY);
|
||||
int err;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user