Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Conflicts are simple overlapping changes. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
5af84df962
@ -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
|
||||
|
@ -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: |
|
||||
|
@ -57,12 +57,14 @@ properties:
|
||||
maxItems: 1
|
||||
|
||||
power-domains:
|
||||
deprecated: true
|
||||
description:
|
||||
Power domain to use for enable control. This binding is only
|
||||
available if the compatible is chosen to regulator-fixed-domain.
|
||||
maxItems: 1
|
||||
|
||||
required-opps:
|
||||
deprecated: true
|
||||
description:
|
||||
Performance state to use for enable control. This binding is only
|
||||
available if the compatible is chosen to regulator-fixed-domain. The
|
||||
|
@ -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
|
||||
|
@ -243,8 +243,8 @@ Configuration Flags and Socket Options
|
||||
These are the various configuration flags that can be used to control
|
||||
and monitor the behavior of AF_XDP sockets.
|
||||
|
||||
XDP_COPY and XDP_ZERO_COPY bind flags
|
||||
-------------------------------------
|
||||
XDP_COPY and XDP_ZEROCOPY bind flags
|
||||
------------------------------------
|
||||
|
||||
When you bind to a socket, the kernel will first try to use zero-copy
|
||||
copy. If zero-copy is not supported, it will fall back on using copy
|
||||
@ -252,7 +252,7 @@ mode, i.e. copying all packets out to user space. But if you would
|
||||
like to force a certain mode, you can use the following flags. If you
|
||||
pass the XDP_COPY flag to the bind call, the kernel will force the
|
||||
socket into copy mode. If it cannot use copy mode, the bind call will
|
||||
fail with an error. Conversely, the XDP_ZERO_COPY flag will force the
|
||||
fail with an error. Conversely, the XDP_ZEROCOPY flag will force the
|
||||
socket into zero-copy mode or fail.
|
||||
|
||||
XDP_SHARED_UMEM bind flag
|
||||
|
@ -826,7 +826,7 @@ tcp_fastopen_blackhole_timeout_sec - INTEGER
|
||||
initial value when the blackhole issue goes away.
|
||||
0 to disable the blackhole detection.
|
||||
|
||||
By default, it is set to 1hr.
|
||||
By default, it is set to 0 (feature is disabled).
|
||||
|
||||
tcp_fastopen_key - list of comma separated 32-digit hexadecimal INTEGERs
|
||||
The list consists of a primary key and an optional backup key. The
|
||||
|
@ -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
|
||||
@ -11764,6 +11765,7 @@ F: drivers/char/hw_random/mtk-rng.c
|
||||
MEDIATEK SWITCH DRIVER
|
||||
M: Sean Wang <sean.wang@mediatek.com>
|
||||
M: Landen Chao <Landen.Chao@mediatek.com>
|
||||
M: DENG Qingfang <dqfext@gmail.com>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Maintained
|
||||
F: drivers/net/dsa/mt7530.*
|
||||
|
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 {
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -32,20 +32,23 @@ SYM_FUNC_END(__arm_smccc_sve_check)
|
||||
EXPORT_SYMBOL(__arm_smccc_sve_check)
|
||||
|
||||
.macro SMCCC instr
|
||||
stp x29, x30, [sp, #-16]!
|
||||
mov x29, sp
|
||||
alternative_if ARM64_SVE
|
||||
bl __arm_smccc_sve_check
|
||||
alternative_else_nop_endif
|
||||
\instr #0
|
||||
ldr x4, [sp]
|
||||
ldr x4, [sp, #16]
|
||||
stp x0, x1, [x4, #ARM_SMCCC_RES_X0_OFFS]
|
||||
stp x2, x3, [x4, #ARM_SMCCC_RES_X2_OFFS]
|
||||
ldr x4, [sp, #8]
|
||||
ldr x4, [sp, #24]
|
||||
cbz x4, 1f /* no quirk structure */
|
||||
ldr x9, [x4, #ARM_SMCCC_QUIRK_ID_OFFS]
|
||||
cmp x9, #ARM_SMCCC_QUIRK_QCOM_A6
|
||||
b.ne 1f
|
||||
str x6, [x4, ARM_SMCCC_QUIRK_STATE_OFFS]
|
||||
1: ret
|
||||
1: ldp x29, x30, [sp], #16
|
||||
ret
|
||||
.endm
|
||||
|
||||
/*
|
||||
|
@ -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
|
||||
|
@ -1339,7 +1339,6 @@ void *__init fixmap_remap_fdt(phys_addr_t dt_phys, int *size, pgprot_t prot)
|
||||
return dt_virt;
|
||||
}
|
||||
|
||||
#if CONFIG_PGTABLE_LEVELS > 3
|
||||
int pud_set_huge(pud_t *pudp, phys_addr_t phys, pgprot_t prot)
|
||||
{
|
||||
pud_t new_pud = pfn_pud(__phys_to_pfn(phys), mk_pud_sect_prot(prot));
|
||||
@ -1354,16 +1353,6 @@ int pud_set_huge(pud_t *pudp, phys_addr_t phys, pgprot_t prot)
|
||||
return 1;
|
||||
}
|
||||
|
||||
int pud_clear_huge(pud_t *pudp)
|
||||
{
|
||||
if (!pud_sect(READ_ONCE(*pudp)))
|
||||
return 0;
|
||||
pud_clear(pudp);
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if CONFIG_PGTABLE_LEVELS > 2
|
||||
int pmd_set_huge(pmd_t *pmdp, phys_addr_t phys, pgprot_t prot)
|
||||
{
|
||||
pmd_t new_pmd = pfn_pmd(__phys_to_pfn(phys), mk_pmd_sect_prot(prot));
|
||||
@ -1378,6 +1367,14 @@ int pmd_set_huge(pmd_t *pmdp, phys_addr_t phys, pgprot_t prot)
|
||||
return 1;
|
||||
}
|
||||
|
||||
int pud_clear_huge(pud_t *pudp)
|
||||
{
|
||||
if (!pud_sect(READ_ONCE(*pudp)))
|
||||
return 0;
|
||||
pud_clear(pudp);
|
||||
return 1;
|
||||
}
|
||||
|
||||
int pmd_clear_huge(pmd_t *pmdp)
|
||||
{
|
||||
if (!pmd_sect(READ_ONCE(*pmdp)))
|
||||
@ -1385,7 +1382,6 @@ int pmd_clear_huge(pmd_t *pmdp)
|
||||
pmd_clear(pmdp);
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
int pmd_free_pte_page(pmd_t *pmdp, unsigned long addr)
|
||||
{
|
||||
|
@ -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:
|
||||
|
@ -240,3 +240,13 @@ void __init setup_kuap(bool disabled)
|
||||
mtspr(SPRN_MD_AP, MD_APG_KUAP);
|
||||
}
|
||||
#endif
|
||||
|
||||
int pud_clear_huge(pud_t *pud)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int pmd_clear_huge(pmd_t *pmd)
|
||||
{
|
||||
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:
|
||||
|
@ -9,16 +9,6 @@
|
||||
#include <asm/errno.h>
|
||||
#include <asm/sigp.h>
|
||||
|
||||
#ifdef CC_USING_EXPOLINE
|
||||
.pushsection .dma.text.__s390_indirect_jump_r14,"axG"
|
||||
__dma__s390_indirect_jump_r14:
|
||||
larl %r1,0f
|
||||
ex 0,0(%r1)
|
||||
j .
|
||||
0: br %r14
|
||||
.popsection
|
||||
#endif
|
||||
|
||||
.section .dma.text,"ax"
|
||||
/*
|
||||
* Simplified version of expoline thunk. The normal thunks can not be used here,
|
||||
@ -27,11 +17,10 @@ __dma__s390_indirect_jump_r14:
|
||||
* affects a few functions that are not performance-relevant.
|
||||
*/
|
||||
.macro BR_EX_DMA_r14
|
||||
#ifdef CC_USING_EXPOLINE
|
||||
jg __dma__s390_indirect_jump_r14
|
||||
#else
|
||||
br %r14
|
||||
#endif
|
||||
larl %r1,0f
|
||||
ex 0,0(%r1)
|
||||
j .
|
||||
0: br %r14
|
||||
.endm
|
||||
|
||||
/*
|
||||
|
@ -5,7 +5,12 @@ CONFIG_WATCH_QUEUE=y
|
||||
CONFIG_AUDIT=y
|
||||
CONFIG_NO_HZ_IDLE=y
|
||||
CONFIG_HIGH_RES_TIMERS=y
|
||||
CONFIG_BPF_SYSCALL=y
|
||||
CONFIG_BPF_JIT=y
|
||||
CONFIG_BPF_JIT_ALWAYS_ON=y
|
||||
CONFIG_BPF_LSM=y
|
||||
CONFIG_PREEMPT=y
|
||||
CONFIG_SCHED_CORE=y
|
||||
CONFIG_BSD_PROCESS_ACCT=y
|
||||
CONFIG_BSD_PROCESS_ACCT_V3=y
|
||||
CONFIG_TASKSTATS=y
|
||||
@ -28,14 +33,13 @@ CONFIG_CGROUP_DEVICE=y
|
||||
CONFIG_CGROUP_CPUACCT=y
|
||||
CONFIG_CGROUP_PERF=y
|
||||
CONFIG_CGROUP_BPF=y
|
||||
CONFIG_CGROUP_MISC=y
|
||||
CONFIG_NAMESPACES=y
|
||||
CONFIG_USER_NS=y
|
||||
CONFIG_CHECKPOINT_RESTORE=y
|
||||
CONFIG_SCHED_AUTOGROUP=y
|
||||
CONFIG_EXPERT=y
|
||||
# CONFIG_SYSFS_SYSCALL is not set
|
||||
CONFIG_BPF_LSM=y
|
||||
CONFIG_BPF_SYSCALL=y
|
||||
CONFIG_USERFAULTFD=y
|
||||
# CONFIG_COMPAT_BRK is not set
|
||||
CONFIG_PROFILING=y
|
||||
@ -76,6 +80,7 @@ CONFIG_BLK_DEV_THROTTLING=y
|
||||
CONFIG_BLK_WBT=y
|
||||
CONFIG_BLK_CGROUP_IOLATENCY=y
|
||||
CONFIG_BLK_CGROUP_IOCOST=y
|
||||
CONFIG_BLK_CGROUP_IOPRIO=y
|
||||
CONFIG_BLK_INLINE_ENCRYPTION=y
|
||||
CONFIG_BLK_INLINE_ENCRYPTION_FALLBACK=y
|
||||
CONFIG_PARTITION_ADVANCED=y
|
||||
@ -95,6 +100,7 @@ CONFIG_CLEANCACHE=y
|
||||
CONFIG_FRONTSWAP=y
|
||||
CONFIG_CMA_DEBUG=y
|
||||
CONFIG_CMA_DEBUGFS=y
|
||||
CONFIG_CMA_SYSFS=y
|
||||
CONFIG_CMA_AREAS=7
|
||||
CONFIG_MEM_SOFT_DIRTY=y
|
||||
CONFIG_ZSWAP=y
|
||||
@ -158,6 +164,7 @@ CONFIG_IPV6_RPL_LWTUNNEL=y
|
||||
CONFIG_MPTCP=y
|
||||
CONFIG_NETFILTER=y
|
||||
CONFIG_BRIDGE_NETFILTER=m
|
||||
CONFIG_NETFILTER_NETLINK_HOOK=m
|
||||
CONFIG_NF_CONNTRACK=m
|
||||
CONFIG_NF_CONNTRACK_SECMARK=y
|
||||
CONFIG_NF_CONNTRACK_EVENTS=y
|
||||
@ -280,6 +287,7 @@ CONFIG_IP_VS_FTP=m
|
||||
CONFIG_IP_VS_PE_SIP=m
|
||||
CONFIG_NFT_FIB_IPV4=m
|
||||
CONFIG_NF_TABLES_ARP=y
|
||||
CONFIG_NF_LOG_IPV4=m
|
||||
CONFIG_IP_NF_IPTABLES=m
|
||||
CONFIG_IP_NF_MATCH_AH=m
|
||||
CONFIG_IP_NF_MATCH_ECN=m
|
||||
@ -384,12 +392,11 @@ CONFIG_VSOCKETS=m
|
||||
CONFIG_VIRTIO_VSOCKETS=m
|
||||
CONFIG_NETLINK_DIAG=m
|
||||
CONFIG_CGROUP_NET_PRIO=y
|
||||
CONFIG_BPF_JIT=y
|
||||
CONFIG_NET_PKTGEN=m
|
||||
CONFIG_PCI=y
|
||||
CONFIG_PCI_IOV=y
|
||||
# CONFIG_PCIEASPM is not set
|
||||
CONFIG_PCI_DEBUG=y
|
||||
CONFIG_PCI_IOV=y
|
||||
CONFIG_HOTPLUG_PCI=y
|
||||
CONFIG_HOTPLUG_PCI_S390=y
|
||||
CONFIG_DEVTMPFS=y
|
||||
@ -436,7 +443,7 @@ CONFIG_MD_MULTIPATH=m
|
||||
CONFIG_MD_FAULTY=m
|
||||
CONFIG_MD_CLUSTER=m
|
||||
CONFIG_BCACHE=m
|
||||
CONFIG_BLK_DEV_DM=m
|
||||
CONFIG_BLK_DEV_DM=y
|
||||
CONFIG_DM_UNSTRIPED=m
|
||||
CONFIG_DM_CRYPT=m
|
||||
CONFIG_DM_SNAPSHOT=m
|
||||
@ -453,6 +460,7 @@ CONFIG_DM_MULTIPATH_ST=m
|
||||
CONFIG_DM_MULTIPATH_HST=m
|
||||
CONFIG_DM_MULTIPATH_IOA=m
|
||||
CONFIG_DM_DELAY=m
|
||||
CONFIG_DM_INIT=y
|
||||
CONFIG_DM_UEVENT=y
|
||||
CONFIG_DM_FLAKEY=m
|
||||
CONFIG_DM_VERITY=m
|
||||
@ -495,6 +503,7 @@ CONFIG_NLMON=m
|
||||
# CONFIG_NET_VENDOR_GOOGLE is not set
|
||||
# CONFIG_NET_VENDOR_HUAWEI is not set
|
||||
# CONFIG_NET_VENDOR_INTEL is not set
|
||||
# CONFIG_NET_VENDOR_MICROSOFT is not set
|
||||
# CONFIG_NET_VENDOR_MARVELL is not set
|
||||
CONFIG_MLX4_EN=m
|
||||
CONFIG_MLX5_CORE=m
|
||||
@ -551,7 +560,6 @@ CONFIG_INPUT_EVDEV=y
|
||||
CONFIG_LEGACY_PTY_COUNT=0
|
||||
CONFIG_VIRTIO_CONSOLE=m
|
||||
CONFIG_HW_RANDOM_VIRTIO=m
|
||||
CONFIG_RAW_DRIVER=m
|
||||
CONFIG_HANGCHECK_TIMER=m
|
||||
CONFIG_TN3270_FS=y
|
||||
CONFIG_PPS=m
|
||||
@ -574,7 +582,6 @@ CONFIG_SYNC_FILE=y
|
||||
CONFIG_VFIO=m
|
||||
CONFIG_VFIO_PCI=m
|
||||
CONFIG_VFIO_MDEV=m
|
||||
CONFIG_VFIO_MDEV_DEVICE=m
|
||||
CONFIG_VIRTIO_PCI=m
|
||||
CONFIG_VIRTIO_BALLOON=m
|
||||
CONFIG_VIRTIO_INPUT=y
|
||||
@ -619,6 +626,7 @@ CONFIG_FUSE_FS=y
|
||||
CONFIG_CUSE=m
|
||||
CONFIG_VIRTIO_FS=m
|
||||
CONFIG_OVERLAY_FS=m
|
||||
CONFIG_NETFS_STATS=y
|
||||
CONFIG_FSCACHE=m
|
||||
CONFIG_CACHEFILES=m
|
||||
CONFIG_ISO9660_FS=y
|
||||
@ -654,7 +662,6 @@ CONFIG_NFSD_V3_ACL=y
|
||||
CONFIG_NFSD_V4=y
|
||||
CONFIG_NFSD_V4_SECURITY_LABEL=y
|
||||
CONFIG_CIFS=m
|
||||
CONFIG_CIFS_STATS2=y
|
||||
CONFIG_CIFS_WEAK_PW_HASH=y
|
||||
CONFIG_CIFS_UPCALL=y
|
||||
CONFIG_CIFS_XATTR=y
|
||||
@ -682,6 +689,7 @@ CONFIG_SECURITY_SELINUX_BOOTPARAM=y
|
||||
CONFIG_SECURITY_SELINUX_DISABLE=y
|
||||
CONFIG_SECURITY_LOCKDOWN_LSM=y
|
||||
CONFIG_SECURITY_LOCKDOWN_LSM_EARLY=y
|
||||
CONFIG_SECURITY_LANDLOCK=y
|
||||
CONFIG_INTEGRITY_SIGNATURE=y
|
||||
CONFIG_INTEGRITY_ASYMMETRIC_KEYS=y
|
||||
CONFIG_IMA=y
|
||||
@ -696,6 +704,7 @@ CONFIG_CRYPTO_CRYPTD=m
|
||||
CONFIG_CRYPTO_TEST=m
|
||||
CONFIG_CRYPTO_DH=m
|
||||
CONFIG_CRYPTO_ECDH=m
|
||||
CONFIG_CRYPTO_ECDSA=m
|
||||
CONFIG_CRYPTO_ECRDSA=m
|
||||
CONFIG_CRYPTO_SM2=m
|
||||
CONFIG_CRYPTO_CURVE25519=m
|
||||
@ -843,7 +852,6 @@ CONFIG_FAULT_INJECTION_DEBUG_FS=y
|
||||
CONFIG_FAIL_FUNCTION=y
|
||||
CONFIG_FAULT_INJECTION_STACKTRACE_FILTER=y
|
||||
CONFIG_LKDTM=m
|
||||
CONFIG_TEST_LIST_SORT=y
|
||||
CONFIG_TEST_MIN_HEAP=y
|
||||
CONFIG_TEST_SORT=y
|
||||
CONFIG_KPROBES_SANITY_TEST=y
|
||||
@ -853,3 +861,4 @@ CONFIG_PERCPU_TEST=m
|
||||
CONFIG_ATOMIC64_SELFTEST=y
|
||||
CONFIG_TEST_BITOPS=m
|
||||
CONFIG_TEST_BPF=m
|
||||
CONFIG_TEST_LIVEPATCH=m
|
||||
|
@ -4,6 +4,11 @@ CONFIG_WATCH_QUEUE=y
|
||||
CONFIG_AUDIT=y
|
||||
CONFIG_NO_HZ_IDLE=y
|
||||
CONFIG_HIGH_RES_TIMERS=y
|
||||
CONFIG_BPF_SYSCALL=y
|
||||
CONFIG_BPF_JIT=y
|
||||
CONFIG_BPF_JIT_ALWAYS_ON=y
|
||||
CONFIG_BPF_LSM=y
|
||||
CONFIG_SCHED_CORE=y
|
||||
CONFIG_BSD_PROCESS_ACCT=y
|
||||
CONFIG_BSD_PROCESS_ACCT_V3=y
|
||||
CONFIG_TASKSTATS=y
|
||||
@ -26,14 +31,13 @@ CONFIG_CGROUP_DEVICE=y
|
||||
CONFIG_CGROUP_CPUACCT=y
|
||||
CONFIG_CGROUP_PERF=y
|
||||
CONFIG_CGROUP_BPF=y
|
||||
CONFIG_CGROUP_MISC=y
|
||||
CONFIG_NAMESPACES=y
|
||||
CONFIG_USER_NS=y
|
||||
CONFIG_CHECKPOINT_RESTORE=y
|
||||
CONFIG_SCHED_AUTOGROUP=y
|
||||
CONFIG_EXPERT=y
|
||||
# CONFIG_SYSFS_SYSCALL is not set
|
||||
CONFIG_BPF_LSM=y
|
||||
CONFIG_BPF_SYSCALL=y
|
||||
CONFIG_USERFAULTFD=y
|
||||
# CONFIG_COMPAT_BRK is not set
|
||||
CONFIG_PROFILING=y
|
||||
@ -70,6 +74,7 @@ CONFIG_BLK_DEV_THROTTLING=y
|
||||
CONFIG_BLK_WBT=y
|
||||
CONFIG_BLK_CGROUP_IOLATENCY=y
|
||||
CONFIG_BLK_CGROUP_IOCOST=y
|
||||
CONFIG_BLK_CGROUP_IOPRIO=y
|
||||
CONFIG_BLK_INLINE_ENCRYPTION=y
|
||||
CONFIG_BLK_INLINE_ENCRYPTION_FALLBACK=y
|
||||
CONFIG_PARTITION_ADVANCED=y
|
||||
@ -87,6 +92,7 @@ CONFIG_KSM=y
|
||||
CONFIG_TRANSPARENT_HUGEPAGE=y
|
||||
CONFIG_CLEANCACHE=y
|
||||
CONFIG_FRONTSWAP=y
|
||||
CONFIG_CMA_SYSFS=y
|
||||
CONFIG_CMA_AREAS=7
|
||||
CONFIG_MEM_SOFT_DIRTY=y
|
||||
CONFIG_ZSWAP=y
|
||||
@ -149,6 +155,7 @@ CONFIG_IPV6_RPL_LWTUNNEL=y
|
||||
CONFIG_MPTCP=y
|
||||
CONFIG_NETFILTER=y
|
||||
CONFIG_BRIDGE_NETFILTER=m
|
||||
CONFIG_NETFILTER_NETLINK_HOOK=m
|
||||
CONFIG_NF_CONNTRACK=m
|
||||
CONFIG_NF_CONNTRACK_SECMARK=y
|
||||
CONFIG_NF_CONNTRACK_EVENTS=y
|
||||
@ -271,6 +278,7 @@ CONFIG_IP_VS_FTP=m
|
||||
CONFIG_IP_VS_PE_SIP=m
|
||||
CONFIG_NFT_FIB_IPV4=m
|
||||
CONFIG_NF_TABLES_ARP=y
|
||||
CONFIG_NF_LOG_IPV4=m
|
||||
CONFIG_IP_NF_IPTABLES=m
|
||||
CONFIG_IP_NF_MATCH_AH=m
|
||||
CONFIG_IP_NF_MATCH_ECN=m
|
||||
@ -374,11 +382,10 @@ CONFIG_VSOCKETS=m
|
||||
CONFIG_VIRTIO_VSOCKETS=m
|
||||
CONFIG_NETLINK_DIAG=m
|
||||
CONFIG_CGROUP_NET_PRIO=y
|
||||
CONFIG_BPF_JIT=y
|
||||
CONFIG_NET_PKTGEN=m
|
||||
CONFIG_PCI=y
|
||||
CONFIG_PCI_IOV=y
|
||||
# CONFIG_PCIEASPM is not set
|
||||
CONFIG_PCI_IOV=y
|
||||
CONFIG_HOTPLUG_PCI=y
|
||||
CONFIG_HOTPLUG_PCI_S390=y
|
||||
CONFIG_UEVENT_HELPER=y
|
||||
@ -427,7 +434,7 @@ CONFIG_MD_MULTIPATH=m
|
||||
CONFIG_MD_FAULTY=m
|
||||
CONFIG_MD_CLUSTER=m
|
||||
CONFIG_BCACHE=m
|
||||
CONFIG_BLK_DEV_DM=m
|
||||
CONFIG_BLK_DEV_DM=y
|
||||
CONFIG_DM_UNSTRIPED=m
|
||||
CONFIG_DM_CRYPT=m
|
||||
CONFIG_DM_SNAPSHOT=m
|
||||
@ -444,6 +451,7 @@ CONFIG_DM_MULTIPATH_ST=m
|
||||
CONFIG_DM_MULTIPATH_HST=m
|
||||
CONFIG_DM_MULTIPATH_IOA=m
|
||||
CONFIG_DM_DELAY=m
|
||||
CONFIG_DM_INIT=y
|
||||
CONFIG_DM_UEVENT=y
|
||||
CONFIG_DM_FLAKEY=m
|
||||
CONFIG_DM_VERITY=m
|
||||
@ -487,6 +495,7 @@ CONFIG_NLMON=m
|
||||
# CONFIG_NET_VENDOR_GOOGLE is not set
|
||||
# CONFIG_NET_VENDOR_HUAWEI is not set
|
||||
# CONFIG_NET_VENDOR_INTEL is not set
|
||||
# CONFIG_NET_VENDOR_MICROSOFT is not set
|
||||
# CONFIG_NET_VENDOR_MARVELL is not set
|
||||
CONFIG_MLX4_EN=m
|
||||
CONFIG_MLX5_CORE=m
|
||||
@ -543,7 +552,6 @@ CONFIG_INPUT_EVDEV=y
|
||||
CONFIG_LEGACY_PTY_COUNT=0
|
||||
CONFIG_VIRTIO_CONSOLE=m
|
||||
CONFIG_HW_RANDOM_VIRTIO=m
|
||||
CONFIG_RAW_DRIVER=m
|
||||
CONFIG_HANGCHECK_TIMER=m
|
||||
CONFIG_TN3270_FS=y
|
||||
# CONFIG_PTP_1588_CLOCK is not set
|
||||
@ -566,7 +574,6 @@ CONFIG_SYNC_FILE=y
|
||||
CONFIG_VFIO=m
|
||||
CONFIG_VFIO_PCI=m
|
||||
CONFIG_VFIO_MDEV=m
|
||||
CONFIG_VFIO_MDEV_DEVICE=m
|
||||
CONFIG_VIRTIO_PCI=m
|
||||
CONFIG_VIRTIO_BALLOON=m
|
||||
CONFIG_VIRTIO_INPUT=y
|
||||
@ -607,6 +614,7 @@ CONFIG_FUSE_FS=y
|
||||
CONFIG_CUSE=m
|
||||
CONFIG_VIRTIO_FS=m
|
||||
CONFIG_OVERLAY_FS=m
|
||||
CONFIG_NETFS_STATS=y
|
||||
CONFIG_FSCACHE=m
|
||||
CONFIG_CACHEFILES=m
|
||||
CONFIG_ISO9660_FS=y
|
||||
@ -642,7 +650,6 @@ CONFIG_NFSD_V3_ACL=y
|
||||
CONFIG_NFSD_V4=y
|
||||
CONFIG_NFSD_V4_SECURITY_LABEL=y
|
||||
CONFIG_CIFS=m
|
||||
CONFIG_CIFS_STATS2=y
|
||||
CONFIG_CIFS_WEAK_PW_HASH=y
|
||||
CONFIG_CIFS_UPCALL=y
|
||||
CONFIG_CIFS_XATTR=y
|
||||
@ -669,6 +676,7 @@ CONFIG_SECURITY_SELINUX_BOOTPARAM=y
|
||||
CONFIG_SECURITY_SELINUX_DISABLE=y
|
||||
CONFIG_SECURITY_LOCKDOWN_LSM=y
|
||||
CONFIG_SECURITY_LOCKDOWN_LSM_EARLY=y
|
||||
CONFIG_SECURITY_LANDLOCK=y
|
||||
CONFIG_INTEGRITY_SIGNATURE=y
|
||||
CONFIG_INTEGRITY_ASYMMETRIC_KEYS=y
|
||||
CONFIG_IMA=y
|
||||
@ -684,6 +692,7 @@ CONFIG_CRYPTO_CRYPTD=m
|
||||
CONFIG_CRYPTO_TEST=m
|
||||
CONFIG_CRYPTO_DH=m
|
||||
CONFIG_CRYPTO_ECDH=m
|
||||
CONFIG_CRYPTO_ECDSA=m
|
||||
CONFIG_CRYPTO_ECRDSA=m
|
||||
CONFIG_CRYPTO_SM2=m
|
||||
CONFIG_CRYPTO_CURVE25519=m
|
||||
@ -754,6 +763,7 @@ CONFIG_CRC8=m
|
||||
CONFIG_DMA_CMA=y
|
||||
CONFIG_CMA_SIZE_MBYTES=0
|
||||
CONFIG_PRINTK_TIME=y
|
||||
CONFIG_DYNAMIC_DEBUG=y
|
||||
CONFIG_DEBUG_INFO=y
|
||||
CONFIG_DEBUG_INFO_DWARF4=y
|
||||
CONFIG_GDB_SCRIPTS=y
|
||||
@ -781,3 +791,4 @@ CONFIG_LKDTM=m
|
||||
CONFIG_PERCPU_TEST=m
|
||||
CONFIG_ATOMIC64_SELFTEST=y
|
||||
CONFIG_TEST_BPF=m
|
||||
CONFIG_TEST_LIVEPATCH=m
|
||||
|
@ -29,9 +29,9 @@ CONFIG_PARTITION_ADVANCED=y
|
||||
# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
|
||||
# CONFIG_COMPACTION is not set
|
||||
# CONFIG_MIGRATION is not set
|
||||
# CONFIG_BOUNCE is not set
|
||||
CONFIG_NET=y
|
||||
# CONFIG_IUCV is not set
|
||||
# CONFIG_PCPU_DEV_REFCNT is not set
|
||||
# CONFIG_ETHTOOL_NETLINK is not set
|
||||
CONFIG_DEVTMPFS=y
|
||||
CONFIG_BLK_DEV_RAM=y
|
||||
@ -51,7 +51,6 @@ CONFIG_ZFCP=y
|
||||
# CONFIG_SERIO is not set
|
||||
# CONFIG_HVC_IUCV is not set
|
||||
# CONFIG_HW_RANDOM_S390 is not set
|
||||
CONFIG_RAW_DRIVER=y
|
||||
# CONFIG_HMC_DRV is not set
|
||||
# CONFIG_S390_TAPE is not set
|
||||
# CONFIG_VMCP is not set
|
||||
|
@ -19,6 +19,7 @@ void ftrace_caller(void);
|
||||
|
||||
extern char ftrace_graph_caller_end;
|
||||
extern unsigned long ftrace_plt;
|
||||
extern void *ftrace_func;
|
||||
|
||||
struct dyn_arch_ftrace { };
|
||||
|
||||
|
@ -40,6 +40,7 @@
|
||||
* trampoline (ftrace_plt), which clobbers also r1.
|
||||
*/
|
||||
|
||||
void *ftrace_func __read_mostly = ftrace_stub;
|
||||
unsigned long ftrace_plt;
|
||||
|
||||
int ftrace_modify_call(struct dyn_ftrace *rec, unsigned long old_addr,
|
||||
@ -85,6 +86,7 @@ int ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr)
|
||||
|
||||
int ftrace_update_ftrace_func(ftrace_func_t func)
|
||||
{
|
||||
ftrace_func = func;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -59,13 +59,13 @@ ENTRY(ftrace_caller)
|
||||
#ifdef CONFIG_HAVE_MARCH_Z196_FEATURES
|
||||
aghik %r2,%r0,-MCOUNT_INSN_SIZE
|
||||
lgrl %r4,function_trace_op
|
||||
lgrl %r1,ftrace_trace_function
|
||||
lgrl %r1,ftrace_func
|
||||
#else
|
||||
lgr %r2,%r0
|
||||
aghi %r2,-MCOUNT_INSN_SIZE
|
||||
larl %r4,function_trace_op
|
||||
lg %r4,0(%r4)
|
||||
larl %r1,ftrace_trace_function
|
||||
larl %r1,ftrace_func
|
||||
lg %r1,0(%r1)
|
||||
#endif
|
||||
lgr %r3,%r14
|
||||
|
@ -745,7 +745,7 @@ static int __init cpumf_pmu_init(void)
|
||||
if (!cf_dbg) {
|
||||
pr_err("Registration of s390dbf(cpum_cf) failed\n");
|
||||
return -ENOMEM;
|
||||
};
|
||||
}
|
||||
debug_register_view(cf_dbg, &debug_sprintf_view);
|
||||
|
||||
cpumf_pmu.attr_groups = cpumf_cf_event_group();
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -29,6 +29,7 @@ $(targets:%=$(obj)/%.dbg): KBUILD_CFLAGS = $(KBUILD_CFLAGS_32)
|
||||
$(targets:%=$(obj)/%.dbg): KBUILD_AFLAGS = $(KBUILD_AFLAGS_32)
|
||||
|
||||
obj-y += vdso32_wrapper.o
|
||||
targets += vdso32.lds
|
||||
CPPFLAGS_vdso32.lds += -P -C -U$(ARCH)
|
||||
|
||||
# Disable gcov profiling, ubsan and kasan for VDSO code
|
||||
|
@ -112,7 +112,7 @@ static inline void reg_set_seen(struct bpf_jit *jit, u32 b1)
|
||||
{
|
||||
u32 r1 = reg2hex[b1];
|
||||
|
||||
if (!jit->seen_reg[r1] && r1 >= 6 && r1 <= 15)
|
||||
if (r1 >= 6 && r1 <= 15 && !jit->seen_reg[r1])
|
||||
jit->seen_reg[r1] = 1;
|
||||
}
|
||||
|
||||
|
@ -237,7 +237,7 @@ static void __init hv_smp_prepare_cpus(unsigned int max_cpus)
|
||||
for_each_present_cpu(i) {
|
||||
if (i == 0)
|
||||
continue;
|
||||
ret = hv_call_add_logical_proc(numa_cpu_node(i), i, i);
|
||||
ret = hv_call_add_logical_proc(numa_cpu_node(i), i, cpu_physical_id(i));
|
||||
BUG_ON(ret);
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
@ -682,7 +682,6 @@ int p4d_clear_huge(p4d_t *p4d)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if CONFIG_PGTABLE_LEVELS > 3
|
||||
/**
|
||||
* pud_set_huge - setup kernel PUD mapping
|
||||
*
|
||||
@ -721,23 +720,6 @@ int pud_set_huge(pud_t *pud, phys_addr_t addr, pgprot_t prot)
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* pud_clear_huge - clear kernel PUD mapping when it is set
|
||||
*
|
||||
* Returns 1 on success and 0 on failure (no PUD map is found).
|
||||
*/
|
||||
int pud_clear_huge(pud_t *pud)
|
||||
{
|
||||
if (pud_large(*pud)) {
|
||||
pud_clear(pud);
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if CONFIG_PGTABLE_LEVELS > 2
|
||||
/**
|
||||
* pmd_set_huge - setup kernel PMD mapping
|
||||
*
|
||||
@ -768,6 +750,21 @@ int pmd_set_huge(pmd_t *pmd, phys_addr_t addr, pgprot_t prot)
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* pud_clear_huge - clear kernel PUD mapping when it is set
|
||||
*
|
||||
* Returns 1 on success and 0 on failure (no PUD map is found).
|
||||
*/
|
||||
int pud_clear_huge(pud_t *pud)
|
||||
{
|
||||
if (pud_large(*pud)) {
|
||||
pud_clear(pud);
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* pmd_clear_huge - clear kernel PMD mapping when it is set
|
||||
*
|
||||
@ -782,7 +779,6 @@ int pmd_clear_huge(pmd_t *pmd)
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_X86_64
|
||||
/**
|
||||
|
@ -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,
|
||||
|
@ -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;
|
||||
|
@ -211,8 +211,8 @@ static struct sync_file *sync_file_merge(const char *name, struct sync_file *a,
|
||||
struct sync_file *b)
|
||||
{
|
||||
struct sync_file *sync_file;
|
||||
struct dma_fence **fences, **nfences, **a_fences, **b_fences;
|
||||
int i, i_a, i_b, num_fences, a_num_fences, b_num_fences;
|
||||
struct dma_fence **fences = NULL, **nfences, **a_fences, **b_fences;
|
||||
int i = 0, i_a, i_b, num_fences, a_num_fences, b_num_fences;
|
||||
|
||||
sync_file = sync_file_alloc();
|
||||
if (!sync_file)
|
||||
@ -236,7 +236,7 @@ static struct sync_file *sync_file_merge(const char *name, struct sync_file *a,
|
||||
* If a sync_file can only be created with sync_file_merge
|
||||
* and sync_file_create, this is a reasonable assumption.
|
||||
*/
|
||||
for (i = i_a = i_b = 0; i_a < a_num_fences && i_b < b_num_fences; ) {
|
||||
for (i_a = i_b = 0; i_a < a_num_fences && i_b < b_num_fences; ) {
|
||||
struct dma_fence *pt_a = a_fences[i_a];
|
||||
struct dma_fence *pt_b = b_fences[i_b];
|
||||
|
||||
@ -277,15 +277,16 @@ static struct sync_file *sync_file_merge(const char *name, struct sync_file *a,
|
||||
fences = nfences;
|
||||
}
|
||||
|
||||
if (sync_file_set_fence(sync_file, fences, i) < 0) {
|
||||
kfree(fences);
|
||||
if (sync_file_set_fence(sync_file, fences, i) < 0)
|
||||
goto err;
|
||||
}
|
||||
|
||||
strlcpy(sync_file->user_name, name, sizeof(sync_file->user_name));
|
||||
return sync_file;
|
||||
|
||||
err:
|
||||
while (i)
|
||||
dma_fence_put(fences[--i]);
|
||||
kfree(fences);
|
||||
fput(sync_file->file);
|
||||
return NULL;
|
||||
|
||||
|
@ -618,6 +618,7 @@ static int ipu_enable_channel(struct idmac *idmac, struct idmac_channel *ichan)
|
||||
case IDMAC_SDC_1:
|
||||
case IDMAC_IC_7:
|
||||
ipu_channel_set_priority(ipu, channel, true);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -978,6 +979,7 @@ static int ipu_init_channel(struct idmac *idmac, struct idmac_channel *ichan)
|
||||
case IDMAC_SDC_0:
|
||||
case IDMAC_SDC_1:
|
||||
n_desc = 4;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -813,6 +813,7 @@ inline bool is_buswidth_valid(u8 buswidth, bool is_mpc8308)
|
||||
case 16:
|
||||
if (is_mpc8308)
|
||||
return false;
|
||||
break;
|
||||
case 1:
|
||||
case 2:
|
||||
case 4:
|
||||
|
@ -4948,6 +4948,7 @@ static int setup_resources(struct udma_dev *ud)
|
||||
ud->tchan_cnt),
|
||||
ud->rchan_cnt - bitmap_weight(ud->rchan_map,
|
||||
ud->rchan_cnt));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -271,7 +271,7 @@ config EDAC_PND2
|
||||
config EDAC_IGEN6
|
||||
tristate "Intel client SoC Integrated MC"
|
||||
depends on PCI && PCI_MMCONFIG && ARCH_HAVE_NMI_SAFE_CMPXCHG
|
||||
depends on X64_64 && X86_MCE_INTEL
|
||||
depends on X86_64 && X86_MCE_INTEL
|
||||
help
|
||||
Support for error detection and correction on the Intel
|
||||
client SoC Integrated Memory Controller using In-Band ECC IP.
|
||||
|
@ -46,9 +46,6 @@ static int ffa_device_probe(struct device *dev)
|
||||
struct ffa_driver *ffa_drv = to_ffa_driver(dev->driver);
|
||||
struct ffa_device *ffa_dev = to_ffa_dev(dev);
|
||||
|
||||
if (!ffa_device_match(dev, dev->driver))
|
||||
return -ENODEV;
|
||||
|
||||
return ffa_drv->probe(ffa_dev);
|
||||
}
|
||||
|
||||
@ -99,6 +96,9 @@ int ffa_driver_register(struct ffa_driver *driver, struct module *owner,
|
||||
{
|
||||
int ret;
|
||||
|
||||
if (!driver->probe)
|
||||
return -EINVAL;
|
||||
|
||||
driver->driver.bus = &ffa_bus_type;
|
||||
driver->driver.name = driver->name;
|
||||
driver->driver.owner = owner;
|
||||
|
@ -120,7 +120,7 @@
|
||||
#define PACK_TARGET_INFO(s, r) \
|
||||
(FIELD_PREP(SENDER_ID_MASK, (s)) | FIELD_PREP(RECEIVER_ID_MASK, (r)))
|
||||
|
||||
/**
|
||||
/*
|
||||
* FF-A specification mentions explicitly about '4K pages'. This should
|
||||
* not be confused with the kernel PAGE_SIZE, which is the translation
|
||||
* granule kernel is configured and may be one among 4K, 16K and 64K.
|
||||
@ -149,8 +149,10 @@ static const int ffa_linux_errmap[] = {
|
||||
|
||||
static inline int ffa_to_linux_errno(int errno)
|
||||
{
|
||||
if (errno < FFA_RET_SUCCESS && errno >= -ARRAY_SIZE(ffa_linux_errmap))
|
||||
return ffa_linux_errmap[-errno];
|
||||
int err_idx = -errno;
|
||||
|
||||
if (err_idx >= 0 && err_idx < ARRAY_SIZE(ffa_linux_errmap))
|
||||
return ffa_linux_errmap[err_idx];
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
@ -104,11 +104,6 @@ static int scmi_dev_probe(struct device *dev)
|
||||
{
|
||||
struct scmi_driver *scmi_drv = to_scmi_driver(dev->driver);
|
||||
struct scmi_device *scmi_dev = to_scmi_dev(dev);
|
||||
const struct scmi_device_id *id;
|
||||
|
||||
id = scmi_dev_match_id(scmi_dev, scmi_drv);
|
||||
if (!id)
|
||||
return -ENODEV;
|
||||
|
||||
if (!scmi_dev->handle)
|
||||
return -EPROBE_DEFER;
|
||||
@ -139,6 +134,9 @@ int scmi_driver_register(struct scmi_driver *driver, struct module *owner,
|
||||
{
|
||||
int retval;
|
||||
|
||||
if (!driver->probe)
|
||||
return -EINVAL;
|
||||
|
||||
retval = scmi_protocol_device_request(driver->id_table);
|
||||
if (retval)
|
||||
return retval;
|
||||
|
@ -47,7 +47,6 @@ enum scmi_error_codes {
|
||||
SCMI_ERR_GENERIC = -8, /* Generic Error */
|
||||
SCMI_ERR_HARDWARE = -9, /* Hardware Error */
|
||||
SCMI_ERR_PROTOCOL = -10,/* Protocol Error */
|
||||
SCMI_ERR_MAX
|
||||
};
|
||||
|
||||
/* List of all SCMI devices active in system */
|
||||
@ -166,8 +165,10 @@ static const int scmi_linux_errmap[] = {
|
||||
|
||||
static inline int scmi_to_linux_errno(int errno)
|
||||
{
|
||||
if (errno < SCMI_SUCCESS && errno > SCMI_ERR_MAX)
|
||||
return scmi_linux_errmap[-errno];
|
||||
int err_idx = -errno;
|
||||
|
||||
if (err_idx >= SCMI_SUCCESS && err_idx < ARRAY_SIZE(scmi_linux_errmap))
|
||||
return scmi_linux_errmap[err_idx];
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
@ -1025,8 +1026,9 @@ static int __scmi_xfer_info_init(struct scmi_info *sinfo,
|
||||
const struct scmi_desc *desc = sinfo->desc;
|
||||
|
||||
/* Pre-allocated messages, no more than what hdr.seq can support */
|
||||
if (WARN_ON(desc->max_msg >= MSG_TOKEN_MAX)) {
|
||||
dev_err(dev, "Maximum message of %d exceeds supported %ld\n",
|
||||
if (WARN_ON(!desc->max_msg || desc->max_msg > MSG_TOKEN_MAX)) {
|
||||
dev_err(dev,
|
||||
"Invalid maximum messages %d, not in range [1 - %lu]\n",
|
||||
desc->max_msg, MSG_TOKEN_MAX);
|
||||
return -EINVAL;
|
||||
}
|
||||
@ -1137,6 +1139,8 @@ scmi_txrx_setup(struct scmi_info *info, struct device *dev, int prot_id)
|
||||
* @proto_id and @name: if device was still not existent it is created as a
|
||||
* child of the specified SCMI instance @info and its transport properly
|
||||
* initialized as usual.
|
||||
*
|
||||
* Return: A properly initialized scmi device, NULL otherwise.
|
||||
*/
|
||||
static inline struct scmi_device *
|
||||
scmi_get_protocol_device(struct device_node *np, struct scmi_info *info,
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user