From patchwork Thu Mar 7 19:05:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Georgi Djakov X-Patchwork-Id: 13586158 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4AF84C54E4A for ; Thu, 7 Mar 2024 19:06:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=P4zr5HtgpAi+4LsHkgCLJ8Nc2XhZ1Z2lB7t+EKJReDI=; b=TeDlz50Wa8uwoo z5DYsiHg92dOgGyorS02E1XJck+LcPyzlS4tHcB/v5MSltAAVE2fzJ5JH6QKx2BAnCbZLiMTeGknZ 5UxAoZWfAsio+/kKa/aEDEUavM/GagP8gb+TsImeutlQdePhIYsZ+myfv395sNRS3WautSXp0+r4N GkmT7K/sQGxm6c2XPemVXTmO6y7h4Mac65eHvhNRQGvCyU9ou7xJ8/7N0F/8u4lVqigDBYJ9vMuan s3XipQ1N07cnvwLn72t95MTgW7CzKc6fppAkDdGltMATMwtYdKVhgYgyA01eV5HfdPtQrPq5qVvVd ND2rNloeI5mxH4lNrEhg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1riJ4L-00000005yf8-2sEF; Thu, 07 Mar 2024 19:06:17 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1riJ4E-00000005yZw-1UHb for linux-arm-kernel@bombadil.infradead.org; Thu, 07 Mar 2024 19:06:10 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Type:Content-Transfer-Encoding :MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From: Sender:Reply-To:Content-ID:Content-Description; bh=jqzwN1vuCFLLJR0ky4qG5pZmihPpcc82QgRh0kKcLxI=; b=NGmig74F/e2+FH4qDWVXYkR7+R Etzut695X6X7u46nrzXOQT5x2izQnqTRyfbmU4uZBMYPXvBKy7ZPlph//CT29yR/w30AvdYg0Uafz nknfqAMu+M2lmdd1doxgcYi6csUNn2o2wAgPlKz/mQk5JphPkVbapzT8VO4YFgNS+8q5L3rer5NyU XJesfmuJw3vdkZrIAq/YhxUcqnvNLAjBble9G8IM4tylx59/I/Geem95BxRdoGK+F2WwHi9uuRfwB 66dDRUPDd96bHGn4X+/KxUzW5FrcuRJB/vEH5VopCAXNkGfMfRE1zg2hSb/mSByVuKZfyTCihdJfg BSGxl2ZA==; Received: from mx0a-0031df01.pphosted.com ([205.220.168.131]) by desiato.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1riJ46-00000006rTH-1bkm for linux-arm-kernel@lists.infradead.org; Thu, 07 Mar 2024 19:06:09 +0000 Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 427FxeUs020087; Thu, 7 Mar 2024 19:05:49 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-transfer-encoding:content-type; s= qcppdkim1; bh=jqzwN1vuCFLLJR0ky4qG5pZmihPpcc82QgRh0kKcLxI=; b=Uy pve7XRoyVqstRdYn8wkOgsoXCh1x4hD2YgWbwhCgCfIsSK1eCQp8KIxVtiX8KCfc hqKlltm5aPFl3X3yg0qMf4J/a1cTKjdZrmmgDz9+qez/8AMO8qeB2vvll171ajII GI2zbQI3sndMbr4aSQC+GBnl1gE2BXWlx0wDVQRWXaZBLv1SJeslYjEV4rhALVa+ MMLaAYKSz1RUsCD2HveVRv0Xt/6LMN2ZUVSzl9QVGy9WUkT08DUpNGJOs6mPPAIQ pqmuWcH8olYZluWy5N5DG3Snn11i813xDBAlmBqyNmbBrTpPclFFfVIteSZrOs8q E07zNTgIEpo+bvpEr4jw== Received: from nasanppmta03.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3wq7husfgc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 07 Mar 2024 19:05:48 +0000 (GMT) Received: from nasanex01a.na.qualcomm.com (nasanex01a.na.qualcomm.com [10.52.223.231]) by NASANPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 427J5lUL028098 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 7 Mar 2024 19:05:47 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; Thu, 7 Mar 2024 11:05:46 -0800 From: Georgi Djakov To: , , , , , , CC: , , , , , , , , , , , Subject: [PATCH v6 6/7] iommu/arm-smmu-qcom: Use the custom fault handler on more platforms Date: Thu, 7 Mar 2024 11:05:24 -0800 Message-ID: <20240307190525.395291-7-quic_c_gdjako@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240307190525.395291-1-quic_c_gdjako@quicinc.com> References: <20240307190525.395291-1-quic_c_gdjako@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.49.16.6] 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-GUID: 8k0mZPwDEQVrlJ1exsBc7JoywBNsOFg_ X-Proofpoint-ORIG-GUID: 8k0mZPwDEQVrlJ1exsBc7JoywBNsOFg_ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-03-07_14,2024-03-06_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 adultscore=0 clxscore=1015 phishscore=0 priorityscore=1501 mlxlogscore=999 mlxscore=0 spamscore=0 malwarescore=0 impostorscore=0 lowpriorityscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2402120000 definitions=main-2403070133 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240307_190602_899430_82475F3C X-CRM114-Status: GOOD ( 13.08 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 7a58b1b96bca..08e0ad325bab 100644 --- a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c +++ b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c @@ -413,6 +413,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 = {