Merge keystone/android14-6.1-keystone-qcom-release.6.1.11 (b28061a
) into msm-pineapple
* refs/heads/tmp-b28061a: ANDROID: Enable userspace block driver ANDROID: remoteproc: sysfs: fix race while updating recovery flag ANDROID: sched: add vendor hook to PELT multiplier ANDROID: android14-6.1: Restrict android/ OWNERS to DrNo ANDROID: Enable block device throttling ANDROID: Update symbol list for virtual device. ANDROID: KVM: arm64: Coalesce host stage2 entries on ownership reclaim ANDROID: ABI: Update QCOM symbol list ANDROID: cpuidle-psci: Fix suspicious RCU usage Linux 6.1.11 bpf: Skip invalid kfunc call in backtrack_insn gfs2: Always check inode size of inline inodes gfs2: Cosmetic gfs2_dinode_{in,out} cleanup wifi: brcmfmac: Check the count value of channel spec to prevent out-of-bounds reads f2fs: fix to do sanity check on i_extra_isize in is_alive() fbdev: smscufx: fix error handling code in ufx_usb_probe f2fs: initialize locks earlier in f2fs_fill_super() ovl: Use "buf" flexible array for memcpy() destination fs/ntfs3: Validate attribute data and valid sizes powerpc/imc-pmu: Revert nest_init_lock to being a mutex powerpc/64s: Fix local irq disable when PMIs are disabled powerpc/64s/radix: Fix crash with unaligned relocated kernel iio:adc:twl6030: Enable measurement of VAC ASoC: SOF: sof-audio: prepare_widgets: Check swidget for NULL on sink failure platform/x86/amd: pmc: add CONFIG_SERIO dependency serial: 8250_dma: Fix DMA Rx rearm race serial: 8250_dma: Fix DMA Rx completion race phy: qcom-qmp-combo: fix runtime suspend nvmem: core: fix return value nvmem: core: fix cell removal on error nvmem: core: fix device node refcounting nvmem: core: fix registration vs use race nvmem: core: fix cleanup after dev_set_name() nvmem: core: remove nvmem_config wp_gpio nvmem: core: initialise nvmem->id early drm/amdgpu: update wave data type to 3 for gfx11 drm/amd/pm: drop unneeded dpm features disablement for SMU 13.0.4/11 drm/amd: Fix initialization for nbio 4.3.0 drm/i915: Fix potential bit_17 double-free drm/i915: Avoid potential vm use-after-free serial: stm32: Merge hard IRQ and threaded IRQ handling into single IRQ handler dma-buf: actually set signaling bit for private stub fences migrate: hugetlb: check for hugetlb shared PMD in node migration maple_tree: fix mas_empty_area_rev() lower bound validation Squashfs: fix handling and sanity checking of xattr_ids count ia64: fix build error due to switch case label appearing next to declaration highmem: round down the address passed to kunmap_flush_on_unmap() mm/MADV_COLLAPSE: catch !none !huge !bad pmd lookups mm, mremap: fix mremap() expanding for vma's with vm_ops->close() mm/khugepaged: fix ->anon_vma race mm/swapfile: add cond_resched() in get_swap_pages() mm/uffd: fix pte marker when fork() without fork event fpga: stratix10-soc: Fix return value check in s10_ops_write_init() fpga: m10bmc-sec: Fix probe rollback x86/debug: Fix stack recursion caused by wrongly ordered DR7 accesses HV: hv_balloon: fix memory leak with using debugfs_lookup() kernel/irq/irqdomain.c: fix memory leak with using debugfs_lookup() usb: gadget: udc: do not clear gadget driver.bus usb: typec: ucsi: Don't attempt to resume the ports before they exist usb: gadget: f_uac2: Fix incorrect increment of bNumEndpoints mm: memcg: fix NULL pointer in mem_cgroup_track_foreign_dirty_slowpath() mm: hugetlb: proc: check for hugetlb shared PMD in /proc/PID/smaps mm: multi-gen LRU: fix crash during cgroup migration Revert "mm: kmemleak: alloc gray object for reserved region with direct map" riscv: disable generation of unwind tables parisc: Wire up PTRACE_GETREGS/PTRACE_SETREGS for compat case parisc: Replace hardcoded value with PRIV_USER constant in ptrace.c parisc: Fix return code of pdc_iodc_print() nvmem: qcom-spmi-sdam: fix module autoloading nvmem: sunxi_sid: Always use 32-bit MMIO reads nvmem: brcm_nvram: Add check for kzalloc iio: imu: fxos8700: fix MAGN sensor scale and unit iio: imu: fxos8700: remove definition FXOS8700_CTRL_ODR_MIN iio: imu: fxos8700: fix failed initialization ODR mode assignment iio: imu: fxos8700: fix incorrect ODR mode readback iio: imu: fxos8700: fix swapped ACCEL and MAGN channels readback iio: imu: fxos8700: fix map label of channel type to MAGN sensor iio: imu: fxos8700: fix IMU data bits returned to user space iio: imu: fxos8700: fix incomplete ACCEL and MAGN channels readback iio: imu: fxos8700: fix ACCEL measurement range selection iio: light: cm32181: Fix PM support on system with 2 I2C resources iio:adc:twl6030: Enable measurements of VUSB, VBAT and others iio: imx8qxp-adc: fix irq flood when call imx8qxp_adc_read_raw() iio: adc: berlin2-adc: Add missing of_node_put() in error path iio: adc: xilinx-ams: fix devm_krealloc() return value check iio: hid: fix the retval in gyro_3d_capture_sample iio: hid: fix the retval in accel_3d_capture_sample rtc: efi: Enable SET/GET WAKEUP services as optional efi: Accept version 2 of memory attributes table ASoC: SOF: keep prepare/unprepare widgets in sink path ASoC: SOF: sof-audio: skip prepare/unprepare if swidget is NULL ASoC: SOF: sof-audio: unprepare when swidget->use_count > 0 ASoC: codecs: wsa883x: correct playback min/max rates ALSA: hda/realtek: fix mute/micmute LEDs, speaker don't work for a HP platform ALSA: hda/realtek: Add Acer Predator PH315-54 watchdog: diag288_wdt: fix __diag288() inline assembly watchdog: diag288_wdt: do not use stack buffers for hardware data can: isotp: handle wait_event_interruptible() return values can: isotp: split tx timer into transmission and timeout net: qrtr: free memory on error path in radix_tree_insert() ARM: dts: imx7d-smegw01: Fix USB host over-current polarity hv_netvsc: Fix missed pagebuf entries in netvsc_dma_map/unmap() cgroup/cpuset: Fix wrong check in update_parent_subparts_cpumask() fbcon: Check font dimension limits vc_screen: move load of struct vc_data pointer in vcs_read() to avoid UAF usb: gadget: f_fs: Fix unbalanced spinlock in __ffs_ep0_queue_wait usb: dwc3: qcom: enable vbus override when in OTG dr-mode iio: adc: stm32-dfsdm: fill module aliases bcache: Silence memcpy() run-time false positive warnings drm/amd/display: Fix timing not changning when freesync video is enabled net/x25: Fix to not accept on connected socket platform/x86/amd: pmc: Disable IRQ1 wakeup for RN/CZN platform/x86: gigabyte-wmi: add support for B450M DS3H WIFI-CF platform/x86: hp-wmi: Handle Omen Key event platform/x86: dell-wmi: Add a keymap for KEY_MUTE in type 0x0010 table x86/build: Move '-mindirect-branch-cs-prefix' out of GCC-only block Revert "gfs2: stop using generic_writepages in gfs2_ail1_start_one" i2c: rk3x: fix a bunch of kernel-doc warnings scsi: iscsi_tcp: Fix UAF during login when accessing the shost ipaddress scsi: iscsi_tcp: Fix UAF during logout when accessing the shost ipaddress perf/x86/intel/cstate: Add Emerald Rapids perf/x86/intel: Add Emerald Rapids x86/aperfmperf: Erase stale arch_freq_scale values when disabling frequency invariance readings scsi: target: core: Fix warning on RT kernels i2c: mxs: suppress probe-deferral error message i2c: designware-pci: Add new PCI IDs for AMD NAVI GPU kbuild: modinst: Fix build error when CONFIG_MODULE_SIG_KEY is a PKCS#11 URI certs: Fix build error when PKCS#11 URI contains semicolon rtc: sunplus: fix format string for printing resource efi: fix potential NULL deref in efi_mem_reserve_persistent net: openvswitch: fix flow memory leak in ovs_flow_cmd_new virtio-net: Keep stop() to follow mirror sequence of open() selftests: net: udpgso_bench_tx: Cater for pending datagrams zerocopy benchmarking selftests: net: udpgso_bench: Fix racing bug between the rx/tx programs selftests: net: udpgso_bench_rx/tx: Stop when wrong CLI args are provided selftests: net: udpgso_bench_rx: Fix 'used uninitialized' compiler warning ata: libata: Fix sata_down_spd_limit() when no link speed is reported can: mcp251xfd: mcp251xfd_ring_set_ringparam(): assign missing tx_obj_num_coalesce_irq can: raw: fix CAN FD frame transmissions over CAN XL devices can: j1939: fix errant WARN_ON_ONCE in j1939_session_deactivate octeontx2-af: Fix devlink unregister igc: return an error if the mac type is unknown in igc_ptp_systim_to_hwtstamp() riscv: kprobe: Fixup kernel panic when probing an illegal position ip/ip6_gre: Fix non-point-to-point tunnel not generating IPv6 link local address ip/ip6_gre: Fix changing addr gen mode not generating IPv6 link local address drm/panel: boe-tv101wum-nl6: Ensure DSI writes succeed during disable net: phy: meson-gxl: Add generic dummy stubs for MMD register access sctp: do not check hb_timer.expires when resetting hb_timer maple_tree: should get pivots boundary by type squashfs: harden sanity check in squashfs_read_xattr_id_table kunit: fix kunit_test_init_section_suites(...) block: ublk: extending queue_size to fix overflow netfilter: br_netfilter: disable sabotage_in hook after first suppression ALSA: firewire-motu: fix unreleased lock warning in hwdep device net/tls: tls_is_tx_ready() checked list_entry drm/i915/adlp: Fix typo for reference clock drm/i915: Fix up locking around dumping requests lists drm/i915: Fix request ref counting during error capture & debugfs dump drm/i915/guc: Fix locking when searching for a hung request platform/x86: thinkpad_acpi: Fix thinklight LED brightness returning 255 platform/x86/amd/pmf: Ensure mutexes are initialized before use platform/x86/amd/pmf: Fix to update SPS thermals when power supply change platform/x86/amd/pmf: Add helper routine to check pprof is balanced platform/x86/amd/pmf: Fix to update SPS default pprof thermals platform/x86/amd/pmf: Add helper routine to update SPS thermals platform/x86/amd/pmf: update to auto-mode limits only after AMT event fscache: Use wait_on_bit() to wait for the freeing of relinquished volume netrom: Fix use-after-free caused by accept on already connected socket block, bfq: fix uaf for bfqq in bic_set_bfqq() block, bfq: replace 0/1 with false/true in bic apis net: wwan: t7xx: Fix Runtime PM initialization net: phy: dp83822: Fix null pointer access on DP83825/DP83826 devices sfc: correctly advertise tunneled IPv6 segmentation skb: Do mix page pool and page referenced frags in GRO dpaa2-eth: execute xdp_do_flush() before napi_complete_done() dpaa_eth: execute xdp_do_flush() before napi_complete_done() virtio-net: execute xdp_do_flush() before napi_complete_done() qede: execute xdp_do_flush() before napi_complete_done() ice: Prevent set_channel from changing queues while RDMA active vhost-scsi: unbreak any layout for response use less confusing names for iov_iter direction initializers fix "direction" argument of iov_iter_kvec() fix 'direction' argument of iov_iter_{init,bvec}() fix iov_iter_bvec() "direction" argument memcpy_real(): WRITE is "data source", not destination... zcore: WRITE is "data source", not destination... READ is "data destination", not source... WRITE is "data source", not destination... copy_oldmem_kernel() - WRITE is "data source", not destination vhost/net: Clear the pending messages when the backend is removed ALSA: memalloc: Workaround for Xen PV bpf: Fix the kernel crash caused by bpf_setsockopt(). scsi: Revert "scsi: core: map PQ=1, PDT=other values to SCSI_SCAN_TARGET_PRESENT" drm/ssd130x: Init display before the SSD130X_DISPLAY_ON command drm/vc4: hdmi: make CEC adapter name unique arm64: dts: imx8mm-verdin: Do not power down eth-phy arm64: dts: imx8mm: Fix pad control for UART1_DTE_RX bpf, sockmap: Check for any of tcp_bpf_prots when cloning a listener media: v4l2-ctrls-api.c: move ctrl->is_new = 1 to the correct line bpf: Add missing btf_put to register_btf_id_dtor_kfuncs ASoC: SOF: ipc4-mtrace: prevent underflow in sof_ipc4_priority_mask_dfs_write() selftests/filesystems: grant executable permission to run_fat_tests.sh bpf: Fix to preserve reg parent/live fields when copying range info ALSA: hda/via: Avoid potential array out-of-bound in add_secret_dac_path() bpf: Fix a possible task gone issue with bpf_send_signal[_thread]() helpers bpf: Fix off-by-one error in bpf_mem_cache_idx() ASoC: Intel: avs: Implement PCI shutdown ASoC: Intel: sof_es8336: Drop reference count of ACPI device after use ASoC: Intel: bytcr_wm5102: Drop reference count of ACPI device after use ASoC: Intel: bytcr_rt5640: Drop reference count of ACPI device after use ASoC: Intel: bytcr_rt5651: Drop reference count of ACPI device after use ASoC: Intel: bytcht_es8316: Drop reference count of ACPI device after use ASoC: amd: acp-es8336: Drop reference count of ACPI device after use arm64: dts: freescale: imx8dxl: fix sc_pwrkey's property name linux,keycode arm64: dts: imx8m-venice: Remove incorrect 'uart-has-rtscts' bus: sunxi-rsb: Fix error handling in sunxi_rsb_init() firewire: fix memory leak for payload of request subaction to IEC 61883-1 FCP region ANDROID: clang: update to 16.0.2 ANDROID: KVM: arm64: Remove 'pending reclaim' page flags ANDROID: KVM: arm64: Refactor the guest teardown path ANDROID: KVM: arm64: Poison pages on the relinquish path ANDROID: ABI: Update QCOM symbol list Revert "ANDROID: KVM: arm64: Coalesce host stage2 entries on ownership reclaim" FROMLIST: maple_tree: fix mas_empty_area_rev() lower bound validation ANDROID: irq: Add vendor data field to struct irq_desc Linux 6.1.10 net: mctp: purge receive queues on sk destruction rust: print: avoid evaluating arguments in `pr_*` macros in `unsafe` blocks net: fix NULL pointer in skb_segment_list gpiolib-acpi: Don't set GPIOs for wakeup in S3 mode gpiolib: acpi: Add a ignore wakeup quirk for Clevo NL5xRU nvme-apple: only reset the controller when RTKit is running cifs: fix return of uninitialized rc in dfs_cache_update_tgthint() gpiolib: acpi: Allow ignoring wake capability on pins that aren't in _AEI dmaengine: imx-sdma: Fix a possible memory leak in sdma_transfer_init HID: playstation: sanity check DualSense calibration data. HID: uclogic: Add support for XP-PEN Deco 01 V2 s390: workaround invalid gcc-11 out of bounds read warning block: fix hctx checks for batch allocation ACPI: video: Add backlight=native DMI quirk for Acer Aspire 4810T LoongArch: Get frame info in unwind_start() when regs is not available blk-cgroup: fix missing pd_online_fn() while activating policy erofs: clean up parsing of fscache related options kselftest: Fix error message for unconfigured LLVM builds ARM: omap1: fix building gpio15xx arm64: dts: msm8994-angler: fix the memory map mac80211: Fix MLO address translation for multiple bss case erofs/zmap.c: Fix incorrect offset calculation bpf: Skip task with pid=1 in send_signal_common() firmware: arm_scmi: Clear stale xfer->hdr.status arm64: dts: imx8mq-thor96: fix no-mmc property for SDHCI arm64: dts: freescale: Fix pca954x i2c-mux node names ARM: dts: vf610: Fix pca9548 i2c-mux node names ARM: dts: imx: Fix pca9547 i2c-mux node name Conflicts: android/abi_gki_aarch64_qcom net/qrtr/ns.c Change-Id: Ie88ff42234d0d5d6d69582985ed1900ae1265f98 Upstream-Build: ks_qcom-android14-6.1-keystone-qcom-release@9632925 UKQ2.230221.001 Signed-off-by: jianzhou <quic_jianzhou@quicinc.com>
This commit is contained in:
commit
3ea04f58a4
2
Makefile
2
Makefile
@ -1,7 +1,7 @@
|
|||||||
# SPDX-License-Identifier: GPL-2.0
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
VERSION = 6
|
VERSION = 6
|
||||||
PATCHLEVEL = 1
|
PATCHLEVEL = 1
|
||||||
SUBLEVEL = 9
|
SUBLEVEL = 11
|
||||||
EXTRAVERSION =
|
EXTRAVERSION =
|
||||||
NAME = Hurr durr I'ma ninja sloth
|
NAME = Hurr durr I'ma ninja sloth
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
09ad10d4ee63f8983acad5515463dd202cc83054
|
4731a6d3bc2a2f59d266ad497b773393e7cde458
|
||||||
|
8
android/OWNERS
Normal file
8
android/OWNERS
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
# If we ever add another OWNERS above this directory, it's likely to be
|
||||||
|
# more permissive, so don't inherit from it
|
||||||
|
set noparent
|
||||||
|
include kernel/common:android-mainline:/OWNERS_DrNo
|
||||||
|
|
||||||
|
# Downstream boards maintained directly in this manifest branch
|
||||||
|
per-file abi_gki_aarch64_cuttlefish = adelva@google.com, rammuthiah@google.com
|
||||||
|
per-file abi_gki_aarch64_goldfish = rkir@google.com
|
File diff suppressed because it is too large
Load Diff
@ -1771,6 +1771,7 @@
|
|||||||
kmemdup
|
kmemdup
|
||||||
kmemdup_nul
|
kmemdup_nul
|
||||||
kmsg_dump_get_buffer
|
kmsg_dump_get_buffer
|
||||||
|
kmsg_dump_get_line
|
||||||
kmsg_dump_register
|
kmsg_dump_register
|
||||||
kmsg_dump_rewind
|
kmsg_dump_rewind
|
||||||
kmsg_dump_unregister
|
kmsg_dump_unregister
|
||||||
@ -3292,6 +3293,7 @@
|
|||||||
__traceiter_android_vh_cpu_idle_exit
|
__traceiter_android_vh_cpu_idle_exit
|
||||||
__traceiter_android_vh_cpuidle_psci_enter
|
__traceiter_android_vh_cpuidle_psci_enter
|
||||||
__traceiter_android_vh_cpuidle_psci_exit
|
__traceiter_android_vh_cpuidle_psci_exit
|
||||||
|
__traceiter_android_vh_do_wake_up_sync
|
||||||
__traceiter_android_vh_dump_throttled_rt_tasks
|
__traceiter_android_vh_dump_throttled_rt_tasks
|
||||||
__traceiter_android_vh_free_task
|
__traceiter_android_vh_free_task
|
||||||
__traceiter_android_vh_ftrace_dump_buffer
|
__traceiter_android_vh_ftrace_dump_buffer
|
||||||
@ -3379,6 +3381,7 @@
|
|||||||
__tracepoint_android_vh_cpu_idle_exit
|
__tracepoint_android_vh_cpu_idle_exit
|
||||||
__tracepoint_android_vh_cpuidle_psci_enter
|
__tracepoint_android_vh_cpuidle_psci_enter
|
||||||
__tracepoint_android_vh_cpuidle_psci_exit
|
__tracepoint_android_vh_cpuidle_psci_exit
|
||||||
|
__tracepoint_android_vh_do_wake_up_sync
|
||||||
__tracepoint_android_vh_ftrace_dump_buffer
|
__tracepoint_android_vh_ftrace_dump_buffer
|
||||||
__tracepoint_android_vh_ftrace_format_check
|
__tracepoint_android_vh_ftrace_format_check
|
||||||
__tracepoint_android_vh_ftrace_oops_enter
|
__tracepoint_android_vh_ftrace_oops_enter
|
||||||
|
@ -587,6 +587,7 @@
|
|||||||
btbcm_setup_patchram
|
btbcm_setup_patchram
|
||||||
cancel_delayed_work
|
cancel_delayed_work
|
||||||
device_wakeup_disable
|
device_wakeup_disable
|
||||||
|
__dev_kfree_skb_irq
|
||||||
disable_irq
|
disable_irq
|
||||||
disable_irq_nosync
|
disable_irq_nosync
|
||||||
enable_irq
|
enable_irq
|
||||||
|
@ -488,7 +488,7 @@ &i2c1 {
|
|||||||
scl-gpios = <&gpio3 21 GPIO_ACTIVE_HIGH>;
|
scl-gpios = <&gpio3 21 GPIO_ACTIVE_HIGH>;
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
|
||||||
i2c-switch@70 {
|
i2c-mux@70 {
|
||||||
compatible = "nxp,pca9547";
|
compatible = "nxp,pca9547";
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
#size-cells = <0>;
|
#size-cells = <0>;
|
||||||
|
@ -198,6 +198,7 @@ &usbotg1 {
|
|||||||
&usbotg2 {
|
&usbotg2 {
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
pinctrl-0 = <&pinctrl_usbotg2>;
|
pinctrl-0 = <&pinctrl_usbotg2>;
|
||||||
|
over-current-active-low;
|
||||||
dr_mode = "host";
|
dr_mode = "host";
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
@ -374,7 +375,7 @@ MX7D_PAD_LPSR_GPIO1_IO05__GPIO1_IO5 0x04
|
|||||||
|
|
||||||
pinctrl_usbotg2: usbotg2grp {
|
pinctrl_usbotg2: usbotg2grp {
|
||||||
fsl,pins = <
|
fsl,pins = <
|
||||||
MX7D_PAD_UART3_RTS_B__USB_OTG2_OC 0x04
|
MX7D_PAD_UART3_RTS_B__USB_OTG2_OC 0x5c
|
||||||
>;
|
>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -345,7 +345,7 @@ gpio6: io-expander@22 {
|
|||||||
};
|
};
|
||||||
|
|
||||||
&i2c2 {
|
&i2c2 {
|
||||||
tca9548@70 {
|
i2c-mux@70 {
|
||||||
compatible = "nxp,pca9548";
|
compatible = "nxp,pca9548";
|
||||||
pinctrl-0 = <&pinctrl_i2c_mux_reset>;
|
pinctrl-0 = <&pinctrl_i2c_mux_reset>;
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
|
@ -340,7 +340,7 @@ eeprom@50 {
|
|||||||
};
|
};
|
||||||
|
|
||||||
&i2c2 {
|
&i2c2 {
|
||||||
tca9548@70 {
|
i2c-mux@70 {
|
||||||
compatible = "nxp,pca9548";
|
compatible = "nxp,pca9548";
|
||||||
pinctrl-0 = <&pinctrl_i2c_mux_reset>;
|
pinctrl-0 = <&pinctrl_i2c_mux_reset>;
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
#include <linux/gpio.h>
|
#include <linux/gpio.h>
|
||||||
#include <linux/platform_data/gpio-omap.h>
|
#include <linux/platform_data/gpio-omap.h>
|
||||||
#include <linux/soc/ti/omap1-soc.h>
|
#include <linux/soc/ti/omap1-soc.h>
|
||||||
|
#include <asm/irq.h>
|
||||||
|
|
||||||
#include "irqs.h"
|
#include "irqs.h"
|
||||||
|
|
||||||
|
@ -110,7 +110,7 @@ &esdhc1 {
|
|||||||
&i2c0 {
|
&i2c0 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
|
||||||
pca9547@77 {
|
i2c-mux@77 {
|
||||||
compatible = "nxp,pca9547";
|
compatible = "nxp,pca9547";
|
||||||
reg = <0x77>;
|
reg = <0x77>;
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
|
@ -89,7 +89,7 @@ fpga: board-control@2,0 {
|
|||||||
&i2c0 {
|
&i2c0 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
|
||||||
pca9547@77 {
|
i2c-mux@77 {
|
||||||
compatible = "nxp,pca9547";
|
compatible = "nxp,pca9547";
|
||||||
reg = <0x77>;
|
reg = <0x77>;
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
|
@ -88,7 +88,7 @@ &duart1 {
|
|||||||
&i2c0 {
|
&i2c0 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
|
||||||
pca9547@77 {
|
i2c-mux@77 {
|
||||||
compatible = "nxp,pca9547";
|
compatible = "nxp,pca9547";
|
||||||
reg = <0x77>;
|
reg = <0x77>;
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
|
@ -53,7 +53,7 @@ flash@2 {
|
|||||||
&i2c0 {
|
&i2c0 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
|
||||||
i2c-switch@77 {
|
i2c-mux@77 {
|
||||||
compatible = "nxp,pca9547";
|
compatible = "nxp,pca9547";
|
||||||
reg = <0x77>;
|
reg = <0x77>;
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
|
@ -136,7 +136,7 @@ mdio2_aquantia_phy: ethernet-phy@0 {
|
|||||||
&i2c0 {
|
&i2c0 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
|
||||||
i2c-switch@77 {
|
i2c-mux@77 {
|
||||||
compatible = "nxp,pca9547";
|
compatible = "nxp,pca9547";
|
||||||
reg = <0x77>;
|
reg = <0x77>;
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
|
@ -245,7 +245,7 @@ rx8035: rtc@32 {
|
|||||||
&i2c3 {
|
&i2c3 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
|
||||||
i2c-switch@70 {
|
i2c-mux@70 {
|
||||||
compatible = "nxp,pca9540";
|
compatible = "nxp,pca9540";
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
#size-cells = <0>;
|
#size-cells = <0>;
|
||||||
|
@ -103,7 +103,7 @@ mdio0_phy15: mdio-phy3@1f {
|
|||||||
|
|
||||||
&i2c0 {
|
&i2c0 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
pca9547@77 {
|
i2c-mux@77 {
|
||||||
compatible = "nxp,pca9547";
|
compatible = "nxp,pca9547";
|
||||||
reg = <0x77>;
|
reg = <0x77>;
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
|
@ -44,7 +44,7 @@ cpld@3,0 {
|
|||||||
|
|
||||||
&i2c0 {
|
&i2c0 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
pca9547@75 {
|
i2c-mux@75 {
|
||||||
compatible = "nxp,pca9547";
|
compatible = "nxp,pca9547";
|
||||||
reg = <0x75>;
|
reg = <0x75>;
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
|
@ -54,7 +54,7 @@ &esdhc1 {
|
|||||||
&i2c0 {
|
&i2c0 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
|
||||||
i2c-switch@77 {
|
i2c-mux@77 {
|
||||||
compatible = "nxp,pca9547";
|
compatible = "nxp,pca9547";
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
#size-cells = <0>;
|
#size-cells = <0>;
|
||||||
|
@ -157,7 +157,7 @@ rtc: rtc {
|
|||||||
|
|
||||||
sc_pwrkey: keys {
|
sc_pwrkey: keys {
|
||||||
compatible = "fsl,imx8qxp-sc-key", "fsl,imx-sc-key";
|
compatible = "fsl,imx8qxp-sc-key", "fsl,imx-sc-key";
|
||||||
linux,keycode = <KEY_POWER>;
|
linux,keycodes = <KEY_POWER>;
|
||||||
wakeup-source;
|
wakeup-source;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -214,7 +214,7 @@ &i2c3 {
|
|||||||
pinctrl-0 = <&pinctrl_i2c3>;
|
pinctrl-0 = <&pinctrl_i2c3>;
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
|
||||||
i2cmux@70 {
|
i2c-mux@70 {
|
||||||
compatible = "nxp,pca9540";
|
compatible = "nxp,pca9540";
|
||||||
reg = <0x70>;
|
reg = <0x70>;
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
|
@ -602,7 +602,7 @@
|
|||||||
#define MX8MM_IOMUXC_UART1_RXD_GPIO5_IO22 0x234 0x49C 0x000 0x5 0x0
|
#define MX8MM_IOMUXC_UART1_RXD_GPIO5_IO22 0x234 0x49C 0x000 0x5 0x0
|
||||||
#define MX8MM_IOMUXC_UART1_RXD_TPSMP_HDATA24 0x234 0x49C 0x000 0x7 0x0
|
#define MX8MM_IOMUXC_UART1_RXD_TPSMP_HDATA24 0x234 0x49C 0x000 0x7 0x0
|
||||||
#define MX8MM_IOMUXC_UART1_TXD_UART1_DCE_TX 0x238 0x4A0 0x000 0x0 0x0
|
#define MX8MM_IOMUXC_UART1_TXD_UART1_DCE_TX 0x238 0x4A0 0x000 0x0 0x0
|
||||||
#define MX8MM_IOMUXC_UART1_TXD_UART1_DTE_RX 0x238 0x4A0 0x4F4 0x0 0x0
|
#define MX8MM_IOMUXC_UART1_TXD_UART1_DTE_RX 0x238 0x4A0 0x4F4 0x0 0x1
|
||||||
#define MX8MM_IOMUXC_UART1_TXD_ECSPI3_MOSI 0x238 0x4A0 0x000 0x1 0x0
|
#define MX8MM_IOMUXC_UART1_TXD_ECSPI3_MOSI 0x238 0x4A0 0x000 0x1 0x0
|
||||||
#define MX8MM_IOMUXC_UART1_TXD_GPIO5_IO23 0x238 0x4A0 0x000 0x5 0x0
|
#define MX8MM_IOMUXC_UART1_TXD_GPIO5_IO23 0x238 0x4A0 0x000 0x5 0x0
|
||||||
#define MX8MM_IOMUXC_UART1_TXD_TPSMP_HDATA25 0x238 0x4A0 0x000 0x7 0x0
|
#define MX8MM_IOMUXC_UART1_TXD_TPSMP_HDATA25 0x238 0x4A0 0x000 0x7 0x0
|
||||||
|
@ -33,7 +33,6 @@ &uart2 {
|
|||||||
pinctrl-0 = <&pinctrl_uart2>;
|
pinctrl-0 = <&pinctrl_uart2>;
|
||||||
rts-gpios = <&gpio5 29 GPIO_ACTIVE_LOW>;
|
rts-gpios = <&gpio5 29 GPIO_ACTIVE_LOW>;
|
||||||
cts-gpios = <&gpio5 28 GPIO_ACTIVE_LOW>;
|
cts-gpios = <&gpio5 28 GPIO_ACTIVE_LOW>;
|
||||||
uart-has-rtscts;
|
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -33,7 +33,6 @@ &uart2 {
|
|||||||
pinctrl-0 = <&pinctrl_uart2>;
|
pinctrl-0 = <&pinctrl_uart2>;
|
||||||
rts-gpios = <&gpio5 29 GPIO_ACTIVE_LOW>;
|
rts-gpios = <&gpio5 29 GPIO_ACTIVE_LOW>;
|
||||||
cts-gpios = <&gpio5 28 GPIO_ACTIVE_LOW>;
|
cts-gpios = <&gpio5 28 GPIO_ACTIVE_LOW>;
|
||||||
uart-has-rtscts;
|
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -222,7 +222,6 @@ &uart3 {
|
|||||||
pinctrl-0 = <&pinctrl_uart3>, <&pinctrl_bten>;
|
pinctrl-0 = <&pinctrl_uart3>, <&pinctrl_bten>;
|
||||||
cts-gpios = <&gpio5 8 GPIO_ACTIVE_LOW>;
|
cts-gpios = <&gpio5 8 GPIO_ACTIVE_LOW>;
|
||||||
rts-gpios = <&gpio5 9 GPIO_ACTIVE_LOW>;
|
rts-gpios = <&gpio5 9 GPIO_ACTIVE_LOW>;
|
||||||
uart-has-rtscts;
|
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
|
||||||
bluetooth {
|
bluetooth {
|
||||||
|
@ -721,7 +721,6 @@ &uart1 {
|
|||||||
dtr-gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
|
dtr-gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
|
||||||
dsr-gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
|
dsr-gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
|
||||||
dcd-gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
|
dcd-gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
|
||||||
uart-has-rtscts;
|
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -737,7 +736,6 @@ &uart3 {
|
|||||||
pinctrl-0 = <&pinctrl_uart3>, <&pinctrl_uart3_gpio>;
|
pinctrl-0 = <&pinctrl_uart3>, <&pinctrl_uart3_gpio>;
|
||||||
cts-gpios = <&gpio4 10 GPIO_ACTIVE_LOW>;
|
cts-gpios = <&gpio4 10 GPIO_ACTIVE_LOW>;
|
||||||
rts-gpios = <&gpio4 9 GPIO_ACTIVE_LOW>;
|
rts-gpios = <&gpio4 9 GPIO_ACTIVE_LOW>;
|
||||||
uart-has-rtscts;
|
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -746,7 +744,6 @@ &uart4 {
|
|||||||
pinctrl-0 = <&pinctrl_uart4>, <&pinctrl_uart4_gpio>;
|
pinctrl-0 = <&pinctrl_uart4>, <&pinctrl_uart4_gpio>;
|
||||||
cts-gpios = <&gpio5 11 GPIO_ACTIVE_LOW>;
|
cts-gpios = <&gpio5 11 GPIO_ACTIVE_LOW>;
|
||||||
rts-gpios = <&gpio5 12 GPIO_ACTIVE_LOW>;
|
rts-gpios = <&gpio5 12 GPIO_ACTIVE_LOW>;
|
||||||
uart-has-rtscts;
|
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -651,7 +651,6 @@ &uart1 {
|
|||||||
pinctrl-0 = <&pinctrl_uart1>, <&pinctrl_uart1_gpio>;
|
pinctrl-0 = <&pinctrl_uart1>, <&pinctrl_uart1_gpio>;
|
||||||
rts-gpios = <&gpio4 10 GPIO_ACTIVE_LOW>;
|
rts-gpios = <&gpio4 10 GPIO_ACTIVE_LOW>;
|
||||||
cts-gpios = <&gpio4 24 GPIO_ACTIVE_LOW>;
|
cts-gpios = <&gpio4 24 GPIO_ACTIVE_LOW>;
|
||||||
uart-has-rtscts;
|
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -668,7 +667,6 @@ &uart3 {
|
|||||||
pinctrl-0 = <&pinctrl_uart3>, <&pinctrl_uart3_gpio>;
|
pinctrl-0 = <&pinctrl_uart3>, <&pinctrl_uart3_gpio>;
|
||||||
rts-gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
|
rts-gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
|
||||||
cts-gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
|
cts-gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
|
||||||
uart-has-rtscts;
|
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
|
||||||
bluetooth {
|
bluetooth {
|
||||||
@ -686,7 +684,6 @@ &uart4 {
|
|||||||
dtr-gpios = <&gpio4 3 GPIO_ACTIVE_LOW>;
|
dtr-gpios = <&gpio4 3 GPIO_ACTIVE_LOW>;
|
||||||
dsr-gpios = <&gpio4 4 GPIO_ACTIVE_LOW>;
|
dsr-gpios = <&gpio4 4 GPIO_ACTIVE_LOW>;
|
||||||
dcd-gpios = <&gpio4 6 GPIO_ACTIVE_LOW>;
|
dcd-gpios = <&gpio4 6 GPIO_ACTIVE_LOW>;
|
||||||
uart-has-rtscts;
|
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -572,7 +572,6 @@ &uart1 {
|
|||||||
dtr-gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
|
dtr-gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
|
||||||
dsr-gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
|
dsr-gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
|
||||||
dcd-gpios = <&gpio3 24 GPIO_ACTIVE_LOW>;
|
dcd-gpios = <&gpio3 24 GPIO_ACTIVE_LOW>;
|
||||||
uart-has-rtscts;
|
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -98,6 +98,7 @@ reg_ethphy: regulator-ethphy {
|
|||||||
off-on-delay = <500000>;
|
off-on-delay = <500000>;
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
pinctrl-0 = <&pinctrl_reg_eth>;
|
pinctrl-0 = <&pinctrl_reg_eth>;
|
||||||
|
regulator-always-on;
|
||||||
regulator-boot-on;
|
regulator-boot-on;
|
||||||
regulator-max-microvolt = <3300000>;
|
regulator-max-microvolt = <3300000>;
|
||||||
regulator-min-microvolt = <3300000>;
|
regulator-min-microvolt = <3300000>;
|
||||||
|
@ -631,7 +631,6 @@ &uart3 {
|
|||||||
pinctrl-0 = <&pinctrl_uart3>, <&pinctrl_uart3_gpio>;
|
pinctrl-0 = <&pinctrl_uart3>, <&pinctrl_uart3_gpio>;
|
||||||
rts-gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
|
rts-gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
|
||||||
cts-gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
|
cts-gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
|
||||||
uart-has-rtscts;
|
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
|
||||||
bluetooth {
|
bluetooth {
|
||||||
|
@ -611,7 +611,6 @@ &uart3 {
|
|||||||
pinctrl-0 = <&pinctrl_uart3>, <&pinctrl_uart3_gpio>;
|
pinctrl-0 = <&pinctrl_uart3>, <&pinctrl_uart3_gpio>;
|
||||||
cts-gpios = <&gpio3 21 GPIO_ACTIVE_LOW>;
|
cts-gpios = <&gpio3 21 GPIO_ACTIVE_LOW>;
|
||||||
rts-gpios = <&gpio3 22 GPIO_ACTIVE_LOW>;
|
rts-gpios = <&gpio3 22 GPIO_ACTIVE_LOW>;
|
||||||
uart-has-rtscts;
|
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
|
||||||
bluetooth {
|
bluetooth {
|
||||||
|
@ -133,7 +133,7 @@ &i2c1 {
|
|||||||
pinctrl-0 = <&pinctrl_i2c1>;
|
pinctrl-0 = <&pinctrl_i2c1>;
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
|
||||||
i2cmux@70 {
|
i2c-mux@70 {
|
||||||
compatible = "nxp,pca9546";
|
compatible = "nxp,pca9546";
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
pinctrl-0 = <&pinctrl_i2c1_pca9546>;
|
pinctrl-0 = <&pinctrl_i2c1_pca9546>;
|
||||||
@ -216,7 +216,7 @@ &i2c4 {
|
|||||||
pinctrl-0 = <&pinctrl_i2c4>;
|
pinctrl-0 = <&pinctrl_i2c4>;
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
|
||||||
pca9546: i2cmux@70 {
|
pca9546: i2c-mux@70 {
|
||||||
compatible = "nxp,pca9546";
|
compatible = "nxp,pca9546";
|
||||||
reg = <0x70>;
|
reg = <0x70>;
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
|
@ -339,7 +339,7 @@ &usdhc1 {
|
|||||||
bus-width = <4>;
|
bus-width = <4>;
|
||||||
non-removable;
|
non-removable;
|
||||||
no-sd;
|
no-sd;
|
||||||
no-emmc;
|
no-mmc;
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
|
||||||
brcmf: wifi@1 {
|
brcmf: wifi@1 {
|
||||||
@ -359,7 +359,7 @@ &usdhc2 {
|
|||||||
cd-gpios = <&gpio2 12 GPIO_ACTIVE_LOW>;
|
cd-gpios = <&gpio2 12 GPIO_ACTIVE_LOW>;
|
||||||
bus-width = <4>;
|
bus-width = <4>;
|
||||||
no-sdio;
|
no-sdio;
|
||||||
no-emmc;
|
no-mmc;
|
||||||
disable-wp;
|
disable-wp;
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
@ -61,7 +61,7 @@ &i2c1 {
|
|||||||
pinctrl-0 = <&pinctrl_lpi2c1 &pinctrl_ioexp_rst>;
|
pinctrl-0 = <&pinctrl_lpi2c1 &pinctrl_ioexp_rst>;
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
|
||||||
i2c-switch@71 {
|
i2c-mux@71 {
|
||||||
compatible = "nxp,pca9646", "nxp,pca9546";
|
compatible = "nxp,pca9646", "nxp,pca9546";
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
#size-cells = <0>;
|
#size-cells = <0>;
|
||||||
|
@ -8,9 +8,6 @@
|
|||||||
|
|
||||||
#include "msm8994.dtsi"
|
#include "msm8994.dtsi"
|
||||||
|
|
||||||
/* Angler's firmware does not report where the memory is allocated */
|
|
||||||
/delete-node/ &cont_splash_mem;
|
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
model = "Huawei Nexus 6P";
|
model = "Huawei Nexus 6P";
|
||||||
compatible = "huawei,angler", "qcom,msm8994";
|
compatible = "huawei,angler", "qcom,msm8994";
|
||||||
@ -27,6 +24,22 @@ aliases {
|
|||||||
chosen {
|
chosen {
|
||||||
stdout-path = "serial0:115200n8";
|
stdout-path = "serial0:115200n8";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
reserved-memory {
|
||||||
|
#address-cells = <2>;
|
||||||
|
#size-cells = <2>;
|
||||||
|
ranges;
|
||||||
|
|
||||||
|
tzapp_mem: tzapp@4800000 {
|
||||||
|
reg = <0 0x04800000 0 0x1900000>;
|
||||||
|
no-map;
|
||||||
|
};
|
||||||
|
|
||||||
|
removed_region: reserved@6300000 {
|
||||||
|
reg = <0 0x06300000 0 0xD00000>;
|
||||||
|
no-map;
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
&blsp1_uart2 {
|
&blsp1_uart2 {
|
||||||
|
@ -87,6 +87,7 @@ CONFIG_MODVERSIONS=y
|
|||||||
CONFIG_MODULE_SIG=y
|
CONFIG_MODULE_SIG=y
|
||||||
CONFIG_MODULE_SIG_PROTECT=y
|
CONFIG_MODULE_SIG_PROTECT=y
|
||||||
CONFIG_BLK_DEV_ZONED=y
|
CONFIG_BLK_DEV_ZONED=y
|
||||||
|
CONFIG_BLK_DEV_THROTTLING=y
|
||||||
CONFIG_BLK_INLINE_ENCRYPTION=y
|
CONFIG_BLK_INLINE_ENCRYPTION=y
|
||||||
CONFIG_BLK_INLINE_ENCRYPTION_FALLBACK=y
|
CONFIG_BLK_INLINE_ENCRYPTION_FALLBACK=y
|
||||||
CONFIG_IOSCHED_BFQ=y
|
CONFIG_IOSCHED_BFQ=y
|
||||||
@ -300,6 +301,7 @@ CONFIG_BLK_DEV_LOOP=y
|
|||||||
CONFIG_BLK_DEV_LOOP_MIN_COUNT=16
|
CONFIG_BLK_DEV_LOOP_MIN_COUNT=16
|
||||||
CONFIG_BLK_DEV_RAM=y
|
CONFIG_BLK_DEV_RAM=y
|
||||||
CONFIG_BLK_DEV_RAM_SIZE=8192
|
CONFIG_BLK_DEV_RAM_SIZE=8192
|
||||||
|
CONFIG_BLK_DEV_UBLK=y
|
||||||
CONFIG_SRAM=y
|
CONFIG_SRAM=y
|
||||||
CONFIG_SCSI=y
|
CONFIG_SCSI=y
|
||||||
# CONFIG_SCSI_PROC_FS is not set
|
# CONFIG_SCSI_PROC_FS is not set
|
||||||
|
@ -79,7 +79,6 @@ enum __kvm_host_smccc_func {
|
|||||||
/* Hypercalls available after pKVM finalisation */
|
/* Hypercalls available after pKVM finalisation */
|
||||||
__KVM_HOST_SMCCC_FUNC___pkvm_host_share_hyp,
|
__KVM_HOST_SMCCC_FUNC___pkvm_host_share_hyp,
|
||||||
__KVM_HOST_SMCCC_FUNC___pkvm_host_unshare_hyp,
|
__KVM_HOST_SMCCC_FUNC___pkvm_host_unshare_hyp,
|
||||||
__KVM_HOST_SMCCC_FUNC___pkvm_host_reclaim_page,
|
|
||||||
__KVM_HOST_SMCCC_FUNC___pkvm_host_map_guest,
|
__KVM_HOST_SMCCC_FUNC___pkvm_host_map_guest,
|
||||||
__KVM_HOST_SMCCC_FUNC___kvm_adjust_pc,
|
__KVM_HOST_SMCCC_FUNC___kvm_adjust_pc,
|
||||||
__KVM_HOST_SMCCC_FUNC___kvm_vcpu_run,
|
__KVM_HOST_SMCCC_FUNC___kvm_vcpu_run,
|
||||||
@ -88,7 +87,9 @@ enum __kvm_host_smccc_func {
|
|||||||
__KVM_HOST_SMCCC_FUNC___vgic_v3_restore_vmcr_aprs,
|
__KVM_HOST_SMCCC_FUNC___vgic_v3_restore_vmcr_aprs,
|
||||||
__KVM_HOST_SMCCC_FUNC___pkvm_init_vm,
|
__KVM_HOST_SMCCC_FUNC___pkvm_init_vm,
|
||||||
__KVM_HOST_SMCCC_FUNC___pkvm_init_vcpu,
|
__KVM_HOST_SMCCC_FUNC___pkvm_init_vcpu,
|
||||||
__KVM_HOST_SMCCC_FUNC___pkvm_teardown_vm,
|
__KVM_HOST_SMCCC_FUNC___pkvm_start_teardown_vm,
|
||||||
|
__KVM_HOST_SMCCC_FUNC___pkvm_finalize_teardown_vm,
|
||||||
|
__KVM_HOST_SMCCC_FUNC___pkvm_reclaim_dying_guest_page,
|
||||||
__KVM_HOST_SMCCC_FUNC___pkvm_vcpu_load,
|
__KVM_HOST_SMCCC_FUNC___pkvm_vcpu_load,
|
||||||
__KVM_HOST_SMCCC_FUNC___pkvm_vcpu_put,
|
__KVM_HOST_SMCCC_FUNC___pkvm_vcpu_put,
|
||||||
__KVM_HOST_SMCCC_FUNC___pkvm_vcpu_sync_state,
|
__KVM_HOST_SMCCC_FUNC___pkvm_vcpu_sync_state,
|
||||||
|
@ -70,7 +70,7 @@ extern unsigned long hyp_nr_cpus;
|
|||||||
int __pkvm_prot_finalize(void);
|
int __pkvm_prot_finalize(void);
|
||||||
int __pkvm_host_share_hyp(u64 pfn);
|
int __pkvm_host_share_hyp(u64 pfn);
|
||||||
int __pkvm_host_unshare_hyp(u64 pfn);
|
int __pkvm_host_unshare_hyp(u64 pfn);
|
||||||
int __pkvm_host_reclaim_page(u64 pfn);
|
int __pkvm_host_reclaim_page(struct pkvm_hyp_vm *vm, u64 pfn, u64 ipa);
|
||||||
int __pkvm_host_donate_hyp(u64 pfn, u64 nr_pages);
|
int __pkvm_host_donate_hyp(u64 pfn, u64 nr_pages);
|
||||||
int __pkvm_hyp_donate_host(u64 pfn, u64 nr_pages);
|
int __pkvm_hyp_donate_host(u64 pfn, u64 nr_pages);
|
||||||
int __pkvm_host_share_guest(u64 pfn, u64 gfn, struct pkvm_hyp_vcpu *vcpu);
|
int __pkvm_host_share_guest(u64 pfn, u64 gfn, struct pkvm_hyp_vcpu *vcpu);
|
||||||
@ -98,13 +98,15 @@ void handle_host_mem_abort(struct kvm_cpu_context *host_ctxt);
|
|||||||
int hyp_register_host_perm_fault_handler(int (*cb)(struct kvm_cpu_context *ctxt, u64 esr, u64 addr));
|
int hyp_register_host_perm_fault_handler(int (*cb)(struct kvm_cpu_context *ctxt, u64 esr, u64 addr));
|
||||||
int hyp_pin_shared_mem(void *from, void *to);
|
int hyp_pin_shared_mem(void *from, void *to);
|
||||||
void hyp_unpin_shared_mem(void *from, void *to);
|
void hyp_unpin_shared_mem(void *from, void *to);
|
||||||
void reclaim_guest_pages(struct pkvm_hyp_vm *vm, struct kvm_hyp_memcache *mc);
|
|
||||||
int host_stage2_get_leaf(phys_addr_t phys, kvm_pte_t *ptep, u32 *level);
|
int host_stage2_get_leaf(phys_addr_t phys, kvm_pte_t *ptep, u32 *level);
|
||||||
int refill_memcache(struct kvm_hyp_memcache *mc, unsigned long min_pages,
|
int refill_memcache(struct kvm_hyp_memcache *mc, unsigned long min_pages,
|
||||||
struct kvm_hyp_memcache *host_mc);
|
struct kvm_hyp_memcache *host_mc);
|
||||||
|
|
||||||
int module_change_host_page_prot(u64 pfn, enum kvm_pgtable_prot prot);
|
int module_change_host_page_prot(u64 pfn, enum kvm_pgtable_prot prot);
|
||||||
|
|
||||||
|
void destroy_hyp_vm_pgt(struct pkvm_hyp_vm *vm);
|
||||||
|
void drain_hyp_pool(struct pkvm_hyp_vm *vm, struct kvm_hyp_memcache *mc);
|
||||||
|
|
||||||
void psci_mem_protect_inc(u64 n);
|
void psci_mem_protect_inc(u64 n);
|
||||||
void psci_mem_protect_dec(u64 n);
|
void psci_mem_protect_dec(u64 n);
|
||||||
|
|
||||||
|
@ -11,9 +11,7 @@
|
|||||||
* Accesses to struct hyp_page flags are serialized by the host stage-2
|
* Accesses to struct hyp_page flags are serialized by the host stage-2
|
||||||
* page-table lock.
|
* page-table lock.
|
||||||
*/
|
*/
|
||||||
#define HOST_PAGE_NEED_POISONING BIT(0)
|
#define MODULE_OWNED_PAGE BIT(0)
|
||||||
#define HOST_PAGE_PENDING_RECLAIM BIT(1)
|
|
||||||
#define MODULE_OWNED_PAGE BIT(2)
|
|
||||||
|
|
||||||
struct hyp_page {
|
struct hyp_page {
|
||||||
unsigned short refcount;
|
unsigned short refcount;
|
||||||
|
@ -64,6 +64,13 @@ struct pkvm_hyp_vm {
|
|||||||
*/
|
*/
|
||||||
unsigned int nr_vcpus;
|
unsigned int nr_vcpus;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* True when the guest is being torn down. When in this state, the
|
||||||
|
* guest's vCPUs can't be loaded anymore, but its pages can be
|
||||||
|
* reclaimed by the host.
|
||||||
|
*/
|
||||||
|
bool is_dying;
|
||||||
|
|
||||||
/* Array of the hyp vCPU structures for this VM. */
|
/* Array of the hyp vCPU structures for this VM. */
|
||||||
struct pkvm_hyp_vcpu *vcpus[];
|
struct pkvm_hyp_vcpu *vcpus[];
|
||||||
};
|
};
|
||||||
@ -96,7 +103,9 @@ int __pkvm_init_vm(struct kvm *host_kvm, unsigned long vm_hva,
|
|||||||
unsigned long pgd_hva, unsigned long last_ran_hva);
|
unsigned long pgd_hva, unsigned long last_ran_hva);
|
||||||
int __pkvm_init_vcpu(pkvm_handle_t handle, struct kvm_vcpu *host_vcpu,
|
int __pkvm_init_vcpu(pkvm_handle_t handle, struct kvm_vcpu *host_vcpu,
|
||||||
unsigned long vcpu_hva);
|
unsigned long vcpu_hva);
|
||||||
int __pkvm_teardown_vm(pkvm_handle_t handle);
|
int __pkvm_start_teardown_vm(pkvm_handle_t handle);
|
||||||
|
int __pkvm_finalize_teardown_vm(pkvm_handle_t handle);
|
||||||
|
int __pkvm_reclaim_dying_guest_page(pkvm_handle_t handle, u64 pfn, u64 ipa);
|
||||||
|
|
||||||
struct pkvm_hyp_vcpu *pkvm_load_hyp_vcpu(pkvm_handle_t handle,
|
struct pkvm_hyp_vcpu *pkvm_load_hyp_vcpu(pkvm_handle_t handle,
|
||||||
unsigned int vcpu_idx);
|
unsigned int vcpu_idx);
|
||||||
|
@ -1061,11 +1061,13 @@ static void handle___pkvm_host_unshare_hyp(struct kvm_cpu_context *host_ctxt)
|
|||||||
cpu_reg(host_ctxt, 1) = __pkvm_host_unshare_hyp(pfn);
|
cpu_reg(host_ctxt, 1) = __pkvm_host_unshare_hyp(pfn);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void handle___pkvm_host_reclaim_page(struct kvm_cpu_context *host_ctxt)
|
static void handle___pkvm_reclaim_dying_guest_page(struct kvm_cpu_context *host_ctxt)
|
||||||
{
|
{
|
||||||
DECLARE_REG(u64, pfn, host_ctxt, 1);
|
DECLARE_REG(pkvm_handle_t, handle, host_ctxt, 1);
|
||||||
|
DECLARE_REG(u64, pfn, host_ctxt, 2);
|
||||||
|
DECLARE_REG(u64, ipa, host_ctxt, 3);
|
||||||
|
|
||||||
cpu_reg(host_ctxt, 1) = __pkvm_host_reclaim_page(pfn);
|
cpu_reg(host_ctxt, 1) = __pkvm_reclaim_dying_guest_page(handle, pfn, ipa);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void handle___pkvm_create_private_mapping(struct kvm_cpu_context *host_ctxt)
|
static void handle___pkvm_create_private_mapping(struct kvm_cpu_context *host_ctxt)
|
||||||
@ -1120,13 +1122,19 @@ static void handle___pkvm_init_vcpu(struct kvm_cpu_context *host_ctxt)
|
|||||||
cpu_reg(host_ctxt, 1) = __pkvm_init_vcpu(handle, host_vcpu, vcpu_hva);
|
cpu_reg(host_ctxt, 1) = __pkvm_init_vcpu(handle, host_vcpu, vcpu_hva);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void handle___pkvm_teardown_vm(struct kvm_cpu_context *host_ctxt)
|
static void handle___pkvm_start_teardown_vm(struct kvm_cpu_context *host_ctxt)
|
||||||
{
|
{
|
||||||
DECLARE_REG(pkvm_handle_t, handle, host_ctxt, 1);
|
DECLARE_REG(pkvm_handle_t, handle, host_ctxt, 1);
|
||||||
|
|
||||||
cpu_reg(host_ctxt, 1) = __pkvm_teardown_vm(handle);
|
cpu_reg(host_ctxt, 1) = __pkvm_start_teardown_vm(handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void handle___pkvm_finalize_teardown_vm(struct kvm_cpu_context *host_ctxt)
|
||||||
|
{
|
||||||
|
DECLARE_REG(pkvm_handle_t, handle, host_ctxt, 1);
|
||||||
|
|
||||||
|
cpu_reg(host_ctxt, 1) = __pkvm_finalize_teardown_vm(handle);
|
||||||
|
}
|
||||||
static void handle___pkvm_iommu_driver_init(struct kvm_cpu_context *host_ctxt)
|
static void handle___pkvm_iommu_driver_init(struct kvm_cpu_context *host_ctxt)
|
||||||
{
|
{
|
||||||
DECLARE_REG(struct pkvm_iommu_driver*, drv, host_ctxt, 1);
|
DECLARE_REG(struct pkvm_iommu_driver*, drv, host_ctxt, 1);
|
||||||
@ -1275,7 +1283,6 @@ static const hcall_t host_hcall[] = {
|
|||||||
|
|
||||||
HANDLE_FUNC(__pkvm_host_share_hyp),
|
HANDLE_FUNC(__pkvm_host_share_hyp),
|
||||||
HANDLE_FUNC(__pkvm_host_unshare_hyp),
|
HANDLE_FUNC(__pkvm_host_unshare_hyp),
|
||||||
HANDLE_FUNC(__pkvm_host_reclaim_page),
|
|
||||||
HANDLE_FUNC(__pkvm_host_map_guest),
|
HANDLE_FUNC(__pkvm_host_map_guest),
|
||||||
HANDLE_FUNC(__kvm_adjust_pc),
|
HANDLE_FUNC(__kvm_adjust_pc),
|
||||||
HANDLE_FUNC(__kvm_vcpu_run),
|
HANDLE_FUNC(__kvm_vcpu_run),
|
||||||
@ -1284,7 +1291,9 @@ static const hcall_t host_hcall[] = {
|
|||||||
HANDLE_FUNC(__vgic_v3_restore_vmcr_aprs),
|
HANDLE_FUNC(__vgic_v3_restore_vmcr_aprs),
|
||||||
HANDLE_FUNC(__pkvm_init_vm),
|
HANDLE_FUNC(__pkvm_init_vm),
|
||||||
HANDLE_FUNC(__pkvm_init_vcpu),
|
HANDLE_FUNC(__pkvm_init_vcpu),
|
||||||
HANDLE_FUNC(__pkvm_teardown_vm),
|
HANDLE_FUNC(__pkvm_start_teardown_vm),
|
||||||
|
HANDLE_FUNC(__pkvm_finalize_teardown_vm),
|
||||||
|
HANDLE_FUNC(__pkvm_reclaim_dying_guest_page),
|
||||||
HANDLE_FUNC(__pkvm_vcpu_load),
|
HANDLE_FUNC(__pkvm_vcpu_load),
|
||||||
HANDLE_FUNC(__pkvm_vcpu_put),
|
HANDLE_FUNC(__pkvm_vcpu_put),
|
||||||
HANDLE_FUNC(__pkvm_vcpu_sync_state),
|
HANDLE_FUNC(__pkvm_vcpu_sync_state),
|
||||||
|
@ -289,61 +289,6 @@ int kvm_guest_prepare_stage2(struct pkvm_hyp_vm *vm, void *pgd)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int reclaim_walker(u64 addr, u64 end, u32 level, kvm_pte_t *ptep,
|
|
||||||
enum kvm_pgtable_walk_flags flag, void * const arg)
|
|
||||||
{
|
|
||||||
kvm_pte_t pte = *ptep;
|
|
||||||
struct hyp_page *page;
|
|
||||||
|
|
||||||
if (!kvm_pte_valid(pte))
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
page = hyp_phys_to_page(kvm_pte_to_phys(pte));
|
|
||||||
switch (pkvm_getstate(kvm_pgtable_stage2_pte_prot(pte))) {
|
|
||||||
case PKVM_PAGE_OWNED:
|
|
||||||
page->flags |= HOST_PAGE_NEED_POISONING;
|
|
||||||
fallthrough;
|
|
||||||
case PKVM_PAGE_SHARED_BORROWED:
|
|
||||||
case PKVM_PAGE_SHARED_OWNED:
|
|
||||||
page->flags |= HOST_PAGE_PENDING_RECLAIM;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
return -EPERM;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void reclaim_guest_pages(struct pkvm_hyp_vm *vm, struct kvm_hyp_memcache *mc)
|
|
||||||
{
|
|
||||||
|
|
||||||
struct kvm_pgtable_walker walker = {
|
|
||||||
.cb = reclaim_walker,
|
|
||||||
.flags = KVM_PGTABLE_WALK_LEAF
|
|
||||||
};
|
|
||||||
void *addr;
|
|
||||||
|
|
||||||
host_lock_component();
|
|
||||||
guest_lock_component(vm);
|
|
||||||
|
|
||||||
/* Reclaim all guest pages and dump all pgtable pages in the hyp_pool */
|
|
||||||
BUG_ON(kvm_pgtable_walk(&vm->pgt, 0, BIT(vm->pgt.ia_bits), &walker));
|
|
||||||
kvm_pgtable_stage2_destroy(&vm->pgt);
|
|
||||||
vm->kvm.arch.mmu.pgd_phys = 0ULL;
|
|
||||||
|
|
||||||
guest_unlock_component(vm);
|
|
||||||
host_unlock_component();
|
|
||||||
|
|
||||||
/* Drain the hyp_pool into the memcache */
|
|
||||||
addr = hyp_alloc_pages(&vm->pool, 0);
|
|
||||||
while (addr) {
|
|
||||||
memset(hyp_virt_to_page(addr), 0, sizeof(struct hyp_page));
|
|
||||||
push_hyp_memcache(mc, addr, hyp_virt_to_phys);
|
|
||||||
WARN_ON(__pkvm_hyp_donate_host(hyp_virt_to_pfn(addr), 1));
|
|
||||||
addr = hyp_alloc_pages(&vm->pool, 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
struct relinquish_data {
|
struct relinquish_data {
|
||||||
enum pkvm_page_state expected_state;
|
enum pkvm_page_state expected_state;
|
||||||
u64 pa;
|
u64 pa;
|
||||||
@ -353,9 +298,9 @@ static int relinquish_walker(u64 addr, u64 end, u32 level, kvm_pte_t *ptep,
|
|||||||
enum kvm_pgtable_walk_flags flag, void * const arg)
|
enum kvm_pgtable_walk_flags flag, void * const arg)
|
||||||
{
|
{
|
||||||
kvm_pte_t pte = *ptep;
|
kvm_pte_t pte = *ptep;
|
||||||
struct hyp_page *page;
|
|
||||||
struct relinquish_data *data = arg;
|
struct relinquish_data *data = arg;
|
||||||
enum pkvm_page_state state;
|
enum pkvm_page_state state;
|
||||||
|
phys_addr_t phys;
|
||||||
|
|
||||||
if (!kvm_pte_valid(pte))
|
if (!kvm_pte_valid(pte))
|
||||||
return 0;
|
return 0;
|
||||||
@ -364,12 +309,13 @@ static int relinquish_walker(u64 addr, u64 end, u32 level, kvm_pte_t *ptep,
|
|||||||
if (state != data->expected_state)
|
if (state != data->expected_state)
|
||||||
return -EPERM;
|
return -EPERM;
|
||||||
|
|
||||||
page = hyp_phys_to_page(kvm_pte_to_phys(pte));
|
phys = kvm_pte_to_phys(pte);
|
||||||
if (state == PKVM_PAGE_OWNED)
|
if (state == PKVM_PAGE_OWNED) {
|
||||||
page->flags |= HOST_PAGE_NEED_POISONING;
|
hyp_poison_page(phys);
|
||||||
page->flags |= HOST_PAGE_PENDING_RECLAIM;
|
psci_mem_protect_dec(1);
|
||||||
|
}
|
||||||
|
|
||||||
data->pa = kvm_pte_to_phys(pte);
|
data->pa = phys;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -397,12 +343,14 @@ int __pkvm_guest_relinquish_to_host(struct pkvm_hyp_vcpu *vcpu,
|
|||||||
/* Set default pa value to "not found". */
|
/* Set default pa value to "not found". */
|
||||||
data.pa = 0;
|
data.pa = 0;
|
||||||
|
|
||||||
/* If ipa is mapped: sets page flags, and gets the pa. */
|
/* If ipa is mapped: poisons the page, and gets the pa. */
|
||||||
ret = kvm_pgtable_walk(&vm->pgt, ipa, PAGE_SIZE, &walker);
|
ret = kvm_pgtable_walk(&vm->pgt, ipa, PAGE_SIZE, &walker);
|
||||||
|
|
||||||
/* Zap the guest stage2 pte. */
|
/* Zap the guest stage2 pte and return ownership to the host */
|
||||||
if (!ret && data.pa)
|
if (!ret && data.pa) {
|
||||||
kvm_pgtable_stage2_unmap(&vm->pgt, ipa, PAGE_SIZE);
|
WARN_ON(host_stage2_set_owner_locked(data.pa, PAGE_SIZE, PKVM_ID_HOST));
|
||||||
|
WARN_ON(kvm_pgtable_stage2_unmap(&vm->pgt, ipa, PAGE_SIZE));
|
||||||
|
}
|
||||||
|
|
||||||
guest_unlock_component(vm);
|
guest_unlock_component(vm);
|
||||||
host_unlock_component();
|
host_unlock_component();
|
||||||
@ -2133,40 +2081,69 @@ void hyp_poison_page(phys_addr_t phys)
|
|||||||
hyp_fixmap_unmap();
|
hyp_fixmap_unmap();
|
||||||
}
|
}
|
||||||
|
|
||||||
int __pkvm_host_reclaim_page(u64 pfn)
|
void destroy_hyp_vm_pgt(struct pkvm_hyp_vm *vm)
|
||||||
{
|
{
|
||||||
u64 addr = hyp_pfn_to_phys(pfn);
|
guest_lock_component(vm);
|
||||||
struct hyp_page *page;
|
kvm_pgtable_stage2_destroy(&vm->pgt);
|
||||||
|
guest_unlock_component(vm);
|
||||||
|
}
|
||||||
|
|
||||||
|
void drain_hyp_pool(struct pkvm_hyp_vm *vm, struct kvm_hyp_memcache *mc)
|
||||||
|
{
|
||||||
|
void *addr = hyp_alloc_pages(&vm->pool, 0);
|
||||||
|
|
||||||
|
while (addr) {
|
||||||
|
memset(hyp_virt_to_page(addr), 0, sizeof(struct hyp_page));
|
||||||
|
push_hyp_memcache(mc, addr, hyp_virt_to_phys);
|
||||||
|
WARN_ON(__pkvm_hyp_donate_host(hyp_virt_to_pfn(addr), 1));
|
||||||
|
addr = hyp_alloc_pages(&vm->pool, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int __pkvm_host_reclaim_page(struct pkvm_hyp_vm *vm, u64 pfn, u64 ipa)
|
||||||
|
{
|
||||||
|
phys_addr_t phys = hyp_pfn_to_phys(pfn);
|
||||||
kvm_pte_t pte;
|
kvm_pte_t pte;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
host_lock_component();
|
host_lock_component();
|
||||||
|
guest_lock_component(vm);
|
||||||
|
|
||||||
ret = kvm_pgtable_get_leaf(&host_mmu.pgt, addr, &pte, NULL);
|
ret = kvm_pgtable_get_leaf(&vm->pgt, ipa, &pte, NULL);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto unlock;
|
goto unlock;
|
||||||
|
|
||||||
if (host_get_page_state(pte, addr) == PKVM_PAGE_OWNED)
|
if (!kvm_pte_valid(pte)) {
|
||||||
|
ret = -EINVAL;
|
||||||
goto unlock;
|
goto unlock;
|
||||||
|
} else if (phys != kvm_pte_to_phys(pte)) {
|
||||||
page = hyp_phys_to_page(addr);
|
|
||||||
if (!(page->flags & HOST_PAGE_PENDING_RECLAIM)) {
|
|
||||||
ret = -EPERM;
|
ret = -EPERM;
|
||||||
goto unlock;
|
goto unlock;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (page->flags & HOST_PAGE_NEED_POISONING) {
|
/* We could avoid TLB inval, it is done per VMID on the finalize path */
|
||||||
hyp_poison_page(addr);
|
WARN_ON(kvm_pgtable_stage2_unmap(&vm->pgt, ipa, PAGE_SIZE));
|
||||||
page->flags &= ~HOST_PAGE_NEED_POISONING;
|
|
||||||
|
switch(guest_get_page_state(pte, ipa)) {
|
||||||
|
case PKVM_PAGE_OWNED:
|
||||||
|
WARN_ON(__host_check_page_state_range(phys, PAGE_SIZE, PKVM_NOPAGE));
|
||||||
|
hyp_poison_page(phys);
|
||||||
psci_mem_protect_dec(1);
|
psci_mem_protect_dec(1);
|
||||||
|
break;
|
||||||
|
case PKVM_PAGE_SHARED_BORROWED:
|
||||||
|
WARN_ON(__host_check_page_state_range(phys, PAGE_SIZE, PKVM_PAGE_SHARED_OWNED));
|
||||||
|
break;
|
||||||
|
case PKVM_PAGE_SHARED_OWNED:
|
||||||
|
WARN_ON(__host_check_page_state_range(phys, PAGE_SIZE, PKVM_PAGE_SHARED_BORROWED));
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
BUG_ON(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = host_stage2_set_owner_locked(addr, PAGE_SIZE, PKVM_ID_HOST);
|
WARN_ON(host_stage2_set_owner_locked(phys, PAGE_SIZE, PKVM_ID_HOST));
|
||||||
if (ret)
|
|
||||||
goto unlock;
|
|
||||||
page->flags &= ~HOST_PAGE_PENDING_RECLAIM;
|
|
||||||
|
|
||||||
unlock:
|
unlock:
|
||||||
|
guest_unlock_component(vm);
|
||||||
host_unlock_component();
|
host_unlock_component();
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -268,6 +268,27 @@ static struct pkvm_hyp_vm *get_vm_by_handle(pkvm_handle_t handle)
|
|||||||
return vm_table[idx];
|
return vm_table[idx];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int __pkvm_reclaim_dying_guest_page(pkvm_handle_t handle, u64 pfn, u64 ipa)
|
||||||
|
{
|
||||||
|
struct pkvm_hyp_vm *hyp_vm;
|
||||||
|
int ret = -EINVAL;
|
||||||
|
|
||||||
|
hyp_spin_lock(&vm_table_lock);
|
||||||
|
hyp_vm = get_vm_by_handle(handle);
|
||||||
|
if (!hyp_vm || !hyp_vm->is_dying)
|
||||||
|
goto unlock;
|
||||||
|
|
||||||
|
ret = __pkvm_host_reclaim_page(hyp_vm, pfn, ipa);
|
||||||
|
if (ret)
|
||||||
|
goto unlock;
|
||||||
|
|
||||||
|
drain_hyp_pool(hyp_vm, &hyp_vm->host_kvm->arch.pkvm.teardown_stage2_mc);
|
||||||
|
unlock:
|
||||||
|
hyp_spin_unlock(&vm_table_lock);
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
struct pkvm_hyp_vcpu *pkvm_load_hyp_vcpu(pkvm_handle_t handle,
|
struct pkvm_hyp_vcpu *pkvm_load_hyp_vcpu(pkvm_handle_t handle,
|
||||||
unsigned int vcpu_idx)
|
unsigned int vcpu_idx)
|
||||||
{
|
{
|
||||||
@ -280,7 +301,7 @@ struct pkvm_hyp_vcpu *pkvm_load_hyp_vcpu(pkvm_handle_t handle,
|
|||||||
|
|
||||||
hyp_spin_lock(&vm_table_lock);
|
hyp_spin_lock(&vm_table_lock);
|
||||||
hyp_vm = get_vm_by_handle(handle);
|
hyp_vm = get_vm_by_handle(handle);
|
||||||
if (!hyp_vm || hyp_vm->nr_vcpus <= vcpu_idx)
|
if (!hyp_vm || hyp_vm->is_dying || hyp_vm->nr_vcpus <= vcpu_idx)
|
||||||
goto unlock;
|
goto unlock;
|
||||||
|
|
||||||
hyp_vcpu = hyp_vm->vcpus[vcpu_idx];
|
hyp_vcpu = hyp_vm->vcpus[vcpu_idx];
|
||||||
@ -796,7 +817,33 @@ teardown_donated_memory(struct kvm_hyp_memcache *mc, void *addr, size_t size)
|
|||||||
unmap_donated_memory_noclear(addr, size);
|
unmap_donated_memory_noclear(addr, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
int __pkvm_teardown_vm(pkvm_handle_t handle)
|
int __pkvm_start_teardown_vm(pkvm_handle_t handle)
|
||||||
|
{
|
||||||
|
struct pkvm_hyp_vm *hyp_vm;
|
||||||
|
int ret = 0;
|
||||||
|
|
||||||
|
hyp_spin_lock(&vm_table_lock);
|
||||||
|
hyp_vm = get_vm_by_handle(handle);
|
||||||
|
if (!hyp_vm) {
|
||||||
|
ret = -ENOENT;
|
||||||
|
goto unlock;
|
||||||
|
} else if (WARN_ON(hyp_page_count(hyp_vm))) {
|
||||||
|
ret = -EBUSY;
|
||||||
|
goto unlock;
|
||||||
|
} else if (hyp_vm->is_dying) {
|
||||||
|
ret = -EINVAL;
|
||||||
|
goto unlock;
|
||||||
|
}
|
||||||
|
|
||||||
|
hyp_vm->is_dying = true;
|
||||||
|
|
||||||
|
unlock:
|
||||||
|
hyp_spin_unlock(&vm_table_lock);
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
int __pkvm_finalize_teardown_vm(pkvm_handle_t handle)
|
||||||
{
|
{
|
||||||
struct kvm_hyp_memcache *mc, *stage2_mc;
|
struct kvm_hyp_memcache *mc, *stage2_mc;
|
||||||
size_t vm_size, last_ran_size;
|
size_t vm_size, last_ran_size;
|
||||||
@ -811,9 +858,7 @@ int __pkvm_teardown_vm(pkvm_handle_t handle)
|
|||||||
if (!hyp_vm) {
|
if (!hyp_vm) {
|
||||||
err = -ENOENT;
|
err = -ENOENT;
|
||||||
goto err_unlock;
|
goto err_unlock;
|
||||||
}
|
} else if (!hyp_vm->is_dying) {
|
||||||
|
|
||||||
if (WARN_ON(hyp_page_count(hyp_vm))) {
|
|
||||||
err = -EBUSY;
|
err = -EBUSY;
|
||||||
goto err_unlock;
|
goto err_unlock;
|
||||||
}
|
}
|
||||||
@ -828,8 +873,8 @@ int __pkvm_teardown_vm(pkvm_handle_t handle)
|
|||||||
mc = &host_kvm->arch.pkvm.teardown_mc;
|
mc = &host_kvm->arch.pkvm.teardown_mc;
|
||||||
stage2_mc = &host_kvm->arch.pkvm.teardown_stage2_mc;
|
stage2_mc = &host_kvm->arch.pkvm.teardown_stage2_mc;
|
||||||
|
|
||||||
/* Reclaim guest pages (including page-table pages) */
|
destroy_hyp_vm_pgt(hyp_vm);
|
||||||
reclaim_guest_pages(hyp_vm, stage2_mc);
|
drain_hyp_pool(hyp_vm, stage2_mc);
|
||||||
unpin_host_vcpus(hyp_vm->vcpus, hyp_vm->nr_vcpus);
|
unpin_host_vcpus(hyp_vm->vcpus, hyp_vm->nr_vcpus);
|
||||||
|
|
||||||
/* Push the metadata pages to the teardown memcache */
|
/* Push the metadata pages to the teardown memcache */
|
||||||
|
@ -991,7 +991,8 @@ static int stage2_unmap_walker(u64 addr, u64 end, u32 level, kvm_pte_t *ptep,
|
|||||||
* block entry and rely on the remaining portions being faulted
|
* block entry and rely on the remaining portions being faulted
|
||||||
* back lazily.
|
* back lazily.
|
||||||
*/
|
*/
|
||||||
stage2_put_pte(ptep, mmu, addr, level, mm_ops);
|
if (pte_ops->pte_is_counted_cb(pte, level))
|
||||||
|
stage2_put_pte(ptep, mmu, addr, level, mm_ops);
|
||||||
|
|
||||||
if (need_flush && mm_ops->dcache_clean_inval_poc)
|
if (need_flush && mm_ops->dcache_clean_inval_poc)
|
||||||
mm_ops->dcache_clean_inval_poc(kvm_pte_follow(pte, mm_ops),
|
mm_ops->dcache_clean_inval_poc(kvm_pte_follow(pte, mm_ops),
|
||||||
|
@ -315,21 +315,18 @@ void pkvm_destroy_hyp_vm(struct kvm *host_kvm)
|
|||||||
struct mm_struct *mm = current->mm;
|
struct mm_struct *mm = current->mm;
|
||||||
struct rb_node *node;
|
struct rb_node *node;
|
||||||
|
|
||||||
if (host_kvm->arch.pkvm.handle) {
|
if (!host_kvm->arch.pkvm.handle)
|
||||||
WARN_ON(kvm_call_hyp_nvhe(__pkvm_teardown_vm,
|
goto out_free;
|
||||||
host_kvm->arch.pkvm.handle));
|
|
||||||
}
|
|
||||||
|
|
||||||
host_kvm->arch.pkvm.handle = 0;
|
WARN_ON(kvm_call_hyp_nvhe(__pkvm_start_teardown_vm, host_kvm->arch.pkvm.handle));
|
||||||
free_hyp_memcache(&host_kvm->arch.pkvm.teardown_mc, host_kvm);
|
|
||||||
free_hyp_stage2_memcache(&host_kvm->arch.pkvm.teardown_stage2_mc,
|
|
||||||
host_kvm);
|
|
||||||
|
|
||||||
node = rb_first(&host_kvm->arch.pkvm.pinned_pages);
|
node = rb_first(&host_kvm->arch.pkvm.pinned_pages);
|
||||||
while (node) {
|
while (node) {
|
||||||
ppage = rb_entry(node, struct kvm_pinned_page, node);
|
ppage = rb_entry(node, struct kvm_pinned_page, node);
|
||||||
WARN_ON(kvm_call_hyp_nvhe(__pkvm_host_reclaim_page,
|
WARN_ON(kvm_call_hyp_nvhe(__pkvm_reclaim_dying_guest_page,
|
||||||
page_to_pfn(ppage->page)));
|
host_kvm->arch.pkvm.handle,
|
||||||
|
page_to_pfn(ppage->page),
|
||||||
|
ppage->ipa));
|
||||||
cond_resched();
|
cond_resched();
|
||||||
|
|
||||||
account_locked_vm(mm, 1, false);
|
account_locked_vm(mm, 1, false);
|
||||||
@ -338,6 +335,14 @@ void pkvm_destroy_hyp_vm(struct kvm *host_kvm)
|
|||||||
rb_erase(&ppage->node, &host_kvm->arch.pkvm.pinned_pages);
|
rb_erase(&ppage->node, &host_kvm->arch.pkvm.pinned_pages);
|
||||||
kfree(ppage);
|
kfree(ppage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
WARN_ON(kvm_call_hyp_nvhe(__pkvm_finalize_teardown_vm, host_kvm->arch.pkvm.handle));
|
||||||
|
|
||||||
|
out_free:
|
||||||
|
host_kvm->arch.pkvm.handle = 0;
|
||||||
|
free_hyp_memcache(&host_kvm->arch.pkvm.teardown_mc, host_kvm);
|
||||||
|
free_hyp_stage2_memcache(&host_kvm->arch.pkvm.teardown_stage2_mc,
|
||||||
|
host_kvm);
|
||||||
}
|
}
|
||||||
|
|
||||||
int pkvm_init_host_vm(struct kvm *host_kvm, unsigned long type)
|
int pkvm_init_host_vm(struct kvm *host_kvm, unsigned long type)
|
||||||
@ -381,10 +386,6 @@ void pkvm_host_reclaim_page(struct kvm *host_kvm, phys_addr_t ipa)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
ppage = container_of(node, struct kvm_pinned_page, node);
|
ppage = container_of(node, struct kvm_pinned_page, node);
|
||||||
|
|
||||||
WARN_ON(kvm_call_hyp_nvhe(__pkvm_host_reclaim_page,
|
|
||||||
page_to_pfn(ppage->page)));
|
|
||||||
|
|
||||||
account_locked_vm(mm, 1, false);
|
account_locked_vm(mm, 1, false);
|
||||||
unpin_user_pages_dirty_lock(&ppage->page, 1, true);
|
unpin_user_pages_dirty_lock(&ppage->page, 1, true);
|
||||||
kfree(ppage);
|
kfree(ppage);
|
||||||
|
@ -170,6 +170,9 @@ ia64_mremap (unsigned long addr, unsigned long old_len, unsigned long new_len, u
|
|||||||
asmlinkage long
|
asmlinkage long
|
||||||
ia64_clock_getres(const clockid_t which_clock, struct __kernel_timespec __user *tp)
|
ia64_clock_getres(const clockid_t which_clock, struct __kernel_timespec __user *tp)
|
||||||
{
|
{
|
||||||
|
struct timespec64 rtn_tp;
|
||||||
|
s64 tick_ns;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ia64's clock_gettime() syscall is implemented as a vdso call
|
* ia64's clock_gettime() syscall is implemented as a vdso call
|
||||||
* fsys_clock_gettime(). Currently it handles only
|
* fsys_clock_gettime(). Currently it handles only
|
||||||
@ -185,8 +188,8 @@ ia64_clock_getres(const clockid_t which_clock, struct __kernel_timespec __user *
|
|||||||
switch (which_clock) {
|
switch (which_clock) {
|
||||||
case CLOCK_REALTIME:
|
case CLOCK_REALTIME:
|
||||||
case CLOCK_MONOTONIC:
|
case CLOCK_MONOTONIC:
|
||||||
s64 tick_ns = DIV_ROUND_UP(NSEC_PER_SEC, local_cpu_data->itc_freq);
|
tick_ns = DIV_ROUND_UP(NSEC_PER_SEC, local_cpu_data->itc_freq);
|
||||||
struct timespec64 rtn_tp = ns_to_timespec64(tick_ns);
|
rtn_tp = ns_to_timespec64(tick_ns);
|
||||||
return put_timespec64(&rtn_tp, tp);
|
return put_timespec64(&rtn_tp, tp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -185,20 +185,14 @@ int copy_thread(struct task_struct *p, const struct kernel_clone_args *args)
|
|||||||
|
|
||||||
unsigned long __get_wchan(struct task_struct *task)
|
unsigned long __get_wchan(struct task_struct *task)
|
||||||
{
|
{
|
||||||
unsigned long pc;
|
unsigned long pc = 0;
|
||||||
struct unwind_state state;
|
struct unwind_state state;
|
||||||
|
|
||||||
if (!try_get_task_stack(task))
|
if (!try_get_task_stack(task))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
unwind_start(&state, task, NULL);
|
for (unwind_start(&state, task, NULL);
|
||||||
state.sp = thread_saved_fp(task);
|
!unwind_done(&state); unwind_next_frame(&state)) {
|
||||||
get_stack_info(state.sp, state.task, &state.stack_info);
|
|
||||||
state.pc = thread_saved_ra(task);
|
|
||||||
#ifdef CONFIG_UNWINDER_PROLOGUE
|
|
||||||
state.type = UNWINDER_PROLOGUE;
|
|
||||||
#endif
|
|
||||||
for (; !unwind_done(&state); unwind_next_frame(&state)) {
|
|
||||||
pc = unwind_get_return_address(&state);
|
pc = unwind_get_return_address(&state);
|
||||||
if (!pc)
|
if (!pc)
|
||||||
break;
|
break;
|
||||||
|
@ -25,6 +25,12 @@ void unwind_start(struct unwind_state *state, struct task_struct *task,
|
|||||||
if (regs) {
|
if (regs) {
|
||||||
state->sp = regs->regs[3];
|
state->sp = regs->regs[3];
|
||||||
state->pc = regs->csr_era;
|
state->pc = regs->csr_era;
|
||||||
|
} else if (task && task != current) {
|
||||||
|
state->sp = thread_saved_fp(task);
|
||||||
|
state->pc = thread_saved_ra(task);
|
||||||
|
} else {
|
||||||
|
state->sp = (unsigned long)__builtin_frame_address(0);
|
||||||
|
state->pc = (unsigned long)__builtin_return_address(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
state->task = task;
|
state->task = task;
|
||||||
|
@ -111,12 +111,22 @@ void unwind_start(struct unwind_state *state, struct task_struct *task,
|
|||||||
struct pt_regs *regs)
|
struct pt_regs *regs)
|
||||||
{
|
{
|
||||||
memset(state, 0, sizeof(*state));
|
memset(state, 0, sizeof(*state));
|
||||||
|
state->type = UNWINDER_PROLOGUE;
|
||||||
|
|
||||||
if (regs && __kernel_text_address(regs->csr_era)) {
|
if (regs) {
|
||||||
state->pc = regs->csr_era;
|
|
||||||
state->sp = regs->regs[3];
|
state->sp = regs->regs[3];
|
||||||
|
state->pc = regs->csr_era;
|
||||||
state->ra = regs->regs[1];
|
state->ra = regs->regs[1];
|
||||||
state->type = UNWINDER_PROLOGUE;
|
if (!__kernel_text_address(state->pc))
|
||||||
|
state->type = UNWINDER_GUESS;
|
||||||
|
} else if (task && task != current) {
|
||||||
|
state->sp = thread_saved_fp(task);
|
||||||
|
state->pc = thread_saved_ra(task);
|
||||||
|
state->ra = 0;
|
||||||
|
} else {
|
||||||
|
state->sp = (unsigned long)__builtin_frame_address(0);
|
||||||
|
state->pc = (unsigned long)__builtin_return_address(0);
|
||||||
|
state->ra = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
state->task = task;
|
state->task = task;
|
||||||
|
@ -1303,7 +1303,7 @@ static char iodc_dbuf[4096] __page_aligned_bss;
|
|||||||
*/
|
*/
|
||||||
int pdc_iodc_print(const unsigned char *str, unsigned count)
|
int pdc_iodc_print(const unsigned char *str, unsigned count)
|
||||||
{
|
{
|
||||||
unsigned int i;
|
unsigned int i, found = 0;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
|
||||||
count = min_t(unsigned int, count, sizeof(iodc_dbuf));
|
count = min_t(unsigned int, count, sizeof(iodc_dbuf));
|
||||||
@ -1315,6 +1315,7 @@ int pdc_iodc_print(const unsigned char *str, unsigned count)
|
|||||||
iodc_dbuf[i+0] = '\r';
|
iodc_dbuf[i+0] = '\r';
|
||||||
iodc_dbuf[i+1] = '\n';
|
iodc_dbuf[i+1] = '\n';
|
||||||
i += 2;
|
i += 2;
|
||||||
|
found = 1;
|
||||||
goto print;
|
goto print;
|
||||||
default:
|
default:
|
||||||
iodc_dbuf[i] = str[i];
|
iodc_dbuf[i] = str[i];
|
||||||
@ -1330,7 +1331,7 @@ int pdc_iodc_print(const unsigned char *str, unsigned count)
|
|||||||
__pa(pdc_result), 0, __pa(iodc_dbuf), i, 0);
|
__pa(pdc_result), 0, __pa(iodc_dbuf), i, 0);
|
||||||
spin_unlock_irqrestore(&pdc_lock, flags);
|
spin_unlock_irqrestore(&pdc_lock, flags);
|
||||||
|
|
||||||
return i;
|
return i - found;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(BOOTLOADER)
|
#if !defined(BOOTLOADER)
|
||||||
|
@ -126,6 +126,12 @@ long arch_ptrace(struct task_struct *child, long request,
|
|||||||
unsigned long tmp;
|
unsigned long tmp;
|
||||||
long ret = -EIO;
|
long ret = -EIO;
|
||||||
|
|
||||||
|
unsigned long user_regs_struct_size = sizeof(struct user_regs_struct);
|
||||||
|
#ifdef CONFIG_64BIT
|
||||||
|
if (is_compat_task())
|
||||||
|
user_regs_struct_size /= 2;
|
||||||
|
#endif
|
||||||
|
|
||||||
switch (request) {
|
switch (request) {
|
||||||
|
|
||||||
/* Read the word at location addr in the USER area. For ptraced
|
/* Read the word at location addr in the USER area. For ptraced
|
||||||
@ -166,7 +172,7 @@ long arch_ptrace(struct task_struct *child, long request,
|
|||||||
addr >= sizeof(struct pt_regs))
|
addr >= sizeof(struct pt_regs))
|
||||||
break;
|
break;
|
||||||
if (addr == PT_IAOQ0 || addr == PT_IAOQ1) {
|
if (addr == PT_IAOQ0 || addr == PT_IAOQ1) {
|
||||||
data |= 3; /* ensure userspace privilege */
|
data |= PRIV_USER; /* ensure userspace privilege */
|
||||||
}
|
}
|
||||||
if ((addr >= PT_GR1 && addr <= PT_GR31) ||
|
if ((addr >= PT_GR1 && addr <= PT_GR31) ||
|
||||||
addr == PT_IAOQ0 || addr == PT_IAOQ1 ||
|
addr == PT_IAOQ0 || addr == PT_IAOQ1 ||
|
||||||
@ -181,14 +187,14 @@ long arch_ptrace(struct task_struct *child, long request,
|
|||||||
return copy_regset_to_user(child,
|
return copy_regset_to_user(child,
|
||||||
task_user_regset_view(current),
|
task_user_regset_view(current),
|
||||||
REGSET_GENERAL,
|
REGSET_GENERAL,
|
||||||
0, sizeof(struct user_regs_struct),
|
0, user_regs_struct_size,
|
||||||
datap);
|
datap);
|
||||||
|
|
||||||
case PTRACE_SETREGS: /* Set all gp regs in the child. */
|
case PTRACE_SETREGS: /* Set all gp regs in the child. */
|
||||||
return copy_regset_from_user(child,
|
return copy_regset_from_user(child,
|
||||||
task_user_regset_view(current),
|
task_user_regset_view(current),
|
||||||
REGSET_GENERAL,
|
REGSET_GENERAL,
|
||||||
0, sizeof(struct user_regs_struct),
|
0, user_regs_struct_size,
|
||||||
datap);
|
datap);
|
||||||
|
|
||||||
case PTRACE_GETFPREGS: /* Get the child FPU state. */
|
case PTRACE_GETFPREGS: /* Get the child FPU state. */
|
||||||
@ -285,7 +291,7 @@ long compat_arch_ptrace(struct task_struct *child, compat_long_t request,
|
|||||||
if (addr >= sizeof(struct pt_regs))
|
if (addr >= sizeof(struct pt_regs))
|
||||||
break;
|
break;
|
||||||
if (addr == PT_IAOQ0+4 || addr == PT_IAOQ1+4) {
|
if (addr == PT_IAOQ0+4 || addr == PT_IAOQ1+4) {
|
||||||
data |= 3; /* ensure userspace privilege */
|
data |= PRIV_USER; /* ensure userspace privilege */
|
||||||
}
|
}
|
||||||
if (addr >= PT_FR0 && addr <= PT_FR31 + 4) {
|
if (addr >= PT_FR0 && addr <= PT_FR31 + 4) {
|
||||||
/* Special case, fp regs are 64 bits anyway */
|
/* Special case, fp regs are 64 bits anyway */
|
||||||
@ -302,6 +308,11 @@ long compat_arch_ptrace(struct task_struct *child, compat_long_t request,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case PTRACE_GETREGS:
|
||||||
|
case PTRACE_SETREGS:
|
||||||
|
case PTRACE_GETFPREGS:
|
||||||
|
case PTRACE_SETFPREGS:
|
||||||
|
return arch_ptrace(child, request, addr, data);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
ret = compat_ptrace_request(child, request, addr, data);
|
ret = compat_ptrace_request(child, request, addr, data);
|
||||||
@ -483,7 +494,7 @@ static void set_reg(struct pt_regs *regs, int num, unsigned long val)
|
|||||||
case RI(iaoq[0]):
|
case RI(iaoq[0]):
|
||||||
case RI(iaoq[1]):
|
case RI(iaoq[1]):
|
||||||
/* set 2 lowest bits to ensure userspace privilege: */
|
/* set 2 lowest bits to ensure userspace privilege: */
|
||||||
regs->iaoq[num - RI(iaoq[0])] = val | 3;
|
regs->iaoq[num - RI(iaoq[0])] = val | PRIV_USER;
|
||||||
return;
|
return;
|
||||||
case RI(sar): regs->sar = val;
|
case RI(sar): regs->sar = val;
|
||||||
return;
|
return;
|
||||||
|
@ -192,7 +192,7 @@ static inline void arch_local_irq_enable(void)
|
|||||||
|
|
||||||
static inline unsigned long arch_local_irq_save(void)
|
static inline unsigned long arch_local_irq_save(void)
|
||||||
{
|
{
|
||||||
return irq_soft_mask_set_return(IRQS_DISABLED);
|
return irq_soft_mask_or_return(IRQS_DISABLED);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline bool arch_irqs_disabled_flags(unsigned long flags)
|
static inline bool arch_irqs_disabled_flags(unsigned long flags)
|
||||||
|
@ -262,6 +262,17 @@ print_mapping(unsigned long start, unsigned long end, unsigned long size, bool e
|
|||||||
static unsigned long next_boundary(unsigned long addr, unsigned long end)
|
static unsigned long next_boundary(unsigned long addr, unsigned long end)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_STRICT_KERNEL_RWX
|
#ifdef CONFIG_STRICT_KERNEL_RWX
|
||||||
|
unsigned long stext_phys;
|
||||||
|
|
||||||
|
stext_phys = __pa_symbol(_stext);
|
||||||
|
|
||||||
|
// Relocatable kernel running at non-zero real address
|
||||||
|
if (stext_phys != 0) {
|
||||||
|
// Start of relocated kernel text is a rodata boundary
|
||||||
|
if (addr < stext_phys)
|
||||||
|
return stext_phys;
|
||||||
|
}
|
||||||
|
|
||||||
if (addr < __pa_symbol(__srwx_boundary))
|
if (addr < __pa_symbol(__srwx_boundary))
|
||||||
return __pa_symbol(__srwx_boundary);
|
return __pa_symbol(__srwx_boundary);
|
||||||
#endif
|
#endif
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
* Used to avoid races in counting the nest-pmu units during hotplug
|
* Used to avoid races in counting the nest-pmu units during hotplug
|
||||||
* register and unregister
|
* register and unregister
|
||||||
*/
|
*/
|
||||||
static DEFINE_SPINLOCK(nest_init_lock);
|
static DEFINE_MUTEX(nest_init_lock);
|
||||||
static DEFINE_PER_CPU(struct imc_pmu_ref *, local_nest_imc_refc);
|
static DEFINE_PER_CPU(struct imc_pmu_ref *, local_nest_imc_refc);
|
||||||
static struct imc_pmu **per_nest_pmu_arr;
|
static struct imc_pmu **per_nest_pmu_arr;
|
||||||
static cpumask_t nest_imc_cpumask;
|
static cpumask_t nest_imc_cpumask;
|
||||||
@ -1629,7 +1629,7 @@ static void imc_common_mem_free(struct imc_pmu *pmu_ptr)
|
|||||||
static void imc_common_cpuhp_mem_free(struct imc_pmu *pmu_ptr)
|
static void imc_common_cpuhp_mem_free(struct imc_pmu *pmu_ptr)
|
||||||
{
|
{
|
||||||
if (pmu_ptr->domain == IMC_DOMAIN_NEST) {
|
if (pmu_ptr->domain == IMC_DOMAIN_NEST) {
|
||||||
spin_lock(&nest_init_lock);
|
mutex_lock(&nest_init_lock);
|
||||||
if (nest_pmus == 1) {
|
if (nest_pmus == 1) {
|
||||||
cpuhp_remove_state(CPUHP_AP_PERF_POWERPC_NEST_IMC_ONLINE);
|
cpuhp_remove_state(CPUHP_AP_PERF_POWERPC_NEST_IMC_ONLINE);
|
||||||
kfree(nest_imc_refc);
|
kfree(nest_imc_refc);
|
||||||
@ -1639,7 +1639,7 @@ static void imc_common_cpuhp_mem_free(struct imc_pmu *pmu_ptr)
|
|||||||
|
|
||||||
if (nest_pmus > 0)
|
if (nest_pmus > 0)
|
||||||
nest_pmus--;
|
nest_pmus--;
|
||||||
spin_unlock(&nest_init_lock);
|
mutex_unlock(&nest_init_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Free core_imc memory */
|
/* Free core_imc memory */
|
||||||
@ -1796,11 +1796,11 @@ int init_imc_pmu(struct device_node *parent, struct imc_pmu *pmu_ptr, int pmu_id
|
|||||||
* rest. To handle the cpuhotplug callback unregister, we track
|
* rest. To handle the cpuhotplug callback unregister, we track
|
||||||
* the number of nest pmus in "nest_pmus".
|
* the number of nest pmus in "nest_pmus".
|
||||||
*/
|
*/
|
||||||
spin_lock(&nest_init_lock);
|
mutex_lock(&nest_init_lock);
|
||||||
if (nest_pmus == 0) {
|
if (nest_pmus == 0) {
|
||||||
ret = init_nest_pmu_ref();
|
ret = init_nest_pmu_ref();
|
||||||
if (ret) {
|
if (ret) {
|
||||||
spin_unlock(&nest_init_lock);
|
mutex_unlock(&nest_init_lock);
|
||||||
kfree(per_nest_pmu_arr);
|
kfree(per_nest_pmu_arr);
|
||||||
per_nest_pmu_arr = NULL;
|
per_nest_pmu_arr = NULL;
|
||||||
goto err_free_mem;
|
goto err_free_mem;
|
||||||
@ -1808,7 +1808,7 @@ int init_imc_pmu(struct device_node *parent, struct imc_pmu *pmu_ptr, int pmu_id
|
|||||||
/* Register for cpu hotplug notification. */
|
/* Register for cpu hotplug notification. */
|
||||||
ret = nest_pmu_cpumask_init();
|
ret = nest_pmu_cpumask_init();
|
||||||
if (ret) {
|
if (ret) {
|
||||||
spin_unlock(&nest_init_lock);
|
mutex_unlock(&nest_init_lock);
|
||||||
kfree(nest_imc_refc);
|
kfree(nest_imc_refc);
|
||||||
kfree(per_nest_pmu_arr);
|
kfree(per_nest_pmu_arr);
|
||||||
per_nest_pmu_arr = NULL;
|
per_nest_pmu_arr = NULL;
|
||||||
@ -1816,7 +1816,7 @@ int init_imc_pmu(struct device_node *parent, struct imc_pmu *pmu_ptr, int pmu_id
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
nest_pmus++;
|
nest_pmus++;
|
||||||
spin_unlock(&nest_init_lock);
|
mutex_unlock(&nest_init_lock);
|
||||||
break;
|
break;
|
||||||
case IMC_DOMAIN_CORE:
|
case IMC_DOMAIN_CORE:
|
||||||
ret = core_imc_pmu_cpumask_init();
|
ret = core_imc_pmu_cpumask_init();
|
||||||
|
@ -80,6 +80,9 @@ ifeq ($(CONFIG_PERF_EVENTS),y)
|
|||||||
KBUILD_CFLAGS += -fno-omit-frame-pointer
|
KBUILD_CFLAGS += -fno-omit-frame-pointer
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# Avoid generating .eh_frame sections.
|
||||||
|
KBUILD_CFLAGS += -fno-asynchronous-unwind-tables -fno-unwind-tables
|
||||||
|
|
||||||
KBUILD_CFLAGS_MODULE += $(call cc-option,-mno-relax)
|
KBUILD_CFLAGS_MODULE += $(call cc-option,-mno-relax)
|
||||||
KBUILD_AFLAGS_MODULE += $(call as-option,-Wa$(comma)-mno-relax)
|
KBUILD_AFLAGS_MODULE += $(call as-option,-Wa$(comma)-mno-relax)
|
||||||
|
|
||||||
|
@ -48,6 +48,21 @@ static void __kprobes arch_simulate_insn(struct kprobe *p, struct pt_regs *regs)
|
|||||||
post_kprobe_handler(p, kcb, regs);
|
post_kprobe_handler(p, kcb, regs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool __kprobes arch_check_kprobe(struct kprobe *p)
|
||||||
|
{
|
||||||
|
unsigned long tmp = (unsigned long)p->addr - p->offset;
|
||||||
|
unsigned long addr = (unsigned long)p->addr;
|
||||||
|
|
||||||
|
while (tmp <= addr) {
|
||||||
|
if (tmp == addr)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
tmp += GET_INSN_LENGTH(*(u16 *)tmp);
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
int __kprobes arch_prepare_kprobe(struct kprobe *p)
|
int __kprobes arch_prepare_kprobe(struct kprobe *p)
|
||||||
{
|
{
|
||||||
unsigned long probe_addr = (unsigned long)p->addr;
|
unsigned long probe_addr = (unsigned long)p->addr;
|
||||||
@ -55,6 +70,9 @@ int __kprobes arch_prepare_kprobe(struct kprobe *p)
|
|||||||
if (probe_addr & 0x1)
|
if (probe_addr & 0x1)
|
||||||
return -EILSEQ;
|
return -EILSEQ;
|
||||||
|
|
||||||
|
if (!arch_check_kprobe(p))
|
||||||
|
return -EILSEQ;
|
||||||
|
|
||||||
/* copy instruction */
|
/* copy instruction */
|
||||||
p->opcode = *p->addr;
|
p->opcode = *p->addr;
|
||||||
|
|
||||||
|
@ -153,7 +153,7 @@ int copy_oldmem_kernel(void *dst, unsigned long src, size_t count)
|
|||||||
|
|
||||||
kvec.iov_base = dst;
|
kvec.iov_base = dst;
|
||||||
kvec.iov_len = count;
|
kvec.iov_len = count;
|
||||||
iov_iter_kvec(&iter, WRITE, &kvec, 1, count);
|
iov_iter_kvec(&iter, ITER_DEST, &kvec, 1, count);
|
||||||
if (copy_oldmem_iter(&iter, src, count) < count)
|
if (copy_oldmem_iter(&iter, src, count) < count)
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -507,6 +507,7 @@ static void __init setup_lowcore_dat_on(void)
|
|||||||
{
|
{
|
||||||
struct lowcore *abs_lc;
|
struct lowcore *abs_lc;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
int i;
|
||||||
|
|
||||||
__ctl_clear_bit(0, 28);
|
__ctl_clear_bit(0, 28);
|
||||||
S390_lowcore.external_new_psw.mask |= PSW_MASK_DAT;
|
S390_lowcore.external_new_psw.mask |= PSW_MASK_DAT;
|
||||||
@ -521,8 +522,8 @@ static void __init setup_lowcore_dat_on(void)
|
|||||||
abs_lc = get_abs_lowcore(&flags);
|
abs_lc = get_abs_lowcore(&flags);
|
||||||
abs_lc->restart_flags = RESTART_FLAG_CTLREGS;
|
abs_lc->restart_flags = RESTART_FLAG_CTLREGS;
|
||||||
abs_lc->program_new_psw = S390_lowcore.program_new_psw;
|
abs_lc->program_new_psw = S390_lowcore.program_new_psw;
|
||||||
memcpy(abs_lc->cregs_save_area, S390_lowcore.cregs_save_area,
|
for (i = 0; i < 16; i++)
|
||||||
sizeof(abs_lc->cregs_save_area));
|
abs_lc->cregs_save_area[i] = S390_lowcore.cregs_save_area[i];
|
||||||
put_abs_lowcore(abs_lc, flags);
|
put_abs_lowcore(abs_lc, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -128,7 +128,7 @@ int memcpy_real(void *dest, unsigned long src, size_t count)
|
|||||||
|
|
||||||
kvec.iov_base = dest;
|
kvec.iov_base = dest;
|
||||||
kvec.iov_len = count;
|
kvec.iov_len = count;
|
||||||
iov_iter_kvec(&iter, WRITE, &kvec, 1, count);
|
iov_iter_kvec(&iter, ITER_DEST, &kvec, 1, count);
|
||||||
if (memcpy_real_iter(&iter, src, count) < count)
|
if (memcpy_real_iter(&iter, src, count) < count)
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -14,13 +14,13 @@ endif
|
|||||||
|
|
||||||
ifdef CONFIG_CC_IS_GCC
|
ifdef CONFIG_CC_IS_GCC
|
||||||
RETPOLINE_CFLAGS := $(call cc-option,-mindirect-branch=thunk-extern -mindirect-branch-register)
|
RETPOLINE_CFLAGS := $(call cc-option,-mindirect-branch=thunk-extern -mindirect-branch-register)
|
||||||
RETPOLINE_CFLAGS += $(call cc-option,-mindirect-branch-cs-prefix)
|
|
||||||
RETPOLINE_VDSO_CFLAGS := $(call cc-option,-mindirect-branch=thunk-inline -mindirect-branch-register)
|
RETPOLINE_VDSO_CFLAGS := $(call cc-option,-mindirect-branch=thunk-inline -mindirect-branch-register)
|
||||||
endif
|
endif
|
||||||
ifdef CONFIG_CC_IS_CLANG
|
ifdef CONFIG_CC_IS_CLANG
|
||||||
RETPOLINE_CFLAGS := -mretpoline-external-thunk
|
RETPOLINE_CFLAGS := -mretpoline-external-thunk
|
||||||
RETPOLINE_VDSO_CFLAGS := -mretpoline
|
RETPOLINE_VDSO_CFLAGS := -mretpoline
|
||||||
endif
|
endif
|
||||||
|
RETPOLINE_CFLAGS += $(call cc-option,-mindirect-branch-cs-prefix)
|
||||||
|
|
||||||
ifdef CONFIG_RETHUNK
|
ifdef CONFIG_RETHUNK
|
||||||
RETHUNK_CFLAGS := -mfunction-return=thunk-extern
|
RETHUNK_CFLAGS := -mfunction-return=thunk-extern
|
||||||
|
@ -86,6 +86,7 @@ CONFIG_MODVERSIONS=y
|
|||||||
CONFIG_MODULE_SIG=y
|
CONFIG_MODULE_SIG=y
|
||||||
CONFIG_MODULE_SIG_PROTECT=y
|
CONFIG_MODULE_SIG_PROTECT=y
|
||||||
CONFIG_BLK_DEV_ZONED=y
|
CONFIG_BLK_DEV_ZONED=y
|
||||||
|
CONFIG_BLK_DEV_THROTTLING=y
|
||||||
CONFIG_BLK_INLINE_ENCRYPTION=y
|
CONFIG_BLK_INLINE_ENCRYPTION=y
|
||||||
CONFIG_BLK_INLINE_ENCRYPTION_FALLBACK=y
|
CONFIG_BLK_INLINE_ENCRYPTION_FALLBACK=y
|
||||||
CONFIG_IOSCHED_BFQ=y
|
CONFIG_IOSCHED_BFQ=y
|
||||||
@ -290,6 +291,7 @@ CONFIG_BLK_DEV_LOOP=y
|
|||||||
CONFIG_BLK_DEV_LOOP_MIN_COUNT=16
|
CONFIG_BLK_DEV_LOOP_MIN_COUNT=16
|
||||||
CONFIG_BLK_DEV_RAM=y
|
CONFIG_BLK_DEV_RAM=y
|
||||||
CONFIG_BLK_DEV_RAM_SIZE=8192
|
CONFIG_BLK_DEV_RAM_SIZE=8192
|
||||||
|
CONFIG_BLK_DEV_UBLK=y
|
||||||
CONFIG_SRAM=y
|
CONFIG_SRAM=y
|
||||||
CONFIG_SCSI=y
|
CONFIG_SCSI=y
|
||||||
# CONFIG_SCSI_PROC_FS is not set
|
# CONFIG_SCSI_PROC_FS is not set
|
||||||
|
@ -6342,6 +6342,7 @@ __init int intel_pmu_init(void)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case INTEL_FAM6_SAPPHIRERAPIDS_X:
|
case INTEL_FAM6_SAPPHIRERAPIDS_X:
|
||||||
|
case INTEL_FAM6_EMERALDRAPIDS_X:
|
||||||
pmem = true;
|
pmem = true;
|
||||||
x86_pmu.late_ack = true;
|
x86_pmu.late_ack = true;
|
||||||
memcpy(hw_cache_event_ids, spr_hw_cache_event_ids, sizeof(hw_cache_event_ids));
|
memcpy(hw_cache_event_ids, spr_hw_cache_event_ids, sizeof(hw_cache_event_ids));
|
||||||
|
@ -677,6 +677,7 @@ static const struct x86_cpu_id intel_cstates_match[] __initconst = {
|
|||||||
X86_MATCH_INTEL_FAM6_MODEL(ICELAKE_X, &icx_cstates),
|
X86_MATCH_INTEL_FAM6_MODEL(ICELAKE_X, &icx_cstates),
|
||||||
X86_MATCH_INTEL_FAM6_MODEL(ICELAKE_D, &icx_cstates),
|
X86_MATCH_INTEL_FAM6_MODEL(ICELAKE_D, &icx_cstates),
|
||||||
X86_MATCH_INTEL_FAM6_MODEL(SAPPHIRERAPIDS_X, &icx_cstates),
|
X86_MATCH_INTEL_FAM6_MODEL(SAPPHIRERAPIDS_X, &icx_cstates),
|
||||||
|
X86_MATCH_INTEL_FAM6_MODEL(EMERALDRAPIDS_X, &icx_cstates),
|
||||||
|
|
||||||
X86_MATCH_INTEL_FAM6_MODEL(TIGERLAKE_L, &icl_cstates),
|
X86_MATCH_INTEL_FAM6_MODEL(TIGERLAKE_L, &icl_cstates),
|
||||||
X86_MATCH_INTEL_FAM6_MODEL(TIGERLAKE, &icl_cstates),
|
X86_MATCH_INTEL_FAM6_MODEL(TIGERLAKE, &icl_cstates),
|
||||||
|
@ -39,7 +39,20 @@ static __always_inline unsigned long native_get_debugreg(int regno)
|
|||||||
asm("mov %%db6, %0" :"=r" (val));
|
asm("mov %%db6, %0" :"=r" (val));
|
||||||
break;
|
break;
|
||||||
case 7:
|
case 7:
|
||||||
asm("mov %%db7, %0" :"=r" (val));
|
/*
|
||||||
|
* Apply __FORCE_ORDER to DR7 reads to forbid re-ordering them
|
||||||
|
* with other code.
|
||||||
|
*
|
||||||
|
* This is needed because a DR7 access can cause a #VC exception
|
||||||
|
* when running under SEV-ES. Taking a #VC exception is not a
|
||||||
|
* safe thing to do just anywhere in the entry code and
|
||||||
|
* re-ordering might place the access into an unsafe location.
|
||||||
|
*
|
||||||
|
* This happened in the NMI handler, where the DR7 read was
|
||||||
|
* re-ordered to happen before the call to sev_es_ist_enter(),
|
||||||
|
* causing stack recursion.
|
||||||
|
*/
|
||||||
|
asm volatile("mov %%db7, %0" : "=r" (val) : __FORCE_ORDER);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
BUG();
|
BUG();
|
||||||
@ -66,7 +79,16 @@ static __always_inline void native_set_debugreg(int regno, unsigned long value)
|
|||||||
asm("mov %0, %%db6" ::"r" (value));
|
asm("mov %0, %%db6" ::"r" (value));
|
||||||
break;
|
break;
|
||||||
case 7:
|
case 7:
|
||||||
asm("mov %0, %%db7" ::"r" (value));
|
/*
|
||||||
|
* Apply __FORCE_ORDER to DR7 writes to forbid re-ordering them
|
||||||
|
* with other code.
|
||||||
|
*
|
||||||
|
* While is didn't happen with a DR7 write (see the DR7 read
|
||||||
|
* comment above which explains where it happened), add the
|
||||||
|
* __FORCE_ORDER here too to avoid similar problems in the
|
||||||
|
* future.
|
||||||
|
*/
|
||||||
|
asm volatile("mov %0, %%db7" ::"r" (value), __FORCE_ORDER);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
BUG();
|
BUG();
|
||||||
|
@ -330,7 +330,16 @@ static void __init bp_init_freq_invariance(void)
|
|||||||
|
|
||||||
static void disable_freq_invariance_workfn(struct work_struct *work)
|
static void disable_freq_invariance_workfn(struct work_struct *work)
|
||||||
{
|
{
|
||||||
|
int cpu;
|
||||||
|
|
||||||
static_branch_disable(&arch_scale_freq_key);
|
static_branch_disable(&arch_scale_freq_key);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Set arch_freq_scale to a default value on all cpus
|
||||||
|
* This negates the effect of scaling
|
||||||
|
*/
|
||||||
|
for_each_possible_cpu(cpu)
|
||||||
|
per_cpu(arch_freq_scale, cpu) = SCHED_CAPACITY_SCALE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static DECLARE_WORK(disable_freq_invariance_work,
|
static DECLARE_WORK(disable_freq_invariance_work,
|
||||||
|
@ -902,7 +902,7 @@ static enum ucode_state request_microcode_fw(int cpu, struct device *device,
|
|||||||
|
|
||||||
kvec.iov_base = (void *)firmware->data;
|
kvec.iov_base = (void *)firmware->data;
|
||||||
kvec.iov_len = firmware->size;
|
kvec.iov_len = firmware->size;
|
||||||
iov_iter_kvec(&iter, WRITE, &kvec, 1, firmware->size);
|
iov_iter_kvec(&iter, ITER_SOURCE, &kvec, 1, firmware->size);
|
||||||
ret = generic_load_microcode(cpu, &iter);
|
ret = generic_load_microcode(cpu, &iter);
|
||||||
|
|
||||||
release_firmware(firmware);
|
release_firmware(firmware);
|
||||||
|
@ -57,7 +57,7 @@ ssize_t elfcorehdr_read(char *buf, size_t count, u64 *ppos)
|
|||||||
struct kvec kvec = { .iov_base = buf, .iov_len = count };
|
struct kvec kvec = { .iov_base = buf, .iov_len = count };
|
||||||
struct iov_iter iter;
|
struct iov_iter iter;
|
||||||
|
|
||||||
iov_iter_kvec(&iter, READ, &kvec, 1, count);
|
iov_iter_kvec(&iter, ITER_DEST, &kvec, 1, count);
|
||||||
|
|
||||||
return read_from_oldmem(&iter, count, ppos,
|
return read_from_oldmem(&iter, count, ppos,
|
||||||
cc_platform_has(CC_ATTR_GUEST_MEM_ENCRYPT));
|
cc_platform_has(CC_ATTR_GUEST_MEM_ENCRYPT));
|
||||||
|
@ -718,15 +718,15 @@ static void *__bfq_bic_change_cgroup(struct bfq_data *bfqd,
|
|||||||
struct bfq_io_cq *bic,
|
struct bfq_io_cq *bic,
|
||||||
struct bfq_group *bfqg)
|
struct bfq_group *bfqg)
|
||||||
{
|
{
|
||||||
struct bfq_queue *async_bfqq = bic_to_bfqq(bic, 0);
|
struct bfq_queue *async_bfqq = bic_to_bfqq(bic, false);
|
||||||
struct bfq_queue *sync_bfqq = bic_to_bfqq(bic, 1);
|
struct bfq_queue *sync_bfqq = bic_to_bfqq(bic, true);
|
||||||
struct bfq_entity *entity;
|
struct bfq_entity *entity;
|
||||||
|
|
||||||
if (async_bfqq) {
|
if (async_bfqq) {
|
||||||
entity = &async_bfqq->entity;
|
entity = &async_bfqq->entity;
|
||||||
|
|
||||||
if (entity->sched_data != &bfqg->sched_data) {
|
if (entity->sched_data != &bfqg->sched_data) {
|
||||||
bic_set_bfqq(bic, NULL, 0);
|
bic_set_bfqq(bic, NULL, false);
|
||||||
bfq_release_process_ref(bfqd, async_bfqq);
|
bfq_release_process_ref(bfqd, async_bfqq);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -761,8 +761,8 @@ static void *__bfq_bic_change_cgroup(struct bfq_data *bfqd,
|
|||||||
* request from the old cgroup.
|
* request from the old cgroup.
|
||||||
*/
|
*/
|
||||||
bfq_put_cooperator(sync_bfqq);
|
bfq_put_cooperator(sync_bfqq);
|
||||||
|
bic_set_bfqq(bic, NULL, true);
|
||||||
bfq_release_process_ref(bfqd, sync_bfqq);
|
bfq_release_process_ref(bfqd, sync_bfqq);
|
||||||
bic_set_bfqq(bic, NULL, 1);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3180,7 +3180,7 @@ bfq_merge_bfqqs(struct bfq_data *bfqd, struct bfq_io_cq *bic,
|
|||||||
/*
|
/*
|
||||||
* Merge queues (that is, let bic redirect its requests to new_bfqq)
|
* Merge queues (that is, let bic redirect its requests to new_bfqq)
|
||||||
*/
|
*/
|
||||||
bic_set_bfqq(bic, new_bfqq, 1);
|
bic_set_bfqq(bic, new_bfqq, true);
|
||||||
bfq_mark_bfqq_coop(new_bfqq);
|
bfq_mark_bfqq_coop(new_bfqq);
|
||||||
/*
|
/*
|
||||||
* new_bfqq now belongs to at least two bics (it is a shared queue):
|
* new_bfqq now belongs to at least two bics (it is a shared queue):
|
||||||
@ -5491,9 +5491,11 @@ static void bfq_check_ioprio_change(struct bfq_io_cq *bic, struct bio *bio)
|
|||||||
|
|
||||||
bfqq = bic_to_bfqq(bic, false);
|
bfqq = bic_to_bfqq(bic, false);
|
||||||
if (bfqq) {
|
if (bfqq) {
|
||||||
bfq_release_process_ref(bfqd, bfqq);
|
struct bfq_queue *old_bfqq = bfqq;
|
||||||
|
|
||||||
bfqq = bfq_get_queue(bfqd, bio, false, bic, true);
|
bfqq = bfq_get_queue(bfqd, bio, false, bic, true);
|
||||||
bic_set_bfqq(bic, bfqq, false);
|
bic_set_bfqq(bic, bfqq, false);
|
||||||
|
bfq_release_process_ref(bfqd, old_bfqq);
|
||||||
}
|
}
|
||||||
|
|
||||||
bfqq = bic_to_bfqq(bic, true);
|
bfqq = bic_to_bfqq(bic, true);
|
||||||
@ -6627,7 +6629,7 @@ bfq_split_bfqq(struct bfq_io_cq *bic, struct bfq_queue *bfqq)
|
|||||||
return bfqq;
|
return bfqq;
|
||||||
}
|
}
|
||||||
|
|
||||||
bic_set_bfqq(bic, NULL, 1);
|
bic_set_bfqq(bic, NULL, true);
|
||||||
|
|
||||||
bfq_put_cooperator(bfqq);
|
bfq_put_cooperator(bfqq);
|
||||||
|
|
||||||
|
@ -1408,6 +1408,10 @@ int blkcg_activate_policy(struct request_queue *q,
|
|||||||
list_for_each_entry_reverse(blkg, &q->blkg_list, q_node)
|
list_for_each_entry_reverse(blkg, &q->blkg_list, q_node)
|
||||||
pol->pd_init_fn(blkg->pd[pol->plid]);
|
pol->pd_init_fn(blkg->pd[pol->plid]);
|
||||||
|
|
||||||
|
if (pol->pd_online_fn)
|
||||||
|
list_for_each_entry_reverse(blkg, &q->blkg_list, q_node)
|
||||||
|
pol->pd_online_fn(blkg->pd[pol->plid]);
|
||||||
|
|
||||||
__set_bit(pol->plid, q->blkcg_pols);
|
__set_bit(pol->plid, q->blkcg_pols);
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
|
@ -2858,6 +2858,7 @@ static inline struct request *blk_mq_get_cached_request(struct request_queue *q,
|
|||||||
struct blk_plug *plug, struct bio **bio, unsigned int nsegs)
|
struct blk_plug *plug, struct bio **bio, unsigned int nsegs)
|
||||||
{
|
{
|
||||||
struct request *rq;
|
struct request *rq;
|
||||||
|
enum hctx_type type, hctx_type;
|
||||||
|
|
||||||
if (!plug)
|
if (!plug)
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -2870,7 +2871,10 @@ static inline struct request *blk_mq_get_cached_request(struct request_queue *q,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (blk_mq_get_hctx_type((*bio)->bi_opf) != rq->mq_hctx->type)
|
type = blk_mq_get_hctx_type((*bio)->bi_opf);
|
||||||
|
hctx_type = rq->mq_hctx->type;
|
||||||
|
if (type != hctx_type &&
|
||||||
|
!(type == HCTX_TYPE_READ && hctx_type == HCTX_TYPE_DEFAULT))
|
||||||
return NULL;
|
return NULL;
|
||||||
if (op_is_flush(rq->cmd_flags) != op_is_flush((*bio)->bi_opf))
|
if (op_is_flush(rq->cmd_flags) != op_is_flush((*bio)->bi_opf))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
BRANCH=android14-6.1
|
BRANCH=android14-6.1
|
||||||
CLANG_VERSION=r475365
|
CLANG_VERSION=r475365b
|
||||||
|
@ -23,8 +23,8 @@ $(obj)/blacklist_hash_list: $(CONFIG_SYSTEM_BLACKLIST_HASH_LIST) FORCE
|
|||||||
targets += blacklist_hash_list
|
targets += blacklist_hash_list
|
||||||
|
|
||||||
quiet_cmd_extract_certs = CERT $@
|
quiet_cmd_extract_certs = CERT $@
|
||||||
cmd_extract_certs = $(obj)/extract-cert $(extract-cert-in) $@
|
cmd_extract_certs = $(obj)/extract-cert "$(extract-cert-in)" $@
|
||||||
extract-cert-in = $(or $(filter-out $(obj)/extract-cert, $(real-prereqs)),"")
|
extract-cert-in = $(filter-out $(obj)/extract-cert, $(real-prereqs))
|
||||||
|
|
||||||
$(obj)/system_certificates.o: $(obj)/x509_certificate_list
|
$(obj)/system_certificates.o: $(obj)/x509_certificate_list
|
||||||
|
|
||||||
|
@ -766,7 +766,7 @@ static int build_cipher_test_sglists(struct cipher_test_sglists *tsgls,
|
|||||||
struct iov_iter input;
|
struct iov_iter input;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
iov_iter_kvec(&input, WRITE, inputs, nr_inputs, src_total_len);
|
iov_iter_kvec(&input, ITER_SOURCE, inputs, nr_inputs, src_total_len);
|
||||||
err = build_test_sglist(&tsgls->src, cfg->src_divs, alignmask,
|
err = build_test_sglist(&tsgls->src, cfg->src_divs, alignmask,
|
||||||
cfg->inplace_mode != OUT_OF_PLACE ?
|
cfg->inplace_mode != OUT_OF_PLACE ?
|
||||||
max(dst_total_len, src_total_len) :
|
max(dst_total_len, src_total_len) :
|
||||||
@ -1180,7 +1180,7 @@ static int build_hash_sglist(struct test_sglist *tsgl,
|
|||||||
|
|
||||||
kv.iov_base = (void *)vec->plaintext;
|
kv.iov_base = (void *)vec->plaintext;
|
||||||
kv.iov_len = vec->psize;
|
kv.iov_len = vec->psize;
|
||||||
iov_iter_kvec(&input, WRITE, &kv, 1, vec->psize);
|
iov_iter_kvec(&input, ITER_SOURCE, &kv, 1, vec->psize);
|
||||||
return build_test_sglist(tsgl, cfg->src_divs, alignmask, vec->psize,
|
return build_test_sglist(tsgl, cfg->src_divs, alignmask, vec->psize,
|
||||||
&input, divs);
|
&input, divs);
|
||||||
}
|
}
|
||||||
|
@ -455,7 +455,7 @@ static ssize_t pfru_write(struct file *file, const char __user *buf,
|
|||||||
|
|
||||||
iov.iov_base = (void __user *)buf;
|
iov.iov_base = (void __user *)buf;
|
||||||
iov.iov_len = len;
|
iov.iov_len = len;
|
||||||
iov_iter_init(&iter, WRITE, &iov, 1, len);
|
iov_iter_init(&iter, ITER_SOURCE, &iov, 1, len);
|
||||||
|
|
||||||
/* map the communication buffer */
|
/* map the communication buffer */
|
||||||
phy_addr = (phys_addr_t)((buf_info.addr_hi << 32) | buf_info.addr_lo);
|
phy_addr = (phys_addr_t)((buf_info.addr_hi << 32) | buf_info.addr_lo);
|
||||||
|
@ -493,6 +493,14 @@ static const struct dmi_system_id video_detect_dmi_table[] = {
|
|||||||
DMI_MATCH(DMI_PRODUCT_NAME, "Precision 7510"),
|
DMI_MATCH(DMI_PRODUCT_NAME, "Precision 7510"),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.callback = video_detect_force_native,
|
||||||
|
/* Acer Aspire 4810T */
|
||||||
|
.matches = {
|
||||||
|
DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
|
||||||
|
DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 4810T"),
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.callback = video_detect_force_native,
|
.callback = video_detect_force_native,
|
||||||
/* Acer Aspire 5738z */
|
/* Acer Aspire 5738z */
|
||||||
|
@ -3108,7 +3108,7 @@ int sata_down_spd_limit(struct ata_link *link, u32 spd_limit)
|
|||||||
*/
|
*/
|
||||||
if (spd > 1)
|
if (spd > 1)
|
||||||
mask &= (1 << (spd - 1)) - 1;
|
mask &= (1 << (spd - 1)) - 1;
|
||||||
else
|
else if (link->sata_spd)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
/* were we already at the bottom? */
|
/* were we already at the bottom? */
|
||||||
|
@ -1816,7 +1816,7 @@ int drbd_send(struct drbd_connection *connection, struct socket *sock,
|
|||||||
|
|
||||||
/* THINK if (signal_pending) return ... ? */
|
/* THINK if (signal_pending) return ... ? */
|
||||||
|
|
||||||
iov_iter_kvec(&msg.msg_iter, WRITE, &iov, 1, size);
|
iov_iter_kvec(&msg.msg_iter, ITER_SOURCE, &iov, 1, size);
|
||||||
|
|
||||||
if (sock == connection->data.socket) {
|
if (sock == connection->data.socket) {
|
||||||
rcu_read_lock();
|
rcu_read_lock();
|
||||||
|
@ -507,7 +507,7 @@ static int drbd_recv_short(struct socket *sock, void *buf, size_t size, int flag
|
|||||||
struct msghdr msg = {
|
struct msghdr msg = {
|
||||||
.msg_flags = (flags ? flags : MSG_WAITALL | MSG_NOSIGNAL)
|
.msg_flags = (flags ? flags : MSG_WAITALL | MSG_NOSIGNAL)
|
||||||
};
|
};
|
||||||
iov_iter_kvec(&msg.msg_iter, READ, &iov, 1, size);
|
iov_iter_kvec(&msg.msg_iter, ITER_DEST, &iov, 1, size);
|
||||||
return sock_recvmsg(sock, &msg, msg.msg_flags);
|
return sock_recvmsg(sock, &msg, msg.msg_flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -243,7 +243,7 @@ static int lo_write_bvec(struct file *file, struct bio_vec *bvec, loff_t *ppos)
|
|||||||
struct iov_iter i;
|
struct iov_iter i;
|
||||||
ssize_t bw;
|
ssize_t bw;
|
||||||
|
|
||||||
iov_iter_bvec(&i, WRITE, bvec, 1, bvec->bv_len);
|
iov_iter_bvec(&i, ITER_SOURCE, bvec, 1, bvec->bv_len);
|
||||||
|
|
||||||
file_start_write(file);
|
file_start_write(file);
|
||||||
bw = vfs_iter_write(file, &i, ppos, 0);
|
bw = vfs_iter_write(file, &i, ppos, 0);
|
||||||
@ -286,7 +286,7 @@ static int lo_read_simple(struct loop_device *lo, struct request *rq,
|
|||||||
ssize_t len;
|
ssize_t len;
|
||||||
|
|
||||||
rq_for_each_segment(bvec, rq, iter) {
|
rq_for_each_segment(bvec, rq, iter) {
|
||||||
iov_iter_bvec(&i, READ, &bvec, 1, bvec.bv_len);
|
iov_iter_bvec(&i, ITER_DEST, &bvec, 1, bvec.bv_len);
|
||||||
len = vfs_iter_read(lo->lo_backing_file, &i, &pos, 0);
|
len = vfs_iter_read(lo->lo_backing_file, &i, &pos, 0);
|
||||||
if (len < 0)
|
if (len < 0)
|
||||||
return len;
|
return len;
|
||||||
@ -392,7 +392,7 @@ static void lo_rw_aio_complete(struct kiocb *iocb, long ret)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int lo_rw_aio(struct loop_device *lo, struct loop_cmd *cmd,
|
static int lo_rw_aio(struct loop_device *lo, struct loop_cmd *cmd,
|
||||||
loff_t pos, bool rw)
|
loff_t pos, int rw)
|
||||||
{
|
{
|
||||||
struct iov_iter iter;
|
struct iov_iter iter;
|
||||||
struct req_iterator rq_iter;
|
struct req_iterator rq_iter;
|
||||||
@ -448,7 +448,7 @@ static int lo_rw_aio(struct loop_device *lo, struct loop_cmd *cmd,
|
|||||||
cmd->iocb.ki_flags = IOCB_DIRECT;
|
cmd->iocb.ki_flags = IOCB_DIRECT;
|
||||||
cmd->iocb.ki_ioprio = IOPRIO_PRIO_VALUE(IOPRIO_CLASS_NONE, 0);
|
cmd->iocb.ki_ioprio = IOPRIO_PRIO_VALUE(IOPRIO_CLASS_NONE, 0);
|
||||||
|
|
||||||
if (rw == WRITE)
|
if (rw == ITER_SOURCE)
|
||||||
ret = call_write_iter(file, &cmd->iocb, &iter);
|
ret = call_write_iter(file, &cmd->iocb, &iter);
|
||||||
else
|
else
|
||||||
ret = call_read_iter(file, &cmd->iocb, &iter);
|
ret = call_read_iter(file, &cmd->iocb, &iter);
|
||||||
@ -490,12 +490,12 @@ static int do_req_filebacked(struct loop_device *lo, struct request *rq)
|
|||||||
return lo_fallocate(lo, rq, pos, FALLOC_FL_PUNCH_HOLE);
|
return lo_fallocate(lo, rq, pos, FALLOC_FL_PUNCH_HOLE);
|
||||||
case REQ_OP_WRITE:
|
case REQ_OP_WRITE:
|
||||||
if (cmd->use_aio)
|
if (cmd->use_aio)
|
||||||
return lo_rw_aio(lo, cmd, pos, WRITE);
|
return lo_rw_aio(lo, cmd, pos, ITER_SOURCE);
|
||||||
else
|
else
|
||||||
return lo_write_simple(lo, rq, pos);
|
return lo_write_simple(lo, rq, pos);
|
||||||
case REQ_OP_READ:
|
case REQ_OP_READ:
|
||||||
if (cmd->use_aio)
|
if (cmd->use_aio)
|
||||||
return lo_rw_aio(lo, cmd, pos, READ);
|
return lo_rw_aio(lo, cmd, pos, ITER_DEST);
|
||||||
else
|
else
|
||||||
return lo_read_simple(lo, rq, pos);
|
return lo_read_simple(lo, rq, pos);
|
||||||
default:
|
default:
|
||||||
|
@ -563,7 +563,7 @@ static int nbd_send_cmd(struct nbd_device *nbd, struct nbd_cmd *cmd, int index)
|
|||||||
u32 nbd_cmd_flags = 0;
|
u32 nbd_cmd_flags = 0;
|
||||||
int sent = nsock->sent, skip = 0;
|
int sent = nsock->sent, skip = 0;
|
||||||
|
|
||||||
iov_iter_kvec(&from, WRITE, &iov, 1, sizeof(request));
|
iov_iter_kvec(&from, ITER_SOURCE, &iov, 1, sizeof(request));
|
||||||
|
|
||||||
type = req_to_nbd_cmd_type(req);
|
type = req_to_nbd_cmd_type(req);
|
||||||
if (type == U32_MAX)
|
if (type == U32_MAX)
|
||||||
@ -649,7 +649,7 @@ static int nbd_send_cmd(struct nbd_device *nbd, struct nbd_cmd *cmd, int index)
|
|||||||
|
|
||||||
dev_dbg(nbd_to_dev(nbd), "request %p: sending %d bytes data\n",
|
dev_dbg(nbd_to_dev(nbd), "request %p: sending %d bytes data\n",
|
||||||
req, bvec.bv_len);
|
req, bvec.bv_len);
|
||||||
iov_iter_bvec(&from, WRITE, &bvec, 1, bvec.bv_len);
|
iov_iter_bvec(&from, ITER_SOURCE, &bvec, 1, bvec.bv_len);
|
||||||
if (skip) {
|
if (skip) {
|
||||||
if (skip >= iov_iter_count(&from)) {
|
if (skip >= iov_iter_count(&from)) {
|
||||||
skip -= iov_iter_count(&from);
|
skip -= iov_iter_count(&from);
|
||||||
@ -701,7 +701,7 @@ static int nbd_read_reply(struct nbd_device *nbd, int index,
|
|||||||
int result;
|
int result;
|
||||||
|
|
||||||
reply->magic = 0;
|
reply->magic = 0;
|
||||||
iov_iter_kvec(&to, READ, &iov, 1, sizeof(*reply));
|
iov_iter_kvec(&to, ITER_DEST, &iov, 1, sizeof(*reply));
|
||||||
result = sock_xmit(nbd, index, 0, &to, MSG_WAITALL, NULL);
|
result = sock_xmit(nbd, index, 0, &to, MSG_WAITALL, NULL);
|
||||||
if (result < 0) {
|
if (result < 0) {
|
||||||
if (!nbd_disconnected(nbd->config))
|
if (!nbd_disconnected(nbd->config))
|
||||||
@ -790,7 +790,7 @@ static struct nbd_cmd *nbd_handle_reply(struct nbd_device *nbd, int index,
|
|||||||
struct iov_iter to;
|
struct iov_iter to;
|
||||||
|
|
||||||
rq_for_each_segment(bvec, req, iter) {
|
rq_for_each_segment(bvec, req, iter) {
|
||||||
iov_iter_bvec(&to, READ, &bvec, 1, bvec.bv_len);
|
iov_iter_bvec(&to, ITER_DEST, &bvec, 1, bvec.bv_len);
|
||||||
result = sock_xmit(nbd, index, 0, &to, MSG_WAITALL, NULL);
|
result = sock_xmit(nbd, index, 0, &to, MSG_WAITALL, NULL);
|
||||||
if (result < 0) {
|
if (result < 0) {
|
||||||
dev_err(disk_to_dev(nbd->disk), "Receive data failed (result %d)\n",
|
dev_err(disk_to_dev(nbd->disk), "Receive data failed (result %d)\n",
|
||||||
@ -1267,7 +1267,7 @@ static void send_disconnects(struct nbd_device *nbd)
|
|||||||
for (i = 0; i < config->num_connections; i++) {
|
for (i = 0; i < config->num_connections; i++) {
|
||||||
struct nbd_sock *nsock = config->socks[i];
|
struct nbd_sock *nsock = config->socks[i];
|
||||||
|
|
||||||
iov_iter_kvec(&from, WRITE, &iov, 1, sizeof(request));
|
iov_iter_kvec(&from, ITER_SOURCE, &iov, 1, sizeof(request));
|
||||||
mutex_lock(&nsock->tx_lock);
|
mutex_lock(&nsock->tx_lock);
|
||||||
ret = sock_xmit(nbd, i, 1, &from, 0, NULL);
|
ret = sock_xmit(nbd, i, 1, &from, 0, NULL);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
|
@ -137,7 +137,7 @@ struct ublk_device {
|
|||||||
|
|
||||||
char *__queues;
|
char *__queues;
|
||||||
|
|
||||||
unsigned short queue_size;
|
unsigned int queue_size;
|
||||||
struct ublksrv_ctrl_dev_info dev_info;
|
struct ublksrv_ctrl_dev_info dev_info;
|
||||||
|
|
||||||
struct blk_mq_tag_set tag_set;
|
struct blk_mq_tag_set tag_set;
|
||||||
|
@ -857,7 +857,13 @@ static int __init sunxi_rsb_init(void)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
return platform_driver_register(&sunxi_rsb_driver);
|
ret = platform_driver_register(&sunxi_rsb_driver);
|
||||||
|
if (ret) {
|
||||||
|
bus_unregister(&sunxi_rsb_bus);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
module_init(sunxi_rsb_init);
|
module_init(sunxi_rsb_init);
|
||||||
|
|
||||||
|
@ -1329,7 +1329,7 @@ SYSCALL_DEFINE3(getrandom, char __user *, ubuf, size_t, len, unsigned int, flags
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = import_single_range(READ, ubuf, len, &iov, &iter);
|
ret = import_single_range(ITER_DEST, ubuf, len, &iov, &iter);
|
||||||
if (unlikely(ret))
|
if (unlikely(ret))
|
||||||
return ret;
|
return ret;
|
||||||
return get_random_bytes_user(&iter);
|
return get_random_bytes_user(&iter);
|
||||||
@ -1447,7 +1447,7 @@ static long random_ioctl(struct file *f, unsigned int cmd, unsigned long arg)
|
|||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
if (get_user(len, p++))
|
if (get_user(len, p++))
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
ret = import_single_range(WRITE, p, len, &iov, &iter);
|
ret = import_single_range(ITER_SOURCE, p, len, &iov, &iter);
|
||||||
if (unlikely(ret))
|
if (unlikely(ret))
|
||||||
return ret;
|
return ret;
|
||||||
ret = write_pool_user(&iter);
|
ret = write_pool_user(&iter);
|
||||||
|
@ -69,10 +69,12 @@ static int __psci_enter_domain_idle_state(struct cpuidle_device *dev,
|
|||||||
if (ret)
|
if (ret)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
trace_android_vh_cpuidle_psci_enter(dev, s2idle);
|
|
||||||
|
|
||||||
/* Do runtime PM to manage a hierarchical CPU toplogy. */
|
/* Do runtime PM to manage a hierarchical CPU toplogy. */
|
||||||
ct_irq_enter_irqson();
|
ct_irq_enter_irqson();
|
||||||
|
|
||||||
|
trace_android_vh_cpuidle_psci_enter(dev, s2idle);
|
||||||
|
|
||||||
if (s2idle)
|
if (s2idle)
|
||||||
dev_pm_genpd_suspend(pd_dev);
|
dev_pm_genpd_suspend(pd_dev);
|
||||||
else
|
else
|
||||||
@ -90,10 +92,11 @@ static int __psci_enter_domain_idle_state(struct cpuidle_device *dev,
|
|||||||
dev_pm_genpd_resume(pd_dev);
|
dev_pm_genpd_resume(pd_dev);
|
||||||
else
|
else
|
||||||
pm_runtime_get_sync(pd_dev);
|
pm_runtime_get_sync(pd_dev);
|
||||||
ct_irq_exit_irqson();
|
|
||||||
|
|
||||||
trace_android_vh_cpuidle_psci_exit(dev, s2idle);
|
trace_android_vh_cpuidle_psci_exit(dev, s2idle);
|
||||||
|
|
||||||
|
ct_irq_exit_irqson();
|
||||||
|
|
||||||
cpu_pm_exit();
|
cpu_pm_exit();
|
||||||
|
|
||||||
/* Clear the domain state to start fresh when back from idle. */
|
/* Clear the domain state to start fresh when back from idle. */
|
||||||
|
@ -167,7 +167,7 @@ struct dma_fence *dma_fence_allocate_private_stub(void)
|
|||||||
0, 0);
|
0, 0);
|
||||||
|
|
||||||
set_bit(DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT,
|
set_bit(DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT,
|
||||||
&dma_fence_stub.flags);
|
&fence->flags);
|
||||||
|
|
||||||
dma_fence_signal(fence);
|
dma_fence_signal(fence);
|
||||||
|
|
||||||
|
@ -1521,10 +1521,12 @@ static struct sdma_desc *sdma_transfer_init(struct sdma_channel *sdmac,
|
|||||||
sdma_config_ownership(sdmac, false, true, false);
|
sdma_config_ownership(sdmac, false, true, false);
|
||||||
|
|
||||||
if (sdma_load_context(sdmac))
|
if (sdma_load_context(sdmac))
|
||||||
goto err_desc_out;
|
goto err_bd_out;
|
||||||
|
|
||||||
return desc;
|
return desc;
|
||||||
|
|
||||||
|
err_bd_out:
|
||||||
|
sdma_free_bd(desc);
|
||||||
err_desc_out:
|
err_desc_out:
|
||||||
kfree(desc);
|
kfree(desc);
|
||||||
err_out:
|
err_out:
|
||||||
|
@ -819,8 +819,10 @@ static int ioctl_send_response(struct client *client, union ioctl_arg *arg)
|
|||||||
|
|
||||||
r = container_of(resource, struct inbound_transaction_resource,
|
r = container_of(resource, struct inbound_transaction_resource,
|
||||||
resource);
|
resource);
|
||||||
if (is_fcp_request(r->request))
|
if (is_fcp_request(r->request)) {
|
||||||
|
kfree(r->data);
|
||||||
goto out;
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
if (a->length != fw_get_response_length(r->request)) {
|
if (a->length != fw_get_response_length(r->request)) {
|
||||||
ret = -EINVAL;
|
ret = -EINVAL;
|
||||||
|
@ -910,6 +910,8 @@ static int do_xfer(const struct scmi_protocol_handle *ph,
|
|||||||
xfer->hdr.protocol_id, xfer->hdr.seq,
|
xfer->hdr.protocol_id, xfer->hdr.seq,
|
||||||
xfer->hdr.poll_completion);
|
xfer->hdr.poll_completion);
|
||||||
|
|
||||||
|
/* Clear any stale status */
|
||||||
|
xfer->hdr.status = SCMI_SUCCESS;
|
||||||
xfer->state = SCMI_XFER_SENT_OK;
|
xfer->state = SCMI_XFER_SENT_OK;
|
||||||
/*
|
/*
|
||||||
* Even though spinlocking is not needed here since no race is possible
|
* Even though spinlocking is not needed here since no race is possible
|
||||||
|
@ -984,6 +984,8 @@ int __ref efi_mem_reserve_persistent(phys_addr_t addr, u64 size)
|
|||||||
/* first try to find a slot in an existing linked list entry */
|
/* first try to find a slot in an existing linked list entry */
|
||||||
for (prsv = efi_memreserve_root->next; prsv; ) {
|
for (prsv = efi_memreserve_root->next; prsv; ) {
|
||||||
rsv = memremap(prsv, sizeof(*rsv), MEMREMAP_WB);
|
rsv = memremap(prsv, sizeof(*rsv), MEMREMAP_WB);
|
||||||
|
if (!rsv)
|
||||||
|
return -ENOMEM;
|
||||||
index = atomic_fetch_add_unless(&rsv->count, 1, rsv->size);
|
index = atomic_fetch_add_unless(&rsv->count, 1, rsv->size);
|
||||||
if (index < rsv->size) {
|
if (index < rsv->size) {
|
||||||
rsv->entry[index].base = addr;
|
rsv->entry[index].base = addr;
|
||||||
|
@ -33,7 +33,7 @@ int __init efi_memattr_init(void)
|
|||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tbl->version > 1) {
|
if (tbl->version > 2) {
|
||||||
pr_warn("Unexpected EFI Memory Attributes table version %d\n",
|
pr_warn("Unexpected EFI Memory Attributes table version %d\n",
|
||||||
tbl->version);
|
tbl->version);
|
||||||
goto unmap;
|
goto unmap;
|
||||||
|
@ -574,20 +574,27 @@ static int m10bmc_sec_probe(struct platform_device *pdev)
|
|||||||
len = scnprintf(buf, SEC_UPDATE_LEN_MAX, "secure-update%d",
|
len = scnprintf(buf, SEC_UPDATE_LEN_MAX, "secure-update%d",
|
||||||
sec->fw_name_id);
|
sec->fw_name_id);
|
||||||
sec->fw_name = kmemdup_nul(buf, len, GFP_KERNEL);
|
sec->fw_name = kmemdup_nul(buf, len, GFP_KERNEL);
|
||||||
if (!sec->fw_name)
|
if (!sec->fw_name) {
|
||||||
return -ENOMEM;
|
ret = -ENOMEM;
|
||||||
|
goto fw_name_fail;
|
||||||
|
}
|
||||||
|
|
||||||
fwl = firmware_upload_register(THIS_MODULE, sec->dev, sec->fw_name,
|
fwl = firmware_upload_register(THIS_MODULE, sec->dev, sec->fw_name,
|
||||||
&m10bmc_ops, sec);
|
&m10bmc_ops, sec);
|
||||||
if (IS_ERR(fwl)) {
|
if (IS_ERR(fwl)) {
|
||||||
dev_err(sec->dev, "Firmware Upload driver failed to start\n");
|
dev_err(sec->dev, "Firmware Upload driver failed to start\n");
|
||||||
kfree(sec->fw_name);
|
ret = PTR_ERR(fwl);
|
||||||
xa_erase(&fw_upload_xa, sec->fw_name_id);
|
goto fw_uploader_fail;
|
||||||
return PTR_ERR(fwl);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sec->fwl = fwl;
|
sec->fwl = fwl;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
fw_uploader_fail:
|
||||||
|
kfree(sec->fw_name);
|
||||||
|
fw_name_fail:
|
||||||
|
xa_erase(&fw_upload_xa, sec->fw_name_id);
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int m10bmc_sec_remove(struct platform_device *pdev)
|
static int m10bmc_sec_remove(struct platform_device *pdev)
|
||||||
|
@ -213,9 +213,9 @@ static int s10_ops_write_init(struct fpga_manager *mgr,
|
|||||||
/* Allocate buffers from the service layer's pool. */
|
/* Allocate buffers from the service layer's pool. */
|
||||||
for (i = 0; i < NUM_SVC_BUFS; i++) {
|
for (i = 0; i < NUM_SVC_BUFS; i++) {
|
||||||
kbuf = stratix10_svc_allocate_memory(priv->chan, SVC_BUF_SIZE);
|
kbuf = stratix10_svc_allocate_memory(priv->chan, SVC_BUF_SIZE);
|
||||||
if (!kbuf) {
|
if (IS_ERR(kbuf)) {
|
||||||
s10_free_buffers(mgr);
|
s10_free_buffers(mgr);
|
||||||
ret = -ENOMEM;
|
ret = PTR_ERR(kbuf);
|
||||||
goto init_done;
|
goto init_done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -659,7 +659,7 @@ static void sbefifo_collect_async_ffdc(struct sbefifo *sbefifo)
|
|||||||
}
|
}
|
||||||
ffdc_iov.iov_base = ffdc;
|
ffdc_iov.iov_base = ffdc;
|
||||||
ffdc_iov.iov_len = SBEFIFO_MAX_FFDC_SIZE;
|
ffdc_iov.iov_len = SBEFIFO_MAX_FFDC_SIZE;
|
||||||
iov_iter_kvec(&ffdc_iter, WRITE, &ffdc_iov, 1, SBEFIFO_MAX_FFDC_SIZE);
|
iov_iter_kvec(&ffdc_iter, ITER_DEST, &ffdc_iov, 1, SBEFIFO_MAX_FFDC_SIZE);
|
||||||
cmd[0] = cpu_to_be32(2);
|
cmd[0] = cpu_to_be32(2);
|
||||||
cmd[1] = cpu_to_be32(SBEFIFO_CMD_GET_SBE_FFDC);
|
cmd[1] = cpu_to_be32(SBEFIFO_CMD_GET_SBE_FFDC);
|
||||||
rc = sbefifo_do_command(sbefifo, cmd, 2, &ffdc_iter);
|
rc = sbefifo_do_command(sbefifo, cmd, 2, &ffdc_iter);
|
||||||
@ -756,7 +756,7 @@ int sbefifo_submit(struct device *dev, const __be32 *command, size_t cmd_len,
|
|||||||
rbytes = (*resp_len) * sizeof(__be32);
|
rbytes = (*resp_len) * sizeof(__be32);
|
||||||
resp_iov.iov_base = response;
|
resp_iov.iov_base = response;
|
||||||
resp_iov.iov_len = rbytes;
|
resp_iov.iov_len = rbytes;
|
||||||
iov_iter_kvec(&resp_iter, WRITE, &resp_iov, 1, rbytes);
|
iov_iter_kvec(&resp_iter, ITER_DEST, &resp_iov, 1, rbytes);
|
||||||
|
|
||||||
/* Perform the command */
|
/* Perform the command */
|
||||||
rc = mutex_lock_interruptible(&sbefifo->lock);
|
rc = mutex_lock_interruptible(&sbefifo->lock);
|
||||||
@ -839,7 +839,7 @@ static ssize_t sbefifo_user_read(struct file *file, char __user *buf,
|
|||||||
/* Prepare iov iterator */
|
/* Prepare iov iterator */
|
||||||
resp_iov.iov_base = buf;
|
resp_iov.iov_base = buf;
|
||||||
resp_iov.iov_len = len;
|
resp_iov.iov_len = len;
|
||||||
iov_iter_init(&resp_iter, WRITE, &resp_iov, 1, len);
|
iov_iter_init(&resp_iter, ITER_DEST, &resp_iov, 1, len);
|
||||||
|
|
||||||
/* Perform the command */
|
/* Perform the command */
|
||||||
rc = mutex_lock_interruptible(&sbefifo->lock);
|
rc = mutex_lock_interruptible(&sbefifo->lock);
|
||||||
|
@ -361,7 +361,7 @@ static bool acpi_gpio_in_ignore_list(const char *ignore_list, const char *contro
|
|||||||
}
|
}
|
||||||
|
|
||||||
static bool acpi_gpio_irq_is_wake(struct device *parent,
|
static bool acpi_gpio_irq_is_wake(struct device *parent,
|
||||||
struct acpi_resource_gpio *agpio)
|
const struct acpi_resource_gpio *agpio)
|
||||||
{
|
{
|
||||||
unsigned int pin = agpio->pin_table[0];
|
unsigned int pin = agpio->pin_table[0];
|
||||||
|
|
||||||
@ -754,7 +754,7 @@ static int acpi_populate_gpio_lookup(struct acpi_resource *ares, void *data)
|
|||||||
lookup->info.pin_config = agpio->pin_config;
|
lookup->info.pin_config = agpio->pin_config;
|
||||||
lookup->info.debounce = agpio->debounce_timeout;
|
lookup->info.debounce = agpio->debounce_timeout;
|
||||||
lookup->info.gpioint = gpioint;
|
lookup->info.gpioint = gpioint;
|
||||||
lookup->info.wake_capable = agpio->wake_capable == ACPI_WAKE_CAPABLE;
|
lookup->info.wake_capable = acpi_gpio_irq_is_wake(&lookup->info.adev->dev, agpio);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Polarity and triggering are only specified for GpioInt
|
* Polarity and triggering are only specified for GpioInt
|
||||||
@ -1080,7 +1080,8 @@ int acpi_dev_gpio_irq_wake_get_by(struct acpi_device *adev, const char *name, in
|
|||||||
dev_dbg(&adev->dev, "IRQ %d already in use\n", irq);
|
dev_dbg(&adev->dev, "IRQ %d already in use\n", irq);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (wake_capable)
|
/* avoid suspend issues with GPIOs when systems are using S3 */
|
||||||
|
if (wake_capable && acpi_gbl_FADT.flags & ACPI_FADT_LOW_POWER_S0)
|
||||||
*wake_capable = info.wake_capable;
|
*wake_capable = info.wake_capable;
|
||||||
|
|
||||||
return irq;
|
return irq;
|
||||||
@ -1599,6 +1600,19 @@ static const struct dmi_system_id gpiolib_acpi_quirks[] __initconst = {
|
|||||||
.ignore_interrupt = "AMDI0030:00@18",
|
.ignore_interrupt = "AMDI0030:00@18",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* Spurious wakeups from TP_ATTN# pin
|
||||||
|
* Found in BIOS 1.7.8
|
||||||
|
* https://gitlab.freedesktop.org/drm/amd/-/issues/1722#note_1720627
|
||||||
|
*/
|
||||||
|
.matches = {
|
||||||
|
DMI_MATCH(DMI_BOARD_NAME, "NL5xRU"),
|
||||||
|
},
|
||||||
|
.driver_data = &(struct acpi_gpiolib_dmi_quirk) {
|
||||||
|
.ignore_wake = "ELAN0415:00@9",
|
||||||
|
},
|
||||||
|
},
|
||||||
{} /* Terminating entry */
|
{} /* Terminating entry */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -790,8 +790,8 @@ static void gfx_v11_0_read_wave_data(struct amdgpu_device *adev, uint32_t simd,
|
|||||||
* zero here */
|
* zero here */
|
||||||
WARN_ON(simd != 0);
|
WARN_ON(simd != 0);
|
||||||
|
|
||||||
/* type 2 wave data */
|
/* type 3 wave data */
|
||||||
dst[(*no_fields)++] = 2;
|
dst[(*no_fields)++] = 3;
|
||||||
dst[(*no_fields)++] = wave_read_ind(adev, wave, ixSQ_WAVE_STATUS);
|
dst[(*no_fields)++] = wave_read_ind(adev, wave, ixSQ_WAVE_STATUS);
|
||||||
dst[(*no_fields)++] = wave_read_ind(adev, wave, ixSQ_WAVE_PC_LO);
|
dst[(*no_fields)++] = wave_read_ind(adev, wave, ixSQ_WAVE_PC_LO);
|
||||||
dst[(*no_fields)++] = wave_read_ind(adev, wave, ixSQ_WAVE_PC_HI);
|
dst[(*no_fields)++] = wave_read_ind(adev, wave, ixSQ_WAVE_PC_HI);
|
||||||
|
@ -337,7 +337,13 @@ const struct nbio_hdp_flush_reg nbio_v4_3_hdp_flush_reg = {
|
|||||||
|
|
||||||
static void nbio_v4_3_init_registers(struct amdgpu_device *adev)
|
static void nbio_v4_3_init_registers(struct amdgpu_device *adev)
|
||||||
{
|
{
|
||||||
return;
|
if (adev->ip_versions[NBIO_HWIP][0] == IP_VERSION(4, 3, 0)) {
|
||||||
|
uint32_t data;
|
||||||
|
|
||||||
|
data = RREG32_SOC15(NBIO, 0, regRCC_DEV0_EPF2_STRAP2);
|
||||||
|
data &= ~RCC_DEV0_EPF2_STRAP2__STRAP_NO_SOFT_RESET_DEV0_F2_MASK;
|
||||||
|
WREG32_SOC15(NBIO, 0, regRCC_DEV0_EPF2_STRAP2, data);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static u32 nbio_v4_3_get_rom_offset(struct amdgpu_device *adev)
|
static u32 nbio_v4_3_get_rom_offset(struct amdgpu_device *adev)
|
||||||
|
@ -8784,6 +8784,13 @@ static int dm_update_crtc_state(struct amdgpu_display_manager *dm,
|
|||||||
if (!dm_old_crtc_state->stream)
|
if (!dm_old_crtc_state->stream)
|
||||||
goto skip_modeset;
|
goto skip_modeset;
|
||||||
|
|
||||||
|
/* Unset freesync video if it was active before */
|
||||||
|
if (dm_old_crtc_state->freesync_config.state == VRR_STATE_ACTIVE_FIXED) {
|
||||||
|
dm_new_crtc_state->freesync_config.state = VRR_STATE_INACTIVE;
|
||||||
|
dm_new_crtc_state->freesync_config.fixed_refresh_in_uhz = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Now check if we should set freesync video mode */
|
||||||
if (amdgpu_freesync_vid_mode && dm_new_crtc_state->stream &&
|
if (amdgpu_freesync_vid_mode && dm_new_crtc_state->stream &&
|
||||||
is_timing_unchanged_for_freesync(new_crtc_state,
|
is_timing_unchanged_for_freesync(new_crtc_state,
|
||||||
old_crtc_state)) {
|
old_crtc_state)) {
|
||||||
|
@ -1498,6 +1498,20 @@ static int smu_disable_dpms(struct smu_context *smu)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* For SMU 13.0.4/11, PMFW will handle the features disablement properly
|
||||||
|
* for gpu reset case. Driver involvement is unnecessary.
|
||||||
|
*/
|
||||||
|
if (amdgpu_in_reset(adev)) {
|
||||||
|
switch (adev->ip_versions[MP1_HWIP][0]) {
|
||||||
|
case IP_VERSION(13, 0, 4):
|
||||||
|
case IP_VERSION(13, 0, 11):
|
||||||
|
return 0;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* For gpu reset, runpm and hibernation through BACO,
|
* For gpu reset, runpm and hibernation through BACO,
|
||||||
* BACO feature has to be kept enabled.
|
* BACO feature has to be kept enabled.
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user