aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/kernel
diff options
context:
space:
mode:
authorDave Jones <davej@redhat.com>2006-12-12 17:41:41 -0500
committerDave Jones <davej@redhat.com>2006-12-12 17:41:41 -0500
commitc4366889dda8110247be59ca41fddb82951a8c26 (patch)
tree705c1a996bed8fd48ce94ff33ec9fd00f9b94875 /arch/sparc/kernel
parentdb2fb9db5735cc532fd4fc55e94b9a3c3750378e (diff)
parente1036502e5263851259d147771226161e5ccc85a (diff)
Merge ../linus
Conflicts: drivers/cpufreq/cpufreq.c
Diffstat (limited to 'arch/sparc/kernel')
-rw-r--r--arch/sparc/kernel/ebus.c8
-rw-r--r--arch/sparc/kernel/entry.S3
-rw-r--r--arch/sparc/kernel/ioport.c6
-rw-r--r--arch/sparc/kernel/irq.c2
-rw-r--r--arch/sparc/kernel/of_device.c5
-rw-r--r--arch/sparc/kernel/ptrace.c5
-rw-r--r--arch/sparc/kernel/setup.c2
-rw-r--r--arch/sparc/kernel/sun4d_irq.c7
-rw-r--r--arch/sparc/kernel/sys_sunos.c6
-rw-r--r--arch/sparc/kernel/systbls.S5
-rw-r--r--arch/sparc/kernel/time.c2
-rw-r--r--arch/sparc/kernel/vmlinux.lds.S9
12 files changed, 29 insertions, 31 deletions
diff --git a/arch/sparc/kernel/ebus.c b/arch/sparc/kernel/ebus.c
index 75ac24d229b1..ba58c3a061fd 100644
--- a/arch/sparc/kernel/ebus.c
+++ b/arch/sparc/kernel/ebus.c
@@ -237,12 +237,12 @@ void __init fill_ebus_device(struct device_node *dp, struct linux_ebus_device *d
237 dev->ofdev.node = dp; 237 dev->ofdev.node = dp;
238 dev->ofdev.dev.parent = &dev->bus->ofdev.dev; 238 dev->ofdev.dev.parent = &dev->bus->ofdev.dev;
239 dev->ofdev.dev.bus = &ebus_bus_type; 239 dev->ofdev.dev.bus = &ebus_bus_type;
240 strcpy(dev->ofdev.dev.bus_id, dp->path_component_name); 240 sprintf(dev->ofdev.dev.bus_id, "ebus[%08x]", dp->node);
241 241
242 /* Register with core */ 242 /* Register with core */
243 if (of_device_register(&dev->ofdev) != 0) 243 if (of_device_register(&dev->ofdev) != 0)
244 printk(KERN_DEBUG "ebus: device registration error for %s!\n", 244 printk(KERN_DEBUG "ebus: device registration error for %s!\n",
245 dev->ofdev.dev.bus_id); 245 dp->path_component_name);
246 246
247 if ((dp = dp->child) != NULL) { 247 if ((dp = dp->child) != NULL) {
248 dev->children = (struct linux_ebus_child *) 248 dev->children = (struct linux_ebus_child *)
@@ -332,12 +332,12 @@ void __init ebus_init(void)
332 ebus->ofdev.node = dp; 332 ebus->ofdev.node = dp;
333 ebus->ofdev.dev.parent = &pdev->dev; 333 ebus->ofdev.dev.parent = &pdev->dev;
334 ebus->ofdev.dev.bus = &ebus_bus_type; 334 ebus->ofdev.dev.bus = &ebus_bus_type;
335 strcpy(ebus->ofdev.dev.bus_id, dp->path_component_name); 335 sprintf(ebus->ofdev.dev.bus_id, "ebus%d", num_ebus);
336 336
337 /* Register with core */ 337 /* Register with core */
338 if (of_device_register(&ebus->ofdev) != 0) 338 if (of_device_register(&ebus->ofdev) != 0)
339 printk(KERN_DEBUG "ebus: device registration error for %s!\n", 339 printk(KERN_DEBUG "ebus: device registration error for %s!\n",
340 ebus->ofdev.dev.bus_id); 340 dp->path_component_name);
341 341
342 342
343 nd = dp->child; 343 nd = dp->child;
diff --git a/arch/sparc/kernel/entry.S b/arch/sparc/kernel/entry.S
index a4edff4c3be3..831f540251f8 100644
--- a/arch/sparc/kernel/entry.S
+++ b/arch/sparc/kernel/entry.S
@@ -32,13 +32,12 @@
32#include <asm/mxcc.h> 32#include <asm/mxcc.h>
33#include <asm/thread_info.h> 33#include <asm/thread_info.h>
34#include <asm/param.h> 34#include <asm/param.h>
35#include <asm/unistd.h>
35 36
36#include <asm/asmmacro.h> 37#include <asm/asmmacro.h>
37 38
38#define curptr g6 39#define curptr g6
39 40
40#define NR_SYSCALLS 300 /* Each OS is different... */
41
42/* These are just handy. */ 41/* These are just handy. */
43#define _SV save %sp, -STACKFRAME_SZ, %sp 42#define _SV save %sp, -STACKFRAME_SZ, %sp
44#define _RS restore 43#define _RS restore
diff --git a/arch/sparc/kernel/ioport.c b/arch/sparc/kernel/ioport.c
index 54d51b404603..cbbc98846b00 100644
--- a/arch/sparc/kernel/ioport.c
+++ b/arch/sparc/kernel/ioport.c
@@ -317,9 +317,8 @@ void *sbus_alloc_consistent(struct sbus_dev *sdev, long len, u32 *dma_addrp)
317 if ((va = __get_free_pages(GFP_KERNEL|__GFP_COMP, order)) == 0) 317 if ((va = __get_free_pages(GFP_KERNEL|__GFP_COMP, order)) == 0)
318 goto err_nopages; 318 goto err_nopages;
319 319
320 if ((res = kmalloc(sizeof(struct resource), GFP_KERNEL)) == NULL) 320 if ((res = kzalloc(sizeof(struct resource), GFP_KERNEL)) == NULL)
321 goto err_nomem; 321 goto err_nomem;
322 memset((char*)res, 0, sizeof(struct resource));
323 322
324 if (allocate_resource(&_sparc_dvma, res, len_total, 323 if (allocate_resource(&_sparc_dvma, res, len_total,
325 _sparc_dvma.start, _sparc_dvma.end, PAGE_SIZE, NULL, NULL) != 0) { 324 _sparc_dvma.start, _sparc_dvma.end, PAGE_SIZE, NULL, NULL) != 0) {
@@ -589,12 +588,11 @@ void *pci_alloc_consistent(struct pci_dev *pdev, size_t len, dma_addr_t *pba)
589 return NULL; 588 return NULL;
590 } 589 }
591 590
592 if ((res = kmalloc(sizeof(struct resource), GFP_KERNEL)) == NULL) { 591 if ((res = kzalloc(sizeof(struct resource), GFP_KERNEL)) == NULL) {
593 free_pages(va, order); 592 free_pages(va, order);
594 printk("pci_alloc_consistent: no core\n"); 593 printk("pci_alloc_consistent: no core\n");
595 return NULL; 594 return NULL;
596 } 595 }
597 memset((char*)res, 0, sizeof(struct resource));
598 596
599 if (allocate_resource(&_sparc_dvma, res, len_total, 597 if (allocate_resource(&_sparc_dvma, res, len_total,
600 _sparc_dvma.start, _sparc_dvma.end, PAGE_SIZE, NULL, NULL) != 0) { 598 _sparc_dvma.start, _sparc_dvma.end, PAGE_SIZE, NULL, NULL) != 0) {
diff --git a/arch/sparc/kernel/irq.c b/arch/sparc/kernel/irq.c
index b3b6680a2a30..c8cb211b9072 100644
--- a/arch/sparc/kernel/irq.c
+++ b/arch/sparc/kernel/irq.c
@@ -351,7 +351,7 @@ void handler_irq(int irq, struct pt_regs * regs)
351} 351}
352 352
353#ifdef CONFIG_BLK_DEV_FD 353#ifdef CONFIG_BLK_DEV_FD
354extern void floppy_interrupt(int irq, void *dev_id) 354extern void floppy_interrupt(int irq, void *dev_id);
355 355
356void sparc_floppy_irq(int irq, void *dev_id, struct pt_regs *regs) 356void sparc_floppy_irq(int irq, void *dev_id, struct pt_regs *regs)
357{ 357{
diff --git a/arch/sparc/kernel/of_device.c b/arch/sparc/kernel/of_device.c
index 74bef2a2d37f..dab6169e31ca 100644
--- a/arch/sparc/kernel/of_device.c
+++ b/arch/sparc/kernel/of_device.c
@@ -651,7 +651,7 @@ build_resources:
651 if (!parent) 651 if (!parent)
652 strcpy(op->dev.bus_id, "root"); 652 strcpy(op->dev.bus_id, "root");
653 else 653 else
654 strcpy(op->dev.bus_id, dp->path_component_name); 654 sprintf(op->dev.bus_id, "%08x", dp->node);
655 655
656 if (of_device_register(op)) { 656 if (of_device_register(op)) {
657 printk("%s: Could not register of device.\n", 657 printk("%s: Could not register of device.\n",
@@ -793,10 +793,9 @@ struct of_device* of_platform_device_create(struct device_node *np,
793{ 793{
794 struct of_device *dev; 794 struct of_device *dev;
795 795
796 dev = kmalloc(sizeof(*dev), GFP_KERNEL); 796 dev = kzalloc(sizeof(*dev), GFP_KERNEL);
797 if (!dev) 797 if (!dev)
798 return NULL; 798 return NULL;
799 memset(dev, 0, sizeof(*dev));
800 799
801 dev->dev.parent = parent; 800 dev->dev.parent = parent;
802 dev->dev.bus = bus; 801 dev->dev.bus = bus;
diff --git a/arch/sparc/kernel/ptrace.c b/arch/sparc/kernel/ptrace.c
index 1baf13ed5c3a..003f8eed32f4 100644
--- a/arch/sparc/kernel/ptrace.c
+++ b/arch/sparc/kernel/ptrace.c
@@ -289,7 +289,10 @@ asmlinkage void do_ptrace(struct pt_regs *regs)
289 289
290 if (request == PTRACE_TRACEME) { 290 if (request == PTRACE_TRACEME) {
291 ret = ptrace_traceme(); 291 ret = ptrace_traceme();
292 pt_succ_return(regs, 0); 292 if (ret < 0)
293 pt_error_return(regs, -ret);
294 else
295 pt_succ_return(regs, 0);
293 goto out; 296 goto out;
294 } 297 }
295 298
diff --git a/arch/sparc/kernel/setup.c b/arch/sparc/kernel/setup.c
index f5ee1ac834bc..383526ad94fc 100644
--- a/arch/sparc/kernel/setup.c
+++ b/arch/sparc/kernel/setup.c
@@ -103,7 +103,6 @@ void prom_sync_me(void)
103 103
104unsigned int boot_flags __initdata = 0; 104unsigned int boot_flags __initdata = 0;
105#define BOOTME_DEBUG 0x1 105#define BOOTME_DEBUG 0x1
106#define BOOTME_SINGLE 0x2
107 106
108/* Exported for mm/init.c:paging_init. */ 107/* Exported for mm/init.c:paging_init. */
109unsigned long cmdline_memory_size __initdata = 0; 108unsigned long cmdline_memory_size __initdata = 0;
@@ -132,7 +131,6 @@ static void __init process_switch(char c)
132 boot_flags |= BOOTME_DEBUG; 131 boot_flags |= BOOTME_DEBUG;
133 break; 132 break;
134 case 's': 133 case 's':
135 boot_flags |= BOOTME_SINGLE;
136 break; 134 break;
137 case 'h': 135 case 'h':
138 prom_printf("boot_flags_init: Halt!\n"); 136 prom_printf("boot_flags_init: Halt!\n");
diff --git a/arch/sparc/kernel/sun4d_irq.c b/arch/sparc/kernel/sun4d_irq.c
index d4f9da8170c5..cf1b8baa57ea 100644
--- a/arch/sparc/kernel/sun4d_irq.c
+++ b/arch/sparc/kernel/sun4d_irq.c
@@ -545,8 +545,11 @@ void __init sun4d_init_sbi_irq(void)
545 nsbi = 0; 545 nsbi = 0;
546 for_each_sbus(sbus) 546 for_each_sbus(sbus)
547 nsbi++; 547 nsbi++;
548 sbus_actions = (struct sbus_action *)kmalloc (nsbi * 8 * 4 * sizeof(struct sbus_action), GFP_ATOMIC); 548 sbus_actions = kzalloc (nsbi * 8 * 4 * sizeof(struct sbus_action), GFP_ATOMIC);
549 memset (sbus_actions, 0, (nsbi * 8 * 4 * sizeof(struct sbus_action))); 549 if (!sbus_actions) {
550 prom_printf("SUN4D: Cannot allocate sbus_actions, halting.\n");
551 prom_halt();
552 }
550 for_each_sbus(sbus) { 553 for_each_sbus(sbus) {
551#ifdef CONFIG_SMP 554#ifdef CONFIG_SMP
552 extern unsigned char boot_cpu_id; 555 extern unsigned char boot_cpu_id;
diff --git a/arch/sparc/kernel/sys_sunos.c b/arch/sparc/kernel/sys_sunos.c
index 6f3ac548ee66..0bf8c165fc92 100644
--- a/arch/sparc/kernel/sys_sunos.c
+++ b/arch/sparc/kernel/sys_sunos.c
@@ -94,8 +94,8 @@ asmlinkage unsigned long sunos_mmap(unsigned long addr, unsigned long len,
94 * SunOS is so stupid some times... hmph! 94 * SunOS is so stupid some times... hmph!
95 */ 95 */
96 if (file) { 96 if (file) {
97 if (imajor(file->f_dentry->d_inode) == MEM_MAJOR && 97 if (imajor(file->f_path.dentry->d_inode) == MEM_MAJOR &&
98 iminor(file->f_dentry->d_inode) == 5) { 98 iminor(file->f_path.dentry->d_inode) == 5) {
99 flags |= MAP_ANONYMOUS; 99 flags |= MAP_ANONYMOUS;
100 fput(file); 100 fput(file);
101 file = NULL; 101 file = NULL;
@@ -655,7 +655,7 @@ sunos_nfs_get_server_fd (int fd, struct sockaddr_in *addr)
655 if (!file) 655 if (!file)
656 goto out; 656 goto out;
657 657
658 inode = file->f_dentry->d_inode; 658 inode = file->f_path.dentry->d_inode;
659 659
660 socket = SOCKET_I(inode); 660 socket = SOCKET_I(inode);
661 local.sin_family = AF_INET; 661 local.sin_family = AF_INET;
diff --git a/arch/sparc/kernel/systbls.S b/arch/sparc/kernel/systbls.S
index 10df38eeae08..ea75ca569052 100644
--- a/arch/sparc/kernel/systbls.S
+++ b/arch/sparc/kernel/systbls.S
@@ -78,7 +78,7 @@ sys_call_table:
78/*285*/ .long sys_mkdirat, sys_mknodat, sys_fchownat, sys_futimesat, sys_fstatat64 78/*285*/ .long sys_mkdirat, sys_mknodat, sys_fchownat, sys_futimesat, sys_fstatat64
79/*290*/ .long sys_unlinkat, sys_renameat, sys_linkat, sys_symlinkat, sys_readlinkat 79/*290*/ .long sys_unlinkat, sys_renameat, sys_linkat, sys_symlinkat, sys_readlinkat
80/*295*/ .long sys_fchmodat, sys_faccessat, sys_pselect6, sys_ppoll, sys_unshare 80/*295*/ .long sys_fchmodat, sys_faccessat, sys_pselect6, sys_ppoll, sys_unshare
81/*300*/ .long sys_set_robust_list, sys_get_robust_list 81/*300*/ .long sys_set_robust_list, sys_get_robust_list, sys_migrate_pages
82 82
83#ifdef CONFIG_SUNOS_EMUL 83#ifdef CONFIG_SUNOS_EMUL
84 /* Now the SunOS syscall table. */ 84 /* Now the SunOS syscall table. */
@@ -190,6 +190,7 @@ sunos_sys_table:
190/*290*/ .long sunos_nosys, sunos_nosys, sunos_nosys 190/*290*/ .long sunos_nosys, sunos_nosys, sunos_nosys
191 .long sunos_nosys, sunos_nosys, sunos_nosys 191 .long sunos_nosys, sunos_nosys, sunos_nosys
192 .long sunos_nosys, sunos_nosys, sunos_nosys 192 .long sunos_nosys, sunos_nosys, sunos_nosys
193 .long sunos_nosys, sunos_nosys, sunos_nosys 193 .long sunos_nosys
194/*300*/ .long sunos_nosys, sunos_nosys, sunos_nosys
194 195
195#endif 196#endif
diff --git a/arch/sparc/kernel/time.c b/arch/sparc/kernel/time.c
index 7dcd1a16c6e4..6c7aa51b590f 100644
--- a/arch/sparc/kernel/time.c
+++ b/arch/sparc/kernel/time.c
@@ -95,6 +95,8 @@ unsigned long profile_pc(struct pt_regs *regs)
95 return pc; 95 return pc;
96} 96}
97 97
98EXPORT_SYMBOL(profile_pc);
99
98__volatile__ unsigned int *master_l10_counter; 100__volatile__ unsigned int *master_l10_counter;
99__volatile__ unsigned int *master_l10_limit; 101__volatile__ unsigned int *master_l10_limit;
100 102
diff --git a/arch/sparc/kernel/vmlinux.lds.S b/arch/sparc/kernel/vmlinux.lds.S
index 1dd78c84888a..b73e6b9067ed 100644
--- a/arch/sparc/kernel/vmlinux.lds.S
+++ b/arch/sparc/kernel/vmlinux.lds.S
@@ -11,6 +11,7 @@ SECTIONS
11 . = 0x10000 + SIZEOF_HEADERS; 11 . = 0x10000 + SIZEOF_HEADERS;
12 .text 0xf0004000 : 12 .text 0xf0004000 :
13 { 13 {
14 _text = .;
14 *(.text) 15 *(.text)
15 SCHED_TEXT 16 SCHED_TEXT
16 LOCK_TEXT 17 LOCK_TEXT
@@ -49,13 +50,7 @@ SECTIONS
49 __setup_end = .; 50 __setup_end = .;
50 __initcall_start = .; 51 __initcall_start = .;
51 .initcall.init : { 52 .initcall.init : {
52 *(.initcall1.init) 53 INITCALLS
53 *(.initcall2.init)
54 *(.initcall3.init)
55 *(.initcall4.init)
56 *(.initcall5.init)
57 *(.initcall6.init)
58 *(.initcall7.init)
59 } 54 }
60 __initcall_end = .; 55 __initcall_end = .;
61 __con_initcall_start = .; 56 __con_initcall_start = .;