summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPixelBot AutoMerger <android-nexus-securitybot@system.gserviceaccount.com>2024-02-04 18:31:13 -0800
committerSecurityBot <android-nexus-securitybot@system.gserviceaccount.com>2024-02-04 18:31:14 -0800
commitd6bddbc24d71533791170093c5ee15aaa9a9c93c (patch)
tree9d9cd80b4de73149e92ca03f3aa529e81fff27bb
parentdc25875a7af3d8596ecc244fe77e5da95c226216 (diff)
parent55b5ae0f4535b5de37b860dc5209738615d3e245 (diff)
downloadgs-d6bddbc24d71533791170093c5ee15aaa9a9c93c.tar.gz
Merge android13-gs-pixel-5.10-24Q2 into android13-gs-pixel-5.10
SBMerger: 603054162 Change-Id: I41031ac68d042e2987b8e97e872b841e3307ad08 Signed-off-by: SecurityBot <android-nexus-securitybot@system.gserviceaccount.com>
-rw-r--r--BUILD.bazel2
-rw-r--r--Makefile.ext_modules.cloudripper4
-rw-r--r--Makefile.ext_modules.slider4
-rw-r--r--drivers/pci/controller/dwc/pcie-exynos-rc.c10
-rw-r--r--drivers/trusty/trusty-ipc.c2
-rw-r--r--drivers/trusty/trusty.c16
-rw-r--r--include/linux/trusty/arm_ffa.h7
7 files changed, 31 insertions, 14 deletions
diff --git a/BUILD.bazel b/BUILD.bazel
index eeef4415a47a..83b7e362f988 100644
--- a/BUILD.bazel
+++ b/BUILD.bazel
@@ -245,7 +245,7 @@ kernel_modules_install(
"//private/google-modules/power/reset:reset.cloudripper",
"//private/google-modules/touch/common:common.cloudripper",
"//private/google-modules/touch/sec:sec.cloudripper",
- "//private/google-modules/uwb/kernel:kernel.cloudripper",
+ "//private/google-modules/uwb/qorvo/dw3000/kernel:kernel.cloudripper",
"//private/google-modules/video/gchips:gchips.cloudripper",
"//private/google-modules/wlan/bcmdhd4389:bcmdhd4389.cloudripper",
],
diff --git a/Makefile.ext_modules.cloudripper b/Makefile.ext_modules.cloudripper
index 4691ce4bb800..d10f357a54b1 100644
--- a/Makefile.ext_modules.cloudripper
+++ b/Makefile.ext_modules.cloudripper
@@ -37,8 +37,8 @@ has_uapi_headers += video/gchips
install_uapi_headers_targets := $(has_uapi_headers:=_headers_install)
-ifneq ($(wildcard $(KERNEL_SRC)/$(rel_path)/uwb/kernel),)
-ext_modules += uwb/kernel
+ifneq ($(wildcard $(KERNEL_SRC)/$(rel_path)/uwb/qorvo/dw3000/kernel),)
+ext_modules += uwb/qorvo/dw3000/kernel
endif
.PHONY: $(ext_modules) $(install_uapi_headers_targets) depmod allmodules
diff --git a/Makefile.ext_modules.slider b/Makefile.ext_modules.slider
index e851134c6963..d8bc1fc00c0c 100644
--- a/Makefile.ext_modules.slider
+++ b/Makefile.ext_modules.slider
@@ -33,8 +33,8 @@ has_uapi_headers += video/gchips
install_uapi_headers_targets := $(has_uapi_headers:=_headers_install)
-ifneq ($(wildcard $(KERNEL_SRC)/$(rel_path)/uwb/kernel),)
-ext_modules += uwb/kernel
+ifneq ($(wildcard $(KERNEL_SRC)/$(rel_path)/uwb/qorvo/dw3000/kernel),)
+ext_modules += uwb/qorvo/dw3000/kernel
endif
.PHONY: $(ext_modules) $(install_uapi_headers_targets) depmod allmodules
diff --git a/drivers/pci/controller/dwc/pcie-exynos-rc.c b/drivers/pci/controller/dwc/pcie-exynos-rc.c
index 38dc82beea09..b8415f051bdd 100644
--- a/drivers/pci/controller/dwc/pcie-exynos-rc.c
+++ b/drivers/pci/controller/dwc/pcie-exynos-rc.c
@@ -62,6 +62,7 @@
#include <soc/google/s2mpu.h>
#include "../../../iommu/exynos-pcie-iommu-exp.h"
#include <trace/hooks/pci.h>
+#include <soc/google/debug-snapshot.h>
struct exynos_pcie g_pcie_rc[MAX_RC_NUM];
int pcie_is_linkup; /* checkpatch: do not initialise globals to 0 */
@@ -4626,13 +4627,14 @@ int exynos_pcie_rc_itmon_notifier(struct notifier_block *nb, unsigned long actio
exynos_pcie_rc_register_dump(exynos_pcie->ch_num);
}
- } else if (exynos_pcie->ip_ver == 0x984500){
+ } else if (exynos_pcie->ip_ver >= 0x984500){
if ((itmon_info->port && !strcmp(itmon_info->port, "HSI2")) ||
(itmon_info->dest && !strcmp(itmon_info->dest, "HSI2"))) {
- regmap_read(exynos_pcie->pmureg, exynos_pcie->pmu_offset, &val);
- dev_info(dev, "### PMU PHY Isolation : 0x%x\n", val);
+ if (exynos_pcie->ch_num == 0)
+ return NOTIFY_DONE;
- exynos_pcie_rc_register_dump(exynos_pcie->ch_num);
+ // force reset and get dump
+ dbg_snapshot_emergency_reboot("# HSI2 FORCE RESET AND GET S2D DUMP!! #\n");
}
} else {
dev_info(dev, "skip register dump(ip_ver = 0x%x)\n", exynos_pcie->ip_ver);
diff --git a/drivers/trusty/trusty-ipc.c b/drivers/trusty/trusty-ipc.c
index 83df24e40660..a7d7fd13eb78 100644
--- a/drivers/trusty/trusty-ipc.c
+++ b/drivers/trusty/trusty-ipc.c
@@ -210,7 +210,7 @@ static struct tipc_msg_buf *vds_alloc_msg_buf(struct tipc_virtio_dev *vds,
{
int ret;
struct tipc_msg_buf *mb;
- size_t sz = vds->msg_buf_max_sz;
+ size_t sz = ALIGN(vds->msg_buf_max_sz, PAGE_SIZE);
pgprot_t pgprot = share_write ? PAGE_KERNEL : PAGE_KERNEL_RO;
/* allocate tracking structure */
diff --git a/drivers/trusty/trusty.c b/drivers/trusty/trusty.c
index 88c89a3fe7de..b7f43f54037b 100644
--- a/drivers/trusty/trusty.c
+++ b/drivers/trusty/trusty.c
@@ -349,7 +349,7 @@ int trusty_transfer_memory(struct device *dev, u64 *id,
emad->comp_mrd_offset = comp_mrd_offset;
emad->reserved_8_15 = 0;
}
- comp_mrd->total_page_count = len / PAGE_SIZE;
+ comp_mrd->total_page_count = len / FFA_PAGE_SIZE;
comp_mrd->address_range_count = nents;
comp_mrd->reserved_8_15 = 0;
@@ -364,7 +364,7 @@ int trusty_transfer_memory(struct device *dev, u64 *id,
for (i = 0; i < lcount; i++) {
cons_mrd[i].address = sg_dma_address(sg);
- cons_mrd[i].page_count = sg_dma_len(sg) / PAGE_SIZE;
+ cons_mrd[i].page_count = sg_dma_len(sg) / FFA_PAGE_SIZE;
cons_mrd[i].reserved_12_15 = 0;
sg = sg_next(sg);
}
@@ -617,6 +617,14 @@ static int trusty_init_msg_buf(struct trusty_state *s, struct device *dev)
s->ffa_local_id = smc_ret.r2;
s->ffa_remote_id = 0x8000;
+ /*
+ * The pKVM hypervisor uses the same page size as the host, including for
+ * stage-2 mappings. So the rx/tx buffers need to be page-sized multiple,
+ * and page-aligned.
+ *
+ * TODO: This can be made more generic by discovering the required size
+ * through SMC_FC_FFA_FEATURES later.
+ */
s->ffa_tx = kmalloc(PAGE_SIZE, GFP_KERNEL);
if (!s->ffa_tx) {
ret = -ENOMEM;
@@ -639,8 +647,8 @@ static int trusty_init_msg_buf(struct trusty_state *s, struct device *dev)
goto err_unaligned_rx_buf;
}
- smc_ret = trusty_smc8(SMC_FCZ_FFA_RXTX_MAP, tx_paddr, rx_paddr, 1, 0,
- 0, 0, 0);
+ smc_ret = trusty_smc8(SMC_FCZ_FFA_RXTX_MAP, tx_paddr, rx_paddr,
+ PAGE_SIZE / FFA_PAGE_SIZE, 0, 0, 0, 0);
if (smc_ret.r0 != SMC_FC_FFA_SUCCESS) {
dev_err(s->dev, "%s: SMC_FCZ_FFA_RXTX_MAP failed 0x%lx 0x%lx 0x%lx\n",
__func__, smc_ret.r0, smc_ret.r1, smc_ret.r2);
diff --git a/include/linux/trusty/arm_ffa.h b/include/linux/trusty/arm_ffa.h
index ab7b2afb794c..95d31b32bac6 100644
--- a/include/linux/trusty/arm_ffa.h
+++ b/include/linux/trusty/arm_ffa.h
@@ -36,6 +36,13 @@
SMC_FASTCALL64_NR(SMC_ENTITY_SHARED_MEMORY, nr)
/**
+ * FF-A specification mentions explicitly about '4K pages'. This should
+ * not be confused with the kernel PAGE_SIZE, which is the translation
+ * granule kernel is configured and may be one among 4K, 16K and 64K.
+ */
+#define FFA_PAGE_SIZE SZ_4K
+
+/**
* typedef ffa_endpoint_id16_t - Endpoint ID
*
* Current implementation only supports VMIDs. FFA spec also support stream