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=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 1560DC43461 for ; Mon, 14 Sep 2020 18:12:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C4146214F1 for ; Mon, 14 Sep 2020 18:12:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="zA+3jq+1" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726034AbgINSMW (ORCPT ); Mon, 14 Sep 2020 14:12:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44204 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726192AbgINSLo (ORCPT ); Mon, 14 Sep 2020 14:11:44 -0400 Received: from mail-pf1-x441.google.com (mail-pf1-x441.google.com [IPv6:2607:f8b0:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC880C06174A for ; Mon, 14 Sep 2020 11:11:43 -0700 (PDT) Received: by mail-pf1-x441.google.com with SMTP id c196so282326pfc.0 for ; Mon, 14 Sep 2020 11:11:43 -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=luFapq4yAWnCh7gOtzb0s4k6GBMzLQ8znDPJIALRzIo=; b=zA+3jq+1Hh4VmiPiah+gMCdRVVajSsyvGlrNdRoP/xsQe2jec1OxYNoyEF/2ef5uT3 nVG2hbzdNP0uT2eclJt1AUw7b5zvZs0ggTMDrFo1edgHFGeHtxIZvNpvL9p1tA0+4hA2 lJwQZEp/3C1FN/a8P7ZhVP8Be+Z/H2OpkPH9j0zO5NVG9r7+A7duyT3Fw7WSoBf5encB eVvt7fWZ5G3uWUXu3BRkjSwiFXQJmJ+5BGsrAnGONfqBbb+icZWbX2NKyhTQc7aOPTpT KdJAaLOAkFEHW9qo7mp4azWEtIrA4eY/+HmGiuR93/S1zZGo9eVlLpiQhebu6dFVFZ6w wTZQ== 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=luFapq4yAWnCh7gOtzb0s4k6GBMzLQ8znDPJIALRzIo=; b=G5N94WBPpV09JmkAPM7wD6zmfsHKfnG405wpB3/v9sPlL920QiNxUoyC7J7of6Sse1 ecjx/tKIiHdSUtOGC3yYXcxFONjUnv/3Im+2wQJQaHisGvono2IL7Dw9yIUGj7NLANmY SCVlDlJ//uuFvl8/5HNtzcLKTVgTGJcBjb3A6JVo1eSZ0AWILclVGqyeoxwDR8tnmpej Dc08qHOaghX/w/zMQzDpVlRkdbH43Dr1bfxQ3M11CyE0PBf/XU6nDPSrsRf6zrYwVyw+ uantrKi1GMg6EVPSCNj+J6DN866rj/e+etplzmDxt5321R9l+O4z7vniqZZg8kJkJ3JD tyXg== X-Gm-Message-State: AOAM5337FQphH0BufY+gqQhQY/76+ngFLHejyuXtUNjZ5wLrDhfK1KG4 J+7ogcsT5B4iplUQ+xmDe0u9fw== X-Google-Smtp-Source: ABdhPJyjDBiZiomw9v+dab/SIgwqqqddv11VHrmH3pw8Tb1URCEEbZec5yn7uyiyDsXxd8fEfZeNzA== X-Received: by 2002:a05:6a00:1356:b029:13e:d13d:a084 with SMTP id k22-20020a056a001356b029013ed13da084mr14544516pfu.27.1600107103411; Mon, 14 Sep 2020 11:11:43 -0700 (PDT) Received: from xps15 (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id x20sm11052073pfr.190.2020.09.14.11.11.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Sep 2020 11:11:42 -0700 (PDT) Date: Mon, 14 Sep 2020 12:11:40 -0600 From: Mathieu Poirier To: Suzuki K Poulose Cc: tingwei@codeaurora.org, alexander.shishkin@linux.intel.com, mike.leach@linaro.org, kim.phillips@arm.com, gregkh@linuxfoundation.org, leo.yan@linaro.org, rdunlap@infradead.org, linux@armlinux.org.uk, ykaukab@suse.de, tsoni@codeaurora.org, saiprakash.ranjan@codeaurora.org, jinlmao@codeaurora.org, coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v10 09/24] coresight: etm3x: allow etm3x to be built as a module Message-ID: <20200914181140.GD3238264@xps15> 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> 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 02:17:05PM +0100, 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 ? This is one of the things I wanted to get back to but Suzuki beat me to it. I am now done reviewing this set. Thanks, Mathieu > > Suzuki 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=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 50289C433E2 for ; Mon, 14 Sep 2020 18:13:20 +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 C9DA1214F1 for ; Mon, 14 Sep 2020 18:13:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="VMak1yEW"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="zA+3jq+1" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C9DA1214F1 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=nmJ5pFQ2DOaPyFnPQmYEeYg1oqSy679ppAO4YMa09EU=; b=VMak1yEWzUlKmwJW4eYQFxVue glTjwE3ensCOKE15vuT6mZtQwTb4N8X65SSCPKS4PydaHggrlkQEpcbBRf4IT2IzINOx2QxrJh7Kn jOfcxHeh/Zxlm0iwbBaCUX1fOVAbX8UXiV30FWRgNRA0Vkf8mJby5fwKDWAtJc75gh4D2auQdZiYB gFnOH+dZXjkV8xpZzEBYFamIIMWzJU9Vx4FHEaptPnubtvrfX+M++w1XQfiFS2Mf9CJCirjMaMZDt xZBdTgOg+W24HmQRjaU5Jhxql6NR0dmMTru0j/qnsv40D0fdiSE5VF574X/D7qH7Wj9m29z287YHE 1ZT1/Ia1Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kHsxA-00014i-SX; Mon, 14 Sep 2020 18:11:48 +0000 Received: from mail-pg1-x544.google.com ([2607:f8b0:4864:20::544]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kHsx8-00013p-9O for linux-arm-kernel@lists.infradead.org; Mon, 14 Sep 2020 18:11:46 +0000 Received: by mail-pg1-x544.google.com with SMTP id d13so443060pgl.6 for ; Mon, 14 Sep 2020 11:11:45 -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=luFapq4yAWnCh7gOtzb0s4k6GBMzLQ8znDPJIALRzIo=; b=zA+3jq+1Hh4VmiPiah+gMCdRVVajSsyvGlrNdRoP/xsQe2jec1OxYNoyEF/2ef5uT3 nVG2hbzdNP0uT2eclJt1AUw7b5zvZs0ggTMDrFo1edgHFGeHtxIZvNpvL9p1tA0+4hA2 lJwQZEp/3C1FN/a8P7ZhVP8Be+Z/H2OpkPH9j0zO5NVG9r7+A7duyT3Fw7WSoBf5encB eVvt7fWZ5G3uWUXu3BRkjSwiFXQJmJ+5BGsrAnGONfqBbb+icZWbX2NKyhTQc7aOPTpT KdJAaLOAkFEHW9qo7mp4azWEtIrA4eY/+HmGiuR93/S1zZGo9eVlLpiQhebu6dFVFZ6w wTZQ== 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=luFapq4yAWnCh7gOtzb0s4k6GBMzLQ8znDPJIALRzIo=; b=ZoukUp3G/2RDBb4SMF0p4p//vIsN3Q5VJG69JHW/3dqRCCDTCQM2ayjp/6vVrv23JR KYcjlkcVplgOZcJhPrbEoNcXhbJpGhxOLQSXzw7bgTQv0+hdVrM55sS+hwV8s647yk1K MAUhy6gynYMSSKKDYCWCrM5DIv+uINGUc9UH8GWaeRvGHb1Rqy60kYCKkXU3Y0FQD9f8 c3KF0BJpxlOaVNFeFCve7g+Bv8mz21xjfDJF1whaeqfREUwIAXrnR6oO2VA7dYJ63yBY XARGMrTP0ZlEuhnLUfVpFBhrZAYZUyeD1qDN9Ixr+VKh4z3dx7LpOwNNxkSi2AOSlout uS4w== X-Gm-Message-State: AOAM533nR8sphnQxOiuxnKtjbXyIfvanzzh2PhBnYHN2zvgN2loxwkEn VSZ0eVzLzn9VbgglyhcxfY6E9w== X-Google-Smtp-Source: ABdhPJyjDBiZiomw9v+dab/SIgwqqqddv11VHrmH3pw8Tb1URCEEbZec5yn7uyiyDsXxd8fEfZeNzA== X-Received: by 2002:a05:6a00:1356:b029:13e:d13d:a084 with SMTP id k22-20020a056a001356b029013ed13da084mr14544516pfu.27.1600107103411; Mon, 14 Sep 2020 11:11:43 -0700 (PDT) Received: from xps15 (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id x20sm11052073pfr.190.2020.09.14.11.11.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Sep 2020 11:11:42 -0700 (PDT) Date: Mon, 14 Sep 2020 12:11:40 -0600 From: Mathieu Poirier To: Suzuki K Poulose Subject: Re: [PATCH v10 09/24] coresight: etm3x: allow etm3x to be built as a module Message-ID: <20200914181140.GD3238264@xps15> 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200914_141146_339227_0659D1EB X-CRM114-Status: GOOD ( 23.56 ) 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, jinlmao@codeaurora.org, alexander.shishkin@linux.intel.com, gregkh@linuxfoundation.org, coresight@lists.linaro.org, rdunlap@infradead.org, ykaukab@suse.de, linux@armlinux.org.uk, linux-kernel@vger.kernel.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 02:17:05PM +0100, 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 ? This is one of the things I wanted to get back to but Suzuki beat me to it. I am now done reviewing this set. Thanks, Mathieu > > Suzuki _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel