diff options
Diffstat (limited to 'arch/mips/include/asm/netlogic/common.h')
-rw-r--r-- | arch/mips/include/asm/netlogic/common.h | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/arch/mips/include/asm/netlogic/common.h b/arch/mips/include/asm/netlogic/common.h index aef560a51a7e..bb68c3398c80 100644 --- a/arch/mips/include/asm/netlogic/common.h +++ b/arch/mips/include/asm/netlogic/common.h | |||
@@ -39,11 +39,17 @@ | |||
39 | * Common SMP definitions | 39 | * Common SMP definitions |
40 | */ | 40 | */ |
41 | #define RESET_VEC_PHYS 0x1fc00000 | 41 | #define RESET_VEC_PHYS 0x1fc00000 |
42 | #define RESET_VEC_SIZE 8192 /* 8KB reset code and data */ | ||
42 | #define RESET_DATA_PHYS (RESET_VEC_PHYS + (1<<10)) | 43 | #define RESET_DATA_PHYS (RESET_VEC_PHYS + (1<<10)) |
44 | |||
45 | /* Offsets of parameters in the RESET_DATA_PHYS area */ | ||
43 | #define BOOT_THREAD_MODE 0 | 46 | #define BOOT_THREAD_MODE 0 |
44 | #define BOOT_NMI_LOCK 4 | 47 | #define BOOT_NMI_LOCK 4 |
45 | #define BOOT_NMI_HANDLER 8 | 48 | #define BOOT_NMI_HANDLER 8 |
46 | 49 | ||
50 | /* CPU ready flags for each CPU */ | ||
51 | #define BOOT_CPU_READY 2048 | ||
52 | |||
47 | #ifndef __ASSEMBLY__ | 53 | #ifndef __ASSEMBLY__ |
48 | #include <linux/cpumask.h> | 54 | #include <linux/cpumask.h> |
49 | #include <linux/spinlock.h> | 55 | #include <linux/spinlock.h> |
@@ -59,23 +65,32 @@ int nlm_wakeup_secondary_cpus(void); | |||
59 | void nlm_rmiboot_preboot(void); | 65 | void nlm_rmiboot_preboot(void); |
60 | void nlm_percpu_init(int hwcpuid); | 66 | void nlm_percpu_init(int hwcpuid); |
61 | 67 | ||
68 | static inline void * | ||
69 | nlm_get_boot_data(int offset) | ||
70 | { | ||
71 | return (void *)(CKSEG1ADDR(RESET_DATA_PHYS) + offset); | ||
72 | } | ||
73 | |||
62 | static inline void | 74 | static inline void |
63 | nlm_set_nmi_handler(void *handler) | 75 | nlm_set_nmi_handler(void *handler) |
64 | { | 76 | { |
65 | char *reset_data; | 77 | void *nmih = nlm_get_boot_data(BOOT_NMI_HANDLER); |
66 | 78 | ||
67 | reset_data = (char *)CKSEG1ADDR(RESET_DATA_PHYS); | 79 | *(int64_t *)nmih = (long)handler; |
68 | *(int64_t *)(reset_data + BOOT_NMI_HANDLER) = (long)handler; | ||
69 | } | 80 | } |
70 | 81 | ||
71 | /* | 82 | /* |
72 | * Misc. | 83 | * Misc. |
73 | */ | 84 | */ |
85 | void nlm_init_boot_cpu(void); | ||
74 | unsigned int nlm_get_cpu_frequency(void); | 86 | unsigned int nlm_get_cpu_frequency(void); |
75 | void nlm_node_init(int node); | 87 | void nlm_node_init(int node); |
76 | extern struct plat_smp_ops nlm_smp_ops; | 88 | extern struct plat_smp_ops nlm_smp_ops; |
77 | extern char nlm_reset_entry[], nlm_reset_entry_end[]; | 89 | extern char nlm_reset_entry[], nlm_reset_entry_end[]; |
78 | 90 | ||
91 | /* SWIOTLB */ | ||
92 | extern struct dma_map_ops nlm_swiotlb_dma_ops; | ||
93 | |||
79 | extern unsigned int nlm_threads_per_core; | 94 | extern unsigned int nlm_threads_per_core; |
80 | extern cpumask_t nlm_cpumask; | 95 | extern cpumask_t nlm_cpumask; |
81 | 96 | ||