-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
locking, arch/ia64: Reduce <asm/smp.h> header dependencies by moving …
…XTP bits into the new <asm/xtp.h> header We want to remove the #include <asm/io.h> from <asm/smp.h>, but for this we have to move the XTP bits into a separate header first (as these bits rely on <asm/io.h> definitions), and include them in the .c files that rely on those APIs. Co-developed-by: Ingo Molnar <mingo@kernel.org> Signed-off-by: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Ingo Molnar <mingo@kernel.org>
- Loading branch information
Peter Zijlstra
authored and
Ingo Molnar
committed
Aug 6, 2020
1 parent
13c0113
commit b354519
Showing
9 changed files
with
53 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* SPDX-License-Identifier: GPL-2.0 */ | ||
#ifndef _ASM_IA64_XTP_H | ||
#define _ASM_IA64_XTP_H | ||
|
||
#include <asm/io.h> | ||
|
||
#ifdef CONFIG_SMP | ||
|
||
#define XTP_OFFSET 0x1e0008 | ||
|
||
#define SMP_IRQ_REDIRECTION (1 << 0) | ||
#define SMP_IPI_REDIRECTION (1 << 1) | ||
|
||
extern unsigned char smp_int_redirect; | ||
|
||
/* | ||
* XTP control functions: | ||
* min_xtp : route all interrupts to this CPU | ||
* normal_xtp: nominal XTP value | ||
* max_xtp : never deliver interrupts to this CPU. | ||
*/ | ||
|
||
static inline void | ||
min_xtp (void) | ||
{ | ||
if (smp_int_redirect & SMP_IRQ_REDIRECTION) | ||
writeb(0x00, ipi_base_addr + XTP_OFFSET); /* XTP to min */ | ||
} | ||
|
||
static inline void | ||
normal_xtp (void) | ||
{ | ||
if (smp_int_redirect & SMP_IRQ_REDIRECTION) | ||
writeb(0x08, ipi_base_addr + XTP_OFFSET); /* XTP normal */ | ||
} | ||
|
||
static inline void | ||
max_xtp (void) | ||
{ | ||
if (smp_int_redirect & SMP_IRQ_REDIRECTION) | ||
writeb(0x0f, ipi_base_addr + XTP_OFFSET); /* Set XTP to max */ | ||
} | ||
|
||
#endif /* CONFIG_SMP */ | ||
|
||
#endif /* _ASM_IA64_XTP_Hy */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters