mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-19 10:14:23 +08:00
Merge 'x86/urgent' into x86/cpu
... to resolve conflicting changes to arch/x86/kernel/apic/apic.c Signed-off-by: Borislav Petkov <bp@suse.de>
This commit is contained in:
commit
51485635eb
@ -142,10 +142,13 @@ ForEachMacros:
|
||||
- 'for_each_card_auxs'
|
||||
- 'for_each_card_auxs_safe'
|
||||
- 'for_each_card_components'
|
||||
- 'for_each_card_dapms'
|
||||
- 'for_each_card_pre_auxs'
|
||||
- 'for_each_card_prelinks'
|
||||
- 'for_each_card_rtds'
|
||||
- 'for_each_card_rtds_safe'
|
||||
- 'for_each_card_widgets'
|
||||
- 'for_each_card_widgets_safe'
|
||||
- 'for_each_cgroup_storage_type'
|
||||
- 'for_each_child_of_node'
|
||||
- 'for_each_clear_bit'
|
||||
@ -160,6 +163,7 @@ ForEachMacros:
|
||||
- 'for_each_cpu_and'
|
||||
- 'for_each_cpu_not'
|
||||
- 'for_each_cpu_wrap'
|
||||
- 'for_each_dapm_widgets'
|
||||
- 'for_each_dev_addr'
|
||||
- 'for_each_dev_scope'
|
||||
- 'for_each_displayid_db'
|
||||
@ -170,7 +174,6 @@ ForEachMacros:
|
||||
- 'for_each_dpcm_fe'
|
||||
- 'for_each_drhd_unit'
|
||||
- 'for_each_dss_dev'
|
||||
- 'for_each_efi_handle'
|
||||
- 'for_each_efi_memory_desc'
|
||||
- 'for_each_efi_memory_desc_in_map'
|
||||
- 'for_each_element'
|
||||
@ -191,6 +194,7 @@ ForEachMacros:
|
||||
- 'for_each_ip_tunnel_rcu'
|
||||
- 'for_each_irq_nr'
|
||||
- 'for_each_link_codecs'
|
||||
- 'for_each_link_cpus'
|
||||
- 'for_each_link_platforms'
|
||||
- 'for_each_lru'
|
||||
- 'for_each_matching_node'
|
||||
@ -250,6 +254,7 @@ ForEachMacros:
|
||||
- 'for_each_pci_bridge'
|
||||
- 'for_each_pci_dev'
|
||||
- 'for_each_pci_msi_entry'
|
||||
- 'for_each_pcm_streams'
|
||||
- 'for_each_populated_zone'
|
||||
- 'for_each_possible_cpu'
|
||||
- 'for_each_present_cpu'
|
||||
@ -260,9 +265,12 @@ ForEachMacros:
|
||||
- 'for_each_property_of_node'
|
||||
- 'for_each_registered_fb'
|
||||
- 'for_each_reserved_mem_region'
|
||||
- 'for_each_rtd_codec_dai'
|
||||
- 'for_each_rtd_codec_dai_rollback'
|
||||
- 'for_each_rtd_codec_dais'
|
||||
- 'for_each_rtd_codec_dais_rollback'
|
||||
- 'for_each_rtd_components'
|
||||
- 'for_each_rtd_cpu_dais'
|
||||
- 'for_each_rtd_cpu_dais_rollback'
|
||||
- 'for_each_rtd_dais'
|
||||
- 'for_each_set_bit'
|
||||
- 'for_each_set_bit_from'
|
||||
- 'for_each_set_clump8'
|
||||
@ -334,6 +342,7 @@ ForEachMacros:
|
||||
- 'klp_for_each_object'
|
||||
- 'klp_for_each_object_safe'
|
||||
- 'klp_for_each_object_static'
|
||||
- 'kunit_suite_for_each_test_case'
|
||||
- 'kvm_for_each_memslot'
|
||||
- 'kvm_for_each_vcpu'
|
||||
- 'list_for_each'
|
||||
@ -387,6 +396,7 @@ ForEachMacros:
|
||||
- 'of_property_for_each_string'
|
||||
- 'of_property_for_each_u32'
|
||||
- 'pci_bus_for_each_resource'
|
||||
- 'pcm_for_each_format'
|
||||
- 'ping_portaddr_for_each_entry'
|
||||
- 'plist_for_each'
|
||||
- 'plist_for_each_continue'
|
||||
@ -482,7 +492,7 @@ KeepEmptyLinesAtTheStartOfBlocks: false
|
||||
MacroBlockBegin: ''
|
||||
MacroBlockEnd: ''
|
||||
MaxEmptyLinesToKeep: 1
|
||||
NamespaceIndentation: Inner
|
||||
NamespaceIndentation: None
|
||||
#ObjCBinPackProtocolList: Auto # Unknown to clang-format-5.0
|
||||
ObjCBlockIndentWidth: 8
|
||||
ObjCSpaceAfterProperty: true
|
||||
|
@ -23,13 +23,14 @@ optional external memory-mapped interface.
|
||||
|
||||
Version 1 of the Activity Monitors architecture implements a counter group
|
||||
of four fixed and architecturally defined 64-bit event counters.
|
||||
- CPU cycle counter: increments at the frequency of the CPU.
|
||||
- Constant counter: increments at the fixed frequency of the system
|
||||
clock.
|
||||
- Instructions retired: increments with every architecturally executed
|
||||
instruction.
|
||||
- Memory stall cycles: counts instruction dispatch stall cycles caused by
|
||||
misses in the last level cache within the clock domain.
|
||||
|
||||
- CPU cycle counter: increments at the frequency of the CPU.
|
||||
- Constant counter: increments at the fixed frequency of the system
|
||||
clock.
|
||||
- Instructions retired: increments with every architecturally executed
|
||||
instruction.
|
||||
- Memory stall cycles: counts instruction dispatch stall cycles caused by
|
||||
misses in the last level cache within the clock domain.
|
||||
|
||||
When in WFI or WFE these counters do not increment.
|
||||
|
||||
@ -57,11 +58,12 @@ counters, only the presence of the extension.
|
||||
|
||||
Firmware (code running at higher exception levels, e.g. arm-tf) support is
|
||||
needed to:
|
||||
- Enable access for lower exception levels (EL2 and EL1) to the AMU
|
||||
registers.
|
||||
- Enable the counters. If not enabled these will read as 0.
|
||||
- Save/restore the counters before/after the CPU is being put/brought up
|
||||
from the 'off' power state.
|
||||
|
||||
- Enable access for lower exception levels (EL2 and EL1) to the AMU
|
||||
registers.
|
||||
- Enable the counters. If not enabled these will read as 0.
|
||||
- Save/restore the counters before/after the CPU is being put/brought up
|
||||
from the 'off' power state.
|
||||
|
||||
When using kernels that have this feature enabled but boot with broken
|
||||
firmware the user may experience panics or lockups when accessing the
|
||||
@ -78,10 +80,11 @@ are not trapped in EL2/EL3.
|
||||
|
||||
The fixed counters of AMUv1 are accessible though the following system
|
||||
register definitions:
|
||||
- SYS_AMEVCNTR0_CORE_EL0
|
||||
- SYS_AMEVCNTR0_CONST_EL0
|
||||
- SYS_AMEVCNTR0_INST_RET_EL0
|
||||
- SYS_AMEVCNTR0_MEM_STALL_EL0
|
||||
|
||||
- SYS_AMEVCNTR0_CORE_EL0
|
||||
- SYS_AMEVCNTR0_CONST_EL0
|
||||
- SYS_AMEVCNTR0_INST_RET_EL0
|
||||
- SYS_AMEVCNTR0_MEM_STALL_EL0
|
||||
|
||||
Auxiliary platform specific counters can be accessed using
|
||||
SYS_AMEVCNTR1_EL0(n), where n is a value between 0 and 15.
|
||||
@ -93,9 +96,10 @@ Userspace access
|
||||
----------------
|
||||
|
||||
Currently, access from userspace to the AMU registers is disabled due to:
|
||||
- Security reasons: they might expose information about code executed in
|
||||
secure mode.
|
||||
- Purpose: AMU counters are intended for system management use.
|
||||
|
||||
- Security reasons: they might expose information about code executed in
|
||||
secure mode.
|
||||
- Purpose: AMU counters are intended for system management use.
|
||||
|
||||
Also, the presence of the feature is not visible to userspace.
|
||||
|
||||
@ -105,8 +109,9 @@ Virtualization
|
||||
|
||||
Currently, access from userspace (EL0) and kernelspace (EL1) on the KVM
|
||||
guest side is disabled due to:
|
||||
- Security reasons: they might expose information about code executed
|
||||
by other guests or the host.
|
||||
|
||||
- Security reasons: they might expose information about code executed
|
||||
by other guests or the host.
|
||||
|
||||
Any attempt to access the AMU registers will result in an UNDEFINED
|
||||
exception being injected into the guest.
|
||||
|
@ -37,7 +37,6 @@ examples:
|
||||
dsi {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <0xff450000 0x1000>;
|
||||
|
||||
panel@0 {
|
||||
compatible = "leadtek,ltk500hd1829";
|
||||
|
@ -96,12 +96,20 @@ properties:
|
||||
If set, reverse the bit order described in the data mappings below on all
|
||||
data lanes, transmitting bits for slots 6 to 0 instead of 0 to 6.
|
||||
|
||||
port: true
|
||||
ports: true
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- data-mapping
|
||||
- width-mm
|
||||
- height-mm
|
||||
- panel-timing
|
||||
- port
|
||||
|
||||
oneOf:
|
||||
- required:
|
||||
- port
|
||||
- required:
|
||||
- ports
|
||||
|
||||
...
|
||||
|
@ -37,7 +37,6 @@ examples:
|
||||
dsi {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <0xff450000 0x1000>;
|
||||
|
||||
panel@0 {
|
||||
compatible = "xinpeng,xpp055c272";
|
||||
|
@ -56,6 +56,9 @@ properties:
|
||||
- const: tx
|
||||
- const: rx
|
||||
|
||||
power-domains:
|
||||
maxItems: 1
|
||||
|
||||
rockchip,capture-channels:
|
||||
allOf:
|
||||
- $ref: /schemas/types.yaml#/definitions/uint32
|
||||
|
@ -1,45 +0,0 @@
|
||||
* Rockchip SPDIF transceiver
|
||||
|
||||
The S/PDIF audio block is a stereo transceiver that allows the
|
||||
processor to receive and transmit digital audio via an coaxial cable or
|
||||
a fibre cable.
|
||||
|
||||
Required properties:
|
||||
|
||||
- compatible: should be one of the following:
|
||||
- "rockchip,rk3066-spdif"
|
||||
- "rockchip,rk3188-spdif"
|
||||
- "rockchip,rk3228-spdif"
|
||||
- "rockchip,rk3288-spdif"
|
||||
- "rockchip,rk3328-spdif"
|
||||
- "rockchip,rk3366-spdif"
|
||||
- "rockchip,rk3368-spdif"
|
||||
- "rockchip,rk3399-spdif"
|
||||
- reg: physical base address of the controller and length of memory mapped
|
||||
region.
|
||||
- interrupts: should contain the SPDIF interrupt.
|
||||
- dmas: DMA specifiers for tx dma. See the DMA client binding,
|
||||
Documentation/devicetree/bindings/dma/dma.txt
|
||||
- dma-names: should be "tx"
|
||||
- clocks: a list of phandle + clock-specifier pairs, one for each entry
|
||||
in clock-names.
|
||||
- clock-names: should contain following:
|
||||
- "hclk": clock for SPDIF controller
|
||||
- "mclk" : clock for SPDIF bus
|
||||
|
||||
Required properties on RK3288:
|
||||
- rockchip,grf: the phandle of the syscon node for the general register
|
||||
file (GRF)
|
||||
|
||||
Example for the rk3188 SPDIF controller:
|
||||
|
||||
spdif: spdif@1011e000 {
|
||||
compatible = "rockchip,rk3188-spdif", "rockchip,rk3066-spdif";
|
||||
reg = <0x1011e000 0x2000>;
|
||||
interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
|
||||
dmas = <&dmac1_s 8>;
|
||||
dma-names = "tx";
|
||||
clock-names = "hclk", "mclk";
|
||||
clocks = <&cru HCLK_SPDIF>, <&cru SCLK_SPDIF>;
|
||||
#sound-dai-cells = <0>;
|
||||
};
|
101
Documentation/devicetree/bindings/sound/rockchip-spdif.yaml
Normal file
101
Documentation/devicetree/bindings/sound/rockchip-spdif.yaml
Normal file
@ -0,0 +1,101 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/sound/rockchip-spdif.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Rockchip SPDIF transceiver
|
||||
|
||||
description:
|
||||
The S/PDIF audio block is a stereo transceiver that allows the
|
||||
processor to receive and transmit digital audio via a coaxial or
|
||||
fibre cable.
|
||||
|
||||
maintainers:
|
||||
- Heiko Stuebner <heiko@sntech.de>
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
oneOf:
|
||||
- const: rockchip,rk3066-spdif
|
||||
- const: rockchip,rk3228-spdif
|
||||
- const: rockchip,rk3328-spdif
|
||||
- const: rockchip,rk3366-spdif
|
||||
- const: rockchip,rk3368-spdif
|
||||
- const: rockchip,rk3399-spdif
|
||||
- items:
|
||||
- enum:
|
||||
- rockchip,rk3188-spdif
|
||||
- rockchip,rk3288-spdif
|
||||
- const: rockchip,rk3066-spdif
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
|
||||
clocks:
|
||||
items:
|
||||
- description: clock for SPDIF bus
|
||||
- description: clock for SPDIF controller
|
||||
|
||||
clock-names:
|
||||
items:
|
||||
- const: mclk
|
||||
- const: hclk
|
||||
|
||||
dmas:
|
||||
maxItems: 1
|
||||
|
||||
dma-names:
|
||||
const: tx
|
||||
|
||||
power-domains:
|
||||
maxItems: 1
|
||||
|
||||
rockchip,grf:
|
||||
$ref: /schemas/types.yaml#/definitions/phandle
|
||||
description:
|
||||
The phandle of the syscon node for the GRF register.
|
||||
Required property on RK3288.
|
||||
|
||||
"#sound-dai-cells":
|
||||
const: 0
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- interrupts
|
||||
- clocks
|
||||
- clock-names
|
||||
- dmas
|
||||
- dma-names
|
||||
- "#sound-dai-cells"
|
||||
|
||||
if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
const: rockchip,rk3288-spdif
|
||||
|
||||
then:
|
||||
required:
|
||||
- rockchip,grf
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/clock/rk3188-cru.h>
|
||||
#include <dt-bindings/interrupt-controller/arm-gic.h>
|
||||
spdif: spdif@1011e000 {
|
||||
compatible = "rockchip,rk3188-spdif", "rockchip,rk3066-spdif";
|
||||
reg = <0x1011e000 0x2000>;
|
||||
interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&cru SCLK_SPDIF>, <&cru HCLK_SPDIF>;
|
||||
clock-names = "mclk", "hclk";
|
||||
dmas = <&dmac1_s 8>;
|
||||
dma-names = "tx";
|
||||
#sound-dai-cells = <0>;
|
||||
};
|
@ -1241,7 +1241,8 @@ When kbuild executes, the following steps are followed (roughly):
|
||||
will be displayed with "make KBUILD_VERBOSE=0".
|
||||
|
||||
|
||||
--- 6.9 Preprocessing linker scripts
|
||||
6.9 Preprocessing linker scripts
|
||||
--------------------------------
|
||||
|
||||
When the vmlinux image is built, the linker script
|
||||
arch/$(ARCH)/kernel/vmlinux.lds is used.
|
||||
|
@ -983,6 +983,13 @@ ip_early_demux - BOOLEAN
|
||||
reduces overall throughput, in such case you should disable it.
|
||||
Default: 1
|
||||
|
||||
ping_group_range - 2 INTEGERS
|
||||
Restrict ICMP_PROTO datagram sockets to users in the group range.
|
||||
The default is "1 0", meaning, that nobody (not even root) may
|
||||
create ping sockets. Setting it to "100 100" would grant permissions
|
||||
to the single group. "0 4294967295" would enable it for the world, "100
|
||||
4294967295" would enable it for the users, but not daemons.
|
||||
|
||||
tcp_early_demux - BOOLEAN
|
||||
Enable early demux for established TCP sockets.
|
||||
Default: 1
|
||||
|
55
MAINTAINERS
55
MAINTAINERS
@ -189,7 +189,7 @@ F: drivers/net/hamradio/6pack.c
|
||||
M: Johannes Berg <johannes@sipsolutions.net>
|
||||
L: linux-wireless@vger.kernel.org
|
||||
S: Maintained
|
||||
W: http://wireless.kernel.org/
|
||||
W: https://wireless.wiki.kernel.org/
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211.git
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git
|
||||
F: Documentation/driver-api/80211/cfg80211.rst
|
||||
@ -505,7 +505,7 @@ F: drivers/hwmon/adm1029.c
|
||||
ADM8211 WIRELESS DRIVER
|
||||
L: linux-wireless@vger.kernel.org
|
||||
S: Orphan
|
||||
W: http://wireless.kernel.org/
|
||||
W: https://wireless.wiki.kernel.org/
|
||||
F: drivers/net/wireless/admtek/adm8211.*
|
||||
|
||||
ADP1653 FLASH CONTROLLER DRIVER
|
||||
@ -2850,14 +2850,14 @@ M: Nick Kossifidis <mickflemm@gmail.com>
|
||||
M: Luis Chamberlain <mcgrof@kernel.org>
|
||||
L: linux-wireless@vger.kernel.org
|
||||
S: Maintained
|
||||
W: http://wireless.kernel.org/en/users/Drivers/ath5k
|
||||
W: https://wireless.wiki.kernel.org/en/users/Drivers/ath5k
|
||||
F: drivers/net/wireless/ath/ath5k/
|
||||
|
||||
ATHEROS ATH6KL WIRELESS DRIVER
|
||||
M: Kalle Valo <kvalo@codeaurora.org>
|
||||
L: linux-wireless@vger.kernel.org
|
||||
S: Supported
|
||||
W: http://wireless.kernel.org/en/users/Drivers/ath6kl
|
||||
W: https://wireless.wiki.kernel.org/en/users/Drivers/ath6kl
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
|
||||
F: drivers/net/wireless/ath/ath6kl/
|
||||
|
||||
@ -3020,7 +3020,7 @@ B43 WIRELESS DRIVER
|
||||
L: linux-wireless@vger.kernel.org
|
||||
L: b43-dev@lists.infradead.org
|
||||
S: Odd Fixes
|
||||
W: http://wireless.kernel.org/en/users/Drivers/b43
|
||||
W: https://wireless.wiki.kernel.org/en/users/Drivers/b43
|
||||
F: drivers/net/wireless/broadcom/b43/
|
||||
|
||||
B43LEGACY WIRELESS DRIVER
|
||||
@ -3028,7 +3028,7 @@ M: Larry Finger <Larry.Finger@lwfinger.net>
|
||||
L: linux-wireless@vger.kernel.org
|
||||
L: b43-dev@lists.infradead.org
|
||||
S: Maintained
|
||||
W: http://wireless.kernel.org/en/users/Drivers/b43
|
||||
W: https://wireless.wiki.kernel.org/en/users/Drivers/b43
|
||||
F: drivers/net/wireless/broadcom/b43legacy/
|
||||
|
||||
BACKLIGHT CLASS/SUBSYSTEM
|
||||
@ -3843,7 +3843,7 @@ CARL9170 LINUX COMMUNITY WIRELESS DRIVER
|
||||
M: Christian Lamparter <chunkeey@googlemail.com>
|
||||
L: linux-wireless@vger.kernel.org
|
||||
S: Maintained
|
||||
W: http://wireless.kernel.org/en/users/Drivers/carl9170
|
||||
W: https://wireless.wiki.kernel.org/en/users/Drivers/carl9170
|
||||
F: drivers/net/wireless/ath/carl9170/
|
||||
|
||||
CAVIUM I2C DRIVER
|
||||
@ -5176,6 +5176,7 @@ S: Maintained
|
||||
F: drivers/soc/fsl/dpio
|
||||
|
||||
DPAA2 ETHERNET DRIVER
|
||||
M: Ioana Ciornei <ioana.ciornei@nxp.com>
|
||||
M: Ioana Radulescu <ruxandra.radulescu@nxp.com>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Maintained
|
||||
@ -9329,6 +9330,7 @@ M: Christian Borntraeger <borntraeger@de.ibm.com>
|
||||
M: Janosch Frank <frankja@linux.ibm.com>
|
||||
R: David Hildenbrand <david@redhat.com>
|
||||
R: Cornelia Huck <cohuck@redhat.com>
|
||||
R: Claudio Imbrenda <imbrenda@linux.ibm.com>
|
||||
L: kvm@vger.kernel.org
|
||||
S: Supported
|
||||
W: http://www.ibm.com/developerworks/linux/linux390/
|
||||
@ -9416,6 +9418,13 @@ F: include/linux/keyctl.h
|
||||
F: include/uapi/linux/keyctl.h
|
||||
F: security/keys/
|
||||
|
||||
KFIFO
|
||||
M: Stefani Seibold <stefani@seibold.net>
|
||||
S: Maintained
|
||||
F: include/linux/kfifo.h
|
||||
F: lib/kfifo.c
|
||||
F: samples/kfifo/
|
||||
|
||||
KGDB / KDB /debug_core
|
||||
M: Jason Wessel <jason.wessel@windriver.com>
|
||||
M: Daniel Thompson <daniel.thompson@linaro.org>
|
||||
@ -10067,7 +10076,7 @@ MAC80211
|
||||
M: Johannes Berg <johannes@sipsolutions.net>
|
||||
L: linux-wireless@vger.kernel.org
|
||||
S: Maintained
|
||||
W: http://wireless.kernel.org/
|
||||
W: https://wireless.wiki.kernel.org/
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211.git
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git
|
||||
F: Documentation/networking/mac80211-injection.txt
|
||||
@ -10697,7 +10706,6 @@ MEDIATEK MT76 WIRELESS LAN DRIVER
|
||||
M: Felix Fietkau <nbd@nbd.name>
|
||||
M: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
|
||||
R: Ryder Lee <ryder.lee@mediatek.com>
|
||||
R: Roy Luo <royluo@google.com>
|
||||
L: linux-wireless@vger.kernel.org
|
||||
S: Maintained
|
||||
F: drivers/net/wireless/mediatek/mt76/
|
||||
@ -12648,7 +12656,7 @@ F: fs/orangefs/
|
||||
ORINOCO DRIVER
|
||||
L: linux-wireless@vger.kernel.org
|
||||
S: Orphan
|
||||
W: http://wireless.kernel.org/en/users/Drivers/orinoco
|
||||
W: https://wireless.wiki.kernel.org/en/users/Drivers/orinoco
|
||||
W: http://www.nongnu.org/orinoco/
|
||||
F: drivers/net/wireless/intersil/orinoco/
|
||||
|
||||
@ -12674,7 +12682,7 @@ P54 WIRELESS DRIVER
|
||||
M: Christian Lamparter <chunkeey@googlemail.com>
|
||||
L: linux-wireless@vger.kernel.org
|
||||
S: Maintained
|
||||
W: http://wireless.kernel.org/en/users/Drivers/p54
|
||||
W: https://wireless.wiki.kernel.org/en/users/Drivers/p54
|
||||
F: drivers/net/wireless/intersil/p54/
|
||||
|
||||
PACKING
|
||||
@ -13042,7 +13050,7 @@ F: drivers/pci/controller/pci-xgene-msi.c
|
||||
|
||||
PCI NATIVE HOST BRIDGE AND ENDPOINT DRIVERS
|
||||
M: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
|
||||
R: Andrew Murray <amurray@thegoodpenguin.co.uk>
|
||||
R: Rob Herring <robh@kernel.org>
|
||||
L: linux-pci@vger.kernel.org
|
||||
S: Supported
|
||||
Q: http://patchwork.ozlabs.org/project/linux-pci/list/
|
||||
@ -13595,7 +13603,7 @@ PRISM54 WIRELESS DRIVER
|
||||
M: Luis Chamberlain <mcgrof@kernel.org>
|
||||
L: linux-wireless@vger.kernel.org
|
||||
S: Obsolete
|
||||
W: http://wireless.kernel.org/en/users/Drivers/p54
|
||||
W: https://wireless.wiki.kernel.org/en/users/Drivers/p54
|
||||
F: drivers/net/wireless/intersil/prism54/
|
||||
|
||||
PROC FILESYSTEM
|
||||
@ -13936,7 +13944,7 @@ QUALCOMM ATHEROS ATH10K WIRELESS DRIVER
|
||||
M: Kalle Valo <kvalo@codeaurora.org>
|
||||
L: ath10k@lists.infradead.org
|
||||
S: Supported
|
||||
W: http://wireless.kernel.org/en/users/Drivers/ath10k
|
||||
W: https://wireless.wiki.kernel.org/en/users/Drivers/ath10k
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
|
||||
F: drivers/net/wireless/ath/ath10k/
|
||||
|
||||
@ -13951,7 +13959,7 @@ QUALCOMM ATHEROS ATH9K WIRELESS DRIVER
|
||||
M: QCA ath9k Development <ath9k-devel@qca.qualcomm.com>
|
||||
L: linux-wireless@vger.kernel.org
|
||||
S: Supported
|
||||
W: http://wireless.kernel.org/en/users/Drivers/ath9k
|
||||
W: https://wireless.wiki.kernel.org/en/users/Drivers/ath9k
|
||||
F: drivers/net/wireless/ath/ath9k/
|
||||
|
||||
QUALCOMM CAMERA SUBSYSTEM DRIVER
|
||||
@ -14048,13 +14056,12 @@ QUALCOMM WCN36XX WIRELESS DRIVER
|
||||
M: Kalle Valo <kvalo@codeaurora.org>
|
||||
L: wcn36xx@lists.infradead.org
|
||||
S: Supported
|
||||
W: http://wireless.kernel.org/en/users/Drivers/wcn36xx
|
||||
W: https://wireless.wiki.kernel.org/en/users/Drivers/wcn36xx
|
||||
T: git git://github.com/KrasnikovEugene/wcn36xx.git
|
||||
F: drivers/net/wireless/ath/wcn36xx/
|
||||
|
||||
QUANTENNA QTNFMAC WIRELESS DRIVER
|
||||
M: Igor Mitsyanko <imitsyanko@quantenna.com>
|
||||
M: Avinash Patil <avinashp@quantenna.com>
|
||||
M: Sergey Matyukevich <smatyukevich@quantenna.com>
|
||||
L: linux-wireless@vger.kernel.org
|
||||
S: Maintained
|
||||
@ -14276,7 +14283,7 @@ REALTEK WIRELESS DRIVER (rtlwifi family)
|
||||
M: Ping-Ke Shih <pkshih@realtek.com>
|
||||
L: linux-wireless@vger.kernel.org
|
||||
S: Maintained
|
||||
W: http://wireless.kernel.org/
|
||||
W: https://wireless.wiki.kernel.org/
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-testing.git
|
||||
F: drivers/net/wireless/realtek/rtlwifi/
|
||||
|
||||
@ -14411,7 +14418,7 @@ RFKILL
|
||||
M: Johannes Berg <johannes@sipsolutions.net>
|
||||
L: linux-wireless@vger.kernel.org
|
||||
S: Maintained
|
||||
W: http://wireless.kernel.org/
|
||||
W: https://wireless.wiki.kernel.org/
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211.git
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git
|
||||
F: Documentation/ABI/stable/sysfs-class-rfkill
|
||||
@ -14560,7 +14567,7 @@ F: drivers/media/dvb-frontends/rtl2832_sdr*
|
||||
RTL8180 WIRELESS DRIVER
|
||||
L: linux-wireless@vger.kernel.org
|
||||
S: Orphan
|
||||
W: http://wireless.kernel.org/
|
||||
W: https://wireless.wiki.kernel.org/
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-testing.git
|
||||
F: drivers/net/wireless/realtek/rtl818x/rtl8180/
|
||||
|
||||
@ -14570,7 +14577,7 @@ M: Hin-Tak Leung <htl10@users.sourceforge.net>
|
||||
M: Larry Finger <Larry.Finger@lwfinger.net>
|
||||
L: linux-wireless@vger.kernel.org
|
||||
S: Maintained
|
||||
W: http://wireless.kernel.org/
|
||||
W: https://wireless.wiki.kernel.org/
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-testing.git
|
||||
F: drivers/net/wireless/realtek/rtl818x/rtl8187/
|
||||
|
||||
@ -16925,8 +16932,8 @@ F: drivers/media/platform/ti-vpe/
|
||||
TI WILINK WIRELESS DRIVERS
|
||||
L: linux-wireless@vger.kernel.org
|
||||
S: Orphan
|
||||
W: http://wireless.kernel.org/en/users/Drivers/wl12xx
|
||||
W: http://wireless.kernel.org/en/users/Drivers/wl1251
|
||||
W: https://wireless.wiki.kernel.org/en/users/Drivers/wl12xx
|
||||
W: https://wireless.wiki.kernel.org/en/users/Drivers/wl1251
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/luca/wl12xx.git
|
||||
F: drivers/net/wireless/ti/
|
||||
F: include/linux/wl12xx.h
|
||||
@ -18208,7 +18215,7 @@ M: Maya Erez <merez@codeaurora.org>
|
||||
L: linux-wireless@vger.kernel.org
|
||||
L: wil6210@qti.qualcomm.com
|
||||
S: Supported
|
||||
W: http://wireless.kernel.org/en/users/Drivers/wil6210
|
||||
W: https://wireless.wiki.kernel.org/en/users/Drivers/wil6210
|
||||
F: drivers/net/wireless/ath/wil6210/
|
||||
|
||||
WIMAX STACK
|
||||
|
@ -3,7 +3,6 @@
|
||||
* Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
|
||||
*
|
||||
* Amit Bhor, Sameer Dhavale: Codito Technologies 2004
|
||||
|
||||
*/
|
||||
|
||||
#ifndef _ASM_ARC_MODULE_H
|
||||
@ -19,8 +18,4 @@ struct mod_arch_specific {
|
||||
const char *secstr;
|
||||
};
|
||||
|
||||
#define MODULE_PROC_FAMILY "ARC700"
|
||||
|
||||
#define MODULE_ARCH_VERMAGIC MODULE_PROC_FAMILY
|
||||
|
||||
#endif /* _ASM_ARC_MODULE_H */
|
||||
|
8
arch/arc/include/asm/vermagic.h
Normal file
8
arch/arc/include/asm/vermagic.h
Normal file
@ -0,0 +1,8 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
|
||||
#ifndef _ASM_VERMAGIC_H
|
||||
#define _ASM_VERMAGIC_H
|
||||
|
||||
#define MODULE_ARCH_VERMAGIC "ARC700"
|
||||
|
||||
#endif /* _ASM_VERMAGIC_H */
|
@ -14,6 +14,9 @@
|
||||
soc {
|
||||
firmware: firmware {
|
||||
compatible = "raspberrypi,bcm2835-firmware", "simple-bus";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
mboxes = <&mailbox>;
|
||||
dma-ranges;
|
||||
};
|
||||
|
@ -372,6 +372,7 @@
|
||||
"dsi0_ddr2",
|
||||
"dsi0_ddr";
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
aux: aux@7e215000 {
|
||||
|
@ -341,6 +341,11 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
/* RNG not directly accessible on N950/N9. */
|
||||
&rng_target {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&usb_otg_hs {
|
||||
interface-type = <0>;
|
||||
usb-phy = <&usb2_phy>;
|
||||
|
@ -37,30 +37,6 @@ struct mod_arch_specific {
|
||||
struct module;
|
||||
u32 get_module_plt(struct module *mod, unsigned long loc, Elf32_Addr val);
|
||||
|
||||
/*
|
||||
* Add the ARM architecture version to the version magic string
|
||||
*/
|
||||
#define MODULE_ARCH_VERMAGIC_ARMVSN "ARMv" __stringify(__LINUX_ARM_ARCH__) " "
|
||||
|
||||
/* Add __virt_to_phys patching state as well */
|
||||
#ifdef CONFIG_ARM_PATCH_PHYS_VIRT
|
||||
#define MODULE_ARCH_VERMAGIC_P2V "p2v8 "
|
||||
#else
|
||||
#define MODULE_ARCH_VERMAGIC_P2V ""
|
||||
#endif
|
||||
|
||||
/* Add instruction set architecture tag to distinguish ARM/Thumb kernels */
|
||||
#ifdef CONFIG_THUMB2_KERNEL
|
||||
#define MODULE_ARCH_VERMAGIC_ARMTHUMB "thumb2 "
|
||||
#else
|
||||
#define MODULE_ARCH_VERMAGIC_ARMTHUMB ""
|
||||
#endif
|
||||
|
||||
#define MODULE_ARCH_VERMAGIC \
|
||||
MODULE_ARCH_VERMAGIC_ARMVSN \
|
||||
MODULE_ARCH_VERMAGIC_ARMTHUMB \
|
||||
MODULE_ARCH_VERMAGIC_P2V
|
||||
|
||||
#ifdef CONFIG_THUMB2_KERNEL
|
||||
#define HAVE_ARCH_KALLSYMS_SYMBOL_VALUE
|
||||
static inline unsigned long kallsyms_symbol_value(const Elf_Sym *sym)
|
||||
|
31
arch/arm/include/asm/vermagic.h
Normal file
31
arch/arm/include/asm/vermagic.h
Normal file
@ -0,0 +1,31 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#ifndef _ASM_VERMAGIC_H
|
||||
#define _ASM_VERMAGIC_H
|
||||
|
||||
#include <linux/stringify.h>
|
||||
|
||||
/*
|
||||
* Add the ARM architecture version to the version magic string
|
||||
*/
|
||||
#define MODULE_ARCH_VERMAGIC_ARMVSN "ARMv" __stringify(__LINUX_ARM_ARCH__) " "
|
||||
|
||||
/* Add __virt_to_phys patching state as well */
|
||||
#ifdef CONFIG_ARM_PATCH_PHYS_VIRT
|
||||
#define MODULE_ARCH_VERMAGIC_P2V "p2v8 "
|
||||
#else
|
||||
#define MODULE_ARCH_VERMAGIC_P2V ""
|
||||
#endif
|
||||
|
||||
/* Add instruction set architecture tag to distinguish ARM/Thumb kernels */
|
||||
#ifdef CONFIG_THUMB2_KERNEL
|
||||
#define MODULE_ARCH_VERMAGIC_ARMTHUMB "thumb2 "
|
||||
#else
|
||||
#define MODULE_ARCH_VERMAGIC_ARMTHUMB ""
|
||||
#endif
|
||||
|
||||
#define MODULE_ARCH_VERMAGIC \
|
||||
MODULE_ARCH_VERMAGIC_ARMVSN \
|
||||
MODULE_ARCH_VERMAGIC_ARMTHUMB \
|
||||
MODULE_ARCH_VERMAGIC_P2V
|
||||
|
||||
#endif /* _ASM_VERMAGIC_H */
|
@ -91,8 +91,10 @@ AFLAGS_suspend-imx6.o :=-Wa,-march=armv7-a
|
||||
obj-$(CONFIG_SOC_IMX6) += suspend-imx6.o
|
||||
obj-$(CONFIG_SOC_IMX53) += suspend-imx53.o
|
||||
endif
|
||||
ifeq ($(CONFIG_ARM_CPU_SUSPEND),y)
|
||||
AFLAGS_resume-imx6.o :=-Wa,-march=armv7-a
|
||||
obj-$(CONFIG_SOC_IMX6) += resume-imx6.o
|
||||
endif
|
||||
obj-$(CONFIG_SOC_IMX6) += pm-imx6.o
|
||||
|
||||
obj-$(CONFIG_SOC_IMX1) += mach-imx1.o
|
||||
|
@ -7,8 +7,6 @@
|
||||
|
||||
#include <asm-generic/module.h>
|
||||
|
||||
#define MODULE_ARCH_VERMAGIC "aarch64"
|
||||
|
||||
#ifdef CONFIG_ARM64_MODULE_PLTS
|
||||
struct mod_plt_sec {
|
||||
int plt_shndx;
|
||||
|
@ -47,7 +47,7 @@ static inline void ptrauth_keys_init_user(struct ptrauth_keys_user *keys)
|
||||
get_random_bytes(&keys->apga, sizeof(keys->apga));
|
||||
}
|
||||
|
||||
#define __ptrauth_key_install(k, v) \
|
||||
#define __ptrauth_key_install_nosync(k, v) \
|
||||
do { \
|
||||
struct ptrauth_key __pki_v = (v); \
|
||||
write_sysreg_s(__pki_v.lo, SYS_ ## k ## KEYLO_EL1); \
|
||||
@ -62,8 +62,11 @@ static __always_inline void ptrauth_keys_init_kernel(struct ptrauth_keys_kernel
|
||||
|
||||
static __always_inline void ptrauth_keys_switch_kernel(struct ptrauth_keys_kernel *keys)
|
||||
{
|
||||
if (system_supports_address_auth())
|
||||
__ptrauth_key_install(APIA, keys->apia);
|
||||
if (!system_supports_address_auth())
|
||||
return;
|
||||
|
||||
__ptrauth_key_install_nosync(APIA, keys->apia);
|
||||
isb();
|
||||
}
|
||||
|
||||
extern int ptrauth_prctl_reset_keys(struct task_struct *tsk, unsigned long arg);
|
||||
|
10
arch/arm64/include/asm/vermagic.h
Normal file
10
arch/arm64/include/asm/vermagic.h
Normal file
@ -0,0 +1,10 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/*
|
||||
* Copyright (C) 2012 ARM Ltd.
|
||||
*/
|
||||
#ifndef _ASM_VERMAGIC_H
|
||||
#define _ASM_VERMAGIC_H
|
||||
|
||||
#define MODULE_ARCH_VERMAGIC "aarch64"
|
||||
|
||||
#endif /* _ASM_VERMAGIC_H */
|
2
arch/h8300/kernel/.gitignore
vendored
Normal file
2
arch/h8300/kernel/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
vmlinux.lds
|
@ -3,11 +3,11 @@
|
||||
* Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef _ASM_MODULE_H
|
||||
#define _ASM_MODULE_H
|
||||
#ifndef _ASM_VERMAGIC_H
|
||||
#define _ASM_VERMAGIC_H
|
||||
|
||||
#include <asm-generic/module.h>
|
||||
#include <linux/stringify.h>
|
||||
|
||||
#define MODULE_ARCH_VERMAGIC __stringify(PROCESSOR_MODEL_NAME) " "
|
||||
|
||||
#endif
|
||||
#endif /* _ASM_VERMAGIC_H */
|
@ -26,10 +26,6 @@ struct mod_arch_specific {
|
||||
unsigned int next_got_entry; /* index of next available got entry */
|
||||
};
|
||||
|
||||
#define MODULE_PROC_FAMILY "ia64"
|
||||
#define MODULE_ARCH_VERMAGIC MODULE_PROC_FAMILY \
|
||||
"gcc-" __stringify(__GNUC__) "." __stringify(__GNUC_MINOR__)
|
||||
|
||||
#define ARCH_SHF_SMALL SHF_IA_64_SHORT
|
||||
|
||||
#endif /* _ASM_IA64_MODULE_H */
|
||||
|
15
arch/ia64/include/asm/vermagic.h
Normal file
15
arch/ia64/include/asm/vermagic.h
Normal file
@ -0,0 +1,15 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
/*
|
||||
* Copyright (C) 2003 Hewlett-Packard Co
|
||||
* David Mosberger-Tang <davidm@hpl.hp.com>
|
||||
*/
|
||||
|
||||
#ifndef _ASM_VERMAGIC_H
|
||||
#define _ASM_VERMAGIC_H
|
||||
|
||||
#include <linux/stringify.h>
|
||||
|
||||
#define MODULE_ARCH_VERMAGIC "ia64" \
|
||||
"gcc-" __stringify(__GNUC__) "." __stringify(__GNUC_MINOR__)
|
||||
|
||||
#endif /* _ASM_VERMAGIC_H */
|
@ -83,65 +83,4 @@ search_module_dbetables(unsigned long addr)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_CPU_BMIPS
|
||||
#define MODULE_PROC_FAMILY "BMIPS "
|
||||
#elif defined CONFIG_CPU_MIPS32_R1
|
||||
#define MODULE_PROC_FAMILY "MIPS32_R1 "
|
||||
#elif defined CONFIG_CPU_MIPS32_R2
|
||||
#define MODULE_PROC_FAMILY "MIPS32_R2 "
|
||||
#elif defined CONFIG_CPU_MIPS32_R6
|
||||
#define MODULE_PROC_FAMILY "MIPS32_R6 "
|
||||
#elif defined CONFIG_CPU_MIPS64_R1
|
||||
#define MODULE_PROC_FAMILY "MIPS64_R1 "
|
||||
#elif defined CONFIG_CPU_MIPS64_R2
|
||||
#define MODULE_PROC_FAMILY "MIPS64_R2 "
|
||||
#elif defined CONFIG_CPU_MIPS64_R6
|
||||
#define MODULE_PROC_FAMILY "MIPS64_R6 "
|
||||
#elif defined CONFIG_CPU_R3000
|
||||
#define MODULE_PROC_FAMILY "R3000 "
|
||||
#elif defined CONFIG_CPU_TX39XX
|
||||
#define MODULE_PROC_FAMILY "TX39XX "
|
||||
#elif defined CONFIG_CPU_VR41XX
|
||||
#define MODULE_PROC_FAMILY "VR41XX "
|
||||
#elif defined CONFIG_CPU_R4X00
|
||||
#define MODULE_PROC_FAMILY "R4X00 "
|
||||
#elif defined CONFIG_CPU_TX49XX
|
||||
#define MODULE_PROC_FAMILY "TX49XX "
|
||||
#elif defined CONFIG_CPU_R5000
|
||||
#define MODULE_PROC_FAMILY "R5000 "
|
||||
#elif defined CONFIG_CPU_R5500
|
||||
#define MODULE_PROC_FAMILY "R5500 "
|
||||
#elif defined CONFIG_CPU_NEVADA
|
||||
#define MODULE_PROC_FAMILY "NEVADA "
|
||||
#elif defined CONFIG_CPU_R10000
|
||||
#define MODULE_PROC_FAMILY "R10000 "
|
||||
#elif defined CONFIG_CPU_RM7000
|
||||
#define MODULE_PROC_FAMILY "RM7000 "
|
||||
#elif defined CONFIG_CPU_SB1
|
||||
#define MODULE_PROC_FAMILY "SB1 "
|
||||
#elif defined CONFIG_CPU_LOONGSON32
|
||||
#define MODULE_PROC_FAMILY "LOONGSON32 "
|
||||
#elif defined CONFIG_CPU_LOONGSON2EF
|
||||
#define MODULE_PROC_FAMILY "LOONGSON2EF "
|
||||
#elif defined CONFIG_CPU_LOONGSON64
|
||||
#define MODULE_PROC_FAMILY "LOONGSON64 "
|
||||
#elif defined CONFIG_CPU_CAVIUM_OCTEON
|
||||
#define MODULE_PROC_FAMILY "OCTEON "
|
||||
#elif defined CONFIG_CPU_XLR
|
||||
#define MODULE_PROC_FAMILY "XLR "
|
||||
#elif defined CONFIG_CPU_XLP
|
||||
#define MODULE_PROC_FAMILY "XLP "
|
||||
#else
|
||||
#error MODULE_PROC_FAMILY undefined for your processor configuration
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_32BIT
|
||||
#define MODULE_KERNEL_TYPE "32BIT "
|
||||
#elif defined CONFIG_64BIT
|
||||
#define MODULE_KERNEL_TYPE "64BIT "
|
||||
#endif
|
||||
|
||||
#define MODULE_ARCH_VERMAGIC \
|
||||
MODULE_PROC_FAMILY MODULE_KERNEL_TYPE
|
||||
|
||||
#endif /* _ASM_MODULE_H */
|
||||
|
66
arch/mips/include/asm/vermagic.h
Normal file
66
arch/mips/include/asm/vermagic.h
Normal file
@ -0,0 +1,66 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#ifndef _ASM_VERMAGIC_H
|
||||
#define _ASM_VERMAGIC_H
|
||||
|
||||
#ifdef CONFIG_CPU_BMIPS
|
||||
#define MODULE_PROC_FAMILY "BMIPS "
|
||||
#elif defined CONFIG_CPU_MIPS32_R1
|
||||
#define MODULE_PROC_FAMILY "MIPS32_R1 "
|
||||
#elif defined CONFIG_CPU_MIPS32_R2
|
||||
#define MODULE_PROC_FAMILY "MIPS32_R2 "
|
||||
#elif defined CONFIG_CPU_MIPS32_R6
|
||||
#define MODULE_PROC_FAMILY "MIPS32_R6 "
|
||||
#elif defined CONFIG_CPU_MIPS64_R1
|
||||
#define MODULE_PROC_FAMILY "MIPS64_R1 "
|
||||
#elif defined CONFIG_CPU_MIPS64_R2
|
||||
#define MODULE_PROC_FAMILY "MIPS64_R2 "
|
||||
#elif defined CONFIG_CPU_MIPS64_R6
|
||||
#define MODULE_PROC_FAMILY "MIPS64_R6 "
|
||||
#elif defined CONFIG_CPU_R3000
|
||||
#define MODULE_PROC_FAMILY "R3000 "
|
||||
#elif defined CONFIG_CPU_TX39XX
|
||||
#define MODULE_PROC_FAMILY "TX39XX "
|
||||
#elif defined CONFIG_CPU_VR41XX
|
||||
#define MODULE_PROC_FAMILY "VR41XX "
|
||||
#elif defined CONFIG_CPU_R4X00
|
||||
#define MODULE_PROC_FAMILY "R4X00 "
|
||||
#elif defined CONFIG_CPU_TX49XX
|
||||
#define MODULE_PROC_FAMILY "TX49XX "
|
||||
#elif defined CONFIG_CPU_R5000
|
||||
#define MODULE_PROC_FAMILY "R5000 "
|
||||
#elif defined CONFIG_CPU_R5500
|
||||
#define MODULE_PROC_FAMILY "R5500 "
|
||||
#elif defined CONFIG_CPU_NEVADA
|
||||
#define MODULE_PROC_FAMILY "NEVADA "
|
||||
#elif defined CONFIG_CPU_R10000
|
||||
#define MODULE_PROC_FAMILY "R10000 "
|
||||
#elif defined CONFIG_CPU_RM7000
|
||||
#define MODULE_PROC_FAMILY "RM7000 "
|
||||
#elif defined CONFIG_CPU_SB1
|
||||
#define MODULE_PROC_FAMILY "SB1 "
|
||||
#elif defined CONFIG_CPU_LOONGSON32
|
||||
#define MODULE_PROC_FAMILY "LOONGSON32 "
|
||||
#elif defined CONFIG_CPU_LOONGSON2EF
|
||||
#define MODULE_PROC_FAMILY "LOONGSON2EF "
|
||||
#elif defined CONFIG_CPU_LOONGSON64
|
||||
#define MODULE_PROC_FAMILY "LOONGSON64 "
|
||||
#elif defined CONFIG_CPU_CAVIUM_OCTEON
|
||||
#define MODULE_PROC_FAMILY "OCTEON "
|
||||
#elif defined CONFIG_CPU_XLR
|
||||
#define MODULE_PROC_FAMILY "XLR "
|
||||
#elif defined CONFIG_CPU_XLP
|
||||
#define MODULE_PROC_FAMILY "XLP "
|
||||
#else
|
||||
#error MODULE_PROC_FAMILY undefined for your processor configuration
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_32BIT
|
||||
#define MODULE_KERNEL_TYPE "32BIT "
|
||||
#elif defined CONFIG_64BIT
|
||||
#define MODULE_KERNEL_TYPE "64BIT "
|
||||
#endif
|
||||
|
||||
#define MODULE_ARCH_VERMAGIC \
|
||||
MODULE_PROC_FAMILY MODULE_KERNEL_TYPE
|
||||
|
||||
#endif /* _ASM_VERMAGIC_H */
|
@ -1,11 +1,9 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
// Copyright (C) 2005-2017 Andes Technology Corporation
|
||||
|
||||
#ifndef _ASM_NDS32_MODULE_H
|
||||
#define _ASM_NDS32_MODULE_H
|
||||
|
||||
#include <asm-generic/module.h>
|
||||
#ifndef _ASM_VERMAGIC_H
|
||||
#define _ASM_VERMAGIC_H
|
||||
|
||||
#define MODULE_ARCH_VERMAGIC "NDS32v3"
|
||||
|
||||
#endif /* _ASM_NDS32_MODULE_H */
|
||||
#endif /* _ASM_VERMAGIC_H */
|
@ -3,28 +3,10 @@
|
||||
#define _ASM_POWERPC_MODULE_H
|
||||
#ifdef __KERNEL__
|
||||
|
||||
/*
|
||||
*/
|
||||
|
||||
#include <linux/list.h>
|
||||
#include <asm/bug.h>
|
||||
#include <asm-generic/module.h>
|
||||
|
||||
|
||||
#ifdef CONFIG_MPROFILE_KERNEL
|
||||
#define MODULE_ARCH_VERMAGIC_FTRACE "mprofile-kernel "
|
||||
#else
|
||||
#define MODULE_ARCH_VERMAGIC_FTRACE ""
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_RELOCATABLE
|
||||
#define MODULE_ARCH_VERMAGIC_RELOCATABLE "relocatable "
|
||||
#else
|
||||
#define MODULE_ARCH_VERMAGIC_RELOCATABLE ""
|
||||
#endif
|
||||
|
||||
#define MODULE_ARCH_VERMAGIC MODULE_ARCH_VERMAGIC_FTRACE MODULE_ARCH_VERMAGIC_RELOCATABLE
|
||||
|
||||
#ifndef __powerpc64__
|
||||
/*
|
||||
* Thanks to Paul M for explaining this.
|
||||
|
20
arch/powerpc/include/asm/vermagic.h
Normal file
20
arch/powerpc/include/asm/vermagic.h
Normal file
@ -0,0 +1,20 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#ifndef _ASM_VERMAGIC_H
|
||||
#define _ASM_VERMAGIC_H
|
||||
|
||||
#ifdef CONFIG_MPROFILE_KERNEL
|
||||
#define MODULE_ARCH_VERMAGIC_FTRACE "mprofile-kernel "
|
||||
#else
|
||||
#define MODULE_ARCH_VERMAGIC_FTRACE ""
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_RELOCATABLE
|
||||
#define MODULE_ARCH_VERMAGIC_RELOCATABLE "relocatable "
|
||||
#else
|
||||
#define MODULE_ARCH_VERMAGIC_RELOCATABLE ""
|
||||
#endif
|
||||
|
||||
#define MODULE_ARCH_VERMAGIC \
|
||||
MODULE_ARCH_VERMAGIC_FTRACE MODULE_ARCH_VERMAGIC_RELOCATABLE
|
||||
|
||||
#endif /* _ASM_VERMAGIC_H */
|
@ -604,18 +604,19 @@ int kvmppc_book3s_hv_page_fault(struct kvm_run *run, struct kvm_vcpu *vcpu,
|
||||
*/
|
||||
local_irq_disable();
|
||||
ptep = __find_linux_pte(vcpu->arch.pgdir, hva, NULL, &shift);
|
||||
pte = __pte(0);
|
||||
if (ptep)
|
||||
pte = *ptep;
|
||||
local_irq_enable();
|
||||
/*
|
||||
* If the PTE disappeared temporarily due to a THP
|
||||
* collapse, just return and let the guest try again.
|
||||
*/
|
||||
if (!ptep) {
|
||||
local_irq_enable();
|
||||
if (!pte_present(pte)) {
|
||||
if (page)
|
||||
put_page(page);
|
||||
return RESUME_GUEST;
|
||||
}
|
||||
pte = *ptep;
|
||||
local_irq_enable();
|
||||
hpa = pte_pfn(pte) << PAGE_SHIFT;
|
||||
pte_size = PAGE_SIZE;
|
||||
if (shift)
|
||||
|
@ -815,18 +815,19 @@ int kvmppc_book3s_instantiate_page(struct kvm_vcpu *vcpu,
|
||||
*/
|
||||
local_irq_disable();
|
||||
ptep = __find_linux_pte(vcpu->arch.pgdir, hva, NULL, &shift);
|
||||
pte = __pte(0);
|
||||
if (ptep)
|
||||
pte = *ptep;
|
||||
local_irq_enable();
|
||||
/*
|
||||
* If the PTE disappeared temporarily due to a THP
|
||||
* collapse, just return and let the guest try again.
|
||||
*/
|
||||
if (!ptep) {
|
||||
local_irq_enable();
|
||||
if (!pte_present(pte)) {
|
||||
if (page)
|
||||
put_page(page);
|
||||
return RESUME_GUEST;
|
||||
}
|
||||
pte = *ptep;
|
||||
local_irq_enable();
|
||||
|
||||
/* If we're logging dirty pages, always map single pages */
|
||||
large_enable = !(memslot->flags & KVM_MEM_LOG_DIRTY_PAGES);
|
||||
|
@ -6,8 +6,6 @@
|
||||
|
||||
#include <asm-generic/module.h>
|
||||
|
||||
#define MODULE_ARCH_VERMAGIC "riscv"
|
||||
|
||||
struct module;
|
||||
unsigned long module_emit_got_entry(struct module *mod, unsigned long val);
|
||||
unsigned long module_emit_plt_entry(struct module *mod, unsigned long val);
|
||||
|
9
arch/riscv/include/asm/vermagic.h
Normal file
9
arch/riscv/include/asm/vermagic.h
Normal file
@ -0,0 +1,9 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
/* Copyright (C) 2017 Andes Technology Corporation */
|
||||
|
||||
#ifndef _ASM_VERMAGIC_H
|
||||
#define _ASM_VERMAGIC_H
|
||||
|
||||
#define MODULE_ARCH_VERMAGIC "riscv"
|
||||
|
||||
#endif /* _ASM_VERMAGIC_H */
|
@ -393,7 +393,7 @@ static unsigned long deliverable_irqs(struct kvm_vcpu *vcpu)
|
||||
if (psw_mchk_disabled(vcpu))
|
||||
active_mask &= ~IRQ_PEND_MCHK_MASK;
|
||||
/* PV guest cpus can have a single interruption injected at a time. */
|
||||
if (kvm_s390_pv_cpu_is_protected(vcpu) &&
|
||||
if (kvm_s390_pv_cpu_get_handle(vcpu) &&
|
||||
vcpu->arch.sie_block->iictl != IICTL_CODE_NONE)
|
||||
active_mask &= ~(IRQ_PEND_EXT_II_MASK |
|
||||
IRQ_PEND_IO_MASK |
|
||||
|
@ -1939,6 +1939,9 @@ static int gfn_to_memslot_approx(struct kvm_memslots *slots, gfn_t gfn)
|
||||
start = slot + 1;
|
||||
}
|
||||
|
||||
if (start >= slots->used_slots)
|
||||
return slots->used_slots - 1;
|
||||
|
||||
if (gfn >= memslots[start].base_gfn &&
|
||||
gfn < memslots[start].base_gfn + memslots[start].npages) {
|
||||
atomic_set(&slots->lru_slot, start);
|
||||
|
@ -11,32 +11,4 @@ struct mod_arch_specific {
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_CPU_LITTLE_ENDIAN
|
||||
# ifdef CONFIG_CPU_SH2
|
||||
# define MODULE_PROC_FAMILY "SH2LE "
|
||||
# elif defined CONFIG_CPU_SH3
|
||||
# define MODULE_PROC_FAMILY "SH3LE "
|
||||
# elif defined CONFIG_CPU_SH4
|
||||
# define MODULE_PROC_FAMILY "SH4LE "
|
||||
# elif defined CONFIG_CPU_SH5
|
||||
# define MODULE_PROC_FAMILY "SH5LE "
|
||||
# else
|
||||
# error unknown processor family
|
||||
# endif
|
||||
#else
|
||||
# ifdef CONFIG_CPU_SH2
|
||||
# define MODULE_PROC_FAMILY "SH2BE "
|
||||
# elif defined CONFIG_CPU_SH3
|
||||
# define MODULE_PROC_FAMILY "SH3BE "
|
||||
# elif defined CONFIG_CPU_SH4
|
||||
# define MODULE_PROC_FAMILY "SH4BE "
|
||||
# elif defined CONFIG_CPU_SH5
|
||||
# define MODULE_PROC_FAMILY "SH5BE "
|
||||
# else
|
||||
# error unknown processor family
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#define MODULE_ARCH_VERMAGIC MODULE_PROC_FAMILY
|
||||
|
||||
#endif /* _ASM_SH_MODULE_H */
|
||||
|
34
arch/sh/include/asm/vermagic.h
Normal file
34
arch/sh/include/asm/vermagic.h
Normal file
@ -0,0 +1,34 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
|
||||
#ifndef _ASM_VERMAGIC_H
|
||||
#define _ASM_VERMAGIC_H
|
||||
|
||||
#ifdef CONFIG_CPU_LITTLE_ENDIAN
|
||||
# ifdef CONFIG_CPU_SH2
|
||||
# define MODULE_PROC_FAMILY "SH2LE "
|
||||
# elif defined CONFIG_CPU_SH3
|
||||
# define MODULE_PROC_FAMILY "SH3LE "
|
||||
# elif defined CONFIG_CPU_SH4
|
||||
# define MODULE_PROC_FAMILY "SH4LE "
|
||||
# elif defined CONFIG_CPU_SH5
|
||||
# define MODULE_PROC_FAMILY "SH5LE "
|
||||
# else
|
||||
# error unknown processor family
|
||||
# endif
|
||||
#else
|
||||
# ifdef CONFIG_CPU_SH2
|
||||
# define MODULE_PROC_FAMILY "SH2BE "
|
||||
# elif defined CONFIG_CPU_SH3
|
||||
# define MODULE_PROC_FAMILY "SH3BE "
|
||||
# elif defined CONFIG_CPU_SH4
|
||||
# define MODULE_PROC_FAMILY "SH4BE "
|
||||
# elif defined CONFIG_CPU_SH5
|
||||
# define MODULE_PROC_FAMILY "SH5BE "
|
||||
# else
|
||||
# error unknown processor family
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#define MODULE_ARCH_VERMAGIC MODULE_PROC_FAMILY
|
||||
|
||||
#endif /* _ASM_VERMAGIC_H */
|
@ -412,7 +412,7 @@ int arch_add_memory(int nid, u64 start, u64 size,
|
||||
unsigned long nr_pages = size >> PAGE_SHIFT;
|
||||
int ret;
|
||||
|
||||
if (WARN_ON_ONCE(params->pgprot.pgprot != PAGE_KERNEL.pgprot)
|
||||
if (WARN_ON_ONCE(params->pgprot.pgprot != PAGE_KERNEL.pgprot))
|
||||
return -EINVAL;
|
||||
|
||||
/* We only have ZONE_NORMAL, so this is easy.. */
|
||||
|
@ -140,6 +140,7 @@ export CFLAGS_vmlinux := $(LINK-y) $(LINK_WRAPS) $(LD_FLAGS_CMDLINE)
|
||||
# When cleaning we don't include .config, so we don't include
|
||||
# TT or skas makefiles and don't clean skas_ptregs.h.
|
||||
CLEAN_FILES += linux x.i gmon.out
|
||||
MRPROPER_DIRS += arch/$(SUBARCH)/include/generated
|
||||
|
||||
archclean:
|
||||
@find . \( -name '*.bb' -o -name '*.bbg' -o -name '*.da' \
|
||||
|
@ -149,7 +149,7 @@ config X86
|
||||
select HAVE_ARCH_TRACEHOOK
|
||||
select HAVE_ARCH_TRANSPARENT_HUGEPAGE
|
||||
select HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD if X86_64
|
||||
select HAVE_ARCH_USERFAULTFD_WP if USERFAULTFD
|
||||
select HAVE_ARCH_USERFAULTFD_WP if X86_64 && USERFAULTFD
|
||||
select HAVE_ARCH_VMAP_STACK if X86_64
|
||||
select HAVE_ARCH_WITHIN_STACK_FRAMES
|
||||
select HAVE_ASM_MODVERSIONS
|
||||
|
@ -98,13 +98,6 @@ For 32-bit we have the following conventions - kernel is built with
|
||||
#define SIZEOF_PTREGS 21*8
|
||||
|
||||
.macro PUSH_AND_CLEAR_REGS rdx=%rdx rax=%rax save_ret=0
|
||||
/*
|
||||
* Push registers and sanitize registers of values that a
|
||||
* speculation attack might otherwise want to exploit. The
|
||||
* lower registers are likely clobbered well before they
|
||||
* could be put to use in a speculative execution gadget.
|
||||
* Interleave XOR with PUSH for better uop scheduling:
|
||||
*/
|
||||
.if \save_ret
|
||||
pushq %rsi /* pt_regs->si */
|
||||
movq 8(%rsp), %rsi /* temporarily store the return address in %rsi */
|
||||
@ -114,34 +107,43 @@ For 32-bit we have the following conventions - kernel is built with
|
||||
pushq %rsi /* pt_regs->si */
|
||||
.endif
|
||||
pushq \rdx /* pt_regs->dx */
|
||||
xorl %edx, %edx /* nospec dx */
|
||||
pushq %rcx /* pt_regs->cx */
|
||||
xorl %ecx, %ecx /* nospec cx */
|
||||
pushq \rax /* pt_regs->ax */
|
||||
pushq %r8 /* pt_regs->r8 */
|
||||
xorl %r8d, %r8d /* nospec r8 */
|
||||
pushq %r9 /* pt_regs->r9 */
|
||||
xorl %r9d, %r9d /* nospec r9 */
|
||||
pushq %r10 /* pt_regs->r10 */
|
||||
xorl %r10d, %r10d /* nospec r10 */
|
||||
pushq %r11 /* pt_regs->r11 */
|
||||
xorl %r11d, %r11d /* nospec r11*/
|
||||
pushq %rbx /* pt_regs->rbx */
|
||||
xorl %ebx, %ebx /* nospec rbx*/
|
||||
pushq %rbp /* pt_regs->rbp */
|
||||
xorl %ebp, %ebp /* nospec rbp*/
|
||||
pushq %r12 /* pt_regs->r12 */
|
||||
xorl %r12d, %r12d /* nospec r12*/
|
||||
pushq %r13 /* pt_regs->r13 */
|
||||
xorl %r13d, %r13d /* nospec r13*/
|
||||
pushq %r14 /* pt_regs->r14 */
|
||||
xorl %r14d, %r14d /* nospec r14*/
|
||||
pushq %r15 /* pt_regs->r15 */
|
||||
xorl %r15d, %r15d /* nospec r15*/
|
||||
UNWIND_HINT_REGS
|
||||
|
||||
.if \save_ret
|
||||
pushq %rsi /* return address on top of stack */
|
||||
.endif
|
||||
|
||||
/*
|
||||
* Sanitize registers of values that a speculation attack might
|
||||
* otherwise want to exploit. The lower registers are likely clobbered
|
||||
* well before they could be put to use in a speculative execution
|
||||
* gadget.
|
||||
*/
|
||||
xorl %edx, %edx /* nospec dx */
|
||||
xorl %ecx, %ecx /* nospec cx */
|
||||
xorl %r8d, %r8d /* nospec r8 */
|
||||
xorl %r9d, %r9d /* nospec r9 */
|
||||
xorl %r10d, %r10d /* nospec r10 */
|
||||
xorl %r11d, %r11d /* nospec r11 */
|
||||
xorl %ebx, %ebx /* nospec rbx */
|
||||
xorl %ebp, %ebp /* nospec rbp */
|
||||
xorl %r12d, %r12d /* nospec r12 */
|
||||
xorl %r13d, %r13d /* nospec r13 */
|
||||
xorl %r14d, %r14d /* nospec r14 */
|
||||
xorl %r15d, %r15d /* nospec r15 */
|
||||
|
||||
.endm
|
||||
|
||||
.macro POP_REGS pop_rdi=1 skip_r11rcx=0
|
||||
|
@ -249,7 +249,6 @@ SYM_INNER_LABEL(entry_SYSCALL_64_after_hwframe, SYM_L_GLOBAL)
|
||||
*/
|
||||
syscall_return_via_sysret:
|
||||
/* rcx and r11 are already restored (see code above) */
|
||||
UNWIND_HINT_EMPTY
|
||||
POP_REGS pop_rdi=0 skip_r11rcx=1
|
||||
|
||||
/*
|
||||
@ -258,6 +257,7 @@ syscall_return_via_sysret:
|
||||
*/
|
||||
movq %rsp, %rdi
|
||||
movq PER_CPU_VAR(cpu_tss_rw + TSS_sp0), %rsp
|
||||
UNWIND_HINT_EMPTY
|
||||
|
||||
pushq RSP-RDI(%rdi) /* RSP */
|
||||
pushq (%rdi) /* RDI */
|
||||
@ -279,8 +279,7 @@ SYM_CODE_END(entry_SYSCALL_64)
|
||||
* %rdi: prev task
|
||||
* %rsi: next task
|
||||
*/
|
||||
SYM_CODE_START(__switch_to_asm)
|
||||
UNWIND_HINT_FUNC
|
||||
SYM_FUNC_START(__switch_to_asm)
|
||||
/*
|
||||
* Save callee-saved registers
|
||||
* This must match the order in inactive_task_frame
|
||||
@ -321,7 +320,7 @@ SYM_CODE_START(__switch_to_asm)
|
||||
popq %rbp
|
||||
|
||||
jmp __switch_to
|
||||
SYM_CODE_END(__switch_to_asm)
|
||||
SYM_FUNC_END(__switch_to_asm)
|
||||
|
||||
/*
|
||||
* A newly forked process directly context switches into this address.
|
||||
@ -512,7 +511,7 @@ SYM_CODE_END(spurious_entries_start)
|
||||
* +----------------------------------------------------+
|
||||
*/
|
||||
SYM_CODE_START(interrupt_entry)
|
||||
UNWIND_HINT_FUNC
|
||||
UNWIND_HINT_IRET_REGS offset=16
|
||||
ASM_CLAC
|
||||
cld
|
||||
|
||||
@ -544,9 +543,9 @@ SYM_CODE_START(interrupt_entry)
|
||||
pushq 5*8(%rdi) /* regs->eflags */
|
||||
pushq 4*8(%rdi) /* regs->cs */
|
||||
pushq 3*8(%rdi) /* regs->ip */
|
||||
UNWIND_HINT_IRET_REGS
|
||||
pushq 2*8(%rdi) /* regs->orig_ax */
|
||||
pushq 8(%rdi) /* return address */
|
||||
UNWIND_HINT_FUNC
|
||||
|
||||
movq (%rdi), %rdi
|
||||
jmp 2f
|
||||
@ -637,6 +636,7 @@ SYM_INNER_LABEL(swapgs_restore_regs_and_return_to_usermode, SYM_L_GLOBAL)
|
||||
*/
|
||||
movq %rsp, %rdi
|
||||
movq PER_CPU_VAR(cpu_tss_rw + TSS_sp0), %rsp
|
||||
UNWIND_HINT_EMPTY
|
||||
|
||||
/* Copy the IRET frame to the trampoline stack. */
|
||||
pushq 6*8(%rdi) /* SS */
|
||||
@ -1739,7 +1739,7 @@ SYM_CODE_START(rewind_stack_do_exit)
|
||||
|
||||
movq PER_CPU_VAR(cpu_current_top_of_stack), %rax
|
||||
leaq -PTREGS_SIZE(%rax), %rsp
|
||||
UNWIND_HINT_FUNC sp_offset=PTREGS_SIZE
|
||||
UNWIND_HINT_REGS
|
||||
|
||||
call do_exit
|
||||
SYM_CODE_END(rewind_stack_do_exit)
|
||||
|
@ -61,11 +61,12 @@ static inline bool arch_syscall_match_sym_name(const char *sym, const char *name
|
||||
{
|
||||
/*
|
||||
* Compare the symbol name with the system call name. Skip the
|
||||
* "__x64_sys", "__ia32_sys" or simple "sys" prefix.
|
||||
* "__x64_sys", "__ia32_sys", "__do_sys" or simple "sys" prefix.
|
||||
*/
|
||||
return !strcmp(sym + 3, name + 3) ||
|
||||
(!strncmp(sym, "__x64_", 6) && !strcmp(sym + 9, name + 3)) ||
|
||||
(!strncmp(sym, "__ia32_", 7) && !strcmp(sym + 10, name + 3));
|
||||
(!strncmp(sym, "__ia32_", 7) && !strcmp(sym + 10, name + 3)) ||
|
||||
(!strncmp(sym, "__do_sys", 8) && !strcmp(sym + 8, name + 3));
|
||||
}
|
||||
|
||||
#ifndef COMPILE_OFFSETS
|
||||
|
@ -13,64 +13,4 @@ struct mod_arch_specific {
|
||||
#endif
|
||||
};
|
||||
|
||||
#ifdef CONFIG_X86_64
|
||||
/* X86_64 does not define MODULE_PROC_FAMILY */
|
||||
#elif defined CONFIG_M486SX
|
||||
#define MODULE_PROC_FAMILY "486SX "
|
||||
#elif defined CONFIG_M486
|
||||
#define MODULE_PROC_FAMILY "486 "
|
||||
#elif defined CONFIG_M586
|
||||
#define MODULE_PROC_FAMILY "586 "
|
||||
#elif defined CONFIG_M586TSC
|
||||
#define MODULE_PROC_FAMILY "586TSC "
|
||||
#elif defined CONFIG_M586MMX
|
||||
#define MODULE_PROC_FAMILY "586MMX "
|
||||
#elif defined CONFIG_MCORE2
|
||||
#define MODULE_PROC_FAMILY "CORE2 "
|
||||
#elif defined CONFIG_MATOM
|
||||
#define MODULE_PROC_FAMILY "ATOM "
|
||||
#elif defined CONFIG_M686
|
||||
#define MODULE_PROC_FAMILY "686 "
|
||||
#elif defined CONFIG_MPENTIUMII
|
||||
#define MODULE_PROC_FAMILY "PENTIUMII "
|
||||
#elif defined CONFIG_MPENTIUMIII
|
||||
#define MODULE_PROC_FAMILY "PENTIUMIII "
|
||||
#elif defined CONFIG_MPENTIUMM
|
||||
#define MODULE_PROC_FAMILY "PENTIUMM "
|
||||
#elif defined CONFIG_MPENTIUM4
|
||||
#define MODULE_PROC_FAMILY "PENTIUM4 "
|
||||
#elif defined CONFIG_MK6
|
||||
#define MODULE_PROC_FAMILY "K6 "
|
||||
#elif defined CONFIG_MK7
|
||||
#define MODULE_PROC_FAMILY "K7 "
|
||||
#elif defined CONFIG_MK8
|
||||
#define MODULE_PROC_FAMILY "K8 "
|
||||
#elif defined CONFIG_MELAN
|
||||
#define MODULE_PROC_FAMILY "ELAN "
|
||||
#elif defined CONFIG_MCRUSOE
|
||||
#define MODULE_PROC_FAMILY "CRUSOE "
|
||||
#elif defined CONFIG_MEFFICEON
|
||||
#define MODULE_PROC_FAMILY "EFFICEON "
|
||||
#elif defined CONFIG_MWINCHIPC6
|
||||
#define MODULE_PROC_FAMILY "WINCHIPC6 "
|
||||
#elif defined CONFIG_MWINCHIP3D
|
||||
#define MODULE_PROC_FAMILY "WINCHIP3D "
|
||||
#elif defined CONFIG_MCYRIXIII
|
||||
#define MODULE_PROC_FAMILY "CYRIXIII "
|
||||
#elif defined CONFIG_MVIAC3_2
|
||||
#define MODULE_PROC_FAMILY "VIAC3-2 "
|
||||
#elif defined CONFIG_MVIAC7
|
||||
#define MODULE_PROC_FAMILY "VIAC7 "
|
||||
#elif defined CONFIG_MGEODEGX1
|
||||
#define MODULE_PROC_FAMILY "GEODEGX1 "
|
||||
#elif defined CONFIG_MGEODE_LX
|
||||
#define MODULE_PROC_FAMILY "GEODE "
|
||||
#else
|
||||
#error unknown processor family
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_X86_32
|
||||
# define MODULE_ARCH_VERMAGIC MODULE_PROC_FAMILY
|
||||
#endif
|
||||
|
||||
#endif /* _ASM_X86_MODULE_H */
|
||||
|
@ -237,27 +237,6 @@ enum ssb_mitigation {
|
||||
extern char __indirect_thunk_start[];
|
||||
extern char __indirect_thunk_end[];
|
||||
|
||||
/*
|
||||
* On VMEXIT we must ensure that no RSB predictions learned in the guest
|
||||
* can be followed in the host, by overwriting the RSB completely. Both
|
||||
* retpoline and IBRS mitigations for Spectre v2 need this; only on future
|
||||
* CPUs with IBRS_ALL *might* it be avoided.
|
||||
*/
|
||||
static inline void vmexit_fill_RSB(void)
|
||||
{
|
||||
#ifdef CONFIG_RETPOLINE
|
||||
unsigned long loops;
|
||||
|
||||
asm volatile (ANNOTATE_NOSPEC_ALTERNATIVE
|
||||
ALTERNATIVE("jmp 910f",
|
||||
__stringify(__FILL_RETURN_BUFFER(%0, RSB_CLEAR_LOOPS, %1)),
|
||||
X86_FEATURE_RETPOLINE)
|
||||
"910:"
|
||||
: "=r" (loops), ASM_CALL_CONSTRAINT
|
||||
: : "memory" );
|
||||
#endif
|
||||
}
|
||||
|
||||
static __always_inline
|
||||
void alternative_msr_write(unsigned int msr, u64 val, unsigned int feature)
|
||||
{
|
||||
|
@ -19,7 +19,7 @@ struct unwind_state {
|
||||
#if defined(CONFIG_UNWINDER_ORC)
|
||||
bool signal, full_regs;
|
||||
unsigned long sp, bp, ip;
|
||||
struct pt_regs *regs;
|
||||
struct pt_regs *regs, *prev_regs;
|
||||
#elif defined(CONFIG_UNWINDER_FRAME_POINTER)
|
||||
bool got_irq;
|
||||
unsigned long *bp, *orig_sp, ip;
|
||||
|
68
arch/x86/include/asm/vermagic.h
Normal file
68
arch/x86/include/asm/vermagic.h
Normal file
@ -0,0 +1,68 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
|
||||
#ifndef _ASM_VERMAGIC_H
|
||||
#define _ASM_VERMAGIC_H
|
||||
|
||||
#ifdef CONFIG_X86_64
|
||||
/* X86_64 does not define MODULE_PROC_FAMILY */
|
||||
#elif defined CONFIG_M486SX
|
||||
#define MODULE_PROC_FAMILY "486SX "
|
||||
#elif defined CONFIG_M486
|
||||
#define MODULE_PROC_FAMILY "486 "
|
||||
#elif defined CONFIG_M586
|
||||
#define MODULE_PROC_FAMILY "586 "
|
||||
#elif defined CONFIG_M586TSC
|
||||
#define MODULE_PROC_FAMILY "586TSC "
|
||||
#elif defined CONFIG_M586MMX
|
||||
#define MODULE_PROC_FAMILY "586MMX "
|
||||
#elif defined CONFIG_MCORE2
|
||||
#define MODULE_PROC_FAMILY "CORE2 "
|
||||
#elif defined CONFIG_MATOM
|
||||
#define MODULE_PROC_FAMILY "ATOM "
|
||||
#elif defined CONFIG_M686
|
||||
#define MODULE_PROC_FAMILY "686 "
|
||||
#elif defined CONFIG_MPENTIUMII
|
||||
#define MODULE_PROC_FAMILY "PENTIUMII "
|
||||
#elif defined CONFIG_MPENTIUMIII
|
||||
#define MODULE_PROC_FAMILY "PENTIUMIII "
|
||||
#elif defined CONFIG_MPENTIUMM
|
||||
#define MODULE_PROC_FAMILY "PENTIUMM "
|
||||
#elif defined CONFIG_MPENTIUM4
|
||||
#define MODULE_PROC_FAMILY "PENTIUM4 "
|
||||
#elif defined CONFIG_MK6
|
||||
#define MODULE_PROC_FAMILY "K6 "
|
||||
#elif defined CONFIG_MK7
|
||||
#define MODULE_PROC_FAMILY "K7 "
|
||||
#elif defined CONFIG_MK8
|
||||
#define MODULE_PROC_FAMILY "K8 "
|
||||
#elif defined CONFIG_MELAN
|
||||
#define MODULE_PROC_FAMILY "ELAN "
|
||||
#elif defined CONFIG_MCRUSOE
|
||||
#define MODULE_PROC_FAMILY "CRUSOE "
|
||||
#elif defined CONFIG_MEFFICEON
|
||||
#define MODULE_PROC_FAMILY "EFFICEON "
|
||||
#elif defined CONFIG_MWINCHIPC6
|
||||
#define MODULE_PROC_FAMILY "WINCHIPC6 "
|
||||
#elif defined CONFIG_MWINCHIP3D
|
||||
#define MODULE_PROC_FAMILY "WINCHIP3D "
|
||||
#elif defined CONFIG_MCYRIXIII
|
||||
#define MODULE_PROC_FAMILY "CYRIXIII "
|
||||
#elif defined CONFIG_MVIAC3_2
|
||||
#define MODULE_PROC_FAMILY "VIAC3-2 "
|
||||
#elif defined CONFIG_MVIAC7
|
||||
#define MODULE_PROC_FAMILY "VIAC7 "
|
||||
#elif defined CONFIG_MGEODEGX1
|
||||
#define MODULE_PROC_FAMILY "GEODEGX1 "
|
||||
#elif defined CONFIG_MGEODE_LX
|
||||
#define MODULE_PROC_FAMILY "GEODE "
|
||||
#else
|
||||
#error unknown processor family
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_X86_32
|
||||
# define MODULE_ARCH_VERMAGIC MODULE_PROC_FAMILY
|
||||
#else
|
||||
# define MODULE_ARCH_VERMAGIC ""
|
||||
#endif
|
||||
|
||||
#endif /* _ASM_VERMAGIC_H */
|
@ -352,8 +352,6 @@ static void __setup_APIC_LVTT(unsigned int clocks, int oneshot, int irqen)
|
||||
* According to Intel, MFENCE can do the serialization here.
|
||||
*/
|
||||
asm volatile("mfence" : : : "memory");
|
||||
|
||||
printk_once(KERN_DEBUG "TSC deadline timer enabled\n");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -546,7 +544,7 @@ static struct clock_event_device lapic_clockevent = {
|
||||
};
|
||||
static DEFINE_PER_CPU(struct clock_event_device, lapic_events);
|
||||
|
||||
static u32 hsx_deadline_rev(void)
|
||||
static __init u32 hsx_deadline_rev(void)
|
||||
{
|
||||
switch (boot_cpu_data.x86_stepping) {
|
||||
case 0x02: return 0x3a; /* EP */
|
||||
@ -556,7 +554,7 @@ static u32 hsx_deadline_rev(void)
|
||||
return ~0U;
|
||||
}
|
||||
|
||||
static u32 bdx_deadline_rev(void)
|
||||
static __init u32 bdx_deadline_rev(void)
|
||||
{
|
||||
switch (boot_cpu_data.x86_stepping) {
|
||||
case 0x02: return 0x00000011;
|
||||
@ -568,7 +566,7 @@ static u32 bdx_deadline_rev(void)
|
||||
return ~0U;
|
||||
}
|
||||
|
||||
static u32 skx_deadline_rev(void)
|
||||
static __init u32 skx_deadline_rev(void)
|
||||
{
|
||||
switch (boot_cpu_data.x86_stepping) {
|
||||
case 0x03: return 0x01000136;
|
||||
@ -581,7 +579,7 @@ static u32 skx_deadline_rev(void)
|
||||
return ~0U;
|
||||
}
|
||||
|
||||
static const struct x86_cpu_id deadline_match[] = {
|
||||
static const struct x86_cpu_id deadline_match[] __initconst = {
|
||||
X86_MATCH_INTEL_FAM6_MODEL( HASWELL_X, &hsx_deadline_rev),
|
||||
X86_MATCH_INTEL_FAM6_MODEL( BROADWELL_X, 0x0b000020),
|
||||
X86_MATCH_INTEL_FAM6_MODEL( BROADWELL_D, &bdx_deadline_rev),
|
||||
@ -603,18 +601,19 @@ static const struct x86_cpu_id deadline_match[] = {
|
||||
{},
|
||||
};
|
||||
|
||||
static void apic_check_deadline_errata(void)
|
||||
static __init bool apic_validate_deadline_timer(void)
|
||||
{
|
||||
const struct x86_cpu_id *m;
|
||||
u32 rev;
|
||||
|
||||
if (!boot_cpu_has(X86_FEATURE_TSC_DEADLINE_TIMER) ||
|
||||
boot_cpu_has(X86_FEATURE_HYPERVISOR))
|
||||
return;
|
||||
if (!boot_cpu_has(X86_FEATURE_TSC_DEADLINE_TIMER))
|
||||
return false;
|
||||
if (boot_cpu_has(X86_FEATURE_HYPERVISOR))
|
||||
return true;
|
||||
|
||||
m = x86_match_cpu(deadline_match);
|
||||
if (!m)
|
||||
return;
|
||||
return true;
|
||||
|
||||
/*
|
||||
* Function pointers will have the MSB set due to address layout,
|
||||
@ -626,11 +625,12 @@ static void apic_check_deadline_errata(void)
|
||||
rev = (u32)m->driver_data;
|
||||
|
||||
if (boot_cpu_data.microcode >= rev)
|
||||
return;
|
||||
return true;
|
||||
|
||||
setup_clear_cpu_cap(X86_FEATURE_TSC_DEADLINE_TIMER);
|
||||
pr_err(FW_BUG "TSC_DEADLINE disabled due to Errata; "
|
||||
"please update microcode to version: 0x%x (or later)\n", rev);
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -2092,7 +2092,8 @@ void __init init_apic_mappings(void)
|
||||
{
|
||||
unsigned int new_apicid;
|
||||
|
||||
apic_check_deadline_errata();
|
||||
if (apic_validate_deadline_timer())
|
||||
pr_debug("TSC deadline timer available\n");
|
||||
|
||||
if (x2apic_mode) {
|
||||
boot_cpu_physical_apicid = read_apic_id();
|
||||
|
@ -183,7 +183,8 @@ recursion_check:
|
||||
*/
|
||||
if (visit_mask) {
|
||||
if (*visit_mask & (1UL << info->type)) {
|
||||
printk_deferred_once(KERN_WARNING "WARNING: stack recursion on stack type %d\n", info->type);
|
||||
if (task == current)
|
||||
printk_deferred_once(KERN_WARNING "WARNING: stack recursion on stack type %d\n", info->type);
|
||||
goto unknown;
|
||||
}
|
||||
*visit_mask |= 1UL << info->type;
|
||||
|
@ -344,6 +344,9 @@ bad_address:
|
||||
if (IS_ENABLED(CONFIG_X86_32))
|
||||
goto the_end;
|
||||
|
||||
if (state->task != current)
|
||||
goto the_end;
|
||||
|
||||
if (state->regs) {
|
||||
printk_deferred_once(KERN_WARNING
|
||||
"WARNING: kernel stack regs at %p in %s:%d has bad 'bp' value %p\n",
|
||||
|
@ -8,19 +8,21 @@
|
||||
#include <asm/orc_lookup.h>
|
||||
|
||||
#define orc_warn(fmt, ...) \
|
||||
printk_deferred_once(KERN_WARNING pr_fmt("WARNING: " fmt), ##__VA_ARGS__)
|
||||
printk_deferred_once(KERN_WARNING "WARNING: " fmt, ##__VA_ARGS__)
|
||||
|
||||
#define orc_warn_current(args...) \
|
||||
({ \
|
||||
if (state->task == current) \
|
||||
orc_warn(args); \
|
||||
})
|
||||
|
||||
extern int __start_orc_unwind_ip[];
|
||||
extern int __stop_orc_unwind_ip[];
|
||||
extern struct orc_entry __start_orc_unwind[];
|
||||
extern struct orc_entry __stop_orc_unwind[];
|
||||
|
||||
static DEFINE_MUTEX(sort_mutex);
|
||||
int *cur_orc_ip_table = __start_orc_unwind_ip;
|
||||
struct orc_entry *cur_orc_table = __start_orc_unwind;
|
||||
|
||||
unsigned int lookup_num_blocks;
|
||||
bool orc_init;
|
||||
static bool orc_init __ro_after_init;
|
||||
static unsigned int lookup_num_blocks __ro_after_init;
|
||||
|
||||
static inline unsigned long orc_ip(const int *ip)
|
||||
{
|
||||
@ -142,9 +144,6 @@ static struct orc_entry *orc_find(unsigned long ip)
|
||||
{
|
||||
static struct orc_entry *orc;
|
||||
|
||||
if (!orc_init)
|
||||
return NULL;
|
||||
|
||||
if (ip == 0)
|
||||
return &null_orc_entry;
|
||||
|
||||
@ -189,6 +188,10 @@ static struct orc_entry *orc_find(unsigned long ip)
|
||||
|
||||
#ifdef CONFIG_MODULES
|
||||
|
||||
static DEFINE_MUTEX(sort_mutex);
|
||||
static int *cur_orc_ip_table = __start_orc_unwind_ip;
|
||||
static struct orc_entry *cur_orc_table = __start_orc_unwind;
|
||||
|
||||
static void orc_sort_swap(void *_a, void *_b, int size)
|
||||
{
|
||||
struct orc_entry *orc_a, *orc_b;
|
||||
@ -381,9 +384,38 @@ static bool deref_stack_iret_regs(struct unwind_state *state, unsigned long addr
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
* If state->regs is non-NULL, and points to a full pt_regs, just get the reg
|
||||
* value from state->regs.
|
||||
*
|
||||
* Otherwise, if state->regs just points to IRET regs, and the previous frame
|
||||
* had full regs, it's safe to get the value from the previous regs. This can
|
||||
* happen when early/late IRQ entry code gets interrupted by an NMI.
|
||||
*/
|
||||
static bool get_reg(struct unwind_state *state, unsigned int reg_off,
|
||||
unsigned long *val)
|
||||
{
|
||||
unsigned int reg = reg_off/8;
|
||||
|
||||
if (!state->regs)
|
||||
return false;
|
||||
|
||||
if (state->full_regs) {
|
||||
*val = ((unsigned long *)state->regs)[reg];
|
||||
return true;
|
||||
}
|
||||
|
||||
if (state->prev_regs) {
|
||||
*val = ((unsigned long *)state->prev_regs)[reg];
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool unwind_next_frame(struct unwind_state *state)
|
||||
{
|
||||
unsigned long ip_p, sp, orig_ip = state->ip, prev_sp = state->sp;
|
||||
unsigned long ip_p, sp, tmp, orig_ip = state->ip, prev_sp = state->sp;
|
||||
enum stack_type prev_type = state->stack_info.type;
|
||||
struct orc_entry *orc;
|
||||
bool indirect = false;
|
||||
@ -445,43 +477,39 @@ bool unwind_next_frame(struct unwind_state *state)
|
||||
break;
|
||||
|
||||
case ORC_REG_R10:
|
||||
if (!state->regs || !state->full_regs) {
|
||||
orc_warn("missing regs for base reg R10 at ip %pB\n",
|
||||
(void *)state->ip);
|
||||
if (!get_reg(state, offsetof(struct pt_regs, r10), &sp)) {
|
||||
orc_warn_current("missing R10 value at %pB\n",
|
||||
(void *)state->ip);
|
||||
goto err;
|
||||
}
|
||||
sp = state->regs->r10;
|
||||
break;
|
||||
|
||||
case ORC_REG_R13:
|
||||
if (!state->regs || !state->full_regs) {
|
||||
orc_warn("missing regs for base reg R13 at ip %pB\n",
|
||||
(void *)state->ip);
|
||||
if (!get_reg(state, offsetof(struct pt_regs, r13), &sp)) {
|
||||
orc_warn_current("missing R13 value at %pB\n",
|
||||
(void *)state->ip);
|
||||
goto err;
|
||||
}
|
||||
sp = state->regs->r13;
|
||||
break;
|
||||
|
||||
case ORC_REG_DI:
|
||||
if (!state->regs || !state->full_regs) {
|
||||
orc_warn("missing regs for base reg DI at ip %pB\n",
|
||||
(void *)state->ip);
|
||||
if (!get_reg(state, offsetof(struct pt_regs, di), &sp)) {
|
||||
orc_warn_current("missing RDI value at %pB\n",
|
||||
(void *)state->ip);
|
||||
goto err;
|
||||
}
|
||||
sp = state->regs->di;
|
||||
break;
|
||||
|
||||
case ORC_REG_DX:
|
||||
if (!state->regs || !state->full_regs) {
|
||||
orc_warn("missing regs for base reg DX at ip %pB\n",
|
||||
(void *)state->ip);
|
||||
if (!get_reg(state, offsetof(struct pt_regs, dx), &sp)) {
|
||||
orc_warn_current("missing DX value at %pB\n",
|
||||
(void *)state->ip);
|
||||
goto err;
|
||||
}
|
||||
sp = state->regs->dx;
|
||||
break;
|
||||
|
||||
default:
|
||||
orc_warn("unknown SP base reg %d for ip %pB\n",
|
||||
orc_warn("unknown SP base reg %d at %pB\n",
|
||||
orc->sp_reg, (void *)state->ip);
|
||||
goto err;
|
||||
}
|
||||
@ -504,44 +532,48 @@ bool unwind_next_frame(struct unwind_state *state)
|
||||
|
||||
state->sp = sp;
|
||||
state->regs = NULL;
|
||||
state->prev_regs = NULL;
|
||||
state->signal = false;
|
||||
break;
|
||||
|
||||
case ORC_TYPE_REGS:
|
||||
if (!deref_stack_regs(state, sp, &state->ip, &state->sp)) {
|
||||
orc_warn("can't dereference registers at %p for ip %pB\n",
|
||||
(void *)sp, (void *)orig_ip);
|
||||
orc_warn_current("can't access registers at %pB\n",
|
||||
(void *)orig_ip);
|
||||
goto err;
|
||||
}
|
||||
|
||||
state->regs = (struct pt_regs *)sp;
|
||||
state->prev_regs = NULL;
|
||||
state->full_regs = true;
|
||||
state->signal = true;
|
||||
break;
|
||||
|
||||
case ORC_TYPE_REGS_IRET:
|
||||
if (!deref_stack_iret_regs(state, sp, &state->ip, &state->sp)) {
|
||||
orc_warn("can't dereference iret registers at %p for ip %pB\n",
|
||||
(void *)sp, (void *)orig_ip);
|
||||
orc_warn_current("can't access iret registers at %pB\n",
|
||||
(void *)orig_ip);
|
||||
goto err;
|
||||
}
|
||||
|
||||
if (state->full_regs)
|
||||
state->prev_regs = state->regs;
|
||||
state->regs = (void *)sp - IRET_FRAME_OFFSET;
|
||||
state->full_regs = false;
|
||||
state->signal = true;
|
||||
break;
|
||||
|
||||
default:
|
||||
orc_warn("unknown .orc_unwind entry type %d for ip %pB\n",
|
||||
orc_warn("unknown .orc_unwind entry type %d at %pB\n",
|
||||
orc->type, (void *)orig_ip);
|
||||
break;
|
||||
goto err;
|
||||
}
|
||||
|
||||
/* Find BP: */
|
||||
switch (orc->bp_reg) {
|
||||
case ORC_REG_UNDEFINED:
|
||||
if (state->regs && state->full_regs)
|
||||
state->bp = state->regs->bp;
|
||||
if (get_reg(state, offsetof(struct pt_regs, bp), &tmp))
|
||||
state->bp = tmp;
|
||||
break;
|
||||
|
||||
case ORC_REG_PREV_SP:
|
||||
@ -564,8 +596,8 @@ bool unwind_next_frame(struct unwind_state *state)
|
||||
if (state->stack_info.type == prev_type &&
|
||||
on_stack(&state->stack_info, (void *)state->sp, sizeof(long)) &&
|
||||
state->sp <= prev_sp) {
|
||||
orc_warn("stack going in the wrong direction? ip=%pB\n",
|
||||
(void *)orig_ip);
|
||||
orc_warn_current("stack going in the wrong direction? at %pB\n",
|
||||
(void *)orig_ip);
|
||||
goto err;
|
||||
}
|
||||
|
||||
@ -585,6 +617,9 @@ EXPORT_SYMBOL_GPL(unwind_next_frame);
|
||||
void __unwind_start(struct unwind_state *state, struct task_struct *task,
|
||||
struct pt_regs *regs, unsigned long *first_frame)
|
||||
{
|
||||
if (!orc_init)
|
||||
goto done;
|
||||
|
||||
memset(state, 0, sizeof(*state));
|
||||
state->task = task;
|
||||
|
||||
@ -651,7 +686,7 @@ void __unwind_start(struct unwind_state *state, struct task_struct *task,
|
||||
/* Otherwise, skip ahead to the user-specified starting frame: */
|
||||
while (!unwind_done(state) &&
|
||||
(!on_stack(&state->stack_info, first_frame, sizeof(long)) ||
|
||||
state->sp <= (unsigned long)first_frame))
|
||||
state->sp < (unsigned long)first_frame))
|
||||
unwind_next_frame(state);
|
||||
|
||||
return;
|
||||
|
@ -3,6 +3,10 @@
|
||||
ccflags-y += -Iarch/x86/kvm
|
||||
ccflags-$(CONFIG_KVM_WERROR) += -Werror
|
||||
|
||||
ifeq ($(CONFIG_FRAME_POINTER),y)
|
||||
OBJECT_FILES_NON_STANDARD_vmenter.o := y
|
||||
endif
|
||||
|
||||
KVM := ../../../virt/kvm
|
||||
|
||||
kvm-y += $(KVM)/kvm_main.o $(KVM)/coalesced_mmio.o \
|
||||
|
@ -12,6 +12,7 @@
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/highmem.h>
|
||||
#include <linux/psp-sev.h>
|
||||
#include <linux/pagemap.h>
|
||||
#include <linux/swap.h>
|
||||
|
||||
#include "x86.h"
|
||||
@ -1117,7 +1118,7 @@ int __init sev_hardware_setup(void)
|
||||
/* Maximum number of encrypted guests supported simultaneously */
|
||||
max_sev_asid = cpuid_ecx(0x8000001F);
|
||||
|
||||
if (!max_sev_asid)
|
||||
if (!svm_sev_enabled())
|
||||
return 1;
|
||||
|
||||
/* Minimum ASID value that should be used for SEV guest */
|
||||
@ -1156,6 +1157,9 @@ err:
|
||||
|
||||
void sev_hardware_teardown(void)
|
||||
{
|
||||
if (!svm_sev_enabled())
|
||||
return;
|
||||
|
||||
bitmap_free(sev_asid_bitmap);
|
||||
bitmap_free(sev_reclaim_asid_bitmap);
|
||||
|
||||
|
@ -3276,7 +3276,7 @@ static void svm_cancel_injection(struct kvm_vcpu *vcpu)
|
||||
svm_complete_interrupts(svm);
|
||||
}
|
||||
|
||||
bool __svm_vcpu_run(unsigned long vmcb_pa, unsigned long *regs);
|
||||
void __svm_vcpu_run(unsigned long vmcb_pa, unsigned long *regs);
|
||||
|
||||
static void svm_vcpu_run(struct kvm_vcpu *vcpu)
|
||||
{
|
||||
@ -3330,13 +3330,8 @@ static void svm_vcpu_run(struct kvm_vcpu *vcpu)
|
||||
*/
|
||||
x86_spec_ctrl_set_guest(svm->spec_ctrl, svm->virt_spec_ctrl);
|
||||
|
||||
local_irq_enable();
|
||||
|
||||
__svm_vcpu_run(svm->vmcb_pa, (unsigned long *)&svm->vcpu.arch.regs);
|
||||
|
||||
/* Eliminate branch target predictions from guest mode */
|
||||
vmexit_fill_RSB();
|
||||
|
||||
#ifdef CONFIG_X86_64
|
||||
wrmsrl(MSR_GS_BASE, svm->host.gs_base);
|
||||
#else
|
||||
@ -3366,8 +3361,6 @@ static void svm_vcpu_run(struct kvm_vcpu *vcpu)
|
||||
|
||||
reload_tss(vcpu);
|
||||
|
||||
local_irq_disable();
|
||||
|
||||
x86_spec_ctrl_restore_host(svm->spec_ctrl, svm->virt_spec_ctrl);
|
||||
|
||||
vcpu->arch.cr2 = svm->vmcb->save.cr2;
|
||||
@ -3411,7 +3404,6 @@ static void svm_vcpu_run(struct kvm_vcpu *vcpu)
|
||||
|
||||
mark_all_clean(svm->vmcb);
|
||||
}
|
||||
STACK_FRAME_NON_STANDARD(svm_vcpu_run);
|
||||
|
||||
static void svm_load_mmu_pgd(struct kvm_vcpu *vcpu, unsigned long root)
|
||||
{
|
||||
|
@ -3,6 +3,7 @@
|
||||
#include <asm/asm.h>
|
||||
#include <asm/bitsperlong.h>
|
||||
#include <asm/kvm_vcpu_regs.h>
|
||||
#include <asm/nospec-branch.h>
|
||||
|
||||
#define WORD_SIZE (BITS_PER_LONG / 8)
|
||||
|
||||
@ -35,7 +36,6 @@
|
||||
*/
|
||||
SYM_FUNC_START(__svm_vcpu_run)
|
||||
push %_ASM_BP
|
||||
mov %_ASM_SP, %_ASM_BP
|
||||
#ifdef CONFIG_X86_64
|
||||
push %r15
|
||||
push %r14
|
||||
@ -78,6 +78,7 @@ SYM_FUNC_START(__svm_vcpu_run)
|
||||
pop %_ASM_AX
|
||||
|
||||
/* Enter guest mode */
|
||||
sti
|
||||
1: vmload %_ASM_AX
|
||||
jmp 3f
|
||||
2: cmpb $0, kvm_rebooting
|
||||
@ -99,6 +100,13 @@ SYM_FUNC_START(__svm_vcpu_run)
|
||||
ud2
|
||||
_ASM_EXTABLE(5b, 6b)
|
||||
7:
|
||||
cli
|
||||
|
||||
#ifdef CONFIG_RETPOLINE
|
||||
/* IMPORTANT: Stuff the RSB immediately after VM-Exit, before RET! */
|
||||
FILL_RETURN_BUFFER %_ASM_AX, RSB_CLEAR_LOOPS, X86_FEATURE_RETPOLINE
|
||||
#endif
|
||||
|
||||
/* "POP" @regs to RAX. */
|
||||
pop %_ASM_AX
|
||||
|
||||
|
@ -5533,8 +5533,25 @@ static bool nested_vmx_exit_handled_vmcs_access(struct kvm_vcpu *vcpu,
|
||||
return 1 & (b >> (field & 7));
|
||||
}
|
||||
|
||||
static bool nested_vmx_exit_handled_mtf(struct vmcs12 *vmcs12)
|
||||
{
|
||||
u32 entry_intr_info = vmcs12->vm_entry_intr_info_field;
|
||||
|
||||
if (nested_cpu_has_mtf(vmcs12))
|
||||
return true;
|
||||
|
||||
/*
|
||||
* An MTF VM-exit may be injected into the guest by setting the
|
||||
* interruption-type to 7 (other event) and the vector field to 0. Such
|
||||
* is the case regardless of the 'monitor trap flag' VM-execution
|
||||
* control.
|
||||
*/
|
||||
return entry_intr_info == (INTR_INFO_VALID_MASK
|
||||
| INTR_TYPE_OTHER_EVENT);
|
||||
}
|
||||
|
||||
/*
|
||||
* Return 1 if we should exit from L2 to L1 to handle an exit, or 0 if we
|
||||
* Return true if we should exit from L2 to L1 to handle an exit, or false if we
|
||||
* should handle it ourselves in L0 (and then continue L2). Only call this
|
||||
* when in is_guest_mode (L2).
|
||||
*/
|
||||
@ -5633,7 +5650,7 @@ bool nested_vmx_exit_reflected(struct kvm_vcpu *vcpu, u32 exit_reason)
|
||||
case EXIT_REASON_MWAIT_INSTRUCTION:
|
||||
return nested_cpu_has(vmcs12, CPU_BASED_MWAIT_EXITING);
|
||||
case EXIT_REASON_MONITOR_TRAP_FLAG:
|
||||
return nested_cpu_has_mtf(vmcs12);
|
||||
return nested_vmx_exit_handled_mtf(vmcs12);
|
||||
case EXIT_REASON_MONITOR_INSTRUCTION:
|
||||
return nested_cpu_has(vmcs12, CPU_BASED_MONITOR_EXITING);
|
||||
case EXIT_REASON_PAUSE_INSTRUCTION:
|
||||
|
@ -4572,7 +4572,7 @@ static int handle_rmode_exception(struct kvm_vcpu *vcpu,
|
||||
*/
|
||||
static void kvm_machine_check(void)
|
||||
{
|
||||
#if defined(CONFIG_X86_MCE) && defined(CONFIG_X86_64)
|
||||
#if defined(CONFIG_X86_MCE)
|
||||
struct pt_regs regs = {
|
||||
.cs = 3, /* Fake ring 3 no matter what the guest ran on */
|
||||
.flags = X86_EFLAGS_IF,
|
||||
|
@ -3060,6 +3060,17 @@ int kvm_get_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
|
||||
case MSR_IA32_PERF_CTL:
|
||||
case MSR_AMD64_DC_CFG:
|
||||
case MSR_F15H_EX_CFG:
|
||||
/*
|
||||
* Intel Sandy Bridge CPUs must support the RAPL (running average power
|
||||
* limit) MSRs. Just return 0, as we do not want to expose the host
|
||||
* data here. Do not conditionalize this on CPUID, as KVM does not do
|
||||
* so for existing CPU-specific MSRs.
|
||||
*/
|
||||
case MSR_RAPL_POWER_UNIT:
|
||||
case MSR_PP0_ENERGY_STATUS: /* Power plane 0 (core) */
|
||||
case MSR_PP1_ENERGY_STATUS: /* Power plane 1 (graphics uncore) */
|
||||
case MSR_PKG_ENERGY_STATUS: /* Total package */
|
||||
case MSR_DRAM_ENERGY_STATUS: /* DRAM controller */
|
||||
msr_info->data = 0;
|
||||
break;
|
||||
case MSR_F15H_PERF_CTL0 ... MSR_F15H_PERF_CTR5:
|
||||
@ -5049,10 +5060,13 @@ set_identity_unlock:
|
||||
r = -EFAULT;
|
||||
if (copy_from_user(&u.ps, argp, sizeof(u.ps)))
|
||||
goto out;
|
||||
mutex_lock(&kvm->lock);
|
||||
r = -ENXIO;
|
||||
if (!kvm->arch.vpit)
|
||||
goto out;
|
||||
goto set_pit_out;
|
||||
r = kvm_vm_ioctl_set_pit(kvm, &u.ps);
|
||||
set_pit_out:
|
||||
mutex_unlock(&kvm->lock);
|
||||
break;
|
||||
}
|
||||
case KVM_GET_PIT2: {
|
||||
@ -5072,10 +5086,13 @@ set_identity_unlock:
|
||||
r = -EFAULT;
|
||||
if (copy_from_user(&u.ps2, argp, sizeof(u.ps2)))
|
||||
goto out;
|
||||
mutex_lock(&kvm->lock);
|
||||
r = -ENXIO;
|
||||
if (!kvm->arch.vpit)
|
||||
goto out;
|
||||
goto set_pit2_out;
|
||||
r = kvm_vm_ioctl_set_pit2(kvm, &u.ps2);
|
||||
set_pit2_out:
|
||||
mutex_unlock(&kvm->lock);
|
||||
break;
|
||||
}
|
||||
case KVM_REINJECT_CONTROL: {
|
||||
|
@ -43,7 +43,8 @@ struct cpa_data {
|
||||
unsigned long pfn;
|
||||
unsigned int flags;
|
||||
unsigned int force_split : 1,
|
||||
force_static_prot : 1;
|
||||
force_static_prot : 1,
|
||||
force_flush_all : 1;
|
||||
struct page **pages;
|
||||
};
|
||||
|
||||
@ -355,10 +356,10 @@ static void cpa_flush(struct cpa_data *data, int cache)
|
||||
return;
|
||||
}
|
||||
|
||||
if (cpa->numpages <= tlb_single_page_flush_ceiling)
|
||||
on_each_cpu(__cpa_flush_tlb, cpa, 1);
|
||||
else
|
||||
if (cpa->force_flush_all || cpa->numpages > tlb_single_page_flush_ceiling)
|
||||
flush_tlb_all();
|
||||
else
|
||||
on_each_cpu(__cpa_flush_tlb, cpa, 1);
|
||||
|
||||
if (!cache)
|
||||
return;
|
||||
@ -1598,6 +1599,8 @@ static int cpa_process_alias(struct cpa_data *cpa)
|
||||
alias_cpa.flags &= ~(CPA_PAGES_ARRAY | CPA_ARRAY);
|
||||
alias_cpa.curpage = 0;
|
||||
|
||||
cpa->force_flush_all = 1;
|
||||
|
||||
ret = __change_page_attr_set_clr(&alias_cpa, 0);
|
||||
if (ret)
|
||||
return ret;
|
||||
@ -1618,6 +1621,7 @@ static int cpa_process_alias(struct cpa_data *cpa)
|
||||
alias_cpa.flags &= ~(CPA_PAGES_ARRAY | CPA_ARRAY);
|
||||
alias_cpa.curpage = 0;
|
||||
|
||||
cpa->force_flush_all = 1;
|
||||
/*
|
||||
* The high mapping range is imprecise, so ignore the
|
||||
* return value.
|
||||
|
@ -158,6 +158,19 @@ static bool is_ereg(u32 reg)
|
||||
BIT(BPF_REG_AX));
|
||||
}
|
||||
|
||||
/*
|
||||
* is_ereg_8l() == true if BPF register 'reg' is mapped to access x86-64
|
||||
* lower 8-bit registers dil,sil,bpl,spl,r8b..r15b, which need extra byte
|
||||
* of encoding. al,cl,dl,bl have simpler encoding.
|
||||
*/
|
||||
static bool is_ereg_8l(u32 reg)
|
||||
{
|
||||
return is_ereg(reg) ||
|
||||
(1 << reg) & (BIT(BPF_REG_1) |
|
||||
BIT(BPF_REG_2) |
|
||||
BIT(BPF_REG_FP));
|
||||
}
|
||||
|
||||
static bool is_axreg(u32 reg)
|
||||
{
|
||||
return reg == BPF_REG_0;
|
||||
@ -598,9 +611,8 @@ static void emit_stx(u8 **pprog, u32 size, u32 dst_reg, u32 src_reg, int off)
|
||||
switch (size) {
|
||||
case BPF_B:
|
||||
/* Emit 'mov byte ptr [rax + off], al' */
|
||||
if (is_ereg(dst_reg) || is_ereg(src_reg) ||
|
||||
/* We have to add extra byte for x86 SIL, DIL regs */
|
||||
src_reg == BPF_REG_1 || src_reg == BPF_REG_2)
|
||||
if (is_ereg(dst_reg) || is_ereg_8l(src_reg))
|
||||
/* Add extra byte for eregs or SIL,DIL,BPL in src_reg */
|
||||
EMIT2(add_2mod(0x40, dst_reg, src_reg), 0x88);
|
||||
else
|
||||
EMIT1(0x88);
|
||||
|
@ -1847,14 +1847,16 @@ static int do_jit(struct bpf_prog *bpf_prog, int *addrs, u8 *image,
|
||||
case BPF_B:
|
||||
case BPF_H:
|
||||
case BPF_W:
|
||||
if (!bpf_prog->aux->verifier_zext)
|
||||
if (bpf_prog->aux->verifier_zext)
|
||||
break;
|
||||
if (dstk) {
|
||||
EMIT3(0xC7, add_1reg(0x40, IA32_EBP),
|
||||
STACK_VAR(dst_hi));
|
||||
EMIT(0x0, 4);
|
||||
} else {
|
||||
EMIT3(0xC7, add_1reg(0xC0, dst_hi), 0);
|
||||
/* xor dst_hi,dst_hi */
|
||||
EMIT2(0x33,
|
||||
add_2reg(0xC0, dst_hi, dst_hi));
|
||||
}
|
||||
break;
|
||||
case BPF_DW:
|
||||
@ -2013,8 +2015,8 @@ static int do_jit(struct bpf_prog *bpf_prog, int *addrs, u8 *image,
|
||||
case BPF_JMP | BPF_JSET | BPF_X:
|
||||
case BPF_JMP32 | BPF_JSET | BPF_X: {
|
||||
bool is_jmp64 = BPF_CLASS(insn->code) == BPF_JMP;
|
||||
u8 dreg_lo = dstk ? IA32_EAX : dst_lo;
|
||||
u8 dreg_hi = dstk ? IA32_EDX : dst_hi;
|
||||
u8 dreg_lo = IA32_EAX;
|
||||
u8 dreg_hi = IA32_EDX;
|
||||
u8 sreg_lo = sstk ? IA32_ECX : src_lo;
|
||||
u8 sreg_hi = sstk ? IA32_EBX : src_hi;
|
||||
|
||||
@ -2026,6 +2028,13 @@ static int do_jit(struct bpf_prog *bpf_prog, int *addrs, u8 *image,
|
||||
add_2reg(0x40, IA32_EBP,
|
||||
IA32_EDX),
|
||||
STACK_VAR(dst_hi));
|
||||
} else {
|
||||
/* mov dreg_lo,dst_lo */
|
||||
EMIT2(0x89, add_2reg(0xC0, dreg_lo, dst_lo));
|
||||
if (is_jmp64)
|
||||
/* mov dreg_hi,dst_hi */
|
||||
EMIT2(0x89,
|
||||
add_2reg(0xC0, dreg_hi, dst_hi));
|
||||
}
|
||||
|
||||
if (sstk) {
|
||||
@ -2050,8 +2059,8 @@ static int do_jit(struct bpf_prog *bpf_prog, int *addrs, u8 *image,
|
||||
case BPF_JMP | BPF_JSET | BPF_K:
|
||||
case BPF_JMP32 | BPF_JSET | BPF_K: {
|
||||
bool is_jmp64 = BPF_CLASS(insn->code) == BPF_JMP;
|
||||
u8 dreg_lo = dstk ? IA32_EAX : dst_lo;
|
||||
u8 dreg_hi = dstk ? IA32_EDX : dst_hi;
|
||||
u8 dreg_lo = IA32_EAX;
|
||||
u8 dreg_hi = IA32_EDX;
|
||||
u8 sreg_lo = IA32_ECX;
|
||||
u8 sreg_hi = IA32_EBX;
|
||||
u32 hi;
|
||||
@ -2064,6 +2073,13 @@ static int do_jit(struct bpf_prog *bpf_prog, int *addrs, u8 *image,
|
||||
add_2reg(0x40, IA32_EBP,
|
||||
IA32_EDX),
|
||||
STACK_VAR(dst_hi));
|
||||
} else {
|
||||
/* mov dreg_lo,dst_lo */
|
||||
EMIT2(0x89, add_2reg(0xC0, dreg_lo, dst_lo));
|
||||
if (is_jmp64)
|
||||
/* mov dreg_hi,dst_hi */
|
||||
EMIT2(0x89,
|
||||
add_2reg(0xC0, dreg_hi, dst_hi));
|
||||
}
|
||||
|
||||
/* mov ecx,imm32 */
|
||||
|
@ -1,8 +1,4 @@
|
||||
/*
|
||||
* include/asm-xtensa/module.h
|
||||
*
|
||||
* This file contains the module code specific to the Xtensa architecture.
|
||||
*
|
||||
* This file is subject to the terms and conditions of the GNU General Public
|
||||
* License. See the file "COPYING" in the main directory of this archive
|
||||
* for more details.
|
||||
@ -10,11 +6,12 @@
|
||||
* Copyright (C) 2001 - 2005 Tensilica Inc.
|
||||
*/
|
||||
|
||||
#ifndef _XTENSA_MODULE_H
|
||||
#define _XTENSA_MODULE_H
|
||||
#ifndef _ASM_VERMAGIC_H
|
||||
#define _ASM_VERMAGIC_H
|
||||
|
||||
#include <linux/stringify.h>
|
||||
#include <variant/core.h>
|
||||
|
||||
#define MODULE_ARCH_VERMAGIC "xtensa-" __stringify(XCHAL_CORE_ID) " "
|
||||
|
||||
#include <asm-generic/module.h>
|
||||
|
||||
#endif /* _XTENSA_MODULE_H */
|
||||
#endif /* _ASM_VERMAGIC_H */
|
@ -1591,7 +1591,7 @@ skip_surplus_transfers:
|
||||
vrate_min, vrate_max);
|
||||
}
|
||||
|
||||
trace_iocost_ioc_vrate_adj(ioc, vrate, &missed_ppm, rq_wait_pct,
|
||||
trace_iocost_ioc_vrate_adj(ioc, vrate, missed_ppm, rq_wait_pct,
|
||||
nr_lagging, nr_shortages,
|
||||
nr_surpluses);
|
||||
|
||||
@ -1600,7 +1600,7 @@ skip_surplus_transfers:
|
||||
ioc->period_us * vrate * INUSE_MARGIN_PCT, 100);
|
||||
} else if (ioc->busy_level != prev_busy_level || nr_lagging) {
|
||||
trace_iocost_ioc_vrate_adj(ioc, atomic64_read(&ioc->vtime_rate),
|
||||
&missed_ppm, rq_wait_pct, nr_lagging,
|
||||
missed_ppm, rq_wait_pct, nr_lagging,
|
||||
nr_shortages, nr_surpluses);
|
||||
}
|
||||
|
||||
|
@ -87,18 +87,6 @@ static const struct dmi_system_id dmi_lid_quirks[] = {
|
||||
},
|
||||
.driver_data = (void *)(long)ACPI_BUTTON_LID_INIT_DISABLED,
|
||||
},
|
||||
{
|
||||
/*
|
||||
* Asus T200TA, _LID keeps reporting closed after every second
|
||||
* openening of the lid. Causing immediate re-suspend after
|
||||
* opening every other open. Using LID_INIT_OPEN fixes this.
|
||||
*/
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "T200TA"),
|
||||
},
|
||||
.driver_data = (void *)(long)ACPI_BUTTON_LID_INIT_OPEN,
|
||||
},
|
||||
{
|
||||
/* GP-electronic T701, _LID method points to a floating GPIO */
|
||||
.matches = {
|
||||
|
@ -322,10 +322,10 @@ static int acpi_pci_link_set(struct acpi_pci_link *link, int irq)
|
||||
resource->res.data.extended_irq.polarity =
|
||||
link->irq.polarity;
|
||||
if (link->irq.triggering == ACPI_EDGE_SENSITIVE)
|
||||
resource->res.data.irq.shareable =
|
||||
resource->res.data.extended_irq.shareable =
|
||||
ACPI_EXCLUSIVE;
|
||||
else
|
||||
resource->res.data.irq.shareable = ACPI_SHARED;
|
||||
resource->res.data.extended_irq.shareable = ACPI_SHARED;
|
||||
resource->res.data.extended_irq.interrupt_count = 1;
|
||||
resource->res.data.extended_irq.interrupts[0] = irq;
|
||||
/* ignore resource_source, it's optional */
|
||||
|
@ -145,7 +145,7 @@ enum {
|
||||
|
||||
/* PORT_IDMA_CTL bits */
|
||||
IDMA_CTL_RST_ATA = (1 << 2), /* hardreset ATA bus */
|
||||
IDMA_CTL_RST_IDMA = (1 << 5), /* reset IDMA machinary */
|
||||
IDMA_CTL_RST_IDMA = (1 << 5), /* reset IDMA machinery */
|
||||
IDMA_CTL_GO = (1 << 7), /* IDMA mode go */
|
||||
IDMA_CTL_ATA_NIEN = (1 << 8), /* ATA IRQ disable */
|
||||
|
||||
|
@ -730,7 +730,7 @@ static bool dpm_async_fn(struct device *dev, async_func_t func)
|
||||
|
||||
if (is_async(dev)) {
|
||||
get_device(dev);
|
||||
async_schedule(func, dev);
|
||||
async_schedule_dev(func, dev);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -85,26 +85,35 @@ struct nullb {
|
||||
char disk_name[DISK_NAME_LEN];
|
||||
};
|
||||
|
||||
blk_status_t null_process_cmd(struct nullb_cmd *cmd,
|
||||
enum req_opf op, sector_t sector,
|
||||
unsigned int nr_sectors);
|
||||
|
||||
#ifdef CONFIG_BLK_DEV_ZONED
|
||||
int null_zone_init(struct nullb_device *dev);
|
||||
void null_zone_exit(struct nullb_device *dev);
|
||||
int null_init_zoned_dev(struct nullb_device *dev, struct request_queue *q);
|
||||
int null_register_zoned_dev(struct nullb *nullb);
|
||||
void null_free_zoned_dev(struct nullb_device *dev);
|
||||
int null_report_zones(struct gendisk *disk, sector_t sector,
|
||||
unsigned int nr_zones, report_zones_cb cb, void *data);
|
||||
blk_status_t null_handle_zoned(struct nullb_cmd *cmd,
|
||||
enum req_opf op, sector_t sector,
|
||||
sector_t nr_sectors);
|
||||
blk_status_t null_process_zoned_cmd(struct nullb_cmd *cmd,
|
||||
enum req_opf op, sector_t sector,
|
||||
sector_t nr_sectors);
|
||||
size_t null_zone_valid_read_len(struct nullb *nullb,
|
||||
sector_t sector, unsigned int len);
|
||||
#else
|
||||
static inline int null_zone_init(struct nullb_device *dev)
|
||||
static inline int null_init_zoned_dev(struct nullb_device *dev,
|
||||
struct request_queue *q)
|
||||
{
|
||||
pr_err("CONFIG_BLK_DEV_ZONED not enabled\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
static inline void null_zone_exit(struct nullb_device *dev) {}
|
||||
static inline blk_status_t null_handle_zoned(struct nullb_cmd *cmd,
|
||||
enum req_opf op, sector_t sector,
|
||||
sector_t nr_sectors)
|
||||
static inline int null_register_zoned_dev(struct nullb *nullb)
|
||||
{
|
||||
return -ENODEV;
|
||||
}
|
||||
static inline void null_free_zoned_dev(struct nullb_device *dev) {}
|
||||
static inline blk_status_t null_process_zoned_cmd(struct nullb_cmd *cmd,
|
||||
enum req_opf op, sector_t sector, sector_t nr_sectors)
|
||||
{
|
||||
return BLK_STS_NOTSUPP;
|
||||
}
|
||||
|
@ -580,7 +580,7 @@ static void null_free_dev(struct nullb_device *dev)
|
||||
if (!dev)
|
||||
return;
|
||||
|
||||
null_zone_exit(dev);
|
||||
null_free_zoned_dev(dev);
|
||||
badblocks_exit(&dev->badblocks);
|
||||
kfree(dev);
|
||||
}
|
||||
@ -1276,6 +1276,25 @@ static inline void nullb_complete_cmd(struct nullb_cmd *cmd)
|
||||
}
|
||||
}
|
||||
|
||||
blk_status_t null_process_cmd(struct nullb_cmd *cmd,
|
||||
enum req_opf op, sector_t sector,
|
||||
unsigned int nr_sectors)
|
||||
{
|
||||
struct nullb_device *dev = cmd->nq->dev;
|
||||
blk_status_t ret;
|
||||
|
||||
if (dev->badblocks.shift != -1) {
|
||||
ret = null_handle_badblocks(cmd, sector, nr_sectors);
|
||||
if (ret != BLK_STS_OK)
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (dev->memory_backed)
|
||||
return null_handle_memory_backed(cmd, op);
|
||||
|
||||
return BLK_STS_OK;
|
||||
}
|
||||
|
||||
static blk_status_t null_handle_cmd(struct nullb_cmd *cmd, sector_t sector,
|
||||
sector_t nr_sectors, enum req_opf op)
|
||||
{
|
||||
@ -1294,17 +1313,11 @@ static blk_status_t null_handle_cmd(struct nullb_cmd *cmd, sector_t sector,
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (nullb->dev->badblocks.shift != -1) {
|
||||
cmd->error = null_handle_badblocks(cmd, sector, nr_sectors);
|
||||
if (cmd->error != BLK_STS_OK)
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (dev->memory_backed)
|
||||
cmd->error = null_handle_memory_backed(cmd, op);
|
||||
|
||||
if (!cmd->error && dev->zoned)
|
||||
cmd->error = null_handle_zoned(cmd, op, sector, nr_sectors);
|
||||
if (dev->zoned)
|
||||
cmd->error = null_process_zoned_cmd(cmd, op,
|
||||
sector, nr_sectors);
|
||||
else
|
||||
cmd->error = null_process_cmd(cmd, op, sector, nr_sectors);
|
||||
|
||||
out:
|
||||
nullb_complete_cmd(cmd);
|
||||
@ -1605,19 +1618,12 @@ static int null_gendisk_register(struct nullb *nullb)
|
||||
disk->queue = nullb->q;
|
||||
strncpy(disk->disk_name, nullb->disk_name, DISK_NAME_LEN);
|
||||
|
||||
#ifdef CONFIG_BLK_DEV_ZONED
|
||||
if (nullb->dev->zoned) {
|
||||
if (queue_is_mq(nullb->q)) {
|
||||
int ret = blk_revalidate_disk_zones(disk);
|
||||
if (ret)
|
||||
return ret;
|
||||
} else {
|
||||
blk_queue_chunk_sectors(nullb->q,
|
||||
nullb->dev->zone_size_sects);
|
||||
nullb->q->nr_zones = blkdev_nr_zones(disk);
|
||||
}
|
||||
int ret = null_register_zoned_dev(nullb);
|
||||
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
add_disk(disk);
|
||||
return 0;
|
||||
@ -1773,14 +1779,9 @@ static int null_add_dev(struct nullb_device *dev)
|
||||
}
|
||||
|
||||
if (dev->zoned) {
|
||||
rv = null_zone_init(dev);
|
||||
rv = null_init_zoned_dev(dev, nullb->q);
|
||||
if (rv)
|
||||
goto out_cleanup_blk_queue;
|
||||
|
||||
nullb->q->limits.zoned = BLK_ZONED_HM;
|
||||
blk_queue_flag_set(QUEUE_FLAG_ZONE_RESETALL, nullb->q);
|
||||
blk_queue_required_elevator_features(nullb->q,
|
||||
ELEVATOR_F_ZBD_SEQ_WRITE);
|
||||
}
|
||||
|
||||
nullb->q->queuedata = nullb;
|
||||
@ -1809,8 +1810,7 @@ static int null_add_dev(struct nullb_device *dev)
|
||||
|
||||
return 0;
|
||||
out_cleanup_zone:
|
||||
if (dev->zoned)
|
||||
null_zone_exit(dev);
|
||||
null_free_zoned_dev(dev);
|
||||
out_cleanup_blk_queue:
|
||||
blk_cleanup_queue(nullb->q);
|
||||
out_cleanup_tags:
|
||||
|
@ -13,7 +13,7 @@ static inline unsigned int null_zone_no(struct nullb_device *dev, sector_t sect)
|
||||
return sect >> ilog2(dev->zone_size_sects);
|
||||
}
|
||||
|
||||
int null_zone_init(struct nullb_device *dev)
|
||||
int null_init_zoned_dev(struct nullb_device *dev, struct request_queue *q)
|
||||
{
|
||||
sector_t dev_size = (sector_t)dev->size * 1024 * 1024;
|
||||
sector_t sector = 0;
|
||||
@ -61,10 +61,27 @@ int null_zone_init(struct nullb_device *dev)
|
||||
sector += dev->zone_size_sects;
|
||||
}
|
||||
|
||||
q->limits.zoned = BLK_ZONED_HM;
|
||||
blk_queue_flag_set(QUEUE_FLAG_ZONE_RESETALL, q);
|
||||
blk_queue_required_elevator_features(q, ELEVATOR_F_ZBD_SEQ_WRITE);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void null_zone_exit(struct nullb_device *dev)
|
||||
int null_register_zoned_dev(struct nullb *nullb)
|
||||
{
|
||||
struct request_queue *q = nullb->q;
|
||||
|
||||
if (queue_is_mq(q))
|
||||
return blk_revalidate_disk_zones(nullb->disk);
|
||||
|
||||
blk_queue_chunk_sectors(q, nullb->dev->zone_size_sects);
|
||||
q->nr_zones = blkdev_nr_zones(nullb->disk);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void null_free_zoned_dev(struct nullb_device *dev)
|
||||
{
|
||||
kvfree(dev->zones);
|
||||
}
|
||||
@ -126,11 +143,16 @@ static blk_status_t null_zone_write(struct nullb_cmd *cmd, sector_t sector,
|
||||
struct nullb_device *dev = cmd->nq->dev;
|
||||
unsigned int zno = null_zone_no(dev, sector);
|
||||
struct blk_zone *zone = &dev->zones[zno];
|
||||
blk_status_t ret;
|
||||
|
||||
trace_nullb_zone_op(cmd, zno, zone->cond);
|
||||
|
||||
if (zone->type == BLK_ZONE_TYPE_CONVENTIONAL)
|
||||
return null_process_cmd(cmd, REQ_OP_WRITE, sector, nr_sectors);
|
||||
|
||||
switch (zone->cond) {
|
||||
case BLK_ZONE_COND_FULL:
|
||||
/* Cannot write to a full zone */
|
||||
cmd->error = BLK_STS_IOERR;
|
||||
return BLK_STS_IOERR;
|
||||
case BLK_ZONE_COND_EMPTY:
|
||||
case BLK_ZONE_COND_IMP_OPEN:
|
||||
@ -143,19 +165,18 @@ static blk_status_t null_zone_write(struct nullb_cmd *cmd, sector_t sector,
|
||||
if (zone->cond != BLK_ZONE_COND_EXP_OPEN)
|
||||
zone->cond = BLK_ZONE_COND_IMP_OPEN;
|
||||
|
||||
ret = null_process_cmd(cmd, REQ_OP_WRITE, sector, nr_sectors);
|
||||
if (ret != BLK_STS_OK)
|
||||
return ret;
|
||||
|
||||
zone->wp += nr_sectors;
|
||||
if (zone->wp == zone->start + zone->len)
|
||||
zone->cond = BLK_ZONE_COND_FULL;
|
||||
break;
|
||||
case BLK_ZONE_COND_NOT_WP:
|
||||
break;
|
||||
return BLK_STS_OK;
|
||||
default:
|
||||
/* Invalid zone condition */
|
||||
return BLK_STS_IOERR;
|
||||
}
|
||||
|
||||
trace_nullb_zone_op(cmd, zno, zone->cond);
|
||||
return BLK_STS_OK;
|
||||
}
|
||||
|
||||
static blk_status_t null_zone_mgmt(struct nullb_cmd *cmd, enum req_opf op,
|
||||
@ -216,8 +237,8 @@ static blk_status_t null_zone_mgmt(struct nullb_cmd *cmd, enum req_opf op,
|
||||
return BLK_STS_OK;
|
||||
}
|
||||
|
||||
blk_status_t null_handle_zoned(struct nullb_cmd *cmd, enum req_opf op,
|
||||
sector_t sector, sector_t nr_sectors)
|
||||
blk_status_t null_process_zoned_cmd(struct nullb_cmd *cmd, enum req_opf op,
|
||||
sector_t sector, sector_t nr_sectors)
|
||||
{
|
||||
switch (op) {
|
||||
case REQ_OP_WRITE:
|
||||
@ -229,6 +250,6 @@ blk_status_t null_handle_zoned(struct nullb_cmd *cmd, enum req_opf op,
|
||||
case REQ_OP_ZONE_FINISH:
|
||||
return null_zone_mgmt(cmd, op, sector);
|
||||
default:
|
||||
return BLK_STS_OK;
|
||||
return null_process_cmd(cmd, op, sector, nr_sectors);
|
||||
}
|
||||
}
|
||||
|
@ -15,6 +15,7 @@
|
||||
#include <linux/blk-mq.h>
|
||||
#include <linux/blk-mq-virtio.h>
|
||||
#include <linux/numa.h>
|
||||
#include <uapi/linux/virtio_ring.h>
|
||||
|
||||
#define PART_BITS 4
|
||||
#define VQ_NAME_LEN 16
|
||||
|
@ -11,6 +11,7 @@
|
||||
#include <linux/virtio.h>
|
||||
#include <linux/virtio_rng.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
static DEFINE_IDA(rng_index_ida);
|
||||
|
||||
|
@ -323,7 +323,7 @@ int tpm_pcr_extend(struct tpm_chip *chip, u32 pcr_idx,
|
||||
|
||||
for (i = 0; i < chip->nr_allocated_banks; i++) {
|
||||
if (digests[i].alg_id != chip->allocated_banks[i].alg_id) {
|
||||
rc = EINVAL;
|
||||
rc = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
@ -681,6 +681,7 @@ out:
|
||||
rc = -ENODEV;
|
||||
return rc;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(tpm2_get_cc_attrs_tbl);
|
||||
|
||||
/**
|
||||
* tpm2_startup - turn on the TPM
|
||||
|
@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (C) 2012 IBM Corporation
|
||||
* Copyright (C) 2012-2020 IBM Corporation
|
||||
*
|
||||
* Author: Ashley Lai <ashleydlai@gmail.com>
|
||||
*
|
||||
@ -134,6 +134,64 @@ static int tpm_ibmvtpm_recv(struct tpm_chip *chip, u8 *buf, size_t count)
|
||||
return len;
|
||||
}
|
||||
|
||||
/**
|
||||
* ibmvtpm_crq_send_init - Send a CRQ initialize message
|
||||
* @ibmvtpm: vtpm device struct
|
||||
*
|
||||
* Return:
|
||||
* 0 on success.
|
||||
* Non-zero on failure.
|
||||
*/
|
||||
static int ibmvtpm_crq_send_init(struct ibmvtpm_dev *ibmvtpm)
|
||||
{
|
||||
int rc;
|
||||
|
||||
rc = ibmvtpm_send_crq_word(ibmvtpm->vdev, INIT_CRQ_CMD);
|
||||
if (rc != H_SUCCESS)
|
||||
dev_err(ibmvtpm->dev,
|
||||
"%s failed rc=%d\n", __func__, rc);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
/**
|
||||
* tpm_ibmvtpm_resume - Resume from suspend
|
||||
*
|
||||
* @dev: device struct
|
||||
*
|
||||
* Return: Always 0.
|
||||
*/
|
||||
static int tpm_ibmvtpm_resume(struct device *dev)
|
||||
{
|
||||
struct tpm_chip *chip = dev_get_drvdata(dev);
|
||||
struct ibmvtpm_dev *ibmvtpm = dev_get_drvdata(&chip->dev);
|
||||
int rc = 0;
|
||||
|
||||
do {
|
||||
if (rc)
|
||||
msleep(100);
|
||||
rc = plpar_hcall_norets(H_ENABLE_CRQ,
|
||||
ibmvtpm->vdev->unit_address);
|
||||
} while (rc == H_IN_PROGRESS || rc == H_BUSY || H_IS_LONG_BUSY(rc));
|
||||
|
||||
if (rc) {
|
||||
dev_err(dev, "Error enabling ibmvtpm rc=%d\n", rc);
|
||||
return rc;
|
||||
}
|
||||
|
||||
rc = vio_enable_interrupts(ibmvtpm->vdev);
|
||||
if (rc) {
|
||||
dev_err(dev, "Error vio_enable_interrupts rc=%d\n", rc);
|
||||
return rc;
|
||||
}
|
||||
|
||||
rc = ibmvtpm_crq_send_init(ibmvtpm);
|
||||
if (rc)
|
||||
dev_err(dev, "Error send_init rc=%d\n", rc);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
/**
|
||||
* tpm_ibmvtpm_send() - Send a TPM command
|
||||
* @chip: tpm chip struct
|
||||
@ -147,6 +205,7 @@ static int tpm_ibmvtpm_recv(struct tpm_chip *chip, u8 *buf, size_t count)
|
||||
static int tpm_ibmvtpm_send(struct tpm_chip *chip, u8 *buf, size_t count)
|
||||
{
|
||||
struct ibmvtpm_dev *ibmvtpm = dev_get_drvdata(&chip->dev);
|
||||
bool retry = true;
|
||||
int rc, sig;
|
||||
|
||||
if (!ibmvtpm->rtce_buf) {
|
||||
@ -180,18 +239,27 @@ static int tpm_ibmvtpm_send(struct tpm_chip *chip, u8 *buf, size_t count)
|
||||
*/
|
||||
ibmvtpm->tpm_processing_cmd = true;
|
||||
|
||||
again:
|
||||
rc = ibmvtpm_send_crq(ibmvtpm->vdev,
|
||||
IBMVTPM_VALID_CMD, VTPM_TPM_COMMAND,
|
||||
count, ibmvtpm->rtce_dma_handle);
|
||||
if (rc != H_SUCCESS) {
|
||||
/*
|
||||
* H_CLOSED can be returned after LPM resume. Call
|
||||
* tpm_ibmvtpm_resume() to re-enable the CRQ then retry
|
||||
* ibmvtpm_send_crq() once before failing.
|
||||
*/
|
||||
if (rc == H_CLOSED && retry) {
|
||||
tpm_ibmvtpm_resume(ibmvtpm->dev);
|
||||
retry = false;
|
||||
goto again;
|
||||
}
|
||||
dev_err(ibmvtpm->dev, "tpm_ibmvtpm_send failed rc=%d\n", rc);
|
||||
rc = 0;
|
||||
ibmvtpm->tpm_processing_cmd = false;
|
||||
} else
|
||||
rc = 0;
|
||||
}
|
||||
|
||||
spin_unlock(&ibmvtpm->rtce_lock);
|
||||
return rc;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void tpm_ibmvtpm_cancel(struct tpm_chip *chip)
|
||||
@ -269,26 +337,6 @@ static int ibmvtpm_crq_send_init_complete(struct ibmvtpm_dev *ibmvtpm)
|
||||
return rc;
|
||||
}
|
||||
|
||||
/**
|
||||
* ibmvtpm_crq_send_init - Send a CRQ initialize message
|
||||
* @ibmvtpm: vtpm device struct
|
||||
*
|
||||
* Return:
|
||||
* 0 on success.
|
||||
* Non-zero on failure.
|
||||
*/
|
||||
static int ibmvtpm_crq_send_init(struct ibmvtpm_dev *ibmvtpm)
|
||||
{
|
||||
int rc;
|
||||
|
||||
rc = ibmvtpm_send_crq_word(ibmvtpm->vdev, INIT_CRQ_CMD);
|
||||
if (rc != H_SUCCESS)
|
||||
dev_err(ibmvtpm->dev,
|
||||
"ibmvtpm_crq_send_init failed rc=%d\n", rc);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
/**
|
||||
* tpm_ibmvtpm_remove - ibm vtpm remove entry point
|
||||
* @vdev: vio device struct
|
||||
@ -401,44 +449,6 @@ static int ibmvtpm_reset_crq(struct ibmvtpm_dev *ibmvtpm)
|
||||
ibmvtpm->crq_dma_handle, CRQ_RES_BUF_SIZE);
|
||||
}
|
||||
|
||||
/**
|
||||
* tpm_ibmvtpm_resume - Resume from suspend
|
||||
*
|
||||
* @dev: device struct
|
||||
*
|
||||
* Return: Always 0.
|
||||
*/
|
||||
static int tpm_ibmvtpm_resume(struct device *dev)
|
||||
{
|
||||
struct tpm_chip *chip = dev_get_drvdata(dev);
|
||||
struct ibmvtpm_dev *ibmvtpm = dev_get_drvdata(&chip->dev);
|
||||
int rc = 0;
|
||||
|
||||
do {
|
||||
if (rc)
|
||||
msleep(100);
|
||||
rc = plpar_hcall_norets(H_ENABLE_CRQ,
|
||||
ibmvtpm->vdev->unit_address);
|
||||
} while (rc == H_IN_PROGRESS || rc == H_BUSY || H_IS_LONG_BUSY(rc));
|
||||
|
||||
if (rc) {
|
||||
dev_err(dev, "Error enabling ibmvtpm rc=%d\n", rc);
|
||||
return rc;
|
||||
}
|
||||
|
||||
rc = vio_enable_interrupts(ibmvtpm->vdev);
|
||||
if (rc) {
|
||||
dev_err(dev, "Error vio_enable_interrupts rc=%d\n", rc);
|
||||
return rc;
|
||||
}
|
||||
|
||||
rc = ibmvtpm_crq_send_init(ibmvtpm);
|
||||
if (rc)
|
||||
dev_err(dev, "Error send_init rc=%d\n", rc);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
static bool tpm_ibmvtpm_req_canceled(struct tpm_chip *chip, u8 status)
|
||||
{
|
||||
return (status == 0);
|
||||
|
@ -433,6 +433,9 @@ static void disable_interrupts(struct tpm_chip *chip)
|
||||
u32 intmask;
|
||||
int rc;
|
||||
|
||||
if (priv->irq == 0)
|
||||
return;
|
||||
|
||||
rc = tpm_tis_read32(priv, TPM_INT_ENABLE(priv->locality), &intmask);
|
||||
if (rc < 0)
|
||||
intmask = 0;
|
||||
@ -1062,9 +1065,12 @@ int tpm_tis_core_init(struct device *dev, struct tpm_tis_data *priv, int irq,
|
||||
if (irq) {
|
||||
tpm_tis_probe_irq_single(chip, intmask, IRQF_SHARED,
|
||||
irq);
|
||||
if (!(chip->flags & TPM_CHIP_FLAG_IRQ))
|
||||
if (!(chip->flags & TPM_CHIP_FLAG_IRQ)) {
|
||||
dev_err(&chip->dev, FW_BUG
|
||||
"TPM interrupt not working, polling instead\n");
|
||||
|
||||
disable_interrupts(chip);
|
||||
}
|
||||
} else {
|
||||
tpm_tis_probe_irq(chip, intmask);
|
||||
}
|
||||
|
@ -120,12 +120,10 @@ out:
|
||||
static int chcr_ktls_update_connection_state(struct chcr_ktls_info *tx_info,
|
||||
int new_state)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
||||
/* This function can be called from both rx (interrupt context) and tx
|
||||
* queue contexts.
|
||||
*/
|
||||
spin_lock_irqsave(&tx_info->lock, flags);
|
||||
spin_lock_bh(&tx_info->lock);
|
||||
switch (tx_info->connection_state) {
|
||||
case KTLS_CONN_CLOSED:
|
||||
tx_info->connection_state = new_state;
|
||||
@ -169,7 +167,7 @@ static int chcr_ktls_update_connection_state(struct chcr_ktls_info *tx_info,
|
||||
pr_err("unknown KTLS connection state\n");
|
||||
break;
|
||||
}
|
||||
spin_unlock_irqrestore(&tx_info->lock, flags);
|
||||
spin_unlock_bh(&tx_info->lock);
|
||||
|
||||
return tx_info->connection_state;
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ static struct pm_api_info pm_api_list[] = {
|
||||
PM_API(PM_QUERY_DATA),
|
||||
};
|
||||
|
||||
struct dentry *firmware_debugfs_root;
|
||||
static struct dentry *firmware_debugfs_root;
|
||||
|
||||
/**
|
||||
* zynqmp_pm_argument_value() - Extract argument value from a PM-API request
|
||||
|
@ -4664,6 +4664,7 @@ static void amdgpu_dm_connector_destroy(struct drm_connector *connector)
|
||||
i2c_del_adapter(&aconnector->i2c->base);
|
||||
kfree(aconnector->i2c);
|
||||
}
|
||||
kfree(aconnector->dm_dp_aux.aux.name);
|
||||
|
||||
kfree(connector);
|
||||
}
|
||||
@ -4723,10 +4724,19 @@ amdgpu_dm_connector_atomic_duplicate_state(struct drm_connector *connector)
|
||||
static int
|
||||
amdgpu_dm_connector_late_register(struct drm_connector *connector)
|
||||
{
|
||||
#if defined(CONFIG_DEBUG_FS)
|
||||
struct amdgpu_dm_connector *amdgpu_dm_connector =
|
||||
to_amdgpu_dm_connector(connector);
|
||||
int r;
|
||||
|
||||
if ((connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort) ||
|
||||
(connector->connector_type == DRM_MODE_CONNECTOR_eDP)) {
|
||||
amdgpu_dm_connector->dm_dp_aux.aux.dev = connector->kdev;
|
||||
r = drm_dp_aux_register(&amdgpu_dm_connector->dm_dp_aux.aux);
|
||||
if (r)
|
||||
return r;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_DEBUG_FS)
|
||||
connector_debugfs_init(amdgpu_dm_connector);
|
||||
#endif
|
||||
|
||||
@ -6092,7 +6102,7 @@ static int amdgpu_dm_connector_init(struct amdgpu_display_manager *dm,
|
||||
|
||||
if (connector_type == DRM_MODE_CONNECTOR_DisplayPort
|
||||
|| connector_type == DRM_MODE_CONNECTOR_eDP)
|
||||
amdgpu_dm_initialize_dp_connector(dm, aconnector);
|
||||
amdgpu_dm_initialize_dp_connector(dm, aconnector, link->link_index);
|
||||
|
||||
out_free:
|
||||
if (res) {
|
||||
|
@ -156,16 +156,16 @@ amdgpu_dm_mst_connector_late_register(struct drm_connector *connector)
|
||||
to_amdgpu_dm_connector(connector);
|
||||
int r;
|
||||
|
||||
amdgpu_dm_connector->dm_dp_aux.aux.dev = connector->kdev;
|
||||
r = drm_dp_aux_register(&amdgpu_dm_connector->dm_dp_aux.aux);
|
||||
if (r)
|
||||
r = drm_dp_mst_connector_late_register(connector,
|
||||
amdgpu_dm_connector->port);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
#if defined(CONFIG_DEBUG_FS)
|
||||
connector_debugfs_init(amdgpu_dm_connector);
|
||||
#endif
|
||||
|
||||
return r;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
@ -472,9 +472,12 @@ static const struct drm_dp_mst_topology_cbs dm_mst_cbs = {
|
||||
};
|
||||
|
||||
void amdgpu_dm_initialize_dp_connector(struct amdgpu_display_manager *dm,
|
||||
struct amdgpu_dm_connector *aconnector)
|
||||
struct amdgpu_dm_connector *aconnector,
|
||||
int link_index)
|
||||
{
|
||||
aconnector->dm_dp_aux.aux.name = "dmdc";
|
||||
aconnector->dm_dp_aux.aux.name =
|
||||
kasprintf(GFP_KERNEL, "AMDGPU DM aux hw bus %d",
|
||||
link_index);
|
||||
aconnector->dm_dp_aux.aux.transfer = dm_dp_aux_transfer;
|
||||
aconnector->dm_dp_aux.ddc_service = aconnector->dc_link->ddc;
|
||||
|
||||
|
@ -32,7 +32,8 @@ struct amdgpu_dm_connector;
|
||||
int dm_mst_get_pbn_divider(struct dc_link *link);
|
||||
|
||||
void amdgpu_dm_initialize_dp_connector(struct amdgpu_display_manager *dm,
|
||||
struct amdgpu_dm_connector *aconnector);
|
||||
struct amdgpu_dm_connector *aconnector,
|
||||
int link_index);
|
||||
|
||||
#if defined(CONFIG_DRM_AMD_DC_DCN)
|
||||
bool compute_mst_dsc_configs_for_state(struct drm_atomic_state *state,
|
||||
|
@ -984,6 +984,32 @@ static int init_thermal_controller(
|
||||
struct pp_hwmgr *hwmgr,
|
||||
const ATOM_PPLIB_POWERPLAYTABLE *powerplay_table)
|
||||
{
|
||||
hwmgr->thermal_controller.ucType =
|
||||
powerplay_table->sThermalController.ucType;
|
||||
hwmgr->thermal_controller.ucI2cLine =
|
||||
powerplay_table->sThermalController.ucI2cLine;
|
||||
hwmgr->thermal_controller.ucI2cAddress =
|
||||
powerplay_table->sThermalController.ucI2cAddress;
|
||||
|
||||
hwmgr->thermal_controller.fanInfo.bNoFan =
|
||||
(0 != (powerplay_table->sThermalController.ucFanParameters &
|
||||
ATOM_PP_FANPARAMETERS_NOFAN));
|
||||
|
||||
hwmgr->thermal_controller.fanInfo.ucTachometerPulsesPerRevolution =
|
||||
powerplay_table->sThermalController.ucFanParameters &
|
||||
ATOM_PP_FANPARAMETERS_TACHOMETER_PULSES_PER_REVOLUTION_MASK;
|
||||
|
||||
hwmgr->thermal_controller.fanInfo.ulMinRPM
|
||||
= powerplay_table->sThermalController.ucFanMinRPM * 100UL;
|
||||
hwmgr->thermal_controller.fanInfo.ulMaxRPM
|
||||
= powerplay_table->sThermalController.ucFanMaxRPM * 100UL;
|
||||
|
||||
set_hw_cap(hwmgr,
|
||||
ATOM_PP_THERMALCONTROLLER_NONE != hwmgr->thermal_controller.ucType,
|
||||
PHM_PlatformCaps_ThermalController);
|
||||
|
||||
hwmgr->thermal_controller.use_hw_fan_control = 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -895,12 +895,17 @@ static int renoir_read_sensor(struct smu_context *smu,
|
||||
|
||||
static bool renoir_is_dpm_running(struct smu_context *smu)
|
||||
{
|
||||
struct amdgpu_device *adev = smu->adev;
|
||||
|
||||
/*
|
||||
* Util now, the pmfw hasn't exported the interface of SMU
|
||||
* feature mask to APU SKU so just force on all the feature
|
||||
* at early initial stage.
|
||||
*/
|
||||
return true;
|
||||
if (adev->in_suspend)
|
||||
return false;
|
||||
else
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
|
@ -485,6 +485,9 @@ static int anx6345_get_modes(struct drm_connector *connector)
|
||||
|
||||
num_modes += drm_add_edid_modes(connector, anx6345->edid);
|
||||
|
||||
/* Driver currently supports only 6bpc */
|
||||
connector->display_info.bpc = 6;
|
||||
|
||||
unlock:
|
||||
if (power_off)
|
||||
anx6345_poweroff(anx6345);
|
||||
|
@ -4295,6 +4295,7 @@ int drm_dp_atomic_release_vcpi_slots(struct drm_atomic_state *state,
|
||||
if (pos->vcpi) {
|
||||
drm_dp_mst_put_port_malloc(port);
|
||||
pos->vcpi = 0;
|
||||
pos->pbn = 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -3141,9 +3141,6 @@ static void hsw_ddi_pre_enable_dp(struct intel_encoder *encoder,
|
||||
intel_dp_set_link_params(intel_dp, crtc_state->port_clock,
|
||||
crtc_state->lane_count, is_mst);
|
||||
|
||||
intel_dp->regs.dp_tp_ctl = DP_TP_CTL(port);
|
||||
intel_dp->regs.dp_tp_status = DP_TP_STATUS(port);
|
||||
|
||||
intel_edp_panel_on(intel_dp);
|
||||
|
||||
intel_ddi_clk_select(encoder, crtc_state);
|
||||
@ -3848,12 +3845,18 @@ void intel_ddi_get_config(struct intel_encoder *encoder,
|
||||
struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
|
||||
struct intel_crtc *intel_crtc = to_intel_crtc(pipe_config->uapi.crtc);
|
||||
enum transcoder cpu_transcoder = pipe_config->cpu_transcoder;
|
||||
struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
|
||||
u32 temp, flags = 0;
|
||||
|
||||
/* XXX: DSI transcoder paranoia */
|
||||
if (drm_WARN_ON(&dev_priv->drm, transcoder_is_dsi(cpu_transcoder)))
|
||||
return;
|
||||
|
||||
if (INTEL_GEN(dev_priv) >= 12) {
|
||||
intel_dp->regs.dp_tp_ctl = TGL_DP_TP_CTL(cpu_transcoder);
|
||||
intel_dp->regs.dp_tp_status = TGL_DP_TP_STATUS(cpu_transcoder);
|
||||
}
|
||||
|
||||
intel_dsc_get_config(encoder, pipe_config);
|
||||
|
||||
temp = intel_de_read(dev_priv, TRANS_DDI_FUNC_CTL(cpu_transcoder));
|
||||
@ -4173,6 +4176,7 @@ static const struct drm_encoder_funcs intel_ddi_funcs = {
|
||||
static struct intel_connector *
|
||||
intel_ddi_init_dp_connector(struct intel_digital_port *intel_dig_port)
|
||||
{
|
||||
struct drm_i915_private *dev_priv = to_i915(intel_dig_port->base.base.dev);
|
||||
struct intel_connector *connector;
|
||||
enum port port = intel_dig_port->base.port;
|
||||
|
||||
@ -4183,6 +4187,10 @@ intel_ddi_init_dp_connector(struct intel_digital_port *intel_dig_port)
|
||||
intel_dig_port->dp.output_reg = DDI_BUF_CTL(port);
|
||||
intel_dig_port->dp.prepare_link_retrain =
|
||||
intel_ddi_prepare_link_retrain;
|
||||
if (INTEL_GEN(dev_priv) < 12) {
|
||||
intel_dig_port->dp.regs.dp_tp_ctl = DP_TP_CTL(port);
|
||||
intel_dig_port->dp.regs.dp_tp_status = DP_TP_STATUS(port);
|
||||
}
|
||||
|
||||
if (!intel_dp_init_connector(intel_dig_port, connector)) {
|
||||
kfree(connector);
|
||||
|
@ -4140,7 +4140,7 @@ static const struct i915_power_well_desc tgl_power_wells[] = {
|
||||
{
|
||||
.name = "AUX D TBT1",
|
||||
.domains = TGL_AUX_D_TBT1_IO_POWER_DOMAINS,
|
||||
.ops = &hsw_power_well_ops,
|
||||
.ops = &icl_tc_phy_aux_power_well_ops,
|
||||
.id = DISP_PW_ID_NONE,
|
||||
{
|
||||
.hsw.regs = &icl_aux_power_well_regs,
|
||||
@ -4151,7 +4151,7 @@ static const struct i915_power_well_desc tgl_power_wells[] = {
|
||||
{
|
||||
.name = "AUX E TBT2",
|
||||
.domains = TGL_AUX_E_TBT2_IO_POWER_DOMAINS,
|
||||
.ops = &hsw_power_well_ops,
|
||||
.ops = &icl_tc_phy_aux_power_well_ops,
|
||||
.id = DISP_PW_ID_NONE,
|
||||
{
|
||||
.hsw.regs = &icl_aux_power_well_regs,
|
||||
@ -4162,7 +4162,7 @@ static const struct i915_power_well_desc tgl_power_wells[] = {
|
||||
{
|
||||
.name = "AUX F TBT3",
|
||||
.domains = TGL_AUX_F_TBT3_IO_POWER_DOMAINS,
|
||||
.ops = &hsw_power_well_ops,
|
||||
.ops = &icl_tc_phy_aux_power_well_ops,
|
||||
.id = DISP_PW_ID_NONE,
|
||||
{
|
||||
.hsw.regs = &icl_aux_power_well_regs,
|
||||
@ -4173,7 +4173,7 @@ static const struct i915_power_well_desc tgl_power_wells[] = {
|
||||
{
|
||||
.name = "AUX G TBT4",
|
||||
.domains = TGL_AUX_G_TBT4_IO_POWER_DOMAINS,
|
||||
.ops = &hsw_power_well_ops,
|
||||
.ops = &icl_tc_phy_aux_power_well_ops,
|
||||
.id = DISP_PW_ID_NONE,
|
||||
{
|
||||
.hsw.regs = &icl_aux_power_well_regs,
|
||||
@ -4184,7 +4184,7 @@ static const struct i915_power_well_desc tgl_power_wells[] = {
|
||||
{
|
||||
.name = "AUX H TBT5",
|
||||
.domains = TGL_AUX_H_TBT5_IO_POWER_DOMAINS,
|
||||
.ops = &hsw_power_well_ops,
|
||||
.ops = &icl_tc_phy_aux_power_well_ops,
|
||||
.id = DISP_PW_ID_NONE,
|
||||
{
|
||||
.hsw.regs = &icl_aux_power_well_regs,
|
||||
@ -4195,7 +4195,7 @@ static const struct i915_power_well_desc tgl_power_wells[] = {
|
||||
{
|
||||
.name = "AUX I TBT6",
|
||||
.domains = TGL_AUX_I_TBT6_IO_POWER_DOMAINS,
|
||||
.ops = &hsw_power_well_ops,
|
||||
.ops = &icl_tc_phy_aux_power_well_ops,
|
||||
.id = DISP_PW_ID_NONE,
|
||||
{
|
||||
.hsw.regs = &icl_aux_power_well_regs,
|
||||
|
@ -2517,9 +2517,6 @@ static void intel_dp_prepare(struct intel_encoder *encoder,
|
||||
intel_crtc_has_type(pipe_config,
|
||||
INTEL_OUTPUT_DP_MST));
|
||||
|
||||
intel_dp->regs.dp_tp_ctl = DP_TP_CTL(port);
|
||||
intel_dp->regs.dp_tp_status = DP_TP_STATUS(port);
|
||||
|
||||
/*
|
||||
* There are four kinds of DP registers:
|
||||
*
|
||||
@ -7836,6 +7833,8 @@ bool intel_dp_init(struct drm_i915_private *dev_priv,
|
||||
|
||||
intel_dig_port->dp.output_reg = output_reg;
|
||||
intel_dig_port->max_lanes = 4;
|
||||
intel_dig_port->dp.regs.dp_tp_ctl = DP_TP_CTL(port);
|
||||
intel_dig_port->dp.regs.dp_tp_status = DP_TP_STATUS(port);
|
||||
|
||||
intel_encoder->type = INTEL_OUTPUT_DP;
|
||||
intel_encoder->power_domain = intel_port_to_power_domain(port);
|
||||
|
@ -342,6 +342,7 @@ int intel_dp_aux_init_backlight_funcs(struct intel_connector *intel_connector)
|
||||
*/
|
||||
if (dev_priv->vbt.backlight.type !=
|
||||
INTEL_BACKLIGHT_VESA_EDP_AUX_INTERFACE &&
|
||||
i915_modparams.enable_dpcd_backlight != 1 &&
|
||||
!drm_dp_has_quirk(&intel_dp->desc, intel_dp->edid_quirks,
|
||||
DP_QUIRK_FORCE_DPCD_BACKLIGHT)) {
|
||||
DRM_DEV_INFO(dev->dev,
|
||||
|
@ -1536,7 +1536,8 @@ bool intel_hdmi_hdcp_check_link(struct intel_digital_port *intel_dig_port)
|
||||
intel_de_write(i915, HDCP_RPRIME(i915, cpu_transcoder, port), ri.reg);
|
||||
|
||||
/* Wait for Ri prime match */
|
||||
if (wait_for(intel_de_read(i915, HDCP_STATUS(i915, cpu_transcoder, port)) &
|
||||
if (wait_for((intel_de_read(i915, HDCP_STATUS(i915, cpu_transcoder, port)) &
|
||||
(HDCP_STATUS_RI_MATCH | HDCP_STATUS_ENC)) ==
|
||||
(HDCP_STATUS_RI_MATCH | HDCP_STATUS_ENC), 1)) {
|
||||
DRM_ERROR("Ri' mismatch detected, link check failed (%x)\n",
|
||||
intel_de_read(i915, HDCP_STATUS(i915, cpu_transcoder, port)));
|
||||
|
@ -2817,19 +2817,25 @@ static bool skl_plane_format_mod_supported(struct drm_plane *_plane,
|
||||
}
|
||||
}
|
||||
|
||||
static bool gen12_plane_supports_mc_ccs(enum plane_id plane_id)
|
||||
static bool gen12_plane_supports_mc_ccs(struct drm_i915_private *dev_priv,
|
||||
enum plane_id plane_id)
|
||||
{
|
||||
/* Wa_14010477008:tgl[a0..c0] */
|
||||
if (IS_TGL_REVID(dev_priv, TGL_REVID_A0, TGL_REVID_C0))
|
||||
return false;
|
||||
|
||||
return plane_id < PLANE_SPRITE4;
|
||||
}
|
||||
|
||||
static bool gen12_plane_format_mod_supported(struct drm_plane *_plane,
|
||||
u32 format, u64 modifier)
|
||||
{
|
||||
struct drm_i915_private *dev_priv = to_i915(_plane->dev);
|
||||
struct intel_plane *plane = to_intel_plane(_plane);
|
||||
|
||||
switch (modifier) {
|
||||
case I915_FORMAT_MOD_Y_TILED_GEN12_MC_CCS:
|
||||
if (!gen12_plane_supports_mc_ccs(plane->id))
|
||||
if (!gen12_plane_supports_mc_ccs(dev_priv, plane->id))
|
||||
return false;
|
||||
/* fall through */
|
||||
case DRM_FORMAT_MOD_LINEAR:
|
||||
@ -2998,9 +3004,10 @@ static const u32 *icl_get_plane_formats(struct drm_i915_private *dev_priv,
|
||||
}
|
||||
}
|
||||
|
||||
static const u64 *gen12_get_plane_modifiers(enum plane_id plane_id)
|
||||
static const u64 *gen12_get_plane_modifiers(struct drm_i915_private *dev_priv,
|
||||
enum plane_id plane_id)
|
||||
{
|
||||
if (gen12_plane_supports_mc_ccs(plane_id))
|
||||
if (gen12_plane_supports_mc_ccs(dev_priv, plane_id))
|
||||
return gen12_plane_format_modifiers_mc_ccs;
|
||||
else
|
||||
return gen12_plane_format_modifiers_rc_ccs;
|
||||
@ -3070,7 +3077,7 @@ skl_universal_plane_create(struct drm_i915_private *dev_priv,
|
||||
|
||||
plane->has_ccs = skl_plane_has_ccs(dev_priv, pipe, plane_id);
|
||||
if (INTEL_GEN(dev_priv) >= 12) {
|
||||
modifiers = gen12_get_plane_modifiers(plane_id);
|
||||
modifiers = gen12_get_plane_modifiers(dev_priv, plane_id);
|
||||
plane_funcs = &gen12_plane_funcs;
|
||||
} else {
|
||||
if (plane->has_ccs)
|
||||
|
@ -81,13 +81,14 @@ static void rps_enable_interrupts(struct intel_rps *rps)
|
||||
events = (GEN6_PM_RP_UP_THRESHOLD |
|
||||
GEN6_PM_RP_DOWN_THRESHOLD |
|
||||
GEN6_PM_RP_DOWN_TIMEOUT);
|
||||
|
||||
WRITE_ONCE(rps->pm_events, events);
|
||||
|
||||
spin_lock_irq(>->irq_lock);
|
||||
gen6_gt_pm_enable_irq(gt, rps->pm_events);
|
||||
spin_unlock_irq(>->irq_lock);
|
||||
|
||||
set(gt->uncore, GEN6_PMINTRMSK, rps_pm_mask(rps, rps->cur_freq));
|
||||
intel_uncore_write(gt->uncore,
|
||||
GEN6_PMINTRMSK, rps_pm_mask(rps, rps->last_freq));
|
||||
}
|
||||
|
||||
static void gen6_rps_reset_interrupts(struct intel_rps *rps)
|
||||
@ -120,7 +121,9 @@ static void rps_disable_interrupts(struct intel_rps *rps)
|
||||
struct intel_gt *gt = rps_to_gt(rps);
|
||||
|
||||
WRITE_ONCE(rps->pm_events, 0);
|
||||
set(gt->uncore, GEN6_PMINTRMSK, rps_pm_sanitize_mask(rps, ~0u));
|
||||
|
||||
intel_uncore_write(gt->uncore,
|
||||
GEN6_PMINTRMSK, rps_pm_sanitize_mask(rps, ~0u));
|
||||
|
||||
spin_lock_irq(>->irq_lock);
|
||||
gen6_gt_pm_disable_irq(gt, GEN6_PM_RPS_EVENTS);
|
||||
|
@ -1507,6 +1507,8 @@ IS_SUBPLATFORM(const struct drm_i915_private *i915,
|
||||
(IS_ICELAKE(p) && IS_REVID(p, since, until))
|
||||
|
||||
#define TGL_REVID_A0 0x0
|
||||
#define TGL_REVID_B0 0x1
|
||||
#define TGL_REVID_C0 0x2
|
||||
|
||||
#define IS_TGL_REVID(p, since, until) \
|
||||
(IS_TIGERLAKE(p) && IS_REVID(p, since, until))
|
||||
|
@ -34,8 +34,8 @@
|
||||
* Follow the style described here for new macros, and while changing existing
|
||||
* macros. Do **not** mass change existing definitions just to update the style.
|
||||
*
|
||||
* Layout
|
||||
* ~~~~~~
|
||||
* File Layout
|
||||
* ~~~~~~~~~~~
|
||||
*
|
||||
* Keep helper macros near the top. For example, _PIPE() and friends.
|
||||
*
|
||||
|
@ -1034,10 +1034,8 @@ static int meson_dw_hdmi_bind(struct device *dev, struct device *master,
|
||||
return PTR_ERR(dw_plat_data->regm);
|
||||
|
||||
irq = platform_get_irq(pdev, 0);
|
||||
if (irq < 0) {
|
||||
dev_err(dev, "Failed to get hdmi top irq\n");
|
||||
if (irq < 0)
|
||||
return irq;
|
||||
}
|
||||
|
||||
ret = devm_request_threaded_irq(dev, irq, dw_hdmi_top_irq,
|
||||
dw_hdmi_top_thread_irq, IRQF_SHARED,
|
||||
|
@ -676,7 +676,7 @@ drm_sched_get_cleanup_job(struct drm_gpu_scheduler *sched)
|
||||
*/
|
||||
if ((sched->timeout != MAX_SCHEDULE_TIMEOUT &&
|
||||
!cancel_delayed_work(&sched->work_tdr)) ||
|
||||
__kthread_should_park(sched->thread))
|
||||
kthread_should_park())
|
||||
return NULL;
|
||||
|
||||
spin_lock(&sched->job_list_lock);
|
||||
|
@ -379,9 +379,17 @@ static struct drm_crtc_state *tidss_crtc_duplicate_state(struct drm_crtc *crtc)
|
||||
return &state->base;
|
||||
}
|
||||
|
||||
static void tidss_crtc_destroy(struct drm_crtc *crtc)
|
||||
{
|
||||
struct tidss_crtc *tcrtc = to_tidss_crtc(crtc);
|
||||
|
||||
drm_crtc_cleanup(crtc);
|
||||
kfree(tcrtc);
|
||||
}
|
||||
|
||||
static const struct drm_crtc_funcs tidss_crtc_funcs = {
|
||||
.reset = tidss_crtc_reset,
|
||||
.destroy = drm_crtc_cleanup,
|
||||
.destroy = tidss_crtc_destroy,
|
||||
.set_config = drm_atomic_helper_set_config,
|
||||
.page_flip = drm_atomic_helper_page_flip,
|
||||
.atomic_duplicate_state = tidss_crtc_duplicate_state,
|
||||
@ -400,7 +408,7 @@ struct tidss_crtc *tidss_crtc_create(struct tidss_device *tidss,
|
||||
bool has_ctm = tidss->feat->vp_feat.color.has_ctm;
|
||||
int ret;
|
||||
|
||||
tcrtc = devm_kzalloc(tidss->dev, sizeof(*tcrtc), GFP_KERNEL);
|
||||
tcrtc = kzalloc(sizeof(*tcrtc), GFP_KERNEL);
|
||||
if (!tcrtc)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
@ -411,8 +419,10 @@ struct tidss_crtc *tidss_crtc_create(struct tidss_device *tidss,
|
||||
|
||||
ret = drm_crtc_init_with_planes(&tidss->ddev, crtc, primary,
|
||||
NULL, &tidss_crtc_funcs, NULL);
|
||||
if (ret < 0)
|
||||
if (ret < 0) {
|
||||
kfree(tcrtc);
|
||||
return ERR_PTR(ret);
|
||||
}
|
||||
|
||||
drm_crtc_helper_add(crtc, &tidss_crtc_helper_funcs);
|
||||
|
||||
|
@ -55,12 +55,18 @@ static int tidss_encoder_atomic_check(struct drm_encoder *encoder,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void tidss_encoder_destroy(struct drm_encoder *encoder)
|
||||
{
|
||||
drm_encoder_cleanup(encoder);
|
||||
kfree(encoder);
|
||||
}
|
||||
|
||||
static const struct drm_encoder_helper_funcs encoder_helper_funcs = {
|
||||
.atomic_check = tidss_encoder_atomic_check,
|
||||
};
|
||||
|
||||
static const struct drm_encoder_funcs encoder_funcs = {
|
||||
.destroy = drm_encoder_cleanup,
|
||||
.destroy = tidss_encoder_destroy,
|
||||
};
|
||||
|
||||
struct drm_encoder *tidss_encoder_create(struct tidss_device *tidss,
|
||||
@ -69,7 +75,7 @@ struct drm_encoder *tidss_encoder_create(struct tidss_device *tidss,
|
||||
struct drm_encoder *enc;
|
||||
int ret;
|
||||
|
||||
enc = devm_kzalloc(tidss->dev, sizeof(*enc), GFP_KERNEL);
|
||||
enc = kzalloc(sizeof(*enc), GFP_KERNEL);
|
||||
if (!enc)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
@ -77,8 +83,10 @@ struct drm_encoder *tidss_encoder_create(struct tidss_device *tidss,
|
||||
|
||||
ret = drm_encoder_init(&tidss->ddev, enc, &encoder_funcs,
|
||||
encoder_type, NULL);
|
||||
if (ret < 0)
|
||||
if (ret < 0) {
|
||||
kfree(enc);
|
||||
return ERR_PTR(ret);
|
||||
}
|
||||
|
||||
drm_encoder_helper_add(enc, &encoder_helper_funcs);
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user