linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] x86/sgx: Describe the parameters of sgx_calc_section_metric()
@ 2023-08-22 10:28 Jarkko Sakkinen
  2023-08-25 15:18 ` Dave Hansen
  0 siblings, 1 reply; 3+ messages in thread
From: Jarkko Sakkinen @ 2023-08-22 10:28 UTC (permalink / raw)
  To: linux-sgx
  Cc: Jarkko Sakkinen, stable, kernel test robot, Dave Hansen,
	Thomas Gleixner, Ingo Molnar, Borislav Petkov, x86,
	H. Peter Anvin, Jethro Beekman, Serge Ayoun, Sean Christopherson,
	linux-kernel

Cc: stable@vger.kernel.org # v5.11+
Fixes: e7e0545299d8 ("x86/sgx: Initialize metadata for Enclave Page Cache (EPC) sections")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202308221542.11UpkVfp-lkp@intel.com/
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
---
 arch/x86/kernel/cpu/sgx/main.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/x86/kernel/cpu/sgx/main.c b/arch/x86/kernel/cpu/sgx/main.c
index 166692f2d501..388350b8f5e3 100644
--- a/arch/x86/kernel/cpu/sgx/main.c
+++ b/arch/x86/kernel/cpu/sgx/main.c
@@ -732,6 +732,10 @@ int arch_memory_failure(unsigned long pfn, int flags)
 }
 
 /**
+ * sgx_calc_section_metric() - Calculate an EPC section metric
+ * @low:	low 32-bit word from CPUID:0x12:{2, ...}
+ * @high:	high 32-bit word from CPUID:0x12:{2, ...}
+ *
  * A section metric is concatenated in a way that @low bits 12-31 define the
  * bits 12-31 of the metric and @high bits 0-19 define the bits 32-51 of the
  * metric.
-- 
2.39.2


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

* Re: [PATCH] x86/sgx: Describe the parameters of sgx_calc_section_metric()
  2023-08-22 10:28 [PATCH] x86/sgx: Describe the parameters of sgx_calc_section_metric() Jarkko Sakkinen
@ 2023-08-25 15:18 ` Dave Hansen
  2023-08-27 18:38   ` Jarkko Sakkinen
  0 siblings, 1 reply; 3+ messages in thread
From: Dave Hansen @ 2023-08-25 15:18 UTC (permalink / raw)
  To: Jarkko Sakkinen, linux-sgx
  Cc: stable, kernel test robot, Dave Hansen, Thomas Gleixner,
	Ingo Molnar, Borislav Petkov, x86, H. Peter Anvin,
	Jethro Beekman, Serge Ayoun, Sean Christopherson, linux-kernel

On 8/22/23 03:28, Jarkko Sakkinen wrote:
> Cc: stable@vger.kernel.org # v5.11+
> Fixes: e7e0545299d8 ("x86/sgx: Initialize metadata for Enclave Page Cache (EPC) sections")
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202308221542.11UpkVfp-lkp@intel.com/
> Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>

-ENOCHANGELOG

>  /**
> + * sgx_calc_section_metric() - Calculate an EPC section metric
> + * @low:	low 32-bit word from CPUID:0x12:{2, ...}
> + * @high:	high 32-bit word from CPUID:0x12:{2, ...}
> + *
>   * A section metric is concatenated in a way that @low bits 12-31 define the
>   * bits 12-31 of the metric and @high bits 0-19 define the bits 32-51 of the
>   * metric.

Shouldn't we just do:

-  /**
+  /*

?  This doesn't need kerneldoc comments.

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

* Re: [PATCH] x86/sgx: Describe the parameters of sgx_calc_section_metric()
  2023-08-25 15:18 ` Dave Hansen
@ 2023-08-27 18:38   ` Jarkko Sakkinen
  0 siblings, 0 replies; 3+ messages in thread
From: Jarkko Sakkinen @ 2023-08-27 18:38 UTC (permalink / raw)
  To: Dave Hansen, linux-sgx
  Cc: stable, kernel test robot, Dave Hansen, Thomas Gleixner,
	Ingo Molnar, Borislav Petkov, x86, H. Peter Anvin,
	Jethro Beekman, Serge Ayoun, Sean Christopherson, linux-kernel

On Fri Aug 25, 2023 at 6:18 PM EEST, Dave Hansen wrote:
> On 8/22/23 03:28, Jarkko Sakkinen wrote:
> > Cc: stable@vger.kernel.org # v5.11+
> > Fixes: e7e0545299d8 ("x86/sgx: Initialize metadata for Enclave Page Cache (EPC) sections")
> > Reported-by: kernel test robot <lkp@intel.com>
> > Closes: https://lore.kernel.org/oe-kbuild-all/202308221542.11UpkVfp-lkp@intel.com/
> > Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
>
> -ENOCHANGELOG

ack

> >  /**
> > + * sgx_calc_section_metric() - Calculate an EPC section metric
> > + * @low:	low 32-bit word from CPUID:0x12:{2, ...}
> > + * @high:	high 32-bit word from CPUID:0x12:{2, ...}
> > + *
> >   * A section metric is concatenated in a way that @low bits 12-31 define the
> >   * bits 12-31 of the metric and @high bits 0-19 define the bits 32-51 of the
> >   * metric.
>
> Shouldn't we just do:
>
> -  /**
> +  /*
>
> ?  This doesn't need kerneldoc comments.

Yeah, I added it because of parameter descriptions, which I think are
still useful.

If checkpatch does not complain, I can change the comment type.

BR, Jarkko

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

end of thread, other threads:[~2023-08-27 18:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-22 10:28 [PATCH] x86/sgx: Describe the parameters of sgx_calc_section_metric() Jarkko Sakkinen
2023-08-25 15:18 ` Dave Hansen
2023-08-27 18:38   ` Jarkko Sakkinen

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).