mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
Merge tag 'ASB-2021-06-05_4.19-stable' of https://android.googlesource.com/kernel/common
https://source.android.com/security/bulletin/2021-06-01 CVE-2020-14305 CVE-2020-14381 CVE-2021-0512 CVE-2021-3347 * tag 'ASB-2021-06-05_4.19-stable': (1641 commits) Linux 4.19.193 usb: core: reduce power-on-good delay time of root hub net: hns3: check the return of skb_checksum_help() drivers/net/ethernet: clean up unused assignments hugetlbfs: hugetlb_fault_mutex_hash() cleanup MIPS: ralink: export rt_sysc_membase for rt2880_wdt.c MIPS: alchemy: xxs1500: add gpio-au1000.h header file sch_dsmark: fix a NULL deref in qdisc_reset() ipv6: record frag_max_size in atomic fragments in input path scsi: libsas: Use _safe() loop in sas_resume_port() ixgbe: fix large MTU request from VF bpf: Set mac_len in bpf_skb_change_head ASoC: cs35l33: fix an error code in probe() staging: emxx_udc: fix loop in _nbu2ss_nuke() mld: fix panic in mld_newpack() net: bnx2: Fix error return code in bnx2_init_board() openvswitch: meter: fix race when getting now_ms. net: mdio: octeon: Fix some double free issues net: mdio: thunder: Fix a double free issue in the .remove function net: fec: fix the potential memory leak in fec_enet_init() ... Change-Id: If547ecdc8654e01ea17afea2ff2dd546f7a495d2 Conflicts: drivers/media/i2c/ov5670.c drivers/mmc/core/mmc_ops.c drivers/regulator/core.c drivers/usb/dwc3/gadget.c drivers/usb/gadget/function/f_uac1.c drivers/usb/gadget/function/f_uvc.c
This commit is contained in:
@@ -35,7 +35,7 @@ Following example uses irq pin number 3 of gpio0 for out of band wake-on-bt:
|
||||
compatible = "usb1286,204e";
|
||||
reg = <1>;
|
||||
interrupt-parent = <&gpio0>;
|
||||
interrupt-name = "wakeup";
|
||||
interrupt-names = "wakeup";
|
||||
interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
|
||||
};
|
||||
};
|
||||
|
||||
2
Documentation/filesystems/OWNERS
Normal file
2
Documentation/filesystems/OWNERS
Normal file
@@ -0,0 +1,2 @@
|
||||
# include OWNERS from the authoritative android-mainline branch
|
||||
include kernel/common:android-mainline:/Documentation/filesystems/OWNERS
|
||||
@@ -27,9 +27,9 @@ automatically verified against the file's Merkle tree. Reads of any
|
||||
corrupted data, including mmap reads, will fail.
|
||||
|
||||
Userspace can use another ioctl to retrieve the root hash (actually
|
||||
the "file measurement", which is a hash that includes the root hash)
|
||||
that fs-verity is enforcing for the file. This ioctl executes in
|
||||
constant time, regardless of the file size.
|
||||
the "fs-verity file digest", which is a hash that includes the Merkle
|
||||
tree root hash) that fs-verity is enforcing for the file. This ioctl
|
||||
executes in constant time, regardless of the file size.
|
||||
|
||||
fs-verity is essentially a way to hash a file in constant time,
|
||||
subject to the caveat that reads which would violate the hash will
|
||||
@@ -177,9 +177,10 @@ FS_IOC_ENABLE_VERITY can fail with the following errors:
|
||||
FS_IOC_MEASURE_VERITY
|
||||
---------------------
|
||||
|
||||
The FS_IOC_MEASURE_VERITY ioctl retrieves the measurement of a verity
|
||||
file. The file measurement is a digest that cryptographically
|
||||
identifies the file contents that are being enforced on reads.
|
||||
The FS_IOC_MEASURE_VERITY ioctl retrieves the digest of a verity file.
|
||||
The fs-verity file digest is a cryptographic digest that identifies
|
||||
the file contents that are being enforced on reads; it is computed via
|
||||
a Merkle tree and is different from a traditional full-file digest.
|
||||
|
||||
This ioctl takes in a pointer to a variable-length structure::
|
||||
|
||||
@@ -197,7 +198,7 @@ On success, 0 is returned and the kernel fills in the structure as
|
||||
follows:
|
||||
|
||||
- ``digest_algorithm`` will be the hash algorithm used for the file
|
||||
measurement. It will match ``fsverity_enable_arg::hash_algorithm``.
|
||||
digest. It will match ``fsverity_enable_arg::hash_algorithm``.
|
||||
- ``digest_size`` will be the size of the digest in bytes, e.g. 32
|
||||
for SHA-256. (This can be redundant with ``digest_algorithm``.)
|
||||
- ``digest`` will be the actual bytes of the digest.
|
||||
@@ -257,25 +258,24 @@ non-verity one, with the following exceptions:
|
||||
with EIO (for read()) or SIGBUS (for mmap() reads).
|
||||
|
||||
- If the sysctl "fs.verity.require_signatures" is set to 1 and the
|
||||
file's verity measurement is not signed by a key in the fs-verity
|
||||
keyring, then opening the file will fail. See `Built-in signature
|
||||
verification`_.
|
||||
file is not signed by a key in the fs-verity keyring, then opening
|
||||
the file will fail. See `Built-in signature verification`_.
|
||||
|
||||
Direct access to the Merkle tree is not supported. Therefore, if a
|
||||
verity file is copied, or is backed up and restored, then it will lose
|
||||
its "verity"-ness. fs-verity is primarily meant for files like
|
||||
executables that are managed by a package manager.
|
||||
|
||||
File measurement computation
|
||||
============================
|
||||
File digest computation
|
||||
=======================
|
||||
|
||||
This section describes how fs-verity hashes the file contents using a
|
||||
Merkle tree to produce the "file measurement" which cryptographically
|
||||
identifies the file contents. This algorithm is the same for all
|
||||
filesystems that support fs-verity.
|
||||
Merkle tree to produce the digest which cryptographically identifies
|
||||
the file contents. This algorithm is the same for all filesystems
|
||||
that support fs-verity.
|
||||
|
||||
Userspace only needs to be aware of this algorithm if it needs to
|
||||
compute the file measurement itself, e.g. in order to sign the file.
|
||||
compute fs-verity file digests itself, e.g. in order to sign files.
|
||||
|
||||
.. _fsverity_merkle_tree:
|
||||
|
||||
@@ -325,26 +325,22 @@ can't a distinguish a large file from a small second file whose data
|
||||
is exactly the top-level hash block of the first file. Ambiguities
|
||||
also arise from the convention of padding to the next block boundary.
|
||||
|
||||
To solve this problem, the verity file measurement is actually
|
||||
computed as a hash of the following structure, which contains the
|
||||
Merkle tree root hash as well as other fields such as the file size::
|
||||
To solve this problem, the fs-verity file digest is actually computed
|
||||
as a hash of the following structure, which contains the Merkle tree
|
||||
root hash as well as other fields such as the file size::
|
||||
|
||||
struct fsverity_descriptor {
|
||||
__u8 version; /* must be 1 */
|
||||
__u8 hash_algorithm; /* Merkle tree hash algorithm */
|
||||
__u8 log_blocksize; /* log2 of size of data and tree blocks */
|
||||
__u8 salt_size; /* size of salt in bytes; 0 if none */
|
||||
__le32 sig_size; /* must be 0 */
|
||||
__le32 __reserved_0x04; /* must be 0 */
|
||||
__le64 data_size; /* size of file the Merkle tree is built over */
|
||||
__u8 root_hash[64]; /* Merkle tree root hash */
|
||||
__u8 salt[32]; /* salt prepended to each hashed block */
|
||||
__u8 __reserved[144]; /* must be 0's */
|
||||
};
|
||||
|
||||
Note that the ``sig_size`` field must be set to 0 for the purpose of
|
||||
computing the file measurement, even if a signature was provided (or
|
||||
will be provided) to `FS_IOC_ENABLE_VERITY`_.
|
||||
|
||||
Built-in signature verification
|
||||
===============================
|
||||
|
||||
@@ -359,20 +355,20 @@ kernel. Specifically, it adds support for:
|
||||
certificates from being added.
|
||||
|
||||
2. `FS_IOC_ENABLE_VERITY`_ accepts a pointer to a PKCS#7 formatted
|
||||
detached signature in DER format of the file measurement. On
|
||||
success, this signature is persisted alongside the Merkle tree.
|
||||
detached signature in DER format of the file's fs-verity digest.
|
||||
On success, this signature is persisted alongside the Merkle tree.
|
||||
Then, any time the file is opened, the kernel will verify the
|
||||
file's actual measurement against this signature, using the
|
||||
certificates in the ".fs-verity" keyring.
|
||||
file's actual digest against this signature, using the certificates
|
||||
in the ".fs-verity" keyring.
|
||||
|
||||
3. A new sysctl "fs.verity.require_signatures" is made available.
|
||||
When set to 1, the kernel requires that all verity files have a
|
||||
correctly signed file measurement as described in (2).
|
||||
correctly signed digest as described in (2).
|
||||
|
||||
File measurements must be signed in the following format, which is
|
||||
similar to the structure used by `FS_IOC_MEASURE_VERITY`_::
|
||||
fs-verity file digests must be signed in the following format, which
|
||||
is similar to the structure used by `FS_IOC_MEASURE_VERITY`_::
|
||||
|
||||
struct fsverity_signed_digest {
|
||||
struct fsverity_formatted_digest {
|
||||
char magic[8]; /* must be "FSVerity" */
|
||||
__le16 digest_algorithm;
|
||||
__le16 digest_size;
|
||||
@@ -421,8 +417,8 @@ can only be set by `FS_IOC_ENABLE_VERITY`_, and it cannot be cleared.
|
||||
|
||||
ext4 also supports encryption, which can be used simultaneously with
|
||||
fs-verity. In this case, the plaintext data is verified rather than
|
||||
the ciphertext. This is necessary in order to make the file
|
||||
measurement meaningful, since every file is encrypted differently.
|
||||
the ciphertext. This is necessary in order to make the fs-verity file
|
||||
digest meaningful, since every file is encrypted differently.
|
||||
|
||||
ext4 stores the verity metadata (Merkle tree and fsverity_descriptor)
|
||||
past the end of the file, starting at the first 64K boundary beyond
|
||||
@@ -592,8 +588,8 @@ weren't already directly answered in other parts of this document.
|
||||
:Q: Isn't fs-verity useless because the attacker can just modify the
|
||||
hashes in the Merkle tree, which is stored on-disk?
|
||||
:A: To verify the authenticity of an fs-verity file you must verify
|
||||
the authenticity of the "file measurement", which is basically the
|
||||
root hash of the Merkle tree. See `Use cases`_.
|
||||
the authenticity of the "fs-verity file digest", which
|
||||
incorporates the root hash of the Merkle tree. See `Use cases`_.
|
||||
|
||||
:Q: Isn't fs-verity useless because the attacker can just replace a
|
||||
verity file with a non-verity one?
|
||||
|
||||
@@ -192,6 +192,12 @@ between the calls to start() and stop(), so holding a lock during that time
|
||||
is a reasonable thing to do. The seq_file code will also avoid taking any
|
||||
other locks while the iterator is active.
|
||||
|
||||
The iterater value returned by start() or next() is guaranteed to be
|
||||
passed to a subsequent next() or stop() call. This allows resources
|
||||
such as locks that were taken to be reliably released. There is *no*
|
||||
guarantee that the iterator will be passed to show(), though in practice
|
||||
it often will be.
|
||||
|
||||
|
||||
Formatted output
|
||||
|
||||
|
||||
@@ -211,12 +211,10 @@ Other notes:
|
||||
is 4096.
|
||||
|
||||
- show() methods should return the number of bytes printed into the
|
||||
buffer. This is the return value of scnprintf().
|
||||
buffer.
|
||||
|
||||
- show() must not use snprintf() when formatting the value to be
|
||||
returned to user space. If you can guarantee that an overflow
|
||||
will never happen you can use sprintf() otherwise you must use
|
||||
scnprintf().
|
||||
- show() should only use sysfs_emit() or sysfs_emit_at() when formatting
|
||||
the value to be returned to user space.
|
||||
|
||||
- store() should return the number of bytes used from the buffer. If the
|
||||
entire buffer has been used, just return the count argument.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/perl
|
||||
#!/usr/bin/env perl
|
||||
use strict;
|
||||
use Text::Tabs;
|
||||
use Getopt::Long;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/python
|
||||
#!/usr/bin/env python
|
||||
# The TCM v4 multi-protocol fabric module generation script for drivers/target/$NEW_MOD
|
||||
#
|
||||
# Copyright (c) 2010 Rising Tide Systems
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/python
|
||||
#!/usr/bin/env python
|
||||
# add symbolic names to read_msr / write_msr in trace
|
||||
# decode_msr msr-index.h < trace
|
||||
import sys
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/perl
|
||||
#!/usr/bin/env perl
|
||||
# This is a POC (proof of concept or piece of crap, take your pick) for reading the
|
||||
# text representation of trace output related to page allocation. It makes an attempt
|
||||
# to extract some high-level information on what is going on. The accuracy of the parser
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/perl
|
||||
#!/usr/bin/env perl
|
||||
# This is a POC for reading the text representation of trace output related to
|
||||
# page reclaim. It makes an attempt to extract some high-level information on
|
||||
# what is going on. The accuracy of the parser may vary
|
||||
|
||||
8
Makefile
8
Makefile
@@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 4
|
||||
PATCHLEVEL = 19
|
||||
SUBLEVEL = 172
|
||||
SUBLEVEL = 193
|
||||
EXTRAVERSION =
|
||||
NAME = "People's Front"
|
||||
|
||||
@@ -976,12 +976,6 @@ KBUILD_CFLAGS += $(call cc-option,-Werror=designated-init)
|
||||
# change __FILE__ to the relative path from the srctree
|
||||
KBUILD_CFLAGS += $(call cc-option,-fmacro-prefix-map=$(srctree)/=)
|
||||
|
||||
# ensure -fcf-protection is disabled when using retpoline as it is
|
||||
# incompatible with -mindirect-branch=thunk-extern
|
||||
ifdef CONFIG_RETPOLINE
|
||||
KBUILD_CFLAGS += $(call cc-option,-fcf-protection=none)
|
||||
endif
|
||||
|
||||
# use the deterministic mode of AR if available
|
||||
KBUILD_ARFLAGS := $(call ar-option,D)
|
||||
|
||||
|
||||
2
OWNERS
Normal file
2
OWNERS
Normal file
@@ -0,0 +1,2 @@
|
||||
# include OWNERS from the authoritative android-mainline branch
|
||||
include kernel/common:android-mainline:/OWNERS
|
||||
File diff suppressed because it is too large
Load Diff
@@ -22,6 +22,7 @@
|
||||
complete
|
||||
__const_udelay
|
||||
consume_skb
|
||||
_copy_to_iter
|
||||
cpu_hwcap_keys
|
||||
cpu_hwcaps
|
||||
cpu_number
|
||||
@@ -89,12 +90,14 @@
|
||||
__list_add_valid
|
||||
__list_del_entry_valid
|
||||
__ll_sc_atomic64_add
|
||||
__ll_sc_atomic64_add_return
|
||||
__ll_sc_atomic64_andnot
|
||||
__ll_sc_atomic64_fetch_or
|
||||
__ll_sc_atomic64_or
|
||||
__ll_sc_atomic_add
|
||||
__ll_sc_atomic_add_return
|
||||
__ll_sc_atomic_sub_return
|
||||
__ll_sc___cmpxchg_case_mb_4
|
||||
__local_bh_enable_ip
|
||||
lock_sock_nested
|
||||
memcpy
|
||||
@@ -104,7 +107,9 @@
|
||||
misc_deregister
|
||||
misc_register
|
||||
mod_timer
|
||||
__module_get
|
||||
module_layout
|
||||
module_put
|
||||
__msecs_to_jiffies
|
||||
msleep
|
||||
__mutex_init
|
||||
@@ -181,6 +186,7 @@
|
||||
refcount_dec_and_test_checked
|
||||
refcount_inc_checked
|
||||
register_netdev
|
||||
register_netdevice_notifier
|
||||
register_virtio_device
|
||||
register_virtio_driver
|
||||
release_sock
|
||||
@@ -229,6 +235,7 @@
|
||||
trace_seq_printf
|
||||
__udelay
|
||||
unregister_netdev
|
||||
unregister_netdevice_notifier
|
||||
unregister_netdevice_queue
|
||||
unregister_virtio_device
|
||||
unregister_virtio_driver
|
||||
@@ -301,6 +308,23 @@
|
||||
pci_for_each_dma_alias
|
||||
pci_request_acs
|
||||
|
||||
# required by dm-user.ko
|
||||
bio_advance
|
||||
bio_endio
|
||||
bio_put
|
||||
_copy_from_iter
|
||||
copy_page_from_iter
|
||||
copy_page_to_iter
|
||||
dm_register_target
|
||||
dm_unregister_target
|
||||
kasprintf
|
||||
mempool_alloc
|
||||
mempool_exit
|
||||
mempool_free
|
||||
mempool_init
|
||||
mempool_kfree
|
||||
mempool_kmalloc
|
||||
|
||||
# required by dummy-cpufreq.ko
|
||||
cpufreq_generic_attr
|
||||
cpufreq_register_driver
|
||||
@@ -336,9 +360,7 @@
|
||||
|
||||
# required by failover.ko
|
||||
netdev_master_upper_dev_link
|
||||
register_netdevice_notifier
|
||||
rtnl_is_locked
|
||||
unregister_netdevice_notifier
|
||||
|
||||
# required by gnss-cmdline.ko
|
||||
bus_find_device_by_name
|
||||
@@ -350,7 +372,6 @@
|
||||
gnss_insert_raw
|
||||
gnss_put_device
|
||||
gnss_register_device
|
||||
__ll_sc___cmpxchg_case_mb_4
|
||||
__pm_runtime_disable
|
||||
serdev_device_close
|
||||
serdev_device_open
|
||||
@@ -449,7 +470,6 @@
|
||||
freezing_slow_path
|
||||
kernel_kobj
|
||||
kthread_create_on_node
|
||||
__ll_sc_atomic64_add_return
|
||||
__ll_sc_atomic64_sub_return
|
||||
mod_node_page_state
|
||||
plist_add
|
||||
@@ -669,6 +689,7 @@
|
||||
register_netdevice
|
||||
rtnl_link_register
|
||||
rtnl_link_unregister
|
||||
unregister_netdevice_many
|
||||
wiphy_free
|
||||
wiphy_new_nm
|
||||
wiphy_register
|
||||
@@ -785,6 +806,7 @@
|
||||
sync_file_create
|
||||
sync_file_get_fence
|
||||
__tracepoint_dma_fence_emit
|
||||
__tracepoint_gpu_mem_total
|
||||
ttm_bo_add_to_lru
|
||||
ttm_bo_del_sub_from_lru
|
||||
ttm_bo_device_init
|
||||
@@ -960,16 +982,18 @@
|
||||
nvdimm_bus_unregister
|
||||
nvdimm_pmem_region_create
|
||||
|
||||
# required by vmw_vsock_virtio_transport.ko
|
||||
synchronize_rcu
|
||||
|
||||
# required by vmw_vsock_virtio_transport_common.ko
|
||||
bpf_trace_run10
|
||||
_copy_from_iter_full
|
||||
_copy_to_iter
|
||||
|
||||
# required by vsock.ko
|
||||
autoremove_wake_function
|
||||
__module_get
|
||||
module_put
|
||||
init_user_ns
|
||||
nonseekable_open
|
||||
ns_capable_noaudit
|
||||
prandom_u32
|
||||
prepare_to_wait
|
||||
proto_register
|
||||
|
||||
@@ -699,7 +699,6 @@
|
||||
printk
|
||||
print_stack_trace
|
||||
proc_dointvec
|
||||
proc_mkdir_data
|
||||
proto_register
|
||||
proto_unregister
|
||||
pskb_expand_head
|
||||
@@ -1055,7 +1054,6 @@
|
||||
# required by adsprpc.ko
|
||||
set_normalized_timespec64
|
||||
try_wait_for_completion
|
||||
vfs_statx
|
||||
|
||||
# required by arm-memlat-mon.ko
|
||||
perf_event_create_kernel_counter
|
||||
@@ -1197,6 +1195,10 @@
|
||||
# required by cnss_prealloc.ko
|
||||
save_stack_trace
|
||||
|
||||
# required by coresight-clk-amba-placeholder.ko
|
||||
amba_driver_register
|
||||
amba_driver_unregister
|
||||
|
||||
# required by cpu_isolate.ko
|
||||
device_online
|
||||
sched_isolate_cpu
|
||||
@@ -1331,6 +1333,7 @@
|
||||
# required by ftm5.ko
|
||||
ktime_get_coarse_real_ts64
|
||||
proc_create
|
||||
proc_mkdir_data
|
||||
seq_write
|
||||
|
||||
# required by google-bms.ko
|
||||
@@ -1374,10 +1377,12 @@
|
||||
i2c_put_dma_safe_msg_buf
|
||||
|
||||
# required by incrementalfs.ko
|
||||
__audit_inode_child
|
||||
__break_lease
|
||||
clear_inode
|
||||
__close_fd
|
||||
d_add
|
||||
d_delete
|
||||
d_drop
|
||||
deactivate_locked_super
|
||||
dentry_open
|
||||
@@ -1387,13 +1392,19 @@
|
||||
down_read_killable
|
||||
down_write_killable
|
||||
dput
|
||||
filemap_fault
|
||||
filemap_map_pages
|
||||
filemap_page_mkwrite
|
||||
flush_dcache_page
|
||||
fs_kobj
|
||||
fsnotify
|
||||
__fsnotify_parent
|
||||
fsstack_copy_attr_all
|
||||
__fsverity_verify_signature
|
||||
generic_file_llseek
|
||||
generic_file_mmap
|
||||
generic_file_read_iter
|
||||
generic_file_splice_read
|
||||
generic_fillattr
|
||||
generic_read_dir
|
||||
generic_shutdown_super
|
||||
get_zeroed_page
|
||||
@@ -1401,18 +1412,24 @@
|
||||
ihold
|
||||
inode_init_once
|
||||
inode_init_owner
|
||||
inode_set_flags
|
||||
iput
|
||||
iterate_dir
|
||||
kernel_read
|
||||
kernel_write
|
||||
kern_path
|
||||
kobject_add
|
||||
kobject_init
|
||||
kobj_sysfs_ops
|
||||
__ll_sc___cmpxchg_case_rel_8
|
||||
lockref_get
|
||||
lock_rename
|
||||
lookup_one_len
|
||||
LZ4_decompress_safe
|
||||
match_int
|
||||
match_strdup
|
||||
match_token
|
||||
memchr_inv
|
||||
noop_llseek
|
||||
notify_change
|
||||
override_creds
|
||||
@@ -1424,11 +1441,12 @@
|
||||
revert_creds
|
||||
set_anon_super
|
||||
sget
|
||||
simple_getattr
|
||||
simple_setattr
|
||||
simple_statfs
|
||||
strndup_user
|
||||
sync_filesystem
|
||||
sysfs_emit
|
||||
touch_atime
|
||||
truncate_inode_pages
|
||||
unlock_new_inode
|
||||
unlock_page
|
||||
@@ -1446,6 +1464,7 @@
|
||||
vfs_rename
|
||||
vfs_rmdir
|
||||
vfs_setxattr
|
||||
vfs_truncate
|
||||
vfs_unlink
|
||||
ZSTD_decompressStream
|
||||
ZSTD_DStreamWorkspaceBound
|
||||
@@ -1733,6 +1752,7 @@
|
||||
drm_dp_update_payload_part1
|
||||
drm_dp_update_payload_part2
|
||||
drm_edid_duplicate
|
||||
drm_edid_is_valid
|
||||
drm_encoder_cleanup
|
||||
drm_encoder_init
|
||||
drm_err
|
||||
@@ -1879,6 +1899,7 @@
|
||||
shmem_truncate_range
|
||||
strreplace
|
||||
timespec64_to_jiffies
|
||||
tracing_off
|
||||
unmap_kernel_range
|
||||
unmap_mapping_range
|
||||
vm_get_page_prot
|
||||
@@ -2131,6 +2152,7 @@
|
||||
rtc_read_time
|
||||
|
||||
# required by qpnp-smb5-charger.ko
|
||||
alarm_expires_remaining
|
||||
iio_channel_release
|
||||
|
||||
# required by qpnp_pdphy.ko
|
||||
@@ -2141,7 +2163,6 @@
|
||||
# required by qrtr.ko
|
||||
alloc_skb_with_frags
|
||||
datagram_poll
|
||||
idr_alloc_u32
|
||||
in_egroup_p
|
||||
netlink_capable
|
||||
__radix_tree_insert
|
||||
@@ -2333,6 +2354,7 @@
|
||||
proc_dointvec_minmax
|
||||
proc_dostring
|
||||
proc_doulongvec_minmax
|
||||
_proc_mkdir
|
||||
put_cmsg
|
||||
rcu_barrier
|
||||
refcount_add_checked
|
||||
@@ -2476,6 +2498,9 @@
|
||||
# required by subsystem-restart.ko
|
||||
system_state
|
||||
|
||||
# required by swr_ctrl_dlkm.ko
|
||||
pm_runtime_autosuspend_expiration
|
||||
|
||||
# required by system_pm.ko
|
||||
arch_timer_mem_get_cval
|
||||
|
||||
@@ -2734,7 +2759,11 @@
|
||||
|
||||
# preserved by --additions-only
|
||||
crc32_le
|
||||
generic_file_mmap
|
||||
idr_alloc_u32
|
||||
simple_getattr
|
||||
simple_strtoull
|
||||
soc_find_component
|
||||
vfs_statx
|
||||
vm_map_ram
|
||||
vm_unmap_ram
|
||||
|
||||
@@ -169,7 +169,7 @@ tracesys:
|
||||
|
||||
; Do the Sys Call as we normally would.
|
||||
; Validate the Sys Call number
|
||||
cmp r8, NR_syscalls
|
||||
cmp r8, NR_syscalls - 1
|
||||
mov.hi r0, -ENOSYS
|
||||
bhi tracesys_exit
|
||||
|
||||
@@ -252,7 +252,7 @@ ENTRY(EV_Trap)
|
||||
;============ Normal syscall case
|
||||
|
||||
; syscall num shd not exceed the total system calls avail
|
||||
cmp r8, NR_syscalls
|
||||
cmp r8, NR_syscalls - 1
|
||||
mov.hi r0, -ENOSYS
|
||||
bhi .Lret_from_system_call
|
||||
|
||||
|
||||
@@ -99,7 +99,7 @@ stash_usr_regs(struct rt_sigframe __user *sf, struct pt_regs *regs,
|
||||
sizeof(sf->uc.uc_mcontext.regs.scratch));
|
||||
err |= __copy_to_user(&sf->uc.uc_sigmask, set, sizeof(sigset_t));
|
||||
|
||||
return err;
|
||||
return err ? -EFAULT : 0;
|
||||
}
|
||||
|
||||
static int restore_usr_regs(struct pt_regs *regs, struct rt_sigframe __user *sf)
|
||||
@@ -113,7 +113,7 @@ static int restore_usr_regs(struct pt_regs *regs, struct rt_sigframe __user *sf)
|
||||
&(sf->uc.uc_mcontext.regs.scratch),
|
||||
sizeof(sf->uc.uc_mcontext.regs.scratch));
|
||||
if (err)
|
||||
return err;
|
||||
return -EFAULT;
|
||||
|
||||
set_current_blocked(&set);
|
||||
regs->bta = uregs.scratch.bta;
|
||||
|
||||
2
arch/arm/OWNERS
Normal file
2
arch/arm/OWNERS
Normal file
@@ -0,0 +1,2 @@
|
||||
# include OWNERS from the authoritative android-mainline branch
|
||||
include kernel/common:android-mainline:/arch/arm/OWNERS
|
||||
@@ -121,8 +121,8 @@ asflags-y := -DZIMAGE
|
||||
|
||||
# Supply kernel BSS size to the decompressor via a linker symbol.
|
||||
KBSS_SZ = $(shell echo $$(($$($(NM) $(obj)/../../../../vmlinux | \
|
||||
sed -n -e 's/^\([^ ]*\) [AB] __bss_start$$/-0x\1/p' \
|
||||
-e 's/^\([^ ]*\) [AB] __bss_stop$$/+0x\1/p') )) )
|
||||
sed -n -e 's/^\([^ ]*\) [ABD] __bss_start$$/-0x\1/p' \
|
||||
-e 's/^\([^ ]*\) [ABD] __bss_stop$$/+0x\1/p') )) )
|
||||
LDFLAGS_vmlinux = --defsym _kernel_bss_size=$(KBSS_SZ)
|
||||
# Supply ZRELADDR to the decompressor via a linker symbol.
|
||||
ifneq ($(CONFIG_AUTO_ZRELADDR),y)
|
||||
|
||||
@@ -1092,9 +1092,9 @@ __armv4_mmu_cache_off:
|
||||
__armv7_mmu_cache_off:
|
||||
mrc p15, 0, r0, c1, c0
|
||||
#ifdef CONFIG_MMU
|
||||
bic r0, r0, #0x000d
|
||||
bic r0, r0, #0x0005
|
||||
#else
|
||||
bic r0, r0, #0x000c
|
||||
bic r0, r0, #0x0004
|
||||
#endif
|
||||
mcr p15, 0, r0, c1, c0 @ turn MMU and cache off
|
||||
mov r12, lr
|
||||
|
||||
@@ -39,6 +39,9 @@
|
||||
ethernet1 = &cpsw_emac1;
|
||||
spi0 = &spi0;
|
||||
spi1 = &spi1;
|
||||
mmc0 = &mmc1;
|
||||
mmc1 = &mmc2;
|
||||
mmc2 = &mmc3;
|
||||
};
|
||||
|
||||
cpus {
|
||||
|
||||
@@ -236,6 +236,7 @@
|
||||
status = "okay";
|
||||
compatible = "ethernet-phy-id0141.0DD1", "ethernet-phy-ieee802.3-c22";
|
||||
reg = <1>;
|
||||
marvell,reg-init = <3 18 0 0x4985>;
|
||||
|
||||
/* irq is connected to &pcawan pin 7 */
|
||||
};
|
||||
|
||||
@@ -70,6 +70,9 @@
|
||||
|
||||
system-leds {
|
||||
compatible = "gpio-leds";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&helios_system_led_pins>;
|
||||
|
||||
status-led {
|
||||
label = "helios4:green:status";
|
||||
gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
|
||||
@@ -86,6 +89,9 @@
|
||||
|
||||
io-leds {
|
||||
compatible = "gpio-leds";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&helios_io_led_pins>;
|
||||
|
||||
sata1-led {
|
||||
label = "helios4:green:ata1";
|
||||
gpios = <&gpio1 17 GPIO_ACTIVE_LOW>;
|
||||
@@ -121,11 +127,15 @@
|
||||
fan1: j10-pwm {
|
||||
compatible = "pwm-fan";
|
||||
pwms = <&gpio1 9 40000>; /* Target freq:25 kHz */
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&helios_fan1_pins>;
|
||||
};
|
||||
|
||||
fan2: j17-pwm {
|
||||
compatible = "pwm-fan";
|
||||
pwms = <&gpio1 23 40000>; /* Target freq:25 kHz */
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&helios_fan2_pins>;
|
||||
};
|
||||
|
||||
usb2_phy: usb2-phy {
|
||||
@@ -291,16 +301,22 @@
|
||||
"mpp39", "mpp40";
|
||||
marvell,function = "sd0";
|
||||
};
|
||||
helios_led_pins: helios-led-pins {
|
||||
marvell,pins = "mpp24", "mpp25",
|
||||
"mpp49", "mpp50",
|
||||
helios_system_led_pins: helios-system-led-pins {
|
||||
marvell,pins = "mpp24", "mpp25";
|
||||
marvell,function = "gpio";
|
||||
};
|
||||
helios_io_led_pins: helios-io-led-pins {
|
||||
marvell,pins = "mpp49", "mpp50",
|
||||
"mpp52", "mpp53",
|
||||
"mpp54";
|
||||
marvell,function = "gpio";
|
||||
};
|
||||
helios_fan_pins: helios-fan-pins {
|
||||
marvell,pins = "mpp41", "mpp43",
|
||||
"mpp48", "mpp55";
|
||||
helios_fan1_pins: helios_fan1_pins {
|
||||
marvell,pins = "mpp41", "mpp43";
|
||||
marvell,function = "gpio";
|
||||
};
|
||||
helios_fan2_pins: helios_fan2_pins {
|
||||
marvell,pins = "mpp48", "mpp55";
|
||||
marvell,function = "gpio";
|
||||
};
|
||||
microsom_spi1_cs_pins: spi1-cs-pins {
|
||||
|
||||
@@ -312,6 +312,7 @@
|
||||
compatible = "aspeed,ast2400-ibt-bmc";
|
||||
reg = <0xc0 0x18>;
|
||||
interrupts = <8>;
|
||||
clocks = <&syscon ASPEED_CLK_GATE_LCLK>;
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -372,6 +372,7 @@
|
||||
compatible = "aspeed,ast2500-ibt-bmc";
|
||||
reg = <0xc0 0x18>;
|
||||
interrupts = <8>;
|
||||
clocks = <&syscon ASPEED_CLK_GATE_LCLK>;
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -67,8 +67,8 @@
|
||||
pinctrl-0 = <&pinctrl_macb0_default>;
|
||||
phy-mode = "rmii";
|
||||
|
||||
ethernet-phy@0 {
|
||||
reg = <0x0>;
|
||||
ethernet-phy@7 {
|
||||
reg = <0x7>;
|
||||
interrupt-parent = <&pioA>;
|
||||
interrupts = <PIN_PD31 IRQ_TYPE_LEVEL_LOW>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
s2mps14_pmic@66 {
|
||||
compatible = "samsung,s2mps14-pmic";
|
||||
interrupt-parent = <&gpx3>;
|
||||
interrupts = <5 IRQ_TYPE_NONE>;
|
||||
interrupts = <5 IRQ_TYPE_LEVEL_LOW>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&s2mps14_irq>;
|
||||
reg = <0x66>;
|
||||
|
||||
@@ -188,7 +188,7 @@
|
||||
s2mps14_pmic@66 {
|
||||
compatible = "samsung,s2mps14-pmic";
|
||||
interrupt-parent = <&gpx0>;
|
||||
interrupts = <7 IRQ_TYPE_NONE>;
|
||||
interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
|
||||
reg = <0x66>;
|
||||
wakeup-source;
|
||||
|
||||
|
||||
@@ -253,7 +253,7 @@
|
||||
s2mps14_pmic@66 {
|
||||
compatible = "samsung,s2mps14-pmic";
|
||||
interrupt-parent = <&gpx0>;
|
||||
interrupts = <7 IRQ_TYPE_NONE>;
|
||||
interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
|
||||
reg = <0x66>;
|
||||
wakeup-source;
|
||||
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
max77693@66 {
|
||||
compatible = "maxim,max77693";
|
||||
interrupt-parent = <&gpx1>;
|
||||
interrupts = <5 IRQ_TYPE_EDGE_FALLING>;
|
||||
interrupts = <5 IRQ_TYPE_LEVEL_LOW>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&max77693_irq>;
|
||||
reg = <0x66>;
|
||||
@@ -187,7 +187,7 @@
|
||||
max77693-fuel-gauge@36 {
|
||||
compatible = "maxim,max17047";
|
||||
interrupt-parent = <&gpx2>;
|
||||
interrupts = <3 IRQ_TYPE_EDGE_FALLING>;
|
||||
interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&max77693_fuel_irq>;
|
||||
reg = <0x36>;
|
||||
@@ -579,7 +579,7 @@
|
||||
max77686: max77686_pmic@9 {
|
||||
compatible = "maxim,max77686";
|
||||
interrupt-parent = <&gpx0>;
|
||||
interrupts = <7 IRQ_TYPE_NONE>;
|
||||
interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
|
||||
pinctrl-0 = <&max77686_irq>;
|
||||
pinctrl-names = "default";
|
||||
reg = <0x09>;
|
||||
|
||||
@@ -265,7 +265,7 @@
|
||||
max77686: pmic@9 {
|
||||
compatible = "maxim,max77686";
|
||||
interrupt-parent = <&gpx3>;
|
||||
interrupts = <2 IRQ_TYPE_NONE>;
|
||||
interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&max77686_irq>;
|
||||
reg = <0x09>;
|
||||
|
||||
@@ -132,7 +132,7 @@
|
||||
compatible = "maxim,max77686";
|
||||
reg = <0x09>;
|
||||
interrupt-parent = <&gpx3>;
|
||||
interrupts = <2 IRQ_TYPE_NONE>;
|
||||
interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&max77686_irq>;
|
||||
wakeup-source;
|
||||
|
||||
@@ -292,7 +292,7 @@
|
||||
max77686: max77686@9 {
|
||||
compatible = "maxim,max77686";
|
||||
interrupt-parent = <&gpx3>;
|
||||
interrupts = <2 IRQ_TYPE_NONE>;
|
||||
interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&max77686_irq>;
|
||||
wakeup-source;
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
compatible = "samsung,s5m8767-pmic";
|
||||
reg = <0x66>;
|
||||
interrupt-parent = <&gpx3>;
|
||||
interrupts = <2 IRQ_TYPE_NONE>;
|
||||
interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&s5m8767_irq &s5m8767_dvs &s5m8767_ds>;
|
||||
wakeup-source;
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
reg = <0x66>;
|
||||
|
||||
interrupt-parent = <&gpx3>;
|
||||
interrupts = <2 IRQ_TYPE_EDGE_FALLING>;
|
||||
interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&s2mps11_irq>;
|
||||
|
||||
|
||||
@@ -136,7 +136,7 @@
|
||||
samsung,s2mps11-acokb-ground;
|
||||
|
||||
interrupt-parent = <&gpx0>;
|
||||
interrupts = <4 IRQ_TYPE_EDGE_FALLING>;
|
||||
interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&s2mps11_irq>;
|
||||
|
||||
|
||||
@@ -278,7 +278,7 @@
|
||||
|
||||
/* VDD_AUD_1P8: Audio codec */
|
||||
reg_aud_1p8v: ldo3 {
|
||||
regulator-name = "vdd1p8";
|
||||
regulator-name = "vdd1p8a";
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-boot-on;
|
||||
|
||||
@@ -423,6 +423,7 @@
|
||||
pinctrl-0 = <&pinctrl_usdhc2>;
|
||||
cd-gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
|
||||
wp-gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>;
|
||||
vmmc-supply = <&vdd_sd1_reg>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@@ -432,5 +433,6 @@
|
||||
&pinctrl_usdhc3_cdwp>;
|
||||
cd-gpios = <&gpio1 27 GPIO_ACTIVE_LOW>;
|
||||
wp-gpios = <&gpio1 29 GPIO_ACTIVE_HIGH>;
|
||||
vmmc-supply = <&vdd_sd0_reg>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@@ -323,9 +323,6 @@
|
||||
|
||||
clocks = <&xtal_32k>, <&xtal>;
|
||||
clock-names = "xtal_32k", "xtal";
|
||||
|
||||
assigned-clocks = <&clk LPC32XX_CLK_HCLK_PLL>;
|
||||
assigned-clock-rates = <208000000>;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -23,6 +23,9 @@
|
||||
i2c0 = &i2c1;
|
||||
i2c1 = &i2c2;
|
||||
i2c2 = &i2c3;
|
||||
mmc0 = &mmc1;
|
||||
mmc1 = &mmc2;
|
||||
mmc2 = &mmc3;
|
||||
serial0 = &uart1;
|
||||
serial1 = &uart2;
|
||||
serial2 = &uart3;
|
||||
|
||||
@@ -25,6 +25,11 @@
|
||||
i2c1 = &i2c2;
|
||||
i2c2 = &i2c3;
|
||||
i2c3 = &i2c4;
|
||||
mmc0 = &mmc1;
|
||||
mmc1 = &mmc2;
|
||||
mmc2 = &mmc3;
|
||||
mmc3 = &mmc4;
|
||||
mmc4 = &mmc5;
|
||||
serial0 = &uart1;
|
||||
serial1 = &uart2;
|
||||
serial2 = &uart3;
|
||||
|
||||
@@ -33,10 +33,12 @@
|
||||
};
|
||||
|
||||
ocp {
|
||||
/* 4430 has only gpio_86 tshut and no talert interrupt */
|
||||
bandgap: bandgap@4a002260 {
|
||||
reg = <0x4a002260 0x4
|
||||
0x4a00232C 0x4>;
|
||||
compatible = "ti,omap4430-bandgap";
|
||||
gpios = <&gpio3 22 GPIO_ACTIVE_HIGH>;
|
||||
|
||||
#thermal-sensor-cells = <0>;
|
||||
};
|
||||
|
||||
@@ -773,14 +773,6 @@
|
||||
ti,max-div = <2>;
|
||||
};
|
||||
|
||||
sha2md5_fck: sha2md5_fck@15c8 {
|
||||
#clock-cells = <0>;
|
||||
compatible = "ti,gate-clock";
|
||||
clocks = <&l3_div_ck>;
|
||||
ti,bit-shift = <1>;
|
||||
reg = <0x15c8>;
|
||||
};
|
||||
|
||||
usb_phy_cm_clk32k: usb_phy_cm_clk32k@640 {
|
||||
#clock-cells = <0>;
|
||||
compatible = "ti,gate-clock";
|
||||
|
||||
@@ -26,6 +26,11 @@
|
||||
i2c2 = &i2c3;
|
||||
i2c3 = &i2c4;
|
||||
i2c4 = &i2c5;
|
||||
mmc0 = &mmc1;
|
||||
mmc1 = &mmc2;
|
||||
mmc2 = &mmc3;
|
||||
mmc3 = &mmc4;
|
||||
mmc4 = &mmc5;
|
||||
serial0 = &uart1;
|
||||
serial1 = &uart2;
|
||||
serial2 = &uart3;
|
||||
|
||||
@@ -513,7 +513,7 @@
|
||||
clocks = <&sys_clk 6>;
|
||||
reset-names = "ether";
|
||||
resets = <&sys_rst 6>;
|
||||
phy-mode = "rgmii";
|
||||
phy-mode = "rgmii-id";
|
||||
local-mac-address = [00 00 00 00 00 00];
|
||||
socionext,syscon-phy-mode = <&soc_glue 0>;
|
||||
|
||||
|
||||
12
arch/arm/include/asm/kexec-internal.h
Normal file
12
arch/arm/include/asm/kexec-internal.h
Normal file
@@ -0,0 +1,12 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#ifndef _ARM_KEXEC_INTERNAL_H
|
||||
#define _ARM_KEXEC_INTERNAL_H
|
||||
|
||||
struct kexec_relocate_data {
|
||||
unsigned long kexec_start_address;
|
||||
unsigned long kexec_indirection_page;
|
||||
unsigned long kexec_mach_type;
|
||||
unsigned long kexec_r2;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -303,6 +303,7 @@ static inline void kvm_arch_sched_in(struct kvm_vcpu *vcpu, int cpu) {}
|
||||
static inline void kvm_arch_vcpu_block_finish(struct kvm_vcpu *vcpu) {}
|
||||
|
||||
static inline void kvm_arm_init_debug(void) {}
|
||||
static inline void kvm_arm_vcpu_init_debug(struct kvm_vcpu *vcpu) {}
|
||||
static inline void kvm_arm_setup_debug(struct kvm_vcpu *vcpu) {}
|
||||
static inline void kvm_arm_clear_debug(struct kvm_vcpu *vcpu) {}
|
||||
static inline void kvm_arm_reset_debug_ptr(struct kvm_vcpu *vcpu) {}
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include <linux/kvm_host.h>
|
||||
#endif
|
||||
#include <asm/cacheflush.h>
|
||||
#include <asm/kexec-internal.h>
|
||||
#include <asm/glue-df.h>
|
||||
#include <asm/glue-pf.h>
|
||||
#include <asm/mach/arch.h>
|
||||
@@ -29,6 +30,7 @@
|
||||
#include <asm/vdso_datapage.h>
|
||||
#include <asm/hardware/cache-l2x0.h>
|
||||
#include <linux/kbuild.h>
|
||||
#include <linux/arm-smccc.h>
|
||||
#include "signal.h"
|
||||
|
||||
/*
|
||||
@@ -158,6 +160,8 @@ int main(void)
|
||||
DEFINE(SLEEP_SAVE_SP_PHYS, offsetof(struct sleep_save_sp, save_ptr_stash_phys));
|
||||
DEFINE(SLEEP_SAVE_SP_VIRT, offsetof(struct sleep_save_sp, save_ptr_stash));
|
||||
#endif
|
||||
DEFINE(ARM_SMCCC_QUIRK_ID_OFFS, offsetof(struct arm_smccc_quirk, id));
|
||||
DEFINE(ARM_SMCCC_QUIRK_STATE_OFFS, offsetof(struct arm_smccc_quirk, state));
|
||||
BLANK();
|
||||
DEFINE(DMA_BIDIRECTIONAL, DMA_BIDIRECTIONAL);
|
||||
DEFINE(DMA_TO_DEVICE, DMA_TO_DEVICE);
|
||||
@@ -189,5 +193,9 @@ int main(void)
|
||||
DEFINE(MPU_RGN_PRBAR, offsetof(struct mpu_rgn, prbar));
|
||||
DEFINE(MPU_RGN_PRLAR, offsetof(struct mpu_rgn, prlar));
|
||||
#endif
|
||||
DEFINE(KEXEC_START_ADDR, offsetof(struct kexec_relocate_data, kexec_start_address));
|
||||
DEFINE(KEXEC_INDIR_PAGE, offsetof(struct kexec_relocate_data, kexec_indirection_page));
|
||||
DEFINE(KEXEC_MACH_TYPE, offsetof(struct kexec_relocate_data, kexec_mach_type));
|
||||
DEFINE(KEXEC_R2, offsetof(struct kexec_relocate_data, kexec_r2));
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -891,7 +891,7 @@ static void breakpoint_handler(unsigned long unknown, struct pt_regs *regs)
|
||||
info->trigger = addr;
|
||||
pr_debug("breakpoint fired: address = 0x%x\n", addr);
|
||||
perf_bp_event(bp, regs);
|
||||
if (!bp->overflow_handler)
|
||||
if (is_default_overflow_handler(bp))
|
||||
enable_single_step(bp, addr);
|
||||
goto unlock;
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include <asm/pgalloc.h>
|
||||
#include <asm/mmu_context.h>
|
||||
#include <asm/cacheflush.h>
|
||||
#include <asm/kexec-internal.h>
|
||||
#include <asm/fncpy.h>
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/smp_plat.h>
|
||||
@@ -24,11 +25,6 @@
|
||||
extern void relocate_new_kernel(void);
|
||||
extern const unsigned int relocate_new_kernel_size;
|
||||
|
||||
extern unsigned long kexec_start_address;
|
||||
extern unsigned long kexec_indirection_page;
|
||||
extern unsigned long kexec_mach_type;
|
||||
extern unsigned long kexec_boot_atags;
|
||||
|
||||
static atomic_t waiting_for_crash_ipi;
|
||||
|
||||
/*
|
||||
@@ -161,6 +157,7 @@ void (*kexec_reinit)(void);
|
||||
void machine_kexec(struct kimage *image)
|
||||
{
|
||||
unsigned long page_list, reboot_entry_phys;
|
||||
struct kexec_relocate_data *data;
|
||||
void (*reboot_entry)(void);
|
||||
void *reboot_code_buffer;
|
||||
|
||||
@@ -176,18 +173,17 @@ void machine_kexec(struct kimage *image)
|
||||
|
||||
reboot_code_buffer = page_address(image->control_code_page);
|
||||
|
||||
/* Prepare parameters for reboot_code_buffer*/
|
||||
set_kernel_text_rw();
|
||||
kexec_start_address = image->start;
|
||||
kexec_indirection_page = page_list;
|
||||
kexec_mach_type = machine_arch_type;
|
||||
kexec_boot_atags = image->arch.kernel_r2;
|
||||
|
||||
/* copy our kernel relocation code to the control code page */
|
||||
reboot_entry = fncpy(reboot_code_buffer,
|
||||
&relocate_new_kernel,
|
||||
relocate_new_kernel_size);
|
||||
|
||||
data = reboot_code_buffer + relocate_new_kernel_size;
|
||||
data->kexec_start_address = image->start;
|
||||
data->kexec_indirection_page = page_list;
|
||||
data->kexec_mach_type = machine_arch_type;
|
||||
data->kexec_r2 = image->arch.kernel_r2;
|
||||
|
||||
/* get the identity mapping physical address for the reboot code */
|
||||
reboot_entry_phys = virt_to_idmap(reboot_entry);
|
||||
|
||||
|
||||
@@ -5,14 +5,16 @@
|
||||
|
||||
#include <linux/linkage.h>
|
||||
#include <asm/assembler.h>
|
||||
#include <asm/asm-offsets.h>
|
||||
#include <asm/kexec.h>
|
||||
|
||||
.align 3 /* not needed for this code, but keeps fncpy() happy */
|
||||
|
||||
ENTRY(relocate_new_kernel)
|
||||
|
||||
ldr r0,kexec_indirection_page
|
||||
ldr r1,kexec_start_address
|
||||
adr r7, relocate_new_kernel_end
|
||||
ldr r0, [r7, #KEXEC_INDIR_PAGE]
|
||||
ldr r1, [r7, #KEXEC_START_ADDR]
|
||||
|
||||
/*
|
||||
* If there is no indirection page (we are doing crashdumps)
|
||||
@@ -57,34 +59,16 @@ ENTRY(relocate_new_kernel)
|
||||
|
||||
2:
|
||||
/* Jump to relocated kernel */
|
||||
mov lr,r1
|
||||
mov r0,#0
|
||||
ldr r1,kexec_mach_type
|
||||
ldr r2,kexec_boot_atags
|
||||
ARM( ret lr )
|
||||
THUMB( bx lr )
|
||||
|
||||
.align
|
||||
|
||||
.globl kexec_start_address
|
||||
kexec_start_address:
|
||||
.long 0x0
|
||||
|
||||
.globl kexec_indirection_page
|
||||
kexec_indirection_page:
|
||||
.long 0x0
|
||||
|
||||
.globl kexec_mach_type
|
||||
kexec_mach_type:
|
||||
.long 0x0
|
||||
|
||||
/* phy addr of the atags for the new kernel */
|
||||
.globl kexec_boot_atags
|
||||
kexec_boot_atags:
|
||||
.long 0x0
|
||||
mov lr, r1
|
||||
mov r0, #0
|
||||
ldr r1, [r7, #KEXEC_MACH_TYPE]
|
||||
ldr r2, [r7, #KEXEC_R2]
|
||||
ARM( ret lr )
|
||||
THUMB( bx lr )
|
||||
|
||||
ENDPROC(relocate_new_kernel)
|
||||
|
||||
.align 3
|
||||
relocate_new_kernel_end:
|
||||
|
||||
.globl relocate_new_kernel_size
|
||||
|
||||
@@ -697,18 +697,20 @@ struct page *get_signal_page(void)
|
||||
|
||||
addr = page_address(page);
|
||||
|
||||
/* Poison the entire page */
|
||||
memset32(addr, __opcode_to_mem_arm(0xe7fddef1),
|
||||
PAGE_SIZE / sizeof(u32));
|
||||
|
||||
/* Give the signal return code some randomness */
|
||||
offset = 0x200 + (get_random_int() & 0x7fc);
|
||||
signal_return_offset = offset;
|
||||
|
||||
/*
|
||||
* Copy signal return handlers into the vector page, and
|
||||
* set sigreturn to be a pointer to these.
|
||||
*/
|
||||
/* Copy signal return handlers into the page */
|
||||
memcpy(addr + offset, sigreturn_codes, sizeof(sigreturn_codes));
|
||||
|
||||
ptr = (unsigned long)addr + offset;
|
||||
flush_icache_range(ptr, ptr + sizeof(sigreturn_codes));
|
||||
/* Flush out all instructions in this page */
|
||||
ptr = (unsigned long)addr;
|
||||
flush_icache_range(ptr, ptr + PAGE_SIZE);
|
||||
|
||||
return page;
|
||||
}
|
||||
|
||||
@@ -12,7 +12,9 @@
|
||||
*
|
||||
*/
|
||||
#include <linux/linkage.h>
|
||||
#include <linux/arm-smccc.h>
|
||||
|
||||
#include <asm/asm-offsets.h>
|
||||
#include <asm/opcodes-sec.h>
|
||||
#include <asm/opcodes-virt.h>
|
||||
#include <asm/unwind.h>
|
||||
@@ -36,7 +38,14 @@ UNWIND( .fnstart)
|
||||
UNWIND( .save {r4-r7})
|
||||
ldm r12, {r4-r7}
|
||||
\instr
|
||||
pop {r4-r7}
|
||||
ldr r4, [sp, #36]
|
||||
cmp r4, #0
|
||||
beq 1f // No quirk structure
|
||||
ldr r5, [r4, #ARM_SMCCC_QUIRK_ID_OFFS]
|
||||
cmp r5, #ARM_SMCCC_QUIRK_QCOM_A6
|
||||
bne 1f // No quirk present
|
||||
str r6, [r4, #ARM_SMCCC_QUIRK_STATE_OFFS]
|
||||
1: pop {r4-r7}
|
||||
ldr r12, [sp, #(4 * 4)]
|
||||
stm r12, {r0-r3}
|
||||
bx lr
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
#include <linux/ftrace.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/mm_types.h>
|
||||
@@ -26,6 +27,13 @@ int cpu_suspend(unsigned long arg, int (*fn)(unsigned long))
|
||||
if (!idmap_pgd)
|
||||
return -EINVAL;
|
||||
|
||||
/*
|
||||
* Function graph tracer state gets incosistent when the kernel
|
||||
* calls functions that never return (aka suspend finishers) hence
|
||||
* disable graph tracing during their execution.
|
||||
*/
|
||||
pause_graph_tracing();
|
||||
|
||||
/*
|
||||
* Provide a temporary page table with an identity mapping for
|
||||
* the MMU-enable code, required for resuming. On successful
|
||||
@@ -33,6 +41,9 @@ int cpu_suspend(unsigned long arg, int (*fn)(unsigned long))
|
||||
* back to the correct page tables.
|
||||
*/
|
||||
ret = __cpu_suspend(arg, fn, __mpidr);
|
||||
|
||||
unpause_graph_tracing();
|
||||
|
||||
if (ret == 0) {
|
||||
cpu_switch_mm(mm->pgd, mm);
|
||||
local_flush_bp_all();
|
||||
@@ -46,7 +57,13 @@ int cpu_suspend(unsigned long arg, int (*fn)(unsigned long))
|
||||
int cpu_suspend(unsigned long arg, int (*fn)(unsigned long))
|
||||
{
|
||||
u32 __mpidr = cpu_logical_map(smp_processor_id());
|
||||
return __cpu_suspend(arg, fn, __mpidr);
|
||||
int ret;
|
||||
|
||||
pause_graph_tracing();
|
||||
ret = __cpu_suspend(arg, fn, __mpidr);
|
||||
unpause_graph_tracing();
|
||||
|
||||
return ret;
|
||||
}
|
||||
#define idmap_pgd NULL
|
||||
#endif
|
||||
|
||||
@@ -15,14 +15,14 @@
|
||||
#include <asm/mach-types.h>
|
||||
|
||||
/* cats host-specific stuff */
|
||||
static int irqmap_cats[] __initdata = { IRQ_PCI, IRQ_IN0, IRQ_IN1, IRQ_IN3 };
|
||||
static int irqmap_cats[] = { IRQ_PCI, IRQ_IN0, IRQ_IN1, IRQ_IN3 };
|
||||
|
||||
static u8 cats_no_swizzle(struct pci_dev *dev, u8 *pin)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int __init cats_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
|
||||
static int cats_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
|
||||
{
|
||||
if (dev->irq >= 255)
|
||||
return -1; /* not a valid interrupt. */
|
||||
|
||||
@@ -69,15 +69,15 @@ dc21285_read_config(struct pci_bus *bus, unsigned int devfn, int where,
|
||||
if (addr)
|
||||
switch (size) {
|
||||
case 1:
|
||||
asm("ldrb %0, [%1, %2]"
|
||||
asm volatile("ldrb %0, [%1, %2]"
|
||||
: "=r" (v) : "r" (addr), "r" (where) : "cc");
|
||||
break;
|
||||
case 2:
|
||||
asm("ldrh %0, [%1, %2]"
|
||||
asm volatile("ldrh %0, [%1, %2]"
|
||||
: "=r" (v) : "r" (addr), "r" (where) : "cc");
|
||||
break;
|
||||
case 4:
|
||||
asm("ldr %0, [%1, %2]"
|
||||
asm volatile("ldr %0, [%1, %2]"
|
||||
: "=r" (v) : "r" (addr), "r" (where) : "cc");
|
||||
break;
|
||||
}
|
||||
@@ -103,17 +103,17 @@ dc21285_write_config(struct pci_bus *bus, unsigned int devfn, int where,
|
||||
if (addr)
|
||||
switch (size) {
|
||||
case 1:
|
||||
asm("strb %0, [%1, %2]"
|
||||
asm volatile("strb %0, [%1, %2]"
|
||||
: : "r" (value), "r" (addr), "r" (where)
|
||||
: "cc");
|
||||
break;
|
||||
case 2:
|
||||
asm("strh %0, [%1, %2]"
|
||||
asm volatile("strh %0, [%1, %2]"
|
||||
: : "r" (value), "r" (addr), "r" (where)
|
||||
: "cc");
|
||||
break;
|
||||
case 4:
|
||||
asm("str %0, [%1, %2]"
|
||||
asm volatile("str %0, [%1, %2]"
|
||||
: : "r" (value), "r" (addr), "r" (where)
|
||||
: "cc");
|
||||
break;
|
||||
|
||||
@@ -14,9 +14,9 @@
|
||||
#include <asm/mach/pci.h>
|
||||
#include <asm/mach-types.h>
|
||||
|
||||
static int irqmap_ebsa285[] __initdata = { IRQ_IN3, IRQ_IN1, IRQ_IN0, IRQ_PCI };
|
||||
static int irqmap_ebsa285[] = { IRQ_IN3, IRQ_IN1, IRQ_IN0, IRQ_PCI };
|
||||
|
||||
static int __init ebsa285_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
|
||||
static int ebsa285_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
|
||||
{
|
||||
if (dev->vendor == PCI_VENDOR_ID_CONTAQ &&
|
||||
dev->device == PCI_DEVICE_ID_CONTAQ_82C693)
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
* We now use the slot ID instead of the device identifiers to select
|
||||
* which interrupt is routed where.
|
||||
*/
|
||||
static int __init netwinder_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
|
||||
static int netwinder_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
|
||||
{
|
||||
switch (slot) {
|
||||
case 0: /* host bridge */
|
||||
|
||||
@@ -14,13 +14,12 @@
|
||||
#include <asm/mach/pci.h>
|
||||
#include <asm/mach-types.h>
|
||||
|
||||
static int irqmap_personal_server[] __initdata = {
|
||||
static int irqmap_personal_server[] = {
|
||||
IRQ_IN0, IRQ_IN1, IRQ_IN2, IRQ_IN3, 0, 0, 0,
|
||||
IRQ_DOORBELLHOST, IRQ_DMA1, IRQ_DMA2, IRQ_PCI
|
||||
};
|
||||
|
||||
static int __init personal_server_map_irq(const struct pci_dev *dev, u8 slot,
|
||||
u8 pin)
|
||||
static int personal_server_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
|
||||
{
|
||||
unsigned char line;
|
||||
|
||||
|
||||
@@ -73,6 +73,7 @@
|
||||
#define MX6Q_CCM_CCR 0x0
|
||||
|
||||
.align 3
|
||||
.arm
|
||||
|
||||
.macro sync_l2_cache
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ static void __init keystone_init(void)
|
||||
static long long __init keystone_pv_fixup(void)
|
||||
{
|
||||
long long offset;
|
||||
phys_addr_t mem_start, mem_end;
|
||||
u64 mem_start, mem_end;
|
||||
|
||||
mem_start = memblock_start_of_DRAM();
|
||||
mem_end = memblock_end_of_DRAM();
|
||||
@@ -78,7 +78,7 @@ static long long __init keystone_pv_fixup(void)
|
||||
if (mem_start < KEYSTONE_HIGH_PHYS_START ||
|
||||
mem_end > KEYSTONE_HIGH_PHYS_END) {
|
||||
pr_crit("Invalid address space for memory (%08llx-%08llx)\n",
|
||||
(u64)mem_start, (u64)mem_end);
|
||||
mem_start, mem_end);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -207,7 +207,7 @@ unsigned long uprobe_get_swbp_addr(struct pt_regs *regs)
|
||||
static struct undef_hook uprobes_arm_break_hook = {
|
||||
.instr_mask = 0x0fffffff,
|
||||
.instr_val = (UPROBE_SWBP_ARM_INSN & 0x0fffffff),
|
||||
.cpsr_mask = MODE_MASK,
|
||||
.cpsr_mask = (PSR_T_BIT | MODE_MASK),
|
||||
.cpsr_val = USR_MODE,
|
||||
.fn = uprobe_trap_handler,
|
||||
};
|
||||
@@ -215,7 +215,7 @@ static struct undef_hook uprobes_arm_break_hook = {
|
||||
static struct undef_hook uprobes_arm_ss_hook = {
|
||||
.instr_mask = 0x0fffffff,
|
||||
.instr_val = (UPROBE_SS_ARM_INSN & 0x0fffffff),
|
||||
.cpsr_mask = MODE_MASK,
|
||||
.cpsr_mask = (PSR_T_BIT | MODE_MASK),
|
||||
.cpsr_val = USR_MODE,
|
||||
.fn = uprobe_trap_handler,
|
||||
};
|
||||
|
||||
@@ -404,8 +404,6 @@ static int __init xen_guest_init(void)
|
||||
return -ENOMEM;
|
||||
}
|
||||
gnttab_init();
|
||||
if (!xen_initial_domain())
|
||||
xenbus_probe();
|
||||
|
||||
/*
|
||||
* Making sure board specific code will not set up ops for
|
||||
|
||||
@@ -91,10 +91,39 @@ int set_foreign_p2m_mapping(struct gnttab_map_grant_ref *map_ops,
|
||||
int i;
|
||||
|
||||
for (i = 0; i < count; i++) {
|
||||
struct gnttab_unmap_grant_ref unmap;
|
||||
int rc;
|
||||
|
||||
if (map_ops[i].status)
|
||||
continue;
|
||||
set_phys_to_machine(map_ops[i].host_addr >> XEN_PAGE_SHIFT,
|
||||
map_ops[i].dev_bus_addr >> XEN_PAGE_SHIFT);
|
||||
if (likely(set_phys_to_machine(map_ops[i].host_addr >> XEN_PAGE_SHIFT,
|
||||
map_ops[i].dev_bus_addr >> XEN_PAGE_SHIFT)))
|
||||
continue;
|
||||
|
||||
/*
|
||||
* Signal an error for this slot. This in turn requires
|
||||
* immediate unmapping.
|
||||
*/
|
||||
map_ops[i].status = GNTST_general_error;
|
||||
unmap.host_addr = map_ops[i].host_addr,
|
||||
unmap.handle = map_ops[i].handle;
|
||||
map_ops[i].handle = ~0;
|
||||
if (map_ops[i].flags & GNTMAP_device_map)
|
||||
unmap.dev_bus_addr = map_ops[i].dev_bus_addr;
|
||||
else
|
||||
unmap.dev_bus_addr = 0;
|
||||
|
||||
/*
|
||||
* Pre-populate the status field, to be recognizable in
|
||||
* the log message below.
|
||||
*/
|
||||
unmap.status = 1;
|
||||
|
||||
rc = HYPERVISOR_grant_table_op(GNTTABOP_unmap_grant_ref,
|
||||
&unmap, 1);
|
||||
if (rc || unmap.status != GNTST_okay)
|
||||
pr_err_once("gnttab unmap failed: rc=%d st=%d\n",
|
||||
rc, unmap.status);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -481,7 +481,7 @@ config ARM64_ERRATUM_1024718
|
||||
help
|
||||
This option adds work around for Arm Cortex-A55 Erratum 1024718.
|
||||
|
||||
Affected Cortex-A55 cores (r0p0, r0p1, r1p0) could cause incorrect
|
||||
Affected Cortex-A55 cores (all revisions) could cause incorrect
|
||||
update of the hardware dirty bit when the DBM/AP bits are updated
|
||||
without a break-before-make. The work around is to disable the usage
|
||||
of hardware DBM locally on the affected cores. CPUs not affected by
|
||||
|
||||
2
arch/arm64/OWNERS
Normal file
2
arch/arm64/OWNERS
Normal file
@@ -0,0 +1,2 @@
|
||||
# include OWNERS from the authoritative android-mainline branch
|
||||
include kernel/common:android-mainline:/arch/arm64/OWNERS
|
||||
@@ -67,8 +67,6 @@
|
||||
};
|
||||
|
||||
&ehci0 {
|
||||
phys = <&usbphy 0>;
|
||||
phy-names = "usb";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -107,6 +105,7 @@
|
||||
pinctrl-0 = <&mmc2_pins>;
|
||||
vmmc-supply = <®_dcdc1>;
|
||||
vqmmc-supply = <®_eldo1>;
|
||||
max-frequency = <200000000>;
|
||||
bus-width = <8>;
|
||||
non-removable;
|
||||
cap-mmc-hw-reset;
|
||||
@@ -115,8 +114,6 @@
|
||||
};
|
||||
|
||||
&ohci0 {
|
||||
phys = <&usbphy 0>;
|
||||
phy-names = "usb";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
|
||||
@@ -51,7 +51,6 @@
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mmc0_pins>;
|
||||
vmmc-supply = <®_dcdc1>;
|
||||
non-removable;
|
||||
disable-wp;
|
||||
bus-width = <4>;
|
||||
cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
|
||||
|
||||
@@ -264,7 +264,7 @@
|
||||
resets = <&ccu RST_BUS_MMC2>;
|
||||
reset-names = "ahb";
|
||||
interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>;
|
||||
max-frequency = <200000000>;
|
||||
max-frequency = <150000000>;
|
||||
status = "disabled";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
@@ -312,6 +312,8 @@
|
||||
<&ccu CLK_USB_OHCI0>;
|
||||
resets = <&ccu RST_BUS_OHCI0>,
|
||||
<&ccu RST_BUS_EHCI0>;
|
||||
phys = <&usbphy 0>;
|
||||
phy-names = "usb";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@@ -322,6 +324,8 @@
|
||||
clocks = <&ccu CLK_BUS_OHCI0>,
|
||||
<&ccu CLK_USB_OHCI0>;
|
||||
resets = <&ccu RST_BUS_OHCI0>;
|
||||
phys = <&usbphy 0>;
|
||||
phy-names = "usb";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
||||
@@ -378,7 +378,7 @@
|
||||
s2mps13-pmic@66 {
|
||||
compatible = "samsung,s2mps13-pmic";
|
||||
interrupt-parent = <&gpa0>;
|
||||
interrupts = <7 IRQ_TYPE_NONE>;
|
||||
interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
|
||||
reg = <0x66>;
|
||||
samsung,s2mps11-wrstbi-ground;
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
s2mps15_pmic@66 {
|
||||
compatible = "samsung,s2mps15-pmic";
|
||||
reg = <0x66>;
|
||||
interrupts = <2 IRQ_TYPE_NONE>;
|
||||
interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
|
||||
interrupt-parent = <&gpa0>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pmic_irq>;
|
||||
|
||||
@@ -177,6 +177,7 @@
|
||||
ranges = <0x0 0x00 0x1700000 0x100000>;
|
||||
reg = <0x00 0x1700000 0x0 0x100000>;
|
||||
interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>;
|
||||
dma-coherent;
|
||||
|
||||
sec_jr0: jr@10000 {
|
||||
compatible = "fsl,sec-v5.4-job-ring",
|
||||
|
||||
@@ -237,6 +237,7 @@
|
||||
ranges = <0x0 0x00 0x1700000 0x100000>;
|
||||
reg = <0x00 0x1700000 0x0 0x100000>;
|
||||
interrupts = <0 75 0x4>;
|
||||
dma-coherent;
|
||||
|
||||
sec_jr0: jr@10000 {
|
||||
compatible = "fsl,sec-v5.4-job-ring",
|
||||
|
||||
@@ -243,6 +243,7 @@
|
||||
ranges = <0x0 0x00 0x1700000 0x100000>;
|
||||
reg = <0x00 0x1700000 0x0 0x100000>;
|
||||
interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>;
|
||||
dma-coherent;
|
||||
|
||||
sec_jr0: jr@10000 {
|
||||
compatible = "fsl,sec-v5.4-job-ring",
|
||||
@@ -303,7 +304,7 @@
|
||||
|
||||
dcfg: dcfg@1ee0000 {
|
||||
compatible = "fsl,ls1046a-dcfg", "syscon";
|
||||
reg = <0x0 0x1ee0000 0x0 0x10000>;
|
||||
reg = <0x0 0x1ee0000 0x0 0x1000>;
|
||||
big-endian;
|
||||
};
|
||||
|
||||
|
||||
@@ -143,7 +143,8 @@
|
||||
};
|
||||
|
||||
nb_periph_clk: nb-periph-clk@13000 {
|
||||
compatible = "marvell,armada-3700-periph-clock-nb";
|
||||
compatible = "marvell,armada-3700-periph-clock-nb",
|
||||
"syscon";
|
||||
reg = <0x13000 0x100>;
|
||||
clocks = <&tbg 0>, <&tbg 1>, <&tbg 2>,
|
||||
<&tbg 3>, <&xtalclk>;
|
||||
|
||||
@@ -641,6 +641,8 @@
|
||||
clocks = <&pericfg CLK_PERI_MSDC30_1_PD>,
|
||||
<&topckgen CLK_TOP_AXI_SEL>;
|
||||
clock-names = "source", "hclk";
|
||||
resets = <&pericfg MT7622_PERI_MSDC1_SW_RST>;
|
||||
reset-names = "hrst";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
||||
@@ -1111,7 +1111,7 @@
|
||||
<&mmsys CLK_MM_DSI1_DIGITAL>,
|
||||
<&mipi_tx1>;
|
||||
clock-names = "engine", "digital", "hs";
|
||||
phy = <&mipi_tx1>;
|
||||
phys = <&mipi_tx1>;
|
||||
phy-names = "dphy";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@@ -826,6 +826,7 @@
|
||||
<&tegra_car 128>, /* hda2hdmi */
|
||||
<&tegra_car 111>; /* hda2codec_2x */
|
||||
reset-names = "hda", "hda2hdmi", "hda2codec_2x";
|
||||
power-domains = <&pd_sor>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
no-map;
|
||||
};
|
||||
|
||||
reserved@8668000 {
|
||||
reserved@86680000 {
|
||||
reg = <0x0 0x86680000 0x0 0x80000>;
|
||||
no-map;
|
||||
};
|
||||
@@ -77,7 +77,7 @@
|
||||
qcom,client-id = <1>;
|
||||
};
|
||||
|
||||
rfsa@867e00000 {
|
||||
rfsa@867e0000 {
|
||||
reg = <0x0 0x867e0000 0x0 0x20000>;
|
||||
no-map;
|
||||
};
|
||||
|
||||
@@ -265,6 +265,7 @@
|
||||
reg = <0x0 0xf8000000 0x0 0x2000000>,
|
||||
<0x0 0xfd000000 0x0 0x1000000>;
|
||||
reg-names = "axi-base", "apb-base";
|
||||
device_type = "pci";
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
#interrupt-cells = <1>;
|
||||
@@ -283,7 +284,6 @@
|
||||
<0 0 0 2 &pcie0_intc 1>,
|
||||
<0 0 0 3 &pcie0_intc 2>,
|
||||
<0 0 0 4 &pcie0_intc 3>;
|
||||
linux,pci-domain = <0>;
|
||||
max-link-speed = <1>;
|
||||
msi-map = <0x0 &its 0x0 0x1000>;
|
||||
phys = <&pcie_phy 0>, <&pcie_phy 1>,
|
||||
|
||||
@@ -610,7 +610,7 @@
|
||||
clocks = <&sys_clk 6>;
|
||||
reset-names = "ether";
|
||||
resets = <&sys_rst 6>;
|
||||
phy-mode = "rgmii";
|
||||
phy-mode = "rgmii-id";
|
||||
local-mac-address = [00 00 00 00 00 00];
|
||||
socionext,syscon-phy-mode = <&soc_glue 0>;
|
||||
|
||||
|
||||
@@ -416,7 +416,7 @@
|
||||
clocks = <&sys_clk 6>;
|
||||
reset-names = "ether";
|
||||
resets = <&sys_rst 6>;
|
||||
phy-mode = "rgmii";
|
||||
phy-mode = "rgmii-id";
|
||||
local-mac-address = [00 00 00 00 00 00];
|
||||
socionext,syscon-phy-mode = <&soc_glue 0>;
|
||||
|
||||
@@ -437,7 +437,7 @@
|
||||
clocks = <&sys_clk 7>;
|
||||
reset-names = "ether";
|
||||
resets = <&sys_rst 7>;
|
||||
phy-mode = "rgmii";
|
||||
phy-mode = "rgmii-id";
|
||||
local-mac-address = [00 00 00 00 00 00];
|
||||
socionext,syscon-phy-mode = <&soc_glue 1>;
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
MODULE_DESCRIPTION("SHA1 secure hash using ARMv8 Crypto Extensions");
|
||||
MODULE_AUTHOR("Ard Biesheuvel <ard.biesheuvel@linaro.org>");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_ALIAS_CRYPTO("sha1");
|
||||
|
||||
struct sha1_ce_state {
|
||||
struct sha1_state sst;
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
MODULE_DESCRIPTION("SHA-224/SHA-256 secure hash using ARMv8 Crypto Extensions");
|
||||
MODULE_AUTHOR("Ard Biesheuvel <ard.biesheuvel@linaro.org>");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_ALIAS_CRYPTO("sha224");
|
||||
MODULE_ALIAS_CRYPTO("sha256");
|
||||
|
||||
struct sha256_ce_state {
|
||||
struct sha256_state sst;
|
||||
|
||||
@@ -22,6 +22,10 @@
|
||||
MODULE_DESCRIPTION("SHA3 secure hash using ARMv8 Crypto Extensions");
|
||||
MODULE_AUTHOR("Ard Biesheuvel <ard.biesheuvel@linaro.org>");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_ALIAS_CRYPTO("sha3-224");
|
||||
MODULE_ALIAS_CRYPTO("sha3-256");
|
||||
MODULE_ALIAS_CRYPTO("sha3-384");
|
||||
MODULE_ALIAS_CRYPTO("sha3-512");
|
||||
|
||||
asmlinkage void sha3_ce_transform(u64 *st, const u8 *data, int blocks,
|
||||
int md_len);
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
MODULE_DESCRIPTION("SHA-384/SHA-512 secure hash using ARMv8 Crypto Extensions");
|
||||
MODULE_AUTHOR("Ard Biesheuvel <ard.biesheuvel@linaro.org>");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_ALIAS_CRYPTO("sha384");
|
||||
MODULE_ALIAS_CRYPTO("sha512");
|
||||
|
||||
asmlinkage void sha512_ce_transform(struct sha512_state *sst, u8 const *src,
|
||||
int blocks);
|
||||
|
||||
@@ -119,9 +119,9 @@ static inline void apply_alternatives_module(void *start, size_t length) { }
|
||||
.popsection
|
||||
.pushsection .altinstr_replacement, "ax"
|
||||
663: \insn2
|
||||
664: .popsection
|
||||
.org . - (664b-663b) + (662b-661b)
|
||||
664: .org . - (664b-663b) + (662b-661b)
|
||||
.org . - (662b-661b) + (664b-663b)
|
||||
.popsection
|
||||
.endif
|
||||
.endm
|
||||
|
||||
@@ -191,11 +191,11 @@ static inline void apply_alternatives_module(void *start, size_t length) { }
|
||||
*/
|
||||
.macro alternative_endif
|
||||
664:
|
||||
.org . - (664b-663b) + (662b-661b)
|
||||
.org . - (662b-661b) + (664b-663b)
|
||||
.if .Lasm_alt_mode==0
|
||||
.popsection
|
||||
.endif
|
||||
.org . - (664b-663b) + (662b-661b)
|
||||
.org . - (662b-661b) + (664b-663b)
|
||||
.endm
|
||||
|
||||
/*
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
* (the optimize attribute silently ignores these options).
|
||||
*/
|
||||
|
||||
#define ATOMIC_OP(op, asm_op) \
|
||||
#define ATOMIC_OP(op, asm_op, constraint) \
|
||||
__LL_SC_INLINE void \
|
||||
__LL_SC_PREFIX(atomic_##op(int i, atomic_t *v)) \
|
||||
{ \
|
||||
@@ -51,11 +51,11 @@ __LL_SC_PREFIX(atomic_##op(int i, atomic_t *v)) \
|
||||
" stxr %w1, %w0, %2\n" \
|
||||
" cbnz %w1, 1b" \
|
||||
: "=&r" (result), "=&r" (tmp), "+Q" (v->counter) \
|
||||
: "Ir" (i)); \
|
||||
: #constraint "r" (i)); \
|
||||
} \
|
||||
__LL_SC_EXPORT(atomic_##op);
|
||||
|
||||
#define ATOMIC_OP_RETURN(name, mb, acq, rel, cl, op, asm_op) \
|
||||
#define ATOMIC_OP_RETURN(name, mb, acq, rel, cl, op, asm_op, constraint)\
|
||||
__LL_SC_INLINE int \
|
||||
__LL_SC_PREFIX(atomic_##op##_return##name(int i, atomic_t *v)) \
|
||||
{ \
|
||||
@@ -70,14 +70,14 @@ __LL_SC_PREFIX(atomic_##op##_return##name(int i, atomic_t *v)) \
|
||||
" cbnz %w1, 1b\n" \
|
||||
" " #mb \
|
||||
: "=&r" (result), "=&r" (tmp), "+Q" (v->counter) \
|
||||
: "Ir" (i) \
|
||||
: #constraint "r" (i) \
|
||||
: cl); \
|
||||
\
|
||||
return result; \
|
||||
} \
|
||||
__LL_SC_EXPORT(atomic_##op##_return##name);
|
||||
|
||||
#define ATOMIC_FETCH_OP(name, mb, acq, rel, cl, op, asm_op) \
|
||||
#define ATOMIC_FETCH_OP(name, mb, acq, rel, cl, op, asm_op, constraint) \
|
||||
__LL_SC_INLINE int \
|
||||
__LL_SC_PREFIX(atomic_fetch_##op##name(int i, atomic_t *v)) \
|
||||
{ \
|
||||
@@ -92,7 +92,7 @@ __LL_SC_PREFIX(atomic_fetch_##op##name(int i, atomic_t *v)) \
|
||||
" cbnz %w2, 1b\n" \
|
||||
" " #mb \
|
||||
: "=&r" (result), "=&r" (val), "=&r" (tmp), "+Q" (v->counter) \
|
||||
: "Ir" (i) \
|
||||
: #constraint "r" (i) \
|
||||
: cl); \
|
||||
\
|
||||
return result; \
|
||||
@@ -110,8 +110,8 @@ __LL_SC_EXPORT(atomic_fetch_##op##name);
|
||||
ATOMIC_FETCH_OP (_acquire, , a, , "memory", __VA_ARGS__)\
|
||||
ATOMIC_FETCH_OP (_release, , , l, "memory", __VA_ARGS__)
|
||||
|
||||
ATOMIC_OPS(add, add)
|
||||
ATOMIC_OPS(sub, sub)
|
||||
ATOMIC_OPS(add, add, I)
|
||||
ATOMIC_OPS(sub, sub, J)
|
||||
|
||||
#undef ATOMIC_OPS
|
||||
#define ATOMIC_OPS(...) \
|
||||
@@ -121,17 +121,17 @@ ATOMIC_OPS(sub, sub)
|
||||
ATOMIC_FETCH_OP (_acquire, , a, , "memory", __VA_ARGS__)\
|
||||
ATOMIC_FETCH_OP (_release, , , l, "memory", __VA_ARGS__)
|
||||
|
||||
ATOMIC_OPS(and, and)
|
||||
ATOMIC_OPS(andnot, bic)
|
||||
ATOMIC_OPS(or, orr)
|
||||
ATOMIC_OPS(xor, eor)
|
||||
ATOMIC_OPS(and, and, )
|
||||
ATOMIC_OPS(andnot, bic, )
|
||||
ATOMIC_OPS(or, orr, )
|
||||
ATOMIC_OPS(xor, eor, )
|
||||
|
||||
#undef ATOMIC_OPS
|
||||
#undef ATOMIC_FETCH_OP
|
||||
#undef ATOMIC_OP_RETURN
|
||||
#undef ATOMIC_OP
|
||||
|
||||
#define ATOMIC64_OP(op, asm_op) \
|
||||
#define ATOMIC64_OP(op, asm_op, constraint) \
|
||||
__LL_SC_INLINE void \
|
||||
__LL_SC_PREFIX(atomic64_##op(long i, atomic64_t *v)) \
|
||||
{ \
|
||||
@@ -145,11 +145,11 @@ __LL_SC_PREFIX(atomic64_##op(long i, atomic64_t *v)) \
|
||||
" stxr %w1, %0, %2\n" \
|
||||
" cbnz %w1, 1b" \
|
||||
: "=&r" (result), "=&r" (tmp), "+Q" (v->counter) \
|
||||
: "Ir" (i)); \
|
||||
: #constraint "r" (i)); \
|
||||
} \
|
||||
__LL_SC_EXPORT(atomic64_##op);
|
||||
|
||||
#define ATOMIC64_OP_RETURN(name, mb, acq, rel, cl, op, asm_op) \
|
||||
#define ATOMIC64_OP_RETURN(name, mb, acq, rel, cl, op, asm_op, constraint)\
|
||||
__LL_SC_INLINE long \
|
||||
__LL_SC_PREFIX(atomic64_##op##_return##name(long i, atomic64_t *v)) \
|
||||
{ \
|
||||
@@ -164,14 +164,14 @@ __LL_SC_PREFIX(atomic64_##op##_return##name(long i, atomic64_t *v)) \
|
||||
" cbnz %w1, 1b\n" \
|
||||
" " #mb \
|
||||
: "=&r" (result), "=&r" (tmp), "+Q" (v->counter) \
|
||||
: "Ir" (i) \
|
||||
: #constraint "r" (i) \
|
||||
: cl); \
|
||||
\
|
||||
return result; \
|
||||
} \
|
||||
__LL_SC_EXPORT(atomic64_##op##_return##name);
|
||||
|
||||
#define ATOMIC64_FETCH_OP(name, mb, acq, rel, cl, op, asm_op) \
|
||||
#define ATOMIC64_FETCH_OP(name, mb, acq, rel, cl, op, asm_op, constraint)\
|
||||
__LL_SC_INLINE long \
|
||||
__LL_SC_PREFIX(atomic64_fetch_##op##name(long i, atomic64_t *v)) \
|
||||
{ \
|
||||
@@ -186,7 +186,7 @@ __LL_SC_PREFIX(atomic64_fetch_##op##name(long i, atomic64_t *v)) \
|
||||
" cbnz %w2, 1b\n" \
|
||||
" " #mb \
|
||||
: "=&r" (result), "=&r" (val), "=&r" (tmp), "+Q" (v->counter) \
|
||||
: "Ir" (i) \
|
||||
: #constraint "r" (i) \
|
||||
: cl); \
|
||||
\
|
||||
return result; \
|
||||
@@ -204,8 +204,8 @@ __LL_SC_EXPORT(atomic64_fetch_##op##name);
|
||||
ATOMIC64_FETCH_OP (_acquire,, a, , "memory", __VA_ARGS__) \
|
||||
ATOMIC64_FETCH_OP (_release,, , l, "memory", __VA_ARGS__)
|
||||
|
||||
ATOMIC64_OPS(add, add)
|
||||
ATOMIC64_OPS(sub, sub)
|
||||
ATOMIC64_OPS(add, add, I)
|
||||
ATOMIC64_OPS(sub, sub, J)
|
||||
|
||||
#undef ATOMIC64_OPS
|
||||
#define ATOMIC64_OPS(...) \
|
||||
@@ -215,10 +215,10 @@ ATOMIC64_OPS(sub, sub)
|
||||
ATOMIC64_FETCH_OP (_acquire,, a, , "memory", __VA_ARGS__) \
|
||||
ATOMIC64_FETCH_OP (_release,, , l, "memory", __VA_ARGS__)
|
||||
|
||||
ATOMIC64_OPS(and, and)
|
||||
ATOMIC64_OPS(andnot, bic)
|
||||
ATOMIC64_OPS(or, orr)
|
||||
ATOMIC64_OPS(xor, eor)
|
||||
ATOMIC64_OPS(and, and, L)
|
||||
ATOMIC64_OPS(andnot, bic, )
|
||||
ATOMIC64_OPS(or, orr, L)
|
||||
ATOMIC64_OPS(xor, eor, L)
|
||||
|
||||
#undef ATOMIC64_OPS
|
||||
#undef ATOMIC64_FETCH_OP
|
||||
@@ -248,7 +248,7 @@ __LL_SC_PREFIX(atomic64_dec_if_positive(atomic64_t *v))
|
||||
}
|
||||
__LL_SC_EXPORT(atomic64_dec_if_positive);
|
||||
|
||||
#define __CMPXCHG_CASE(w, sz, name, mb, acq, rel, cl) \
|
||||
#define __CMPXCHG_CASE(w, sz, name, mb, acq, rel, cl, constraint) \
|
||||
__LL_SC_INLINE unsigned long \
|
||||
__LL_SC_PREFIX(__cmpxchg_case_##name(volatile void *ptr, \
|
||||
unsigned long old, \
|
||||
@@ -267,29 +267,34 @@ __LL_SC_PREFIX(__cmpxchg_case_##name(volatile void *ptr, \
|
||||
"2:" \
|
||||
: [tmp] "=&r" (tmp), [oldval] "=&r" (oldval), \
|
||||
[v] "+Q" (*(unsigned long *)ptr) \
|
||||
: [old] "Lr" (old), [new] "r" (new) \
|
||||
: [old] #constraint "r" (old), [new] "r" (new) \
|
||||
: cl); \
|
||||
\
|
||||
return oldval; \
|
||||
} \
|
||||
__LL_SC_EXPORT(__cmpxchg_case_##name);
|
||||
|
||||
__CMPXCHG_CASE(w, b, 1, , , , )
|
||||
__CMPXCHG_CASE(w, h, 2, , , , )
|
||||
__CMPXCHG_CASE(w, , 4, , , , )
|
||||
__CMPXCHG_CASE( , , 8, , , , )
|
||||
__CMPXCHG_CASE(w, b, acq_1, , a, , "memory")
|
||||
__CMPXCHG_CASE(w, h, acq_2, , a, , "memory")
|
||||
__CMPXCHG_CASE(w, , acq_4, , a, , "memory")
|
||||
__CMPXCHG_CASE( , , acq_8, , a, , "memory")
|
||||
__CMPXCHG_CASE(w, b, rel_1, , , l, "memory")
|
||||
__CMPXCHG_CASE(w, h, rel_2, , , l, "memory")
|
||||
__CMPXCHG_CASE(w, , rel_4, , , l, "memory")
|
||||
__CMPXCHG_CASE( , , rel_8, , , l, "memory")
|
||||
__CMPXCHG_CASE(w, b, mb_1, dmb ish, , l, "memory")
|
||||
__CMPXCHG_CASE(w, h, mb_2, dmb ish, , l, "memory")
|
||||
__CMPXCHG_CASE(w, , mb_4, dmb ish, , l, "memory")
|
||||
__CMPXCHG_CASE( , , mb_8, dmb ish, , l, "memory")
|
||||
/*
|
||||
* Earlier versions of GCC (no later than 8.1.0) appear to incorrectly
|
||||
* handle the 'K' constraint for the value 4294967295 - thus we use no
|
||||
* constraint for 32 bit operations.
|
||||
*/
|
||||
__CMPXCHG_CASE(w, b, 1, , , , , )
|
||||
__CMPXCHG_CASE(w, h, 2, , , , , )
|
||||
__CMPXCHG_CASE(w, , 4, , , , , )
|
||||
__CMPXCHG_CASE( , , 8, , , , , L)
|
||||
__CMPXCHG_CASE(w, b, acq_1, , a, , "memory", )
|
||||
__CMPXCHG_CASE(w, h, acq_2, , a, , "memory", )
|
||||
__CMPXCHG_CASE(w, , acq_4, , a, , "memory", )
|
||||
__CMPXCHG_CASE( , , acq_8, , a, , "memory", L)
|
||||
__CMPXCHG_CASE(w, b, rel_1, , , l, "memory", )
|
||||
__CMPXCHG_CASE(w, h, rel_2, , , l, "memory", )
|
||||
__CMPXCHG_CASE(w, , rel_4, , , l, "memory", )
|
||||
__CMPXCHG_CASE( , , rel_8, , , l, "memory", L)
|
||||
__CMPXCHG_CASE(w, b, mb_1, dmb ish, , l, "memory", )
|
||||
__CMPXCHG_CASE(w, h, mb_2, dmb ish, , l, "memory", )
|
||||
__CMPXCHG_CASE(w, , mb_4, dmb ish, , l, "memory", )
|
||||
__CMPXCHG_CASE( , , mb_8, dmb ish, , l, "memory", L)
|
||||
|
||||
#undef __CMPXCHG_CASE
|
||||
|
||||
|
||||
@@ -198,6 +198,7 @@
|
||||
#define CPTR_EL2_DEFAULT CPTR_EL2_RES1
|
||||
|
||||
/* Hyp Debug Configuration Register bits */
|
||||
#define MDCR_EL2_TTRF (1 << 19)
|
||||
#define MDCR_EL2_TPMS (1 << 14)
|
||||
#define MDCR_EL2_E2PB_MASK (UL(0x3))
|
||||
#define MDCR_EL2_E2PB_SHIFT (UL(12))
|
||||
|
||||
@@ -455,6 +455,7 @@ static inline void kvm_arch_sched_in(struct kvm_vcpu *vcpu, int cpu) {}
|
||||
static inline void kvm_arch_vcpu_block_finish(struct kvm_vcpu *vcpu) {}
|
||||
|
||||
void kvm_arm_init_debug(void);
|
||||
void kvm_arm_vcpu_init_debug(struct kvm_vcpu *vcpu);
|
||||
void kvm_arm_setup_debug(struct kvm_vcpu *vcpu);
|
||||
void kvm_arm_clear_debug(struct kvm_vcpu *vcpu);
|
||||
void kvm_arm_reset_debug_ptr(struct kvm_vcpu *vcpu);
|
||||
|
||||
@@ -144,6 +144,9 @@ void __sysreg32_restore_state(struct kvm_vcpu *vcpu);
|
||||
|
||||
void __debug_switch_to_guest(struct kvm_vcpu *vcpu);
|
||||
void __debug_switch_to_host(struct kvm_vcpu *vcpu);
|
||||
void __debug_save_host_buffers_nvhe(struct kvm_vcpu *vcpu);
|
||||
void __debug_restore_host_buffers_nvhe(struct kvm_vcpu *vcpu);
|
||||
|
||||
|
||||
void __fpsimd_save_state(struct user_fpsimd_state *fp_regs);
|
||||
void __fpsimd_restore_state(struct user_fpsimd_state *fp_regs);
|
||||
|
||||
@@ -64,7 +64,7 @@ static inline unsigned long find_zero(unsigned long mask)
|
||||
*/
|
||||
static inline unsigned long load_unaligned_zeropad(const void *addr)
|
||||
{
|
||||
unsigned long ret, offset;
|
||||
unsigned long ret, tmp;
|
||||
|
||||
/* Load word from unaligned pointer addr */
|
||||
asm(
|
||||
@@ -72,9 +72,9 @@ static inline unsigned long load_unaligned_zeropad(const void *addr)
|
||||
"2:\n"
|
||||
" .pushsection .fixup,\"ax\"\n"
|
||||
" .align 2\n"
|
||||
"3: and %1, %2, #0x7\n"
|
||||
" bic %2, %2, #0x7\n"
|
||||
" ldr %0, [%2]\n"
|
||||
"3: bic %1, %2, #0x7\n"
|
||||
" ldr %0, [%1]\n"
|
||||
" and %1, %2, #0x7\n"
|
||||
" lsl %1, %1, #0x3\n"
|
||||
#ifndef __AARCH64EB__
|
||||
" lsr %0, %0, %1\n"
|
||||
@@ -84,7 +84,7 @@ static inline unsigned long load_unaligned_zeropad(const void *addr)
|
||||
" b 2b\n"
|
||||
" .popsection\n"
|
||||
_ASM_EXTABLE(1b, 3b)
|
||||
: "=&r" (ret), "=&r" (offset)
|
||||
: "=&r" (ret), "=&r" (tmp)
|
||||
: "r" (addr), "Q" (*(unsigned long *)addr));
|
||||
|
||||
return ret;
|
||||
|
||||
@@ -258,7 +258,6 @@ static const struct arm64_ftr_bits ftr_id_aa64dfr0[] = {
|
||||
* of support.
|
||||
*/
|
||||
S_ARM64_FTR_BITS(FTR_HIDDEN, FTR_NONSTRICT, FTR_EXACT, ID_AA64DFR0_PMUVER_SHIFT, 4, 0),
|
||||
ARM64_FTR_BITS(FTR_HIDDEN, FTR_STRICT, FTR_EXACT, ID_AA64DFR0_TRACEVER_SHIFT, 4, 0),
|
||||
ARM64_FTR_BITS(FTR_HIDDEN, FTR_STRICT, FTR_EXACT, ID_AA64DFR0_DEBUGVER_SHIFT, 4, 0x6),
|
||||
ARM64_FTR_END,
|
||||
};
|
||||
@@ -1012,7 +1011,7 @@ static bool cpu_has_broken_dbm(void)
|
||||
/* List of CPUs which have broken DBM support. */
|
||||
static const struct midr_range cpus[] = {
|
||||
#ifdef CONFIG_ARM64_ERRATUM_1024718
|
||||
MIDR_RANGE(MIDR_CORTEX_A55, 0, 0, 1, 0), // A55 r0p0 -r1p0
|
||||
MIDR_ALL_VERSIONS(MIDR_CORTEX_A55),
|
||||
#endif
|
||||
{},
|
||||
};
|
||||
|
||||
@@ -67,5 +67,7 @@ ssize_t copy_oldmem_page(unsigned long pfn, char *buf,
|
||||
ssize_t elfcorehdr_read(char *buf, size_t count, u64 *ppos)
|
||||
{
|
||||
memcpy(buf, phys_to_virt((phys_addr_t)*ppos), count);
|
||||
*ppos += count;
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
@@ -960,6 +960,7 @@ __primary_switch:
|
||||
|
||||
tlbi vmalle1 // Remove any stale TLB entries
|
||||
dsb nsh
|
||||
isb
|
||||
|
||||
msr sctlr_el1, x19 // re-enable the MMU
|
||||
isb
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
SECTIONS {
|
||||
.plt (NOLOAD) : { BYTE(0) }
|
||||
.init.plt (NOLOAD) : { BYTE(0) }
|
||||
.text.ftrace_trampoline (NOLOAD) : { BYTE(0) }
|
||||
.plt 0 (NOLOAD) : { BYTE(0) }
|
||||
.init.plt 0 (NOLOAD) : { BYTE(0) }
|
||||
.text.ftrace_trampoline 0 (NOLOAD) : { BYTE(0) }
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ int arch_uprobe_analyze_insn(struct arch_uprobe *auprobe, struct mm_struct *mm,
|
||||
|
||||
/* TODO: Currently we do not support AARCH32 instruction probing */
|
||||
if (mm->context.flags & MMCF_AARCH32)
|
||||
return -ENOTSUPP;
|
||||
return -EOPNOTSUPP;
|
||||
else if (!IS_ALIGNED(addr, AARCH64_INSN_SIZE))
|
||||
return -EINVAL;
|
||||
|
||||
|
||||
@@ -39,6 +39,13 @@ SECTIONS
|
||||
.gnu.version_d : { *(.gnu.version_d) }
|
||||
.gnu.version_r : { *(.gnu.version_r) }
|
||||
|
||||
/*
|
||||
* Discard .note.gnu.property sections which are unused and have
|
||||
* different alignment requirement from vDSO note sections.
|
||||
*/
|
||||
/DISCARD/ : {
|
||||
*(.note.GNU-stack .note.gnu.property)
|
||||
}
|
||||
.note : { *(.note.*) } :text :note
|
||||
|
||||
. = ALIGN(16);
|
||||
@@ -59,7 +66,6 @@ SECTIONS
|
||||
PROVIDE(end = .);
|
||||
|
||||
/DISCARD/ : {
|
||||
*(.note.GNU-stack)
|
||||
*(.data .data.* .gnu.linkonce.d.* .sdata*)
|
||||
*(.bss .sbss .dynbss .dynsbss)
|
||||
}
|
||||
|
||||
@@ -10,15 +10,7 @@ include $(srctree)/lib/vdso/Makefile
|
||||
|
||||
# Same as cc-*option, but using CC_COMPAT instead of CC
|
||||
ifeq ($(CONFIG_CC_IS_CLANG), y)
|
||||
COMPAT_GCC_TOOLCHAIN_DIR := $(dir $(shell which $(CROSS_COMPILE_COMPAT)elfedit))
|
||||
COMPAT_GCC_TOOLCHAIN := $(realpath $(COMPAT_GCC_TOOLCHAIN_DIR)/..)
|
||||
|
||||
CC_COMPAT_CLANG_FLAGS := --target=$(notdir $(CROSS_COMPILE_COMPAT:%-=%))
|
||||
CC_COMPAT_CLANG_FLAGS += --prefix=$(COMPAT_GCC_TOOLCHAIN_DIR)
|
||||
CC_COMPAT_CLANG_FLAGS += -no-integrated-as -Qunused-arguments
|
||||
ifneq ($(COMPAT_GCC_TOOLCHAIN),)
|
||||
CC_COMPAT_CLANG_FLAGS += --gcc-toolchain=$(COMPAT_GCC_TOOLCHAIN)
|
||||
endif
|
||||
|
||||
CC_COMPAT ?= $(CC)
|
||||
CC_COMPAT += $(CC_COMPAT_CLANG_FLAGS)
|
||||
|
||||
@@ -79,6 +79,64 @@ void kvm_arm_init_debug(void)
|
||||
__this_cpu_write(mdcr_el2, kvm_call_hyp(__kvm_get_mdcr_el2));
|
||||
}
|
||||
|
||||
/**
|
||||
* kvm_arm_setup_mdcr_el2 - configure vcpu mdcr_el2 value
|
||||
*
|
||||
* @vcpu: the vcpu pointer
|
||||
*
|
||||
* This ensures we will trap access to:
|
||||
* - Performance monitors (MDCR_EL2_TPM/MDCR_EL2_TPMCR)
|
||||
* - Debug ROM Address (MDCR_EL2_TDRA)
|
||||
* - OS related registers (MDCR_EL2_TDOSA)
|
||||
* - Statistical profiler (MDCR_EL2_TPMS/MDCR_EL2_E2PB)
|
||||
* - Self-hosted Trace Filter controls (MDCR_EL2_TTRF)
|
||||
*/
|
||||
static void kvm_arm_setup_mdcr_el2(struct kvm_vcpu *vcpu)
|
||||
{
|
||||
/*
|
||||
* This also clears MDCR_EL2_E2PB_MASK to disable guest access
|
||||
* to the profiling buffer.
|
||||
*/
|
||||
vcpu->arch.mdcr_el2 = __this_cpu_read(mdcr_el2) & MDCR_EL2_HPMN_MASK;
|
||||
vcpu->arch.mdcr_el2 |= (MDCR_EL2_TPM |
|
||||
MDCR_EL2_TPMS |
|
||||
MDCR_EL2_TTRF |
|
||||
MDCR_EL2_TPMCR |
|
||||
MDCR_EL2_TDRA |
|
||||
MDCR_EL2_TDOSA);
|
||||
|
||||
/* Is the VM being debugged by userspace? */
|
||||
if (vcpu->guest_debug)
|
||||
/* Route all software debug exceptions to EL2 */
|
||||
vcpu->arch.mdcr_el2 |= MDCR_EL2_TDE;
|
||||
|
||||
/*
|
||||
* Trap debug register access when one of the following is true:
|
||||
* - Userspace is using the hardware to debug the guest
|
||||
* (KVM_GUESTDBG_USE_HW is set).
|
||||
* - The guest is not using debug (KVM_ARM64_DEBUG_DIRTY is clear).
|
||||
*/
|
||||
if ((vcpu->guest_debug & KVM_GUESTDBG_USE_HW) ||
|
||||
!(vcpu->arch.flags & KVM_ARM64_DEBUG_DIRTY))
|
||||
vcpu->arch.mdcr_el2 |= MDCR_EL2_TDA;
|
||||
|
||||
trace_kvm_arm_set_dreg32("MDCR_EL2", vcpu->arch.mdcr_el2);
|
||||
}
|
||||
|
||||
/**
|
||||
* kvm_arm_vcpu_init_debug - setup vcpu debug traps
|
||||
*
|
||||
* @vcpu: the vcpu pointer
|
||||
*
|
||||
* Set vcpu initial mdcr_el2 value.
|
||||
*/
|
||||
void kvm_arm_vcpu_init_debug(struct kvm_vcpu *vcpu)
|
||||
{
|
||||
preempt_disable();
|
||||
kvm_arm_setup_mdcr_el2(vcpu);
|
||||
preempt_enable();
|
||||
}
|
||||
|
||||
/**
|
||||
* kvm_arm_reset_debug_ptr - reset the debug ptr to point to the vcpu state
|
||||
*/
|
||||
@@ -94,12 +152,7 @@ void kvm_arm_reset_debug_ptr(struct kvm_vcpu *vcpu)
|
||||
* @vcpu: the vcpu pointer
|
||||
*
|
||||
* This is called before each entry into the hypervisor to setup any
|
||||
* debug related registers. Currently this just ensures we will trap
|
||||
* access to:
|
||||
* - Performance monitors (MDCR_EL2_TPM/MDCR_EL2_TPMCR)
|
||||
* - Debug ROM Address (MDCR_EL2_TDRA)
|
||||
* - OS related registers (MDCR_EL2_TDOSA)
|
||||
* - Statistical profiler (MDCR_EL2_TPMS/MDCR_EL2_E2PB)
|
||||
* debug related registers.
|
||||
*
|
||||
* Additionally, KVM only traps guest accesses to the debug registers if
|
||||
* the guest is not actively using them (see the KVM_ARM64_DEBUG_DIRTY
|
||||
@@ -111,27 +164,14 @@ void kvm_arm_reset_debug_ptr(struct kvm_vcpu *vcpu)
|
||||
|
||||
void kvm_arm_setup_debug(struct kvm_vcpu *vcpu)
|
||||
{
|
||||
bool trap_debug = !(vcpu->arch.flags & KVM_ARM64_DEBUG_DIRTY);
|
||||
unsigned long mdscr, orig_mdcr_el2 = vcpu->arch.mdcr_el2;
|
||||
|
||||
trace_kvm_arm_setup_debug(vcpu, vcpu->guest_debug);
|
||||
|
||||
/*
|
||||
* This also clears MDCR_EL2_E2PB_MASK to disable guest access
|
||||
* to the profiling buffer.
|
||||
*/
|
||||
vcpu->arch.mdcr_el2 = __this_cpu_read(mdcr_el2) & MDCR_EL2_HPMN_MASK;
|
||||
vcpu->arch.mdcr_el2 |= (MDCR_EL2_TPM |
|
||||
MDCR_EL2_TPMS |
|
||||
MDCR_EL2_TPMCR |
|
||||
MDCR_EL2_TDRA |
|
||||
MDCR_EL2_TDOSA);
|
||||
kvm_arm_setup_mdcr_el2(vcpu);
|
||||
|
||||
/* Is Guest debugging in effect? */
|
||||
if (vcpu->guest_debug) {
|
||||
/* Route all software debug exceptions to EL2 */
|
||||
vcpu->arch.mdcr_el2 |= MDCR_EL2_TDE;
|
||||
|
||||
/* Save guest debug state */
|
||||
save_guest_debug_regs(vcpu);
|
||||
|
||||
@@ -185,7 +225,6 @@ void kvm_arm_setup_debug(struct kvm_vcpu *vcpu)
|
||||
|
||||
vcpu->arch.debug_ptr = &vcpu->arch.external_debug_state;
|
||||
vcpu->arch.flags |= KVM_ARM64_DEBUG_DIRTY;
|
||||
trap_debug = true;
|
||||
|
||||
trace_kvm_arm_set_regset("BKPTS", get_num_brps(),
|
||||
&vcpu->arch.debug_ptr->dbg_bcr[0],
|
||||
@@ -200,10 +239,6 @@ void kvm_arm_setup_debug(struct kvm_vcpu *vcpu)
|
||||
BUG_ON(!vcpu->guest_debug &&
|
||||
vcpu->arch.debug_ptr != &vcpu->arch.vcpu_debug_state);
|
||||
|
||||
/* Trap debug register access */
|
||||
if (trap_debug)
|
||||
vcpu->arch.mdcr_el2 |= MDCR_EL2_TDA;
|
||||
|
||||
/* If KDE or MDE are set, perform a full save/restore cycle. */
|
||||
if (vcpu_read_sys_reg(vcpu, MDSCR_EL1) & (DBG_MDSCR_KDE | DBG_MDSCR_MDE))
|
||||
vcpu->arch.flags |= KVM_ARM64_DEBUG_DIRTY;
|
||||
@@ -212,7 +247,6 @@ void kvm_arm_setup_debug(struct kvm_vcpu *vcpu)
|
||||
if (has_vhe() && orig_mdcr_el2 != vcpu->arch.mdcr_el2)
|
||||
write_sysreg(vcpu->arch.mdcr_el2, mdcr_el2);
|
||||
|
||||
trace_kvm_arm_set_dreg32("MDCR_EL2", vcpu->arch.mdcr_el2);
|
||||
trace_kvm_arm_set_dreg32("MDSCR_EL1", vcpu_read_sys_reg(vcpu, MDSCR_EL1));
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user