File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -546,6 +546,7 @@ config SGI_IP28
546546 # select SYS_HAS_EARLY_PRINTK
547547 select SYS_SUPPORTS_64BIT_KERNEL
548548 select SYS_SUPPORTS_BIG_ENDIAN
549+ select MIPS_L1_CACHE_SHIFT_7
549550 help
550551 This is the SGI Indigo2 with R10000 processor. To compile a Linux
551552 kernel that runs on these, say Y here.
@@ -2029,7 +2030,9 @@ config MIPS_CMP
20292030 bool "MIPS CMP framework support (DEPRECATED)"
20302031 depends on SYS_SUPPORTS_MIPS_CMP
20312032 select MIPS_GIC_IPI
2033+ select SMP
20322034 select SYNC_R4K
2035+ select SYS_SUPPORTS_SMP
20332036 select WEAK_ORDERING
20342037 default n
20352038 help
Original file line number Diff line number Diff line change @@ -113,7 +113,16 @@ predef-le += -DMIPSEL -D_MIPSEL -D__MIPSEL -D__MIPSEL__
113113cflags-$(CONFIG_CPU_BIG_ENDIAN) += $(shell $(CC ) -dumpmachine |grep -q 'mips.* el-.* ' && echo -EB $(undef-all ) $(predef-be ) )
114114cflags-$(CONFIG_CPU_LITTLE_ENDIAN) += $(shell $(CC ) -dumpmachine |grep -q 'mips.* el-.* ' || echo -EL $(undef-all ) $(predef-le ) )
115115
116- cflags-$(CONFIG_CPU_HAS_SMARTMIPS) += $(call cc-option,-msmartmips)
116+ # For smartmips configurations, there are hundreds of warnings due to ISA overrides
117+ # in assembly and header files. smartmips is only supported for MIPS32r1 onwards
118+ # and there is no support for 64-bit. Various '.set mips2' or '.set mips3' or
119+ # similar directives in the kernel will spam the build logs with the following warnings:
120+ # Warning: the `smartmips' extension requires MIPS32 revision 1 or greater
121+ # or
122+ # Warning: the 64-bit MIPS architecture does not support the `smartmips' extension
123+ # Pass -Wa,--no-warn to disable all assembler warnings until the kernel code has
124+ # been fixed properly.
125+ cflags-$(CONFIG_CPU_HAS_SMARTMIPS) += $(call cc-option,-msmartmips) -Wa,--no-warn
117126cflags-$(CONFIG_CPU_MICROMIPS) += $(call cc-option,-mmicromips)
118127
119128cflags-$(CONFIG_SB1XXX_CORELIS) += $(call cc-option,-mno-sched-prolog) \
Original file line number Diff line number Diff line change @@ -434,7 +434,7 @@ static void bcm63xx_init_irq(void)
434434 irq_stat_addr [0 ] += PERF_IRQSTAT_3368_REG ;
435435 irq_mask_addr [0 ] += PERF_IRQMASK_3368_REG ;
436436 irq_stat_addr [1 ] = 0 ;
437- irq_stat_addr [1 ] = 0 ;
437+ irq_mask_addr [1 ] = 0 ;
438438 irq_bits = 32 ;
439439 ext_irq_count = 4 ;
440440 ext_irq_cfg_reg1 = PERF_EXTIRQ_CFG_REG_3368 ;
@@ -443,7 +443,7 @@ static void bcm63xx_init_irq(void)
443443 irq_stat_addr [0 ] += PERF_IRQSTAT_6328_REG (0 );
444444 irq_mask_addr [0 ] += PERF_IRQMASK_6328_REG (0 );
445445 irq_stat_addr [1 ] += PERF_IRQSTAT_6328_REG (1 );
446- irq_stat_addr [1 ] += PERF_IRQMASK_6328_REG (1 );
446+ irq_mask_addr [1 ] += PERF_IRQMASK_6328_REG (1 );
447447 irq_bits = 64 ;
448448 ext_irq_count = 4 ;
449449 is_ext_irq_cascaded = 1 ;
Original file line number Diff line number Diff line change 1313
1414#include <linux/types.h>
1515#include <linux/kernel.h>
16+ #include <linux/string.h>
1617
1718#include <asm/addrspace.h>
1819
Original file line number Diff line number Diff line change 1616extern void octeon_cop2_save (struct octeon_cop2_state * );
1717extern void octeon_cop2_restore (struct octeon_cop2_state * );
1818
19- #define cop2_save (r ) octeon_cop2_save(r )
20- #define cop2_restore (r ) octeon_cop2_restore(r )
19+ #define cop2_save (r ) octeon_cop2_save(&(r)->thread.cp2 )
20+ #define cop2_restore (r ) octeon_cop2_restore(&(r)->thread.cp2 )
2121
2222#define cop2_present 1
2323#define cop2_lazy_restore 1
@@ -26,26 +26,26 @@ extern void octeon_cop2_restore(struct octeon_cop2_state *);
2626
2727extern void nlm_cop2_save (struct nlm_cop2_state * );
2828extern void nlm_cop2_restore (struct nlm_cop2_state * );
29- #define cop2_save (r ) nlm_cop2_save(r)
30- #define cop2_restore (r ) nlm_cop2_restore(r)
29+
30+ #define cop2_save (r ) nlm_cop2_save(&(r)->thread.cp2)
31+ #define cop2_restore (r ) nlm_cop2_restore(&(r)->thread.cp2)
3132
3233#define cop2_present 1
3334#define cop2_lazy_restore 0
3435
3536#elif defined(CONFIG_CPU_LOONGSON3 )
3637
37- #define cop2_save (r )
38- #define cop2_restore (r )
39-
4038#define cop2_present 1
4139#define cop2_lazy_restore 1
40+ #define cop2_save (r ) do { (r); } while (0)
41+ #define cop2_restore (r ) do { (r); } while (0)
4242
4343#else
4444
4545#define cop2_present 0
4646#define cop2_lazy_restore 0
47- #define cop2_save (r )
48- #define cop2_restore (r )
47+ #define cop2_save (r ) do { (r); } while (0)
48+ #define cop2_restore (r ) do { (r); } while (0)
4949#endif
5050
5151enum cu2_ops {
Original file line number Diff line number Diff line change 1111#ifndef _ASM_MACH_IP28_SPACES_H
1212#define _ASM_MACH_IP28_SPACES_H
1313
14- #define CAC_BASE _AC(0xa800000000000000, UL)
15-
16- #define HIGHMEM_START (~0UL)
17-
1814#define PHYS_OFFSET _AC(0x20000000, UL)
1915
20- #define UNCAC_BASE _AC(0xc0000000, UL) /* 0xa0000000 + PHYS_OFFSET */
21- #define IO_BASE UNCAC_BASE
22-
2316#include <asm/mach-generic/spaces.h>
2417
2518#endif /* _ASM_MACH_IP28_SPACES_H */
Original file line number Diff line number Diff line change 3737
3838/*
3939 * This is used for calculating the real page sizes
40- * for FTLB or VTLB + FTLB confugrations .
40+ * for FTLB or VTLB + FTLB configurations .
4141 */
4242static inline unsigned int page_size_ftlb (unsigned int mmuextdef )
4343{
@@ -223,7 +223,8 @@ static inline int pfn_valid(unsigned long pfn)
223223
224224#endif
225225
226- #define virt_to_page (kaddr ) pfn_to_page(PFN_DOWN(virt_to_phys(kaddr)))
226+ #define virt_to_page (kaddr ) pfn_to_page(PFN_DOWN(virt_to_phys((void *) \
227+ (kaddr))))
227228
228229extern int __virt_addr_valid (const volatile void * kaddr );
229230#define virt_addr_valid (kaddr ) \
Original file line number Diff line number Diff line change @@ -37,11 +37,6 @@ extern int __cpu_logical_map[NR_CPUS];
3737
3838#define NO_PROC_ID (-1)
3939
40- #define topology_physical_package_id (cpu ) (cpu_data[cpu].package)
41- #define topology_core_id (cpu ) (cpu_data[cpu].core)
42- #define topology_core_cpumask (cpu ) (&cpu_core_map[cpu])
43- #define topology_thread_cpumask (cpu ) (&cpu_sibling_map[cpu])
44-
4540#define SMP_RESCHEDULE_YOURSELF 0x1 /* XXX braindead */
4641#define SMP_CALL_FUNCTION 0x2
4742/* Octeon - Tell another core to flush its icache */
Original file line number Diff line number Diff line change 9292 KSTK_STATUS(prev) &= ~ST0_CU2; \
9393 __c0_stat = read_c0_status(); \
9494 write_c0_status(__c0_stat | ST0_CU2); \
95- cop2_save(& prev->thread.cp2); \
95+ cop2_save(prev); \
9696 write_c0_status(__c0_stat & ~ST0_CU2); \
9797 } \
9898 __clear_software_ll_bit(); \
@@ -111,7 +111,7 @@ do { \
111111 (KSTK_STATUS(current) & ST0_CU2)) { \
112112 __c0_stat = read_c0_status(); \
113113 write_c0_status(__c0_stat | ST0_CU2); \
114- cop2_restore(& current->thread.cp2); \
114+ cop2_restore(current); \
115115 write_c0_status(__c0_stat & ~ST0_CU2); \
116116 } \
117117 if (cpu_has_dsp) \
Original file line number Diff line number Diff line change 99#define __ASM_TOPOLOGY_H
1010
1111#include <topology.h>
12+ #include <linux/smp.h>
13+
14+ #ifdef CONFIG_SMP
15+ #define topology_physical_package_id (cpu ) (cpu_data[cpu].package)
16+ #define topology_core_id (cpu ) (cpu_data[cpu].core)
17+ #define topology_core_cpumask (cpu ) (&cpu_core_map[cpu])
18+ #define topology_thread_cpumask (cpu ) (&cpu_sibling_map[cpu])
19+ #endif
1220
1321#endif /* __ASM_TOPOLOGY_H */
You can’t perform that action at this time.
0 commit comments