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 X-Spam-Level: X-Spam-Status: No, score=-11.1 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B3BB9C43461 for ; Mon, 14 Sep 2020 02:21:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 71C5A2177B for ; Mon, 14 Sep 2020 02:21:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=mg.codeaurora.org header.i=@mg.codeaurora.org header.b="PFCu5VB2" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725994AbgINCVV (ORCPT ); Sun, 13 Sep 2020 22:21:21 -0400 Received: from mail29.static.mailgun.info ([104.130.122.29]:35074 "EHLO mail29.static.mailgun.info" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725965AbgINCVQ (ORCPT ); Sun, 13 Sep 2020 22:21:16 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1600050075; h=In-Reply-To: Content-Type: MIME-Version: References: Message-ID: Subject: Cc: To: From: Date: Sender; bh=YR2CY8Aoc5W8KKHnf5cqCmesLaHWMxeTt/MPPHRHUhg=; b=PFCu5VB2x2kbmDUc8mnQKRblSZtptsseFXAT41Pm7V8N8k+31HBGpF0tIyajqF0+FkrxnEtq k4+maB3NyFIUKEGXrf7nAa7EQEtfDaIXquQT35sfD3XGF6wEkIcVM1Wqcar0ll8LZNRE59IC rAp5iB8uI3rpkJOAkBeRDOziWj0= X-Mailgun-Sending-Ip: 104.130.122.29 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n01.prod.us-west-2.postgun.com with SMTP id 5f5ed338d7b4e269139cd2b9 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Mon, 14 Sep 2020 02:19:36 GMT Received: by smtp.codeaurora.org (Postfix, from userid 1001) id BB24EC43387; Mon, 14 Sep 2020 02:19:36 +0000 (UTC) Received: from codeaurora.org (unknown [180.166.53.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: tingwei) by smtp.codeaurora.org (Postfix) with ESMTPSA id 46145C433CA; Mon, 14 Sep 2020 02:19:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 46145C433CA Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=tingweiz@codeaurora.org Date: Mon, 14 Sep 2020 10:19:28 +0800 From: Tingwei Zhang To: Suzuki K Poulose Cc: tingwei@codeaurora.org, mathieu.poirier@linaro.org, alexander.shishkin@linux.intel.com, mike.leach@linaro.org, tsoni@codeaurora.org, saiprakash.ranjan@codeaurora.org, kim.phillips@arm.com, jinlmao@codeaurora.org, gregkh@linuxfoundation.org, coresight@lists.linaro.org, rdunlap@infradead.org, ykaukab@suse.de, linux@armlinux.org.uk, linux-kernel@vger.kernel.org, leo.yan@linaro.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v10 09/24] coresight: etm3x: allow etm3x to be built as a module Message-ID: <20200914021927.GB22686@codeaurora.org> References: <20200821034445.967-1-tingwei@codeaurora.org> <20200821034445.967-10-tingwei@codeaurora.org> <0c2abd02-4fe6-5eaa-e9d3-41811f062ac1@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0c2abd02-4fe6-5eaa-e9d3-41811f062ac1@arm.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Sep 13, 2020 at 09:17:05PM +0800, Suzuki K Poulose wrote: > On 08/21/2020 04:44 AM, Tingwei Zhang wrote: > >From: Kim Phillips > > > >Allow to build coresight-etm3x as a module, for ease of development. > > > >- Kconfig becomes a tristate, to allow =m > >- append -core to source file name to allow module to > > be called coresight-etm3x by the Makefile > >- add an etm_remove function, for module unload > >- add a MODULE_DEVICE_TABLE for autoloading on boot > > > >Cc: Mathieu Poirier > >Cc: Leo Yan > >Cc: Alexander Shishkin > >Cc: Randy Dunlap > >Cc: Suzuki K Poulose > >Cc: Greg Kroah-Hartman > >Cc: Russell King > >Signed-off-by: Kim Phillips > >Signed-off-by: Tingwei Zhang > >Reviewed-by: Mike Leach > > > >diff --git a/drivers/hwtracing/coresight/coresight-etm3x.c > b/drivers/hwtracing/coresight/coresight-etm3x-core.c > >similarity index 97% > >rename from drivers/hwtracing/coresight/coresight-etm3x.c > >rename to drivers/hwtracing/coresight/coresight-etm3x-core.c > >index bf22dcfd3327..ba9c86497acb 100644 > >--- a/drivers/hwtracing/coresight/coresight-etm3x.c > >+++ b/drivers/hwtracing/coresight/coresight-etm3x-core.c > >@@ -895,6 +895,23 @@ static int etm_probe(struct amba_device *adev, > const struct amba_id *id) > > return ret; > > } > >+static int __exit etm_remove(struct amba_device *adev) > >+{ > >+ struct etm_drvdata *drvdata = dev_get_drvdata(&adev->dev); > >+ > >+ etm_perf_symlink(drvdata->csdev, false); > >+ > >+ if (--etm_count == 0) { > >+ > cpuhp_remove_state_nocalls(CPUHP_AP_ARM_CORESIGHT_STARTING); > >+ if (hp_online) > >+ cpuhp_remove_state_nocalls(hp_online); > >+ } > >+ > >+ coresight_unregister(drvdata->csdev); > >+ > >+ return 0; > >+} > >+ > > Don't we need to fix the races like we did for ETMv4 ? > > Suzuki > Yes, we need that. Unfortunately, I don't have ETMv3 devie to verify the change. Mathieu has been very kind to offer his help to take care of ETMv3. Thanks, Tingwei > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel 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 X-Spam-Level: X-Spam-Status: No, score=-12.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5ABE4C2D0A7 for ; Mon, 14 Sep 2020 02:21:24 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0B1532168B for ; Mon, 14 Sep 2020 02:21:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="xlbt+G6w"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=mg.codeaurora.org header.i=@mg.codeaurora.org header.b="EBRI7xG3" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0B1532168B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=brojmBBPLAfTKy5PkZv1wGNOtfY9jsgXPasOiBVEvKs=; b=xlbt+G6wPC2AoVrgSd6hW7mzQ EtHTK4Eyg5xkdO418HadVx1ZzxhAsangOu39go2cjqW2jpY0msbky52XUh+Zqi9AOrnxyrfLdINrC oWFc83rG6H8YgH55imlsWlD+epskACqzidFx4yy+DfMkqXvOSAj2BgCAOR1+F0umEIhOTFwilVmKM RIftcfNJH27k6fr3d/ypD2BCxsvSUmmR2NUZWfshBI/kXVviqRh3TrbhmYUzIQzIfdmJSR1D8nd7S BnouW9pdC+o4O2viECDwW2Z+PHznk+cxh5s/+CmXTtRbbE0sNZBNWjK4tXSMNaxRWPvX2nkGI8L4v 5FoggTTSg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kHe6A-0008WG-DH; Mon, 14 Sep 2020 02:20:06 +0000 Received: from mail29.static.mailgun.info ([104.130.122.29]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kHe62-0008Uu-4V for linux-arm-kernel@lists.infradead.org; Mon, 14 Sep 2020 02:20:00 +0000 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1600049999; h=In-Reply-To: Content-Type: MIME-Version: References: Message-ID: Subject: Cc: To: From: Date: Sender; bh=YR2CY8Aoc5W8KKHnf5cqCmesLaHWMxeTt/MPPHRHUhg=; b=EBRI7xG3sgXch+xJGVgzmry9bZUXQMZSmGSe+IV5jJa/XHlyfX2uNgIki2hrcZbAs+oSbIqF C5OR06a4/RZY45OlTxFZKNRgfIHF5OpoZuqJuXh21+1NgLraQ20+91Wmrq5A3J9Xcz6IvZ2f tikzksvhKoyLEVfRMxS1CMZTkno= X-Mailgun-Sending-Ip: 104.130.122.29 X-Mailgun-Sid: WyJiYzAxZiIsICJsaW51eC1hcm0ta2VybmVsQGxpc3RzLmluZnJhZGVhZC5vcmciLCAiYmU5ZTRhIl0= Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n06.prod.us-east-1.postgun.com with SMTP id 5f5ed33973afa3417eca0512 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Mon, 14 Sep 2020 02:19:37 GMT Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 9B98AC433FF; Mon, 14 Sep 2020 02:19:36 +0000 (UTC) Received: from codeaurora.org (unknown [180.166.53.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: tingwei) by smtp.codeaurora.org (Postfix) with ESMTPSA id 46145C433CA; Mon, 14 Sep 2020 02:19:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 46145C433CA Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=tingweiz@codeaurora.org Date: Mon, 14 Sep 2020 10:19:28 +0800 From: Tingwei Zhang To: Suzuki K Poulose Subject: Re: [PATCH v10 09/24] coresight: etm3x: allow etm3x to be built as a module Message-ID: <20200914021927.GB22686@codeaurora.org> References: <20200821034445.967-1-tingwei@codeaurora.org> <20200821034445.967-10-tingwei@codeaurora.org> <0c2abd02-4fe6-5eaa-e9d3-41811f062ac1@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <0c2abd02-4fe6-5eaa-e9d3-41811f062ac1@arm.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200913_221959_298622_CC46EC78 X-CRM114-Status: GOOD ( 22.14 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: tsoni@codeaurora.org, saiprakash.ranjan@codeaurora.org, kim.phillips@arm.com, mathieu.poirier@linaro.org, alexander.shishkin@linux.intel.com, gregkh@linuxfoundation.org, coresight@lists.linaro.org, jinlmao@codeaurora.org, ykaukab@suse.de, linux@armlinux.org.uk, linux-kernel@vger.kernel.org, rdunlap@infradead.org, tingwei@codeaurora.org, leo.yan@linaro.org, linux-arm-kernel@lists.infradead.org, mike.leach@linaro.org 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 Sun, Sep 13, 2020 at 09:17:05PM +0800, Suzuki K Poulose wrote: > On 08/21/2020 04:44 AM, Tingwei Zhang wrote: > >From: Kim Phillips > > > >Allow to build coresight-etm3x as a module, for ease of development. > > > >- Kconfig becomes a tristate, to allow =m > >- append -core to source file name to allow module to > > be called coresight-etm3x by the Makefile > >- add an etm_remove function, for module unload > >- add a MODULE_DEVICE_TABLE for autoloading on boot > > > >Cc: Mathieu Poirier > >Cc: Leo Yan > >Cc: Alexander Shishkin > >Cc: Randy Dunlap > >Cc: Suzuki K Poulose > >Cc: Greg Kroah-Hartman > >Cc: Russell King > >Signed-off-by: Kim Phillips > >Signed-off-by: Tingwei Zhang > >Reviewed-by: Mike Leach > > > >diff --git a/drivers/hwtracing/coresight/coresight-etm3x.c > b/drivers/hwtracing/coresight/coresight-etm3x-core.c > >similarity index 97% > >rename from drivers/hwtracing/coresight/coresight-etm3x.c > >rename to drivers/hwtracing/coresight/coresight-etm3x-core.c > >index bf22dcfd3327..ba9c86497acb 100644 > >--- a/drivers/hwtracing/coresight/coresight-etm3x.c > >+++ b/drivers/hwtracing/coresight/coresight-etm3x-core.c > >@@ -895,6 +895,23 @@ static int etm_probe(struct amba_device *adev, > const struct amba_id *id) > > return ret; > > } > >+static int __exit etm_remove(struct amba_device *adev) > >+{ > >+ struct etm_drvdata *drvdata = dev_get_drvdata(&adev->dev); > >+ > >+ etm_perf_symlink(drvdata->csdev, false); > >+ > >+ if (--etm_count == 0) { > >+ > cpuhp_remove_state_nocalls(CPUHP_AP_ARM_CORESIGHT_STARTING); > >+ if (hp_online) > >+ cpuhp_remove_state_nocalls(hp_online); > >+ } > >+ > >+ coresight_unregister(drvdata->csdev); > >+ > >+ return 0; > >+} > >+ > > Don't we need to fix the races like we did for ETMv4 ? > > Suzuki > Yes, we need that. Unfortunately, I don't have ETMv3 devie to verify the change. Mathieu has been very kind to offer his help to take care of ETMv3. Thanks, Tingwei > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel