Message ID | 6-v3-d794f8d934da+411a-smmuv3_newapi_p1_jgg@nvidia.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> 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 1E0B3C4167B for <linux-arm-kernel@archiver.kernel.org>; Tue, 5 Dec 2023 19:16:20 +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=KL/dfgQzy0WaopAPvqJ9rJEVM71kzltFbI36AcBD6C0=; b=cmOvFv2jV0jsJb 0epluLn+KJv1Fn6uXJ63DQXzH1BzDfq08IDAQPihW/KbB5+LsnjWVbTG47m3gOWoj+MonML2RKGsE gwmzrMqJKBg+ZgR+q6KZZ2XPzOAAM9XZfKjYXKuoLbIbEwxeCQDpSjcFESKv5YSliSINKkVITC6Jz Wv/1VnA+1cDUo0Z547KQpRivjZxSloXZVdSqiuvMU/s8fQylAKaywx46+JGfMoyCSZZmqLbONUa5k 0y3FTe1eXgLMFI40nTpg9wCra30qB4x4tiq8Npfki3Gx1NkRi+9mwAYBmerU2RsONXS5ZBz0lk671 TLJv3VgWa5skK7/fNMEQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rAata-008FhT-0z; Tue, 05 Dec 2023 19:15:50 +0000 Received: from mail-mw2nam12on20601.outbound.protection.outlook.com ([2a01:111:f400:fe5a::601] helo=NAM12-MW2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rAasz-008Ey2-0O for linux-arm-kernel@lists.infradead.org; Tue, 05 Dec 2023 19:15:19 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lrjXIxNK5m3FN4bbfn65c12Ys1zwwc7636hsKlnU73aMFvxnmmz7EZKkbG7jQnQHz9/R8Iyle/tkTuvjuWLnE8iH6MtgGOIlTMBCw4uGOc7hKo/VcMU/P0kcDfhyHuOJ+w/DFOKKXRpK3bwqy4XibTwsWdBSv2mp8DWx7CTY+qUljqc6wi19Vo6q0wD8PIvg1k2rWPzRJLsqtHb0k2d17tSED2ZGvtKJrrFFs7qRqC8LrS749vKBaNq/QRcVD3sWJsvsvqPqOuTdMNbcBUOlLCMoBQJd9fw7QupETPVFrlg0q8i4Ts8xX698jA8PCWGlLRo3LxUy4MhTPnXno9Uf6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=dg8V+OAhek6zXi2+rVrCY18eyZ06iQ6unxFiN6ZL4ak=; b=gQG9mP6iCzxQZHvIs54mXnjIuYf/L6y0w2A2Hz82LIPPBX7/V4u9Ff7Wi4GUO7jHgFFa1B6pBpdUIa5s9tpiglfrDSD2fi5f1CqAIjV8VFzpV2BiVdqqGmbxRO7HERYAeCWO/j17+o1fGAdJv1SPWp1v/5ViUelE9eWAonOoC+2tQpZV564KxxIB1ne+x+72pLVLnMWQYZGwnmmFou3+TKgGZn4dbHefbeP8a+Xqi4HjJvwahhjBNUEIwLJytmqphX50MMFdzdvAHJB1WZM47C/X/Onq4NdZndqQiAWg70lni46HOuF0ff4HkNUYLRCl0z+Jhygr9ax5dLScBKJDgw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dg8V+OAhek6zXi2+rVrCY18eyZ06iQ6unxFiN6ZL4ak=; b=pegYqDLfjmoECO814Bu+rDfwK8sulvGnXCHvnQFN6S3FhFp3gMKd1cwbR2jrqov6sN6ONRRXN2+ys5cMjKnClYU0ErcythzoiZa6X1wXOLr9YUnAc4eXyyuckoJZ0+ILoSg3syrzQ7MTzfeB0n0cAih4V9rJhmJBdF/1Lu5g0KDZxiGosj0mMInwbwhQ4uxcLT5fa6vMnxLv/piXATXnKCyQ3nJ9nljgHf3E2RNG+GRwn4c7HpEDK1skUgfnteoYrvFcRYTWnSl1Z84JWvmzqX7YdkFM3tsIVtDxcK4VPlnwE8KJuBp3UMf7l5AnLrvLx1mcTO83hh9dC1QAEKQjnw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from LV2PR12MB5869.namprd12.prod.outlook.com (2603:10b6:408:176::16) by PH7PR12MB6588.namprd12.prod.outlook.com (2603:10b6:510:210::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7046.34; Tue, 5 Dec 2023 19:14:59 +0000 Received: from LV2PR12MB5869.namprd12.prod.outlook.com ([fe80::60d4:c1e3:e1aa:8f93]) by LV2PR12MB5869.namprd12.prod.outlook.com ([fe80::60d4:c1e3:e1aa:8f93%4]) with mapi id 15.20.7046.034; Tue, 5 Dec 2023 19:14:59 +0000 From: Jason Gunthorpe <jgg@nvidia.com> To: iommu@lists.linux.dev, Joerg Roedel <joro@8bytes.org>, linux-arm-kernel@lists.infradead.org, Robin Murphy <robin.murphy@arm.com>, Will Deacon <will@kernel.org> Cc: Eric Auger <eric.auger@redhat.com>, Moritz Fischer <mdf@kernel.org>, Michael Shavit <mshavit@google.com>, Nicolin Chen <nicolinc@nvidia.com>, patches@lists.linux.dev, Shameer Kolothum <shameerali.kolothum.thodi@huawei.com> Subject: [PATCH v3 06/19] iommu/arm-smmu-v3: Move arm_smmu_rmr_install_bypass_ste() Date: Tue, 5 Dec 2023 15:14:38 -0400 Message-ID: <6-v3-d794f8d934da+411a-smmuv3_newapi_p1_jgg@nvidia.com> In-Reply-To: <0-v3-d794f8d934da+411a-smmuv3_newapi_p1_jgg@nvidia.com> References: X-ClientProxiedBy: BL1P222CA0001.NAMP222.PROD.OUTLOOK.COM (2603:10b6:208:2c7::6) To LV2PR12MB5869.namprd12.prod.outlook.com (2603:10b6:408:176::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: LV2PR12MB5869:EE_|PH7PR12MB6588:EE_ X-MS-Office365-Filtering-Correlation-Id: 5a0bcfa3-059c-4d28-be95-08dbf5c675d1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: cbjyhkuqySC509SCzfTs0j6CXk780+tudRkC02nvPACM/mANZNqfod0ISjVyXwgHf90UecZuhMOK8PjscbZrm4/3R4XRUJ8qZzKYjoacEH2fxAELzMx1lOeUfYjJR5ZAzxQioCyLANGMULmGZxJucWyIi6iVWC7xvU0MHkz2R0KAEe+Cn7ePDjHlLjF+S2CPvw9+gI2vXLja5R9FACa74chwKg+Sfv+2j0lj7lCiXEV3Ase8rvh0Cnk2Ph59V8QZME72OMaByx772Tepw90aoba8PCkSD4h+3tGfLjjY4/aqfKS2WO3JKxHRP35sCO9fV8vrK0jvfh6mpJW5gIqZVRv8qn2sqq8E9r2X87UzTTSC/DaYK6QV8/NNYJ+gpqI0X2P6aqWByNOilZWtEPG40pk797ZdV0BHGHxdc19PllrboZbh9EarCHLszj8RpzsZ2tLAmw9/hw+Akjo2l0ppe5uykQMdYab0CE8ETz3x/IpVFI4CPAHl4taaAGzXjjIkh4Y4l8du8v0x+Jnio7lRzSJSpSsnzORc2c8vR+MCMyEXboVbddejXXEqkuYe4+nT/rvmJ5KNr7uNxpbWzE0fyYcH28WGt29pZ9SGxCQjtcs= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:LV2PR12MB5869.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(39860400002)(366004)(136003)(396003)(346002)(376002)(230922051799003)(1800799012)(451199024)(64100799003)(186009)(478600001)(6512007)(6506007)(8936002)(6486002)(2616005)(26005)(6666004)(54906003)(66476007)(110136005)(66556008)(8676002)(66946007)(4326008)(316002)(83380400001)(38100700002)(7416002)(36756003)(5660300002)(2906002)(86362001)(41300700001)(4216001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: utiL6dv3bGFA/opGA5kPeiiI2ugpR41pjryxhlh0BsSfiQjLdzoreqH4gPadFCQHNuOswXd6aHGiJM8Ej0zransOSawOnEln9sJYej/3e8xjpK8Egeh75W5kfjzV+gZKBB5Ty22IDOITjLGMWM6BNeQg8hroPSIM3cU4ZOTCpjGWURzLEGxaqONGtm6Z+fW3Kbo046rp2RQiA96Gii/ZNvOJLtPM3xzIRDeuIhZ/9KDjcGgf918sXg8/MoXndbM8YUEKAdnmYAiuzHlNRRp5anjP3kt1B6QV9hHMJ/TG1UFy+kuZ8PA04qTTwOtJQyWPZWxvyvNVJGfRmHiKgH/r7JwU6mTaMrI+ddAAVeAh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Adq+5eypBM+9fBHsgkOE8jIivs/aVg6hM2etwUKucL/uWQgYz7AZIfXmq05p3WaMpvAEWjI8G9XVJuA5+JGtzgfh0zfGo/AmXJzeoaug5uk2N/Py6wheKvqmJQ5zuGp4J7phSpMaOZN/syzJwoEkG+5K/0CDg/gMy X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5a0bcfa3-059c-4d28-be95-08dbf5c675d1 X-MS-Exchange-CrossTenant-AuthSource: LV2PR12MB5869.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Dec 2023 19:14:53.3076 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ZFy0bin0S2RXYsEiOUNMQbYaa2+jnRHr+/UTVHCqbtQmtJbI+WK4P7yE4uCE0X0P X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB6588 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231205_111513_214670_2EA362F2 X-CRM114-Status: GOOD ( 11.71 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
Update SMMUv3 to the modern iommu API (part 1/3)
|
expand
|
diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c index 0a4bf1cbe42293..95c78ccaebd439 100644 --- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c +++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c @@ -86,6 +86,8 @@ static struct arm_smmu_option_prop arm_smmu_options[] = { { 0, NULL}, }; +static void arm_smmu_rmr_install_bypass_ste(struct arm_smmu_device *smmu); + static void parse_driver_options(struct arm_smmu_device *smmu) { int i = 0; @@ -3201,6 +3203,9 @@ static int arm_smmu_init_strtab_linear(struct arm_smmu_device *smmu) cfg->strtab_base_cfg = reg; arm_smmu_init_bypass_stes(strtab, cfg->num_l1_ents); + + /* Check for RMRs and install bypass STEs if any */ + arm_smmu_rmr_install_bypass_ste(smmu); return 0; } @@ -4014,9 +4019,6 @@ static int arm_smmu_device_probe(struct platform_device *pdev) /* Record our private device structure */ platform_set_drvdata(pdev, smmu); - /* Check for RMRs and install bypass STEs if any */ - arm_smmu_rmr_install_bypass_ste(smmu); - /* Reset the device */ ret = arm_smmu_device_reset(smmu, bypass); if (ret)