Commit 322bf2d3 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'for-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/dennis/percpu

Pull percpu updates from Dennis Zhou:
 "Separate out variables that can be decrypted into their own page
  anytime encryption can be enabled and fix __percpu annotations in
  asm-generic for sparse"

* 'for-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/dennis/percpu:
  percpu: Separate decrypted varaibles anytime encryption can be enabled
  percpu: fix __percpu annotation in asm-generic
parents 1716f536 264b0d2b
...@@ -74,7 +74,7 @@ do { \ ...@@ -74,7 +74,7 @@ do { \
#define raw_cpu_generic_add_return(pcp, val) \ #define raw_cpu_generic_add_return(pcp, val) \
({ \ ({ \
typeof(&(pcp)) __p = raw_cpu_ptr(&(pcp)); \ typeof(pcp) *__p = raw_cpu_ptr(&(pcp)); \
\ \
*__p += val; \ *__p += val; \
*__p; \ *__p; \
...@@ -82,7 +82,7 @@ do { \ ...@@ -82,7 +82,7 @@ do { \
#define raw_cpu_generic_xchg(pcp, nval) \ #define raw_cpu_generic_xchg(pcp, nval) \
({ \ ({ \
typeof(&(pcp)) __p = raw_cpu_ptr(&(pcp)); \ typeof(pcp) *__p = raw_cpu_ptr(&(pcp)); \
typeof(pcp) __ret; \ typeof(pcp) __ret; \
__ret = *__p; \ __ret = *__p; \
*__p = nval; \ *__p = nval; \
...@@ -91,7 +91,7 @@ do { \ ...@@ -91,7 +91,7 @@ do { \
#define raw_cpu_generic_cmpxchg(pcp, oval, nval) \ #define raw_cpu_generic_cmpxchg(pcp, oval, nval) \
({ \ ({ \
typeof(&(pcp)) __p = raw_cpu_ptr(&(pcp)); \ typeof(pcp) *__p = raw_cpu_ptr(&(pcp)); \
typeof(pcp) __ret; \ typeof(pcp) __ret; \
__ret = *__p; \ __ret = *__p; \
if (__ret == (oval)) \ if (__ret == (oval)) \
...@@ -101,8 +101,8 @@ do { \ ...@@ -101,8 +101,8 @@ do { \
#define raw_cpu_generic_cmpxchg_double(pcp1, pcp2, oval1, oval2, nval1, nval2) \ #define raw_cpu_generic_cmpxchg_double(pcp1, pcp2, oval1, oval2, nval1, nval2) \
({ \ ({ \
typeof(&(pcp1)) __p1 = raw_cpu_ptr(&(pcp1)); \ typeof(pcp1) *__p1 = raw_cpu_ptr(&(pcp1)); \
typeof(&(pcp2)) __p2 = raw_cpu_ptr(&(pcp2)); \ typeof(pcp2) *__p2 = raw_cpu_ptr(&(pcp2)); \
int __ret = 0; \ int __ret = 0; \
if (*__p1 == (oval1) && *__p2 == (oval2)) { \ if (*__p1 == (oval1) && *__p2 == (oval2)) { \
*__p1 = nval1; \ *__p1 = nval1; \
......
...@@ -175,8 +175,7 @@ ...@@ -175,8 +175,7 @@
* Declaration/definition used for per-CPU variables that should be accessed * Declaration/definition used for per-CPU variables that should be accessed
* as decrypted when memory encryption is enabled in the guest. * as decrypted when memory encryption is enabled in the guest.
*/ */
#if defined(CONFIG_VIRTUALIZATION) && defined(CONFIG_AMD_MEM_ENCRYPT) #ifdef CONFIG_AMD_MEM_ENCRYPT
#define DECLARE_PER_CPU_DECRYPTED(type, name) \ #define DECLARE_PER_CPU_DECRYPTED(type, name) \
DECLARE_PER_CPU_SECTION(type, name, "..decrypted") DECLARE_PER_CPU_SECTION(type, name, "..decrypted")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment