diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2006-02-09 00:58:59 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2006-02-09 00:58:59 -0500 |
commit | cac0e8e8bb2e7a086643bdd00c41d900a79bb4fa (patch) | |
tree | 73cd85e5529a01fa2338ab6d58b99c36dd666cbe /arch/powerpc | |
parent | ddef9bb367b19383df627e388cb4c01c86ddba6c (diff) | |
parent | 0bdd340c092b0936f78a54bdbd3927463ed4fca3 (diff) |
Merge branch 'master'
Diffstat (limited to 'arch/powerpc')
27 files changed, 139 insertions, 128 deletions
diff --git a/arch/powerpc/kernel/fpu.S b/arch/powerpc/kernel/fpu.S index e4362dfa37fb..340730fb8c91 100644 --- a/arch/powerpc/kernel/fpu.S +++ b/arch/powerpc/kernel/fpu.S | |||
@@ -66,7 +66,7 @@ _GLOBAL(load_up_fpu) | |||
66 | #else | 66 | #else |
67 | ld r4,PACACURRENT(r13) | 67 | ld r4,PACACURRENT(r13) |
68 | addi r5,r4,THREAD /* Get THREAD */ | 68 | addi r5,r4,THREAD /* Get THREAD */ |
69 | ld r4,THREAD_FPEXC_MODE(r5) | 69 | lwz r4,THREAD_FPEXC_MODE(r5) |
70 | ori r12,r12,MSR_FP | 70 | ori r12,r12,MSR_FP |
71 | or r12,r12,r4 | 71 | or r12,r12,r4 |
72 | std r12,_MSR(r1) | 72 | std r12,_MSR(r1) |
diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S index 308268466342..415659629394 100644 --- a/arch/powerpc/kernel/head_64.S +++ b/arch/powerpc/kernel/head_64.S | |||
@@ -749,11 +749,12 @@ iSeries_secondary_smp_loop: | |||
749 | 749 | ||
750 | .globl decrementer_iSeries_masked | 750 | .globl decrementer_iSeries_masked |
751 | decrementer_iSeries_masked: | 751 | decrementer_iSeries_masked: |
752 | /* We may not have a valid TOC pointer in here. */ | ||
752 | li r11,1 | 753 | li r11,1 |
753 | ld r12,PACALPPACAPTR(r13) | 754 | ld r12,PACALPPACAPTR(r13) |
754 | stb r11,LPPACADECRINT(r12) | 755 | stb r11,LPPACADECRINT(r12) |
755 | LOAD_REG_ADDRBASE(r12,tb_ticks_per_jiffy) | 756 | LOAD_REG_IMMEDIATE(r12, tb_ticks_per_jiffy) |
756 | lwz r12,ADDROFF(tb_ticks_per_jiffy)(r12) | 757 | lwz r12,0(r12) |
757 | mtspr SPRN_DEC,r12 | 758 | mtspr SPRN_DEC,r12 |
758 | /* fall through */ | 759 | /* fall through */ |
759 | 760 | ||
diff --git a/arch/powerpc/kernel/iommu.c b/arch/powerpc/kernel/iommu.c index 4d9b4388918b..946f3219fd29 100644 --- a/arch/powerpc/kernel/iommu.c +++ b/arch/powerpc/kernel/iommu.c | |||
@@ -334,9 +334,6 @@ int iommu_map_sg(struct device *dev, struct iommu_table *tbl, | |||
334 | 334 | ||
335 | spin_unlock_irqrestore(&(tbl->it_lock), flags); | 335 | spin_unlock_irqrestore(&(tbl->it_lock), flags); |
336 | 336 | ||
337 | /* Make sure updates are seen by hardware */ | ||
338 | mb(); | ||
339 | |||
340 | DBG("mapped %d elements:\n", outcount); | 337 | DBG("mapped %d elements:\n", outcount); |
341 | 338 | ||
342 | /* For the sake of iommu_unmap_sg, we clear out the length in the | 339 | /* For the sake of iommu_unmap_sg, we clear out the length in the |
@@ -347,6 +344,10 @@ int iommu_map_sg(struct device *dev, struct iommu_table *tbl, | |||
347 | outs->dma_address = DMA_ERROR_CODE; | 344 | outs->dma_address = DMA_ERROR_CODE; |
348 | outs->dma_length = 0; | 345 | outs->dma_length = 0; |
349 | } | 346 | } |
347 | |||
348 | /* Make sure updates are seen by hardware */ | ||
349 | mb(); | ||
350 | |||
350 | return outcount; | 351 | return outcount; |
351 | 352 | ||
352 | failure: | 353 | failure: |
@@ -358,6 +359,8 @@ int iommu_map_sg(struct device *dev, struct iommu_table *tbl, | |||
358 | npages = (PAGE_ALIGN(s->dma_address + s->dma_length) - vaddr) | 359 | npages = (PAGE_ALIGN(s->dma_address + s->dma_length) - vaddr) |
359 | >> PAGE_SHIFT; | 360 | >> PAGE_SHIFT; |
360 | __iommu_free(tbl, vaddr, npages); | 361 | __iommu_free(tbl, vaddr, npages); |
362 | s->dma_address = DMA_ERROR_CODE; | ||
363 | s->dma_length = 0; | ||
361 | } | 364 | } |
362 | } | 365 | } |
363 | spin_unlock_irqrestore(&(tbl->it_lock), flags); | 366 | spin_unlock_irqrestore(&(tbl->it_lock), flags); |
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index d50c8df0183e..294832a7e0a6 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c | |||
@@ -491,7 +491,12 @@ void __init finish_device_tree(void) | |||
491 | size = 16; | 491 | size = 16; |
492 | finish_node(allnodes, &size, 1); | 492 | finish_node(allnodes, &size, 1); |
493 | size -= 16; | 493 | size -= 16; |
494 | end = start = (unsigned long) __va(lmb_alloc(size, 128)); | 494 | |
495 | if (0 == size) | ||
496 | end = start = 0; | ||
497 | else | ||
498 | end = start = (unsigned long)__va(lmb_alloc(size, 128)); | ||
499 | |||
495 | finish_node(allnodes, &end, 0); | 500 | finish_node(allnodes, &end, 0); |
496 | BUG_ON(end != start + size); | 501 | BUG_ON(end != start + size); |
497 | 502 | ||
@@ -1398,8 +1403,8 @@ struct device_node *of_find_node_by_name(struct device_node *from, | |||
1398 | 1403 | ||
1399 | read_lock(&devtree_lock); | 1404 | read_lock(&devtree_lock); |
1400 | np = from ? from->allnext : allnodes; | 1405 | np = from ? from->allnext : allnodes; |
1401 | for (; np != 0; np = np->allnext) | 1406 | for (; np != NULL; np = np->allnext) |
1402 | if (np->name != 0 && strcasecmp(np->name, name) == 0 | 1407 | if (np->name != NULL && strcasecmp(np->name, name) == 0 |
1403 | && of_node_get(np)) | 1408 | && of_node_get(np)) |
1404 | break; | 1409 | break; |
1405 | if (from) | 1410 | if (from) |
@@ -1917,3 +1922,30 @@ int prom_update_property(struct device_node *np, | |||
1917 | 1922 | ||
1918 | return 0; | 1923 | return 0; |
1919 | } | 1924 | } |
1925 | |||
1926 | #ifdef CONFIG_KEXEC | ||
1927 | /* We may have allocated the flat device tree inside the crash kernel region | ||
1928 | * in prom_init. If so we need to move it out into regular memory. */ | ||
1929 | void kdump_move_device_tree(void) | ||
1930 | { | ||
1931 | unsigned long start, end; | ||
1932 | struct boot_param_header *new; | ||
1933 | |||
1934 | start = __pa((unsigned long)initial_boot_params); | ||
1935 | end = start + initial_boot_params->totalsize; | ||
1936 | |||
1937 | if (end < crashk_res.start || start > crashk_res.end) | ||
1938 | return; | ||
1939 | |||
1940 | new = (struct boot_param_header*) | ||
1941 | __va(lmb_alloc(initial_boot_params->totalsize, PAGE_SIZE)); | ||
1942 | |||
1943 | memcpy(new, initial_boot_params, initial_boot_params->totalsize); | ||
1944 | |||
1945 | initial_boot_params = new; | ||
1946 | |||
1947 | DBG("Flat device tree blob moved to %p\n", initial_boot_params); | ||
1948 | |||
1949 | /* XXX should we unreserve the old DT? */ | ||
1950 | } | ||
1951 | #endif /* CONFIG_KEXEC */ | ||
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c index 7881ec96ef11..ec7153f4d47c 100644 --- a/arch/powerpc/kernel/prom_init.c +++ b/arch/powerpc/kernel/prom_init.c | |||
@@ -2098,6 +2098,10 @@ unsigned long __init prom_init(unsigned long r3, unsigned long r4, | |||
2098 | */ | 2098 | */ |
2099 | prom_init_stdout(); | 2099 | prom_init_stdout(); |
2100 | 2100 | ||
2101 | /* Bail if this is a kdump kernel. */ | ||
2102 | if (PHYSICAL_START > 0) | ||
2103 | prom_panic("Error: You can't boot a kdump kernel from OF!\n"); | ||
2104 | |||
2101 | /* | 2105 | /* |
2102 | * Check for an initrd | 2106 | * Check for an initrd |
2103 | */ | 2107 | */ |
diff --git a/arch/powerpc/kernel/prom_parse.c b/arch/powerpc/kernel/prom_parse.c index a8099c806150..3934c227549b 100644 --- a/arch/powerpc/kernel/prom_parse.c +++ b/arch/powerpc/kernel/prom_parse.c | |||
@@ -465,8 +465,10 @@ u32 *of_get_pci_address(struct device_node *dev, int bar_no, u64 *size, | |||
465 | if (parent == NULL) | 465 | if (parent == NULL) |
466 | return NULL; | 466 | return NULL; |
467 | bus = of_match_bus(parent); | 467 | bus = of_match_bus(parent); |
468 | if (strcmp(bus->name, "pci")) | 468 | if (strcmp(bus->name, "pci")) { |
469 | of_node_put(parent); | ||
469 | return NULL; | 470 | return NULL; |
471 | } | ||
470 | bus->count_cells(dev, &na, &ns); | 472 | bus->count_cells(dev, &na, &ns); |
471 | of_node_put(parent); | 473 | of_node_put(parent); |
472 | if (!OF_CHECK_COUNTS(na, ns)) | 474 | if (!OF_CHECK_COUNTS(na, ns)) |
diff --git a/arch/powerpc/kernel/rtas.c b/arch/powerpc/kernel/rtas.c index 7fe4a5c944c9..b5b2add7ad1e 100644 --- a/arch/powerpc/kernel/rtas.c +++ b/arch/powerpc/kernel/rtas.c | |||
@@ -22,6 +22,7 @@ | |||
22 | 22 | ||
23 | #include <asm/prom.h> | 23 | #include <asm/prom.h> |
24 | #include <asm/rtas.h> | 24 | #include <asm/rtas.h> |
25 | #include <asm/hvcall.h> | ||
25 | #include <asm/semaphore.h> | 26 | #include <asm/semaphore.h> |
26 | #include <asm/machdep.h> | 27 | #include <asm/machdep.h> |
27 | #include <asm/page.h> | 28 | #include <asm/page.h> |
@@ -565,6 +566,7 @@ static int ibm_suspend_me_token = RTAS_UNKNOWN_SERVICE; | |||
565 | #ifdef CONFIG_PPC_PSERIES | 566 | #ifdef CONFIG_PPC_PSERIES |
566 | static void rtas_percpu_suspend_me(void *info) | 567 | static void rtas_percpu_suspend_me(void *info) |
567 | { | 568 | { |
569 | int i; | ||
568 | long rc; | 570 | long rc; |
569 | long flags; | 571 | long flags; |
570 | struct rtas_suspend_me_data *data = | 572 | struct rtas_suspend_me_data *data = |
@@ -587,18 +589,16 @@ static void rtas_percpu_suspend_me(void *info) | |||
587 | 589 | ||
588 | if (rc == H_Continue) { | 590 | if (rc == H_Continue) { |
589 | data->waiting = 0; | 591 | data->waiting = 0; |
590 | rtas_call(ibm_suspend_me_token, 0, 1, | 592 | data->args->args[data->args->nargs] = |
591 | data->args->args); | 593 | rtas_call(ibm_suspend_me_token, 0, 1, NULL); |
594 | for_each_cpu(i) | ||
595 | plpar_hcall_norets(H_PROD,i); | ||
592 | } else { | 596 | } else { |
593 | data->waiting = -EBUSY; | 597 | data->waiting = -EBUSY; |
594 | printk(KERN_ERR "Error on H_Join hypervisor call\n"); | 598 | printk(KERN_ERR "Error on H_Join hypervisor call\n"); |
595 | } | 599 | } |
596 | 600 | ||
597 | out: | 601 | out: |
598 | /* before we restore interrupts, make sure we don't | ||
599 | * generate a spurious soft lockup errors | ||
600 | */ | ||
601 | touch_softlockup_watchdog(); | ||
602 | local_irq_restore(flags); | 602 | local_irq_restore(flags); |
603 | return; | 603 | return; |
604 | } | 604 | } |
diff --git a/arch/powerpc/kernel/rtas_flash.c b/arch/powerpc/kernel/rtas_flash.c index 50500093c97f..aaf384c3f04a 100644 --- a/arch/powerpc/kernel/rtas_flash.c +++ b/arch/powerpc/kernel/rtas_flash.c | |||
@@ -672,8 +672,7 @@ static void rtas_flash_firmware(int reboot_type) | |||
672 | static void remove_flash_pde(struct proc_dir_entry *dp) | 672 | static void remove_flash_pde(struct proc_dir_entry *dp) |
673 | { | 673 | { |
674 | if (dp) { | 674 | if (dp) { |
675 | if (dp->data != NULL) | 675 | kfree(dp->data); |
676 | kfree(dp->data); | ||
677 | dp->owner = NULL; | 676 | dp->owner = NULL; |
678 | remove_proc_entry(dp->name, dp->parent); | 677 | remove_proc_entry(dp->name, dp->parent); |
679 | } | 678 | } |
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c index e29b275e09e0..a717dff695ef 100644 --- a/arch/powerpc/kernel/setup_64.c +++ b/arch/powerpc/kernel/setup_64.c | |||
@@ -398,6 +398,9 @@ void __init setup_system(void) | |||
398 | { | 398 | { |
399 | DBG(" -> setup_system()\n"); | 399 | DBG(" -> setup_system()\n"); |
400 | 400 | ||
401 | #ifdef CONFIG_KEXEC | ||
402 | kdump_move_device_tree(); | ||
403 | #endif | ||
401 | /* | 404 | /* |
402 | * Unflatten the device-tree passed by prom_init or kexec | 405 | * Unflatten the device-tree passed by prom_init or kexec |
403 | */ | 406 | */ |
diff --git a/arch/powerpc/kernel/signal_32.c b/arch/powerpc/kernel/signal_32.c index c6d0595da6b5..bd837b5dbf06 100644 --- a/arch/powerpc/kernel/signal_32.c +++ b/arch/powerpc/kernel/signal_32.c | |||
@@ -142,11 +142,7 @@ static inline int get_old_sigaction(struct k_sigaction *new_ka, | |||
142 | return 0; | 142 | return 0; |
143 | } | 143 | } |
144 | 144 | ||
145 | static inline compat_uptr_t to_user_ptr(void *kp) | 145 | #define to_user_ptr(p) ptr_to_compat(p) |
146 | { | ||
147 | return (compat_uptr_t)(u64)kp; | ||
148 | } | ||
149 | |||
150 | #define from_user_ptr(p) compat_ptr(p) | 146 | #define from_user_ptr(p) compat_ptr(p) |
151 | 147 | ||
152 | static inline int save_general_regs(struct pt_regs *regs, | 148 | static inline int save_general_regs(struct pt_regs *regs, |
@@ -213,8 +209,8 @@ static inline int get_old_sigaction(struct k_sigaction *new_ka, | |||
213 | return 0; | 209 | return 0; |
214 | } | 210 | } |
215 | 211 | ||
216 | #define to_user_ptr(p) (p) | 212 | #define to_user_ptr(p) ((unsigned long)(p)) |
217 | #define from_user_ptr(p) (p) | 213 | #define from_user_ptr(p) ((void __user *)(p)) |
218 | 214 | ||
219 | static inline int save_general_regs(struct pt_regs *regs, | 215 | static inline int save_general_regs(struct pt_regs *regs, |
220 | struct mcontext __user *frame) | 216 | struct mcontext __user *frame) |
@@ -526,7 +522,7 @@ long compat_sys_rt_sigaction(int sig, const struct sigaction32 __user *act, | |||
526 | 522 | ||
527 | ret = do_sigaction(sig, act ? &new_ka : NULL, oact ? &old_ka : NULL); | 523 | ret = do_sigaction(sig, act ? &new_ka : NULL, oact ? &old_ka : NULL); |
528 | if (!ret && oact) { | 524 | if (!ret && oact) { |
529 | ret = put_user((long)old_ka.sa.sa_handler, &oact->sa_handler); | 525 | ret = put_user(to_user_ptr(old_ka.sa.sa_handler), &oact->sa_handler); |
530 | ret |= put_sigset_t(&oact->sa_mask, &old_ka.sa.sa_mask); | 526 | ret |= put_sigset_t(&oact->sa_mask, &old_ka.sa.sa_mask); |
531 | ret |= __put_user(old_ka.sa.sa_flags, &oact->sa_flags); | 527 | ret |= __put_user(old_ka.sa.sa_flags, &oact->sa_flags); |
532 | } | 528 | } |
@@ -675,8 +671,8 @@ long compat_sys_rt_sigqueueinfo(u32 pid, u32 sig, compat_siginfo_t __user *uinfo | |||
675 | int compat_sys_sigaltstack(u32 __new, u32 __old, int r5, | 671 | int compat_sys_sigaltstack(u32 __new, u32 __old, int r5, |
676 | int r6, int r7, int r8, struct pt_regs *regs) | 672 | int r6, int r7, int r8, struct pt_regs *regs) |
677 | { | 673 | { |
678 | stack_32_t __user * newstack = (stack_32_t __user *)(long) __new; | 674 | stack_32_t __user * newstack = compat_ptr(__new); |
679 | stack_32_t __user * oldstack = (stack_32_t __user *)(long) __old; | 675 | stack_32_t __user * oldstack = compat_ptr(__old); |
680 | stack_t uss, uoss; | 676 | stack_t uss, uoss; |
681 | int ret; | 677 | int ret; |
682 | mm_segment_t old_fs; | 678 | mm_segment_t old_fs; |
@@ -708,7 +704,7 @@ int compat_sys_sigaltstack(u32 __new, u32 __old, int r5, | |||
708 | set_fs(old_fs); | 704 | set_fs(old_fs); |
709 | /* Copy the stack information to the user output buffer */ | 705 | /* Copy the stack information to the user output buffer */ |
710 | if (!ret && oldstack && | 706 | if (!ret && oldstack && |
711 | (put_user((long)uoss.ss_sp, &oldstack->ss_sp) || | 707 | (put_user(ptr_to_compat(uoss.ss_sp), &oldstack->ss_sp) || |
712 | __put_user(uoss.ss_flags, &oldstack->ss_flags) || | 708 | __put_user(uoss.ss_flags, &oldstack->ss_flags) || |
713 | __put_user(uoss.ss_size, &oldstack->ss_size))) | 709 | __put_user(uoss.ss_size, &oldstack->ss_size))) |
714 | return -EFAULT; | 710 | return -EFAULT; |
diff --git a/arch/powerpc/kernel/signal_64.c b/arch/powerpc/kernel/signal_64.c index b3193116e686..497a5d3df359 100644 --- a/arch/powerpc/kernel/signal_64.c +++ b/arch/powerpc/kernel/signal_64.c | |||
@@ -60,8 +60,8 @@ struct rt_sigframe { | |||
60 | struct ucontext uc; | 60 | struct ucontext uc; |
61 | unsigned long _unused[2]; | 61 | unsigned long _unused[2]; |
62 | unsigned int tramp[TRAMP_SIZE]; | 62 | unsigned int tramp[TRAMP_SIZE]; |
63 | struct siginfo *pinfo; | 63 | struct siginfo __user *pinfo; |
64 | void *puc; | 64 | void __user *puc; |
65 | struct siginfo info; | 65 | struct siginfo info; |
66 | /* 64 bit ABI allows for 288 bytes below sp before decrementing it. */ | 66 | /* 64 bit ABI allows for 288 bytes below sp before decrementing it. */ |
67 | char abigap[288]; | 67 | char abigap[288]; |
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c index c8458c531b25..13595a64f013 100644 --- a/arch/powerpc/kernel/smp.c +++ b/arch/powerpc/kernel/smp.c | |||
@@ -540,6 +540,9 @@ int __devinit start_secondary(void *unused) | |||
540 | if (smp_ops->take_timebase) | 540 | if (smp_ops->take_timebase) |
541 | smp_ops->take_timebase(); | 541 | smp_ops->take_timebase(); |
542 | 542 | ||
543 | if (system_state > SYSTEM_BOOTING) | ||
544 | per_cpu(last_jiffy, cpu) = get_tb(); | ||
545 | |||
543 | spin_lock(&call_lock); | 546 | spin_lock(&call_lock); |
544 | cpu_set(cpu, cpu_online_map); | 547 | cpu_set(cpu, cpu_online_map); |
545 | spin_unlock(&call_lock); | 548 | spin_unlock(&call_lock); |
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c index c4a294d657b9..1886045a2fd8 100644 --- a/arch/powerpc/kernel/time.c +++ b/arch/powerpc/kernel/time.c | |||
@@ -612,10 +612,10 @@ void __init generic_calibrate_decr(void) | |||
612 | 612 | ||
613 | ppc_tb_freq = DEFAULT_TB_FREQ; /* hardcoded default */ | 613 | ppc_tb_freq = DEFAULT_TB_FREQ; /* hardcoded default */ |
614 | node_found = 0; | 614 | node_found = 0; |
615 | if (cpu != 0) { | 615 | if (cpu) { |
616 | fp = (unsigned int *)get_property(cpu, "timebase-frequency", | 616 | fp = (unsigned int *)get_property(cpu, "timebase-frequency", |
617 | NULL); | 617 | NULL); |
618 | if (fp != 0) { | 618 | if (fp) { |
619 | node_found = 1; | 619 | node_found = 1; |
620 | ppc_tb_freq = *fp; | 620 | ppc_tb_freq = *fp; |
621 | } | 621 | } |
@@ -626,10 +626,10 @@ void __init generic_calibrate_decr(void) | |||
626 | 626 | ||
627 | ppc_proc_freq = DEFAULT_PROC_FREQ; | 627 | ppc_proc_freq = DEFAULT_PROC_FREQ; |
628 | node_found = 0; | 628 | node_found = 0; |
629 | if (cpu != 0) { | 629 | if (cpu) { |
630 | fp = (unsigned int *)get_property(cpu, "clock-frequency", | 630 | fp = (unsigned int *)get_property(cpu, "clock-frequency", |
631 | NULL); | 631 | NULL); |
632 | if (fp != 0) { | 632 | if (fp) { |
633 | node_found = 1; | 633 | node_found = 1; |
634 | ppc_proc_freq = *fp; | 634 | ppc_proc_freq = *fp; |
635 | } | 635 | } |
diff --git a/arch/powerpc/kernel/udbg_16550.c b/arch/powerpc/kernel/udbg_16550.c index 2da65a9c93f6..5d29dcca523c 100644 --- a/arch/powerpc/kernel/udbg_16550.c +++ b/arch/powerpc/kernel/udbg_16550.c | |||
@@ -144,7 +144,7 @@ unsigned int udbg_probe_uart_speed(void __iomem *comport, unsigned int clock) | |||
144 | } | 144 | } |
145 | 145 | ||
146 | #ifdef CONFIG_PPC_MAPLE | 146 | #ifdef CONFIG_PPC_MAPLE |
147 | void udbg_maple_real_putc(unsigned char c) | 147 | void udbg_maple_real_putc(char c) |
148 | { | 148 | { |
149 | if (udbg_comport) { | 149 | if (udbg_comport) { |
150 | while ((real_readb(&udbg_comport->lsr) & LSR_THRE) == 0) | 150 | while ((real_readb(&udbg_comport->lsr) & LSR_THRE) == 0) |
diff --git a/arch/powerpc/mm/lmb.c b/arch/powerpc/mm/lmb.c index 9584608fd768..bbe3eac918e8 100644 --- a/arch/powerpc/mm/lmb.c +++ b/arch/powerpc/mm/lmb.c | |||
@@ -197,6 +197,8 @@ long __init lmb_reserve(unsigned long base, unsigned long size) | |||
197 | { | 197 | { |
198 | struct lmb_region *_rgn = &(lmb.reserved); | 198 | struct lmb_region *_rgn = &(lmb.reserved); |
199 | 199 | ||
200 | BUG_ON(0 == size); | ||
201 | |||
200 | return lmb_add_region(_rgn, base, size); | 202 | return lmb_add_region(_rgn, base, size); |
201 | } | 203 | } |
202 | 204 | ||
@@ -227,6 +229,8 @@ unsigned long __init lmb_alloc_base(unsigned long size, unsigned long align, | |||
227 | long i, j; | 229 | long i, j; |
228 | unsigned long base = 0; | 230 | unsigned long base = 0; |
229 | 231 | ||
232 | BUG_ON(0 == size); | ||
233 | |||
230 | #ifdef CONFIG_PPC32 | 234 | #ifdef CONFIG_PPC32 |
231 | /* On 32-bit, make sure we allocate lowmem */ | 235 | /* On 32-bit, make sure we allocate lowmem */ |
232 | if (max_addr == LMB_ALLOC_ANYWHERE) | 236 | if (max_addr == LMB_ALLOC_ANYWHERE) |
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c index 15aac0d78dfa..550517c2dd42 100644 --- a/arch/powerpc/mm/mem.c +++ b/arch/powerpc/mm/mem.c | |||
@@ -435,17 +435,12 @@ void clear_user_page(void *page, unsigned long vaddr, struct page *pg) | |||
435 | { | 435 | { |
436 | clear_page(page); | 436 | clear_page(page); |
437 | 437 | ||
438 | if (cpu_has_feature(CPU_FTR_COHERENT_ICACHE)) | ||
439 | return; | ||
440 | /* | 438 | /* |
441 | * We shouldnt have to do this, but some versions of glibc | 439 | * We shouldnt have to do this, but some versions of glibc |
442 | * require it (ld.so assumes zero filled pages are icache clean) | 440 | * require it (ld.so assumes zero filled pages are icache clean) |
443 | * - Anton | 441 | * - Anton |
444 | */ | 442 | */ |
445 | 443 | flush_dcache_page(pg); | |
446 | /* avoid an atomic op if possible */ | ||
447 | if (test_bit(PG_arch_1, &pg->flags)) | ||
448 | clear_bit(PG_arch_1, &pg->flags); | ||
449 | } | 444 | } |
450 | EXPORT_SYMBOL(clear_user_page); | 445 | EXPORT_SYMBOL(clear_user_page); |
451 | 446 | ||
@@ -469,12 +464,7 @@ void copy_user_page(void *vto, void *vfrom, unsigned long vaddr, | |||
469 | return; | 464 | return; |
470 | #endif | 465 | #endif |
471 | 466 | ||
472 | if (cpu_has_feature(CPU_FTR_COHERENT_ICACHE)) | 467 | flush_dcache_page(pg); |
473 | return; | ||
474 | |||
475 | /* avoid an atomic op if possible */ | ||
476 | if (test_bit(PG_arch_1, &pg->flags)) | ||
477 | clear_bit(PG_arch_1, &pg->flags); | ||
478 | } | 468 | } |
479 | 469 | ||
480 | void flush_icache_user_range(struct vm_area_struct *vma, struct page *page, | 470 | void flush_icache_user_range(struct vm_area_struct *vma, struct page *page, |
diff --git a/arch/powerpc/platforms/cell/Makefile b/arch/powerpc/platforms/cell/Makefile index 16031b565be4..3b998a393e3f 100644 --- a/arch/powerpc/platforms/cell/Makefile +++ b/arch/powerpc/platforms/cell/Makefile | |||
@@ -2,7 +2,7 @@ obj-y += interrupt.o iommu.o setup.o spider-pic.o | |||
2 | obj-y += pervasive.o | 2 | obj-y += pervasive.o |
3 | 3 | ||
4 | obj-$(CONFIG_SMP) += smp.o | 4 | obj-$(CONFIG_SMP) += smp.o |
5 | obj-$(CONFIG_SPU_FS) += spufs/ spu-base.o | 5 | obj-$(CONFIG_SPU_FS) += spu-base.o spufs/ |
6 | 6 | ||
7 | spu-base-y += spu_base.o spu_priv1.o | 7 | spu-base-y += spu_base.o spu_priv1.o |
8 | 8 | ||
diff --git a/arch/powerpc/platforms/chrp/chrp.h b/arch/powerpc/platforms/chrp/chrp.h index 3a2057fa314a..814f54742e0f 100644 --- a/arch/powerpc/platforms/chrp/chrp.h +++ b/arch/powerpc/platforms/chrp/chrp.h | |||
@@ -5,7 +5,6 @@ | |||
5 | extern void chrp_nvram_init(void); | 5 | extern void chrp_nvram_init(void); |
6 | extern void chrp_get_rtc_time(struct rtc_time *); | 6 | extern void chrp_get_rtc_time(struct rtc_time *); |
7 | extern int chrp_set_rtc_time(struct rtc_time *); | 7 | extern int chrp_set_rtc_time(struct rtc_time *); |
8 | extern void chrp_calibrate_decr(void); | ||
9 | extern long chrp_time_init(void); | 8 | extern long chrp_time_init(void); |
10 | 9 | ||
11 | extern void chrp_find_bridges(void); | 10 | extern void chrp_find_bridges(void); |
diff --git a/arch/powerpc/platforms/chrp/pci.c b/arch/powerpc/platforms/chrp/pci.c index 00c52f27ef4f..8ef279ad36ad 100644 --- a/arch/powerpc/platforms/chrp/pci.c +++ b/arch/powerpc/platforms/chrp/pci.c | |||
@@ -204,9 +204,11 @@ static void __init setup_peg2(struct pci_controller *hose, struct device_node *d | |||
204 | struct device_node *root = find_path_device("/"); | 204 | struct device_node *root = find_path_device("/"); |
205 | struct device_node *rtas; | 205 | struct device_node *rtas; |
206 | 206 | ||
207 | of_node_get(root); | ||
207 | rtas = of_find_node_by_name (root, "rtas"); | 208 | rtas = of_find_node_by_name (root, "rtas"); |
208 | if (rtas) { | 209 | if (rtas) { |
209 | hose->ops = &rtas_pci_ops; | 210 | hose->ops = &rtas_pci_ops; |
211 | of_node_put(rtas); | ||
210 | } else { | 212 | } else { |
211 | printk ("RTAS supporting Pegasos OF not found, please upgrade" | 213 | printk ("RTAS supporting Pegasos OF not found, please upgrade" |
212 | " your firmware\n"); | 214 | " your firmware\n"); |
diff --git a/arch/powerpc/platforms/chrp/setup.c b/arch/powerpc/platforms/chrp/setup.c index 2dc87aa5962f..e1fadbf49150 100644 --- a/arch/powerpc/platforms/chrp/setup.c +++ b/arch/powerpc/platforms/chrp/setup.c | |||
@@ -506,7 +506,7 @@ void __init chrp_init(void) | |||
506 | ppc_md.halt = rtas_halt; | 506 | ppc_md.halt = rtas_halt; |
507 | 507 | ||
508 | ppc_md.time_init = chrp_time_init; | 508 | ppc_md.time_init = chrp_time_init; |
509 | ppc_md.calibrate_decr = chrp_calibrate_decr; | 509 | ppc_md.calibrate_decr = generic_calibrate_decr; |
510 | 510 | ||
511 | /* this may get overridden with rtas routines later... */ | 511 | /* this may get overridden with rtas routines later... */ |
512 | ppc_md.set_rtc_time = chrp_set_rtc_time; | 512 | ppc_md.set_rtc_time = chrp_set_rtc_time; |
diff --git a/arch/powerpc/platforms/chrp/time.c b/arch/powerpc/platforms/chrp/time.c index 36a0f97bb7b1..78df2e7ca88a 100644 --- a/arch/powerpc/platforms/chrp/time.c +++ b/arch/powerpc/platforms/chrp/time.c | |||
@@ -167,24 +167,3 @@ void chrp_get_rtc_time(struct rtc_time *tm) | |||
167 | tm->tm_mon = mon; | 167 | tm->tm_mon = mon; |
168 | tm->tm_year = year; | 168 | tm->tm_year = year; |
169 | } | 169 | } |
170 | |||
171 | |||
172 | void __init chrp_calibrate_decr(void) | ||
173 | { | ||
174 | struct device_node *cpu; | ||
175 | unsigned int freq, *fp; | ||
176 | |||
177 | /* | ||
178 | * The cpu node should have a timebase-frequency property | ||
179 | * to tell us the rate at which the decrementer counts. | ||
180 | */ | ||
181 | freq = 16666000; /* hardcoded default */ | ||
182 | cpu = find_type_devices("cpu"); | ||
183 | if (cpu != 0) { | ||
184 | fp = (unsigned int *) | ||
185 | get_property(cpu, "timebase-frequency", NULL); | ||
186 | if (fp != 0) | ||
187 | freq = *fp; | ||
188 | } | ||
189 | ppc_tb_freq = freq; | ||
190 | } | ||
diff --git a/arch/powerpc/platforms/powermac/low_i2c.c b/arch/powerpc/platforms/powermac/low_i2c.c index 535c802b369f..87eb6bb7f0e7 100644 --- a/arch/powerpc/platforms/powermac/low_i2c.c +++ b/arch/powerpc/platforms/powermac/low_i2c.c | |||
@@ -1052,8 +1052,7 @@ struct pmac_i2c_bus *pmac_i2c_adapter_to_bus(struct i2c_adapter *adapter) | |||
1052 | } | 1052 | } |
1053 | EXPORT_SYMBOL_GPL(pmac_i2c_adapter_to_bus); | 1053 | EXPORT_SYMBOL_GPL(pmac_i2c_adapter_to_bus); |
1054 | 1054 | ||
1055 | extern int pmac_i2c_match_adapter(struct device_node *dev, | 1055 | int pmac_i2c_match_adapter(struct device_node *dev, struct i2c_adapter *adapter) |
1056 | struct i2c_adapter *adapter) | ||
1057 | { | 1056 | { |
1058 | struct pmac_i2c_bus *bus = pmac_i2c_find_bus(dev); | 1057 | struct pmac_i2c_bus *bus = pmac_i2c_find_bus(dev); |
1059 | 1058 | ||
diff --git a/arch/powerpc/platforms/powermac/pci.c b/arch/powerpc/platforms/powermac/pci.c index f671ed253901..de3f30e6b333 100644 --- a/arch/powerpc/platforms/powermac/pci.c +++ b/arch/powerpc/platforms/powermac/pci.c | |||
@@ -136,14 +136,14 @@ static void __init fixup_bus_range(struct device_node *bridge) | |||
136 | |(((unsigned int)(off)) & 0xFCUL) \ | 136 | |(((unsigned int)(off)) & 0xFCUL) \ |
137 | |1UL) | 137 | |1UL) |
138 | 138 | ||
139 | static unsigned long macrisc_cfg_access(struct pci_controller* hose, | 139 | static volatile void __iomem *macrisc_cfg_access(struct pci_controller* hose, |
140 | u8 bus, u8 dev_fn, u8 offset) | 140 | u8 bus, u8 dev_fn, u8 offset) |
141 | { | 141 | { |
142 | unsigned int caddr; | 142 | unsigned int caddr; |
143 | 143 | ||
144 | if (bus == hose->first_busno) { | 144 | if (bus == hose->first_busno) { |
145 | if (dev_fn < (11 << 3)) | 145 | if (dev_fn < (11 << 3)) |
146 | return 0; | 146 | return NULL; |
147 | caddr = MACRISC_CFA0(dev_fn, offset); | 147 | caddr = MACRISC_CFA0(dev_fn, offset); |
148 | } else | 148 | } else |
149 | caddr = MACRISC_CFA1(bus, dev_fn, offset); | 149 | caddr = MACRISC_CFA1(bus, dev_fn, offset); |
@@ -154,14 +154,14 @@ static unsigned long macrisc_cfg_access(struct pci_controller* hose, | |||
154 | } while (in_le32(hose->cfg_addr) != caddr); | 154 | } while (in_le32(hose->cfg_addr) != caddr); |
155 | 155 | ||
156 | offset &= has_uninorth ? 0x07 : 0x03; | 156 | offset &= has_uninorth ? 0x07 : 0x03; |
157 | return ((unsigned long)hose->cfg_data) + offset; | 157 | return hose->cfg_data + offset; |
158 | } | 158 | } |
159 | 159 | ||
160 | static int macrisc_read_config(struct pci_bus *bus, unsigned int devfn, | 160 | static int macrisc_read_config(struct pci_bus *bus, unsigned int devfn, |
161 | int offset, int len, u32 *val) | 161 | int offset, int len, u32 *val) |
162 | { | 162 | { |
163 | struct pci_controller *hose; | 163 | struct pci_controller *hose; |
164 | unsigned long addr; | 164 | volatile void __iomem *addr; |
165 | 165 | ||
166 | hose = pci_bus_to_host(bus); | 166 | hose = pci_bus_to_host(bus); |
167 | if (hose == NULL) | 167 | if (hose == NULL) |
@@ -177,13 +177,13 @@ static int macrisc_read_config(struct pci_bus *bus, unsigned int devfn, | |||
177 | */ | 177 | */ |
178 | switch (len) { | 178 | switch (len) { |
179 | case 1: | 179 | case 1: |
180 | *val = in_8((u8 *)addr); | 180 | *val = in_8(addr); |
181 | break; | 181 | break; |
182 | case 2: | 182 | case 2: |
183 | *val = in_le16((u16 *)addr); | 183 | *val = in_le16(addr); |
184 | break; | 184 | break; |
185 | default: | 185 | default: |
186 | *val = in_le32((u32 *)addr); | 186 | *val = in_le32(addr); |
187 | break; | 187 | break; |
188 | } | 188 | } |
189 | return PCIBIOS_SUCCESSFUL; | 189 | return PCIBIOS_SUCCESSFUL; |
@@ -193,7 +193,7 @@ static int macrisc_write_config(struct pci_bus *bus, unsigned int devfn, | |||
193 | int offset, int len, u32 val) | 193 | int offset, int len, u32 val) |
194 | { | 194 | { |
195 | struct pci_controller *hose; | 195 | struct pci_controller *hose; |
196 | unsigned long addr; | 196 | volatile void __iomem *addr; |
197 | 197 | ||
198 | hose = pci_bus_to_host(bus); | 198 | hose = pci_bus_to_host(bus); |
199 | if (hose == NULL) | 199 | if (hose == NULL) |
@@ -209,16 +209,16 @@ static int macrisc_write_config(struct pci_bus *bus, unsigned int devfn, | |||
209 | */ | 209 | */ |
210 | switch (len) { | 210 | switch (len) { |
211 | case 1: | 211 | case 1: |
212 | out_8((u8 *)addr, val); | 212 | out_8(addr, val); |
213 | (void) in_8((u8 *)addr); | 213 | (void) in_8(addr); |
214 | break; | 214 | break; |
215 | case 2: | 215 | case 2: |
216 | out_le16((u16 *)addr, val); | 216 | out_le16(addr, val); |
217 | (void) in_le16((u16 *)addr); | 217 | (void) in_le16(addr); |
218 | break; | 218 | break; |
219 | default: | 219 | default: |
220 | out_le32((u32 *)addr, val); | 220 | out_le32(addr, val); |
221 | (void) in_le32((u32 *)addr); | 221 | (void) in_le32(addr); |
222 | break; | 222 | break; |
223 | } | 223 | } |
224 | return PCIBIOS_SUCCESSFUL; | 224 | return PCIBIOS_SUCCESSFUL; |
@@ -348,25 +348,23 @@ static int u3_ht_skip_device(struct pci_controller *hose, | |||
348 | + (((unsigned int)bus) << 16) \ | 348 | + (((unsigned int)bus) << 16) \ |
349 | + 0x01000000UL) | 349 | + 0x01000000UL) |
350 | 350 | ||
351 | static unsigned long u3_ht_cfg_access(struct pci_controller* hose, | 351 | static volatile void __iomem *u3_ht_cfg_access(struct pci_controller* hose, |
352 | u8 bus, u8 devfn, u8 offset) | 352 | u8 bus, u8 devfn, u8 offset) |
353 | { | 353 | { |
354 | if (bus == hose->first_busno) { | 354 | if (bus == hose->first_busno) { |
355 | /* For now, we don't self probe U3 HT bridge */ | 355 | /* For now, we don't self probe U3 HT bridge */ |
356 | if (PCI_SLOT(devfn) == 0) | 356 | if (PCI_SLOT(devfn) == 0) |
357 | return 0; | 357 | return NULL; |
358 | return ((unsigned long)hose->cfg_data) + | 358 | return hose->cfg_data + U3_HT_CFA0(devfn, offset); |
359 | U3_HT_CFA0(devfn, offset); | ||
360 | } else | 359 | } else |
361 | return ((unsigned long)hose->cfg_data) + | 360 | return hose->cfg_data + U3_HT_CFA1(bus, devfn, offset); |
362 | U3_HT_CFA1(bus, devfn, offset); | ||
363 | } | 361 | } |
364 | 362 | ||
365 | static int u3_ht_read_config(struct pci_bus *bus, unsigned int devfn, | 363 | static int u3_ht_read_config(struct pci_bus *bus, unsigned int devfn, |
366 | int offset, int len, u32 *val) | 364 | int offset, int len, u32 *val) |
367 | { | 365 | { |
368 | struct pci_controller *hose; | 366 | struct pci_controller *hose; |
369 | unsigned long addr; | 367 | volatile void __iomem *addr; |
370 | 368 | ||
371 | hose = pci_bus_to_host(bus); | 369 | hose = pci_bus_to_host(bus); |
372 | if (hose == NULL) | 370 | if (hose == NULL) |
@@ -400,13 +398,13 @@ static int u3_ht_read_config(struct pci_bus *bus, unsigned int devfn, | |||
400 | */ | 398 | */ |
401 | switch (len) { | 399 | switch (len) { |
402 | case 1: | 400 | case 1: |
403 | *val = in_8((u8 *)addr); | 401 | *val = in_8(addr); |
404 | break; | 402 | break; |
405 | case 2: | 403 | case 2: |
406 | *val = in_le16((u16 *)addr); | 404 | *val = in_le16(addr); |
407 | break; | 405 | break; |
408 | default: | 406 | default: |
409 | *val = in_le32((u32 *)addr); | 407 | *val = in_le32(addr); |
410 | break; | 408 | break; |
411 | } | 409 | } |
412 | return PCIBIOS_SUCCESSFUL; | 410 | return PCIBIOS_SUCCESSFUL; |
@@ -416,7 +414,7 @@ static int u3_ht_write_config(struct pci_bus *bus, unsigned int devfn, | |||
416 | int offset, int len, u32 val) | 414 | int offset, int len, u32 val) |
417 | { | 415 | { |
418 | struct pci_controller *hose; | 416 | struct pci_controller *hose; |
419 | unsigned long addr; | 417 | volatile void __iomem *addr; |
420 | 418 | ||
421 | hose = pci_bus_to_host(bus); | 419 | hose = pci_bus_to_host(bus); |
422 | if (hose == NULL) | 420 | if (hose == NULL) |
@@ -442,16 +440,16 @@ static int u3_ht_write_config(struct pci_bus *bus, unsigned int devfn, | |||
442 | */ | 440 | */ |
443 | switch (len) { | 441 | switch (len) { |
444 | case 1: | 442 | case 1: |
445 | out_8((u8 *)addr, val); | 443 | out_8(addr, val); |
446 | (void) in_8((u8 *)addr); | 444 | (void) in_8(addr); |
447 | break; | 445 | break; |
448 | case 2: | 446 | case 2: |
449 | out_le16((u16 *)addr, val); | 447 | out_le16(addr, val); |
450 | (void) in_le16((u16 *)addr); | 448 | (void) in_le16(addr); |
451 | break; | 449 | break; |
452 | default: | 450 | default: |
453 | out_le32((u32 *)addr, val); | 451 | out_le32((u32 __iomem *)addr, val); |
454 | (void) in_le32((u32 *)addr); | 452 | (void) in_le32(addr); |
455 | break; | 453 | break; |
456 | } | 454 | } |
457 | return PCIBIOS_SUCCESSFUL; | 455 | return PCIBIOS_SUCCESSFUL; |
@@ -476,7 +474,7 @@ static struct pci_ops u3_ht_pci_ops = | |||
476 | |(((unsigned int)(off)) & 0xfcU) \ | 474 | |(((unsigned int)(off)) & 0xfcU) \ |
477 | |1UL) | 475 | |1UL) |
478 | 476 | ||
479 | static unsigned long u4_pcie_cfg_access(struct pci_controller* hose, | 477 | static volatile void __iomem *u4_pcie_cfg_access(struct pci_controller* hose, |
480 | u8 bus, u8 dev_fn, int offset) | 478 | u8 bus, u8 dev_fn, int offset) |
481 | { | 479 | { |
482 | unsigned int caddr; | 480 | unsigned int caddr; |
@@ -492,14 +490,14 @@ static unsigned long u4_pcie_cfg_access(struct pci_controller* hose, | |||
492 | } while (in_le32(hose->cfg_addr) != caddr); | 490 | } while (in_le32(hose->cfg_addr) != caddr); |
493 | 491 | ||
494 | offset &= 0x03; | 492 | offset &= 0x03; |
495 | return ((unsigned long)hose->cfg_data) + offset; | 493 | return hose->cfg_data + offset; |
496 | } | 494 | } |
497 | 495 | ||
498 | static int u4_pcie_read_config(struct pci_bus *bus, unsigned int devfn, | 496 | static int u4_pcie_read_config(struct pci_bus *bus, unsigned int devfn, |
499 | int offset, int len, u32 *val) | 497 | int offset, int len, u32 *val) |
500 | { | 498 | { |
501 | struct pci_controller *hose; | 499 | struct pci_controller *hose; |
502 | unsigned long addr; | 500 | volatile void __iomem *addr; |
503 | 501 | ||
504 | hose = pci_bus_to_host(bus); | 502 | hose = pci_bus_to_host(bus); |
505 | if (hose == NULL) | 503 | if (hose == NULL) |
@@ -515,13 +513,13 @@ static int u4_pcie_read_config(struct pci_bus *bus, unsigned int devfn, | |||
515 | */ | 513 | */ |
516 | switch (len) { | 514 | switch (len) { |
517 | case 1: | 515 | case 1: |
518 | *val = in_8((u8 *)addr); | 516 | *val = in_8(addr); |
519 | break; | 517 | break; |
520 | case 2: | 518 | case 2: |
521 | *val = in_le16((u16 *)addr); | 519 | *val = in_le16(addr); |
522 | break; | 520 | break; |
523 | default: | 521 | default: |
524 | *val = in_le32((u32 *)addr); | 522 | *val = in_le32(addr); |
525 | break; | 523 | break; |
526 | } | 524 | } |
527 | return PCIBIOS_SUCCESSFUL; | 525 | return PCIBIOS_SUCCESSFUL; |
@@ -531,7 +529,7 @@ static int u4_pcie_write_config(struct pci_bus *bus, unsigned int devfn, | |||
531 | int offset, int len, u32 val) | 529 | int offset, int len, u32 val) |
532 | { | 530 | { |
533 | struct pci_controller *hose; | 531 | struct pci_controller *hose; |
534 | unsigned long addr; | 532 | volatile void __iomem *addr; |
535 | 533 | ||
536 | hose = pci_bus_to_host(bus); | 534 | hose = pci_bus_to_host(bus); |
537 | if (hose == NULL) | 535 | if (hose == NULL) |
@@ -547,16 +545,16 @@ static int u4_pcie_write_config(struct pci_bus *bus, unsigned int devfn, | |||
547 | */ | 545 | */ |
548 | switch (len) { | 546 | switch (len) { |
549 | case 1: | 547 | case 1: |
550 | out_8((u8 *)addr, val); | 548 | out_8(addr, val); |
551 | (void) in_8((u8 *)addr); | 549 | (void) in_8(addr); |
552 | break; | 550 | break; |
553 | case 2: | 551 | case 2: |
554 | out_le16((u16 *)addr, val); | 552 | out_le16(addr, val); |
555 | (void) in_le16((u16 *)addr); | 553 | (void) in_le16(addr); |
556 | break; | 554 | break; |
557 | default: | 555 | default: |
558 | out_le32((u32 *)addr, val); | 556 | out_le32(addr, val); |
559 | (void) in_le32((u32 *)addr); | 557 | (void) in_le32(addr); |
560 | break; | 558 | break; |
561 | } | 559 | } |
562 | return PCIBIOS_SUCCESSFUL; | 560 | return PCIBIOS_SUCCESSFUL; |
@@ -773,8 +771,7 @@ static void __init setup_u3_ht(struct pci_controller* hose) | |||
773 | * the reg address cell, we shall fix that by killing struct | 771 | * the reg address cell, we shall fix that by killing struct |
774 | * reg_property and using some accessor functions instead | 772 | * reg_property and using some accessor functions instead |
775 | */ | 773 | */ |
776 | hose->cfg_data = (volatile unsigned char *)ioremap(0xf2000000, | 774 | hose->cfg_data = ioremap(0xf2000000, 0x02000000); |
777 | 0x02000000); | ||
778 | 775 | ||
779 | /* | 776 | /* |
780 | * /ht node doesn't expose a "ranges" property, so we "remove" | 777 | * /ht node doesn't expose a "ranges" property, so we "remove" |
diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c index 89c4c3636161..1955462f4082 100644 --- a/arch/powerpc/platforms/powermac/setup.c +++ b/arch/powerpc/platforms/powermac/setup.c | |||
@@ -82,8 +82,6 @@ | |||
82 | 82 | ||
83 | #undef SHOW_GATWICK_IRQS | 83 | #undef SHOW_GATWICK_IRQS |
84 | 84 | ||
85 | unsigned char drive_info; | ||
86 | |||
87 | int ppc_override_l2cr = 0; | 85 | int ppc_override_l2cr = 0; |
88 | int ppc_override_l2cr_value; | 86 | int ppc_override_l2cr_value; |
89 | int has_l2cache = 0; | 87 | int has_l2cache = 0; |
diff --git a/arch/powerpc/platforms/pseries/eeh_driver.c b/arch/powerpc/platforms/pseries/eeh_driver.c index 6373372932ba..e3cbba49fd6e 100644 --- a/arch/powerpc/platforms/pseries/eeh_driver.c +++ b/arch/powerpc/platforms/pseries/eeh_driver.c | |||
@@ -333,7 +333,7 @@ void handle_eeh_events (struct eeh_event *event) | |||
333 | rc = eeh_reset_device(frozen_pdn, NULL); | 333 | rc = eeh_reset_device(frozen_pdn, NULL); |
334 | if (rc) | 334 | if (rc) |
335 | goto hard_fail; | 335 | goto hard_fail; |
336 | pci_walk_bus(frozen_bus, eeh_report_reset, 0); | 336 | pci_walk_bus(frozen_bus, eeh_report_reset, NULL); |
337 | } | 337 | } |
338 | 338 | ||
339 | /* If all devices reported they can proceed, the re-enable PIO */ | 339 | /* If all devices reported they can proceed, the re-enable PIO */ |
@@ -342,11 +342,11 @@ void handle_eeh_events (struct eeh_event *event) | |||
342 | rc = eeh_reset_device(frozen_pdn, NULL); | 342 | rc = eeh_reset_device(frozen_pdn, NULL); |
343 | if (rc) | 343 | if (rc) |
344 | goto hard_fail; | 344 | goto hard_fail; |
345 | pci_walk_bus(frozen_bus, eeh_report_reset, 0); | 345 | pci_walk_bus(frozen_bus, eeh_report_reset, NULL); |
346 | } | 346 | } |
347 | 347 | ||
348 | /* Tell all device drivers that they can resume operations */ | 348 | /* Tell all device drivers that they can resume operations */ |
349 | pci_walk_bus(frozen_bus, eeh_report_resume, 0); | 349 | pci_walk_bus(frozen_bus, eeh_report_resume, NULL); |
350 | 350 | ||
351 | return; | 351 | return; |
352 | 352 | ||
@@ -367,7 +367,7 @@ hard_fail: | |||
367 | eeh_slot_error_detail(frozen_pdn, 2 /* Permanent Error */); | 367 | eeh_slot_error_detail(frozen_pdn, 2 /* Permanent Error */); |
368 | 368 | ||
369 | /* Notify all devices that they're about to go down. */ | 369 | /* Notify all devices that they're about to go down. */ |
370 | pci_walk_bus(frozen_bus, eeh_report_failure, 0); | 370 | pci_walk_bus(frozen_bus, eeh_report_failure, NULL); |
371 | 371 | ||
372 | /* Shut down the device drivers for good. */ | 372 | /* Shut down the device drivers for good. */ |
373 | pcibios_remove_pci_devices(frozen_bus); | 373 | pcibios_remove_pci_devices(frozen_bus); |
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c index da6cebaf72cd..9edeca83f434 100644 --- a/arch/powerpc/platforms/pseries/setup.c +++ b/arch/powerpc/platforms/pseries/setup.c | |||
@@ -585,7 +585,7 @@ static int pSeries_pci_probe_mode(struct pci_bus *bus) | |||
585 | static void pseries_kexec_cpu_down(int crash_shutdown, int secondary) | 585 | static void pseries_kexec_cpu_down(int crash_shutdown, int secondary) |
586 | { | 586 | { |
587 | /* Don't risk a hypervisor call if we're crashing */ | 587 | /* Don't risk a hypervisor call if we're crashing */ |
588 | if (!crash_shutdown) { | 588 | if (firmware_has_feature(FW_FEATURE_SPLPAR) && !crash_shutdown) { |
589 | unsigned long vpa = __pa(get_lppaca()); | 589 | unsigned long vpa = __pa(get_lppaca()); |
590 | 590 | ||
591 | if (unregister_vpa(hard_smp_processor_id(), vpa)) { | 591 | if (unregister_vpa(hard_smp_processor_id(), vpa)) { |
diff --git a/arch/powerpc/sysdev/dart_iommu.c b/arch/powerpc/sysdev/dart_iommu.c index 977de9db8754..6298264efe36 100644 --- a/arch/powerpc/sysdev/dart_iommu.c +++ b/arch/powerpc/sysdev/dart_iommu.c | |||
@@ -59,7 +59,7 @@ static unsigned long dart_tablesize; | |||
59 | static u32 *dart_vbase; | 59 | static u32 *dart_vbase; |
60 | 60 | ||
61 | /* Mapped base address for the dart */ | 61 | /* Mapped base address for the dart */ |
62 | static unsigned int *__iomem dart; | 62 | static unsigned int __iomem *dart; |
63 | 63 | ||
64 | /* Dummy val that entries are set to when unused */ | 64 | /* Dummy val that entries are set to when unused */ |
65 | static unsigned int dart_emptyval; | 65 | static unsigned int dart_emptyval; |