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 193B1C433F5 for ; Thu, 3 Feb 2022 12:32:34 +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-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=HprlWB4ex2L7h0NZhKarmRsJd/CRbjFXdbdeTlfyYbA=; b=VWfEp56sCCus2v DRxE1T6tE/K8r5N5uBNdEswVh3t82tylBv9OtWPUSpbwQpz13OFj1db7Zo/2z8leJn2jOnAv2SR4i vozGXYM/N02GJH2I2+1fNm0Wymo+cAtuc/KjYiA0IBeZmjTdfr6y/+v9NT2EaYLAnpm/sLKhGTM5X QYuTlj1cR7hiwcteaNkGXl8wGjbEbwvgA9KknYfFpy75GIHCdH0z87cilYnQ9mU5e+FCxBvs+a08d KB7cdWcszwqQoLG5cOkBBYk0sqFAfo4WezTvZukzEqlYs4DnNqX9KxzidOUh+K4iy30u0xKEkorLU 634nds/GfqYsDiz6/3rA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nFbG1-001Gsk-Ci; Thu, 03 Feb 2022 12:30:37 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nFb6x-001DNw-OM for linux-arm-kernel@lists.infradead.org; Thu, 03 Feb 2022 12:21:17 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id B3C0211D4; Thu, 3 Feb 2022 04:21:14 -0800 (PST) Received: from [10.57.89.13] (unknown [10.57.89.13]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 74C233F774; Thu, 3 Feb 2022 04:21:13 -0800 (PST) Message-ID: <0cfe7af6-d401-b244-d508-9fcd35ebe07c@arm.com> Date: Thu, 3 Feb 2022 12:21:12 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.5.1 Subject: Re: [PATCH] coresight: trbe: Move check for kernelspace unmapped at EL0 to probe To: Sudeep Holla , Anshuman Khandual Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Mathieu Poirier , Mike Leach , Leo Yan , coresight@lists.linaro.org References: <20220201122212.3009461-1-sudeep.holla@arm.com> <01a43ba2-a633-f215-a688-2bda293b5a47@arm.com> <20220203101111.mx3o5kmo2bkjirn4@bogus> From: Suzuki K Poulose In-Reply-To: <20220203101111.mx3o5kmo2bkjirn4@bogus> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220203_042115_918210_3BA22848 X-CRM114-Status: GOOD ( 21.57 ) 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 03/02/2022 12:04, Sudeep Holla wrote: > On Thu, Feb 03, 2022 at 11:55:58AM +0530, Anshuman Khandual wrote: >> >> >> On 2/1/22 5:52 PM, Sudeep Holla wrote: >>> Currently with the check present in the module initialisation, it shouts >>> on all the systems irrespective of presence of coresight trace buffer >>> extensions. >> >> IIUC a system with CONFIG_CORESIGHT_TRBE enabled but without a TRBE DT >> i.e "arm,trace-buffer-extension" complains about kernel space unmapping >> at EL0 (even though it does not even really have TRBE HW to initialize). > > > Correct. Basically, this error will be seen on all systems(DT and ACPI) when > the module is compiled. It really doesn't matter if the system supports TRBE. > >>> >>> Similar to Arm SPE perf driver, move the check for kernelspace unmapping >>> when running at EL0 to the device probe instead of module initialisation. >> >> Makes sense. >> > > Thanks. > >>> >>> Cc: Mathieu Poirier >>> Cc: Suzuki K Poulose >>> Cc: Mike Leach >>> Cc: Leo Yan >>> Cc: Anshuman Khandual >>> Cc: coresight@lists.linaro.org >>> Signed-off-by: Sudeep Holla >>> --- >>> drivers/hwtracing/coresight/coresight-trbe.c | 10 +++++----- >>> 1 file changed, 5 insertions(+), 5 deletions(-) >>> >>> diff --git a/drivers/hwtracing/coresight/coresight-trbe.c b/drivers/hwtracing/coresight/coresight-trbe.c >>> index 276862c07e32..3fe2ce1ba5bf 100644 >>> --- a/drivers/hwtracing/coresight/coresight-trbe.c >>> +++ b/drivers/hwtracing/coresight/coresight-trbe.c >>> @@ -1423,6 +1423,11 @@ static int arm_trbe_device_probe(struct platform_device *pdev) >>> struct device *dev = &pdev->dev; >>> int ret; >>> >> >> Could you please add a similar comment like SPE driver regarding how >> the TRBE buffer will be inaccessible, if kernel gets unmapped at EL0 >> and trace capture will terminate. >> > > Sure I can add that. But if the device probe fails, will you be able to even > start the trace capture, sorry I didn't get what you mean by "trace capture > will terminate". I assume it must be "trace capture is not possible or not > allowed" IIUC. > "Trace capture is not possible with kernel page table isolation" is good enough. Thanks for making these changes Cheers Suzuki _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel