diff options
author | Anton Blanchard <anton@samba.org> | 2006-02-13 02:11:13 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-02-23 19:36:33 -0500 |
commit | f1870f772c5e884862b4dd8f1ec2147247dda0ef (patch) | |
tree | 652414b8090a4b24e03aba76ddd37d83b762b88b /arch/powerpc/kernel/head_64.S | |
parent | cb2c9b2741346eb23b177187a51ff5abf08295bd (diff) |
[PATCH] powerpc64: remove broken/bitrotted HMT support
HMT support is currently broken and needs to be reworked to play nicely
with the SMT scheduler. Remove the bit rotten bits for the time being.
I also updated an incorrect comment, we enter __secondary_hold with the
physical cpu id in r3.
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/head_64.S')
-rw-r--r-- | arch/powerpc/kernel/head_64.S | 97 |
1 files changed, 4 insertions, 93 deletions
diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S index bb845eed0e98..11f2cd5af7dc 100644 --- a/arch/powerpc/kernel/head_64.S +++ b/arch/powerpc/kernel/head_64.S | |||
@@ -139,7 +139,7 @@ _GLOBAL(__secondary_hold) | |||
139 | ori r24,r24,MSR_RI | 139 | ori r24,r24,MSR_RI |
140 | mtmsrd r24 /* RI on */ | 140 | mtmsrd r24 /* RI on */ |
141 | 141 | ||
142 | /* Grab our linux cpu number */ | 142 | /* Grab our physical cpu number */ |
143 | mr r24,r3 | 143 | mr r24,r3 |
144 | 144 | ||
145 | /* Tell the master cpu we're here */ | 145 | /* Tell the master cpu we're here */ |
@@ -153,11 +153,7 @@ _GLOBAL(__secondary_hold) | |||
153 | cmpdi 0,r4,1 | 153 | cmpdi 0,r4,1 |
154 | bne 100b | 154 | bne 100b |
155 | 155 | ||
156 | #ifdef CONFIG_HMT | 156 | #if defined(CONFIG_SMP) || defined(CONFIG_KEXEC) |
157 | SET_REG_IMMEDIATE(r4, .hmt_init) | ||
158 | mtctr r4 | ||
159 | bctr | ||
160 | #elif defined(CONFIG_SMP) || defined(CONFIG_KEXEC) | ||
161 | LOAD_REG_IMMEDIATE(r4, .pSeries_secondary_smp_init) | 157 | LOAD_REG_IMMEDIATE(r4, .pSeries_secondary_smp_init) |
162 | mtctr r4 | 158 | mtctr r4 |
163 | mr r3,r24 | 159 | mr r3,r24 |
@@ -1808,22 +1804,6 @@ _STATIC(start_here_multiplatform) | |||
1808 | ori r6,r6,MSR_RI | 1804 | ori r6,r6,MSR_RI |
1809 | mtmsrd r6 /* RI on */ | 1805 | mtmsrd r6 /* RI on */ |
1810 | 1806 | ||
1811 | #ifdef CONFIG_HMT | ||
1812 | /* Start up the second thread on cpu 0 */ | ||
1813 | mfspr r3,SPRN_PVR | ||
1814 | srwi r3,r3,16 | ||
1815 | cmpwi r3,0x34 /* Pulsar */ | ||
1816 | beq 90f | ||
1817 | cmpwi r3,0x36 /* Icestar */ | ||
1818 | beq 90f | ||
1819 | cmpwi r3,0x37 /* SStar */ | ||
1820 | beq 90f | ||
1821 | b 91f /* HMT not supported */ | ||
1822 | 90: li r3,0 | ||
1823 | bl .hmt_start_secondary | ||
1824 | 91: | ||
1825 | #endif | ||
1826 | |||
1827 | /* The following gets the stack and TOC set up with the regs */ | 1807 | /* The following gets the stack and TOC set up with the regs */ |
1828 | /* pointing to the real addr of the kernel stack. This is */ | 1808 | /* pointing to the real addr of the kernel stack. This is */ |
1829 | /* all done to support the C function call below which sets */ | 1809 | /* all done to support the C function call below which sets */ |
@@ -1937,77 +1917,8 @@ _STATIC(start_here_common) | |||
1937 | 1917 | ||
1938 | bl .start_kernel | 1918 | bl .start_kernel |
1939 | 1919 | ||
1940 | _GLOBAL(hmt_init) | 1920 | /* Not reached */ |
1941 | #ifdef CONFIG_HMT | 1921 | BUG_OPCODE |
1942 | LOAD_REG_IMMEDIATE(r5, hmt_thread_data) | ||
1943 | mfspr r7,SPRN_PVR | ||
1944 | srwi r7,r7,16 | ||
1945 | cmpwi r7,0x34 /* Pulsar */ | ||
1946 | beq 90f | ||
1947 | cmpwi r7,0x36 /* Icestar */ | ||
1948 | beq 91f | ||
1949 | cmpwi r7,0x37 /* SStar */ | ||
1950 | beq 91f | ||
1951 | b 101f | ||
1952 | 90: mfspr r6,SPRN_PIR | ||
1953 | andi. r6,r6,0x1f | ||
1954 | b 92f | ||
1955 | 91: mfspr r6,SPRN_PIR | ||
1956 | andi. r6,r6,0x3ff | ||
1957 | 92: sldi r4,r24,3 | ||
1958 | stwx r6,r5,r4 | ||
1959 | bl .hmt_start_secondary | ||
1960 | b 101f | ||
1961 | |||
1962 | __hmt_secondary_hold: | ||
1963 | LOAD_REG_IMMEDIATE(r5, hmt_thread_data) | ||
1964 | clrldi r5,r5,4 | ||
1965 | li r7,0 | ||
1966 | mfspr r6,SPRN_PIR | ||
1967 | mfspr r8,SPRN_PVR | ||
1968 | srwi r8,r8,16 | ||
1969 | cmpwi r8,0x34 | ||
1970 | bne 93f | ||
1971 | andi. r6,r6,0x1f | ||
1972 | b 103f | ||
1973 | 93: andi. r6,r6,0x3f | ||
1974 | |||
1975 | 103: lwzx r8,r5,r7 | ||
1976 | cmpw r8,r6 | ||
1977 | beq 104f | ||
1978 | addi r7,r7,8 | ||
1979 | b 103b | ||
1980 | |||
1981 | 104: addi r7,r7,4 | ||
1982 | lwzx r9,r5,r7 | ||
1983 | mr r24,r9 | ||
1984 | 101: | ||
1985 | #endif | ||
1986 | mr r3,r24 | ||
1987 | b .pSeries_secondary_smp_init | ||
1988 | |||
1989 | #ifdef CONFIG_HMT | ||
1990 | _GLOBAL(hmt_start_secondary) | ||
1991 | LOAD_REG_IMMEDIATE(r4,__hmt_secondary_hold) | ||
1992 | clrldi r4,r4,4 | ||
1993 | mtspr SPRN_NIADORM, r4 | ||
1994 | mfspr r4, SPRN_MSRDORM | ||
1995 | li r5, -65 | ||
1996 | and r4, r4, r5 | ||
1997 | mtspr SPRN_MSRDORM, r4 | ||
1998 | lis r4,0xffef | ||
1999 | ori r4,r4,0x7403 | ||
2000 | mtspr SPRN_TSC, r4 | ||
2001 | li r4,0x1f4 | ||
2002 | mtspr SPRN_TST, r4 | ||
2003 | mfspr r4, SPRN_HID0 | ||
2004 | ori r4, r4, 0x1 | ||
2005 | mtspr SPRN_HID0, r4 | ||
2006 | mfspr r4, SPRN_CTRLF | ||
2007 | oris r4, r4, 0x40 | ||
2008 | mtspr SPRN_CTRLT, r4 | ||
2009 | blr | ||
2010 | #endif | ||
2011 | 1922 | ||
2012 | /* | 1923 | /* |
2013 | * We put a few things here that have to be page-aligned. | 1924 | * We put a few things here that have to be page-aligned. |