diff options
Diffstat (limited to 'arch/sparc64')
-rw-r--r-- | arch/sparc64/Kconfig | 1 | ||||
-rw-r--r-- | arch/sparc64/kernel/chmc.c | 2 | ||||
-rw-r--r-- | arch/sparc64/kernel/iommu.c | 7 | ||||
-rw-r--r-- | arch/sparc64/kernel/iommu_common.h | 14 | ||||
-rw-r--r-- | arch/sparc64/kernel/pci_sun4v.c | 7 | ||||
-rw-r--r-- | arch/sparc64/kernel/smp.c | 4 | ||||
-rw-r--r-- | arch/sparc64/kernel/sys_sparc32.c | 97 | ||||
-rw-r--r-- | arch/sparc64/kernel/systbls.S | 4 | ||||
-rw-r--r-- | arch/sparc64/kernel/us3_cpufreq.c | 1 |
9 files changed, 18 insertions, 119 deletions
diff --git a/arch/sparc64/Kconfig b/arch/sparc64/Kconfig index 5446e2a499b1..035b15af90d8 100644 --- a/arch/sparc64/Kconfig +++ b/arch/sparc64/Kconfig | |||
@@ -96,6 +96,7 @@ config GENERIC_HARDIRQS_NO__DO_IRQ | |||
96 | def_bool y | 96 | def_bool y |
97 | 97 | ||
98 | source "init/Kconfig" | 98 | source "init/Kconfig" |
99 | source "kernel/Kconfig.freezer" | ||
99 | 100 | ||
100 | menu "Processor type and features" | 101 | menu "Processor type and features" |
101 | 102 | ||
diff --git a/arch/sparc64/kernel/chmc.c b/arch/sparc64/kernel/chmc.c index 967b04886822..3b9f4d6e14a9 100644 --- a/arch/sparc64/kernel/chmc.c +++ b/arch/sparc64/kernel/chmc.c | |||
@@ -831,7 +831,7 @@ static int __init us3mc_init(void) | |||
831 | if (!us3mc_platform()) | 831 | if (!us3mc_platform()) |
832 | return -ENODEV; | 832 | return -ENODEV; |
833 | 833 | ||
834 | __asm__ ("rdpr %%ver, %0" : "=r" (ver)); | 834 | __asm__ __volatile__("rdpr %%ver, %0" : "=r" (ver)); |
835 | if ((ver >> 32UL) == __JALAPENO_ID || | 835 | if ((ver >> 32UL) == __JALAPENO_ID || |
836 | (ver >> 32UL) == __SERRANO_ID) { | 836 | (ver >> 32UL) == __SERRANO_ID) { |
837 | mc_type = MC_TYPE_JBUS; | 837 | mc_type = MC_TYPE_JBUS; |
diff --git a/arch/sparc64/kernel/iommu.c b/arch/sparc64/kernel/iommu.c index 2a37a6ca2a16..1cc1995531e2 100644 --- a/arch/sparc64/kernel/iommu.c +++ b/arch/sparc64/kernel/iommu.c | |||
@@ -575,7 +575,7 @@ static int dma_4u_map_sg(struct device *dev, struct scatterlist *sglist, | |||
575 | } | 575 | } |
576 | /* Allocate iommu entries for that segment */ | 576 | /* Allocate iommu entries for that segment */ |
577 | paddr = (unsigned long) SG_ENT_PHYS_ADDRESS(s); | 577 | paddr = (unsigned long) SG_ENT_PHYS_ADDRESS(s); |
578 | npages = iommu_num_pages(paddr, slen); | 578 | npages = iommu_num_pages(paddr, slen, IO_PAGE_SIZE); |
579 | entry = iommu_range_alloc(dev, iommu, npages, &handle); | 579 | entry = iommu_range_alloc(dev, iommu, npages, &handle); |
580 | 580 | ||
581 | /* Handle failure */ | 581 | /* Handle failure */ |
@@ -647,7 +647,8 @@ iommu_map_failed: | |||
647 | iopte_t *base; | 647 | iopte_t *base; |
648 | 648 | ||
649 | vaddr = s->dma_address & IO_PAGE_MASK; | 649 | vaddr = s->dma_address & IO_PAGE_MASK; |
650 | npages = iommu_num_pages(s->dma_address, s->dma_length); | 650 | npages = iommu_num_pages(s->dma_address, s->dma_length, |
651 | IO_PAGE_SIZE); | ||
651 | iommu_range_free(iommu, vaddr, npages); | 652 | iommu_range_free(iommu, vaddr, npages); |
652 | 653 | ||
653 | entry = (vaddr - iommu->page_table_map_base) | 654 | entry = (vaddr - iommu->page_table_map_base) |
@@ -715,7 +716,7 @@ static void dma_4u_unmap_sg(struct device *dev, struct scatterlist *sglist, | |||
715 | 716 | ||
716 | if (!len) | 717 | if (!len) |
717 | break; | 718 | break; |
718 | npages = iommu_num_pages(dma_handle, len); | 719 | npages = iommu_num_pages(dma_handle, len, IO_PAGE_SIZE); |
719 | iommu_range_free(iommu, dma_handle, npages); | 720 | iommu_range_free(iommu, dma_handle, npages); |
720 | 721 | ||
721 | entry = ((dma_handle - iommu->page_table_map_base) | 722 | entry = ((dma_handle - iommu->page_table_map_base) |
diff --git a/arch/sparc64/kernel/iommu_common.h b/arch/sparc64/kernel/iommu_common.h index 53b19c8231a9..591f5879039c 100644 --- a/arch/sparc64/kernel/iommu_common.h +++ b/arch/sparc64/kernel/iommu_common.h | |||
@@ -35,17 +35,6 @@ | |||
35 | 35 | ||
36 | #define SG_ENT_PHYS_ADDRESS(SG) (__pa(sg_virt((SG)))) | 36 | #define SG_ENT_PHYS_ADDRESS(SG) (__pa(sg_virt((SG)))) |
37 | 37 | ||
38 | static inline unsigned long iommu_num_pages(unsigned long vaddr, | ||
39 | unsigned long slen) | ||
40 | { | ||
41 | unsigned long npages; | ||
42 | |||
43 | npages = IO_PAGE_ALIGN(vaddr + slen) - (vaddr & IO_PAGE_MASK); | ||
44 | npages >>= IO_PAGE_SHIFT; | ||
45 | |||
46 | return npages; | ||
47 | } | ||
48 | |||
49 | static inline int is_span_boundary(unsigned long entry, | 38 | static inline int is_span_boundary(unsigned long entry, |
50 | unsigned long shift, | 39 | unsigned long shift, |
51 | unsigned long boundary_size, | 40 | unsigned long boundary_size, |
@@ -53,7 +42,8 @@ static inline int is_span_boundary(unsigned long entry, | |||
53 | struct scatterlist *sg) | 42 | struct scatterlist *sg) |
54 | { | 43 | { |
55 | unsigned long paddr = SG_ENT_PHYS_ADDRESS(outs); | 44 | unsigned long paddr = SG_ENT_PHYS_ADDRESS(outs); |
56 | int nr = iommu_num_pages(paddr, outs->dma_length + sg->length); | 45 | int nr = iommu_num_pages(paddr, outs->dma_length + sg->length, |
46 | IO_PAGE_SIZE); | ||
57 | 47 | ||
58 | return iommu_is_span_boundary(entry, nr, shift, boundary_size); | 48 | return iommu_is_span_boundary(entry, nr, shift, boundary_size); |
59 | } | 49 | } |
diff --git a/arch/sparc64/kernel/pci_sun4v.c b/arch/sparc64/kernel/pci_sun4v.c index e86c73ec167b..34a1fded3941 100644 --- a/arch/sparc64/kernel/pci_sun4v.c +++ b/arch/sparc64/kernel/pci_sun4v.c | |||
@@ -384,7 +384,7 @@ static int dma_4v_map_sg(struct device *dev, struct scatterlist *sglist, | |||
384 | } | 384 | } |
385 | /* Allocate iommu entries for that segment */ | 385 | /* Allocate iommu entries for that segment */ |
386 | paddr = (unsigned long) SG_ENT_PHYS_ADDRESS(s); | 386 | paddr = (unsigned long) SG_ENT_PHYS_ADDRESS(s); |
387 | npages = iommu_num_pages(paddr, slen); | 387 | npages = iommu_num_pages(paddr, slen, IO_PAGE_SIZE); |
388 | entry = iommu_range_alloc(dev, iommu, npages, &handle); | 388 | entry = iommu_range_alloc(dev, iommu, npages, &handle); |
389 | 389 | ||
390 | /* Handle failure */ | 390 | /* Handle failure */ |
@@ -461,7 +461,8 @@ iommu_map_failed: | |||
461 | unsigned long vaddr, npages; | 461 | unsigned long vaddr, npages; |
462 | 462 | ||
463 | vaddr = s->dma_address & IO_PAGE_MASK; | 463 | vaddr = s->dma_address & IO_PAGE_MASK; |
464 | npages = iommu_num_pages(s->dma_address, s->dma_length); | 464 | npages = iommu_num_pages(s->dma_address, s->dma_length, |
465 | IO_PAGE_SIZE); | ||
465 | iommu_range_free(iommu, vaddr, npages); | 466 | iommu_range_free(iommu, vaddr, npages); |
466 | /* XXX demap? XXX */ | 467 | /* XXX demap? XXX */ |
467 | s->dma_address = DMA_ERROR_CODE; | 468 | s->dma_address = DMA_ERROR_CODE; |
@@ -500,7 +501,7 @@ static void dma_4v_unmap_sg(struct device *dev, struct scatterlist *sglist, | |||
500 | 501 | ||
501 | if (!len) | 502 | if (!len) |
502 | break; | 503 | break; |
503 | npages = iommu_num_pages(dma_handle, len); | 504 | npages = iommu_num_pages(dma_handle, len, IO_PAGE_SIZE); |
504 | iommu_range_free(iommu, dma_handle, npages); | 505 | iommu_range_free(iommu, dma_handle, npages); |
505 | 506 | ||
506 | entry = ((dma_handle - iommu->page_table_map_base) >> IO_PAGE_SHIFT); | 507 | entry = ((dma_handle - iommu->page_table_map_base) >> IO_PAGE_SHIFT); |
diff --git a/arch/sparc64/kernel/smp.c b/arch/sparc64/kernel/smp.c index 2be166c544ca..e5627118e613 100644 --- a/arch/sparc64/kernel/smp.c +++ b/arch/sparc64/kernel/smp.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/jiffies.h> | 21 | #include <linux/jiffies.h> |
22 | #include <linux/profile.h> | 22 | #include <linux/profile.h> |
23 | #include <linux/lmb.h> | 23 | #include <linux/lmb.h> |
24 | #include <linux/cpu.h> | ||
24 | 25 | ||
25 | #include <asm/head.h> | 26 | #include <asm/head.h> |
26 | #include <asm/ptrace.h> | 27 | #include <asm/ptrace.h> |
@@ -115,6 +116,9 @@ void __cpuinit smp_callin(void) | |||
115 | atomic_inc(&init_mm.mm_count); | 116 | atomic_inc(&init_mm.mm_count); |
116 | current->active_mm = &init_mm; | 117 | current->active_mm = &init_mm; |
117 | 118 | ||
119 | /* inform the notifiers about the new cpu */ | ||
120 | notify_cpu_starting(cpuid); | ||
121 | |||
118 | while (!cpu_isset(cpuid, smp_commenced_mask)) | 122 | while (!cpu_isset(cpuid, smp_commenced_mask)) |
119 | rmb(); | 123 | rmb(); |
120 | 124 | ||
diff --git a/arch/sparc64/kernel/sys_sparc32.c b/arch/sparc64/kernel/sys_sparc32.c index 3320c9d0075f..e800503879e4 100644 --- a/arch/sparc64/kernel/sys_sparc32.c +++ b/arch/sparc64/kernel/sys_sparc32.c | |||
@@ -58,15 +58,6 @@ | |||
58 | #include <asm/mmu_context.h> | 58 | #include <asm/mmu_context.h> |
59 | #include <asm/compat_signal.h> | 59 | #include <asm/compat_signal.h> |
60 | 60 | ||
61 | /* 32-bit timeval and related flotsam. */ | ||
62 | |||
63 | static inline long put_tv32(struct compat_timeval __user *o, struct timeval *i) | ||
64 | { | ||
65 | return (!access_ok(VERIFY_WRITE, o, sizeof(*o)) || | ||
66 | (__put_user(i->tv_sec, &o->tv_sec) | | ||
67 | __put_user(i->tv_usec, &o->tv_usec))); | ||
68 | } | ||
69 | |||
70 | #ifdef CONFIG_SYSVIPC | 61 | #ifdef CONFIG_SYSVIPC |
71 | asmlinkage long compat_sys_ipc(u32 call, u32 first, u32 second, u32 third, compat_uptr_t ptr, u32 fifth) | 62 | asmlinkage long compat_sys_ipc(u32 call, u32 first, u32 second, u32 third, compat_uptr_t ptr, u32 fifth) |
72 | { | 63 | { |
@@ -148,41 +139,6 @@ asmlinkage long sys32_ftruncate64(unsigned int fd, unsigned long high, unsigned | |||
148 | return sys_ftruncate(fd, (high << 32) | low); | 139 | return sys_ftruncate(fd, (high << 32) | low); |
149 | } | 140 | } |
150 | 141 | ||
151 | int cp_compat_stat(struct kstat *stat, struct compat_stat __user *statbuf) | ||
152 | { | ||
153 | compat_ino_t ino; | ||
154 | int err; | ||
155 | |||
156 | if (stat->size > MAX_NON_LFS || !old_valid_dev(stat->dev) || | ||
157 | !old_valid_dev(stat->rdev)) | ||
158 | return -EOVERFLOW; | ||
159 | |||
160 | ino = stat->ino; | ||
161 | if (sizeof(ino) < sizeof(stat->ino) && ino != stat->ino) | ||
162 | return -EOVERFLOW; | ||
163 | |||
164 | err = put_user(old_encode_dev(stat->dev), &statbuf->st_dev); | ||
165 | err |= put_user(stat->ino, &statbuf->st_ino); | ||
166 | err |= put_user(stat->mode, &statbuf->st_mode); | ||
167 | err |= put_user(stat->nlink, &statbuf->st_nlink); | ||
168 | err |= put_user(high2lowuid(stat->uid), &statbuf->st_uid); | ||
169 | err |= put_user(high2lowgid(stat->gid), &statbuf->st_gid); | ||
170 | err |= put_user(old_encode_dev(stat->rdev), &statbuf->st_rdev); | ||
171 | err |= put_user(stat->size, &statbuf->st_size); | ||
172 | err |= put_user(stat->atime.tv_sec, &statbuf->st_atime); | ||
173 | err |= put_user(stat->atime.tv_nsec, &statbuf->st_atime_nsec); | ||
174 | err |= put_user(stat->mtime.tv_sec, &statbuf->st_mtime); | ||
175 | err |= put_user(stat->mtime.tv_nsec, &statbuf->st_mtime_nsec); | ||
176 | err |= put_user(stat->ctime.tv_sec, &statbuf->st_ctime); | ||
177 | err |= put_user(stat->ctime.tv_nsec, &statbuf->st_ctime_nsec); | ||
178 | err |= put_user(stat->blksize, &statbuf->st_blksize); | ||
179 | err |= put_user(stat->blocks, &statbuf->st_blocks); | ||
180 | err |= put_user(0, &statbuf->__unused4[0]); | ||
181 | err |= put_user(0, &statbuf->__unused4[1]); | ||
182 | |||
183 | return err; | ||
184 | } | ||
185 | |||
186 | static int cp_compat_stat64(struct kstat *stat, | 142 | static int cp_compat_stat64(struct kstat *stat, |
187 | struct compat_stat64 __user *statbuf) | 143 | struct compat_stat64 __user *statbuf) |
188 | { | 144 | { |
@@ -522,59 +478,6 @@ asmlinkage long sys32_delete_module(const char __user *name_user) | |||
522 | 478 | ||
523 | #endif /* CONFIG_MODULES */ | 479 | #endif /* CONFIG_MODULES */ |
524 | 480 | ||
525 | /* Translations due to time_t size differences. Which affects all | ||
526 | sorts of things, like timeval and itimerval. */ | ||
527 | |||
528 | extern struct timezone sys_tz; | ||
529 | |||
530 | asmlinkage long sys32_gettimeofday(struct compat_timeval __user *tv, | ||
531 | struct timezone __user *tz) | ||
532 | { | ||
533 | if (tv) { | ||
534 | struct timeval ktv; | ||
535 | do_gettimeofday(&ktv); | ||
536 | if (put_tv32(tv, &ktv)) | ||
537 | return -EFAULT; | ||
538 | } | ||
539 | if (tz) { | ||
540 | if (copy_to_user(tz, &sys_tz, sizeof(sys_tz))) | ||
541 | return -EFAULT; | ||
542 | } | ||
543 | return 0; | ||
544 | } | ||
545 | |||
546 | static inline long get_ts32(struct timespec *o, struct compat_timeval __user *i) | ||
547 | { | ||
548 | long usec; | ||
549 | |||
550 | if (!access_ok(VERIFY_READ, i, sizeof(*i))) | ||
551 | return -EFAULT; | ||
552 | if (__get_user(o->tv_sec, &i->tv_sec)) | ||
553 | return -EFAULT; | ||
554 | if (__get_user(usec, &i->tv_usec)) | ||
555 | return -EFAULT; | ||
556 | o->tv_nsec = usec * 1000; | ||
557 | return 0; | ||
558 | } | ||
559 | |||
560 | asmlinkage long sys32_settimeofday(struct compat_timeval __user *tv, | ||
561 | struct timezone __user *tz) | ||
562 | { | ||
563 | struct timespec kts; | ||
564 | struct timezone ktz; | ||
565 | |||
566 | if (tv) { | ||
567 | if (get_ts32(&kts, tv)) | ||
568 | return -EFAULT; | ||
569 | } | ||
570 | if (tz) { | ||
571 | if (copy_from_user(&ktz, tz, sizeof(ktz))) | ||
572 | return -EFAULT; | ||
573 | } | ||
574 | |||
575 | return do_sys_settimeofday(tv ? &kts : NULL, tz ? &ktz : NULL); | ||
576 | } | ||
577 | |||
578 | asmlinkage compat_ssize_t sys32_pread64(unsigned int fd, | 481 | asmlinkage compat_ssize_t sys32_pread64(unsigned int fd, |
579 | char __user *ubuf, | 482 | char __user *ubuf, |
580 | compat_size_t count, | 483 | compat_size_t count, |
diff --git a/arch/sparc64/kernel/systbls.S b/arch/sparc64/kernel/systbls.S index 5daee4b04dd5..b2fa4c163638 100644 --- a/arch/sparc64/kernel/systbls.S +++ b/arch/sparc64/kernel/systbls.S | |||
@@ -41,8 +41,8 @@ sys_call_table32: | |||
41 | /*100*/ .word sys32_getpriority, sys32_rt_sigreturn, sys32_rt_sigaction, sys32_rt_sigprocmask, sys32_rt_sigpending | 41 | /*100*/ .word sys32_getpriority, sys32_rt_sigreturn, sys32_rt_sigaction, sys32_rt_sigprocmask, sys32_rt_sigpending |
42 | .word compat_sys_rt_sigtimedwait, sys32_rt_sigqueueinfo, compat_sys_rt_sigsuspend, sys_setresuid, sys_getresuid | 42 | .word compat_sys_rt_sigtimedwait, sys32_rt_sigqueueinfo, compat_sys_rt_sigsuspend, sys_setresuid, sys_getresuid |
43 | /*110*/ .word sys_setresgid, sys_getresgid, sys_setregid, sys_nis_syscall, sys_nis_syscall | 43 | /*110*/ .word sys_setresgid, sys_getresgid, sys_setregid, sys_nis_syscall, sys_nis_syscall |
44 | .word sys32_getgroups, sys32_gettimeofday, sys32_getrusage, sys_nis_syscall, sys_getcwd | 44 | .word sys32_getgroups, compat_sys_gettimeofday, sys32_getrusage, sys_nis_syscall, sys_getcwd |
45 | /*120*/ .word compat_sys_readv, compat_sys_writev, sys32_settimeofday, sys_fchown16, sys_fchmod | 45 | /*120*/ .word compat_sys_readv, compat_sys_writev, compat_sys_settimeofday, sys_fchown16, sys_fchmod |
46 | .word sys_nis_syscall, sys_setreuid16, sys_setregid16, sys_rename, sys_truncate | 46 | .word sys_nis_syscall, sys_setreuid16, sys_setregid16, sys_rename, sys_truncate |
47 | /*130*/ .word sys_ftruncate, sys_flock, compat_sys_lstat64, sys_nis_syscall, sys_nis_syscall | 47 | /*130*/ .word sys_ftruncate, sys_flock, compat_sys_lstat64, sys_nis_syscall, sys_nis_syscall |
48 | .word sys_nis_syscall, sys32_mkdir, sys_rmdir, compat_sys_utimes, compat_sys_stat64 | 48 | .word sys_nis_syscall, sys32_mkdir, sys_rmdir, compat_sys_utimes, compat_sys_stat64 |
diff --git a/arch/sparc64/kernel/us3_cpufreq.c b/arch/sparc64/kernel/us3_cpufreq.c index 47e3acafb5be..365b6464e2ce 100644 --- a/arch/sparc64/kernel/us3_cpufreq.c +++ b/arch/sparc64/kernel/us3_cpufreq.c | |||
@@ -183,7 +183,6 @@ static int __init us3_freq_cpu_init(struct cpufreq_policy *policy) | |||
183 | table[3].index = 0; | 183 | table[3].index = 0; |
184 | table[3].frequency = CPUFREQ_TABLE_END; | 184 | table[3].frequency = CPUFREQ_TABLE_END; |
185 | 185 | ||
186 | policy->governor = CPUFREQ_DEFAULT_GOVERNOR; | ||
187 | policy->cpuinfo.transition_latency = 0; | 186 | policy->cpuinfo.transition_latency = 0; |
188 | policy->cur = clock_tick; | 187 | policy->cur = clock_tick; |
189 | 188 | ||