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=-8.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, 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 CBBE5C433E0 for ; Fri, 19 Feb 2021 18:45:27 +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 6809E60C3E for ; Fri, 19 Feb 2021 18:45:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6809E60C3E 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=6zSeRHRxEhvZXj2Pg+/ynuhOl8GI5x3vQN2bmdoASX0=; b=eeHqsMtoHS4ACcAbpgMo2R1U9 WAdEViqiDBCWbMwUF31WLbubeViC1+s8zACOP31f0tiptFrtxL94nUghMYwwvew3hiTT8pbRmgwOf 2Kui3VRThcKZ2r0M4UMBk/cngXNIOtNSIExV7/VKbI4emnKvd7K+YAfRbAvjOmq0vey4IqIQX4TJQ hHvNOpROPZSvfnPgpC36HzkR8Qk2Afe3XwKbjrzPbLY5+oPJl04KbyG0iT2vr5USrz9mRmc3fOVd2 d0VhiC8DEREparw8e9TNUsBIrtwMBJhHNTQzo8AM+hzeECrnQ/jZ1VZ6iV/40spTLes4IuXAdpfLt 1iOj+gYcA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lDAkM-0002dg-3M; Fri, 19 Feb 2021 18:43:22 +0000 Received: from mail-pg1-x536.google.com ([2607:f8b0:4864:20::536]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lDAkI-0002d1-OD for linux-arm-kernel@lists.infradead.org; Fri, 19 Feb 2021 18:43:19 +0000 Received: by mail-pg1-x536.google.com with SMTP id n10so5284234pgl.10 for ; Fri, 19 Feb 2021 10:43:18 -0800 (PST) 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=+RaWaFyQSNsA+BxQXW757bzb1+DDQjnWqIXCvU1FnZg=; b=IB29ZKHRAnXgcgKwwmK3w5ghZp9HfMsnWzT6RFS62Y6zWIwZ7CCJoSrSE7Lg9NrBWc w3M5BI+zftcVbIRviRSOQBzakRnjADebkJudOi7J3tUkw1XQX3LOPRrE+ySS2IkAoqAl LUXX/GGA03GCbGSfve4PsfyrSVEQIP9s5eo7qx+yK893mNAI4xECCPr+aKwY06NXsvws mNnSAM7s9OHQ39a9jjq5hjMhTp5AuXx4HVRwmHUNnFYhFuiNdD03FkH+f3h5YjY9k+mJ 6kzbUdNXnlDEVviIN6uWtNGf4MQjaStZ6k4IhvGguZypfVl+wHWN9z4ndGnhdjCEIbZv NaLQ== 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=+RaWaFyQSNsA+BxQXW757bzb1+DDQjnWqIXCvU1FnZg=; b=dJcnkiwN2OKbY6I5P7dD03loBq3EbfNGvBIlTmPFrpj2dp+9MMCnBVebeB7hMO6Afp fmHquH9A+IzsMJ/skTEvVebRUScO+PGDR+ho7IBMWuPpzeOTZwuZizD+Yy+DzNcLUi68 C48JPClPb+f/3lbG36iJNCCrHM0Cfbw/9KRM90h4TZur95ul0nrIbG8rtzoqiMj30Hjr akI2A1SwVM84ASMZs8i3YkhPo2RNEEXxm0sl0yhOkV5+C5Rt7ucTEeKI2+v69cdIh9vv wkFRhijdwUH7G60jkEwZLQWkJ7G+zDka0C+k8E4b4iMgukwxCIXmib1XUvBf37pc1Kf9 zZRg== X-Gm-Message-State: AOAM5316TRTciRv0a+Ae012hj0A0FPFL1U5uJ44we1gpayYh9VnFjwEC MfoGwWkL8aoqtW5N2yQX+G50ww== X-Google-Smtp-Source: ABdhPJzN3Ygk8eCkB5+wa7JUByPcyaxHt1dR5NpZBx7GgeX6f5K0ZJD27MStvkvvMK9kb4CZFXlcxA== X-Received: by 2002:a63:545f:: with SMTP id e31mr9763184pgm.212.1613760196381; Fri, 19 Feb 2021 10:43:16 -0800 (PST) Received: from xps15 (S0106889e681aac74.cg.shawcable.net. [68.147.0.187]) by smtp.gmail.com with ESMTPSA id w128sm3601162pfw.86.2021.02.19.10.43.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Feb 2021 10:43:15 -0800 (PST) Date: Fri, 19 Feb 2021 11:43:13 -0700 From: Mathieu Poirier To: Mike Leach Subject: Re: [PATCH v4 02/10] coresight: syscfg: Add registration and feature loading for cs devices Message-ID: <20210219184313.GA3065106@xps15> References: <20210128170936.9222-1-mike.leach@linaro.org> <20210128170936.9222-3-mike.leach@linaro.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210128170936.9222-3-mike.leach@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210219_134318_919201_DB31BB5C X-CRM114-Status: GOOD ( 18.47 ) 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: suzuki.poulose@arm.com, alexander.shishkin@linux.intel.com, yabinc@google.com, coresight@lists.linaro.org, corbet@lwn.net, linux-doc@vger.kernel.org, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, tingwei@codeaurora.org, leo.yan@linaro.org, linux-arm-kernel@lists.infradead.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 [...] > +/** > + * 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 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 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel