diff options
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r-- | arch/powerpc/kernel/asm-offsets.c | 6 | ||||
-rw-r--r-- | arch/powerpc/kernel/head_44x.S | 9 | ||||
-rw-r--r-- | arch/powerpc/kernel/lparcfg.c | 6 | ||||
-rw-r--r-- | arch/powerpc/kernel/ppc_ksyms.c | 3 | ||||
-rw-r--r-- | arch/powerpc/kernel/proc_ppc64.c | 5 | ||||
-rw-r--r-- | arch/powerpc/kernel/rtas-proc.c | 45 | ||||
-rw-r--r-- | arch/powerpc/kernel/rtas_flash.c | 13 | ||||
-rw-r--r-- | arch/powerpc/kernel/syscalls.c | 17 | ||||
-rw-r--r-- | arch/powerpc/kernel/time.c | 4 |
9 files changed, 32 insertions, 76 deletions
diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c index af1d2c894ee1..ec9228d687b0 100644 --- a/arch/powerpc/kernel/asm-offsets.c +++ b/arch/powerpc/kernel/asm-offsets.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/time.h> | 30 | #include <linux/time.h> |
31 | #include <linux/hardirq.h> | 31 | #include <linux/hardirq.h> |
32 | #endif | 32 | #endif |
33 | #include <linux/kbuild.h> | ||
33 | 34 | ||
34 | #include <asm/io.h> | 35 | #include <asm/io.h> |
35 | #include <asm/page.h> | 36 | #include <asm/page.h> |
@@ -51,11 +52,6 @@ | |||
51 | #include <asm/iseries/alpaca.h> | 52 | #include <asm/iseries/alpaca.h> |
52 | #endif | 53 | #endif |
53 | 54 | ||
54 | #define DEFINE(sym, val) \ | ||
55 | asm volatile("\n->" #sym " %0 " #val : : "i" (val)) | ||
56 | |||
57 | #define BLANK() asm volatile("\n->" : : ) | ||
58 | |||
59 | int main(void) | 55 | int main(void) |
60 | { | 56 | { |
61 | DEFINE(THREAD, offsetof(struct task_struct, thread)); | 57 | DEFINE(THREAD, offsetof(struct task_struct, thread)); |
diff --git a/arch/powerpc/kernel/head_44x.S b/arch/powerpc/kernel/head_44x.S index b84ec6a2fc94..c2b9dc4fce5d 100644 --- a/arch/powerpc/kernel/head_44x.S +++ b/arch/powerpc/kernel/head_44x.S | |||
@@ -653,7 +653,14 @@ finish_tlb_load: | |||
653 | rlwimi r10, r11, 0, 26, 26 /* UX = HWEXEC & USER */ | 653 | rlwimi r10, r11, 0, 26, 26 /* UX = HWEXEC & USER */ |
654 | 654 | ||
655 | rlwimi r12, r10, 0, 26, 31 /* Insert static perms */ | 655 | rlwimi r12, r10, 0, 26, 31 /* Insert static perms */ |
656 | rlwinm r12, r12, 0, 20, 15 /* Clear U0-U3 */ | 656 | |
657 | /* | ||
658 | * Clear U0-U3 and WL1 IL1I IL1D IL2I IL2D bits which are added | ||
659 | * on newer 440 cores like the 440x6 used on AMCC 460EX/460GT (see | ||
660 | * include/asm-powerpc/pgtable-ppc32.h for details). | ||
661 | */ | ||
662 | rlwinm r12, r12, 0, 20, 10 | ||
663 | |||
657 | tlbwe r12, r13, PPC44x_TLB_ATTRIB /* Write ATTRIB */ | 664 | tlbwe r12, r13, PPC44x_TLB_ATTRIB /* Write ATTRIB */ |
658 | 665 | ||
659 | /* Done...restore registers and get out of here. | 666 | /* Done...restore registers and get out of here. |
diff --git a/arch/powerpc/kernel/lparcfg.c b/arch/powerpc/kernel/lparcfg.c index 1ffacc698ffb..1e656b43ad7f 100644 --- a/arch/powerpc/kernel/lparcfg.c +++ b/arch/powerpc/kernel/lparcfg.c | |||
@@ -591,10 +591,8 @@ int __init lparcfg_init(void) | |||
591 | !firmware_has_feature(FW_FEATURE_ISERIES)) | 591 | !firmware_has_feature(FW_FEATURE_ISERIES)) |
592 | mode |= S_IWUSR; | 592 | mode |= S_IWUSR; |
593 | 593 | ||
594 | ent = create_proc_entry("ppc64/lparcfg", mode, NULL); | 594 | ent = proc_create("ppc64/lparcfg", mode, NULL, &lparcfg_fops); |
595 | if (ent) { | 595 | if (!ent) { |
596 | ent->proc_fops = &lparcfg_fops; | ||
597 | } else { | ||
598 | printk(KERN_ERR "Failed to create ppc64/lparcfg\n"); | 596 | printk(KERN_ERR "Failed to create ppc64/lparcfg\n"); |
599 | return -EIO; | 597 | return -EIO; |
600 | } | 598 | } |
diff --git a/arch/powerpc/kernel/ppc_ksyms.c b/arch/powerpc/kernel/ppc_ksyms.c index 09fcb50c45ae..cf6b5a7d8b3f 100644 --- a/arch/powerpc/kernel/ppc_ksyms.c +++ b/arch/powerpc/kernel/ppc_ksyms.c | |||
@@ -133,9 +133,6 @@ EXPORT_SYMBOL(adb_try_handler_change); | |||
133 | EXPORT_SYMBOL(cuda_request); | 133 | EXPORT_SYMBOL(cuda_request); |
134 | EXPORT_SYMBOL(cuda_poll); | 134 | EXPORT_SYMBOL(cuda_poll); |
135 | #endif /* CONFIG_ADB_CUDA */ | 135 | #endif /* CONFIG_ADB_CUDA */ |
136 | #ifdef CONFIG_VT | ||
137 | EXPORT_SYMBOL(kd_mksound); | ||
138 | #endif | ||
139 | EXPORT_SYMBOL(to_tm); | 136 | EXPORT_SYMBOL(to_tm); |
140 | 137 | ||
141 | #ifdef CONFIG_PPC32 | 138 | #ifdef CONFIG_PPC32 |
diff --git a/arch/powerpc/kernel/proc_ppc64.c b/arch/powerpc/kernel/proc_ppc64.c index f78dfce1b771..c647ddef40dc 100644 --- a/arch/powerpc/kernel/proc_ppc64.c +++ b/arch/powerpc/kernel/proc_ppc64.c | |||
@@ -68,12 +68,11 @@ static int __init proc_ppc64_init(void) | |||
68 | { | 68 | { |
69 | struct proc_dir_entry *pde; | 69 | struct proc_dir_entry *pde; |
70 | 70 | ||
71 | pde = create_proc_entry("ppc64/systemcfg", S_IFREG|S_IRUGO, NULL); | 71 | pde = proc_create_data("ppc64/systemcfg", S_IFREG|S_IRUGO, NULL, |
72 | &page_map_fops, vdso_data); | ||
72 | if (!pde) | 73 | if (!pde) |
73 | return 1; | 74 | return 1; |
74 | pde->data = vdso_data; | ||
75 | pde->size = PAGE_SIZE; | 75 | pde->size = PAGE_SIZE; |
76 | pde->proc_fops = &page_map_fops; | ||
77 | 76 | ||
78 | return 0; | 77 | return 0; |
79 | } | 78 | } |
diff --git a/arch/powerpc/kernel/rtas-proc.c b/arch/powerpc/kernel/rtas-proc.c index f2e3bc714d76..f9c6abc84a94 100644 --- a/arch/powerpc/kernel/rtas-proc.c +++ b/arch/powerpc/kernel/rtas-proc.c | |||
@@ -255,8 +255,6 @@ static void check_location(struct seq_file *m, const char *c); | |||
255 | 255 | ||
256 | static int __init proc_rtas_init(void) | 256 | static int __init proc_rtas_init(void) |
257 | { | 257 | { |
258 | struct proc_dir_entry *entry; | ||
259 | |||
260 | if (!machine_is(pseries)) | 258 | if (!machine_is(pseries)) |
261 | return -ENODEV; | 259 | return -ENODEV; |
262 | 260 | ||
@@ -264,35 +262,20 @@ static int __init proc_rtas_init(void) | |||
264 | if (rtas_node == NULL) | 262 | if (rtas_node == NULL) |
265 | return -ENODEV; | 263 | return -ENODEV; |
266 | 264 | ||
267 | entry = create_proc_entry("ppc64/rtas/progress", S_IRUGO|S_IWUSR, NULL); | 265 | proc_create("ppc64/rtas/progress", S_IRUGO|S_IWUSR, NULL, |
268 | if (entry) | 266 | &ppc_rtas_progress_operations); |
269 | entry->proc_fops = &ppc_rtas_progress_operations; | 267 | proc_create("ppc64/rtas/clock", S_IRUGO|S_IWUSR, NULL, |
270 | 268 | &ppc_rtas_clock_operations); | |
271 | entry = create_proc_entry("ppc64/rtas/clock", S_IRUGO|S_IWUSR, NULL); | 269 | proc_create("ppc64/rtas/poweron", S_IWUSR|S_IRUGO, NULL, |
272 | if (entry) | 270 | &ppc_rtas_poweron_operations); |
273 | entry->proc_fops = &ppc_rtas_clock_operations; | 271 | proc_create("ppc64/rtas/sensors", S_IRUGO, NULL, |
274 | 272 | &ppc_rtas_sensors_operations); | |
275 | entry = create_proc_entry("ppc64/rtas/poweron", S_IWUSR|S_IRUGO, NULL); | 273 | proc_create("ppc64/rtas/frequency", S_IWUSR|S_IRUGO, NULL, |
276 | if (entry) | 274 | &ppc_rtas_tone_freq_operations); |
277 | entry->proc_fops = &ppc_rtas_poweron_operations; | 275 | proc_create("ppc64/rtas/volume", S_IWUSR|S_IRUGO, NULL, |
278 | 276 | &ppc_rtas_tone_volume_operations); | |
279 | entry = create_proc_entry("ppc64/rtas/sensors", S_IRUGO, NULL); | 277 | proc_create("ppc64/rtas/rmo_buffer", S_IRUSR, NULL, |
280 | if (entry) | 278 | &ppc_rtas_rmo_buf_ops); |
281 | entry->proc_fops = &ppc_rtas_sensors_operations; | ||
282 | |||
283 | entry = create_proc_entry("ppc64/rtas/frequency", S_IWUSR|S_IRUGO, | ||
284 | NULL); | ||
285 | if (entry) | ||
286 | entry->proc_fops = &ppc_rtas_tone_freq_operations; | ||
287 | |||
288 | entry = create_proc_entry("ppc64/rtas/volume", S_IWUSR|S_IRUGO, NULL); | ||
289 | if (entry) | ||
290 | entry->proc_fops = &ppc_rtas_tone_volume_operations; | ||
291 | |||
292 | entry = create_proc_entry("ppc64/rtas/rmo_buffer", S_IRUSR, NULL); | ||
293 | if (entry) | ||
294 | entry->proc_fops = &ppc_rtas_rmo_buf_ops; | ||
295 | |||
296 | return 0; | 279 | return 0; |
297 | } | 280 | } |
298 | 281 | ||
diff --git a/arch/powerpc/kernel/rtas_flash.c b/arch/powerpc/kernel/rtas_flash.c index 627f126d1848..0a5e22b22729 100644 --- a/arch/powerpc/kernel/rtas_flash.c +++ b/arch/powerpc/kernel/rtas_flash.c | |||
@@ -704,18 +704,11 @@ static int initialize_flash_pde_data(const char *rtas_call_name, | |||
704 | static struct proc_dir_entry *create_flash_pde(const char *filename, | 704 | static struct proc_dir_entry *create_flash_pde(const char *filename, |
705 | const struct file_operations *fops) | 705 | const struct file_operations *fops) |
706 | { | 706 | { |
707 | struct proc_dir_entry *ent = NULL; | 707 | return proc_create(filename, S_IRUSR | S_IWUSR, NULL, fops); |
708 | |||
709 | ent = create_proc_entry(filename, S_IRUSR | S_IWUSR, NULL); | ||
710 | if (ent != NULL) { | ||
711 | ent->proc_fops = fops; | ||
712 | ent->owner = THIS_MODULE; | ||
713 | } | ||
714 | |||
715 | return ent; | ||
716 | } | 708 | } |
717 | 709 | ||
718 | static const struct file_operations rtas_flash_operations = { | 710 | static const struct file_operations rtas_flash_operations = { |
711 | .owner = THIS_MODULE, | ||
719 | .read = rtas_flash_read, | 712 | .read = rtas_flash_read, |
720 | .write = rtas_flash_write, | 713 | .write = rtas_flash_write, |
721 | .open = rtas_excl_open, | 714 | .open = rtas_excl_open, |
@@ -723,6 +716,7 @@ static const struct file_operations rtas_flash_operations = { | |||
723 | }; | 716 | }; |
724 | 717 | ||
725 | static const struct file_operations manage_flash_operations = { | 718 | static const struct file_operations manage_flash_operations = { |
719 | .owner = THIS_MODULE, | ||
726 | .read = manage_flash_read, | 720 | .read = manage_flash_read, |
727 | .write = manage_flash_write, | 721 | .write = manage_flash_write, |
728 | .open = rtas_excl_open, | 722 | .open = rtas_excl_open, |
@@ -730,6 +724,7 @@ static const struct file_operations manage_flash_operations = { | |||
730 | }; | 724 | }; |
731 | 725 | ||
732 | static const struct file_operations validate_flash_operations = { | 726 | static const struct file_operations validate_flash_operations = { |
727 | .owner = THIS_MODULE, | ||
733 | .read = validate_flash_read, | 728 | .read = validate_flash_read, |
734 | .write = validate_flash_write, | 729 | .write = validate_flash_write, |
735 | .open = rtas_excl_open, | 730 | .open = rtas_excl_open, |
diff --git a/arch/powerpc/kernel/syscalls.c b/arch/powerpc/kernel/syscalls.c index e722a4eeb5d0..4fe69ca24481 100644 --- a/arch/powerpc/kernel/syscalls.c +++ b/arch/powerpc/kernel/syscalls.c | |||
@@ -136,23 +136,6 @@ int sys_ipc(uint call, int first, unsigned long second, long third, | |||
136 | return ret; | 136 | return ret; |
137 | } | 137 | } |
138 | 138 | ||
139 | /* | ||
140 | * sys_pipe() is the normal C calling standard for creating | ||
141 | * a pipe. It's not the way unix traditionally does this, though. | ||
142 | */ | ||
143 | int sys_pipe(int __user *fildes) | ||
144 | { | ||
145 | int fd[2]; | ||
146 | int error; | ||
147 | |||
148 | error = do_pipe(fd); | ||
149 | if (!error) { | ||
150 | if (copy_to_user(fildes, fd, 2*sizeof(int))) | ||
151 | error = -EFAULT; | ||
152 | } | ||
153 | return error; | ||
154 | } | ||
155 | |||
156 | static inline unsigned long do_mmap2(unsigned long addr, size_t len, | 139 | static inline unsigned long do_mmap2(unsigned long addr, size_t len, |
157 | unsigned long prot, unsigned long flags, | 140 | unsigned long prot, unsigned long flags, |
158 | unsigned long fd, unsigned long off, int shift) | 141 | unsigned long fd, unsigned long off, int shift) |
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c index 3b26fbd6bec9..73401e83739a 100644 --- a/arch/powerpc/kernel/time.c +++ b/arch/powerpc/kernel/time.c | |||
@@ -149,7 +149,7 @@ EXPORT_SYMBOL(tb_ticks_per_sec); /* for cputime_t conversions */ | |||
149 | u64 tb_to_xs; | 149 | u64 tb_to_xs; |
150 | unsigned tb_to_us; | 150 | unsigned tb_to_us; |
151 | 151 | ||
152 | #define TICKLEN_SCALE TICK_LENGTH_SHIFT | 152 | #define TICKLEN_SCALE NTP_SCALE_SHIFT |
153 | u64 last_tick_len; /* units are ns / 2^TICKLEN_SCALE */ | 153 | u64 last_tick_len; /* units are ns / 2^TICKLEN_SCALE */ |
154 | u64 ticklen_to_xs; /* 0.64 fraction */ | 154 | u64 ticklen_to_xs; /* 0.64 fraction */ |
155 | 155 | ||
@@ -1007,8 +1007,6 @@ void __init time_init(void) | |||
1007 | vdso_data->stamp_xsec = (u64) xtime.tv_sec * XSEC_PER_SEC; | 1007 | vdso_data->stamp_xsec = (u64) xtime.tv_sec * XSEC_PER_SEC; |
1008 | vdso_data->tb_to_xs = tb_to_xs; | 1008 | vdso_data->tb_to_xs = tb_to_xs; |
1009 | 1009 | ||
1010 | time_freq = 0; | ||
1011 | |||
1012 | write_sequnlock_irqrestore(&xtime_lock, flags); | 1010 | write_sequnlock_irqrestore(&xtime_lock, flags); |
1013 | 1011 | ||
1014 | /* Register the clocksource, if we're not running on iSeries */ | 1012 | /* Register the clocksource, if we're not running on iSeries */ |