@@ -445,17 +445,6 @@ do { \
445
445
#define this_cpu_try_cmpxchg128 (pcp , ovalp , nval ) percpu_try_cmpxchg128_op(16, volatile, pcp, ovalp, nval)
446
446
#endif
447
447
448
- /*
449
- * this_cpu_read() makes gcc load the percpu variable every time it is
450
- * accessed while this_cpu_read_stable() allows the value to be cached.
451
- * this_cpu_read_stable() is more efficient and can be used if its value
452
- * is guaranteed to be valid across cpus. The current users include
453
- * pcpu_hot.current_task and pcpu_hot.top_of_stack, both of which are
454
- * actually per-thread variables implemented as per-CPU variables and
455
- * thus stable for the duration of the respective task.
456
- */
457
- #define this_cpu_read_stable (pcp ) __pcpu_size_call_return(this_cpu_read_stable_, pcp)
458
-
459
448
#define raw_cpu_read_1 (pcp ) __raw_cpu_read(1, , pcp)
460
449
#define raw_cpu_read_2 (pcp ) __raw_cpu_read(2, , pcp)
461
450
#define raw_cpu_read_4 (pcp ) __raw_cpu_read(4, , pcp)
@@ -470,16 +459,6 @@ do { \
470
459
#define this_cpu_write_2 (pcp , val ) __raw_cpu_write(2, volatile, pcp, val)
471
460
#define this_cpu_write_4 (pcp , val ) __raw_cpu_write(4, volatile, pcp, val)
472
461
473
- #ifdef CONFIG_X86_64
474
- #define raw_cpu_read_8 (pcp ) __raw_cpu_read(8, , pcp)
475
- #define raw_cpu_write_8 (pcp , val ) __raw_cpu_write(8, , pcp, val)
476
-
477
- #define this_cpu_read_8 (pcp ) __raw_cpu_read(8, volatile, pcp)
478
- #define this_cpu_write_8 (pcp , val ) __raw_cpu_write(8, volatile, pcp, val)
479
- #endif
480
-
481
- #define this_cpu_read_const (pcp ) __raw_cpu_read_const(pcp)
482
-
483
462
#define this_cpu_read_stable_1 (pcp ) __raw_cpu_read_stable(1, pcp)
484
463
#define this_cpu_read_stable_2 (pcp ) __raw_cpu_read_stable(2, pcp)
485
464
#define this_cpu_read_stable_4 (pcp ) __raw_cpu_read_stable(4, pcp)
@@ -535,6 +514,12 @@ do { \
535
514
* 32 bit must fall back to generic operations.
536
515
*/
537
516
#ifdef CONFIG_X86_64
517
+ #define raw_cpu_read_8 (pcp ) __raw_cpu_read(8, , pcp)
518
+ #define raw_cpu_write_8 (pcp , val ) __raw_cpu_write(8, , pcp, val)
519
+
520
+ #define this_cpu_read_8 (pcp ) __raw_cpu_read(8, volatile, pcp)
521
+ #define this_cpu_write_8 (pcp , val ) __raw_cpu_write(8, volatile, pcp, val)
522
+
538
523
#define this_cpu_read_stable_8 (pcp ) __raw_cpu_read_stable(8, pcp)
539
524
540
525
#define raw_cpu_add_8 (pcp , val ) percpu_add_op(8, , (pcp), val)
@@ -561,6 +546,19 @@ do { \
561
546
#define raw_cpu_read_long (pcp ) raw_cpu_read_4(pcp)
562
547
#endif
563
548
549
+ #define this_cpu_read_const (pcp ) __raw_cpu_read_const(pcp)
550
+
551
+ /*
552
+ * this_cpu_read() makes gcc load the percpu variable every time it is
553
+ * accessed while this_cpu_read_stable() allows the value to be cached.
554
+ * this_cpu_read_stable() is more efficient and can be used if its value
555
+ * is guaranteed to be valid across cpus. The current users include
556
+ * pcpu_hot.current_task and pcpu_hot.top_of_stack, both of which are
557
+ * actually per-thread variables implemented as per-CPU variables and
558
+ * thus stable for the duration of the respective task.
559
+ */
560
+ #define this_cpu_read_stable (pcp ) __pcpu_size_call_return(this_cpu_read_stable_, pcp)
561
+
564
562
#define x86_this_cpu_constant_test_bit (_nr , _var ) \
565
563
({ \
566
564
unsigned long __percpu *addr__ = \
0 commit comments