mirror of
https://github.com/torvalds/linux.git
synced 2024-11-24 13:11:40 +00:00
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Cross-merge networking fixes after downstream PR. No conflicts. Adjacent changes:e3f02f32a0
("ionic: fix kernel panic due to multi-buffer handling")d9c0420999
("ionic: Mark error paths in the data path as unlikely") Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
commit
193b9b2002
4
CREDITS
4
CREDITS
@ -1214,6 +1214,10 @@ D: UDF filesystem
|
||||
S: (ask for current address)
|
||||
S: USA
|
||||
|
||||
N: Larry Finger
|
||||
E: Larry.Finger@lwfinger.net
|
||||
D: Maintainer of wireless drivers, too many to list here
|
||||
|
||||
N: Jürgen Fischer
|
||||
E: fischer@norbit.de
|
||||
D: Author of Adaptec AHA-152x SCSI driver
|
||||
|
@ -59,8 +59,8 @@ properties:
|
||||
- 3
|
||||
|
||||
dma-channels:
|
||||
minItems: 1
|
||||
maxItems: 64
|
||||
minimum: 1
|
||||
maximum: 64
|
||||
|
||||
clocks:
|
||||
minItems: 1
|
||||
|
@ -77,7 +77,7 @@ required:
|
||||
- clocks
|
||||
|
||||
allOf:
|
||||
- $ref: i2c-controller.yaml
|
||||
- $ref: /schemas/i2c/i2c-controller.yaml#
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
|
@ -21,7 +21,7 @@ description: |
|
||||
google,cros-ec-spi or google,cros-ec-i2c.
|
||||
|
||||
allOf:
|
||||
- $ref: i2c-controller.yaml#
|
||||
- $ref: /schemas/i2c/i2c-controller.yaml#
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
|
@ -128,7 +128,6 @@ required:
|
||||
- cell-index
|
||||
- reg
|
||||
- fsl,fman-ports
|
||||
- ptp-timer
|
||||
|
||||
dependencies:
|
||||
pcs-handle-names:
|
||||
|
@ -29,7 +29,6 @@ properties:
|
||||
- qcom,pm7325-gpio
|
||||
- qcom,pm7550ba-gpio
|
||||
- qcom,pm8005-gpio
|
||||
- qcom,pm8008-gpio
|
||||
- qcom,pm8018-gpio
|
||||
- qcom,pm8019-gpio
|
||||
- qcom,pm8038-gpio
|
||||
@ -126,7 +125,6 @@ allOf:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- qcom,pm8008-gpio
|
||||
- qcom,pmi8950-gpio
|
||||
- qcom,pmr735d-gpio
|
||||
then:
|
||||
@ -448,7 +446,6 @@ $defs:
|
||||
- gpio1-gpio10 for pm7325
|
||||
- gpio1-gpio8 for pm7550ba
|
||||
- gpio1-gpio4 for pm8005
|
||||
- gpio1-gpio2 for pm8008
|
||||
- gpio1-gpio6 for pm8018
|
||||
- gpio1-gpio12 for pm8038
|
||||
- gpio1-gpio40 for pm8058
|
||||
|
@ -571,6 +571,7 @@ encoded manner. The codes are the following:
|
||||
um userfaultfd missing tracking
|
||||
uw userfaultfd wr-protect tracking
|
||||
ss shadow stack page
|
||||
sl sealed
|
||||
== =======================================
|
||||
|
||||
Note that there is no guarantee that every flag and associated mnemonic will
|
||||
|
@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
<!-- Updated to inclusive terminology by Wolfram Sang -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
@ -1120,7 +1121,7 @@
|
||||
<rect
|
||||
style="opacity:1;fill:#ffb9b9;fill-opacity:1;stroke:#f00000;stroke-width:2.8125;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect4424-3-2-9-7"
|
||||
width="112.5"
|
||||
width="134.5"
|
||||
height="113.75008"
|
||||
x="112.5"
|
||||
y="471.11221"
|
||||
@ -1133,15 +1134,15 @@
|
||||
y="521.46259"
|
||||
id="text4349"><tspan
|
||||
sodipodi:role="line"
|
||||
x="167.5354"
|
||||
x="178.5354"
|
||||
y="521.46259"
|
||||
style="font-size:25px;line-height:1.25;font-family:sans-serif;text-align:center;text-anchor:middle"
|
||||
id="tspan1273">I2C</tspan><tspan
|
||||
sodipodi:role="line"
|
||||
x="167.5354"
|
||||
x="178.5354"
|
||||
y="552.71259"
|
||||
style="font-size:25px;line-height:1.25;font-family:sans-serif;text-align:center;text-anchor:middle"
|
||||
id="tspan1285">Master</tspan></text>
|
||||
id="tspan1285">Controller</tspan></text>
|
||||
<rect
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#b9ffb9;fill-opacity:1;fill-rule:nonzero;stroke:#006400;stroke-width:2.8125;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||
id="rect4424-3-2-9-7-3-3-5-3"
|
||||
@ -1171,7 +1172,7 @@
|
||||
x="318.59131"
|
||||
y="552.08752"
|
||||
style="font-size:25.00000191px;line-height:1.25;font-family:sans-serif;text-align:center;text-anchor:middle;stroke-width:1px"
|
||||
id="tspan1287">Slave</tspan></text>
|
||||
id="tspan1287">Target</tspan></text>
|
||||
<path
|
||||
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.99968767;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 112.49995,677.36223 c 712.50005,0 712.50005,0 712.50005,0"
|
||||
@ -1233,7 +1234,7 @@
|
||||
x="468.59131"
|
||||
y="552.08746"
|
||||
style="font-size:25.00000191px;line-height:1.25;font-family:sans-serif;text-align:center;text-anchor:middle;stroke-width:1px"
|
||||
id="tspan1287-6">Slave</tspan></text>
|
||||
id="tspan1287-6">Target</tspan></text>
|
||||
<rect
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#b9ffb9;fill-opacity:1;fill-rule:nonzero;stroke:#006400;stroke-width:2.8125;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||
id="rect4424-3-2-9-7-3-3-5-3-1"
|
||||
@ -1258,7 +1259,7 @@
|
||||
x="618.59131"
|
||||
y="552.08746"
|
||||
style="font-size:25.00000191px;line-height:1.25;font-family:sans-serif;text-align:center;text-anchor:middle;stroke-width:1px"
|
||||
id="tspan1287-9">Slave</tspan></text>
|
||||
id="tspan1287-9">Target</tspan></text>
|
||||
<path
|
||||
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.99968743;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#DotM)"
|
||||
d="m 150,583.61221 v 93.75"
|
||||
|
Before Width: | Height: | Size: 55 KiB After Width: | Height: | Size: 55 KiB |
@ -3,29 +3,27 @@ Introduction to I2C and SMBus
|
||||
=============================
|
||||
|
||||
I²C (pronounce: I squared C and written I2C in the kernel documentation) is
|
||||
a protocol developed by Philips. It is a slow two-wire protocol (variable
|
||||
speed, up to 400 kHz), with a high speed extension (3.4 MHz). It provides
|
||||
a protocol developed by Philips. It is a two-wire protocol with variable
|
||||
speed (typically up to 400 kHz, high speed modes up to 5 MHz). It provides
|
||||
an inexpensive bus for connecting many types of devices with infrequent or
|
||||
low bandwidth communications needs. I2C is widely used with embedded
|
||||
systems. Some systems use variants that don't meet branding requirements,
|
||||
low bandwidth communications needs. I2C is widely used with embedded
|
||||
systems. Some systems use variants that don't meet branding requirements,
|
||||
and so are not advertised as being I2C but come under different names,
|
||||
e.g. TWI (Two Wire Interface), IIC.
|
||||
|
||||
The latest official I2C specification is the `"I2C-bus specification and user
|
||||
manual" (UM10204) <https://www.nxp.com/webapp/Download?colCode=UM10204>`_
|
||||
published by NXP Semiconductors. However, you need to log-in to the site to
|
||||
access the PDF. An older version of the specification (revision 6) is archived
|
||||
`here <https://web.archive.org/web/20210813122132/https://www.nxp.com/docs/en/user-guide/UM10204.pdf>`_.
|
||||
The latest official I2C specification is the `"I²C-bus specification and user
|
||||
manual" (UM10204) <https://www.nxp.com/docs/en/user-guide/UM10204.pdf>`_
|
||||
published by NXP Semiconductors, version 7 as of this writing.
|
||||
|
||||
SMBus (System Management Bus) is based on the I2C protocol, and is mostly
|
||||
a subset of I2C protocols and signaling. Many I2C devices will work on an
|
||||
a subset of I2C protocols and signaling. Many I2C devices will work on an
|
||||
SMBus, but some SMBus protocols add semantics beyond what is required to
|
||||
achieve I2C branding. Modern PC mainboards rely on SMBus. The most common
|
||||
achieve I2C branding. Modern PC mainboards rely on SMBus. The most common
|
||||
devices connected through SMBus are RAM modules configured using I2C EEPROMs,
|
||||
and hardware monitoring chips.
|
||||
|
||||
Because the SMBus is mostly a subset of the generalized I2C bus, we can
|
||||
use its protocols on many I2C systems. However, there are systems that don't
|
||||
use its protocols on many I2C systems. However, there are systems that don't
|
||||
meet both SMBus and I2C electrical constraints; and others which can't
|
||||
implement all the common SMBus protocol semantics or messages.
|
||||
|
||||
@ -33,29 +31,52 @@ implement all the common SMBus protocol semantics or messages.
|
||||
Terminology
|
||||
===========
|
||||
|
||||
Using the terminology from the official documentation, the I2C bus connects
|
||||
one or more *master* chips and one or more *slave* chips.
|
||||
The I2C bus connects one or more controller chips and one or more target chips.
|
||||
|
||||
.. kernel-figure:: i2c_bus.svg
|
||||
:alt: Simple I2C bus with one master and 3 slaves
|
||||
:alt: Simple I2C bus with one controller and 3 targets
|
||||
|
||||
Simple I2C bus
|
||||
|
||||
A **master** chip is a node that starts communications with slaves. In the
|
||||
Linux kernel implementation it is called an **adapter** or bus. Adapter
|
||||
drivers are in the ``drivers/i2c/busses/`` subdirectory.
|
||||
A **controller** chip is a node that starts communications with targets. In the
|
||||
Linux kernel implementation it is also called an "adapter" or "bus". Controller
|
||||
drivers are usually in the ``drivers/i2c/busses/`` subdirectory.
|
||||
|
||||
An **algorithm** contains general code that can be used to implement a
|
||||
whole class of I2C adapters. Each specific adapter driver either depends on
|
||||
an algorithm driver in the ``drivers/i2c/algos/`` subdirectory, or includes
|
||||
its own implementation.
|
||||
An **algorithm** contains general code that can be used to implement a whole
|
||||
class of I2C controllers. Each specific controller driver either depends on an
|
||||
algorithm driver in the ``drivers/i2c/algos/`` subdirectory, or includes its
|
||||
own implementation.
|
||||
|
||||
A **slave** chip is a node that responds to communications when addressed
|
||||
by the master. In Linux it is called a **client**. Client drivers are kept
|
||||
in a directory specific to the feature they provide, for example
|
||||
``drivers/media/gpio/`` for GPIO expanders and ``drivers/media/i2c/`` for
|
||||
A **target** chip is a node that responds to communications when addressed by a
|
||||
controller. In the Linux kernel implementation it is also called a "client".
|
||||
While targets are usually separate external chips, Linux can also act as a
|
||||
target (needs hardware support) and respond to another controller on the bus.
|
||||
This is then called a **local target**. In contrast, an external chip is called
|
||||
a **remote target**.
|
||||
|
||||
Target drivers are kept in a directory specific to the feature they provide,
|
||||
for example ``drivers/gpio/`` for GPIO expanders and ``drivers/media/i2c/`` for
|
||||
video-related chips.
|
||||
|
||||
For the example configuration in figure, you will need a driver for your
|
||||
I2C adapter, and drivers for your I2C devices (usually one driver for each
|
||||
device).
|
||||
For the example configuration in the figure above, you will need one driver for
|
||||
the I2C controller, and drivers for your I2C targets. Usually one driver for
|
||||
each target.
|
||||
|
||||
Synonyms
|
||||
--------
|
||||
|
||||
As mentioned above, the Linux I2C implementation historically uses the terms
|
||||
"adapter" for controller and "client" for target. A number of data structures
|
||||
have these synonyms in their name. So, when discussing implementation details,
|
||||
you should be aware of these terms as well. The official wording is preferred,
|
||||
though.
|
||||
|
||||
Outdated terminology
|
||||
--------------------
|
||||
|
||||
In earlier I2C specifications, controller was named "master" and target was
|
||||
named "slave". These terms have been obsoleted with v7 of the specification and
|
||||
their use is also discouraged by the Linux Kernel Code of Conduct. You may
|
||||
still find them in references to documentation which has not been updated. The
|
||||
general attitude, however, is to use the inclusive terms: controller and
|
||||
target. Work to replace the old terminology in the Linux Kernel is on-going.
|
||||
|
@ -1634,7 +1634,7 @@ operations:
|
||||
attributes:
|
||||
- header
|
||||
reply:
|
||||
attributes: &pse
|
||||
attributes:
|
||||
- header
|
||||
- podl-pse-admin-state
|
||||
- podl-pse-admin-control
|
||||
@ -1651,7 +1651,10 @@ operations:
|
||||
|
||||
do:
|
||||
request:
|
||||
attributes: *pse
|
||||
attributes:
|
||||
- header
|
||||
- podl-pse-admin-control
|
||||
- c33-pse-admin-control
|
||||
-
|
||||
name: rss-get
|
||||
doc: Get RSS params.
|
||||
|
@ -123,8 +123,6 @@ operations:
|
||||
doc: dump pending nfsd rpc
|
||||
attribute-set: rpc-status
|
||||
dump:
|
||||
pre: nfsd-nl-rpc-status-get-start
|
||||
post: nfsd-nl-rpc-status-get-done
|
||||
reply:
|
||||
attributes:
|
||||
- xid
|
||||
|
21
MAINTAINERS
21
MAINTAINERS
@ -3601,10 +3601,9 @@ W: https://wireless.wiki.kernel.org/en/users/Drivers/b43
|
||||
F: drivers/net/wireless/broadcom/b43/
|
||||
|
||||
B43LEGACY WIRELESS DRIVER
|
||||
M: Larry Finger <Larry.Finger@lwfinger.net>
|
||||
L: linux-wireless@vger.kernel.org
|
||||
L: b43-dev@lists.infradead.org
|
||||
S: Maintained
|
||||
S: Orphan
|
||||
W: https://wireless.wiki.kernel.org/en/users/Drivers/b43
|
||||
F: drivers/net/wireless/broadcom/b43legacy/
|
||||
|
||||
@ -4083,12 +4082,13 @@ F: kernel/bpf/ringbuf.c
|
||||
|
||||
BPF [SECURITY & LSM] (Security Audit and Enforcement using BPF)
|
||||
M: KP Singh <kpsingh@kernel.org>
|
||||
R: Matt Bobrowski <mattbobrowski@google.com>
|
||||
M: Matt Bobrowski <mattbobrowski@google.com>
|
||||
L: bpf@vger.kernel.org
|
||||
S: Maintained
|
||||
F: Documentation/bpf/prog_lsm.rst
|
||||
F: include/linux/bpf_lsm.h
|
||||
F: kernel/bpf/bpf_lsm.c
|
||||
F: kernel/trace/bpf_trace.c
|
||||
F: security/bpf/
|
||||
|
||||
BPF [SELFTESTS] (Test Runners & Infrastructure)
|
||||
@ -12383,7 +12383,6 @@ F: drivers/video/backlight/ktz8866.c
|
||||
|
||||
KVM PARAVIRT (KVM/paravirt)
|
||||
M: Paolo Bonzini <pbonzini@redhat.com>
|
||||
R: Wanpeng Li <wanpengli@tencent.com>
|
||||
R: Vitaly Kuznetsov <vkuznets@redhat.com>
|
||||
L: kvm@vger.kernel.org
|
||||
S: Supported
|
||||
@ -17534,7 +17533,6 @@ F: include/linux/peci.h
|
||||
PENSANDO ETHERNET DRIVERS
|
||||
M: Shannon Nelson <shannon.nelson@amd.com>
|
||||
M: Brett Creeley <brett.creeley@amd.com>
|
||||
M: drivers@pensando.io
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
F: Documentation/networking/device_drivers/ethernet/pensando/ionic.rst
|
||||
@ -18212,6 +18210,7 @@ QCOM AUDIO (ASoC) DRIVERS
|
||||
M: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
|
||||
M: Banajit Goswami <bgoswami@quicinc.com>
|
||||
L: alsa-devel@alsa-project.org (moderated for non-subscribers)
|
||||
L: linux-arm-msm@vger.kernel.org
|
||||
S: Supported
|
||||
F: Documentation/devicetree/bindings/soc/qcom/qcom,apr*
|
||||
F: Documentation/devicetree/bindings/sound/qcom,*
|
||||
@ -18376,7 +18375,7 @@ M: Jeff Johnson <jjohnson@kernel.org>
|
||||
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
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/ath/ath.git
|
||||
F: drivers/net/wireless/ath/ath12k/
|
||||
N: ath12k
|
||||
|
||||
@ -18386,7 +18385,7 @@ M: Jeff Johnson <jjohnson@kernel.org>
|
||||
L: ath10k@lists.infradead.org
|
||||
S: Supported
|
||||
W: https://wireless.wiki.kernel.org/en/users/Drivers/ath10k
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/ath/ath.git
|
||||
F: drivers/net/wireless/ath/ath10k/
|
||||
N: ath10k
|
||||
|
||||
@ -18397,7 +18396,7 @@ L: ath11k@lists.infradead.org
|
||||
S: Supported
|
||||
W: https://wireless.wiki.kernel.org/en/users/Drivers/ath11k
|
||||
B: https://wireless.wiki.kernel.org/en/users/Drivers/ath11k/bugreport
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/ath/ath.git
|
||||
F: drivers/net/wireless/ath/ath11k/
|
||||
N: ath11k
|
||||
|
||||
@ -18406,7 +18405,7 @@ M: Toke Høiland-Jørgensen <toke@toke.dk>
|
||||
L: linux-wireless@vger.kernel.org
|
||||
S: Maintained
|
||||
W: https://wireless.wiki.kernel.org/en/users/Drivers/ath9k
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/ath/ath.git
|
||||
F: Documentation/devicetree/bindings/net/wireless/qca,ath9k.yaml
|
||||
F: drivers/net/wireless/ath/ath9k/
|
||||
|
||||
@ -19519,7 +19518,6 @@ F: drivers/net/wireless/realtek/rtl818x/rtl8180/
|
||||
|
||||
RTL8187 WIRELESS DRIVER
|
||||
M: Hin-Tak Leung <hintak.leung@gmail.com>
|
||||
M: Larry Finger <Larry.Finger@lwfinger.net>
|
||||
L: linux-wireless@vger.kernel.org
|
||||
S: Maintained
|
||||
T: git https://github.com/pkshih/rtw.git
|
||||
@ -21257,7 +21255,6 @@ W: http://wiki.laptop.org/go/DCON
|
||||
F: drivers/staging/olpc_dcon/
|
||||
|
||||
STAGING - REALTEK RTL8712U DRIVERS
|
||||
M: Larry Finger <Larry.Finger@lwfinger.net>
|
||||
M: Florian Schilhabel <florian.c.schilhabel@googlemail.com>.
|
||||
S: Odd Fixes
|
||||
F: drivers/staging/rtl8712/
|
||||
@ -22762,7 +22759,7 @@ M: Jarkko Sakkinen <jarkko@kernel.org>
|
||||
R: Jason Gunthorpe <jgg@ziepe.ca>
|
||||
L: linux-integrity@vger.kernel.org
|
||||
S: Maintained
|
||||
W: https://gitlab.com/jarkkojs/linux-tpmdd-test
|
||||
W: https://codeberg.org/jarkko/linux-tpmdd-test
|
||||
Q: https://patchwork.kernel.org/project/linux-integrity/list/
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd.git
|
||||
F: Documentation/devicetree/bindings/tpm/
|
||||
|
2
Makefile
2
Makefile
@ -2,7 +2,7 @@
|
||||
VERSION = 6
|
||||
PATCHLEVEL = 10
|
||||
SUBLEVEL = 0
|
||||
EXTRAVERSION = -rc4
|
||||
EXTRAVERSION = -rc5
|
||||
NAME = Baby Opossum Posse
|
||||
|
||||
# *DOCUMENTATION*
|
||||
|
@ -85,7 +85,7 @@
|
||||
};
|
||||
};
|
||||
|
||||
panel {
|
||||
panel_dpi: panel {
|
||||
compatible = "sii,43wvf1g";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_display_power>;
|
||||
|
@ -10,8 +10,6 @@
|
||||
/plugin/;
|
||||
|
||||
&{/} {
|
||||
/delete-node/ panel;
|
||||
|
||||
hdmi: connector-hdmi {
|
||||
compatible = "hdmi-connector";
|
||||
label = "hdmi";
|
||||
@ -82,6 +80,10 @@
|
||||
};
|
||||
};
|
||||
|
||||
&panel_dpi {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&tve {
|
||||
status = "disabled";
|
||||
};
|
||||
|
@ -6,6 +6,7 @@
|
||||
#include <dt-bindings/phy/phy-imx8-pcie.h>
|
||||
#include <dt-bindings/pwm/pwm.h>
|
||||
#include "imx8mm.dtsi"
|
||||
#include "imx8mm-overdrive.dtsi"
|
||||
|
||||
/ {
|
||||
chosen {
|
||||
@ -935,7 +936,7 @@
|
||||
/* Verdin GPIO_9_DSI (pulled-up as active-low) */
|
||||
pinctrl_gpio_9_dsi: gpio9dsigrp {
|
||||
fsl,pins =
|
||||
<MX8MM_IOMUXC_NAND_RE_B_GPIO3_IO15 0x146>; /* SODIMM 17 */
|
||||
<MX8MM_IOMUXC_NAND_RE_B_GPIO3_IO15 0x1c6>; /* SODIMM 17 */
|
||||
};
|
||||
|
||||
/* Verdin GPIO_10_DSI (pulled-up as active-low) */
|
||||
|
@ -254,7 +254,7 @@
|
||||
<&clk IMX8MP_CLK_CLKOUT2>,
|
||||
<&clk IMX8MP_AUDIO_PLL2_OUT>;
|
||||
assigned-clock-parents = <&clk IMX8MP_AUDIO_PLL2_OUT>;
|
||||
assigned-clock-rates = <13000000>, <13000000>, <156000000>;
|
||||
assigned-clock-rates = <13000000>, <13000000>, <208000000>;
|
||||
reset-gpios = <&gpio4 1 GPIO_ACTIVE_HIGH>;
|
||||
status = "disabled";
|
||||
|
||||
|
@ -219,7 +219,7 @@
|
||||
|
||||
bluetooth {
|
||||
compatible = "brcm,bcm4330-bt";
|
||||
shutdown-gpios = <&gpio4 16 GPIO_ACTIVE_HIGH>;
|
||||
shutdown-gpios = <&gpio1 3 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -36,7 +36,7 @@
|
||||
regulator-name = "SD1_SPWR";
|
||||
regulator-min-microvolt = <3000000>;
|
||||
regulator-max-microvolt = <3000000>;
|
||||
gpio = <&lsio_gpio4 19 GPIO_ACTIVE_HIGH>;
|
||||
gpio = <&lsio_gpio4 7 GPIO_ACTIVE_HIGH>;
|
||||
enable-active-high;
|
||||
};
|
||||
|
||||
|
@ -296,7 +296,6 @@
|
||||
vmmc-supply = <®_usdhc2_vmmc>;
|
||||
bus-width = <4>;
|
||||
status = "okay";
|
||||
no-sdio;
|
||||
no-mmc;
|
||||
};
|
||||
|
||||
|
@ -177,6 +177,14 @@ static void ffa_retrieve_req(struct arm_smccc_res *res, u32 len)
|
||||
res);
|
||||
}
|
||||
|
||||
static void ffa_rx_release(struct arm_smccc_res *res)
|
||||
{
|
||||
arm_smccc_1_1_smc(FFA_RX_RELEASE,
|
||||
0, 0,
|
||||
0, 0, 0, 0, 0,
|
||||
res);
|
||||
}
|
||||
|
||||
static void do_ffa_rxtx_map(struct arm_smccc_res *res,
|
||||
struct kvm_cpu_context *ctxt)
|
||||
{
|
||||
@ -543,16 +551,19 @@ static void do_ffa_mem_reclaim(struct arm_smccc_res *res,
|
||||
if (WARN_ON(offset > len ||
|
||||
fraglen > KVM_FFA_MBOX_NR_PAGES * PAGE_SIZE)) {
|
||||
ret = FFA_RET_ABORTED;
|
||||
ffa_rx_release(res);
|
||||
goto out_unlock;
|
||||
}
|
||||
|
||||
if (len > ffa_desc_buf.len) {
|
||||
ret = FFA_RET_NO_MEMORY;
|
||||
ffa_rx_release(res);
|
||||
goto out_unlock;
|
||||
}
|
||||
|
||||
buf = ffa_desc_buf.buf;
|
||||
memcpy(buf, hyp_buffers.rx, fraglen);
|
||||
ffa_rx_release(res);
|
||||
|
||||
for (fragoff = fraglen; fragoff < len; fragoff += fraglen) {
|
||||
ffa_mem_frag_rx(res, handle_lo, handle_hi, fragoff);
|
||||
@ -563,6 +574,7 @@ static void do_ffa_mem_reclaim(struct arm_smccc_res *res,
|
||||
|
||||
fraglen = res->a3;
|
||||
memcpy((void *)buf + fragoff, hyp_buffers.rx, fraglen);
|
||||
ffa_rx_release(res);
|
||||
}
|
||||
|
||||
ffa_mem_reclaim(res, handle_lo, handle_hi, flags);
|
||||
|
@ -391,7 +391,7 @@ static void kvm_vgic_dist_destroy(struct kvm *kvm)
|
||||
|
||||
if (dist->vgic_model == KVM_DEV_TYPE_ARM_VGIC_V3) {
|
||||
list_for_each_entry_safe(rdreg, next, &dist->rd_regions, list)
|
||||
vgic_v3_free_redist_region(rdreg);
|
||||
vgic_v3_free_redist_region(kvm, rdreg);
|
||||
INIT_LIST_HEAD(&dist->rd_regions);
|
||||
} else {
|
||||
dist->vgic_cpu_base = VGIC_ADDR_UNDEF;
|
||||
|
@ -919,8 +919,19 @@ free:
|
||||
return ret;
|
||||
}
|
||||
|
||||
void vgic_v3_free_redist_region(struct vgic_redist_region *rdreg)
|
||||
void vgic_v3_free_redist_region(struct kvm *kvm, struct vgic_redist_region *rdreg)
|
||||
{
|
||||
struct kvm_vcpu *vcpu;
|
||||
unsigned long c;
|
||||
|
||||
lockdep_assert_held(&kvm->arch.config_lock);
|
||||
|
||||
/* Garbage collect the region */
|
||||
kvm_for_each_vcpu(c, vcpu, kvm) {
|
||||
if (vcpu->arch.vgic_cpu.rdreg == rdreg)
|
||||
vcpu->arch.vgic_cpu.rdreg = NULL;
|
||||
}
|
||||
|
||||
list_del(&rdreg->list);
|
||||
kfree(rdreg);
|
||||
}
|
||||
@ -945,7 +956,7 @@ int vgic_v3_set_redist_base(struct kvm *kvm, u32 index, u64 addr, u32 count)
|
||||
|
||||
mutex_lock(&kvm->arch.config_lock);
|
||||
rdreg = vgic_v3_rdist_region_from_index(kvm, index);
|
||||
vgic_v3_free_redist_region(rdreg);
|
||||
vgic_v3_free_redist_region(kvm, rdreg);
|
||||
mutex_unlock(&kvm->arch.config_lock);
|
||||
return ret;
|
||||
}
|
||||
|
@ -316,7 +316,7 @@ vgic_v3_rd_region_size(struct kvm *kvm, struct vgic_redist_region *rdreg)
|
||||
|
||||
struct vgic_redist_region *vgic_v3_rdist_region_from_index(struct kvm *kvm,
|
||||
u32 index);
|
||||
void vgic_v3_free_redist_region(struct vgic_redist_region *rdreg);
|
||||
void vgic_v3_free_redist_region(struct kvm *kvm, struct vgic_redist_region *rdreg);
|
||||
|
||||
bool vgic_v3_rdist_overlap(struct kvm *kvm, gpa_t base, size_t size);
|
||||
|
||||
|
@ -143,7 +143,7 @@ config LOONGARCH
|
||||
select HAVE_LIVEPATCH
|
||||
select HAVE_MOD_ARCH_SPECIFIC
|
||||
select HAVE_NMI
|
||||
select HAVE_OBJTOOL if AS_HAS_EXPLICIT_RELOCS
|
||||
select HAVE_OBJTOOL if AS_HAS_EXPLICIT_RELOCS && AS_HAS_THIN_ADD_SUB && !CC_IS_CLANG
|
||||
select HAVE_PCI
|
||||
select HAVE_PERF_EVENTS
|
||||
select HAVE_PERF_REGS
|
||||
@ -261,6 +261,9 @@ config AS_HAS_EXPLICIT_RELOCS
|
||||
config AS_HAS_FCSR_CLASS
|
||||
def_bool $(as-instr,movfcsr2gr \$t0$(comma)\$fcsr0)
|
||||
|
||||
config AS_HAS_THIN_ADD_SUB
|
||||
def_bool $(cc-option,-Wa$(comma)-mthin-add-sub)
|
||||
|
||||
config AS_HAS_LSX_EXTENSION
|
||||
def_bool $(as-instr,vld \$vr0$(comma)\$a0$(comma)0)
|
||||
|
||||
|
@ -28,6 +28,7 @@ config UNWINDER_PROLOGUE
|
||||
|
||||
config UNWINDER_ORC
|
||||
bool "ORC unwinder"
|
||||
depends on HAVE_OBJTOOL
|
||||
select OBJTOOL
|
||||
help
|
||||
This option enables the ORC (Oops Rewind Capability) unwinder for
|
||||
|
@ -75,6 +75,8 @@ do { \
|
||||
#define CSR_MWPC_NUM 0x3f
|
||||
|
||||
#define CTRL_PLV_ENABLE 0x1e
|
||||
#define CTRL_PLV0_ENABLE 0x02
|
||||
#define CTRL_PLV3_ENABLE 0x10
|
||||
|
||||
#define MWPnCFG3_LoadEn 8
|
||||
#define MWPnCFG3_StoreEn 9
|
||||
@ -101,7 +103,7 @@ struct perf_event;
|
||||
struct perf_event_attr;
|
||||
|
||||
extern int arch_bp_generic_fields(struct arch_hw_breakpoint_ctrl ctrl,
|
||||
int *gen_len, int *gen_type, int *offset);
|
||||
int *gen_len, int *gen_type);
|
||||
extern int arch_check_bp_in_kernelspace(struct arch_hw_breakpoint *hw);
|
||||
extern int hw_breakpoint_arch_parse(struct perf_event *bp,
|
||||
const struct perf_event_attr *attr,
|
||||
|
@ -174,11 +174,21 @@ void flush_ptrace_hw_breakpoint(struct task_struct *tsk)
|
||||
static int hw_breakpoint_control(struct perf_event *bp,
|
||||
enum hw_breakpoint_ops ops)
|
||||
{
|
||||
u32 ctrl;
|
||||
u32 ctrl, privilege;
|
||||
int i, max_slots, enable;
|
||||
struct pt_regs *regs;
|
||||
struct perf_event **slots;
|
||||
struct arch_hw_breakpoint *info = counter_arch_bp(bp);
|
||||
|
||||
if (arch_check_bp_in_kernelspace(info))
|
||||
privilege = CTRL_PLV0_ENABLE;
|
||||
else
|
||||
privilege = CTRL_PLV3_ENABLE;
|
||||
|
||||
/* Whether bp belongs to a task. */
|
||||
if (bp->hw.target)
|
||||
regs = task_pt_regs(bp->hw.target);
|
||||
|
||||
if (info->ctrl.type == LOONGARCH_BREAKPOINT_EXECUTE) {
|
||||
/* Breakpoint */
|
||||
slots = this_cpu_ptr(bp_on_reg);
|
||||
@ -197,31 +207,38 @@ static int hw_breakpoint_control(struct perf_event *bp,
|
||||
switch (ops) {
|
||||
case HW_BREAKPOINT_INSTALL:
|
||||
/* Set the FWPnCFG/MWPnCFG 1~4 register. */
|
||||
write_wb_reg(CSR_CFG_ADDR, i, 0, info->address);
|
||||
write_wb_reg(CSR_CFG_ADDR, i, 1, info->address);
|
||||
write_wb_reg(CSR_CFG_MASK, i, 0, info->mask);
|
||||
write_wb_reg(CSR_CFG_MASK, i, 1, info->mask);
|
||||
write_wb_reg(CSR_CFG_ASID, i, 0, 0);
|
||||
write_wb_reg(CSR_CFG_ASID, i, 1, 0);
|
||||
if (info->ctrl.type == LOONGARCH_BREAKPOINT_EXECUTE) {
|
||||
write_wb_reg(CSR_CFG_CTRL, i, 0, CTRL_PLV_ENABLE);
|
||||
write_wb_reg(CSR_CFG_ADDR, i, 0, info->address);
|
||||
write_wb_reg(CSR_CFG_MASK, i, 0, info->mask);
|
||||
write_wb_reg(CSR_CFG_ASID, i, 0, 0);
|
||||
write_wb_reg(CSR_CFG_CTRL, i, 0, privilege);
|
||||
} else {
|
||||
write_wb_reg(CSR_CFG_ADDR, i, 1, info->address);
|
||||
write_wb_reg(CSR_CFG_MASK, i, 1, info->mask);
|
||||
write_wb_reg(CSR_CFG_ASID, i, 1, 0);
|
||||
ctrl = encode_ctrl_reg(info->ctrl);
|
||||
write_wb_reg(CSR_CFG_CTRL, i, 1, ctrl | CTRL_PLV_ENABLE);
|
||||
write_wb_reg(CSR_CFG_CTRL, i, 1, ctrl | privilege);
|
||||
}
|
||||
enable = csr_read64(LOONGARCH_CSR_CRMD);
|
||||
csr_write64(CSR_CRMD_WE | enable, LOONGARCH_CSR_CRMD);
|
||||
if (bp->hw.target)
|
||||
regs->csr_prmd |= CSR_PRMD_PWE;
|
||||
break;
|
||||
case HW_BREAKPOINT_UNINSTALL:
|
||||
/* Reset the FWPnCFG/MWPnCFG 1~4 register. */
|
||||
write_wb_reg(CSR_CFG_ADDR, i, 0, 0);
|
||||
write_wb_reg(CSR_CFG_ADDR, i, 1, 0);
|
||||
write_wb_reg(CSR_CFG_MASK, i, 0, 0);
|
||||
write_wb_reg(CSR_CFG_MASK, i, 1, 0);
|
||||
write_wb_reg(CSR_CFG_CTRL, i, 0, 0);
|
||||
write_wb_reg(CSR_CFG_CTRL, i, 1, 0);
|
||||
write_wb_reg(CSR_CFG_ASID, i, 0, 0);
|
||||
write_wb_reg(CSR_CFG_ASID, i, 1, 0);
|
||||
if (info->ctrl.type == LOONGARCH_BREAKPOINT_EXECUTE) {
|
||||
write_wb_reg(CSR_CFG_ADDR, i, 0, 0);
|
||||
write_wb_reg(CSR_CFG_MASK, i, 0, 0);
|
||||
write_wb_reg(CSR_CFG_CTRL, i, 0, 0);
|
||||
write_wb_reg(CSR_CFG_ASID, i, 0, 0);
|
||||
} else {
|
||||
write_wb_reg(CSR_CFG_ADDR, i, 1, 0);
|
||||
write_wb_reg(CSR_CFG_MASK, i, 1, 0);
|
||||
write_wb_reg(CSR_CFG_CTRL, i, 1, 0);
|
||||
write_wb_reg(CSR_CFG_ASID, i, 1, 0);
|
||||
}
|
||||
if (bp->hw.target)
|
||||
regs->csr_prmd &= ~CSR_PRMD_PWE;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -283,7 +300,7 @@ int arch_check_bp_in_kernelspace(struct arch_hw_breakpoint *hw)
|
||||
* to generic breakpoint descriptions.
|
||||
*/
|
||||
int arch_bp_generic_fields(struct arch_hw_breakpoint_ctrl ctrl,
|
||||
int *gen_len, int *gen_type, int *offset)
|
||||
int *gen_len, int *gen_type)
|
||||
{
|
||||
/* Type */
|
||||
switch (ctrl.type) {
|
||||
@ -303,11 +320,6 @@ int arch_bp_generic_fields(struct arch_hw_breakpoint_ctrl ctrl,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (!ctrl.len)
|
||||
return -EINVAL;
|
||||
|
||||
*offset = __ffs(ctrl.len);
|
||||
|
||||
/* Len */
|
||||
switch (ctrl.len) {
|
||||
case LOONGARCH_BREAKPOINT_LEN_1:
|
||||
@ -386,21 +398,17 @@ int hw_breakpoint_arch_parse(struct perf_event *bp,
|
||||
struct arch_hw_breakpoint *hw)
|
||||
{
|
||||
int ret;
|
||||
u64 alignment_mask, offset;
|
||||
u64 alignment_mask;
|
||||
|
||||
/* Build the arch_hw_breakpoint. */
|
||||
ret = arch_build_bp_info(bp, attr, hw);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (hw->ctrl.type != LOONGARCH_BREAKPOINT_EXECUTE)
|
||||
alignment_mask = 0x7;
|
||||
else
|
||||
if (hw->ctrl.type == LOONGARCH_BREAKPOINT_EXECUTE) {
|
||||
alignment_mask = 0x3;
|
||||
offset = hw->address & alignment_mask;
|
||||
|
||||
hw->address &= ~alignment_mask;
|
||||
hw->ctrl.len <<= offset;
|
||||
hw->address &= ~alignment_mask;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -471,12 +479,15 @@ void breakpoint_handler(struct pt_regs *regs)
|
||||
slots = this_cpu_ptr(bp_on_reg);
|
||||
|
||||
for (i = 0; i < boot_cpu_data.watch_ireg_count; ++i) {
|
||||
bp = slots[i];
|
||||
if (bp == NULL)
|
||||
continue;
|
||||
perf_bp_event(bp, regs);
|
||||
if ((csr_read32(LOONGARCH_CSR_FWPS) & (0x1 << i))) {
|
||||
bp = slots[i];
|
||||
if (bp == NULL)
|
||||
continue;
|
||||
perf_bp_event(bp, regs);
|
||||
csr_write32(0x1 << i, LOONGARCH_CSR_FWPS);
|
||||
update_bp_registers(regs, 0, 0);
|
||||
}
|
||||
}
|
||||
update_bp_registers(regs, 0, 0);
|
||||
}
|
||||
NOKPROBE_SYMBOL(breakpoint_handler);
|
||||
|
||||
@ -488,12 +499,15 @@ void watchpoint_handler(struct pt_regs *regs)
|
||||
slots = this_cpu_ptr(wp_on_reg);
|
||||
|
||||
for (i = 0; i < boot_cpu_data.watch_dreg_count; ++i) {
|
||||
wp = slots[i];
|
||||
if (wp == NULL)
|
||||
continue;
|
||||
perf_bp_event(wp, regs);
|
||||
if ((csr_read32(LOONGARCH_CSR_MWPS) & (0x1 << i))) {
|
||||
wp = slots[i];
|
||||
if (wp == NULL)
|
||||
continue;
|
||||
perf_bp_event(wp, regs);
|
||||
csr_write32(0x1 << i, LOONGARCH_CSR_MWPS);
|
||||
update_bp_registers(regs, 0, 1);
|
||||
}
|
||||
}
|
||||
update_bp_registers(regs, 0, 1);
|
||||
}
|
||||
NOKPROBE_SYMBOL(watchpoint_handler);
|
||||
|
||||
|
@ -494,28 +494,14 @@ static int ptrace_hbp_fill_attr_ctrl(unsigned int note_type,
|
||||
struct arch_hw_breakpoint_ctrl ctrl,
|
||||
struct perf_event_attr *attr)
|
||||
{
|
||||
int err, len, type, offset;
|
||||
int err, len, type;
|
||||
|
||||
err = arch_bp_generic_fields(ctrl, &len, &type, &offset);
|
||||
err = arch_bp_generic_fields(ctrl, &len, &type);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
switch (note_type) {
|
||||
case NT_LOONGARCH_HW_BREAK:
|
||||
if ((type & HW_BREAKPOINT_X) != type)
|
||||
return -EINVAL;
|
||||
break;
|
||||
case NT_LOONGARCH_HW_WATCH:
|
||||
if ((type & HW_BREAKPOINT_RW) != type)
|
||||
return -EINVAL;
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
attr->bp_len = len;
|
||||
attr->bp_type = type;
|
||||
attr->bp_addr += offset;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -609,10 +595,27 @@ static int ptrace_hbp_set_ctrl(unsigned int note_type,
|
||||
return PTR_ERR(bp);
|
||||
|
||||
attr = bp->attr;
|
||||
decode_ctrl_reg(uctrl, &ctrl);
|
||||
err = ptrace_hbp_fill_attr_ctrl(note_type, ctrl, &attr);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
switch (note_type) {
|
||||
case NT_LOONGARCH_HW_BREAK:
|
||||
ctrl.type = LOONGARCH_BREAKPOINT_EXECUTE;
|
||||
ctrl.len = LOONGARCH_BREAKPOINT_LEN_4;
|
||||
break;
|
||||
case NT_LOONGARCH_HW_WATCH:
|
||||
decode_ctrl_reg(uctrl, &ctrl);
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (uctrl & CTRL_PLV_ENABLE) {
|
||||
err = ptrace_hbp_fill_attr_ctrl(note_type, ctrl, &attr);
|
||||
if (err)
|
||||
return err;
|
||||
attr.disabled = 0;
|
||||
} else {
|
||||
attr.disabled = 1;
|
||||
}
|
||||
|
||||
return modify_user_hw_breakpoint(bp, &attr);
|
||||
}
|
||||
@ -643,6 +646,10 @@ static int ptrace_hbp_set_addr(unsigned int note_type,
|
||||
struct perf_event *bp;
|
||||
struct perf_event_attr attr;
|
||||
|
||||
/* Kernel-space address cannot be monitored by user-space */
|
||||
if ((unsigned long)addr >= XKPRANGE)
|
||||
return -EINVAL;
|
||||
|
||||
bp = ptrace_hbp_get_initialised_bp(note_type, tsk, idx);
|
||||
if (IS_ERR(bp))
|
||||
return PTR_ERR(bp);
|
||||
|
@ -761,7 +761,7 @@ static void kvm_handle_service(struct kvm_vcpu *vcpu)
|
||||
default:
|
||||
ret = KVM_HCALL_INVALID_CODE;
|
||||
break;
|
||||
};
|
||||
}
|
||||
|
||||
kvm_write_reg(vcpu, LOONGARCH_GPR_A0, ret);
|
||||
}
|
||||
|
@ -322,7 +322,7 @@ static inline void ehb(void)
|
||||
" .set push \n" \
|
||||
" .set "MIPS_ISA_LEVEL" \n" \
|
||||
_ASM_SET_MFTC0 \
|
||||
" mftc0 $1, " #rt ", " #sel " \n" \
|
||||
" mftc0 %0, " #rt ", " #sel " \n" \
|
||||
_ASM_UNSET_MFTC0 \
|
||||
" .set pop \n" \
|
||||
: "=r" (__res)); \
|
||||
|
@ -27,7 +27,7 @@
|
||||
17 o32 break sys_ni_syscall
|
||||
# 18 was sys_stat
|
||||
18 o32 unused18 sys_ni_syscall
|
||||
19 o32 lseek sys_lseek
|
||||
19 o32 lseek sys_lseek compat_sys_lseek
|
||||
20 o32 getpid sys_getpid
|
||||
21 o32 mount sys_mount
|
||||
22 o32 umount sys_oldumount
|
||||
|
2
arch/powerpc/crypto/.gitignore
vendored
2
arch/powerpc/crypto/.gitignore
vendored
@ -1,3 +1,5 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
aesp10-ppc.S
|
||||
aesp8-ppc.S
|
||||
ghashp10-ppc.S
|
||||
ghashp8-ppc.S
|
||||
|
@ -130,14 +130,16 @@ long kvm_spapr_tce_attach_iommu_group(struct kvm *kvm, int tablefd,
|
||||
}
|
||||
rcu_read_unlock();
|
||||
|
||||
fdput(f);
|
||||
|
||||
if (!found)
|
||||
if (!found) {
|
||||
fdput(f);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
table_group = iommu_group_get_iommudata(grp);
|
||||
if (WARN_ON(!table_group))
|
||||
if (WARN_ON(!table_group)) {
|
||||
fdput(f);
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
for (i = 0; i < IOMMU_TABLE_GROUP_MAX_TABLES; ++i) {
|
||||
struct iommu_table *tbltmp = table_group->tables[i];
|
||||
@ -158,8 +160,10 @@ long kvm_spapr_tce_attach_iommu_group(struct kvm *kvm, int tablefd,
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!tbl)
|
||||
if (!tbl) {
|
||||
fdput(f);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
rcu_read_lock();
|
||||
list_for_each_entry_rcu(stit, &stt->iommu_tables, next) {
|
||||
@ -170,6 +174,7 @@ long kvm_spapr_tce_attach_iommu_group(struct kvm *kvm, int tablefd,
|
||||
/* stit is being destroyed */
|
||||
iommu_tce_table_put(tbl);
|
||||
rcu_read_unlock();
|
||||
fdput(f);
|
||||
return -ENOTTY;
|
||||
}
|
||||
/*
|
||||
@ -177,6 +182,7 @@ long kvm_spapr_tce_attach_iommu_group(struct kvm *kvm, int tablefd,
|
||||
* its KVM reference counter and can return.
|
||||
*/
|
||||
rcu_read_unlock();
|
||||
fdput(f);
|
||||
return 0;
|
||||
}
|
||||
rcu_read_unlock();
|
||||
@ -184,6 +190,7 @@ long kvm_spapr_tce_attach_iommu_group(struct kvm *kvm, int tablefd,
|
||||
stit = kzalloc(sizeof(*stit), GFP_KERNEL);
|
||||
if (!stit) {
|
||||
iommu_tce_table_put(tbl);
|
||||
fdput(f);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
@ -192,6 +199,7 @@ long kvm_spapr_tce_attach_iommu_group(struct kvm *kvm, int tablefd,
|
||||
|
||||
list_add_rcu(&stit->next, &stt->iommu_tables);
|
||||
|
||||
fdput(f);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -45,6 +45,7 @@
|
||||
no-1-8-v;
|
||||
no-mmc;
|
||||
no-sdio;
|
||||
disable-wp;
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
|
@ -519,7 +519,8 @@ void free_rmid(u32 closid, u32 rmid)
|
||||
* allows architectures that ignore the closid parameter to avoid an
|
||||
* unnecessary check.
|
||||
*/
|
||||
if (idx == resctrl_arch_rmid_idx_encode(RESCTRL_RESERVED_CLOSID,
|
||||
if (!resctrl_arch_mon_capable() ||
|
||||
idx == resctrl_arch_rmid_idx_encode(RESCTRL_RESERVED_CLOSID,
|
||||
RESCTRL_RESERVED_RMID))
|
||||
return;
|
||||
|
||||
|
@ -2843,7 +2843,7 @@ static int svm_get_msr(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
|
||||
|
||||
if (sev_es_prevent_msr_access(vcpu, msr_info)) {
|
||||
msr_info->data = 0;
|
||||
return -EINVAL;
|
||||
return vcpu->kvm->arch.has_protected_state ? -EINVAL : 0;
|
||||
}
|
||||
|
||||
switch (msr_info->index) {
|
||||
@ -2998,7 +2998,7 @@ static int svm_set_msr(struct kvm_vcpu *vcpu, struct msr_data *msr)
|
||||
u64 data = msr->data;
|
||||
|
||||
if (sev_es_prevent_msr_access(vcpu, msr))
|
||||
return -EINVAL;
|
||||
return vcpu->kvm->arch.has_protected_state ? -EINVAL : 0;
|
||||
|
||||
switch (ecx) {
|
||||
case MSR_AMD64_TSC_RATIO:
|
||||
|
@ -10718,13 +10718,12 @@ static void vcpu_scan_ioapic(struct kvm_vcpu *vcpu)
|
||||
|
||||
bitmap_zero(vcpu->arch.ioapic_handled_vectors, 256);
|
||||
|
||||
static_call_cond(kvm_x86_sync_pir_to_irr)(vcpu);
|
||||
|
||||
if (irqchip_split(vcpu->kvm))
|
||||
kvm_scan_ioapic_routes(vcpu, vcpu->arch.ioapic_handled_vectors);
|
||||
else {
|
||||
static_call_cond(kvm_x86_sync_pir_to_irr)(vcpu);
|
||||
if (ioapic_in_kernel(vcpu->kvm))
|
||||
kvm_ioapic_scan_entry(vcpu, vcpu->arch.ioapic_handled_vectors);
|
||||
}
|
||||
else if (ioapic_in_kernel(vcpu->kvm))
|
||||
kvm_ioapic_scan_entry(vcpu, vcpu->arch.ioapic_handled_vectors);
|
||||
|
||||
if (is_guest_mode(vcpu))
|
||||
vcpu->arch.load_eoi_exitmap_pending = true;
|
||||
|
@ -44,7 +44,6 @@ acpi_ex_system_memory_space_handler(u32 function,
|
||||
struct acpi_mem_mapping *mm = mem_info->cur_mm;
|
||||
u32 length;
|
||||
acpi_size map_length;
|
||||
acpi_size page_boundary_map_length;
|
||||
#ifdef ACPI_MISALIGNMENT_NOT_SUPPORTED
|
||||
u32 remainder;
|
||||
#endif
|
||||
@ -138,26 +137,8 @@ acpi_ex_system_memory_space_handler(u32 function,
|
||||
map_length = (acpi_size)
|
||||
((mem_info->address + mem_info->length) - address);
|
||||
|
||||
/*
|
||||
* If mapping the entire remaining portion of the region will cross
|
||||
* a page boundary, just map up to the page boundary, do not cross.
|
||||
* On some systems, crossing a page boundary while mapping regions
|
||||
* can cause warnings if the pages have different attributes
|
||||
* due to resource management.
|
||||
*
|
||||
* This has the added benefit of constraining a single mapping to
|
||||
* one page, which is similar to the original code that used a 4k
|
||||
* maximum window.
|
||||
*/
|
||||
page_boundary_map_length = (acpi_size)
|
||||
(ACPI_ROUND_UP(address, ACPI_DEFAULT_PAGE_SIZE) - address);
|
||||
if (page_boundary_map_length == 0) {
|
||||
page_boundary_map_length = ACPI_DEFAULT_PAGE_SIZE;
|
||||
}
|
||||
|
||||
if (map_length > page_boundary_map_length) {
|
||||
map_length = page_boundary_map_length;
|
||||
}
|
||||
if (map_length > ACPI_DEFAULT_PAGE_SIZE)
|
||||
map_length = ACPI_DEFAULT_PAGE_SIZE;
|
||||
|
||||
/* Create a new mapping starting at the address given */
|
||||
|
||||
|
@ -302,6 +302,10 @@ void acpi_mipi_check_crs_csi2(acpi_handle handle);
|
||||
void acpi_mipi_scan_crs_csi2(void);
|
||||
void acpi_mipi_init_crs_csi2_swnodes(void);
|
||||
void acpi_mipi_crs_csi2_cleanup(void);
|
||||
#ifdef CONFIG_X86
|
||||
bool acpi_graph_ignore_port(acpi_handle handle);
|
||||
#else
|
||||
static inline bool acpi_graph_ignore_port(acpi_handle handle) { return false; }
|
||||
#endif
|
||||
|
||||
#endif /* _ACPI_INTERNAL_H_ */
|
||||
|
@ -725,14 +725,20 @@ void acpi_mipi_crs_csi2_cleanup(void)
|
||||
acpi_mipi_del_crs_csi2(csi2);
|
||||
}
|
||||
|
||||
static const struct dmi_system_id dmi_ignore_port_nodes[] = {
|
||||
{
|
||||
.matches = {
|
||||
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
|
||||
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "XPS 9315"),
|
||||
},
|
||||
},
|
||||
{ }
|
||||
#ifdef CONFIG_X86
|
||||
#include <asm/cpu_device_id.h>
|
||||
#include <asm/intel-family.h>
|
||||
|
||||
/* CPU matches for Dell generations with broken ACPI MIPI DISCO info */
|
||||
static const struct x86_cpu_id dell_broken_mipi_disco_cpu_gens[] = {
|
||||
X86_MATCH_VFM(INTEL_TIGERLAKE, NULL),
|
||||
X86_MATCH_VFM(INTEL_TIGERLAKE_L, NULL),
|
||||
X86_MATCH_VFM(INTEL_ALDERLAKE, NULL),
|
||||
X86_MATCH_VFM(INTEL_ALDERLAKE_L, NULL),
|
||||
X86_MATCH_VFM(INTEL_RAPTORLAKE, NULL),
|
||||
X86_MATCH_VFM(INTEL_RAPTORLAKE_P, NULL),
|
||||
X86_MATCH_VFM(INTEL_RAPTORLAKE_S, NULL),
|
||||
{}
|
||||
};
|
||||
|
||||
static const char *strnext(const char *s1, const char *s2)
|
||||
@ -761,7 +767,10 @@ bool acpi_graph_ignore_port(acpi_handle handle)
|
||||
static bool dmi_tested, ignore_port;
|
||||
|
||||
if (!dmi_tested) {
|
||||
ignore_port = dmi_first_match(dmi_ignore_port_nodes);
|
||||
if (dmi_name_in_vendors("Dell Inc.") &&
|
||||
x86_match_cpu(dell_broken_mipi_disco_cpu_gens))
|
||||
ignore_port = true;
|
||||
|
||||
dmi_tested = true;
|
||||
}
|
||||
|
||||
@ -794,3 +803,4 @@ out_free:
|
||||
kfree(orig_path);
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
@ -1735,6 +1735,14 @@ static void ahci_update_initial_lpm_policy(struct ata_port *ap)
|
||||
if (ap->pflags & ATA_PFLAG_EXTERNAL)
|
||||
return;
|
||||
|
||||
/* If no LPM states are supported by the HBA, do not bother with LPM */
|
||||
if ((ap->host->flags & ATA_HOST_NO_PART) &&
|
||||
(ap->host->flags & ATA_HOST_NO_SSC) &&
|
||||
(ap->host->flags & ATA_HOST_NO_DEVSLP)) {
|
||||
ata_port_dbg(ap, "no LPM states supported, not enabling LPM\n");
|
||||
return;
|
||||
}
|
||||
|
||||
/* user modified policy via module param */
|
||||
if (mobile_lpm_policy != -1) {
|
||||
policy = mobile_lpm_policy;
|
||||
|
@ -394,7 +394,7 @@ config LS2X_APB_DMA
|
||||
|
||||
config MCF_EDMA
|
||||
tristate "Freescale eDMA engine support, ColdFire mcf5441x SoCs"
|
||||
depends on M5441x || COMPILE_TEST
|
||||
depends on M5441x || (COMPILE_TEST && FSL_EDMA=n)
|
||||
select DMA_ENGINE
|
||||
select DMA_VIRTUAL_CHANNELS
|
||||
help
|
||||
|
@ -611,11 +611,13 @@ static void irq_process_work_list(struct idxd_irq_entry *irq_entry)
|
||||
|
||||
spin_unlock(&irq_entry->list_lock);
|
||||
|
||||
list_for_each_entry(desc, &flist, list) {
|
||||
list_for_each_entry_safe(desc, n, &flist, list) {
|
||||
/*
|
||||
* Check against the original status as ABORT is software defined
|
||||
* and 0xff, which DSA_COMP_STATUS_MASK can mask out.
|
||||
*/
|
||||
list_del(&desc->list);
|
||||
|
||||
if (unlikely(desc->completion->status == IDXD_COMP_DESC_ABORT)) {
|
||||
idxd_desc_complete(desc, IDXD_COMPLETE_ABORT, true);
|
||||
continue;
|
||||
|
@ -534,18 +534,6 @@ err_out:
|
||||
return err;
|
||||
}
|
||||
|
||||
static int ioat_register(struct ioatdma_device *ioat_dma)
|
||||
{
|
||||
int err = dma_async_device_register(&ioat_dma->dma_dev);
|
||||
|
||||
if (err) {
|
||||
ioat_disable_interrupts(ioat_dma);
|
||||
dma_pool_destroy(ioat_dma->completion_pool);
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
static void ioat_dma_remove(struct ioatdma_device *ioat_dma)
|
||||
{
|
||||
struct dma_device *dma = &ioat_dma->dma_dev;
|
||||
@ -1181,9 +1169,9 @@ static int ioat3_dma_probe(struct ioatdma_device *ioat_dma, int dca)
|
||||
ioat_chan->reg_base + IOAT_DCACTRL_OFFSET);
|
||||
}
|
||||
|
||||
err = ioat_register(ioat_dma);
|
||||
err = dma_async_device_register(&ioat_dma->dma_dev);
|
||||
if (err)
|
||||
return err;
|
||||
goto err_disable_interrupts;
|
||||
|
||||
ioat_kobject_add(ioat_dma, &ioat_ktype);
|
||||
|
||||
@ -1192,20 +1180,29 @@ static int ioat3_dma_probe(struct ioatdma_device *ioat_dma, int dca)
|
||||
|
||||
/* disable relaxed ordering */
|
||||
err = pcie_capability_read_word(pdev, PCI_EXP_DEVCTL, &val16);
|
||||
if (err)
|
||||
return pcibios_err_to_errno(err);
|
||||
if (err) {
|
||||
err = pcibios_err_to_errno(err);
|
||||
goto err_disable_interrupts;
|
||||
}
|
||||
|
||||
/* clear relaxed ordering enable */
|
||||
val16 &= ~PCI_EXP_DEVCTL_RELAX_EN;
|
||||
err = pcie_capability_write_word(pdev, PCI_EXP_DEVCTL, val16);
|
||||
if (err)
|
||||
return pcibios_err_to_errno(err);
|
||||
if (err) {
|
||||
err = pcibios_err_to_errno(err);
|
||||
goto err_disable_interrupts;
|
||||
}
|
||||
|
||||
if (ioat_dma->cap & IOAT_CAP_DPS)
|
||||
writeb(ioat_pending_level + 1,
|
||||
ioat_dma->reg_base + IOAT_PREFETCH_LIMIT_OFFSET);
|
||||
|
||||
return 0;
|
||||
|
||||
err_disable_interrupts:
|
||||
ioat_disable_interrupts(ioat_dma);
|
||||
dma_pool_destroy(ioat_dma->completion_pool);
|
||||
return err;
|
||||
}
|
||||
|
||||
static void ioat_shutdown(struct pci_dev *pdev)
|
||||
@ -1350,6 +1347,8 @@ static int ioat_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
||||
void __iomem * const *iomap;
|
||||
struct device *dev = &pdev->dev;
|
||||
struct ioatdma_device *device;
|
||||
unsigned int i;
|
||||
u8 version;
|
||||
int err;
|
||||
|
||||
err = pcim_enable_device(pdev);
|
||||
@ -1363,6 +1362,10 @@ static int ioat_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
||||
if (!iomap)
|
||||
return -ENOMEM;
|
||||
|
||||
version = readb(iomap[IOAT_MMIO_BAR] + IOAT_VER_OFFSET);
|
||||
if (version < IOAT_VER_3_0)
|
||||
return -ENODEV;
|
||||
|
||||
err = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
|
||||
if (err)
|
||||
return err;
|
||||
@ -1373,17 +1376,18 @@ static int ioat_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
||||
pci_set_master(pdev);
|
||||
pci_set_drvdata(pdev, device);
|
||||
|
||||
device->version = readb(device->reg_base + IOAT_VER_OFFSET);
|
||||
device->version = version;
|
||||
if (device->version >= IOAT_VER_3_4)
|
||||
ioat_dca_enabled = 0;
|
||||
if (device->version >= IOAT_VER_3_0) {
|
||||
if (is_skx_ioat(pdev))
|
||||
device->version = IOAT_VER_3_2;
|
||||
err = ioat3_dma_probe(device, ioat_dca_enabled);
|
||||
} else
|
||||
return -ENODEV;
|
||||
|
||||
if (is_skx_ioat(pdev))
|
||||
device->version = IOAT_VER_3_2;
|
||||
|
||||
err = ioat3_dma_probe(device, ioat_dca_enabled);
|
||||
if (err) {
|
||||
for (i = 0; i < IOAT_MAX_CHANS; i++)
|
||||
kfree(device->idx[i]);
|
||||
kfree(device);
|
||||
dev_err(dev, "Intel(R) I/OAT DMA Engine init failed\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
@ -1445,6 +1449,7 @@ module_init(ioat_init_module);
|
||||
static void __exit ioat_exit_module(void)
|
||||
{
|
||||
pci_unregister_driver(&ioat_pci_driver);
|
||||
kmem_cache_destroy(ioat_sed_cache);
|
||||
kmem_cache_destroy(ioat_cache);
|
||||
}
|
||||
module_exit(ioat_exit_module);
|
||||
|
@ -200,12 +200,9 @@ of_k3_udma_glue_parse_chn_by_id(struct device_node *udmax_np, struct k3_udma_glu
|
||||
|
||||
ret = of_k3_udma_glue_parse(udmax_np, common);
|
||||
if (ret)
|
||||
goto out_put_spec;
|
||||
return ret;
|
||||
|
||||
ret = of_k3_udma_glue_parse_chn_common(common, thread_id, tx_chn);
|
||||
|
||||
out_put_spec:
|
||||
of_node_put(udmax_np);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -885,11 +885,11 @@ static irqreturn_t xdma_channel_isr(int irq, void *dev_id)
|
||||
u32 st;
|
||||
bool repeat_tx;
|
||||
|
||||
spin_lock(&xchan->vchan.lock);
|
||||
|
||||
if (xchan->stop_requested)
|
||||
complete(&xchan->last_interrupt);
|
||||
|
||||
spin_lock(&xchan->vchan.lock);
|
||||
|
||||
/* get submitted request */
|
||||
vd = vchan_next_desc(&xchan->vchan);
|
||||
if (!vd)
|
||||
|
@ -497,10 +497,12 @@ int psci_cpu_suspend_enter(u32 state)
|
||||
|
||||
static int psci_system_suspend(unsigned long unused)
|
||||
{
|
||||
int err;
|
||||
phys_addr_t pa_cpu_resume = __pa_symbol(cpu_resume);
|
||||
|
||||
return invoke_psci_fn(PSCI_FN_NATIVE(1_0, SYSTEM_SUSPEND),
|
||||
err = invoke_psci_fn(PSCI_FN_NATIVE(1_0, SYSTEM_SUSPEND),
|
||||
pa_cpu_resume, 0, 0);
|
||||
return psci_to_linux_errno(err);
|
||||
}
|
||||
|
||||
static int psci_system_suspend_enter(suspend_state_t state)
|
||||
|
@ -41,8 +41,6 @@
|
||||
#include <linux/dma-buf.h>
|
||||
#include <linux/dma-fence-array.h>
|
||||
#include <linux/pci-p2pdma.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
#include "amdgpu_trace.h"
|
||||
|
||||
/**
|
||||
* amdgpu_dma_buf_attach - &dma_buf_ops.attach implementation
|
||||
@ -58,42 +56,11 @@ static int amdgpu_dma_buf_attach(struct dma_buf *dmabuf,
|
||||
struct drm_gem_object *obj = dmabuf->priv;
|
||||
struct amdgpu_bo *bo = gem_to_amdgpu_bo(obj);
|
||||
struct amdgpu_device *adev = amdgpu_ttm_adev(bo->tbo.bdev);
|
||||
int r;
|
||||
|
||||
if (pci_p2pdma_distance(adev->pdev, attach->dev, false) < 0)
|
||||
attach->peer2peer = false;
|
||||
|
||||
r = pm_runtime_get_sync(adev_to_drm(adev)->dev);
|
||||
trace_amdgpu_runpm_reference_dumps(1, __func__);
|
||||
if (r < 0)
|
||||
goto out;
|
||||
|
||||
return 0;
|
||||
|
||||
out:
|
||||
pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
|
||||
trace_amdgpu_runpm_reference_dumps(0, __func__);
|
||||
return r;
|
||||
}
|
||||
|
||||
/**
|
||||
* amdgpu_dma_buf_detach - &dma_buf_ops.detach implementation
|
||||
*
|
||||
* @dmabuf: DMA-buf where we remove the attachment from
|
||||
* @attach: the attachment to remove
|
||||
*
|
||||
* Called when an attachment is removed from the DMA-buf.
|
||||
*/
|
||||
static void amdgpu_dma_buf_detach(struct dma_buf *dmabuf,
|
||||
struct dma_buf_attachment *attach)
|
||||
{
|
||||
struct drm_gem_object *obj = dmabuf->priv;
|
||||
struct amdgpu_bo *bo = gem_to_amdgpu_bo(obj);
|
||||
struct amdgpu_device *adev = amdgpu_ttm_adev(bo->tbo.bdev);
|
||||
|
||||
pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
|
||||
pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
|
||||
trace_amdgpu_runpm_reference_dumps(0, __func__);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -267,7 +234,6 @@ static int amdgpu_dma_buf_begin_cpu_access(struct dma_buf *dma_buf,
|
||||
|
||||
const struct dma_buf_ops amdgpu_dmabuf_ops = {
|
||||
.attach = amdgpu_dma_buf_attach,
|
||||
.detach = amdgpu_dma_buf_detach,
|
||||
.pin = amdgpu_dma_buf_pin,
|
||||
.unpin = amdgpu_dma_buf_unpin,
|
||||
.map_dma_buf = amdgpu_dma_buf_map,
|
||||
|
@ -181,7 +181,6 @@ int amdgpu_fence_emit(struct amdgpu_ring *ring, struct dma_fence **f, struct amd
|
||||
amdgpu_ring_emit_fence(ring, ring->fence_drv.gpu_addr,
|
||||
seq, flags | AMDGPU_FENCE_FLAG_INT);
|
||||
pm_runtime_get_noresume(adev_to_drm(adev)->dev);
|
||||
trace_amdgpu_runpm_reference_dumps(1, __func__);
|
||||
ptr = &ring->fence_drv.fences[seq & ring->fence_drv.num_fences_mask];
|
||||
if (unlikely(rcu_dereference_protected(*ptr, 1))) {
|
||||
struct dma_fence *old;
|
||||
@ -309,7 +308,6 @@ bool amdgpu_fence_process(struct amdgpu_ring *ring)
|
||||
dma_fence_put(fence);
|
||||
pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
|
||||
pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
|
||||
trace_amdgpu_runpm_reference_dumps(0, __func__);
|
||||
} while (last_seq != seq);
|
||||
|
||||
return true;
|
||||
|
@ -684,12 +684,17 @@ int amdgpu_gmc_flush_gpu_tlb_pasid(struct amdgpu_device *adev, uint16_t pasid,
|
||||
struct amdgpu_ring *ring = &adev->gfx.kiq[inst].ring;
|
||||
struct amdgpu_kiq *kiq = &adev->gfx.kiq[inst];
|
||||
unsigned int ndw;
|
||||
signed long r;
|
||||
int r;
|
||||
uint32_t seq;
|
||||
|
||||
if (!adev->gmc.flush_pasid_uses_kiq || !ring->sched.ready ||
|
||||
!down_read_trylock(&adev->reset_domain->sem)) {
|
||||
/*
|
||||
* A GPU reset should flush all TLBs anyway, so no need to do
|
||||
* this while one is ongoing.
|
||||
*/
|
||||
if (!down_read_trylock(&adev->reset_domain->sem))
|
||||
return 0;
|
||||
|
||||
if (!adev->gmc.flush_pasid_uses_kiq || !ring->sched.ready) {
|
||||
if (adev->gmc.flush_tlb_needs_extra_type_2)
|
||||
adev->gmc.gmc_funcs->flush_gpu_tlb_pasid(adev, pasid,
|
||||
2, all_hub,
|
||||
@ -703,44 +708,41 @@ int amdgpu_gmc_flush_gpu_tlb_pasid(struct amdgpu_device *adev, uint16_t pasid,
|
||||
adev->gmc.gmc_funcs->flush_gpu_tlb_pasid(adev, pasid,
|
||||
flush_type, all_hub,
|
||||
inst);
|
||||
return 0;
|
||||
}
|
||||
r = 0;
|
||||
} else {
|
||||
/* 2 dwords flush + 8 dwords fence */
|
||||
ndw = kiq->pmf->invalidate_tlbs_size + 8;
|
||||
|
||||
/* 2 dwords flush + 8 dwords fence */
|
||||
ndw = kiq->pmf->invalidate_tlbs_size + 8;
|
||||
if (adev->gmc.flush_tlb_needs_extra_type_2)
|
||||
ndw += kiq->pmf->invalidate_tlbs_size;
|
||||
|
||||
if (adev->gmc.flush_tlb_needs_extra_type_2)
|
||||
ndw += kiq->pmf->invalidate_tlbs_size;
|
||||
if (adev->gmc.flush_tlb_needs_extra_type_0)
|
||||
ndw += kiq->pmf->invalidate_tlbs_size;
|
||||
|
||||
if (adev->gmc.flush_tlb_needs_extra_type_0)
|
||||
ndw += kiq->pmf->invalidate_tlbs_size;
|
||||
spin_lock(&adev->gfx.kiq[inst].ring_lock);
|
||||
amdgpu_ring_alloc(ring, ndw);
|
||||
if (adev->gmc.flush_tlb_needs_extra_type_2)
|
||||
kiq->pmf->kiq_invalidate_tlbs(ring, pasid, 2, all_hub);
|
||||
|
||||
spin_lock(&adev->gfx.kiq[inst].ring_lock);
|
||||
amdgpu_ring_alloc(ring, ndw);
|
||||
if (adev->gmc.flush_tlb_needs_extra_type_2)
|
||||
kiq->pmf->kiq_invalidate_tlbs(ring, pasid, 2, all_hub);
|
||||
if (flush_type == 2 && adev->gmc.flush_tlb_needs_extra_type_0)
|
||||
kiq->pmf->kiq_invalidate_tlbs(ring, pasid, 0, all_hub);
|
||||
|
||||
if (flush_type == 2 && adev->gmc.flush_tlb_needs_extra_type_0)
|
||||
kiq->pmf->kiq_invalidate_tlbs(ring, pasid, 0, all_hub);
|
||||
kiq->pmf->kiq_invalidate_tlbs(ring, pasid, flush_type, all_hub);
|
||||
r = amdgpu_fence_emit_polling(ring, &seq, MAX_KIQ_REG_WAIT);
|
||||
if (r) {
|
||||
amdgpu_ring_undo(ring);
|
||||
spin_unlock(&adev->gfx.kiq[inst].ring_lock);
|
||||
goto error_unlock_reset;
|
||||
}
|
||||
|
||||
kiq->pmf->kiq_invalidate_tlbs(ring, pasid, flush_type, all_hub);
|
||||
r = amdgpu_fence_emit_polling(ring, &seq, MAX_KIQ_REG_WAIT);
|
||||
if (r) {
|
||||
amdgpu_ring_undo(ring);
|
||||
amdgpu_ring_commit(ring);
|
||||
spin_unlock(&adev->gfx.kiq[inst].ring_lock);
|
||||
goto error_unlock_reset;
|
||||
if (amdgpu_fence_wait_polling(ring, seq, usec_timeout) < 1) {
|
||||
dev_err(adev->dev, "timeout waiting for kiq fence\n");
|
||||
r = -ETIME;
|
||||
}
|
||||
}
|
||||
|
||||
amdgpu_ring_commit(ring);
|
||||
spin_unlock(&adev->gfx.kiq[inst].ring_lock);
|
||||
r = amdgpu_fence_wait_polling(ring, seq, usec_timeout);
|
||||
if (r < 1) {
|
||||
dev_err(adev->dev, "wait for kiq fence error: %ld.\n", r);
|
||||
r = -ETIME;
|
||||
goto error_unlock_reset;
|
||||
}
|
||||
r = 0;
|
||||
|
||||
error_unlock_reset:
|
||||
up_read(&adev->reset_domain->sem);
|
||||
return r;
|
||||
|
@ -554,21 +554,6 @@ TRACE_EVENT(amdgpu_reset_reg_dumps,
|
||||
__entry->value)
|
||||
);
|
||||
|
||||
TRACE_EVENT(amdgpu_runpm_reference_dumps,
|
||||
TP_PROTO(uint32_t index, const char *func),
|
||||
TP_ARGS(index, func),
|
||||
TP_STRUCT__entry(
|
||||
__field(uint32_t, index)
|
||||
__string(func, func)
|
||||
),
|
||||
TP_fast_assign(
|
||||
__entry->index = index;
|
||||
__assign_str(func);
|
||||
),
|
||||
TP_printk("amdgpu runpm reference dump 0x%x: 0x%s\n",
|
||||
__entry->index,
|
||||
__get_str(func))
|
||||
);
|
||||
#undef AMDGPU_JOB_GET_TIMELINE_NAME
|
||||
#endif
|
||||
|
||||
|
@ -4195,9 +4195,10 @@ static u32 gfx_v9_4_3_get_cu_active_bitmap(struct amdgpu_device *adev, int xcc_i
|
||||
static int gfx_v9_4_3_get_cu_info(struct amdgpu_device *adev,
|
||||
struct amdgpu_cu_info *cu_info)
|
||||
{
|
||||
int i, j, k, counter, xcc_id, active_cu_number = 0;
|
||||
u32 mask, bitmap, ao_bitmap, ao_cu_mask = 0;
|
||||
int i, j, k, prev_counter, counter, xcc_id, active_cu_number = 0;
|
||||
u32 mask, bitmap, ao_bitmap, ao_cu_mask = 0, tmp;
|
||||
unsigned disable_masks[4 * 4];
|
||||
bool is_symmetric_cus;
|
||||
|
||||
if (!adev || !cu_info)
|
||||
return -EINVAL;
|
||||
@ -4215,6 +4216,7 @@ static int gfx_v9_4_3_get_cu_info(struct amdgpu_device *adev,
|
||||
|
||||
mutex_lock(&adev->grbm_idx_mutex);
|
||||
for (xcc_id = 0; xcc_id < NUM_XCC(adev->gfx.xcc_mask); xcc_id++) {
|
||||
is_symmetric_cus = true;
|
||||
for (i = 0; i < adev->gfx.config.max_shader_engines; i++) {
|
||||
for (j = 0; j < adev->gfx.config.max_sh_per_se; j++) {
|
||||
mask = 1;
|
||||
@ -4242,6 +4244,15 @@ static int gfx_v9_4_3_get_cu_info(struct amdgpu_device *adev,
|
||||
ao_cu_mask |= (ao_bitmap << (i * 16 + j * 8));
|
||||
cu_info->ao_cu_bitmap[i][j] = ao_bitmap;
|
||||
}
|
||||
if (i && is_symmetric_cus && prev_counter != counter)
|
||||
is_symmetric_cus = false;
|
||||
prev_counter = counter;
|
||||
}
|
||||
if (is_symmetric_cus) {
|
||||
tmp = RREG32_SOC15(GC, GET_INST(GC, xcc_id), regCP_CPC_DEBUG);
|
||||
tmp = REG_SET_FIELD(tmp, CP_CPC_DEBUG, CPC_HARVESTING_RELAUNCH_DISABLE, 1);
|
||||
tmp = REG_SET_FIELD(tmp, CP_CPC_DEBUG, CPC_HARVESTING_DISPATCH_DISABLE, 1);
|
||||
WREG32_SOC15(GC, GET_INST(GC, xcc_id), regCP_CPC_DEBUG, tmp);
|
||||
}
|
||||
gfx_v9_4_3_xcc_select_se_sh(adev, 0xffffffff, 0xffffffff, 0xffffffff,
|
||||
xcc_id);
|
||||
|
@ -154,18 +154,18 @@ static int mes_v11_0_submit_pkt_and_poll_completion(struct amdgpu_mes *mes,
|
||||
void *pkt, int size,
|
||||
int api_status_off)
|
||||
{
|
||||
int ndw = size / 4;
|
||||
signed long r;
|
||||
union MESAPI__MISC *x_pkt = pkt;
|
||||
struct MES_API_STATUS *api_status;
|
||||
union MESAPI__QUERY_MES_STATUS mes_status_pkt;
|
||||
signed long timeout = 3000000; /* 3000 ms */
|
||||
struct amdgpu_device *adev = mes->adev;
|
||||
struct amdgpu_ring *ring = &mes->ring;
|
||||
unsigned long flags;
|
||||
signed long timeout = 3000000; /* 3000 ms */
|
||||
struct MES_API_STATUS *api_status;
|
||||
union MESAPI__MISC *x_pkt = pkt;
|
||||
const char *op_str, *misc_op_str;
|
||||
u32 fence_offset;
|
||||
u64 fence_gpu_addr;
|
||||
u64 *fence_ptr;
|
||||
unsigned long flags;
|
||||
u64 status_gpu_addr;
|
||||
u32 status_offset;
|
||||
u64 *status_ptr;
|
||||
signed long r;
|
||||
int ret;
|
||||
|
||||
if (x_pkt->header.opcode >= MES_SCH_API_MAX)
|
||||
@ -177,28 +177,38 @@ static int mes_v11_0_submit_pkt_and_poll_completion(struct amdgpu_mes *mes,
|
||||
/* Worst case in sriov where all other 15 VF timeout, each VF needs about 600ms */
|
||||
timeout = 15 * 600 * 1000;
|
||||
}
|
||||
BUG_ON(size % 4 != 0);
|
||||
|
||||
ret = amdgpu_device_wb_get(adev, &fence_offset);
|
||||
ret = amdgpu_device_wb_get(adev, &status_offset);
|
||||
if (ret)
|
||||
return ret;
|
||||
fence_gpu_addr =
|
||||
adev->wb.gpu_addr + (fence_offset * 4);
|
||||
fence_ptr = (u64 *)&adev->wb.wb[fence_offset];
|
||||
*fence_ptr = 0;
|
||||
|
||||
status_gpu_addr = adev->wb.gpu_addr + (status_offset * 4);
|
||||
status_ptr = (u64 *)&adev->wb.wb[status_offset];
|
||||
*status_ptr = 0;
|
||||
|
||||
spin_lock_irqsave(&mes->ring_lock, flags);
|
||||
if (amdgpu_ring_alloc(ring, ndw)) {
|
||||
spin_unlock_irqrestore(&mes->ring_lock, flags);
|
||||
amdgpu_device_wb_free(adev, fence_offset);
|
||||
return -ENOMEM;
|
||||
}
|
||||
r = amdgpu_ring_alloc(ring, (size + sizeof(mes_status_pkt)) / 4);
|
||||
if (r)
|
||||
goto error_unlock_free;
|
||||
|
||||
api_status = (struct MES_API_STATUS *)((char *)pkt + api_status_off);
|
||||
api_status->api_completion_fence_addr = fence_gpu_addr;
|
||||
api_status->api_completion_fence_addr = status_gpu_addr;
|
||||
api_status->api_completion_fence_value = 1;
|
||||
|
||||
amdgpu_ring_write_multiple(ring, pkt, ndw);
|
||||
amdgpu_ring_write_multiple(ring, pkt, size / 4);
|
||||
|
||||
memset(&mes_status_pkt, 0, sizeof(mes_status_pkt));
|
||||
mes_status_pkt.header.type = MES_API_TYPE_SCHEDULER;
|
||||
mes_status_pkt.header.opcode = MES_SCH_API_QUERY_SCHEDULER_STATUS;
|
||||
mes_status_pkt.header.dwsize = API_FRAME_SIZE_IN_DWORDS;
|
||||
mes_status_pkt.api_status.api_completion_fence_addr =
|
||||
ring->fence_drv.gpu_addr;
|
||||
mes_status_pkt.api_status.api_completion_fence_value =
|
||||
++ring->fence_drv.sync_seq;
|
||||
|
||||
amdgpu_ring_write_multiple(ring, &mes_status_pkt,
|
||||
sizeof(mes_status_pkt) / 4);
|
||||
|
||||
amdgpu_ring_commit(ring);
|
||||
spin_unlock_irqrestore(&mes->ring_lock, flags);
|
||||
|
||||
@ -206,15 +216,16 @@ static int mes_v11_0_submit_pkt_and_poll_completion(struct amdgpu_mes *mes,
|
||||
misc_op_str = mes_v11_0_get_misc_op_string(x_pkt);
|
||||
|
||||
if (misc_op_str)
|
||||
dev_dbg(adev->dev, "MES msg=%s (%s) was emitted\n", op_str, misc_op_str);
|
||||
dev_dbg(adev->dev, "MES msg=%s (%s) was emitted\n", op_str,
|
||||
misc_op_str);
|
||||
else if (op_str)
|
||||
dev_dbg(adev->dev, "MES msg=%s was emitted\n", op_str);
|
||||
else
|
||||
dev_dbg(adev->dev, "MES msg=%d was emitted\n", x_pkt->header.opcode);
|
||||
dev_dbg(adev->dev, "MES msg=%d was emitted\n",
|
||||
x_pkt->header.opcode);
|
||||
|
||||
r = amdgpu_mes_fence_wait_polling(fence_ptr, (u64)1, timeout);
|
||||
amdgpu_device_wb_free(adev, fence_offset);
|
||||
if (r < 1) {
|
||||
r = amdgpu_fence_wait_polling(ring, ring->fence_drv.sync_seq, timeout);
|
||||
if (r < 1 || !*status_ptr) {
|
||||
|
||||
if (misc_op_str)
|
||||
dev_err(adev->dev, "MES failed to respond to msg=%s (%s)\n",
|
||||
@ -229,10 +240,19 @@ static int mes_v11_0_submit_pkt_and_poll_completion(struct amdgpu_mes *mes,
|
||||
while (halt_if_hws_hang)
|
||||
schedule();
|
||||
|
||||
return -ETIMEDOUT;
|
||||
r = -ETIMEDOUT;
|
||||
goto error_wb_free;
|
||||
}
|
||||
|
||||
amdgpu_device_wb_free(adev, status_offset);
|
||||
return 0;
|
||||
|
||||
error_unlock_free:
|
||||
spin_unlock_irqrestore(&mes->ring_lock, flags);
|
||||
|
||||
error_wb_free:
|
||||
amdgpu_device_wb_free(adev, status_offset);
|
||||
return r;
|
||||
}
|
||||
|
||||
static int convert_to_mes_queue_type(int queue_type)
|
||||
|
@ -32,7 +32,9 @@
|
||||
#include "mp/mp_14_0_2_sh_mask.h"
|
||||
|
||||
MODULE_FIRMWARE("amdgpu/psp_14_0_2_sos.bin");
|
||||
MODULE_FIRMWARE("amdgpu/psp_14_0_2_ta.bin");
|
||||
MODULE_FIRMWARE("amdgpu/psp_14_0_3_sos.bin");
|
||||
MODULE_FIRMWARE("amdgpu/psp_14_0_3_ta.bin");
|
||||
|
||||
/* For large FW files the time to complete can be very long */
|
||||
#define USBC_PD_POLLING_LIMIT_S 240
|
||||
@ -64,6 +66,9 @@ static int psp_v14_0_init_microcode(struct psp_context *psp)
|
||||
case IP_VERSION(14, 0, 2):
|
||||
case IP_VERSION(14, 0, 3):
|
||||
err = psp_init_sos_microcode(psp, ucode_prefix);
|
||||
if (err)
|
||||
return err;
|
||||
err = psp_init_ta_microcode(psp, ucode_prefix);
|
||||
if (err)
|
||||
return err;
|
||||
break;
|
||||
|
@ -8,7 +8,7 @@ config DRM_AMD_DC
|
||||
depends on BROKEN || !CC_IS_CLANG || ARM64 || RISCV || SPARC64 || X86_64
|
||||
select SND_HDA_COMPONENT if SND_HDA_CORE
|
||||
# !CC_IS_CLANG: https://github.com/ClangBuiltLinux/linux/issues/1752
|
||||
select DRM_AMD_DC_FP if ARCH_HAS_KERNEL_FPU_SUPPORT && (!ARM64 || !CC_IS_CLANG)
|
||||
select DRM_AMD_DC_FP if ARCH_HAS_KERNEL_FPU_SUPPORT && !(CC_IS_CLANG && (ARM64 || RISCV))
|
||||
help
|
||||
Choose this option if you want to use the new display engine
|
||||
support for AMDGPU. This adds required support for Vega and
|
||||
|
@ -9169,9 +9169,6 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state)
|
||||
|
||||
trace_amdgpu_dm_atomic_commit_tail_begin(state);
|
||||
|
||||
if (dm->dc->caps.ips_support && dm->dc->idle_optimizations_allowed)
|
||||
dc_allow_idle_optimizations(dm->dc, false);
|
||||
|
||||
drm_atomic_helper_update_legacy_modeset_state(dev, state);
|
||||
drm_dp_mst_atomic_wait_for_dependencies(state);
|
||||
|
||||
@ -11440,6 +11437,12 @@ void amdgpu_dm_trigger_timing_sync(struct drm_device *dev)
|
||||
mutex_unlock(&adev->dm.dc_lock);
|
||||
}
|
||||
|
||||
static inline void amdgpu_dm_exit_ips_for_hw_access(struct dc *dc)
|
||||
{
|
||||
if (dc->ctx->dmub_srv && !dc->ctx->dmub_srv->idle_exit_counter)
|
||||
dc_exit_ips_for_hw_access(dc);
|
||||
}
|
||||
|
||||
void dm_write_reg_func(const struct dc_context *ctx, uint32_t address,
|
||||
u32 value, const char *func_name)
|
||||
{
|
||||
@ -11450,6 +11453,8 @@ void dm_write_reg_func(const struct dc_context *ctx, uint32_t address,
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
amdgpu_dm_exit_ips_for_hw_access(ctx->dc);
|
||||
cgs_write_register(ctx->cgs_device, address, value);
|
||||
trace_amdgpu_dc_wreg(&ctx->perf_trace->write_count, address, value);
|
||||
}
|
||||
@ -11473,6 +11478,8 @@ uint32_t dm_read_reg_func(const struct dc_context *ctx, uint32_t address,
|
||||
return 0;
|
||||
}
|
||||
|
||||
amdgpu_dm_exit_ips_for_hw_access(ctx->dc);
|
||||
|
||||
value = cgs_read_register(ctx->cgs_device, address);
|
||||
|
||||
trace_amdgpu_dc_rreg(&ctx->perf_trace->read_count, address, value);
|
||||
|
@ -177,7 +177,7 @@ struct _vcs_dpi_soc_bounding_box_st dcn3_5_soc = {
|
||||
.urgent_latency_pixel_data_only_us = 4.0,
|
||||
.urgent_latency_pixel_mixed_with_vm_data_us = 4.0,
|
||||
.urgent_latency_vm_data_only_us = 4.0,
|
||||
.dram_clock_change_latency_us = 11.72,
|
||||
.dram_clock_change_latency_us = 34.0,
|
||||
.urgent_out_of_order_return_per_channel_pixel_only_bytes = 4096,
|
||||
.urgent_out_of_order_return_per_channel_pixel_and_vm_bytes = 4096,
|
||||
.urgent_out_of_order_return_per_channel_vm_only_bytes = 4096,
|
||||
|
@ -215,7 +215,7 @@ struct _vcs_dpi_soc_bounding_box_st dcn3_51_soc = {
|
||||
.urgent_latency_pixel_data_only_us = 4.0,
|
||||
.urgent_latency_pixel_mixed_with_vm_data_us = 4.0,
|
||||
.urgent_latency_vm_data_only_us = 4.0,
|
||||
.dram_clock_change_latency_us = 11.72,
|
||||
.dram_clock_change_latency_us = 34,
|
||||
.urgent_out_of_order_return_per_channel_pixel_only_bytes = 4096,
|
||||
.urgent_out_of_order_return_per_channel_pixel_and_vm_bytes = 4096,
|
||||
.urgent_out_of_order_return_per_channel_vm_only_bytes = 4096,
|
||||
|
@ -1439,3 +1439,75 @@ void dcn35_set_long_vblank(struct pipe_ctx **pipe_ctx,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static bool should_avoid_empty_tu(struct pipe_ctx *pipe_ctx)
|
||||
{
|
||||
/* Calculate average pixel count per TU, return false if under ~2.00 to
|
||||
* avoid empty TUs. This is only required for DPIA tunneling as empty TUs
|
||||
* are legal to generate for native DP links. Assume TU size 64 as there
|
||||
* is currently no scenario where it's reprogrammed from HW default.
|
||||
* MTPs have no such limitation, so this does not affect MST use cases.
|
||||
*/
|
||||
unsigned int pix_clk_mhz;
|
||||
unsigned int symclk_mhz;
|
||||
unsigned int avg_pix_per_tu_x1000;
|
||||
unsigned int tu_size_bytes = 64;
|
||||
struct dc_crtc_timing *timing = &pipe_ctx->stream->timing;
|
||||
struct dc_link_settings *link_settings = &pipe_ctx->link_config.dp_link_settings;
|
||||
const struct dc *dc = pipe_ctx->stream->link->dc;
|
||||
|
||||
if (pipe_ctx->stream->link->ep_type != DISPLAY_ENDPOINT_USB4_DPIA)
|
||||
return false;
|
||||
|
||||
// Not necessary for MST configurations
|
||||
if (pipe_ctx->stream->signal == SIGNAL_TYPE_DISPLAY_PORT_MST)
|
||||
return false;
|
||||
|
||||
pix_clk_mhz = timing->pix_clk_100hz / 10000;
|
||||
|
||||
// If this is true, can't block due to dynamic ODM
|
||||
if (pix_clk_mhz > dc->clk_mgr->bw_params->clk_table.entries[0].dispclk_mhz)
|
||||
return false;
|
||||
|
||||
switch (link_settings->link_rate) {
|
||||
case LINK_RATE_LOW:
|
||||
symclk_mhz = 162;
|
||||
break;
|
||||
case LINK_RATE_HIGH:
|
||||
symclk_mhz = 270;
|
||||
break;
|
||||
case LINK_RATE_HIGH2:
|
||||
symclk_mhz = 540;
|
||||
break;
|
||||
case LINK_RATE_HIGH3:
|
||||
symclk_mhz = 810;
|
||||
break;
|
||||
default:
|
||||
// We shouldn't be tunneling any other rates, something is wrong
|
||||
ASSERT(0);
|
||||
return false;
|
||||
}
|
||||
|
||||
avg_pix_per_tu_x1000 = (1000 * pix_clk_mhz * tu_size_bytes)
|
||||
/ (symclk_mhz * link_settings->lane_count);
|
||||
|
||||
// Add small empirically-decided margin to account for potential jitter
|
||||
return (avg_pix_per_tu_x1000 < 2020);
|
||||
}
|
||||
|
||||
bool dcn35_is_dp_dig_pixel_rate_div_policy(struct pipe_ctx *pipe_ctx)
|
||||
{
|
||||
struct dc *dc = pipe_ctx->stream->ctx->dc;
|
||||
|
||||
if (!is_h_timing_divisible_by_2(pipe_ctx->stream))
|
||||
return false;
|
||||
|
||||
if (should_avoid_empty_tu(pipe_ctx))
|
||||
return false;
|
||||
|
||||
if (dc_is_dp_signal(pipe_ctx->stream->signal) && !dc->link_srv->dp_is_128b_132b_signal(pipe_ctx) &&
|
||||
dc->debug.enable_dp_dig_pixel_rate_div_policy)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -95,4 +95,6 @@ void dcn35_set_static_screen_control(struct pipe_ctx **pipe_ctx,
|
||||
void dcn35_set_long_vblank(struct pipe_ctx **pipe_ctx,
|
||||
int num_pipes, uint32_t v_total_min, uint32_t v_total_max);
|
||||
|
||||
bool dcn35_is_dp_dig_pixel_rate_div_policy(struct pipe_ctx *pipe_ctx);
|
||||
|
||||
#endif /* __DC_HWSS_DCN35_H__ */
|
||||
|
@ -158,7 +158,7 @@ static const struct hwseq_private_funcs dcn35_private_funcs = {
|
||||
.setup_hpo_hw_control = dcn35_setup_hpo_hw_control,
|
||||
.calculate_dccg_k1_k2_values = dcn32_calculate_dccg_k1_k2_values,
|
||||
.set_pixels_per_cycle = dcn32_set_pixels_per_cycle,
|
||||
.is_dp_dig_pixel_rate_div_policy = dcn32_is_dp_dig_pixel_rate_div_policy,
|
||||
.is_dp_dig_pixel_rate_div_policy = dcn35_is_dp_dig_pixel_rate_div_policy,
|
||||
.dsc_pg_control = dcn35_dsc_pg_control,
|
||||
.dsc_pg_status = dcn32_dsc_pg_status,
|
||||
.enable_plane = dcn35_enable_plane,
|
||||
|
@ -164,6 +164,8 @@ static void sumo_construct_vid_mapping_table(struct amdgpu_device *adev,
|
||||
|
||||
for (i = 0; i < SUMO_MAX_HARDWARE_POWERLEVELS; i++) {
|
||||
if (table[i].ulSupportedSCLK != 0) {
|
||||
if (table[i].usVoltageIndex >= SUMO_MAX_NUMBER_VOLTAGES)
|
||||
continue;
|
||||
vid_mapping_table->entries[table[i].usVoltageIndex].vid_7bit =
|
||||
table[i].usVoltageID;
|
||||
vid_mapping_table->entries[table[i].usVoltageIndex].vid_2bit =
|
||||
|
@ -442,6 +442,10 @@ bool intel_dp_has_bigjoiner(struct intel_dp *intel_dp)
|
||||
struct intel_encoder *encoder = &intel_dig_port->base;
|
||||
struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
|
||||
|
||||
/* eDP MSO is not compatible with joiner */
|
||||
if (intel_dp->mso_link_count)
|
||||
return false;
|
||||
|
||||
return DISPLAY_VER(dev_priv) >= 12 ||
|
||||
(DISPLAY_VER(dev_priv) == 11 &&
|
||||
encoder->port != PORT_A);
|
||||
|
@ -1619,6 +1619,8 @@ void sumo_construct_vid_mapping_table(struct radeon_device *rdev,
|
||||
|
||||
for (i = 0; i < SUMO_MAX_HARDWARE_POWERLEVELS; i++) {
|
||||
if (table[i].ulSupportedSCLK != 0) {
|
||||
if (table[i].usVoltageIndex >= SUMO_MAX_NUMBER_VOLTAGES)
|
||||
continue;
|
||||
vid_mapping_table->entries[table[i].usVoltageIndex].vid_7bit =
|
||||
table[i].usVoltageID;
|
||||
vid_mapping_table->entries[table[i].usVoltageIndex].vid_2bit =
|
||||
|
@ -2,7 +2,7 @@
|
||||
config DRM_VMWGFX
|
||||
tristate "DRM driver for VMware Virtual GPU"
|
||||
depends on DRM && PCI && MMU
|
||||
depends on X86 || ARM64
|
||||
depends on (X86 && HYPERVISOR_GUEST) || ARM64
|
||||
select DRM_TTM
|
||||
select DRM_TTM_HELPER
|
||||
select MAPPING_DIRTY_HELPERS
|
||||
|
@ -631,8 +631,6 @@ int xe_guc_enable_communication(struct xe_guc *guc)
|
||||
struct xe_device *xe = guc_to_xe(guc);
|
||||
int err;
|
||||
|
||||
guc_enable_irq(guc);
|
||||
|
||||
if (IS_SRIOV_VF(xe) && xe_device_has_memirq(xe)) {
|
||||
struct xe_gt *gt = guc_to_gt(guc);
|
||||
struct xe_tile *tile = gt_to_tile(gt);
|
||||
@ -640,6 +638,8 @@ int xe_guc_enable_communication(struct xe_guc *guc)
|
||||
err = xe_memirq_init_guc(&tile->sriov.vf.memirq, guc);
|
||||
if (err)
|
||||
return err;
|
||||
} else {
|
||||
guc_enable_irq(guc);
|
||||
}
|
||||
|
||||
xe_mmio_rmw32(guc_to_gt(guc), PMINTRMSK,
|
||||
|
@ -431,8 +431,8 @@ static int ocores_init(struct device *dev, struct ocores_i2c *i2c)
|
||||
oc_setreg(i2c, OCI2C_PREHIGH, prescale >> 8);
|
||||
|
||||
/* Init the device */
|
||||
oc_setreg(i2c, OCI2C_CMD, OCI2C_CMD_IACK);
|
||||
oc_setreg(i2c, OCI2C_CONTROL, ctrl | OCI2C_CTRL_EN);
|
||||
oc_setreg(i2c, OCI2C_CMD, OCI2C_CMD_IACK);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -107,8 +107,6 @@ struct bnxt_re_gsi_context {
|
||||
struct bnxt_re_sqp_entries *sqp_tbl;
|
||||
};
|
||||
|
||||
#define BNXT_RE_MIN_MSIX 2
|
||||
#define BNXT_RE_MAX_MSIX 9
|
||||
#define BNXT_RE_AEQ_IDX 0
|
||||
#define BNXT_RE_NQ_IDX 1
|
||||
#define BNXT_RE_GEN_P5_MAX_VF 64
|
||||
@ -168,7 +166,7 @@ struct bnxt_re_dev {
|
||||
struct bnxt_qplib_rcfw rcfw;
|
||||
|
||||
/* NQ */
|
||||
struct bnxt_qplib_nq nq[BNXT_RE_MAX_MSIX];
|
||||
struct bnxt_qplib_nq nq[BNXT_MAX_ROCE_MSIX];
|
||||
|
||||
/* Device Resources */
|
||||
struct bnxt_qplib_dev_attr dev_attr;
|
||||
|
@ -112,6 +112,7 @@ struct ib_mr *mana_ib_reg_user_mr(struct ib_pd *ibpd, u64 start, u64 length,
|
||||
"start 0x%llx, iova 0x%llx length 0x%llx access_flags 0x%x",
|
||||
start, iova, length, access_flags);
|
||||
|
||||
access_flags &= ~IB_ACCESS_OPTIONAL;
|
||||
if (access_flags & ~VALID_MR_FLAGS)
|
||||
return ERR_PTR(-EINVAL);
|
||||
|
||||
|
@ -3759,10 +3759,10 @@ static int mlx5_ib_stage_init_init(struct mlx5_ib_dev *dev)
|
||||
spin_lock_init(&dev->dm.lock);
|
||||
dev->dm.dev = mdev;
|
||||
return 0;
|
||||
err:
|
||||
mlx5r_macsec_dealloc_gids(dev);
|
||||
err_mp:
|
||||
mlx5_ib_cleanup_multiport_master(dev);
|
||||
err:
|
||||
mlx5r_macsec_dealloc_gids(dev);
|
||||
return err;
|
||||
}
|
||||
|
||||
|
@ -246,6 +246,7 @@ static void set_cache_mkc(struct mlx5_cache_ent *ent, void *mkc)
|
||||
MLX5_SET(mkc, mkc, access_mode_1_0, ent->rb_key.access_mode & 0x3);
|
||||
MLX5_SET(mkc, mkc, access_mode_4_2,
|
||||
(ent->rb_key.access_mode >> 2) & 0x7);
|
||||
MLX5_SET(mkc, mkc, ma_translation_mode, !!ent->rb_key.ats);
|
||||
|
||||
MLX5_SET(mkc, mkc, translations_octword_size,
|
||||
get_mkc_octo_size(ent->rb_key.access_mode,
|
||||
@ -641,10 +642,8 @@ static int mlx5_cache_ent_insert(struct mlx5_mkey_cache *cache,
|
||||
new = &((*new)->rb_left);
|
||||
if (cmp < 0)
|
||||
new = &((*new)->rb_right);
|
||||
if (cmp == 0) {
|
||||
mutex_unlock(&cache->rb_lock);
|
||||
if (cmp == 0)
|
||||
return -EEXIST;
|
||||
}
|
||||
}
|
||||
|
||||
/* Add new node and rebalance tree. */
|
||||
@ -719,6 +718,8 @@ static struct mlx5_ib_mr *_mlx5_mr_cache_alloc(struct mlx5_ib_dev *dev,
|
||||
}
|
||||
mr->mmkey.cache_ent = ent;
|
||||
mr->mmkey.type = MLX5_MKEY_MR;
|
||||
mr->mmkey.rb_key = ent->rb_key;
|
||||
mr->mmkey.cacheable = true;
|
||||
init_waitqueue_head(&mr->mmkey.wait);
|
||||
return mr;
|
||||
}
|
||||
@ -1169,7 +1170,6 @@ static struct mlx5_ib_mr *alloc_cacheable_mr(struct ib_pd *pd,
|
||||
mr->ibmr.pd = pd;
|
||||
mr->umem = umem;
|
||||
mr->page_shift = order_base_2(page_size);
|
||||
mr->mmkey.cacheable = true;
|
||||
set_mr_fields(dev, mr, umem->length, access_flags, iova);
|
||||
|
||||
return mr;
|
||||
|
@ -199,17 +199,20 @@ int mlx5_ib_create_srq(struct ib_srq *ib_srq,
|
||||
int err;
|
||||
struct mlx5_srq_attr in = {};
|
||||
__u32 max_srq_wqes = 1 << MLX5_CAP_GEN(dev->mdev, log_max_srq_sz);
|
||||
__u32 max_sge_sz = MLX5_CAP_GEN(dev->mdev, max_wqe_sz_rq) /
|
||||
sizeof(struct mlx5_wqe_data_seg);
|
||||
|
||||
if (init_attr->srq_type != IB_SRQT_BASIC &&
|
||||
init_attr->srq_type != IB_SRQT_XRC &&
|
||||
init_attr->srq_type != IB_SRQT_TM)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
/* Sanity check SRQ size before proceeding */
|
||||
if (init_attr->attr.max_wr >= max_srq_wqes) {
|
||||
mlx5_ib_dbg(dev, "max_wr %d, cap %d\n",
|
||||
init_attr->attr.max_wr,
|
||||
max_srq_wqes);
|
||||
/* Sanity check SRQ and sge size before proceeding */
|
||||
if (init_attr->attr.max_wr >= max_srq_wqes ||
|
||||
init_attr->attr.max_sge > max_sge_sz) {
|
||||
mlx5_ib_dbg(dev, "max_wr %d,wr_cap %d,max_sge %d, sge_cap:%d\n",
|
||||
init_attr->attr.max_wr, max_srq_wqes,
|
||||
init_attr->attr.max_sge, max_sge_sz);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
@ -344,6 +344,19 @@ static enum resp_states rxe_resp_check_length(struct rxe_qp *qp,
|
||||
* receive buffer later. For rmda operations additional
|
||||
* length checks are performed in check_rkey.
|
||||
*/
|
||||
if ((qp_type(qp) == IB_QPT_GSI) || (qp_type(qp) == IB_QPT_UD)) {
|
||||
unsigned int payload = payload_size(pkt);
|
||||
unsigned int recv_buffer_len = 0;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < qp->resp.wqe->dma.num_sge; i++)
|
||||
recv_buffer_len += qp->resp.wqe->dma.sge[i].length;
|
||||
if (payload + 40 > recv_buffer_len) {
|
||||
rxe_dbg_qp(qp, "The receive buffer is too small for this UD packet.\n");
|
||||
return RESPST_ERR_LENGTH;
|
||||
}
|
||||
}
|
||||
|
||||
if (pkt->mask & RXE_PAYLOAD_MASK && ((qp_type(qp) == IB_QPT_RC) ||
|
||||
(qp_type(qp) == IB_QPT_UC))) {
|
||||
unsigned int mtu = qp->mtu;
|
||||
|
@ -812,7 +812,7 @@ static void copy_inline_data_to_wqe(struct rxe_send_wqe *wqe,
|
||||
int i;
|
||||
|
||||
for (i = 0; i < ibwr->num_sge; i++, sge++) {
|
||||
memcpy(p, ib_virt_dma_to_page(sge->addr), sge->length);
|
||||
memcpy(p, ib_virt_dma_to_ptr(sge->addr), sge->length);
|
||||
p += sge->length;
|
||||
}
|
||||
}
|
||||
|
@ -209,6 +209,7 @@ static const struct xpad_device {
|
||||
{ 0x0738, 0xf738, "Super SFIV FightStick TE S", 0, XTYPE_XBOX360 },
|
||||
{ 0x07ff, 0xffff, "Mad Catz GamePad", 0, XTYPE_XBOX360 },
|
||||
{ 0x0b05, 0x1a38, "ASUS ROG RAIKIRI", 0, XTYPE_XBOXONE },
|
||||
{ 0x0b05, 0x1abb, "ASUS ROG RAIKIRI PRO", 0, XTYPE_XBOXONE },
|
||||
{ 0x0c12, 0x0005, "Intec wireless", 0, XTYPE_XBOX },
|
||||
{ 0x0c12, 0x8801, "Nyko Xbox Controller", 0, XTYPE_XBOX },
|
||||
{ 0x0c12, 0x8802, "Zeroplus Xbox Controller", 0, XTYPE_XBOX },
|
||||
|
@ -1476,16 +1476,47 @@ static void elantech_disconnect(struct psmouse *psmouse)
|
||||
psmouse->private = NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* Some hw_version 4 models fail to properly activate absolute mode on
|
||||
* resume without going through disable/enable cycle.
|
||||
*/
|
||||
static const struct dmi_system_id elantech_needs_reenable[] = {
|
||||
#if defined(CONFIG_DMI) && defined(CONFIG_X86)
|
||||
{
|
||||
/* Lenovo N24 */
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "81AF"),
|
||||
},
|
||||
},
|
||||
#endif
|
||||
{ }
|
||||
};
|
||||
|
||||
/*
|
||||
* Put the touchpad back into absolute mode when reconnecting
|
||||
*/
|
||||
static int elantech_reconnect(struct psmouse *psmouse)
|
||||
{
|
||||
int err;
|
||||
|
||||
psmouse_reset(psmouse);
|
||||
|
||||
if (elantech_detect(psmouse, 0))
|
||||
return -1;
|
||||
|
||||
if (dmi_check_system(elantech_needs_reenable)) {
|
||||
err = ps2_command(&psmouse->ps2dev, NULL, PSMOUSE_CMD_DISABLE);
|
||||
if (err)
|
||||
psmouse_warn(psmouse, "failed to deactivate mouse on %s: %d\n",
|
||||
psmouse->ps2dev.serio->phys, err);
|
||||
|
||||
err = ps2_command(&psmouse->ps2dev, NULL, PSMOUSE_CMD_ENABLE);
|
||||
if (err)
|
||||
psmouse_warn(psmouse, "failed to reactivate mouse on %s: %d\n",
|
||||
psmouse->ps2dev.serio->phys, err);
|
||||
}
|
||||
|
||||
if (elantech_set_absolute_mode(psmouse)) {
|
||||
psmouse_err(psmouse,
|
||||
"failed to put touchpad back into absolute mode.\n");
|
||||
|
@ -76,7 +76,7 @@ static inline void i8042_write_command(int val)
|
||||
#define SERIO_QUIRK_PROBE_DEFER BIT(5)
|
||||
#define SERIO_QUIRK_RESET_ALWAYS BIT(6)
|
||||
#define SERIO_QUIRK_RESET_NEVER BIT(7)
|
||||
#define SERIO_QUIRK_DIECT BIT(8)
|
||||
#define SERIO_QUIRK_DIRECT BIT(8)
|
||||
#define SERIO_QUIRK_DUMBKBD BIT(9)
|
||||
#define SERIO_QUIRK_NOLOOP BIT(10)
|
||||
#define SERIO_QUIRK_NOTIMEOUT BIT(11)
|
||||
@ -1332,6 +1332,20 @@ static const struct dmi_system_id i8042_dmi_quirk_table[] __initconst = {
|
||||
.driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS |
|
||||
SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP)
|
||||
},
|
||||
{
|
||||
/*
|
||||
* The Ayaneo Kun is a handheld device where some the buttons
|
||||
* are handled by an AT keyboard. The keyboard is usually
|
||||
* detected as raw, but sometimes, usually after a cold boot,
|
||||
* it is detected as translated. Make sure that the keyboard
|
||||
* is always in raw mode.
|
||||
*/
|
||||
.matches = {
|
||||
DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "AYANEO"),
|
||||
DMI_MATCH(DMI_BOARD_NAME, "KUN"),
|
||||
},
|
||||
.driver_data = (void *)(SERIO_QUIRK_DIRECT)
|
||||
},
|
||||
{ }
|
||||
};
|
||||
|
||||
@ -1655,7 +1669,7 @@ static void __init i8042_check_quirks(void)
|
||||
if (quirks & SERIO_QUIRK_RESET_NEVER)
|
||||
i8042_reset = I8042_RESET_NEVER;
|
||||
}
|
||||
if (quirks & SERIO_QUIRK_DIECT)
|
||||
if (quirks & SERIO_QUIRK_DIRECT)
|
||||
i8042_direct = true;
|
||||
if (quirks & SERIO_QUIRK_DUMBKBD)
|
||||
i8042_dumbkbd = true;
|
||||
|
@ -1111,6 +1111,16 @@ static const struct of_device_id ads7846_dt_ids[] = {
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, ads7846_dt_ids);
|
||||
|
||||
static const struct spi_device_id ads7846_spi_ids[] = {
|
||||
{ "tsc2046", 7846 },
|
||||
{ "ads7843", 7843 },
|
||||
{ "ads7845", 7845 },
|
||||
{ "ads7846", 7846 },
|
||||
{ "ads7873", 7873 },
|
||||
{ },
|
||||
};
|
||||
MODULE_DEVICE_TABLE(spi, ads7846_spi_ids);
|
||||
|
||||
static const struct ads7846_platform_data *ads7846_get_props(struct device *dev)
|
||||
{
|
||||
struct ads7846_platform_data *pdata;
|
||||
@ -1386,10 +1396,10 @@ static struct spi_driver ads7846_driver = {
|
||||
},
|
||||
.probe = ads7846_probe,
|
||||
.remove = ads7846_remove,
|
||||
.id_table = ads7846_spi_ids,
|
||||
};
|
||||
|
||||
module_spi_driver(ads7846_driver);
|
||||
|
||||
MODULE_DESCRIPTION("ADS7846 TouchScreen Driver");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_ALIAS("spi:ads7846");
|
||||
|
@ -261,8 +261,8 @@ static int ili251x_read_touch_data(struct i2c_client *client, u8 *data)
|
||||
if (!error && data[0] == 2) {
|
||||
error = i2c_master_recv(client, data + ILI251X_DATA_SIZE1,
|
||||
ILI251X_DATA_SIZE2);
|
||||
if (error >= 0 && error != ILI251X_DATA_SIZE2)
|
||||
error = -EIO;
|
||||
if (error >= 0)
|
||||
error = error == ILI251X_DATA_SIZE2 ? 0 : -EIO;
|
||||
}
|
||||
|
||||
return error;
|
||||
|
@ -5773,6 +5773,9 @@ static int bond_ethtool_get_ts_info(struct net_device *bond_dev,
|
||||
if (real_dev) {
|
||||
ret = ethtool_get_ts_info_by_layer(real_dev, info);
|
||||
} else {
|
||||
info->phc_index = -1;
|
||||
info->so_timestamping = SOF_TIMESTAMPING_RX_SOFTWARE |
|
||||
SOF_TIMESTAMPING_SOFTWARE;
|
||||
/* Check if all slaves support software tx timestamping */
|
||||
rcu_read_lock();
|
||||
bond_for_each_slave_rcu(bond, slave, iter) {
|
||||
|
@ -1618,11 +1618,20 @@ static int mcp251xfd_open(struct net_device *ndev)
|
||||
clear_bit(MCP251XFD_FLAGS_DOWN, priv->flags);
|
||||
can_rx_offload_enable(&priv->offload);
|
||||
|
||||
priv->wq = alloc_ordered_workqueue("%s-mcp251xfd_wq",
|
||||
WQ_FREEZABLE | WQ_MEM_RECLAIM,
|
||||
dev_name(&spi->dev));
|
||||
if (!priv->wq) {
|
||||
err = -ENOMEM;
|
||||
goto out_can_rx_offload_disable;
|
||||
}
|
||||
INIT_WORK(&priv->tx_work, mcp251xfd_tx_obj_write_sync);
|
||||
|
||||
err = request_threaded_irq(spi->irq, NULL, mcp251xfd_irq,
|
||||
IRQF_SHARED | IRQF_ONESHOT,
|
||||
dev_name(&spi->dev), priv);
|
||||
if (err)
|
||||
goto out_can_rx_offload_disable;
|
||||
goto out_destroy_workqueue;
|
||||
|
||||
err = mcp251xfd_chip_interrupts_enable(priv);
|
||||
if (err)
|
||||
@ -1634,6 +1643,8 @@ static int mcp251xfd_open(struct net_device *ndev)
|
||||
|
||||
out_free_irq:
|
||||
free_irq(spi->irq, priv);
|
||||
out_destroy_workqueue:
|
||||
destroy_workqueue(priv->wq);
|
||||
out_can_rx_offload_disable:
|
||||
can_rx_offload_disable(&priv->offload);
|
||||
set_bit(MCP251XFD_FLAGS_DOWN, priv->flags);
|
||||
@ -1661,6 +1672,7 @@ static int mcp251xfd_stop(struct net_device *ndev)
|
||||
hrtimer_cancel(&priv->tx_irq_timer);
|
||||
mcp251xfd_chip_interrupts_disable(priv);
|
||||
free_irq(ndev->irq, priv);
|
||||
destroy_workqueue(priv->wq);
|
||||
can_rx_offload_disable(&priv->offload);
|
||||
mcp251xfd_timestamp_stop(priv);
|
||||
mcp251xfd_chip_stop(priv, CAN_STATE_STOPPED);
|
||||
|
@ -131,6 +131,39 @@ mcp251xfd_tx_obj_from_skb(const struct mcp251xfd_priv *priv,
|
||||
tx_obj->xfer[0].len = len;
|
||||
}
|
||||
|
||||
static void mcp251xfd_tx_failure_drop(const struct mcp251xfd_priv *priv,
|
||||
struct mcp251xfd_tx_ring *tx_ring,
|
||||
int err)
|
||||
{
|
||||
struct net_device *ndev = priv->ndev;
|
||||
struct net_device_stats *stats = &ndev->stats;
|
||||
unsigned int frame_len = 0;
|
||||
u8 tx_head;
|
||||
|
||||
tx_ring->head--;
|
||||
stats->tx_dropped++;
|
||||
tx_head = mcp251xfd_get_tx_head(tx_ring);
|
||||
can_free_echo_skb(ndev, tx_head, &frame_len);
|
||||
netdev_completed_queue(ndev, 1, frame_len);
|
||||
netif_wake_queue(ndev);
|
||||
|
||||
if (net_ratelimit())
|
||||
netdev_err(priv->ndev, "ERROR in %s: %d\n", __func__, err);
|
||||
}
|
||||
|
||||
void mcp251xfd_tx_obj_write_sync(struct work_struct *work)
|
||||
{
|
||||
struct mcp251xfd_priv *priv = container_of(work, struct mcp251xfd_priv,
|
||||
tx_work);
|
||||
struct mcp251xfd_tx_obj *tx_obj = priv->tx_work_obj;
|
||||
struct mcp251xfd_tx_ring *tx_ring = priv->tx;
|
||||
int err;
|
||||
|
||||
err = spi_sync(priv->spi, &tx_obj->msg);
|
||||
if (err)
|
||||
mcp251xfd_tx_failure_drop(priv, tx_ring, err);
|
||||
}
|
||||
|
||||
static int mcp251xfd_tx_obj_write(const struct mcp251xfd_priv *priv,
|
||||
struct mcp251xfd_tx_obj *tx_obj)
|
||||
{
|
||||
@ -162,6 +195,11 @@ static bool mcp251xfd_tx_busy(const struct mcp251xfd_priv *priv,
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool mcp251xfd_work_busy(struct work_struct *work)
|
||||
{
|
||||
return work_busy(work);
|
||||
}
|
||||
|
||||
netdev_tx_t mcp251xfd_start_xmit(struct sk_buff *skb,
|
||||
struct net_device *ndev)
|
||||
{
|
||||
@ -175,7 +213,8 @@ netdev_tx_t mcp251xfd_start_xmit(struct sk_buff *skb,
|
||||
if (can_dev_dropped_skb(ndev, skb))
|
||||
return NETDEV_TX_OK;
|
||||
|
||||
if (mcp251xfd_tx_busy(priv, tx_ring))
|
||||
if (mcp251xfd_tx_busy(priv, tx_ring) ||
|
||||
mcp251xfd_work_busy(&priv->tx_work))
|
||||
return NETDEV_TX_BUSY;
|
||||
|
||||
tx_obj = mcp251xfd_get_tx_obj_next(tx_ring);
|
||||
@ -193,13 +232,13 @@ netdev_tx_t mcp251xfd_start_xmit(struct sk_buff *skb,
|
||||
netdev_sent_queue(priv->ndev, frame_len);
|
||||
|
||||
err = mcp251xfd_tx_obj_write(priv, tx_obj);
|
||||
if (err)
|
||||
goto out_err;
|
||||
|
||||
return NETDEV_TX_OK;
|
||||
|
||||
out_err:
|
||||
netdev_err(priv->ndev, "ERROR in %s: %d\n", __func__, err);
|
||||
if (err == -EBUSY) {
|
||||
netif_stop_queue(ndev);
|
||||
priv->tx_work_obj = tx_obj;
|
||||
queue_work(priv->wq, &priv->tx_work);
|
||||
} else if (err) {
|
||||
mcp251xfd_tx_failure_drop(priv, tx_ring, err);
|
||||
}
|
||||
|
||||
return NETDEV_TX_OK;
|
||||
}
|
||||
|
@ -633,6 +633,10 @@ struct mcp251xfd_priv {
|
||||
struct mcp251xfd_rx_ring *rx[MCP251XFD_FIFO_RX_NUM];
|
||||
struct mcp251xfd_tx_ring tx[MCP251XFD_FIFO_TX_NUM];
|
||||
|
||||
struct workqueue_struct *wq;
|
||||
struct work_struct tx_work;
|
||||
struct mcp251xfd_tx_obj *tx_work_obj;
|
||||
|
||||
DECLARE_BITMAP(flags, __MCP251XFD_FLAGS_SIZE__);
|
||||
|
||||
u8 rx_ring_num;
|
||||
@ -952,6 +956,7 @@ void mcp251xfd_skb_set_timestamp(const struct mcp251xfd_priv *priv,
|
||||
void mcp251xfd_timestamp_init(struct mcp251xfd_priv *priv);
|
||||
void mcp251xfd_timestamp_stop(struct mcp251xfd_priv *priv);
|
||||
|
||||
void mcp251xfd_tx_obj_write_sync(struct work_struct *work);
|
||||
netdev_tx_t mcp251xfd_start_xmit(struct sk_buff *skb,
|
||||
struct net_device *ndev);
|
||||
|
||||
|
@ -303,7 +303,7 @@ int kvaser_usb_send_cmd_async(struct kvaser_usb_net_priv *priv, void *cmd,
|
||||
}
|
||||
usb_free_urb(urb);
|
||||
|
||||
return 0;
|
||||
return err;
|
||||
}
|
||||
|
||||
int kvaser_usb_can_rx_over_error(struct net_device *netdev)
|
||||
|
@ -355,10 +355,8 @@ int ksz9477_reset_switch(struct ksz_device *dev)
|
||||
SPI_AUTO_EDGE_DETECTION, 0);
|
||||
|
||||
/* default configuration */
|
||||
ksz_read8(dev, REG_SW_LUE_CTRL_1, &data8);
|
||||
data8 = SW_AGING_ENABLE | SW_LINK_AUTO_AGING |
|
||||
SW_SRC_ADDR_FILTER | SW_FLUSH_STP_TABLE | SW_FLUSH_MSTP_TABLE;
|
||||
ksz_write8(dev, REG_SW_LUE_CTRL_1, data8);
|
||||
ksz_write8(dev, REG_SW_LUE_CTRL_1,
|
||||
SW_AGING_ENABLE | SW_LINK_AUTO_AGING | SW_SRC_ADDR_FILTER);
|
||||
|
||||
/* disable interrupts */
|
||||
ksz_write32(dev, REG_SW_INT_MASK__4, SWITCH_INT_MASK);
|
||||
@ -429,6 +427,57 @@ void ksz9477_freeze_mib(struct ksz_device *dev, int port, bool freeze)
|
||||
mutex_unlock(&p->mib.cnt_mutex);
|
||||
}
|
||||
|
||||
int ksz9477_errata_monitor(struct ksz_device *dev, int port,
|
||||
u64 tx_late_col)
|
||||
{
|
||||
u32 pmavbc;
|
||||
u8 status;
|
||||
u16 pqm;
|
||||
int ret;
|
||||
|
||||
ret = ksz_pread8(dev, port, REG_PORT_STATUS_0, &status);
|
||||
if (ret)
|
||||
return ret;
|
||||
if (!(FIELD_GET(PORT_INTF_SPEED_MASK, status) == PORT_INTF_SPEED_NONE) &&
|
||||
!(status & PORT_INTF_FULL_DUPLEX)) {
|
||||
/* Errata DS80000754 recommends monitoring potential faults in
|
||||
* half-duplex mode. The switch might not be able to communicate anymore
|
||||
* in these states.
|
||||
* If you see this message, please read the errata-sheet for more information:
|
||||
* https://ww1.microchip.com/downloads/aemDocuments/documents/UNG/ProductDocuments/Errata/KSZ9477S-Errata-DS80000754.pdf
|
||||
* To workaround this issue, half-duplex mode should be avoided.
|
||||
* A software reset could be implemented to recover from this state.
|
||||
*/
|
||||
dev_warn_once(dev->dev,
|
||||
"Half-duplex detected on port %d, transmission halt may occur\n",
|
||||
port);
|
||||
if (tx_late_col != 0) {
|
||||
/* Transmission halt with late collisions */
|
||||
dev_crit_once(dev->dev,
|
||||
"TX late collisions detected, transmission may be halted on port %d\n",
|
||||
port);
|
||||
}
|
||||
ret = ksz_read8(dev, REG_SW_LUE_CTRL_0, &status);
|
||||
if (ret)
|
||||
return ret;
|
||||
if (status & SW_VLAN_ENABLE) {
|
||||
ret = ksz_pread16(dev, port, REG_PORT_QM_TX_CNT_0__4, &pqm);
|
||||
if (ret)
|
||||
return ret;
|
||||
ret = ksz_read32(dev, REG_PMAVBC, &pmavbc);
|
||||
if (ret)
|
||||
return ret;
|
||||
if ((FIELD_GET(PMAVBC_MASK, pmavbc) <= PMAVBC_MIN) ||
|
||||
(FIELD_GET(PORT_QM_TX_CNT_M, pqm) >= PORT_QM_TX_CNT_MAX)) {
|
||||
/* Transmission halt with Half-Duplex and VLAN */
|
||||
dev_crit_once(dev->dev,
|
||||
"resources out of limits, transmission may be halted\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
void ksz9477_port_init_cnt(struct ksz_device *dev, int port)
|
||||
{
|
||||
struct ksz_port_mib *mib = &dev->ports[port].mib;
|
||||
@ -1299,6 +1348,10 @@ int ksz9477_setup(struct dsa_switch *ds)
|
||||
/* Enable REG_SW_MTU__2 reg by setting SW_JUMBO_PACKET */
|
||||
ksz_cfg(dev, REG_SW_MAC_CTRL_1, SW_JUMBO_PACKET, true);
|
||||
|
||||
/* Use collision based back pressure mode. */
|
||||
ksz_cfg(dev, REG_SW_MAC_CTRL_1, SW_BACK_PRESSURE,
|
||||
SW_BACK_PRESSURE_COLLISION);
|
||||
|
||||
/* Now we can configure default MTU value */
|
||||
ret = regmap_update_bits(ksz_regmap_16(dev), REG_SW_MTU__2, REG_SW_MTU_MASK,
|
||||
VLAN_ETH_FRAME_LEN + ETH_FCS_LEN);
|
||||
|
@ -36,6 +36,8 @@ int ksz9477_port_mirror_add(struct ksz_device *dev, int port,
|
||||
bool ingress, struct netlink_ext_ack *extack);
|
||||
void ksz9477_port_mirror_del(struct ksz_device *dev, int port,
|
||||
struct dsa_mall_mirror_tc_entry *mirror);
|
||||
int ksz9477_errata_monitor(struct ksz_device *dev, int port,
|
||||
u64 tx_late_col);
|
||||
void ksz9477_get_caps(struct ksz_device *dev, int port,
|
||||
struct phylink_config *config);
|
||||
int ksz9477_fdb_dump(struct ksz_device *dev, int port,
|
||||
|
@ -247,6 +247,7 @@
|
||||
#define REG_SW_MAC_CTRL_1 0x0331
|
||||
|
||||
#define SW_BACK_PRESSURE BIT(5)
|
||||
#define SW_BACK_PRESSURE_COLLISION 0
|
||||
#define FAIR_FLOW_CTRL BIT(4)
|
||||
#define NO_EXC_COLLISION_DROP BIT(3)
|
||||
#define SW_JUMBO_PACKET BIT(2)
|
||||
@ -842,8 +843,8 @@
|
||||
|
||||
#define REG_PORT_STATUS_0 0x0030
|
||||
|
||||
#define PORT_INTF_SPEED_M 0x3
|
||||
#define PORT_INTF_SPEED_S 3
|
||||
#define PORT_INTF_SPEED_MASK GENMASK(4, 3)
|
||||
#define PORT_INTF_SPEED_NONE GENMASK(1, 0)
|
||||
#define PORT_INTF_FULL_DUPLEX BIT(2)
|
||||
#define PORT_TX_FLOW_CTRL BIT(1)
|
||||
#define PORT_RX_FLOW_CTRL BIT(0)
|
||||
@ -1167,6 +1168,11 @@
|
||||
#define PORT_RMII_CLK_SEL BIT(7)
|
||||
#define PORT_MII_SEL_EDGE BIT(5)
|
||||
|
||||
#define REG_PMAVBC 0x03AC
|
||||
|
||||
#define PMAVBC_MASK GENMASK(26, 16)
|
||||
#define PMAVBC_MIN 0x580
|
||||
|
||||
/* 4 - MAC */
|
||||
#define REG_PORT_MAC_CTRL_0 0x0400
|
||||
|
||||
@ -1494,6 +1500,7 @@
|
||||
|
||||
#define PORT_QM_TX_CNT_USED_S 0
|
||||
#define PORT_QM_TX_CNT_M (BIT(11) - 1)
|
||||
#define PORT_QM_TX_CNT_MAX 0x200
|
||||
|
||||
#define REG_PORT_QM_TX_CNT_1__4 0x0A14
|
||||
|
||||
|
@ -1382,6 +1382,7 @@ const struct ksz_chip_data ksz_switch_chips[] = {
|
||||
.tc_cbs_supported = true,
|
||||
.ops = &ksz9477_dev_ops,
|
||||
.phylink_mac_ops = &ksz9477_phylink_mac_ops,
|
||||
.phy_errata_9477 = true,
|
||||
.mib_names = ksz9477_mib_names,
|
||||
.mib_cnt = ARRAY_SIZE(ksz9477_mib_names),
|
||||
.reg_mib_cnt = MIB_COUNTER_NUM,
|
||||
@ -1416,6 +1417,7 @@ const struct ksz_chip_data ksz_switch_chips[] = {
|
||||
.num_ipms = 8,
|
||||
.ops = &ksz9477_dev_ops,
|
||||
.phylink_mac_ops = &ksz9477_phylink_mac_ops,
|
||||
.phy_errata_9477 = true,
|
||||
.mib_names = ksz9477_mib_names,
|
||||
.mib_cnt = ARRAY_SIZE(ksz9477_mib_names),
|
||||
.reg_mib_cnt = MIB_COUNTER_NUM,
|
||||
@ -1450,6 +1452,7 @@ const struct ksz_chip_data ksz_switch_chips[] = {
|
||||
.num_ipms = 8,
|
||||
.ops = &ksz9477_dev_ops,
|
||||
.phylink_mac_ops = &ksz9477_phylink_mac_ops,
|
||||
.phy_errata_9477 = true,
|
||||
.mib_names = ksz9477_mib_names,
|
||||
.mib_cnt = ARRAY_SIZE(ksz9477_mib_names),
|
||||
.reg_mib_cnt = MIB_COUNTER_NUM,
|
||||
@ -1540,6 +1543,7 @@ const struct ksz_chip_data ksz_switch_chips[] = {
|
||||
.tc_cbs_supported = true,
|
||||
.ops = &ksz9477_dev_ops,
|
||||
.phylink_mac_ops = &ksz9477_phylink_mac_ops,
|
||||
.phy_errata_9477 = true,
|
||||
.mib_names = ksz9477_mib_names,
|
||||
.mib_cnt = ARRAY_SIZE(ksz9477_mib_names),
|
||||
.reg_mib_cnt = MIB_COUNTER_NUM,
|
||||
@ -1820,6 +1824,7 @@ void ksz_r_mib_stats64(struct ksz_device *dev, int port)
|
||||
struct rtnl_link_stats64 *stats;
|
||||
struct ksz_stats_raw *raw;
|
||||
struct ksz_port_mib *mib;
|
||||
int ret;
|
||||
|
||||
mib = &dev->ports[port].mib;
|
||||
stats = &mib->stats64;
|
||||
@ -1861,6 +1866,12 @@ void ksz_r_mib_stats64(struct ksz_device *dev, int port)
|
||||
pstats->rx_pause_frames = raw->rx_pause;
|
||||
|
||||
spin_unlock(&mib->stats64_lock);
|
||||
|
||||
if (dev->info->phy_errata_9477) {
|
||||
ret = ksz9477_errata_monitor(dev, port, raw->tx_late_col);
|
||||
if (ret)
|
||||
dev_err(dev->dev, "Failed to monitor transmission halt\n");
|
||||
}
|
||||
}
|
||||
|
||||
void ksz88xx_r_mib_stats64(struct ksz_device *dev, int port)
|
||||
@ -2185,7 +2196,7 @@ static void ksz_irq_bus_sync_unlock(struct irq_data *d)
|
||||
struct ksz_device *dev = kirq->dev;
|
||||
int ret;
|
||||
|
||||
ret = ksz_write32(dev, kirq->reg_mask, kirq->masked);
|
||||
ret = ksz_write8(dev, kirq->reg_mask, kirq->masked);
|
||||
if (ret)
|
||||
dev_err(dev->dev, "failed to change IRQ mask\n");
|
||||
|
||||
|
@ -66,6 +66,7 @@ struct ksz_chip_data {
|
||||
bool tc_cbs_supported;
|
||||
const struct ksz_dev_ops *ops;
|
||||
const struct phylink_mac_ops *phylink_mac_ops;
|
||||
bool phy_errata_9477;
|
||||
bool ksz87xx_eee_link_erratum;
|
||||
const struct ksz_mib_names *mib_names;
|
||||
int mib_cnt;
|
||||
|
@ -2482,6 +2482,18 @@ static netdev_tx_t ibmvnic_xmit(struct sk_buff *skb, struct net_device *netdev)
|
||||
(tx_pool->consumer_index + 1) % tx_pool->num_buffers;
|
||||
|
||||
tx_buff = &tx_pool->tx_buff[bufidx];
|
||||
|
||||
/* Sanity checks on our free map to make sure it points to an index
|
||||
* that is not being occupied by another skb. If skb memory is
|
||||
* not freed then we see congestion control kick in and halt tx.
|
||||
*/
|
||||
if (unlikely(tx_buff->skb)) {
|
||||
dev_warn_ratelimited(dev, "TX free map points to untracked skb (%s %d idx=%d)\n",
|
||||
skb_is_gso(skb) ? "tso_pool" : "tx_pool",
|
||||
queue_num, bufidx);
|
||||
dev_kfree_skb_any(tx_buff->skb);
|
||||
}
|
||||
|
||||
tx_buff->skb = skb;
|
||||
tx_buff->index = bufidx;
|
||||
tx_buff->pool_index = queue_num;
|
||||
@ -4061,6 +4073,12 @@ static void release_sub_crqs(struct ibmvnic_adapter *adapter, bool do_h_free)
|
||||
adapter->num_active_tx_scrqs = 0;
|
||||
}
|
||||
|
||||
/* Clean any remaining outstanding SKBs
|
||||
* we freed the irq so we won't be hearing
|
||||
* from them
|
||||
*/
|
||||
clean_tx_pools(adapter);
|
||||
|
||||
if (adapter->rx_scrq) {
|
||||
for (i = 0; i < adapter->num_active_rx_scrqs; i++) {
|
||||
if (!adapter->rx_scrq[i])
|
||||
|
@ -4139,7 +4139,7 @@ bool ice_is_wol_supported(struct ice_hw *hw)
|
||||
int ice_vsi_recfg_qs(struct ice_vsi *vsi, int new_rx, int new_tx, bool locked)
|
||||
{
|
||||
struct ice_pf *pf = vsi->back;
|
||||
int err = 0, timeout = 50;
|
||||
int i, err = 0, timeout = 50;
|
||||
|
||||
if (!new_rx && !new_tx)
|
||||
return -EINVAL;
|
||||
@ -4165,6 +4165,14 @@ int ice_vsi_recfg_qs(struct ice_vsi *vsi, int new_rx, int new_tx, bool locked)
|
||||
|
||||
ice_vsi_close(vsi);
|
||||
ice_vsi_rebuild(vsi, ICE_VSI_FLAG_NO_INIT);
|
||||
|
||||
ice_for_each_traffic_class(i) {
|
||||
if (vsi->tc_cfg.ena_tc & BIT(i))
|
||||
netdev_set_tc_queue(vsi->netdev,
|
||||
vsi->tc_cfg.tc_info[i].netdev_tc,
|
||||
vsi->tc_cfg.tc_info[i].qcount_tx,
|
||||
vsi->tc_cfg.tc_info[i].qoffset);
|
||||
}
|
||||
ice_pf_dcb_recfg(pf, locked);
|
||||
ice_vsi_open(vsi);
|
||||
done:
|
||||
|
@ -6907,6 +6907,7 @@ static int mvpp2_port_probe(struct platform_device *pdev,
|
||||
/* 9704 == 9728 - 20 and rounding to 8 */
|
||||
dev->max_mtu = MVPP2_BM_JUMBO_PKT_SIZE;
|
||||
device_set_node(&dev->dev, port_fwnode);
|
||||
dev->dev_port = port->id;
|
||||
|
||||
port->pcs_gmac.ops = &mvpp2_phylink_gmac_pcs_ops;
|
||||
port->pcs_gmac.neg_mode = true;
|
||||
|
@ -648,14 +648,14 @@ int otx2_txschq_config(struct otx2_nic *pfvf, int lvl, int prio, bool txschq_for
|
||||
} else if (lvl == NIX_TXSCH_LVL_TL4) {
|
||||
parent = schq_list[NIX_TXSCH_LVL_TL3][prio];
|
||||
req->reg[0] = NIX_AF_TL4X_PARENT(schq);
|
||||
req->regval[0] = parent << 16;
|
||||
req->regval[0] = (u64)parent << 16;
|
||||
req->num_regs++;
|
||||
req->reg[1] = NIX_AF_TL4X_SCHEDULE(schq);
|
||||
req->regval[1] = dwrr_val;
|
||||
} else if (lvl == NIX_TXSCH_LVL_TL3) {
|
||||
parent = schq_list[NIX_TXSCH_LVL_TL2][prio];
|
||||
req->reg[0] = NIX_AF_TL3X_PARENT(schq);
|
||||
req->regval[0] = parent << 16;
|
||||
req->regval[0] = (u64)parent << 16;
|
||||
req->num_regs++;
|
||||
req->reg[1] = NIX_AF_TL3X_SCHEDULE(schq);
|
||||
req->regval[1] = dwrr_val;
|
||||
@ -670,11 +670,11 @@ int otx2_txschq_config(struct otx2_nic *pfvf, int lvl, int prio, bool txschq_for
|
||||
} else if (lvl == NIX_TXSCH_LVL_TL2) {
|
||||
parent = schq_list[NIX_TXSCH_LVL_TL1][prio];
|
||||
req->reg[0] = NIX_AF_TL2X_PARENT(schq);
|
||||
req->regval[0] = parent << 16;
|
||||
req->regval[0] = (u64)parent << 16;
|
||||
|
||||
req->num_regs++;
|
||||
req->reg[1] = NIX_AF_TL2X_SCHEDULE(schq);
|
||||
req->regval[1] = TXSCH_TL1_DFLT_RR_PRIO << 24 | dwrr_val;
|
||||
req->regval[1] = (u64)hw->txschq_aggr_lvl_rr_prio << 24 | dwrr_val;
|
||||
|
||||
if (lvl == hw->txschq_link_cfg_lvl) {
|
||||
req->num_regs++;
|
||||
@ -698,7 +698,7 @@ int otx2_txschq_config(struct otx2_nic *pfvf, int lvl, int prio, bool txschq_for
|
||||
|
||||
req->num_regs++;
|
||||
req->reg[1] = NIX_AF_TL1X_TOPOLOGY(schq);
|
||||
req->regval[1] = (TXSCH_TL1_DFLT_RR_PRIO << 1);
|
||||
req->regval[1] = hw->txschq_aggr_lvl_rr_prio << 1;
|
||||
|
||||
req->num_regs++;
|
||||
req->reg[2] = NIX_AF_TL1X_CIR(schq);
|
||||
|
@ -139,33 +139,34 @@
|
||||
#define NIX_LF_CINTX_ENA_W1C(a) (NIX_LFBASE | 0xD50 | (a) << 12)
|
||||
|
||||
/* NIX AF transmit scheduler registers */
|
||||
#define NIX_AF_SMQX_CFG(a) (0x700 | (a) << 16)
|
||||
#define NIX_AF_TL1X_SCHEDULE(a) (0xC00 | (a) << 16)
|
||||
#define NIX_AF_TL1X_CIR(a) (0xC20 | (a) << 16)
|
||||
#define NIX_AF_TL1X_TOPOLOGY(a) (0xC80 | (a) << 16)
|
||||
#define NIX_AF_TL2X_PARENT(a) (0xE88 | (a) << 16)
|
||||
#define NIX_AF_TL2X_SCHEDULE(a) (0xE00 | (a) << 16)
|
||||
#define NIX_AF_TL2X_TOPOLOGY(a) (0xE80 | (a) << 16)
|
||||
#define NIX_AF_TL2X_CIR(a) (0xE20 | (a) << 16)
|
||||
#define NIX_AF_TL2X_PIR(a) (0xE30 | (a) << 16)
|
||||
#define NIX_AF_TL3X_PARENT(a) (0x1088 | (a) << 16)
|
||||
#define NIX_AF_TL3X_SCHEDULE(a) (0x1000 | (a) << 16)
|
||||
#define NIX_AF_TL3X_SHAPE(a) (0x1010 | (a) << 16)
|
||||
#define NIX_AF_TL3X_CIR(a) (0x1020 | (a) << 16)
|
||||
#define NIX_AF_TL3X_PIR(a) (0x1030 | (a) << 16)
|
||||
#define NIX_AF_TL3X_TOPOLOGY(a) (0x1080 | (a) << 16)
|
||||
#define NIX_AF_TL4X_PARENT(a) (0x1288 | (a) << 16)
|
||||
#define NIX_AF_TL4X_SCHEDULE(a) (0x1200 | (a) << 16)
|
||||
#define NIX_AF_TL4X_SHAPE(a) (0x1210 | (a) << 16)
|
||||
#define NIX_AF_TL4X_CIR(a) (0x1220 | (a) << 16)
|
||||
#define NIX_AF_TL4X_PIR(a) (0x1230 | (a) << 16)
|
||||
#define NIX_AF_TL4X_TOPOLOGY(a) (0x1280 | (a) << 16)
|
||||
#define NIX_AF_MDQX_SCHEDULE(a) (0x1400 | (a) << 16)
|
||||
#define NIX_AF_MDQX_SHAPE(a) (0x1410 | (a) << 16)
|
||||
#define NIX_AF_MDQX_CIR(a) (0x1420 | (a) << 16)
|
||||
#define NIX_AF_MDQX_PIR(a) (0x1430 | (a) << 16)
|
||||
#define NIX_AF_MDQX_PARENT(a) (0x1480 | (a) << 16)
|
||||
#define NIX_AF_TL3_TL2X_LINKX_CFG(a, b) (0x1700 | (a) << 16 | (b) << 3)
|
||||
#define NIX_AF_SMQX_CFG(a) (0x700 | (u64)(a) << 16)
|
||||
#define NIX_AF_TL4X_SDP_LINK_CFG(a) (0xB10 | (u64)(a) << 16)
|
||||
#define NIX_AF_TL1X_SCHEDULE(a) (0xC00 | (u64)(a) << 16)
|
||||
#define NIX_AF_TL1X_CIR(a) (0xC20 | (u64)(a) << 16)
|
||||
#define NIX_AF_TL1X_TOPOLOGY(a) (0xC80 | (u64)(a) << 16)
|
||||
#define NIX_AF_TL2X_PARENT(a) (0xE88 | (u64)(a) << 16)
|
||||
#define NIX_AF_TL2X_SCHEDULE(a) (0xE00 | (u64)(a) << 16)
|
||||
#define NIX_AF_TL2X_TOPOLOGY(a) (0xE80 | (u64)(a) << 16)
|
||||
#define NIX_AF_TL2X_CIR(a) (0xE20 | (u64)(a) << 16)
|
||||
#define NIX_AF_TL2X_PIR(a) (0xE30 | (u64)(a) << 16)
|
||||
#define NIX_AF_TL3X_PARENT(a) (0x1088 | (u64)(a) << 16)
|
||||
#define NIX_AF_TL3X_SCHEDULE(a) (0x1000 | (u64)(a) << 16)
|
||||
#define NIX_AF_TL3X_SHAPE(a) (0x1010 | (u64)(a) << 16)
|
||||
#define NIX_AF_TL3X_CIR(a) (0x1020 | (u64)(a) << 16)
|
||||
#define NIX_AF_TL3X_PIR(a) (0x1030 | (u64)(a) << 16)
|
||||
#define NIX_AF_TL3X_TOPOLOGY(a) (0x1080 | (u64)(a) << 16)
|
||||
#define NIX_AF_TL4X_PARENT(a) (0x1288 | (u64)(a) << 16)
|
||||
#define NIX_AF_TL4X_SCHEDULE(a) (0x1200 | (u64)(a) << 16)
|
||||
#define NIX_AF_TL4X_SHAPE(a) (0x1210 | (u64)(a) << 16)
|
||||
#define NIX_AF_TL4X_CIR(a) (0x1220 | (u64)(a) << 16)
|
||||
#define NIX_AF_TL4X_PIR(a) (0x1230 | (u64)(a) << 16)
|
||||
#define NIX_AF_TL4X_TOPOLOGY(a) (0x1280 | (u64)(a) << 16)
|
||||
#define NIX_AF_MDQX_SCHEDULE(a) (0x1400 | (u64)(a) << 16)
|
||||
#define NIX_AF_MDQX_SHAPE(a) (0x1410 | (u64)(a) << 16)
|
||||
#define NIX_AF_MDQX_CIR(a) (0x1420 | (u64)(a) << 16)
|
||||
#define NIX_AF_MDQX_PIR(a) (0x1430 | (u64)(a) << 16)
|
||||
#define NIX_AF_MDQX_PARENT(a) (0x1480 | (u64)(a) << 16)
|
||||
#define NIX_AF_TL3_TL2X_LINKX_CFG(a, b) (0x1700 | (u64)(a) << 16 | (b) << 3)
|
||||
|
||||
/* LMT LF registers */
|
||||
#define LMT_LFBASE BIT_ULL(RVU_FUNC_BLKADDR_SHIFT)
|
||||
|
@ -513,7 +513,7 @@ process_cqe:
|
||||
|
||||
static void otx2_adjust_adaptive_coalese(struct otx2_nic *pfvf, struct otx2_cq_poll *cq_poll)
|
||||
{
|
||||
struct dim_sample dim_sample;
|
||||
struct dim_sample dim_sample = { 0 };
|
||||
u64 rx_frames, rx_bytes;
|
||||
u64 tx_frames, tx_bytes;
|
||||
|
||||
|
@ -153,7 +153,6 @@ static void __otx2_qos_txschq_cfg(struct otx2_nic *pfvf,
|
||||
num_regs++;
|
||||
|
||||
otx2_config_sched_shaping(pfvf, node, cfg, &num_regs);
|
||||
|
||||
} else if (level == NIX_TXSCH_LVL_TL4) {
|
||||
otx2_config_sched_shaping(pfvf, node, cfg, &num_regs);
|
||||
} else if (level == NIX_TXSCH_LVL_TL3) {
|
||||
@ -176,7 +175,7 @@ static void __otx2_qos_txschq_cfg(struct otx2_nic *pfvf,
|
||||
/* check if node is root */
|
||||
if (node->qid == OTX2_QOS_QID_INNER && !node->parent) {
|
||||
cfg->reg[num_regs] = NIX_AF_TL2X_SCHEDULE(node->schq);
|
||||
cfg->regval[num_regs] = TXSCH_TL1_DFLT_RR_PRIO << 24 |
|
||||
cfg->regval[num_regs] = (u64)hw->txschq_aggr_lvl_rr_prio << 24 |
|
||||
mtu_to_dwrr_weight(pfvf,
|
||||
pfvf->tx_max_pktlen);
|
||||
num_regs++;
|
||||
|
@ -1779,18 +1779,25 @@ static int mlxsw_pci_sys_ready_wait(struct mlxsw_pci *mlxsw_pci,
|
||||
return -EBUSY;
|
||||
}
|
||||
|
||||
static int mlxsw_pci_reset_at_pci_disable(struct mlxsw_pci *mlxsw_pci)
|
||||
static int mlxsw_pci_reset_at_pci_disable(struct mlxsw_pci *mlxsw_pci,
|
||||
bool pci_reset_sbr_supported)
|
||||
{
|
||||
struct pci_dev *pdev = mlxsw_pci->pdev;
|
||||
char mrsr_pl[MLXSW_REG_MRSR_LEN];
|
||||
int err;
|
||||
|
||||
if (!pci_reset_sbr_supported) {
|
||||
pci_dbg(pdev, "Performing PCI hot reset instead of \"all reset\"\n");
|
||||
goto sbr;
|
||||
}
|
||||
|
||||
mlxsw_reg_mrsr_pack(mrsr_pl,
|
||||
MLXSW_REG_MRSR_COMMAND_RESET_AT_PCI_DISABLE);
|
||||
err = mlxsw_reg_write(mlxsw_pci->core, MLXSW_REG(mrsr), mrsr_pl);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
sbr:
|
||||
device_lock_assert(&pdev->dev);
|
||||
|
||||
pci_cfg_access_lock(pdev);
|
||||
@ -1818,6 +1825,7 @@ static int
|
||||
mlxsw_pci_reset(struct mlxsw_pci *mlxsw_pci, const struct pci_device_id *id)
|
||||
{
|
||||
struct pci_dev *pdev = mlxsw_pci->pdev;
|
||||
bool pci_reset_sbr_supported = false;
|
||||
char mcam_pl[MLXSW_REG_MCAM_LEN];
|
||||
bool pci_reset_supported = false;
|
||||
u32 sys_status;
|
||||
@ -1837,13 +1845,17 @@ mlxsw_pci_reset(struct mlxsw_pci *mlxsw_pci, const struct pci_device_id *id)
|
||||
mlxsw_reg_mcam_pack(mcam_pl,
|
||||
MLXSW_REG_MCAM_FEATURE_GROUP_ENHANCED_FEATURES);
|
||||
err = mlxsw_reg_query(mlxsw_pci->core, MLXSW_REG(mcam), mcam_pl);
|
||||
if (!err)
|
||||
if (!err) {
|
||||
mlxsw_reg_mcam_unpack(mcam_pl, MLXSW_REG_MCAM_PCI_RESET,
|
||||
&pci_reset_supported);
|
||||
mlxsw_reg_mcam_unpack(mcam_pl, MLXSW_REG_MCAM_PCI_RESET_SBR,
|
||||
&pci_reset_sbr_supported);
|
||||
}
|
||||
|
||||
if (pci_reset_supported) {
|
||||
pci_dbg(pdev, "Starting PCI reset flow\n");
|
||||
err = mlxsw_pci_reset_at_pci_disable(mlxsw_pci);
|
||||
err = mlxsw_pci_reset_at_pci_disable(mlxsw_pci,
|
||||
pci_reset_sbr_supported);
|
||||
} else {
|
||||
pci_dbg(pdev, "Starting software reset flow\n");
|
||||
err = mlxsw_pci_reset_sw(mlxsw_pci);
|
||||
|
@ -10671,6 +10671,8 @@ enum mlxsw_reg_mcam_mng_feature_cap_mask_bits {
|
||||
MLXSW_REG_MCAM_MCIA_128B = 34,
|
||||
/* If set, MRSR.command=6 is supported. */
|
||||
MLXSW_REG_MCAM_PCI_RESET = 48,
|
||||
/* If set, MRSR.command=6 is supported with Secondary Bus Reset. */
|
||||
MLXSW_REG_MCAM_PCI_RESET_SBR = 67,
|
||||
};
|
||||
|
||||
#define MLXSW_REG_BYTES_PER_DWORD 0x4
|
||||
|
@ -1611,8 +1611,8 @@ static void mlxsw_sp_sb_sr_occ_query_cb(struct mlxsw_core *mlxsw_core,
|
||||
int mlxsw_sp_sb_occ_snapshot(struct mlxsw_core *mlxsw_core,
|
||||
unsigned int sb_index)
|
||||
{
|
||||
u16 local_port, local_port_1, first_local_port, last_local_port;
|
||||
struct mlxsw_sp *mlxsw_sp = mlxsw_core_driver_priv(mlxsw_core);
|
||||
u16 local_port, local_port_1, last_local_port;
|
||||
struct mlxsw_sp_sb_sr_occ_query_cb_ctx cb_ctx;
|
||||
u8 masked_count, current_page = 0;
|
||||
unsigned long cb_priv = 0;
|
||||
@ -1632,6 +1632,7 @@ next_batch:
|
||||
masked_count = 0;
|
||||
mlxsw_reg_sbsr_pack(sbsr_pl, false);
|
||||
mlxsw_reg_sbsr_port_page_set(sbsr_pl, current_page);
|
||||
first_local_port = current_page * MLXSW_REG_SBSR_NUM_PORTS_IN_PAGE;
|
||||
last_local_port = current_page * MLXSW_REG_SBSR_NUM_PORTS_IN_PAGE +
|
||||
MLXSW_REG_SBSR_NUM_PORTS_IN_PAGE - 1;
|
||||
|
||||
@ -1649,9 +1650,12 @@ next_batch:
|
||||
if (local_port != MLXSW_PORT_CPU_PORT) {
|
||||
/* Ingress quotas are not supported for the CPU port */
|
||||
mlxsw_reg_sbsr_ingress_port_mask_set(sbsr_pl,
|
||||
local_port, 1);
|
||||
local_port - first_local_port,
|
||||
1);
|
||||
}
|
||||
mlxsw_reg_sbsr_egress_port_mask_set(sbsr_pl, local_port, 1);
|
||||
mlxsw_reg_sbsr_egress_port_mask_set(sbsr_pl,
|
||||
local_port - first_local_port,
|
||||
1);
|
||||
for (i = 0; i < mlxsw_sp->sb_vals->pool_count; i++) {
|
||||
err = mlxsw_sp_sb_pm_occ_query(mlxsw_sp, local_port, i,
|
||||
&bulk_list);
|
||||
@ -1688,7 +1692,7 @@ int mlxsw_sp_sb_occ_max_clear(struct mlxsw_core *mlxsw_core,
|
||||
unsigned int sb_index)
|
||||
{
|
||||
struct mlxsw_sp *mlxsw_sp = mlxsw_core_driver_priv(mlxsw_core);
|
||||
u16 local_port, last_local_port;
|
||||
u16 local_port, first_local_port, last_local_port;
|
||||
LIST_HEAD(bulk_list);
|
||||
unsigned int masked_count;
|
||||
u8 current_page = 0;
|
||||
@ -1706,6 +1710,7 @@ next_batch:
|
||||
masked_count = 0;
|
||||
mlxsw_reg_sbsr_pack(sbsr_pl, true);
|
||||
mlxsw_reg_sbsr_port_page_set(sbsr_pl, current_page);
|
||||
first_local_port = current_page * MLXSW_REG_SBSR_NUM_PORTS_IN_PAGE;
|
||||
last_local_port = current_page * MLXSW_REG_SBSR_NUM_PORTS_IN_PAGE +
|
||||
MLXSW_REG_SBSR_NUM_PORTS_IN_PAGE - 1;
|
||||
|
||||
@ -1723,9 +1728,12 @@ next_batch:
|
||||
if (local_port != MLXSW_PORT_CPU_PORT) {
|
||||
/* Ingress quotas are not supported for the CPU port */
|
||||
mlxsw_reg_sbsr_ingress_port_mask_set(sbsr_pl,
|
||||
local_port, 1);
|
||||
local_port - first_local_port,
|
||||
1);
|
||||
}
|
||||
mlxsw_reg_sbsr_egress_port_mask_set(sbsr_pl, local_port, 1);
|
||||
mlxsw_reg_sbsr_egress_port_mask_set(sbsr_pl,
|
||||
local_port - first_local_port,
|
||||
1);
|
||||
for (i = 0; i < mlxsw_sp->sb_vals->pool_count; i++) {
|
||||
err = mlxsw_sp_sb_pm_occ_clear(mlxsw_sp, local_port, i,
|
||||
&bulk_list);
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user