From mboxrd@z Thu Jan 1 00:00:00 1970 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 C047BC77B7C for ; Thu, 25 May 2023 00:34:52 +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=aGt5KgQIEp2+AhinL7WYJK1a4xoBBkX1zEaJbVCETw4=; b=M++WAXo2/TxhJi 0LE08PX7PF5nDnjs43ywJr0TPjMiz/LHf2EMd0D/Z1g4O6CpvlOJGEyiI5wnpJ5StACfT97c2nsvN MTH0KFklz1ST356Osp8iTD8s0tkpM+ySkuK7v5nWBEot9XojFD5rDRLar8GAYXUGYJhIswyUaA1k4 n0CM6KZxTfRmCnzMcspwCksgZI6pK2XGGj3qHa/CMOmuEYimrt+Hhwohlb6sueIg0Ls46937amVQb n45F59EfsfjGXh41CKrOJMKvsKrzNYPfsn1B8WWELVHOyDRnuBMotUQaG3f57TYRIJ4w5ULFzz88M oewhkrgDSmfBcHht/BkA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q1yvs-00F5Oi-2U; Thu, 25 May 2023 00:34:20 +0000 Received: from mail-bn8nam12on2060c.outbound.protection.outlook.com ([2a01:111:f400:fe5b::60c] helo=NAM12-BN8-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q1yvp-00F5Nj-2N for linux-arm-kernel@lists.infradead.org; Thu, 25 May 2023 00:34:20 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ffG3p8aXtmFrcg8tI099dl7GhC4ATL/Ykjy+7ntRipJiMs2ZEEJbkq+NpEJLesEpKftALdlH43mH4V7X60pWdd3FY7QOZmaiLxLHlm15Ao9Ot+3lB1gUGppnc2isyeWTh4dLupa8yF3dWkizPZDWG2KT6q7tS52d3E43fOAlJSA2071V51Xe2BmmMyXsihO+jR7SomyB/xKYXyiUbXPkD7a4E1TtMgTJ9uT4HCd3H9otZU6zdf3ailF4OQXSmwM4ngDk2coK+LAJm+5FkpnRZO6jEtq6S+/yBKLangTCwUUCemfVcvDkBI/6G/0EOJwZYfMlc92JZAmfpsYB04ObkQ== 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=meAeoNCTVIhoab0YoE/cetuhgUZlwY4AUY69S3Yyesk=; b=jCt0MweJMuk0+afeS5Djt2i+mGkq790CGF7MHphjBgPAOfJ5AOzmmyY1R0nkcIEqwovo34ODT8xS4ze1IUw5Bar1jJ/vXyOqovNNhwPHtP1XvQ6PCuh8vNdkuW0FGPiLjxkOOT9J0A2e+SYXklXIc01Vd6BfQ/WV2EIRp2MAgoMH/S+LVn3OQfXSAWZvlpTlXRmyTVMlpMivhA/Y0bcCqUIt6wZyTGiGOi0c1dTVTYpBsaoCsVCuUGECJkD31T6KWR0evaD7qFN7kp7JW0E9G7MxsR/Gta1cTj/hROJ5wZCy6DNjrxlxja4oagvi6ylv8wLYsZ8Yh40ZnCicFTjnRQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=meAeoNCTVIhoab0YoE/cetuhgUZlwY4AUY69S3Yyesk=; b=Jt5nBvAkQ+CbMWaJjxhqJO5p+8PmNTwO4S36E1nTgaqYXp+0ln5qalmm2fTP6Ndgz2oPBLefR/l5pMNSUwHkTGM1nO9hRDOVaty/IoGcn4DmeNtnakViIM18NPZiHtKUAFcOcubURdeMPe1t0ht0YkApzbMTjg3mGF6nj0MvuwQ= Received: from MW4PR03CA0185.namprd03.prod.outlook.com (2603:10b6:303:b8::10) by MN0PR12MB6342.namprd12.prod.outlook.com (2603:10b6:208:3c1::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.28; Thu, 25 May 2023 00:34:07 +0000 Received: from CO1NAM11FT054.eop-nam11.prod.protection.outlook.com (2603:10b6:303:b8:cafe::96) by MW4PR03CA0185.outlook.office365.com (2603:10b6:303:b8::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.29 via Frontend Transport; Thu, 25 May 2023 00:34:06 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by CO1NAM11FT054.mail.protection.outlook.com (10.13.174.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6411.30 via Frontend Transport; Thu, 25 May 2023 00:34:06 +0000 Received: from platform-dev1.pensando.io (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Wed, 24 May 2023 19:34:05 -0500 From: David Clear To: CC: , , , , Subject: Re: ARM64: Question: How to map non-shareable memory Date: Wed, 24 May 2023 17:33:59 -0700 Message-ID: <20230525003359.3690-1-dclear@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1NAM11FT054:EE_|MN0PR12MB6342:EE_ X-MS-Office365-Filtering-Correlation-Id: 1d1cf40e-dbf8-40c2-2e46-08db5cb7bfb3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: LZOxyJ+qJU3ftVafeQfzQWDhAZP6ks55PNJZsA+qr5GrhsxVnkJgaod92bOZjgn44eR0rtD3dDxJIYpILSvWD5xdQRIu/pIbWV9/zNtPfcTcIn9mB3oLKz0Wi8SI4wCg88TtYmU3D/9aT0gjTJwM58GeVPWX/fj6cU81IukAmlkFkNCAnAlVnqFe2tBIviffFCc3upcMKKfdJY1HLUYZaEN0EN7pugKqMA9IG6pJWjkSYtklS8aim5PSUfcM/wpGDQYWHs2UcNz62QxRHJOJ4ds2ig/0+NBwl77THHLgnnN4e7dRZrcIn71F9LuLFy03TPD04tXZLDNFeGNEoOgmb3eLmyQlYggHMDVc56UPqaN/i3fmi+mj9ftJt4XPb8VHq5fPYc4HUx7AOl0wXxaS0eaKKXkHyMSf/YwJkTZWVZTVdOWj5ijKkvlr/07YphRLXbvILAobbg/H/HHMYzNbZlKduaQ5gadCNJ3+cdjxS18Fl4j3wttjS2tcaOm08pSc7dnhFPlwv9i7g9c5ZVivA3+AlwGtJSkda2ThsoBaAW8pnmv+dYLeoJgffG3Jl8vFeFclLzjNlGUaEz6yf/o2duGuwyIl8iPEZts+wH4Kk0SG5v+g99i3Bc1U11nZJMC8Wtry1IgXuK4PjOgLcZqESelgYvlwbIWeJgUi1+2ruTqSmnKJEn/GwiF5lA0o7LrNXio9hUEHi6Dac+33+9e7SA5LKHsoRFPJDyr06V6IZrBD+zIkDjeh2IzuxIdxFYHQdofawNFE6FSDlJ5vDCU+Wg== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230028)(4636009)(396003)(376002)(346002)(39860400002)(136003)(451199021)(40470700004)(46966006)(36840700001)(82310400005)(70206006)(6916009)(70586007)(478600001)(41300700001)(6666004)(54906003)(316002)(5660300002)(8936002)(4326008)(8676002)(2906002)(82740400003)(356005)(1076003)(81166007)(16526019)(186003)(26005)(336012)(83380400001)(40480700001)(426003)(36756003)(2616005)(36860700001)(40460700003)(47076005)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 May 2023 00:34:06.6612 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1d1cf40e-dbf8-40c2-2e46-08db5cb7bfb3 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT054.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0PR12MB6342 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230524_173418_831234_A5C66574 X-CRM114-Status: GOOD ( 18.09 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, 24 May 2023 at 23:59, Ard Biesheuvel wrote: > > Non-shareable cacheable mappings are problematic because they are not > covered by the hardware coherency protocol that keeps caches > synchronized between CPUs and cluster-level and system-level caches. > (IOW, accesses to non-shareable mappings will have snooping disabled). > > This means that, unless your system only has a single CPU and does not > support cache coherent DMA at all, the cached view of those RAM > regions will go out of sync between CPUs and wrt other coherent > masters, which is probably not what you're after. Hi Ard. Thanks for the quick reply. I understand your concerns. The general Linux memory within the (multi-cluster) system is fully coherent, and there are no surprises w.r.t normal SMP system operation and device DMA. The non-coherent memories are outside of the general Linux pool, owned by autonomous hardware units, and are used for product-specific purposes. These memories are either internal to the units (far away from coherence machinery) or purposefully avoid the system coherency controllers so as to not incur the latecy tax in back-to-back dependent transactions. In this product it would be a significant performance burden to maintain coherence with ARM caches that are essentially nothing to do with these unit's operations. For the userspace software that needs to access this memory, the current non-cached mapping is obtained via a device driver and the goal is to minimize the number of discrete memory transactions by supporting cached burst-reads and burst-writes, bracketed with appropriate cache maintenance ops. There are already private caches within the hardware pipelines that software needs to be explicitly flush or invalidate, so this is just one more thing. All that as prelude, it doesn't sound like you're objecting to the notion of supporting a non-shared mapping, more just asking why, and I hope I've given some insight into that. Regards, David. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel