linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4] x86/resctrl: Fix kernel-doc in internal.h
@ 2021-06-18 22:32 Fabio M. De Francesco
  2021-06-18 23:44 ` Reinette Chatre
  2021-06-24  8:26 ` [tip: x86/cache] " tip-bot2 for Fabio M. De Francesco
  0 siblings, 2 replies; 3+ messages in thread
From: Fabio M. De Francesco @ 2021-06-18 22:32 UTC (permalink / raw)
  To: Reinette Chatre, Fenghua Yu, Thomas Gleixner, Ingo Molnar,
	Borislav Petkov, x86, H. Peter Anvin, linux-kernel
  Cc: Fabio M. De Francesco

Add description of undocumented parameters. Issues detected by
scripts/kernel-doc.

Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
---

v3->v4: Make consistent use of spaces in the documentation of struct
mon_data_bits.
v2->v3: Fix typo. Inherit the descriptions of membw and mbm_width from
commit
https://lore.kernel.org/lkml/20210614200941.12383-2-james.morse@arm.com/
to make it easier to merge both patches.
v1->v2: According to a first review by Reinette Chartre, remove changes
unrelated to the subject of this patch and modify the descriptions of
two parameters.

 arch/x86/kernel/cpu/resctrl/internal.h | 21 ++++++++++++++-------
 1 file changed, 14 insertions(+), 7 deletions(-)

diff --git a/arch/x86/kernel/cpu/resctrl/internal.h b/arch/x86/kernel/cpu/resctrl/internal.h
index c4d320d02fd5..6a5f60a37219 100644
--- a/arch/x86/kernel/cpu/resctrl/internal.h
+++ b/arch/x86/kernel/cpu/resctrl/internal.h
@@ -70,6 +70,7 @@ DECLARE_STATIC_KEY_FALSE(rdt_mon_enable_key);
  * struct mon_evt - Entry in the event list of a resource
  * @evtid:		event id
  * @name:		name of the event
+ * @list:		entry in &rdt_resource->evt_list
  */
 struct mon_evt {
 	u32			evtid;
@@ -78,10 +79,13 @@ struct mon_evt {
 };
 
 /**
- * struct mon_data_bits - Monitoring details for each event file
- * @rid:               Resource id associated with the event file.
+ * union mon_data_bits - Monitoring details for each event file
+ * @priv:              Used to store monitoring event data in @u
+ *                     as kernfs private data
+ * @rid:               Resource id associated with the event file
  * @evtid:             Event id associated with the event file
  * @domid:             The domain to which the event file belongs
+ * @u:                 Name of the bit fields struct
  */
 union mon_data_bits {
 	void *priv;
@@ -119,6 +123,7 @@ enum rdt_group_type {
  * @RDT_MODE_PSEUDO_LOCKSETUP: Resource group will be used for Pseudo-Locking
  * @RDT_MODE_PSEUDO_LOCKED: No sharing of this resource group's allocations
  *                          allowed AND the allocations are Cache Pseudo-Locked
+ * @RDT_NUM_MODES: Total number of modes
  *
  * The mode of a resource group enables control over the allowed overlap
  * between allocations associated with different resource groups (classes
@@ -142,7 +147,7 @@ enum rdtgrp_mode {
 
 /**
  * struct mongroup - store mon group's data in resctrl fs.
- * @mon_data_kn		kernlfs node for the mon_data directory
+ * @mon_data_kn:		kernfs node for the mon_data directory
  * @parent:			parent rdtgrp
  * @crdtgrp_list:		child rdtgroup node list
  * @rmid:			rmid for this rdtgroup
@@ -282,11 +287,11 @@ struct rftype {
 /**
  * struct mbm_state - status for each MBM counter in each domain
  * @chunks:	Total data moved (multiply by rdt_group.mon_scale to get bytes)
- * @prev_msr	Value of IA32_QM_CTR for this RMID last time we read it
+ * @prev_msr:	Value of IA32_QM_CTR for this RMID last time we read it
  * @prev_bw_msr:Value of previous IA32_QM_CTR for bandwidth counting
- * @prev_bw	The most recent bandwidth in MBps
- * @delta_bw	Difference between the current and previous bandwidth
- * @delta_comp	Indicates whether to compute the delta_bw
+ * @prev_bw:	The most recent bandwidth in MBps
+ * @delta_bw:	Difference between the current and previous bandwidth
+ * @delta_comp:	Indicates whether to compute the delta_bw
  */
 struct mbm_state {
 	u64	chunks;
@@ -456,11 +461,13 @@ struct rdt_parse_data {
  * @data_width:		Character width of data when displaying
  * @domains:		All domains for this resource
  * @cache:		Cache allocation related data
+ * @membw:		If the component has bandwidth controls, their properties.
  * @format_str:		Per resource format string to show domain value
  * @parse_ctrlval:	Per resource function pointer to parse control values
  * @evt_list:		List of monitoring events
  * @num_rmid:		Number of RMIDs available
  * @mon_scale:		cqm counter * mon_scale = occupancy in bytes
+ * @mbm_width:		Monitor width, to detect and correct for overflow.
  * @fflags:		flags to choose base and info files
  */
 struct rdt_resource {
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v4] x86/resctrl: Fix kernel-doc in internal.h
  2021-06-18 22:32 [PATCH v4] x86/resctrl: Fix kernel-doc in internal.h Fabio M. De Francesco
@ 2021-06-18 23:44 ` Reinette Chatre
  2021-06-24  8:26 ` [tip: x86/cache] " tip-bot2 for Fabio M. De Francesco
  1 sibling, 0 replies; 3+ messages in thread
From: Reinette Chatre @ 2021-06-18 23:44 UTC (permalink / raw)
  To: Fabio M. De Francesco, Fenghua Yu, Thomas Gleixner, Ingo Molnar,
	Borislav Petkov, x86, H. Peter Anvin, linux-kernel

Hi Fabio,

On 6/18/2021 3:32 PM, Fabio M. De Francesco wrote:
> Add description of undocumented parameters. Issues detected by
> scripts/kernel-doc.
> 
> Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
> ---

Before this patch:
$ scripts/kernel-doc -none arch/x86/kernel/cpu/resctrl/internal.h
arch/x86/kernel/cpu/resctrl/internal.h:78: warning: Function parameter 
or member 'list' not described in 'mon_evt'
arch/x86/kernel/cpu/resctrl/internal.h:93: warning: Function parameter 
or member 'priv' not described in 'mon_data_bits'
arch/x86/kernel/cpu/resctrl/internal.h:93: warning: Function parameter 
or member 'u' not described in 'mon_data_bits'
arch/x86/kernel/cpu/resctrl/internal.h:141: warning: Enum value 
'RDT_NUM_MODES' not described in enum 'rdtgrp_mode'
arch/x86/kernel/cpu/resctrl/internal.h:155: warning: Function parameter 
or member 'mon_data_kn' not described in 'mongroup'
arch/x86/kernel/cpu/resctrl/internal.h:298: warning: Function parameter 
or member 'prev_msr' not described in 'mbm_state'
arch/x86/kernel/cpu/resctrl/internal.h:298: warning: Function parameter 
or member 'prev_bw' not described in 'mbm_state'
arch/x86/kernel/cpu/resctrl/internal.h:298: warning: Function parameter 
or member 'delta_bw' not described in 'mbm_state'
arch/x86/kernel/cpu/resctrl/internal.h:298: warning: Function parameter 
or member 'delta_comp' not described in 'mbm_state'
arch/x86/kernel/cpu/resctrl/internal.h:492: warning: Function parameter 
or member 'membw' not described in 'rdt_resource'
arch/x86/kernel/cpu/resctrl/internal.h:492: warning: Function parameter 
or member 'mbm_width' not described in 'rdt_resource'
$

After this patch:
$ scripts/kernel-doc -none arch/x86/kernel/cpu/resctrl/internal.h
$

Thank you very much.

Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>

Reinette

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [tip: x86/cache] x86/resctrl: Fix kernel-doc in internal.h
  2021-06-18 22:32 [PATCH v4] x86/resctrl: Fix kernel-doc in internal.h Fabio M. De Francesco
  2021-06-18 23:44 ` Reinette Chatre
@ 2021-06-24  8:26 ` tip-bot2 for Fabio M. De Francesco
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot2 for Fabio M. De Francesco @ 2021-06-24  8:26 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Fabio M. De Francesco, Borislav Petkov, Reinette Chatre, x86,
	linux-kernel

The following commit has been merged into the x86/cache branch of tip:

Commit-ID:     fd2afa70eff057fab57c9e06708b68677b261a0c
Gitweb:        https://git.kernel.org/tip/fd2afa70eff057fab57c9e06708b68677b261a0c
Author:        Fabio M. De Francesco <fmdefrancesco@gmail.com>
AuthorDate:    Sat, 19 Jun 2021 00:32:06 +02:00
Committer:     Borislav Petkov <bp@suse.de>
CommitterDate: Thu, 24 Jun 2021 10:23:57 +02:00

x86/resctrl: Fix kernel-doc in internal.h

Add description of undocumented parameters. Issues detected by
scripts/kernel-doc.

Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>
Link: https://lkml.kernel.org/r/20210618223206.29539-1-fmdefrancesco@gmail.com
---
 arch/x86/kernel/cpu/resctrl/internal.h | 21 ++++++++++++++-------
 1 file changed, 14 insertions(+), 7 deletions(-)

diff --git a/arch/x86/kernel/cpu/resctrl/internal.h b/arch/x86/kernel/cpu/resctrl/internal.h
index c4d320d..6a5f60a 100644
--- a/arch/x86/kernel/cpu/resctrl/internal.h
+++ b/arch/x86/kernel/cpu/resctrl/internal.h
@@ -70,6 +70,7 @@ DECLARE_STATIC_KEY_FALSE(rdt_mon_enable_key);
  * struct mon_evt - Entry in the event list of a resource
  * @evtid:		event id
  * @name:		name of the event
+ * @list:		entry in &rdt_resource->evt_list
  */
 struct mon_evt {
 	u32			evtid;
@@ -78,10 +79,13 @@ struct mon_evt {
 };
 
 /**
- * struct mon_data_bits - Monitoring details for each event file
- * @rid:               Resource id associated with the event file.
+ * union mon_data_bits - Monitoring details for each event file
+ * @priv:              Used to store monitoring event data in @u
+ *                     as kernfs private data
+ * @rid:               Resource id associated with the event file
  * @evtid:             Event id associated with the event file
  * @domid:             The domain to which the event file belongs
+ * @u:                 Name of the bit fields struct
  */
 union mon_data_bits {
 	void *priv;
@@ -119,6 +123,7 @@ enum rdt_group_type {
  * @RDT_MODE_PSEUDO_LOCKSETUP: Resource group will be used for Pseudo-Locking
  * @RDT_MODE_PSEUDO_LOCKED: No sharing of this resource group's allocations
  *                          allowed AND the allocations are Cache Pseudo-Locked
+ * @RDT_NUM_MODES: Total number of modes
  *
  * The mode of a resource group enables control over the allowed overlap
  * between allocations associated with different resource groups (classes
@@ -142,7 +147,7 @@ enum rdtgrp_mode {
 
 /**
  * struct mongroup - store mon group's data in resctrl fs.
- * @mon_data_kn		kernlfs node for the mon_data directory
+ * @mon_data_kn:		kernfs node for the mon_data directory
  * @parent:			parent rdtgrp
  * @crdtgrp_list:		child rdtgroup node list
  * @rmid:			rmid for this rdtgroup
@@ -282,11 +287,11 @@ struct rftype {
 /**
  * struct mbm_state - status for each MBM counter in each domain
  * @chunks:	Total data moved (multiply by rdt_group.mon_scale to get bytes)
- * @prev_msr	Value of IA32_QM_CTR for this RMID last time we read it
+ * @prev_msr:	Value of IA32_QM_CTR for this RMID last time we read it
  * @prev_bw_msr:Value of previous IA32_QM_CTR for bandwidth counting
- * @prev_bw	The most recent bandwidth in MBps
- * @delta_bw	Difference between the current and previous bandwidth
- * @delta_comp	Indicates whether to compute the delta_bw
+ * @prev_bw:	The most recent bandwidth in MBps
+ * @delta_bw:	Difference between the current and previous bandwidth
+ * @delta_comp:	Indicates whether to compute the delta_bw
  */
 struct mbm_state {
 	u64	chunks;
@@ -456,11 +461,13 @@ struct rdt_parse_data {
  * @data_width:		Character width of data when displaying
  * @domains:		All domains for this resource
  * @cache:		Cache allocation related data
+ * @membw:		If the component has bandwidth controls, their properties.
  * @format_str:		Per resource format string to show domain value
  * @parse_ctrlval:	Per resource function pointer to parse control values
  * @evt_list:		List of monitoring events
  * @num_rmid:		Number of RMIDs available
  * @mon_scale:		cqm counter * mon_scale = occupancy in bytes
+ * @mbm_width:		Monitor width, to detect and correct for overflow.
  * @fflags:		flags to choose base and info files
  */
 struct rdt_resource {

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-06-24  8:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-18 22:32 [PATCH v4] x86/resctrl: Fix kernel-doc in internal.h Fabio M. De Francesco
2021-06-18 23:44 ` Reinette Chatre
2021-06-24  8:26 ` [tip: x86/cache] " tip-bot2 for Fabio M. De Francesco

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).