Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1463427pxb; Fri, 26 Feb 2021 11:17:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJxthmEfqJ7XIssA8Hecc1cUhe0amo3HrVgYQsNV129dwiwuM2qyz5yqSoiKLTRMz2iRDTdb X-Received: by 2002:a17:906:6048:: with SMTP id p8mr5045643ejj.105.1614367057581; Fri, 26 Feb 2021 11:17:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614367057; cv=none; d=google.com; s=arc-20160816; b=lMH43Wt1XJUrap9Le2M6FJkAdMiK3rEK0qqNtV4KPu1Tkb4CaAdrhV8sswxzTUyTXi aXhErqNyzV82593KtjtLd6Yy3QIsVTOy/+yCW6HHJWaKKkG1kVUrSh3vx1JhudhDA0Yi ZbHkMiNc5l9lytLZy4t0oSco0PHVSLuKcBK4p0cXBc23HDiFw0To83FNdXsD/dwLvr8I OC1B91Ssj3yg1nsaeKhn6wG1lCv+PMkc3mcw1xfoqwsurUZBKexfiEkKye4rpTXRDPUE 36x2juxIUBS3esdZNOL2HEaZ+nhrOzpbCkJGDRznFjU2JI/efMjkR+VXlXiF7vo3ljkx t6YA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=/RuZp97vmbX3iIDJQaLWaML/+bFGYgXRX8cY/lFqCb0=; b=lOOYp7INBQUuly/ATAi/xUcqb/HslrKqm+gXkQALaHRycBkBWx++fwsA6q+W8FNSXx UwSn9Dq8GJIhbSc5s2TStDrrPSljxEOXGt9L0uxXEArTtOa++ZgmryHkw8JtIoYYiCAr Epx2TiRzW5vRg36fG436rReojzWIgHvaO4VwEUQg6Er9ePb+K4V3Y10P6+fSwjmA0nAu oT6Xp+zzp2klqFUyKyGt/TzsF1QNwdY4Tz3LtsnXlfrVVwhEOtbbZ8yy3qZCiIqMM5sh slz32NLHeT9/JdsqwwsiGho0tR42cuZMIHsKT1wJUgsASaQ3pBfHwzwIbQPtuZATjgSw sXCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SnBNKxyP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c1si5514050edq.252.2021.02.26.11.17.14; Fri, 26 Feb 2021 11:17:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SnBNKxyP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229751AbhBZTP0 (ORCPT + 99 others); Fri, 26 Feb 2021 14:15:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56262 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229571AbhBZTPZ (ORCPT ); Fri, 26 Feb 2021 14:15:25 -0500 Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC913C061786 for ; Fri, 26 Feb 2021 11:14:44 -0800 (PST) Received: by mail-wr1-x432.google.com with SMTP id n4so9625481wrx.1 for ; Fri, 26 Feb 2021 11:14:44 -0800 (PST) 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=/RuZp97vmbX3iIDJQaLWaML/+bFGYgXRX8cY/lFqCb0=; b=SnBNKxyPwjxV1r4q+dVPz/jQz/ZPn7P571slVmVk1YK1kCiwwyzqHV51yA9tnmUJbB paSiXtb5lBKCrElhg1bHAnABFfu1XL5pN5OlvRb+9ORdJibuJ4bxnRja3JbSm1axWX62 n7WGc2uZmO2o+/HQQGZMmxnnXs9zVW65Lz5UNyaUoueI1SlJNMudcBGQgMhSC7+VjRMm mXOof6DQAWCh5jVmiPuor+j0QsmWBvawconkyomG/LMCGIKzClSORwenxdiacvsCrRgG dWg0TTHNE0AIBtlDLyZBP4w+MzktYm7VI6dvRlZeUnssCLw7VseKo0sJy/RrswSzY7bP cNBw== 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=/RuZp97vmbX3iIDJQaLWaML/+bFGYgXRX8cY/lFqCb0=; b=E0tGsbA7aj4LYxzyt2jgSin85nLCkzba6PVPR7bnsKsRuK59gRJXspvAR2/62a8iXA DKZin1oLU6AtNrRI6SmfvPcTkIUdvhimIgaOrqzg2RGeGn21aN+4fzaYQpOOgQSQV4tm 0ejrJfV9KUUz5WYaX95AggvqS+vFDWzhZZ+8eCZ+pNNu0C7XCTsQb+QMBfns44m/8ZgQ gGwlcnc5OkXwGhOwkHGlnsLfEa3ElMuoFvIKWeQLx6OCRlvn1MMebSOleHXZw5ZpZc2M fU6TLE6bjziwmZH0O1heCV7qlJJx7JHMnrINq1VtnKQqoyVhe8H/oNbxj7SOd6K9n/0+ 97dQ== X-Gm-Message-State: AOAM5304iRSN1G44xpn/KXt4voSX95Uw6uP5o5MLzZqKzszdlTPeT2Er KBluhbXC/MvXu52G+oHWNFgHhSoQUT6P0sPPGquX3Q== X-Received: by 2002:a5d:4fd0:: with SMTP id h16mr4537164wrw.178.1614366883308; Fri, 26 Feb 2021 11:14:43 -0800 (PST) MIME-Version: 1.0 References: <20210128170936.9222-1-mike.leach@linaro.org> <20210128170936.9222-3-mike.leach@linaro.org> <20210219184313.GA3065106@xps15> In-Reply-To: <20210219184313.GA3065106@xps15> From: Mike Leach Date: Fri, 26 Feb 2021 19:14:32 +0000 Message-ID: Subject: Re: [PATCH v4 02/10] coresight: syscfg: Add registration and feature loading for cs devices To: Mathieu Poirier Cc: linux-arm-kernel , Coresight ML , "open list:DOCUMENTATION" , "Suzuki K. Poulose" , Yabin Cui , Jonathan Corbet , Leo Yan , Alexander Shishkin , Tingwei Zhang , Greg Kroah-Hartman , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Mathieu, On Fri, 19 Feb 2021 at 18:43, Mathieu Poirier wrote: > > [...] > > > +/** > > + * List entry for Coresight devices that are registered as supporting complex > > + * config operations. > > + * > > + * @csdev: The registered device. > > + * @match_info: The matching type information. > > + * @ops: Operations supported by the registered device. > > + * @item: list entry. > > + */ > > +struct cscfg_csdev_register { > > + struct coresight_device *csdev; > > + struct cscfg_match_desc match_info; > > + struct cscfg_csdev_feat_ops ops; > > + struct list_head item; > > +}; > > I would call this structure cscfg_registered_csdev and move it to > coresight-config.h. That way it is consistent with cscfg_config_csdev and > cscfg_feature_csdev and located all in the same file. > I was trying to separate structures that are used to define configurations and features, with those that are used to manage the same. Hence, most things in coresight_config.h define configurations, or their device loaded instance equivalents, and things in coresight_syscfg.h are management items. I am happy to change the name but would prefer is stay in coresight_syscfg.h Thanks Mike > I may have to come back to this patch but for now it holds together. > > More comments to come on Monday. > > Thanks, > Mathieu > > > + > > /* internal core operations for cscfg */ > > int __init cscfg_init(void); > > void __exit cscfg_exit(void); > > @@ -33,6 +49,10 @@ void __exit cscfg_exit(void); > > /* syscfg manager external API */ > > int cscfg_load_config_sets(struct cscfg_config_desc **cfg_descs, > > struct cscfg_feature_desc **feat_descs); > > +int cscfg_register_csdev(struct coresight_device *csdev, > > + struct cscfg_match_desc *info, > > + struct cscfg_csdev_feat_ops *ops); > > +void cscfg_unregister_csdev(struct coresight_device *csdev); > > > > /** > > * System configuration manager device. > > diff --git a/include/linux/coresight.h b/include/linux/coresight.h > > index 976ec2697610..d0126ed326a6 100644 > > --- a/include/linux/coresight.h > > +++ b/include/linux/coresight.h > > @@ -219,6 +219,8 @@ struct coresight_sysfs_link { > > * @nr_links: number of sysfs links created to other components from this > > * device. These will appear in the "connections" group. > > * @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. > > */ > > struct coresight_device { > > struct coresight_platform_data *pdata; > > @@ -240,6 +242,9 @@ struct coresight_device { > > int nr_links; > > bool has_conns_grp; > > bool ect_enabled; /* true only if associated ect device is enabled */ > > + /* system configuration and feature lists */ > > + struct list_head feature_csdev_list; > > + struct list_head config_csdev_list; > > }; > > > > /* > > -- > > 2.17.1 > > -- Mike Leach Principal Engineer, ARM Ltd. Manchester Design Centre. UK