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=-9.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 83F28C433E2 for ; Mon, 14 Sep 2020 15:47:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 378BB20E65 for ; Mon, 14 Sep 2020 15:47:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="BRcom2km" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726106AbgINPrv (ORCPT ); Mon, 14 Sep 2020 11:47:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49712 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726533AbgINPpR (ORCPT ); Mon, 14 Sep 2020 11:45:17 -0400 Received: from mail-pf1-x442.google.com (mail-pf1-x442.google.com [IPv6:2607:f8b0:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 46F5BC06174A for ; Mon, 14 Sep 2020 08:45:17 -0700 (PDT) Received: by mail-pf1-x442.google.com with SMTP id z19so12961434pfn.8 for ; Mon, 14 Sep 2020 08:45:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=/eV1+kFX5j6l4A7G4UXNGix1Gqkh7mTO0zqJxtAgte8=; b=BRcom2km1V1p1iqSvEt9daBCWYvxDEBP2xMOAxm6zhNJ3dpHgMyDRoHqGqs/gCmWCU dmsMSVaLXAFqFnRCf3QPlsCCLbSh7ShUoGbIYG6Q/9mxRnkILBt4XbPJPCYp0CvCGMej Co/uea1pXfMsK62HFidPkg39WecwDOcAefTvUWBAlYqvrI6ptOFU2LAiERcck+I1wAcN bTKj+OIe3KPsL4sutC+2zv2hnVRBxaeQ0HpLByuD09fifEyAV3+vG2Pz6E0mOA2a6Osf PBC9V4Kz2+1tET/NDaaI1SIDQDSjkcTjslfssRxA4ppXpsTEVUBssFpz7MnAXhuI5Jvc yo3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=/eV1+kFX5j6l4A7G4UXNGix1Gqkh7mTO0zqJxtAgte8=; b=KGsvNDsXByD1eRU3DRkJZwoOt8Te6kbbfXU6Z6aNbWb8gu16oSd1K/QfvfFImX0rER tCkOroRXn/Vt8SG2rThMhJbKSfqoMiSYQDOlrA7QjXKInVkUB85OOJDVZMQqk1x6ACKz mSrR1vGsdYUVizoyp/zUmbJwtRzW9XOjsUP+c8wWMSkpWMoOjCI3El94zhibnz6szlXL Eq/nPQwShfRceVkeGyFsIXvBCXmWi3zLgoNX/rCXSWrIWiIiicyf/Dstmu3vQeKgNXT3 o9ojYTQhLtPjE3lQP4VZMgyBMMjChosMn3GkYXIozxmFB7k2hwJVOlJbXU4LtilFFM+T /3SA== X-Gm-Message-State: AOAM530xhb/F+kESCXGbvJyTb25FxCJefubGnwg6ZVgjzrGB1ZXZI58y 9pTV4zkAkymCUS24ifJF0DlvKg== X-Google-Smtp-Source: ABdhPJyLXR+26NTuHvBpZLGO8w1ekklGuKBLniOMo6i4BD7QY8X/AijX/tFW2farr7WpR7hnDVNPAQ== X-Received: by 2002:a63:d04b:: with SMTP id s11mr11086355pgi.241.1600098316782; Mon, 14 Sep 2020 08:45:16 -0700 (PDT) Received: from xps15 (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id s16sm8841083pgl.78.2020.09.14.08.45.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Sep 2020 08:45:16 -0700 (PDT) Date: Mon, 14 Sep 2020 09:45:13 -0600 From: Mathieu Poirier To: Tingwei Zhang Cc: Suzuki K Poulose , tingwei@codeaurora.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: <20200914154513.GA3238264@xps15> References: <20200821034445.967-1-tingwei@codeaurora.org> <20200821034445.967-10-tingwei@codeaurora.org> <0c2abd02-4fe6-5eaa-e9d3-41811f062ac1@arm.com> <20200914021927.GB22686@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200914021927.GB22686@codeaurora.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 14, 2020 at 10:19:28AM +0800, Tingwei Zhang wrote: > 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. Correct - I will do the testing but the implementation still has to come from you. > > 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=-11.5 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 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 1BFB6C43461 for ; Mon, 14 Sep 2020 15:46:52 +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 C1F4F208DB for ; Mon, 14 Sep 2020 15:46:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="yHo1XRvo"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="BRcom2km" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C1F4F208DB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.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=njA5UZtBD3gokGUcK6AJEXCZEQD3W9nPPxm5aIpZ7PI=; b=yHo1XRvooIjaTuHTYkE5SY8+q N7KIzFy1FnwDc9CdDf/GuhYkX2/EJaoiOc3xLz8YoaVCVnIoyFxSpwxMDOMw5Rlhwj2uNnY6/4/ce 21JlULLMmeInQxQsI/goRxTI1GrjzHoph3dusaSAnzndvGzuXOxFKmoAvRG9oUPJD5XkvisRJZFqp zusE67Ys917xjwjTtHb3DIiCgOGZzKT2iQ5Lyq2lGON5MP7+kgsRUJn/Lq70BnDPYiWVAYHexACHe s+6lIGWLhiaQ4QOXpXOdOOqSxprEWRyFZgmwMQ+h6BTmStx0C7P6ghxhaL+3K8MUChB4WOtduZbFt iG0CZ4xxQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kHqfT-0006Lv-Mh; Mon, 14 Sep 2020 15:45:23 +0000 Received: from mail-pf1-x441.google.com ([2607:f8b0:4864:20::441]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kHqfQ-0006Kz-Dz for linux-arm-kernel@lists.infradead.org; Mon, 14 Sep 2020 15:45:22 +0000 Received: by mail-pf1-x441.google.com with SMTP id c196so13115699pfc.0 for ; Mon, 14 Sep 2020 08:45:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=/eV1+kFX5j6l4A7G4UXNGix1Gqkh7mTO0zqJxtAgte8=; b=BRcom2km1V1p1iqSvEt9daBCWYvxDEBP2xMOAxm6zhNJ3dpHgMyDRoHqGqs/gCmWCU dmsMSVaLXAFqFnRCf3QPlsCCLbSh7ShUoGbIYG6Q/9mxRnkILBt4XbPJPCYp0CvCGMej Co/uea1pXfMsK62HFidPkg39WecwDOcAefTvUWBAlYqvrI6ptOFU2LAiERcck+I1wAcN bTKj+OIe3KPsL4sutC+2zv2hnVRBxaeQ0HpLByuD09fifEyAV3+vG2Pz6E0mOA2a6Osf PBC9V4Kz2+1tET/NDaaI1SIDQDSjkcTjslfssRxA4ppXpsTEVUBssFpz7MnAXhuI5Jvc yo3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=/eV1+kFX5j6l4A7G4UXNGix1Gqkh7mTO0zqJxtAgte8=; b=B/XeRVzjhoeG08hKk2ER/vwdKRiGccC+H8bAVHevup5IFvQNr9pF5Dj+eXl9oUOlm+ aSX+LijNNPveExOft1fUSbr1VcJLAuCBO8VTZVeaxk9mxcpC9+q31OsRkObioc7ZxnKa +EjQnwV6UgynlWpN4OviPgAICJ9YGQ9MRginrYogs3HnFa0/pn2FQWXLGSrEOlDxtteG B7ecb8sCkzBc06mKTOeS20zh7z6wUdDXpqpqSlzZBaEfd93UwhgfsSmp8uOlwUxoLIKx YAa0c2ZdcjtGFk9gXJVO3nWu9JmVoyJ927RbAgl2AitO/lLgo6Qzi1MX3WCL5PiUSMqP EuKQ== X-Gm-Message-State: AOAM531WHg2QMrGzCD3uHu0VOYpZOJfNJEBLkw2QKiiOeVwtAM1uY8yp sg+T7XKOELlPqQ6hDL8kcUC6/A== X-Google-Smtp-Source: ABdhPJyLXR+26NTuHvBpZLGO8w1ekklGuKBLniOMo6i4BD7QY8X/AijX/tFW2farr7WpR7hnDVNPAQ== X-Received: by 2002:a63:d04b:: with SMTP id s11mr11086355pgi.241.1600098316782; Mon, 14 Sep 2020 08:45:16 -0700 (PDT) Received: from xps15 (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id s16sm8841083pgl.78.2020.09.14.08.45.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Sep 2020 08:45:16 -0700 (PDT) Date: Mon, 14 Sep 2020 09:45:13 -0600 From: Mathieu Poirier To: Tingwei Zhang Subject: Re: [PATCH v10 09/24] coresight: etm3x: allow etm3x to be built as a module Message-ID: <20200914154513.GA3238264@xps15> References: <20200821034445.967-1-tingwei@codeaurora.org> <20200821034445.967-10-tingwei@codeaurora.org> <0c2abd02-4fe6-5eaa-e9d3-41811f062ac1@arm.com> <20200914021927.GB22686@codeaurora.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200914021927.GB22686@codeaurora.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200914_114520_805811_C57350A6 X-CRM114-Status: GOOD ( 23.83 ) 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, Suzuki K Poulose , 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 Mon, Sep 14, 2020 at 10:19:28AM +0800, Tingwei Zhang wrote: > 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. Correct - I will do the testing but the implementation still has to come from you. > > 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