Snap for 13129354 from 6648bfa888 to android12-5.10-keystone-qcom-release
Change-Id: Icbd672f3da6cc92b1225ccbf973e7d8be90a8ef5 Signed-off-by: Coastguard Worker <android-build-coastguard-worker@google.com>
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -125,7 +125,6 @@ GTAGS
|
||||
# id-utils files
|
||||
ID
|
||||
|
||||
*.orig
|
||||
*~
|
||||
\#*#
|
||||
|
||||
|
||||
@@ -131,6 +131,17 @@ Description:
|
||||
will be present in sysfs. Writing 1 to this file
|
||||
will perform reset.
|
||||
|
||||
What: /sys/bus/pci/devices/.../reset_subordinate
|
||||
Date: October 2024
|
||||
Contact: linux-pci@vger.kernel.org
|
||||
Description:
|
||||
This is visible only for bridge devices. If you want to reset
|
||||
all devices attached through the subordinate bus of a specific
|
||||
bridge device, writing 1 to this will try to do it. This will
|
||||
affect all devices attached to the system through this bridge
|
||||
similiar to writing 1 to their individual "reset" file, so use
|
||||
with caution.
|
||||
|
||||
What: /sys/bus/pci/devices/.../vpd
|
||||
Date: February 2008
|
||||
Contact: Ben Hutchings <bwh@kernel.org>
|
||||
|
||||
@@ -4161,6 +4161,16 @@
|
||||
printk.time= Show timing data prefixed to each printk message line
|
||||
Format: <bool> (1/Y/y=enable, 0/N/n=disable)
|
||||
|
||||
proc_mem.force_override= [KNL]
|
||||
Format: {always | ptrace | never}
|
||||
Traditionally /proc/pid/mem allows memory permissions to be
|
||||
overridden without restrictions. This option may be set to
|
||||
restrict that. Can be one of:
|
||||
- 'always': traditional behavior always allows mem overrides.
|
||||
- 'ptrace': only allow mem overrides for active ptracers.
|
||||
- 'never': never allow mem overrides.
|
||||
If not specified, default is the CONFIG_PROC_MEM_* choice.
|
||||
|
||||
processor.max_cstate= [HW,ACPI]
|
||||
Limit processor to maximum C-state
|
||||
max_cstate=9 overrides any DMI blacklist limit.
|
||||
|
||||
@@ -112,6 +112,8 @@ stable kernels.
|
||||
+----------------+-----------------+-----------------+-----------------------------+
|
||||
| ARM | Cortex-A710 | #3324338 | ARM64_ERRATUM_3194386 |
|
||||
+----------------+-----------------+-----------------+-----------------------------+
|
||||
| ARM | Cortex-A715 | #3456084 | ARM64_ERRATUM_3194386 |
|
||||
+----------------+-----------------+-----------------+-----------------------------+
|
||||
| ARM | Cortex-A720 | #3456091 | ARM64_ERRATUM_3194386 |
|
||||
+----------------+-----------------+-----------------+-----------------------------+
|
||||
| ARM | Cortex-A725 | #3456106 | ARM64_ERRATUM_3194386 |
|
||||
@@ -140,6 +142,8 @@ stable kernels.
|
||||
+----------------+-----------------+-----------------+-----------------------------+
|
||||
| ARM | Neoverse-N2 | #3324339 | ARM64_ERRATUM_3194386 |
|
||||
+----------------+-----------------+-----------------+-----------------------------+
|
||||
| ARM | Neoverse-N3 | #3456111 | ARM64_ERRATUM_3194386 |
|
||||
+----------------+-----------------+-----------------+-----------------------------+
|
||||
| ARM | Neoverse-V1 | #3324341 | ARM64_ERRATUM_3194386 |
|
||||
+----------------+-----------------+-----------------+-----------------------------+
|
||||
| ARM | Neoverse-V2 | #3324336 | ARM64_ERRATUM_3194386 |
|
||||
|
||||
@@ -147,6 +147,10 @@ The address of a chunk allocated with `kmalloc` is aligned to at least
|
||||
ARCH_KMALLOC_MINALIGN bytes. For sizes which are a power of two, the
|
||||
alignment is also guaranteed to be at least the respective size.
|
||||
|
||||
Chunks allocated with kmalloc() can be resized with krealloc(). Similarly
|
||||
to kmalloc_array(): a helper for resizing arrays is provided in the form of
|
||||
krealloc_array().
|
||||
|
||||
For large allocations you can use vmalloc() and vzalloc(), or directly
|
||||
request pages from the page allocator. The memory allocated by `vmalloc`
|
||||
and related functions is not physically contiguous.
|
||||
|
||||
67
Documentation/devicetree/bindings/clock/adi,axi-clkgen.yaml
Normal file
67
Documentation/devicetree/bindings/clock/adi,axi-clkgen.yaml
Normal file
@@ -0,0 +1,67 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/clock/adi,axi-clkgen.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Binding for Analog Devices AXI clkgen pcore clock generator
|
||||
|
||||
maintainers:
|
||||
- Lars-Peter Clausen <lars@metafoo.de>
|
||||
- Michael Hennerich <michael.hennerich@analog.com>
|
||||
|
||||
description: |
|
||||
The axi_clkgen IP core is a software programmable clock generator,
|
||||
that can be synthesized on various FPGA platforms.
|
||||
|
||||
Link: https://wiki.analog.com/resources/fpga/docs/axi_clkgen
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- adi,axi-clkgen-2.00.a
|
||||
|
||||
clocks:
|
||||
description:
|
||||
Specifies the reference clock(s) from which the output frequency is
|
||||
derived. This must either reference one clock if only the first clock
|
||||
input is connected or two if both clock inputs are connected. The last
|
||||
clock is the AXI bus clock that needs to be enabled so we can access the
|
||||
core registers.
|
||||
minItems: 2
|
||||
maxItems: 3
|
||||
|
||||
clock-names:
|
||||
oneOf:
|
||||
- items:
|
||||
- const: clkin1
|
||||
- const: s_axi_aclk
|
||||
- items:
|
||||
- const: clkin1
|
||||
- const: clkin2
|
||||
- const: s_axi_aclk
|
||||
|
||||
'#clock-cells':
|
||||
const: 0
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- clocks
|
||||
- clock-names
|
||||
- '#clock-cells'
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
clock-controller@ff000000 {
|
||||
compatible = "adi,axi-clkgen-2.00.a";
|
||||
#clock-cells = <0>;
|
||||
reg = <0xff000000 0x1000>;
|
||||
clocks = <&osc 1>, <&clkc 15>;
|
||||
clock-names = "clkin1", "s_axi_aclk";
|
||||
};
|
||||
@@ -1,25 +0,0 @@
|
||||
Binding for the axi-clkgen clock generator
|
||||
|
||||
This binding uses the common clock binding[1].
|
||||
|
||||
[1] Documentation/devicetree/bindings/clock/clock-bindings.txt
|
||||
|
||||
Required properties:
|
||||
- compatible : shall be "adi,axi-clkgen-1.00.a" or "adi,axi-clkgen-2.00.a".
|
||||
- #clock-cells : from common clock binding; Should always be set to 0.
|
||||
- reg : Address and length of the axi-clkgen register set.
|
||||
- clocks : Phandle and clock specifier for the parent clock(s). This must
|
||||
either reference one clock if only the first clock input is connected or two
|
||||
if both clock inputs are connected. For the later case the clock connected
|
||||
to the first input must be specified first.
|
||||
|
||||
Optional properties:
|
||||
- clock-output-names : From common clock binding.
|
||||
|
||||
Example:
|
||||
clock@ff000000 {
|
||||
compatible = "adi,axi-clkgen";
|
||||
#clock-cells = <0>;
|
||||
reg = <0xff000000 0x1000>;
|
||||
clocks = <&osc 1>;
|
||||
};
|
||||
@@ -18,16 +18,15 @@ properties:
|
||||
description: prop-encoded-array <a b>
|
||||
$ref: /schemas/types.yaml#/definitions/uint32-array
|
||||
items:
|
||||
items:
|
||||
- description: Delay between rts signal and beginning of data sent in
|
||||
milliseconds. It corresponds to the delay before sending data.
|
||||
default: 0
|
||||
maximum: 1000
|
||||
- description: Delay between end of data sent and rts signal in milliseconds.
|
||||
It corresponds to the delay after sending data and actual release
|
||||
of the line.
|
||||
default: 0
|
||||
maximum: 1000
|
||||
- description: Delay between rts signal and beginning of data sent in
|
||||
milliseconds. It corresponds to the delay before sending data.
|
||||
default: 0
|
||||
maximum: 100
|
||||
- description: Delay between end of data sent and rts signal in milliseconds.
|
||||
It corresponds to the delay after sending data and actual release
|
||||
of the line.
|
||||
default: 0
|
||||
maximum: 100
|
||||
|
||||
rs485-rts-active-low:
|
||||
description: drive RTS low when sending (default is high).
|
||||
|
||||
@@ -23,8 +23,8 @@ properties:
|
||||
Indicates how many data pins are used to transmit two channels of PDM
|
||||
signal. 0 means two wires, 1 means one wire. Default value is 0.
|
||||
enum:
|
||||
- 0 # one wire
|
||||
- 1 # two wires
|
||||
- 0 # two wires
|
||||
- 1 # one wire
|
||||
|
||||
mediatek,mic-type-0:
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
@@ -53,9 +53,9 @@ additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
mt6359codec: mt6359codec {
|
||||
mediatek,dmic-mode = <0>;
|
||||
mediatek,mic-type-0 = <2>;
|
||||
mt6359codec: audio-codec {
|
||||
mediatek,dmic-mode = <0>;
|
||||
mediatek,mic-type-0 = <2>;
|
||||
};
|
||||
|
||||
...
|
||||
|
||||
@@ -718,6 +718,8 @@ patternProperties:
|
||||
description: National Semiconductor
|
||||
"^nec,.*":
|
||||
description: NEC LCD Technologies, Ltd.
|
||||
"^neofidelity,.*":
|
||||
description: Neofidelity Inc.
|
||||
"^neonode,.*":
|
||||
description: Neonode Inc.
|
||||
"^netgear,.*":
|
||||
|
||||
@@ -169,6 +169,12 @@ DMA Fence Array
|
||||
.. kernel-doc:: include/linux/dma-fence-array.h
|
||||
:internal:
|
||||
|
||||
DMA Fence unwrap
|
||||
~~~~~~~~~~~~~~~~
|
||||
|
||||
.. kernel-doc:: include/linux/dma-fence-unwrap.h
|
||||
:internal:
|
||||
|
||||
DMA Fence uABI/Sync File
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
@@ -519,7 +519,7 @@ at module load time (for a module) with::
|
||||
alerts_broken
|
||||
|
||||
The addresses are normal I2C addresses. The adapter is the string
|
||||
name of the adapter, as shown in /sys/class/i2c-adapter/i2c-<n>/name.
|
||||
name of the adapter, as shown in /sys/bus/i2c/devices/i2c-<n>/name.
|
||||
It is *NOT* i2c-<n> itself. Also, the comparison is done ignoring
|
||||
spaces, so if the name is "This is an I2C chip" you can say
|
||||
adapter_name=ThisisanI2cchip. This is because it's hard to pass in
|
||||
|
||||
@@ -778,7 +778,8 @@ process the parameters it is given.
|
||||
|
||||
* ::
|
||||
|
||||
bool fs_validate_description(const struct fs_parameter_description *desc);
|
||||
bool fs_validate_description(const char *name,
|
||||
const struct fs_parameter_description *desc);
|
||||
|
||||
This performs some validation checks on a parameter description. It
|
||||
returns true if the description is good and false if it is not. It will
|
||||
|
||||
@@ -83,7 +83,7 @@ format, the Group Extension is set in the PS-field.
|
||||
|
||||
On the other hand, when using PDU1 format, the PS-field contains a so-called
|
||||
Destination Address, which is _not_ part of the PGN. When communicating a PGN
|
||||
from user space to kernel (or vice versa) and PDU2 format is used, the PS-field
|
||||
from user space to kernel (or vice versa) and PDU1 format is used, the PS-field
|
||||
of the PGN shall be set to zero. The Destination Address shall be set
|
||||
elsewhere.
|
||||
|
||||
|
||||
@@ -441,17 +441,17 @@ Function-specific configfs interface
|
||||
The function name to use when creating the function directory is "ncm".
|
||||
The NCM function provides these attributes in its function directory:
|
||||
|
||||
=============== ==================================================
|
||||
ifname network device interface name associated with this
|
||||
function instance
|
||||
qmult queue length multiplier for high and super speed
|
||||
host_addr MAC address of host's end of this
|
||||
Ethernet over USB link
|
||||
dev_addr MAC address of device's end of this
|
||||
Ethernet over USB link
|
||||
max_segment_size Segment size required for P2P connections. This
|
||||
will set MTU to (max_segment_size - 14 bytes)
|
||||
=============== ==================================================
|
||||
======================= ==================================================
|
||||
ifname network device interface name associated with this
|
||||
function instance
|
||||
qmult queue length multiplier for high and super speed
|
||||
host_addr MAC address of host's end of this
|
||||
Ethernet over USB link
|
||||
dev_addr MAC address of device's end of this
|
||||
Ethernet over USB link
|
||||
max_segment_size Segment size required for P2P connections. This
|
||||
will set MTU to 14 bytes
|
||||
======================= ==================================================
|
||||
|
||||
and after creating the functions/ncm.<instance name> they contain default
|
||||
values: qmult is 5, dev_addr and host_addr are randomly selected.
|
||||
|
||||
2
Makefile
2
Makefile
@@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 5
|
||||
PATCHLEVEL = 10
|
||||
SUBLEVEL = 226
|
||||
SUBLEVEL = 233
|
||||
EXTRAVERSION =
|
||||
NAME = Dare mighty things
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
127
android/abi_gki_aarch64.xml.allowed_breaks
Normal file
127
android/abi_gki_aarch64.xml.allowed_breaks
Normal file
@@ -0,0 +1,127 @@
|
||||
# How to use this file: http://go/approve-abi-break
|
||||
# ABI freeze commit: 870488eb0745645feff5bddfd44fe538660b9cf8
|
||||
|
||||
type 'struct xhci_hcd' changed
|
||||
member 'u64 android_kabi_reserved1' was removed
|
||||
member 'union { struct xhci_vendor_ops* vendor_ops; struct { u64 android_kabi_reserved1; }; union { }; }' was added
|
||||
|
||||
type 'struct xhci_hcd' changed
|
||||
member changed from 'union { struct xhci_vendor_ops* vendor_ops; struct { u64 android_kabi_reserved1; } __UNIQUE_ID_android_kabi_hide315; union { }; }' to 'union { struct xhci_vendor_ops* vendor_ops; struct { u64 android_kabi_reserved1; }; union { }; }'
|
||||
type changed from 'union { struct xhci_vendor_ops* vendor_ops; struct { u64 android_kabi_reserved1; } __UNIQUE_ID_android_kabi_hide315; union { }; }' to 'union { struct xhci_vendor_ops* vendor_ops; struct { u64 android_kabi_reserved1; }; union { }; }'
|
||||
member 'struct { u64 android_kabi_reserved1; } __UNIQUE_ID_android_kabi_hide315' was removed
|
||||
member 'struct { u64 android_kabi_reserved1; }' was added
|
||||
|
||||
type 'struct spi_controller' changed
|
||||
member changed from 'u8 unused_native_cs' to 's8 unused_native_cs'
|
||||
type changed from 'u8' = '__u8' = 'unsigned char' to 's8' = '__s8' = 'signed char'
|
||||
resolved type changed from 'unsigned char' to 'signed char'
|
||||
member changed from 'u8 max_native_cs' to 's8 max_native_cs'
|
||||
type changed from 'u8' = '__u8' = 'unsigned char' to 's8' = '__s8' = 'signed char'
|
||||
resolved type changed from 'unsigned char' to 'signed char'
|
||||
|
||||
type 'struct xhci_hcd' changed
|
||||
member changed from 'union { struct xhci_vendor_ops* vendor_ops; struct { u64 android_kabi_reserved1; } __UNIQUE_ID_android_kabi_hide316; union { }; }' to 'union { struct xhci_vendor_ops* vendor_ops; struct { u64 android_kabi_reserved1; }; union { }; }'
|
||||
type changed from 'union { struct xhci_vendor_ops* vendor_ops; struct { u64 android_kabi_reserved1; } __UNIQUE_ID_android_kabi_hide316; union { }; }' to 'union { struct xhci_vendor_ops* vendor_ops; struct { u64 android_kabi_reserved1; }; union { }; }'
|
||||
member 'struct { u64 android_kabi_reserved1; } __UNIQUE_ID_android_kabi_hide316' was removed
|
||||
member 'struct { u64 android_kabi_reserved1; }' was added
|
||||
|
||||
type 'struct ehci_hcd' changed
|
||||
member 'unsigned int is_aspeed' was added
|
||||
|
||||
type 'struct fscrypt_mode' changed
|
||||
byte size changed from 32 to 40
|
||||
member 'int security_strength' was added
|
||||
3 members ('int ivsize' .. 'enum blk_crypto_mode_num blk_crypto_mode') changed
|
||||
offset changed by 32
|
||||
|
||||
type 'struct sock' changed
|
||||
member 'u64 android_kabi_reserved1' was removed
|
||||
member 'union { spinlock_t sk_peer_lock; struct { u64 android_kabi_reserved1; }; union { }; }' was added
|
||||
|
||||
type 'struct bpf_map' changed
|
||||
member changed from 'u64 writecnt' to 'atomic64_t writecnt'
|
||||
type changed from 'u64' = '__u64' = 'long long unsigned int' to 'atomic64_t' = 'struct { s64 counter; }'
|
||||
resolved type changed from 'long long unsigned int' to 'struct { s64 counter; }'
|
||||
|
||||
type 'struct fib_rules_ops' changed
|
||||
member changed from 'bool(* suppress)(struct fib_rule*, struct fib_lookup_arg*)' to 'bool(* suppress)(struct fib_rule*, int, struct fib_lookup_arg*)'
|
||||
type changed from 'bool(*)(struct fib_rule*, struct fib_lookup_arg*)' to 'bool(*)(struct fib_rule*, int, struct fib_lookup_arg*)'
|
||||
pointed-to type changed from 'bool(struct fib_rule*, struct fib_lookup_arg*)' to 'bool(struct fib_rule*, int, struct fib_lookup_arg*)'
|
||||
parameter 2 type changed from 'struct fib_lookup_arg*' to 'int'
|
||||
parameter 3 of type 'struct fib_lookup_arg*' was added
|
||||
|
||||
type 'struct snd_pcm_runtime' changed
|
||||
byte size changed from 768 to 824
|
||||
member 'struct mutex buffer_mutex' was added
|
||||
member 'atomic_t buffer_accessing' was added
|
||||
|
||||
type 'struct gpio_irq_chip' changed
|
||||
member 'u64 android_kabi_reserved1' was removed
|
||||
member 'union { bool initialized; struct { u64 android_kabi_reserved1; }; union { }; }' was added
|
||||
|
||||
function symbol changed from 'int hex_to_bin(char)' to 'int hex_to_bin(unsigned char)'
|
||||
type changed from 'int(char)' to 'int(unsigned char)'
|
||||
parameter 1 type changed from 'char' to 'unsigned char'
|
||||
|
||||
1 variable symbol(s) removed
|
||||
'struct tracepoint __tracepoint_android_vh_record_percpu_rwsem_lock_starttime'
|
||||
|
||||
1 function symbol(s) removed
|
||||
'int __traceiter_android_vh_record_percpu_rwsem_lock_starttime(void*, struct task_struct*, unsigned long int)'
|
||||
|
||||
type 'struct fscrypt_info' changed
|
||||
member changed from 'struct key* ci_master_key' to 'struct fscrypt_master_key* ci_master_key'
|
||||
type changed from 'struct key*' to 'struct fscrypt_master_key*'
|
||||
pointed-to type changed from 'struct key' to 'struct fscrypt_master_key'
|
||||
|
||||
type 'struct tcp_sock' changed
|
||||
member 'u32 max_packets_seq' was removed
|
||||
member 'u32 cwnd_usage_seq' was added
|
||||
|
||||
type 'struct iphdr' changed
|
||||
member '__be32 saddr' was removed
|
||||
member '__be32 daddr' was removed
|
||||
member 'union { struct { __be32 saddr; __be32 daddr; }; struct { __be32 saddr; __be32 daddr; } addrs; }' was added
|
||||
|
||||
type 'struct super_block' changed
|
||||
member changed from 'struct key* s_master_keys' to 'struct fscrypt_keyring* s_master_keys'
|
||||
type changed from 'struct key*' to 'struct fscrypt_keyring*'
|
||||
pointed-to type changed from 'struct key' to 'struct fscrypt_keyring'
|
||||
|
||||
type 'struct sk_buff' changed
|
||||
member 'u64 android_kabi_reserved1' was removed
|
||||
member 'union { struct { __u8 scm_io_uring; __u8 android_kabi_reserved1_padding1; __u16 android_kabi_reserved1_padding2; __u32 android_kabi_reserved1_padding3; }; struct { u64 android_kabi_reserved1; }; union { }; }' was added
|
||||
|
||||
type 'struct task_struct' changed
|
||||
member 'u64 android_kabi_reserved1' was removed
|
||||
member 'union { void* pf_io_worker; struct { u64 android_kabi_reserved1; }; union { }; }' was added
|
||||
|
||||
type 'struct anon_vma' changed
|
||||
byte size changed from 104 to 120
|
||||
member 'unsigned long int num_children' was added
|
||||
member 'unsigned long int num_active_vmas' was added
|
||||
|
||||
function symbol changed from 'struct irq_domain* __irq_domain_add(struct fwnode_handle*, int, irq_hw_number_t, int, const struct irq_domain_ops*, void*)' to 'struct irq_domain* __irq_domain_add(struct fwnode_handle*, unsigned int, irq_hw_number_t, int, const struct irq_domain_ops*, void*)'
|
||||
type changed from 'struct irq_domain*(struct fwnode_handle*, int, irq_hw_number_t, int, const struct irq_domain_ops*, void*)' to 'struct irq_domain*(struct fwnode_handle*, unsigned int, irq_hw_number_t, int, const struct irq_domain_ops*, void*)'
|
||||
parameter 2 type changed from 'int' to 'unsigned int'
|
||||
|
||||
function symbol changed from 'is_ashmem_file' to 'int is_ashmem_file(struct file*)'
|
||||
CRC changed from 0x4bef6e5f to 0x94fc40b5
|
||||
|
||||
type 'struct perf_event' changed
|
||||
member 'unsigned int group_generation' was added
|
||||
|
||||
type 'struct ipv6_devconf' changed
|
||||
member 'u64 android_kabi_reserved1' was removed
|
||||
member 'union { struct { __s32 accept_ra_min_lft; u32 padding; }; struct { u64 android_kabi_reserved1; }; union { }; }' was added
|
||||
|
||||
type 'struct clk_core' changed
|
||||
byte size changed from 248 to 264
|
||||
member 'struct hlist_node rpm_node' was added
|
||||
30 members ('struct device_node* of_node' .. 'struct kref ref') changed
|
||||
offset changed by 128
|
||||
|
||||
type 'enum binder_work_type' changed
|
||||
enumerator 'BINDER_WORK_FROZEN_BINDER' (9) was added
|
||||
... 1 other enumerator(s) added
|
||||
|
||||
@@ -62,6 +62,7 @@
|
||||
bitmap_release_region
|
||||
__bitmap_replace
|
||||
__bitmap_set
|
||||
__bitmap_weight
|
||||
blk_alloc_queue
|
||||
blk_cleanup_queue
|
||||
blk_queue_flag_clear
|
||||
@@ -362,6 +363,7 @@
|
||||
_dev_info
|
||||
__dev_kfree_skb_any
|
||||
devm_add_action
|
||||
devm_backlight_device_register
|
||||
devm_blk_ksm_init
|
||||
devm_clk_bulk_get
|
||||
devm_clk_bulk_get_all
|
||||
@@ -414,6 +416,7 @@
|
||||
devm_platform_get_and_ioremap_resource
|
||||
devm_platform_ioremap_resource
|
||||
devm_platform_ioremap_resource_byname
|
||||
devm_power_supply_get_by_phandle
|
||||
devm_power_supply_register
|
||||
devm_pwm_put
|
||||
devm_regmap_add_irq_chip
|
||||
@@ -424,7 +427,6 @@
|
||||
__devm_regmap_init_mmio_clk
|
||||
devm_regulator_bulk_get
|
||||
devm_regulator_get
|
||||
devm_regulator_get_exclusive
|
||||
devm_regulator_get_optional
|
||||
devm_regulator_put
|
||||
devm_regulator_register
|
||||
@@ -1005,7 +1007,11 @@
|
||||
__iio_device_register
|
||||
iio_device_release_direct_mode
|
||||
iio_device_unregister
|
||||
iio_enum_available_read
|
||||
iio_enum_read
|
||||
iio_enum_write
|
||||
iio_get_time_ns
|
||||
iio_pollfunc_store_time
|
||||
iio_push_event
|
||||
iio_push_to_buffers
|
||||
iio_read_channel_processed
|
||||
@@ -1662,9 +1668,11 @@
|
||||
__pm_runtime_use_autosuspend
|
||||
__pm_stay_awake
|
||||
pm_stay_awake
|
||||
pm_suspend_global_flags
|
||||
pm_system_wakeup
|
||||
pm_wakeup_dev_event
|
||||
pm_wakeup_ws_event
|
||||
power_supply_am_i_supplied
|
||||
power_supply_changed
|
||||
power_supply_get_battery_info
|
||||
power_supply_get_by_name
|
||||
@@ -1674,8 +1682,10 @@
|
||||
power_supply_put_battery_info
|
||||
power_supply_register
|
||||
power_supply_register_no_ws
|
||||
power_supply_reg_notifier
|
||||
power_supply_set_property
|
||||
power_supply_unregister
|
||||
power_supply_unreg_notifier
|
||||
prandom_bytes
|
||||
prandom_u32
|
||||
preempt_schedule
|
||||
@@ -1814,6 +1824,7 @@
|
||||
regulator_is_supported_voltage
|
||||
regulator_list_voltage_linear
|
||||
regulator_list_voltage_linear_range
|
||||
regulator_map_voltage_linear
|
||||
regulator_map_voltage_linear_range
|
||||
regulator_notifier_call_chain
|
||||
regulator_put
|
||||
@@ -1824,6 +1835,7 @@
|
||||
regulator_set_mode
|
||||
regulator_set_voltage
|
||||
regulator_set_voltage_sel_regmap
|
||||
regulator_sync_voltage
|
||||
regulator_unregister_notifier
|
||||
release_firmware
|
||||
__release_region
|
||||
@@ -2577,3 +2589,4 @@
|
||||
# preserved by --additions-only
|
||||
debugfs_file_get
|
||||
debugfs_file_put
|
||||
devm_regulator_get_exclusive
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
__pmd_trans_huge_lock
|
||||
__traceiter_android_rvh_dma_buf_stats_teardown
|
||||
__traceiter_android_vh_tune_fault_around_bytes
|
||||
__traceiter_android_vh_io_statistics
|
||||
__traceiter_android_vh_do_swap_page_spf
|
||||
__traceiter_android_vh_should_fault_around
|
||||
__traceiter_android_vh_do_read_fault
|
||||
@@ -15,6 +16,7 @@
|
||||
__traceiter_android_vh_filemap_map_pages
|
||||
__tracepoint_android_rvh_dma_buf_stats_teardown
|
||||
__tracepoint_android_vh_tune_fault_around_bytes
|
||||
__tracepoint_android_vh_io_statistics
|
||||
__tracepoint_android_vh_do_swap_page_spf
|
||||
__tracepoint_android_vh_should_fault_around
|
||||
__tracepoint_android_vh_do_read_fault
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
bpf_trace_run4
|
||||
bpf_trace_run5
|
||||
bpf_trace_run6
|
||||
blk_mq_quiesce_queue_nowait
|
||||
bt_err
|
||||
bt_info
|
||||
bt_warn
|
||||
|
||||
@@ -611,6 +611,7 @@ config SHADOW_CALL_STACK
|
||||
bool "Clang Shadow Call Stack"
|
||||
depends on CC_IS_CLANG && ARCH_SUPPORTS_SHADOW_CALL_STACK
|
||||
depends on DYNAMIC_FTRACE_WITH_REGS || !FUNCTION_GRAPH_TRACER
|
||||
depends on MMU
|
||||
help
|
||||
This option enables Clang's Shadow Call Stack, which uses a
|
||||
shadow stack to protect function return addresses from being
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
KBUILD_DEFCONFIG := haps_hs_smp_defconfig
|
||||
|
||||
ifeq ($(CROSS_COMPILE),)
|
||||
CROSS_COMPILE := $(call cc-cross-prefix, arc-linux- arceb-linux-)
|
||||
CROSS_COMPILE := $(call cc-cross-prefix, arc-linux- arceb-linux- arc-linux-gnu-)
|
||||
endif
|
||||
|
||||
cflags-y += -fno-common -pipe -fno-builtin -mmedium-calls -D__linux__
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
};
|
||||
|
||||
&hdmi {
|
||||
hpd-gpios = <&expgpio 1 GPIO_ACTIVE_LOW>;
|
||||
hpd-gpios = <&expgpio 0 GPIO_ACTIVE_LOW>;
|
||||
power-domains = <&power RPI_POWER_DOMAIN_HDMI>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -350,7 +350,7 @@
|
||||
|
||||
&iomuxc_lpsr {
|
||||
pinctrl_enet1_phy_interrupt: enet1phyinterruptgrp {
|
||||
fsl,phy = <
|
||||
fsl,pins = <
|
||||
MX7D_PAD_LPSR_GPIO1_IO02__GPIO1_IO2 0x08
|
||||
>;
|
||||
};
|
||||
|
||||
@@ -300,8 +300,8 @@
|
||||
&i2c2 {
|
||||
status = "okay";
|
||||
|
||||
rt5616: rt5616@1b {
|
||||
compatible = "rt5616";
|
||||
rt5616: audio-codec@1b {
|
||||
compatible = "realtek,rt5616";
|
||||
reg = <0x1b>;
|
||||
clocks = <&cru SCLK_I2S_OUT>;
|
||||
clock-names = "mclk";
|
||||
|
||||
@@ -316,12 +316,13 @@
|
||||
};
|
||||
};
|
||||
|
||||
acodec: acodec-ana@20030000 {
|
||||
compatible = "rk3036-codec";
|
||||
acodec: audio-codec@20030000 {
|
||||
compatible = "rockchip,rk3036-codec";
|
||||
reg = <0x20030000 0x4000>;
|
||||
rockchip,grf = <&grf>;
|
||||
clock-names = "acodec_pclk";
|
||||
clocks = <&cru PCLK_ACODEC>;
|
||||
rockchip,grf = <&grf>;
|
||||
#sound-dai-cells = <0>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@@ -331,7 +332,6 @@
|
||||
interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&cru PCLK_HDMI>;
|
||||
clock-names = "pclk";
|
||||
rockchip,grf = <&grf>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&hdmi_ctl>;
|
||||
status = "disabled";
|
||||
@@ -488,11 +488,11 @@
|
||||
};
|
||||
|
||||
spi: spi@20074000 {
|
||||
compatible = "rockchip,rockchip-spi";
|
||||
compatible = "rockchip,rk3036-spi";
|
||||
reg = <0x20074000 0x1000>;
|
||||
interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&cru PCLK_SPI>, <&cru SCLK_SPI>;
|
||||
clock-names = "apb-pclk","spi_pclk";
|
||||
clocks = <&cru SCLK_SPI>, <&cru PCLK_SPI>;
|
||||
clock-names = "spiclk", "apb_pclk";
|
||||
dmas = <&pdma 8>, <&pdma 9>;
|
||||
dma-names = "tx", "rx";
|
||||
pinctrl-names = "default";
|
||||
|
||||
@@ -692,7 +692,7 @@
|
||||
compatible = "microchip,sam9x60-rtt", "atmel,at91sam9260-rtt";
|
||||
reg = <0xfffffe20 0x20>;
|
||||
interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
|
||||
clocks = <&clk32k 0>;
|
||||
clocks = <&clk32k 1>;
|
||||
};
|
||||
|
||||
pit: timer@fffffe40 {
|
||||
@@ -718,7 +718,7 @@
|
||||
compatible = "microchip,sam9x60-rtc", "atmel,at91sam9x5-rtc";
|
||||
reg = <0xfffffea8 0x100>;
|
||||
interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
|
||||
clocks = <&clk32k 0>;
|
||||
clocks = <&clk32k 1>;
|
||||
};
|
||||
|
||||
watchdog: watchdog@ffffff80 {
|
||||
|
||||
@@ -280,8 +280,8 @@
|
||||
|
||||
reg_dcdc5: dcdc5 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <1425000>;
|
||||
regulator-max-microvolt = <1575000>;
|
||||
regulator-min-microvolt = <1450000>;
|
||||
regulator-max-microvolt = <1550000>;
|
||||
regulator-name = "vcc-dram";
|
||||
};
|
||||
|
||||
|
||||
@@ -66,6 +66,7 @@ static void __init realview_smp_prepare_cpus(unsigned int max_cpus)
|
||||
return;
|
||||
}
|
||||
map = syscon_node_to_regmap(np);
|
||||
of_node_put(np);
|
||||
if (IS_ERR(map)) {
|
||||
pr_err("PLATSMP: No syscon regmap\n");
|
||||
return;
|
||||
|
||||
@@ -782,6 +782,7 @@ config ARM64_ERRATUM_3194386
|
||||
* ARM Cortex-A78C erratum 3324346
|
||||
* ARM Cortex-A78C erratum 3324347
|
||||
* ARM Cortex-A710 erratam 3324338
|
||||
* ARM Cortex-A715 errartum 3456084
|
||||
* ARM Cortex-A720 erratum 3456091
|
||||
* ARM Cortex-A725 erratum 3456106
|
||||
* ARM Cortex-X1 erratum 3324344
|
||||
@@ -792,6 +793,7 @@ config ARM64_ERRATUM_3194386
|
||||
* ARM Cortex-X925 erratum 3324334
|
||||
* ARM Neoverse-N1 erratum 3324349
|
||||
* ARM Neoverse N2 erratum 3324339
|
||||
* ARM Neoverse-N3 erratum 3456111
|
||||
* ARM Neoverse-V1 erratum 3324341
|
||||
* ARM Neoverse V2 erratum 3324336
|
||||
* ARM Neoverse-V3 erratum 3312417
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#
|
||||
# Copyright (C) 1995-2001 by Russell King
|
||||
|
||||
LDFLAGS_vmlinux :=--no-undefined -X
|
||||
LDFLAGS_vmlinux :=--no-undefined -X --pic-veneer
|
||||
|
||||
ifeq ($(CONFIG_RELOCATABLE), y)
|
||||
# Pass --no-apply-dynamic-relocs to restore pre-binutils-2.27 behaviour
|
||||
|
||||
@@ -157,6 +157,9 @@
|
||||
interrupts = <7 5 IRQ_TYPE_EDGE_RISING>; /* PH5 */
|
||||
vdd-supply = <®_dldo1>;
|
||||
vddio-supply = <®_dldo1>;
|
||||
mount-matrix = "0", "1", "0",
|
||||
"-1", "0", "0",
|
||||
"0", "0", "1";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -659,7 +659,7 @@
|
||||
compatible = "fsl,imx8mp-usdhc", "fsl,imx7d-usdhc";
|
||||
reg = <0x30b40000 0x10000>;
|
||||
interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clk IMX8MP_CLK_DUMMY>,
|
||||
clocks = <&clk IMX8MP_CLK_IPG_ROOT>,
|
||||
<&clk IMX8MP_CLK_NAND_USDHC_BUS>,
|
||||
<&clk IMX8MP_CLK_USDHC1_ROOT>;
|
||||
clock-names = "ipg", "ahb", "per";
|
||||
@@ -673,7 +673,7 @@
|
||||
compatible = "fsl,imx8mp-usdhc", "fsl,imx7d-usdhc";
|
||||
reg = <0x30b50000 0x10000>;
|
||||
interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clk IMX8MP_CLK_DUMMY>,
|
||||
clocks = <&clk IMX8MP_CLK_IPG_ROOT>,
|
||||
<&clk IMX8MP_CLK_NAND_USDHC_BUS>,
|
||||
<&clk IMX8MP_CLK_USDHC2_ROOT>;
|
||||
clock-names = "ipg", "ahb", "per";
|
||||
@@ -687,7 +687,7 @@
|
||||
compatible = "fsl,imx8mp-usdhc", "fsl,imx7d-usdhc";
|
||||
reg = <0x30b60000 0x10000>;
|
||||
interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clk IMX8MP_CLK_DUMMY>,
|
||||
clocks = <&clk IMX8MP_CLK_IPG_ROOT>,
|
||||
<&clk IMX8MP_CLK_NAND_USDHC_BUS>,
|
||||
<&clk IMX8MP_CLK_USDHC3_ROOT>;
|
||||
clock-names = "ipg", "ahb", "per";
|
||||
|
||||
@@ -43,6 +43,14 @@
|
||||
interrupts = <117 IRQ_TYPE_LEVEL_LOW>;
|
||||
reg = <0x2c>;
|
||||
hid-descr-addr = <0x0020>;
|
||||
/*
|
||||
* The trackpad needs a post-power-on delay of 100ms,
|
||||
* but at time of writing, the power supply for it on
|
||||
* this board is always on. The delay is therefore not
|
||||
* added to avoid impacting the readiness of the
|
||||
* trackpad.
|
||||
*/
|
||||
vdd-supply = <&mt6397_vgp6_reg>;
|
||||
wakeup-source;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -85,9 +85,9 @@
|
||||
status = "okay";
|
||||
clock-frequency = <400000>;
|
||||
|
||||
eeprom@54 {
|
||||
eeprom@50 {
|
||||
compatible = "atmel,24c32";
|
||||
reg = <0x54>;
|
||||
reg = <0x50>;
|
||||
pagesize = <32>;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -30,14 +30,14 @@
|
||||
|
||||
power_led: led-0 {
|
||||
label = "firefly:red:power";
|
||||
linux,default-trigger = "ir-power-click";
|
||||
linux,default-trigger = "default-on";
|
||||
default-state = "on";
|
||||
gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
user_led: led-1 {
|
||||
label = "firefly:blue:user";
|
||||
linux,default-trigger = "ir-user-click";
|
||||
linux,default-trigger = "rc-feedback";
|
||||
default-state = "off";
|
||||
gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
@@ -715,8 +715,7 @@
|
||||
compatible = "rockchip,rk3328-dw-hdmi";
|
||||
reg = <0x0 0xff3c0000 0x0 0x20000>;
|
||||
reg-io-width = <4>;
|
||||
interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&cru PCLK_HDMI>,
|
||||
<&cru SCLK_HDMI_SFC>,
|
||||
<&cru SCLK_RTC32K>;
|
||||
|
||||
@@ -56,7 +56,6 @@
|
||||
fan: fan@18 {
|
||||
compatible = "ti,amc6821";
|
||||
reg = <0x18>;
|
||||
#cooling-cells = <2>;
|
||||
};
|
||||
|
||||
rtc_twi: rtc@6f {
|
||||
|
||||
@@ -25,12 +25,12 @@
|
||||
backlight: edp-backlight {
|
||||
compatible = "pwm-backlight";
|
||||
power-supply = <&vcc_12v>;
|
||||
pwms = <&pwm0 0 740740 0>;
|
||||
pwms = <&pwm0 0 125000 0>;
|
||||
};
|
||||
|
||||
bat: battery {
|
||||
compatible = "simple-battery";
|
||||
charge-full-design-microamp-hours = <9800000>;
|
||||
charge-full-design-microamp-hours = <10000000>;
|
||||
voltage-max-design-microvolt = <4350000>;
|
||||
voltage-min-design-microvolt = <3000000>;
|
||||
};
|
||||
|
||||
@@ -148,6 +148,22 @@
|
||||
drive-impedance-ohm = <33>;
|
||||
};
|
||||
|
||||
&gpio3 {
|
||||
/*
|
||||
* The Qseven BIOS_DISABLE signal on the RK3399-Q7 keeps the on-module
|
||||
* eMMC and SPI flash powered-down initially (in fact it keeps the
|
||||
* reset signal asserted). BIOS_DISABLE_OVERRIDE pin allows to override
|
||||
* that signal so that eMMC and SPI can be used regardless of the state
|
||||
* of the signal.
|
||||
*/
|
||||
bios-disable-override-hog {
|
||||
gpios = <RK_PD5 GPIO_ACTIVE_LOW>;
|
||||
gpio-hog;
|
||||
line-name = "bios_disable_override";
|
||||
output-high;
|
||||
};
|
||||
};
|
||||
|
||||
&gmac {
|
||||
assigned-clocks = <&cru SCLK_RMII_SRC>;
|
||||
assigned-clock-parents = <&clkin_gmac>;
|
||||
@@ -437,9 +453,14 @@
|
||||
|
||||
&pinctrl {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&q7_thermal_pin>;
|
||||
pinctrl-0 = <&q7_thermal_pin &bios_disable_override_hog_pin>;
|
||||
|
||||
gpios {
|
||||
bios_disable_override_hog_pin: bios-disable-override-hog-pin {
|
||||
rockchip,pins =
|
||||
<3 RK_PD5 RK_FUNC_GPIO &pcfg_pull_down>;
|
||||
};
|
||||
|
||||
q7_thermal_pin: q7-thermal-pin {
|
||||
rockchip,pins =
|
||||
<0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
|
||||
@@ -568,7 +568,7 @@
|
||||
bluetooth {
|
||||
compatible = "brcm,bcm43438-bt";
|
||||
clocks = <&rk808 1>;
|
||||
clock-names = "ext_clock";
|
||||
clock-names = "txco";
|
||||
device-wakeup-gpios = <&gpio2 RK_PD3 GPIO_ACTIVE_HIGH>;
|
||||
host-wakeup-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_HIGH>;
|
||||
shutdown-gpios = <&gpio0 RK_PB1 GPIO_ACTIVE_HIGH>;
|
||||
|
||||
@@ -159,7 +159,7 @@
|
||||
status = "okay";
|
||||
|
||||
rt5651: rt5651@1a {
|
||||
compatible = "rockchip,rt5651";
|
||||
compatible = "realtek,rt5651";
|
||||
reg = <0x1a>;
|
||||
clocks = <&cru SCLK_I2S_8CH_OUT>;
|
||||
clock-names = "mclk";
|
||||
|
||||
@@ -81,6 +81,7 @@
|
||||
#define ARM_CPU_PART_CORTEX_A510 0xD46
|
||||
#define ARM_CPU_PART_CORTEX_A520 0xD80
|
||||
#define ARM_CPU_PART_CORTEX_A710 0xD47
|
||||
#define ARM_CPU_PART_CORTEX_A715 0xD4D
|
||||
#define ARM_CPU_PART_CORTEX_X2 0xD48
|
||||
#define ARM_CPU_PART_NEOVERSE_N2 0xD49
|
||||
#define ARM_CPU_PART_CORTEX_A78C 0xD4B
|
||||
@@ -92,6 +93,7 @@
|
||||
#define ARM_CPU_PART_NEOVERSE_V3 0xD84
|
||||
#define ARM_CPU_PART_CORTEX_X925 0xD85
|
||||
#define ARM_CPU_PART_CORTEX_A725 0xD87
|
||||
#define ARM_CPU_PART_NEOVERSE_N3 0xD8E
|
||||
|
||||
#define APM_CPU_PART_POTENZA 0x000
|
||||
|
||||
@@ -141,6 +143,7 @@
|
||||
#define MIDR_CORTEX_A510 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A510)
|
||||
#define MIDR_CORTEX_A520 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A520)
|
||||
#define MIDR_CORTEX_A710 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A710)
|
||||
#define MIDR_CORTEX_A715 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A715)
|
||||
#define MIDR_CORTEX_X2 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_X2)
|
||||
#define MIDR_NEOVERSE_N2 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_NEOVERSE_N2)
|
||||
#define MIDR_CORTEX_A78C MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A78C)
|
||||
@@ -152,6 +155,7 @@
|
||||
#define MIDR_NEOVERSE_V3 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_NEOVERSE_V3)
|
||||
#define MIDR_CORTEX_X925 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_X925)
|
||||
#define MIDR_CORTEX_A725 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A725)
|
||||
#define MIDR_NEOVERSE_N3 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_NEOVERSE_N3)
|
||||
#define MIDR_THUNDERX MIDR_CPU_MODEL(ARM_CPU_IMP_CAVIUM, CAVIUM_CPU_PART_THUNDERX)
|
||||
#define MIDR_THUNDERX_81XX MIDR_CPU_MODEL(ARM_CPU_IMP_CAVIUM, CAVIUM_CPU_PART_THUNDERX_81XX)
|
||||
#define MIDR_THUNDERX_83XX MIDR_CPU_MODEL(ARM_CPU_IMP_CAVIUM, CAVIUM_CPU_PART_THUNDERX_83XX)
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
#define __ASM_MMAN_H__
|
||||
|
||||
#include <linux/compiler.h>
|
||||
#ifndef __GENKSYMS__
|
||||
#include <linux/fs.h>
|
||||
#include <linux/shmem_fs.h>
|
||||
#endif
|
||||
#include <linux/types.h>
|
||||
#include <uapi/asm/mman.h>
|
||||
|
||||
@@ -21,19 +25,21 @@ static inline unsigned long arch_calc_vm_prot_bits(unsigned long prot,
|
||||
}
|
||||
#define arch_calc_vm_prot_bits(prot, pkey) arch_calc_vm_prot_bits(prot, pkey)
|
||||
|
||||
static inline unsigned long arch_calc_vm_flag_bits(unsigned long flags)
|
||||
static inline unsigned long arch_calc_vm_flag_bits(struct file *file,
|
||||
unsigned long flags)
|
||||
{
|
||||
/*
|
||||
* Only allow MTE on anonymous mappings as these are guaranteed to be
|
||||
* backed by tags-capable memory. The vm_flags may be overridden by a
|
||||
* filesystem supporting MTE (RAM-based).
|
||||
*/
|
||||
if (system_supports_mte() && (flags & MAP_ANONYMOUS))
|
||||
if (system_supports_mte() &&
|
||||
((flags & MAP_ANONYMOUS) || shmem_file(file)))
|
||||
return VM_MTE_ALLOWED;
|
||||
|
||||
return 0;
|
||||
}
|
||||
#define arch_calc_vm_flag_bits(flags) arch_calc_vm_flag_bits(flags)
|
||||
#define arch_calc_vm_flag_bits(file, flags) arch_calc_vm_flag_bits(file, flags)
|
||||
|
||||
static inline pgprot_t arch_vm_get_page_prot(unsigned long vm_flags)
|
||||
{
|
||||
|
||||
@@ -10,21 +10,19 @@
|
||||
#include <asm/insn.h>
|
||||
#include <asm/probes.h>
|
||||
|
||||
#define MAX_UINSN_BYTES AARCH64_INSN_SIZE
|
||||
|
||||
#define UPROBE_SWBP_INSN BRK64_OPCODE_UPROBES
|
||||
#define UPROBE_SWBP_INSN cpu_to_le32(BRK64_OPCODE_UPROBES)
|
||||
#define UPROBE_SWBP_INSN_SIZE AARCH64_INSN_SIZE
|
||||
#define UPROBE_XOL_SLOT_BYTES MAX_UINSN_BYTES
|
||||
#define UPROBE_XOL_SLOT_BYTES AARCH64_INSN_SIZE
|
||||
|
||||
typedef u32 uprobe_opcode_t;
|
||||
typedef __le32 uprobe_opcode_t;
|
||||
|
||||
struct arch_uprobe_task {
|
||||
};
|
||||
|
||||
struct arch_uprobe {
|
||||
union {
|
||||
u8 insn[MAX_UINSN_BYTES];
|
||||
u8 ixol[MAX_UINSN_BYTES];
|
||||
__le32 insn;
|
||||
__le32 ixol;
|
||||
};
|
||||
struct arch_probe_insn api;
|
||||
bool simulate;
|
||||
|
||||
@@ -373,6 +373,7 @@ static const struct midr_range erratum_spec_ssbs_list[] = {
|
||||
MIDR_ALL_VERSIONS(MIDR_CORTEX_A78),
|
||||
MIDR_ALL_VERSIONS(MIDR_CORTEX_A78C),
|
||||
MIDR_ALL_VERSIONS(MIDR_CORTEX_A710),
|
||||
MIDR_ALL_VERSIONS(MIDR_CORTEX_A715),
|
||||
MIDR_ALL_VERSIONS(MIDR_CORTEX_A720),
|
||||
MIDR_ALL_VERSIONS(MIDR_CORTEX_A725),
|
||||
MIDR_ALL_VERSIONS(MIDR_CORTEX_X1),
|
||||
@@ -383,6 +384,7 @@ static const struct midr_range erratum_spec_ssbs_list[] = {
|
||||
MIDR_ALL_VERSIONS(MIDR_CORTEX_X925),
|
||||
MIDR_ALL_VERSIONS(MIDR_NEOVERSE_N1),
|
||||
MIDR_ALL_VERSIONS(MIDR_NEOVERSE_N2),
|
||||
MIDR_ALL_VERSIONS(MIDR_NEOVERSE_N3),
|
||||
MIDR_ALL_VERSIONS(MIDR_NEOVERSE_V1),
|
||||
MIDR_ALL_VERSIONS(MIDR_NEOVERSE_V2),
|
||||
MIDR_ALL_VERSIONS(MIDR_NEOVERSE_V3),
|
||||
|
||||
@@ -99,10 +99,6 @@ arm_probe_decode_insn(probe_opcode_t insn, struct arch_probe_insn *api)
|
||||
aarch64_insn_is_blr(insn) ||
|
||||
aarch64_insn_is_ret(insn)) {
|
||||
api->handler = simulate_br_blr_ret;
|
||||
} else if (aarch64_insn_is_ldr_lit(insn)) {
|
||||
api->handler = simulate_ldr_literal;
|
||||
} else if (aarch64_insn_is_ldrsw_lit(insn)) {
|
||||
api->handler = simulate_ldrsw_literal;
|
||||
} else {
|
||||
/*
|
||||
* Instruction cannot be stepped out-of-line and we don't
|
||||
@@ -140,6 +136,17 @@ arm_kprobe_decode_insn(kprobe_opcode_t *addr, struct arch_specific_insn *asi)
|
||||
probe_opcode_t insn = le32_to_cpu(*addr);
|
||||
probe_opcode_t *scan_end = NULL;
|
||||
unsigned long size = 0, offset = 0;
|
||||
struct arch_probe_insn *api = &asi->api;
|
||||
|
||||
if (aarch64_insn_is_ldr_lit(insn)) {
|
||||
api->handler = simulate_ldr_literal;
|
||||
decoded = INSN_GOOD_NO_SLOT;
|
||||
} else if (aarch64_insn_is_ldrsw_lit(insn)) {
|
||||
api->handler = simulate_ldrsw_literal;
|
||||
decoded = INSN_GOOD_NO_SLOT;
|
||||
} else {
|
||||
decoded = arm_probe_decode_insn(insn, &asi->api);
|
||||
}
|
||||
|
||||
/*
|
||||
* If there's a symbol defined in front of and near enough to
|
||||
@@ -157,7 +164,6 @@ arm_kprobe_decode_insn(kprobe_opcode_t *addr, struct arch_specific_insn *asi)
|
||||
else
|
||||
scan_end = addr - MAX_ATOMIC_CONTEXT_SIZE;
|
||||
}
|
||||
decoded = arm_probe_decode_insn(insn, &asi->api);
|
||||
|
||||
if (decoded != INSN_REJECTED && scan_end)
|
||||
if (is_probed_address_atomic(addr - 1, scan_end))
|
||||
|
||||
@@ -170,17 +170,15 @@ simulate_tbz_tbnz(u32 opcode, long addr, struct pt_regs *regs)
|
||||
void __kprobes
|
||||
simulate_ldr_literal(u32 opcode, long addr, struct pt_regs *regs)
|
||||
{
|
||||
u64 *load_addr;
|
||||
unsigned long load_addr;
|
||||
int xn = opcode & 0x1f;
|
||||
int disp;
|
||||
|
||||
disp = ldr_displacement(opcode);
|
||||
load_addr = (u64 *) (addr + disp);
|
||||
load_addr = addr + ldr_displacement(opcode);
|
||||
|
||||
if (opcode & (1 << 30)) /* x0-x30 */
|
||||
set_x_reg(regs, xn, *load_addr);
|
||||
set_x_reg(regs, xn, READ_ONCE(*(u64 *)load_addr));
|
||||
else /* w0-w30 */
|
||||
set_w_reg(regs, xn, *load_addr);
|
||||
set_w_reg(regs, xn, READ_ONCE(*(u32 *)load_addr));
|
||||
|
||||
instruction_pointer_set(regs, instruction_pointer(regs) + 4);
|
||||
}
|
||||
@@ -188,14 +186,12 @@ simulate_ldr_literal(u32 opcode, long addr, struct pt_regs *regs)
|
||||
void __kprobes
|
||||
simulate_ldrsw_literal(u32 opcode, long addr, struct pt_regs *regs)
|
||||
{
|
||||
s32 *load_addr;
|
||||
unsigned long load_addr;
|
||||
int xn = opcode & 0x1f;
|
||||
int disp;
|
||||
|
||||
disp = ldr_displacement(opcode);
|
||||
load_addr = (s32 *) (addr + disp);
|
||||
load_addr = addr + ldr_displacement(opcode);
|
||||
|
||||
set_x_reg(regs, xn, *load_addr);
|
||||
set_x_reg(regs, xn, READ_ONCE(*(s32 *)load_addr));
|
||||
|
||||
instruction_pointer_set(regs, instruction_pointer(regs) + 4);
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ int arch_uprobe_analyze_insn(struct arch_uprobe *auprobe, struct mm_struct *mm,
|
||||
else if (!IS_ALIGNED(addr, AARCH64_INSN_SIZE))
|
||||
return -EINVAL;
|
||||
|
||||
insn = *(probe_opcode_t *)(&auprobe->insn[0]);
|
||||
insn = le32_to_cpu(auprobe->insn);
|
||||
|
||||
switch (arm_probe_decode_insn(insn, &auprobe->api)) {
|
||||
case INSN_REJECTED:
|
||||
@@ -108,7 +108,7 @@ bool arch_uprobe_skip_sstep(struct arch_uprobe *auprobe, struct pt_regs *regs)
|
||||
if (!auprobe->simulate)
|
||||
return false;
|
||||
|
||||
insn = *(probe_opcode_t *)(&auprobe->insn[0]);
|
||||
insn = le32_to_cpu(auprobe->insn);
|
||||
addr = instruction_pointer(regs);
|
||||
|
||||
if (auprobe->api.handler)
|
||||
|
||||
@@ -450,7 +450,7 @@ static void tls_thread_switch(struct task_struct *next)
|
||||
|
||||
if (is_compat_thread(task_thread_info(next)))
|
||||
write_sysreg(next->thread.uw.tp_value, tpidrro_el0);
|
||||
else if (!arm64_kernel_unmapped_at_el0())
|
||||
else
|
||||
write_sysreg(0, tpidrro_el0);
|
||||
|
||||
write_sysreg(*task_user_tls(next), tpidr_el0);
|
||||
|
||||
@@ -1071,7 +1071,7 @@ static int tagged_addr_ctrl_get(struct task_struct *target,
|
||||
{
|
||||
long ctrl = get_tagged_addr_ctrl(target);
|
||||
|
||||
if (IS_ERR_VALUE(ctrl))
|
||||
if (WARN_ON_ONCE(IS_ERR_VALUE(ctrl)))
|
||||
return ctrl;
|
||||
|
||||
return membuf_write(&to, &ctrl, sizeof(ctrl));
|
||||
@@ -1085,6 +1085,10 @@ static int tagged_addr_ctrl_set(struct task_struct *target, const struct
|
||||
int ret;
|
||||
long ctrl;
|
||||
|
||||
ctrl = get_tagged_addr_ctrl(target);
|
||||
if (WARN_ON_ONCE(IS_ERR_VALUE(ctrl)))
|
||||
return ctrl;
|
||||
|
||||
ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, &ctrl, 0, -1);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
@@ -258,6 +258,9 @@ SECTIONS
|
||||
__initdata_end = .;
|
||||
__init_end = .;
|
||||
|
||||
.data.rel.ro : { *(.data.rel.ro) }
|
||||
ASSERT(SIZEOF(.data.rel.ro) == 0, "Unexpected RELRO detected!")
|
||||
|
||||
_data = .;
|
||||
_sdata = .;
|
||||
RW_DATA(L1_CACHE_BYTES, PAGE_SIZE, THREAD_ALIGN)
|
||||
@@ -309,9 +312,6 @@ SECTIONS
|
||||
*(.plt) *(.plt.*) *(.iplt) *(.igot .igot.plt)
|
||||
}
|
||||
ASSERT(SIZEOF(.plt) == 0, "Unexpected run-time procedure linkages detected!")
|
||||
|
||||
.data.rel.ro : { *(.data.rel.ro) }
|
||||
ASSERT(SIZEOF(.data.rel.ro) == 0, "Unexpected RELRO detected!")
|
||||
}
|
||||
|
||||
#include "image-vars.h"
|
||||
|
||||
@@ -254,7 +254,7 @@ static int set_core_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg)
|
||||
if (*vcpu_cpsr(vcpu) & PSR_MODE32_BIT) {
|
||||
int i, nr_reg;
|
||||
|
||||
switch (*vcpu_cpsr(vcpu)) {
|
||||
switch (*vcpu_cpsr(vcpu) & PSR_AA32_MODE_MASK) {
|
||||
/*
|
||||
* Either we are dealing with user mode, and only the
|
||||
* first 15 registers (+ PC) must be narrowed to 32bit.
|
||||
|
||||
@@ -371,7 +371,6 @@ static u64 kvm_pmu_overflow_status(struct kvm_vcpu *vcpu)
|
||||
|
||||
if ((__vcpu_sys_reg(vcpu, PMCR_EL0) & ARMV8_PMU_PMCR_E)) {
|
||||
reg = __vcpu_sys_reg(vcpu, PMOVSSET_EL0);
|
||||
reg &= __vcpu_sys_reg(vcpu, PMCNTENSET_EL0);
|
||||
reg &= __vcpu_sys_reg(vcpu, PMINTENSET_EL1);
|
||||
reg &= kvm_pmu_valid_counter_mask(vcpu);
|
||||
}
|
||||
|
||||
@@ -855,6 +855,9 @@ static int vgic_its_cmd_handle_discard(struct kvm *kvm, struct vgic_its *its,
|
||||
|
||||
ite = find_ite(its, device_id, event_id);
|
||||
if (ite && its_is_collection_mapped(ite->collection)) {
|
||||
struct its_device *device = find_its_device(its, device_id);
|
||||
int ite_esz = vgic_its_get_abi(its)->ite_esz;
|
||||
gpa_t gpa = device->itt_addr + ite->event_id * ite_esz;
|
||||
/*
|
||||
* Though the spec talks about removing the pending state, we
|
||||
* don't bother here since we clear the ITTE anyway and the
|
||||
@@ -863,7 +866,8 @@ static int vgic_its_cmd_handle_discard(struct kvm *kvm, struct vgic_its *its,
|
||||
vgic_its_invalidate_cache(kvm);
|
||||
|
||||
its_free_ite(kvm, ite);
|
||||
return 0;
|
||||
|
||||
return vgic_its_write_entry_lock(its, gpa, 0, ite_esz);
|
||||
}
|
||||
|
||||
return E_ITS_DISCARD_UNMAPPED_INTERRUPT;
|
||||
@@ -1182,9 +1186,11 @@ static int vgic_its_cmd_handle_mapd(struct kvm *kvm, struct vgic_its *its,
|
||||
bool valid = its_cmd_get_validbit(its_cmd);
|
||||
u8 num_eventid_bits = its_cmd_get_size(its_cmd);
|
||||
gpa_t itt_addr = its_cmd_get_ittaddr(its_cmd);
|
||||
int dte_esz = vgic_its_get_abi(its)->dte_esz;
|
||||
struct its_device *device;
|
||||
gpa_t gpa;
|
||||
|
||||
if (!vgic_its_check_id(its, its->baser_device_table, device_id, NULL))
|
||||
if (!vgic_its_check_id(its, its->baser_device_table, device_id, &gpa))
|
||||
return E_ITS_MAPD_DEVICE_OOR;
|
||||
|
||||
if (valid && num_eventid_bits > VITS_TYPER_IDBITS)
|
||||
@@ -1205,7 +1211,7 @@ static int vgic_its_cmd_handle_mapd(struct kvm *kvm, struct vgic_its *its,
|
||||
* is an error, so we are done in any case.
|
||||
*/
|
||||
if (!valid)
|
||||
return 0;
|
||||
return vgic_its_write_entry_lock(its, gpa, 0, dte_esz);
|
||||
|
||||
device = vgic_its_alloc_device(its, device_id, itt_addr,
|
||||
num_eventid_bits);
|
||||
@@ -2135,7 +2141,6 @@ static int scan_its_table(struct vgic_its *its, gpa_t base, int size, u32 esz,
|
||||
static int vgic_its_save_ite(struct vgic_its *its, struct its_device *dev,
|
||||
struct its_ite *ite, gpa_t gpa, int ite_esz)
|
||||
{
|
||||
struct kvm *kvm = its->dev->kvm;
|
||||
u32 next_offset;
|
||||
u64 val;
|
||||
|
||||
@@ -2144,7 +2149,8 @@ static int vgic_its_save_ite(struct vgic_its *its, struct its_device *dev,
|
||||
((u64)ite->irq->intid << KVM_ITS_ITE_PINTID_SHIFT) |
|
||||
ite->collection->collection_id;
|
||||
val = cpu_to_le64(val);
|
||||
return kvm_write_guest_lock(kvm, gpa, &val, ite_esz);
|
||||
|
||||
return vgic_its_write_entry_lock(its, gpa, val, ite_esz);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2280,7 +2286,6 @@ static int vgic_its_restore_itt(struct vgic_its *its, struct its_device *dev)
|
||||
static int vgic_its_save_dte(struct vgic_its *its, struct its_device *dev,
|
||||
gpa_t ptr, int dte_esz)
|
||||
{
|
||||
struct kvm *kvm = its->dev->kvm;
|
||||
u64 val, itt_addr_field;
|
||||
u32 next_offset;
|
||||
|
||||
@@ -2291,7 +2296,8 @@ static int vgic_its_save_dte(struct vgic_its *its, struct its_device *dev,
|
||||
(itt_addr_field << KVM_ITS_DTE_ITTADDR_SHIFT) |
|
||||
(dev->num_eventid_bits - 1));
|
||||
val = cpu_to_le64(val);
|
||||
return kvm_write_guest_lock(kvm, ptr, &val, dte_esz);
|
||||
|
||||
return vgic_its_write_entry_lock(its, ptr, val, dte_esz);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2471,7 +2477,8 @@ static int vgic_its_save_cte(struct vgic_its *its,
|
||||
((u64)collection->target_addr << KVM_ITS_CTE_RDBASE_SHIFT) |
|
||||
collection->collection_id);
|
||||
val = cpu_to_le64(val);
|
||||
return kvm_write_guest_lock(its->dev->kvm, gpa, &val, esz);
|
||||
|
||||
return vgic_its_write_entry_lock(its, gpa, val, esz);
|
||||
}
|
||||
|
||||
static int vgic_its_restore_cte(struct vgic_its *its, gpa_t gpa, int esz)
|
||||
@@ -2482,8 +2489,7 @@ static int vgic_its_restore_cte(struct vgic_its *its, gpa_t gpa, int esz)
|
||||
u64 val;
|
||||
int ret;
|
||||
|
||||
BUG_ON(esz > sizeof(val));
|
||||
ret = kvm_read_guest_lock(kvm, gpa, &val, esz);
|
||||
ret = vgic_its_read_entry_lock(its, gpa, &val, esz);
|
||||
if (ret)
|
||||
return ret;
|
||||
val = le64_to_cpu(val);
|
||||
@@ -2517,7 +2523,6 @@ static int vgic_its_save_collection_table(struct vgic_its *its)
|
||||
u64 baser = its->baser_coll_table;
|
||||
gpa_t gpa = GITS_BASER_ADDR_48_to_52(baser);
|
||||
struct its_collection *collection;
|
||||
u64 val;
|
||||
size_t max_size, filled = 0;
|
||||
int ret, cte_esz = abi->cte_esz;
|
||||
|
||||
@@ -2541,10 +2546,7 @@ static int vgic_its_save_collection_table(struct vgic_its *its)
|
||||
* table is not fully filled, add a last dummy element
|
||||
* with valid bit unset
|
||||
*/
|
||||
val = 0;
|
||||
BUG_ON(cte_esz > sizeof(val));
|
||||
ret = kvm_write_guest_lock(its->dev->kvm, gpa, &val, cte_esz);
|
||||
return ret;
|
||||
return vgic_its_write_entry_lock(its, gpa, 0, cte_esz);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#define __KVM_ARM_VGIC_NEW_H__
|
||||
|
||||
#include <linux/irqchip/arm-gic-common.h>
|
||||
#include <asm/kvm_mmu.h>
|
||||
|
||||
#define PRODUCT_ID_KVM 0x4b /* ASCII code K */
|
||||
#define IMPLEMENTER_ARM 0x43b
|
||||
@@ -126,6 +127,29 @@ static inline bool vgic_irq_is_multi_sgi(struct vgic_irq *irq)
|
||||
return vgic_irq_get_lr_count(irq) > 1;
|
||||
}
|
||||
|
||||
static inline int vgic_its_read_entry_lock(struct vgic_its *its, gpa_t eaddr,
|
||||
u64 *eval, unsigned long esize)
|
||||
{
|
||||
struct kvm *kvm = its->dev->kvm;
|
||||
|
||||
if (KVM_BUG_ON(esize != sizeof(*eval), kvm))
|
||||
return -EINVAL;
|
||||
|
||||
return kvm_read_guest_lock(kvm, eaddr, eval, esize);
|
||||
|
||||
}
|
||||
|
||||
static inline int vgic_its_write_entry_lock(struct vgic_its *its, gpa_t eaddr,
|
||||
u64 eval, unsigned long esize)
|
||||
{
|
||||
struct kvm *kvm = its->dev->kvm;
|
||||
|
||||
if (KVM_BUG_ON(esize != sizeof(eval), kvm))
|
||||
return -EINVAL;
|
||||
|
||||
return kvm_write_guest_lock(kvm, eaddr, &eval, esize);
|
||||
}
|
||||
|
||||
/*
|
||||
* This struct provides an intermediate representation of the fields contained
|
||||
* in the GICH_VMCR and ICH_VMCR registers, such that code exporting the GIC
|
||||
|
||||
@@ -32,11 +32,11 @@ static unsigned long nr_pinned_asids;
|
||||
static unsigned long *pinned_asid_map;
|
||||
|
||||
#define ASID_MASK (~GENMASK(asid_bits - 1, 0))
|
||||
#define ASID_FIRST_VERSION (1UL << asid_bits)
|
||||
#define ASID_FIRST_VERSION (1UL << 16)
|
||||
|
||||
#define NUM_USER_ASIDS ASID_FIRST_VERSION
|
||||
#define asid2idx(asid) ((asid) & ~ASID_MASK)
|
||||
#define idx2asid(idx) asid2idx(idx)
|
||||
#define NUM_USER_ASIDS (1UL << asid_bits)
|
||||
#define ctxid2asid(asid) ((asid) & ~ASID_MASK)
|
||||
#define asid2ctxid(asid, genid) ((asid) | (genid))
|
||||
|
||||
/* Get the ASIDBits supported by the current CPU */
|
||||
static u32 get_cpu_asid_bits(void)
|
||||
@@ -120,7 +120,7 @@ static void flush_context(void)
|
||||
*/
|
||||
if (asid == 0)
|
||||
asid = per_cpu(reserved_asids, i);
|
||||
__set_bit(asid2idx(asid), asid_map);
|
||||
__set_bit(ctxid2asid(asid), asid_map);
|
||||
per_cpu(reserved_asids, i) = asid;
|
||||
}
|
||||
|
||||
@@ -162,7 +162,7 @@ static u64 new_context(struct mm_struct *mm)
|
||||
u64 generation = atomic64_read(&asid_generation);
|
||||
|
||||
if (asid != 0) {
|
||||
u64 newasid = generation | (asid & ~ASID_MASK);
|
||||
u64 newasid = asid2ctxid(ctxid2asid(asid), generation);
|
||||
|
||||
/*
|
||||
* If our current ASID was active during a rollover, we
|
||||
@@ -183,7 +183,7 @@ static u64 new_context(struct mm_struct *mm)
|
||||
* We had a valid ASID in a previous life, so try to re-use
|
||||
* it if possible.
|
||||
*/
|
||||
if (!__test_and_set_bit(asid2idx(asid), asid_map))
|
||||
if (!__test_and_set_bit(ctxid2asid(asid), asid_map))
|
||||
return newasid;
|
||||
}
|
||||
|
||||
@@ -209,7 +209,7 @@ static u64 new_context(struct mm_struct *mm)
|
||||
set_asid:
|
||||
__set_bit(asid, asid_map);
|
||||
cur_idx = asid;
|
||||
return idx2asid(asid) | generation;
|
||||
return asid2ctxid(asid, generation);
|
||||
}
|
||||
|
||||
void check_and_switch_context(struct mm_struct *mm)
|
||||
@@ -300,13 +300,13 @@ unsigned long arm64_mm_context_get(struct mm_struct *mm)
|
||||
}
|
||||
|
||||
nr_pinned_asids++;
|
||||
__set_bit(asid2idx(asid), pinned_asid_map);
|
||||
__set_bit(ctxid2asid(asid), pinned_asid_map);
|
||||
refcount_set(&mm->context.pinned, 1);
|
||||
|
||||
out_unlock:
|
||||
raw_spin_unlock_irqrestore(&cpu_asid_lock, flags);
|
||||
|
||||
asid &= ~ASID_MASK;
|
||||
asid = ctxid2asid(asid);
|
||||
|
||||
/* Set the equivalent of USER_ASID_BIT */
|
||||
if (asid && arm64_kernel_unmapped_at_el0())
|
||||
@@ -327,7 +327,7 @@ void arm64_mm_context_put(struct mm_struct *mm)
|
||||
raw_spin_lock_irqsave(&cpu_asid_lock, flags);
|
||||
|
||||
if (refcount_dec_and_test(&mm->context.pinned)) {
|
||||
__clear_bit(asid2idx(asid), pinned_asid_map);
|
||||
__clear_bit(ctxid2asid(asid), pinned_asid_map);
|
||||
nr_pinned_asids--;
|
||||
}
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@ static struct platform_device mcf_uart = {
|
||||
.dev.platform_data = mcf_uart_platform_data,
|
||||
};
|
||||
|
||||
#if IS_ENABLED(CONFIG_FEC)
|
||||
#ifdef MCFFEC_BASE0
|
||||
|
||||
#ifdef CONFIG_M5441x
|
||||
#define FEC_NAME "enet-fec"
|
||||
@@ -145,6 +145,7 @@ static struct platform_device mcf_fec0 = {
|
||||
.platform_data = FEC_PDATA,
|
||||
}
|
||||
};
|
||||
#endif /* MCFFEC_BASE0 */
|
||||
|
||||
#ifdef MCFFEC_BASE1
|
||||
static struct resource mcf_fec1_resources[] = {
|
||||
@@ -182,7 +183,6 @@ static struct platform_device mcf_fec1 = {
|
||||
}
|
||||
};
|
||||
#endif /* MCFFEC_BASE1 */
|
||||
#endif /* CONFIG_FEC */
|
||||
|
||||
#if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI)
|
||||
/*
|
||||
@@ -583,12 +583,12 @@ static struct platform_device mcf_esdhc = {
|
||||
|
||||
static struct platform_device *mcf_devices[] __initdata = {
|
||||
&mcf_uart,
|
||||
#if IS_ENABLED(CONFIG_FEC)
|
||||
#ifdef MCFFEC_BASE0
|
||||
&mcf_fec0,
|
||||
#endif
|
||||
#ifdef MCFFEC_BASE1
|
||||
&mcf_fec1,
|
||||
#endif
|
||||
#endif
|
||||
#if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI)
|
||||
&mcf_qspi,
|
||||
#endif
|
||||
|
||||
@@ -144,7 +144,7 @@ static inline void gpio_free(unsigned gpio)
|
||||
* read-modify-write as well as those controlled by the EPORT and GPIO modules.
|
||||
*/
|
||||
#define MCFGPIO_SCR_START 40
|
||||
#elif defined(CONFIGM5441x)
|
||||
#elif defined(CONFIG_M5441x)
|
||||
/* The m5441x EPORT doesn't have its own GPIO port, uses PORT C */
|
||||
#define MCFGPIO_SCR_START 0
|
||||
#else
|
||||
|
||||
@@ -93,8 +93,8 @@ struct pcc_regs {
|
||||
#define M147_SCC_B_ADDR 0xfffe3000
|
||||
#define M147_SCC_PCLK 5000000
|
||||
|
||||
#define MVME147_IRQ_SCSI_PORT (IRQ_USER+0x45)
|
||||
#define MVME147_IRQ_SCSI_DMA (IRQ_USER+0x46)
|
||||
#define MVME147_IRQ_SCSI_PORT (IRQ_USER + 5)
|
||||
#define MVME147_IRQ_SCSI_DMA (IRQ_USER + 6)
|
||||
|
||||
/* SCC interrupts, for MVME147 */
|
||||
|
||||
|
||||
@@ -12,8 +12,9 @@
|
||||
#include <linux/string.h>
|
||||
#include <asm/setup.h>
|
||||
|
||||
extern void mvme16x_cons_write(struct console *co,
|
||||
const char *str, unsigned count);
|
||||
|
||||
#include "../mvme147/mvme147.h"
|
||||
#include "../mvme16x/mvme16x.h"
|
||||
|
||||
asmlinkage void __init debug_cons_nputs(const char *s, unsigned n);
|
||||
|
||||
@@ -22,7 +23,9 @@ static void __ref debug_cons_write(struct console *c,
|
||||
{
|
||||
#if !(defined(CONFIG_SUN3) || defined(CONFIG_M68000) || \
|
||||
defined(CONFIG_COLDFIRE))
|
||||
if (MACH_IS_MVME16x)
|
||||
if (MACH_IS_MVME147)
|
||||
mvme147_scc_write(c, s, n);
|
||||
else if (MACH_IS_MVME16x)
|
||||
mvme16x_cons_write(c, s, n);
|
||||
else
|
||||
debug_cons_nputs(s, n);
|
||||
|
||||
@@ -116,7 +116,7 @@ asmlinkage int m68k_clone(struct pt_regs *regs)
|
||||
{
|
||||
/* regs will be equal to current_pt_regs() */
|
||||
struct kernel_clone_args args = {
|
||||
.flags = regs->d1 & ~CSIGNAL,
|
||||
.flags = (u32)(regs->d1) & ~CSIGNAL,
|
||||
.pidfd = (int __user *)regs->d3,
|
||||
.child_tid = (int __user *)regs->d4,
|
||||
.parent_tid = (int __user *)regs->d3,
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#include <asm/machdep.h>
|
||||
#include <asm/mvme147hw.h>
|
||||
|
||||
#include "mvme147.h"
|
||||
|
||||
static void mvme147_get_model(char *model);
|
||||
extern void mvme147_sched_init(irq_handler_t handler);
|
||||
@@ -188,3 +189,32 @@ int mvme147_hwclk(int op, struct rtc_time *t)
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void scc_delay(void)
|
||||
{
|
||||
__asm__ __volatile__ ("nop; nop;");
|
||||
}
|
||||
|
||||
static void scc_write(char ch)
|
||||
{
|
||||
do {
|
||||
scc_delay();
|
||||
} while (!(in_8(M147_SCC_A_ADDR) & BIT(2)));
|
||||
scc_delay();
|
||||
out_8(M147_SCC_A_ADDR, 8);
|
||||
scc_delay();
|
||||
out_8(M147_SCC_A_ADDR, ch);
|
||||
}
|
||||
|
||||
void mvme147_scc_write(struct console *co, const char *str, unsigned int count)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
||||
local_irq_save(flags);
|
||||
while (count--) {
|
||||
if (*str == '\n')
|
||||
scc_write('\r');
|
||||
scc_write(*str++);
|
||||
}
|
||||
local_irq_restore(flags);
|
||||
}
|
||||
|
||||
6
arch/m68k/mvme147/mvme147.h
Normal file
6
arch/m68k/mvme147/mvme147.h
Normal file
@@ -0,0 +1,6 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
|
||||
struct console;
|
||||
|
||||
/* config.c */
|
||||
void mvme147_scc_write(struct console *co, const char *str, unsigned int count);
|
||||
@@ -38,6 +38,8 @@
|
||||
#include <asm/machdep.h>
|
||||
#include <asm/mvme16xhw.h>
|
||||
|
||||
#include "mvme16x.h"
|
||||
|
||||
extern t_bdid mvme_bdid;
|
||||
|
||||
static MK48T08ptr_t volatile rtc = (MK48T08ptr_t)MVME_RTC_BASE;
|
||||
|
||||
6
arch/m68k/mvme16x/mvme16x.h
Normal file
6
arch/m68k/mvme16x/mvme16x.h
Normal file
@@ -0,0 +1,6 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
|
||||
struct console;
|
||||
|
||||
/* config.c */
|
||||
void mvme16x_cons_write(struct console *co, const char *str, unsigned count);
|
||||
@@ -245,11 +245,6 @@ asmlinkage void __init mmu_init(void)
|
||||
{
|
||||
unsigned int kstart, ksize;
|
||||
|
||||
if (!memblock.reserved.cnt) {
|
||||
pr_emerg("Error memory count\n");
|
||||
machine_restart(NULL);
|
||||
}
|
||||
|
||||
if ((u32) memblock.memory.regions[0].size < 0x400000) {
|
||||
pr_emerg("Memory must be greater than 4MB\n");
|
||||
machine_restart(NULL);
|
||||
|
||||
@@ -272,7 +272,7 @@ drivers-$(CONFIG_PCI) += arch/mips/pci/
|
||||
ifdef CONFIG_64BIT
|
||||
ifndef KBUILD_SYM32
|
||||
ifeq ($(shell expr $(load-y) \< 0xffffffff80000000), 0)
|
||||
KBUILD_SYM32 = y
|
||||
KBUILD_SYM32 = $(call cc-option-yn, -msym32)
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
compatible = "loongson,pch-msi-1.0";
|
||||
reg = <0 0x2ff00000 0 0x8>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <1>;
|
||||
msi-controller;
|
||||
loongson,msi-base-vec = <64>;
|
||||
loongson,msi-num-vecs = <192>;
|
||||
|
||||
@@ -63,7 +63,6 @@
|
||||
device_type = "pci";
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
#interrupt-cells = <2>;
|
||||
msi-parent = <&msi>;
|
||||
|
||||
reg = <0 0x1a000000 0 0x02000000>,
|
||||
@@ -226,7 +225,7 @@
|
||||
};
|
||||
};
|
||||
|
||||
pci_bridge@9,0 {
|
||||
pcie@9,0 {
|
||||
compatible = "pci0014,7a19.1",
|
||||
"pci0014,7a19",
|
||||
"pciclass060400",
|
||||
@@ -236,12 +235,16 @@
|
||||
interrupts = <32 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-parent = <&pic>;
|
||||
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
device_type = "pci";
|
||||
#interrupt-cells = <1>;
|
||||
interrupt-map-mask = <0 0 0 0>;
|
||||
interrupt-map = <0 0 0 0 &pic 32 IRQ_TYPE_LEVEL_HIGH>;
|
||||
ranges;
|
||||
};
|
||||
|
||||
pci_bridge@a,0 {
|
||||
pcie@a,0 {
|
||||
compatible = "pci0014,7a09.1",
|
||||
"pci0014,7a09",
|
||||
"pciclass060400",
|
||||
@@ -251,12 +254,16 @@
|
||||
interrupts = <33 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-parent = <&pic>;
|
||||
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
device_type = "pci";
|
||||
#interrupt-cells = <1>;
|
||||
interrupt-map-mask = <0 0 0 0>;
|
||||
interrupt-map = <0 0 0 0 &pic 33 IRQ_TYPE_LEVEL_HIGH>;
|
||||
ranges;
|
||||
};
|
||||
|
||||
pci_bridge@b,0 {
|
||||
pcie@b,0 {
|
||||
compatible = "pci0014,7a09.1",
|
||||
"pci0014,7a09",
|
||||
"pciclass060400",
|
||||
@@ -266,12 +273,16 @@
|
||||
interrupts = <34 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-parent = <&pic>;
|
||||
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
device_type = "pci";
|
||||
#interrupt-cells = <1>;
|
||||
interrupt-map-mask = <0 0 0 0>;
|
||||
interrupt-map = <0 0 0 0 &pic 34 IRQ_TYPE_LEVEL_HIGH>;
|
||||
ranges;
|
||||
};
|
||||
|
||||
pci_bridge@c,0 {
|
||||
pcie@c,0 {
|
||||
compatible = "pci0014,7a09.1",
|
||||
"pci0014,7a09",
|
||||
"pciclass060400",
|
||||
@@ -281,12 +292,16 @@
|
||||
interrupts = <35 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-parent = <&pic>;
|
||||
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
device_type = "pci";
|
||||
#interrupt-cells = <1>;
|
||||
interrupt-map-mask = <0 0 0 0>;
|
||||
interrupt-map = <0 0 0 0 &pic 35 IRQ_TYPE_LEVEL_HIGH>;
|
||||
ranges;
|
||||
};
|
||||
|
||||
pci_bridge@d,0 {
|
||||
pcie@d,0 {
|
||||
compatible = "pci0014,7a19.1",
|
||||
"pci0014,7a19",
|
||||
"pciclass060400",
|
||||
@@ -296,12 +311,16 @@
|
||||
interrupts = <36 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-parent = <&pic>;
|
||||
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
device_type = "pci";
|
||||
#interrupt-cells = <1>;
|
||||
interrupt-map-mask = <0 0 0 0>;
|
||||
interrupt-map = <0 0 0 0 &pic 36 IRQ_TYPE_LEVEL_HIGH>;
|
||||
ranges;
|
||||
};
|
||||
|
||||
pci_bridge@e,0 {
|
||||
pcie@e,0 {
|
||||
compatible = "pci0014,7a09.1",
|
||||
"pci0014,7a09",
|
||||
"pciclass060400",
|
||||
@@ -311,12 +330,16 @@
|
||||
interrupts = <37 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-parent = <&pic>;
|
||||
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
device_type = "pci";
|
||||
#interrupt-cells = <1>;
|
||||
interrupt-map-mask = <0 0 0 0>;
|
||||
interrupt-map = <0 0 0 0 &pic 37 IRQ_TYPE_LEVEL_HIGH>;
|
||||
ranges;
|
||||
};
|
||||
|
||||
pci_bridge@f,0 {
|
||||
pcie@f,0 {
|
||||
compatible = "pci0014,7a29.1",
|
||||
"pci0014,7a29",
|
||||
"pciclass060400",
|
||||
@@ -326,12 +349,16 @@
|
||||
interrupts = <40 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-parent = <&pic>;
|
||||
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
device_type = "pci";
|
||||
#interrupt-cells = <1>;
|
||||
interrupt-map-mask = <0 0 0 0>;
|
||||
interrupt-map = <0 0 0 0 &pic 40 IRQ_TYPE_LEVEL_HIGH>;
|
||||
ranges;
|
||||
};
|
||||
|
||||
pci_bridge@10,0 {
|
||||
pcie@10,0 {
|
||||
compatible = "pci0014,7a19.1",
|
||||
"pci0014,7a19",
|
||||
"pciclass060400",
|
||||
@@ -341,12 +368,16 @@
|
||||
interrupts = <41 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-parent = <&pic>;
|
||||
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
device_type = "pci";
|
||||
#interrupt-cells = <1>;
|
||||
interrupt-map-mask = <0 0 0 0>;
|
||||
interrupt-map = <0 0 0 0 &pic 41 IRQ_TYPE_LEVEL_HIGH>;
|
||||
ranges;
|
||||
};
|
||||
|
||||
pci_bridge@11,0 {
|
||||
pcie@11,0 {
|
||||
compatible = "pci0014,7a29.1",
|
||||
"pci0014,7a29",
|
||||
"pciclass060400",
|
||||
@@ -356,12 +387,16 @@
|
||||
interrupts = <42 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-parent = <&pic>;
|
||||
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
device_type = "pci";
|
||||
#interrupt-cells = <1>;
|
||||
interrupt-map-mask = <0 0 0 0>;
|
||||
interrupt-map = <0 0 0 0 &pic 42 IRQ_TYPE_LEVEL_HIGH>;
|
||||
ranges;
|
||||
};
|
||||
|
||||
pci_bridge@12,0 {
|
||||
pcie@12,0 {
|
||||
compatible = "pci0014,7a19.1",
|
||||
"pci0014,7a19",
|
||||
"pciclass060400",
|
||||
@@ -371,12 +406,16 @@
|
||||
interrupts = <43 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-parent = <&pic>;
|
||||
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
device_type = "pci";
|
||||
#interrupt-cells = <1>;
|
||||
interrupt-map-mask = <0 0 0 0>;
|
||||
interrupt-map = <0 0 0 0 &pic 43 IRQ_TYPE_LEVEL_HIGH>;
|
||||
ranges;
|
||||
};
|
||||
|
||||
pci_bridge@13,0 {
|
||||
pcie@13,0 {
|
||||
compatible = "pci0014,7a29.1",
|
||||
"pci0014,7a29",
|
||||
"pciclass060400",
|
||||
@@ -386,12 +425,16 @@
|
||||
interrupts = <38 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-parent = <&pic>;
|
||||
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
device_type = "pci";
|
||||
#interrupt-cells = <1>;
|
||||
interrupt-map-mask = <0 0 0 0>;
|
||||
interrupt-map = <0 0 0 0 &pic 38 IRQ_TYPE_LEVEL_HIGH>;
|
||||
ranges;
|
||||
};
|
||||
|
||||
pci_bridge@14,0 {
|
||||
pcie@14,0 {
|
||||
compatible = "pci0014,7a19.1",
|
||||
"pci0014,7a19",
|
||||
"pciclass060400",
|
||||
@@ -401,9 +444,13 @@
|
||||
interrupts = <39 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-parent = <&pic>;
|
||||
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
device_type = "pci";
|
||||
#interrupt-cells = <1>;
|
||||
interrupt-map-mask = <0 0 0 0>;
|
||||
interrupt-map = <0 0 0 0 &pic 39 IRQ_TYPE_LEVEL_HIGH>;
|
||||
ranges;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@ do { \
|
||||
} \
|
||||
} while (0)
|
||||
#else
|
||||
# define __sanitize_fcr31(next)
|
||||
# define __sanitize_fcr31(next) do { (void) (next); } while (0)
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
||||
@@ -1071,8 +1071,7 @@ ENTRY_CFI(intr_save) /* for os_hpmc */
|
||||
STREG %r16, PT_ISR(%r29)
|
||||
STREG %r17, PT_IOR(%r29)
|
||||
|
||||
#if 0 && defined(CONFIG_64BIT)
|
||||
/* Revisit when we have 64-bit code above 4Gb */
|
||||
#if defined(CONFIG_64BIT)
|
||||
b,n intr_save2
|
||||
|
||||
skip_save_ior:
|
||||
@@ -1080,8 +1079,7 @@ skip_save_ior:
|
||||
* need to adjust iasq/iaoq here in the same way we adjusted isr/ior
|
||||
* above.
|
||||
*/
|
||||
extrd,u,* %r8,PSW_W_BIT,1,%r1
|
||||
cmpib,COND(=),n 1,%r1,intr_save2
|
||||
bb,COND(>=),n %r8,PSW_W_BIT,intr_save2
|
||||
LDREG PT_IASQ0(%r29), %r16
|
||||
LDREG PT_IAOQ0(%r29), %r17
|
||||
/* adjust iasq/iaoq */
|
||||
|
||||
@@ -217,10 +217,10 @@ linux_gateway_entry:
|
||||
|
||||
#ifdef CONFIG_64BIT
|
||||
ldil L%sys_call_table, %r1
|
||||
or,= %r2,%r2,%r2
|
||||
addil L%(sys_call_table64-sys_call_table), %r1
|
||||
or,ev %r2,%r2,%r2
|
||||
ldil L%sys_call_table64, %r1
|
||||
ldo R%sys_call_table(%r1), %r19
|
||||
or,= %r2,%r2,%r2
|
||||
or,ev %r2,%r2,%r2
|
||||
ldo R%sys_call_table64(%r1), %r19
|
||||
#else
|
||||
load32 sys_call_table, %r19
|
||||
@@ -355,10 +355,10 @@ tracesys_next:
|
||||
extrd,u %r19,63,1,%r2 /* W hidden in bottom bit */
|
||||
|
||||
ldil L%sys_call_table, %r1
|
||||
or,= %r2,%r2,%r2
|
||||
addil L%(sys_call_table64-sys_call_table), %r1
|
||||
or,ev %r2,%r2,%r2
|
||||
ldil L%sys_call_table64, %r1
|
||||
ldo R%sys_call_table(%r1), %r19
|
||||
or,= %r2,%r2,%r2
|
||||
or,ev %r2,%r2,%r2
|
||||
ldo R%sys_call_table64(%r1), %r19
|
||||
#else
|
||||
load32 sys_call_table, %r19
|
||||
@@ -931,6 +931,8 @@ ENTRY(sys_call_table)
|
||||
END(sys_call_table)
|
||||
|
||||
#ifdef CONFIG_64BIT
|
||||
#undef __SYSCALL_WITH_COMPAT
|
||||
#define __SYSCALL_WITH_COMPAT(nr, native, compat) __SYSCALL(nr, native)
|
||||
.align 8
|
||||
ENTRY(sys_call_table64)
|
||||
#include <asm/syscall_table_64.h> /* 64-bit native syscalls */
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#ifndef _ASM_POWERPC_DTL_H
|
||||
#define _ASM_POWERPC_DTL_H
|
||||
|
||||
#include <linux/rwsem.h>
|
||||
#include <asm/lppaca.h>
|
||||
#include <linux/spinlock_types.h>
|
||||
|
||||
/*
|
||||
* Layout of entries in the hypervisor's dispatch trace log buffer.
|
||||
@@ -35,7 +35,7 @@ struct dtl_entry {
|
||||
#define DTL_LOG_ALL (DTL_LOG_CEDE | DTL_LOG_PREEMPT | DTL_LOG_FAULT)
|
||||
|
||||
extern struct kmem_cache *dtl_cache;
|
||||
extern rwlock_t dtl_access_lock;
|
||||
extern struct rw_semaphore dtl_access_lock;
|
||||
|
||||
/*
|
||||
* When CONFIG_VIRT_CPU_ACCOUNTING_NATIVE = y, the cpu accounting code controls
|
||||
|
||||
@@ -174,9 +174,4 @@ extern int emulate_step(struct pt_regs *regs, struct ppc_inst instr);
|
||||
*/
|
||||
extern int emulate_loadstore(struct pt_regs *regs, struct instruction_op *op);
|
||||
|
||||
extern void emulate_vsx_load(struct instruction_op *op, union vsx_reg *reg,
|
||||
const void *mem, bool cross_endian);
|
||||
extern void emulate_vsx_store(struct instruction_op *op,
|
||||
const union vsx_reg *reg, void *mem,
|
||||
bool cross_endian);
|
||||
extern int emulate_dcbz(unsigned long ea, struct pt_regs *regs);
|
||||
|
||||
@@ -27,6 +27,7 @@ int vdso_getcpu_init(void);
|
||||
#ifdef __VDSO64__
|
||||
#define V_FUNCTION_BEGIN(name) \
|
||||
.globl name; \
|
||||
.type name,@function; \
|
||||
name: \
|
||||
|
||||
#define V_FUNCTION_END(name) \
|
||||
|
||||
@@ -2894,7 +2894,7 @@ static void __init fixup_device_tree_chrp(void)
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_PPC64) && defined(CONFIG_PPC_PMAC)
|
||||
static void __init fixup_device_tree_pmac(void)
|
||||
static void __init fixup_device_tree_pmac64(void)
|
||||
{
|
||||
phandle u3, i2c, mpic;
|
||||
u32 u3_rev;
|
||||
@@ -2934,7 +2934,31 @@ static void __init fixup_device_tree_pmac(void)
|
||||
&parent, sizeof(parent));
|
||||
}
|
||||
#else
|
||||
#define fixup_device_tree_pmac()
|
||||
#define fixup_device_tree_pmac64()
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PPC_PMAC
|
||||
static void __init fixup_device_tree_pmac(void)
|
||||
{
|
||||
__be32 val = 1;
|
||||
char type[8];
|
||||
phandle node;
|
||||
|
||||
// Some pmacs are missing #size-cells on escc nodes
|
||||
for (node = 0; prom_next_node(&node); ) {
|
||||
type[0] = '\0';
|
||||
prom_getprop(node, "device_type", type, sizeof(type));
|
||||
if (prom_strcmp(type, "escc"))
|
||||
continue;
|
||||
|
||||
if (prom_getproplen(node, "#size-cells") != PROM_ERROR)
|
||||
continue;
|
||||
|
||||
prom_setprop(node, NULL, "#size-cells", &val, sizeof(val));
|
||||
}
|
||||
}
|
||||
#else
|
||||
static inline void fixup_device_tree_pmac(void) { }
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PPC_EFIKA
|
||||
@@ -3159,6 +3183,7 @@ static void __init fixup_device_tree(void)
|
||||
fixup_device_tree_maple_memory_controller();
|
||||
fixup_device_tree_chrp();
|
||||
fixup_device_tree_pmac();
|
||||
fixup_device_tree_pmac64();
|
||||
fixup_device_tree_efika();
|
||||
fixup_device_tree_pasemi();
|
||||
}
|
||||
|
||||
@@ -908,6 +908,7 @@ void __init setup_arch(char **cmdline_p)
|
||||
mem_topology_setup();
|
||||
/* Set max_mapnr before paging_init() */
|
||||
set_max_mapnr(max_pfn);
|
||||
high_memory = (void *)__va(max_low_pfn * PAGE_SIZE);
|
||||
|
||||
/*
|
||||
* Release secondary cpus out of their spinloops at 0x60 now that
|
||||
|
||||
@@ -909,13 +909,18 @@ int setup_purgatory_ppc64(struct kimage *image, const void *slave_code,
|
||||
if (dn) {
|
||||
u64 val;
|
||||
|
||||
of_property_read_u64(dn, "opal-base-address", &val);
|
||||
ret = of_property_read_u64(dn, "opal-base-address", &val);
|
||||
if (ret)
|
||||
goto out;
|
||||
|
||||
ret = kexec_purgatory_get_set_symbol(image, "opal_base", &val,
|
||||
sizeof(val), false);
|
||||
if (ret)
|
||||
goto out;
|
||||
|
||||
of_property_read_u64(dn, "opal-entry-address", &val);
|
||||
ret = of_property_read_u64(dn, "opal-entry-address", &val);
|
||||
if (ret)
|
||||
goto out;
|
||||
ret = kexec_purgatory_get_set_symbol(image, "opal_entry", &val,
|
||||
sizeof(val), false);
|
||||
}
|
||||
|
||||
@@ -706,8 +706,8 @@ static nokprobe_inline int emulate_stq(struct pt_regs *regs, unsigned long ea,
|
||||
#endif /* __powerpc64 */
|
||||
|
||||
#ifdef CONFIG_VSX
|
||||
void emulate_vsx_load(struct instruction_op *op, union vsx_reg *reg,
|
||||
const void *mem, bool rev)
|
||||
static nokprobe_inline void emulate_vsx_load(struct instruction_op *op, union vsx_reg *reg,
|
||||
const void *mem, bool rev)
|
||||
{
|
||||
int size, read_size;
|
||||
int i, j;
|
||||
@@ -787,11 +787,9 @@ void emulate_vsx_load(struct instruction_op *op, union vsx_reg *reg,
|
||||
break;
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(emulate_vsx_load);
|
||||
NOKPROBE_SYMBOL(emulate_vsx_load);
|
||||
|
||||
void emulate_vsx_store(struct instruction_op *op, const union vsx_reg *reg,
|
||||
void *mem, bool rev)
|
||||
static nokprobe_inline void emulate_vsx_store(struct instruction_op *op, const union vsx_reg *reg,
|
||||
void *mem, bool rev)
|
||||
{
|
||||
int size, write_size;
|
||||
int i, j;
|
||||
@@ -863,8 +861,6 @@ void emulate_vsx_store(struct instruction_op *op, const union vsx_reg *reg,
|
||||
break;
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(emulate_vsx_store);
|
||||
NOKPROBE_SYMBOL(emulate_vsx_store);
|
||||
|
||||
static nokprobe_inline int do_vsx_load(struct instruction_op *op,
|
||||
unsigned long ea, struct pt_regs *regs,
|
||||
|
||||
@@ -292,8 +292,6 @@ void __init mem_init(void)
|
||||
swiotlb_init(0);
|
||||
#endif
|
||||
|
||||
high_memory = (void *) __va(max_low_pfn * PAGE_SIZE);
|
||||
|
||||
kasan_late_init();
|
||||
|
||||
memblock_free_all();
|
||||
|
||||
@@ -1177,6 +1177,9 @@ void __init mem_topology_setup(void)
|
||||
{
|
||||
int cpu;
|
||||
|
||||
max_low_pfn = max_pfn = memblock_end_of_DRAM() >> PAGE_SHIFT;
|
||||
min_low_pfn = MEMORY_START >> PAGE_SHIFT;
|
||||
|
||||
/*
|
||||
* Linux/mm assumes node 0 to be online at boot. However this is not
|
||||
* true on PowerPC, where node 0 is similar to any other node, it
|
||||
@@ -1221,9 +1224,6 @@ void __init initmem_init(void)
|
||||
{
|
||||
int nid;
|
||||
|
||||
max_low_pfn = memblock_end_of_DRAM() >> PAGE_SHIFT;
|
||||
max_pfn = max_low_pfn;
|
||||
|
||||
memblock_dump_all();
|
||||
|
||||
for_each_online_node(nid) {
|
||||
|
||||
@@ -285,6 +285,7 @@ int __init opal_event_init(void)
|
||||
name, NULL);
|
||||
if (rc) {
|
||||
pr_warn("Error %d requesting OPAL irq %d\n", rc, (int)r->start);
|
||||
kfree(name);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -181,7 +181,7 @@ static int dtl_enable(struct dtl *dtl)
|
||||
return -EBUSY;
|
||||
|
||||
/* ensure there are no other conflicting dtl users */
|
||||
if (!read_trylock(&dtl_access_lock))
|
||||
if (!down_read_trylock(&dtl_access_lock))
|
||||
return -EBUSY;
|
||||
|
||||
n_entries = dtl_buf_entries;
|
||||
@@ -189,7 +189,7 @@ static int dtl_enable(struct dtl *dtl)
|
||||
if (!buf) {
|
||||
printk(KERN_WARNING "%s: buffer alloc failed for cpu %d\n",
|
||||
__func__, dtl->cpu);
|
||||
read_unlock(&dtl_access_lock);
|
||||
up_read(&dtl_access_lock);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
@@ -207,7 +207,7 @@ static int dtl_enable(struct dtl *dtl)
|
||||
spin_unlock(&dtl->lock);
|
||||
|
||||
if (rc) {
|
||||
read_unlock(&dtl_access_lock);
|
||||
up_read(&dtl_access_lock);
|
||||
kmem_cache_free(dtl_cache, buf);
|
||||
}
|
||||
|
||||
@@ -222,7 +222,7 @@ static void dtl_disable(struct dtl *dtl)
|
||||
dtl->buf = NULL;
|
||||
dtl->buf_entries = 0;
|
||||
spin_unlock(&dtl->lock);
|
||||
read_unlock(&dtl_access_lock);
|
||||
up_read(&dtl_access_lock);
|
||||
}
|
||||
|
||||
/* file interface */
|
||||
|
||||
@@ -166,7 +166,7 @@ struct vcpu_dispatch_data {
|
||||
*/
|
||||
#define NR_CPUS_H NR_CPUS
|
||||
|
||||
DEFINE_RWLOCK(dtl_access_lock);
|
||||
DECLARE_RWSEM(dtl_access_lock);
|
||||
static DEFINE_PER_CPU(struct vcpu_dispatch_data, vcpu_disp_data);
|
||||
static DEFINE_PER_CPU(u64, dtl_entry_ridx);
|
||||
static DEFINE_PER_CPU(struct dtl_worker, dtl_workers);
|
||||
@@ -460,7 +460,7 @@ static int dtl_worker_enable(unsigned long *time_limit)
|
||||
{
|
||||
int rc = 0, state;
|
||||
|
||||
if (!write_trylock(&dtl_access_lock)) {
|
||||
if (!down_write_trylock(&dtl_access_lock)) {
|
||||
rc = -EBUSY;
|
||||
goto out;
|
||||
}
|
||||
@@ -476,7 +476,7 @@ static int dtl_worker_enable(unsigned long *time_limit)
|
||||
pr_err("vcpudispatch_stats: unable to setup workqueue for DTL processing\n");
|
||||
free_dtl_buffers(time_limit);
|
||||
reset_global_dtl_mask();
|
||||
write_unlock(&dtl_access_lock);
|
||||
up_write(&dtl_access_lock);
|
||||
rc = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
@@ -491,7 +491,7 @@ static void dtl_worker_disable(unsigned long *time_limit)
|
||||
cpuhp_remove_state(dtl_worker_state);
|
||||
free_dtl_buffers(time_limit);
|
||||
reset_global_dtl_mask();
|
||||
write_unlock(&dtl_access_lock);
|
||||
up_write(&dtl_access_lock);
|
||||
}
|
||||
|
||||
static ssize_t vcpudispatch_stats_write(struct file *file, const char __user *p,
|
||||
|
||||
@@ -193,6 +193,11 @@ config GENERIC_HWEIGHT
|
||||
config FIX_EARLYCON_MEM
|
||||
def_bool MMU
|
||||
|
||||
config ILLEGAL_POINTER_VALUE
|
||||
hex
|
||||
default 0 if 32BIT
|
||||
default 0xdead000000000000 if 64BIT
|
||||
|
||||
config PGTABLE_LEVELS
|
||||
int
|
||||
default 3 if 64BIT
|
||||
|
||||
@@ -4,8 +4,6 @@
|
||||
* Copyright (C) 2017 SiFive
|
||||
*/
|
||||
|
||||
#define GENERATING_ASM_OFFSETS
|
||||
|
||||
#include <linux/kbuild.h>
|
||||
#include <linux/sched.h>
|
||||
#include <asm/thread_info.h>
|
||||
|
||||
@@ -69,7 +69,7 @@ void __cpu_die(unsigned int cpu)
|
||||
if (cpu_ops[cpu]->cpu_is_stopped)
|
||||
ret = cpu_ops[cpu]->cpu_is_stopped(cpu);
|
||||
if (ret)
|
||||
pr_warn("CPU%d may not have stopped: %d\n", cpu, ret);
|
||||
pr_warn("CPU%u may not have stopped: %d\n", cpu, ret);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -59,7 +59,7 @@ extra_header_fields:
|
||||
.long efi_header_end - _start // SizeOfHeaders
|
||||
.long 0 // CheckSum
|
||||
.short IMAGE_SUBSYSTEM_EFI_APPLICATION // Subsystem
|
||||
.short 0 // DllCharacteristics
|
||||
.short IMAGE_DLL_CHARACTERISTICS_NX_COMPAT // DllCharacteristics
|
||||
.quad 0 // SizeOfStackReserve
|
||||
.quad 0 // SizeOfStackCommit
|
||||
.quad 0 // SizeOfHeapReserve
|
||||
|
||||
@@ -71,7 +71,7 @@ void perf_callchain_user(struct perf_callchain_entry_ctx *entry,
|
||||
perf_callchain_store(entry, regs->epc);
|
||||
|
||||
fp = user_backtrace(entry, fp, regs->ra);
|
||||
while (fp && !(fp & 0x3) && entry->nr < entry->max_stack)
|
||||
while (fp && !(fp & 0x7) && entry->nr < entry->max_stack)
|
||||
fp = user_backtrace(entry, fp, 0);
|
||||
}
|
||||
|
||||
|
||||
@@ -131,8 +131,6 @@
|
||||
#define REG_PTR(insn, pos, regs) \
|
||||
(ulong *)((ulong)(regs) + REG_OFFSET(insn, pos))
|
||||
|
||||
#define GET_RM(insn) (((insn) >> 12) & 7)
|
||||
|
||||
#define GET_RS1(insn, regs) (*REG_PTR(insn, SH_RS1, regs))
|
||||
#define GET_RS2(insn, regs) (*REG_PTR(insn, SH_RS2, regs))
|
||||
#define GET_RS1S(insn, regs) (*REG_PTR(RVC_RS1S(insn), 0, regs))
|
||||
|
||||
@@ -18,6 +18,7 @@ obj-vdso = $(patsubst %, %.o, $(vdso-syms)) note.o
|
||||
|
||||
ccflags-y := -fno-stack-protector
|
||||
ccflags-y += -DDISABLE_BRANCH_PROFILING
|
||||
ccflags-y += -fno-builtin
|
||||
|
||||
ifneq ($(c-gettimeofday-y),)
|
||||
CFLAGS_vgettimeofday.o += -fPIC -include $(c-gettimeofday-y)
|
||||
|
||||
@@ -53,8 +53,10 @@ static inline int test_facility(unsigned long nr)
|
||||
unsigned long facilities_als[] = { FACILITIES_ALS };
|
||||
|
||||
if (__builtin_constant_p(nr) && nr < sizeof(facilities_als) * 8) {
|
||||
if (__test_facility(nr, &facilities_als))
|
||||
return 1;
|
||||
if (__test_facility(nr, &facilities_als)) {
|
||||
if (!__is_defined(__DECOMPRESSOR))
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
return __test_facility(nr, &S390_lowcore.stfle_fac_list);
|
||||
}
|
||||
|
||||
@@ -75,6 +75,7 @@ struct perf_sf_sde_regs {
|
||||
#define SAMPLE_FREQ_MODE(hwc) (SAMPL_FLAGS(hwc) & PERF_CPUM_SF_FREQ_MODE)
|
||||
|
||||
#define perf_arch_fetch_caller_regs(regs, __ip) do { \
|
||||
(regs)->psw.mask = 0; \
|
||||
(regs)->psw.addr = (__ip); \
|
||||
(regs)->gprs[15] = (unsigned long)__builtin_frame_address(0) - \
|
||||
offsetof(struct stack_frame, back_chain); \
|
||||
|
||||
@@ -1432,7 +1432,7 @@ static int aux_output_begin(struct perf_output_handle *handle,
|
||||
unsigned long head, base, offset;
|
||||
struct hws_trailer_entry *te;
|
||||
|
||||
if (WARN_ON_ONCE(handle->head & ~PAGE_MASK))
|
||||
if (handle->head & ~PAGE_MASK)
|
||||
return -EINVAL;
|
||||
|
||||
aux->head = handle->head >> PAGE_SHIFT;
|
||||
@@ -1613,7 +1613,7 @@ static void hw_collect_aux(struct cpu_hw_sf *cpuhw)
|
||||
unsigned long num_sdb;
|
||||
|
||||
aux = perf_get_aux(handle);
|
||||
if (WARN_ON_ONCE(!aux))
|
||||
if (!aux)
|
||||
return;
|
||||
|
||||
/* Inform user space new data arrived */
|
||||
@@ -1635,7 +1635,7 @@ static void hw_collect_aux(struct cpu_hw_sf *cpuhw)
|
||||
__func__);
|
||||
break;
|
||||
}
|
||||
if (WARN_ON_ONCE(!aux))
|
||||
if (!aux)
|
||||
return;
|
||||
|
||||
/* Update head and alert_mark to new position */
|
||||
@@ -1870,12 +1870,8 @@ static void cpumsf_pmu_start(struct perf_event *event, int flags)
|
||||
{
|
||||
struct cpu_hw_sf *cpuhw = this_cpu_ptr(&cpu_hw_sf);
|
||||
|
||||
if (WARN_ON_ONCE(!(event->hw.state & PERF_HES_STOPPED)))
|
||||
if (!(event->hw.state & PERF_HES_STOPPED))
|
||||
return;
|
||||
|
||||
if (flags & PERF_EF_RELOAD)
|
||||
WARN_ON_ONCE(!(event->hw.state & PERF_HES_UPTODATE));
|
||||
|
||||
perf_pmu_disable(event->pmu);
|
||||
event->hw.state = 0;
|
||||
cpuhw->lsctl.cs = 1;
|
||||
@@ -1900,7 +1896,9 @@ static void cpumsf_pmu_stop(struct perf_event *event, int flags)
|
||||
event->hw.state |= PERF_HES_STOPPED;
|
||||
|
||||
if ((flags & PERF_EF_UPDATE) && !(event->hw.state & PERF_HES_UPTODATE)) {
|
||||
hw_perf_event_update(event, 1);
|
||||
/* CPU hotplug off removes SDBs. No samples to extract. */
|
||||
if (cpuhw->flags & PMU_F_RESERVED)
|
||||
hw_perf_event_update(event, 1);
|
||||
event->hw.state |= PERF_HES_UPTODATE;
|
||||
}
|
||||
perf_pmu_enable(event->pmu);
|
||||
|
||||
@@ -12,7 +12,7 @@ kapi-hdrs-y := $(kapi)/unistd_nr.h
|
||||
uapi-hdrs-y := $(uapi)/unistd_32.h
|
||||
uapi-hdrs-y += $(uapi)/unistd_64.h
|
||||
|
||||
targets += $(addprefix ../../../,$(gen-y) $(kapi-hdrs-y) $(uapi-hdrs-y))
|
||||
targets += $(addprefix ../../../../,$(gen-y) $(kapi-hdrs-y) $(uapi-hdrs-y))
|
||||
|
||||
PHONY += kapi uapi
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ static int __diag_page_ref_service(struct kvm_vcpu *vcpu)
|
||||
vcpu->stat.diagnose_258++;
|
||||
if (vcpu->run->s.regs.gprs[rx] & 7)
|
||||
return kvm_s390_inject_program_int(vcpu, PGM_SPECIFICATION);
|
||||
rc = read_guest(vcpu, vcpu->run->s.regs.gprs[rx], rx, &parm, sizeof(parm));
|
||||
rc = read_guest_real(vcpu, vcpu->run->s.regs.gprs[rx], &parm, sizeof(parm));
|
||||
if (rc)
|
||||
return kvm_s390_inject_prog_cond(vcpu, rc);
|
||||
if (parm.parm_version != 2 || parm.parm_len < 5 || parm.code != 0x258)
|
||||
|
||||
@@ -794,46 +794,102 @@ static int low_address_protection_enabled(struct kvm_vcpu *vcpu,
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int guest_page_range(struct kvm_vcpu *vcpu, unsigned long ga, u8 ar,
|
||||
unsigned long *pages, unsigned long nr_pages,
|
||||
const union asce asce, enum gacc_mode mode)
|
||||
/**
|
||||
* guest_range_to_gpas() - Calculate guest physical addresses of page fragments
|
||||
* covering a logical range
|
||||
* @vcpu: virtual cpu
|
||||
* @ga: guest address, start of range
|
||||
* @ar: access register
|
||||
* @gpas: output argument, may be NULL
|
||||
* @len: length of range in bytes
|
||||
* @asce: address-space-control element to use for translation
|
||||
* @mode: access mode
|
||||
*
|
||||
* Translate a logical range to a series of guest absolute addresses,
|
||||
* such that the concatenation of page fragments starting at each gpa make up
|
||||
* the whole range.
|
||||
* The translation is performed as if done by the cpu for the given @asce, @ar,
|
||||
* @mode and state of the @vcpu.
|
||||
* If the translation causes an exception, its program interruption code is
|
||||
* returned and the &struct kvm_s390_pgm_info pgm member of @vcpu is modified
|
||||
* such that a subsequent call to kvm_s390_inject_prog_vcpu() will inject
|
||||
* a correct exception into the guest.
|
||||
* The resulting gpas are stored into @gpas, unless it is NULL.
|
||||
*
|
||||
* Note: All fragments except the first one start at the beginning of a page.
|
||||
* When deriving the boundaries of a fragment from a gpa, all but the last
|
||||
* fragment end at the end of the page.
|
||||
*
|
||||
* Return:
|
||||
* * 0 - success
|
||||
* * <0 - translation could not be performed, for example if guest
|
||||
* memory could not be accessed
|
||||
* * >0 - an access exception occurred. In this case the returned value
|
||||
* is the program interruption code and the contents of pgm may
|
||||
* be used to inject an exception into the guest.
|
||||
*/
|
||||
static int guest_range_to_gpas(struct kvm_vcpu *vcpu, unsigned long ga, u8 ar,
|
||||
unsigned long *gpas, unsigned long len,
|
||||
const union asce asce, enum gacc_mode mode)
|
||||
{
|
||||
psw_t *psw = &vcpu->arch.sie_block->gpsw;
|
||||
unsigned int offset = offset_in_page(ga);
|
||||
unsigned int fragment_len;
|
||||
int lap_enabled, rc = 0;
|
||||
enum prot_type prot;
|
||||
unsigned long gpa;
|
||||
|
||||
lap_enabled = low_address_protection_enabled(vcpu, asce);
|
||||
while (nr_pages) {
|
||||
while (min(PAGE_SIZE - offset, len) > 0) {
|
||||
fragment_len = min(PAGE_SIZE - offset, len);
|
||||
ga = kvm_s390_logical_to_effective(vcpu, ga);
|
||||
if (mode == GACC_STORE && lap_enabled && is_low_address(ga))
|
||||
return trans_exc(vcpu, PGM_PROTECTION, ga, ar, mode,
|
||||
PROT_TYPE_LA);
|
||||
ga &= PAGE_MASK;
|
||||
if (psw_bits(*psw).dat) {
|
||||
rc = guest_translate(vcpu, ga, pages, asce, mode, &prot);
|
||||
rc = guest_translate(vcpu, ga, &gpa, asce, mode, &prot);
|
||||
if (rc < 0)
|
||||
return rc;
|
||||
} else {
|
||||
*pages = kvm_s390_real_to_abs(vcpu, ga);
|
||||
if (kvm_is_error_gpa(vcpu->kvm, *pages))
|
||||
gpa = kvm_s390_real_to_abs(vcpu, ga);
|
||||
if (kvm_is_error_gpa(vcpu->kvm, gpa))
|
||||
rc = PGM_ADDRESSING;
|
||||
}
|
||||
if (rc)
|
||||
return trans_exc(vcpu, rc, ga, ar, mode, prot);
|
||||
ga += PAGE_SIZE;
|
||||
pages++;
|
||||
nr_pages--;
|
||||
if (gpas)
|
||||
*gpas++ = gpa;
|
||||
offset = 0;
|
||||
ga += fragment_len;
|
||||
len -= fragment_len;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int access_guest_page(struct kvm *kvm, enum gacc_mode mode, gpa_t gpa,
|
||||
void *data, unsigned int len)
|
||||
{
|
||||
const unsigned int offset = offset_in_page(gpa);
|
||||
const gfn_t gfn = gpa_to_gfn(gpa);
|
||||
int rc;
|
||||
|
||||
if (!gfn_to_memslot(kvm, gfn))
|
||||
return PGM_ADDRESSING;
|
||||
if (mode == GACC_STORE)
|
||||
rc = kvm_write_guest_page(kvm, gfn, data, offset, len);
|
||||
else
|
||||
rc = kvm_read_guest_page(kvm, gfn, data, offset, len);
|
||||
return rc;
|
||||
}
|
||||
|
||||
int access_guest(struct kvm_vcpu *vcpu, unsigned long ga, u8 ar, void *data,
|
||||
unsigned long len, enum gacc_mode mode)
|
||||
{
|
||||
psw_t *psw = &vcpu->arch.sie_block->gpsw;
|
||||
unsigned long _len, nr_pages, gpa, idx;
|
||||
unsigned long pages_array[2];
|
||||
unsigned long *pages;
|
||||
unsigned long nr_pages, idx;
|
||||
unsigned long gpa_array[2];
|
||||
unsigned int fragment_len;
|
||||
unsigned long *gpas;
|
||||
int need_ipte_lock;
|
||||
union asce asce;
|
||||
int rc;
|
||||
@@ -845,50 +901,45 @@ int access_guest(struct kvm_vcpu *vcpu, unsigned long ga, u8 ar, void *data,
|
||||
if (rc)
|
||||
return rc;
|
||||
nr_pages = (((ga & ~PAGE_MASK) + len - 1) >> PAGE_SHIFT) + 1;
|
||||
pages = pages_array;
|
||||
if (nr_pages > ARRAY_SIZE(pages_array))
|
||||
pages = vmalloc(array_size(nr_pages, sizeof(unsigned long)));
|
||||
if (!pages)
|
||||
gpas = gpa_array;
|
||||
if (nr_pages > ARRAY_SIZE(gpa_array))
|
||||
gpas = vmalloc(array_size(nr_pages, sizeof(unsigned long)));
|
||||
if (!gpas)
|
||||
return -ENOMEM;
|
||||
need_ipte_lock = psw_bits(*psw).dat && !asce.r;
|
||||
if (need_ipte_lock)
|
||||
ipte_lock(vcpu);
|
||||
rc = guest_page_range(vcpu, ga, ar, pages, nr_pages, asce, mode);
|
||||
rc = guest_range_to_gpas(vcpu, ga, ar, gpas, len, asce, mode);
|
||||
for (idx = 0; idx < nr_pages && !rc; idx++) {
|
||||
gpa = *(pages + idx) + (ga & ~PAGE_MASK);
|
||||
_len = min(PAGE_SIZE - (gpa & ~PAGE_MASK), len);
|
||||
if (mode == GACC_STORE)
|
||||
rc = kvm_write_guest(vcpu->kvm, gpa, data, _len);
|
||||
else
|
||||
rc = kvm_read_guest(vcpu->kvm, gpa, data, _len);
|
||||
len -= _len;
|
||||
ga += _len;
|
||||
data += _len;
|
||||
fragment_len = min(PAGE_SIZE - offset_in_page(gpas[idx]), len);
|
||||
rc = access_guest_page(vcpu->kvm, mode, gpas[idx], data, fragment_len);
|
||||
len -= fragment_len;
|
||||
data += fragment_len;
|
||||
}
|
||||
if (need_ipte_lock)
|
||||
ipte_unlock(vcpu);
|
||||
if (nr_pages > ARRAY_SIZE(pages_array))
|
||||
vfree(pages);
|
||||
if (nr_pages > ARRAY_SIZE(gpa_array))
|
||||
vfree(gpas);
|
||||
return rc;
|
||||
}
|
||||
|
||||
int access_guest_real(struct kvm_vcpu *vcpu, unsigned long gra,
|
||||
void *data, unsigned long len, enum gacc_mode mode)
|
||||
{
|
||||
unsigned long _len, gpa;
|
||||
unsigned int fragment_len;
|
||||
unsigned long gpa;
|
||||
int rc = 0;
|
||||
|
||||
while (len && !rc) {
|
||||
gpa = kvm_s390_real_to_abs(vcpu, gra);
|
||||
_len = min(PAGE_SIZE - (gpa & ~PAGE_MASK), len);
|
||||
if (mode)
|
||||
rc = write_guest_abs(vcpu, gpa, data, _len);
|
||||
else
|
||||
rc = read_guest_abs(vcpu, gpa, data, _len);
|
||||
len -= _len;
|
||||
gra += _len;
|
||||
data += _len;
|
||||
fragment_len = min(PAGE_SIZE - offset_in_page(gpa), len);
|
||||
rc = access_guest_page(vcpu->kvm, mode, gpa, data, fragment_len);
|
||||
len -= fragment_len;
|
||||
gra += fragment_len;
|
||||
data += fragment_len;
|
||||
}
|
||||
if (rc > 0)
|
||||
vcpu->arch.pgm.code = rc;
|
||||
return rc;
|
||||
}
|
||||
|
||||
@@ -904,8 +955,6 @@ int access_guest_real(struct kvm_vcpu *vcpu, unsigned long gra,
|
||||
int guest_translate_address(struct kvm_vcpu *vcpu, unsigned long gva, u8 ar,
|
||||
unsigned long *gpa, enum gacc_mode mode)
|
||||
{
|
||||
psw_t *psw = &vcpu->arch.sie_block->gpsw;
|
||||
enum prot_type prot;
|
||||
union asce asce;
|
||||
int rc;
|
||||
|
||||
@@ -913,23 +962,7 @@ int guest_translate_address(struct kvm_vcpu *vcpu, unsigned long gva, u8 ar,
|
||||
rc = get_vcpu_asce(vcpu, &asce, gva, ar, mode);
|
||||
if (rc)
|
||||
return rc;
|
||||
if (is_low_address(gva) && low_address_protection_enabled(vcpu, asce)) {
|
||||
if (mode == GACC_STORE)
|
||||
return trans_exc(vcpu, PGM_PROTECTION, gva, 0,
|
||||
mode, PROT_TYPE_LA);
|
||||
}
|
||||
|
||||
if (psw_bits(*psw).dat && !asce.r) { /* Use DAT? */
|
||||
rc = guest_translate(vcpu, gva, gpa, asce, mode, &prot);
|
||||
if (rc > 0)
|
||||
return trans_exc(vcpu, rc, gva, 0, mode, prot);
|
||||
} else {
|
||||
*gpa = kvm_s390_real_to_abs(vcpu, gva);
|
||||
if (kvm_is_error_gpa(vcpu->kvm, *gpa))
|
||||
return trans_exc(vcpu, rc, gva, PGM_ADDRESSING, mode, 0);
|
||||
}
|
||||
|
||||
return rc;
|
||||
return guest_range_to_gpas(vcpu, gva, ar, gpa, 1, asce, mode);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -938,17 +971,14 @@ int guest_translate_address(struct kvm_vcpu *vcpu, unsigned long gva, u8 ar,
|
||||
int check_gva_range(struct kvm_vcpu *vcpu, unsigned long gva, u8 ar,
|
||||
unsigned long length, enum gacc_mode mode)
|
||||
{
|
||||
unsigned long gpa;
|
||||
unsigned long currlen;
|
||||
union asce asce;
|
||||
int rc = 0;
|
||||
|
||||
rc = get_vcpu_asce(vcpu, &asce, gva, ar, mode);
|
||||
if (rc)
|
||||
return rc;
|
||||
ipte_lock(vcpu);
|
||||
while (length > 0 && !rc) {
|
||||
currlen = min(length, PAGE_SIZE - (gva % PAGE_SIZE));
|
||||
rc = guest_translate_address(vcpu, gva, ar, &gpa, mode);
|
||||
gva += currlen;
|
||||
length -= currlen;
|
||||
}
|
||||
rc = guest_range_to_gpas(vcpu, gva, ar, NULL, length, asce, mode);
|
||||
ipte_unlock(vcpu);
|
||||
|
||||
return rc;
|
||||
|
||||
@@ -344,11 +344,12 @@ int read_guest_abs(struct kvm_vcpu *vcpu, unsigned long gpa, void *data,
|
||||
* @len: number of bytes to copy
|
||||
*
|
||||
* Copy @len bytes from @data (kernel space) to @gra (guest real address).
|
||||
* It is up to the caller to ensure that the entire guest memory range is
|
||||
* valid memory before calling this function.
|
||||
* Guest low address and key protection are not checked.
|
||||
*
|
||||
* Returns zero on success or -EFAULT on error.
|
||||
* Returns zero on success, -EFAULT when copying from @data failed, or
|
||||
* PGM_ADRESSING in case @gra is outside a memslot. In this case, pgm check info
|
||||
* is also stored to allow injecting into the guest (if applicable) using
|
||||
* kvm_s390_inject_prog_cond().
|
||||
*
|
||||
* If an error occurs data may have been copied partially to guest memory.
|
||||
*/
|
||||
@@ -367,11 +368,12 @@ int write_guest_real(struct kvm_vcpu *vcpu, unsigned long gra, void *data,
|
||||
* @len: number of bytes to copy
|
||||
*
|
||||
* Copy @len bytes from @gra (guest real address) to @data (kernel space).
|
||||
* It is up to the caller to ensure that the entire guest memory range is
|
||||
* valid memory before calling this function.
|
||||
* Guest key protection is not checked.
|
||||
*
|
||||
* Returns zero on success or -EFAULT on error.
|
||||
* Returns zero on success, -EFAULT when copying to @data failed, or
|
||||
* PGM_ADRESSING in case @gra is outside a memslot. In this case, pgm check info
|
||||
* is also stored to allow injecting into the guest (if applicable) using
|
||||
* kvm_s390_inject_prog_cond().
|
||||
*
|
||||
* If an error occurs data may have been copied partially to kernel space.
|
||||
*/
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user