aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64
diff options
context:
space:
mode:
authorLachlan McIlroy <lachlan@redback.melbourne.sgi.com>2008-02-25 22:26:14 -0500
committerLachlan McIlroy <lachlan@redback.melbourne.sgi.com>2008-02-25 22:26:14 -0500
commit91e229bbad6524aabaac8717b2f559283670c37a (patch)
tree84a55e4ac2dcf23add97bd9fde3e9cb232c12b30 /arch/sparc64
parent6e5e93424dc66542c548dfaa3bfebe30d46d50dd (diff)
parentbfa274e2436fc7ef72ef51c878083647f1cfd429 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into for-linus
Diffstat (limited to 'arch/sparc64')
-rw-r--r--arch/sparc64/Kconfig.debug4
-rw-r--r--arch/sparc64/Makefile36
-rw-r--r--arch/sparc64/defconfig33
-rw-r--r--arch/sparc64/kernel/hvtramp.S4
-rw-r--r--arch/sparc64/kernel/iommu.c6
-rw-r--r--arch/sparc64/kernel/kprobes.c2
-rw-r--r--arch/sparc64/kernel/pci.c21
-rw-r--r--arch/sparc64/kernel/power.c3
-rw-r--r--arch/sparc64/kernel/process.c92
-rw-r--r--arch/sparc64/kernel/prom.c1
-rw-r--r--arch/sparc64/kernel/setup.c29
-rw-r--r--arch/sparc64/kernel/smp.c2
-rw-r--r--arch/sparc64/kernel/sparc64_ksyms.c3
-rw-r--r--arch/sparc64/kernel/trampoline.S4
-rw-r--r--arch/sparc64/kernel/traps.c2
-rw-r--r--arch/sparc64/kernel/unaligned.c3
-rw-r--r--arch/sparc64/mm/init.c49
-rw-r--r--arch/sparc64/prom/misc.c9
18 files changed, 54 insertions, 249 deletions
diff --git a/arch/sparc64/Kconfig.debug b/arch/sparc64/Kconfig.debug
index a5faa3683bd6..6a4d28a4076d 100644
--- a/arch/sparc64/Kconfig.debug
+++ b/arch/sparc64/Kconfig.debug
@@ -23,10 +23,6 @@ config STACK_DEBUG
23 depends on DEBUG_KERNEL 23 depends on DEBUG_KERNEL
24 bool "Stack Overflow Detection Support" 24 bool "Stack Overflow Detection Support"
25 25
26config DEBUG_BOOTMEM
27 depends on DEBUG_KERNEL
28 bool "Debug BOOTMEM initialization"
29
30config DEBUG_PAGEALLOC 26config DEBUG_PAGEALLOC
31 bool "Debug page memory allocations" 27 bool "Debug page memory allocations"
32 depends on DEBUG_KERNEL && !HIBERNATION 28 depends on DEBUG_KERNEL && !HIBERNATION
diff --git a/arch/sparc64/Makefile b/arch/sparc64/Makefile
index 01159cb5f16d..f0c22f826982 100644
--- a/arch/sparc64/Makefile
+++ b/arch/sparc64/Makefile
@@ -12,39 +12,13 @@ CHECKFLAGS += -D__sparc__ -D__sparc_v9__ -m64
12 12
13CPPFLAGS_vmlinux.lds += -Usparc 13CPPFLAGS_vmlinux.lds += -Usparc
14 14
15CC := $(shell if $(CC) -m64 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo $(CC); else echo sparc64-linux-gcc; fi )
16
17NEW_GCC := $(call cc-option-yn, -m64 -mcmodel=medlow)
18NEW_GAS := $(shell if $(LD) -V 2>&1 | grep 'elf64_sparc' > /dev/null; then echo y; else echo n; fi)
19UNDECLARED_REGS := $(shell if $(CC) -c -x assembler /dev/null -Wa,--help | grep undeclared-regs > /dev/null; then echo y; else echo n; fi; )
20
21ifneq ($(NEW_GAS),y)
22AS = sparc64-linux-as
23LD = sparc64-linux-ld
24NM = sparc64-linux-nm
25AR = sparc64-linux-ar
26RANLIB = sparc64-linux-ranlib
27else
28AS := $(AS) -64
29LDFLAGS := -m elf64_sparc 15LDFLAGS := -m elf64_sparc
30endif
31 16
32ifneq ($(UNDECLARED_REGS),y) 17KBUILD_CFLAGS += -m64 -pipe -mno-fpu -mcpu=ultrasparc -mcmodel=medlow \
33CC_UNDECL = 18 -ffixed-g4 -ffixed-g5 -fcall-used-g7 -Wno-sign-compare \
34else 19 -Wa,--undeclared-regs
35CC_UNDECL = -Wa,--undeclared-regs 20KBUILD_CFLAGS += $(call cc-option,-mtune=ultrasparc3)
36AS := $(AS) --undeclared-regs 21KBUILD_AFLAGS += -m64 -mcpu=ultrasparc -Wa,--undeclared-regs
37endif
38
39ifneq ($(NEW_GCC),y)
40 KBUILD_CFLAGS += -pipe -mno-fpu -mtune=ultrasparc -mmedlow \
41 -ffixed-g4 -ffixed-g5 -fcall-used-g7 -Wno-sign-compare
42else
43 KBUILD_CFLAGS += -m64 -pipe -mno-fpu -mcpu=ultrasparc -mcmodel=medlow \
44 -ffixed-g4 -ffixed-g5 -fcall-used-g7 -Wno-sign-compare \
45 $(CC_UNDECL)
46 KBUILD_AFLAGS += -m64 -mcpu=ultrasparc $(CC_UNDECL)
47endif
48 22
49ifeq ($(CONFIG_MCOUNT),y) 23ifeq ($(CONFIG_MCOUNT),y)
50 KBUILD_CFLAGS += -pg 24 KBUILD_CFLAGS += -pg
diff --git a/arch/sparc64/defconfig b/arch/sparc64/defconfig
index 833d74b2b192..250958d1e3cb 100644
--- a/arch/sparc64/defconfig
+++ b/arch/sparc64/defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.24 3# Linux kernel version: 2.6.25-rc1
4# Tue Feb 5 17:28:19 2008 4# Sun Feb 17 22:44:12 2008
5# 5#
6CONFIG_SPARC=y 6CONFIG_SPARC=y
7CONFIG_SPARC64=y 7CONFIG_SPARC64=y
@@ -10,6 +10,7 @@ CONFIG_GENERIC_CMOS_UPDATE=y
10CONFIG_GENERIC_CLOCKEVENTS=y 10CONFIG_GENERIC_CLOCKEVENTS=y
11CONFIG_64BIT=y 11CONFIG_64BIT=y
12CONFIG_MMU=y 12CONFIG_MMU=y
13CONFIG_IOMMU_HELPER=y
13CONFIG_QUICKLIST=y 14CONFIG_QUICKLIST=y
14CONFIG_STACKTRACE_SUPPORT=y 15CONFIG_STACKTRACE_SUPPORT=y
15CONFIG_LOCKDEP_SUPPORT=y 16CONFIG_LOCKDEP_SUPPORT=y
@@ -21,6 +22,7 @@ CONFIG_HAVE_SETUP_PER_CPU_AREA=y
21CONFIG_ARCH_NO_VIRT_TO_BUS=y 22CONFIG_ARCH_NO_VIRT_TO_BUS=y
22CONFIG_OF=y 23CONFIG_OF=y
23CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 24CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
25CONFIG_ARCH_SUPPORTS_AOUT=y
24CONFIG_SPARC64_PAGE_SIZE_8KB=y 26CONFIG_SPARC64_PAGE_SIZE_8KB=y
25# CONFIG_SPARC64_PAGE_SIZE_64KB is not set 27# CONFIG_SPARC64_PAGE_SIZE_64KB is not set
26# CONFIG_SPARC64_PAGE_SIZE_512KB is not set 28# CONFIG_SPARC64_PAGE_SIZE_512KB is not set
@@ -49,8 +51,6 @@ CONFIG_SYSVIPC_SYSCTL=y
49CONFIG_POSIX_MQUEUE=y 51CONFIG_POSIX_MQUEUE=y
50# CONFIG_BSD_PROCESS_ACCT is not set 52# CONFIG_BSD_PROCESS_ACCT is not set
51# CONFIG_TASKSTATS is not set 53# CONFIG_TASKSTATS is not set
52# CONFIG_USER_NS is not set
53# CONFIG_PID_NS is not set
54# CONFIG_AUDIT is not set 54# CONFIG_AUDIT is not set
55# CONFIG_IKCONFIG is not set 55# CONFIG_IKCONFIG is not set
56CONFIG_LOG_BUF_SHIFT=18 56CONFIG_LOG_BUF_SHIFT=18
@@ -60,6 +60,11 @@ CONFIG_FAIR_USER_SCHED=y
60# CONFIG_FAIR_CGROUP_SCHED is not set 60# CONFIG_FAIR_CGROUP_SCHED is not set
61CONFIG_SYSFS_DEPRECATED=y 61CONFIG_SYSFS_DEPRECATED=y
62CONFIG_RELAY=y 62CONFIG_RELAY=y
63CONFIG_NAMESPACES=y
64# CONFIG_UTS_NS is not set
65# CONFIG_IPC_NS is not set
66# CONFIG_USER_NS is not set
67# CONFIG_PID_NS is not set
63CONFIG_BLK_DEV_INITRD=y 68CONFIG_BLK_DEV_INITRD=y
64CONFIG_INITRAMFS_SOURCE="" 69CONFIG_INITRAMFS_SOURCE=""
65CONFIG_CC_OPTIMIZE_FOR_SIZE=y 70CONFIG_CC_OPTIMIZE_FOR_SIZE=y
@@ -74,6 +79,7 @@ CONFIG_HOTPLUG=y
74CONFIG_PRINTK=y 79CONFIG_PRINTK=y
75CONFIG_BUG=y 80CONFIG_BUG=y
76CONFIG_ELF_CORE=y 81CONFIG_ELF_CORE=y
82# CONFIG_COMPAT_BRK is not set
77CONFIG_BASE_FULL=y 83CONFIG_BASE_FULL=y
78CONFIG_FUTEX=y 84CONFIG_FUTEX=y
79CONFIG_ANON_INODES=y 85CONFIG_ANON_INODES=y
@@ -176,13 +182,13 @@ CONFIG_PCI_MSI=y
176CONFIG_SUN_OPENPROMFS=m 182CONFIG_SUN_OPENPROMFS=m
177CONFIG_SPARC32_COMPAT=y 183CONFIG_SPARC32_COMPAT=y
178CONFIG_COMPAT=y 184CONFIG_COMPAT=y
179CONFIG_BINFMT_ELF32=y
180# CONFIG_BINFMT_AOUT32 is not set 185# CONFIG_BINFMT_AOUT32 is not set
181 186
182# 187#
183# Executable file formats 188# Executable file formats
184# 189#
185CONFIG_BINFMT_ELF=y 190CONFIG_BINFMT_ELF=y
191CONFIG_COMPAT_BINFMT_ELF=y
186CONFIG_BINFMT_MISC=m 192CONFIG_BINFMT_MISC=m
187CONFIG_SOLARIS_EMUL=y 193CONFIG_SOLARIS_EMUL=y
188CONFIG_SCHED_SMT=y 194CONFIG_SCHED_SMT=y
@@ -354,6 +360,8 @@ CONFIG_MISC_DEVICES=y
354# CONFIG_EEPROM_93CX6 is not set 360# CONFIG_EEPROM_93CX6 is not set
355# CONFIG_SGI_IOC4 is not set 361# CONFIG_SGI_IOC4 is not set
356# CONFIG_TIFM_CORE is not set 362# CONFIG_TIFM_CORE is not set
363# CONFIG_ENCLOSURE_SERVICES is not set
364CONFIG_HAVE_IDE=y
357CONFIG_IDE=y 365CONFIG_IDE=y
358CONFIG_BLK_DEV_IDE=y 366CONFIG_BLK_DEV_IDE=y
359 367
@@ -376,6 +384,7 @@ CONFIG_IDE_PROC_FS=y
376# 384#
377CONFIG_IDE_GENERIC=y 385CONFIG_IDE_GENERIC=y
378# CONFIG_BLK_DEV_PLATFORM is not set 386# CONFIG_BLK_DEV_PLATFORM is not set
387CONFIG_BLK_DEV_IDEDMA_SFF=y
379 388
380# 389#
381# PCI IDE chipsets support 390# PCI IDE chipsets support
@@ -775,7 +784,6 @@ CONFIG_I2C_ALGOBIT=y
775# CONFIG_SENSORS_EEPROM is not set 784# CONFIG_SENSORS_EEPROM is not set
776# CONFIG_SENSORS_PCF8574 is not set 785# CONFIG_SENSORS_PCF8574 is not set
777# CONFIG_PCF8575 is not set 786# CONFIG_PCF8575 is not set
778# CONFIG_SENSORS_PCA9539 is not set
779# CONFIG_SENSORS_PCF8591 is not set 787# CONFIG_SENSORS_PCF8591 is not set
780# CONFIG_TPS65010 is not set 788# CONFIG_TPS65010 is not set
781# CONFIG_SENSORS_MAX6875 is not set 789# CONFIG_SENSORS_MAX6875 is not set
@@ -831,6 +839,7 @@ CONFIG_HWMON=y
831# CONFIG_SENSORS_SMSC47M1 is not set 839# CONFIG_SENSORS_SMSC47M1 is not set
832# CONFIG_SENSORS_SMSC47M192 is not set 840# CONFIG_SENSORS_SMSC47M192 is not set
833# CONFIG_SENSORS_SMSC47B397 is not set 841# CONFIG_SENSORS_SMSC47B397 is not set
842# CONFIG_SENSORS_ADS7828 is not set
834# CONFIG_SENSORS_THMC50 is not set 843# CONFIG_SENSORS_THMC50 is not set
835# CONFIG_SENSORS_VIA686A is not set 844# CONFIG_SENSORS_VIA686A is not set
836# CONFIG_SENSORS_VT1211 is not set 845# CONFIG_SENSORS_VT1211 is not set
@@ -840,9 +849,11 @@ CONFIG_HWMON=y
840# CONFIG_SENSORS_W83792D is not set 849# CONFIG_SENSORS_W83792D is not set
841# CONFIG_SENSORS_W83793 is not set 850# CONFIG_SENSORS_W83793 is not set
842# CONFIG_SENSORS_W83L785TS is not set 851# CONFIG_SENSORS_W83L785TS is not set
852# CONFIG_SENSORS_W83L786NG is not set
843# CONFIG_SENSORS_W83627HF is not set 853# CONFIG_SENSORS_W83627HF is not set
844# CONFIG_SENSORS_W83627EHF is not set 854# CONFIG_SENSORS_W83627EHF is not set
845# CONFIG_HWMON_DEBUG_CHIP is not set 855# CONFIG_HWMON_DEBUG_CHIP is not set
856# CONFIG_THERMAL is not set
846# CONFIG_WATCHDOG is not set 857# CONFIG_WATCHDOG is not set
847 858
848# 859#
@@ -1201,6 +1212,7 @@ CONFIG_USB_STORAGE=m
1201# CONFIG_USB_TEST is not set 1212# CONFIG_USB_TEST is not set
1202# CONFIG_USB_GADGET is not set 1213# CONFIG_USB_GADGET is not set
1203# CONFIG_MMC is not set 1214# CONFIG_MMC is not set
1215# CONFIG_MEMSTICK is not set
1204# CONFIG_NEW_LEDS is not set 1216# CONFIG_NEW_LEDS is not set
1205# CONFIG_INFINIBAND is not set 1217# CONFIG_INFINIBAND is not set
1206# CONFIG_RTC_CLASS is not set 1218# CONFIG_RTC_CLASS is not set
@@ -1242,12 +1254,10 @@ CONFIG_FS_POSIX_ACL=y
1242# CONFIG_XFS_FS is not set 1254# CONFIG_XFS_FS is not set
1243# CONFIG_GFS2_FS is not set 1255# CONFIG_GFS2_FS is not set
1244# CONFIG_OCFS2_FS is not set 1256# CONFIG_OCFS2_FS is not set
1245# CONFIG_MINIX_FS is not set 1257CONFIG_DNOTIFY=y
1246# CONFIG_ROMFS_FS is not set
1247CONFIG_INOTIFY=y 1258CONFIG_INOTIFY=y
1248CONFIG_INOTIFY_USER=y 1259CONFIG_INOTIFY_USER=y
1249# CONFIG_QUOTA is not set 1260# CONFIG_QUOTA is not set
1250CONFIG_DNOTIFY=y
1251# CONFIG_AUTOFS_FS is not set 1261# CONFIG_AUTOFS_FS is not set
1252# CONFIG_AUTOFS4_FS is not set 1262# CONFIG_AUTOFS4_FS is not set
1253# CONFIG_FUSE_FS is not set 1263# CONFIG_FUSE_FS is not set
@@ -1291,8 +1301,10 @@ CONFIG_HUGETLB_PAGE=y
1291# CONFIG_EFS_FS is not set 1301# CONFIG_EFS_FS is not set
1292# CONFIG_CRAMFS is not set 1302# CONFIG_CRAMFS is not set
1293# CONFIG_VXFS_FS is not set 1303# CONFIG_VXFS_FS is not set
1304# CONFIG_MINIX_FS is not set
1294# CONFIG_HPFS_FS is not set 1305# CONFIG_HPFS_FS is not set
1295# CONFIG_QNX4FS_FS is not set 1306# CONFIG_QNX4FS_FS is not set
1307# CONFIG_ROMFS_FS is not set
1296# CONFIG_SYSV_FS is not set 1308# CONFIG_SYSV_FS is not set
1297# CONFIG_UFS_FS is not set 1309# CONFIG_UFS_FS is not set
1298CONFIG_NETWORK_FILESYSTEMS=y 1310CONFIG_NETWORK_FILESYSTEMS=y
@@ -1370,6 +1382,7 @@ CONFIG_DETECT_SOFTLOCKUP=y
1370CONFIG_SCHEDSTATS=y 1382CONFIG_SCHEDSTATS=y
1371# CONFIG_TIMER_STATS is not set 1383# CONFIG_TIMER_STATS is not set
1372# CONFIG_SLUB_DEBUG_ON is not set 1384# CONFIG_SLUB_DEBUG_ON is not set
1385# CONFIG_SLUB_STATS is not set
1373# CONFIG_DEBUG_RT_MUTEXES is not set 1386# CONFIG_DEBUG_RT_MUTEXES is not set
1374# CONFIG_RT_MUTEX_TESTER is not set 1387# CONFIG_RT_MUTEX_TESTER is not set
1375# CONFIG_DEBUG_SPINLOCK is not set 1388# CONFIG_DEBUG_SPINLOCK is not set
@@ -1385,7 +1398,6 @@ CONFIG_DEBUG_BUGVERBOSE=y
1385# CONFIG_DEBUG_VM is not set 1398# CONFIG_DEBUG_VM is not set
1386# CONFIG_DEBUG_LIST is not set 1399# CONFIG_DEBUG_LIST is not set
1387# CONFIG_DEBUG_SG is not set 1400# CONFIG_DEBUG_SG is not set
1388CONFIG_FORCED_INLINING=y
1389# CONFIG_BOOT_PRINTK_DELAY is not set 1401# CONFIG_BOOT_PRINTK_DELAY is not set
1390# CONFIG_RCU_TORTURE_TEST is not set 1402# CONFIG_RCU_TORTURE_TEST is not set
1391# CONFIG_KPROBES_SANITY_TEST is not set 1403# CONFIG_KPROBES_SANITY_TEST is not set
@@ -1396,7 +1408,6 @@ CONFIG_FORCED_INLINING=y
1396# CONFIG_DEBUG_STACK_USAGE is not set 1408# CONFIG_DEBUG_STACK_USAGE is not set
1397# CONFIG_DEBUG_DCFLUSH is not set 1409# CONFIG_DEBUG_DCFLUSH is not set
1398# CONFIG_STACK_DEBUG is not set 1410# CONFIG_STACK_DEBUG is not set
1399# CONFIG_DEBUG_BOOTMEM is not set
1400# CONFIG_DEBUG_PAGEALLOC is not set 1411# CONFIG_DEBUG_PAGEALLOC is not set
1401 1412
1402# 1413#
diff --git a/arch/sparc64/kernel/hvtramp.S b/arch/sparc64/kernel/hvtramp.S
index b692e044a463..0236c43772fa 100644
--- a/arch/sparc64/kernel/hvtramp.S
+++ b/arch/sparc64/kernel/hvtramp.S
@@ -3,6 +3,8 @@
3 * Copyright (C) 2007 David S. Miller <davem@davemloft.net> 3 * Copyright (C) 2007 David S. Miller <davem@davemloft.net>
4 */ 4 */
5 5
6#include <linux/init.h>
7
6#include <asm/thread_info.h> 8#include <asm/thread_info.h>
7#include <asm/hypervisor.h> 9#include <asm/hypervisor.h>
8#include <asm/scratchpad.h> 10#include <asm/scratchpad.h>
@@ -13,7 +15,7 @@
13#include <asm/head.h> 15#include <asm/head.h>
14#include <asm/asi.h> 16#include <asm/asi.h>
15 17
16 .text 18 __CPUINIT
17 .align 8 19 .align 8
18 .globl hv_cpu_startup, hv_cpu_startup_end 20 .globl hv_cpu_startup, hv_cpu_startup_end
19 21
diff --git a/arch/sparc64/kernel/iommu.c b/arch/sparc64/kernel/iommu.c
index d3276ebcfb47..fbaab3497bfd 100644
--- a/arch/sparc64/kernel/iommu.c
+++ b/arch/sparc64/kernel/iommu.c
@@ -134,7 +134,8 @@ unsigned long iommu_range_alloc(struct device *dev,
134 else 134 else
135 boundary_size = ALIGN(1UL << 32, 1 << IO_PAGE_SHIFT); 135 boundary_size = ALIGN(1UL << 32, 1 << IO_PAGE_SHIFT);
136 136
137 n = iommu_area_alloc(arena->map, limit, start, npages, 0, 137 n = iommu_area_alloc(arena->map, limit, start, npages,
138 iommu->page_table_map_base >> IO_PAGE_SHIFT,
138 boundary_size >> IO_PAGE_SHIFT, 0); 139 boundary_size >> IO_PAGE_SHIFT, 0);
139 if (n == -1) { 140 if (n == -1) {
140 if (likely(pass < 1)) { 141 if (likely(pass < 1)) {
@@ -200,12 +201,11 @@ int iommu_table_init(struct iommu *iommu, int tsbsize,
200 /* Allocate and initialize the dummy page which we 201 /* Allocate and initialize the dummy page which we
201 * set inactive IO PTEs to point to. 202 * set inactive IO PTEs to point to.
202 */ 203 */
203 iommu->dummy_page = __get_free_pages(GFP_KERNEL, 0); 204 iommu->dummy_page = get_zeroed_page(GFP_KERNEL);
204 if (!iommu->dummy_page) { 205 if (!iommu->dummy_page) {
205 printk(KERN_ERR "IOMMU: Error, gfp(dummy_page) failed.\n"); 206 printk(KERN_ERR "IOMMU: Error, gfp(dummy_page) failed.\n");
206 goto out_free_map; 207 goto out_free_map;
207 } 208 }
208 memset((void *)iommu->dummy_page, 0, PAGE_SIZE);
209 iommu->dummy_page_pa = (unsigned long) __pa(iommu->dummy_page); 209 iommu->dummy_page_pa = (unsigned long) __pa(iommu->dummy_page);
210 210
211 /* Now allocate and setup the IOMMU page table itself. */ 211 /* Now allocate and setup the IOMMU page table itself. */
diff --git a/arch/sparc64/kernel/kprobes.c b/arch/sparc64/kernel/kprobes.c
index 34fc3ddd5002..f43b5d755354 100644
--- a/arch/sparc64/kernel/kprobes.c
+++ b/arch/sparc64/kernel/kprobes.c
@@ -465,8 +465,6 @@ void __kprobes jprobe_return(void)
465 465
466extern void jprobe_return_trap_instruction(void); 466extern void jprobe_return_trap_instruction(void);
467 467
468extern void __show_regs(struct pt_regs * regs);
469
470int __kprobes longjmp_break_handler(struct kprobe *p, struct pt_regs *regs) 468int __kprobes longjmp_break_handler(struct kprobe *p, struct pt_regs *regs)
471{ 469{
472 u32 *addr = (u32 *) regs->tpc; 470 u32 *addr = (u32 *) regs->tpc;
diff --git a/arch/sparc64/kernel/pci.c b/arch/sparc64/kernel/pci.c
index a61c38fe75ea..545356b00e2e 100644
--- a/arch/sparc64/kernel/pci.c
+++ b/arch/sparc64/kernel/pci.c
@@ -225,20 +225,6 @@ static int __init pci_controller_init(const char *model_name, int namelen, struc
225 return 0; 225 return 0;
226} 226}
227 227
228static int __init pci_is_controller(const char *model_name, int namelen, struct device_node *dp)
229{
230 int i;
231
232 for (i = 0; i < PCI_NUM_CONTROLLER_TYPES; i++) {
233 if (!strncmp(model_name,
234 pci_controller_table[i].model_name,
235 namelen)) {
236 return 1;
237 }
238 }
239 return 0;
240}
241
242static int __init pci_controller_scan(int (*handler)(const char *, int, struct device_node *)) 228static int __init pci_controller_scan(int (*handler)(const char *, int, struct device_node *))
243{ 229{
244 struct device_node *dp; 230 struct device_node *dp;
@@ -273,13 +259,6 @@ static int __init pci_controller_scan(int (*handler)(const char *, int, struct d
273 return count; 259 return count;
274} 260}
275 261
276
277/* Is there some PCI controller in the system? */
278int __init pcic_present(void)
279{
280 return pci_controller_scan(pci_is_controller);
281}
282
283/* Find each controller in the system, attach and initialize 262/* Find each controller in the system, attach and initialize
284 * software state structure for each and link into the 263 * software state structure for each and link into the
285 * pci_pbm_root. Setup the controller enough such 264 * pci_pbm_root. Setup the controller enough such
diff --git a/arch/sparc64/kernel/power.c b/arch/sparc64/kernel/power.c
index 850cdffdd69c..eae8ca2a6ba5 100644
--- a/arch/sparc64/kernel/power.c
+++ b/arch/sparc64/kernel/power.c
@@ -20,6 +20,7 @@
20#include <asm/of_device.h> 20#include <asm/of_device.h>
21#include <asm/io.h> 21#include <asm/io.h>
22#include <asm/sstate.h> 22#include <asm/sstate.h>
23#include <asm/reboot.h>
23 24
24#include <linux/unistd.h> 25#include <linux/unistd.h>
25 26
@@ -39,8 +40,6 @@ static irqreturn_t power_handler(int irq, void *dev_id)
39 return IRQ_HANDLED; 40 return IRQ_HANDLED;
40} 41}
41 42
42extern void machine_halt(void);
43extern void machine_alt_power_off(void);
44static void (*poweroff_method)(void) = machine_alt_power_off; 43static void (*poweroff_method)(void) = machine_alt_power_off;
45 44
46void machine_power_off(void) 45void machine_power_off(void)
diff --git a/arch/sparc64/kernel/process.c b/arch/sparc64/kernel/process.c
index 1b2379174988..2aafce7dfc0e 100644
--- a/arch/sparc64/kernel/process.c
+++ b/arch/sparc64/kernel/process.c
@@ -30,6 +30,7 @@
30#include <linux/tick.h> 30#include <linux/tick.h>
31#include <linux/init.h> 31#include <linux/init.h>
32#include <linux/cpu.h> 32#include <linux/cpu.h>
33#include <linux/elfcore.h>
33 34
34#include <asm/oplib.h> 35#include <asm/oplib.h>
35#include <asm/uaccess.h> 36#include <asm/uaccess.h>
@@ -47,6 +48,8 @@
47#include <asm/unistd.h> 48#include <asm/unistd.h>
48#include <asm/hypervisor.h> 49#include <asm/hypervisor.h>
49#include <asm/sstate.h> 50#include <asm/sstate.h>
51#include <asm/reboot.h>
52#include <asm/syscalls.h>
50 53
51/* #define VERBOSE_SHOWREGS */ 54/* #define VERBOSE_SHOWREGS */
52 55
@@ -113,16 +116,9 @@ void cpu_idle(void)
113 116
114extern char reboot_command []; 117extern char reboot_command [];
115 118
116extern void (*prom_palette)(int);
117extern void (*prom_keyboard)(void);
118
119void machine_halt(void) 119void machine_halt(void)
120{ 120{
121 sstate_halt(); 121 sstate_halt();
122 if (prom_palette)
123 prom_palette (1);
124 if (prom_keyboard)
125 prom_keyboard();
126 prom_halt(); 122 prom_halt();
127 panic("Halt failed!"); 123 panic("Halt failed!");
128} 124}
@@ -130,10 +126,6 @@ void machine_halt(void)
130void machine_alt_power_off(void) 126void machine_alt_power_off(void)
131{ 127{
132 sstate_poweroff(); 128 sstate_poweroff();
133 if (prom_palette)
134 prom_palette(1);
135 if (prom_keyboard)
136 prom_keyboard();
137 prom_halt_power_off(); 129 prom_halt_power_off();
138 panic("Power-off failed!"); 130 panic("Power-off failed!");
139} 131}
@@ -145,10 +137,6 @@ void machine_restart(char * cmd)
145 sstate_reboot(); 137 sstate_reboot();
146 p = strchr (reboot_command, '\n'); 138 p = strchr (reboot_command, '\n');
147 if (p) *p = 0; 139 if (p) *p = 0;
148 if (prom_palette)
149 prom_palette (1);
150 if (prom_keyboard)
151 prom_keyboard();
152 if (cmd) 140 if (cmd)
153 prom_reboot(cmd); 141 prom_reboot(cmd);
154 if (*reboot_command) 142 if (*reboot_command)
@@ -226,62 +214,6 @@ static void show_regwindow(struct pt_regs *regs)
226 print_symbol("I7: <%s>\n", rwk->ins[7]); 214 print_symbol("I7: <%s>\n", rwk->ins[7]);
227} 215}
228 216
229void show_stackframe(struct sparc_stackf *sf)
230{
231 unsigned long size;
232 unsigned long *stk;
233 int i;
234
235 printk("l0: %016lx l1: %016lx l2: %016lx l3: %016lx\n"
236 "l4: %016lx l5: %016lx l6: %016lx l7: %016lx\n",
237 sf->locals[0], sf->locals[1], sf->locals[2], sf->locals[3],
238 sf->locals[4], sf->locals[5], sf->locals[6], sf->locals[7]);
239 printk("i0: %016lx i1: %016lx i2: %016lx i3: %016lx\n"
240 "i4: %016lx i5: %016lx fp: %016lx ret_pc: %016lx\n",
241 sf->ins[0], sf->ins[1], sf->ins[2], sf->ins[3],
242 sf->ins[4], sf->ins[5], (unsigned long)sf->fp, sf->callers_pc);
243 printk("sp: %016lx x0: %016lx x1: %016lx x2: %016lx\n"
244 "x3: %016lx x4: %016lx x5: %016lx xx: %016lx\n",
245 (unsigned long)sf->structptr, sf->xargs[0], sf->xargs[1],
246 sf->xargs[2], sf->xargs[3], sf->xargs[4], sf->xargs[5],
247 sf->xxargs[0]);
248 size = ((unsigned long)sf->fp) - ((unsigned long)sf);
249 size -= STACKFRAME_SZ;
250 stk = (unsigned long *)((unsigned long)sf + STACKFRAME_SZ);
251 i = 0;
252 do {
253 printk("s%d: %016lx\n", i++, *stk++);
254 } while ((size -= sizeof(unsigned long)));
255}
256
257void show_stackframe32(struct sparc_stackf32 *sf)
258{
259 unsigned long size;
260 unsigned *stk;
261 int i;
262
263 printk("l0: %08x l1: %08x l2: %08x l3: %08x\n",
264 sf->locals[0], sf->locals[1], sf->locals[2], sf->locals[3]);
265 printk("l4: %08x l5: %08x l6: %08x l7: %08x\n",
266 sf->locals[4], sf->locals[5], sf->locals[6], sf->locals[7]);
267 printk("i0: %08x i1: %08x i2: %08x i3: %08x\n",
268 sf->ins[0], sf->ins[1], sf->ins[2], sf->ins[3]);
269 printk("i4: %08x i5: %08x fp: %08x ret_pc: %08x\n",
270 sf->ins[4], sf->ins[5], sf->fp, sf->callers_pc);
271 printk("sp: %08x x0: %08x x1: %08x x2: %08x\n"
272 "x3: %08x x4: %08x x5: %08x xx: %08x\n",
273 sf->structptr, sf->xargs[0], sf->xargs[1],
274 sf->xargs[2], sf->xargs[3], sf->xargs[4], sf->xargs[5],
275 sf->xxargs[0]);
276 size = ((unsigned long)sf->fp) - ((unsigned long)sf);
277 size -= STACKFRAME32_SZ;
278 stk = (unsigned *)((unsigned long)sf + STACKFRAME32_SZ);
279 i = 0;
280 do {
281 printk("s%d: %08x\n", i++, *stk++);
282 } while ((size -= sizeof(unsigned)));
283}
284
285#ifdef CONFIG_SMP 217#ifdef CONFIG_SMP
286static DEFINE_SPINLOCK(regdump_lock); 218static DEFINE_SPINLOCK(regdump_lock);
287#endif 219#endif
@@ -369,24 +301,6 @@ void show_regs(struct pt_regs *regs)
369#endif 301#endif
370} 302}
371 303
372void show_regs32(struct pt_regs32 *regs)
373{
374 printk("PSR: %08x PC: %08x NPC: %08x Y: %08x %s\n", regs->psr,
375 regs->pc, regs->npc, regs->y, print_tainted());
376 printk("g0: %08x g1: %08x g2: %08x g3: %08x ",
377 regs->u_regs[0], regs->u_regs[1], regs->u_regs[2],
378 regs->u_regs[3]);
379 printk("g4: %08x g5: %08x g6: %08x g7: %08x\n",
380 regs->u_regs[4], regs->u_regs[5], regs->u_regs[6],
381 regs->u_regs[7]);
382 printk("o0: %08x o1: %08x o2: %08x o3: %08x ",
383 regs->u_regs[8], regs->u_regs[9], regs->u_regs[10],
384 regs->u_regs[11]);
385 printk("o4: %08x o5: %08x sp: %08x ret_pc: %08x\n",
386 regs->u_regs[12], regs->u_regs[13], regs->u_regs[14],
387 regs->u_regs[15]);
388}
389
390unsigned long thread_saved_pc(struct task_struct *tsk) 304unsigned long thread_saved_pc(struct task_struct *tsk)
391{ 305{
392 struct thread_info *ti = task_thread_info(tsk); 306 struct thread_info *ti = task_thread_info(tsk);
diff --git a/arch/sparc64/kernel/prom.c b/arch/sparc64/kernel/prom.c
index a246e962e5a7..68964ddcde1e 100644
--- a/arch/sparc64/kernel/prom.c
+++ b/arch/sparc64/kernel/prom.c
@@ -1716,7 +1716,6 @@ static void __init of_console_init(void)
1716 1716
1717 of_console_device = dp; 1717 of_console_device = dp;
1718 1718
1719 prom_printf(msg, of_console_path);
1720 printk(msg, of_console_path); 1719 printk(msg, of_console_path);
1721} 1720}
1722 1721
diff --git a/arch/sparc64/kernel/setup.c b/arch/sparc64/kernel/setup.c
index 5964d8653ade..d036dbe72864 100644
--- a/arch/sparc64/kernel/setup.c
+++ b/arch/sparc64/kernel/setup.c
@@ -68,33 +68,22 @@ struct screen_info screen_info = {
68 16 /* orig-video-points */ 68 16 /* orig-video-points */
69}; 69};
70 70
71void (*prom_palette)(int);
72void (*prom_keyboard)(void);
73
74static void 71static void
75prom_console_write(struct console *con, const char *s, unsigned n) 72prom_console_write(struct console *con, const char *s, unsigned n)
76{ 73{
77 prom_write(s, n); 74 prom_write(s, n);
78} 75}
79 76
80unsigned int boot_flags = 0;
81#define BOOTME_DEBUG 0x1
82
83/* Exported for mm/init.c:paging_init. */ 77/* Exported for mm/init.c:paging_init. */
84unsigned long cmdline_memory_size = 0; 78unsigned long cmdline_memory_size = 0;
85 79
86static struct console prom_debug_console = { 80static struct console prom_early_console = {
87 .name = "debug", 81 .name = "earlyprom",
88 .write = prom_console_write, 82 .write = prom_console_write,
89 .flags = CON_PRINTBUFFER, 83 .flags = CON_PRINTBUFFER | CON_BOOT,
90 .index = -1, 84 .index = -1,
91}; 85};
92 86
93/* XXX Implement this at some point... */
94void kernel_enter_debugger(void)
95{
96}
97
98/* 87/*
99 * Process kernel command line switches that are specific to the 88 * Process kernel command line switches that are specific to the
100 * SPARC or that require special low-level processing. 89 * SPARC or that require special low-level processing.
@@ -103,8 +92,6 @@ static void __init process_switch(char c)
103{ 92{
104 switch (c) { 93 switch (c) {
105 case 'd': 94 case 'd':
106 boot_flags |= BOOTME_DEBUG;
107 break;
108 case 's': 95 case 's':
109 break; 96 break;
110 case 'h': 97 case 'h':
@@ -112,8 +99,7 @@ static void __init process_switch(char c)
112 prom_halt(); 99 prom_halt();
113 break; 100 break;
114 case 'p': 101 case 'p':
115 /* Use PROM debug console. */ 102 /* Just ignore, this behavior is now the default. */
116 register_console(&prom_debug_console);
117 break; 103 break;
118 case 'P': 104 case 'P':
119 /* Force UltraSPARC-III P-Cache on. */ 105 /* Force UltraSPARC-III P-Cache on. */
@@ -168,8 +154,6 @@ static void __init boot_flags_init(char *commands)
168 } 154 }
169} 155}
170 156
171extern void panic_setup(char *, int *);
172
173extern unsigned short root_flags; 157extern unsigned short root_flags;
174extern unsigned short root_dev; 158extern unsigned short root_dev;
175extern unsigned short ram_flags; 159extern unsigned short ram_flags;
@@ -296,6 +280,9 @@ void __init setup_arch(char **cmdline_p)
296 *cmdline_p = prom_getbootargs(); 280 *cmdline_p = prom_getbootargs();
297 strcpy(boot_command_line, *cmdline_p); 281 strcpy(boot_command_line, *cmdline_p);
298 282
283 boot_flags_init(*cmdline_p);
284 register_console(&prom_early_console);
285
299 if (tlb_type == hypervisor) 286 if (tlb_type == hypervisor)
300 printk("ARCH: SUN4V\n"); 287 printk("ARCH: SUN4V\n");
301 else 288 else
@@ -307,8 +294,6 @@ void __init setup_arch(char **cmdline_p)
307 conswitchp = &prom_con; 294 conswitchp = &prom_con;
308#endif 295#endif
309 296
310 boot_flags_init(*cmdline_p);
311
312 idprom_init(); 297 idprom_init();
313 298
314 if (!root_flags) 299 if (!root_flags)
diff --git a/arch/sparc64/kernel/smp.c b/arch/sparc64/kernel/smp.c
index a8052b76df41..cc454731d879 100644
--- a/arch/sparc64/kernel/smp.c
+++ b/arch/sparc64/kernel/smp.c
@@ -86,7 +86,7 @@ extern void setup_sparc64_timer(void);
86 86
87static volatile unsigned long callin_flag = 0; 87static volatile unsigned long callin_flag = 0;
88 88
89void __devinit smp_callin(void) 89void __cpuinit smp_callin(void)
90{ 90{
91 int cpuid = hard_smp_processor_id(); 91 int cpuid = hard_smp_processor_id();
92 92
diff --git a/arch/sparc64/kernel/sparc64_ksyms.c b/arch/sparc64/kernel/sparc64_ksyms.c
index 68db08930399..51fa773f38c9 100644
--- a/arch/sparc64/kernel/sparc64_ksyms.c
+++ b/arch/sparc64/kernel/sparc64_ksyms.c
@@ -85,7 +85,6 @@ extern int (*handle_mathemu)(struct pt_regs *, struct fpustate *);
85extern long sparc32_open(const char __user * filename, int flags, int mode); 85extern long sparc32_open(const char __user * filename, int flags, int mode);
86extern int io_remap_pfn_range(struct vm_area_struct *vma, unsigned long from, 86extern int io_remap_pfn_range(struct vm_area_struct *vma, unsigned long from,
87 unsigned long pfn, unsigned long size, pgprot_t prot); 87 unsigned long pfn, unsigned long size, pgprot_t prot);
88extern void (*prom_palette)(int);
89 88
90extern int __ashrdi3(int, int); 89extern int __ashrdi3(int, int);
91 90
@@ -355,5 +354,3 @@ EXPORT_SYMBOL(xor_niagara_2);
355EXPORT_SYMBOL(xor_niagara_3); 354EXPORT_SYMBOL(xor_niagara_3);
356EXPORT_SYMBOL(xor_niagara_4); 355EXPORT_SYMBOL(xor_niagara_4);
357EXPORT_SYMBOL(xor_niagara_5); 356EXPORT_SYMBOL(xor_niagara_5);
358
359EXPORT_SYMBOL(prom_palette);
diff --git a/arch/sparc64/kernel/trampoline.S b/arch/sparc64/kernel/trampoline.S
index 04e81dda13d0..4ae2e525d68b 100644
--- a/arch/sparc64/kernel/trampoline.S
+++ b/arch/sparc64/kernel/trampoline.S
@@ -4,6 +4,8 @@
4 * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu)
5 */ 5 */
6 6
7#include <linux/init.h>
8
7#include <asm/head.h> 9#include <asm/head.h>
8#include <asm/asi.h> 10#include <asm/asi.h>
9#include <asm/lsu.h> 11#include <asm/lsu.h>
@@ -36,7 +38,7 @@ dtlb_load:
36tramp_stack: 38tramp_stack:
37 .skip TRAMP_STACK_SIZE 39 .skip TRAMP_STACK_SIZE
38 40
39 .text 41 __CPUINIT
40 .align 8 42 .align 8
41 .globl sparc64_cpu_startup, sparc64_cpu_startup_end 43 .globl sparc64_cpu_startup, sparc64_cpu_startup_end
42sparc64_cpu_startup: 44sparc64_cpu_startup:
diff --git a/arch/sparc64/kernel/traps.c b/arch/sparc64/kernel/traps.c
index 2b6abf633343..007f5317c0de 100644
--- a/arch/sparc64/kernel/traps.c
+++ b/arch/sparc64/kernel/traps.c
@@ -1791,8 +1791,6 @@ static const char *sun4v_err_type_to_str(u32 type)
1791 }; 1791 };
1792} 1792}
1793 1793
1794extern void __show_regs(struct pt_regs * regs);
1795
1796static void sun4v_log_error(struct pt_regs *regs, struct sun4v_error_entry *ent, int cpu, const char *pfx, atomic_t *ocnt) 1794static void sun4v_log_error(struct pt_regs *regs, struct sun4v_error_entry *ent, int cpu, const char *pfx, atomic_t *ocnt)
1797{ 1795{
1798 int cnt; 1796 int cnt;
diff --git a/arch/sparc64/kernel/unaligned.c b/arch/sparc64/kernel/unaligned.c
index dc7bf1b6321c..1a511e9f0d3e 100644
--- a/arch/sparc64/kernel/unaligned.c
+++ b/arch/sparc64/kernel/unaligned.c
@@ -7,6 +7,7 @@
7 */ 7 */
8 8
9 9
10#include <linux/jiffies.h>
10#include <linux/kernel.h> 11#include <linux/kernel.h>
11#include <linux/sched.h> 12#include <linux/sched.h>
12#include <linux/mm.h> 13#include <linux/mm.h>
@@ -283,7 +284,7 @@ static void log_unaligned(struct pt_regs *regs)
283{ 284{
284 static unsigned long count, last_time; 285 static unsigned long count, last_time;
285 286
286 if (jiffies - last_time > 5 * HZ) 287 if (time_after(jiffies, last_time + 5 * HZ))
287 count = 0; 288 count = 0;
288 if (count < 5) { 289 if (count < 5) {
289 last_time = jiffies; 290 last_time = jiffies;
diff --git a/arch/sparc64/mm/init.c b/arch/sparc64/mm/init.c
index e726c45645ff..9e6bca266d88 100644
--- a/arch/sparc64/mm/init.c
+++ b/arch/sparc64/mm/init.c
@@ -618,9 +618,9 @@ static void __init inherit_prom_mappings(void)
618 read_obp_translations(); 618 read_obp_translations();
619 619
620 /* Now fixup OBP's idea about where we really are mapped. */ 620 /* Now fixup OBP's idea about where we really are mapped. */
621 prom_printf("Remapping the kernel... "); 621 printk("Remapping the kernel... ");
622 remap_kernel(); 622 remap_kernel();
623 prom_printf("done.\n"); 623 printk("done.\n");
624} 624}
625 625
626void prom_world(int enter) 626void prom_world(int enter)
@@ -739,11 +739,6 @@ static unsigned long __init choose_bootmap_pfn(unsigned long start_pfn,
739 avoid_end = PAGE_ALIGN(initrd_end); 739 avoid_end = PAGE_ALIGN(initrd_end);
740#endif 740#endif
741 741
742#ifdef CONFIG_DEBUG_BOOTMEM
743 prom_printf("choose_bootmap_pfn: kern[%lx:%lx] avoid[%lx:%lx]\n",
744 kern_base, PAGE_ALIGN(kern_base + kern_size),
745 avoid_start, avoid_end);
746#endif
747 for (i = 0; i < pavail_ents; i++) { 742 for (i = 0; i < pavail_ents; i++) {
748 unsigned long start, end; 743 unsigned long start, end;
749 744
@@ -777,10 +772,6 @@ static unsigned long __init choose_bootmap_pfn(unsigned long start_pfn,
777 } 772 }
778 773
779 /* OK, it doesn't overlap anything, use it. */ 774 /* OK, it doesn't overlap anything, use it. */
780#ifdef CONFIG_DEBUG_BOOTMEM
781 prom_printf("choose_bootmap_pfn: Using %lx [%lx]\n",
782 start >> PAGE_SHIFT, start);
783#endif
784 return start >> PAGE_SHIFT; 775 return start >> PAGE_SHIFT;
785 } 776 }
786 } 777 }
@@ -920,10 +911,6 @@ static unsigned long __init bootmem_init(unsigned long *pages_avail,
920 unsigned long bootmap_pfn, bytes_avail, size; 911 unsigned long bootmap_pfn, bytes_avail, size;
921 int i; 912 int i;
922 913
923#ifdef CONFIG_DEBUG_BOOTMEM
924 prom_printf("bootmem_init: Scan pavail, ");
925#endif
926
927 bytes_avail = 0UL; 914 bytes_avail = 0UL;
928 for (i = 0; i < pavail_ents; i++) { 915 for (i = 0; i < pavail_ents; i++) {
929 end_of_phys_memory = pavail[i].phys_addr + 916 end_of_phys_memory = pavail[i].phys_addr +
@@ -970,33 +957,20 @@ static unsigned long __init bootmem_init(unsigned long *pages_avail,
970 957
971 bootmap_pfn = choose_bootmap_pfn(min_low_pfn, end_pfn); 958 bootmap_pfn = choose_bootmap_pfn(min_low_pfn, end_pfn);
972 959
973#ifdef CONFIG_DEBUG_BOOTMEM
974 prom_printf("init_bootmem(min[%lx], bootmap[%lx], max[%lx])\n",
975 min_low_pfn, bootmap_pfn, max_low_pfn);
976#endif
977 bootmap_size = init_bootmem_node(NODE_DATA(0), bootmap_pfn, 960 bootmap_size = init_bootmem_node(NODE_DATA(0), bootmap_pfn,
978 min_low_pfn, end_pfn); 961 min_low_pfn, end_pfn);
979 962
980 /* Now register the available physical memory with the 963 /* Now register the available physical memory with the
981 * allocator. 964 * allocator.
982 */ 965 */
983 for (i = 0; i < pavail_ents; i++) { 966 for (i = 0; i < pavail_ents; i++)
984#ifdef CONFIG_DEBUG_BOOTMEM
985 prom_printf("free_bootmem(pavail:%d): base[%lx] size[%lx]\n",
986 i, pavail[i].phys_addr, pavail[i].reg_size);
987#endif
988 free_bootmem(pavail[i].phys_addr, pavail[i].reg_size); 967 free_bootmem(pavail[i].phys_addr, pavail[i].reg_size);
989 }
990 968
991#ifdef CONFIG_BLK_DEV_INITRD 969#ifdef CONFIG_BLK_DEV_INITRD
992 if (initrd_start) { 970 if (initrd_start) {
993 size = initrd_end - initrd_start; 971 size = initrd_end - initrd_start;
994 972
995 /* Reserve the initrd image area. */ 973 /* Reserve the initrd image area. */
996#ifdef CONFIG_DEBUG_BOOTMEM
997 prom_printf("reserve_bootmem(initrd): base[%llx] size[%lx]\n",
998 initrd_start, initrd_end);
999#endif
1000 reserve_bootmem(initrd_start, size, BOOTMEM_DEFAULT); 974 reserve_bootmem(initrd_start, size, BOOTMEM_DEFAULT);
1001 975
1002 initrd_start += PAGE_OFFSET; 976 initrd_start += PAGE_OFFSET;
@@ -1004,9 +978,6 @@ static unsigned long __init bootmem_init(unsigned long *pages_avail,
1004 } 978 }
1005#endif 979#endif
1006 /* Reserve the kernel text/data/bss. */ 980 /* Reserve the kernel text/data/bss. */
1007#ifdef CONFIG_DEBUG_BOOTMEM
1008 prom_printf("reserve_bootmem(kernel): base[%lx] size[%lx]\n", kern_base, kern_size);
1009#endif
1010 reserve_bootmem(kern_base, kern_size, BOOTMEM_DEFAULT); 981 reserve_bootmem(kern_base, kern_size, BOOTMEM_DEFAULT);
1011 *pages_avail -= PAGE_ALIGN(kern_size) >> PAGE_SHIFT; 982 *pages_avail -= PAGE_ALIGN(kern_size) >> PAGE_SHIFT;
1012 983
@@ -1020,10 +991,6 @@ static unsigned long __init bootmem_init(unsigned long *pages_avail,
1020 * in free_all_bootmem. 991 * in free_all_bootmem.
1021 */ 992 */
1022 size = bootmap_size; 993 size = bootmap_size;
1023#ifdef CONFIG_DEBUG_BOOTMEM
1024 prom_printf("reserve_bootmem(bootmap): base[%lx] size[%lx]\n",
1025 (bootmap_pfn << PAGE_SHIFT), size);
1026#endif
1027 reserve_bootmem((bootmap_pfn << PAGE_SHIFT), size, BOOTMEM_DEFAULT); 994 reserve_bootmem((bootmap_pfn << PAGE_SHIFT), size, BOOTMEM_DEFAULT);
1028 995
1029 for (i = 0; i < pavail_ents; i++) { 996 for (i = 0; i < pavail_ents; i++) {
@@ -1031,10 +998,6 @@ static unsigned long __init bootmem_init(unsigned long *pages_avail,
1031 998
1032 start_pfn = pavail[i].phys_addr >> PAGE_SHIFT; 999 start_pfn = pavail[i].phys_addr >> PAGE_SHIFT;
1033 end_pfn = (start_pfn + (pavail[i].reg_size >> PAGE_SHIFT)); 1000 end_pfn = (start_pfn + (pavail[i].reg_size >> PAGE_SHIFT));
1034#ifdef CONFIG_DEBUG_BOOTMEM
1035 prom_printf("memory_present(0, %lx, %lx)\n",
1036 start_pfn, end_pfn);
1037#endif
1038 memory_present(0, start_pfn, end_pfn); 1001 memory_present(0, start_pfn, end_pfn);
1039 } 1002 }
1040 1003
@@ -1451,7 +1414,7 @@ void __init paging_init(void)
1451 zholes_size); 1414 zholes_size);
1452 } 1415 }
1453 1416
1454 prom_printf("Booting Linux...\n"); 1417 printk("Booting Linux...\n");
1455 1418
1456 central_probe(); 1419 central_probe();
1457 cpu_probe(); 1420 cpu_probe();
@@ -1549,10 +1512,6 @@ void __init mem_init(void)
1549 1512
1550 high_memory = __va(last_valid_pfn << PAGE_SHIFT); 1513 high_memory = __va(last_valid_pfn << PAGE_SHIFT);
1551 1514
1552#ifdef CONFIG_DEBUG_BOOTMEM
1553 prom_printf("mem_init: Calling free_all_bootmem().\n");
1554#endif
1555
1556 /* We subtract one to account for the mem_map_zero page 1515 /* We subtract one to account for the mem_map_zero page
1557 * allocated below. 1516 * allocated below.
1558 */ 1517 */
diff --git a/arch/sparc64/prom/misc.c b/arch/sparc64/prom/misc.c
index bbec7522826c..47a877a15abd 100644
--- a/arch/sparc64/prom/misc.c
+++ b/arch/sparc64/prom/misc.c
@@ -55,9 +55,6 @@ void prom_feval(const char *fstring)
55 P1275_INOUT(1, 1), fstring); 55 P1275_INOUT(1, 1), fstring);
56} 56}
57 57
58/* We want to do this more nicely some day. */
59extern void (*prom_palette)(int);
60
61#ifdef CONFIG_SMP 58#ifdef CONFIG_SMP
62extern void smp_capture(void); 59extern void smp_capture(void);
63extern void smp_release(void); 60extern void smp_release(void);
@@ -72,9 +69,6 @@ void prom_cmdline(void)
72 69
73 local_irq_save(flags); 70 local_irq_save(flags);
74 71
75 if (prom_palette)
76 prom_palette(1);
77
78#ifdef CONFIG_SMP 72#ifdef CONFIG_SMP
79 smp_capture(); 73 smp_capture();
80#endif 74#endif
@@ -85,9 +79,6 @@ void prom_cmdline(void)
85 smp_release(); 79 smp_release();
86#endif 80#endif
87 81
88 if (prom_palette)
89 prom_palette(0);
90
91 local_irq_restore(flags); 82 local_irq_restore(flags);
92} 83}
93 84