All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86/sgx: Drop 'page_index' from sgx_backing
@ 2022-07-08 16:21 Kristen Carlson Accardi
  2022-07-08 17:08 ` [tip: x86/sgx] " tip-bot2 for Sean Christopherson
  2022-07-11  2:35 ` [PATCH] x86/sgx: Drop 'page_index' from sgx_backingf Jarkko Sakkinen
  0 siblings, 2 replies; 3+ messages in thread
From: Kristen Carlson Accardi @ 2022-07-08 16:21 UTC (permalink / raw)
  To: linux-sgx, Jarkko Sakkinen, Dave Hansen, Thomas Gleixner,
	Ingo Molnar, Borislav Petkov, x86, H. Peter Anvin
  Cc: linux-kernel, Kristen Carlson Accardi, Sean Christopherson

From: Sean Christopherson <sean.j.christopherson@intel.com>

Storing the 'page_index' value in the sgx_backing struct is
dead code and no longer needed.

Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Kristen Carlson Accardi <kristen@linux.intel.com>
Cc: Sean Christopherson <seanjc@google.com>
---
 arch/x86/kernel/cpu/sgx/encl.c | 1 -
 arch/x86/kernel/cpu/sgx/encl.h | 1 -
 2 files changed, 2 deletions(-)

diff --git a/arch/x86/kernel/cpu/sgx/encl.c b/arch/x86/kernel/cpu/sgx/encl.c
index 19876ebfb504..fa93586a536c 100644
--- a/arch/x86/kernel/cpu/sgx/encl.c
+++ b/arch/x86/kernel/cpu/sgx/encl.c
@@ -735,7 +735,6 @@ static int sgx_encl_get_backing(struct sgx_encl *encl, unsigned long page_index,
 		return PTR_ERR(pcmd);
 	}
 
-	backing->page_index = page_index;
 	backing->contents = contents;
 	backing->pcmd = pcmd;
 	backing->pcmd_offset = page_pcmd_off & (PAGE_SIZE - 1);
diff --git a/arch/x86/kernel/cpu/sgx/encl.h b/arch/x86/kernel/cpu/sgx/encl.h
index 332ef3568267..eeb1a53ddf48 100644
--- a/arch/x86/kernel/cpu/sgx/encl.h
+++ b/arch/x86/kernel/cpu/sgx/encl.h
@@ -78,7 +78,6 @@ struct sgx_va_page {
 };
 
 struct sgx_backing {
-	pgoff_t page_index;
 	struct page *contents;
 	struct page *pcmd;
 	unsigned long pcmd_offset;
-- 
2.20.1


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

* [tip: x86/sgx] x86/sgx: Drop 'page_index' from sgx_backing
  2022-07-08 16:21 [PATCH] x86/sgx: Drop 'page_index' from sgx_backing Kristen Carlson Accardi
@ 2022-07-08 17:08 ` tip-bot2 for Sean Christopherson
  2022-07-11  2:35 ` [PATCH] x86/sgx: Drop 'page_index' from sgx_backingf Jarkko Sakkinen
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot2 for Sean Christopherson @ 2022-07-08 17:08 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Sean Christopherson, Kristen Carlson Accardi, Dave Hansen, x86,
	linux-kernel

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

Commit-ID:     e0a5915f1cca21da8ffc0563aea9fa1df5d16fb4
Gitweb:        https://git.kernel.org/tip/e0a5915f1cca21da8ffc0563aea9fa1df5d16fb4
Author:        Sean Christopherson <sean.j.christopherson@intel.com>
AuthorDate:    Fri, 08 Jul 2022 09:21:24 -07:00
Committer:     Dave Hansen <dave.hansen@linux.intel.com>
CommitterDate: Fri, 08 Jul 2022 09:31:11 -07:00

x86/sgx: Drop 'page_index' from sgx_backing

Storing the 'page_index' value in the sgx_backing struct is
dead code and no longer needed.

Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Kristen Carlson Accardi <kristen@linux.intel.com>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Link: https://lkml.kernel.org/r/20220708162124.8442-1-kristen@linux.intel.com
---
 arch/x86/kernel/cpu/sgx/encl.c | 1 -
 arch/x86/kernel/cpu/sgx/encl.h | 1 -
 2 files changed, 2 deletions(-)

diff --git a/arch/x86/kernel/cpu/sgx/encl.c b/arch/x86/kernel/cpu/sgx/encl.c
index 295a9c9..73bfc5a 100644
--- a/arch/x86/kernel/cpu/sgx/encl.c
+++ b/arch/x86/kernel/cpu/sgx/encl.c
@@ -943,7 +943,6 @@ int sgx_encl_get_backing(struct sgx_encl *encl, unsigned long page_index,
 		return PTR_ERR(pcmd);
 	}
 
-	backing->page_index = page_index;
 	backing->contents = contents;
 	backing->pcmd = pcmd;
 	backing->pcmd_offset = page_pcmd_off & (PAGE_SIZE - 1);
diff --git a/arch/x86/kernel/cpu/sgx/encl.h b/arch/x86/kernel/cpu/sgx/encl.h
index 3d0e0ba..57cc236 100644
--- a/arch/x86/kernel/cpu/sgx/encl.h
+++ b/arch/x86/kernel/cpu/sgx/encl.h
@@ -79,7 +79,6 @@ struct sgx_va_page {
 };
 
 struct sgx_backing {
-	pgoff_t page_index;
 	struct page *contents;
 	struct page *pcmd;
 	unsigned long pcmd_offset;

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

* Re: [PATCH] x86/sgx: Drop 'page_index' from sgx_backingf
  2022-07-08 16:21 [PATCH] x86/sgx: Drop 'page_index' from sgx_backing Kristen Carlson Accardi
  2022-07-08 17:08 ` [tip: x86/sgx] " tip-bot2 for Sean Christopherson
@ 2022-07-11  2:35 ` Jarkko Sakkinen
  1 sibling, 0 replies; 3+ messages in thread
From: Jarkko Sakkinen @ 2022-07-11  2:35 UTC (permalink / raw)
  To: Kristen Carlson Accardi
  Cc: linux-sgx, Dave Hansen, Thomas Gleixner, Ingo Molnar,
	Borislav Petkov, x86, H. Peter Anvin, linux-kernel,
	Sean Christopherson

On Fri, Jul 08, 2022 at 09:21:24AM -0700, Kristen Carlson Accardi wrote:
> From: Sean Christopherson <sean.j.christopherson@intel.com>
> 
> Storing the 'page_index' value in the sgx_backing struct is
> dead code and no longer needed.
> 
> Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
> Signed-off-by: Kristen Carlson Accardi <kristen@linux.intel.com>
> Cc: Sean Christopherson <seanjc@google.com>
> ---
>  arch/x86/kernel/cpu/sgx/encl.c | 1 -
>  arch/x86/kernel/cpu/sgx/encl.h | 1 -
>  2 files changed, 2 deletions(-)
> 
> diff --git a/arch/x86/kernel/cpu/sgx/encl.c b/arch/x86/kernel/cpu/sgx/encl.c
> index 19876ebfb504..fa93586a536c 100644
> --- a/arch/x86/kernel/cpu/sgx/encl.c
> +++ b/arch/x86/kernel/cpu/sgx/encl.c
> @@ -735,7 +735,6 @@ static int sgx_encl_get_backing(struct sgx_encl *encl, unsigned long page_index,
>  		return PTR_ERR(pcmd);
>  	}
>  
> -	backing->page_index = page_index;
>  	backing->contents = contents;
>  	backing->pcmd = pcmd;
>  	backing->pcmd_offset = page_pcmd_off & (PAGE_SIZE - 1);
> diff --git a/arch/x86/kernel/cpu/sgx/encl.h b/arch/x86/kernel/cpu/sgx/encl.h
> index 332ef3568267..eeb1a53ddf48 100644
> --- a/arch/x86/kernel/cpu/sgx/encl.h
> +++ b/arch/x86/kernel/cpu/sgx/encl.h
> @@ -78,7 +78,6 @@ struct sgx_va_page {
>  };
>  
>  struct sgx_backing {
> -	pgoff_t page_index;
>  	struct page *contents;
>  	struct page *pcmd;
>  	unsigned long pcmd_offset;
> -- 
> 2.20.1
> 


Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>

BR, Jarkko

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

end of thread, other threads:[~2022-07-11  2:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-08 16:21 [PATCH] x86/sgx: Drop 'page_index' from sgx_backing Kristen Carlson Accardi
2022-07-08 17:08 ` [tip: x86/sgx] " tip-bot2 for Sean Christopherson
2022-07-11  2:35 ` [PATCH] x86/sgx: Drop 'page_index' from sgx_backingf Jarkko Sakkinen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.