diff options
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r-- | arch/powerpc/kernel/head_32.S | 2 | ||||
-rw-r--r-- | arch/powerpc/kernel/lparcfg.c | 5 | ||||
-rw-r--r-- | arch/powerpc/kernel/machine_kexec_32.c | 2 | ||||
-rw-r--r-- | arch/powerpc/kernel/misc_32.S | 2 | ||||
-rw-r--r-- | arch/powerpc/kernel/module.c | 15 | ||||
-rw-r--r-- | arch/powerpc/kernel/pci-common.c | 17 | ||||
-rw-r--r-- | arch/powerpc/kernel/rtas.c | 5 | ||||
-rw-r--r-- | arch/powerpc/kernel/sys_ppc32.c | 57 |
8 files changed, 23 insertions, 82 deletions
diff --git a/arch/powerpc/kernel/head_32.S b/arch/powerpc/kernel/head_32.S index 99ee2f0f0f2..8bb65751929 100644 --- a/arch/powerpc/kernel/head_32.S +++ b/arch/powerpc/kernel/head_32.S | |||
@@ -1155,7 +1155,7 @@ flush_tlbs: | |||
1155 | lis r10, 0x40 | 1155 | lis r10, 0x40 |
1156 | 1: addic. r10, r10, -0x1000 | 1156 | 1: addic. r10, r10, -0x1000 |
1157 | tlbie r10 | 1157 | tlbie r10 |
1158 | blt 1b | 1158 | bgt 1b |
1159 | sync | 1159 | sync |
1160 | blr | 1160 | blr |
1161 | 1161 | ||
diff --git a/arch/powerpc/kernel/lparcfg.c b/arch/powerpc/kernel/lparcfg.c index 1a09719c762..b3eef30b513 100644 --- a/arch/powerpc/kernel/lparcfg.c +++ b/arch/powerpc/kernel/lparcfg.c | |||
@@ -416,6 +416,8 @@ static void pseries_cmo_data(struct seq_file *m) | |||
416 | unsigned long cmo_faults = 0; | 416 | unsigned long cmo_faults = 0; |
417 | unsigned long cmo_fault_time = 0; | 417 | unsigned long cmo_fault_time = 0; |
418 | 418 | ||
419 | seq_printf(m, "cmo_enabled=%d\n", firmware_has_feature(FW_FEATURE_CMO)); | ||
420 | |||
419 | if (!firmware_has_feature(FW_FEATURE_CMO)) | 421 | if (!firmware_has_feature(FW_FEATURE_CMO)) |
420 | return; | 422 | return; |
421 | 423 | ||
@@ -427,6 +429,9 @@ static void pseries_cmo_data(struct seq_file *m) | |||
427 | seq_printf(m, "cmo_faults=%lu\n", cmo_faults); | 429 | seq_printf(m, "cmo_faults=%lu\n", cmo_faults); |
428 | seq_printf(m, "cmo_fault_time_usec=%lu\n", | 430 | seq_printf(m, "cmo_fault_time_usec=%lu\n", |
429 | cmo_fault_time / tb_ticks_per_usec); | 431 | cmo_fault_time / tb_ticks_per_usec); |
432 | seq_printf(m, "cmo_primary_psp=%d\n", cmo_get_primary_psp()); | ||
433 | seq_printf(m, "cmo_secondary_psp=%d\n", cmo_get_secondary_psp()); | ||
434 | seq_printf(m, "cmo_page_size=%lu\n", cmo_get_page_size()); | ||
430 | } | 435 | } |
431 | 436 | ||
432 | static int pseries_lparcfg_data(struct seq_file *m, void *v) | 437 | static int pseries_lparcfg_data(struct seq_file *m, void *v) |
diff --git a/arch/powerpc/kernel/machine_kexec_32.c b/arch/powerpc/kernel/machine_kexec_32.c index cbaa3419679..ae63a964b85 100644 --- a/arch/powerpc/kernel/machine_kexec_32.c +++ b/arch/powerpc/kernel/machine_kexec_32.c | |||
@@ -51,7 +51,7 @@ void default_machine_kexec(struct kimage *image) | |||
51 | relocate_new_kernel_size); | 51 | relocate_new_kernel_size); |
52 | 52 | ||
53 | flush_icache_range(reboot_code_buffer, | 53 | flush_icache_range(reboot_code_buffer, |
54 | reboot_code_buffer + KEXEC_CONTROL_CODE_SIZE); | 54 | reboot_code_buffer + KEXEC_CONTROL_PAGE_SIZE); |
55 | printk(KERN_INFO "Bye!\n"); | 55 | printk(KERN_INFO "Bye!\n"); |
56 | 56 | ||
57 | /* now call it */ | 57 | /* now call it */ |
diff --git a/arch/powerpc/kernel/misc_32.S b/arch/powerpc/kernel/misc_32.S index 6321ae36f72..7a6dfbca768 100644 --- a/arch/powerpc/kernel/misc_32.S +++ b/arch/powerpc/kernel/misc_32.S | |||
@@ -899,7 +899,7 @@ relocate_new_kernel: | |||
899 | 899 | ||
900 | /* set a new stack at the bottom of our page... */ | 900 | /* set a new stack at the bottom of our page... */ |
901 | /* (not really needed now) */ | 901 | /* (not really needed now) */ |
902 | addi r1, r4, KEXEC_CONTROL_CODE_SIZE - 8 /* for LR Save+Back Chain */ | 902 | addi r1, r4, KEXEC_CONTROL_PAGE_SIZE - 8 /* for LR Save+Back Chain */ |
903 | stw r0, 0(r1) | 903 | stw r0, 0(r1) |
904 | 904 | ||
905 | /* Do the copies */ | 905 | /* Do the copies */ |
diff --git a/arch/powerpc/kernel/module.c b/arch/powerpc/kernel/module.c index af07003573c..7ff29247526 100644 --- a/arch/powerpc/kernel/module.c +++ b/arch/powerpc/kernel/module.c | |||
@@ -99,18 +99,3 @@ void module_arch_cleanup(struct module *mod) | |||
99 | { | 99 | { |
100 | module_bug_cleanup(mod); | 100 | module_bug_cleanup(mod); |
101 | } | 101 | } |
102 | |||
103 | struct bug_entry *module_find_bug(unsigned long bugaddr) | ||
104 | { | ||
105 | struct mod_arch_specific *mod; | ||
106 | unsigned int i; | ||
107 | struct bug_entry *bug; | ||
108 | |||
109 | list_for_each_entry(mod, &module_bug_list, bug_list) { | ||
110 | bug = mod->bug_table; | ||
111 | for (i = 0; i < mod->num_bugs; ++i, ++bug) | ||
112 | if (bugaddr == bug->bug_addr) | ||
113 | return bug; | ||
114 | } | ||
115 | return NULL; | ||
116 | } | ||
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c index 224e9a11765..ea0c61e09b7 100644 --- a/arch/powerpc/kernel/pci-common.c +++ b/arch/powerpc/kernel/pci-common.c | |||
@@ -650,11 +650,18 @@ void __devinit pci_process_bridge_OF_ranges(struct pci_controller *hose, | |||
650 | } | 650 | } |
651 | } | 651 | } |
652 | 652 | ||
653 | /* Out of paranoia, let's put the ISA hole last if any */ | 653 | /* If there's an ISA hole and the pci_mem_offset is -not- matching |
654 | if (isa_hole >= 0 && memno > 0 && isa_hole != (memno-1)) { | 654 | * the ISA hole offset, then we need to remove the ISA hole from |
655 | struct resource tmp = hose->mem_resources[isa_hole]; | 655 | * the resource list for that brige |
656 | hose->mem_resources[isa_hole] = hose->mem_resources[memno-1]; | 656 | */ |
657 | hose->mem_resources[memno-1] = tmp; | 657 | if (isa_hole >= 0 && hose->pci_mem_offset != isa_mb) { |
658 | unsigned int next = isa_hole + 1; | ||
659 | printk(KERN_INFO " Removing ISA hole at 0x%016llx\n", isa_mb); | ||
660 | if (next < memno) | ||
661 | memmove(&hose->mem_resources[isa_hole], | ||
662 | &hose->mem_resources[next], | ||
663 | sizeof(struct resource) * (memno - next)); | ||
664 | hose->mem_resources[--memno].flags = 0; | ||
658 | } | 665 | } |
659 | } | 666 | } |
660 | 667 | ||
diff --git a/arch/powerpc/kernel/rtas.c b/arch/powerpc/kernel/rtas.c index c680f1bbd38..1f8505c2354 100644 --- a/arch/powerpc/kernel/rtas.c +++ b/arch/powerpc/kernel/rtas.c | |||
@@ -792,6 +792,9 @@ asmlinkage int ppc_rtas(struct rtas_args __user *uargs) | |||
792 | if (args.token == RTAS_UNKNOWN_SERVICE) | 792 | if (args.token == RTAS_UNKNOWN_SERVICE) |
793 | return -EINVAL; | 793 | return -EINVAL; |
794 | 794 | ||
795 | args.rets = &args.args[nargs]; | ||
796 | memset(args.rets, 0, args.nret * sizeof(rtas_arg_t)); | ||
797 | |||
795 | /* Need to handle ibm,suspend_me call specially */ | 798 | /* Need to handle ibm,suspend_me call specially */ |
796 | if (args.token == ibm_suspend_me_token) { | 799 | if (args.token == ibm_suspend_me_token) { |
797 | rc = rtas_ibm_suspend_me(&args); | 800 | rc = rtas_ibm_suspend_me(&args); |
@@ -808,8 +811,6 @@ asmlinkage int ppc_rtas(struct rtas_args __user *uargs) | |||
808 | enter_rtas(__pa(&rtas.args)); | 811 | enter_rtas(__pa(&rtas.args)); |
809 | args = rtas.args; | 812 | args = rtas.args; |
810 | 813 | ||
811 | args.rets = &args.args[nargs]; | ||
812 | |||
813 | /* A -1 return code indicates that the last command couldn't | 814 | /* A -1 return code indicates that the last command couldn't |
814 | be completed due to a hardware error. */ | 815 | be completed due to a hardware error. */ |
815 | if (args.rets[0] == -1) | 816 | if (args.rets[0] == -1) |
diff --git a/arch/powerpc/kernel/sys_ppc32.c b/arch/powerpc/kernel/sys_ppc32.c index 709f8cb8bfc..d98634c7606 100644 --- a/arch/powerpc/kernel/sys_ppc32.c +++ b/arch/powerpc/kernel/sys_ppc32.c | |||
@@ -52,63 +52,6 @@ | |||
52 | #include <asm/ppc-pci.h> | 52 | #include <asm/ppc-pci.h> |
53 | #include <asm/syscalls.h> | 53 | #include <asm/syscalls.h> |
54 | 54 | ||
55 | struct old_linux_dirent32 { | ||
56 | u32 d_ino; | ||
57 | u32 d_offset; | ||
58 | unsigned short d_namlen; | ||
59 | char d_name[1]; | ||
60 | }; | ||
61 | |||
62 | struct readdir_callback32 { | ||
63 | struct old_linux_dirent32 __user * dirent; | ||
64 | int count; | ||
65 | }; | ||
66 | |||
67 | static int fillonedir(void * __buf, const char * name, int namlen, | ||
68 | off_t offset, u64 ino, unsigned int d_type) | ||
69 | { | ||
70 | struct readdir_callback32 * buf = (struct readdir_callback32 *) __buf; | ||
71 | struct old_linux_dirent32 __user * dirent; | ||
72 | ino_t d_ino; | ||
73 | |||
74 | if (buf->count) | ||
75 | return -EINVAL; | ||
76 | d_ino = ino; | ||
77 | if (sizeof(d_ino) < sizeof(ino) && d_ino != ino) | ||
78 | return -EOVERFLOW; | ||
79 | buf->count++; | ||
80 | dirent = buf->dirent; | ||
81 | put_user(d_ino, &dirent->d_ino); | ||
82 | put_user(offset, &dirent->d_offset); | ||
83 | put_user(namlen, &dirent->d_namlen); | ||
84 | copy_to_user(dirent->d_name, name, namlen); | ||
85 | put_user(0, dirent->d_name + namlen); | ||
86 | return 0; | ||
87 | } | ||
88 | |||
89 | asmlinkage int old32_readdir(unsigned int fd, struct old_linux_dirent32 __user *dirent, unsigned int count) | ||
90 | { | ||
91 | int error = -EBADF; | ||
92 | struct file * file; | ||
93 | struct readdir_callback32 buf; | ||
94 | |||
95 | file = fget(fd); | ||
96 | if (!file) | ||
97 | goto out; | ||
98 | |||
99 | buf.count = 0; | ||
100 | buf.dirent = dirent; | ||
101 | |||
102 | error = vfs_readdir(file, (filldir_t)fillonedir, &buf); | ||
103 | if (error < 0) | ||
104 | goto out_putf; | ||
105 | error = buf.count; | ||
106 | |||
107 | out_putf: | ||
108 | fput(file); | ||
109 | out: | ||
110 | return error; | ||
111 | } | ||
112 | 55 | ||
113 | asmlinkage long ppc32_select(u32 n, compat_ulong_t __user *inp, | 56 | asmlinkage long ppc32_select(u32 n, compat_ulong_t __user *inp, |
114 | compat_ulong_t __user *outp, compat_ulong_t __user *exp, | 57 | compat_ulong_t __user *outp, compat_ulong_t __user *exp, |