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=-3.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no 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 4BBBEC43465 for ; Fri, 18 Sep 2020 12:46:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 07C1422208 for ; Fri, 18 Sep 2020 12:46:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726851AbgIRMqU (ORCPT ); Fri, 18 Sep 2020 08:46:20 -0400 Received: from mga02.intel.com ([134.134.136.20]:59770 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726757AbgIRMp6 (ORCPT ); Fri, 18 Sep 2020 08:45:58 -0400 IronPort-SDR: yPryd+gVYnOgcW9uqXKhir4xp6UT5/4gOmgH3P/LXPaAFRRvjqP5jGWKfhe198fakJJiYzsrUP GfXFV3UGb2yA== X-IronPort-AV: E=McAfee;i="6000,8403,9747"; a="147606658" X-IronPort-AV: E=Sophos;i="5.77,274,1596524400"; d="scan'208";a="147606658" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Sep 2020 05:45:57 -0700 IronPort-SDR: g8txEcJO0ulTSqG4U6y6lFjZr6I732JoqmIF3ujvyzswstXN00cJme4NYMxtnUgUWBa5X9TZtz nX66g3jf6GSw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,274,1596524400"; d="scan'208";a="332595129" Received: from um.fi.intel.com (HELO um) ([10.237.72.57]) by fmsmga004.fm.intel.com with ESMTP; 18 Sep 2020 05:45:53 -0700 From: Alexander Shishkin To: Tingwei Zhang , Steven Rostedt , Ingo Molnar , Maxime Coquelin , Alexandre Torgue Cc: Tingwei Zhang , Mathieu Poirier , Suzuki K Poulose , tsoni@codeaurora.org, Sai Prakash Ranjan , Mao Jinlong , linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, alexander.shishkin@linux.intel.com Subject: Re: [PATCH v3 6/6] stm class: ftrace: use different channel accroding to CPU In-Reply-To: <20200903001706.28147-7-tingwei@codeaurora.org> References: <20200903001706.28147-1-tingwei@codeaurora.org> <20200903001706.28147-7-tingwei@codeaurora.org> Date: Fri, 18 Sep 2020 15:45:52 +0300 Message-ID: <87zh5nw8vz.fsf@ashishki-desk.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Tingwei Zhang writes: > @@ -63,6 +65,7 @@ static int __init stm_ftrace_init(void) > { > int ret; > > + stm_ftrace.data.nr_chans = num_possible_cpus(); Not a problem with this patch necesarily, but this made me realize that .nr_chans may be larger than: (1) what the policy permits, (2) what the stm device can handle. While (1) the user can fix in the policy, they won't be able to fix (2), in which case they won't be able to use stm_ftrace at all. I'm thinking if a link-time callback would be good enough. Another thing is that .nr_chans needs to be a power of 2 at the moment. Regards, -- Alex