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=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 BD965C11F69 for ; Tue, 29 Jun 2021 09:37:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9E47261D97 for ; Tue, 29 Jun 2021 09:37:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232859AbhF2JkT (ORCPT ); Tue, 29 Jun 2021 05:40:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36814 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232825AbhF2JkR (ORCPT ); Tue, 29 Jun 2021 05:40:17 -0400 Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AADD0C061574 for ; Tue, 29 Jun 2021 02:37:50 -0700 (PDT) Received: by mail-wr1-x436.google.com with SMTP id i94so25026198wri.4 for ; Tue, 29 Jun 2021 02:37:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=vbqHJLRYqpxALDaxBDkycdMmvBO1q1rxJlwGgAXC1dE=; b=YWeTDwoOj0Qk14S4+YvOY7g3OZD/J/F912bsjOITbBw7aRjEOHCu8mQZfrAk/uOwQ5 yz0fK09KJw+PUh6eJI+B+krYjL9xCp4bj0pwt3PJlCPR3O3Gm2n9cteQ8ETiVejk6hPF PGpukqq8r2DjSRDhYZVo4gegZIjuDC7AL4O6yIk7VOWwC6ns0zdHN9NAOB1R+44kj4hj 72vbZKk0Qo/607nj1Hm2Wb3dhAeGLAF7T+JW+LwnRiyDN0PXoD1yxEU4ClvEfaTn/Hpe 0kjeILi144PqGQRbtpvwesuGxJI1doLbN7oVHP/vMYu/H5Db6mTT9Hyzm8dZCnMcyDkE SUnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=vbqHJLRYqpxALDaxBDkycdMmvBO1q1rxJlwGgAXC1dE=; b=AU/88PK4nrYxXY8CuRN6q7s/8yyixkqtSklXXmA0sjWxdAcxoSH2uPtP1VeQHa2PI2 0VGdn8HakUCzOYVIgR2FqGdLE5Y2PSb4nIsk7DJEUjfOIJTTZTZwCDRbSzXHd8M4iEuf bf0sfusFCdoFmrmoqDyEmqwcxwGGLvgqJ0oernXkaJLFNtQDQntKD3xNLmWaQR5eej4I fGUUzUzLqbHalI04C7cAoE8JQJEA+gddYMhGAzLps67YgPgTZKWgr60ApHAPGDpFup2M gRKgqe5KVr0fMEKbMGoj6ZoRUMNpokUSZg1suvbS9RJSoxnb/ee6y1xNg/6SwPCdAj98 xFjA== X-Gm-Message-State: AOAM532Vclxey9AiaB2BXa02Yw6dsfmmsEehkv52a04LnO82uZyIIxTo dwis1fSkQD56hJwtdUIU5fim9bkFkPsJPYlfbQsJyQ== X-Google-Smtp-Source: ABdhPJynxNbm6qSA6stl5iaZvHTMRxAqsHlYsi72I4p8qy0YHNbvMRFjEEyUS71yekzFlRKVC5rrrSQhlORHi1G9r98= X-Received: by 2002:a5d:65d1:: with SMTP id e17mr3440421wrw.275.1624959469161; Tue, 29 Jun 2021 02:37:49 -0700 (PDT) MIME-Version: 1.0 References: <20210414191903.18349-1-mike.leach@linaro.org> <20210414191903.18349-6-mike.leach@linaro.org> <20210628195610.GA1200359@p14s> In-Reply-To: <20210628195610.GA1200359@p14s> From: Mike Leach Date: Tue, 29 Jun 2021 10:37:38 +0100 Message-ID: Subject: Re: [PATCH v7 05/10] coresight: syscfg: Add API to activate and enable configurations To: Mathieu Poirier Cc: Branislav Rankov , linux-arm-kernel , Coresight ML , "open list:DOCUMENTATION" , "Suzuki K. Poulose" , Yabin Cui , Jon Corbet , Leo Yan , Alexander Shishkin , Tingwei Zhang , Greg KH , Linux Kernel Mailing List , nd Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 28 Jun 2021 at 20:56, Mathieu Poirier wrote: > > On Fri, Jun 25, 2021 at 03:37:16PM +0100, Mike Leach wrote: > > HI Branislav, Mathieu, > > > > I have started to look into this as a top priority. > > Perfect. > > There was also a report from a build bot realted to an undefined reference to > config_group_init_type_name(). Please see if there is something to do on that > one as well - I haven't had the opportunity to look at the report. > > Thanks, > Mathieu > I spotted that too - its also on my todo list. Mike > > > > However, when I enable the CONFIG_DEBUG_ option my board fails to boot > > at all. (Dragonboard DB410c), so the resolution make take a little > > time. > > > > At this point I am assuming that the mutex will need to be replaced by > > a spinlock - so a re-design + v8 set may well be required. > > > > Regards > > > > Mike > > > > On Mon, 14 Jun 2021 at 18:03, Mathieu Poirier > > wrote: > > > > > > Hi Branislav, > > > > > > On Thu, 10 Jun 2021 at 05:05, Branislav Rankov wrote: > > > > > > > > > > > > On 4/14/21 8:18 PM, Mike Leach wrote: > > > > > Configurations are first activated, then when any coresight device is > > > > > enabled, the active configurations are checked and any matching > > > > > one is enabled. > > > > > > > > > > This patch provides the activation / enable API. > > > > > > > > > > Signed-off-by: Mike Leach > > > > > Reviewed-by: Mathieu Poirier > > > > > --- > > > > > .../hwtracing/coresight/coresight-config.h | 2 + > > > > > .../hwtracing/coresight/coresight-syscfg.c | 172 ++++++++++++++++++ > > > > > .../hwtracing/coresight/coresight-syscfg.h | 8 + > > > > > include/linux/coresight.h | 2 + > > > > > 4 files changed, 184 insertions(+) > > > > > > > > > > diff --git a/drivers/hwtracing/coresight/coresight-config.h b/drivers/hwtracing/coresight/coresight-config.h > > > > > index 0667581822c1..25eb6c632692 100644 > > > > > --- a/drivers/hwtracing/coresight/coresight-config.h > > > > > +++ b/drivers/hwtracing/coresight/coresight-config.h > > > > > @@ -127,6 +127,7 @@ struct cscfg_feature_desc { > > > > > * @nr_total_params: Sum of all parameters declared by used features > > > > > * @presets: Array of preset values. > > > > > * @event_ea: Extended attribute for perf event value > > > > > + * @active_cnt: ref count for activate on this configuration. > > > > > * > > > > > */ > > > > > struct cscfg_config_desc { > > > > > @@ -139,6 +140,7 @@ struct cscfg_config_desc { > > > > > int nr_total_params; > > > > > const u64 *presets; /* nr_presets * nr_total_params */ > > > > > struct dev_ext_attribute *event_ea; > > > > > + atomic_t active_cnt; > > > > > }; > > > > > > > > > > /** > > > > > diff --git a/drivers/hwtracing/coresight/coresight-syscfg.c b/drivers/hwtracing/coresight/coresight-syscfg.c > > > > > index e35f8c0ac2f8..b234e45c153f 100644 > > > > > --- a/drivers/hwtracing/coresight/coresight-syscfg.c > > > > > +++ b/drivers/hwtracing/coresight/coresight-syscfg.c > > > > > @@ -283,6 +283,7 @@ static int cscfg_load_config(struct cscfg_config_desc *config_desc) > > > > > return err; > > > > > > > > > > list_add(&config_desc->item, &cscfg_mgr->config_desc_list); > > > > > + atomic_set(&config_desc->active_cnt, 0); > > > > > return 0; > > > > > } > > > > > > > > > > @@ -468,6 +469,176 @@ void cscfg_unregister_csdev(struct coresight_device *csdev) > > > > > } > > > > > EXPORT_SYMBOL_GPL(cscfg_unregister_csdev); > > > > > > > > > > +/** > > > > > + * cscfg_csdev_reset_feats - reset features for a CoreSight device. > > > > > + * > > > > > + * Resets all parameters and register values for any features loaded > > > > > + * into @csdev to their default values. > > > > > + * > > > > > + * @csdev: The CoreSight device. > > > > > + */ > > > > > +void cscfg_csdev_reset_feats(struct coresight_device *csdev) > > > > > +{ > > > > > + struct cscfg_feature_csdev *feat_csdev; > > > > > + > > > > > + mutex_lock(&cscfg_csdev_mutex); > > > > > + if (list_empty(&csdev->feature_csdev_list)) > > > > > + goto unlock_exit; > > > > > + > > > > > + list_for_each_entry(feat_csdev, &csdev->feature_csdev_list, node) > > > > > + cscfg_reset_feat(feat_csdev); > > > > > + > > > > > +unlock_exit: > > > > > + mutex_unlock(&cscfg_csdev_mutex); > > > > > +} > > > > > +EXPORT_SYMBOL_GPL(cscfg_csdev_reset_feats); > > > > > + > > > > > +/** > > > > > + * cscfg_activate_config - Mark a configuration descriptor as active. > > > > > + * > > > > > + * This will be seen when csdev devices are enabled in the system. > > > > > + * Only activated configurations can be enabled on individual devices. > > > > > + * Activation protects the configuration from alteration or removal while > > > > > + * active. > > > > > + * > > > > > + * Selection by hash value - generated from the configuration name when it > > > > > + * was loaded and added to the cs_etm/configurations file system for selection > > > > > + * by perf. > > > > > + * > > > > > + * Increments the configuration descriptor active count and the global active > > > > > + * count. > > > > > + * > > > > > + * @cfg_hash: Hash value of the selected configuration name. > > > > > + */ > > > > > +int cscfg_activate_config(unsigned long cfg_hash) > > > > > +{ > > > > > + struct cscfg_config_desc *config_desc; > > > > > + int err = -EINVAL; > > > > > + > > > > > + mutex_lock(&cscfg_mutex); > > > > > + > > > > > + list_for_each_entry(config_desc, &cscfg_mgr->config_desc_list, item) { > > > > > + if ((unsigned long)config_desc->event_ea->var == cfg_hash) { > > > > > + /* > > > > > + * increment the global active count - control changes to > > > > > + * active configurations > > > > > + */ > > > > > + atomic_inc(&cscfg_mgr->sys_active_cnt); > > > > > + > > > > > + /* > > > > > + * mark the descriptor as active so enable config on a > > > > > + * device instance will use it > > > > > + */ > > > > > + atomic_inc(&config_desc->active_cnt); > > > > > + > > > > > + err = 0; > > > > > + dev_dbg(cscfg_device(), "Activate config %s.\n", config_desc->name); > > > > > + break; > > > > > + } > > > > > + } > > > > > + mutex_unlock(&cscfg_mutex); > > > > > + > > > > > + return err; > > > > > +} > > > > > +EXPORT_SYMBOL_GPL(cscfg_activate_config); > > > > > + > > > > > +/** > > > > > + * cscfg_deactivate_config - Mark a config descriptor as inactive. > > > > > + * > > > > > + * Decrement the configuration and global active counts. > > > > > + * > > > > > + * @cfg_hash: Hash value of the selected configuration name. > > > > > + */ > > > > > +void cscfg_deactivate_config(unsigned long cfg_hash) > > > > > +{ > > > > > + struct cscfg_config_desc *config_desc; > > > > > + > > > > > + mutex_lock(&cscfg_mutex); > > > > > + > > > > > + list_for_each_entry(config_desc, &cscfg_mgr->config_desc_list, item) { > > > > > + if ((unsigned long)config_desc->event_ea->var == cfg_hash) { > > > > > + atomic_dec(&config_desc->active_cnt); > > > > > + atomic_dec(&cscfg_mgr->sys_active_cnt); > > > > > + dev_dbg(cscfg_device(), "Deactivate config %s.\n", config_desc->name); > > > > > + break; > > > > > + } > > > > > + } > > > > > + mutex_unlock(&cscfg_mutex); > > > > > +} > > > > > +EXPORT_SYMBOL_GPL(cscfg_deactivate_config); > > > > > + > > > > > +/** > > > > > + * cscfg_csdev_enable_active_config - Enable matching active configuration for device. > > > > > + * > > > > > + * Enables the configuration selected by @cfg_hash if the configuration is supported > > > > > + * on the device and has been activated. > > > > > + * > > > > > + * If active and supported the CoreSight device @csdev will be programmed with the > > > > > + * configuration, using @preset parameters. > > > > > + * > > > > > + * Should be called before driver hardware enable for the requested device, prior to > > > > > + * programming and enabling the physical hardware. > > > > > + * > > > > > + * @csdev: CoreSight device to program. > > > > > + * @cfg_hash: Selector for the configuration. > > > > > + * @preset: Preset parameter values to use, 0 for current / default values. > > > > > + */ > > > > > +int cscfg_csdev_enable_active_config(struct coresight_device *csdev, > > > > > + unsigned long cfg_hash, int preset) > > > > > +{ > > > > > + struct cscfg_config_csdev *config_csdev_active = NULL, *config_csdev_item; > > > > > + const struct cscfg_config_desc *config_desc; > > > > > + int err = 0; > > > > > + > > > > > + /* quickly check global count */ > > > > > + if (!atomic_read(&cscfg_mgr->sys_active_cnt)) > > > > > + return 0; > > > > > + > > > > > + mutex_lock(&cscfg_csdev_mutex); > > > > > + list_for_each_entry(config_csdev_item, &csdev->config_csdev_list, node) { > > > > > + config_desc = config_csdev_item->config_desc; > > > > > + if ((atomic_read(&config_desc->active_cnt)) && > > > > > + ((unsigned long)config_desc->event_ea->var == cfg_hash)) { > > > > > + config_csdev_active = config_csdev_item; > > > > > + break; > > > > > + } > > > > > + } > > > > > + if (config_csdev_active) { > > > > > + err = cscfg_csdev_enable_config(config_csdev_active, preset); > > > > > + if (!err) > > > > > + csdev->active_cscfg_ctxt = (void *)config_csdev_active; > > > > > + } > > > > > + mutex_unlock(&cscfg_csdev_mutex); > > > > > + return err; > > > > > +} > > > > > +EXPORT_SYMBOL_GPL(cscfg_csdev_enable_active_config); > > > > > + > > > > > +/** > > > > > + * cscfg_csdev_disable_active_config - disable an active config on the device. > > > > > + * > > > > > + * Disables the active configuration on the CoreSight device @csdev. > > > > > + * Disable will save the values of any registers marked in the configurations > > > > > + * as save on disable. > > > > > + * > > > > > + * Should be called after driver hardware disable for the requested device, > > > > > + * after disabling the physical hardware and reading back registers. > > > > > + * > > > > > + * @csdev: The CoreSight device. > > > > > + */ > > > > > +void cscfg_csdev_disable_active_config(struct coresight_device *csdev) > > > > > +{ > > > > > + struct cscfg_config_csdev *config_csdev; > > > > > + > > > > > + mutex_lock(&cscfg_csdev_mutex); > > > > > > > > This line seems to cause a bug report when the kernel is compiled with CONFIG_DEBUG_ATOMIC_SLEEP=y > > > > > > > > I have tested this by applying the series to 5.10 kernel on Dragonboard 845c. > > > > > > > > It only happens when strobing is used. > > > > > > Thanks for reporting this. Unfortunately Mike is away and likely > > > won't be able to look at this in time for the merge window. As such I > > > backed out the complex configuration feature from the next branch but > > > that code is still available on next-complex-configuration. > > > > > > Thanks, > > > Mathieu > > > > > > > > > > > The report is this: > > > > > > > > [13431.885395] BUG: sleeping function called from invalid context at kernel/locking/mutex.c:283 > > > > [13431.893919] in_atomic(): 1, irqs_disabled(): 128, non_block: 0, pid: 3525, name: perf > > > > [13431.901882] CPU: 0 PID: 3525 Comm: perf Tainted: G W 5.10.0-rc5-17282-g923b456a55fb #124 > > > > [13431.911436] Hardware name: Thundercomm Dragonboard 845c (DT) > > > > [13431.917450] Call trace: > > > > [13431.919938] dump_backtrace+0x0/0x1a0 > > > > [13431.923644] show_stack+0x18/0x68 > > > > [13431.927008] dump_stack+0xd0/0x12c > > > > [13431.930444] ___might_sleep+0xf0/0x130 > > > > [13431.934228] __might_sleep+0x54/0x90 > > > > [13431.937945] mutex_lock+0x28/0x80 > > > > [13431.941468] cscfg_csdev_disable_active_config+0x24/0x50 > > > > [13431.946952] etm4_disable+0xf0/0x100 > > > > [13431.950571] etm_event_stop+0xb8/0x130 > > > > [13431.954380] etm_event_del+0x14/0x20 > > > > [13431.958008] event_sched_out.isra.0+0x84/0x1c8 > > > > [13431.962496] group_sched_out.part.0+0x44/0xc8 > > > > [13431.967010] __perf_event_disable+0xe4/0x198 > > > > [13431.971549] event_function+0x8c/0xe8 > > > > [13431.975256] remote_function+0x64/0x78 > > > > [13431.979161] generic_exec_single+0xa0/0x100 > > > > [13431.983876] smp_call_function_single+0x158/0x1d8 > > > > [13431.988629] event_function_call+0x128/0x138 > > > > [13431.992942] _perf_event_disable+0x48/0x70 > > > > [13431.997082] perf_event_for_each_child+0x3c/0x90 > > > > [13432.001751] _perf_ioctl+0x198/0x4a8 > > > > [13432.005359] perf_ioctl+0x4c/0x78 > > > > [13432.008715] __arm64_sys_ioctl+0xa8/0xf0 > > > > [13432.012835] el0_svc_common.constprop.0+0x78/0x1a0 > > > > [13432.017767] do_el0_svc+0x24/0x90 > > > > [13432.021616] el0_sync_handler+0x160/0x168 > > > > [13432.025670] el0_sync+0x174/0x180 > > > > > > > > > > > > > + config_csdev = (struct cscfg_config_csdev *)csdev->active_cscfg_ctxt; > > > > > + if (config_csdev) { > > > > > + cscfg_csdev_disable_config(config_csdev); > > > > > + csdev->active_cscfg_ctxt = NULL; > > > > > + } > > > > > + mutex_unlock(&cscfg_csdev_mutex); > > > > > +} > > > > > +EXPORT_SYMBOL_GPL(cscfg_csdev_disable_active_config); > > > > > + > > > > > /* Initialise system configuration management device. */ > > > > > > > > > > struct device *cscfg_device(void) > > > > > @@ -536,6 +707,7 @@ int __init cscfg_init(void) > > > > > INIT_LIST_HEAD(&cscfg_mgr->csdev_desc_list); > > > > > INIT_LIST_HEAD(&cscfg_mgr->feat_desc_list); > > > > > INIT_LIST_HEAD(&cscfg_mgr->config_desc_list); > > > > > + atomic_set(&cscfg_mgr->sys_active_cnt, 0); > > > > > > > > > > dev_info(cscfg_device(), "CoreSight Configuration manager initialised"); > > > > > return 0; > > > > > diff --git a/drivers/hwtracing/coresight/coresight-syscfg.h b/drivers/hwtracing/coresight/coresight-syscfg.h > > > > > index 5bcae3b374c6..a52775890670 100644 > > > > > --- a/drivers/hwtracing/coresight/coresight-syscfg.h > > > > > +++ b/drivers/hwtracing/coresight/coresight-syscfg.h > > > > > @@ -24,12 +24,14 @@ > > > > > * @csdev_desc_list: List of coresight devices registered with the configuration manager. > > > > > * @feat_desc_list: List of feature descriptors to load into registered devices. > > > > > * @config_desc_list: List of system configuration descriptors to load into registered devices. > > > > > + * @sys_active_cnt: Total number of active config descriptor references. > > > > > */ > > > > > struct cscfg_manager { > > > > > struct device dev; > > > > > struct list_head csdev_desc_list; > > > > > struct list_head feat_desc_list; > > > > > struct list_head config_desc_list; > > > > > + atomic_t sys_active_cnt; > > > > > }; > > > > > > > > > > /* get reference to dev in cscfg_manager */ > > > > > @@ -61,5 +63,11 @@ int cscfg_load_config_sets(struct cscfg_config_desc **cfg_descs, > > > > > int cscfg_register_csdev(struct coresight_device *csdev, u32 match_flags, > > > > > struct cscfg_csdev_feat_ops *ops); > > > > > void cscfg_unregister_csdev(struct coresight_device *csdev); > > > > > +int cscfg_activate_config(unsigned long cfg_hash); > > > > > +void cscfg_deactivate_config(unsigned long cfg_hash); > > > > > +void cscfg_csdev_reset_feats(struct coresight_device *csdev); > > > > > +int cscfg_csdev_enable_active_config(struct coresight_device *csdev, > > > > > + unsigned long cfg_hash, int preset); > > > > > +void cscfg_csdev_disable_active_config(struct coresight_device *csdev); > > > > > > > > > > #endif /* CORESIGHT_SYSCFG_H */ > > > > > diff --git a/include/linux/coresight.h b/include/linux/coresight.h > > > > > index 6fb516e1b22e..a348049ee08b 100644 > > > > > --- a/include/linux/coresight.h > > > > > +++ b/include/linux/coresight.h > > > > > @@ -222,6 +222,7 @@ struct coresight_sysfs_link { > > > > > * @has_conns_grp: Have added a "connections" group for sysfs links. > > > > > * @feature_csdev_list: List of complex feature programming added to the device. > > > > > * @config_csdev_list: List of system configurations added to the device. > > > > > + * @active_cscfg_ctxt: Context information for current active system configuration. > > > > > */ > > > > > struct coresight_device { > > > > > struct coresight_platform_data *pdata; > > > > > @@ -246,6 +247,7 @@ struct coresight_device { > > > > > /* system configuration and feature lists */ > > > > > struct list_head feature_csdev_list; > > > > > struct list_head config_csdev_list; > > > > > + void *active_cscfg_ctxt; > > > > > }; > > > > > > > > > > /* > > > > > > > > > > > > > -- > > Mike Leach > > Principal Engineer, ARM Ltd. > > Manchester Design Centre. UK -- Mike Leach Principal Engineer, ARM Ltd. Manchester Design Centre. UK 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=-14.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 9FCEAC11F66 for ; Tue, 29 Jun 2021 09:39:41 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 62E4A61CDA for ; Tue, 29 Jun 2021 09:39:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 62E4A61CDA 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=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=kQ7HMH2zhed6rDRrYydeW557pJYqxKHc/AMM77+2y18=; b=cm+ZQbsYrNX9cA NEv/4riy0Dxc7P/oFvTg+sD2NClwUaofl7vqRqgei2DverwIH64YH4OQb9m5GF0GZc1fwQui8Uewk KdunfXzrUkxuW6HnXTnLPGD2n/iodZOLC1zQvzln8wgDhYv8xlhnZQy0GJLO3hB2UvOkvA15kqew8 w05ZYwlcP+wkdRDorHdI6mI4X1fnIp2AjZnfCu7URQBHNLqyeGTMnRXaS6wIYJlWQL8TXSAi+aEVk 0db3JY+LM4MsANu3LSnvC2dSkmOEM2qA+dsGrTDYWc49D2Nx8fR1rBYihsi5nE9/Vk2qekt2PsdRm H17LF6Qy+IkJ7JRwStog==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lyABn-00AODZ-9H; Tue, 29 Jun 2021 09:37:55 +0000 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lyABi-00AOCV-Sz for linux-arm-kernel@lists.infradead.org; Tue, 29 Jun 2021 09:37:53 +0000 Received: by mail-wr1-x435.google.com with SMTP id a13so24971008wrf.10 for ; Tue, 29 Jun 2021 02:37:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=vbqHJLRYqpxALDaxBDkycdMmvBO1q1rxJlwGgAXC1dE=; b=YWeTDwoOj0Qk14S4+YvOY7g3OZD/J/F912bsjOITbBw7aRjEOHCu8mQZfrAk/uOwQ5 yz0fK09KJw+PUh6eJI+B+krYjL9xCp4bj0pwt3PJlCPR3O3Gm2n9cteQ8ETiVejk6hPF PGpukqq8r2DjSRDhYZVo4gegZIjuDC7AL4O6yIk7VOWwC6ns0zdHN9NAOB1R+44kj4hj 72vbZKk0Qo/607nj1Hm2Wb3dhAeGLAF7T+JW+LwnRiyDN0PXoD1yxEU4ClvEfaTn/Hpe 0kjeILi144PqGQRbtpvwesuGxJI1doLbN7oVHP/vMYu/H5Db6mTT9Hyzm8dZCnMcyDkE SUnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=vbqHJLRYqpxALDaxBDkycdMmvBO1q1rxJlwGgAXC1dE=; b=Bx0xYqp8UrnKPFW7paX+ab3w2ClcetC29UXz6zUU11JrJxhI6/4PQa7xHxIQzMdR4X p+7HGm9KG2apHWhbsNBMb6rKniSoJotMN2xyZjgrlkq1x27gDh45NrGvmKyBV7+JXlqJ H3+13pN+UGZrq7usRMgoT+dLtpHSwf4AqBQVTZsS63RxTWeVbxrjrpI42w9h+z52PpQ/ wMvA3d4618yqOdStDQde2Ra1sFH3nQirgzWXxwZHTiSdVPEhU/Q8SPJENkYiqTvoA3/u rDxbiM3v5ubsy8fqEmCIUzh5vv49sbSY7ZzRBcgLntN8qoSmQUWDpVtxAzWmHoR/rS8W WLjg== X-Gm-Message-State: AOAM531/6EbDxq7zNgvnZTlj50XByvOYSyVEmwVFqwcCHMS59Svc5VpV pfTSQXHee9vydh0FdsT0QAn13NZUTxyOjS6qZmS2fA== X-Google-Smtp-Source: ABdhPJynxNbm6qSA6stl5iaZvHTMRxAqsHlYsi72I4p8qy0YHNbvMRFjEEyUS71yekzFlRKVC5rrrSQhlORHi1G9r98= X-Received: by 2002:a5d:65d1:: with SMTP id e17mr3440421wrw.275.1624959469161; Tue, 29 Jun 2021 02:37:49 -0700 (PDT) MIME-Version: 1.0 References: <20210414191903.18349-1-mike.leach@linaro.org> <20210414191903.18349-6-mike.leach@linaro.org> <20210628195610.GA1200359@p14s> In-Reply-To: <20210628195610.GA1200359@p14s> From: Mike Leach Date: Tue, 29 Jun 2021 10:37:38 +0100 Message-ID: Subject: Re: [PATCH v7 05/10] coresight: syscfg: Add API to activate and enable configurations To: Mathieu Poirier Cc: Branislav Rankov , linux-arm-kernel , Coresight ML , "open list:DOCUMENTATION" , "Suzuki K. Poulose" , Yabin Cui , Jon Corbet , Leo Yan , Alexander Shishkin , Tingwei Zhang , Greg KH , Linux Kernel Mailing List , nd X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210629_023751_001350_201B3214 X-CRM114-Status: GOOD ( 62.84 ) 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-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, 28 Jun 2021 at 20:56, Mathieu Poirier wrote: > > On Fri, Jun 25, 2021 at 03:37:16PM +0100, Mike Leach wrote: > > HI Branislav, Mathieu, > > > > I have started to look into this as a top priority. > > Perfect. > > There was also a report from a build bot realted to an undefined reference to > config_group_init_type_name(). Please see if there is something to do on that > one as well - I haven't had the opportunity to look at the report. > > Thanks, > Mathieu > I spotted that too - its also on my todo list. Mike > > > > However, when I enable the CONFIG_DEBUG_ option my board fails to boot > > at all. (Dragonboard DB410c), so the resolution make take a little > > time. > > > > At this point I am assuming that the mutex will need to be replaced by > > a spinlock - so a re-design + v8 set may well be required. > > > > Regards > > > > Mike > > > > On Mon, 14 Jun 2021 at 18:03, Mathieu Poirier > > wrote: > > > > > > Hi Branislav, > > > > > > On Thu, 10 Jun 2021 at 05:05, Branislav Rankov wrote: > > > > > > > > > > > > On 4/14/21 8:18 PM, Mike Leach wrote: > > > > > Configurations are first activated, then when any coresight device is > > > > > enabled, the active configurations are checked and any matching > > > > > one is enabled. > > > > > > > > > > This patch provides the activation / enable API. > > > > > > > > > > Signed-off-by: Mike Leach > > > > > Reviewed-by: Mathieu Poirier > > > > > --- > > > > > .../hwtracing/coresight/coresight-config.h | 2 + > > > > > .../hwtracing/coresight/coresight-syscfg.c | 172 ++++++++++++++++++ > > > > > .../hwtracing/coresight/coresight-syscfg.h | 8 + > > > > > include/linux/coresight.h | 2 + > > > > > 4 files changed, 184 insertions(+) > > > > > > > > > > diff --git a/drivers/hwtracing/coresight/coresight-config.h b/drivers/hwtracing/coresight/coresight-config.h > > > > > index 0667581822c1..25eb6c632692 100644 > > > > > --- a/drivers/hwtracing/coresight/coresight-config.h > > > > > +++ b/drivers/hwtracing/coresight/coresight-config.h > > > > > @@ -127,6 +127,7 @@ struct cscfg_feature_desc { > > > > > * @nr_total_params: Sum of all parameters declared by used features > > > > > * @presets: Array of preset values. > > > > > * @event_ea: Extended attribute for perf event value > > > > > + * @active_cnt: ref count for activate on this configuration. > > > > > * > > > > > */ > > > > > struct cscfg_config_desc { > > > > > @@ -139,6 +140,7 @@ struct cscfg_config_desc { > > > > > int nr_total_params; > > > > > const u64 *presets; /* nr_presets * nr_total_params */ > > > > > struct dev_ext_attribute *event_ea; > > > > > + atomic_t active_cnt; > > > > > }; > > > > > > > > > > /** > > > > > diff --git a/drivers/hwtracing/coresight/coresight-syscfg.c b/drivers/hwtracing/coresight/coresight-syscfg.c > > > > > index e35f8c0ac2f8..b234e45c153f 100644 > > > > > --- a/drivers/hwtracing/coresight/coresight-syscfg.c > > > > > +++ b/drivers/hwtracing/coresight/coresight-syscfg.c > > > > > @@ -283,6 +283,7 @@ static int cscfg_load_config(struct cscfg_config_desc *config_desc) > > > > > return err; > > > > > > > > > > list_add(&config_desc->item, &cscfg_mgr->config_desc_list); > > > > > + atomic_set(&config_desc->active_cnt, 0); > > > > > return 0; > > > > > } > > > > > > > > > > @@ -468,6 +469,176 @@ void cscfg_unregister_csdev(struct coresight_device *csdev) > > > > > } > > > > > EXPORT_SYMBOL_GPL(cscfg_unregister_csdev); > > > > > > > > > > +/** > > > > > + * cscfg_csdev_reset_feats - reset features for a CoreSight device. > > > > > + * > > > > > + * Resets all parameters and register values for any features loaded > > > > > + * into @csdev to their default values. > > > > > + * > > > > > + * @csdev: The CoreSight device. > > > > > + */ > > > > > +void cscfg_csdev_reset_feats(struct coresight_device *csdev) > > > > > +{ > > > > > + struct cscfg_feature_csdev *feat_csdev; > > > > > + > > > > > + mutex_lock(&cscfg_csdev_mutex); > > > > > + if (list_empty(&csdev->feature_csdev_list)) > > > > > + goto unlock_exit; > > > > > + > > > > > + list_for_each_entry(feat_csdev, &csdev->feature_csdev_list, node) > > > > > + cscfg_reset_feat(feat_csdev); > > > > > + > > > > > +unlock_exit: > > > > > + mutex_unlock(&cscfg_csdev_mutex); > > > > > +} > > > > > +EXPORT_SYMBOL_GPL(cscfg_csdev_reset_feats); > > > > > + > > > > > +/** > > > > > + * cscfg_activate_config - Mark a configuration descriptor as active. > > > > > + * > > > > > + * This will be seen when csdev devices are enabled in the system. > > > > > + * Only activated configurations can be enabled on individual devices. > > > > > + * Activation protects the configuration from alteration or removal while > > > > > + * active. > > > > > + * > > > > > + * Selection by hash value - generated from the configuration name when it > > > > > + * was loaded and added to the cs_etm/configurations file system for selection > > > > > + * by perf. > > > > > + * > > > > > + * Increments the configuration descriptor active count and the global active > > > > > + * count. > > > > > + * > > > > > + * @cfg_hash: Hash value of the selected configuration name. > > > > > + */ > > > > > +int cscfg_activate_config(unsigned long cfg_hash) > > > > > +{ > > > > > + struct cscfg_config_desc *config_desc; > > > > > + int err = -EINVAL; > > > > > + > > > > > + mutex_lock(&cscfg_mutex); > > > > > + > > > > > + list_for_each_entry(config_desc, &cscfg_mgr->config_desc_list, item) { > > > > > + if ((unsigned long)config_desc->event_ea->var == cfg_hash) { > > > > > + /* > > > > > + * increment the global active count - control changes to > > > > > + * active configurations > > > > > + */ > > > > > + atomic_inc(&cscfg_mgr->sys_active_cnt); > > > > > + > > > > > + /* > > > > > + * mark the descriptor as active so enable config on a > > > > > + * device instance will use it > > > > > + */ > > > > > + atomic_inc(&config_desc->active_cnt); > > > > > + > > > > > + err = 0; > > > > > + dev_dbg(cscfg_device(), "Activate config %s.\n", config_desc->name); > > > > > + break; > > > > > + } > > > > > + } > > > > > + mutex_unlock(&cscfg_mutex); > > > > > + > > > > > + return err; > > > > > +} > > > > > +EXPORT_SYMBOL_GPL(cscfg_activate_config); > > > > > + > > > > > +/** > > > > > + * cscfg_deactivate_config - Mark a config descriptor as inactive. > > > > > + * > > > > > + * Decrement the configuration and global active counts. > > > > > + * > > > > > + * @cfg_hash: Hash value of the selected configuration name. > > > > > + */ > > > > > +void cscfg_deactivate_config(unsigned long cfg_hash) > > > > > +{ > > > > > + struct cscfg_config_desc *config_desc; > > > > > + > > > > > + mutex_lock(&cscfg_mutex); > > > > > + > > > > > + list_for_each_entry(config_desc, &cscfg_mgr->config_desc_list, item) { > > > > > + if ((unsigned long)config_desc->event_ea->var == cfg_hash) { > > > > > + atomic_dec(&config_desc->active_cnt); > > > > > + atomic_dec(&cscfg_mgr->sys_active_cnt); > > > > > + dev_dbg(cscfg_device(), "Deactivate config %s.\n", config_desc->name); > > > > > + break; > > > > > + } > > > > > + } > > > > > + mutex_unlock(&cscfg_mutex); > > > > > +} > > > > > +EXPORT_SYMBOL_GPL(cscfg_deactivate_config); > > > > > + > > > > > +/** > > > > > + * cscfg_csdev_enable_active_config - Enable matching active configuration for device. > > > > > + * > > > > > + * Enables the configuration selected by @cfg_hash if the configuration is supported > > > > > + * on the device and has been activated. > > > > > + * > > > > > + * If active and supported the CoreSight device @csdev will be programmed with the > > > > > + * configuration, using @preset parameters. > > > > > + * > > > > > + * Should be called before driver hardware enable for the requested device, prior to > > > > > + * programming and enabling the physical hardware. > > > > > + * > > > > > + * @csdev: CoreSight device to program. > > > > > + * @cfg_hash: Selector for the configuration. > > > > > + * @preset: Preset parameter values to use, 0 for current / default values. > > > > > + */ > > > > > +int cscfg_csdev_enable_active_config(struct coresight_device *csdev, > > > > > + unsigned long cfg_hash, int preset) > > > > > +{ > > > > > + struct cscfg_config_csdev *config_csdev_active = NULL, *config_csdev_item; > > > > > + const struct cscfg_config_desc *config_desc; > > > > > + int err = 0; > > > > > + > > > > > + /* quickly check global count */ > > > > > + if (!atomic_read(&cscfg_mgr->sys_active_cnt)) > > > > > + return 0; > > > > > + > > > > > + mutex_lock(&cscfg_csdev_mutex); > > > > > + list_for_each_entry(config_csdev_item, &csdev->config_csdev_list, node) { > > > > > + config_desc = config_csdev_item->config_desc; > > > > > + if ((atomic_read(&config_desc->active_cnt)) && > > > > > + ((unsigned long)config_desc->event_ea->var == cfg_hash)) { > > > > > + config_csdev_active = config_csdev_item; > > > > > + break; > > > > > + } > > > > > + } > > > > > + if (config_csdev_active) { > > > > > + err = cscfg_csdev_enable_config(config_csdev_active, preset); > > > > > + if (!err) > > > > > + csdev->active_cscfg_ctxt = (void *)config_csdev_active; > > > > > + } > > > > > + mutex_unlock(&cscfg_csdev_mutex); > > > > > + return err; > > > > > +} > > > > > +EXPORT_SYMBOL_GPL(cscfg_csdev_enable_active_config); > > > > > + > > > > > +/** > > > > > + * cscfg_csdev_disable_active_config - disable an active config on the device. > > > > > + * > > > > > + * Disables the active configuration on the CoreSight device @csdev. > > > > > + * Disable will save the values of any registers marked in the configurations > > > > > + * as save on disable. > > > > > + * > > > > > + * Should be called after driver hardware disable for the requested device, > > > > > + * after disabling the physical hardware and reading back registers. > > > > > + * > > > > > + * @csdev: The CoreSight device. > > > > > + */ > > > > > +void cscfg_csdev_disable_active_config(struct coresight_device *csdev) > > > > > +{ > > > > > + struct cscfg_config_csdev *config_csdev; > > > > > + > > > > > + mutex_lock(&cscfg_csdev_mutex); > > > > > > > > This line seems to cause a bug report when the kernel is compiled with CONFIG_DEBUG_ATOMIC_SLEEP=y > > > > > > > > I have tested this by applying the series to 5.10 kernel on Dragonboard 845c. > > > > > > > > It only happens when strobing is used. > > > > > > Thanks for reporting this. Unfortunately Mike is away and likely > > > won't be able to look at this in time for the merge window. As such I > > > backed out the complex configuration feature from the next branch but > > > that code is still available on next-complex-configuration. > > > > > > Thanks, > > > Mathieu > > > > > > > > > > > The report is this: > > > > > > > > [13431.885395] BUG: sleeping function called from invalid context at kernel/locking/mutex.c:283 > > > > [13431.893919] in_atomic(): 1, irqs_disabled(): 128, non_block: 0, pid: 3525, name: perf > > > > [13431.901882] CPU: 0 PID: 3525 Comm: perf Tainted: G W 5.10.0-rc5-17282-g923b456a55fb #124 > > > > [13431.911436] Hardware name: Thundercomm Dragonboard 845c (DT) > > > > [13431.917450] Call trace: > > > > [13431.919938] dump_backtrace+0x0/0x1a0 > > > > [13431.923644] show_stack+0x18/0x68 > > > > [13431.927008] dump_stack+0xd0/0x12c > > > > [13431.930444] ___might_sleep+0xf0/0x130 > > > > [13431.934228] __might_sleep+0x54/0x90 > > > > [13431.937945] mutex_lock+0x28/0x80 > > > > [13431.941468] cscfg_csdev_disable_active_config+0x24/0x50 > > > > [13431.946952] etm4_disable+0xf0/0x100 > > > > [13431.950571] etm_event_stop+0xb8/0x130 > > > > [13431.954380] etm_event_del+0x14/0x20 > > > > [13431.958008] event_sched_out.isra.0+0x84/0x1c8 > > > > [13431.962496] group_sched_out.part.0+0x44/0xc8 > > > > [13431.967010] __perf_event_disable+0xe4/0x198 > > > > [13431.971549] event_function+0x8c/0xe8 > > > > [13431.975256] remote_function+0x64/0x78 > > > > [13431.979161] generic_exec_single+0xa0/0x100 > > > > [13431.983876] smp_call_function_single+0x158/0x1d8 > > > > [13431.988629] event_function_call+0x128/0x138 > > > > [13431.992942] _perf_event_disable+0x48/0x70 > > > > [13431.997082] perf_event_for_each_child+0x3c/0x90 > > > > [13432.001751] _perf_ioctl+0x198/0x4a8 > > > > [13432.005359] perf_ioctl+0x4c/0x78 > > > > [13432.008715] __arm64_sys_ioctl+0xa8/0xf0 > > > > [13432.012835] el0_svc_common.constprop.0+0x78/0x1a0 > > > > [13432.017767] do_el0_svc+0x24/0x90 > > > > [13432.021616] el0_sync_handler+0x160/0x168 > > > > [13432.025670] el0_sync+0x174/0x180 > > > > > > > > > > > > > + config_csdev = (struct cscfg_config_csdev *)csdev->active_cscfg_ctxt; > > > > > + if (config_csdev) { > > > > > + cscfg_csdev_disable_config(config_csdev); > > > > > + csdev->active_cscfg_ctxt = NULL; > > > > > + } > > > > > + mutex_unlock(&cscfg_csdev_mutex); > > > > > +} > > > > > +EXPORT_SYMBOL_GPL(cscfg_csdev_disable_active_config); > > > > > + > > > > > /* Initialise system configuration management device. */ > > > > > > > > > > struct device *cscfg_device(void) > > > > > @@ -536,6 +707,7 @@ int __init cscfg_init(void) > > > > > INIT_LIST_HEAD(&cscfg_mgr->csdev_desc_list); > > > > > INIT_LIST_HEAD(&cscfg_mgr->feat_desc_list); > > > > > INIT_LIST_HEAD(&cscfg_mgr->config_desc_list); > > > > > + atomic_set(&cscfg_mgr->sys_active_cnt, 0); > > > > > > > > > > dev_info(cscfg_device(), "CoreSight Configuration manager initialised"); > > > > > return 0; > > > > > diff --git a/drivers/hwtracing/coresight/coresight-syscfg.h b/drivers/hwtracing/coresight/coresight-syscfg.h > > > > > index 5bcae3b374c6..a52775890670 100644 > > > > > --- a/drivers/hwtracing/coresight/coresight-syscfg.h > > > > > +++ b/drivers/hwtracing/coresight/coresight-syscfg.h > > > > > @@ -24,12 +24,14 @@ > > > > > * @csdev_desc_list: List of coresight devices registered with the configuration manager. > > > > > * @feat_desc_list: List of feature descriptors to load into registered devices. > > > > > * @config_desc_list: List of system configuration descriptors to load into registered devices. > > > > > + * @sys_active_cnt: Total number of active config descriptor references. > > > > > */ > > > > > struct cscfg_manager { > > > > > struct device dev; > > > > > struct list_head csdev_desc_list; > > > > > struct list_head feat_desc_list; > > > > > struct list_head config_desc_list; > > > > > + atomic_t sys_active_cnt; > > > > > }; > > > > > > > > > > /* get reference to dev in cscfg_manager */ > > > > > @@ -61,5 +63,11 @@ int cscfg_load_config_sets(struct cscfg_config_desc **cfg_descs, > > > > > int cscfg_register_csdev(struct coresight_device *csdev, u32 match_flags, > > > > > struct cscfg_csdev_feat_ops *ops); > > > > > void cscfg_unregister_csdev(struct coresight_device *csdev); > > > > > +int cscfg_activate_config(unsigned long cfg_hash); > > > > > +void cscfg_deactivate_config(unsigned long cfg_hash); > > > > > +void cscfg_csdev_reset_feats(struct coresight_device *csdev); > > > > > +int cscfg_csdev_enable_active_config(struct coresight_device *csdev, > > > > > + unsigned long cfg_hash, int preset); > > > > > +void cscfg_csdev_disable_active_config(struct coresight_device *csdev); > > > > > > > > > > #endif /* CORESIGHT_SYSCFG_H */ > > > > > diff --git a/include/linux/coresight.h b/include/linux/coresight.h > > > > > index 6fb516e1b22e..a348049ee08b 100644 > > > > > --- a/include/linux/coresight.h > > > > > +++ b/include/linux/coresight.h > > > > > @@ -222,6 +222,7 @@ struct coresight_sysfs_link { > > > > > * @has_conns_grp: Have added a "connections" group for sysfs links. > > > > > * @feature_csdev_list: List of complex feature programming added to the device. > > > > > * @config_csdev_list: List of system configurations added to the device. > > > > > + * @active_cscfg_ctxt: Context information for current active system configuration. > > > > > */ > > > > > struct coresight_device { > > > > > struct coresight_platform_data *pdata; > > > > > @@ -246,6 +247,7 @@ struct coresight_device { > > > > > /* system configuration and feature lists */ > > > > > struct list_head feature_csdev_list; > > > > > struct list_head config_csdev_list; > > > > > + void *active_cscfg_ctxt; > > > > > }; > > > > > > > > > > /* > > > > > > > > > > > > > -- > > Mike Leach > > Principal Engineer, ARM Ltd. > > Manchester Design Centre. UK -- Mike Leach Principal Engineer, ARM Ltd. Manchester Design Centre. UK _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel