mirror of
https://github.com/Qortal/Brooklyn.git
synced 2025-02-14 19:25:53 +00:00
Elon Musk is a prick
This commit is contained in:
parent
7e1e2419d7
commit
f324dbe328
@ -33,6 +33,13 @@ Description:
|
|||||||
frequency adjustment value (a positive integer) in
|
frequency adjustment value (a positive integer) in
|
||||||
parts per billion.
|
parts per billion.
|
||||||
|
|
||||||
|
What: /sys/class/ptp/ptpN/max_vclocks
|
||||||
|
Date: May 2021
|
||||||
|
Contact: Yangbo Lu <yangbo.lu@nxp.com>
|
||||||
|
Description:
|
||||||
|
This file contains the maximum number of ptp vclocks.
|
||||||
|
Write integer to re-configure it.
|
||||||
|
|
||||||
What: /sys/class/ptp/ptpN/n_alarms
|
What: /sys/class/ptp/ptpN/n_alarms
|
||||||
Date: September 2010
|
Date: September 2010
|
||||||
Contact: Richard Cochran <richardcochran@gmail.com>
|
Contact: Richard Cochran <richardcochran@gmail.com>
|
||||||
@ -61,6 +68,19 @@ Description:
|
|||||||
This file contains the number of programmable pins
|
This file contains the number of programmable pins
|
||||||
offered by the PTP hardware clock.
|
offered by the PTP hardware clock.
|
||||||
|
|
||||||
|
What: /sys/class/ptp/ptpN/n_vclocks
|
||||||
|
Date: May 2021
|
||||||
|
Contact: Yangbo Lu <yangbo.lu@nxp.com>
|
||||||
|
Description:
|
||||||
|
This file contains the number of virtual PTP clocks in
|
||||||
|
use. By default, the value is 0 meaning that only the
|
||||||
|
physical clock is in use. Setting the value creates
|
||||||
|
the corresponding number of virtual clocks and causes
|
||||||
|
the physical clock to become free running. Setting the
|
||||||
|
value back to 0 deletes the virtual clocks and
|
||||||
|
switches the physical clock back to normal, adjustable
|
||||||
|
operation.
|
||||||
|
|
||||||
What: /sys/class/ptp/ptpN/pins
|
What: /sys/class/ptp/ptpN/pins
|
||||||
Date: March 2014
|
Date: March 2014
|
||||||
Contact: Richard Cochran <richardcochran@gmail.com>
|
Contact: Richard Cochran <richardcochran@gmail.com>
|
||||||
|
@ -86,19 +86,7 @@ Generating code coverage reports under UML
|
|||||||
.. note::
|
.. note::
|
||||||
TODO(brendanhiggins@google.com): There are various issues with UML and
|
TODO(brendanhiggins@google.com): There are various issues with UML and
|
||||||
versions of gcc 7 and up. You're likely to run into missing ``.gcda``
|
versions of gcc 7 and up. You're likely to run into missing ``.gcda``
|
||||||
files or compile errors. We know one `faulty GCC commit
|
files or compile errors.
|
||||||
<https://github.com/gcc-mirror/gcc/commit/8c9434c2f9358b8b8bad2c1990edf10a21645f9d>`_
|
|
||||||
but not how we'd go about getting this fixed. The compile errors still
|
|
||||||
need some investigation.
|
|
||||||
|
|
||||||
.. note::
|
|
||||||
TODO(brendanhiggins@google.com): for recent versions of Linux
|
|
||||||
(5.10-5.12, maybe earlier), there's a bug with gcov counters not being
|
|
||||||
flushed in UML. This translates to very low (<1%) reported coverage. This is
|
|
||||||
related to the above issue and can be worked around by replacing the
|
|
||||||
one call to ``uml_abort()`` (it's in ``os_dump_core()``) with a plain
|
|
||||||
``exit()``.
|
|
||||||
|
|
||||||
|
|
||||||
This is different from the "normal" way of getting coverage information that is
|
This is different from the "normal" way of getting coverage information that is
|
||||||
documented in Documentation/dev-tools/gcov.rst.
|
documented in Documentation/dev-tools/gcov.rst.
|
||||||
|
@ -50,7 +50,6 @@ properties:
|
|||||||
|
|
||||||
reg:
|
reg:
|
||||||
minItems: 1
|
minItems: 1
|
||||||
maxItems: 3
|
|
||||||
items:
|
items:
|
||||||
- description: base register
|
- description: base register
|
||||||
- description: power register
|
- description: power register
|
||||||
|
@ -92,7 +92,6 @@ required:
|
|||||||
- reg
|
- reg
|
||||||
- clocks
|
- clocks
|
||||||
- interrupts
|
- interrupts
|
||||||
- resets
|
|
||||||
- ports
|
- ports
|
||||||
|
|
||||||
allOf:
|
allOf:
|
||||||
|
@ -39,17 +39,7 @@ properties:
|
|||||||
reg:
|
reg:
|
||||||
maxItems: 1
|
maxItems: 1
|
||||||
|
|
||||||
patternProperties:
|
adi,pwm-active-state:
|
||||||
"^adi,bypass-attenuator-in[0-4]$":
|
|
||||||
description: |
|
|
||||||
Configures bypassing the individual voltage input attenuator. If
|
|
||||||
set to 1 the attenuator is bypassed if set to 0 the attenuator is
|
|
||||||
not bypassed. If the property is absent then the attenuator
|
|
||||||
retains it's configuration from the bios/bootloader.
|
|
||||||
$ref: /schemas/types.yaml#/definitions/uint32
|
|
||||||
enum: [0, 1]
|
|
||||||
|
|
||||||
"^adi,pwm-active-state$":
|
|
||||||
description: |
|
description: |
|
||||||
Integer array, represents the active state of the pwm outputs If set to 0
|
Integer array, represents the active state of the pwm outputs If set to 0
|
||||||
the pwm uses a logic low output for 100% duty cycle. If set to 1 the pwm
|
the pwm uses a logic low output for 100% duty cycle. If set to 1 the pwm
|
||||||
@ -61,6 +51,16 @@ patternProperties:
|
|||||||
enum: [0, 1]
|
enum: [0, 1]
|
||||||
default: 1
|
default: 1
|
||||||
|
|
||||||
|
patternProperties:
|
||||||
|
"^adi,bypass-attenuator-in[0-4]$":
|
||||||
|
description: |
|
||||||
|
Configures bypassing the individual voltage input attenuator. If
|
||||||
|
set to 1 the attenuator is bypassed if set to 0 the attenuator is
|
||||||
|
not bypassed. If the property is absent then the attenuator
|
||||||
|
retains it's configuration from the bios/bootloader.
|
||||||
|
$ref: /schemas/types.yaml#/definitions/uint32
|
||||||
|
enum: [0, 1]
|
||||||
|
|
||||||
required:
|
required:
|
||||||
- compatible
|
- compatible
|
||||||
- reg
|
- reg
|
||||||
|
@ -52,16 +52,14 @@ properties:
|
|||||||
items:
|
items:
|
||||||
- const: marvell,ap806-smmu-500
|
- const: marvell,ap806-smmu-500
|
||||||
- const: arm,mmu-500
|
- const: arm,mmu-500
|
||||||
- description: NVIDIA SoCs that program two ARM MMU-500s identically
|
|
||||||
items:
|
|
||||||
- description: NVIDIA SoCs that require memory controller interaction
|
- description: NVIDIA SoCs that require memory controller interaction
|
||||||
and may program multiple ARM MMU-500s identically with the memory
|
and may program multiple ARM MMU-500s identically with the memory
|
||||||
controller interleaving translations between multiple instances
|
controller interleaving translations between multiple instances
|
||||||
for improved performance.
|
for improved performance.
|
||||||
items:
|
items:
|
||||||
- enum:
|
- enum:
|
||||||
- const: nvidia,tegra194-smmu
|
- nvidia,tegra194-smmu
|
||||||
- const: nvidia,tegra186-smmu
|
- nvidia,tegra186-smmu
|
||||||
- const: nvidia,smmu-500
|
- const: nvidia,smmu-500
|
||||||
- items:
|
- items:
|
||||||
- const: arm,mmu-500
|
- const: arm,mmu-500
|
||||||
|
@ -28,14 +28,12 @@ properties:
|
|||||||
- description: configuration registers for MMU instance 0
|
- description: configuration registers for MMU instance 0
|
||||||
- description: configuration registers for MMU instance 1
|
- description: configuration registers for MMU instance 1
|
||||||
minItems: 1
|
minItems: 1
|
||||||
maxItems: 2
|
|
||||||
|
|
||||||
interrupts:
|
interrupts:
|
||||||
items:
|
items:
|
||||||
- description: interruption for MMU instance 0
|
- description: interruption for MMU instance 0
|
||||||
- description: interruption for MMU instance 1
|
- description: interruption for MMU instance 1
|
||||||
minItems: 1
|
minItems: 1
|
||||||
maxItems: 2
|
|
||||||
|
|
||||||
clocks:
|
clocks:
|
||||||
items:
|
items:
|
||||||
|
@ -57,7 +57,6 @@ properties:
|
|||||||
|
|
||||||
ranges:
|
ranges:
|
||||||
minItems: 1
|
minItems: 1
|
||||||
maxItems: 3
|
|
||||||
description: |
|
description: |
|
||||||
Memory bus areas for interacting with the devices. Reflects
|
Memory bus areas for interacting with the devices. Reflects
|
||||||
the memory layout with four integer values following:
|
the memory layout with four integer values following:
|
||||||
|
@ -84,7 +84,6 @@ properties:
|
|||||||
|
|
||||||
interrupts:
|
interrupts:
|
||||||
minItems: 1
|
minItems: 1
|
||||||
maxItems: 3
|
|
||||||
items:
|
items:
|
||||||
- description: NAND CTLRDY interrupt
|
- description: NAND CTLRDY interrupt
|
||||||
- description: FLASH_DMA_DONE if flash DMA is available
|
- description: FLASH_DMA_DONE if flash DMA is available
|
||||||
@ -92,7 +91,6 @@ properties:
|
|||||||
|
|
||||||
interrupt-names:
|
interrupt-names:
|
||||||
minItems: 1
|
minItems: 1
|
||||||
maxItems: 3
|
|
||||||
items:
|
items:
|
||||||
- const: nand_ctlrdy
|
- const: nand_ctlrdy
|
||||||
- const: flash_dma_done
|
- const: flash_dma_done
|
||||||
@ -148,8 +146,6 @@ allOf:
|
|||||||
then:
|
then:
|
||||||
properties:
|
properties:
|
||||||
reg-names:
|
reg-names:
|
||||||
minItems: 2
|
|
||||||
maxItems: 2
|
|
||||||
items:
|
items:
|
||||||
- const: nand
|
- const: nand
|
||||||
- const: nand-int-base
|
- const: nand-int-base
|
||||||
@ -161,8 +157,6 @@ allOf:
|
|||||||
then:
|
then:
|
||||||
properties:
|
properties:
|
||||||
reg-names:
|
reg-names:
|
||||||
minItems: 3
|
|
||||||
maxItems: 3
|
|
||||||
items:
|
items:
|
||||||
- const: nand
|
- const: nand
|
||||||
- const: nand-int-base
|
- const: nand-int-base
|
||||||
@ -175,8 +169,6 @@ allOf:
|
|||||||
then:
|
then:
|
||||||
properties:
|
properties:
|
||||||
reg-names:
|
reg-names:
|
||||||
minItems: 3
|
|
||||||
maxItems: 3
|
|
||||||
items:
|
items:
|
||||||
- const: nand
|
- const: nand
|
||||||
- const: iproc-idm
|
- const: iproc-idm
|
||||||
|
@ -67,8 +67,8 @@ properties:
|
|||||||
reg:
|
reg:
|
||||||
oneOf:
|
oneOf:
|
||||||
- enum:
|
- enum:
|
||||||
- 0
|
- 0
|
||||||
- 1
|
- 1
|
||||||
|
|
||||||
required:
|
required:
|
||||||
- compatible
|
- compatible
|
||||||
|
@ -13,7 +13,7 @@ Documentation/devicetree/bindings/memory-controllers/omap-gpmc.txt
|
|||||||
|
|
||||||
For the properties relevant to the ethernet controller connected to the GPMC
|
For the properties relevant to the ethernet controller connected to the GPMC
|
||||||
refer to the binding documentation of the device. For example, the documentation
|
refer to the binding documentation of the device. For example, the documentation
|
||||||
for the SMSC 911x is Documentation/devicetree/bindings/net/smsc911x.txt
|
for the SMSC 911x is Documentation/devicetree/bindings/net/smsc,lan9115.yaml
|
||||||
|
|
||||||
Child nodes need to specify the GPMC bus address width using the "bank-width"
|
Child nodes need to specify the GPMC bus address width using the "bank-width"
|
||||||
property but is possible that an ethernet controller also has a property to
|
property but is possible that an ethernet controller also has a property to
|
||||||
|
110
Documentation/devicetree/bindings/net/smsc,lan9115.yaml
Normal file
110
Documentation/devicetree/bindings/net/smsc,lan9115.yaml
Normal file
@ -0,0 +1,110 @@
|
|||||||
|
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||||
|
%YAML 1.2
|
||||||
|
---
|
||||||
|
$id: http://devicetree.org/schemas/net/smsc,lan9115.yaml#
|
||||||
|
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||||
|
|
||||||
|
title: Smart Mixed-Signal Connectivity (SMSC) LAN911x/912x Controller
|
||||||
|
|
||||||
|
maintainers:
|
||||||
|
- Shawn Guo <shawnguo@kernel.org>
|
||||||
|
|
||||||
|
allOf:
|
||||||
|
- $ref: ethernet-controller.yaml#
|
||||||
|
|
||||||
|
properties:
|
||||||
|
compatible:
|
||||||
|
oneOf:
|
||||||
|
- const: smsc,lan9115
|
||||||
|
- items:
|
||||||
|
- enum:
|
||||||
|
- smsc,lan89218
|
||||||
|
- smsc,lan9117
|
||||||
|
- smsc,lan9118
|
||||||
|
- smsc,lan9220
|
||||||
|
- smsc,lan9221
|
||||||
|
- const: smsc,lan9115
|
||||||
|
|
||||||
|
reg:
|
||||||
|
maxItems: 1
|
||||||
|
|
||||||
|
reg-shift: true
|
||||||
|
|
||||||
|
reg-io-width:
|
||||||
|
enum: [ 2, 4 ]
|
||||||
|
default: 2
|
||||||
|
|
||||||
|
interrupts:
|
||||||
|
minItems: 1
|
||||||
|
items:
|
||||||
|
- description:
|
||||||
|
LAN interrupt line
|
||||||
|
- description:
|
||||||
|
Optional PME (power management event) interrupt that is able to wake
|
||||||
|
up the host system with a 50ms pulse on network activity
|
||||||
|
|
||||||
|
clocks:
|
||||||
|
maxItems: 1
|
||||||
|
|
||||||
|
phy-mode: true
|
||||||
|
|
||||||
|
smsc,irq-active-high:
|
||||||
|
type: boolean
|
||||||
|
description: Indicates the IRQ polarity is active-high
|
||||||
|
|
||||||
|
smsc,irq-push-pull:
|
||||||
|
type: boolean
|
||||||
|
description: Indicates the IRQ type is push-pull
|
||||||
|
|
||||||
|
smsc,force-internal-phy:
|
||||||
|
type: boolean
|
||||||
|
description: Forces SMSC LAN controller to use internal PHY
|
||||||
|
|
||||||
|
smsc,force-external-phy:
|
||||||
|
type: boolean
|
||||||
|
description: Forces SMSC LAN controller to use external PHY
|
||||||
|
|
||||||
|
smsc,save-mac-address:
|
||||||
|
type: boolean
|
||||||
|
description:
|
||||||
|
Indicates that MAC address needs to be saved before resetting the
|
||||||
|
controller
|
||||||
|
|
||||||
|
reset-gpios:
|
||||||
|
maxItems: 1
|
||||||
|
description:
|
||||||
|
A GPIO line connected to the RESET (active low) signal of the device.
|
||||||
|
On many systems this is wired high so the device goes out of reset at
|
||||||
|
power-on, but if it is under program control, this optional GPIO can
|
||||||
|
wake up in response to it.
|
||||||
|
|
||||||
|
vdd33a-supply:
|
||||||
|
description: 3.3V analog power supply
|
||||||
|
|
||||||
|
vddvario-supply:
|
||||||
|
description: IO logic power supply
|
||||||
|
|
||||||
|
required:
|
||||||
|
- compatible
|
||||||
|
- reg
|
||||||
|
- interrupts
|
||||||
|
|
||||||
|
# There are lots of bus-specific properties ("qcom,*", "samsung,*", "fsl,*",
|
||||||
|
# "gpmc,*", ...) to be found, that actually depend on the compatible value of
|
||||||
|
# the parent node.
|
||||||
|
additionalProperties: true
|
||||||
|
|
||||||
|
examples:
|
||||||
|
- |
|
||||||
|
#include <dt-bindings/gpio/gpio.h>
|
||||||
|
|
||||||
|
ethernet@f4000000 {
|
||||||
|
compatible = "smsc,lan9220", "smsc,lan9115";
|
||||||
|
reg = <0xf4000000 0x2000000>;
|
||||||
|
phy-mode = "mii";
|
||||||
|
interrupt-parent = <&gpio1>;
|
||||||
|
interrupts = <31>, <32>;
|
||||||
|
reset-gpios = <&gpio1 30 GPIO_ACTIVE_LOW>;
|
||||||
|
reg-io-width = <4>;
|
||||||
|
smsc,irq-push-pull;
|
||||||
|
};
|
@ -77,6 +77,34 @@ properties:
|
|||||||
Type-C spec states minimum CC pin debounce of 100 ms and maximum
|
Type-C spec states minimum CC pin debounce of 100 ms and maximum
|
||||||
of 200 ms. However, some solutions might need more than 200 ms.
|
of 200 ms. However, some solutions might need more than 200 ms.
|
||||||
|
|
||||||
|
refclk-dig:
|
||||||
|
type: object
|
||||||
|
description: |
|
||||||
|
WIZ node should have subnode for refclk_dig to select the reference
|
||||||
|
clock source for the reference clock used in the PHY and PMA digital
|
||||||
|
logic.
|
||||||
|
properties:
|
||||||
|
clocks:
|
||||||
|
minItems: 2
|
||||||
|
maxItems: 4
|
||||||
|
description: Phandle to two (Torrent) or four (Sierra) clock nodes representing
|
||||||
|
the inputs to refclk_dig
|
||||||
|
|
||||||
|
"#clock-cells":
|
||||||
|
const: 0
|
||||||
|
|
||||||
|
assigned-clocks:
|
||||||
|
maxItems: 1
|
||||||
|
|
||||||
|
assigned-clock-parents:
|
||||||
|
maxItems: 1
|
||||||
|
|
||||||
|
required:
|
||||||
|
- clocks
|
||||||
|
- "#clock-cells"
|
||||||
|
- assigned-clocks
|
||||||
|
- assigned-clock-parents
|
||||||
|
|
||||||
patternProperties:
|
patternProperties:
|
||||||
"^pll[0|1]-refclk$":
|
"^pll[0|1]-refclk$":
|
||||||
type: object
|
type: object
|
||||||
@ -121,34 +149,6 @@ patternProperties:
|
|||||||
- clocks
|
- clocks
|
||||||
- "#clock-cells"
|
- "#clock-cells"
|
||||||
|
|
||||||
"^refclk-dig$":
|
|
||||||
type: object
|
|
||||||
description: |
|
|
||||||
WIZ node should have subnode for refclk_dig to select the reference
|
|
||||||
clock source for the reference clock used in the PHY and PMA digital
|
|
||||||
logic.
|
|
||||||
properties:
|
|
||||||
clocks:
|
|
||||||
minItems: 2
|
|
||||||
maxItems: 4
|
|
||||||
description: Phandle to two (Torrent) or four (Sierra) clock nodes representing
|
|
||||||
the inputs to refclk_dig
|
|
||||||
|
|
||||||
"#clock-cells":
|
|
||||||
const: 0
|
|
||||||
|
|
||||||
assigned-clocks:
|
|
||||||
maxItems: 1
|
|
||||||
|
|
||||||
assigned-clock-parents:
|
|
||||||
maxItems: 1
|
|
||||||
|
|
||||||
required:
|
|
||||||
- clocks
|
|
||||||
- "#clock-cells"
|
|
||||||
- assigned-clocks
|
|
||||||
- assigned-clock-parents
|
|
||||||
|
|
||||||
"^serdes@[0-9a-f]+$":
|
"^serdes@[0-9a-f]+$":
|
||||||
type: object
|
type: object
|
||||||
description: |
|
description: |
|
||||||
|
@ -36,12 +36,12 @@ properties:
|
|||||||
switching frequency must be one of following corresponding value
|
switching frequency must be one of following corresponding value
|
||||||
1.1MHz, 1.65MHz, 2.2MHz, 2.75MHz
|
1.1MHz, 1.65MHz, 2.2MHz, 2.75MHz
|
||||||
|
|
||||||
patternProperties:
|
ldortc:
|
||||||
"^ldo[1-4]$":
|
|
||||||
type: object
|
type: object
|
||||||
$ref: regulator.yaml#
|
$ref: regulator.yaml#
|
||||||
|
|
||||||
"^ldortc$":
|
patternProperties:
|
||||||
|
"^ldo[1-4]$":
|
||||||
type: object
|
type: object
|
||||||
$ref: regulator.yaml#
|
$ref: regulator.yaml#
|
||||||
|
|
||||||
|
@ -83,7 +83,8 @@ properties:
|
|||||||
|
|
||||||
unevaluatedProperties: false
|
unevaluatedProperties: false
|
||||||
|
|
||||||
"^vsnvs$":
|
properties:
|
||||||
|
vsnvs:
|
||||||
type: object
|
type: object
|
||||||
$ref: regulator.yaml#
|
$ref: regulator.yaml#
|
||||||
description:
|
description:
|
||||||
|
@ -30,7 +30,6 @@ properties:
|
|||||||
maxItems: 1
|
maxItems: 1
|
||||||
|
|
||||||
clocks:
|
clocks:
|
||||||
minItems: 2
|
|
||||||
items:
|
items:
|
||||||
- description: PCLK clocks
|
- description: PCLK clocks
|
||||||
- description: EXTCLK clocks. Faraday calls it CLK1HZ and says the clock
|
- description: EXTCLK clocks. Faraday calls it CLK1HZ and says the clock
|
||||||
|
@ -79,22 +79,7 @@ properties:
|
|||||||
description:
|
description:
|
||||||
The SPI controller acts as a slave, instead of a master.
|
The SPI controller acts as a slave, instead of a master.
|
||||||
|
|
||||||
allOf:
|
slave:
|
||||||
- if:
|
|
||||||
not:
|
|
||||||
required:
|
|
||||||
- spi-slave
|
|
||||||
then:
|
|
||||||
properties:
|
|
||||||
"#address-cells":
|
|
||||||
const: 1
|
|
||||||
else:
|
|
||||||
properties:
|
|
||||||
"#address-cells":
|
|
||||||
const: 0
|
|
||||||
|
|
||||||
patternProperties:
|
|
||||||
"^slave$":
|
|
||||||
type: object
|
type: object
|
||||||
|
|
||||||
properties:
|
properties:
|
||||||
@ -105,6 +90,7 @@ patternProperties:
|
|||||||
required:
|
required:
|
||||||
- compatible
|
- compatible
|
||||||
|
|
||||||
|
patternProperties:
|
||||||
"^.*@[0-9a-f]+$":
|
"^.*@[0-9a-f]+$":
|
||||||
type: object
|
type: object
|
||||||
|
|
||||||
@ -180,6 +166,20 @@ patternProperties:
|
|||||||
- compatible
|
- compatible
|
||||||
- reg
|
- reg
|
||||||
|
|
||||||
|
allOf:
|
||||||
|
- if:
|
||||||
|
not:
|
||||||
|
required:
|
||||||
|
- spi-slave
|
||||||
|
then:
|
||||||
|
properties:
|
||||||
|
"#address-cells":
|
||||||
|
const: 1
|
||||||
|
else:
|
||||||
|
properties:
|
||||||
|
"#address-cells":
|
||||||
|
const: 0
|
||||||
|
|
||||||
additionalProperties: true
|
additionalProperties: true
|
||||||
|
|
||||||
examples:
|
examples:
|
||||||
|
@ -25,14 +25,12 @@ properties:
|
|||||||
|
|
||||||
interrupts:
|
interrupts:
|
||||||
minItems: 1
|
minItems: 1
|
||||||
maxItems: 2
|
|
||||||
items:
|
items:
|
||||||
- description: Host controller interrupt
|
- description: Host controller interrupt
|
||||||
- description: Device controller interrupt in isp1761
|
- description: Device controller interrupt in isp1761
|
||||||
|
|
||||||
interrupt-names:
|
interrupt-names:
|
||||||
minItems: 1
|
minItems: 1
|
||||||
maxItems: 2
|
|
||||||
items:
|
items:
|
||||||
- const: host
|
- const: host
|
||||||
- const: peripheral
|
- const: peripheral
|
||||||
|
@ -69,17 +69,17 @@ early userspace image can be built by an unprivileged user.
|
|||||||
|
|
||||||
As a technical note, when directories and files are specified, the
|
As a technical note, when directories and files are specified, the
|
||||||
entire CONFIG_INITRAMFS_SOURCE is passed to
|
entire CONFIG_INITRAMFS_SOURCE is passed to
|
||||||
usr/gen_initramfs_list.sh. This means that CONFIG_INITRAMFS_SOURCE
|
usr/gen_initramfs.sh. This means that CONFIG_INITRAMFS_SOURCE
|
||||||
can really be interpreted as any legal argument to
|
can really be interpreted as any legal argument to
|
||||||
gen_initramfs_list.sh. If a directory is specified as an argument then
|
gen_initramfs.sh. If a directory is specified as an argument then
|
||||||
the contents are scanned, uid/gid translation is performed, and
|
the contents are scanned, uid/gid translation is performed, and
|
||||||
usr/gen_init_cpio file directives are output. If a directory is
|
usr/gen_init_cpio file directives are output. If a directory is
|
||||||
specified as an argument to usr/gen_initramfs_list.sh then the
|
specified as an argument to usr/gen_initramfs.sh then the
|
||||||
contents of the file are simply copied to the output. All of the output
|
contents of the file are simply copied to the output. All of the output
|
||||||
directives from directory scanning and file contents copying are
|
directives from directory scanning and file contents copying are
|
||||||
processed by usr/gen_init_cpio.
|
processed by usr/gen_init_cpio.
|
||||||
|
|
||||||
See also 'usr/gen_initramfs_list.sh -h'.
|
See also 'usr/gen_initramfs.sh -h'.
|
||||||
|
|
||||||
Where's this all leading?
|
Where's this all leading?
|
||||||
=========================
|
=========================
|
||||||
|
@ -0,0 +1,32 @@
|
|||||||
|
#
|
||||||
|
# Feature name: thread-info-in-task
|
||||||
|
# Kconfig: THREAD_INFO_IN_TASK
|
||||||
|
# description: arch makes use of the core kernel facility to embedd thread_info in task_struct
|
||||||
|
#
|
||||||
|
-----------------------
|
||||||
|
| arch |status|
|
||||||
|
-----------------------
|
||||||
|
| alpha: | TODO |
|
||||||
|
| arc: | TODO |
|
||||||
|
| arm: | TODO |
|
||||||
|
| arm64: | ok |
|
||||||
|
| csky: | TODO |
|
||||||
|
| h8300: | TODO |
|
||||||
|
| hexagon: | TODO |
|
||||||
|
| ia64: | TODO |
|
||||||
|
| m68k: | TODO |
|
||||||
|
| microblaze: | TODO |
|
||||||
|
| mips: | TODO |
|
||||||
|
| nds32: | ok |
|
||||||
|
| nios2: | TODO |
|
||||||
|
| openrisc: | TODO |
|
||||||
|
| parisc: | TODO |
|
||||||
|
| powerpc: | ok |
|
||||||
|
| riscv: | ok |
|
||||||
|
| s390: | ok |
|
||||||
|
| sh: | TODO |
|
||||||
|
| sparc: | TODO |
|
||||||
|
| um: | TODO |
|
||||||
|
| x86: | ok |
|
||||||
|
| xtensa: | TODO |
|
||||||
|
-----------------------
|
@ -170,7 +170,7 @@ Documentation/driver-api/early-userspace/early_userspace_support.rst for more de
|
|||||||
The kernel does not depend on external cpio tools. If you specify a
|
The kernel does not depend on external cpio tools. If you specify a
|
||||||
directory instead of a configuration file, the kernel's build infrastructure
|
directory instead of a configuration file, the kernel's build infrastructure
|
||||||
creates a configuration file from that directory (usr/Makefile calls
|
creates a configuration file from that directory (usr/Makefile calls
|
||||||
usr/gen_initramfs_list.sh), and proceeds to package up that directory
|
usr/gen_initramfs.sh), and proceeds to package up that directory
|
||||||
using the config file (by feeding it to usr/gen_init_cpio, which is created
|
using the config file (by feeding it to usr/gen_init_cpio, which is created
|
||||||
from usr/gen_init_cpio.c). The kernel's build-time cpio creation code is
|
from usr/gen_init_cpio.c). The kernel's build-time cpio creation code is
|
||||||
entirely self-contained, and the kernel's boot-time extractor is also
|
entirely self-contained, and the kernel's boot-time extractor is also
|
||||||
|
@ -212,6 +212,7 @@ Userspace to kernel:
|
|||||||
``ETHTOOL_MSG_FEC_SET`` set FEC settings
|
``ETHTOOL_MSG_FEC_SET`` set FEC settings
|
||||||
``ETHTOOL_MSG_MODULE_EEPROM_GET`` read SFP module EEPROM
|
``ETHTOOL_MSG_MODULE_EEPROM_GET`` read SFP module EEPROM
|
||||||
``ETHTOOL_MSG_STATS_GET`` get standard statistics
|
``ETHTOOL_MSG_STATS_GET`` get standard statistics
|
||||||
|
``ETHTOOL_MSG_PHC_VCLOCKS_GET`` get PHC virtual clocks info
|
||||||
===================================== ================================
|
===================================== ================================
|
||||||
|
|
||||||
Kernel to userspace:
|
Kernel to userspace:
|
||||||
@ -250,6 +251,7 @@ Kernel to userspace:
|
|||||||
``ETHTOOL_MSG_FEC_NTF`` FEC settings
|
``ETHTOOL_MSG_FEC_NTF`` FEC settings
|
||||||
``ETHTOOL_MSG_MODULE_EEPROM_GET_REPLY`` read SFP module EEPROM
|
``ETHTOOL_MSG_MODULE_EEPROM_GET_REPLY`` read SFP module EEPROM
|
||||||
``ETHTOOL_MSG_STATS_GET_REPLY`` standard statistics
|
``ETHTOOL_MSG_STATS_GET_REPLY`` standard statistics
|
||||||
|
``ETHTOOL_MSG_PHC_VCLOCKS_GET_REPLY`` PHC virtual clocks info
|
||||||
======================================== =================================
|
======================================== =================================
|
||||||
|
|
||||||
``GET`` requests are sent by userspace applications to retrieve device
|
``GET`` requests are sent by userspace applications to retrieve device
|
||||||
@ -1477,6 +1479,25 @@ Low and high bounds are inclusive, for example:
|
|||||||
etherStatsPkts512to1023Octets 512 1023
|
etherStatsPkts512to1023Octets 512 1023
|
||||||
============================= ==== ====
|
============================= ==== ====
|
||||||
|
|
||||||
|
PHC_VCLOCKS_GET
|
||||||
|
===============
|
||||||
|
|
||||||
|
Query device PHC virtual clocks information.
|
||||||
|
|
||||||
|
Request contents:
|
||||||
|
|
||||||
|
==================================== ====== ==========================
|
||||||
|
``ETHTOOL_A_PHC_VCLOCKS_HEADER`` nested request header
|
||||||
|
==================================== ====== ==========================
|
||||||
|
|
||||||
|
Kernel response contents:
|
||||||
|
|
||||||
|
==================================== ====== ==========================
|
||||||
|
``ETHTOOL_A_PHC_VCLOCKS_HEADER`` nested reply header
|
||||||
|
``ETHTOOL_A_PHC_VCLOCKS_NUM`` u32 PHC virtual clocks number
|
||||||
|
``ETHTOOL_A_PHC_VCLOCKS_INDEX`` s32 PHC index array
|
||||||
|
==================================== ====== ==========================
|
||||||
|
|
||||||
Request translation
|
Request translation
|
||||||
===================
|
===================
|
||||||
|
|
||||||
@ -1575,4 +1596,5 @@ are netlink only.
|
|||||||
n/a ``ETHTOOL_MSG_CABLE_TEST_ACT``
|
n/a ``ETHTOOL_MSG_CABLE_TEST_ACT``
|
||||||
n/a ``ETHTOOL_MSG_CABLE_TEST_TDR_ACT``
|
n/a ``ETHTOOL_MSG_CABLE_TEST_TDR_ACT``
|
||||||
n/a ``ETHTOOL_MSG_TUNNEL_INFO_GET``
|
n/a ``ETHTOOL_MSG_TUNNEL_INFO_GET``
|
||||||
|
n/a ``ETHTOOL_MSG_PHC_VCLOCKS_GET``
|
||||||
=================================== =====================================
|
=================================== =====================================
|
||||||
|
@ -110,6 +110,12 @@ nf_conntrack_tcp_be_liberal - BOOLEAN
|
|||||||
Be conservative in what you do, be liberal in what you accept from others.
|
Be conservative in what you do, be liberal in what you accept from others.
|
||||||
If it's non-zero, we mark only out of window RST segments as INVALID.
|
If it's non-zero, we mark only out of window RST segments as INVALID.
|
||||||
|
|
||||||
|
nf_conntrack_tcp_ignore_invalid_rst - BOOLEAN
|
||||||
|
- 0 - disabled (default)
|
||||||
|
- 1 - enabled
|
||||||
|
|
||||||
|
If it's 1, we don't mark out of window RST segments as INVALID.
|
||||||
|
|
||||||
nf_conntrack_tcp_loose - BOOLEAN
|
nf_conntrack_tcp_loose - BOOLEAN
|
||||||
- 0 - disabled
|
- 0 - disabled
|
||||||
- not 0 - enabled (default)
|
- not 0 - enabled (default)
|
||||||
|
@ -4,10 +4,125 @@
|
|||||||
Linux Kernel TIPC
|
Linux Kernel TIPC
|
||||||
=================
|
=================
|
||||||
|
|
||||||
TIPC (Transparent Inter Process Communication) is a protocol that is
|
Introduction
|
||||||
specially designed for intra-cluster communication.
|
============
|
||||||
|
|
||||||
For more information about TIPC, see http://tipc.sourceforge.net.
|
TIPC (Transparent Inter Process Communication) is a protocol that is specially
|
||||||
|
designed for intra-cluster communication. It can be configured to transmit
|
||||||
|
messages either on UDP or directly across Ethernet. Message delivery is
|
||||||
|
sequence guaranteed, loss free and flow controlled. Latency times are shorter
|
||||||
|
than with any other known protocol, while maximal throughput is comparable to
|
||||||
|
that of TCP.
|
||||||
|
|
||||||
|
TIPC Features
|
||||||
|
-------------
|
||||||
|
|
||||||
|
- Cluster wide IPC service
|
||||||
|
|
||||||
|
Have you ever wished you had the convenience of Unix Domain Sockets even when
|
||||||
|
transmitting data between cluster nodes? Where you yourself determine the
|
||||||
|
addresses you want to bind to and use? Where you don't have to perform DNS
|
||||||
|
lookups and worry about IP addresses? Where you don't have to start timers
|
||||||
|
to monitor the continuous existence of peer sockets? And yet without the
|
||||||
|
downsides of that socket type, such as the risk of lingering inodes?
|
||||||
|
|
||||||
|
Welcome to the Transparent Inter Process Communication service, TIPC in short,
|
||||||
|
which gives you all of this, and a lot more.
|
||||||
|
|
||||||
|
- Service Addressing
|
||||||
|
|
||||||
|
A fundamental concept in TIPC is that of Service Addressing which makes it
|
||||||
|
possible for a programmer to chose his own address, bind it to a server
|
||||||
|
socket and let client programs use only that address for sending messages.
|
||||||
|
|
||||||
|
- Service Tracking
|
||||||
|
|
||||||
|
A client wanting to wait for the availability of a server, uses the Service
|
||||||
|
Tracking mechanism to subscribe for binding and unbinding/close events for
|
||||||
|
sockets with the associated service address.
|
||||||
|
|
||||||
|
The service tracking mechanism can also be used for Cluster Topology Tracking,
|
||||||
|
i.e., subscribing for availability/non-availability of cluster nodes.
|
||||||
|
|
||||||
|
Likewise, the service tracking mechanism can be used for Cluster Connectivity
|
||||||
|
Tracking, i.e., subscribing for up/down events for individual links between
|
||||||
|
cluster nodes.
|
||||||
|
|
||||||
|
- Transmission Modes
|
||||||
|
|
||||||
|
Using a service address, a client can send datagram messages to a server socket.
|
||||||
|
|
||||||
|
Using the same address type, it can establish a connection towards an accepting
|
||||||
|
server socket.
|
||||||
|
|
||||||
|
It can also use a service address to create and join a Communication Group,
|
||||||
|
which is the TIPC manifestation of a brokerless message bus.
|
||||||
|
|
||||||
|
Multicast with very good performance and scalability is available both in
|
||||||
|
datagram mode and in communication group mode.
|
||||||
|
|
||||||
|
- Inter Node Links
|
||||||
|
|
||||||
|
Communication between any two nodes in a cluster is maintained by one or two
|
||||||
|
Inter Node Links, which both guarantee data traffic integrity and monitor
|
||||||
|
the peer node's availability.
|
||||||
|
|
||||||
|
- Cluster Scalability
|
||||||
|
|
||||||
|
By applying the Overlapping Ring Monitoring algorithm on the inter node links
|
||||||
|
it is possible to scale TIPC clusters up to 1000 nodes with a maintained
|
||||||
|
neighbor failure discovery time of 1-2 seconds. For smaller clusters this
|
||||||
|
time can be made much shorter.
|
||||||
|
|
||||||
|
- Neighbor Discovery
|
||||||
|
|
||||||
|
Neighbor Node Discovery in the cluster is done by Ethernet broadcast or UDP
|
||||||
|
multicast, when any of those services are available. If not, configured peer
|
||||||
|
IP addresses can be used.
|
||||||
|
|
||||||
|
- Configuration
|
||||||
|
|
||||||
|
When running TIPC in single node mode no configuration whatsoever is needed.
|
||||||
|
When running in cluster mode TIPC must as a minimum be given a node address
|
||||||
|
(before Linux 4.17) and told which interface to attach to. The "tipc"
|
||||||
|
configuration tool makes is possible to add and maintain many more
|
||||||
|
configuration parameters.
|
||||||
|
|
||||||
|
- Performance
|
||||||
|
|
||||||
|
TIPC message transfer latency times are better than in any other known protocol.
|
||||||
|
Maximal byte throughput for inter-node connections is still somewhat lower than
|
||||||
|
for TCP, while they are superior for intra-node and inter-container throughput
|
||||||
|
on the same host.
|
||||||
|
|
||||||
|
- Language Support
|
||||||
|
|
||||||
|
The TIPC user API has support for C, Python, Perl, Ruby, D and Go.
|
||||||
|
|
||||||
|
More Information
|
||||||
|
----------------
|
||||||
|
|
||||||
|
- How to set up TIPC:
|
||||||
|
|
||||||
|
http://tipc.io/getting_started.html
|
||||||
|
|
||||||
|
- How to program with TIPC:
|
||||||
|
|
||||||
|
http://tipc.io/programming.html
|
||||||
|
|
||||||
|
- How to contribute to TIPC:
|
||||||
|
|
||||||
|
- http://tipc.io/contacts.html
|
||||||
|
|
||||||
|
- More details about TIPC specification:
|
||||||
|
|
||||||
|
http://tipc.io/protocol.html
|
||||||
|
|
||||||
|
|
||||||
|
Implementation
|
||||||
|
==============
|
||||||
|
|
||||||
|
TIPC is implemented as a kernel module in net/tipc/ directory.
|
||||||
|
|
||||||
TIPC Base Types
|
TIPC Base Types
|
||||||
---------------
|
---------------
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
(顺便说一句,值得注意的是,合并窗口期间集成的更改并不是凭空产生的;它们是经
|
(顺便说一句,值得注意的是,合并窗口期间集成的更改并不是凭空产生的;它们是经
|
||||||
提前收集、测试和分级的。稍后将详细描述该过程的工作方式。)
|
提前收集、测试和分级的。稍后将详细描述该过程的工作方式。)
|
||||||
|
|
||||||
合并窗口持续大约两周。在这段时间结束时,LinusTorvalds将声明窗口已关闭,并
|
合并窗口持续大约两周。在这段时间结束时,Linus Torvalds将声明窗口已关闭,并
|
||||||
释放第一个“rc”内核。例如,对于目标为5.6的内核,在合并窗口结束时发生的释放
|
释放第一个“rc”内核。例如,对于目标为5.6的内核,在合并窗口结束时发生的释放
|
||||||
将被称为5.6-rc1。-rc1 版本是一个信号,表示合并新特性的时间已经过去,稳定下一
|
将被称为5.6-rc1。-rc1 版本是一个信号,表示合并新特性的时间已经过去,稳定下一
|
||||||
个内核的时间已经到来。
|
个内核的时间已经到来。
|
||||||
@ -168,7 +168,7 @@ Greg Kroah-Hartman领导。稳定团队将使用5.x.y编号方案不定期地发
|
|||||||
补丁如何进入内核
|
补丁如何进入内核
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
只有一个人可以将补丁合并到主线内核存储库中:LinusTorvalds。但是,在进入
|
只有一个人可以将补丁合并到主线内核存储库中:Linus Torvalds。但是,在进入
|
||||||
2.6.38内核的9500多个补丁中,只有112个(大约1.3%)是由Linus自己直接选择的。
|
2.6.38内核的9500多个补丁中,只有112个(大约1.3%)是由Linus自己直接选择的。
|
||||||
内核项目已经发展到一个没有一个开发人员可以在没有支持的情况下检查和选择每个
|
内核项目已经发展到一个没有一个开发人员可以在没有支持的情况下检查和选择每个
|
||||||
补丁的规模。内核开发人员处理这种增长的方式是使用围绕信任链构建的助理系统。
|
补丁的规模。内核开发人员处理这种增长的方式是使用围绕信任链构建的助理系统。
|
||||||
|
@ -392,7 +392,7 @@ Section 8 -- Interpretation.
|
|||||||
Creative Commons is not a party to its public
|
Creative Commons is not a party to its public
|
||||||
licenses. Notwithstanding, Creative Commons may elect to apply one of
|
licenses. Notwithstanding, Creative Commons may elect to apply one of
|
||||||
its public licenses to material it publishes and in those instances
|
its public licenses to material it publishes and in those instances
|
||||||
will be considered the “Licensor.” The text of the Creative Commons
|
will be considered the "Licensor." The text of the Creative Commons
|
||||||
public licenses is dedicated to the public domain under the CC0 Public
|
public licenses is dedicated to the public domain under the CC0 Public
|
||||||
Domain Dedication. Except for the limited purpose of indicating that
|
Domain Dedication. Except for the limited purpose of indicating that
|
||||||
material is shared under a Creative Commons public license or as
|
material is shared under a Creative Commons public license or as
|
||||||
|
149
Makefile
149
Makefile
@ -1,8 +1,8 @@
|
|||||||
# SPDX-License-Identifier: GPL-2.0
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
VERSION = 5
|
VERSION = 5
|
||||||
PATCHLEVEL = 13
|
PATCHLEVEL = 14
|
||||||
SUBLEVEL = 1
|
SUBLEVEL = 0
|
||||||
EXTRAVERSION =
|
EXTRAVERSION = -rc2
|
||||||
NAME = Opossums on Parade
|
NAME = Opossums on Parade
|
||||||
|
|
||||||
# *DOCUMENTATION*
|
# *DOCUMENTATION*
|
||||||
@ -129,6 +129,11 @@ endif
|
|||||||
$(if $(word 2, $(KBUILD_EXTMOD)), \
|
$(if $(word 2, $(KBUILD_EXTMOD)), \
|
||||||
$(error building multiple external modules is not supported))
|
$(error building multiple external modules is not supported))
|
||||||
|
|
||||||
|
# Remove trailing slashes
|
||||||
|
ifneq ($(filter %/, $(KBUILD_EXTMOD)),)
|
||||||
|
KBUILD_EXTMOD := $(shell dirname $(KBUILD_EXTMOD).)
|
||||||
|
endif
|
||||||
|
|
||||||
export KBUILD_EXTMOD
|
export KBUILD_EXTMOD
|
||||||
|
|
||||||
# Kbuild will save output files in the current working directory.
|
# Kbuild will save output files in the current working directory.
|
||||||
@ -544,14 +549,21 @@ scripts_basic:
|
|||||||
$(Q)rm -f .tmp_quiet_recordmcount
|
$(Q)rm -f .tmp_quiet_recordmcount
|
||||||
|
|
||||||
PHONY += outputmakefile
|
PHONY += outputmakefile
|
||||||
|
ifdef building_out_of_srctree
|
||||||
# Before starting out-of-tree build, make sure the source tree is clean.
|
# Before starting out-of-tree build, make sure the source tree is clean.
|
||||||
# outputmakefile generates a Makefile in the output directory, if using a
|
# outputmakefile generates a Makefile in the output directory, if using a
|
||||||
# separate output directory. This allows convenient use of make in the
|
# separate output directory. This allows convenient use of make in the
|
||||||
# output directory.
|
# output directory.
|
||||||
# At the same time when output Makefile generated, generate .gitignore to
|
# At the same time when output Makefile generated, generate .gitignore to
|
||||||
# ignore whole output directory
|
# ignore whole output directory
|
||||||
|
|
||||||
|
quiet_cmd_makefile = GEN Makefile
|
||||||
|
cmd_makefile = { \
|
||||||
|
echo "\# Automatically generated by $(srctree)/Makefile: don't edit"; \
|
||||||
|
echo "include $(srctree)/Makefile"; \
|
||||||
|
} > Makefile
|
||||||
|
|
||||||
outputmakefile:
|
outputmakefile:
|
||||||
ifdef building_out_of_srctree
|
|
||||||
$(Q)if [ -f $(srctree)/.config -o \
|
$(Q)if [ -f $(srctree)/.config -o \
|
||||||
-d $(srctree)/include/config -o \
|
-d $(srctree)/include/config -o \
|
||||||
-d $(srctree)/arch/$(SRCARCH)/include/generated ]; then \
|
-d $(srctree)/arch/$(SRCARCH)/include/generated ]; then \
|
||||||
@ -562,7 +574,7 @@ ifdef building_out_of_srctree
|
|||||||
false; \
|
false; \
|
||||||
fi
|
fi
|
||||||
$(Q)ln -fsn $(srctree) source
|
$(Q)ln -fsn $(srctree) source
|
||||||
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkmakefile $(srctree)
|
$(call cmd,makefile)
|
||||||
$(Q)test -e .gitignore || \
|
$(Q)test -e .gitignore || \
|
||||||
{ echo "# this is build directory, ignore it"; echo "*"; } > .gitignore
|
{ echo "# this is build directory, ignore it"; echo "*"; } > .gitignore
|
||||||
endif
|
endif
|
||||||
@ -658,7 +670,7 @@ endif
|
|||||||
|
|
||||||
ifeq ($(KBUILD_EXTMOD),)
|
ifeq ($(KBUILD_EXTMOD),)
|
||||||
# Objects we will link into vmlinux / subdirs we need to visit
|
# Objects we will link into vmlinux / subdirs we need to visit
|
||||||
core-y := init/ usr/
|
core-y := init/ usr/ arch/$(SRCARCH)/
|
||||||
drivers-y := drivers/ sound/
|
drivers-y := drivers/ sound/
|
||||||
drivers-$(CONFIG_SAMPLES) += samples/
|
drivers-$(CONFIG_SAMPLES) += samples/
|
||||||
drivers-$(CONFIG_NET) += net/
|
drivers-$(CONFIG_NET) += net/
|
||||||
@ -716,11 +728,12 @@ $(KCONFIG_CONFIG):
|
|||||||
# This exploits the 'multi-target pattern rule' trick.
|
# This exploits the 'multi-target pattern rule' trick.
|
||||||
# The syncconfig should be executed only once to make all the targets.
|
# The syncconfig should be executed only once to make all the targets.
|
||||||
# (Note: use the grouped target '&:' when we bump to GNU Make 4.3)
|
# (Note: use the grouped target '&:' when we bump to GNU Make 4.3)
|
||||||
quiet_cmd_syncconfig = SYNC $@
|
#
|
||||||
cmd_syncconfig = $(MAKE) -f $(srctree)/Makefile syncconfig
|
# Do not use $(call cmd,...) here. That would suppress prompts from syncconfig,
|
||||||
|
# so you cannot notice that Kconfig is waiting for the user input.
|
||||||
%/config/auto.conf %/config/auto.conf.cmd %/generated/autoconf.h: $(KCONFIG_CONFIG)
|
%/config/auto.conf %/config/auto.conf.cmd %/generated/autoconf.h: $(KCONFIG_CONFIG)
|
||||||
+$(call cmd,syncconfig)
|
$(Q)$(kecho) " SYNC $@"
|
||||||
|
$(Q)$(MAKE) -f $(srctree)/Makefile syncconfig
|
||||||
else # !may-sync-config
|
else # !may-sync-config
|
||||||
# External modules and some install targets need include/generated/autoconf.h
|
# External modules and some install targets need include/generated/autoconf.h
|
||||||
# and include/config/auto.conf but do not care if they are up-to-date.
|
# and include/config/auto.conf but do not care if they are up-to-date.
|
||||||
@ -790,7 +803,7 @@ else
|
|||||||
# Warn about unmarked fall-throughs in switch statement.
|
# Warn about unmarked fall-throughs in switch statement.
|
||||||
# Disabled for clang while comment to attribute conversion happens and
|
# Disabled for clang while comment to attribute conversion happens and
|
||||||
# https://github.com/ClangBuiltLinux/linux/issues/636 is discussed.
|
# https://github.com/ClangBuiltLinux/linux/issues/636 is discussed.
|
||||||
KBUILD_CFLAGS += $(call cc-option,-Wimplicit-fallthrough,)
|
KBUILD_CFLAGS += $(call cc-option,-Wimplicit-fallthrough=5,)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# These warnings generated too much noise in a regular build.
|
# These warnings generated too much noise in a regular build.
|
||||||
@ -961,8 +974,8 @@ KBUILD_CFLAGS += $(CC_FLAGS_CFI)
|
|||||||
export CC_FLAGS_CFI
|
export CC_FLAGS_CFI
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef CONFIG_DEBUG_FORCE_FUNCTION_ALIGN_32B
|
ifdef CONFIG_DEBUG_FORCE_FUNCTION_ALIGN_64B
|
||||||
KBUILD_CFLAGS += -falign-functions=32
|
KBUILD_CFLAGS += -falign-functions=64
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# arch Makefile may override CC so keep this after arch Makefile is included
|
# arch Makefile may override CC so keep this after arch Makefile is included
|
||||||
@ -1039,7 +1052,7 @@ LDFLAGS_vmlinux += $(call ld-option, -X,)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_RELR),y)
|
ifeq ($(CONFIG_RELR),y)
|
||||||
LDFLAGS_vmlinux += --pack-dyn-relocs=relr
|
LDFLAGS_vmlinux += --pack-dyn-relocs=relr --use-android-relr-tags
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# We never want expected sections to be placed heuristically by the
|
# We never want expected sections to be placed heuristically by the
|
||||||
@ -1089,41 +1102,6 @@ export INSTALL_DTBS_PATH ?= $(INSTALL_PATH)/dtbs/$(KERNELRELEASE)
|
|||||||
MODLIB = $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE)
|
MODLIB = $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE)
|
||||||
export MODLIB
|
export MODLIB
|
||||||
|
|
||||||
HOST_LIBELF_LIBS = $(shell pkg-config libelf --libs 2>/dev/null || echo -lelf)
|
|
||||||
|
|
||||||
has_libelf = $(call try-run,\
|
|
||||||
echo "int main() {}" | $(HOSTCC) $(KBUILD_HOSTLDFLAGS) -xc -o /dev/null $(HOST_LIBELF_LIBS) -,1,0)
|
|
||||||
|
|
||||||
ifdef CONFIG_STACK_VALIDATION
|
|
||||||
ifeq ($(has_libelf),1)
|
|
||||||
objtool_target := tools/objtool FORCE
|
|
||||||
else
|
|
||||||
SKIP_STACK_VALIDATION := 1
|
|
||||||
export SKIP_STACK_VALIDATION
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
PHONY += resolve_btfids_clean
|
|
||||||
|
|
||||||
resolve_btfids_O = $(abspath $(objtree))/tools/bpf/resolve_btfids
|
|
||||||
|
|
||||||
# tools/bpf/resolve_btfids directory might not exist
|
|
||||||
# in output directory, skip its clean in that case
|
|
||||||
resolve_btfids_clean:
|
|
||||||
ifneq ($(wildcard $(resolve_btfids_O)),)
|
|
||||||
$(Q)$(MAKE) -sC $(srctree)/tools/bpf/resolve_btfids O=$(resolve_btfids_O) clean
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifdef CONFIG_BPF
|
|
||||||
ifdef CONFIG_DEBUG_INFO_BTF
|
|
||||||
ifeq ($(has_libelf),1)
|
|
||||||
resolve_btfids_target := tools/bpf/resolve_btfids FORCE
|
|
||||||
else
|
|
||||||
ERROR_RESOLVE_BTFIDS := 1
|
|
||||||
endif
|
|
||||||
endif # CONFIG_DEBUG_INFO_BTF
|
|
||||||
endif # CONFIG_BPF
|
|
||||||
|
|
||||||
PHONY += prepare0
|
PHONY += prepare0
|
||||||
|
|
||||||
export extmod_prefix = $(if $(KBUILD_EXTMOD),$(KBUILD_EXTMOD)/)
|
export extmod_prefix = $(if $(KBUILD_EXTMOD),$(KBUILD_EXTMOD)/)
|
||||||
@ -1235,7 +1213,7 @@ prepare0: archprepare
|
|||||||
$(Q)$(MAKE) $(build)=.
|
$(Q)$(MAKE) $(build)=.
|
||||||
|
|
||||||
# All the preparing..
|
# All the preparing..
|
||||||
prepare: prepare0 prepare-objtool prepare-resolve_btfids
|
prepare: prepare0
|
||||||
|
|
||||||
PHONY += remove-stale-files
|
PHONY += remove-stale-files
|
||||||
remove-stale-files:
|
remove-stale-files:
|
||||||
@ -1252,26 +1230,6 @@ uapi-asm-generic:
|
|||||||
$(Q)$(MAKE) $(asm-generic)=arch/$(SRCARCH)/include/generated/uapi/asm \
|
$(Q)$(MAKE) $(asm-generic)=arch/$(SRCARCH)/include/generated/uapi/asm \
|
||||||
generic=include/uapi/asm-generic
|
generic=include/uapi/asm-generic
|
||||||
|
|
||||||
PHONY += prepare-objtool prepare-resolve_btfids
|
|
||||||
prepare-objtool: $(objtool_target)
|
|
||||||
ifeq ($(SKIP_STACK_VALIDATION),1)
|
|
||||||
ifdef CONFIG_FTRACE_MCOUNT_USE_OBJTOOL
|
|
||||||
@echo "error: Cannot generate __mcount_loc for CONFIG_DYNAMIC_FTRACE=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel" >&2
|
|
||||||
@false
|
|
||||||
endif
|
|
||||||
ifdef CONFIG_UNWINDER_ORC
|
|
||||||
@echo "error: Cannot generate ORC metadata for CONFIG_UNWINDER_ORC=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel" >&2
|
|
||||||
@false
|
|
||||||
else
|
|
||||||
@echo "warning: Cannot use CONFIG_STACK_VALIDATION=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel" >&2
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
prepare-resolve_btfids: $(resolve_btfids_target)
|
|
||||||
ifeq ($(ERROR_RESOLVE_BTFIDS),1)
|
|
||||||
@echo "error: Cannot resolve BTF IDs for CONFIG_DEBUG_INFO_BTF, please install libelf-dev, libelf-devel or elfutils-libelf-devel" >&2
|
|
||||||
@false
|
|
||||||
endif
|
|
||||||
# Generate some files
|
# Generate some files
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
|
|
||||||
@ -1359,6 +1317,43 @@ PHONY += scripts_unifdef
|
|||||||
scripts_unifdef: scripts_basic
|
scripts_unifdef: scripts_basic
|
||||||
$(Q)$(MAKE) $(build)=scripts scripts/unifdef
|
$(Q)$(MAKE) $(build)=scripts scripts/unifdef
|
||||||
|
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
# Tools
|
||||||
|
|
||||||
|
ifdef CONFIG_STACK_VALIDATION
|
||||||
|
prepare: tools/objtool
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifdef CONFIG_BPF
|
||||||
|
ifdef CONFIG_DEBUG_INFO_BTF
|
||||||
|
prepare: tools/bpf/resolve_btfids
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
PHONY += resolve_btfids_clean
|
||||||
|
|
||||||
|
resolve_btfids_O = $(abspath $(objtree))/tools/bpf/resolve_btfids
|
||||||
|
|
||||||
|
# tools/bpf/resolve_btfids directory might not exist
|
||||||
|
# in output directory, skip its clean in that case
|
||||||
|
resolve_btfids_clean:
|
||||||
|
ifneq ($(wildcard $(resolve_btfids_O)),)
|
||||||
|
$(Q)$(MAKE) -sC $(srctree)/tools/bpf/resolve_btfids O=$(resolve_btfids_O) clean
|
||||||
|
endif
|
||||||
|
|
||||||
|
# Clear a bunch of variables before executing the submake
|
||||||
|
ifeq ($(quiet),silent_)
|
||||||
|
tools_silent=s
|
||||||
|
endif
|
||||||
|
|
||||||
|
tools/: FORCE
|
||||||
|
$(Q)mkdir -p $(objtree)/tools
|
||||||
|
$(Q)$(MAKE) LDFLAGS= MAKEFLAGS="$(tools_silent) $(filter --j% -j,$(MAKEFLAGS))" O=$(abspath $(objtree)) subdir=tools -C $(srctree)/tools/
|
||||||
|
|
||||||
|
tools/%: FORCE
|
||||||
|
$(Q)mkdir -p $(objtree)/tools
|
||||||
|
$(Q)$(MAKE) LDFLAGS= MAKEFLAGS="$(tools_silent) $(filter --j% -j,$(MAKEFLAGS))" O=$(abspath $(objtree)) subdir=tools -C $(srctree)/tools/ $*
|
||||||
|
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
# Kernel selftest
|
# Kernel selftest
|
||||||
|
|
||||||
@ -1959,20 +1954,6 @@ kernelversion:
|
|||||||
image_name:
|
image_name:
|
||||||
@echo $(KBUILD_IMAGE)
|
@echo $(KBUILD_IMAGE)
|
||||||
|
|
||||||
# Clear a bunch of variables before executing the submake
|
|
||||||
|
|
||||||
ifeq ($(quiet),silent_)
|
|
||||||
tools_silent=s
|
|
||||||
endif
|
|
||||||
|
|
||||||
tools/: FORCE
|
|
||||||
$(Q)mkdir -p $(objtree)/tools
|
|
||||||
$(Q)$(MAKE) LDFLAGS= MAKEFLAGS="$(tools_silent) $(filter --j% -j,$(MAKEFLAGS))" O=$(abspath $(objtree)) subdir=tools -C $(srctree)/tools/
|
|
||||||
|
|
||||||
tools/%: FORCE
|
|
||||||
$(Q)mkdir -p $(objtree)/tools
|
|
||||||
$(Q)$(MAKE) LDFLAGS= MAKEFLAGS="$(tools_silent) $(filter --j% -j,$(MAKEFLAGS))" O=$(abspath $(objtree)) subdir=tools -C $(srctree)/tools/ $*
|
|
||||||
|
|
||||||
quiet_cmd_rmfiles = $(if $(wildcard $(rm-files)),CLEAN $(wildcard $(rm-files)))
|
quiet_cmd_rmfiles = $(if $(wildcard $(rm-files)),CLEAN $(wildcard $(rm-files)))
|
||||||
cmd_rmfiles = rm -rf $(rm-files)
|
cmd_rmfiles = rm -rf $(rm-files)
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
#include "aspeed-g5.dtsi"
|
#include "aspeed-g5.dtsi"
|
||||||
#include <dt-bindings/gpio/aspeed-gpio.h>
|
#include <dt-bindings/gpio/aspeed-gpio.h>
|
||||||
#include <dt-bindings/i2c/i2c.h>
|
#include <dt-bindings/i2c/i2c.h>
|
||||||
|
#include <dt-bindings/interrupt-controller/irq.h>
|
||||||
|
|
||||||
/{
|
/{
|
||||||
model = "ASRock E3C246D4I BMC";
|
model = "ASRock E3C246D4I BMC";
|
||||||
@ -73,7 +74,8 @@ &uart5 {
|
|||||||
|
|
||||||
&vuart {
|
&vuart {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
aspeed,sirq-active-high;
|
aspeed,lpc-io-reg = <0x2f8>;
|
||||||
|
aspeed,lpc-interrupts = <3 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
};
|
};
|
||||||
|
|
||||||
&mac0 {
|
&mac0 {
|
||||||
|
@ -406,15 +406,15 @@ power-supply@69 {
|
|||||||
reg = <0x69>;
|
reg = <0x69>;
|
||||||
};
|
};
|
||||||
|
|
||||||
power-supply@6a {
|
|
||||||
compatible = "ibm,cffps";
|
|
||||||
reg = <0x6a>;
|
|
||||||
};
|
|
||||||
|
|
||||||
power-supply@6b {
|
power-supply@6b {
|
||||||
compatible = "ibm,cffps";
|
compatible = "ibm,cffps";
|
||||||
reg = <0x6b>;
|
reg = <0x6b>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
power-supply@6d {
|
||||||
|
compatible = "ibm,cffps";
|
||||||
|
reg = <0x6d>;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
&i2c4 {
|
&i2c4 {
|
||||||
@ -2832,6 +2832,7 @@ &pinctrl_emmc_default {
|
|||||||
|
|
||||||
&emmc {
|
&emmc {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
clk-phase-mmc-hs200 = <180>, <180>;
|
||||||
};
|
};
|
||||||
|
|
||||||
&fsim0 {
|
&fsim0 {
|
||||||
|
@ -280,10 +280,7 @@ &gpio0 {
|
|||||||
/*W0-W7*/ "","","","","","","","",
|
/*W0-W7*/ "","","","","","","","",
|
||||||
/*X0-X7*/ "","","","","","","","",
|
/*X0-X7*/ "","","","","","","","",
|
||||||
/*Y0-Y7*/ "","","","","","","","",
|
/*Y0-Y7*/ "","","","","","","","",
|
||||||
/*Z0-Z7*/ "","","","","","","","",
|
/*Z0-Z7*/ "","","","","","","","";
|
||||||
/*AA0-AA7*/ "","","","","","","","",
|
|
||||||
/*AB0-AB7*/ "","","","","","","","",
|
|
||||||
/*AC0-AC7*/ "","","","","","","","";
|
|
||||||
|
|
||||||
pin_mclr_vpp {
|
pin_mclr_vpp {
|
||||||
gpio-hog;
|
gpio-hog;
|
||||||
|
@ -136,10 +136,7 @@ &gpio0 {
|
|||||||
/*W0-W7*/ "","","","","","","","",
|
/*W0-W7*/ "","","","","","","","",
|
||||||
/*X0-X7*/ "","","","","","","","",
|
/*X0-X7*/ "","","","","","","","",
|
||||||
/*Y0-Y7*/ "","","","","","","","",
|
/*Y0-Y7*/ "","","","","","","","",
|
||||||
/*Z0-Z7*/ "","","","","","","","",
|
/*Z0-Z7*/ "","","","","","","","";
|
||||||
/*AA0-AA7*/ "","","","","","","","",
|
|
||||||
/*AB0-AB7*/ "","","","","","","","",
|
|
||||||
/*AC0-AC7*/ "","","","","","","","";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
&fmc {
|
&fmc {
|
||||||
@ -189,6 +186,7 @@ &emmc_controller {
|
|||||||
|
|
||||||
&emmc {
|
&emmc {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
clk-phase-mmc-hs200 = <36>, <270>;
|
||||||
};
|
};
|
||||||
|
|
||||||
&fsim0 {
|
&fsim0 {
|
||||||
|
@ -581,7 +581,7 @@ external-bus@1a100000 {
|
|||||||
* EBI2. This has a 25MHz chrystal next to it, so no
|
* EBI2. This has a 25MHz chrystal next to it, so no
|
||||||
* clocking is needed.
|
* clocking is needed.
|
||||||
*/
|
*/
|
||||||
ethernet-ebi2@2,0 {
|
ethernet@2,0 {
|
||||||
compatible = "smsc,lan9221", "smsc,lan9115";
|
compatible = "smsc,lan9221", "smsc,lan9115";
|
||||||
reg = <2 0x0 0x100>;
|
reg = <2 0x0 0x100>;
|
||||||
/*
|
/*
|
||||||
@ -598,8 +598,6 @@ ethernet-ebi2@2,0 {
|
|||||||
phy-mode = "mii";
|
phy-mode = "mii";
|
||||||
reg-io-width = <2>;
|
reg-io-width = <2>;
|
||||||
smsc,force-external-phy;
|
smsc,force-external-phy;
|
||||||
/* IRQ on edge falling = active low */
|
|
||||||
smsc,irq-active-low;
|
|
||||||
smsc,irq-push-pull;
|
smsc,irq-push-pull;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -195,16 +195,15 @@ amba {
|
|||||||
#size-cells = <1>;
|
#size-cells = <1>;
|
||||||
ranges;
|
ranges;
|
||||||
|
|
||||||
vic: intc@10140000 {
|
vic: interrupt-controller@10140000 {
|
||||||
compatible = "arm,versatile-vic";
|
compatible = "arm,versatile-vic";
|
||||||
interrupt-controller;
|
interrupt-controller;
|
||||||
#interrupt-cells = <1>;
|
#interrupt-cells = <1>;
|
||||||
reg = <0x10140000 0x1000>;
|
reg = <0x10140000 0x1000>;
|
||||||
clear-mask = <0xffffffff>;
|
|
||||||
valid-mask = <0xffffffff>;
|
valid-mask = <0xffffffff>;
|
||||||
};
|
};
|
||||||
|
|
||||||
sic: intc@10003000 {
|
sic: interrupt-controller@10003000 {
|
||||||
compatible = "arm,versatile-sic";
|
compatible = "arm,versatile-sic";
|
||||||
interrupt-controller;
|
interrupt-controller;
|
||||||
#interrupt-cells = <1>;
|
#interrupt-cells = <1>;
|
||||||
|
@ -7,7 +7,7 @@ / {
|
|||||||
|
|
||||||
amba {
|
amba {
|
||||||
/* The Versatile PB is using more SIC IRQ lines than the AB */
|
/* The Versatile PB is using more SIC IRQ lines than the AB */
|
||||||
sic: intc@10003000 {
|
sic: interrupt-controller@10003000 {
|
||||||
clear-mask = <0xffffffff>;
|
clear-mask = <0xffffffff>;
|
||||||
/*
|
/*
|
||||||
* Valid interrupt lines mask according to
|
* Valid interrupt lines mask according to
|
||||||
|
@ -57,10 +57,7 @@ CONFIG_DRM=y
|
|||||||
CONFIG_DRM_DISPLAY_CONNECTOR=y
|
CONFIG_DRM_DISPLAY_CONNECTOR=y
|
||||||
CONFIG_DRM_SIMPLE_BRIDGE=y
|
CONFIG_DRM_SIMPLE_BRIDGE=y
|
||||||
CONFIG_DRM_PL111=y
|
CONFIG_DRM_PL111=y
|
||||||
CONFIG_FB_MODE_HELPERS=y
|
CONFIG_FB=y
|
||||||
CONFIG_FB_MATROX=y
|
|
||||||
CONFIG_FB_MATROX_MILLENIUM=y
|
|
||||||
CONFIG_FB_MATROX_MYSTIQUE=y
|
|
||||||
CONFIG_BACKLIGHT_CLASS_DEVICE=y
|
CONFIG_BACKLIGHT_CLASS_DEVICE=y
|
||||||
# CONFIG_VGA_CONSOLE is not set
|
# CONFIG_VGA_CONSOLE is not set
|
||||||
CONFIG_LOGO=y
|
CONFIG_LOGO=y
|
||||||
|
@ -64,11 +64,9 @@ CONFIG_DRM_PANEL_SIMPLE=y
|
|||||||
CONFIG_DRM_DISPLAY_CONNECTOR=y
|
CONFIG_DRM_DISPLAY_CONNECTOR=y
|
||||||
CONFIG_DRM_SIMPLE_BRIDGE=y
|
CONFIG_DRM_SIMPLE_BRIDGE=y
|
||||||
CONFIG_DRM_PL111=y
|
CONFIG_DRM_PL111=y
|
||||||
CONFIG_FB_MODE_HELPERS=y
|
CONFIG_FB=y
|
||||||
CONFIG_BACKLIGHT_CLASS_DEVICE=y
|
CONFIG_BACKLIGHT_CLASS_DEVICE=y
|
||||||
CONFIG_LOGO=y
|
CONFIG_LOGO=y
|
||||||
# CONFIG_LOGO_LINUX_MONO is not set
|
|
||||||
# CONFIG_LOGO_LINUX_VGA16 is not set
|
|
||||||
CONFIG_SOUND=y
|
CONFIG_SOUND=y
|
||||||
CONFIG_SND=y
|
CONFIG_SND=y
|
||||||
# CONFIG_SND_DRIVERS is not set
|
# CONFIG_SND_DRIVERS is not set
|
||||||
|
@ -135,6 +135,7 @@ CONFIG_DRM_SII902X=y
|
|||||||
CONFIG_DRM_SIMPLE_BRIDGE=y
|
CONFIG_DRM_SIMPLE_BRIDGE=y
|
||||||
CONFIG_DRM_I2C_ADV7511=y
|
CONFIG_DRM_I2C_ADV7511=y
|
||||||
CONFIG_DRM_I2C_ADV7511_AUDIO=y
|
CONFIG_DRM_I2C_ADV7511_AUDIO=y
|
||||||
|
CONFIG_FB=y
|
||||||
CONFIG_FB_SH_MOBILE_LCDC=y
|
CONFIG_FB_SH_MOBILE_LCDC=y
|
||||||
CONFIG_BACKLIGHT_PWM=y
|
CONFIG_BACKLIGHT_PWM=y
|
||||||
CONFIG_BACKLIGHT_AS3711=y
|
CONFIG_BACKLIGHT_AS3711=y
|
||||||
|
@ -61,6 +61,10 @@ CONFIG_INPUT_TOUCHSCREEN=y
|
|||||||
CONFIG_TOUCHSCREEN_ATMEL_MXT=y
|
CONFIG_TOUCHSCREEN_ATMEL_MXT=y
|
||||||
CONFIG_TOUCHSCREEN_BU21013=y
|
CONFIG_TOUCHSCREEN_BU21013=y
|
||||||
CONFIG_TOUCHSCREEN_CY8CTMA140=y
|
CONFIG_TOUCHSCREEN_CY8CTMA140=y
|
||||||
|
CONFIG_TOUCHSCREEN_CYTTSP_CORE=y
|
||||||
|
CONFIG_TOUCHSCREEN_CYTTSP_SPI=y
|
||||||
|
CONFIG_TOUCHSCREEN_MMS114=y
|
||||||
|
CONFIG_TOUCHSCREEN_ZINITIX=y
|
||||||
CONFIG_INPUT_MISC=y
|
CONFIG_INPUT_MISC=y
|
||||||
CONFIG_INPUT_AB8500_PONKEY=y
|
CONFIG_INPUT_AB8500_PONKEY=y
|
||||||
CONFIG_INPUT_GPIO_VIBRA=y
|
CONFIG_INPUT_GPIO_VIBRA=y
|
||||||
@ -100,6 +104,7 @@ CONFIG_DRM_PANEL_SAMSUNG_S6E63M0_DSI=y
|
|||||||
CONFIG_DRM_PANEL_SONY_ACX424AKP=y
|
CONFIG_DRM_PANEL_SONY_ACX424AKP=y
|
||||||
CONFIG_DRM_LIMA=y
|
CONFIG_DRM_LIMA=y
|
||||||
CONFIG_DRM_MCDE=y
|
CONFIG_DRM_MCDE=y
|
||||||
|
CONFIG_FB=y
|
||||||
CONFIG_BACKLIGHT_CLASS_DEVICE=y
|
CONFIG_BACKLIGHT_CLASS_DEVICE=y
|
||||||
CONFIG_BACKLIGHT_KTD253=y
|
CONFIG_BACKLIGHT_KTD253=y
|
||||||
CONFIG_BACKLIGHT_GPIO=y
|
CONFIG_BACKLIGHT_GPIO=y
|
||||||
|
@ -60,7 +60,7 @@ CONFIG_DRM_PANEL_SIMPLE=y
|
|||||||
CONFIG_DRM_DISPLAY_CONNECTOR=y
|
CONFIG_DRM_DISPLAY_CONNECTOR=y
|
||||||
CONFIG_DRM_SIMPLE_BRIDGE=y
|
CONFIG_DRM_SIMPLE_BRIDGE=y
|
||||||
CONFIG_DRM_PL111=y
|
CONFIG_DRM_PL111=y
|
||||||
CONFIG_FB_MODE_HELPERS=y
|
CONFIG_FB=y
|
||||||
CONFIG_BACKLIGHT_CLASS_DEVICE=y
|
CONFIG_BACKLIGHT_CLASS_DEVICE=y
|
||||||
CONFIG_LOGO=y
|
CONFIG_LOGO=y
|
||||||
CONFIG_SOUND=y
|
CONFIG_SOUND=y
|
||||||
@ -88,8 +88,6 @@ CONFIG_NFSD=y
|
|||||||
CONFIG_NFSD_V3=y
|
CONFIG_NFSD_V3=y
|
||||||
CONFIG_NLS_CODEPAGE_850=m
|
CONFIG_NLS_CODEPAGE_850=m
|
||||||
CONFIG_NLS_ISO8859_1=m
|
CONFIG_NLS_ISO8859_1=m
|
||||||
CONFIG_FONTS=y
|
|
||||||
CONFIG_FONT_ACORN_8x8=y
|
|
||||||
CONFIG_MAGIC_SYSRQ=y
|
CONFIG_MAGIC_SYSRQ=y
|
||||||
CONFIG_DEBUG_FS=y
|
CONFIG_DEBUG_FS=y
|
||||||
CONFIG_DEBUG_KERNEL=y
|
CONFIG_DEBUG_KERNEL=y
|
||||||
|
@ -11,9 +11,6 @@ CONFIG_CPUSETS=y
|
|||||||
# CONFIG_NET_NS is not set
|
# CONFIG_NET_NS is not set
|
||||||
CONFIG_BLK_DEV_INITRD=y
|
CONFIG_BLK_DEV_INITRD=y
|
||||||
CONFIG_PROFILING=y
|
CONFIG_PROFILING=y
|
||||||
CONFIG_MODULES=y
|
|
||||||
CONFIG_MODULE_UNLOAD=y
|
|
||||||
# CONFIG_BLK_DEV_BSG is not set
|
|
||||||
CONFIG_ARCH_VEXPRESS=y
|
CONFIG_ARCH_VEXPRESS=y
|
||||||
CONFIG_ARCH_VEXPRESS_DCSCB=y
|
CONFIG_ARCH_VEXPRESS_DCSCB=y
|
||||||
CONFIG_ARCH_VEXPRESS_TC2_PM=y
|
CONFIG_ARCH_VEXPRESS_TC2_PM=y
|
||||||
@ -23,14 +20,17 @@ CONFIG_MCPM=y
|
|||||||
CONFIG_VMSPLIT_2G=y
|
CONFIG_VMSPLIT_2G=y
|
||||||
CONFIG_NR_CPUS=8
|
CONFIG_NR_CPUS=8
|
||||||
CONFIG_ARM_PSCI=y
|
CONFIG_ARM_PSCI=y
|
||||||
CONFIG_CMA=y
|
|
||||||
CONFIG_ZBOOT_ROM_TEXT=0x0
|
CONFIG_ZBOOT_ROM_TEXT=0x0
|
||||||
CONFIG_ZBOOT_ROM_BSS=0x0
|
CONFIG_ZBOOT_ROM_BSS=0x0
|
||||||
CONFIG_CMDLINE="console=ttyAMA0"
|
CONFIG_CMDLINE="console=ttyAMA0"
|
||||||
CONFIG_CPU_IDLE=y
|
CONFIG_CPU_IDLE=y
|
||||||
CONFIG_VFP=y
|
CONFIG_VFP=y
|
||||||
CONFIG_NEON=y
|
CONFIG_NEON=y
|
||||||
|
CONFIG_MODULES=y
|
||||||
|
CONFIG_MODULE_UNLOAD=y
|
||||||
|
# CONFIG_BLK_DEV_BSG is not set
|
||||||
# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
|
# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
|
||||||
|
CONFIG_CMA=y
|
||||||
CONFIG_NET=y
|
CONFIG_NET=y
|
||||||
CONFIG_PACKET=y
|
CONFIG_PACKET=y
|
||||||
CONFIG_UNIX=y
|
CONFIG_UNIX=y
|
||||||
@ -43,7 +43,6 @@ CONFIG_IP_PNP_BOOTP=y
|
|||||||
CONFIG_NET_9P=y
|
CONFIG_NET_9P=y
|
||||||
CONFIG_NET_9P_VIRTIO=y
|
CONFIG_NET_9P_VIRTIO=y
|
||||||
CONFIG_DEVTMPFS=y
|
CONFIG_DEVTMPFS=y
|
||||||
CONFIG_DMA_CMA=y
|
|
||||||
CONFIG_MTD=y
|
CONFIG_MTD=y
|
||||||
CONFIG_MTD_CMDLINE_PARTS=y
|
CONFIG_MTD_CMDLINE_PARTS=y
|
||||||
CONFIG_MTD_BLOCK=y
|
CONFIG_MTD_BLOCK=y
|
||||||
@ -59,7 +58,6 @@ CONFIG_VIRTIO_BLK=y
|
|||||||
CONFIG_BLK_DEV_SD=y
|
CONFIG_BLK_DEV_SD=y
|
||||||
CONFIG_SCSI_VIRTIO=y
|
CONFIG_SCSI_VIRTIO=y
|
||||||
CONFIG_ATA=y
|
CONFIG_ATA=y
|
||||||
# CONFIG_SATA_PMP is not set
|
|
||||||
CONFIG_NETDEVICES=y
|
CONFIG_NETDEVICES=y
|
||||||
CONFIG_VIRTIO_NET=y
|
CONFIG_VIRTIO_NET=y
|
||||||
CONFIG_SMC91X=y
|
CONFIG_SMC91X=y
|
||||||
@ -81,11 +79,9 @@ CONFIG_DRM=y
|
|||||||
CONFIG_DRM_PANEL_SIMPLE=y
|
CONFIG_DRM_PANEL_SIMPLE=y
|
||||||
CONFIG_DRM_SII902X=y
|
CONFIG_DRM_SII902X=y
|
||||||
CONFIG_DRM_PL111=y
|
CONFIG_DRM_PL111=y
|
||||||
CONFIG_FB_MODE_HELPERS=y
|
CONFIG_FB=y
|
||||||
CONFIG_BACKLIGHT_CLASS_DEVICE=y
|
CONFIG_BACKLIGHT_CLASS_DEVICE=y
|
||||||
CONFIG_LOGO=y
|
CONFIG_LOGO=y
|
||||||
# CONFIG_LOGO_LINUX_MONO is not set
|
|
||||||
# CONFIG_LOGO_LINUX_VGA16 is not set
|
|
||||||
CONFIG_SOUND=y
|
CONFIG_SOUND=y
|
||||||
CONFIG_SND=y
|
CONFIG_SND=y
|
||||||
# CONFIG_SND_DRIVERS is not set
|
# CONFIG_SND_DRIVERS is not set
|
||||||
@ -136,10 +132,11 @@ CONFIG_ROOT_NFS=y
|
|||||||
CONFIG_9P_FS=y
|
CONFIG_9P_FS=y
|
||||||
CONFIG_NLS_CODEPAGE_437=y
|
CONFIG_NLS_CODEPAGE_437=y
|
||||||
CONFIG_NLS_ISO8859_1=y
|
CONFIG_NLS_ISO8859_1=y
|
||||||
|
# CONFIG_CRYPTO_HW is not set
|
||||||
|
CONFIG_DMA_CMA=y
|
||||||
CONFIG_DEBUG_INFO=y
|
CONFIG_DEBUG_INFO=y
|
||||||
CONFIG_MAGIC_SYSRQ=y
|
CONFIG_MAGIC_SYSRQ=y
|
||||||
CONFIG_DEBUG_KERNEL=y
|
CONFIG_DEBUG_KERNEL=y
|
||||||
CONFIG_DETECT_HUNG_TASK=y
|
CONFIG_DETECT_HUNG_TASK=y
|
||||||
# CONFIG_SCHED_DEBUG is not set
|
# CONFIG_SCHED_DEBUG is not set
|
||||||
CONFIG_DEBUG_USER=y
|
CONFIG_DEBUG_USER=y
|
||||||
# CONFIG_CRYPTO_HW is not set
|
|
||||||
|
@ -1605,7 +1605,8 @@ config ARM64_BTI_KERNEL
|
|||||||
depends on CC_HAS_BRANCH_PROT_PAC_RET_BTI
|
depends on CC_HAS_BRANCH_PROT_PAC_RET_BTI
|
||||||
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94697
|
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94697
|
||||||
depends on !CC_IS_GCC || GCC_VERSION >= 100100
|
depends on !CC_IS_GCC || GCC_VERSION >= 100100
|
||||||
depends on !(CC_IS_CLANG && GCOV_KERNEL)
|
# https://github.com/llvm/llvm-project/commit/a88c722e687e6780dcd6a58718350dc76fcc4cc9
|
||||||
|
depends on !CC_IS_CLANG || CLANG_VERSION >= 120000
|
||||||
depends on (!FUNCTION_GRAPH_TRACER || DYNAMIC_FTRACE_WITH_REGS)
|
depends on (!FUNCTION_GRAPH_TRACER || DYNAMIC_FTRACE_WITH_REGS)
|
||||||
help
|
help
|
||||||
Build the kernel with Branch Target Identification annotations
|
Build the kernel with Branch Target Identification annotations
|
||||||
|
@ -948,6 +948,10 @@ usb@3550000 {
|
|||||||
<&bpmp TEGRA194_CLK_XUSB_SS>,
|
<&bpmp TEGRA194_CLK_XUSB_SS>,
|
||||||
<&bpmp TEGRA194_CLK_XUSB_FS>;
|
<&bpmp TEGRA194_CLK_XUSB_FS>;
|
||||||
clock-names = "dev", "ss", "ss_src", "fs_src";
|
clock-names = "dev", "ss", "ss_src", "fs_src";
|
||||||
|
interconnects = <&mc TEGRA194_MEMORY_CLIENT_XUSB_DEVR &emc>,
|
||||||
|
<&mc TEGRA194_MEMORY_CLIENT_XUSB_DEVW &emc>;
|
||||||
|
interconnect-names = "dma-mem", "write";
|
||||||
|
iommus = <&smmu TEGRA194_SID_XUSB_DEV>;
|
||||||
power-domains = <&bpmp TEGRA194_POWER_DOMAIN_XUSBB>,
|
power-domains = <&bpmp TEGRA194_POWER_DOMAIN_XUSBB>,
|
||||||
<&bpmp TEGRA194_POWER_DOMAIN_XUSBA>;
|
<&bpmp TEGRA194_POWER_DOMAIN_XUSBA>;
|
||||||
power-domain-names = "dev", "ss";
|
power-domain-names = "dev", "ss";
|
||||||
@ -977,6 +981,10 @@ usb@3610000 {
|
|||||||
"xusb_ss", "xusb_ss_src", "xusb_hs_src",
|
"xusb_ss", "xusb_ss_src", "xusb_hs_src",
|
||||||
"xusb_fs_src", "pll_u_480m", "clk_m",
|
"xusb_fs_src", "pll_u_480m", "clk_m",
|
||||||
"pll_e";
|
"pll_e";
|
||||||
|
interconnects = <&mc TEGRA194_MEMORY_CLIENT_XUSB_HOSTR &emc>,
|
||||||
|
<&mc TEGRA194_MEMORY_CLIENT_XUSB_HOSTW &emc>;
|
||||||
|
interconnect-names = "dma-mem", "write";
|
||||||
|
iommus = <&smmu TEGRA194_SID_XUSB_HOST>;
|
||||||
|
|
||||||
power-domains = <&bpmp TEGRA194_POWER_DOMAIN_XUSBC>,
|
power-domains = <&bpmp TEGRA194_POWER_DOMAIN_XUSBC>,
|
||||||
<&bpmp TEGRA194_POWER_DOMAIN_XUSBA>;
|
<&bpmp TEGRA194_POWER_DOMAIN_XUSBA>;
|
||||||
@ -2469,6 +2477,11 @@ sound {
|
|||||||
* for 8x and 11.025x sample rate streams.
|
* for 8x and 11.025x sample rate streams.
|
||||||
*/
|
*/
|
||||||
assigned-clock-rates = <258000000>;
|
assigned-clock-rates = <258000000>;
|
||||||
|
|
||||||
|
interconnects = <&mc TEGRA194_MEMORY_CLIENT_APEDMAR &emc>,
|
||||||
|
<&mc TEGRA194_MEMORY_CLIENT_APEDMAW &emc>;
|
||||||
|
interconnect-names = "dma-mem", "write";
|
||||||
|
iommus = <&smmu TEGRA194_SID_APE>;
|
||||||
};
|
};
|
||||||
|
|
||||||
tcu: tcu {
|
tcu: tcu {
|
||||||
|
@ -82,10 +82,10 @@ scif0: serial@1004b800 {
|
|||||||
<GIC_SPI 384 IRQ_TYPE_LEVEL_HIGH>;
|
<GIC_SPI 384 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
interrupt-names = "eri", "rxi", "txi",
|
interrupt-names = "eri", "rxi", "txi",
|
||||||
"bri", "dri", "tei";
|
"bri", "dri", "tei";
|
||||||
clocks = <&cpg CPG_MOD R9A07G044_CLK_SCIF0>;
|
clocks = <&cpg CPG_MOD R9A07G044_SCIF0_CLK_PCK>;
|
||||||
clock-names = "fck";
|
clock-names = "fck";
|
||||||
power-domains = <&cpg>;
|
power-domains = <&cpg>;
|
||||||
resets = <&cpg R9A07G044_CLK_SCIF0>;
|
resets = <&cpg R9A07G044_SCIF0_RST_SYSTEM_N>;
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
* cache before the transfer is done, causing old data to be seen by
|
* cache before the transfer is done, causing old data to be seen by
|
||||||
* the CPU.
|
* the CPU.
|
||||||
*/
|
*/
|
||||||
#define ARCH_DMA_MINALIGN L1_CACHE_BYTES
|
#define ARCH_DMA_MINALIGN (128)
|
||||||
|
|
||||||
#ifdef CONFIG_KASAN_SW_TAGS
|
#ifdef CONFIG_KASAN_SW_TAGS
|
||||||
#define ARCH_SLAB_MINALIGN (1ULL << KASAN_SHADOW_SCALE_SHIFT)
|
#define ARCH_SLAB_MINALIGN (1ULL << KASAN_SHADOW_SCALE_SHIFT)
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
|
|
||||||
#include <linux/cpumask.h>
|
#include <linux/cpumask.h>
|
||||||
|
|
||||||
|
#include <asm/smp.h>
|
||||||
#include <asm/types.h>
|
#include <asm/types.h>
|
||||||
|
|
||||||
struct mpidr_hash {
|
struct mpidr_hash {
|
||||||
|
@ -17,7 +17,7 @@ CFLAGS_syscall.o += -fno-stack-protector
|
|||||||
# It's not safe to invoke KCOV when portions of the kernel environment aren't
|
# It's not safe to invoke KCOV when portions of the kernel environment aren't
|
||||||
# available or are out-of-sync with HW state. Since `noinstr` doesn't always
|
# available or are out-of-sync with HW state. Since `noinstr` doesn't always
|
||||||
# inhibit KCOV instrumentation, disable it for the entire compilation unit.
|
# inhibit KCOV instrumentation, disable it for the entire compilation unit.
|
||||||
KCOV_INSTRUMENT_entry.o := n
|
KCOV_INSTRUMENT_entry-common.o := n
|
||||||
KCOV_INSTRUMENT_idle.o := n
|
KCOV_INSTRUMENT_idle.o := n
|
||||||
|
|
||||||
# Object file lists.
|
# Object file lists.
|
||||||
|
@ -81,6 +81,7 @@
|
|||||||
#include <asm/mmu_context.h>
|
#include <asm/mmu_context.h>
|
||||||
#include <asm/mte.h>
|
#include <asm/mte.h>
|
||||||
#include <asm/processor.h>
|
#include <asm/processor.h>
|
||||||
|
#include <asm/smp.h>
|
||||||
#include <asm/sysreg.h>
|
#include <asm/sysreg.h>
|
||||||
#include <asm/traps.h>
|
#include <asm/traps.h>
|
||||||
#include <asm/virt.h>
|
#include <asm/virt.h>
|
||||||
|
@ -604,7 +604,7 @@ asmlinkage void noinstr el0t_64_fiq_handler(struct pt_regs *regs)
|
|||||||
__el0_fiq_handler_common(regs);
|
__el0_fiq_handler_common(regs);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __el0_error_handler_common(struct pt_regs *regs)
|
static void noinstr __el0_error_handler_common(struct pt_regs *regs)
|
||||||
{
|
{
|
||||||
unsigned long esr = read_sysreg(esr_el1);
|
unsigned long esr = read_sysreg(esr_el1);
|
||||||
|
|
||||||
|
@ -193,18 +193,6 @@ void mte_check_tfsr_el1(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void update_gcr_el1_excl(u64 excl)
|
|
||||||
{
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Note that the mask controlled by the user via prctl() is an
|
|
||||||
* include while GCR_EL1 accepts an exclude mask.
|
|
||||||
* No need for ISB since this only affects EL0 currently, implicit
|
|
||||||
* with ERET.
|
|
||||||
*/
|
|
||||||
sysreg_clear_set_s(SYS_GCR_EL1, SYS_GCR_EL1_EXCL_MASK, excl);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void set_gcr_el1_excl(u64 excl)
|
static void set_gcr_el1_excl(u64 excl)
|
||||||
{
|
{
|
||||||
current->thread.gcr_user_excl = excl;
|
current->thread.gcr_user_excl = excl;
|
||||||
@ -265,7 +253,8 @@ void mte_suspend_exit(void)
|
|||||||
if (!system_supports_mte())
|
if (!system_supports_mte())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
update_gcr_el1_excl(gcr_kernel_excl);
|
sysreg_clear_set_s(SYS_GCR_EL1, SYS_GCR_EL1_EXCL_MASK, gcr_kernel_excl);
|
||||||
|
isb();
|
||||||
}
|
}
|
||||||
|
|
||||||
long set_mte_ctrl(struct task_struct *task, unsigned long arg)
|
long set_mte_ctrl(struct task_struct *task, unsigned long arg)
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro ldrh1 reg, ptr, val
|
.macro ldrh1 reg, ptr, val
|
||||||
user_ldst 9998f, ldtrh, \reg, \ptr, \val
|
user_ldst 9997f, ldtrh, \reg, \ptr, \val
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro strh1 reg, ptr, val
|
.macro strh1 reg, ptr, val
|
||||||
@ -37,7 +37,7 @@
|
|||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro ldr1 reg, ptr, val
|
.macro ldr1 reg, ptr, val
|
||||||
user_ldst 9998f, ldtr, \reg, \ptr, \val
|
user_ldst 9997f, ldtr, \reg, \ptr, \val
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro str1 reg, ptr, val
|
.macro str1 reg, ptr, val
|
||||||
@ -45,7 +45,7 @@
|
|||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro ldp1 reg1, reg2, ptr, val
|
.macro ldp1 reg1, reg2, ptr, val
|
||||||
user_ldp 9998f, \reg1, \reg2, \ptr, \val
|
user_ldp 9997f, \reg1, \reg2, \ptr, \val
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro stp1 reg1, reg2, ptr, val
|
.macro stp1 reg1, reg2, ptr, val
|
||||||
@ -53,8 +53,10 @@
|
|||||||
.endm
|
.endm
|
||||||
|
|
||||||
end .req x5
|
end .req x5
|
||||||
|
srcin .req x15
|
||||||
SYM_FUNC_START(__arch_copy_from_user)
|
SYM_FUNC_START(__arch_copy_from_user)
|
||||||
add end, x0, x2
|
add end, x0, x2
|
||||||
|
mov srcin, x1
|
||||||
#include "copy_template.S"
|
#include "copy_template.S"
|
||||||
mov x0, #0 // Nothing to copy
|
mov x0, #0 // Nothing to copy
|
||||||
ret
|
ret
|
||||||
@ -63,6 +65,11 @@ EXPORT_SYMBOL(__arch_copy_from_user)
|
|||||||
|
|
||||||
.section .fixup,"ax"
|
.section .fixup,"ax"
|
||||||
.align 2
|
.align 2
|
||||||
|
9997: cmp dst, dstin
|
||||||
|
b.ne 9998f
|
||||||
|
// Before being absolutely sure we couldn't copy anything, try harder
|
||||||
|
USER(9998f, ldtrb tmp1w, [srcin])
|
||||||
|
strb tmp1w, [dst], #1
|
||||||
9998: sub x0, end, dst // bytes not copied
|
9998: sub x0, end, dst // bytes not copied
|
||||||
ret
|
ret
|
||||||
.previous
|
.previous
|
||||||
|
@ -30,33 +30,34 @@
|
|||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro ldrh1 reg, ptr, val
|
.macro ldrh1 reg, ptr, val
|
||||||
user_ldst 9998f, ldtrh, \reg, \ptr, \val
|
user_ldst 9997f, ldtrh, \reg, \ptr, \val
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro strh1 reg, ptr, val
|
.macro strh1 reg, ptr, val
|
||||||
user_ldst 9998f, sttrh, \reg, \ptr, \val
|
user_ldst 9997f, sttrh, \reg, \ptr, \val
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro ldr1 reg, ptr, val
|
.macro ldr1 reg, ptr, val
|
||||||
user_ldst 9998f, ldtr, \reg, \ptr, \val
|
user_ldst 9997f, ldtr, \reg, \ptr, \val
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro str1 reg, ptr, val
|
.macro str1 reg, ptr, val
|
||||||
user_ldst 9998f, sttr, \reg, \ptr, \val
|
user_ldst 9997f, sttr, \reg, \ptr, \val
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro ldp1 reg1, reg2, ptr, val
|
.macro ldp1 reg1, reg2, ptr, val
|
||||||
user_ldp 9998f, \reg1, \reg2, \ptr, \val
|
user_ldp 9997f, \reg1, \reg2, \ptr, \val
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro stp1 reg1, reg2, ptr, val
|
.macro stp1 reg1, reg2, ptr, val
|
||||||
user_stp 9998f, \reg1, \reg2, \ptr, \val
|
user_stp 9997f, \reg1, \reg2, \ptr, \val
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
end .req x5
|
end .req x5
|
||||||
|
srcin .req x15
|
||||||
SYM_FUNC_START(__arch_copy_in_user)
|
SYM_FUNC_START(__arch_copy_in_user)
|
||||||
add end, x0, x2
|
add end, x0, x2
|
||||||
|
mov srcin, x1
|
||||||
#include "copy_template.S"
|
#include "copy_template.S"
|
||||||
mov x0, #0
|
mov x0, #0
|
||||||
ret
|
ret
|
||||||
@ -65,6 +66,12 @@ EXPORT_SYMBOL(__arch_copy_in_user)
|
|||||||
|
|
||||||
.section .fixup,"ax"
|
.section .fixup,"ax"
|
||||||
.align 2
|
.align 2
|
||||||
|
9997: cmp dst, dstin
|
||||||
|
b.ne 9998f
|
||||||
|
// Before being absolutely sure we couldn't copy anything, try harder
|
||||||
|
USER(9998f, ldtrb tmp1w, [srcin])
|
||||||
|
USER(9998f, sttrb tmp1w, [dst])
|
||||||
|
add dst, dst, #1
|
||||||
9998: sub x0, end, dst // bytes not copied
|
9998: sub x0, end, dst // bytes not copied
|
||||||
ret
|
ret
|
||||||
.previous
|
.previous
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro strh1 reg, ptr, val
|
.macro strh1 reg, ptr, val
|
||||||
user_ldst 9998f, sttrh, \reg, \ptr, \val
|
user_ldst 9997f, sttrh, \reg, \ptr, \val
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro ldr1 reg, ptr, val
|
.macro ldr1 reg, ptr, val
|
||||||
@ -40,7 +40,7 @@
|
|||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro str1 reg, ptr, val
|
.macro str1 reg, ptr, val
|
||||||
user_ldst 9998f, sttr, \reg, \ptr, \val
|
user_ldst 9997f, sttr, \reg, \ptr, \val
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro ldp1 reg1, reg2, ptr, val
|
.macro ldp1 reg1, reg2, ptr, val
|
||||||
@ -48,12 +48,14 @@
|
|||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro stp1 reg1, reg2, ptr, val
|
.macro stp1 reg1, reg2, ptr, val
|
||||||
user_stp 9998f, \reg1, \reg2, \ptr, \val
|
user_stp 9997f, \reg1, \reg2, \ptr, \val
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
end .req x5
|
end .req x5
|
||||||
|
srcin .req x15
|
||||||
SYM_FUNC_START(__arch_copy_to_user)
|
SYM_FUNC_START(__arch_copy_to_user)
|
||||||
add end, x0, x2
|
add end, x0, x2
|
||||||
|
mov srcin, x1
|
||||||
#include "copy_template.S"
|
#include "copy_template.S"
|
||||||
mov x0, #0
|
mov x0, #0
|
||||||
ret
|
ret
|
||||||
@ -62,6 +64,12 @@ EXPORT_SYMBOL(__arch_copy_to_user)
|
|||||||
|
|
||||||
.section .fixup,"ax"
|
.section .fixup,"ax"
|
||||||
.align 2
|
.align 2
|
||||||
|
9997: cmp dst, dstin
|
||||||
|
b.ne 9998f
|
||||||
|
// Before being absolutely sure we couldn't copy anything, try harder
|
||||||
|
ldrb tmp1w, [srcin]
|
||||||
|
USER(9998f, sttrb tmp1w, [dst])
|
||||||
|
add dst, dst, #1
|
||||||
9998: sub x0, end, dst // bytes not copied
|
9998: sub x0, end, dst // bytes not copied
|
||||||
ret
|
ret
|
||||||
.previous
|
.previous
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
#include <linux/linkage.h>
|
#include <linux/linkage.h>
|
||||||
#include <asm/assembler.h>
|
#include <asm/assembler.h>
|
||||||
|
#include <asm/mte-def.h>
|
||||||
|
|
||||||
/* Assumptions:
|
/* Assumptions:
|
||||||
*
|
*
|
||||||
@ -42,7 +43,16 @@
|
|||||||
#define REP8_7f 0x7f7f7f7f7f7f7f7f
|
#define REP8_7f 0x7f7f7f7f7f7f7f7f
|
||||||
#define REP8_80 0x8080808080808080
|
#define REP8_80 0x8080808080808080
|
||||||
|
|
||||||
|
/*
|
||||||
|
* When KASAN_HW_TAGS is in use, memory is checked at MTE_GRANULE_SIZE
|
||||||
|
* (16-byte) granularity, and we must ensure that no access straddles this
|
||||||
|
* alignment boundary.
|
||||||
|
*/
|
||||||
|
#ifdef CONFIG_KASAN_HW_TAGS
|
||||||
|
#define MIN_PAGE_SIZE MTE_GRANULE_SIZE
|
||||||
|
#else
|
||||||
#define MIN_PAGE_SIZE 4096
|
#define MIN_PAGE_SIZE 4096
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Since strings are short on average, we check the first 16 bytes
|
/* Since strings are short on average, we check the first 16 bytes
|
||||||
of the string for a NUL character. In order to do an unaligned ldp
|
of the string for a NUL character. In order to do an unaligned ldp
|
||||||
|
@ -76,7 +76,7 @@ static inline int __enable_fpu(enum fpu_mode mode)
|
|||||||
/* we only have a 32-bit FPU */
|
/* we only have a 32-bit FPU */
|
||||||
return SIGFPE;
|
return SIGFPE;
|
||||||
#endif
|
#endif
|
||||||
fallthrough;
|
/* fallthrough */
|
||||||
case FPU_32BIT:
|
case FPU_32BIT:
|
||||||
if (cpu_has_fre) {
|
if (cpu_has_fre) {
|
||||||
/* clear FRE */
|
/* clear FRE */
|
||||||
|
@ -1383,6 +1383,7 @@ static void build_r4000_tlb_refill_handler(void)
|
|||||||
switch (boot_cpu_type()) {
|
switch (boot_cpu_type()) {
|
||||||
default:
|
default:
|
||||||
if (sizeof(long) == 4) {
|
if (sizeof(long) == 4) {
|
||||||
|
fallthrough;
|
||||||
case CPU_LOONGSON2EF:
|
case CPU_LOONGSON2EF:
|
||||||
/* Loongson2 ebase is different than r4k, we have more space */
|
/* Loongson2 ebase is different than r4k, we have more space */
|
||||||
if ((p - tlb_handler) > 64)
|
if ((p - tlb_handler) > 64)
|
||||||
@ -2169,6 +2170,7 @@ static void build_r4000_tlb_load_handler(void)
|
|||||||
default:
|
default:
|
||||||
if (cpu_has_mips_r2_exec_hazard) {
|
if (cpu_has_mips_r2_exec_hazard) {
|
||||||
uasm_i_ehb(&p);
|
uasm_i_ehb(&p);
|
||||||
|
fallthrough;
|
||||||
|
|
||||||
case CPU_CAVIUM_OCTEON:
|
case CPU_CAVIUM_OCTEON:
|
||||||
case CPU_CAVIUM_OCTEON_PLUS:
|
case CPU_CAVIUM_OCTEON_PLUS:
|
||||||
|
@ -146,6 +146,7 @@ static inline void psurge_clr_ipi(int cpu)
|
|||||||
switch(psurge_type) {
|
switch(psurge_type) {
|
||||||
case PSURGE_DUAL:
|
case PSURGE_DUAL:
|
||||||
out_8(psurge_sec_intr, ~0);
|
out_8(psurge_sec_intr, ~0);
|
||||||
|
break;
|
||||||
case PSURGE_NONE:
|
case PSURGE_NONE:
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -126,6 +126,7 @@ int arch_uprobe_exception_notify(struct notifier_block *self, unsigned long val,
|
|||||||
case DIE_SSTEP:
|
case DIE_SSTEP:
|
||||||
if (uprobe_post_sstep_notifier(regs))
|
if (uprobe_post_sstep_notifier(regs))
|
||||||
return NOTIFY_STOP;
|
return NOTIFY_STOP;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -202,10 +202,10 @@ static void kvm_vcpu_after_set_cpuid(struct kvm_vcpu *vcpu)
|
|||||||
static_call(kvm_x86_vcpu_after_set_cpuid)(vcpu);
|
static_call(kvm_x86_vcpu_after_set_cpuid)(vcpu);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Except for the MMU, which needs to be reset after any vendor
|
* Except for the MMU, which needs to do its thing any vendor specific
|
||||||
* specific adjustments to the reserved GPA bits.
|
* adjustments to the reserved GPA bits.
|
||||||
*/
|
*/
|
||||||
kvm_mmu_reset_context(vcpu);
|
kvm_mmu_after_set_cpuid(vcpu);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int is_efer_nx(void)
|
static int is_efer_nx(void)
|
||||||
@ -765,7 +765,8 @@ static inline int __do_cpuid_func(struct kvm_cpuid_array *array, u32 function)
|
|||||||
|
|
||||||
edx.split.num_counters_fixed = min(cap.num_counters_fixed, MAX_FIXED_COUNTERS);
|
edx.split.num_counters_fixed = min(cap.num_counters_fixed, MAX_FIXED_COUNTERS);
|
||||||
edx.split.bit_width_fixed = cap.bit_width_fixed;
|
edx.split.bit_width_fixed = cap.bit_width_fixed;
|
||||||
edx.split.anythread_deprecated = 1;
|
if (cap.version)
|
||||||
|
edx.split.anythread_deprecated = 1;
|
||||||
edx.split.reserved1 = 0;
|
edx.split.reserved1 = 0;
|
||||||
edx.split.reserved2 = 0;
|
edx.split.reserved2 = 0;
|
||||||
|
|
||||||
@ -940,8 +941,21 @@ static inline int __do_cpuid_func(struct kvm_cpuid_array *array, u32 function)
|
|||||||
unsigned virt_as = max((entry->eax >> 8) & 0xff, 48U);
|
unsigned virt_as = max((entry->eax >> 8) & 0xff, 48U);
|
||||||
unsigned phys_as = entry->eax & 0xff;
|
unsigned phys_as = entry->eax & 0xff;
|
||||||
|
|
||||||
if (!g_phys_as)
|
/*
|
||||||
|
* If TDP (NPT) is disabled use the adjusted host MAXPHYADDR as
|
||||||
|
* the guest operates in the same PA space as the host, i.e.
|
||||||
|
* reductions in MAXPHYADDR for memory encryption affect shadow
|
||||||
|
* paging, too.
|
||||||
|
*
|
||||||
|
* If TDP is enabled but an explicit guest MAXPHYADDR is not
|
||||||
|
* provided, use the raw bare metal MAXPHYADDR as reductions to
|
||||||
|
* the HPAs do not affect GPAs.
|
||||||
|
*/
|
||||||
|
if (!tdp_enabled)
|
||||||
|
g_phys_as = boot_cpu_data.x86_phys_bits;
|
||||||
|
else if (!g_phys_as)
|
||||||
g_phys_as = phys_as;
|
g_phys_as = phys_as;
|
||||||
|
|
||||||
entry->eax = g_phys_as | (virt_as << 8);
|
entry->eax = g_phys_as | (virt_as << 8);
|
||||||
entry->edx = 0;
|
entry->edx = 0;
|
||||||
cpuid_entry_override(entry, CPUID_8000_0008_EBX);
|
cpuid_entry_override(entry, CPUID_8000_0008_EBX);
|
||||||
@ -964,12 +978,18 @@ static inline int __do_cpuid_func(struct kvm_cpuid_array *array, u32 function)
|
|||||||
case 0x8000001a:
|
case 0x8000001a:
|
||||||
case 0x8000001e:
|
case 0x8000001e:
|
||||||
break;
|
break;
|
||||||
/* Support memory encryption cpuid if host supports it */
|
|
||||||
case 0x8000001F:
|
case 0x8000001F:
|
||||||
if (!kvm_cpu_cap_has(X86_FEATURE_SEV))
|
if (!kvm_cpu_cap_has(X86_FEATURE_SEV)) {
|
||||||
entry->eax = entry->ebx = entry->ecx = entry->edx = 0;
|
entry->eax = entry->ebx = entry->ecx = entry->edx = 0;
|
||||||
else
|
} else {
|
||||||
cpuid_entry_override(entry, CPUID_8000_001F_EAX);
|
cpuid_entry_override(entry, CPUID_8000_001F_EAX);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Enumerate '0' for "PA bits reduction", the adjusted
|
||||||
|
* MAXPHYADDR is enumerated directly (see 0x80000008).
|
||||||
|
*/
|
||||||
|
entry->ebx &= ~GENMASK(11, 6);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
/*Add support for Centaur's CPUID instruction*/
|
/*Add support for Centaur's CPUID instruction*/
|
||||||
case 0xC0000000:
|
case 0xC0000000:
|
||||||
|
@ -53,6 +53,8 @@
|
|||||||
#include <asm/kvm_page_track.h>
|
#include <asm/kvm_page_track.h>
|
||||||
#include "trace.h"
|
#include "trace.h"
|
||||||
|
|
||||||
|
#include "paging.h"
|
||||||
|
|
||||||
extern bool itlb_multihit_kvm_mitigation;
|
extern bool itlb_multihit_kvm_mitigation;
|
||||||
|
|
||||||
int __read_mostly nx_huge_pages = -1;
|
int __read_mostly nx_huge_pages = -1;
|
||||||
|
14
arch/x86/kvm/mmu/paging.h
Normal file
14
arch/x86/kvm/mmu/paging.h
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
|
/* Shadow paging constants/helpers that don't need to be #undef'd. */
|
||||||
|
#ifndef __KVM_X86_PAGING_H
|
||||||
|
#define __KVM_X86_PAGING_H
|
||||||
|
|
||||||
|
#define GUEST_PT64_BASE_ADDR_MASK (((1ULL << 52) - 1) & ~(u64)(PAGE_SIZE-1))
|
||||||
|
#define PT64_LVL_ADDR_MASK(level) \
|
||||||
|
(GUEST_PT64_BASE_ADDR_MASK & ~((1ULL << (PAGE_SHIFT + (((level) - 1) \
|
||||||
|
* PT64_LEVEL_BITS))) - 1))
|
||||||
|
#define PT64_LVL_OFFSET_MASK(level) \
|
||||||
|
(GUEST_PT64_BASE_ADDR_MASK & ((1ULL << (PAGE_SHIFT + (((level) - 1) \
|
||||||
|
* PT64_LEVEL_BITS))) - 1))
|
||||||
|
#endif /* __KVM_X86_PAGING_H */
|
||||||
|
|
@ -24,7 +24,7 @@
|
|||||||
#define pt_element_t u64
|
#define pt_element_t u64
|
||||||
#define guest_walker guest_walker64
|
#define guest_walker guest_walker64
|
||||||
#define FNAME(name) paging##64_##name
|
#define FNAME(name) paging##64_##name
|
||||||
#define PT_BASE_ADDR_MASK PT64_BASE_ADDR_MASK
|
#define PT_BASE_ADDR_MASK GUEST_PT64_BASE_ADDR_MASK
|
||||||
#define PT_LVL_ADDR_MASK(lvl) PT64_LVL_ADDR_MASK(lvl)
|
#define PT_LVL_ADDR_MASK(lvl) PT64_LVL_ADDR_MASK(lvl)
|
||||||
#define PT_LVL_OFFSET_MASK(lvl) PT64_LVL_OFFSET_MASK(lvl)
|
#define PT_LVL_OFFSET_MASK(lvl) PT64_LVL_OFFSET_MASK(lvl)
|
||||||
#define PT_INDEX(addr, level) PT64_INDEX(addr, level)
|
#define PT_INDEX(addr, level) PT64_INDEX(addr, level)
|
||||||
@ -57,7 +57,7 @@
|
|||||||
#define pt_element_t u64
|
#define pt_element_t u64
|
||||||
#define guest_walker guest_walkerEPT
|
#define guest_walker guest_walkerEPT
|
||||||
#define FNAME(name) ept_##name
|
#define FNAME(name) ept_##name
|
||||||
#define PT_BASE_ADDR_MASK PT64_BASE_ADDR_MASK
|
#define PT_BASE_ADDR_MASK GUEST_PT64_BASE_ADDR_MASK
|
||||||
#define PT_LVL_ADDR_MASK(lvl) PT64_LVL_ADDR_MASK(lvl)
|
#define PT_LVL_ADDR_MASK(lvl) PT64_LVL_ADDR_MASK(lvl)
|
||||||
#define PT_LVL_OFFSET_MASK(lvl) PT64_LVL_OFFSET_MASK(lvl)
|
#define PT_LVL_OFFSET_MASK(lvl) PT64_LVL_OFFSET_MASK(lvl)
|
||||||
#define PT_INDEX(addr, level) PT64_INDEX(addr, level)
|
#define PT_INDEX(addr, level) PT64_INDEX(addr, level)
|
||||||
|
@ -38,12 +38,6 @@ static_assert(SPTE_TDP_AD_ENABLED_MASK == 0);
|
|||||||
#else
|
#else
|
||||||
#define PT64_BASE_ADDR_MASK (((1ULL << 52) - 1) & ~(u64)(PAGE_SIZE-1))
|
#define PT64_BASE_ADDR_MASK (((1ULL << 52) - 1) & ~(u64)(PAGE_SIZE-1))
|
||||||
#endif
|
#endif
|
||||||
#define PT64_LVL_ADDR_MASK(level) \
|
|
||||||
(PT64_BASE_ADDR_MASK & ~((1ULL << (PAGE_SHIFT + (((level) - 1) \
|
|
||||||
* PT64_LEVEL_BITS))) - 1))
|
|
||||||
#define PT64_LVL_OFFSET_MASK(level) \
|
|
||||||
(PT64_BASE_ADDR_MASK & ((1ULL << (PAGE_SHIFT + (((level) - 1) \
|
|
||||||
* PT64_LEVEL_BITS))) - 1))
|
|
||||||
|
|
||||||
#define PT64_PERM_MASK (PT_PRESENT_MASK | PT_WRITABLE_MASK | shadow_user_mask \
|
#define PT64_PERM_MASK (PT_PRESENT_MASK | PT_WRITABLE_MASK | shadow_user_mask \
|
||||||
| shadow_x_mask | shadow_nx_mask | shadow_me_mask)
|
| shadow_x_mask | shadow_nx_mask | shadow_me_mask)
|
||||||
|
@ -154,6 +154,10 @@ void recalc_intercepts(struct vcpu_svm *svm)
|
|||||||
|
|
||||||
for (i = 0; i < MAX_INTERCEPT; i++)
|
for (i = 0; i < MAX_INTERCEPT; i++)
|
||||||
c->intercepts[i] |= g->intercepts[i];
|
c->intercepts[i] |= g->intercepts[i];
|
||||||
|
|
||||||
|
/* If SMI is not intercepted, ignore guest SMI intercept as well */
|
||||||
|
if (!intercept_smi)
|
||||||
|
vmcb_clr_intercept(c, INTERCEPT_SMI);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void copy_vmcb_control_area(struct vmcb_control_area *dst,
|
static void copy_vmcb_control_area(struct vmcb_control_area *dst,
|
||||||
@ -304,8 +308,8 @@ static bool nested_vmcb_valid_sregs(struct kvm_vcpu *vcpu,
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void nested_load_control_from_vmcb12(struct vcpu_svm *svm,
|
void nested_load_control_from_vmcb12(struct vcpu_svm *svm,
|
||||||
struct vmcb_control_area *control)
|
struct vmcb_control_area *control)
|
||||||
{
|
{
|
||||||
copy_vmcb_control_area(&svm->nested.ctl, control);
|
copy_vmcb_control_area(&svm->nested.ctl, control);
|
||||||
|
|
||||||
@ -618,6 +622,11 @@ int nested_svm_vmrun(struct kvm_vcpu *vcpu)
|
|||||||
struct kvm_host_map map;
|
struct kvm_host_map map;
|
||||||
u64 vmcb12_gpa;
|
u64 vmcb12_gpa;
|
||||||
|
|
||||||
|
if (!svm->nested.hsave_msr) {
|
||||||
|
kvm_inject_gp(vcpu, 0);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
if (is_smm(vcpu)) {
|
if (is_smm(vcpu)) {
|
||||||
kvm_queue_exception(vcpu, UD_VECTOR);
|
kvm_queue_exception(vcpu, UD_VECTOR);
|
||||||
return 1;
|
return 1;
|
||||||
@ -692,6 +701,27 @@ int nested_svm_vmrun(struct kvm_vcpu *vcpu)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Copy state save area fields which are handled by VMRUN */
|
||||||
|
void svm_copy_vmrun_state(struct vmcb_save_area *from_save,
|
||||||
|
struct vmcb_save_area *to_save)
|
||||||
|
{
|
||||||
|
to_save->es = from_save->es;
|
||||||
|
to_save->cs = from_save->cs;
|
||||||
|
to_save->ss = from_save->ss;
|
||||||
|
to_save->ds = from_save->ds;
|
||||||
|
to_save->gdtr = from_save->gdtr;
|
||||||
|
to_save->idtr = from_save->idtr;
|
||||||
|
to_save->rflags = from_save->rflags | X86_EFLAGS_FIXED;
|
||||||
|
to_save->efer = from_save->efer;
|
||||||
|
to_save->cr0 = from_save->cr0;
|
||||||
|
to_save->cr3 = from_save->cr3;
|
||||||
|
to_save->cr4 = from_save->cr4;
|
||||||
|
to_save->rax = from_save->rax;
|
||||||
|
to_save->rsp = from_save->rsp;
|
||||||
|
to_save->rip = from_save->rip;
|
||||||
|
to_save->cpl = 0;
|
||||||
|
}
|
||||||
|
|
||||||
void nested_svm_vmloadsave(struct vmcb *from_vmcb, struct vmcb *to_vmcb)
|
void nested_svm_vmloadsave(struct vmcb *from_vmcb, struct vmcb *to_vmcb)
|
||||||
{
|
{
|
||||||
to_vmcb->save.fs = from_vmcb->save.fs;
|
to_vmcb->save.fs = from_vmcb->save.fs;
|
||||||
@ -1355,28 +1385,11 @@ static int svm_set_nested_state(struct kvm_vcpu *vcpu,
|
|||||||
|
|
||||||
svm->nested.vmcb12_gpa = kvm_state->hdr.svm.vmcb_pa;
|
svm->nested.vmcb12_gpa = kvm_state->hdr.svm.vmcb_pa;
|
||||||
|
|
||||||
svm->vmcb01.ptr->save.es = save->es;
|
svm_copy_vmrun_state(save, &svm->vmcb01.ptr->save);
|
||||||
svm->vmcb01.ptr->save.cs = save->cs;
|
|
||||||
svm->vmcb01.ptr->save.ss = save->ss;
|
|
||||||
svm->vmcb01.ptr->save.ds = save->ds;
|
|
||||||
svm->vmcb01.ptr->save.gdtr = save->gdtr;
|
|
||||||
svm->vmcb01.ptr->save.idtr = save->idtr;
|
|
||||||
svm->vmcb01.ptr->save.rflags = save->rflags | X86_EFLAGS_FIXED;
|
|
||||||
svm->vmcb01.ptr->save.efer = save->efer;
|
|
||||||
svm->vmcb01.ptr->save.cr0 = save->cr0;
|
|
||||||
svm->vmcb01.ptr->save.cr3 = save->cr3;
|
|
||||||
svm->vmcb01.ptr->save.cr4 = save->cr4;
|
|
||||||
svm->vmcb01.ptr->save.rax = save->rax;
|
|
||||||
svm->vmcb01.ptr->save.rsp = save->rsp;
|
|
||||||
svm->vmcb01.ptr->save.rip = save->rip;
|
|
||||||
svm->vmcb01.ptr->save.cpl = 0;
|
|
||||||
|
|
||||||
nested_load_control_from_vmcb12(svm, ctl);
|
nested_load_control_from_vmcb12(svm, ctl);
|
||||||
|
|
||||||
svm_switch_vmcb(svm, &svm->nested.vmcb02);
|
svm_switch_vmcb(svm, &svm->nested.vmcb02);
|
||||||
|
|
||||||
nested_vmcb02_prepare_control(svm);
|
nested_vmcb02_prepare_control(svm);
|
||||||
|
|
||||||
kvm_make_request(KVM_REQ_GET_NESTED_STATE_PAGES, vcpu);
|
kvm_make_request(KVM_REQ_GET_NESTED_STATE_PAGES, vcpu);
|
||||||
ret = 0;
|
ret = 0;
|
||||||
out_free:
|
out_free:
|
||||||
|
@ -1272,8 +1272,8 @@ static int sev_send_update_data(struct kvm *kvm, struct kvm_sev_cmd *argp)
|
|||||||
/* Pin guest memory */
|
/* Pin guest memory */
|
||||||
guest_page = sev_pin_memory(kvm, params.guest_uaddr & PAGE_MASK,
|
guest_page = sev_pin_memory(kvm, params.guest_uaddr & PAGE_MASK,
|
||||||
PAGE_SIZE, &n, 0);
|
PAGE_SIZE, &n, 0);
|
||||||
if (!guest_page)
|
if (IS_ERR(guest_page))
|
||||||
return -EFAULT;
|
return PTR_ERR(guest_page);
|
||||||
|
|
||||||
/* allocate memory for header and transport buffer */
|
/* allocate memory for header and transport buffer */
|
||||||
ret = -ENOMEM;
|
ret = -ENOMEM;
|
||||||
@ -1310,8 +1310,9 @@ static int sev_send_update_data(struct kvm *kvm, struct kvm_sev_cmd *argp)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Copy packet header to userspace. */
|
/* Copy packet header to userspace. */
|
||||||
ret = copy_to_user((void __user *)(uintptr_t)params.hdr_uaddr, hdr,
|
if (copy_to_user((void __user *)(uintptr_t)params.hdr_uaddr, hdr,
|
||||||
params.hdr_len);
|
params.hdr_len))
|
||||||
|
ret = -EFAULT;
|
||||||
|
|
||||||
e_free_trans_data:
|
e_free_trans_data:
|
||||||
kfree(trans_data);
|
kfree(trans_data);
|
||||||
@ -1463,11 +1464,12 @@ static int sev_receive_update_data(struct kvm *kvm, struct kvm_sev_cmd *argp)
|
|||||||
data.trans_len = params.trans_len;
|
data.trans_len = params.trans_len;
|
||||||
|
|
||||||
/* Pin guest memory */
|
/* Pin guest memory */
|
||||||
ret = -EFAULT;
|
|
||||||
guest_page = sev_pin_memory(kvm, params.guest_uaddr & PAGE_MASK,
|
guest_page = sev_pin_memory(kvm, params.guest_uaddr & PAGE_MASK,
|
||||||
PAGE_SIZE, &n, 0);
|
PAGE_SIZE, &n, 0);
|
||||||
if (!guest_page)
|
if (IS_ERR(guest_page)) {
|
||||||
|
ret = PTR_ERR(guest_page);
|
||||||
goto e_free_trans;
|
goto e_free_trans;
|
||||||
|
}
|
||||||
|
|
||||||
/* The RECEIVE_UPDATE_DATA command requires C-bit to be always set. */
|
/* The RECEIVE_UPDATE_DATA command requires C-bit to be always set. */
|
||||||
data.guest_address = (page_to_pfn(guest_page[0]) << PAGE_SHIFT) + offset;
|
data.guest_address = (page_to_pfn(guest_page[0]) << PAGE_SHIFT) + offset;
|
||||||
|
@ -198,6 +198,11 @@ module_param(avic, bool, 0444);
|
|||||||
bool __read_mostly dump_invalid_vmcb;
|
bool __read_mostly dump_invalid_vmcb;
|
||||||
module_param(dump_invalid_vmcb, bool, 0644);
|
module_param(dump_invalid_vmcb, bool, 0644);
|
||||||
|
|
||||||
|
|
||||||
|
bool intercept_smi = true;
|
||||||
|
module_param(intercept_smi, bool, 0444);
|
||||||
|
|
||||||
|
|
||||||
static bool svm_gp_erratum_intercept = true;
|
static bool svm_gp_erratum_intercept = true;
|
||||||
|
|
||||||
static u8 rsm_ins_bytes[] = "\x0f\xaa";
|
static u8 rsm_ins_bytes[] = "\x0f\xaa";
|
||||||
@ -1185,7 +1190,10 @@ static void init_vmcb(struct kvm_vcpu *vcpu)
|
|||||||
|
|
||||||
svm_set_intercept(svm, INTERCEPT_INTR);
|
svm_set_intercept(svm, INTERCEPT_INTR);
|
||||||
svm_set_intercept(svm, INTERCEPT_NMI);
|
svm_set_intercept(svm, INTERCEPT_NMI);
|
||||||
svm_set_intercept(svm, INTERCEPT_SMI);
|
|
||||||
|
if (intercept_smi)
|
||||||
|
svm_set_intercept(svm, INTERCEPT_SMI);
|
||||||
|
|
||||||
svm_set_intercept(svm, INTERCEPT_SELECTIVE_CR0);
|
svm_set_intercept(svm, INTERCEPT_SELECTIVE_CR0);
|
||||||
svm_set_intercept(svm, INTERCEPT_RDPMC);
|
svm_set_intercept(svm, INTERCEPT_RDPMC);
|
||||||
svm_set_intercept(svm, INTERCEPT_CPUID);
|
svm_set_intercept(svm, INTERCEPT_CPUID);
|
||||||
@ -1923,7 +1931,7 @@ static int npf_interception(struct kvm_vcpu *vcpu)
|
|||||||
{
|
{
|
||||||
struct vcpu_svm *svm = to_svm(vcpu);
|
struct vcpu_svm *svm = to_svm(vcpu);
|
||||||
|
|
||||||
u64 fault_address = __sme_clr(svm->vmcb->control.exit_info_2);
|
u64 fault_address = svm->vmcb->control.exit_info_2;
|
||||||
u64 error_code = svm->vmcb->control.exit_info_1;
|
u64 error_code = svm->vmcb->control.exit_info_1;
|
||||||
|
|
||||||
trace_kvm_page_fault(fault_address, error_code);
|
trace_kvm_page_fault(fault_address, error_code);
|
||||||
@ -2106,6 +2114,11 @@ static int nmi_interception(struct kvm_vcpu *vcpu)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int smi_interception(struct kvm_vcpu *vcpu)
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
static int intr_interception(struct kvm_vcpu *vcpu)
|
static int intr_interception(struct kvm_vcpu *vcpu)
|
||||||
{
|
{
|
||||||
++vcpu->stat.irq_exits;
|
++vcpu->stat.irq_exits;
|
||||||
@ -2941,7 +2954,16 @@ static int svm_set_msr(struct kvm_vcpu *vcpu, struct msr_data *msr)
|
|||||||
svm_disable_lbrv(vcpu);
|
svm_disable_lbrv(vcpu);
|
||||||
break;
|
break;
|
||||||
case MSR_VM_HSAVE_PA:
|
case MSR_VM_HSAVE_PA:
|
||||||
svm->nested.hsave_msr = data;
|
/*
|
||||||
|
* Old kernels did not validate the value written to
|
||||||
|
* MSR_VM_HSAVE_PA. Allow KVM_SET_MSR to set an invalid
|
||||||
|
* value to allow live migrating buggy or malicious guests
|
||||||
|
* originating from those kernels.
|
||||||
|
*/
|
||||||
|
if (!msr->host_initiated && !page_address_valid(vcpu, data))
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
svm->nested.hsave_msr = data & PAGE_MASK;
|
||||||
break;
|
break;
|
||||||
case MSR_VM_CR:
|
case MSR_VM_CR:
|
||||||
return svm_set_vm_cr(vcpu, data);
|
return svm_set_vm_cr(vcpu, data);
|
||||||
@ -3080,8 +3102,7 @@ static int (*const svm_exit_handlers[])(struct kvm_vcpu *vcpu) = {
|
|||||||
[SVM_EXIT_EXCP_BASE + GP_VECTOR] = gp_interception,
|
[SVM_EXIT_EXCP_BASE + GP_VECTOR] = gp_interception,
|
||||||
[SVM_EXIT_INTR] = intr_interception,
|
[SVM_EXIT_INTR] = intr_interception,
|
||||||
[SVM_EXIT_NMI] = nmi_interception,
|
[SVM_EXIT_NMI] = nmi_interception,
|
||||||
[SVM_EXIT_SMI] = kvm_emulate_as_nop,
|
[SVM_EXIT_SMI] = smi_interception,
|
||||||
[SVM_EXIT_INIT] = kvm_emulate_as_nop,
|
|
||||||
[SVM_EXIT_VINTR] = interrupt_window_interception,
|
[SVM_EXIT_VINTR] = interrupt_window_interception,
|
||||||
[SVM_EXIT_RDPMC] = kvm_emulate_rdpmc,
|
[SVM_EXIT_RDPMC] = kvm_emulate_rdpmc,
|
||||||
[SVM_EXIT_CPUID] = kvm_emulate_cpuid,
|
[SVM_EXIT_CPUID] = kvm_emulate_cpuid,
|
||||||
@ -4288,6 +4309,7 @@ static int svm_smi_allowed(struct kvm_vcpu *vcpu, bool for_injection)
|
|||||||
static int svm_enter_smm(struct kvm_vcpu *vcpu, char *smstate)
|
static int svm_enter_smm(struct kvm_vcpu *vcpu, char *smstate)
|
||||||
{
|
{
|
||||||
struct vcpu_svm *svm = to_svm(vcpu);
|
struct vcpu_svm *svm = to_svm(vcpu);
|
||||||
|
struct kvm_host_map map_save;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (is_guest_mode(vcpu)) {
|
if (is_guest_mode(vcpu)) {
|
||||||
@ -4303,6 +4325,29 @@ static int svm_enter_smm(struct kvm_vcpu *vcpu, char *smstate)
|
|||||||
ret = nested_svm_vmexit(svm);
|
ret = nested_svm_vmexit(svm);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* KVM uses VMCB01 to store L1 host state while L2 runs but
|
||||||
|
* VMCB01 is going to be used during SMM and thus the state will
|
||||||
|
* be lost. Temporary save non-VMLOAD/VMSAVE state to the host save
|
||||||
|
* area pointed to by MSR_VM_HSAVE_PA. APM guarantees that the
|
||||||
|
* format of the area is identical to guest save area offsetted
|
||||||
|
* by 0x400 (matches the offset of 'struct vmcb_save_area'
|
||||||
|
* within 'struct vmcb'). Note: HSAVE area may also be used by
|
||||||
|
* L1 hypervisor to save additional host context (e.g. KVM does
|
||||||
|
* that, see svm_prepare_guest_switch()) which must be
|
||||||
|
* preserved.
|
||||||
|
*/
|
||||||
|
if (kvm_vcpu_map(vcpu, gpa_to_gfn(svm->nested.hsave_msr),
|
||||||
|
&map_save) == -EINVAL)
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
BUILD_BUG_ON(offsetof(struct vmcb, save) != 0x400);
|
||||||
|
|
||||||
|
svm_copy_vmrun_state(&svm->vmcb01.ptr->save,
|
||||||
|
map_save.hva + 0x400);
|
||||||
|
|
||||||
|
kvm_vcpu_unmap(vcpu, &map_save, true);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -4310,13 +4355,14 @@ static int svm_enter_smm(struct kvm_vcpu *vcpu, char *smstate)
|
|||||||
static int svm_leave_smm(struct kvm_vcpu *vcpu, const char *smstate)
|
static int svm_leave_smm(struct kvm_vcpu *vcpu, const char *smstate)
|
||||||
{
|
{
|
||||||
struct vcpu_svm *svm = to_svm(vcpu);
|
struct vcpu_svm *svm = to_svm(vcpu);
|
||||||
struct kvm_host_map map;
|
struct kvm_host_map map, map_save;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
if (guest_cpuid_has(vcpu, X86_FEATURE_LM)) {
|
if (guest_cpuid_has(vcpu, X86_FEATURE_LM)) {
|
||||||
u64 saved_efer = GET_SMSTATE(u64, smstate, 0x7ed0);
|
u64 saved_efer = GET_SMSTATE(u64, smstate, 0x7ed0);
|
||||||
u64 guest = GET_SMSTATE(u64, smstate, 0x7ed8);
|
u64 guest = GET_SMSTATE(u64, smstate, 0x7ed8);
|
||||||
u64 vmcb12_gpa = GET_SMSTATE(u64, smstate, 0x7ee0);
|
u64 vmcb12_gpa = GET_SMSTATE(u64, smstate, 0x7ee0);
|
||||||
|
struct vmcb *vmcb12;
|
||||||
|
|
||||||
if (guest) {
|
if (guest) {
|
||||||
if (!guest_cpuid_has(vcpu, X86_FEATURE_SVM))
|
if (!guest_cpuid_has(vcpu, X86_FEATURE_SVM))
|
||||||
@ -4332,8 +4378,25 @@ static int svm_leave_smm(struct kvm_vcpu *vcpu, const char *smstate)
|
|||||||
if (svm_allocate_nested(svm))
|
if (svm_allocate_nested(svm))
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
ret = enter_svm_guest_mode(vcpu, vmcb12_gpa, map.hva);
|
vmcb12 = map.hva;
|
||||||
|
|
||||||
|
nested_load_control_from_vmcb12(svm, &vmcb12->control);
|
||||||
|
|
||||||
|
ret = enter_svm_guest_mode(vcpu, vmcb12_gpa, vmcb12);
|
||||||
kvm_vcpu_unmap(vcpu, &map, true);
|
kvm_vcpu_unmap(vcpu, &map, true);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Restore L1 host state from L1 HSAVE area as VMCB01 was
|
||||||
|
* used during SMM (see svm_enter_smm())
|
||||||
|
*/
|
||||||
|
if (kvm_vcpu_map(vcpu, gpa_to_gfn(svm->nested.hsave_msr),
|
||||||
|
&map_save) == -EINVAL)
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
svm_copy_vmrun_state(map_save.hva + 0x400,
|
||||||
|
&svm->vmcb01.ptr->save);
|
||||||
|
|
||||||
|
kvm_vcpu_unmap(vcpu, &map_save, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
#define MSRPM_OFFSETS 16
|
#define MSRPM_OFFSETS 16
|
||||||
extern u32 msrpm_offsets[MSRPM_OFFSETS] __read_mostly;
|
extern u32 msrpm_offsets[MSRPM_OFFSETS] __read_mostly;
|
||||||
extern bool npt_enabled;
|
extern bool npt_enabled;
|
||||||
|
extern bool intercept_smi;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Clean bits in VMCB.
|
* Clean bits in VMCB.
|
||||||
@ -463,6 +464,8 @@ void svm_leave_nested(struct vcpu_svm *svm);
|
|||||||
void svm_free_nested(struct vcpu_svm *svm);
|
void svm_free_nested(struct vcpu_svm *svm);
|
||||||
int svm_allocate_nested(struct vcpu_svm *svm);
|
int svm_allocate_nested(struct vcpu_svm *svm);
|
||||||
int nested_svm_vmrun(struct kvm_vcpu *vcpu);
|
int nested_svm_vmrun(struct kvm_vcpu *vcpu);
|
||||||
|
void svm_copy_vmrun_state(struct vmcb_save_area *from_save,
|
||||||
|
struct vmcb_save_area *to_save);
|
||||||
void nested_svm_vmloadsave(struct vmcb *from_vmcb, struct vmcb *to_vmcb);
|
void nested_svm_vmloadsave(struct vmcb *from_vmcb, struct vmcb *to_vmcb);
|
||||||
int nested_svm_vmexit(struct vcpu_svm *svm);
|
int nested_svm_vmexit(struct vcpu_svm *svm);
|
||||||
|
|
||||||
@ -479,6 +482,8 @@ int nested_svm_check_permissions(struct kvm_vcpu *vcpu);
|
|||||||
int nested_svm_check_exception(struct vcpu_svm *svm, unsigned nr,
|
int nested_svm_check_exception(struct vcpu_svm *svm, unsigned nr,
|
||||||
bool has_error_code, u32 error_code);
|
bool has_error_code, u32 error_code);
|
||||||
int nested_svm_exit_special(struct vcpu_svm *svm);
|
int nested_svm_exit_special(struct vcpu_svm *svm);
|
||||||
|
void nested_load_control_from_vmcb12(struct vcpu_svm *svm,
|
||||||
|
struct vmcb_control_area *control);
|
||||||
void nested_sync_control_from_vmcb02(struct vcpu_svm *svm);
|
void nested_sync_control_from_vmcb02(struct vcpu_svm *svm);
|
||||||
void nested_vmcb02_compute_g_pat(struct vcpu_svm *svm);
|
void nested_vmcb02_compute_g_pat(struct vcpu_svm *svm);
|
||||||
void svm_switch_vmcb(struct vcpu_svm *svm, struct kvm_vmcb_info *target_vmcb);
|
void svm_switch_vmcb(struct vcpu_svm *svm, struct kvm_vmcb_info *target_vmcb);
|
||||||
|
@ -14,8 +14,6 @@
|
|||||||
#include "vmx_ops.h"
|
#include "vmx_ops.h"
|
||||||
#include "cpuid.h"
|
#include "cpuid.h"
|
||||||
|
|
||||||
extern const u32 vmx_msr_index[];
|
|
||||||
|
|
||||||
#define MSR_TYPE_R 1
|
#define MSR_TYPE_R 1
|
||||||
#define MSR_TYPE_W 2
|
#define MSR_TYPE_W 2
|
||||||
#define MSR_TYPE_RW 3
|
#define MSR_TYPE_RW 3
|
||||||
|
@ -9601,6 +9601,8 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu)
|
|||||||
set_debugreg(vcpu->arch.eff_db[3], 3);
|
set_debugreg(vcpu->arch.eff_db[3], 3);
|
||||||
set_debugreg(vcpu->arch.dr6, 6);
|
set_debugreg(vcpu->arch.dr6, 6);
|
||||||
vcpu->arch.switch_db_regs &= ~KVM_DEBUGREG_RELOAD;
|
vcpu->arch.switch_db_regs &= ~KVM_DEBUGREG_RELOAD;
|
||||||
|
} else if (unlikely(hw_breakpoint_active())) {
|
||||||
|
set_debugreg(0, 7);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
@ -10985,9 +10987,6 @@ int kvm_arch_hardware_setup(void *opaque)
|
|||||||
int r;
|
int r;
|
||||||
|
|
||||||
rdmsrl_safe(MSR_EFER, &host_efer);
|
rdmsrl_safe(MSR_EFER, &host_efer);
|
||||||
if (WARN_ON_ONCE(boot_cpu_has(X86_FEATURE_NX) &&
|
|
||||||
!(host_efer & EFER_NX)))
|
|
||||||
return -EIO;
|
|
||||||
|
|
||||||
if (boot_cpu_has(X86_FEATURE_XSAVES))
|
if (boot_cpu_has(X86_FEATURE_XSAVES))
|
||||||
rdmsrl(MSR_IA32_XSS, host_xss);
|
rdmsrl(MSR_IA32_XSS, host_xss);
|
||||||
|
@ -570,6 +570,9 @@ static void bpf_tail_call_direct_fixup(struct bpf_prog *prog)
|
|||||||
|
|
||||||
for (i = 0; i < prog->aux->size_poke_tab; i++) {
|
for (i = 0; i < prog->aux->size_poke_tab; i++) {
|
||||||
poke = &prog->aux->poke_tab[i];
|
poke = &prog->aux->poke_tab[i];
|
||||||
|
if (poke->aux && poke->aux != prog->aux)
|
||||||
|
continue;
|
||||||
|
|
||||||
WARN_ON_ONCE(READ_ONCE(poke->tailcall_target_stable));
|
WARN_ON_ONCE(READ_ONCE(poke->tailcall_target_stable));
|
||||||
|
|
||||||
if (poke->reason != BPF_POKE_REASON_TAIL_CALL)
|
if (poke->reason != BPF_POKE_REASON_TAIL_CALL)
|
||||||
|
@ -502,34 +502,21 @@ static int blkif_getgeo(struct block_device *bd, struct hd_geometry *hg)
|
|||||||
static int blkif_ioctl(struct block_device *bdev, fmode_t mode,
|
static int blkif_ioctl(struct block_device *bdev, fmode_t mode,
|
||||||
unsigned command, unsigned long argument)
|
unsigned command, unsigned long argument)
|
||||||
{
|
{
|
||||||
struct blkfront_info *info = bdev->bd_disk->private_data;
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
dev_dbg(&info->xbdev->dev, "command: 0x%x, argument: 0x%lx\n",
|
|
||||||
command, (long)argument);
|
|
||||||
|
|
||||||
switch (command) {
|
switch (command) {
|
||||||
case CDROMMULTISESSION:
|
case CDROMMULTISESSION:
|
||||||
dev_dbg(&info->xbdev->dev, "FIXME: support multisession CDs later\n");
|
|
||||||
for (i = 0; i < sizeof(struct cdrom_multisession); i++)
|
for (i = 0; i < sizeof(struct cdrom_multisession); i++)
|
||||||
if (put_user(0, (char __user *)(argument + i)))
|
if (put_user(0, (char __user *)(argument + i)))
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
return 0;
|
return 0;
|
||||||
|
case CDROM_GET_CAPABILITY:
|
||||||
case CDROM_GET_CAPABILITY: {
|
if (bdev->bd_disk->flags & GENHD_FL_CD)
|
||||||
struct gendisk *gd = info->gd;
|
|
||||||
if (gd->flags & GENHD_FL_CD)
|
|
||||||
return 0;
|
return 0;
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
/*printk(KERN_ALERT "ioctl %08x not supported by Xen blkdev\n",
|
return -EINVAL;
|
||||||
command);*/
|
|
||||||
return -EINVAL; /* same return as native Linux */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static unsigned long blkif_ring_get_request(struct blkfront_ring_info *rinfo,
|
static unsigned long blkif_ring_get_request(struct blkfront_ring_info *rinfo,
|
||||||
@ -1177,36 +1164,6 @@ static int xlvbd_alloc_gendisk(blkif_sector_t capacity,
|
|||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void xlvbd_release_gendisk(struct blkfront_info *info)
|
|
||||||
{
|
|
||||||
unsigned int minor, nr_minors, i;
|
|
||||||
struct blkfront_ring_info *rinfo;
|
|
||||||
|
|
||||||
if (info->rq == NULL)
|
|
||||||
return;
|
|
||||||
|
|
||||||
/* No more blkif_request(). */
|
|
||||||
blk_mq_stop_hw_queues(info->rq);
|
|
||||||
|
|
||||||
for_each_rinfo(info, rinfo, i) {
|
|
||||||
/* No more gnttab callback work. */
|
|
||||||
gnttab_cancel_free_callback(&rinfo->callback);
|
|
||||||
|
|
||||||
/* Flush gnttab callback work. Must be done with no locks held. */
|
|
||||||
flush_work(&rinfo->work);
|
|
||||||
}
|
|
||||||
|
|
||||||
del_gendisk(info->gd);
|
|
||||||
|
|
||||||
minor = info->gd->first_minor;
|
|
||||||
nr_minors = info->gd->minors;
|
|
||||||
xlbd_release_minors(minor, nr_minors);
|
|
||||||
|
|
||||||
blk_cleanup_disk(info->gd);
|
|
||||||
info->gd = NULL;
|
|
||||||
blk_mq_free_tag_set(&info->tag_set);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Already hold rinfo->ring_lock. */
|
/* Already hold rinfo->ring_lock. */
|
||||||
static inline void kick_pending_request_queues_locked(struct blkfront_ring_info *rinfo)
|
static inline void kick_pending_request_queues_locked(struct blkfront_ring_info *rinfo)
|
||||||
{
|
{
|
||||||
@ -1756,12 +1713,6 @@ static int write_per_ring_nodes(struct xenbus_transaction xbt,
|
|||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void free_info(struct blkfront_info *info)
|
|
||||||
{
|
|
||||||
list_del(&info->info_list);
|
|
||||||
kfree(info);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Common code used when first setting up, and when resuming. */
|
/* Common code used when first setting up, and when resuming. */
|
||||||
static int talk_to_blkback(struct xenbus_device *dev,
|
static int talk_to_blkback(struct xenbus_device *dev,
|
||||||
struct blkfront_info *info)
|
struct blkfront_info *info)
|
||||||
@ -1880,13 +1831,6 @@ static int talk_to_blkback(struct xenbus_device *dev,
|
|||||||
xenbus_dev_fatal(dev, err, "%s", message);
|
xenbus_dev_fatal(dev, err, "%s", message);
|
||||||
destroy_blkring:
|
destroy_blkring:
|
||||||
blkif_free(info, 0);
|
blkif_free(info, 0);
|
||||||
|
|
||||||
mutex_lock(&blkfront_mutex);
|
|
||||||
free_info(info);
|
|
||||||
mutex_unlock(&blkfront_mutex);
|
|
||||||
|
|
||||||
dev_set_drvdata(&dev->dev, NULL);
|
|
||||||
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2126,38 +2070,26 @@ static int blkfront_resume(struct xenbus_device *dev)
|
|||||||
static void blkfront_closing(struct blkfront_info *info)
|
static void blkfront_closing(struct blkfront_info *info)
|
||||||
{
|
{
|
||||||
struct xenbus_device *xbdev = info->xbdev;
|
struct xenbus_device *xbdev = info->xbdev;
|
||||||
struct block_device *bdev = NULL;
|
struct blkfront_ring_info *rinfo;
|
||||||
|
unsigned int i;
|
||||||
|
|
||||||
mutex_lock(&info->mutex);
|
if (xbdev->state == XenbusStateClosing)
|
||||||
|
|
||||||
if (xbdev->state == XenbusStateClosing) {
|
|
||||||
mutex_unlock(&info->mutex);
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
/* No more blkif_request(). */
|
||||||
|
blk_mq_stop_hw_queues(info->rq);
|
||||||
|
blk_set_queue_dying(info->rq);
|
||||||
|
set_capacity(info->gd, 0);
|
||||||
|
|
||||||
|
for_each_rinfo(info, rinfo, i) {
|
||||||
|
/* No more gnttab callback work. */
|
||||||
|
gnttab_cancel_free_callback(&rinfo->callback);
|
||||||
|
|
||||||
|
/* Flush gnttab callback work. Must be done with no locks held. */
|
||||||
|
flush_work(&rinfo->work);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (info->gd)
|
xenbus_frontend_closed(xbdev);
|
||||||
bdev = bdgrab(info->gd->part0);
|
|
||||||
|
|
||||||
mutex_unlock(&info->mutex);
|
|
||||||
|
|
||||||
if (!bdev) {
|
|
||||||
xenbus_frontend_closed(xbdev);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
mutex_lock(&bdev->bd_disk->open_mutex);
|
|
||||||
|
|
||||||
if (bdev->bd_openers) {
|
|
||||||
xenbus_dev_error(xbdev, -EBUSY,
|
|
||||||
"Device in use; refusing to close");
|
|
||||||
xenbus_switch_state(xbdev, XenbusStateClosing);
|
|
||||||
} else {
|
|
||||||
xlvbd_release_gendisk(info);
|
|
||||||
xenbus_frontend_closed(xbdev);
|
|
||||||
}
|
|
||||||
|
|
||||||
mutex_unlock(&bdev->bd_disk->open_mutex);
|
|
||||||
bdput(bdev);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void blkfront_setup_discard(struct blkfront_info *info)
|
static void blkfront_setup_discard(struct blkfront_info *info)
|
||||||
@ -2472,8 +2404,7 @@ static void blkback_changed(struct xenbus_device *dev,
|
|||||||
break;
|
break;
|
||||||
fallthrough;
|
fallthrough;
|
||||||
case XenbusStateClosing:
|
case XenbusStateClosing:
|
||||||
if (info)
|
blkfront_closing(info);
|
||||||
blkfront_closing(info);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2481,56 +2412,21 @@ static void blkback_changed(struct xenbus_device *dev,
|
|||||||
static int blkfront_remove(struct xenbus_device *xbdev)
|
static int blkfront_remove(struct xenbus_device *xbdev)
|
||||||
{
|
{
|
||||||
struct blkfront_info *info = dev_get_drvdata(&xbdev->dev);
|
struct blkfront_info *info = dev_get_drvdata(&xbdev->dev);
|
||||||
struct block_device *bdev = NULL;
|
|
||||||
struct gendisk *disk;
|
|
||||||
|
|
||||||
dev_dbg(&xbdev->dev, "%s removed", xbdev->nodename);
|
dev_dbg(&xbdev->dev, "%s removed", xbdev->nodename);
|
||||||
|
|
||||||
if (!info)
|
del_gendisk(info->gd);
|
||||||
return 0;
|
|
||||||
|
mutex_lock(&blkfront_mutex);
|
||||||
|
list_del(&info->info_list);
|
||||||
|
mutex_unlock(&blkfront_mutex);
|
||||||
|
|
||||||
blkif_free(info, 0);
|
blkif_free(info, 0);
|
||||||
|
xlbd_release_minors(info->gd->first_minor, info->gd->minors);
|
||||||
|
blk_cleanup_disk(info->gd);
|
||||||
|
blk_mq_free_tag_set(&info->tag_set);
|
||||||
|
|
||||||
mutex_lock(&info->mutex);
|
kfree(info);
|
||||||
|
|
||||||
disk = info->gd;
|
|
||||||
if (disk)
|
|
||||||
bdev = bdgrab(disk->part0);
|
|
||||||
|
|
||||||
info->xbdev = NULL;
|
|
||||||
mutex_unlock(&info->mutex);
|
|
||||||
|
|
||||||
if (!bdev) {
|
|
||||||
mutex_lock(&blkfront_mutex);
|
|
||||||
free_info(info);
|
|
||||||
mutex_unlock(&blkfront_mutex);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* The xbdev was removed before we reached the Closed
|
|
||||||
* state. See if it's safe to remove the disk. If the bdev
|
|
||||||
* isn't closed yet, we let release take care of it.
|
|
||||||
*/
|
|
||||||
|
|
||||||
mutex_lock(&disk->open_mutex);
|
|
||||||
info = disk->private_data;
|
|
||||||
|
|
||||||
dev_warn(disk_to_dev(disk),
|
|
||||||
"%s was hot-unplugged, %d stale handles\n",
|
|
||||||
xbdev->nodename, bdev->bd_openers);
|
|
||||||
|
|
||||||
if (info && !bdev->bd_openers) {
|
|
||||||
xlvbd_release_gendisk(info);
|
|
||||||
disk->private_data = NULL;
|
|
||||||
mutex_lock(&blkfront_mutex);
|
|
||||||
free_info(info);
|
|
||||||
mutex_unlock(&blkfront_mutex);
|
|
||||||
}
|
|
||||||
|
|
||||||
mutex_unlock(&disk->open_mutex);
|
|
||||||
bdput(bdev);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2541,77 +2437,9 @@ static int blkfront_is_ready(struct xenbus_device *dev)
|
|||||||
return info->is_ready && info->xbdev;
|
return info->is_ready && info->xbdev;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int blkif_open(struct block_device *bdev, fmode_t mode)
|
|
||||||
{
|
|
||||||
struct gendisk *disk = bdev->bd_disk;
|
|
||||||
struct blkfront_info *info;
|
|
||||||
int err = 0;
|
|
||||||
|
|
||||||
mutex_lock(&blkfront_mutex);
|
|
||||||
|
|
||||||
info = disk->private_data;
|
|
||||||
if (!info) {
|
|
||||||
/* xbdev gone */
|
|
||||||
err = -ERESTARTSYS;
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
mutex_lock(&info->mutex);
|
|
||||||
|
|
||||||
if (!info->gd)
|
|
||||||
/* xbdev is closed */
|
|
||||||
err = -ERESTARTSYS;
|
|
||||||
|
|
||||||
mutex_unlock(&info->mutex);
|
|
||||||
|
|
||||||
out:
|
|
||||||
mutex_unlock(&blkfront_mutex);
|
|
||||||
return err;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void blkif_release(struct gendisk *disk, fmode_t mode)
|
|
||||||
{
|
|
||||||
struct blkfront_info *info = disk->private_data;
|
|
||||||
struct xenbus_device *xbdev;
|
|
||||||
|
|
||||||
mutex_lock(&blkfront_mutex);
|
|
||||||
if (disk->part0->bd_openers)
|
|
||||||
goto out_mutex;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Check if we have been instructed to close. We will have
|
|
||||||
* deferred this request, because the bdev was still open.
|
|
||||||
*/
|
|
||||||
|
|
||||||
mutex_lock(&info->mutex);
|
|
||||||
xbdev = info->xbdev;
|
|
||||||
|
|
||||||
if (xbdev && xbdev->state == XenbusStateClosing) {
|
|
||||||
/* pending switch to state closed */
|
|
||||||
dev_info(disk_to_dev(disk), "releasing disk\n");
|
|
||||||
xlvbd_release_gendisk(info);
|
|
||||||
xenbus_frontend_closed(info->xbdev);
|
|
||||||
}
|
|
||||||
|
|
||||||
mutex_unlock(&info->mutex);
|
|
||||||
|
|
||||||
if (!xbdev) {
|
|
||||||
/* sudden device removal */
|
|
||||||
dev_info(disk_to_dev(disk), "releasing disk\n");
|
|
||||||
xlvbd_release_gendisk(info);
|
|
||||||
disk->private_data = NULL;
|
|
||||||
free_info(info);
|
|
||||||
}
|
|
||||||
|
|
||||||
out_mutex:
|
|
||||||
mutex_unlock(&blkfront_mutex);
|
|
||||||
}
|
|
||||||
|
|
||||||
static const struct block_device_operations xlvbd_block_fops =
|
static const struct block_device_operations xlvbd_block_fops =
|
||||||
{
|
{
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.open = blkif_open,
|
|
||||||
.release = blkif_release,
|
|
||||||
.getgeo = blkif_getgeo,
|
.getgeo = blkif_getgeo,
|
||||||
.ioctl = blkif_ioctl,
|
.ioctl = blkif_ioctl,
|
||||||
.compat_ioctl = blkdev_compat_ptr_ioctl,
|
.compat_ioctl = blkdev_compat_ptr_ioctl,
|
||||||
|
@ -75,6 +75,7 @@ static int __op_panel_update_display(void)
|
|||||||
rc);
|
rc);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
case OPAL_SUCCESS:
|
case OPAL_SUCCESS:
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -30,8 +30,9 @@ enum clk_ids {
|
|||||||
CLK_PLL2_DIV20,
|
CLK_PLL2_DIV20,
|
||||||
CLK_PLL3,
|
CLK_PLL3,
|
||||||
CLK_PLL3_DIV2,
|
CLK_PLL3_DIV2,
|
||||||
|
CLK_PLL3_DIV2_4,
|
||||||
|
CLK_PLL3_DIV2_4_2,
|
||||||
CLK_PLL3_DIV4,
|
CLK_PLL3_DIV4,
|
||||||
CLK_PLL3_DIV8,
|
|
||||||
CLK_PLL4,
|
CLK_PLL4,
|
||||||
CLK_PLL5,
|
CLK_PLL5,
|
||||||
CLK_PLL5_DIV2,
|
CLK_PLL5_DIV2,
|
||||||
@ -42,12 +43,13 @@ enum clk_ids {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* Divider tables */
|
/* Divider tables */
|
||||||
static const struct clk_div_table dtable_3b[] = {
|
static const struct clk_div_table dtable_1_32[] = {
|
||||||
{0, 1},
|
{0, 1},
|
||||||
{1, 2},
|
{1, 2},
|
||||||
{2, 4},
|
{2, 4},
|
||||||
{3, 8},
|
{3, 8},
|
||||||
{4, 32},
|
{4, 32},
|
||||||
|
{0, 0},
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct cpg_core_clk r9a07g044_core_clks[] __initconst = {
|
static const struct cpg_core_clk r9a07g044_core_clks[] __initconst = {
|
||||||
@ -66,47 +68,56 @@ static const struct cpg_core_clk r9a07g044_core_clks[] __initconst = {
|
|||||||
DEF_FIXED(".pll2_div20", CLK_PLL2_DIV20, CLK_PLL2, 1, 20),
|
DEF_FIXED(".pll2_div20", CLK_PLL2_DIV20, CLK_PLL2, 1, 20),
|
||||||
|
|
||||||
DEF_FIXED(".pll3_div2", CLK_PLL3_DIV2, CLK_PLL3, 1, 2),
|
DEF_FIXED(".pll3_div2", CLK_PLL3_DIV2, CLK_PLL3, 1, 2),
|
||||||
|
DEF_FIXED(".pll3_div2_4", CLK_PLL3_DIV2_4, CLK_PLL3_DIV2, 1, 4),
|
||||||
|
DEF_FIXED(".pll3_div2_4_2", CLK_PLL3_DIV2_4_2, CLK_PLL3_DIV2_4, 1, 2),
|
||||||
DEF_FIXED(".pll3_div4", CLK_PLL3_DIV4, CLK_PLL3, 1, 4),
|
DEF_FIXED(".pll3_div4", CLK_PLL3_DIV4, CLK_PLL3, 1, 4),
|
||||||
DEF_FIXED(".pll3_div8", CLK_PLL3_DIV8, CLK_PLL3, 1, 8),
|
|
||||||
|
|
||||||
/* Core output clk */
|
/* Core output clk */
|
||||||
DEF_FIXED("I", R9A07G044_CLK_I, CLK_PLL1, 1, 1),
|
DEF_FIXED("I", R9A07G044_CLK_I, CLK_PLL1, 1, 1),
|
||||||
DEF_DIV("P0", R9A07G044_CLK_P0, CLK_PLL2_DIV16, DIVPL2A,
|
DEF_DIV("P0", R9A07G044_CLK_P0, CLK_PLL2_DIV16, DIVPL2A,
|
||||||
dtable_3b, CLK_DIVIDER_HIWORD_MASK),
|
dtable_1_32, CLK_DIVIDER_HIWORD_MASK),
|
||||||
DEF_FIXED("TSU", R9A07G044_CLK_TSU, CLK_PLL2_DIV20, 1, 1),
|
DEF_FIXED("TSU", R9A07G044_CLK_TSU, CLK_PLL2_DIV20, 1, 1),
|
||||||
DEF_DIV("P1", R9A07G044_CLK_P1, CLK_PLL3_DIV8,
|
DEF_DIV("P1", R9A07G044_CLK_P1, CLK_PLL3_DIV2_4,
|
||||||
DIVPL3B, dtable_3b, CLK_DIVIDER_HIWORD_MASK),
|
DIVPL3B, dtable_1_32, CLK_DIVIDER_HIWORD_MASK),
|
||||||
|
DEF_DIV("P2", R9A07G044_CLK_P2, CLK_PLL3_DIV2_4_2,
|
||||||
|
DIVPL3A, dtable_1_32, CLK_DIVIDER_HIWORD_MASK),
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct rzg2l_mod_clk r9a07g044_mod_clks[] = {
|
static struct rzg2l_mod_clk r9a07g044_mod_clks[] = {
|
||||||
DEF_MOD("gic", R9A07G044_CLK_GIC600,
|
DEF_MOD("gic", R9A07G044_GIC600_GICCLK, R9A07G044_CLK_P1,
|
||||||
R9A07G044_CLK_P1,
|
0x514, 0),
|
||||||
0x514, BIT(0), (BIT(0) | BIT(1))),
|
DEF_MOD("ia55_pclk", R9A07G044_IA55_PCLK, R9A07G044_CLK_P2,
|
||||||
DEF_MOD("ia55", R9A07G044_CLK_IA55,
|
0x518, 0),
|
||||||
R9A07G044_CLK_P1,
|
DEF_MOD("ia55_clk", R9A07G044_IA55_CLK, R9A07G044_CLK_P1,
|
||||||
0x518, (BIT(0) | BIT(1)), BIT(0)),
|
0x518, 1),
|
||||||
DEF_MOD("scif0", R9A07G044_CLK_SCIF0,
|
DEF_MOD("scif0", R9A07G044_SCIF0_CLK_PCK, R9A07G044_CLK_P0,
|
||||||
R9A07G044_CLK_P0,
|
0x584, 0),
|
||||||
0x584, BIT(0), BIT(0)),
|
DEF_MOD("scif1", R9A07G044_SCIF1_CLK_PCK, R9A07G044_CLK_P0,
|
||||||
DEF_MOD("scif1", R9A07G044_CLK_SCIF1,
|
0x584, 1),
|
||||||
R9A07G044_CLK_P0,
|
DEF_MOD("scif2", R9A07G044_SCIF2_CLK_PCK, R9A07G044_CLK_P0,
|
||||||
0x584, BIT(1), BIT(1)),
|
0x584, 2),
|
||||||
DEF_MOD("scif2", R9A07G044_CLK_SCIF2,
|
DEF_MOD("scif3", R9A07G044_SCIF3_CLK_PCK, R9A07G044_CLK_P0,
|
||||||
R9A07G044_CLK_P0,
|
0x584, 3),
|
||||||
0x584, BIT(2), BIT(2)),
|
DEF_MOD("scif4", R9A07G044_SCIF4_CLK_PCK, R9A07G044_CLK_P0,
|
||||||
DEF_MOD("scif3", R9A07G044_CLK_SCIF3,
|
0x584, 4),
|
||||||
R9A07G044_CLK_P0,
|
DEF_MOD("sci0", R9A07G044_SCI0_CLKP, R9A07G044_CLK_P0,
|
||||||
0x584, BIT(3), BIT(3)),
|
0x588, 0),
|
||||||
DEF_MOD("scif4", R9A07G044_CLK_SCIF4,
|
};
|
||||||
R9A07G044_CLK_P0,
|
|
||||||
0x584, BIT(4), BIT(4)),
|
static struct rzg2l_reset r9a07g044_resets[] = {
|
||||||
DEF_MOD("sci0", R9A07G044_CLK_SCI0,
|
DEF_RST(R9A07G044_GIC600_GICRESET_N, 0x814, 0),
|
||||||
R9A07G044_CLK_P0,
|
DEF_RST(R9A07G044_GIC600_DBG_GICRESET_N, 0x814, 1),
|
||||||
0x588, BIT(0), BIT(0)),
|
DEF_RST(R9A07G044_IA55_RESETN, 0x818, 0),
|
||||||
|
DEF_RST(R9A07G044_SCIF0_RST_SYSTEM_N, 0x884, 0),
|
||||||
|
DEF_RST(R9A07G044_SCIF1_RST_SYSTEM_N, 0x884, 1),
|
||||||
|
DEF_RST(R9A07G044_SCIF2_RST_SYSTEM_N, 0x884, 2),
|
||||||
|
DEF_RST(R9A07G044_SCIF3_RST_SYSTEM_N, 0x884, 3),
|
||||||
|
DEF_RST(R9A07G044_SCIF4_RST_SYSTEM_N, 0x884, 4),
|
||||||
|
DEF_RST(R9A07G044_SCI0_RST, 0x888, 0),
|
||||||
};
|
};
|
||||||
|
|
||||||
static const unsigned int r9a07g044_crit_mod_clks[] __initconst = {
|
static const unsigned int r9a07g044_crit_mod_clks[] __initconst = {
|
||||||
MOD_CLK_BASE + R9A07G044_CLK_GIC600,
|
MOD_CLK_BASE + R9A07G044_GIC600_GICCLK,
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct rzg2l_cpg_info r9a07g044_cpg_info = {
|
const struct rzg2l_cpg_info r9a07g044_cpg_info = {
|
||||||
@ -123,5 +134,9 @@ const struct rzg2l_cpg_info r9a07g044_cpg_info = {
|
|||||||
/* Module Clocks */
|
/* Module Clocks */
|
||||||
.mod_clks = r9a07g044_mod_clks,
|
.mod_clks = r9a07g044_mod_clks,
|
||||||
.num_mod_clks = ARRAY_SIZE(r9a07g044_mod_clks),
|
.num_mod_clks = ARRAY_SIZE(r9a07g044_mod_clks),
|
||||||
.num_hw_mod_clks = R9A07G044_CLK_MIPI_DSI_PIN + 1,
|
.num_hw_mod_clks = R9A07G044_TSU_PCLK + 1,
|
||||||
|
|
||||||
|
/* Resets */
|
||||||
|
.resets = r9a07g044_resets,
|
||||||
|
.num_resets = ARRAY_SIZE(r9a07g044_resets),
|
||||||
};
|
};
|
||||||
|
@ -47,9 +47,9 @@
|
|||||||
#define SDIV(val) DIV_RSMASK(val, 0, 0x7)
|
#define SDIV(val) DIV_RSMASK(val, 0, 0x7)
|
||||||
|
|
||||||
#define CLK_ON_R(reg) (reg)
|
#define CLK_ON_R(reg) (reg)
|
||||||
#define CLK_MON_R(reg) (0x680 - 0x500 + (reg))
|
#define CLK_MON_R(reg) (0x180 + (reg))
|
||||||
#define CLK_RST_R(reg) (0x800 - 0x500 + (reg))
|
#define CLK_RST_R(reg) (reg)
|
||||||
#define CLK_MRST_R(reg) (0x980 - 0x500 + (reg))
|
#define CLK_MRST_R(reg) (0x180 + (reg))
|
||||||
|
|
||||||
#define GET_REG_OFFSET(val) ((val >> 20) & 0xfff)
|
#define GET_REG_OFFSET(val) ((val >> 20) & 0xfff)
|
||||||
#define GET_REG_SAMPLL_CLK1(val) ((val >> 22) & 0xfff)
|
#define GET_REG_SAMPLL_CLK1(val) ((val >> 22) & 0xfff)
|
||||||
@ -78,6 +78,7 @@ struct rzg2l_cpg_priv {
|
|||||||
struct clk **clks;
|
struct clk **clks;
|
||||||
unsigned int num_core_clks;
|
unsigned int num_core_clks;
|
||||||
unsigned int num_mod_clks;
|
unsigned int num_mod_clks;
|
||||||
|
unsigned int num_resets;
|
||||||
unsigned int last_dt_core_clk;
|
unsigned int last_dt_core_clk;
|
||||||
|
|
||||||
struct raw_notifier_head notifiers;
|
struct raw_notifier_head notifiers;
|
||||||
@ -315,15 +316,13 @@ rzg2l_cpg_register_core_clk(const struct cpg_core_clk *core,
|
|||||||
*
|
*
|
||||||
* @hw: handle between common and hardware-specific interfaces
|
* @hw: handle between common and hardware-specific interfaces
|
||||||
* @off: register offset
|
* @off: register offset
|
||||||
* @onoff: ON/MON bits
|
* @bit: ON/MON bit
|
||||||
* @reset: reset bits
|
|
||||||
* @priv: CPG/MSTP private data
|
* @priv: CPG/MSTP private data
|
||||||
*/
|
*/
|
||||||
struct mstp_clock {
|
struct mstp_clock {
|
||||||
struct clk_hw hw;
|
struct clk_hw hw;
|
||||||
u16 off;
|
u16 off;
|
||||||
u8 onoff;
|
u8 bit;
|
||||||
u8 reset;
|
|
||||||
struct rzg2l_cpg_priv *priv;
|
struct rzg2l_cpg_priv *priv;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -337,6 +336,7 @@ static int rzg2l_mod_clock_endisable(struct clk_hw *hw, bool enable)
|
|||||||
struct device *dev = priv->dev;
|
struct device *dev = priv->dev;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
u32 bitmask = BIT(clock->bit);
|
||||||
u32 value;
|
u32 value;
|
||||||
|
|
||||||
if (!clock->off) {
|
if (!clock->off) {
|
||||||
@ -349,9 +349,9 @@ static int rzg2l_mod_clock_endisable(struct clk_hw *hw, bool enable)
|
|||||||
spin_lock_irqsave(&priv->rmw_lock, flags);
|
spin_lock_irqsave(&priv->rmw_lock, flags);
|
||||||
|
|
||||||
if (enable)
|
if (enable)
|
||||||
value = (clock->onoff << 16) | clock->onoff;
|
value = (bitmask << 16) | bitmask;
|
||||||
else
|
else
|
||||||
value = clock->onoff << 16;
|
value = bitmask << 16;
|
||||||
writel(value, priv->base + CLK_ON_R(reg));
|
writel(value, priv->base + CLK_ON_R(reg));
|
||||||
|
|
||||||
spin_unlock_irqrestore(&priv->rmw_lock, flags);
|
spin_unlock_irqrestore(&priv->rmw_lock, flags);
|
||||||
@ -360,7 +360,7 @@ static int rzg2l_mod_clock_endisable(struct clk_hw *hw, bool enable)
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
for (i = 1000; i > 0; --i) {
|
for (i = 1000; i > 0; --i) {
|
||||||
if (((readl(priv->base + CLK_MON_R(reg))) & clock->onoff))
|
if (((readl(priv->base + CLK_MON_R(reg))) & bitmask))
|
||||||
break;
|
break;
|
||||||
cpu_relax();
|
cpu_relax();
|
||||||
}
|
}
|
||||||
@ -388,6 +388,7 @@ static int rzg2l_mod_clock_is_enabled(struct clk_hw *hw)
|
|||||||
{
|
{
|
||||||
struct mstp_clock *clock = to_mod_clock(hw);
|
struct mstp_clock *clock = to_mod_clock(hw);
|
||||||
struct rzg2l_cpg_priv *priv = clock->priv;
|
struct rzg2l_cpg_priv *priv = clock->priv;
|
||||||
|
u32 bitmask = BIT(clock->bit);
|
||||||
u32 value;
|
u32 value;
|
||||||
|
|
||||||
if (!clock->off) {
|
if (!clock->off) {
|
||||||
@ -397,7 +398,7 @@ static int rzg2l_mod_clock_is_enabled(struct clk_hw *hw)
|
|||||||
|
|
||||||
value = readl(priv->base + CLK_MON_R(clock->off));
|
value = readl(priv->base + CLK_MON_R(clock->off));
|
||||||
|
|
||||||
return !(value & clock->onoff);
|
return !(value & bitmask);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct clk_ops rzg2l_mod_clock_ops = {
|
static const struct clk_ops rzg2l_mod_clock_ops = {
|
||||||
@ -457,8 +458,7 @@ rzg2l_cpg_register_mod_clk(const struct rzg2l_mod_clk *mod,
|
|||||||
init.num_parents = 1;
|
init.num_parents = 1;
|
||||||
|
|
||||||
clock->off = mod->off;
|
clock->off = mod->off;
|
||||||
clock->onoff = mod->onoff;
|
clock->bit = mod->bit;
|
||||||
clock->reset = mod->reset;
|
|
||||||
clock->priv = priv;
|
clock->priv = priv;
|
||||||
clock->hw.init = &init;
|
clock->hw.init = &init;
|
||||||
|
|
||||||
@ -483,12 +483,11 @@ static int rzg2l_cpg_reset(struct reset_controller_dev *rcdev,
|
|||||||
{
|
{
|
||||||
struct rzg2l_cpg_priv *priv = rcdev_to_priv(rcdev);
|
struct rzg2l_cpg_priv *priv = rcdev_to_priv(rcdev);
|
||||||
const struct rzg2l_cpg_info *info = priv->info;
|
const struct rzg2l_cpg_info *info = priv->info;
|
||||||
unsigned int reg = info->mod_clks[id].off;
|
unsigned int reg = info->resets[id].off;
|
||||||
u32 dis = info->mod_clks[id].reset;
|
u32 dis = BIT(info->resets[id].bit);
|
||||||
u32 we = dis << 16;
|
u32 we = dis << 16;
|
||||||
|
|
||||||
dev_dbg(rcdev->dev, "reset name:%s id:%ld offset:0x%x\n",
|
dev_dbg(rcdev->dev, "reset id:%ld offset:0x%x\n", id, CLK_RST_R(reg));
|
||||||
info->mod_clks[id].name, id, CLK_RST_R(reg));
|
|
||||||
|
|
||||||
/* Reset module */
|
/* Reset module */
|
||||||
writel(we, priv->base + CLK_RST_R(reg));
|
writel(we, priv->base + CLK_RST_R(reg));
|
||||||
@ -507,11 +506,10 @@ static int rzg2l_cpg_assert(struct reset_controller_dev *rcdev,
|
|||||||
{
|
{
|
||||||
struct rzg2l_cpg_priv *priv = rcdev_to_priv(rcdev);
|
struct rzg2l_cpg_priv *priv = rcdev_to_priv(rcdev);
|
||||||
const struct rzg2l_cpg_info *info = priv->info;
|
const struct rzg2l_cpg_info *info = priv->info;
|
||||||
unsigned int reg = info->mod_clks[id].off;
|
unsigned int reg = info->resets[id].off;
|
||||||
u32 value = info->mod_clks[id].reset << 16;
|
u32 value = BIT(info->resets[id].bit) << 16;
|
||||||
|
|
||||||
dev_dbg(rcdev->dev, "assert name:%s id:%ld offset:0x%x\n",
|
dev_dbg(rcdev->dev, "assert id:%ld offset:0x%x\n", id, CLK_RST_R(reg));
|
||||||
info->mod_clks[id].name, id, CLK_RST_R(reg));
|
|
||||||
|
|
||||||
writel(value, priv->base + CLK_RST_R(reg));
|
writel(value, priv->base + CLK_RST_R(reg));
|
||||||
return 0;
|
return 0;
|
||||||
@ -522,12 +520,12 @@ static int rzg2l_cpg_deassert(struct reset_controller_dev *rcdev,
|
|||||||
{
|
{
|
||||||
struct rzg2l_cpg_priv *priv = rcdev_to_priv(rcdev);
|
struct rzg2l_cpg_priv *priv = rcdev_to_priv(rcdev);
|
||||||
const struct rzg2l_cpg_info *info = priv->info;
|
const struct rzg2l_cpg_info *info = priv->info;
|
||||||
unsigned int reg = info->mod_clks[id].off;
|
unsigned int reg = info->resets[id].off;
|
||||||
u32 dis = info->mod_clks[id].reset;
|
u32 dis = BIT(info->resets[id].bit);
|
||||||
u32 value = (dis << 16) | dis;
|
u32 value = (dis << 16) | dis;
|
||||||
|
|
||||||
dev_dbg(rcdev->dev, "deassert name:%s id:%ld offset:0x%x\n",
|
dev_dbg(rcdev->dev, "deassert id:%ld offset:0x%x\n", id,
|
||||||
info->mod_clks[id].name, id, CLK_RST_R(reg));
|
CLK_RST_R(reg));
|
||||||
|
|
||||||
writel(value, priv->base + CLK_RST_R(reg));
|
writel(value, priv->base + CLK_RST_R(reg));
|
||||||
return 0;
|
return 0;
|
||||||
@ -538,8 +536,8 @@ static int rzg2l_cpg_status(struct reset_controller_dev *rcdev,
|
|||||||
{
|
{
|
||||||
struct rzg2l_cpg_priv *priv = rcdev_to_priv(rcdev);
|
struct rzg2l_cpg_priv *priv = rcdev_to_priv(rcdev);
|
||||||
const struct rzg2l_cpg_info *info = priv->info;
|
const struct rzg2l_cpg_info *info = priv->info;
|
||||||
unsigned int reg = info->mod_clks[id].off;
|
unsigned int reg = info->resets[id].off;
|
||||||
u32 bitmask = info->mod_clks[id].reset;
|
u32 bitmask = BIT(info->resets[id].bit);
|
||||||
|
|
||||||
return !(readl(priv->base + CLK_MRST_R(reg)) & bitmask);
|
return !(readl(priv->base + CLK_MRST_R(reg)) & bitmask);
|
||||||
}
|
}
|
||||||
@ -554,9 +552,11 @@ static const struct reset_control_ops rzg2l_cpg_reset_ops = {
|
|||||||
static int rzg2l_cpg_reset_xlate(struct reset_controller_dev *rcdev,
|
static int rzg2l_cpg_reset_xlate(struct reset_controller_dev *rcdev,
|
||||||
const struct of_phandle_args *reset_spec)
|
const struct of_phandle_args *reset_spec)
|
||||||
{
|
{
|
||||||
|
struct rzg2l_cpg_priv *priv = rcdev_to_priv(rcdev);
|
||||||
|
const struct rzg2l_cpg_info *info = priv->info;
|
||||||
unsigned int id = reset_spec->args[0];
|
unsigned int id = reset_spec->args[0];
|
||||||
|
|
||||||
if (id >= rcdev->nr_resets) {
|
if (id >= rcdev->nr_resets || !info->resets[id].off) {
|
||||||
dev_err(rcdev->dev, "Invalid reset index %u\n", id);
|
dev_err(rcdev->dev, "Invalid reset index %u\n", id);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
@ -571,7 +571,7 @@ static int rzg2l_cpg_reset_controller_register(struct rzg2l_cpg_priv *priv)
|
|||||||
priv->rcdev.dev = priv->dev;
|
priv->rcdev.dev = priv->dev;
|
||||||
priv->rcdev.of_reset_n_cells = 1;
|
priv->rcdev.of_reset_n_cells = 1;
|
||||||
priv->rcdev.of_xlate = rzg2l_cpg_reset_xlate;
|
priv->rcdev.of_xlate = rzg2l_cpg_reset_xlate;
|
||||||
priv->rcdev.nr_resets = priv->num_mod_clks;
|
priv->rcdev.nr_resets = priv->num_resets;
|
||||||
|
|
||||||
return devm_reset_controller_register(priv->dev, &priv->rcdev);
|
return devm_reset_controller_register(priv->dev, &priv->rcdev);
|
||||||
}
|
}
|
||||||
@ -594,42 +594,49 @@ static int rzg2l_cpg_attach_dev(struct generic_pm_domain *unused, struct device
|
|||||||
{
|
{
|
||||||
struct device_node *np = dev->of_node;
|
struct device_node *np = dev->of_node;
|
||||||
struct of_phandle_args clkspec;
|
struct of_phandle_args clkspec;
|
||||||
|
bool once = true;
|
||||||
struct clk *clk;
|
struct clk *clk;
|
||||||
int error;
|
int error;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
while (!of_parse_phandle_with_args(np, "clocks", "#clock-cells", i,
|
while (!of_parse_phandle_with_args(np, "clocks", "#clock-cells", i,
|
||||||
&clkspec)) {
|
&clkspec)) {
|
||||||
if (rzg2l_cpg_is_pm_clk(&clkspec))
|
if (rzg2l_cpg_is_pm_clk(&clkspec)) {
|
||||||
goto found;
|
if (once) {
|
||||||
|
once = false;
|
||||||
|
error = pm_clk_create(dev);
|
||||||
|
if (error) {
|
||||||
|
of_node_put(clkspec.np);
|
||||||
|
goto err;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
clk = of_clk_get_from_provider(&clkspec);
|
||||||
|
of_node_put(clkspec.np);
|
||||||
|
if (IS_ERR(clk)) {
|
||||||
|
error = PTR_ERR(clk);
|
||||||
|
goto fail_destroy;
|
||||||
|
}
|
||||||
|
|
||||||
of_node_put(clkspec.np);
|
error = pm_clk_add_clk(dev, clk);
|
||||||
|
if (error) {
|
||||||
|
dev_err(dev, "pm_clk_add_clk failed %d\n",
|
||||||
|
error);
|
||||||
|
goto fail_put;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
of_node_put(clkspec.np);
|
||||||
|
}
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
found:
|
fail_put:
|
||||||
clk = of_clk_get_from_provider(&clkspec);
|
clk_put(clk);
|
||||||
of_node_put(clkspec.np);
|
|
||||||
|
|
||||||
if (IS_ERR(clk))
|
|
||||||
return PTR_ERR(clk);
|
|
||||||
|
|
||||||
error = pm_clk_create(dev);
|
|
||||||
if (error)
|
|
||||||
goto fail_put;
|
|
||||||
|
|
||||||
error = pm_clk_add_clk(dev, clk);
|
|
||||||
if (error)
|
|
||||||
goto fail_destroy;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
fail_destroy:
|
fail_destroy:
|
||||||
pm_clk_destroy(dev);
|
pm_clk_destroy(dev);
|
||||||
fail_put:
|
err:
|
||||||
clk_put(clk);
|
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -692,6 +699,7 @@ static int __init rzg2l_cpg_probe(struct platform_device *pdev)
|
|||||||
priv->clks = clks;
|
priv->clks = clks;
|
||||||
priv->num_core_clks = info->num_total_core_clks;
|
priv->num_core_clks = info->num_total_core_clks;
|
||||||
priv->num_mod_clks = info->num_hw_mod_clks;
|
priv->num_mod_clks = info->num_hw_mod_clks;
|
||||||
|
priv->num_resets = info->num_resets;
|
||||||
priv->last_dt_core_clk = info->last_dt_core_clk;
|
priv->last_dt_core_clk = info->last_dt_core_clk;
|
||||||
|
|
||||||
for (i = 0; i < nclks; i++)
|
for (i = 0; i < nclks; i++)
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
#define DDIV_PACK(offset, bitpos, size) \
|
#define DDIV_PACK(offset, bitpos, size) \
|
||||||
(((offset) << 20) | ((bitpos) << 12) | ((size) << 8))
|
(((offset) << 20) | ((bitpos) << 12) | ((size) << 8))
|
||||||
#define DIVPL2A DDIV_PACK(CPG_PL2_DDIV, 0, 3)
|
#define DIVPL2A DDIV_PACK(CPG_PL2_DDIV, 0, 3)
|
||||||
|
#define DIVPL3A DDIV_PACK(CPG_PL3A_DDIV, 0, 3)
|
||||||
#define DIVPL3B DDIV_PACK(CPG_PL3A_DDIV, 4, 3)
|
#define DIVPL3B DDIV_PACK(CPG_PL3A_DDIV, 4, 3)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -76,26 +77,40 @@ enum clk_types {
|
|||||||
* @id: clock index in array containing all Core and Module Clocks
|
* @id: clock index in array containing all Core and Module Clocks
|
||||||
* @parent: id of parent clock
|
* @parent: id of parent clock
|
||||||
* @off: register offset
|
* @off: register offset
|
||||||
* @onoff: ON/MON bits
|
* @bit: ON/MON bit
|
||||||
* @reset: reset bits
|
|
||||||
*/
|
*/
|
||||||
struct rzg2l_mod_clk {
|
struct rzg2l_mod_clk {
|
||||||
const char *name;
|
const char *name;
|
||||||
unsigned int id;
|
unsigned int id;
|
||||||
unsigned int parent;
|
unsigned int parent;
|
||||||
u16 off;
|
u16 off;
|
||||||
u8 onoff;
|
u8 bit;
|
||||||
u8 reset;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#define DEF_MOD(_name, _id, _parent, _off, _onoff, _reset) \
|
#define DEF_MOD(_name, _id, _parent, _off, _bit) \
|
||||||
[_id] = { \
|
{ \
|
||||||
.name = _name, \
|
.name = _name, \
|
||||||
.id = MOD_CLK_BASE + _id, \
|
.id = MOD_CLK_BASE + (_id), \
|
||||||
.parent = (_parent), \
|
.parent = (_parent), \
|
||||||
.off = (_off), \
|
.off = (_off), \
|
||||||
.onoff = (_onoff), \
|
.bit = (_bit), \
|
||||||
.reset = (_reset) \
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* struct rzg2l_reset - Reset definitions
|
||||||
|
*
|
||||||
|
* @off: register offset
|
||||||
|
* @bit: reset bit
|
||||||
|
*/
|
||||||
|
struct rzg2l_reset {
|
||||||
|
u16 off;
|
||||||
|
u8 bit;
|
||||||
|
};
|
||||||
|
|
||||||
|
#define DEF_RST(_id, _off, _bit) \
|
||||||
|
[_id] = { \
|
||||||
|
.off = (_off), \
|
||||||
|
.bit = (_bit) \
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -126,6 +141,10 @@ struct rzg2l_cpg_info {
|
|||||||
unsigned int num_mod_clks;
|
unsigned int num_mod_clks;
|
||||||
unsigned int num_hw_mod_clks;
|
unsigned int num_hw_mod_clks;
|
||||||
|
|
||||||
|
/* Resets */
|
||||||
|
const struct rzg2l_reset *resets;
|
||||||
|
unsigned int num_resets;
|
||||||
|
|
||||||
/* Critical Module Clocks that should not be disabled */
|
/* Critical Module Clocks that should not be disabled */
|
||||||
const unsigned int *crit_mod_clks;
|
const unsigned int *crit_mod_clks;
|
||||||
unsigned int num_crit_mod_clks;
|
unsigned int num_crit_mod_clks;
|
||||||
|
@ -942,8 +942,6 @@ static int __init longhaul_init(void)
|
|||||||
return cpufreq_register_driver(&longhaul_driver);
|
return cpufreq_register_driver(&longhaul_driver);
|
||||||
case 10:
|
case 10:
|
||||||
pr_err("Use acpi-cpufreq driver for VIA C7\n");
|
pr_err("Use acpi-cpufreq driver for VIA C7\n");
|
||||||
default:
|
|
||||||
;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
@ -211,8 +211,8 @@ static struct sync_file *sync_file_merge(const char *name, struct sync_file *a,
|
|||||||
struct sync_file *b)
|
struct sync_file *b)
|
||||||
{
|
{
|
||||||
struct sync_file *sync_file;
|
struct sync_file *sync_file;
|
||||||
struct dma_fence **fences, **nfences, **a_fences, **b_fences;
|
struct dma_fence **fences = NULL, **nfences, **a_fences, **b_fences;
|
||||||
int i, i_a, i_b, num_fences, a_num_fences, b_num_fences;
|
int i = 0, i_a, i_b, num_fences, a_num_fences, b_num_fences;
|
||||||
|
|
||||||
sync_file = sync_file_alloc();
|
sync_file = sync_file_alloc();
|
||||||
if (!sync_file)
|
if (!sync_file)
|
||||||
@ -236,7 +236,7 @@ static struct sync_file *sync_file_merge(const char *name, struct sync_file *a,
|
|||||||
* If a sync_file can only be created with sync_file_merge
|
* If a sync_file can only be created with sync_file_merge
|
||||||
* and sync_file_create, this is a reasonable assumption.
|
* and sync_file_create, this is a reasonable assumption.
|
||||||
*/
|
*/
|
||||||
for (i = i_a = i_b = 0; i_a < a_num_fences && i_b < b_num_fences; ) {
|
for (i_a = i_b = 0; i_a < a_num_fences && i_b < b_num_fences; ) {
|
||||||
struct dma_fence *pt_a = a_fences[i_a];
|
struct dma_fence *pt_a = a_fences[i_a];
|
||||||
struct dma_fence *pt_b = b_fences[i_b];
|
struct dma_fence *pt_b = b_fences[i_b];
|
||||||
|
|
||||||
@ -277,15 +277,16 @@ static struct sync_file *sync_file_merge(const char *name, struct sync_file *a,
|
|||||||
fences = nfences;
|
fences = nfences;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sync_file_set_fence(sync_file, fences, i) < 0) {
|
if (sync_file_set_fence(sync_file, fences, i) < 0)
|
||||||
kfree(fences);
|
|
||||||
goto err;
|
goto err;
|
||||||
}
|
|
||||||
|
|
||||||
strlcpy(sync_file->user_name, name, sizeof(sync_file->user_name));
|
strlcpy(sync_file->user_name, name, sizeof(sync_file->user_name));
|
||||||
return sync_file;
|
return sync_file;
|
||||||
|
|
||||||
err:
|
err:
|
||||||
|
while (i)
|
||||||
|
dma_fence_put(fences[--i]);
|
||||||
|
kfree(fences);
|
||||||
fput(sync_file->file);
|
fput(sync_file->file);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
@ -618,6 +618,7 @@ static int ipu_enable_channel(struct idmac *idmac, struct idmac_channel *ichan)
|
|||||||
case IDMAC_SDC_1:
|
case IDMAC_SDC_1:
|
||||||
case IDMAC_IC_7:
|
case IDMAC_IC_7:
|
||||||
ipu_channel_set_priority(ipu, channel, true);
|
ipu_channel_set_priority(ipu, channel, true);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -978,6 +979,7 @@ static int ipu_init_channel(struct idmac *idmac, struct idmac_channel *ichan)
|
|||||||
case IDMAC_SDC_0:
|
case IDMAC_SDC_0:
|
||||||
case IDMAC_SDC_1:
|
case IDMAC_SDC_1:
|
||||||
n_desc = 4;
|
n_desc = 4;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -813,6 +813,7 @@ inline bool is_buswidth_valid(u8 buswidth, bool is_mpc8308)
|
|||||||
case 16:
|
case 16:
|
||||||
if (is_mpc8308)
|
if (is_mpc8308)
|
||||||
return false;
|
return false;
|
||||||
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
case 2:
|
case 2:
|
||||||
case 4:
|
case 4:
|
||||||
|
@ -4948,6 +4948,7 @@ static int setup_resources(struct udma_dev *ud)
|
|||||||
ud->tchan_cnt),
|
ud->tchan_cnt),
|
||||||
ud->rchan_cnt - bitmap_weight(ud->rchan_map,
|
ud->rchan_cnt - bitmap_weight(ud->rchan_map,
|
||||||
ud->rchan_cnt));
|
ud->rchan_cnt));
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -46,9 +46,6 @@ static int ffa_device_probe(struct device *dev)
|
|||||||
struct ffa_driver *ffa_drv = to_ffa_driver(dev->driver);
|
struct ffa_driver *ffa_drv = to_ffa_driver(dev->driver);
|
||||||
struct ffa_device *ffa_dev = to_ffa_dev(dev);
|
struct ffa_device *ffa_dev = to_ffa_dev(dev);
|
||||||
|
|
||||||
if (!ffa_device_match(dev, dev->driver))
|
|
||||||
return -ENODEV;
|
|
||||||
|
|
||||||
return ffa_drv->probe(ffa_dev);
|
return ffa_drv->probe(ffa_dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -99,6 +96,9 @@ int ffa_driver_register(struct ffa_driver *driver, struct module *owner,
|
|||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
if (!driver->probe)
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
driver->driver.bus = &ffa_bus_type;
|
driver->driver.bus = &ffa_bus_type;
|
||||||
driver->driver.name = driver->name;
|
driver->driver.name = driver->name;
|
||||||
driver->driver.owner = owner;
|
driver->driver.owner = owner;
|
||||||
|
@ -120,7 +120,7 @@
|
|||||||
#define PACK_TARGET_INFO(s, r) \
|
#define PACK_TARGET_INFO(s, r) \
|
||||||
(FIELD_PREP(SENDER_ID_MASK, (s)) | FIELD_PREP(RECEIVER_ID_MASK, (r)))
|
(FIELD_PREP(SENDER_ID_MASK, (s)) | FIELD_PREP(RECEIVER_ID_MASK, (r)))
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* FF-A specification mentions explicitly about '4K pages'. This should
|
* FF-A specification mentions explicitly about '4K pages'. This should
|
||||||
* not be confused with the kernel PAGE_SIZE, which is the translation
|
* not be confused with the kernel PAGE_SIZE, which is the translation
|
||||||
* granule kernel is configured and may be one among 4K, 16K and 64K.
|
* granule kernel is configured and may be one among 4K, 16K and 64K.
|
||||||
@ -149,8 +149,10 @@ static const int ffa_linux_errmap[] = {
|
|||||||
|
|
||||||
static inline int ffa_to_linux_errno(int errno)
|
static inline int ffa_to_linux_errno(int errno)
|
||||||
{
|
{
|
||||||
if (errno < FFA_RET_SUCCESS && errno >= -ARRAY_SIZE(ffa_linux_errmap))
|
int err_idx = -errno;
|
||||||
return ffa_linux_errmap[-errno];
|
|
||||||
|
if (err_idx >= 0 && err_idx < ARRAY_SIZE(ffa_linux_errmap))
|
||||||
|
return ffa_linux_errmap[err_idx];
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -104,11 +104,6 @@ static int scmi_dev_probe(struct device *dev)
|
|||||||
{
|
{
|
||||||
struct scmi_driver *scmi_drv = to_scmi_driver(dev->driver);
|
struct scmi_driver *scmi_drv = to_scmi_driver(dev->driver);
|
||||||
struct scmi_device *scmi_dev = to_scmi_dev(dev);
|
struct scmi_device *scmi_dev = to_scmi_dev(dev);
|
||||||
const struct scmi_device_id *id;
|
|
||||||
|
|
||||||
id = scmi_dev_match_id(scmi_dev, scmi_drv);
|
|
||||||
if (!id)
|
|
||||||
return -ENODEV;
|
|
||||||
|
|
||||||
if (!scmi_dev->handle)
|
if (!scmi_dev->handle)
|
||||||
return -EPROBE_DEFER;
|
return -EPROBE_DEFER;
|
||||||
@ -139,6 +134,9 @@ int scmi_driver_register(struct scmi_driver *driver, struct module *owner,
|
|||||||
{
|
{
|
||||||
int retval;
|
int retval;
|
||||||
|
|
||||||
|
if (!driver->probe)
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
retval = scmi_protocol_device_request(driver->id_table);
|
retval = scmi_protocol_device_request(driver->id_table);
|
||||||
if (retval)
|
if (retval)
|
||||||
return retval;
|
return retval;
|
||||||
|
@ -47,7 +47,6 @@ enum scmi_error_codes {
|
|||||||
SCMI_ERR_GENERIC = -8, /* Generic Error */
|
SCMI_ERR_GENERIC = -8, /* Generic Error */
|
||||||
SCMI_ERR_HARDWARE = -9, /* Hardware Error */
|
SCMI_ERR_HARDWARE = -9, /* Hardware Error */
|
||||||
SCMI_ERR_PROTOCOL = -10,/* Protocol Error */
|
SCMI_ERR_PROTOCOL = -10,/* Protocol Error */
|
||||||
SCMI_ERR_MAX
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/* List of all SCMI devices active in system */
|
/* List of all SCMI devices active in system */
|
||||||
@ -166,8 +165,10 @@ static const int scmi_linux_errmap[] = {
|
|||||||
|
|
||||||
static inline int scmi_to_linux_errno(int errno)
|
static inline int scmi_to_linux_errno(int errno)
|
||||||
{
|
{
|
||||||
if (errno < SCMI_SUCCESS && errno > SCMI_ERR_MAX)
|
int err_idx = -errno;
|
||||||
return scmi_linux_errmap[-errno];
|
|
||||||
|
if (err_idx >= SCMI_SUCCESS && err_idx < ARRAY_SIZE(scmi_linux_errmap))
|
||||||
|
return scmi_linux_errmap[err_idx];
|
||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1025,8 +1026,9 @@ static int __scmi_xfer_info_init(struct scmi_info *sinfo,
|
|||||||
const struct scmi_desc *desc = sinfo->desc;
|
const struct scmi_desc *desc = sinfo->desc;
|
||||||
|
|
||||||
/* Pre-allocated messages, no more than what hdr.seq can support */
|
/* Pre-allocated messages, no more than what hdr.seq can support */
|
||||||
if (WARN_ON(desc->max_msg >= MSG_TOKEN_MAX)) {
|
if (WARN_ON(!desc->max_msg || desc->max_msg > MSG_TOKEN_MAX)) {
|
||||||
dev_err(dev, "Maximum message of %d exceeds supported %ld\n",
|
dev_err(dev,
|
||||||
|
"Invalid maximum messages %d, not in range [1 - %lu]\n",
|
||||||
desc->max_msg, MSG_TOKEN_MAX);
|
desc->max_msg, MSG_TOKEN_MAX);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
@ -1137,6 +1139,8 @@ scmi_txrx_setup(struct scmi_info *info, struct device *dev, int prot_id)
|
|||||||
* @proto_id and @name: if device was still not existent it is created as a
|
* @proto_id and @name: if device was still not existent it is created as a
|
||||||
* child of the specified SCMI instance @info and its transport properly
|
* child of the specified SCMI instance @info and its transport properly
|
||||||
* initialized as usual.
|
* initialized as usual.
|
||||||
|
*
|
||||||
|
* Return: A properly initialized scmi device, NULL otherwise.
|
||||||
*/
|
*/
|
||||||
static inline struct scmi_device *
|
static inline struct scmi_device *
|
||||||
scmi_get_protocol_device(struct device_node *np, struct scmi_info *info,
|
scmi_get_protocol_device(struct device_node *np, struct scmi_info *info,
|
||||||
|
@ -1457,6 +1457,8 @@ static void scmi_devm_release_notifier(struct device *dev, void *res)
|
|||||||
*
|
*
|
||||||
* Generic devres managed helper to register a notifier_block against a
|
* Generic devres managed helper to register a notifier_block against a
|
||||||
* protocol event.
|
* protocol event.
|
||||||
|
*
|
||||||
|
* Return: 0 on Success
|
||||||
*/
|
*/
|
||||||
static int scmi_devm_notifier_register(struct scmi_device *sdev,
|
static int scmi_devm_notifier_register(struct scmi_device *sdev,
|
||||||
u8 proto_id, u8 evt_id,
|
u8 proto_id, u8 evt_id,
|
||||||
@ -1523,6 +1525,8 @@ static int scmi_devm_notifier_match(struct device *dev, void *res, void *data)
|
|||||||
* Generic devres managed helper to explicitly un-register a notifier_block
|
* Generic devres managed helper to explicitly un-register a notifier_block
|
||||||
* against a protocol event, which was previously registered using the above
|
* against a protocol event, which was previously registered using the above
|
||||||
* @scmi_devm_notifier_register.
|
* @scmi_devm_notifier_register.
|
||||||
|
*
|
||||||
|
* Return: 0 on Success
|
||||||
*/
|
*/
|
||||||
static int scmi_devm_notifier_unregister(struct scmi_device *sdev,
|
static int scmi_devm_notifier_unregister(struct scmi_device *sdev,
|
||||||
u8 proto_id, u8 evt_id,
|
u8 proto_id, u8 evt_id,
|
||||||
|
@ -166,7 +166,8 @@ struct scmi_msg_sensor_reading_get {
|
|||||||
|
|
||||||
struct scmi_resp_sensor_reading_complete {
|
struct scmi_resp_sensor_reading_complete {
|
||||||
__le32 id;
|
__le32 id;
|
||||||
__le64 readings;
|
__le32 readings_low;
|
||||||
|
__le32 readings_high;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct scmi_sensor_reading_resp {
|
struct scmi_sensor_reading_resp {
|
||||||
@ -717,7 +718,8 @@ static int scmi_sensor_reading_get(const struct scmi_protocol_handle *ph,
|
|||||||
|
|
||||||
resp = t->rx.buf;
|
resp = t->rx.buf;
|
||||||
if (le32_to_cpu(resp->id) == sensor_id)
|
if (le32_to_cpu(resp->id) == sensor_id)
|
||||||
*value = get_unaligned_le64(&resp->readings);
|
*value =
|
||||||
|
get_unaligned_le64(&resp->readings_low);
|
||||||
else
|
else
|
||||||
ret = -EPROTO;
|
ret = -EPROTO;
|
||||||
}
|
}
|
||||||
|
@ -269,7 +269,7 @@ int amdgpu_amdkfd_gpuvm_free_memory_of_gpu(
|
|||||||
struct kgd_dev *kgd, struct kgd_mem *mem, void *drm_priv,
|
struct kgd_dev *kgd, struct kgd_mem *mem, void *drm_priv,
|
||||||
uint64_t *size);
|
uint64_t *size);
|
||||||
int amdgpu_amdkfd_gpuvm_map_memory_to_gpu(
|
int amdgpu_amdkfd_gpuvm_map_memory_to_gpu(
|
||||||
struct kgd_dev *kgd, struct kgd_mem *mem, void *drm_priv, bool *table_freed);
|
struct kgd_dev *kgd, struct kgd_mem *mem, void *drm_priv);
|
||||||
int amdgpu_amdkfd_gpuvm_unmap_memory_from_gpu(
|
int amdgpu_amdkfd_gpuvm_unmap_memory_from_gpu(
|
||||||
struct kgd_dev *kgd, struct kgd_mem *mem, void *drm_priv);
|
struct kgd_dev *kgd, struct kgd_mem *mem, void *drm_priv);
|
||||||
int amdgpu_amdkfd_gpuvm_sync_memory(
|
int amdgpu_amdkfd_gpuvm_sync_memory(
|
||||||
|
@ -1057,8 +1057,7 @@ static void unmap_bo_from_gpuvm(struct kgd_mem *mem,
|
|||||||
|
|
||||||
static int update_gpuvm_pte(struct kgd_mem *mem,
|
static int update_gpuvm_pte(struct kgd_mem *mem,
|
||||||
struct kfd_mem_attachment *entry,
|
struct kfd_mem_attachment *entry,
|
||||||
struct amdgpu_sync *sync,
|
struct amdgpu_sync *sync)
|
||||||
bool *table_freed)
|
|
||||||
{
|
{
|
||||||
struct amdgpu_bo_va *bo_va = entry->bo_va;
|
struct amdgpu_bo_va *bo_va = entry->bo_va;
|
||||||
struct amdgpu_device *adev = entry->adev;
|
struct amdgpu_device *adev = entry->adev;
|
||||||
@ -1069,7 +1068,7 @@ static int update_gpuvm_pte(struct kgd_mem *mem,
|
|||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
/* Update the page tables */
|
/* Update the page tables */
|
||||||
ret = amdgpu_vm_bo_update(adev, bo_va, false, table_freed);
|
ret = amdgpu_vm_bo_update(adev, bo_va, false);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
pr_err("amdgpu_vm_bo_update failed\n");
|
pr_err("amdgpu_vm_bo_update failed\n");
|
||||||
return ret;
|
return ret;
|
||||||
@ -1081,8 +1080,7 @@ static int update_gpuvm_pte(struct kgd_mem *mem,
|
|||||||
static int map_bo_to_gpuvm(struct kgd_mem *mem,
|
static int map_bo_to_gpuvm(struct kgd_mem *mem,
|
||||||
struct kfd_mem_attachment *entry,
|
struct kfd_mem_attachment *entry,
|
||||||
struct amdgpu_sync *sync,
|
struct amdgpu_sync *sync,
|
||||||
bool no_update_pte,
|
bool no_update_pte)
|
||||||
bool *table_freed)
|
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
@ -1099,7 +1097,7 @@ static int map_bo_to_gpuvm(struct kgd_mem *mem,
|
|||||||
if (no_update_pte)
|
if (no_update_pte)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
ret = update_gpuvm_pte(mem, entry, sync, table_freed);
|
ret = update_gpuvm_pte(mem, entry, sync);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
pr_err("update_gpuvm_pte() failed\n");
|
pr_err("update_gpuvm_pte() failed\n");
|
||||||
goto update_gpuvm_pte_failed;
|
goto update_gpuvm_pte_failed;
|
||||||
@ -1393,8 +1391,7 @@ int amdgpu_amdkfd_gpuvm_alloc_memory_of_gpu(
|
|||||||
domain = alloc_domain = AMDGPU_GEM_DOMAIN_VRAM;
|
domain = alloc_domain = AMDGPU_GEM_DOMAIN_VRAM;
|
||||||
alloc_flags = AMDGPU_GEM_CREATE_VRAM_WIPE_ON_RELEASE;
|
alloc_flags = AMDGPU_GEM_CREATE_VRAM_WIPE_ON_RELEASE;
|
||||||
alloc_flags |= (flags & KFD_IOC_ALLOC_MEM_FLAGS_PUBLIC) ?
|
alloc_flags |= (flags & KFD_IOC_ALLOC_MEM_FLAGS_PUBLIC) ?
|
||||||
AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED :
|
AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED : 0;
|
||||||
AMDGPU_GEM_CREATE_NO_CPU_ACCESS;
|
|
||||||
} else if (flags & KFD_IOC_ALLOC_MEM_FLAGS_GTT) {
|
} else if (flags & KFD_IOC_ALLOC_MEM_FLAGS_GTT) {
|
||||||
domain = alloc_domain = AMDGPU_GEM_DOMAIN_GTT;
|
domain = alloc_domain = AMDGPU_GEM_DOMAIN_GTT;
|
||||||
alloc_flags = 0;
|
alloc_flags = 0;
|
||||||
@ -1597,8 +1594,7 @@ int amdgpu_amdkfd_gpuvm_free_memory_of_gpu(
|
|||||||
}
|
}
|
||||||
|
|
||||||
int amdgpu_amdkfd_gpuvm_map_memory_to_gpu(
|
int amdgpu_amdkfd_gpuvm_map_memory_to_gpu(
|
||||||
struct kgd_dev *kgd, struct kgd_mem *mem,
|
struct kgd_dev *kgd, struct kgd_mem *mem, void *drm_priv)
|
||||||
void *drm_priv, bool *table_freed)
|
|
||||||
{
|
{
|
||||||
struct amdgpu_device *adev = get_amdgpu_device(kgd);
|
struct amdgpu_device *adev = get_amdgpu_device(kgd);
|
||||||
struct amdgpu_vm *avm = drm_priv_to_vm(drm_priv);
|
struct amdgpu_vm *avm = drm_priv_to_vm(drm_priv);
|
||||||
@ -1686,7 +1682,7 @@ int amdgpu_amdkfd_gpuvm_map_memory_to_gpu(
|
|||||||
entry->va, entry->va + bo_size, entry);
|
entry->va, entry->va + bo_size, entry);
|
||||||
|
|
||||||
ret = map_bo_to_gpuvm(mem, entry, ctx.sync,
|
ret = map_bo_to_gpuvm(mem, entry, ctx.sync,
|
||||||
is_invalid_userptr, table_freed);
|
is_invalid_userptr);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
pr_err("Failed to map bo to gpuvm\n");
|
pr_err("Failed to map bo to gpuvm\n");
|
||||||
goto out_unreserve;
|
goto out_unreserve;
|
||||||
@ -2136,7 +2132,7 @@ static int validate_invalid_user_pages(struct amdkfd_process_info *process_info)
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
kfd_mem_dmaunmap_attachment(mem, attachment);
|
kfd_mem_dmaunmap_attachment(mem, attachment);
|
||||||
ret = update_gpuvm_pte(mem, attachment, &sync, NULL);
|
ret = update_gpuvm_pte(mem, attachment, &sync);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
pr_err("%s: update PTE failed\n", __func__);
|
pr_err("%s: update PTE failed\n", __func__);
|
||||||
/* make sure this gets validated again */
|
/* make sure this gets validated again */
|
||||||
@ -2342,7 +2338,7 @@ int amdgpu_amdkfd_gpuvm_restore_process_bos(void *info, struct dma_fence **ef)
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
kfd_mem_dmaunmap_attachment(mem, attachment);
|
kfd_mem_dmaunmap_attachment(mem, attachment);
|
||||||
ret = update_gpuvm_pte(mem, attachment, &sync_obj, NULL);
|
ret = update_gpuvm_pte(mem, attachment, &sync_obj);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
pr_debug("Memory eviction: update PTE failed. Try again\n");
|
pr_debug("Memory eviction: update PTE failed. Try again\n");
|
||||||
goto validate_map_fail;
|
goto validate_map_fail;
|
||||||
|
@ -781,7 +781,7 @@ static int amdgpu_cs_vm_handling(struct amdgpu_cs_parser *p)
|
|||||||
if (r)
|
if (r)
|
||||||
return r;
|
return r;
|
||||||
|
|
||||||
r = amdgpu_vm_bo_update(adev, fpriv->prt_va, false, NULL);
|
r = amdgpu_vm_bo_update(adev, fpriv->prt_va, false);
|
||||||
if (r)
|
if (r)
|
||||||
return r;
|
return r;
|
||||||
|
|
||||||
@ -792,7 +792,7 @@ static int amdgpu_cs_vm_handling(struct amdgpu_cs_parser *p)
|
|||||||
if (amdgpu_mcbp || amdgpu_sriov_vf(adev)) {
|
if (amdgpu_mcbp || amdgpu_sriov_vf(adev)) {
|
||||||
bo_va = fpriv->csa_va;
|
bo_va = fpriv->csa_va;
|
||||||
BUG_ON(!bo_va);
|
BUG_ON(!bo_va);
|
||||||
r = amdgpu_vm_bo_update(adev, bo_va, false, NULL);
|
r = amdgpu_vm_bo_update(adev, bo_va, false);
|
||||||
if (r)
|
if (r)
|
||||||
return r;
|
return r;
|
||||||
|
|
||||||
@ -811,7 +811,7 @@ static int amdgpu_cs_vm_handling(struct amdgpu_cs_parser *p)
|
|||||||
if (bo_va == NULL)
|
if (bo_va == NULL)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
r = amdgpu_vm_bo_update(adev, bo_va, false, NULL);
|
r = amdgpu_vm_bo_update(adev, bo_va, false);
|
||||||
if (r)
|
if (r)
|
||||||
return r;
|
return r;
|
||||||
|
|
||||||
|
@ -1168,6 +1168,7 @@ static const struct pci_device_id pciidlist[] = {
|
|||||||
{0x1002, 0x734F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_NAVI14},
|
{0x1002, 0x734F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_NAVI14},
|
||||||
|
|
||||||
/* Renoir */
|
/* Renoir */
|
||||||
|
{0x1002, 0x15E7, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RENOIR|AMD_IS_APU},
|
||||||
{0x1002, 0x1636, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RENOIR|AMD_IS_APU},
|
{0x1002, 0x1636, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RENOIR|AMD_IS_APU},
|
||||||
{0x1002, 0x1638, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RENOIR|AMD_IS_APU},
|
{0x1002, 0x1638, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RENOIR|AMD_IS_APU},
|
||||||
{0x1002, 0x164C, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RENOIR|AMD_IS_APU},
|
{0x1002, 0x164C, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RENOIR|AMD_IS_APU},
|
||||||
|
@ -612,7 +612,7 @@ static void amdgpu_gem_va_update_vm(struct amdgpu_device *adev,
|
|||||||
|
|
||||||
if (operation == AMDGPU_VA_OP_MAP ||
|
if (operation == AMDGPU_VA_OP_MAP ||
|
||||||
operation == AMDGPU_VA_OP_REPLACE) {
|
operation == AMDGPU_VA_OP_REPLACE) {
|
||||||
r = amdgpu_vm_bo_update(adev, bo_va, false, NULL);
|
r = amdgpu_vm_bo_update(adev, bo_va, false);
|
||||||
if (r)
|
if (r)
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
@ -278,6 +278,21 @@ static bool amdgpu_msi_ok(struct amdgpu_device *adev)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void amdgpu_restore_msix(struct amdgpu_device *adev)
|
||||||
|
{
|
||||||
|
u16 ctrl;
|
||||||
|
|
||||||
|
pci_read_config_word(adev->pdev, adev->pdev->msix_cap + PCI_MSIX_FLAGS, &ctrl);
|
||||||
|
if (!(ctrl & PCI_MSIX_FLAGS_ENABLE))
|
||||||
|
return;
|
||||||
|
|
||||||
|
/* VF FLR */
|
||||||
|
ctrl &= ~PCI_MSIX_FLAGS_ENABLE;
|
||||||
|
pci_write_config_word(adev->pdev, adev->pdev->msix_cap + PCI_MSIX_FLAGS, ctrl);
|
||||||
|
ctrl |= PCI_MSIX_FLAGS_ENABLE;
|
||||||
|
pci_write_config_word(adev->pdev, adev->pdev->msix_cap + PCI_MSIX_FLAGS, ctrl);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* amdgpu_irq_init - initialize interrupt handling
|
* amdgpu_irq_init - initialize interrupt handling
|
||||||
*
|
*
|
||||||
@ -569,6 +584,9 @@ void amdgpu_irq_gpu_reset_resume_helper(struct amdgpu_device *adev)
|
|||||||
{
|
{
|
||||||
int i, j, k;
|
int i, j, k;
|
||||||
|
|
||||||
|
if (amdgpu_sriov_vf(adev))
|
||||||
|
amdgpu_restore_msix(adev);
|
||||||
|
|
||||||
for (i = 0; i < AMDGPU_IRQ_CLIENTID_MAX; ++i) {
|
for (i = 0; i < AMDGPU_IRQ_CLIENTID_MAX; ++i) {
|
||||||
if (!adev->irq.client[i].sources)
|
if (!adev->irq.client[i].sources)
|
||||||
continue;
|
continue;
|
||||||
|
@ -809,7 +809,7 @@ static int amdgpu_ras_enable_all_features(struct amdgpu_device *adev,
|
|||||||
|
|
||||||
/* query/inject/cure begin */
|
/* query/inject/cure begin */
|
||||||
int amdgpu_ras_query_error_status(struct amdgpu_device *adev,
|
int amdgpu_ras_query_error_status(struct amdgpu_device *adev,
|
||||||
struct ras_query_if *info)
|
struct ras_query_if *info)
|
||||||
{
|
{
|
||||||
struct ras_manager *obj = amdgpu_ras_find_obj(adev, &info->head);
|
struct ras_manager *obj = amdgpu_ras_find_obj(adev, &info->head);
|
||||||
struct ras_err_data err_data = {0, 0, 0, NULL};
|
struct ras_err_data err_data = {0, 0, 0, NULL};
|
||||||
@ -1043,17 +1043,32 @@ int amdgpu_ras_error_inject(struct amdgpu_device *adev,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* get the total error counts on all IPs */
|
/**
|
||||||
void amdgpu_ras_query_error_count(struct amdgpu_device *adev,
|
* amdgpu_ras_query_error_count -- Get error counts of all IPs
|
||||||
unsigned long *ce_count,
|
* adev: pointer to AMD GPU device
|
||||||
unsigned long *ue_count)
|
* ce_count: pointer to an integer to be set to the count of correctible errors.
|
||||||
|
* ue_count: pointer to an integer to be set to the count of uncorrectible
|
||||||
|
* errors.
|
||||||
|
*
|
||||||
|
* If set, @ce_count or @ue_count, count and return the corresponding
|
||||||
|
* error counts in those integer pointers. Return 0 if the device
|
||||||
|
* supports RAS. Return -EOPNOTSUPP if the device doesn't support RAS.
|
||||||
|
*/
|
||||||
|
int amdgpu_ras_query_error_count(struct amdgpu_device *adev,
|
||||||
|
unsigned long *ce_count,
|
||||||
|
unsigned long *ue_count)
|
||||||
{
|
{
|
||||||
struct amdgpu_ras *con = amdgpu_ras_get_context(adev);
|
struct amdgpu_ras *con = amdgpu_ras_get_context(adev);
|
||||||
struct ras_manager *obj;
|
struct ras_manager *obj;
|
||||||
unsigned long ce, ue;
|
unsigned long ce, ue;
|
||||||
|
|
||||||
if (!adev->ras_enabled || !con)
|
if (!adev->ras_enabled || !con)
|
||||||
return;
|
return -EOPNOTSUPP;
|
||||||
|
|
||||||
|
/* Don't count since no reporting.
|
||||||
|
*/
|
||||||
|
if (!ce_count && !ue_count)
|
||||||
|
return 0;
|
||||||
|
|
||||||
ce = 0;
|
ce = 0;
|
||||||
ue = 0;
|
ue = 0;
|
||||||
@ -1061,9 +1076,11 @@ void amdgpu_ras_query_error_count(struct amdgpu_device *adev,
|
|||||||
struct ras_query_if info = {
|
struct ras_query_if info = {
|
||||||
.head = obj->head,
|
.head = obj->head,
|
||||||
};
|
};
|
||||||
|
int res;
|
||||||
|
|
||||||
if (amdgpu_ras_query_error_status(adev, &info))
|
res = amdgpu_ras_query_error_status(adev, &info);
|
||||||
return;
|
if (res)
|
||||||
|
return res;
|
||||||
|
|
||||||
ce += info.ce_count;
|
ce += info.ce_count;
|
||||||
ue += info.ue_count;
|
ue += info.ue_count;
|
||||||
@ -1074,6 +1091,8 @@ void amdgpu_ras_query_error_count(struct amdgpu_device *adev,
|
|||||||
|
|
||||||
if (ue_count)
|
if (ue_count)
|
||||||
*ue_count = ue;
|
*ue_count = ue;
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
/* query/inject/cure end */
|
/* query/inject/cure end */
|
||||||
|
|
||||||
@ -2137,9 +2156,10 @@ static void amdgpu_ras_counte_dw(struct work_struct *work)
|
|||||||
|
|
||||||
/* Cache new values.
|
/* Cache new values.
|
||||||
*/
|
*/
|
||||||
amdgpu_ras_query_error_count(adev, &ce_count, &ue_count);
|
if (amdgpu_ras_query_error_count(adev, &ce_count, &ue_count) == 0) {
|
||||||
atomic_set(&con->ras_ce_count, ce_count);
|
atomic_set(&con->ras_ce_count, ce_count);
|
||||||
atomic_set(&con->ras_ue_count, ue_count);
|
atomic_set(&con->ras_ue_count, ue_count);
|
||||||
|
}
|
||||||
|
|
||||||
pm_runtime_mark_last_busy(dev->dev);
|
pm_runtime_mark_last_busy(dev->dev);
|
||||||
Out:
|
Out:
|
||||||
@ -2312,9 +2332,10 @@ int amdgpu_ras_late_init(struct amdgpu_device *adev,
|
|||||||
|
|
||||||
/* Those are the cached values at init.
|
/* Those are the cached values at init.
|
||||||
*/
|
*/
|
||||||
amdgpu_ras_query_error_count(adev, &ce_count, &ue_count);
|
if (amdgpu_ras_query_error_count(adev, &ce_count, &ue_count) == 0) {
|
||||||
atomic_set(&con->ras_ce_count, ce_count);
|
atomic_set(&con->ras_ce_count, ce_count);
|
||||||
atomic_set(&con->ras_ue_count, ue_count);
|
atomic_set(&con->ras_ue_count, ue_count);
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
cleanup:
|
cleanup:
|
||||||
|
@ -490,9 +490,9 @@ int amdgpu_ras_request_reset_on_boot(struct amdgpu_device *adev,
|
|||||||
void amdgpu_ras_resume(struct amdgpu_device *adev);
|
void amdgpu_ras_resume(struct amdgpu_device *adev);
|
||||||
void amdgpu_ras_suspend(struct amdgpu_device *adev);
|
void amdgpu_ras_suspend(struct amdgpu_device *adev);
|
||||||
|
|
||||||
void amdgpu_ras_query_error_count(struct amdgpu_device *adev,
|
int amdgpu_ras_query_error_count(struct amdgpu_device *adev,
|
||||||
unsigned long *ce_count,
|
unsigned long *ce_count,
|
||||||
unsigned long *ue_count);
|
unsigned long *ue_count);
|
||||||
|
|
||||||
/* error handling functions */
|
/* error handling functions */
|
||||||
int amdgpu_ras_add_bad_pages(struct amdgpu_device *adev,
|
int amdgpu_ras_add_bad_pages(struct amdgpu_device *adev,
|
||||||
|
@ -1758,7 +1758,7 @@ int amdgpu_vm_bo_update_mapping(struct amdgpu_device *adev,
|
|||||||
r = vm->update_funcs->commit(¶ms, fence);
|
r = vm->update_funcs->commit(¶ms, fence);
|
||||||
|
|
||||||
if (table_freed)
|
if (table_freed)
|
||||||
*table_freed = *table_freed || params.table_freed;
|
*table_freed = params.table_freed;
|
||||||
|
|
||||||
error_unlock:
|
error_unlock:
|
||||||
amdgpu_vm_eviction_unlock(vm);
|
amdgpu_vm_eviction_unlock(vm);
|
||||||
@ -1816,7 +1816,6 @@ void amdgpu_vm_get_memory(struct amdgpu_vm *vm, uint64_t *vram_mem,
|
|||||||
* @adev: amdgpu_device pointer
|
* @adev: amdgpu_device pointer
|
||||||
* @bo_va: requested BO and VM object
|
* @bo_va: requested BO and VM object
|
||||||
* @clear: if true clear the entries
|
* @clear: if true clear the entries
|
||||||
* @table_freed: return true if page table is freed
|
|
||||||
*
|
*
|
||||||
* Fill in the page table entries for @bo_va.
|
* Fill in the page table entries for @bo_va.
|
||||||
*
|
*
|
||||||
@ -1824,7 +1823,7 @@ void amdgpu_vm_get_memory(struct amdgpu_vm *vm, uint64_t *vram_mem,
|
|||||||
* 0 for success, -EINVAL for failure.
|
* 0 for success, -EINVAL for failure.
|
||||||
*/
|
*/
|
||||||
int amdgpu_vm_bo_update(struct amdgpu_device *adev, struct amdgpu_bo_va *bo_va,
|
int amdgpu_vm_bo_update(struct amdgpu_device *adev, struct amdgpu_bo_va *bo_va,
|
||||||
bool clear, bool *table_freed)
|
bool clear)
|
||||||
{
|
{
|
||||||
struct amdgpu_bo *bo = bo_va->base.bo;
|
struct amdgpu_bo *bo = bo_va->base.bo;
|
||||||
struct amdgpu_vm *vm = bo_va->base.vm;
|
struct amdgpu_vm *vm = bo_va->base.vm;
|
||||||
@ -1903,7 +1902,7 @@ int amdgpu_vm_bo_update(struct amdgpu_device *adev, struct amdgpu_bo_va *bo_va,
|
|||||||
resv, mapping->start,
|
resv, mapping->start,
|
||||||
mapping->last, update_flags,
|
mapping->last, update_flags,
|
||||||
mapping->offset, mem,
|
mapping->offset, mem,
|
||||||
pages_addr, last_update, table_freed);
|
pages_addr, last_update, NULL);
|
||||||
if (r)
|
if (r)
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
@ -2155,7 +2154,7 @@ int amdgpu_vm_handle_moved(struct amdgpu_device *adev,
|
|||||||
|
|
||||||
list_for_each_entry_safe(bo_va, tmp, &vm->moved, base.vm_status) {
|
list_for_each_entry_safe(bo_va, tmp, &vm->moved, base.vm_status) {
|
||||||
/* Per VM BOs never need to bo cleared in the page tables */
|
/* Per VM BOs never need to bo cleared in the page tables */
|
||||||
r = amdgpu_vm_bo_update(adev, bo_va, false, NULL);
|
r = amdgpu_vm_bo_update(adev, bo_va, false);
|
||||||
if (r)
|
if (r)
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
@ -2174,7 +2173,7 @@ int amdgpu_vm_handle_moved(struct amdgpu_device *adev,
|
|||||||
else
|
else
|
||||||
clear = true;
|
clear = true;
|
||||||
|
|
||||||
r = amdgpu_vm_bo_update(adev, bo_va, clear, NULL);
|
r = amdgpu_vm_bo_update(adev, bo_va, clear);
|
||||||
if (r)
|
if (r)
|
||||||
return r;
|
return r;
|
||||||
|
|
||||||
|
@ -406,7 +406,7 @@ int amdgpu_vm_bo_update_mapping(struct amdgpu_device *adev,
|
|||||||
struct dma_fence **fence, bool *free_table);
|
struct dma_fence **fence, bool *free_table);
|
||||||
int amdgpu_vm_bo_update(struct amdgpu_device *adev,
|
int amdgpu_vm_bo_update(struct amdgpu_device *adev,
|
||||||
struct amdgpu_bo_va *bo_va,
|
struct amdgpu_bo_va *bo_va,
|
||||||
bool clear, bool *table_freed);
|
bool clear);
|
||||||
bool amdgpu_vm_evictable(struct amdgpu_bo *bo);
|
bool amdgpu_vm_evictable(struct amdgpu_bo *bo);
|
||||||
void amdgpu_vm_bo_invalidate(struct amdgpu_device *adev,
|
void amdgpu_vm_bo_invalidate(struct amdgpu_device *adev,
|
||||||
struct amdgpu_bo *bo, bool evicted);
|
struct amdgpu_bo *bo, bool evicted);
|
||||||
|
@ -766,7 +766,7 @@ static const struct amdgpu_irq_src_funcs dce_virtual_crtc_irq_funcs = {
|
|||||||
|
|
||||||
static void dce_virtual_set_irq_funcs(struct amdgpu_device *adev)
|
static void dce_virtual_set_irq_funcs(struct amdgpu_device *adev)
|
||||||
{
|
{
|
||||||
adev->crtc_irq.num_types = AMDGPU_CRTC_IRQ_VBLANK6 + 1;
|
adev->crtc_irq.num_types = adev->mode_info.num_crtc;
|
||||||
adev->crtc_irq.funcs = &dce_virtual_crtc_irq_funcs;
|
adev->crtc_irq.funcs = &dce_virtual_crtc_irq_funcs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -252,7 +252,7 @@ static void xgpu_ai_mailbox_flr_work(struct work_struct *work)
|
|||||||
* otherwise the mailbox msg will be ruined/reseted by
|
* otherwise the mailbox msg will be ruined/reseted by
|
||||||
* the VF FLR.
|
* the VF FLR.
|
||||||
*/
|
*/
|
||||||
if (!down_read_trylock(&adev->reset_sem))
|
if (!down_write_trylock(&adev->reset_sem))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
amdgpu_virt_fini_data_exchange(adev);
|
amdgpu_virt_fini_data_exchange(adev);
|
||||||
@ -268,7 +268,7 @@ static void xgpu_ai_mailbox_flr_work(struct work_struct *work)
|
|||||||
|
|
||||||
flr_done:
|
flr_done:
|
||||||
atomic_set(&adev->in_gpu_reset, 0);
|
atomic_set(&adev->in_gpu_reset, 0);
|
||||||
up_read(&adev->reset_sem);
|
up_write(&adev->reset_sem);
|
||||||
|
|
||||||
/* Trigger recovery for world switch failure if no TDR */
|
/* Trigger recovery for world switch failure if no TDR */
|
||||||
if (amdgpu_device_should_recover_gpu(adev)
|
if (amdgpu_device_should_recover_gpu(adev)
|
||||||
|
@ -273,7 +273,7 @@ static void xgpu_nv_mailbox_flr_work(struct work_struct *work)
|
|||||||
* otherwise the mailbox msg will be ruined/reseted by
|
* otherwise the mailbox msg will be ruined/reseted by
|
||||||
* the VF FLR.
|
* the VF FLR.
|
||||||
*/
|
*/
|
||||||
if (!down_read_trylock(&adev->reset_sem))
|
if (!down_write_trylock(&adev->reset_sem))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
amdgpu_virt_fini_data_exchange(adev);
|
amdgpu_virt_fini_data_exchange(adev);
|
||||||
@ -289,7 +289,7 @@ static void xgpu_nv_mailbox_flr_work(struct work_struct *work)
|
|||||||
|
|
||||||
flr_done:
|
flr_done:
|
||||||
atomic_set(&adev->in_gpu_reset, 0);
|
atomic_set(&adev->in_gpu_reset, 0);
|
||||||
up_read(&adev->reset_sem);
|
up_write(&adev->reset_sem);
|
||||||
|
|
||||||
/* Trigger recovery for world switch failure if no TDR */
|
/* Trigger recovery for world switch failure if no TDR */
|
||||||
if (amdgpu_device_should_recover_gpu(adev)
|
if (amdgpu_device_should_recover_gpu(adev)
|
||||||
|
@ -1393,7 +1393,6 @@ static int kfd_ioctl_map_memory_to_gpu(struct file *filep,
|
|||||||
long err = 0;
|
long err = 0;
|
||||||
int i;
|
int i;
|
||||||
uint32_t *devices_arr = NULL;
|
uint32_t *devices_arr = NULL;
|
||||||
bool table_freed = false;
|
|
||||||
|
|
||||||
dev = kfd_device_by_id(GET_GPU_ID(args->handle));
|
dev = kfd_device_by_id(GET_GPU_ID(args->handle));
|
||||||
if (!dev)
|
if (!dev)
|
||||||
@ -1451,8 +1450,7 @@ static int kfd_ioctl_map_memory_to_gpu(struct file *filep,
|
|||||||
goto get_mem_obj_from_handle_failed;
|
goto get_mem_obj_from_handle_failed;
|
||||||
}
|
}
|
||||||
err = amdgpu_amdkfd_gpuvm_map_memory_to_gpu(
|
err = amdgpu_amdkfd_gpuvm_map_memory_to_gpu(
|
||||||
peer->kgd, (struct kgd_mem *)mem,
|
peer->kgd, (struct kgd_mem *)mem, peer_pdd->drm_priv);
|
||||||
peer_pdd->drm_priv, &table_freed);
|
|
||||||
if (err) {
|
if (err) {
|
||||||
pr_err("Failed to map to gpu %d/%d\n",
|
pr_err("Failed to map to gpu %d/%d\n",
|
||||||
i, args->n_devices);
|
i, args->n_devices);
|
||||||
@ -1470,17 +1468,16 @@ static int kfd_ioctl_map_memory_to_gpu(struct file *filep,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Flush TLBs after waiting for the page table updates to complete */
|
/* Flush TLBs after waiting for the page table updates to complete */
|
||||||
if (table_freed) {
|
for (i = 0; i < args->n_devices; i++) {
|
||||||
for (i = 0; i < args->n_devices; i++) {
|
peer = kfd_device_by_id(devices_arr[i]);
|
||||||
peer = kfd_device_by_id(devices_arr[i]);
|
if (WARN_ON_ONCE(!peer))
|
||||||
if (WARN_ON_ONCE(!peer))
|
continue;
|
||||||
continue;
|
peer_pdd = kfd_get_process_device_data(peer, p);
|
||||||
peer_pdd = kfd_get_process_device_data(peer, p);
|
if (WARN_ON_ONCE(!peer_pdd))
|
||||||
if (WARN_ON_ONCE(!peer_pdd))
|
continue;
|
||||||
continue;
|
kfd_flush_tlb(peer_pdd, TLB_FLUSH_LEGACY);
|
||||||
kfd_flush_tlb(peer_pdd, TLB_FLUSH_LEGACY);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
kfree(devices_arr);
|
kfree(devices_arr);
|
||||||
|
|
||||||
return err;
|
return err;
|
||||||
@ -1568,27 +1565,10 @@ static int kfd_ioctl_unmap_memory_from_gpu(struct file *filep,
|
|||||||
}
|
}
|
||||||
args->n_success = i+1;
|
args->n_success = i+1;
|
||||||
}
|
}
|
||||||
mutex_unlock(&p->mutex);
|
|
||||||
|
|
||||||
err = amdgpu_amdkfd_gpuvm_sync_memory(dev->kgd, (struct kgd_mem *) mem, true);
|
|
||||||
if (err) {
|
|
||||||
pr_debug("Sync memory failed, wait interrupted by user signal\n");
|
|
||||||
goto sync_memory_failed;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Flush TLBs after waiting for the page table updates to complete */
|
|
||||||
for (i = 0; i < args->n_devices; i++) {
|
|
||||||
peer = kfd_device_by_id(devices_arr[i]);
|
|
||||||
if (WARN_ON_ONCE(!peer))
|
|
||||||
continue;
|
|
||||||
peer_pdd = kfd_get_process_device_data(peer, p);
|
|
||||||
if (WARN_ON_ONCE(!peer_pdd))
|
|
||||||
continue;
|
|
||||||
kfd_flush_tlb(peer_pdd, TLB_FLUSH_HEAVYWEIGHT);
|
|
||||||
}
|
|
||||||
|
|
||||||
kfree(devices_arr);
|
kfree(devices_arr);
|
||||||
|
|
||||||
|
mutex_unlock(&p->mutex);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
bind_process_to_device_failed:
|
bind_process_to_device_failed:
|
||||||
@ -1596,7 +1576,6 @@ static int kfd_ioctl_unmap_memory_from_gpu(struct file *filep,
|
|||||||
unmap_memory_from_gpu_failed:
|
unmap_memory_from_gpu_failed:
|
||||||
mutex_unlock(&p->mutex);
|
mutex_unlock(&p->mutex);
|
||||||
copy_from_user_failed:
|
copy_from_user_failed:
|
||||||
sync_memory_failed:
|
|
||||||
kfree(devices_arr);
|
kfree(devices_arr);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
@ -714,8 +714,7 @@ static int kfd_process_alloc_gpuvm(struct kfd_process_device *pdd,
|
|||||||
if (err)
|
if (err)
|
||||||
goto err_alloc_mem;
|
goto err_alloc_mem;
|
||||||
|
|
||||||
err = amdgpu_amdkfd_gpuvm_map_memory_to_gpu(kdev->kgd, mem,
|
err = amdgpu_amdkfd_gpuvm_map_memory_to_gpu(kdev->kgd, mem, pdd->drm_priv);
|
||||||
pdd->drm_priv, NULL);
|
|
||||||
if (err)
|
if (err)
|
||||||
goto err_map_mem;
|
goto err_map_mem;
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user