diff options
author | Mike Travis <travis@sgi.com> | 2016-04-29 17:54:13 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2016-05-04 02:48:49 -0400 |
commit | d38bb135d814e96811e1a0778564d7a2df922e28 (patch) | |
tree | 1fcce8804b029d59fdbb9693add14b419f078bd7 /arch/x86/include/asm/uv | |
parent | 0045ddd23f21ad1964c01228257bc6c692e1c2f9 (diff) |
x86/platform/UV: Move scir info to the per cpu info struct
Change the references to the SCIR fields to the new per cpu info structs.
Tested-by: John Estabrook <estabrook@sgi.com>
Tested-by: Gary Kroening <gfk@sgi.com>
Tested-by: Nathan Zimmer <nzimmer@sgi.com>
Signed-off-by: Mike Travis <travis@sgi.com>
Reviewed-by: Dimitri Sivanich <sivanich@sgi.com>
Cc: Andrew Banman <abanman@sgi.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Len Brown <len.brown@intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Russ Anderson <rja@sgi.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20160429215404.452538234@asylum.americas.sgi.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/include/asm/uv')
-rw-r--r-- | arch/x86/include/asm/uv/uv_hub.h | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/arch/x86/include/asm/uv/uv_hub.h b/arch/x86/include/asm/uv/uv_hub.h index 2ff0eb8058ae..b8c5a6198ca1 100644 --- a/arch/x86/include/asm/uv/uv_hub.h +++ b/arch/x86/include/asm/uv/uv_hub.h | |||
@@ -127,6 +127,7 @@ | |||
127 | */ | 127 | */ |
128 | #define UV_MAX_NASID_VALUE (UV_MAX_NUMALINK_BLADES * 2) | 128 | #define UV_MAX_NASID_VALUE (UV_MAX_NUMALINK_BLADES * 2) |
129 | 129 | ||
130 | /* System Controller Interface Reg info */ | ||
130 | struct uv_scir_s { | 131 | struct uv_scir_s { |
131 | struct timer_list timer; | 132 | struct timer_list timer; |
132 | unsigned long offset; | 133 | unsigned long offset; |
@@ -161,7 +162,6 @@ struct uv_hub_info_s { | |||
161 | unsigned char blade_processor_id; | 162 | unsigned char blade_processor_id; |
162 | unsigned char m_val; | 163 | unsigned char m_val; |
163 | unsigned char n_val; | 164 | unsigned char n_val; |
164 | struct uv_scir_s scir; | ||
165 | }; | 165 | }; |
166 | 166 | ||
167 | DECLARE_PER_CPU(struct uv_hub_info_s, __uv_hub_info); | 167 | DECLARE_PER_CPU(struct uv_hub_info_s, __uv_hub_info); |
@@ -179,6 +179,9 @@ DECLARE_PER_CPU(struct uv_cpu_info_s, __uv_cpu_info); | |||
179 | #define uv_cpu_info this_cpu_ptr(&__uv_cpu_info) | 179 | #define uv_cpu_info this_cpu_ptr(&__uv_cpu_info) |
180 | #define uv_cpu_info_per(cpu) (&per_cpu(__uv_cpu_info, cpu)) | 180 | #define uv_cpu_info_per(cpu) (&per_cpu(__uv_cpu_info, cpu)) |
181 | 181 | ||
182 | #define uv_scir_info (&uv_cpu_info->scir) | ||
183 | #define uv_cpu_scir_info(cpu) (&uv_cpu_info_per(cpu)->scir) | ||
184 | |||
182 | /* | 185 | /* |
183 | * HUB revision ranges for each UV HUB architecture. | 186 | * HUB revision ranges for each UV HUB architecture. |
184 | * This is a software convention - NOT the hardware revision numbers in | 187 | * This is a software convention - NOT the hardware revision numbers in |
@@ -686,9 +689,9 @@ DECLARE_PER_CPU(struct uv_cpu_nmi_s, uv_cpu_nmi); | |||
686 | /* Update SCIR state */ | 689 | /* Update SCIR state */ |
687 | static inline void uv_set_scir_bits(unsigned char value) | 690 | static inline void uv_set_scir_bits(unsigned char value) |
688 | { | 691 | { |
689 | if (uv_hub_info->scir.state != value) { | 692 | if (uv_scir_info->state != value) { |
690 | uv_hub_info->scir.state = value; | 693 | uv_scir_info->state = value; |
691 | uv_write_local_mmr8(uv_hub_info->scir.offset, value); | 694 | uv_write_local_mmr8(uv_scir_info->offset, value); |
692 | } | 695 | } |
693 | } | 696 | } |
694 | 697 | ||
@@ -699,10 +702,10 @@ static inline unsigned long uv_scir_offset(int apicid) | |||
699 | 702 | ||
700 | static inline void uv_set_cpu_scir_bits(int cpu, unsigned char value) | 703 | static inline void uv_set_cpu_scir_bits(int cpu, unsigned char value) |
701 | { | 704 | { |
702 | if (uv_cpu_hub_info(cpu)->scir.state != value) { | 705 | if (uv_cpu_scir_info(cpu)->state != value) { |
703 | uv_write_global_mmr8(uv_cpu_to_pnode(cpu), | 706 | uv_write_global_mmr8(uv_cpu_to_pnode(cpu), |
704 | uv_cpu_hub_info(cpu)->scir.offset, value); | 707 | uv_cpu_scir_info(cpu)->offset, value); |
705 | uv_cpu_hub_info(cpu)->scir.state = value; | 708 | uv_cpu_scir_info(cpu)->state = value; |
706 | } | 709 | } |
707 | } | 710 | } |
708 | 711 | ||