diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-02-07 23:32:13 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-02-07 23:32:13 -0500 |
commit | fe69102188cde0700cddd8d4cda0b77d68284884 (patch) | |
tree | ae2f88c810ff48f040a808a924585000b52082e9 /arch | |
parent | f30ac319f1b91878cdc57a50930f15c36e0e103a (diff) | |
parent | 7d4d61544a12333600bdb9b018a149868418692e (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc-merge
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/kernel/fpu.S | 2 | ||||
-rw-r--r-- | arch/powerpc/kernel/head_64.S | 5 | ||||
-rw-r--r-- | arch/powerpc/kernel/iommu.c | 9 | ||||
-rw-r--r-- | arch/powerpc/kernel/prom.c | 38 | ||||
-rw-r--r-- | arch/powerpc/kernel/prom_init.c | 4 | ||||
-rw-r--r-- | arch/powerpc/kernel/prom_parse.c | 4 | ||||
-rw-r--r-- | arch/powerpc/kernel/rtas.c | 12 | ||||
-rw-r--r-- | arch/powerpc/kernel/rtas_flash.c | 3 | ||||
-rw-r--r-- | arch/powerpc/kernel/setup_64.c | 3 | ||||
-rw-r--r-- | arch/powerpc/kernel/smp.c | 3 | ||||
-rw-r--r-- | arch/powerpc/kernel/time.c | 8 | ||||
-rw-r--r-- | arch/powerpc/kernel/udbg_16550.c | 2 | ||||
-rw-r--r-- | arch/powerpc/mm/lmb.c | 4 | ||||
-rw-r--r-- | arch/powerpc/mm/mem.c | 14 | ||||
-rw-r--r-- | arch/powerpc/platforms/cell/Makefile | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/chrp/chrp.h | 1 | ||||
-rw-r--r-- | arch/powerpc/platforms/chrp/pci.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/chrp/setup.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/chrp/time.c | 21 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/setup.c | 2 | ||||
-rw-r--r-- | arch/ppc/kernel/head_8xx.S | 7 |
21 files changed, 86 insertions, 62 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/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/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/ppc/kernel/head_8xx.S b/arch/ppc/kernel/head_8xx.S index 3e6ca7f5843f..c1e89ad0684d 100644 --- a/arch/ppc/kernel/head_8xx.S +++ b/arch/ppc/kernel/head_8xx.S | |||
@@ -810,13 +810,16 @@ initial_mmu: | |||
810 | mtspr SPRN_MD_TWC, r9 | 810 | mtspr SPRN_MD_TWC, r9 |
811 | li r11, MI_BOOTINIT /* Create RPN for address 0 */ | 811 | li r11, MI_BOOTINIT /* Create RPN for address 0 */ |
812 | addis r11, r11, 0x0080 /* Add 8M */ | 812 | addis r11, r11, 0x0080 /* Add 8M */ |
813 | mtspr SPRN_MD_RPN, r8 | 813 | mtspr SPRN_MD_RPN, r11 |
814 | |||
815 | addi r10, r10, 0x0100 | ||
816 | mtspr SPRN_MD_CTR, r10 | ||
814 | 817 | ||
815 | addis r8, r8, 0x0080 /* Add 8M */ | 818 | addis r8, r8, 0x0080 /* Add 8M */ |
816 | mtspr SPRN_MD_EPN, r8 | 819 | mtspr SPRN_MD_EPN, r8 |
817 | mtspr SPRN_MD_TWC, r9 | 820 | mtspr SPRN_MD_TWC, r9 |
818 | addis r11, r11, 0x0080 /* Add 8M */ | 821 | addis r11, r11, 0x0080 /* Add 8M */ |
819 | mtspr SPRN_MD_RPN, r8 | 822 | mtspr SPRN_MD_RPN, r11 |
820 | #endif | 823 | #endif |
821 | 824 | ||
822 | /* Since the cache is enabled according to the information we | 825 | /* Since the cache is enabled according to the information we |