Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp1677502pxb; Thu, 7 Oct 2021 12:40:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw8AnH0khukBGEczzTV1DG7eKId4Br6+gocOAdgfoRt6nQxmV0PQ90bFFraAlhv9KTsE5Ke X-Received: by 2002:a17:90a:5894:: with SMTP id j20mr7153254pji.82.1633635639997; Thu, 07 Oct 2021 12:40:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633635639; cv=none; d=google.com; s=arc-20160816; b=vZPT6PT8+9PWdmdbplv3DkvC+/t8f3Ym5o2O+EjjBA3P3Sm1KujTYWKzZL6vMa9jF0 PGo9lmSIISxX3ou0WVo9wk0PKkmAw0dWI9STc7lRvZuk1uCMgr3ArhVCnx0PuCMeiIZJ GyF/dGVE8mso0Gf0+nPzZLiBszTXkFSVKm8JLkF75uhKcHsKjFY2aPT4mFIoK1WKXw6J 66bwQsR0nnxnrhKYQZRWtXA15AK68Xqf8MYlkdBtsv0sEAom9lMieq0Vr9SXm6coYKA2 dZclkoMwsM9ccD6cPXH6Lq7hSmbfd90bhjW+Y6XL9omIbtJnpbsuYaXjneHY/nOkwjYP Yk5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=mGEEQnSQ3/J39QT52OMn2KrUoLp2EqySBePbdYeKgvc=; b=IC4YTDZDU2mG8/7aMrb/8sCLlE9D0TMHJwoARo8ODPPL/tUrw6Le/nbAuDGuxnFkZb 0+9tDIK+ozk6nvgUpdUe7GBvIQ9OBNFtWU8ZVPp3pmSbmzPkO2heWby3crEJbcLjrtEa gDzeGpc0jYq7m/7H4DtSakPlgkIM8dcdMdDw2+q9tNpsAjAum/cdvIbf5YiWJluBGaUt 23/kP39eE1hZejSqDMhiGYK+QTm+kqGW4bRnJ6ql9GkjVzoReO9cLIzEcet1Gdb28/Fz 6LW0LZ+HWvjMkY4emiP7wbRjO+5jC+h6K7Nxb8sy9dULs6OvaK1qDaAHGPLxsjr5vcCN OzNw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f15si23489001pfc.230.2021.10.07.12.40.27; Thu, 07 Oct 2021 12:40:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241766AbhJGQMR (ORCPT + 99 others); Thu, 7 Oct 2021 12:12:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:59790 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232589AbhJGQMQ (ORCPT ); Thu, 7 Oct 2021 12:12:16 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6CB9D61074; Thu, 7 Oct 2021 16:10:20 +0000 (UTC) Date: Thu, 7 Oct 2021 17:10:18 +0100 From: Catalin Marinas To: Suzuki K Poulose Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, maz@kernel.org, mark.rutland@arm.com, james.morse@arm.com, anshuman.khandual@arm.com, leo.yan@linaro.org, mike.leach@linaro.org, mathieu.poirier@linaro.org, will@kernel.org, lcherian@marvell.com, coresight@lists.linaro.org Subject: Re: [PATCH v2 11/17] arm64: errata: Add workaround for TSB flush failures Message-ID: References: <20210921134121.2423546-1-suzuki.poulose@arm.com> <20210921134121.2423546-12-suzuki.poulose@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210921134121.2423546-12-suzuki.poulose@arm.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 21, 2021 at 02:41:15PM +0100, Suzuki K Poulose wrote: > Arm Neoverse-N2 (#2067961) and Cortex-A710 (#2054223) suffers > from errata, where a TSB (trace synchronization barrier) > fails to flush the trace data completely, when executed from > a trace prohibited region. In Linux we always execute it > after we have moved the PE to trace prohibited region. So, > we can apply the workaround everytime a TSB is executed. > > The work around is to issue two TSB consecutively. > > NOTE: This errata is defined as LOCAL_CPU_ERRATUM, implying > that a late CPU could be blocked from booting if it is the > first CPU that requires the workaround. This is because we > do not allow setting a cpu_hwcaps after the SMP boot. The > other alternative is to use "this_cpu_has_cap()" instead > of the faster system wide check, which may be a bit of an > overhead, given we may have to do this in nvhe KVM host > before a guest entry. > > Cc: Will Deacon > Cc: Catalin Marinas > Cc: Mathieu Poirier > Cc: Mike Leach > Cc: Mark Rutland > Cc: Anshuman Khandual > Cc: Marc Zyngier > Signed-off-by: Suzuki K Poulose Acked-by: Catalin Marinas