Received: by 2002:a05:7412:d008:b0:f9:6acb:47ec with SMTP id bd8csp371632rdb; Tue, 19 Dec 2023 22:11:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IFwddBvt9LpO1T5PWB3ElzPTB/+wsYhoVI/OkyMc+o7YgGCwrZ1hDQ0C8mwZxhn5RzZhbM3 X-Received: by 2002:a17:906:10cc:b0:a23:5c13:20ce with SMTP id v12-20020a17090610cc00b00a235c1320cemr2437064ejv.144.1703052664549; Tue, 19 Dec 2023 22:11:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703052664; cv=none; d=google.com; s=arc-20160816; b=b3R6gPkAwivYBalROHnauR1UXd50bge35/Jr1NYhZ2AGIyFfNkYLMgi4n/o6/+BkHV FjjhcbuUmb0dGorEbYgSQMx0WeZPnFyHmvYaUiA3YVyWT7y98aOQJXalzsmcndDz3STK DaOAPssF+5KhwfpbaT5AwjzN7Zk81ppNqOXzA3aK/XCSdEch9BobkVYL9/ceQ42t8d6t uBYXbpYDOCHBwWHI+O2ntmR7G+iLnWRri5OIXXtVfiH+2KDhGZmQEYRGksrrb6Q6To8R Z9tAJgjD0xgjOQiAIUhvuMCvgxXGzER4bp+6xXYkX9BS6Hu4VTqxey+lw4UaJ6D6cRAM 8aWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=cpBCLiaAy8s2IbGLVtDWniqnGauIl2tLTuAqHIAB9+U=; fh=ajqwJHB27W/J8EhLqkTAR2+yy30uzELfRT2VzGpH0WI=; b=qU222XVtxMhM/+zu4U+OQ2Zkl9N41+bKqh8rjObivi1wTqCqeYtPqjWbKPmFPvDX4+ cG0y8dPzRY/JKJGBml9JtbhPhYoz/hiQ4NfDWDUg/si/gbY5CyA2hOlnLyqs4/tNTkoh vkrgV/v5IG//6P0YKF3/UYglxI+x6r6BcmqECfImD8r3w+uJIvRV1iqjabcdKg+07KIQ S7LhDYt/K+8rqhVlSY0zZUaBsnrqPip9uj6RSYoVG4PiIwxpHzWK723elYZs2m7Nft4e eA6x71dk33msjsarNlOTMX6m8uU/uC0IMyoPzi93iC6arLwDQ3mHiYPALMD6uXlrrzIV 9jUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=UlQShxFu; spf=pass (google.com: domain of linux-kernel+bounces-6405-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-6405-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id d5-20020a170906640500b00a2698cca666si6986ejm.1034.2023.12.19.22.11.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 22:11:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-6405-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=UlQShxFu; spf=pass (google.com: domain of linux-kernel+bounces-6405-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-6405-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id D33621F27DB1 for ; Wed, 20 Dec 2023 06:04:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9E7061D69C; Wed, 20 Dec 2023 06:03:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="UlQShxFu" X-Original-To: linux-kernel@vger.kernel.org Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7046214A93; Wed, 20 Dec 2023 06:03:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 3BK5RaJu006632; Wed, 20 Dec 2023 06:02:51 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type; s=qcppdkim1; bh=cpBCLiaAy8s2IbGLVtDW niqnGauIl2tLTuAqHIAB9+U=; b=UlQShxFuA8TKgCpAOpWy1RRebTMrIeMUgdAJ 2AoS4pAUw+p2WVLdePvzYDlkdKaq1oDty1ztpPI2BJvmOEgzYU/YlbYWmNqTKz/Y Yhr10+6EEqev52sTACeszPRIo1V9zYn5GDZXl3Ur1xSNOR5d0cxW2kIEwwbAf27C Hu7VKCuN6dvrqWjiyEiJodG5o0VcSFeZnF+H5ctbVBJHJ9DSHdWYCayyy3WOL/Va WLjxnWFUDSFdZj3D7yfsYv3bkXsg/0vl/cB3prH8hZf4y6DQzMpm8+82wqRgVDYT Hcnj29V50jDcd9pzWg8WdToKF4j3tPtS80885RbkjgccqWn4Xw== Received: from nasanppmta01.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3v37vxtmqq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 20 Dec 2023 06:02:50 +0000 (GMT) Received: from nasanex01a.na.qualcomm.com (nasanex01a.na.qualcomm.com [10.52.223.231]) by NASANPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 3BK62oVI027932 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 20 Dec 2023 06:02:50 GMT Received: from hu-c-gdjako-lv.qualcomm.com (10.49.16.6) by nasanex01a.na.qualcomm.com (10.52.223.231) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Tue, 19 Dec 2023 22:02:49 -0800 From: Georgi Djakov To: , , , , , CC: , , , , , , , , , , , Subject: [PATCH v3 8/9] iommu/arm-smmu-qcom: Use the custom fault handler on more platforms Date: Tue, 19 Dec 2023 22:02:35 -0800 Message-ID: <20231220060236.18600-9-quic_c_gdjako@quicinc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231220060236.18600-1-quic_c_gdjako@quicinc.com> References: <20231220060236.18600-1-quic_c_gdjako@quicinc.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain X-ClientProxiedBy: nalasex01a.na.qualcomm.com (10.47.209.196) To nasanex01a.na.qualcomm.com (10.52.223.231) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: SpVrOLIBJZdTnDMOr7E47mWpyIJsLFt2 X-Proofpoint-GUID: SpVrOLIBJZdTnDMOr7E47mWpyIJsLFt2 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-09_02,2023-12-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=974 suspectscore=0 impostorscore=0 lowpriorityscore=0 malwarescore=0 bulkscore=0 phishscore=0 spamscore=0 clxscore=1015 mlxscore=0 adultscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2311290000 definitions=main-2312200038 The TBU support is now available, so let's allow it to be used on other platforms that have the Qualcomm SMMU-500 implementation with TBUs. This will allow the context fault handler to query the TBUs when a context fault occurs. Signed-off-by: Georgi Djakov --- drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c index 6b41a0214db1..fd72b69675a7 100644 --- a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c +++ b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c @@ -414,6 +414,10 @@ static const struct arm_smmu_impl qcom_smmu_500_impl = { .reset = arm_mmu500_reset, .write_s2cr = qcom_smmu_write_s2cr, .tlb_sync = qcom_smmu_tlb_sync, +#ifdef CONFIG_ARM_SMMU_QCOM_TBU + .context_fault = qcom_smmu_context_fault, + .context_fault_needs_threaded_irq = true, +#endif }; static const struct arm_smmu_impl sdm845_smmu_500_impl = {