Linux 6.18-rc6

-----BEGIN PGP SIGNATURE-----
 
 iQFSBAABCgA8FiEEq68RxlopcLEwq+PEeb4+QwBBGIYFAmkaT2IeHHRvcnZhbGRz
 QGxpbnV4LWZvdW5kYXRpb24ub3JnAAoJEHm+PkMAQRiGnakIAIq6O35+abAlDGe7
 n8IwX/4hwDJ9Ol2vddg6jTdio3szSlvcXRAyijkG35etLap+i+Q78Q9H1fRcQ8CF
 5t9kfs5oCVWEDlsHMI+Q38vYB3tWikaIUIuao6pH5U50fsA0KM/287TLYdzvmBsK
 gy0BHoZhl++xdMsD2HNwt08RrK/IyY+Zp9i7pKhcsxJiJCgy8nq5ZxhmRPbqTKNc
 IqIBPzG+UYcOd88Iz377Ax+TnzWaTpwyvfaiU8DVFMN0FeENdk1FY8ClYfpYxCDH
 Pm5NzL/f54VtdZ3aL1fKmYwWN7WFJT4FH3l6DOvtCc+Gx3KW1a3Y508CbqYBXvgY
 QV4oH4Y=
 =iSoY
 -----END PGP SIGNATURE-----

Merge tag 'v6.18-rc6' into drm-next

Linux 6.18-rc6

Backmerge in order to merge msm next

Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
Dave Airlie 2025-11-21 08:55:08 +10:00
commit ce0478b02e
912 changed files with 10408 additions and 4616 deletions

View File

@ -27,6 +27,7 @@ Alan Cox <alan@lxorguk.ukuu.org.uk>
Alan Cox <root@hraefn.swansea.linux.org.uk> Alan Cox <root@hraefn.swansea.linux.org.uk>
Aleksandar Markovic <aleksandar.markovic@mips.com> <aleksandar.markovic@imgtec.com> Aleksandar Markovic <aleksandar.markovic@mips.com> <aleksandar.markovic@imgtec.com>
Aleksey Gorelov <aleksey_gorelov@phoenix.com> Aleksey Gorelov <aleksey_gorelov@phoenix.com>
Alex Williamson <alex@shazbot.org> <alex.williamson@redhat.com>
Alexander Lobakin <alobakin@pm.me> <alobakin@dlink.ru> Alexander Lobakin <alobakin@pm.me> <alobakin@dlink.ru>
Alexander Lobakin <alobakin@pm.me> <alobakin@marvell.com> Alexander Lobakin <alobakin@pm.me> <alobakin@marvell.com>
Alexander Lobakin <alobakin@pm.me> <bloodyreaper@yandex.ru> Alexander Lobakin <alobakin@pm.me> <bloodyreaper@yandex.ru>
@ -206,6 +207,7 @@ Danilo Krummrich <dakr@kernel.org> <dakr@redhat.com>
David Brownell <david-b@pacbell.net> David Brownell <david-b@pacbell.net>
David Collins <quic_collinsd@quicinc.com> <collinsd@codeaurora.org> David Collins <quic_collinsd@quicinc.com> <collinsd@codeaurora.org>
David Heidelberg <david@ixit.cz> <d.okias@gmail.com> David Heidelberg <david@ixit.cz> <d.okias@gmail.com>
David Hildenbrand <david@kernel.org> <david@redhat.com>
David Rheinsberg <david@readahead.eu> <dh.herrmann@gmail.com> David Rheinsberg <david@readahead.eu> <dh.herrmann@gmail.com>
David Rheinsberg <david@readahead.eu> <dh.herrmann@googlemail.com> David Rheinsberg <david@readahead.eu> <dh.herrmann@googlemail.com>
David Rheinsberg <david@readahead.eu> <david.rheinsberg@gmail.com> David Rheinsberg <david@readahead.eu> <david.rheinsberg@gmail.com>
@ -426,7 +428,7 @@ Kenneth W Chen <kenneth.w.chen@intel.com>
Kenneth Westfield <quic_kwestfie@quicinc.com> <kwestfie@codeaurora.org> Kenneth Westfield <quic_kwestfie@quicinc.com> <kwestfie@codeaurora.org>
Kiran Gunda <quic_kgunda@quicinc.com> <kgunda@codeaurora.org> Kiran Gunda <quic_kgunda@quicinc.com> <kgunda@codeaurora.org>
Kirill Tkhai <tkhai@ya.ru> <ktkhai@virtuozzo.com> Kirill Tkhai <tkhai@ya.ru> <ktkhai@virtuozzo.com>
Kirill A. Shutemov <kas@kernel.org> <kirill.shutemov@linux.intel.com> Kiryl Shutsemau <kas@kernel.org> <kirill.shutemov@linux.intel.com>
Kishon Vijay Abraham I <kishon@kernel.org> <kishon@ti.com> Kishon Vijay Abraham I <kishon@kernel.org> <kishon@ti.com>
Konrad Dybcio <konradybcio@kernel.org> <konrad.dybcio@linaro.org> Konrad Dybcio <konradybcio@kernel.org> <konrad.dybcio@linaro.org>
Konrad Dybcio <konradybcio@kernel.org> <konrad.dybcio@somainline.org> Konrad Dybcio <konradybcio@kernel.org> <konrad.dybcio@somainline.org>
@ -605,7 +607,8 @@ Oleksij Rempel <o.rempel@pengutronix.de>
Oleksij Rempel <o.rempel@pengutronix.de> <ore@pengutronix.de> Oleksij Rempel <o.rempel@pengutronix.de> <ore@pengutronix.de>
Oliver Hartkopp <socketcan@hartkopp.net> <oliver.hartkopp@volkswagen.de> Oliver Hartkopp <socketcan@hartkopp.net> <oliver.hartkopp@volkswagen.de>
Oliver Hartkopp <socketcan@hartkopp.net> <oliver@hartkopp.net> Oliver Hartkopp <socketcan@hartkopp.net> <oliver@hartkopp.net>
Oliver Upton <oliver.upton@linux.dev> <oupton@google.com> Oliver Upton <oupton@kernel.org> <oupton@google.com>
Oliver Upton <oupton@kernel.org> <oliver.upton@linux.dev>
Ondřej Jirman <megi@xff.cz> <megous@megous.com> Ondřej Jirman <megi@xff.cz> <megous@megous.com>
Oza Pawandeep <quic_poza@quicinc.com> <poza@codeaurora.org> Oza Pawandeep <quic_poza@quicinc.com> <poza@codeaurora.org>
Pali Rohár <pali@kernel.org> <pali.rohar@gmail.com> Pali Rohár <pali@kernel.org> <pali.rohar@gmail.com>
@ -644,6 +647,7 @@ Qais Yousef <qyousef@layalina.io> <qais.yousef@arm.com>
Quentin Monnet <qmo@kernel.org> <quentin.monnet@netronome.com> Quentin Monnet <qmo@kernel.org> <quentin.monnet@netronome.com>
Quentin Monnet <qmo@kernel.org> <quentin@isovalent.com> Quentin Monnet <qmo@kernel.org> <quentin@isovalent.com>
Quentin Perret <qperret@qperret.net> <quentin.perret@arm.com> Quentin Perret <qperret@qperret.net> <quentin.perret@arm.com>
Rae Moar <raemoar63@gmail.com> <rmoar@google.com>
Rafael J. Wysocki <rjw@rjwysocki.net> <rjw@sisk.pl> Rafael J. Wysocki <rjw@rjwysocki.net> <rjw@sisk.pl>
Rajeev Nandan <quic_rajeevny@quicinc.com> <rajeevny@codeaurora.org> Rajeev Nandan <quic_rajeevny@quicinc.com> <rajeevny@codeaurora.org>
Rajendra Nayak <quic_rjendra@quicinc.com> <rnayak@codeaurora.org> Rajendra Nayak <quic_rjendra@quicinc.com> <rnayak@codeaurora.org>

View File

@ -2036,6 +2036,10 @@ S: Botanicka' 68a
S: 602 00 Brno S: 602 00 Brno
S: Czech Republic S: Czech Republic
N: Karsten Keil
E: isdn@linux-pingi.de
D: ISDN subsystem maintainer
N: Jakob Kemi N: Jakob Kemi
E: jakob.kemi@telia.com E: jakob.kemi@telia.com
D: V4L W9966 Webcam driver D: V4L W9966 Webcam driver

View File

@ -1,7 +1,7 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2 %YAML 1.2
--- ---
$id: http://devicetree.org/schemas/ti,twl4030-gpio.yaml# $id: http://devicetree.org/schemas/gpio/ti,twl4030-gpio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml#
title: TI TWL4030 GPIO controller title: TI TWL4030 GPIO controller

View File

@ -180,9 +180,9 @@ allOf:
then: then:
properties: properties:
reg: reg:
minItems: 2 maxItems: 2
reg-names: reg-names:
minItems: 2 maxItems: 2
else: else:
properties: properties:
reg: reg:

View File

@ -142,7 +142,9 @@ allOf:
required: required:
- orientation-switch - orientation-switch
then: then:
$ref: /schemas/usb/usb-switch.yaml# allOf:
- $ref: /schemas/usb/usb-switch.yaml#
- $ref: /schemas/usb/usb-switch-ports.yaml#
unevaluatedProperties: false unevaluatedProperties: false

View File

@ -24,6 +24,10 @@ properties:
- enum: - enum:
- qcom,qcs8300-qmp-ufs-phy - qcom,qcs8300-qmp-ufs-phy
- const: qcom,sa8775p-qmp-ufs-phy - const: qcom,sa8775p-qmp-ufs-phy
- items:
- enum:
- qcom,kaanapali-qmp-ufs-phy
- const: qcom,sm8750-qmp-ufs-phy
- enum: - enum:
- qcom,msm8996-qmp-ufs-phy - qcom,msm8996-qmp-ufs-phy
- qcom,msm8998-qmp-ufs-phy - qcom,msm8998-qmp-ufs-phy

View File

@ -125,7 +125,9 @@ allOf:
contains: contains:
const: google,gs101-usb31drd-phy const: google,gs101-usb31drd-phy
then: then:
$ref: /schemas/usb/usb-switch.yaml# allOf:
- $ref: /schemas/usb/usb-switch.yaml#
- $ref: /schemas/usb/usb-switch-ports.yaml#
properties: properties:
clocks: clocks:

View File

@ -197,6 +197,7 @@ allOf:
- renesas,rcar-gen2-scif - renesas,rcar-gen2-scif
- renesas,rcar-gen3-scif - renesas,rcar-gen3-scif
- renesas,rcar-gen4-scif - renesas,rcar-gen4-scif
- renesas,rcar-gen5-scif
then: then:
properties: properties:
interrupts: interrupts:

View File

@ -32,7 +32,7 @@ properties:
$ref: /schemas/types.yaml#/definitions/uint32-array $ref: /schemas/types.yaml#/definitions/uint32-array
minItems: 2 minItems: 2
maxItems: 2 maxItems: 4
items: items:
enum: [1, 2, 3, 4] enum: [1, 2, 3, 4]
@ -48,7 +48,7 @@ properties:
$ref: /schemas/types.yaml#/definitions/uint32-array $ref: /schemas/types.yaml#/definitions/uint32-array
minItems: 2 minItems: 2
maxItems: 2 maxItems: 5
items: items:
enum: [1, 2, 3, 4, 5] enum: [1, 2, 3, 4, 5]

View File

@ -14,9 +14,14 @@ allOf:
properties: properties:
compatible: compatible:
enum: oneOf:
- cdns,spi-r1p6 - enum:
- xlnx,zynq-spi-r1p6 - xlnx,zynq-spi-r1p6
- items:
- enum:
- xlnx,zynqmp-spi-r1p6
- xlnx,versal-net-spi-r1p6
- const: cdns,spi-r1p6
reg: reg:
maxItems: 1 maxItems: 1

View File

@ -34,6 +34,7 @@ properties:
- rockchip,rk3328-spi - rockchip,rk3328-spi
- rockchip,rk3368-spi - rockchip,rk3368-spi
- rockchip,rk3399-spi - rockchip,rk3399-spi
- rockchip,rk3506-spi
- rockchip,rk3528-spi - rockchip,rk3528-spi
- rockchip,rk3562-spi - rockchip,rk3562-spi
- rockchip,rk3568-spi - rockchip,rk3568-spi

View File

@ -15,6 +15,7 @@ select:
compatible: compatible:
contains: contains:
enum: enum:
- qcom,kaanapali-ufshc
- qcom,sm8650-ufshc - qcom,sm8650-ufshc
- qcom,sm8750-ufshc - qcom,sm8750-ufshc
required: required:
@ -24,6 +25,7 @@ properties:
compatible: compatible:
items: items:
- enum: - enum:
- qcom,kaanapali-ufshc
- qcom,sm8650-ufshc - qcom,sm8650-ufshc
- qcom,sm8750-ufshc - qcom,sm8750-ufshc
- const: qcom,ufshc - const: qcom,ufshc

View File

@ -76,6 +76,7 @@ required:
allOf: allOf:
- $ref: usb-switch.yaml# - $ref: usb-switch.yaml#
- $ref: usb-switch-ports.yaml#
additionalProperties: false additionalProperties: false

View File

@ -89,13 +89,21 @@ required:
- reg - reg
- "#address-cells" - "#address-cells"
- "#size-cells" - "#size-cells"
- dma-ranges
- ranges - ranges
- clocks - clocks
- clock-names - clock-names
- interrupts - interrupts
- power-domains - power-domains
allOf:
- if:
properties:
compatible:
const: fsl,imx8mp-dwc3
then:
required:
- dma-ranges
additionalProperties: false additionalProperties: false
examples: examples:

View File

@ -52,6 +52,7 @@ required:
allOf: allOf:
- $ref: usb-switch.yaml# - $ref: usb-switch.yaml#
- $ref: usb-switch-ports.yaml#
- if: - if:
required: required:
- mode-switch - mode-switch

View File

@ -46,6 +46,7 @@ required:
allOf: allOf:
- $ref: usb-switch.yaml# - $ref: usb-switch.yaml#
- $ref: usb-switch-ports.yaml#
additionalProperties: false additionalProperties: false

View File

@ -91,6 +91,7 @@ required:
allOf: allOf:
- $ref: usb-switch.yaml# - $ref: usb-switch.yaml#
- $ref: usb-switch-ports.yaml#
additionalProperties: false additionalProperties: false

View File

@ -81,6 +81,7 @@ required:
allOf: allOf:
- $ref: usb-switch.yaml# - $ref: usb-switch.yaml#
- $ref: usb-switch-ports.yaml#
additionalProperties: false additionalProperties: false

View File

@ -68,6 +68,7 @@ properties:
- qcom,sm8550-dwc3 - qcom,sm8550-dwc3
- qcom,sm8650-dwc3 - qcom,sm8650-dwc3
- qcom,x1e80100-dwc3 - qcom,x1e80100-dwc3
- qcom,x1e80100-dwc3-mp
- const: qcom,snps-dwc3 - const: qcom,snps-dwc3
reg: reg:
@ -460,8 +461,10 @@ allOf:
then: then:
properties: properties:
interrupts: interrupts:
minItems: 4
maxItems: 5 maxItems: 5
interrupt-names: interrupt-names:
minItems: 4
items: items:
- const: dwc_usb3 - const: dwc_usb3
- const: pwr_event - const: pwr_event

View File

@ -60,6 +60,7 @@ required:
allOf: allOf:
- $ref: usb-switch.yaml# - $ref: usb-switch.yaml#
- $ref: usb-switch-ports.yaml#
additionalProperties: false additionalProperties: false

View File

@ -11,6 +11,7 @@ maintainers:
allOf: allOf:
- $ref: usb-switch.yaml# - $ref: usb-switch.yaml#
- $ref: usb-switch-ports.yaml#
properties: properties:
compatible: compatible:

View File

@ -0,0 +1,68 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/usb/usb-switch-ports.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: USB Orientation and Mode Switches Ports Graph Properties
maintainers:
- Greg Kroah-Hartman <gregkh@linuxfoundation.org>
description:
Ports Graph properties for devices handling USB mode and orientation switching.
properties:
port:
$ref: /schemas/graph.yaml#/$defs/port-base
description:
A port node to link the device to a TypeC controller for the purpose of
handling altmode muxing and orientation switching.
properties:
endpoint:
$ref: /schemas/graph.yaml#/$defs/endpoint-base
unevaluatedProperties: false
properties:
data-lanes:
$ref: /schemas/types.yaml#/definitions/uint32-array
minItems: 1
maxItems: 8
uniqueItems: true
items:
maximum: 8
ports:
$ref: /schemas/graph.yaml#/properties/ports
properties:
port@0:
$ref: /schemas/graph.yaml#/properties/port
description:
Super Speed (SS) Output endpoint to the Type-C connector
port@1:
$ref: /schemas/graph.yaml#/$defs/port-base
description:
Super Speed (SS) Input endpoint from the Super-Speed PHY
unevaluatedProperties: false
properties:
endpoint:
$ref: /schemas/graph.yaml#/$defs/endpoint-base
unevaluatedProperties: false
properties:
data-lanes:
$ref: /schemas/types.yaml#/definitions/uint32-array
minItems: 1
maxItems: 8
uniqueItems: true
items:
maximum: 8
oneOf:
- required:
- port
- required:
- ports
additionalProperties: true

View File

@ -25,56 +25,4 @@ properties:
description: Possible handler of SuperSpeed signals retiming description: Possible handler of SuperSpeed signals retiming
type: boolean type: boolean
port:
$ref: /schemas/graph.yaml#/$defs/port-base
description:
A port node to link the device to a TypeC controller for the purpose of
handling altmode muxing and orientation switching.
properties:
endpoint:
$ref: /schemas/graph.yaml#/$defs/endpoint-base
unevaluatedProperties: false
properties:
data-lanes:
$ref: /schemas/types.yaml#/definitions/uint32-array
minItems: 1
maxItems: 8
uniqueItems: true
items:
maximum: 8
ports:
$ref: /schemas/graph.yaml#/properties/ports
properties:
port@0:
$ref: /schemas/graph.yaml#/properties/port
description:
Super Speed (SS) Output endpoint to the Type-C connector
port@1:
$ref: /schemas/graph.yaml#/$defs/port-base
description:
Super Speed (SS) Input endpoint from the Super-Speed PHY
unevaluatedProperties: false
properties:
endpoint:
$ref: /schemas/graph.yaml#/$defs/endpoint-base
unevaluatedProperties: false
properties:
data-lanes:
$ref: /schemas/types.yaml#/definitions/uint32-array
minItems: 1
maxItems: 8
uniqueItems: true
items:
maximum: 8
oneOf:
- required:
- port
- required:
- ports
additionalProperties: true additionalProperties: true

View File

@ -37,8 +37,8 @@ which corresponds to the following ASL (in the scope of \_SB)::
Name (_HID, ...) Name (_HID, ...)
Name (_CRS, ResourceTemplate () { Name (_CRS, ResourceTemplate () {
I2cSerialBus (0x50, ControllerInitiated, I2C_SPEED, I2cSerialBus (0x50, ControllerInitiated, I2C_SPEED,
AddressingMode7Bit, "\\_SB.SMB1.CH00", 0x00, AddressingMode7Bit, "\\_SB.SMB1.MUX0.CH00",
ResourceConsumer,,) 0x00, ResourceConsumer,,)
} }
} }
} }
@ -52,8 +52,8 @@ which corresponds to the following ASL (in the scope of \_SB)::
Name (_HID, ...) Name (_HID, ...)
Name (_CRS, ResourceTemplate () { Name (_CRS, ResourceTemplate () {
I2cSerialBus (0x50, ControllerInitiated, I2C_SPEED, I2cSerialBus (0x50, ControllerInitiated, I2C_SPEED,
AddressingMode7Bit, "\\_SB.SMB1.CH01", 0x00, AddressingMode7Bit, "\\_SB.SMB1.MUX0.CH01",
ResourceConsumer,,) 0x00, ResourceConsumer,,)
} }
} }
} }

View File

@ -605,6 +605,8 @@ operations:
reply: &pin-attrs reply: &pin-attrs
attributes: attributes:
- id - id
- module-name
- clock-id
- board-label - board-label
- panel-label - panel-label
- package-label - package-label

View File

@ -11,6 +11,7 @@ found on https://linux-ax25.in-berlin.de.
There is a mailing list for discussing Linux amateur radio matters There is a mailing list for discussing Linux amateur radio matters
called linux-hams@vger.kernel.org. To subscribe to it, send a message to called linux-hams@vger.kernel.org. To subscribe to it, send a message to
majordomo@vger.kernel.org with the words "subscribe linux-hams" in the body linux-hams+subscribe@vger.kernel.org or use the web interface at
of the message, the subject field is ignored. You don't need to be https://vger.kernel.org. The subject and body of the message are
subscribed to post but of course that means you might miss an answer. ignored. You don't need to be subscribed to post but of course that
means you might miss an answer.

View File

@ -137,16 +137,20 @@ d. Checksum offload header v5
Checksum offload header fields are in big endian format. Checksum offload header fields are in big endian format.
Packet format::
Bit 0 - 6 7 8-15 16-31 Bit 0 - 6 7 8-15 16-31
Function Header Type Next Header Checksum Valid Reserved Function Header Type Next Header Checksum Valid Reserved
Header Type is to indicate the type of header, this usually is set to CHECKSUM Header Type is to indicate the type of header, this usually is set to CHECKSUM
Header types Header types
= ==========================================
= ===============
0 Reserved 0 Reserved
1 Reserved 1 Reserved
2 checksum header 2 checksum header
= ===============
Checksum Valid is to indicate whether the header checksum is valid. Value of 1 Checksum Valid is to indicate whether the header checksum is valid. Value of 1
implies that checksum is calculated on this packet and is valid, value of 0 implies that checksum is calculated on this packet and is valid, value of 0
@ -183,9 +187,11 @@ rmnet in a single linear skb. rmnet will process the individual
packets and either ACK the MAP command or deliver the IP packet to the packets and either ACK the MAP command or deliver the IP packet to the
network stack as needed network stack as needed
MAP header|IP Packet|Optional padding|MAP header|IP Packet|Optional padding.... Packet format::
MAP header|IP Packet|Optional padding|MAP header|Command Packet|Optional pad... MAP header|IP Packet|Optional padding|MAP header|IP Packet|Optional padding....
MAP header|IP Packet|Optional padding|MAP header|Command Packet|Optional pad...
3. Userspace configuration 3. Userspace configuration
========================== ==========================

View File

@ -96,9 +96,8 @@ needed to these network configuration daemons to make sure that an IP is
received only on the 'failover' device. received only on the 'failover' device.
Below is the patch snippet used with 'cloud-ifupdown-helper' script found on Below is the patch snippet used with 'cloud-ifupdown-helper' script found on
Debian cloud images: Debian cloud images::
::
@@ -27,6 +27,8 @@ do_setup() { @@ -27,6 +27,8 @@ do_setup() {
local working="$cfgdir/.$INTERFACE" local working="$cfgdir/.$INTERFACE"
local final="$cfgdir/$INTERFACE" local final="$cfgdir/$INTERFACE"
@ -172,9 +171,8 @@ appropriate FDB entry is added.
The following script is executed on the destination hypervisor once migration The following script is executed on the destination hypervisor once migration
completes, and it reattaches the VF to the VM and brings down the virtio-net completes, and it reattaches the VF to the VM and brings down the virtio-net
interface. interface::
::
# reattach-vf.sh # reattach-vf.sh
#!/bin/bash #!/bin/bash

View File

@ -19,9 +19,6 @@ Userdata append support by Matthew Wood <thepacketgeek@gmail.com>, Jan 22 2024
Sysdata append support by Breno Leitao <leitao@debian.org>, Jan 15 2025 Sysdata append support by Breno Leitao <leitao@debian.org>, Jan 15 2025
Please send bug reports to Matt Mackall <mpm@selenic.com>
Satyam Sharma <satyam.sharma@gmail.com>, and Cong Wang <xiyou.wangcong@gmail.com>
Introduction: Introduction:
============= =============

View File

@ -105,10 +105,10 @@ In this example the SSID is 10280c63.
The format of the firmware file names is: The format of the firmware file names is:
SoundWire (except CS35L56 Rev B0): SoundWire:
cs35lxx-b0-dsp1-misc-SSID[-spkidX]-l?u? cs35lxx-b0-dsp1-misc-SSID[-spkidX]-l?u?
SoundWire CS35L56 Rev B0: SoundWire CS35L56 Rev B0 firmware released before kernel version 6.16:
cs35lxx-b0-dsp1-misc-SSID[-spkidX]-ampN cs35lxx-b0-dsp1-misc-SSID[-spkidX]-ampN
Non-SoundWire (HDA and I2S): Non-SoundWire (HDA and I2S):
@ -127,9 +127,8 @@ Where:
* spkidX is an optional part, used for laptops that have firmware * spkidX is an optional part, used for laptops that have firmware
configurations for different makes and models of internal speakers. configurations for different makes and models of internal speakers.
The CS35L56 Rev B0 continues to use the old filename scheme because a Early firmware for CS35L56 Rev B0 used the ALSA prefix (ampN) as the
large number of firmware files have already been published with these filename qualifier. Support for the l?u? qualifier was added in kernel 6.16.
names.
Sound Open Firmware and ALSA topology files Sound Open Firmware and ALSA topology files
------------------------------------------- -------------------------------------------

View File

@ -13,10 +13,10 @@ Simple CLI
Kernel comes with a simple CLI tool which should be useful when Kernel comes with a simple CLI tool which should be useful when
developing Netlink related code. The tool is implemented in Python developing Netlink related code. The tool is implemented in Python
and can use a YAML specification to issue Netlink requests and can use a YAML specification to issue Netlink requests
to the kernel. Only Generic Netlink is supported. to the kernel.
The tool is located at ``tools/net/ynl/pyynl/cli.py``. It accepts The tool is located at ``tools/net/ynl/pyynl/cli.py``. It accepts
a handul of arguments, the most important ones are: a handful of arguments, the most important ones are:
- ``--spec`` - point to the spec file - ``--spec`` - point to the spec file
- ``--do $name`` / ``--dump $name`` - issue request ``$name`` - ``--do $name`` / ``--dump $name`` - issue request ``$name``

View File

@ -915,6 +915,7 @@ F: drivers/staging/media/sunxi/cedrus/
ALPHA PORT ALPHA PORT
M: Richard Henderson <richard.henderson@linaro.org> M: Richard Henderson <richard.henderson@linaro.org>
M: Matt Turner <mattst88@gmail.com> M: Matt Turner <mattst88@gmail.com>
M: Magnus Lindholm <linmag7@gmail.com>
L: linux-alpha@vger.kernel.org L: linux-alpha@vger.kernel.org
S: Odd Fixes S: Odd Fixes
F: arch/alpha/ F: arch/alpha/
@ -1997,6 +1998,10 @@ F: include/uapi/linux/if_arcnet.h
ARM AND ARM64 SoC SUB-ARCHITECTURES (COMMON PARTS) ARM AND ARM64 SoC SUB-ARCHITECTURES (COMMON PARTS)
M: Arnd Bergmann <arnd@arndb.de> M: Arnd Bergmann <arnd@arndb.de>
M: Krzysztof Kozlowski <krzk@kernel.org>
M: Alexandre Belloni <alexandre.belloni@bootlin.com>
M: Linus Walleij <linus.walleij@linaro.org>
R: Drew Fustini <fustini@kernel.org>
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
L: soc@lists.linux.dev L: soc@lists.linux.dev
S: Maintained S: Maintained
@ -3851,6 +3856,7 @@ F: drivers/hwmon/asus-ec-sensors.c
ASUS NOTEBOOKS AND EEEPC ACPI/WMI EXTRAS DRIVERS ASUS NOTEBOOKS AND EEEPC ACPI/WMI EXTRAS DRIVERS
M: Corentin Chary <corentin.chary@gmail.com> M: Corentin Chary <corentin.chary@gmail.com>
M: Luke D. Jones <luke@ljones.dev> M: Luke D. Jones <luke@ljones.dev>
M: Denis Benato <benato.denis96@gmail.com>
L: platform-driver-x86@vger.kernel.org L: platform-driver-x86@vger.kernel.org
S: Maintained S: Maintained
W: https://asus-linux.org/ W: https://asus-linux.org/
@ -4403,7 +4409,7 @@ BLOCK LAYER
M: Jens Axboe <axboe@kernel.dk> M: Jens Axboe <axboe@kernel.dk>
L: linux-block@vger.kernel.org L: linux-block@vger.kernel.org
S: Maintained S: Maintained
T: git git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git T: git git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux.git
F: Documentation/ABI/stable/sysfs-block F: Documentation/ABI/stable/sysfs-block
F: Documentation/block/ F: Documentation/block/
F: block/ F: block/
@ -4823,6 +4829,7 @@ F: drivers/net/dsa/b53/*
F: drivers/net/dsa/bcm_sf2* F: drivers/net/dsa/bcm_sf2*
F: include/linux/dsa/brcm.h F: include/linux/dsa/brcm.h
F: include/linux/platform_data/b53.h F: include/linux/platform_data/b53.h
F: net/dsa/tag_brcm.c
BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE
M: Florian Fainelli <florian.fainelli@broadcom.com> M: Florian Fainelli <florian.fainelli@broadcom.com>
@ -9220,6 +9227,7 @@ R: Yue Hu <zbestahu@gmail.com>
R: Jeffle Xu <jefflexu@linux.alibaba.com> R: Jeffle Xu <jefflexu@linux.alibaba.com>
R: Sandeep Dhavale <dhavale@google.com> R: Sandeep Dhavale <dhavale@google.com>
R: Hongbo Li <lihongbo22@huawei.com> R: Hongbo Li <lihongbo22@huawei.com>
R: Chunhai Guo <guochunhai@vivo.com>
L: linux-erofs@lists.ozlabs.org L: linux-erofs@lists.ozlabs.org
S: Maintained S: Maintained
W: https://erofs.docs.kernel.org W: https://erofs.docs.kernel.org
@ -11538,7 +11546,7 @@ F: include/linux/platform_data/huawei-gaokun-ec.h
HUGETLB SUBSYSTEM HUGETLB SUBSYSTEM
M: Muchun Song <muchun.song@linux.dev> M: Muchun Song <muchun.song@linux.dev>
M: Oscar Salvador <osalvador@suse.de> M: Oscar Salvador <osalvador@suse.de>
R: David Hildenbrand <david@redhat.com> R: David Hildenbrand <david@kernel.org>
L: linux-mm@kvack.org L: linux-mm@kvack.org
S: Maintained S: Maintained
F: Documentation/ABI/testing/sysfs-kernel-mm-hugepages F: Documentation/ABI/testing/sysfs-kernel-mm-hugepages
@ -12534,6 +12542,7 @@ F: include/linux/avf/virtchnl.h
F: include/linux/net/intel/*/ F: include/linux/net/intel/*/
INTEL ETHERNET PROTOCOL DRIVER FOR RDMA INTEL ETHERNET PROTOCOL DRIVER FOR RDMA
M: Krzysztof Czurylo <krzysztof.czurylo@intel.com>
M: Tatyana Nikolova <tatyana.e.nikolova@intel.com> M: Tatyana Nikolova <tatyana.e.nikolova@intel.com>
L: linux-rdma@vger.kernel.org L: linux-rdma@vger.kernel.org
S: Supported S: Supported
@ -12874,7 +12883,8 @@ F: tools/testing/selftests/sgx/*
K: \bSGX_ K: \bSGX_
INTEL SKYLAKE INT3472 ACPI DEVICE DRIVER INTEL SKYLAKE INT3472 ACPI DEVICE DRIVER
M: Daniel Scally <djrscally@gmail.com> M: Daniel Scally <dan.scally@ideasonboard.com>
M: Sakari Ailus <sakari.ailus@linux.intel.com>
S: Maintained S: Maintained
F: drivers/platform/x86/intel/int3472/ F: drivers/platform/x86/intel/int3472/
F: include/linux/platform_data/x86/int3472.h F: include/linux/platform_data/x86/int3472.h
@ -13129,6 +13139,15 @@ F: include/uapi/linux/io_uring.h
F: include/uapi/linux/io_uring/ F: include/uapi/linux/io_uring/
F: io_uring/ F: io_uring/
IO_URING ZCRX
M: Pavel Begunkov <asml.silence@gmail.com>
L: io-uring@vger.kernel.org
L: netdev@vger.kernel.org
T: git https://github.com/isilence/linux.git zcrx/for-next
T: git git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux.git
S: Maintained
F: io_uring/zcrx.*
IPMI SUBSYSTEM IPMI SUBSYSTEM
M: Corey Minyard <corey@minyard.net> M: Corey Minyard <corey@minyard.net>
L: openipmi-developer@lists.sourceforge.net (moderated for non-subscribers) L: openipmi-developer@lists.sourceforge.net (moderated for non-subscribers)
@ -13264,10 +13283,8 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git mast
F: drivers/infiniband/ulp/isert F: drivers/infiniband/ulp/isert
ISDN/CMTP OVER BLUETOOTH ISDN/CMTP OVER BLUETOOTH
M: Karsten Keil <isdn@linux-pingi.de>
L: isdn4linux@listserv.isdn4linux.de (subscribers-only)
L: netdev@vger.kernel.org L: netdev@vger.kernel.org
S: Odd Fixes S: Orphan
W: http://www.isdn4linux.de W: http://www.isdn4linux.de
F: Documentation/isdn/ F: Documentation/isdn/
F: drivers/isdn/capi/ F: drivers/isdn/capi/
@ -13276,10 +13293,8 @@ F: include/uapi/linux/isdn/
F: net/bluetooth/cmtp/ F: net/bluetooth/cmtp/
ISDN/mISDN SUBSYSTEM ISDN/mISDN SUBSYSTEM
M: Karsten Keil <isdn@linux-pingi.de>
L: isdn4linux@listserv.isdn4linux.de (subscribers-only)
L: netdev@vger.kernel.org L: netdev@vger.kernel.org
S: Maintained S: Orphan
W: http://www.isdn4linux.de W: http://www.isdn4linux.de
F: drivers/isdn/Kconfig F: drivers/isdn/Kconfig
F: drivers/isdn/Makefile F: drivers/isdn/Makefile
@ -13433,9 +13448,12 @@ F: mm/kasan/
F: scripts/Makefile.kasan F: scripts/Makefile.kasan
KCONFIG KCONFIG
M: Nathan Chancellor <nathan@kernel.org>
M: Nicolas Schier <nsc@kernel.org>
L: linux-kbuild@vger.kernel.org L: linux-kbuild@vger.kernel.org
S: Orphan S: Odd Fixes
Q: https://patchwork.kernel.org/project/linux-kbuild/list/ Q: https://patchwork.kernel.org/project/linux-kbuild/list/
T: git git://git.kernel.org/pub/scm/linux/kernel/git/kbuild/linux.git
F: Documentation/kbuild/kconfig* F: Documentation/kbuild/kconfig*
F: scripts/Kconfig.include F: scripts/Kconfig.include
F: scripts/kconfig/ F: scripts/kconfig/
@ -13620,7 +13638,7 @@ F: fs/smb/server/
KERNEL UNIT TESTING FRAMEWORK (KUnit) KERNEL UNIT TESTING FRAMEWORK (KUnit)
M: Brendan Higgins <brendan.higgins@linux.dev> M: Brendan Higgins <brendan.higgins@linux.dev>
M: David Gow <davidgow@google.com> M: David Gow <davidgow@google.com>
R: Rae Moar <rmoar@google.com> R: Rae Moar <raemoar63@gmail.com>
L: linux-kselftest@vger.kernel.org L: linux-kselftest@vger.kernel.org
L: kunit-dev@googlegroups.com L: kunit-dev@googlegroups.com
S: Maintained S: Maintained
@ -13661,7 +13679,7 @@ F: virt/kvm/*
KERNEL VIRTUAL MACHINE FOR ARM64 (KVM/arm64) KERNEL VIRTUAL MACHINE FOR ARM64 (KVM/arm64)
M: Marc Zyngier <maz@kernel.org> M: Marc Zyngier <maz@kernel.org>
M: Oliver Upton <oliver.upton@linux.dev> M: Oliver Upton <oupton@kernel.org>
R: Joey Gouly <joey.gouly@arm.com> R: Joey Gouly <joey.gouly@arm.com>
R: Suzuki K Poulose <suzuki.poulose@arm.com> R: Suzuki K Poulose <suzuki.poulose@arm.com>
R: Zenghui Yu <yuzenghui@huawei.com> R: Zenghui Yu <yuzenghui@huawei.com>
@ -13735,7 +13753,7 @@ KERNEL VIRTUAL MACHINE for s390 (KVM/s390)
M: Christian Borntraeger <borntraeger@linux.ibm.com> M: Christian Borntraeger <borntraeger@linux.ibm.com>
M: Janosch Frank <frankja@linux.ibm.com> M: Janosch Frank <frankja@linux.ibm.com>
M: Claudio Imbrenda <imbrenda@linux.ibm.com> M: Claudio Imbrenda <imbrenda@linux.ibm.com>
R: David Hildenbrand <david@redhat.com> R: David Hildenbrand <david@kernel.org>
L: kvm@vger.kernel.org L: kvm@vger.kernel.org
S: Supported S: Supported
T: git git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux.git T: git git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux.git
@ -14412,6 +14430,7 @@ F: tools/memory-model/
LINUX-NEXT TREE LINUX-NEXT TREE
M: Stephen Rothwell <sfr@canb.auug.org.au> M: Stephen Rothwell <sfr@canb.auug.org.au>
M: Mark Brown <broonie@kernel.org>
L: linux-next@vger.kernel.org L: linux-next@vger.kernel.org
S: Supported S: Supported
B: mailto:linux-next@vger.kernel.org and the appropriate development tree B: mailto:linux-next@vger.kernel.org and the appropriate development tree
@ -16221,7 +16240,7 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux.git
F: drivers/devfreq/tegra30-devfreq.c F: drivers/devfreq/tegra30-devfreq.c
MEMORY HOT(UN)PLUG MEMORY HOT(UN)PLUG
M: David Hildenbrand <david@redhat.com> M: David Hildenbrand <david@kernel.org>
M: Oscar Salvador <osalvador@suse.de> M: Oscar Salvador <osalvador@suse.de>
L: linux-mm@kvack.org L: linux-mm@kvack.org
S: Maintained S: Maintained
@ -16246,7 +16265,7 @@ F: tools/mm/
MEMORY MANAGEMENT - CORE MEMORY MANAGEMENT - CORE
M: Andrew Morton <akpm@linux-foundation.org> M: Andrew Morton <akpm@linux-foundation.org>
M: David Hildenbrand <david@redhat.com> M: David Hildenbrand <david@kernel.org>
R: Lorenzo Stoakes <lorenzo.stoakes@oracle.com> R: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
R: Liam R. Howlett <Liam.Howlett@oracle.com> R: Liam R. Howlett <Liam.Howlett@oracle.com>
R: Vlastimil Babka <vbabka@suse.cz> R: Vlastimil Babka <vbabka@suse.cz>
@ -16302,7 +16321,7 @@ F: mm/execmem.c
MEMORY MANAGEMENT - GUP (GET USER PAGES) MEMORY MANAGEMENT - GUP (GET USER PAGES)
M: Andrew Morton <akpm@linux-foundation.org> M: Andrew Morton <akpm@linux-foundation.org>
M: David Hildenbrand <david@redhat.com> M: David Hildenbrand <david@kernel.org>
R: Jason Gunthorpe <jgg@nvidia.com> R: Jason Gunthorpe <jgg@nvidia.com>
R: John Hubbard <jhubbard@nvidia.com> R: John Hubbard <jhubbard@nvidia.com>
R: Peter Xu <peterx@redhat.com> R: Peter Xu <peterx@redhat.com>
@ -16318,7 +16337,7 @@ F: tools/testing/selftests/mm/gup_test.c
MEMORY MANAGEMENT - KSM (Kernel Samepage Merging) MEMORY MANAGEMENT - KSM (Kernel Samepage Merging)
M: Andrew Morton <akpm@linux-foundation.org> M: Andrew Morton <akpm@linux-foundation.org>
M: David Hildenbrand <david@redhat.com> M: David Hildenbrand <david@kernel.org>
R: Xu Xin <xu.xin16@zte.com.cn> R: Xu Xin <xu.xin16@zte.com.cn>
R: Chengming Zhou <chengming.zhou@linux.dev> R: Chengming Zhou <chengming.zhou@linux.dev>
L: linux-mm@kvack.org L: linux-mm@kvack.org
@ -16334,7 +16353,7 @@ F: mm/mm_slot.h
MEMORY MANAGEMENT - MEMORY POLICY AND MIGRATION MEMORY MANAGEMENT - MEMORY POLICY AND MIGRATION
M: Andrew Morton <akpm@linux-foundation.org> M: Andrew Morton <akpm@linux-foundation.org>
M: David Hildenbrand <david@redhat.com> M: David Hildenbrand <david@kernel.org>
R: Zi Yan <ziy@nvidia.com> R: Zi Yan <ziy@nvidia.com>
R: Matthew Brost <matthew.brost@intel.com> R: Matthew Brost <matthew.brost@intel.com>
R: Joshua Hahn <joshua.hahnjy@gmail.com> R: Joshua Hahn <joshua.hahnjy@gmail.com>
@ -16374,7 +16393,7 @@ F: mm/workingset.c
MEMORY MANAGEMENT - MISC MEMORY MANAGEMENT - MISC
M: Andrew Morton <akpm@linux-foundation.org> M: Andrew Morton <akpm@linux-foundation.org>
M: David Hildenbrand <david@redhat.com> M: David Hildenbrand <david@kernel.org>
R: Lorenzo Stoakes <lorenzo.stoakes@oracle.com> R: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
R: Liam R. Howlett <Liam.Howlett@oracle.com> R: Liam R. Howlett <Liam.Howlett@oracle.com>
R: Vlastimil Babka <vbabka@suse.cz> R: Vlastimil Babka <vbabka@suse.cz>
@ -16462,7 +16481,7 @@ F: mm/shuffle.h
MEMORY MANAGEMENT - RECLAIM MEMORY MANAGEMENT - RECLAIM
M: Andrew Morton <akpm@linux-foundation.org> M: Andrew Morton <akpm@linux-foundation.org>
M: Johannes Weiner <hannes@cmpxchg.org> M: Johannes Weiner <hannes@cmpxchg.org>
R: David Hildenbrand <david@redhat.com> R: David Hildenbrand <david@kernel.org>
R: Michal Hocko <mhocko@kernel.org> R: Michal Hocko <mhocko@kernel.org>
R: Qi Zheng <zhengqi.arch@bytedance.com> R: Qi Zheng <zhengqi.arch@bytedance.com>
R: Shakeel Butt <shakeel.butt@linux.dev> R: Shakeel Butt <shakeel.butt@linux.dev>
@ -16475,7 +16494,7 @@ F: mm/workingset.c
MEMORY MANAGEMENT - RMAP (REVERSE MAPPING) MEMORY MANAGEMENT - RMAP (REVERSE MAPPING)
M: Andrew Morton <akpm@linux-foundation.org> M: Andrew Morton <akpm@linux-foundation.org>
M: David Hildenbrand <david@redhat.com> M: David Hildenbrand <david@kernel.org>
M: Lorenzo Stoakes <lorenzo.stoakes@oracle.com> M: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
R: Rik van Riel <riel@surriel.com> R: Rik van Riel <riel@surriel.com>
R: Liam R. Howlett <Liam.Howlett@oracle.com> R: Liam R. Howlett <Liam.Howlett@oracle.com>
@ -16499,12 +16518,12 @@ F: mm/secretmem.c
MEMORY MANAGEMENT - SWAP MEMORY MANAGEMENT - SWAP
M: Andrew Morton <akpm@linux-foundation.org> M: Andrew Morton <akpm@linux-foundation.org>
M: Chris Li <chrisl@kernel.org>
M: Kairui Song <kasong@tencent.com>
R: Kemeng Shi <shikemeng@huaweicloud.com> R: Kemeng Shi <shikemeng@huaweicloud.com>
R: Kairui Song <kasong@tencent.com>
R: Nhat Pham <nphamcs@gmail.com> R: Nhat Pham <nphamcs@gmail.com>
R: Baoquan He <bhe@redhat.com> R: Baoquan He <bhe@redhat.com>
R: Barry Song <baohua@kernel.org> R: Barry Song <baohua@kernel.org>
R: Chris Li <chrisl@kernel.org>
L: linux-mm@kvack.org L: linux-mm@kvack.org
S: Maintained S: Maintained
F: Documentation/mm/swap-table.rst F: Documentation/mm/swap-table.rst
@ -16520,7 +16539,7 @@ F: mm/swapfile.c
MEMORY MANAGEMENT - THP (TRANSPARENT HUGE PAGE) MEMORY MANAGEMENT - THP (TRANSPARENT HUGE PAGE)
M: Andrew Morton <akpm@linux-foundation.org> M: Andrew Morton <akpm@linux-foundation.org>
M: David Hildenbrand <david@redhat.com> M: David Hildenbrand <david@kernel.org>
M: Lorenzo Stoakes <lorenzo.stoakes@oracle.com> M: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
R: Zi Yan <ziy@nvidia.com> R: Zi Yan <ziy@nvidia.com>
R: Baolin Wang <baolin.wang@linux.alibaba.com> R: Baolin Wang <baolin.wang@linux.alibaba.com>
@ -16622,7 +16641,7 @@ MEMORY MAPPING - MADVISE (MEMORY ADVICE)
M: Andrew Morton <akpm@linux-foundation.org> M: Andrew Morton <akpm@linux-foundation.org>
M: Liam R. Howlett <Liam.Howlett@oracle.com> M: Liam R. Howlett <Liam.Howlett@oracle.com>
M: Lorenzo Stoakes <lorenzo.stoakes@oracle.com> M: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
M: David Hildenbrand <david@redhat.com> M: David Hildenbrand <david@kernel.org>
R: Vlastimil Babka <vbabka@suse.cz> R: Vlastimil Babka <vbabka@suse.cz>
R: Jann Horn <jannh@google.com> R: Jann Horn <jannh@google.com>
L: linux-mm@kvack.org L: linux-mm@kvack.org
@ -20164,6 +20183,7 @@ R: Alexander Shishkin <alexander.shishkin@linux.intel.com>
R: Jiri Olsa <jolsa@kernel.org> R: Jiri Olsa <jolsa@kernel.org>
R: Ian Rogers <irogers@google.com> R: Ian Rogers <irogers@google.com>
R: Adrian Hunter <adrian.hunter@intel.com> R: Adrian Hunter <adrian.hunter@intel.com>
R: James Clark <james.clark@linaro.org>
L: linux-perf-users@vger.kernel.org L: linux-perf-users@vger.kernel.org
L: linux-kernel@vger.kernel.org L: linux-kernel@vger.kernel.org
S: Supported S: Supported
@ -21335,6 +21355,7 @@ F: drivers/media/platform/qcom/venus/
QUALCOMM WCN36XX WIRELESS DRIVER QUALCOMM WCN36XX WIRELESS DRIVER
M: Loic Poulain <loic.poulain@oss.qualcomm.com> M: Loic Poulain <loic.poulain@oss.qualcomm.com>
L: wcn36xx@lists.infradead.org L: wcn36xx@lists.infradead.org
L: linux-wireless@vger.kernel.org
S: Supported S: Supported
W: https://wireless.wiki.kernel.org/en/users/Drivers/wcn36xx W: https://wireless.wiki.kernel.org/en/users/Drivers/wcn36xx
F: drivers/net/wireless/ath/wcn36xx/ F: drivers/net/wireless/ath/wcn36xx/
@ -26903,7 +26924,7 @@ S: Maintained
F: drivers/vfio/cdx/* F: drivers/vfio/cdx/*
VFIO DRIVER VFIO DRIVER
M: Alex Williamson <alex.williamson@redhat.com> M: Alex Williamson <alex@shazbot.org>
L: kvm@vger.kernel.org L: kvm@vger.kernel.org
S: Maintained S: Maintained
T: git https://github.com/awilliam/linux-vfio.git T: git https://github.com/awilliam/linux-vfio.git
@ -27066,7 +27087,7 @@ T: git git://linuxtv.org/media.git
F: drivers/media/test-drivers/vimc/* F: drivers/media/test-drivers/vimc/*
VIRT LIB VIRT LIB
M: Alex Williamson <alex.williamson@redhat.com> M: Alex Williamson <alex@shazbot.org>
M: Paolo Bonzini <pbonzini@redhat.com> M: Paolo Bonzini <pbonzini@redhat.com>
L: kvm@vger.kernel.org L: kvm@vger.kernel.org
S: Supported S: Supported
@ -27087,7 +27108,7 @@ F: net/vmw_vsock/virtio_transport_common.c
VIRTIO BALLOON VIRTIO BALLOON
M: "Michael S. Tsirkin" <mst@redhat.com> M: "Michael S. Tsirkin" <mst@redhat.com>
M: David Hildenbrand <david@redhat.com> M: David Hildenbrand <david@kernel.org>
L: virtualization@lists.linux.dev L: virtualization@lists.linux.dev
S: Maintained S: Maintained
F: drivers/virtio/virtio_balloon.c F: drivers/virtio/virtio_balloon.c
@ -27242,7 +27263,7 @@ F: drivers/iommu/virtio-iommu.c
F: include/uapi/linux/virtio_iommu.h F: include/uapi/linux/virtio_iommu.h
VIRTIO MEM DRIVER VIRTIO MEM DRIVER
M: David Hildenbrand <david@redhat.com> M: David Hildenbrand <david@kernel.org>
L: virtualization@lists.linux.dev L: virtualization@lists.linux.dev
S: Maintained S: Maintained
W: https://virtio-mem.gitlab.io/ W: https://virtio-mem.gitlab.io/
@ -27848,7 +27869,7 @@ F: arch/x86/kernel/stacktrace.c
F: arch/x86/kernel/unwind_*.c F: arch/x86/kernel/unwind_*.c
X86 TRUST DOMAIN EXTENSIONS (TDX) X86 TRUST DOMAIN EXTENSIONS (TDX)
M: Kirill A. Shutemov <kas@kernel.org> M: Kiryl Shutsemau <kas@kernel.org>
R: Dave Hansen <dave.hansen@linux.intel.com> R: Dave Hansen <dave.hansen@linux.intel.com>
R: Rick Edgecombe <rick.p.edgecombe@intel.com> R: Rick Edgecombe <rick.p.edgecombe@intel.com>
L: x86@kernel.org L: x86@kernel.org

View File

@ -2,7 +2,7 @@
VERSION = 6 VERSION = 6
PATCHLEVEL = 18 PATCHLEVEL = 18
SUBLEVEL = 0 SUBLEVEL = 0
EXTRAVERSION = -rc2 EXTRAVERSION = -rc6
NAME = Baby Opossum Posse NAME = Baby Opossum Posse
# *DOCUMENTATION* # *DOCUMENTATION*

View File

@ -917,6 +917,13 @@ config ARCH_USES_CFI_TRAPS
An architecture should select this option if it requires the An architecture should select this option if it requires the
.kcfi_traps section for KCFI trap handling. .kcfi_traps section for KCFI trap handling.
config ARCH_USES_CFI_GENERIC_LLVM_PASS
bool
help
An architecture should select this option if it uses the generic
KCFIPass in LLVM to expand kCFI bundles instead of architecture-specific
lowering.
config CFI config CFI
bool "Use Kernel Control Flow Integrity (kCFI)" bool "Use Kernel Control Flow Integrity (kCFI)"
default CFI_CLANG default CFI_CLANG

View File

@ -44,6 +44,8 @@ config ARM
select ARCH_USE_BUILTIN_BSWAP select ARCH_USE_BUILTIN_BSWAP
select ARCH_USE_CMPXCHG_LOCKREF select ARCH_USE_CMPXCHG_LOCKREF
select ARCH_USE_MEMTEST select ARCH_USE_MEMTEST
# https://github.com/llvm/llvm-project/commit/d130f402642fba3d065aacb506cb061c899558de
select ARCH_USES_CFI_GENERIC_LLVM_PASS if CLANG_VERSION < 220000
select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT if MMU select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT if MMU
select ARCH_WANT_GENERAL_HUGETLB select ARCH_WANT_GENERAL_HUGETLB
select ARCH_WANT_IPC_PARSE_VERSION select ARCH_WANT_IPC_PARSE_VERSION

View File

@ -77,6 +77,14 @@ &i2c0 {
/delete-property/ pinctrl-0; /delete-property/ pinctrl-0;
}; };
&pm {
clocks = <&firmware_clocks 5>,
<&clocks BCM2835_CLOCK_PERI_IMAGE>,
<&clocks BCM2835_CLOCK_H264>,
<&clocks BCM2835_CLOCK_ISP>;
clock-names = "v3d", "peri_image", "h264", "isp";
};
&rmem { &rmem {
/* /*
* RPi4's co-processor will copy the board's bootloader configuration * RPi4's co-processor will copy the board's bootloader configuration

View File

@ -13,7 +13,16 @@ &hdmi {
clock-names = "pixel", "hdmi"; clock-names = "pixel", "hdmi";
}; };
&pm {
clocks = <&firmware_clocks 5>,
<&clocks BCM2835_CLOCK_PERI_IMAGE>,
<&clocks BCM2835_CLOCK_H264>,
<&clocks BCM2835_CLOCK_ISP>;
clock-names = "v3d", "peri_image", "h264", "isp";
};
&v3d { &v3d {
clocks = <&firmware_clocks 5>;
power-domains = <&power RPI_POWER_DOMAIN_V3D>; power-domains = <&power RPI_POWER_DOMAIN_V3D>;
}; };

View File

@ -326,6 +326,8 @@ gicv2: interrupt-controller@7fff9000 {
<0x7fffe000 0x2000>; <0x7fffe000 0x2000>;
interrupt-controller; interrupt-controller;
#address-cells = <0>; #address-cells = <0>;
interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(4) |
IRQ_TYPE_LEVEL_HIGH)>;
#interrupt-cells = <3>; #interrupt-cells = <3>;
}; };

View File

@ -26,9 +26,12 @@ void __init apply_alternatives_all(void);
bool alternative_is_applied(u16 cpucap); bool alternative_is_applied(u16 cpucap);
#ifdef CONFIG_MODULES #ifdef CONFIG_MODULES
void apply_alternatives_module(void *start, size_t length); int apply_alternatives_module(void *start, size_t length);
#else #else
static inline void apply_alternatives_module(void *start, size_t length) { } static inline int apply_alternatives_module(void *start, size_t length)
{
return 0;
}
#endif #endif
void alt_cb_patch_nops(struct alt_instr *alt, __le32 *origptr, void alt_cb_patch_nops(struct alt_instr *alt, __le32 *origptr,

View File

@ -10,8 +10,6 @@
#include <asm/set_memory.h> #include <asm/set_memory.h>
static inline bool arch_kfence_init_pool(void) { return true; }
static inline bool kfence_protect_page(unsigned long addr, bool protect) static inline bool kfence_protect_page(unsigned long addr, bool protect)
{ {
set_memory_valid(addr, 1, !protect); set_memory_valid(addr, 1, !protect);
@ -25,6 +23,7 @@ static inline bool arm64_kfence_can_set_direct_map(void)
{ {
return !kfence_early_init; return !kfence_early_init;
} }
bool arch_kfence_init_pool(void);
#else /* CONFIG_KFENCE */ #else /* CONFIG_KFENCE */
static inline bool arm64_kfence_can_set_direct_map(void) { return false; } static inline bool arm64_kfence_can_set_direct_map(void) { return false; }
#endif /* CONFIG_KFENCE */ #endif /* CONFIG_KFENCE */

View File

@ -77,7 +77,7 @@ __percpu_##name##_case_##sz(void *ptr, unsigned long val) \
" stxr" #sfx "\t%w[loop], %" #w "[tmp], %[ptr]\n" \ " stxr" #sfx "\t%w[loop], %" #w "[tmp], %[ptr]\n" \
" cbnz %w[loop], 1b", \ " cbnz %w[loop], 1b", \
/* LSE atomics */ \ /* LSE atomics */ \
#op_lse "\t%" #w "[val], %[ptr]\n" \ #op_lse "\t%" #w "[val], %" #w "[tmp], %[ptr]\n" \
__nops(3)) \ __nops(3)) \
: [loop] "=&r" (loop), [tmp] "=&r" (tmp), \ : [loop] "=&r" (loop), [tmp] "=&r" (tmp), \
[ptr] "+Q"(*(u##sz *)ptr) \ [ptr] "+Q"(*(u##sz *)ptr) \
@ -124,9 +124,16 @@ PERCPU_RW_OPS(8)
PERCPU_RW_OPS(16) PERCPU_RW_OPS(16)
PERCPU_RW_OPS(32) PERCPU_RW_OPS(32)
PERCPU_RW_OPS(64) PERCPU_RW_OPS(64)
PERCPU_OP(add, add, stadd)
PERCPU_OP(andnot, bic, stclr) /*
PERCPU_OP(or, orr, stset) * Use value-returning atomics for CPU-local ops as they are more likely
* to execute "near" to the CPU (e.g. in L1$).
*
* https://lore.kernel.org/r/e7d539ed-ced0-4b96-8ecd-048a5b803b85@paulmck-laptop
*/
PERCPU_OP(add, add, ldadd)
PERCPU_OP(andnot, bic, ldclr)
PERCPU_OP(or, orr, ldset)
PERCPU_RET_OP(add, add, ldadd) PERCPU_RET_OP(add, add, ldadd)
#undef PERCPU_RW_OPS #undef PERCPU_RW_OPS

View File

@ -293,6 +293,7 @@ static inline pmd_t set_pmd_bit(pmd_t pmd, pgprot_t prot)
static inline pte_t pte_mkwrite_novma(pte_t pte) static inline pte_t pte_mkwrite_novma(pte_t pte)
{ {
pte = set_pte_bit(pte, __pgprot(PTE_WRITE)); pte = set_pte_bit(pte, __pgprot(PTE_WRITE));
if (pte_sw_dirty(pte))
pte = clear_pte_bit(pte, __pgprot(PTE_RDONLY)); pte = clear_pte_bit(pte, __pgprot(PTE_RDONLY));
return pte; return pte;
} }

View File

@ -53,7 +53,7 @@ enum {
EDYNSCS_INVALID_CFA_OPCODE = 4, EDYNSCS_INVALID_CFA_OPCODE = 4,
}; };
int __pi_scs_patch(const u8 eh_frame[], int size); int __pi_scs_patch(const u8 eh_frame[], int size, bool skip_dry_run);
#endif /* __ASSEMBLY __ */ #endif /* __ASSEMBLY __ */

View File

@ -117,6 +117,7 @@ void spectre_bhb_patch_wa3(struct alt_instr *alt,
__le32 *origptr, __le32 *updptr, int nr_inst); __le32 *origptr, __le32 *updptr, int nr_inst);
void spectre_bhb_patch_clearbhb(struct alt_instr *alt, void spectre_bhb_patch_clearbhb(struct alt_instr *alt,
__le32 *origptr, __le32 *updptr, int nr_inst); __le32 *origptr, __le32 *updptr, int nr_inst);
void spectre_print_disabled_mitigations(void);
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
#endif /* __ASM_SPECTRE_H */ #endif /* __ASM_SPECTRE_H */

View File

@ -197,8 +197,6 @@ static int __init acpi_fadt_sanity_check(void)
*/ */
void __init acpi_boot_table_init(void) void __init acpi_boot_table_init(void)
{ {
int ret;
/* /*
* Enable ACPI instead of device tree unless * Enable ACPI instead of device tree unless
* - ACPI has been disabled explicitly (acpi=off), or * - ACPI has been disabled explicitly (acpi=off), or
@ -252,12 +250,8 @@ void __init acpi_boot_table_init(void)
* behaviour, use acpi=nospcr to disable console in ACPI SPCR * behaviour, use acpi=nospcr to disable console in ACPI SPCR
* table as default serial console. * table as default serial console.
*/ */
ret = acpi_parse_spcr(earlycon_acpi_spcr_enable, acpi_parse_spcr(earlycon_acpi_spcr_enable,
!param_acpi_nospcr); !param_acpi_nospcr);
if (!ret || param_acpi_nospcr || !IS_ENABLED(CONFIG_ACPI_SPCR_TABLE))
pr_info("Use ACPI SPCR as default console: No\n");
else
pr_info("Use ACPI SPCR as default console: Yes\n");
if (IS_ENABLED(CONFIG_ACPI_BGRT)) if (IS_ENABLED(CONFIG_ACPI_BGRT))
acpi_table_parse(ACPI_SIG_BGRT, acpi_parse_bgrt); acpi_table_parse(ACPI_SIG_BGRT, acpi_parse_bgrt);

View File

@ -139,7 +139,7 @@ static noinstr void clean_dcache_range_nopatch(u64 start, u64 end)
} while (cur += d_size, cur < end); } while (cur += d_size, cur < end);
} }
static void __apply_alternatives(const struct alt_region *region, static int __apply_alternatives(const struct alt_region *region,
bool is_module, bool is_module,
unsigned long *cpucap_mask) unsigned long *cpucap_mask)
{ {
@ -166,10 +166,13 @@ static void __apply_alternatives(const struct alt_region *region,
updptr = is_module ? origptr : lm_alias(origptr); updptr = is_module ? origptr : lm_alias(origptr);
nr_inst = alt->orig_len / AARCH64_INSN_SIZE; nr_inst = alt->orig_len / AARCH64_INSN_SIZE;
if (ALT_HAS_CB(alt)) if (ALT_HAS_CB(alt)) {
alt_cb = ALT_REPL_PTR(alt); alt_cb = ALT_REPL_PTR(alt);
else if (is_module && !core_kernel_text((unsigned long)alt_cb))
return -ENOEXEC;
} else {
alt_cb = patch_alternative; alt_cb = patch_alternative;
}
alt_cb(alt, origptr, updptr, nr_inst); alt_cb(alt, origptr, updptr, nr_inst);
@ -193,6 +196,8 @@ static void __apply_alternatives(const struct alt_region *region,
bitmap_and(applied_alternatives, applied_alternatives, bitmap_and(applied_alternatives, applied_alternatives,
system_cpucaps, ARM64_NCAPS); system_cpucaps, ARM64_NCAPS);
} }
return 0;
} }
static void __init apply_alternatives_vdso(void) static void __init apply_alternatives_vdso(void)
@ -277,7 +282,7 @@ void __init apply_boot_alternatives(void)
} }
#ifdef CONFIG_MODULES #ifdef CONFIG_MODULES
void apply_alternatives_module(void *start, size_t length) int apply_alternatives_module(void *start, size_t length)
{ {
struct alt_region region = { struct alt_region region = {
.begin = start, .begin = start,
@ -287,7 +292,7 @@ void apply_alternatives_module(void *start, size_t length)
bitmap_fill(all_capabilities, ARM64_NCAPS); bitmap_fill(all_capabilities, ARM64_NCAPS);
__apply_alternatives(&region, true, &all_capabilities[0]); return __apply_alternatives(&region, true, &all_capabilities[0]);
} }
#endif #endif

View File

@ -95,6 +95,7 @@
#include <asm/vectors.h> #include <asm/vectors.h>
#include <asm/virt.h> #include <asm/virt.h>
#include <asm/spectre.h>
/* Kernel representation of AT_HWCAP and AT_HWCAP2 */ /* Kernel representation of AT_HWCAP and AT_HWCAP2 */
static DECLARE_BITMAP(elf_hwcap, MAX_CPU_FEATURES) __read_mostly; static DECLARE_BITMAP(elf_hwcap, MAX_CPU_FEATURES) __read_mostly;
@ -3875,6 +3876,11 @@ static void __init setup_system_capabilities(void)
*/ */
if (system_uses_ttbr0_pan()) if (system_uses_ttbr0_pan())
pr_info("emulated: Privileged Access Never (PAN) using TTBR0_EL1 switching\n"); pr_info("emulated: Privileged Access Never (PAN) using TTBR0_EL1 switching\n");
/*
* Report Spectre mitigations status.
*/
spectre_print_disabled_mitigations();
} }
void __init setup_system_features(void) void __init setup_system_features(void)

View File

@ -489,16 +489,29 @@ int module_finalize(const Elf_Ehdr *hdr,
int ret; int ret;
s = find_section(hdr, sechdrs, ".altinstructions"); s = find_section(hdr, sechdrs, ".altinstructions");
if (s) if (s) {
apply_alternatives_module((void *)s->sh_addr, s->sh_size); ret = apply_alternatives_module((void *)s->sh_addr, s->sh_size);
if (ret < 0) {
pr_err("module %s: error occurred when applying alternatives\n", me->name);
return ret;
}
}
if (scs_is_dynamic()) { if (scs_is_dynamic()) {
s = find_section(hdr, sechdrs, ".init.eh_frame"); s = find_section(hdr, sechdrs, ".init.eh_frame");
if (s) { if (s) {
ret = __pi_scs_patch((void *)s->sh_addr, s->sh_size); /*
if (ret) * Because we can reject modules that are malformed
* so SCS patching fails, skip dry run and try to patch
* it in place. If patching fails, the module would not
* be loaded anyway.
*/
ret = __pi_scs_patch((void *)s->sh_addr, s->sh_size, true);
if (ret) {
pr_err("module %s: error occurred during dynamic SCS patching (%d)\n", pr_err("module %s: error occurred during dynamic SCS patching (%d)\n",
me->name, ret); me->name, ret);
return -ENOEXEC;
}
} }
} }

View File

@ -476,7 +476,8 @@ static int __access_remote_tags(struct mm_struct *mm, unsigned long addr,
folio = page_folio(page); folio = page_folio(page);
if (folio_test_hugetlb(folio)) if (folio_test_hugetlb(folio))
WARN_ON_ONCE(!folio_test_hugetlb_mte_tagged(folio)); WARN_ON_ONCE(!folio_test_hugetlb_mte_tagged(folio) &&
!is_huge_zero_folio(folio));
else else
WARN_ON_ONCE(!page_mte_tagged(page) && !is_zero_page(page)); WARN_ON_ONCE(!page_mte_tagged(page) && !is_zero_page(page));

View File

@ -104,7 +104,7 @@ static void __init map_kernel(u64 kaslr_offset, u64 va_offset, int root_level)
if (enable_scs) { if (enable_scs) {
scs_patch(__eh_frame_start + va_offset, scs_patch(__eh_frame_start + va_offset,
__eh_frame_end - __eh_frame_start); __eh_frame_end - __eh_frame_start, false);
asm("ic ialluis"); asm("ic ialluis");
dynamic_scs_is_enabled = true; dynamic_scs_is_enabled = true;

View File

@ -225,7 +225,7 @@ static int scs_handle_fde_frame(const struct eh_frame *frame,
return 0; return 0;
} }
int scs_patch(const u8 eh_frame[], int size) int scs_patch(const u8 eh_frame[], int size, bool skip_dry_run)
{ {
int code_alignment_factor = 1; int code_alignment_factor = 1;
bool fde_use_sdata8 = false; bool fde_use_sdata8 = false;
@ -277,9 +277,11 @@ int scs_patch(const u8 eh_frame[], int size)
} }
} else { } else {
ret = scs_handle_fde_frame(frame, code_alignment_factor, ret = scs_handle_fde_frame(frame, code_alignment_factor,
fde_use_sdata8, true); fde_use_sdata8, !skip_dry_run);
if (ret) if (ret)
return ret; return ret;
if (!skip_dry_run)
scs_handle_fde_frame(frame, code_alignment_factor, scs_handle_fde_frame(frame, code_alignment_factor,
fde_use_sdata8, false); fde_use_sdata8, false);
} }

View File

@ -27,7 +27,7 @@ extern pgd_t init_pg_dir[], init_pg_end[];
void init_feature_override(u64 boot_status, const void *fdt, int chosen); void init_feature_override(u64 boot_status, const void *fdt, int chosen);
u64 kaslr_early_init(void *fdt, int chosen); u64 kaslr_early_init(void *fdt, int chosen);
void relocate_kernel(u64 offset); void relocate_kernel(u64 offset);
int scs_patch(const u8 eh_frame[], int size); int scs_patch(const u8 eh_frame[], int size, bool skip_dry_run);
void map_range(phys_addr_t *pte, u64 start, u64 end, phys_addr_t pa, void map_range(phys_addr_t *pte, u64 start, u64 end, phys_addr_t pa,
pgprot_t prot, int level, pte_t *tbl, bool may_use_cont, pgprot_t prot, int level, pte_t *tbl, bool may_use_cont,

View File

@ -49,7 +49,10 @@ void *alloc_insn_page(void)
addr = execmem_alloc(EXECMEM_KPROBES, PAGE_SIZE); addr = execmem_alloc(EXECMEM_KPROBES, PAGE_SIZE);
if (!addr) if (!addr)
return NULL; return NULL;
set_memory_rox((unsigned long)addr, 1); if (set_memory_rox((unsigned long)addr, 1)) {
execmem_free(addr);
return NULL;
}
return addr; return addr;
} }

View File

@ -91,12 +91,7 @@ early_param("nospectre_v2", parse_spectre_v2_param);
static bool spectre_v2_mitigations_off(void) static bool spectre_v2_mitigations_off(void)
{ {
bool ret = __nospectre_v2 || cpu_mitigations_off(); return __nospectre_v2 || cpu_mitigations_off();
if (ret)
pr_info_once("spectre-v2 mitigation disabled by command line option\n");
return ret;
} }
static const char *get_bhb_affected_string(enum mitigation_state bhb_state) static const char *get_bhb_affected_string(enum mitigation_state bhb_state)
@ -421,13 +416,8 @@ early_param("ssbd", parse_spectre_v4_param);
*/ */
static bool spectre_v4_mitigations_off(void) static bool spectre_v4_mitigations_off(void)
{ {
bool ret = cpu_mitigations_off() || return cpu_mitigations_off() ||
__spectre_v4_policy == SPECTRE_V4_POLICY_MITIGATION_DISABLED; __spectre_v4_policy == SPECTRE_V4_POLICY_MITIGATION_DISABLED;
if (ret)
pr_info_once("spectre-v4 mitigation disabled by command-line option\n");
return ret;
} }
/* Do we need to toggle the mitigation state on entry to/exit from the kernel? */ /* Do we need to toggle the mitigation state on entry to/exit from the kernel? */
@ -1042,10 +1032,6 @@ void spectre_bhb_enable_mitigation(const struct arm64_cpu_capabilities *entry)
if (arm64_get_spectre_v2_state() == SPECTRE_VULNERABLE) { if (arm64_get_spectre_v2_state() == SPECTRE_VULNERABLE) {
/* No point mitigating Spectre-BHB alone. */ /* No point mitigating Spectre-BHB alone. */
} else if (!IS_ENABLED(CONFIG_MITIGATE_SPECTRE_BRANCH_HISTORY)) {
pr_info_once("spectre-bhb mitigation disabled by compile time option\n");
} else if (cpu_mitigations_off() || __nospectre_bhb) {
pr_info_once("spectre-bhb mitigation disabled by command line option\n");
} else if (supports_ecbhb(SCOPE_LOCAL_CPU)) { } else if (supports_ecbhb(SCOPE_LOCAL_CPU)) {
state = SPECTRE_MITIGATED; state = SPECTRE_MITIGATED;
set_bit(BHB_HW, &system_bhb_mitigations); set_bit(BHB_HW, &system_bhb_mitigations);
@ -1199,3 +1185,18 @@ void unpriv_ebpf_notify(int new_state)
pr_err("WARNING: %s", EBPF_WARN); pr_err("WARNING: %s", EBPF_WARN);
} }
#endif #endif
void spectre_print_disabled_mitigations(void)
{
/* Keep a single copy of the common message suffix to avoid duplication. */
const char *spectre_disabled_suffix = "mitigation disabled by command-line option\n";
if (spectre_v2_mitigations_off())
pr_info("spectre-v2 %s", spectre_disabled_suffix);
if (spectre_v4_mitigations_off())
pr_info("spectre-v4 %s", spectre_disabled_suffix);
if (__nospectre_bhb || cpu_mitigations_off())
pr_info("spectre-bhb %s", spectre_disabled_suffix);
}

View File

@ -479,7 +479,7 @@ static void __do_ffa_mem_xfer(const u64 func_id,
struct ffa_mem_region_attributes *ep_mem_access; struct ffa_mem_region_attributes *ep_mem_access;
struct ffa_composite_mem_region *reg; struct ffa_composite_mem_region *reg;
struct ffa_mem_region *buf; struct ffa_mem_region *buf;
u32 offset, nr_ranges; u32 offset, nr_ranges, checked_offset;
int ret = 0; int ret = 0;
if (addr_mbz || npages_mbz || fraglen > len || if (addr_mbz || npages_mbz || fraglen > len ||
@ -516,7 +516,12 @@ static void __do_ffa_mem_xfer(const u64 func_id,
goto out_unlock; goto out_unlock;
} }
if (fraglen < offset + sizeof(struct ffa_composite_mem_region)) { if (check_add_overflow(offset, sizeof(struct ffa_composite_mem_region), &checked_offset)) {
ret = FFA_RET_INVALID_PARAMETERS;
goto out_unlock;
}
if (fraglen < checked_offset) {
ret = FFA_RET_INVALID_PARAMETERS; ret = FFA_RET_INVALID_PARAMETERS;
goto out_unlock; goto out_unlock;
} }

View File

@ -367,6 +367,19 @@ static int host_stage2_unmap_dev_all(void)
return kvm_pgtable_stage2_unmap(pgt, addr, BIT(pgt->ia_bits) - addr); return kvm_pgtable_stage2_unmap(pgt, addr, BIT(pgt->ia_bits) - addr);
} }
/*
* Ensure the PFN range is contained within PA-range.
*
* This check is also robust to overflows and is therefore a requirement before
* using a pfn/nr_pages pair from an untrusted source.
*/
static bool pfn_range_is_valid(u64 pfn, u64 nr_pages)
{
u64 limit = BIT(kvm_phys_shift(&host_mmu.arch.mmu) - PAGE_SHIFT);
return pfn < limit && ((limit - pfn) >= nr_pages);
}
struct kvm_mem_range { struct kvm_mem_range {
u64 start; u64 start;
u64 end; u64 end;
@ -776,6 +789,9 @@ int __pkvm_host_donate_hyp(u64 pfn, u64 nr_pages)
void *virt = __hyp_va(phys); void *virt = __hyp_va(phys);
int ret; int ret;
if (!pfn_range_is_valid(pfn, nr_pages))
return -EINVAL;
host_lock_component(); host_lock_component();
hyp_lock_component(); hyp_lock_component();
@ -804,6 +820,9 @@ int __pkvm_hyp_donate_host(u64 pfn, u64 nr_pages)
u64 virt = (u64)__hyp_va(phys); u64 virt = (u64)__hyp_va(phys);
int ret; int ret;
if (!pfn_range_is_valid(pfn, nr_pages))
return -EINVAL;
host_lock_component(); host_lock_component();
hyp_lock_component(); hyp_lock_component();
@ -887,6 +906,9 @@ int __pkvm_host_share_ffa(u64 pfn, u64 nr_pages)
u64 size = PAGE_SIZE * nr_pages; u64 size = PAGE_SIZE * nr_pages;
int ret; int ret;
if (!pfn_range_is_valid(pfn, nr_pages))
return -EINVAL;
host_lock_component(); host_lock_component();
ret = __host_check_page_state_range(phys, size, PKVM_PAGE_OWNED); ret = __host_check_page_state_range(phys, size, PKVM_PAGE_OWNED);
if (!ret) if (!ret)
@ -902,6 +924,9 @@ int __pkvm_host_unshare_ffa(u64 pfn, u64 nr_pages)
u64 size = PAGE_SIZE * nr_pages; u64 size = PAGE_SIZE * nr_pages;
int ret; int ret;
if (!pfn_range_is_valid(pfn, nr_pages))
return -EINVAL;
host_lock_component(); host_lock_component();
ret = __host_check_page_state_range(phys, size, PKVM_PAGE_SHARED_OWNED); ret = __host_check_page_state_range(phys, size, PKVM_PAGE_SHARED_OWNED);
if (!ret) if (!ret)
@ -945,6 +970,9 @@ int __pkvm_host_share_guest(u64 pfn, u64 gfn, u64 nr_pages, struct pkvm_hyp_vcpu
if (prot & ~KVM_PGTABLE_PROT_RWX) if (prot & ~KVM_PGTABLE_PROT_RWX)
return -EINVAL; return -EINVAL;
if (!pfn_range_is_valid(pfn, nr_pages))
return -EINVAL;
ret = __guest_check_transition_size(phys, ipa, nr_pages, &size); ret = __guest_check_transition_size(phys, ipa, nr_pages, &size);
if (ret) if (ret)
return ret; return ret;

View File

@ -2595,19 +2595,23 @@ static bool bad_redir_trap(struct kvm_vcpu *vcpu,
.val = 0, \ .val = 0, \
} }
/* sys_reg_desc initialiser for known cpufeature ID registers */
#define AA32_ID_SANITISED(name) { \
ID_DESC(name), \
.visibility = aa32_id_visibility, \
.val = 0, \
}
/* sys_reg_desc initialiser for writable ID registers */ /* sys_reg_desc initialiser for writable ID registers */
#define ID_WRITABLE(name, mask) { \ #define ID_WRITABLE(name, mask) { \
ID_DESC(name), \ ID_DESC(name), \
.val = mask, \ .val = mask, \
} }
/*
* 32bit ID regs are fully writable when the guest is 32bit
* capable. Nothing in the KVM code should rely on 32bit features
* anyway, only 64bit, so let the VMM do its worse.
*/
#define AA32_ID_WRITABLE(name) { \
ID_DESC(name), \
.visibility = aa32_id_visibility, \
.val = GENMASK(31, 0), \
}
/* sys_reg_desc initialiser for cpufeature ID registers that need filtering */ /* sys_reg_desc initialiser for cpufeature ID registers that need filtering */
#define ID_FILTERED(sysreg, name, mask) { \ #define ID_FILTERED(sysreg, name, mask) { \
ID_DESC(sysreg), \ ID_DESC(sysreg), \
@ -3128,40 +3132,39 @@ static const struct sys_reg_desc sys_reg_descs[] = {
/* AArch64 mappings of the AArch32 ID registers */ /* AArch64 mappings of the AArch32 ID registers */
/* CRm=1 */ /* CRm=1 */
AA32_ID_SANITISED(ID_PFR0_EL1), AA32_ID_WRITABLE(ID_PFR0_EL1),
AA32_ID_SANITISED(ID_PFR1_EL1), AA32_ID_WRITABLE(ID_PFR1_EL1),
{ SYS_DESC(SYS_ID_DFR0_EL1), { SYS_DESC(SYS_ID_DFR0_EL1),
.access = access_id_reg, .access = access_id_reg,
.get_user = get_id_reg, .get_user = get_id_reg,
.set_user = set_id_dfr0_el1, .set_user = set_id_dfr0_el1,
.visibility = aa32_id_visibility, .visibility = aa32_id_visibility,
.reset = read_sanitised_id_dfr0_el1, .reset = read_sanitised_id_dfr0_el1,
.val = ID_DFR0_EL1_PerfMon_MASK | .val = GENMASK(31, 0) },
ID_DFR0_EL1_CopDbg_MASK, },
ID_HIDDEN(ID_AFR0_EL1), ID_HIDDEN(ID_AFR0_EL1),
AA32_ID_SANITISED(ID_MMFR0_EL1), AA32_ID_WRITABLE(ID_MMFR0_EL1),
AA32_ID_SANITISED(ID_MMFR1_EL1), AA32_ID_WRITABLE(ID_MMFR1_EL1),
AA32_ID_SANITISED(ID_MMFR2_EL1), AA32_ID_WRITABLE(ID_MMFR2_EL1),
AA32_ID_SANITISED(ID_MMFR3_EL1), AA32_ID_WRITABLE(ID_MMFR3_EL1),
/* CRm=2 */ /* CRm=2 */
AA32_ID_SANITISED(ID_ISAR0_EL1), AA32_ID_WRITABLE(ID_ISAR0_EL1),
AA32_ID_SANITISED(ID_ISAR1_EL1), AA32_ID_WRITABLE(ID_ISAR1_EL1),
AA32_ID_SANITISED(ID_ISAR2_EL1), AA32_ID_WRITABLE(ID_ISAR2_EL1),
AA32_ID_SANITISED(ID_ISAR3_EL1), AA32_ID_WRITABLE(ID_ISAR3_EL1),
AA32_ID_SANITISED(ID_ISAR4_EL1), AA32_ID_WRITABLE(ID_ISAR4_EL1),
AA32_ID_SANITISED(ID_ISAR5_EL1), AA32_ID_WRITABLE(ID_ISAR5_EL1),
AA32_ID_SANITISED(ID_MMFR4_EL1), AA32_ID_WRITABLE(ID_MMFR4_EL1),
AA32_ID_SANITISED(ID_ISAR6_EL1), AA32_ID_WRITABLE(ID_ISAR6_EL1),
/* CRm=3 */ /* CRm=3 */
AA32_ID_SANITISED(MVFR0_EL1), AA32_ID_WRITABLE(MVFR0_EL1),
AA32_ID_SANITISED(MVFR1_EL1), AA32_ID_WRITABLE(MVFR1_EL1),
AA32_ID_SANITISED(MVFR2_EL1), AA32_ID_WRITABLE(MVFR2_EL1),
ID_UNALLOCATED(3,3), ID_UNALLOCATED(3,3),
AA32_ID_SANITISED(ID_PFR2_EL1), AA32_ID_WRITABLE(ID_PFR2_EL1),
ID_HIDDEN(ID_DFR1_EL1), ID_HIDDEN(ID_DFR1_EL1),
AA32_ID_SANITISED(ID_MMFR5_EL1), AA32_ID_WRITABLE(ID_MMFR5_EL1),
ID_UNALLOCATED(3,7), ID_UNALLOCATED(3,7),
/* AArch64 ID registers */ /* AArch64 ID registers */
@ -5606,11 +5609,13 @@ int kvm_finalize_sys_regs(struct kvm_vcpu *vcpu)
guard(mutex)(&kvm->arch.config_lock); guard(mutex)(&kvm->arch.config_lock);
if (!(static_branch_unlikely(&kvm_vgic_global_state.gicv3_cpuif) && if (!irqchip_in_kernel(kvm)) {
irqchip_in_kernel(kvm) && u64 val;
kvm->arch.vgic.vgic_model == KVM_DEV_TYPE_ARM_VGIC_V3)) {
kvm->arch.id_regs[IDREG_IDX(SYS_ID_AA64PFR0_EL1)] &= ~ID_AA64PFR0_EL1_GIC_MASK; val = kvm_read_vm_id_reg(kvm, SYS_ID_AA64PFR0_EL1) & ~ID_AA64PFR0_EL1_GIC;
kvm->arch.id_regs[IDREG_IDX(SYS_ID_PFR1_EL1)] &= ~ID_PFR1_EL1_GIC_MASK; kvm_set_vm_id_reg(kvm, SYS_ID_AA64PFR0_EL1, val);
val = kvm_read_vm_id_reg(kvm, SYS_ID_PFR1_EL1) & ~ID_PFR1_EL1_GIC;
kvm_set_vm_id_reg(kvm, SYS_ID_PFR1_EL1, val);
} }
if (vcpu_has_nv(vcpu)) { if (vcpu_has_nv(vcpu)) {

View File

@ -64,29 +64,37 @@ static void iter_next(struct kvm *kvm, struct vgic_state_iter *iter)
static int iter_mark_lpis(struct kvm *kvm) static int iter_mark_lpis(struct kvm *kvm)
{ {
struct vgic_dist *dist = &kvm->arch.vgic; struct vgic_dist *dist = &kvm->arch.vgic;
unsigned long intid, flags;
struct vgic_irq *irq; struct vgic_irq *irq;
unsigned long intid;
int nr_lpis = 0; int nr_lpis = 0;
xa_lock_irqsave(&dist->lpi_xa, flags);
xa_for_each(&dist->lpi_xa, intid, irq) { xa_for_each(&dist->lpi_xa, intid, irq) {
if (!vgic_try_get_irq_ref(irq)) if (!vgic_try_get_irq_ref(irq))
continue; continue;
xa_set_mark(&dist->lpi_xa, intid, LPI_XA_MARK_DEBUG_ITER); __xa_set_mark(&dist->lpi_xa, intid, LPI_XA_MARK_DEBUG_ITER);
nr_lpis++; nr_lpis++;
} }
xa_unlock_irqrestore(&dist->lpi_xa, flags);
return nr_lpis; return nr_lpis;
} }
static void iter_unmark_lpis(struct kvm *kvm) static void iter_unmark_lpis(struct kvm *kvm)
{ {
struct vgic_dist *dist = &kvm->arch.vgic; struct vgic_dist *dist = &kvm->arch.vgic;
unsigned long intid, flags;
struct vgic_irq *irq; struct vgic_irq *irq;
unsigned long intid;
xa_for_each_marked(&dist->lpi_xa, intid, irq, LPI_XA_MARK_DEBUG_ITER) { xa_for_each_marked(&dist->lpi_xa, intid, irq, LPI_XA_MARK_DEBUG_ITER) {
xa_clear_mark(&dist->lpi_xa, intid, LPI_XA_MARK_DEBUG_ITER); xa_lock_irqsave(&dist->lpi_xa, flags);
__xa_clear_mark(&dist->lpi_xa, intid, LPI_XA_MARK_DEBUG_ITER);
xa_unlock_irqrestore(&dist->lpi_xa, flags);
/* vgic_put_irq() expects to be called outside of the xa_lock */
vgic_put_irq(kvm, irq); vgic_put_irq(kvm, irq);
} }
} }

View File

@ -53,7 +53,7 @@ void kvm_vgic_early_init(struct kvm *kvm)
{ {
struct vgic_dist *dist = &kvm->arch.vgic; struct vgic_dist *dist = &kvm->arch.vgic;
xa_init(&dist->lpi_xa); xa_init_flags(&dist->lpi_xa, XA_FLAGS_LOCK_IRQ);
} }
/* CREATION */ /* CREATION */
@ -71,6 +71,7 @@ static int vgic_allocate_private_irqs_locked(struct kvm_vcpu *vcpu, u32 type);
int kvm_vgic_create(struct kvm *kvm, u32 type) int kvm_vgic_create(struct kvm *kvm, u32 type)
{ {
struct kvm_vcpu *vcpu; struct kvm_vcpu *vcpu;
u64 aa64pfr0, pfr1;
unsigned long i; unsigned long i;
int ret; int ret;
@ -161,10 +162,19 @@ int kvm_vgic_create(struct kvm *kvm, u32 type)
kvm->arch.vgic.vgic_dist_base = VGIC_ADDR_UNDEF; kvm->arch.vgic.vgic_dist_base = VGIC_ADDR_UNDEF;
if (type == KVM_DEV_TYPE_ARM_VGIC_V2) aa64pfr0 = kvm_read_vm_id_reg(kvm, SYS_ID_AA64PFR0_EL1) & ~ID_AA64PFR0_EL1_GIC;
pfr1 = kvm_read_vm_id_reg(kvm, SYS_ID_PFR1_EL1) & ~ID_PFR1_EL1_GIC;
if (type == KVM_DEV_TYPE_ARM_VGIC_V2) {
kvm->arch.vgic.vgic_cpu_base = VGIC_ADDR_UNDEF; kvm->arch.vgic.vgic_cpu_base = VGIC_ADDR_UNDEF;
else } else {
INIT_LIST_HEAD(&kvm->arch.vgic.rd_regions); INIT_LIST_HEAD(&kvm->arch.vgic.rd_regions);
aa64pfr0 |= SYS_FIELD_PREP_ENUM(ID_AA64PFR0_EL1, GIC, IMP);
pfr1 |= SYS_FIELD_PREP_ENUM(ID_PFR1_EL1, GIC, GICv3);
}
kvm_set_vm_id_reg(kvm, SYS_ID_AA64PFR0_EL1, aa64pfr0);
kvm_set_vm_id_reg(kvm, SYS_ID_PFR1_EL1, pfr1);
if (type == KVM_DEV_TYPE_ARM_VGIC_V3) if (type == KVM_DEV_TYPE_ARM_VGIC_V3)
kvm->arch.vgic.nassgicap = system_supports_direct_sgis(); kvm->arch.vgic.nassgicap = system_supports_direct_sgis();

View File

@ -78,6 +78,7 @@ static struct vgic_irq *vgic_add_lpi(struct kvm *kvm, u32 intid,
{ {
struct vgic_dist *dist = &kvm->arch.vgic; struct vgic_dist *dist = &kvm->arch.vgic;
struct vgic_irq *irq = vgic_get_irq(kvm, intid), *oldirq; struct vgic_irq *irq = vgic_get_irq(kvm, intid), *oldirq;
unsigned long flags;
int ret; int ret;
/* In this case there is no put, since we keep the reference. */ /* In this case there is no put, since we keep the reference. */
@ -88,7 +89,7 @@ static struct vgic_irq *vgic_add_lpi(struct kvm *kvm, u32 intid,
if (!irq) if (!irq)
return ERR_PTR(-ENOMEM); return ERR_PTR(-ENOMEM);
ret = xa_reserve(&dist->lpi_xa, intid, GFP_KERNEL_ACCOUNT); ret = xa_reserve_irq(&dist->lpi_xa, intid, GFP_KERNEL_ACCOUNT);
if (ret) { if (ret) {
kfree(irq); kfree(irq);
return ERR_PTR(ret); return ERR_PTR(ret);
@ -103,7 +104,7 @@ static struct vgic_irq *vgic_add_lpi(struct kvm *kvm, u32 intid,
irq->target_vcpu = vcpu; irq->target_vcpu = vcpu;
irq->group = 1; irq->group = 1;
xa_lock(&dist->lpi_xa); xa_lock_irqsave(&dist->lpi_xa, flags);
/* /*
* There could be a race with another vgic_add_lpi(), so we need to * There could be a race with another vgic_add_lpi(), so we need to
@ -114,21 +115,18 @@ static struct vgic_irq *vgic_add_lpi(struct kvm *kvm, u32 intid,
/* Someone was faster with adding this LPI, lets use that. */ /* Someone was faster with adding this LPI, lets use that. */
kfree(irq); kfree(irq);
irq = oldirq; irq = oldirq;
} else {
goto out_unlock; ret = xa_err(__xa_store(&dist->lpi_xa, intid, irq, 0));
} }
ret = xa_err(__xa_store(&dist->lpi_xa, intid, irq, 0)); xa_unlock_irqrestore(&dist->lpi_xa, flags);
if (ret) { if (ret) {
xa_release(&dist->lpi_xa, intid); xa_release(&dist->lpi_xa, intid);
kfree(irq); kfree(irq);
}
out_unlock:
xa_unlock(&dist->lpi_xa);
if (ret)
return ERR_PTR(ret); return ERR_PTR(ret);
}
/* /*
* We "cache" the configuration table entries in our struct vgic_irq's. * We "cache" the configuration table entries in our struct vgic_irq's.

View File

@ -301,7 +301,8 @@ void vcpu_set_ich_hcr(struct kvm_vcpu *vcpu)
return; return;
/* Hide GICv3 sysreg if necessary */ /* Hide GICv3 sysreg if necessary */
if (vcpu->kvm->arch.vgic.vgic_model == KVM_DEV_TYPE_ARM_VGIC_V2) { if (vcpu->kvm->arch.vgic.vgic_model == KVM_DEV_TYPE_ARM_VGIC_V2 ||
!irqchip_in_kernel(vcpu->kvm)) {
vgic_v3->vgic_hcr |= (ICH_HCR_EL2_TALL0 | ICH_HCR_EL2_TALL1 | vgic_v3->vgic_hcr |= (ICH_HCR_EL2_TALL0 | ICH_HCR_EL2_TALL1 |
ICH_HCR_EL2_TC); ICH_HCR_EL2_TC);
return; return;

View File

@ -28,7 +28,7 @@ struct vgic_global kvm_vgic_global_state __ro_after_init = {
* kvm->arch.config_lock (mutex) * kvm->arch.config_lock (mutex)
* its->cmd_lock (mutex) * its->cmd_lock (mutex)
* its->its_lock (mutex) * its->its_lock (mutex)
* vgic_dist->lpi_xa.xa_lock * vgic_dist->lpi_xa.xa_lock must be taken with IRQs disabled
* vgic_cpu->ap_list_lock must be taken with IRQs disabled * vgic_cpu->ap_list_lock must be taken with IRQs disabled
* vgic_irq->irq_lock must be taken with IRQs disabled * vgic_irq->irq_lock must be taken with IRQs disabled
* *
@ -141,32 +141,39 @@ static __must_check bool vgic_put_irq_norelease(struct kvm *kvm, struct vgic_irq
void vgic_put_irq(struct kvm *kvm, struct vgic_irq *irq) void vgic_put_irq(struct kvm *kvm, struct vgic_irq *irq)
{ {
struct vgic_dist *dist = &kvm->arch.vgic; struct vgic_dist *dist = &kvm->arch.vgic;
unsigned long flags;
if (irq->intid >= VGIC_MIN_LPI) /*
might_lock(&dist->lpi_xa.xa_lock); * Normally the lock is only taken when the refcount drops to 0.
* Acquire/release it early on lockdep kernels to make locking issues
* in rare release paths a bit more obvious.
*/
if (IS_ENABLED(CONFIG_LOCKDEP) && irq->intid >= VGIC_MIN_LPI) {
guard(spinlock_irqsave)(&dist->lpi_xa.xa_lock);
}
if (!__vgic_put_irq(kvm, irq)) if (!__vgic_put_irq(kvm, irq))
return; return;
xa_lock(&dist->lpi_xa); xa_lock_irqsave(&dist->lpi_xa, flags);
vgic_release_lpi_locked(dist, irq); vgic_release_lpi_locked(dist, irq);
xa_unlock(&dist->lpi_xa); xa_unlock_irqrestore(&dist->lpi_xa, flags);
} }
static void vgic_release_deleted_lpis(struct kvm *kvm) static void vgic_release_deleted_lpis(struct kvm *kvm)
{ {
struct vgic_dist *dist = &kvm->arch.vgic; struct vgic_dist *dist = &kvm->arch.vgic;
unsigned long intid; unsigned long flags, intid;
struct vgic_irq *irq; struct vgic_irq *irq;
xa_lock(&dist->lpi_xa); xa_lock_irqsave(&dist->lpi_xa, flags);
xa_for_each(&dist->lpi_xa, intid, irq) { xa_for_each(&dist->lpi_xa, intid, irq) {
if (irq->pending_release) if (irq->pending_release)
vgic_release_lpi_locked(dist, irq); vgic_release_lpi_locked(dist, irq);
} }
xa_unlock(&dist->lpi_xa); xa_unlock_irqrestore(&dist->lpi_xa, flags);
} }
void vgic_flush_pending_lpis(struct kvm_vcpu *vcpu) void vgic_flush_pending_lpis(struct kvm_vcpu *vcpu)

View File

@ -35,7 +35,7 @@ void copy_highpage(struct page *to, struct page *from)
from != folio_page(src, 0)) from != folio_page(src, 0))
return; return;
WARN_ON_ONCE(!folio_try_hugetlb_mte_tagging(dst)); folio_try_hugetlb_mte_tagging(dst);
/* /*
* Populate tags for all subpages. * Populate tags for all subpages.
@ -51,8 +51,13 @@ void copy_highpage(struct page *to, struct page *from)
} }
folio_set_hugetlb_mte_tagged(dst); folio_set_hugetlb_mte_tagged(dst);
} else if (page_mte_tagged(from)) { } else if (page_mte_tagged(from)) {
/* It's a new page, shouldn't have been tagged yet */ /*
WARN_ON_ONCE(!try_page_mte_tagging(to)); * Most of the time it's a new page that shouldn't have been
* tagged yet. However, folio migration can end up reusing the
* same page without untagging it. Ignore the warning if the
* page is already tagged.
*/
try_page_mte_tagging(to);
mte_copy_page_tags(kto, kfrom); mte_copy_page_tags(kto, kfrom);
set_page_mte_tagged(to); set_page_mte_tagged(to);

View File

@ -969,6 +969,16 @@ struct folio *vma_alloc_zeroed_movable_folio(struct vm_area_struct *vma,
void tag_clear_highpage(struct page *page) void tag_clear_highpage(struct page *page)
{ {
/*
* Check if MTE is supported and fall back to clear_highpage().
* get_huge_zero_folio() unconditionally passes __GFP_ZEROTAGS and
* post_alloc_hook() will invoke tag_clear_highpage().
*/
if (!system_supports_mte()) {
clear_highpage(page);
return;
}
/* Newly allocated page, shouldn't have been tagged yet */ /* Newly allocated page, shouldn't have been tagged yet */
WARN_ON_ONCE(!try_page_mte_tagging(page)); WARN_ON_ONCE(!try_page_mte_tagging(page));
mte_zero_clear_page_tags(page_address(page)); mte_zero_clear_page_tags(page_address(page));

View File

@ -708,6 +708,30 @@ static int split_kernel_leaf_mapping_locked(unsigned long addr)
return ret; return ret;
} }
static inline bool force_pte_mapping(void)
{
const bool bbml2 = system_capabilities_finalized() ?
system_supports_bbml2_noabort() : cpu_supports_bbml2_noabort();
if (debug_pagealloc_enabled())
return true;
if (bbml2)
return false;
return rodata_full || arm64_kfence_can_set_direct_map() || is_realm_world();
}
static inline bool split_leaf_mapping_possible(void)
{
/*
* !BBML2_NOABORT systems should never run into scenarios where we would
* have to split. So exit early and let calling code detect it and raise
* a warning.
*/
if (!system_supports_bbml2_noabort())
return false;
return !force_pte_mapping();
}
static DEFINE_MUTEX(pgtable_split_lock); static DEFINE_MUTEX(pgtable_split_lock);
int split_kernel_leaf_mapping(unsigned long start, unsigned long end) int split_kernel_leaf_mapping(unsigned long start, unsigned long end)
@ -715,12 +739,11 @@ int split_kernel_leaf_mapping(unsigned long start, unsigned long end)
int ret; int ret;
/* /*
* !BBML2_NOABORT systems should not be trying to change permissions on * Exit early if the region is within a pte-mapped area or if we can't
* anything that is not pte-mapped in the first place. Just return early * split. For the latter case, the permission change code will raise a
* and let the permission change code raise a warning if not already * warning if not already pte-mapped.
* pte-mapped.
*/ */
if (!system_supports_bbml2_noabort()) if (!split_leaf_mapping_possible() || is_kfence_address((void *)start))
return 0; return 0;
/* /*
@ -758,30 +781,30 @@ int split_kernel_leaf_mapping(unsigned long start, unsigned long end)
return ret; return ret;
} }
static int __init split_to_ptes_pud_entry(pud_t *pudp, unsigned long addr, static int split_to_ptes_pud_entry(pud_t *pudp, unsigned long addr,
unsigned long next, unsigned long next, struct mm_walk *walk)
struct mm_walk *walk)
{ {
gfp_t gfp = *(gfp_t *)walk->private;
pud_t pud = pudp_get(pudp); pud_t pud = pudp_get(pudp);
int ret = 0; int ret = 0;
if (pud_leaf(pud)) if (pud_leaf(pud))
ret = split_pud(pudp, pud, GFP_ATOMIC, false); ret = split_pud(pudp, pud, gfp, false);
return ret; return ret;
} }
static int __init split_to_ptes_pmd_entry(pmd_t *pmdp, unsigned long addr, static int split_to_ptes_pmd_entry(pmd_t *pmdp, unsigned long addr,
unsigned long next, unsigned long next, struct mm_walk *walk)
struct mm_walk *walk)
{ {
gfp_t gfp = *(gfp_t *)walk->private;
pmd_t pmd = pmdp_get(pmdp); pmd_t pmd = pmdp_get(pmdp);
int ret = 0; int ret = 0;
if (pmd_leaf(pmd)) { if (pmd_leaf(pmd)) {
if (pmd_cont(pmd)) if (pmd_cont(pmd))
split_contpmd(pmdp); split_contpmd(pmdp);
ret = split_pmd(pmdp, pmd, GFP_ATOMIC, false); ret = split_pmd(pmdp, pmd, gfp, false);
/* /*
* We have split the pmd directly to ptes so there is no need to * We have split the pmd directly to ptes so there is no need to
@ -793,9 +816,8 @@ static int __init split_to_ptes_pmd_entry(pmd_t *pmdp, unsigned long addr,
return ret; return ret;
} }
static int __init split_to_ptes_pte_entry(pte_t *ptep, unsigned long addr, static int split_to_ptes_pte_entry(pte_t *ptep, unsigned long addr,
unsigned long next, unsigned long next, struct mm_walk *walk)
struct mm_walk *walk)
{ {
pte_t pte = __ptep_get(ptep); pte_t pte = __ptep_get(ptep);
@ -805,12 +827,24 @@ static int __init split_to_ptes_pte_entry(pte_t *ptep, unsigned long addr,
return 0; return 0;
} }
static const struct mm_walk_ops split_to_ptes_ops __initconst = { static const struct mm_walk_ops split_to_ptes_ops = {
.pud_entry = split_to_ptes_pud_entry, .pud_entry = split_to_ptes_pud_entry,
.pmd_entry = split_to_ptes_pmd_entry, .pmd_entry = split_to_ptes_pmd_entry,
.pte_entry = split_to_ptes_pte_entry, .pte_entry = split_to_ptes_pte_entry,
}; };
static int range_split_to_ptes(unsigned long start, unsigned long end, gfp_t gfp)
{
int ret;
arch_enter_lazy_mmu_mode();
ret = walk_kernel_page_table_range_lockless(start, end,
&split_to_ptes_ops, NULL, &gfp);
arch_leave_lazy_mmu_mode();
return ret;
}
static bool linear_map_requires_bbml2 __initdata; static bool linear_map_requires_bbml2 __initdata;
u32 idmap_kpti_bbml2_flag; u32 idmap_kpti_bbml2_flag;
@ -847,11 +881,9 @@ static int __init linear_map_split_to_ptes(void *__unused)
* PTE. The kernel alias remains static throughout runtime so * PTE. The kernel alias remains static throughout runtime so
* can continue to be safely mapped with large mappings. * can continue to be safely mapped with large mappings.
*/ */
ret = walk_kernel_page_table_range_lockless(lstart, kstart, ret = range_split_to_ptes(lstart, kstart, GFP_ATOMIC);
&split_to_ptes_ops, NULL, NULL);
if (!ret) if (!ret)
ret = walk_kernel_page_table_range_lockless(kend, lend, ret = range_split_to_ptes(kend, lend, GFP_ATOMIC);
&split_to_ptes_ops, NULL, NULL);
if (ret) if (ret)
panic("Failed to split linear map\n"); panic("Failed to split linear map\n");
flush_tlb_kernel_range(lstart, lend); flush_tlb_kernel_range(lstart, lend);
@ -1002,6 +1034,33 @@ static void __init arm64_kfence_map_pool(phys_addr_t kfence_pool, pgd_t *pgdp)
memblock_clear_nomap(kfence_pool, KFENCE_POOL_SIZE); memblock_clear_nomap(kfence_pool, KFENCE_POOL_SIZE);
__kfence_pool = phys_to_virt(kfence_pool); __kfence_pool = phys_to_virt(kfence_pool);
} }
bool arch_kfence_init_pool(void)
{
unsigned long start = (unsigned long)__kfence_pool;
unsigned long end = start + KFENCE_POOL_SIZE;
int ret;
/* Exit early if we know the linear map is already pte-mapped. */
if (!split_leaf_mapping_possible())
return true;
/* Kfence pool is already pte-mapped for the early init case. */
if (kfence_early_init)
return true;
mutex_lock(&pgtable_split_lock);
ret = range_split_to_ptes(start, end, GFP_PGTABLE_KERNEL);
mutex_unlock(&pgtable_split_lock);
/*
* Since the system supports bbml2_noabort, tlb invalidation is not
* required here; the pgtable mappings have been split to pte but larger
* entries may safely linger in the TLB.
*/
return !ret;
}
#else /* CONFIG_KFENCE */ #else /* CONFIG_KFENCE */
static inline phys_addr_t arm64_kfence_alloc_pool(void) { return 0; } static inline phys_addr_t arm64_kfence_alloc_pool(void) { return 0; }
@ -1009,16 +1068,6 @@ static inline void arm64_kfence_map_pool(phys_addr_t kfence_pool, pgd_t *pgdp) {
#endif /* CONFIG_KFENCE */ #endif /* CONFIG_KFENCE */
static inline bool force_pte_mapping(void)
{
bool bbml2 = system_capabilities_finalized() ?
system_supports_bbml2_noabort() : cpu_supports_bbml2_noabort();
return (!bbml2 && (rodata_full || arm64_kfence_can_set_direct_map() ||
is_realm_world())) ||
debug_pagealloc_enabled();
}
static void __init map_mem(pgd_t *pgdp) static void __init map_mem(pgd_t *pgdp)
{ {
static const u64 direct_map_end = _PAGE_END(VA_BITS_MIN); static const u64 direct_map_end = _PAGE_END(VA_BITS_MIN);

View File

@ -1213,6 +1213,7 @@ static int build_insn(const struct bpf_insn *insn, struct jit_ctx *ctx,
u8 src = bpf2a64[insn->src_reg]; u8 src = bpf2a64[insn->src_reg];
const u8 tmp = bpf2a64[TMP_REG_1]; const u8 tmp = bpf2a64[TMP_REG_1];
const u8 tmp2 = bpf2a64[TMP_REG_2]; const u8 tmp2 = bpf2a64[TMP_REG_2];
const u8 tmp3 = bpf2a64[TMP_REG_3];
const u8 fp = bpf2a64[BPF_REG_FP]; const u8 fp = bpf2a64[BPF_REG_FP];
const u8 arena_vm_base = bpf2a64[ARENA_VM_START]; const u8 arena_vm_base = bpf2a64[ARENA_VM_START];
const u8 priv_sp = bpf2a64[PRIVATE_SP]; const u8 priv_sp = bpf2a64[PRIVATE_SP];
@ -1757,8 +1758,8 @@ static int build_insn(const struct bpf_insn *insn, struct jit_ctx *ctx,
case BPF_ST | BPF_PROBE_MEM32 | BPF_W: case BPF_ST | BPF_PROBE_MEM32 | BPF_W:
case BPF_ST | BPF_PROBE_MEM32 | BPF_DW: case BPF_ST | BPF_PROBE_MEM32 | BPF_DW:
if (BPF_MODE(insn->code) == BPF_PROBE_MEM32) { if (BPF_MODE(insn->code) == BPF_PROBE_MEM32) {
emit(A64_ADD(1, tmp2, dst, arena_vm_base), ctx); emit(A64_ADD(1, tmp3, dst, arena_vm_base), ctx);
dst = tmp2; dst = tmp3;
} }
if (dst == fp) { if (dst == fp) {
dst_adj = ctx->priv_sp_used ? priv_sp : A64_SP; dst_adj = ctx->priv_sp_used ? priv_sp : A64_SP;

View File

@ -21,7 +21,7 @@ void update_mmu_cache_range(struct vm_fault *vmf, struct vm_area_struct *vma,
folio = page_folio(pfn_to_page(pfn)); folio = page_folio(pfn_to_page(pfn));
if (test_and_set_bit(PG_dcache_clean, &folio->flags)) if (test_and_set_bit(PG_dcache_clean, &folio->flags.f))
return; return;
icache_inv_range(address, address + nr*PAGE_SIZE); icache_inv_range(address, address + nr*PAGE_SIZE);

View File

@ -20,8 +20,8 @@
static inline void flush_dcache_folio(struct folio *folio) static inline void flush_dcache_folio(struct folio *folio)
{ {
if (test_bit(PG_dcache_clean, &folio->flags)) if (test_bit(PG_dcache_clean, &folio->flags.f))
clear_bit(PG_dcache_clean, &folio->flags); clear_bit(PG_dcache_clean, &folio->flags.f);
} }
#define flush_dcache_folio flush_dcache_folio #define flush_dcache_folio flush_dcache_folio

View File

@ -109,7 +109,7 @@ endif
ifdef CONFIG_RUSTC_HAS_ANNOTATE_TABLEJUMP ifdef CONFIG_RUSTC_HAS_ANNOTATE_TABLEJUMP
KBUILD_RUSTFLAGS += -Cllvm-args=--loongarch-annotate-tablejump KBUILD_RUSTFLAGS += -Cllvm-args=--loongarch-annotate-tablejump
else else
KBUILD_RUSTFLAGS += -Zno-jump-tables # keep compatibility with older compilers KBUILD_RUSTFLAGS += $(if $(call rustc-min-version,109300),-Cjump-tables=n,-Zno-jump-tables) # keep compatibility with older compilers
endif endif
ifdef CONFIG_LTO_CLANG ifdef CONFIG_LTO_CLANG
# The annotate-tablejump option can not be passed to LLVM backend when LTO is enabled. # The annotate-tablejump option can not be passed to LLVM backend when LTO is enabled.

View File

@ -67,6 +67,8 @@
#define cpu_has_hypervisor cpu_opt(LOONGARCH_CPU_HYPERVISOR) #define cpu_has_hypervisor cpu_opt(LOONGARCH_CPU_HYPERVISOR)
#define cpu_has_ptw cpu_opt(LOONGARCH_CPU_PTW) #define cpu_has_ptw cpu_opt(LOONGARCH_CPU_PTW)
#define cpu_has_lspw cpu_opt(LOONGARCH_CPU_LSPW) #define cpu_has_lspw cpu_opt(LOONGARCH_CPU_LSPW)
#define cpu_has_msgint cpu_opt(LOONGARCH_CPU_MSGINT)
#define cpu_has_avecint cpu_opt(LOONGARCH_CPU_AVECINT) #define cpu_has_avecint cpu_opt(LOONGARCH_CPU_AVECINT)
#define cpu_has_redirectint cpu_opt(LOONGARCH_CPU_REDIRECTINT)
#endif /* __ASM_CPU_FEATURES_H */ #endif /* __ASM_CPU_FEATURES_H */

View File

@ -101,7 +101,9 @@ enum cpu_type_enum {
#define CPU_FEATURE_HYPERVISOR 26 /* CPU has hypervisor (running in VM) */ #define CPU_FEATURE_HYPERVISOR 26 /* CPU has hypervisor (running in VM) */
#define CPU_FEATURE_PTW 27 /* CPU has hardware page table walker */ #define CPU_FEATURE_PTW 27 /* CPU has hardware page table walker */
#define CPU_FEATURE_LSPW 28 /* CPU has LSPW (lddir/ldpte instructions) */ #define CPU_FEATURE_LSPW 28 /* CPU has LSPW (lddir/ldpte instructions) */
#define CPU_FEATURE_AVECINT 29 /* CPU has AVEC interrupt */ #define CPU_FEATURE_MSGINT 29 /* CPU has MSG interrupt */
#define CPU_FEATURE_AVECINT 30 /* CPU has AVEC interrupt */
#define CPU_FEATURE_REDIRECTINT 31 /* CPU has interrupt remapping */
#define LOONGARCH_CPU_CPUCFG BIT_ULL(CPU_FEATURE_CPUCFG) #define LOONGARCH_CPU_CPUCFG BIT_ULL(CPU_FEATURE_CPUCFG)
#define LOONGARCH_CPU_LAM BIT_ULL(CPU_FEATURE_LAM) #define LOONGARCH_CPU_LAM BIT_ULL(CPU_FEATURE_LAM)
@ -132,6 +134,8 @@ enum cpu_type_enum {
#define LOONGARCH_CPU_HYPERVISOR BIT_ULL(CPU_FEATURE_HYPERVISOR) #define LOONGARCH_CPU_HYPERVISOR BIT_ULL(CPU_FEATURE_HYPERVISOR)
#define LOONGARCH_CPU_PTW BIT_ULL(CPU_FEATURE_PTW) #define LOONGARCH_CPU_PTW BIT_ULL(CPU_FEATURE_PTW)
#define LOONGARCH_CPU_LSPW BIT_ULL(CPU_FEATURE_LSPW) #define LOONGARCH_CPU_LSPW BIT_ULL(CPU_FEATURE_LSPW)
#define LOONGARCH_CPU_MSGINT BIT_ULL(CPU_FEATURE_MSGINT)
#define LOONGARCH_CPU_AVECINT BIT_ULL(CPU_FEATURE_AVECINT) #define LOONGARCH_CPU_AVECINT BIT_ULL(CPU_FEATURE_AVECINT)
#define LOONGARCH_CPU_REDIRECTINT BIT_ULL(CPU_FEATURE_REDIRECTINT)
#endif /* _ASM_CPU_H */ #endif /* _ASM_CPU_H */

View File

@ -134,13 +134,13 @@ static inline void hw_breakpoint_thread_switch(struct task_struct *next)
/* Determine number of BRP registers available. */ /* Determine number of BRP registers available. */
static inline int get_num_brps(void) static inline int get_num_brps(void)
{ {
return csr_read64(LOONGARCH_CSR_FWPC) & CSR_FWPC_NUM; return csr_read32(LOONGARCH_CSR_FWPC) & CSR_FWPC_NUM;
} }
/* Determine number of WRP registers available. */ /* Determine number of WRP registers available. */
static inline int get_num_wrps(void) static inline int get_num_wrps(void)
{ {
return csr_read64(LOONGARCH_CSR_MWPC) & CSR_MWPC_NUM; return csr_read32(LOONGARCH_CSR_MWPC) & CSR_MWPC_NUM;
} }
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */

View File

@ -14,7 +14,7 @@
#include <asm/pgtable-bits.h> #include <asm/pgtable-bits.h>
#include <asm/string.h> #include <asm/string.h>
extern void __init __iomem *early_ioremap(u64 phys_addr, unsigned long size); extern void __init __iomem *early_ioremap(phys_addr_t phys_addr, unsigned long size);
extern void __init early_iounmap(void __iomem *addr, unsigned long size); extern void __init early_iounmap(void __iomem *addr, unsigned long size);
#define early_memremap early_ioremap #define early_memremap early_ioremap
@ -25,6 +25,9 @@ extern void __init early_iounmap(void __iomem *addr, unsigned long size);
static inline void __iomem *ioremap_prot(phys_addr_t offset, unsigned long size, static inline void __iomem *ioremap_prot(phys_addr_t offset, unsigned long size,
pgprot_t prot) pgprot_t prot)
{ {
if (offset > TO_PHYS_MASK)
return NULL;
switch (pgprot_val(prot) & _CACHE_MASK) { switch (pgprot_val(prot) & _CACHE_MASK) {
case _CACHE_CC: case _CACHE_CC:
return (void __iomem *)(unsigned long)(CACHE_BASE + offset); return (void __iomem *)(unsigned long)(CACHE_BASE + offset);

View File

@ -128,6 +128,7 @@
#define CPUCFG6_PMNUM GENMASK(7, 4) #define CPUCFG6_PMNUM GENMASK(7, 4)
#define CPUCFG6_PMNUM_SHIFT 4 #define CPUCFG6_PMNUM_SHIFT 4
#define CPUCFG6_PMBITS GENMASK(13, 8) #define CPUCFG6_PMBITS GENMASK(13, 8)
#define CPUCFG6_PMBITS_SHIFT 8
#define CPUCFG6_UPM BIT(14) #define CPUCFG6_UPM BIT(14)
#define LOONGARCH_CPUCFG16 0x10 #define LOONGARCH_CPUCFG16 0x10
@ -1137,6 +1138,7 @@
#define IOCSRF_FLATMODE BIT_ULL(10) #define IOCSRF_FLATMODE BIT_ULL(10)
#define IOCSRF_VM BIT_ULL(11) #define IOCSRF_VM BIT_ULL(11)
#define IOCSRF_AVEC BIT_ULL(15) #define IOCSRF_AVEC BIT_ULL(15)
#define IOCSRF_REDIRECT BIT_ULL(16)
#define LOONGARCH_IOCSR_VENDOR 0x10 #define LOONGARCH_IOCSR_VENDOR 0x10

View File

@ -88,7 +88,7 @@ static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long address)
static inline pud_t *pud_alloc_one(struct mm_struct *mm, unsigned long address) static inline pud_t *pud_alloc_one(struct mm_struct *mm, unsigned long address)
{ {
pud_t *pud; pud_t *pud;
struct ptdesc *ptdesc = pagetable_alloc(GFP_KERNEL & ~__GFP_HIGHMEM, 0); struct ptdesc *ptdesc = pagetable_alloc(GFP_KERNEL, 0);
if (!ptdesc) if (!ptdesc)
return NULL; return NULL;

View File

@ -424,6 +424,9 @@ static inline unsigned long pte_accessible(struct mm_struct *mm, pte_t a)
static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
{ {
if (pte_val(pte) & _PAGE_DIRTY)
pte_val(pte) |= _PAGE_MODIFIED;
return __pte((pte_val(pte) & _PAGE_CHG_MASK) | return __pte((pte_val(pte) & _PAGE_CHG_MASK) |
(pgprot_val(newprot) & ~_PAGE_CHG_MASK)); (pgprot_val(newprot) & ~_PAGE_CHG_MASK));
} }
@ -547,9 +550,11 @@ static inline struct page *pmd_page(pmd_t pmd)
static inline pmd_t pmd_modify(pmd_t pmd, pgprot_t newprot) static inline pmd_t pmd_modify(pmd_t pmd, pgprot_t newprot)
{ {
pmd_val(pmd) = (pmd_val(pmd) & _HPAGE_CHG_MASK) | if (pmd_val(pmd) & _PAGE_DIRTY)
(pgprot_val(newprot) & ~_HPAGE_CHG_MASK); pmd_val(pmd) |= _PAGE_MODIFIED;
return pmd;
return __pmd((pmd_val(pmd) & _HPAGE_CHG_MASK) |
(pgprot_val(newprot) & ~_HPAGE_CHG_MASK));
} }
static inline pmd_t pmd_mkinvalid(pmd_t pmd) static inline pmd_t pmd_mkinvalid(pmd_t pmd)

View File

@ -157,6 +157,8 @@ static void cpu_probe_common(struct cpuinfo_loongarch *c)
c->options |= LOONGARCH_CPU_TLB; c->options |= LOONGARCH_CPU_TLB;
if (config & CPUCFG1_IOCSR) if (config & CPUCFG1_IOCSR)
c->options |= LOONGARCH_CPU_IOCSR; c->options |= LOONGARCH_CPU_IOCSR;
if (config & CPUCFG1_MSGINT)
c->options |= LOONGARCH_CPU_MSGINT;
if (config & CPUCFG1_UAL) { if (config & CPUCFG1_UAL) {
c->options |= LOONGARCH_CPU_UAL; c->options |= LOONGARCH_CPU_UAL;
elf_hwcap |= HWCAP_LOONGARCH_UAL; elf_hwcap |= HWCAP_LOONGARCH_UAL;
@ -331,6 +333,8 @@ static inline void cpu_probe_loongson(struct cpuinfo_loongarch *c, unsigned int
c->options |= LOONGARCH_CPU_EIODECODE; c->options |= LOONGARCH_CPU_EIODECODE;
if (config & IOCSRF_AVEC) if (config & IOCSRF_AVEC)
c->options |= LOONGARCH_CPU_AVECINT; c->options |= LOONGARCH_CPU_AVECINT;
if (config & IOCSRF_REDIRECT)
c->options |= LOONGARCH_CPU_REDIRECTINT;
if (config & IOCSRF_VM) if (config & IOCSRF_VM)
c->options |= LOONGARCH_CPU_HYPERVISOR; c->options |= LOONGARCH_CPU_HYPERVISOR;
} }

View File

@ -42,7 +42,7 @@ static void *efi_kexec_load(struct kimage *image,
{ {
int ret; int ret;
unsigned long text_offset, kernel_segment_number; unsigned long text_offset, kernel_segment_number;
struct kexec_buf kbuf; struct kexec_buf kbuf = {};
struct kexec_segment *kernel_segment; struct kexec_segment *kernel_segment;
struct loongarch_image_header *h; struct loongarch_image_header *h;

View File

@ -59,7 +59,7 @@ static void *elf_kexec_load(struct kimage *image,
int ret; int ret;
unsigned long text_offset, kernel_segment_number; unsigned long text_offset, kernel_segment_number;
struct elfhdr ehdr; struct elfhdr ehdr;
struct kexec_buf kbuf; struct kexec_buf kbuf = {};
struct kexec_elf_info elf_info; struct kexec_elf_info elf_info;
struct kexec_segment *kernel_segment; struct kexec_segment *kernel_segment;

View File

@ -39,34 +39,12 @@ static unsigned long systable_ptr;
static unsigned long start_addr; static unsigned long start_addr;
static unsigned long first_ind_entry; static unsigned long first_ind_entry;
static void kexec_image_info(const struct kimage *kimage)
{
unsigned long i;
pr_debug("kexec kimage info:\n");
pr_debug("\ttype: %d\n", kimage->type);
pr_debug("\tstart: %lx\n", kimage->start);
pr_debug("\thead: %lx\n", kimage->head);
pr_debug("\tnr_segments: %lu\n", kimage->nr_segments);
for (i = 0; i < kimage->nr_segments; i++) {
pr_debug("\t segment[%lu]: %016lx - %016lx", i,
kimage->segment[i].mem,
kimage->segment[i].mem + kimage->segment[i].memsz);
pr_debug("\t\t0x%lx bytes, %lu pages\n",
(unsigned long)kimage->segment[i].memsz,
(unsigned long)kimage->segment[i].memsz / PAGE_SIZE);
}
}
int machine_kexec_prepare(struct kimage *kimage) int machine_kexec_prepare(struct kimage *kimage)
{ {
int i; int i;
char *bootloader = "kexec"; char *bootloader = "kexec";
void *cmdline_ptr = (void *)KEXEC_CMDLINE_ADDR; void *cmdline_ptr = (void *)KEXEC_CMDLINE_ADDR;
kexec_image_info(kimage);
kimage->arch.efi_boot = fw_arg0; kimage->arch.efi_boot = fw_arg0;
kimage->arch.systable_ptr = fw_arg2; kimage->arch.systable_ptr = fw_arg2;

View File

@ -143,7 +143,7 @@ int load_other_segments(struct kimage *image,
unsigned long initrd_load_addr = 0; unsigned long initrd_load_addr = 0;
unsigned long orig_segments = image->nr_segments; unsigned long orig_segments = image->nr_segments;
char *modified_cmdline = NULL; char *modified_cmdline = NULL;
struct kexec_buf kbuf; struct kexec_buf kbuf = {};
kbuf.image = image; kbuf.image = image;
/* Don't allocate anything below the kernel */ /* Don't allocate anything below the kernel */

View File

@ -13,7 +13,7 @@
void __init memblock_init(void) void __init memblock_init(void)
{ {
u32 mem_type; u32 mem_type;
u64 mem_start, mem_end, mem_size; u64 mem_start, mem_size;
efi_memory_desc_t *md; efi_memory_desc_t *md;
/* Parse memory information */ /* Parse memory information */
@ -21,7 +21,6 @@ void __init memblock_init(void)
mem_type = md->type; mem_type = md->type;
mem_start = md->phys_addr; mem_start = md->phys_addr;
mem_size = md->num_pages << EFI_PAGE_SHIFT; mem_size = md->num_pages << EFI_PAGE_SHIFT;
mem_end = mem_start + mem_size;
switch (mem_type) { switch (mem_type) {
case EFI_LOADER_CODE: case EFI_LOADER_CODE:
@ -31,8 +30,6 @@ void __init memblock_init(void)
case EFI_PERSISTENT_MEMORY: case EFI_PERSISTENT_MEMORY:
case EFI_CONVENTIONAL_MEMORY: case EFI_CONVENTIONAL_MEMORY:
memblock_add(mem_start, mem_size); memblock_add(mem_start, mem_size);
if (max_low_pfn < (mem_end >> PAGE_SHIFT))
max_low_pfn = mem_end >> PAGE_SHIFT;
break; break;
case EFI_PAL_CODE: case EFI_PAL_CODE:
case EFI_UNUSABLE_MEMORY: case EFI_UNUSABLE_MEMORY:
@ -49,6 +46,8 @@ void __init memblock_init(void)
} }
} }
max_pfn = PFN_DOWN(memblock_end_of_DRAM());
max_low_pfn = min(PFN_DOWN(HIGHMEM_START), max_pfn);
memblock_set_current_limit(PFN_PHYS(max_low_pfn)); memblock_set_current_limit(PFN_PHYS(max_low_pfn));
/* Reserve the first 2MB */ /* Reserve the first 2MB */

View File

@ -272,7 +272,8 @@ int __init init_numa_memory(void)
node_mem_init(node); node_mem_init(node);
node_set_online(node); node_set_online(node);
} }
max_low_pfn = PHYS_PFN(memblock_end_of_DRAM()); max_pfn = PFN_DOWN(memblock_end_of_DRAM());
max_low_pfn = min(PFN_DOWN(HIGHMEM_START), max_pfn);
setup_nr_node_ids(); setup_nr_node_ids();
loongson_sysconf.nr_nodes = nr_node_ids; loongson_sysconf.nr_nodes = nr_node_ids;
@ -283,26 +284,6 @@ int __init init_numa_memory(void)
#endif #endif
void __init paging_init(void)
{
unsigned int node;
unsigned long zones_size[MAX_NR_ZONES] = {0, };
for_each_online_node(node) {
unsigned long start_pfn, end_pfn;
get_pfn_range_for_nid(node, &start_pfn, &end_pfn);
if (end_pfn > max_low_pfn)
max_low_pfn = end_pfn;
}
#ifdef CONFIG_ZONE_DMA32
zones_size[ZONE_DMA32] = MAX_DMA32_PFN;
#endif
zones_size[ZONE_NORMAL] = max_low_pfn;
free_area_init(zones_size);
}
int pcibus_to_node(struct pci_bus *bus) int pcibus_to_node(struct pci_bus *bus)
{ {
return dev_to_node(&bus->dev); return dev_to_node(&bus->dev);

View File

@ -845,13 +845,14 @@ static const struct loongarch_perf_event *loongarch_pmu_map_raw_event(u64 config
static int __init init_hw_perf_events(void) static int __init init_hw_perf_events(void)
{ {
int counters; int bits, counters;
if (!cpu_has_pmp) if (!cpu_has_pmp)
return -ENODEV; return -ENODEV;
pr_info("Performance counters: "); pr_info("Performance counters: ");
counters = ((read_cpucfg(LOONGARCH_CPUCFG6) & CPUCFG6_PMNUM) >> 4) + 1; bits = ((read_cpucfg(LOONGARCH_CPUCFG6) & CPUCFG6_PMBITS) >> CPUCFG6_PMBITS_SHIFT) + 1;
counters = ((read_cpucfg(LOONGARCH_CPUCFG6) & CPUCFG6_PMNUM) >> CPUCFG6_PMNUM_SHIFT) + 1;
loongarch_pmu.num_counters = counters; loongarch_pmu.num_counters = counters;
loongarch_pmu.max_period = (1ULL << 63) - 1; loongarch_pmu.max_period = (1ULL << 63) - 1;
@ -867,7 +868,7 @@ static int __init init_hw_perf_events(void)
on_each_cpu(reset_counters, NULL, 1); on_each_cpu(reset_counters, NULL, 1);
pr_cont("%s PMU enabled, %d %d-bit counters available to each CPU.\n", pr_cont("%s PMU enabled, %d %d-bit counters available to each CPU.\n",
loongarch_pmu.name, counters, 64); loongarch_pmu.name, counters, bits);
perf_pmu_register(&pmu, "cpu", PERF_TYPE_RAW); perf_pmu_register(&pmu, "cpu", PERF_TYPE_RAW);

View File

@ -294,8 +294,6 @@ static void __init fdt_setup(void)
early_init_dt_scan(fdt_pointer, __pa(fdt_pointer)); early_init_dt_scan(fdt_pointer, __pa(fdt_pointer));
early_init_fdt_reserve_self(); early_init_fdt_reserve_self();
max_low_pfn = PFN_PHYS(memblock_end_of_DRAM());
#endif #endif
} }
@ -390,7 +388,8 @@ static void __init check_kernel_sections_mem(void)
static void __init arch_mem_init(char **cmdline_p) static void __init arch_mem_init(char **cmdline_p)
{ {
/* Recalculate max_low_pfn for "mem=xxx" */ /* Recalculate max_low_pfn for "mem=xxx" */
max_pfn = max_low_pfn = PHYS_PFN(memblock_end_of_DRAM()); max_pfn = PFN_DOWN(memblock_end_of_DRAM());
max_low_pfn = min(PFN_DOWN(HIGHMEM_START), max_pfn);
if (usermem) if (usermem)
pr_info("User-defined physical RAM map overwrite\n"); pr_info("User-defined physical RAM map overwrite\n");

View File

@ -1131,8 +1131,8 @@ static void configure_exception_vector(void)
tlbrentry = (unsigned long)exception_handlers + 80*VECSIZE; tlbrentry = (unsigned long)exception_handlers + 80*VECSIZE;
csr_write64(eentry, LOONGARCH_CSR_EENTRY); csr_write64(eentry, LOONGARCH_CSR_EENTRY);
csr_write64(eentry, LOONGARCH_CSR_MERRENTRY); csr_write64(__pa(eentry), LOONGARCH_CSR_MERRENTRY);
csr_write64(tlbrentry, LOONGARCH_CSR_TLBRENTRY); csr_write64(__pa(tlbrentry), LOONGARCH_CSR_TLBRENTRY);
} }
void per_cpu_trap_init(int cpu) void per_cpu_trap_init(int cpu)

View File

@ -439,7 +439,7 @@ static int kvm_eiointc_ctrl_access(struct kvm_device *dev,
spin_lock_irqsave(&s->lock, flags); spin_lock_irqsave(&s->lock, flags);
switch (type) { switch (type) {
case KVM_DEV_LOONGARCH_EXTIOI_CTRL_INIT_NUM_CPU: case KVM_DEV_LOONGARCH_EXTIOI_CTRL_INIT_NUM_CPU:
if (val >= EIOINTC_ROUTE_MAX_VCPUS) if (val > EIOINTC_ROUTE_MAX_VCPUS)
ret = -EINVAL; ret = -EINVAL;
else else
s->num_cpu = val; s->num_cpu = val;

View File

@ -857,7 +857,7 @@ static int kvm_map_page(struct kvm_vcpu *vcpu, unsigned long gpa, bool write)
if (writeable) { if (writeable) {
prot_bits = kvm_pte_mkwriteable(prot_bits); prot_bits = kvm_pte_mkwriteable(prot_bits);
if (write) if (write || !kvm_slot_dirty_track_enabled(memslot))
prot_bits = kvm_pte_mkdirty(prot_bits); prot_bits = kvm_pte_mkdirty(prot_bits);
} }

View File

@ -4,6 +4,7 @@
*/ */
#include <linux/kvm_host.h> #include <linux/kvm_host.h>
#include <asm/delay.h>
#include <asm/kvm_csr.h> #include <asm/kvm_csr.h>
#include <asm/kvm_vcpu.h> #include <asm/kvm_vcpu.h>
@ -95,6 +96,7 @@ void kvm_restore_timer(struct kvm_vcpu *vcpu)
* and set CSR TVAL with -1 * and set CSR TVAL with -1
*/ */
write_gcsr_timertick(0); write_gcsr_timertick(0);
__delay(2); /* Wait cycles until timer interrupt injected */
/* /*
* Writing CSR_TINTCLR_TI to LOONGARCH_CSR_TINTCLR will clear * Writing CSR_TINTCLR_TI to LOONGARCH_CSR_TINTCLR will clear

View File

@ -132,6 +132,9 @@ static void kvm_lose_pmu(struct kvm_vcpu *vcpu)
* Clear KVM_LARCH_PMU if the guest is not using PMU CSRs when * Clear KVM_LARCH_PMU if the guest is not using PMU CSRs when
* exiting the guest, so that the next time trap into the guest. * exiting the guest, so that the next time trap into the guest.
* We don't need to deal with PMU CSRs contexts. * We don't need to deal with PMU CSRs contexts.
*
* Otherwise set the request bit KVM_REQ_PMU to restore guest PMU
* before entering guest VM
*/ */
val = kvm_read_sw_gcsr(csr, LOONGARCH_CSR_PERFCTRL0); val = kvm_read_sw_gcsr(csr, LOONGARCH_CSR_PERFCTRL0);
val |= kvm_read_sw_gcsr(csr, LOONGARCH_CSR_PERFCTRL1); val |= kvm_read_sw_gcsr(csr, LOONGARCH_CSR_PERFCTRL1);
@ -139,16 +142,12 @@ static void kvm_lose_pmu(struct kvm_vcpu *vcpu)
val |= kvm_read_sw_gcsr(csr, LOONGARCH_CSR_PERFCTRL3); val |= kvm_read_sw_gcsr(csr, LOONGARCH_CSR_PERFCTRL3);
if (!(val & KVM_PMU_EVENT_ENABLED)) if (!(val & KVM_PMU_EVENT_ENABLED))
vcpu->arch.aux_inuse &= ~KVM_LARCH_PMU; vcpu->arch.aux_inuse &= ~KVM_LARCH_PMU;
else
kvm_make_request(KVM_REQ_PMU, vcpu);
kvm_restore_host_pmu(vcpu); kvm_restore_host_pmu(vcpu);
} }
static void kvm_restore_pmu(struct kvm_vcpu *vcpu)
{
if ((vcpu->arch.aux_inuse & KVM_LARCH_PMU))
kvm_make_request(KVM_REQ_PMU, vcpu);
}
static void kvm_check_pmu(struct kvm_vcpu *vcpu) static void kvm_check_pmu(struct kvm_vcpu *vcpu)
{ {
if (kvm_check_request(KVM_REQ_PMU, vcpu)) { if (kvm_check_request(KVM_REQ_PMU, vcpu)) {
@ -299,7 +298,10 @@ static int kvm_pre_enter_guest(struct kvm_vcpu *vcpu)
vcpu->arch.aux_inuse &= ~KVM_LARCH_SWCSR_LATEST; vcpu->arch.aux_inuse &= ~KVM_LARCH_SWCSR_LATEST;
if (kvm_request_pending(vcpu) || xfer_to_guest_mode_work_pending()) { if (kvm_request_pending(vcpu) || xfer_to_guest_mode_work_pending()) {
if (vcpu->arch.aux_inuse & KVM_LARCH_PMU) {
kvm_lose_pmu(vcpu); kvm_lose_pmu(vcpu);
kvm_make_request(KVM_REQ_PMU, vcpu);
}
/* make sure the vcpu mode has been written */ /* make sure the vcpu mode has been written */
smp_store_mb(vcpu->mode, OUTSIDE_GUEST_MODE); smp_store_mb(vcpu->mode, OUTSIDE_GUEST_MODE);
local_irq_enable(); local_irq_enable();
@ -1604,9 +1606,6 @@ static int _kvm_vcpu_load(struct kvm_vcpu *vcpu, int cpu)
kvm_restore_timer(vcpu); kvm_restore_timer(vcpu);
kvm_make_request(KVM_REQ_STEAL_UPDATE, vcpu); kvm_make_request(KVM_REQ_STEAL_UPDATE, vcpu);
/* Restore hardware PMU CSRs */
kvm_restore_pmu(vcpu);
/* Don't bother restoring registers multiple times unless necessary */ /* Don't bother restoring registers multiple times unless necessary */
if (vcpu->arch.aux_inuse & KVM_LARCH_HWCSR_USABLE) if (vcpu->arch.aux_inuse & KVM_LARCH_HWCSR_USABLE)
return 0; return 0;

View File

@ -60,7 +60,6 @@ int __ref page_is_ram(unsigned long pfn)
return memblock_is_memory(addr) && !memblock_is_reserved(addr); return memblock_is_memory(addr) && !memblock_is_reserved(addr);
} }
#ifndef CONFIG_NUMA
void __init paging_init(void) void __init paging_init(void)
{ {
unsigned long max_zone_pfns[MAX_NR_ZONES]; unsigned long max_zone_pfns[MAX_NR_ZONES];
@ -72,7 +71,6 @@ void __init paging_init(void)
free_area_init(max_zone_pfns); free_area_init(max_zone_pfns);
} }
#endif /* !CONFIG_NUMA */
void __ref free_initmem(void) void __ref free_initmem(void)
{ {

View File

@ -6,7 +6,7 @@
#include <asm/io.h> #include <asm/io.h>
#include <asm-generic/early_ioremap.h> #include <asm-generic/early_ioremap.h>
void __init __iomem *early_ioremap(u64 phys_addr, unsigned long size) void __init __iomem *early_ioremap(phys_addr_t phys_addr, unsigned long size)
{ {
return ((void __iomem *)TO_CACHE(phys_addr)); return ((void __iomem *)TO_CACHE(phys_addr));
} }

View File

@ -47,7 +47,7 @@ static struct resource standard_io_resources[] = {
.name = "keyboard", .name = "keyboard",
.start = 0x60, .start = 0x60,
.end = 0x6f, .end = 0x6f,
.flags = IORESOURCE_IO | IORESOURCE_BUSY .flags = IORESOURCE_IO
}, },
{ {
.name = "dma page reg", .name = "dma page reg",
@ -213,7 +213,7 @@ void __init plat_mem_setup(void)
/* Request I/O space for devices used on the Malta board. */ /* Request I/O space for devices used on the Malta board. */
for (i = 0; i < ARRAY_SIZE(standard_io_resources); i++) for (i = 0; i < ARRAY_SIZE(standard_io_resources); i++)
request_resource(&ioport_resource, standard_io_resources+i); insert_resource(&ioport_resource, standard_io_resources + i);
/* /*
* Enable DMA channel 4 (cascade channel) in the PIIX4 south bridge. * Enable DMA channel 4 (cascade channel) in the PIIX4 south bridge.

View File

@ -230,8 +230,7 @@ void __init mips_pcibios_init(void)
} }
/* PIIX4 ACPI starts at 0x1000 */ /* PIIX4 ACPI starts at 0x1000 */
if (controller->io_resource->start < 0x00001000UL) PCIBIOS_MIN_IO = 0x1000;
controller->io_resource->start = 0x00001000UL;
iomem_resource.end &= 0xfffffffffULL; /* 64 GB */ iomem_resource.end &= 0xfffffffffULL; /* 64 GB */
ioport_resource.end = controller->io_resource->end; ioport_resource.end = controller->io_resource->end;

View File

@ -35,6 +35,8 @@
#define KERNEL_START (KERNEL_BINARY_TEXT_START) #define KERNEL_START (KERNEL_BINARY_TEXT_START)
#define ALIGNMENT_OK(ptr, type) (((ptr) & (sizeof(type) - 1)) == 0)
extern struct unwind_table_entry __start___unwind[]; extern struct unwind_table_entry __start___unwind[];
extern struct unwind_table_entry __stop___unwind[]; extern struct unwind_table_entry __stop___unwind[];
@ -257,12 +259,15 @@ static int unwind_special(struct unwind_frame_info *info, unsigned long pc, int
if (pc_is_kernel_fn(pc, _switch_to) || if (pc_is_kernel_fn(pc, _switch_to) ||
pc == (unsigned long)&_switch_to_ret) { pc == (unsigned long)&_switch_to_ret) {
info->prev_sp = info->sp - CALLEE_SAVE_FRAME_SIZE; info->prev_sp = info->sp - CALLEE_SAVE_FRAME_SIZE;
if (ALIGNMENT_OK(info->prev_sp, long))
info->prev_ip = *(unsigned long *)(info->prev_sp - RP_OFFSET); info->prev_ip = *(unsigned long *)(info->prev_sp - RP_OFFSET);
else
info->prev_ip = info->prev_sp = 0;
return 1; return 1;
} }
#ifdef CONFIG_IRQSTACKS #ifdef CONFIG_IRQSTACKS
if (pc == (unsigned long)&_call_on_stack) { if (pc == (unsigned long)&_call_on_stack && ALIGNMENT_OK(info->sp, long)) {
info->prev_sp = *(unsigned long *)(info->sp - FRAME_SIZE - REG_SZ); info->prev_sp = *(unsigned long *)(info->sp - FRAME_SIZE - REG_SZ);
info->prev_ip = *(unsigned long *)(info->sp - FRAME_SIZE - RP_OFFSET); info->prev_ip = *(unsigned long *)(info->sp - FRAME_SIZE - RP_OFFSET);
return 1; return 1;
@ -370,8 +375,10 @@ static void unwind_frame_regs(struct unwind_frame_info *info)
info->prev_sp = info->sp - frame_size; info->prev_sp = info->sp - frame_size;
if (e->Millicode) if (e->Millicode)
info->rp = info->r31; info->rp = info->r31;
else if (rpoffset) else if (rpoffset && ALIGNMENT_OK(info->prev_sp, long))
info->rp = *(unsigned long *)(info->prev_sp - rpoffset); info->rp = *(unsigned long *)(info->prev_sp - rpoffset);
else
info->rp = 0;
info->prev_ip = info->rp; info->prev_ip = info->rp;
info->rp = 0; info->rp = 0;
} }

View File

@ -137,6 +137,7 @@ config PPC
select ARCH_HAS_DMA_OPS if PPC64 select ARCH_HAS_DMA_OPS if PPC64
select ARCH_HAS_FORTIFY_SOURCE select ARCH_HAS_FORTIFY_SOURCE
select ARCH_HAS_GCOV_PROFILE_ALL select ARCH_HAS_GCOV_PROFILE_ALL
select ARCH_HAS_GIGANTIC_PAGE if ARCH_SUPPORTS_HUGETLBFS
select ARCH_HAS_KCOV select ARCH_HAS_KCOV
select ARCH_HAS_KERNEL_FPU_SUPPORT if PPC64 && PPC_FPU select ARCH_HAS_KERNEL_FPU_SUPPORT if PPC64 && PPC_FPU
select ARCH_HAS_MEMBARRIER_CALLBACKS select ARCH_HAS_MEMBARRIER_CALLBACKS

View File

@ -423,7 +423,6 @@ config PPC_64S_HASH_MMU
config PPC_RADIX_MMU config PPC_RADIX_MMU
bool "Radix MMU Support" bool "Radix MMU Support"
depends on PPC_BOOK3S_64 depends on PPC_BOOK3S_64
select ARCH_HAS_GIGANTIC_PAGE
default y default y
help help
Enable support for the Power ISA 3.0 Radix style MMU. Currently this Enable support for the Power ISA 3.0 Radix style MMU. Currently this

View File

@ -367,7 +367,7 @@ config RISCV_NONSTANDARD_CACHE_OPS
systems to handle cache management. systems to handle cache management.
config AS_HAS_INSN config AS_HAS_INSN
def_bool $(as-instr,.insn r 51$(comma) 0$(comma) 0$(comma) t0$(comma) t0$(comma) zero) def_bool $(as-instr,.insn 0x100000f)
config AS_HAS_OPTION_ARCH config AS_HAS_OPTION_ARCH
# https://github.com/llvm/llvm-project/commit/9e8ed3403c191ab9c4903e8eeb8f732ff8a43cb4 # https://github.com/llvm/llvm-project/commit/9e8ed3403c191ab9c4903e8eeb8f732ff8a43cb4

View File

@ -134,21 +134,6 @@ endif
CHECKFLAGS += -D__riscv -D__riscv_xlen=$(BITS) CHECKFLAGS += -D__riscv -D__riscv_xlen=$(BITS)
# Default target when executing plain make # Default target when executing plain make
boot := arch/riscv/boot
ifeq ($(CONFIG_XIP_KERNEL),y)
KBUILD_IMAGE := $(boot)/xipImage
else
ifeq ($(CONFIG_RISCV_M_MODE)$(CONFIG_SOC_CANAAN_K210),yy)
KBUILD_IMAGE := $(boot)/loader.bin
else
ifeq ($(CONFIG_EFI_ZBOOT),)
KBUILD_IMAGE := $(boot)/Image.gz
else
KBUILD_IMAGE := $(boot)/vmlinuz.efi
endif
endif
endif
boot := arch/riscv/boot boot := arch/riscv/boot
boot-image-y := Image boot-image-y := Image
boot-image-$(CONFIG_KERNEL_BZIP2) := Image.bz2 boot-image-$(CONFIG_KERNEL_BZIP2) := Image.bz2
@ -159,7 +144,7 @@ boot-image-$(CONFIG_KERNEL_LZO) := Image.lzo
boot-image-$(CONFIG_KERNEL_ZSTD) := Image.zst boot-image-$(CONFIG_KERNEL_ZSTD) := Image.zst
boot-image-$(CONFIG_KERNEL_XZ) := Image.xz boot-image-$(CONFIG_KERNEL_XZ) := Image.xz
ifdef CONFIG_RISCV_M_MODE ifdef CONFIG_RISCV_M_MODE
boot-image-$(CONFIG_ARCH_CANAAN) := loader.bin boot-image-$(CONFIG_SOC_CANAAN_K210) := loader.bin
endif endif
boot-image-$(CONFIG_EFI_ZBOOT) := vmlinuz.efi boot-image-$(CONFIG_EFI_ZBOOT) := vmlinuz.efi
boot-image-$(CONFIG_XIP_KERNEL) := xipImage boot-image-$(CONFIG_XIP_KERNEL) := xipImage

View File

@ -12,6 +12,12 @@
#define __ASM_STR(x) #x #define __ASM_STR(x) #x
#endif #endif
#ifdef CONFIG_AS_HAS_INSN
#define ASM_INSN_I(__x) ".insn " __x
#else
#define ASM_INSN_I(__x) ".4byte " __x
#endif
#if __riscv_xlen == 64 #if __riscv_xlen == 64
#define __REG_SEL(a, b) __ASM_STR(a) #define __REG_SEL(a, b) __ASM_STR(a)
#elif __riscv_xlen == 32 #elif __riscv_xlen == 32
@ -84,15 +90,9 @@
.endm .endm
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
#ifdef CONFIG_32BIT
#define PER_CPU_OFFSET_SHIFT 2
#else
#define PER_CPU_OFFSET_SHIFT 3
#endif
.macro asm_per_cpu dst sym tmp .macro asm_per_cpu dst sym tmp
lw \tmp, TASK_TI_CPU_NUM(tp) lw \tmp, TASK_TI_CPU_NUM(tp)
slli \tmp, \tmp, PER_CPU_OFFSET_SHIFT slli \tmp, \tmp, RISCV_LGPTR
la \dst, __per_cpu_offset la \dst, __per_cpu_offset
add \dst, \dst, \tmp add \dst, \dst, \tmp
REG_L \tmp, 0(\dst) REG_L \tmp, 0(\dst)

Some files were not shown because too many files have changed in this diff Show More