Bus: Make remove callback return void tag
Tag for other trees/branches to pull from in order to have a stable place to build off of if they want to add new busses for 5.15. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -----BEGIN PGP SIGNATURE----- iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCYPkvsg8cZ3JlZ0Brcm9h aC5jb20ACgkQMUfUDdst+yl8pwCff+mL/zOaU8M1KwIHrEvNH6LgF58AoKgBAeCb 58Lenmw44ofP5itzU5x3 =J5mO -----END PGP SIGNATURE----- Merge tag 'bus_remove_return_void-5.15' into next This helps to remove conflict on idxd driver Conflicts: drivers/dma/idxd/sysfs.c drivers/dma/idxd/bus.c Greg says: Bus: Make remove callback return void tag Tag for other trees/branches to pull from in order to have a stable place to build off of if they want to add new busses for 5.15. Signed-off-by: Vinod Koul <vkoul@kernel.org>
This commit is contained in:
commit
c28d5d5688
@ -33,6 +33,13 @@ Description:
|
||||
frequency adjustment value (a positive integer) in
|
||||
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
|
||||
Date: September 2010
|
||||
Contact: Richard Cochran <richardcochran@gmail.com>
|
||||
@ -61,6 +68,19 @@ Description:
|
||||
This file contains the number of programmable pins
|
||||
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
|
||||
Date: March 2014
|
||||
Contact: Richard Cochran <richardcochran@gmail.com>
|
||||
|
@ -86,19 +86,7 @@ Generating code coverage reports under UML
|
||||
.. note::
|
||||
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``
|
||||
files or compile errors. We know one `faulty GCC commit
|
||||
<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()``.
|
||||
|
||||
files or compile errors.
|
||||
|
||||
This is different from the "normal" way of getting coverage information that is
|
||||
documented in Documentation/dev-tools/gcov.rst.
|
||||
|
@ -50,7 +50,6 @@ properties:
|
||||
|
||||
reg:
|
||||
minItems: 1
|
||||
maxItems: 3
|
||||
items:
|
||||
- description: base register
|
||||
- description: power register
|
||||
|
@ -92,7 +92,6 @@ required:
|
||||
- reg
|
||||
- clocks
|
||||
- interrupts
|
||||
- resets
|
||||
- ports
|
||||
|
||||
allOf:
|
||||
|
@ -39,17 +39,7 @@ properties:
|
||||
reg:
|
||||
maxItems: 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]
|
||||
|
||||
"^adi,pwm-active-state$":
|
||||
adi,pwm-active-state:
|
||||
description: |
|
||||
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
|
||||
@ -61,6 +51,16 @@ patternProperties:
|
||||
enum: [0, 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:
|
||||
- compatible
|
||||
- reg
|
||||
|
@ -52,16 +52,14 @@ properties:
|
||||
items:
|
||||
- const: marvell,ap806-smmu-500
|
||||
- const: arm,mmu-500
|
||||
- description: NVIDIA SoCs that program two ARM MMU-500s identically
|
||||
items:
|
||||
- description: NVIDIA SoCs that require memory controller interaction
|
||||
and may program multiple ARM MMU-500s identically with the memory
|
||||
controller interleaving translations between multiple instances
|
||||
for improved performance.
|
||||
items:
|
||||
- enum:
|
||||
- const: nvidia,tegra194-smmu
|
||||
- const: nvidia,tegra186-smmu
|
||||
- nvidia,tegra194-smmu
|
||||
- nvidia,tegra186-smmu
|
||||
- const: nvidia,smmu-500
|
||||
- items:
|
||||
- const: arm,mmu-500
|
||||
|
@ -28,14 +28,12 @@ properties:
|
||||
- description: configuration registers for MMU instance 0
|
||||
- description: configuration registers for MMU instance 1
|
||||
minItems: 1
|
||||
maxItems: 2
|
||||
|
||||
interrupts:
|
||||
items:
|
||||
- description: interruption for MMU instance 0
|
||||
- description: interruption for MMU instance 1
|
||||
minItems: 1
|
||||
maxItems: 2
|
||||
|
||||
clocks:
|
||||
items:
|
||||
|
@ -57,7 +57,6 @@ properties:
|
||||
|
||||
ranges:
|
||||
minItems: 1
|
||||
maxItems: 3
|
||||
description: |
|
||||
Memory bus areas for interacting with the devices. Reflects
|
||||
the memory layout with four integer values following:
|
||||
|
@ -84,7 +84,6 @@ properties:
|
||||
|
||||
interrupts:
|
||||
minItems: 1
|
||||
maxItems: 3
|
||||
items:
|
||||
- description: NAND CTLRDY interrupt
|
||||
- description: FLASH_DMA_DONE if flash DMA is available
|
||||
@ -92,7 +91,6 @@ properties:
|
||||
|
||||
interrupt-names:
|
||||
minItems: 1
|
||||
maxItems: 3
|
||||
items:
|
||||
- const: nand_ctlrdy
|
||||
- const: flash_dma_done
|
||||
@ -148,8 +146,6 @@ allOf:
|
||||
then:
|
||||
properties:
|
||||
reg-names:
|
||||
minItems: 2
|
||||
maxItems: 2
|
||||
items:
|
||||
- const: nand
|
||||
- const: nand-int-base
|
||||
@ -161,8 +157,6 @@ allOf:
|
||||
then:
|
||||
properties:
|
||||
reg-names:
|
||||
minItems: 3
|
||||
maxItems: 3
|
||||
items:
|
||||
- const: nand
|
||||
- const: nand-int-base
|
||||
@ -175,8 +169,6 @@ allOf:
|
||||
then:
|
||||
properties:
|
||||
reg-names:
|
||||
minItems: 3
|
||||
maxItems: 3
|
||||
items:
|
||||
- const: nand
|
||||
- const: iproc-idm
|
||||
|
@ -67,8 +67,8 @@ properties:
|
||||
reg:
|
||||
oneOf:
|
||||
- enum:
|
||||
- 0
|
||||
- 1
|
||||
- 0
|
||||
- 1
|
||||
|
||||
required:
|
||||
- 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
|
||||
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"
|
||||
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;
|
||||
};
|
@ -1,43 +0,0 @@
|
||||
* Smart Mixed-Signal Connectivity (SMSC) LAN911x/912x Controller
|
||||
|
||||
Required properties:
|
||||
- compatible : Should be "smsc,lan<model>", "smsc,lan9115"
|
||||
- reg : Address and length of the io space for SMSC LAN
|
||||
- interrupts : one or two interrupt specifiers
|
||||
- The first interrupt is the SMSC LAN interrupt line
|
||||
- The second interrupt (if present) is the PME (power
|
||||
management event) interrupt that is able to wake up the host
|
||||
system with a 50ms pulse on network activity
|
||||
- phy-mode : See ethernet.txt file in the same directory
|
||||
|
||||
Optional properties:
|
||||
- reg-shift : Specify the quantity to shift the register offsets by
|
||||
- reg-io-width : Specify the size (in bytes) of the IO accesses that
|
||||
should be performed on the device. Valid value for SMSC LAN is
|
||||
2 or 4. If it's omitted or invalid, the size would be 2.
|
||||
- smsc,irq-active-high : Indicates the IRQ polarity is active-high
|
||||
- smsc,irq-push-pull : Indicates the IRQ type is push-pull
|
||||
- smsc,force-internal-phy : Forces SMSC LAN controller to use
|
||||
internal PHY
|
||||
- smsc,force-external-phy : Forces SMSC LAN controller to use
|
||||
external PHY
|
||||
- smsc,save-mac-address : Indicates that mac address needs to be saved
|
||||
before resetting the controller
|
||||
- reset-gpios : 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, vddvario-supply : 3.3V analog and IO logic power supplies
|
||||
|
||||
Examples:
|
||||
|
||||
lan9220@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
|
||||
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:
|
||||
"^pll[0|1]-refclk$":
|
||||
type: object
|
||||
@ -121,34 +149,6 @@ patternProperties:
|
||||
- clocks
|
||||
- "#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]+$":
|
||||
type: object
|
||||
description: |
|
||||
|
@ -36,12 +36,12 @@ properties:
|
||||
switching frequency must be one of following corresponding value
|
||||
1.1MHz, 1.65MHz, 2.2MHz, 2.75MHz
|
||||
|
||||
patternProperties:
|
||||
"^ldo[1-4]$":
|
||||
ldortc:
|
||||
type: object
|
||||
$ref: regulator.yaml#
|
||||
|
||||
"^ldortc$":
|
||||
patternProperties:
|
||||
"^ldo[1-4]$":
|
||||
type: object
|
||||
$ref: regulator.yaml#
|
||||
|
||||
|
@ -83,7 +83,8 @@ properties:
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
"^vsnvs$":
|
||||
properties:
|
||||
vsnvs:
|
||||
type: object
|
||||
$ref: regulator.yaml#
|
||||
description:
|
||||
|
@ -30,7 +30,6 @@ properties:
|
||||
maxItems: 1
|
||||
|
||||
clocks:
|
||||
minItems: 2
|
||||
items:
|
||||
- description: PCLK clocks
|
||||
- description: EXTCLK clocks. Faraday calls it CLK1HZ and says the clock
|
||||
|
@ -79,22 +79,7 @@ properties:
|
||||
description:
|
||||
The SPI controller acts as a slave, instead of a master.
|
||||
|
||||
allOf:
|
||||
- if:
|
||||
not:
|
||||
required:
|
||||
- spi-slave
|
||||
then:
|
||||
properties:
|
||||
"#address-cells":
|
||||
const: 1
|
||||
else:
|
||||
properties:
|
||||
"#address-cells":
|
||||
const: 0
|
||||
|
||||
patternProperties:
|
||||
"^slave$":
|
||||
slave:
|
||||
type: object
|
||||
|
||||
properties:
|
||||
@ -105,6 +90,7 @@ patternProperties:
|
||||
required:
|
||||
- compatible
|
||||
|
||||
patternProperties:
|
||||
"^.*@[0-9a-f]+$":
|
||||
type: object
|
||||
|
||||
@ -180,6 +166,20 @@ patternProperties:
|
||||
- compatible
|
||||
- reg
|
||||
|
||||
allOf:
|
||||
- if:
|
||||
not:
|
||||
required:
|
||||
- spi-slave
|
||||
then:
|
||||
properties:
|
||||
"#address-cells":
|
||||
const: 1
|
||||
else:
|
||||
properties:
|
||||
"#address-cells":
|
||||
const: 0
|
||||
|
||||
additionalProperties: true
|
||||
|
||||
examples:
|
||||
|
@ -25,14 +25,12 @@ properties:
|
||||
|
||||
interrupts:
|
||||
minItems: 1
|
||||
maxItems: 2
|
||||
items:
|
||||
- description: Host controller interrupt
|
||||
- description: Device controller interrupt in isp1761
|
||||
|
||||
interrupt-names:
|
||||
minItems: 1
|
||||
maxItems: 2
|
||||
items:
|
||||
- const: host
|
||||
- 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
|
||||
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
|
||||
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
|
||||
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
|
||||
directives from directory scanning and file contents copying are
|
||||
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?
|
||||
=========================
|
||||
|
@ -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 |
|
||||
-----------------------
|
@ -22,7 +22,7 @@
|
||||
| openrisc: | TODO |
|
||||
| parisc: | TODO |
|
||||
| powerpc: | ok |
|
||||
| riscv: | TODO |
|
||||
| riscv: | ok |
|
||||
| s390: | TODO |
|
||||
| sh: | ok |
|
||||
| sparc: | 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
|
||||
directory instead of a configuration file, the kernel's build infrastructure
|
||||
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
|
||||
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
|
||||
|
@ -212,6 +212,7 @@ Userspace to kernel:
|
||||
``ETHTOOL_MSG_FEC_SET`` set FEC settings
|
||||
``ETHTOOL_MSG_MODULE_EEPROM_GET`` read SFP module EEPROM
|
||||
``ETHTOOL_MSG_STATS_GET`` get standard statistics
|
||||
``ETHTOOL_MSG_PHC_VCLOCKS_GET`` get PHC virtual clocks info
|
||||
===================================== ================================
|
||||
|
||||
Kernel to userspace:
|
||||
@ -250,6 +251,7 @@ Kernel to userspace:
|
||||
``ETHTOOL_MSG_FEC_NTF`` FEC settings
|
||||
``ETHTOOL_MSG_MODULE_EEPROM_GET_REPLY`` read SFP module EEPROM
|
||||
``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
|
||||
@ -1477,6 +1479,25 @@ Low and high bounds are inclusive, for example:
|
||||
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
|
||||
===================
|
||||
|
||||
@ -1575,4 +1596,5 @@ are netlink only.
|
||||
n/a ``ETHTOOL_MSG_CABLE_TEST_ACT``
|
||||
n/a ``ETHTOOL_MSG_CABLE_TEST_TDR_ACT``
|
||||
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.
|
||||
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
|
||||
- 0 - disabled
|
||||
- not 0 - enabled (default)
|
||||
|
@ -4,10 +4,125 @@
|
||||
Linux Kernel TIPC
|
||||
=================
|
||||
|
||||
TIPC (Transparent Inter Process Communication) is a protocol that is
|
||||
specially designed for intra-cluster communication.
|
||||
Introduction
|
||||
============
|
||||
|
||||
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
|
||||
---------------
|
||||
|
@ -47,7 +47,7 @@
|
||||
(顺便说一句,值得注意的是,合并窗口期间集成的更改并不是凭空产生的;它们是经
|
||||
提前收集、测试和分级的。稍后将详细描述该过程的工作方式。)
|
||||
|
||||
合并窗口持续大约两周。在这段时间结束时,LinusTorvalds将声明窗口已关闭,并
|
||||
合并窗口持续大约两周。在这段时间结束时,Linus Torvalds将声明窗口已关闭,并
|
||||
释放第一个“rc”内核。例如,对于目标为5.6的内核,在合并窗口结束时发生的释放
|
||||
将被称为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自己直接选择的。
|
||||
内核项目已经发展到一个没有一个开发人员可以在没有支持的情况下检查和选择每个
|
||||
补丁的规模。内核开发人员处理这种增长的方式是使用围绕信任链构建的助理系统。
|
||||
|
@ -392,7 +392,7 @@ Section 8 -- Interpretation.
|
||||
Creative Commons is not a party to its public
|
||||
licenses. Notwithstanding, Creative Commons may elect to apply one of
|
||||
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
|
||||
Domain Dedication. Except for the limited purpose of indicating that
|
||||
material is shared under a Creative Commons public license or as
|
||||
|
@ -933,6 +933,7 @@ F: drivers/video/fbdev/geode/
|
||||
|
||||
AMD IOMMU (AMD-VI)
|
||||
M: Joerg Roedel <joro@8bytes.org>
|
||||
R: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
|
||||
L: iommu@lists.linux-foundation.org
|
||||
S: Maintained
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git
|
||||
@ -15009,6 +15010,13 @@ F: drivers/net/phy/dp83640*
|
||||
F: drivers/ptp/*
|
||||
F: include/linux/ptp_cl*
|
||||
|
||||
PTP VIRTUAL CLOCK SUPPORT
|
||||
M: Yangbo Lu <yangbo.lu@nxp.com>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Maintained
|
||||
F: drivers/ptp/ptp_vclock.c
|
||||
F: net/ethtool/phc_vclocks.c
|
||||
|
||||
PTRACE SUPPORT
|
||||
M: Oleg Nesterov <oleg@redhat.com>
|
||||
S: Maintained
|
||||
|
13
Makefile
13
Makefile
@ -2,7 +2,7 @@
|
||||
VERSION = 5
|
||||
PATCHLEVEL = 14
|
||||
SUBLEVEL = 0
|
||||
EXTRAVERSION = -rc1
|
||||
EXTRAVERSION = -rc2
|
||||
NAME = Opossums on Parade
|
||||
|
||||
# *DOCUMENTATION*
|
||||
@ -728,11 +728,12 @@ $(KCONFIG_CONFIG):
|
||||
# This exploits the 'multi-target pattern rule' trick.
|
||||
# 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)
|
||||
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)
|
||||
+$(call cmd,syncconfig)
|
||||
$(Q)$(kecho) " SYNC $@"
|
||||
$(Q)$(MAKE) -f $(srctree)/Makefile syncconfig
|
||||
else # !may-sync-config
|
||||
# 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.
|
||||
@ -802,7 +803,7 @@ else
|
||||
# Warn about unmarked fall-throughs in switch statement.
|
||||
# Disabled for clang while comment to attribute conversion happens and
|
||||
# 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
|
||||
|
||||
# These warnings generated too much noise in a regular build.
|
||||
|
@ -395,7 +395,7 @@ config ARCH_IXP4XX
|
||||
select IXP4XX_IRQ
|
||||
select IXP4XX_TIMER
|
||||
# With the new PCI driver this is not needed
|
||||
select NEED_MACH_IO_H if PCI_IXP4XX_LEGACY
|
||||
select NEED_MACH_IO_H if IXP4XX_PCI_LEGACY
|
||||
select USB_EHCI_BIG_ENDIAN_DESC
|
||||
select USB_EHCI_BIG_ENDIAN_MMIO
|
||||
help
|
||||
|
@ -4,6 +4,7 @@
|
||||
#include "aspeed-g5.dtsi"
|
||||
#include <dt-bindings/gpio/aspeed-gpio.h>
|
||||
#include <dt-bindings/i2c/i2c.h>
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
|
||||
/{
|
||||
model = "ASRock E3C246D4I BMC";
|
||||
@ -73,7 +74,8 @@
|
||||
|
||||
&vuart {
|
||||
status = "okay";
|
||||
aspeed,sirq-active-high;
|
||||
aspeed,lpc-io-reg = <0x2f8>;
|
||||
aspeed,lpc-interrupts = <3 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
|
||||
&mac0 {
|
||||
|
@ -406,15 +406,15 @@
|
||||
reg = <0x69>;
|
||||
};
|
||||
|
||||
power-supply@6a {
|
||||
compatible = "ibm,cffps";
|
||||
reg = <0x6a>;
|
||||
};
|
||||
|
||||
power-supply@6b {
|
||||
compatible = "ibm,cffps";
|
||||
reg = <0x6b>;
|
||||
};
|
||||
|
||||
power-supply@6d {
|
||||
compatible = "ibm,cffps";
|
||||
reg = <0x6d>;
|
||||
};
|
||||
};
|
||||
|
||||
&i2c4 {
|
||||
@ -2832,6 +2832,7 @@
|
||||
|
||||
&emmc {
|
||||
status = "okay";
|
||||
clk-phase-mmc-hs200 = <180>, <180>;
|
||||
};
|
||||
|
||||
&fsim0 {
|
||||
|
@ -280,10 +280,7 @@
|
||||
/*W0-W7*/ "","","","","","","","",
|
||||
/*X0-X7*/ "","","","","","","","",
|
||||
/*Y0-Y7*/ "","","","","","","","",
|
||||
/*Z0-Z7*/ "","","","","","","","",
|
||||
/*AA0-AA7*/ "","","","","","","","",
|
||||
/*AB0-AB7*/ "","","","","","","","",
|
||||
/*AC0-AC7*/ "","","","","","","","";
|
||||
/*Z0-Z7*/ "","","","","","","","";
|
||||
|
||||
pin_mclr_vpp {
|
||||
gpio-hog;
|
||||
|
@ -136,10 +136,7 @@
|
||||
/*W0-W7*/ "","","","","","","","",
|
||||
/*X0-X7*/ "","","","","","","","",
|
||||
/*Y0-Y7*/ "","","","","","","","",
|
||||
/*Z0-Z7*/ "","","","","","","","",
|
||||
/*AA0-AA7*/ "","","","","","","","",
|
||||
/*AB0-AB7*/ "","","","","","","","",
|
||||
/*AC0-AC7*/ "","","","","","","","";
|
||||
/*Z0-Z7*/ "","","","","","","","";
|
||||
};
|
||||
|
||||
&fmc {
|
||||
@ -189,6 +186,7 @@
|
||||
|
||||
&emmc {
|
||||
status = "okay";
|
||||
clk-phase-mmc-hs200 = <36>, <270>;
|
||||
};
|
||||
|
||||
&fsim0 {
|
||||
|
@ -581,7 +581,7 @@
|
||||
* EBI2. This has a 25MHz chrystal next to it, so no
|
||||
* clocking is needed.
|
||||
*/
|
||||
ethernet-ebi2@2,0 {
|
||||
ethernet@2,0 {
|
||||
compatible = "smsc,lan9221", "smsc,lan9115";
|
||||
reg = <2 0x0 0x100>;
|
||||
/*
|
||||
@ -598,8 +598,6 @@
|
||||
phy-mode = "mii";
|
||||
reg-io-width = <2>;
|
||||
smsc,force-external-phy;
|
||||
/* IRQ on edge falling = active low */
|
||||
smsc,irq-active-low;
|
||||
smsc,irq-push-pull;
|
||||
|
||||
/*
|
||||
|
@ -195,16 +195,15 @@
|
||||
#size-cells = <1>;
|
||||
ranges;
|
||||
|
||||
vic: intc@10140000 {
|
||||
vic: interrupt-controller@10140000 {
|
||||
compatible = "arm,versatile-vic";
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <1>;
|
||||
reg = <0x10140000 0x1000>;
|
||||
clear-mask = <0xffffffff>;
|
||||
valid-mask = <0xffffffff>;
|
||||
};
|
||||
|
||||
sic: intc@10003000 {
|
||||
sic: interrupt-controller@10003000 {
|
||||
compatible = "arm,versatile-sic";
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <1>;
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
amba {
|
||||
/* The Versatile PB is using more SIC IRQ lines than the AB */
|
||||
sic: intc@10003000 {
|
||||
sic: interrupt-controller@10003000 {
|
||||
clear-mask = <0xffffffff>;
|
||||
/*
|
||||
* Valid interrupt lines mask according to
|
||||
|
@ -834,14 +834,13 @@ static int locomo_bus_probe(struct device *dev)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int locomo_bus_remove(struct device *dev)
|
||||
static void locomo_bus_remove(struct device *dev)
|
||||
{
|
||||
struct locomo_dev *ldev = LOCOMO_DEV(dev);
|
||||
struct locomo_driver *drv = LOCOMO_DRV(dev->driver);
|
||||
|
||||
if (drv->remove)
|
||||
drv->remove(ldev);
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct bus_type locomo_bus_type = {
|
||||
|
@ -1364,15 +1364,13 @@ static int sa1111_bus_probe(struct device *dev)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int sa1111_bus_remove(struct device *dev)
|
||||
static void sa1111_bus_remove(struct device *dev)
|
||||
{
|
||||
struct sa1111_dev *sadev = to_sa1111_device(dev);
|
||||
struct sa1111_driver *drv = SA1111_DRV(dev->driver);
|
||||
|
||||
if (drv->remove)
|
||||
drv->remove(sadev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct bus_type sa1111_bus_type = {
|
||||
|
@ -57,10 +57,7 @@ CONFIG_DRM=y
|
||||
CONFIG_DRM_DISPLAY_CONNECTOR=y
|
||||
CONFIG_DRM_SIMPLE_BRIDGE=y
|
||||
CONFIG_DRM_PL111=y
|
||||
CONFIG_FB_MODE_HELPERS=y
|
||||
CONFIG_FB_MATROX=y
|
||||
CONFIG_FB_MATROX_MILLENIUM=y
|
||||
CONFIG_FB_MATROX_MYSTIQUE=y
|
||||
CONFIG_FB=y
|
||||
CONFIG_BACKLIGHT_CLASS_DEVICE=y
|
||||
# CONFIG_VGA_CONSOLE is not set
|
||||
CONFIG_LOGO=y
|
||||
|
@ -821,7 +821,7 @@ CONFIG_USB_ISP1760=y
|
||||
CONFIG_USB_HSIC_USB3503=y
|
||||
CONFIG_AB8500_USB=y
|
||||
CONFIG_KEYSTONE_USB_PHY=m
|
||||
CONFIG_NOP_USB_XCEIV=m
|
||||
CONFIG_NOP_USB_XCEIV=y
|
||||
CONFIG_AM335X_PHY_USB=m
|
||||
CONFIG_TWL6030_USB=m
|
||||
CONFIG_USB_GPIO_VBUS=y
|
||||
|
@ -64,11 +64,9 @@ CONFIG_DRM_PANEL_SIMPLE=y
|
||||
CONFIG_DRM_DISPLAY_CONNECTOR=y
|
||||
CONFIG_DRM_SIMPLE_BRIDGE=y
|
||||
CONFIG_DRM_PL111=y
|
||||
CONFIG_FB_MODE_HELPERS=y
|
||||
CONFIG_FB=y
|
||||
CONFIG_BACKLIGHT_CLASS_DEVICE=y
|
||||
CONFIG_LOGO=y
|
||||
# CONFIG_LOGO_LINUX_MONO is not set
|
||||
# CONFIG_LOGO_LINUX_VGA16 is not set
|
||||
CONFIG_SOUND=y
|
||||
CONFIG_SND=y
|
||||
# CONFIG_SND_DRIVERS is not set
|
||||
|
@ -135,6 +135,7 @@ CONFIG_DRM_SII902X=y
|
||||
CONFIG_DRM_SIMPLE_BRIDGE=y
|
||||
CONFIG_DRM_I2C_ADV7511=y
|
||||
CONFIG_DRM_I2C_ADV7511_AUDIO=y
|
||||
CONFIG_FB=y
|
||||
CONFIG_FB_SH_MOBILE_LCDC=y
|
||||
CONFIG_BACKLIGHT_PWM=y
|
||||
CONFIG_BACKLIGHT_AS3711=y
|
||||
|
@ -61,6 +61,10 @@ CONFIG_INPUT_TOUCHSCREEN=y
|
||||
CONFIG_TOUCHSCREEN_ATMEL_MXT=y
|
||||
CONFIG_TOUCHSCREEN_BU21013=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_AB8500_PONKEY=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_LIMA=y
|
||||
CONFIG_DRM_MCDE=y
|
||||
CONFIG_FB=y
|
||||
CONFIG_BACKLIGHT_CLASS_DEVICE=y
|
||||
CONFIG_BACKLIGHT_KTD253=y
|
||||
CONFIG_BACKLIGHT_GPIO=y
|
||||
|
@ -60,7 +60,7 @@ CONFIG_DRM_PANEL_SIMPLE=y
|
||||
CONFIG_DRM_DISPLAY_CONNECTOR=y
|
||||
CONFIG_DRM_SIMPLE_BRIDGE=y
|
||||
CONFIG_DRM_PL111=y
|
||||
CONFIG_FB_MODE_HELPERS=y
|
||||
CONFIG_FB=y
|
||||
CONFIG_BACKLIGHT_CLASS_DEVICE=y
|
||||
CONFIG_LOGO=y
|
||||
CONFIG_SOUND=y
|
||||
@ -88,8 +88,6 @@ CONFIG_NFSD=y
|
||||
CONFIG_NFSD_V3=y
|
||||
CONFIG_NLS_CODEPAGE_850=m
|
||||
CONFIG_NLS_ISO8859_1=m
|
||||
CONFIG_FONTS=y
|
||||
CONFIG_FONT_ACORN_8x8=y
|
||||
CONFIG_MAGIC_SYSRQ=y
|
||||
CONFIG_DEBUG_FS=y
|
||||
CONFIG_DEBUG_KERNEL=y
|
||||
|
@ -11,9 +11,6 @@ CONFIG_CPUSETS=y
|
||||
# CONFIG_NET_NS is not set
|
||||
CONFIG_BLK_DEV_INITRD=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_DCSCB=y
|
||||
CONFIG_ARCH_VEXPRESS_TC2_PM=y
|
||||
@ -23,14 +20,17 @@ CONFIG_MCPM=y
|
||||
CONFIG_VMSPLIT_2G=y
|
||||
CONFIG_NR_CPUS=8
|
||||
CONFIG_ARM_PSCI=y
|
||||
CONFIG_CMA=y
|
||||
CONFIG_ZBOOT_ROM_TEXT=0x0
|
||||
CONFIG_ZBOOT_ROM_BSS=0x0
|
||||
CONFIG_CMDLINE="console=ttyAMA0"
|
||||
CONFIG_CPU_IDLE=y
|
||||
CONFIG_VFP=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_CMA=y
|
||||
CONFIG_NET=y
|
||||
CONFIG_PACKET=y
|
||||
CONFIG_UNIX=y
|
||||
@ -43,7 +43,6 @@ CONFIG_IP_PNP_BOOTP=y
|
||||
CONFIG_NET_9P=y
|
||||
CONFIG_NET_9P_VIRTIO=y
|
||||
CONFIG_DEVTMPFS=y
|
||||
CONFIG_DMA_CMA=y
|
||||
CONFIG_MTD=y
|
||||
CONFIG_MTD_CMDLINE_PARTS=y
|
||||
CONFIG_MTD_BLOCK=y
|
||||
@ -59,7 +58,6 @@ CONFIG_VIRTIO_BLK=y
|
||||
CONFIG_BLK_DEV_SD=y
|
||||
CONFIG_SCSI_VIRTIO=y
|
||||
CONFIG_ATA=y
|
||||
# CONFIG_SATA_PMP is not set
|
||||
CONFIG_NETDEVICES=y
|
||||
CONFIG_VIRTIO_NET=y
|
||||
CONFIG_SMC91X=y
|
||||
@ -81,11 +79,9 @@ CONFIG_DRM=y
|
||||
CONFIG_DRM_PANEL_SIMPLE=y
|
||||
CONFIG_DRM_SII902X=y
|
||||
CONFIG_DRM_PL111=y
|
||||
CONFIG_FB_MODE_HELPERS=y
|
||||
CONFIG_FB=y
|
||||
CONFIG_BACKLIGHT_CLASS_DEVICE=y
|
||||
CONFIG_LOGO=y
|
||||
# CONFIG_LOGO_LINUX_MONO is not set
|
||||
# CONFIG_LOGO_LINUX_VGA16 is not set
|
||||
CONFIG_SOUND=y
|
||||
CONFIG_SND=y
|
||||
# CONFIG_SND_DRIVERS is not set
|
||||
@ -136,10 +132,11 @@ CONFIG_ROOT_NFS=y
|
||||
CONFIG_9P_FS=y
|
||||
CONFIG_NLS_CODEPAGE_437=y
|
||||
CONFIG_NLS_ISO8859_1=y
|
||||
# CONFIG_CRYPTO_HW is not set
|
||||
CONFIG_DMA_CMA=y
|
||||
CONFIG_DEBUG_INFO=y
|
||||
CONFIG_MAGIC_SYSRQ=y
|
||||
CONFIG_DEBUG_KERNEL=y
|
||||
CONFIG_DETECT_HUNG_TASK=y
|
||||
# CONFIG_SCHED_DEBUG is not set
|
||||
CONFIG_DEBUG_USER=y
|
||||
# CONFIG_CRYPTO_HW is not set
|
||||
|
@ -1052,7 +1052,7 @@ static int ecard_drv_probe(struct device *dev)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int ecard_drv_remove(struct device *dev)
|
||||
static void ecard_drv_remove(struct device *dev)
|
||||
{
|
||||
struct expansion_card *ec = ECARD_DEV(dev);
|
||||
struct ecard_driver *drv = ECARD_DRV(dev->driver);
|
||||
@ -1067,8 +1067,6 @@ static int ecard_drv_remove(struct device *dev)
|
||||
ec->ops = &ecard_default_ops;
|
||||
barrier();
|
||||
ec->irq_data = NULL;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1605,7 +1605,8 @@ config ARM64_BTI_KERNEL
|
||||
depends on CC_HAS_BRANCH_PROT_PAC_RET_BTI
|
||||
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94697
|
||||
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)
|
||||
help
|
||||
Build the kernel with Branch Target Identification annotations
|
||||
|
@ -948,6 +948,10 @@
|
||||
<&bpmp TEGRA194_CLK_XUSB_SS>,
|
||||
<&bpmp TEGRA194_CLK_XUSB_FS>;
|
||||
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>,
|
||||
<&bpmp TEGRA194_POWER_DOMAIN_XUSBA>;
|
||||
power-domain-names = "dev", "ss";
|
||||
@ -977,6 +981,10 @@
|
||||
"xusb_ss", "xusb_ss_src", "xusb_hs_src",
|
||||
"xusb_fs_src", "pll_u_480m", "clk_m",
|
||||
"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>,
|
||||
<&bpmp TEGRA194_POWER_DOMAIN_XUSBA>;
|
||||
@ -2469,6 +2477,11 @@
|
||||
* for 8x and 11.025x sample rate streams.
|
||||
*/
|
||||
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 {
|
||||
|
@ -82,10 +82,10 @@
|
||||
<GIC_SPI 384 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "eri", "rxi", "txi",
|
||||
"bri", "dri", "tei";
|
||||
clocks = <&cpg CPG_MOD R9A07G044_CLK_SCIF0>;
|
||||
clocks = <&cpg CPG_MOD R9A07G044_SCIF0_CLK_PCK>;
|
||||
clock-names = "fck";
|
||||
power-domains = <&cpg>;
|
||||
resets = <&cpg R9A07G044_CLK_SCIF0>;
|
||||
resets = <&cpg R9A07G044_SCIF0_RST_SYSTEM_N>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
@ -47,7 +47,7 @@
|
||||
* cache before the transfer is done, causing old data to be seen by
|
||||
* the CPU.
|
||||
*/
|
||||
#define ARCH_DMA_MINALIGN L1_CACHE_BYTES
|
||||
#define ARCH_DMA_MINALIGN (128)
|
||||
|
||||
#ifdef CONFIG_KASAN_SW_TAGS
|
||||
#define ARCH_SLAB_MINALIGN (1ULL << KASAN_SHADOW_SCALE_SHIFT)
|
||||
|
@ -10,6 +10,7 @@
|
||||
|
||||
#include <linux/cpumask.h>
|
||||
|
||||
#include <asm/smp.h>
|
||||
#include <asm/types.h>
|
||||
|
||||
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
|
||||
# available or are out-of-sync with HW state. Since `noinstr` doesn't always
|
||||
# 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
|
||||
|
||||
# Object file lists.
|
||||
|
@ -81,6 +81,7 @@
|
||||
#include <asm/mmu_context.h>
|
||||
#include <asm/mte.h>
|
||||
#include <asm/processor.h>
|
||||
#include <asm/smp.h>
|
||||
#include <asm/sysreg.h>
|
||||
#include <asm/traps.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);
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
|
@ -193,18 +193,6 @@ void mte_check_tfsr_el1(void)
|
||||
}
|
||||
#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)
|
||||
{
|
||||
current->thread.gcr_user_excl = excl;
|
||||
@ -265,7 +253,8 @@ void mte_suspend_exit(void)
|
||||
if (!system_supports_mte())
|
||||
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)
|
||||
|
@ -29,7 +29,7 @@
|
||||
.endm
|
||||
|
||||
.macro ldrh1 reg, ptr, val
|
||||
user_ldst 9998f, ldtrh, \reg, \ptr, \val
|
||||
user_ldst 9997f, ldtrh, \reg, \ptr, \val
|
||||
.endm
|
||||
|
||||
.macro strh1 reg, ptr, val
|
||||
@ -37,7 +37,7 @@
|
||||
.endm
|
||||
|
||||
.macro ldr1 reg, ptr, val
|
||||
user_ldst 9998f, ldtr, \reg, \ptr, \val
|
||||
user_ldst 9997f, ldtr, \reg, \ptr, \val
|
||||
.endm
|
||||
|
||||
.macro str1 reg, ptr, val
|
||||
@ -45,7 +45,7 @@
|
||||
.endm
|
||||
|
||||
.macro ldp1 reg1, reg2, ptr, val
|
||||
user_ldp 9998f, \reg1, \reg2, \ptr, \val
|
||||
user_ldp 9997f, \reg1, \reg2, \ptr, \val
|
||||
.endm
|
||||
|
||||
.macro stp1 reg1, reg2, ptr, val
|
||||
@ -53,8 +53,10 @@
|
||||
.endm
|
||||
|
||||
end .req x5
|
||||
srcin .req x15
|
||||
SYM_FUNC_START(__arch_copy_from_user)
|
||||
add end, x0, x2
|
||||
mov srcin, x1
|
||||
#include "copy_template.S"
|
||||
mov x0, #0 // Nothing to copy
|
||||
ret
|
||||
@ -63,6 +65,11 @@ EXPORT_SYMBOL(__arch_copy_from_user)
|
||||
|
||||
.section .fixup,"ax"
|
||||
.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
|
||||
ret
|
||||
.previous
|
||||
|
@ -30,33 +30,34 @@
|
||||
.endm
|
||||
|
||||
.macro ldrh1 reg, ptr, val
|
||||
user_ldst 9998f, ldtrh, \reg, \ptr, \val
|
||||
user_ldst 9997f, ldtrh, \reg, \ptr, \val
|
||||
.endm
|
||||
|
||||
.macro strh1 reg, ptr, val
|
||||
user_ldst 9998f, sttrh, \reg, \ptr, \val
|
||||
user_ldst 9997f, sttrh, \reg, \ptr, \val
|
||||
.endm
|
||||
|
||||
.macro ldr1 reg, ptr, val
|
||||
user_ldst 9998f, ldtr, \reg, \ptr, \val
|
||||
user_ldst 9997f, ldtr, \reg, \ptr, \val
|
||||
.endm
|
||||
|
||||
.macro str1 reg, ptr, val
|
||||
user_ldst 9998f, sttr, \reg, \ptr, \val
|
||||
user_ldst 9997f, sttr, \reg, \ptr, \val
|
||||
.endm
|
||||
|
||||
.macro ldp1 reg1, reg2, ptr, val
|
||||
user_ldp 9998f, \reg1, \reg2, \ptr, \val
|
||||
user_ldp 9997f, \reg1, \reg2, \ptr, \val
|
||||
.endm
|
||||
|
||||
.macro stp1 reg1, reg2, ptr, val
|
||||
user_stp 9998f, \reg1, \reg2, \ptr, \val
|
||||
user_stp 9997f, \reg1, \reg2, \ptr, \val
|
||||
.endm
|
||||
|
||||
end .req x5
|
||||
|
||||
srcin .req x15
|
||||
SYM_FUNC_START(__arch_copy_in_user)
|
||||
add end, x0, x2
|
||||
mov srcin, x1
|
||||
#include "copy_template.S"
|
||||
mov x0, #0
|
||||
ret
|
||||
@ -65,6 +66,12 @@ EXPORT_SYMBOL(__arch_copy_in_user)
|
||||
|
||||
.section .fixup,"ax"
|
||||
.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
|
||||
ret
|
||||
.previous
|
||||
|
@ -32,7 +32,7 @@
|
||||
.endm
|
||||
|
||||
.macro strh1 reg, ptr, val
|
||||
user_ldst 9998f, sttrh, \reg, \ptr, \val
|
||||
user_ldst 9997f, sttrh, \reg, \ptr, \val
|
||||
.endm
|
||||
|
||||
.macro ldr1 reg, ptr, val
|
||||
@ -40,7 +40,7 @@
|
||||
.endm
|
||||
|
||||
.macro str1 reg, ptr, val
|
||||
user_ldst 9998f, sttr, \reg, \ptr, \val
|
||||
user_ldst 9997f, sttr, \reg, \ptr, \val
|
||||
.endm
|
||||
|
||||
.macro ldp1 reg1, reg2, ptr, val
|
||||
@ -48,12 +48,14 @@
|
||||
.endm
|
||||
|
||||
.macro stp1 reg1, reg2, ptr, val
|
||||
user_stp 9998f, \reg1, \reg2, \ptr, \val
|
||||
user_stp 9997f, \reg1, \reg2, \ptr, \val
|
||||
.endm
|
||||
|
||||
end .req x5
|
||||
srcin .req x15
|
||||
SYM_FUNC_START(__arch_copy_to_user)
|
||||
add end, x0, x2
|
||||
mov srcin, x1
|
||||
#include "copy_template.S"
|
||||
mov x0, #0
|
||||
ret
|
||||
@ -62,6 +64,12 @@ EXPORT_SYMBOL(__arch_copy_to_user)
|
||||
|
||||
.section .fixup,"ax"
|
||||
.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
|
||||
ret
|
||||
.previous
|
||||
|
@ -8,6 +8,7 @@
|
||||
|
||||
#include <linux/linkage.h>
|
||||
#include <asm/assembler.h>
|
||||
#include <asm/mte-def.h>
|
||||
|
||||
/* Assumptions:
|
||||
*
|
||||
@ -42,7 +43,16 @@
|
||||
#define REP8_7f 0x7f7f7f7f7f7f7f7f
|
||||
#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
|
||||
#endif
|
||||
|
||||
/* 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
|
||||
|
@ -76,7 +76,7 @@ static inline int __enable_fpu(enum fpu_mode mode)
|
||||
/* we only have a 32-bit FPU */
|
||||
return SIGFPE;
|
||||
#endif
|
||||
fallthrough;
|
||||
/* fallthrough */
|
||||
case FPU_32BIT:
|
||||
if (cpu_has_fre) {
|
||||
/* clear FRE */
|
||||
|
@ -1383,6 +1383,7 @@ static void build_r4000_tlb_refill_handler(void)
|
||||
switch (boot_cpu_type()) {
|
||||
default:
|
||||
if (sizeof(long) == 4) {
|
||||
fallthrough;
|
||||
case CPU_LOONGSON2EF:
|
||||
/* Loongson2 ebase is different than r4k, we have more space */
|
||||
if ((p - tlb_handler) > 64)
|
||||
@ -2169,6 +2170,7 @@ static void build_r4000_tlb_load_handler(void)
|
||||
default:
|
||||
if (cpu_has_mips_r2_exec_hazard) {
|
||||
uasm_i_ehb(&p);
|
||||
fallthrough;
|
||||
|
||||
case CPU_CAVIUM_OCTEON:
|
||||
case CPU_CAVIUM_OCTEON_PLUS:
|
||||
|
@ -143,14 +143,13 @@ static int gio_device_probe(struct device *dev)
|
||||
return error;
|
||||
}
|
||||
|
||||
static int gio_device_remove(struct device *dev)
|
||||
static void gio_device_remove(struct device *dev)
|
||||
{
|
||||
struct gio_device *gio_dev = to_gio_device(dev);
|
||||
struct gio_driver *drv = to_gio_driver(dev->driver);
|
||||
|
||||
if (dev->driver && drv->remove)
|
||||
drv->remove(gio_dev);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void gio_device_shutdown(struct device *dev)
|
||||
|
@ -133,14 +133,13 @@ static int parisc_driver_probe(struct device *dev)
|
||||
return rc;
|
||||
}
|
||||
|
||||
static int __exit parisc_driver_remove(struct device *dev)
|
||||
static void __exit parisc_driver_remove(struct device *dev)
|
||||
{
|
||||
struct parisc_device *pa_dev = to_parisc_device(dev);
|
||||
struct parisc_driver *pa_drv = to_parisc_driver(dev->driver);
|
||||
|
||||
if (pa_drv->remove)
|
||||
pa_drv->remove(pa_dev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -146,6 +146,7 @@ static inline void psurge_clr_ipi(int cpu)
|
||||
switch(psurge_type) {
|
||||
case PSURGE_DUAL:
|
||||
out_8(psurge_sec_intr, ~0);
|
||||
break;
|
||||
case PSURGE_NONE:
|
||||
break;
|
||||
default:
|
||||
|
@ -381,7 +381,7 @@ static int ps3_system_bus_probe(struct device *_dev)
|
||||
return result;
|
||||
}
|
||||
|
||||
static int ps3_system_bus_remove(struct device *_dev)
|
||||
static void ps3_system_bus_remove(struct device *_dev)
|
||||
{
|
||||
struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev);
|
||||
struct ps3_system_bus_driver *drv;
|
||||
@ -399,7 +399,6 @@ static int ps3_system_bus_remove(struct device *_dev)
|
||||
__func__, __LINE__, drv->core.name);
|
||||
|
||||
pr_debug(" <- %s:%d: %s\n", __func__, __LINE__, dev_name(&dev->core));
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void ps3_system_bus_shutdown(struct device *_dev)
|
||||
|
@ -366,14 +366,13 @@ static int ibmebus_bus_device_probe(struct device *dev)
|
||||
return error;
|
||||
}
|
||||
|
||||
static int ibmebus_bus_device_remove(struct device *dev)
|
||||
static void ibmebus_bus_device_remove(struct device *dev)
|
||||
{
|
||||
struct platform_device *of_dev = to_platform_device(dev);
|
||||
struct platform_driver *drv = to_platform_driver(dev->driver);
|
||||
|
||||
if (dev->driver && drv->remove)
|
||||
drv->remove(of_dev);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void ibmebus_bus_device_shutdown(struct device *dev)
|
||||
|
@ -1257,7 +1257,7 @@ static int vio_bus_probe(struct device *dev)
|
||||
}
|
||||
|
||||
/* convert from struct device to struct vio_dev and pass to driver. */
|
||||
static int vio_bus_remove(struct device *dev)
|
||||
static void vio_bus_remove(struct device *dev)
|
||||
{
|
||||
struct vio_dev *viodev = to_vio_dev(dev);
|
||||
struct vio_driver *viodrv = to_vio_driver(dev->driver);
|
||||
@ -1276,7 +1276,6 @@ static int vio_bus_remove(struct device *dev)
|
||||
vio_cmo_bus_remove(viodev);
|
||||
|
||||
put_device(devptr);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void vio_bus_shutdown(struct device *dev)
|
||||
|
@ -105,7 +105,7 @@ enum scm_event {SCM_CHANGE, SCM_AVAIL};
|
||||
struct scm_driver {
|
||||
struct device_driver drv;
|
||||
int (*probe) (struct scm_device *scmdev);
|
||||
int (*remove) (struct scm_device *scmdev);
|
||||
void (*remove) (struct scm_device *scmdev);
|
||||
void (*notify) (struct scm_device *scmdev, enum scm_event event);
|
||||
void (*handler) (struct scm_device *scmdev, void *data,
|
||||
blk_status_t error);
|
||||
|
@ -126,6 +126,7 @@ int arch_uprobe_exception_notify(struct notifier_block *self, unsigned long val,
|
||||
case DIE_SSTEP:
|
||||
if (uprobe_post_sstep_notifier(regs))
|
||||
return NOTIFY_STOP;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -93,7 +93,7 @@ static int vio_device_probe(struct device *dev)
|
||||
return drv->probe(vdev, id);
|
||||
}
|
||||
|
||||
static int vio_device_remove(struct device *dev)
|
||||
static void vio_device_remove(struct device *dev)
|
||||
{
|
||||
struct vio_dev *vdev = to_vio_dev(dev);
|
||||
struct vio_driver *drv = to_vio_driver(dev->driver);
|
||||
@ -107,8 +107,6 @@ static int vio_device_remove(struct device *dev)
|
||||
|
||||
drv->remove(vdev);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static ssize_t devspec_show(struct device *dev,
|
||||
|
@ -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.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.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 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;
|
||||
|
||||
entry->eax = g_phys_as | (virt_as << 8);
|
||||
entry->edx = 0;
|
||||
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 0x8000001e:
|
||||
break;
|
||||
/* Support memory encryption cpuid if host supports it */
|
||||
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;
|
||||
else
|
||||
} else {
|
||||
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;
|
||||
/*Add support for Centaur's CPUID instruction*/
|
||||
case 0xC0000000:
|
||||
|
@ -53,6 +53,8 @@
|
||||
#include <asm/kvm_page_track.h>
|
||||
#include "trace.h"
|
||||
|
||||
#include "paging.h"
|
||||
|
||||
extern bool itlb_multihit_kvm_mitigation;
|
||||
|
||||
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 guest_walker guest_walker64
|
||||
#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_OFFSET_MASK(lvl) PT64_LVL_OFFSET_MASK(lvl)
|
||||
#define PT_INDEX(addr, level) PT64_INDEX(addr, level)
|
||||
@ -57,7 +57,7 @@
|
||||
#define pt_element_t u64
|
||||
#define guest_walker guest_walkerEPT
|
||||
#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_OFFSET_MASK(lvl) PT64_LVL_OFFSET_MASK(lvl)
|
||||
#define PT_INDEX(addr, level) PT64_INDEX(addr, level)
|
||||
|
@ -38,12 +38,6 @@ static_assert(SPTE_TDP_AD_ENABLED_MASK == 0);
|
||||
#else
|
||||
#define PT64_BASE_ADDR_MASK (((1ULL << 52) - 1) & ~(u64)(PAGE_SIZE-1))
|
||||
#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 \
|
||||
| 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++)
|
||||
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,
|
||||
@ -304,8 +308,8 @@ static bool nested_vmcb_valid_sregs(struct kvm_vcpu *vcpu,
|
||||
return true;
|
||||
}
|
||||
|
||||
static void nested_load_control_from_vmcb12(struct vcpu_svm *svm,
|
||||
struct vmcb_control_area *control)
|
||||
void nested_load_control_from_vmcb12(struct vcpu_svm *svm,
|
||||
struct vmcb_control_area *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;
|
||||
u64 vmcb12_gpa;
|
||||
|
||||
if (!svm->nested.hsave_msr) {
|
||||
kvm_inject_gp(vcpu, 0);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (is_smm(vcpu)) {
|
||||
kvm_queue_exception(vcpu, UD_VECTOR);
|
||||
return 1;
|
||||
@ -692,6 +701,27 @@ out:
|
||||
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)
|
||||
{
|
||||
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->vmcb01.ptr->save.es = save->es;
|
||||
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;
|
||||
|
||||
svm_copy_vmrun_state(save, &svm->vmcb01.ptr->save);
|
||||
nested_load_control_from_vmcb12(svm, ctl);
|
||||
|
||||
svm_switch_vmcb(svm, &svm->nested.vmcb02);
|
||||
|
||||
nested_vmcb02_prepare_control(svm);
|
||||
|
||||
kvm_make_request(KVM_REQ_GET_NESTED_STATE_PAGES, vcpu);
|
||||
ret = 0;
|
||||
out_free:
|
||||
|
@ -1272,8 +1272,8 @@ static int sev_send_update_data(struct kvm *kvm, struct kvm_sev_cmd *argp)
|
||||
/* Pin guest memory */
|
||||
guest_page = sev_pin_memory(kvm, params.guest_uaddr & PAGE_MASK,
|
||||
PAGE_SIZE, &n, 0);
|
||||
if (!guest_page)
|
||||
return -EFAULT;
|
||||
if (IS_ERR(guest_page))
|
||||
return PTR_ERR(guest_page);
|
||||
|
||||
/* allocate memory for header and transport buffer */
|
||||
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. */
|
||||
ret = copy_to_user((void __user *)(uintptr_t)params.hdr_uaddr, hdr,
|
||||
params.hdr_len);
|
||||
if (copy_to_user((void __user *)(uintptr_t)params.hdr_uaddr, hdr,
|
||||
params.hdr_len))
|
||||
ret = -EFAULT;
|
||||
|
||||
e_free_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;
|
||||
|
||||
/* Pin guest memory */
|
||||
ret = -EFAULT;
|
||||
guest_page = sev_pin_memory(kvm, params.guest_uaddr & PAGE_MASK,
|
||||
PAGE_SIZE, &n, 0);
|
||||
if (!guest_page)
|
||||
if (IS_ERR(guest_page)) {
|
||||
ret = PTR_ERR(guest_page);
|
||||
goto e_free_trans;
|
||||
}
|
||||
|
||||
/* The RECEIVE_UPDATE_DATA command requires C-bit to be always set. */
|
||||
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;
|
||||
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 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_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_RDPMC);
|
||||
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);
|
||||
|
||||
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;
|
||||
|
||||
trace_kvm_page_fault(fault_address, error_code);
|
||||
@ -2106,6 +2114,11 @@ static int nmi_interception(struct kvm_vcpu *vcpu)
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int smi_interception(struct kvm_vcpu *vcpu)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int intr_interception(struct kvm_vcpu *vcpu)
|
||||
{
|
||||
++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);
|
||||
break;
|
||||
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;
|
||||
case MSR_VM_CR:
|
||||
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_INTR] = intr_interception,
|
||||
[SVM_EXIT_NMI] = nmi_interception,
|
||||
[SVM_EXIT_SMI] = kvm_emulate_as_nop,
|
||||
[SVM_EXIT_INIT] = kvm_emulate_as_nop,
|
||||
[SVM_EXIT_SMI] = smi_interception,
|
||||
[SVM_EXIT_VINTR] = interrupt_window_interception,
|
||||
[SVM_EXIT_RDPMC] = kvm_emulate_rdpmc,
|
||||
[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)
|
||||
{
|
||||
struct vcpu_svm *svm = to_svm(vcpu);
|
||||
struct kvm_host_map map_save;
|
||||
int ret;
|
||||
|
||||
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);
|
||||
if (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;
|
||||
}
|
||||
@ -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)
|
||||
{
|
||||
struct vcpu_svm *svm = to_svm(vcpu);
|
||||
struct kvm_host_map map;
|
||||
struct kvm_host_map map, map_save;
|
||||
int ret = 0;
|
||||
|
||||
if (guest_cpuid_has(vcpu, X86_FEATURE_LM)) {
|
||||
u64 saved_efer = GET_SMSTATE(u64, smstate, 0x7ed0);
|
||||
u64 guest = GET_SMSTATE(u64, smstate, 0x7ed8);
|
||||
u64 vmcb12_gpa = GET_SMSTATE(u64, smstate, 0x7ee0);
|
||||
struct vmcb *vmcb12;
|
||||
|
||||
if (guest) {
|
||||
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))
|
||||
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);
|
||||
|
||||
/*
|
||||
* 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
|
||||
extern u32 msrpm_offsets[MSRPM_OFFSETS] __read_mostly;
|
||||
extern bool npt_enabled;
|
||||
extern bool intercept_smi;
|
||||
|
||||
/*
|
||||
* Clean bits in VMCB.
|
||||
@ -463,6 +464,8 @@ void svm_leave_nested(struct vcpu_svm *svm);
|
||||
void svm_free_nested(struct vcpu_svm *svm);
|
||||
int svm_allocate_nested(struct vcpu_svm *svm);
|
||||
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);
|
||||
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,
|
||||
bool has_error_code, u32 error_code);
|
||||
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_vmcb02_compute_g_pat(struct vcpu_svm *svm);
|
||||
void svm_switch_vmcb(struct vcpu_svm *svm, struct kvm_vmcb_info *target_vmcb);
|
||||
|
@ -14,8 +14,6 @@
|
||||
#include "vmx_ops.h"
|
||||
#include "cpuid.h"
|
||||
|
||||
extern const u32 vmx_msr_index[];
|
||||
|
||||
#define MSR_TYPE_R 1
|
||||
#define MSR_TYPE_W 2
|
||||
#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.dr6, 6);
|
||||
vcpu->arch.switch_db_regs &= ~KVM_DEBUGREG_RELOAD;
|
||||
} else if (unlikely(hw_breakpoint_active())) {
|
||||
set_debugreg(0, 7);
|
||||
}
|
||||
|
||||
for (;;) {
|
||||
@ -10985,9 +10987,6 @@ int kvm_arch_hardware_setup(void *opaque)
|
||||
int r;
|
||||
|
||||
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))
|
||||
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++) {
|
||||
poke = &prog->aux->poke_tab[i];
|
||||
if (poke->aux && poke->aux != prog->aux)
|
||||
continue;
|
||||
|
||||
WARN_ON_ONCE(READ_ONCE(poke->tailcall_target_stable));
|
||||
|
||||
if (poke->reason != BPF_POKE_REASON_TAIL_CALL)
|
||||
|
@ -1019,7 +1019,7 @@ static int acpi_device_probe(struct device *dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int acpi_device_remove(struct device *dev)
|
||||
static void acpi_device_remove(struct device *dev)
|
||||
{
|
||||
struct acpi_device *acpi_dev = to_acpi_device(dev);
|
||||
struct acpi_driver *acpi_drv = acpi_dev->driver;
|
||||
@ -1034,7 +1034,6 @@ static int acpi_device_remove(struct device *dev)
|
||||
acpi_dev->driver_data = NULL;
|
||||
|
||||
put_device(dev);
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct bus_type acpi_bus_type = {
|
||||
|
@ -219,7 +219,7 @@ static int amba_probe(struct device *dev)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int amba_remove(struct device *dev)
|
||||
static void amba_remove(struct device *dev)
|
||||
{
|
||||
struct amba_device *pcdev = to_amba_device(dev);
|
||||
struct amba_driver *drv = to_amba_driver(dev->driver);
|
||||
@ -236,8 +236,6 @@ static int amba_remove(struct device *dev)
|
||||
|
||||
amba_put_disable_pclk(pcdev);
|
||||
dev_pm_domain_detach(dev, true);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void amba_shutdown(struct device *dev)
|
||||
|
@ -79,7 +79,7 @@ static int auxiliary_bus_probe(struct device *dev)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int auxiliary_bus_remove(struct device *dev)
|
||||
static void auxiliary_bus_remove(struct device *dev)
|
||||
{
|
||||
struct auxiliary_driver *auxdrv = to_auxiliary_drv(dev->driver);
|
||||
struct auxiliary_device *auxdev = to_auxiliary_dev(dev);
|
||||
@ -87,8 +87,6 @@ static int auxiliary_bus_remove(struct device *dev)
|
||||
if (auxdrv->remove)
|
||||
auxdrv->remove(auxdev);
|
||||
dev_pm_domain_detach(dev, true);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void auxiliary_bus_shutdown(struct device *dev)
|
||||
|
@ -46,14 +46,12 @@ static int isa_bus_probe(struct device *dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int isa_bus_remove(struct device *dev)
|
||||
static void isa_bus_remove(struct device *dev)
|
||||
{
|
||||
struct isa_driver *isa_driver = dev->platform_data;
|
||||
|
||||
if (isa_driver && isa_driver->remove)
|
||||
isa_driver->remove(dev, to_isa_dev(dev)->id);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void isa_bus_shutdown(struct device *dev)
|
||||
|
@ -1438,7 +1438,7 @@ out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int platform_remove(struct device *_dev)
|
||||
static void platform_remove(struct device *_dev)
|
||||
{
|
||||
struct platform_driver *drv = to_platform_driver(_dev->driver);
|
||||
struct platform_device *dev = to_platform_device(_dev);
|
||||
@ -1450,8 +1450,6 @@ static int platform_remove(struct device *_dev)
|
||||
dev_warn(_dev, "remove callback returned a non-zero value. This will be ignored.\n");
|
||||
}
|
||||
dev_pm_domain_detach(_dev, true);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void platform_shutdown(struct device *_dev)
|
||||
|
@ -27,7 +27,7 @@ static DEFINE_MUTEX(bcma_buses_mutex);
|
||||
|
||||
static int bcma_bus_match(struct device *dev, struct device_driver *drv);
|
||||
static int bcma_device_probe(struct device *dev);
|
||||
static int bcma_device_remove(struct device *dev);
|
||||
static void bcma_device_remove(struct device *dev);
|
||||
static int bcma_device_uevent(struct device *dev, struct kobj_uevent_env *env);
|
||||
|
||||
static ssize_t manuf_show(struct device *dev, struct device_attribute *attr, char *buf)
|
||||
@ -614,7 +614,7 @@ static int bcma_device_probe(struct device *dev)
|
||||
return err;
|
||||
}
|
||||
|
||||
static int bcma_device_remove(struct device *dev)
|
||||
static void bcma_device_remove(struct device *dev)
|
||||
{
|
||||
struct bcma_device *core = container_of(dev, struct bcma_device, dev);
|
||||
struct bcma_driver *adrv = container_of(dev->driver, struct bcma_driver,
|
||||
@ -623,8 +623,6 @@ static int bcma_device_remove(struct device *dev)
|
||||
if (adrv->remove)
|
||||
adrv->remove(core);
|
||||
put_device(dev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int bcma_device_uevent(struct device *dev, struct kobj_uevent_env *env)
|
||||
|
@ -239,8 +239,8 @@ static void nbd_dev_remove(struct nbd_device *nbd)
|
||||
|
||||
if (disk) {
|
||||
del_gendisk(disk);
|
||||
blk_mq_free_tag_set(&nbd->tag_set);
|
||||
blk_cleanup_disk(disk);
|
||||
blk_mq_free_tag_set(&nbd->tag_set);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1014,8 +1014,8 @@ static void __exit pd_exit(void)
|
||||
if (p) {
|
||||
disk->gd = NULL;
|
||||
del_gendisk(p);
|
||||
blk_mq_free_tag_set(&disk->tag_set);
|
||||
blk_cleanup_disk(p);
|
||||
blk_mq_free_tag_set(&disk->tag_set);
|
||||
pi_release(disk->pi);
|
||||
}
|
||||
}
|
||||
|
@ -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,
|
||||
unsigned command, unsigned long argument)
|
||||
{
|
||||
struct blkfront_info *info = bdev->bd_disk->private_data;
|
||||
int i;
|
||||
|
||||
dev_dbg(&info->xbdev->dev, "command: 0x%x, argument: 0x%lx\n",
|
||||
command, (long)argument);
|
||||
|
||||
switch (command) {
|
||||
case CDROMMULTISESSION:
|
||||
dev_dbg(&info->xbdev->dev, "FIXME: support multisession CDs later\n");
|
||||
for (i = 0; i < sizeof(struct cdrom_multisession); i++)
|
||||
if (put_user(0, (char __user *)(argument + i)))
|
||||
return -EFAULT;
|
||||
return 0;
|
||||
|
||||
case CDROM_GET_CAPABILITY: {
|
||||
struct gendisk *gd = info->gd;
|
||||
if (gd->flags & GENHD_FL_CD)
|
||||
case CDROM_GET_CAPABILITY:
|
||||
if (bdev->bd_disk->flags & GENHD_FL_CD)
|
||||
return 0;
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
default:
|
||||
/*printk(KERN_ALERT "ioctl %08x not supported by Xen blkdev\n",
|
||||
command);*/
|
||||
return -EINVAL; /* same return as native Linux */
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static unsigned long blkif_ring_get_request(struct blkfront_ring_info *rinfo,
|
||||
@ -1177,36 +1164,6 @@ out_release_minors:
|
||||
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. */
|
||||
static inline void kick_pending_request_queues_locked(struct blkfront_ring_info *rinfo)
|
||||
{
|
||||
@ -1756,12 +1713,6 @@ abort_transaction:
|
||||
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. */
|
||||
static int talk_to_blkback(struct xenbus_device *dev,
|
||||
struct blkfront_info *info)
|
||||
@ -1880,13 +1831,6 @@ again:
|
||||
xenbus_dev_fatal(dev, err, "%s", message);
|
||||
destroy_blkring:
|
||||
blkif_free(info, 0);
|
||||
|
||||
mutex_lock(&blkfront_mutex);
|
||||
free_info(info);
|
||||
mutex_unlock(&blkfront_mutex);
|
||||
|
||||
dev_set_drvdata(&dev->dev, NULL);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
@ -2126,38 +2070,26 @@ static int blkfront_resume(struct xenbus_device *dev)
|
||||
static void blkfront_closing(struct blkfront_info *info)
|
||||
{
|
||||
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) {
|
||||
mutex_unlock(&info->mutex);
|
||||
if (xbdev->state == XenbusStateClosing)
|
||||
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)
|
||||
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);
|
||||
xenbus_frontend_closed(xbdev);
|
||||
}
|
||||
|
||||
static void blkfront_setup_discard(struct blkfront_info *info)
|
||||
@ -2472,8 +2404,7 @@ static void blkback_changed(struct xenbus_device *dev,
|
||||
break;
|
||||
fallthrough;
|
||||
case XenbusStateClosing:
|
||||
if (info)
|
||||
blkfront_closing(info);
|
||||
blkfront_closing(info);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -2481,56 +2412,21 @@ static void blkback_changed(struct xenbus_device *dev,
|
||||
static int blkfront_remove(struct xenbus_device *xbdev)
|
||||
{
|
||||
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);
|
||||
|
||||
if (!info)
|
||||
return 0;
|
||||
del_gendisk(info->gd);
|
||||
|
||||
mutex_lock(&blkfront_mutex);
|
||||
list_del(&info->info_list);
|
||||
mutex_unlock(&blkfront_mutex);
|
||||
|
||||
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);
|
||||
|
||||
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);
|
||||
|
||||
kfree(info);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -2541,77 +2437,9 @@ static int blkfront_is_ready(struct xenbus_device *dev)
|
||||
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 =
|
||||
{
|
||||
.owner = THIS_MODULE,
|
||||
.open = blkif_open,
|
||||
.release = blkif_release,
|
||||
.getgeo = blkif_getgeo,
|
||||
.ioctl = blkif_ioctl,
|
||||
.compat_ioctl = blkdev_compat_ptr_ioctl,
|
||||
|
@ -169,13 +169,11 @@ static int sunxi_rsb_device_probe(struct device *dev)
|
||||
return drv->probe(rdev);
|
||||
}
|
||||
|
||||
static int sunxi_rsb_device_remove(struct device *dev)
|
||||
static void sunxi_rsb_device_remove(struct device *dev)
|
||||
{
|
||||
const struct sunxi_rsb_driver *drv = to_sunxi_rsb_driver(dev->driver);
|
||||
|
||||
drv->remove(to_sunxi_rsb_device(dev));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct bus_type sunxi_rsb_bus = {
|
||||
|
@ -75,6 +75,7 @@ static int __op_panel_update_display(void)
|
||||
rc);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case OPAL_SUCCESS:
|
||||
break;
|
||||
default:
|
||||
|
@ -30,8 +30,9 @@ enum clk_ids {
|
||||
CLK_PLL2_DIV20,
|
||||
CLK_PLL3,
|
||||
CLK_PLL3_DIV2,
|
||||
CLK_PLL3_DIV2_4,
|
||||
CLK_PLL3_DIV2_4_2,
|
||||
CLK_PLL3_DIV4,
|
||||
CLK_PLL3_DIV8,
|
||||
CLK_PLL4,
|
||||
CLK_PLL5,
|
||||
CLK_PLL5_DIV2,
|
||||
@ -42,12 +43,13 @@ enum clk_ids {
|
||||
};
|
||||
|
||||
/* Divider tables */
|
||||
static const struct clk_div_table dtable_3b[] = {
|
||||
static const struct clk_div_table dtable_1_32[] = {
|
||||
{0, 1},
|
||||
{1, 2},
|
||||
{2, 4},
|
||||
{3, 8},
|
||||
{4, 32},
|
||||
{0, 0},
|
||||
};
|
||||
|
||||
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(".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_div8", CLK_PLL3_DIV8, CLK_PLL3, 1, 8),
|
||||
|
||||
/* Core output clk */
|
||||
DEF_FIXED("I", R9A07G044_CLK_I, CLK_PLL1, 1, 1),
|
||||
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_DIV("P1", R9A07G044_CLK_P1, CLK_PLL3_DIV8,
|
||||
DIVPL3B, dtable_3b, CLK_DIVIDER_HIWORD_MASK),
|
||||
DEF_DIV("P1", R9A07G044_CLK_P1, CLK_PLL3_DIV2_4,
|
||||
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[] = {
|
||||
DEF_MOD("gic", R9A07G044_CLK_GIC600,
|
||||
R9A07G044_CLK_P1,
|
||||
0x514, BIT(0), (BIT(0) | BIT(1))),
|
||||
DEF_MOD("ia55", R9A07G044_CLK_IA55,
|
||||
R9A07G044_CLK_P1,
|
||||
0x518, (BIT(0) | BIT(1)), BIT(0)),
|
||||
DEF_MOD("scif0", R9A07G044_CLK_SCIF0,
|
||||
R9A07G044_CLK_P0,
|
||||
0x584, BIT(0), BIT(0)),
|
||||
DEF_MOD("scif1", R9A07G044_CLK_SCIF1,
|
||||
R9A07G044_CLK_P0,
|
||||
0x584, BIT(1), BIT(1)),
|
||||
DEF_MOD("scif2", R9A07G044_CLK_SCIF2,
|
||||
R9A07G044_CLK_P0,
|
||||
0x584, BIT(2), BIT(2)),
|
||||
DEF_MOD("scif3", R9A07G044_CLK_SCIF3,
|
||||
R9A07G044_CLK_P0,
|
||||
0x584, BIT(3), BIT(3)),
|
||||
DEF_MOD("scif4", R9A07G044_CLK_SCIF4,
|
||||
R9A07G044_CLK_P0,
|
||||
0x584, BIT(4), BIT(4)),
|
||||
DEF_MOD("sci0", R9A07G044_CLK_SCI0,
|
||||
R9A07G044_CLK_P0,
|
||||
0x588, BIT(0), BIT(0)),
|
||||
DEF_MOD("gic", R9A07G044_GIC600_GICCLK, R9A07G044_CLK_P1,
|
||||
0x514, 0),
|
||||
DEF_MOD("ia55_pclk", R9A07G044_IA55_PCLK, R9A07G044_CLK_P2,
|
||||
0x518, 0),
|
||||
DEF_MOD("ia55_clk", R9A07G044_IA55_CLK, R9A07G044_CLK_P1,
|
||||
0x518, 1),
|
||||
DEF_MOD("scif0", R9A07G044_SCIF0_CLK_PCK, R9A07G044_CLK_P0,
|
||||
0x584, 0),
|
||||
DEF_MOD("scif1", R9A07G044_SCIF1_CLK_PCK, R9A07G044_CLK_P0,
|
||||
0x584, 1),
|
||||
DEF_MOD("scif2", R9A07G044_SCIF2_CLK_PCK, R9A07G044_CLK_P0,
|
||||
0x584, 2),
|
||||
DEF_MOD("scif3", R9A07G044_SCIF3_CLK_PCK, R9A07G044_CLK_P0,
|
||||
0x584, 3),
|
||||
DEF_MOD("scif4", R9A07G044_SCIF4_CLK_PCK, R9A07G044_CLK_P0,
|
||||
0x584, 4),
|
||||
DEF_MOD("sci0", R9A07G044_SCI0_CLKP, R9A07G044_CLK_P0,
|
||||
0x588, 0),
|
||||
};
|
||||
|
||||
static struct rzg2l_reset r9a07g044_resets[] = {
|
||||
DEF_RST(R9A07G044_GIC600_GICRESET_N, 0x814, 0),
|
||||
DEF_RST(R9A07G044_GIC600_DBG_GICRESET_N, 0x814, 1),
|
||||
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 = {
|
||||
MOD_CLK_BASE + R9A07G044_CLK_GIC600,
|
||||
MOD_CLK_BASE + R9A07G044_GIC600_GICCLK,
|
||||
};
|
||||
|
||||
const struct rzg2l_cpg_info r9a07g044_cpg_info = {
|
||||
@ -123,5 +134,9 @@ const struct rzg2l_cpg_info r9a07g044_cpg_info = {
|
||||
/* Module Clocks */
|
||||
.mod_clks = 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 CLK_ON_R(reg) (reg)
|
||||
#define CLK_MON_R(reg) (0x680 - 0x500 + (reg))
|
||||
#define CLK_RST_R(reg) (0x800 - 0x500 + (reg))
|
||||
#define CLK_MRST_R(reg) (0x980 - 0x500 + (reg))
|
||||
#define CLK_MON_R(reg) (0x180 + (reg))
|
||||
#define CLK_RST_R(reg) (reg)
|
||||
#define CLK_MRST_R(reg) (0x180 + (reg))
|
||||
|
||||
#define GET_REG_OFFSET(val) ((val >> 20) & 0xfff)
|
||||
#define GET_REG_SAMPLL_CLK1(val) ((val >> 22) & 0xfff)
|
||||
@ -78,6 +78,7 @@ struct rzg2l_cpg_priv {
|
||||
struct clk **clks;
|
||||
unsigned int num_core_clks;
|
||||
unsigned int num_mod_clks;
|
||||
unsigned int num_resets;
|
||||
unsigned int last_dt_core_clk;
|
||||
|
||||
struct raw_notifier_head notifiers;
|
||||
@ -315,15 +316,13 @@ fail:
|
||||
*
|
||||
* @hw: handle between common and hardware-specific interfaces
|
||||
* @off: register offset
|
||||
* @onoff: ON/MON bits
|
||||
* @reset: reset bits
|
||||
* @bit: ON/MON bit
|
||||
* @priv: CPG/MSTP private data
|
||||
*/
|
||||
struct mstp_clock {
|
||||
struct clk_hw hw;
|
||||
u16 off;
|
||||
u8 onoff;
|
||||
u8 reset;
|
||||
u8 bit;
|
||||
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;
|
||||
unsigned long flags;
|
||||
unsigned int i;
|
||||
u32 bitmask = BIT(clock->bit);
|
||||
u32 value;
|
||||
|
||||
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);
|
||||
|
||||
if (enable)
|
||||
value = (clock->onoff << 16) | clock->onoff;
|
||||
value = (bitmask << 16) | bitmask;
|
||||
else
|
||||
value = clock->onoff << 16;
|
||||
value = bitmask << 16;
|
||||
writel(value, priv->base + CLK_ON_R(reg));
|
||||
|
||||
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;
|
||||
|
||||
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;
|
||||
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 rzg2l_cpg_priv *priv = clock->priv;
|
||||
u32 bitmask = BIT(clock->bit);
|
||||
u32 value;
|
||||
|
||||
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));
|
||||
|
||||
return !(value & clock->onoff);
|
||||
return !(value & bitmask);
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
clock->off = mod->off;
|
||||
clock->onoff = mod->onoff;
|
||||
clock->reset = mod->reset;
|
||||
clock->bit = mod->bit;
|
||||
clock->priv = priv;
|
||||
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);
|
||||
const struct rzg2l_cpg_info *info = priv->info;
|
||||
unsigned int reg = info->mod_clks[id].off;
|
||||
u32 dis = info->mod_clks[id].reset;
|
||||
unsigned int reg = info->resets[id].off;
|
||||
u32 dis = BIT(info->resets[id].bit);
|
||||
u32 we = dis << 16;
|
||||
|
||||
dev_dbg(rcdev->dev, "reset name:%s id:%ld offset:0x%x\n",
|
||||
info->mod_clks[id].name, id, CLK_RST_R(reg));
|
||||
dev_dbg(rcdev->dev, "reset id:%ld offset:0x%x\n", id, CLK_RST_R(reg));
|
||||
|
||||
/* Reset module */
|
||||
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);
|
||||
const struct rzg2l_cpg_info *info = priv->info;
|
||||
unsigned int reg = info->mod_clks[id].off;
|
||||
u32 value = info->mod_clks[id].reset << 16;
|
||||
unsigned int reg = info->resets[id].off;
|
||||
u32 value = BIT(info->resets[id].bit) << 16;
|
||||
|
||||
dev_dbg(rcdev->dev, "assert name:%s id:%ld offset:0x%x\n",
|
||||
info->mod_clks[id].name, id, CLK_RST_R(reg));
|
||||
dev_dbg(rcdev->dev, "assert id:%ld offset:0x%x\n", id, CLK_RST_R(reg));
|
||||
|
||||
writel(value, priv->base + CLK_RST_R(reg));
|
||||
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);
|
||||
const struct rzg2l_cpg_info *info = priv->info;
|
||||
unsigned int reg = info->mod_clks[id].off;
|
||||
u32 dis = info->mod_clks[id].reset;
|
||||
unsigned int reg = info->resets[id].off;
|
||||
u32 dis = BIT(info->resets[id].bit);
|
||||
u32 value = (dis << 16) | dis;
|
||||
|
||||
dev_dbg(rcdev->dev, "deassert name:%s id:%ld offset:0x%x\n",
|
||||
info->mod_clks[id].name, id, CLK_RST_R(reg));
|
||||
dev_dbg(rcdev->dev, "deassert id:%ld offset:0x%x\n", id,
|
||||
CLK_RST_R(reg));
|
||||
|
||||
writel(value, priv->base + CLK_RST_R(reg));
|
||||
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);
|
||||
const struct rzg2l_cpg_info *info = priv->info;
|
||||
unsigned int reg = info->mod_clks[id].off;
|
||||
u32 bitmask = info->mod_clks[id].reset;
|
||||
unsigned int reg = info->resets[id].off;
|
||||
u32 bitmask = BIT(info->resets[id].bit);
|
||||
|
||||
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,
|
||||
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];
|
||||
|
||||
if (id >= rcdev->nr_resets) {
|
||||
if (id >= rcdev->nr_resets || !info->resets[id].off) {
|
||||
dev_err(rcdev->dev, "Invalid reset index %u\n", id);
|
||||
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.of_reset_n_cells = 1;
|
||||
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);
|
||||
}
|
||||
@ -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 of_phandle_args clkspec;
|
||||
bool once = true;
|
||||
struct clk *clk;
|
||||
int error;
|
||||
int i = 0;
|
||||
|
||||
while (!of_parse_phandle_with_args(np, "clocks", "#clock-cells", i,
|
||||
&clkspec)) {
|
||||
if (rzg2l_cpg_is_pm_clk(&clkspec))
|
||||
goto found;
|
||||
if (rzg2l_cpg_is_pm_clk(&clkspec)) {
|
||||
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++;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
found:
|
||||
clk = of_clk_get_from_provider(&clkspec);
|
||||
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_put:
|
||||
clk_put(clk);
|
||||
|
||||
fail_destroy:
|
||||
pm_clk_destroy(dev);
|
||||
fail_put:
|
||||
clk_put(clk);
|
||||
err:
|
||||
return error;
|
||||
}
|
||||
|
||||
@ -692,6 +699,7 @@ static int __init rzg2l_cpg_probe(struct platform_device *pdev)
|
||||
priv->clks = clks;
|
||||
priv->num_core_clks = info->num_total_core_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;
|
||||
|
||||
for (i = 0; i < nclks; i++)
|
||||
|
@ -21,6 +21,7 @@
|
||||
#define DDIV_PACK(offset, bitpos, size) \
|
||||
(((offset) << 20) | ((bitpos) << 12) | ((size) << 8))
|
||||
#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)
|
||||
|
||||
/**
|
||||
@ -76,26 +77,40 @@ enum clk_types {
|
||||
* @id: clock index in array containing all Core and Module Clocks
|
||||
* @parent: id of parent clock
|
||||
* @off: register offset
|
||||
* @onoff: ON/MON bits
|
||||
* @reset: reset bits
|
||||
* @bit: ON/MON bit
|
||||
*/
|
||||
struct rzg2l_mod_clk {
|
||||
const char *name;
|
||||
unsigned int id;
|
||||
unsigned int parent;
|
||||
u16 off;
|
||||
u8 onoff;
|
||||
u8 reset;
|
||||
u8 bit;
|
||||
};
|
||||
|
||||
#define DEF_MOD(_name, _id, _parent, _off, _onoff, _reset) \
|
||||
[_id] = { \
|
||||
#define DEF_MOD(_name, _id, _parent, _off, _bit) \
|
||||
{ \
|
||||
.name = _name, \
|
||||
.id = MOD_CLK_BASE + _id, \
|
||||
.id = MOD_CLK_BASE + (_id), \
|
||||
.parent = (_parent), \
|
||||
.off = (_off), \
|
||||
.onoff = (_onoff), \
|
||||
.reset = (_reset) \
|
||||
.bit = (_bit), \
|
||||
}
|
||||
|
||||
/**
|
||||
* 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_hw_mod_clks;
|
||||
|
||||
/* Resets */
|
||||
const struct rzg2l_reset *resets;
|
||||
unsigned int num_resets;
|
||||
|
||||
/* Critical Module Clocks that should not be disabled */
|
||||
const unsigned int *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);
|
||||
case 10:
|
||||
pr_err("Use acpi-cpufreq driver for VIA C7\n");
|
||||
default:
|
||||
;
|
||||
}
|
||||
|
||||
return -ENODEV;
|
||||
|
@ -1034,13 +1034,12 @@ static int cxl_bus_probe(struct device *dev)
|
||||
return to_cxl_drv(dev->driver)->probe(dev);
|
||||
}
|
||||
|
||||
static int cxl_bus_remove(struct device *dev)
|
||||
static void cxl_bus_remove(struct device *dev)
|
||||
{
|
||||
struct cxl_driver *cxl_drv = to_cxl_drv(dev->driver);
|
||||
|
||||
if (cxl_drv->remove)
|
||||
cxl_drv->remove(dev);
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct bus_type cxl_bus_type = {
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user