diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-16 11:41:09 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-16 11:41:09 -0500 |
commit | b762666cc7c9f83ac5759127c29dfad438c09e48 (patch) | |
tree | 138057d812df7052ea4b5d1ae47179fb174a704e | |
parent | e58d4fd89aa91369357526f810c783a5acaf0cc4 (diff) | |
parent | 0025e75357e7e8daf03a74294c98425a80a433c7 (diff) |
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
serial: Add 16850 uart type support to OF uart driver
hvc_console: Remove tty->low_latency
powerpc: Get the number of SLBs from "slb-size" property
powerpc: is_hugepage_only_range() must account for both 4kB and 64kB slices
powerpc/ps3: printing fixups for l64 to ll64 conversion drivers/video
powerpc/ps3: Printing fixups for l64 to ll64 conversion drivers/scsi
powerpc/ps3: Printing fixups for l64 to ll64 conversion drivers/ps3
powerpc/ps3: Printing fixups for l64 to ll64 conversion sound/ppc
powerpc/ps3: Printing fixups for l64 to ll64 conversion drivers/char
powerpc/ps3: Printing fixups for l64 to ll64 conversion drivers/block
powerpc/ps3: Printing fixups for l64 to ll64 conversion arch/powerpc
powerpc/ps3: ps3_repository_read_mm_info() takes u64 * arguments
powerpc/ps3: clear_bit()/set_bit() operate on unsigned longs
powerpc/ps3: The lv1_ routines have u64 parameters
powerpc/ps3: Use dma_addr_t down through the stack
powerpc/ps3: set_dabr() takes an unsigned long
powerpc: Cleanup from l64 to ll64 change drivers/scsi
-rw-r--r-- | arch/powerpc/include/asm/ps3.h | 8 | ||||
-rw-r--r-- | arch/powerpc/kernel/prom.c | 5 | ||||
-rw-r--r-- | arch/powerpc/mm/slice.c | 11 | ||||
-rw-r--r-- | arch/powerpc/platforms/ps3/device-init.c | 26 | ||||
-rw-r--r-- | arch/powerpc/platforms/ps3/htab.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/ps3/interrupt.c | 28 | ||||
-rw-r--r-- | arch/powerpc/platforms/ps3/mm.c | 97 | ||||
-rw-r--r-- | arch/powerpc/platforms/ps3/os-area.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/ps3/repository.c | 22 | ||||
-rw-r--r-- | arch/powerpc/platforms/ps3/setup.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/ps3/spu.c | 12 | ||||
-rw-r--r-- | arch/powerpc/platforms/ps3/system-bus.c | 14 | ||||
-rw-r--r-- | drivers/block/ps3disk.c | 18 | ||||
-rw-r--r-- | drivers/char/hvc_console.c | 2 | ||||
-rw-r--r-- | drivers/char/ps3flash.c | 18 | ||||
-rw-r--r-- | drivers/ps3/ps3-lpm.c | 16 | ||||
-rw-r--r-- | drivers/ps3/ps3-vuart.c | 32 | ||||
-rw-r--r-- | drivers/ps3/ps3stor_lib.c | 14 | ||||
-rw-r--r-- | drivers/scsi/ibmvscsi/ibmvfc.c | 14 | ||||
-rw-r--r-- | drivers/scsi/ibmvscsi/ibmvfc.h | 6 | ||||
-rw-r--r-- | drivers/scsi/ps3rom.c | 6 | ||||
-rw-r--r-- | drivers/serial/of_serial.c | 1 | ||||
-rw-r--r-- | drivers/video/ps3fb.c | 4 | ||||
-rw-r--r-- | sound/ppc/snd_ps3.c | 4 |
24 files changed, 196 insertions, 168 deletions
diff --git a/arch/powerpc/include/asm/ps3.h b/arch/powerpc/include/asm/ps3.h index eead5c67197a..67f1812698d2 100644 --- a/arch/powerpc/include/asm/ps3.h +++ b/arch/powerpc/include/asm/ps3.h | |||
@@ -103,10 +103,10 @@ struct ps3_dma_region_ops { | |||
103 | int (*map)(struct ps3_dma_region *, | 103 | int (*map)(struct ps3_dma_region *, |
104 | unsigned long virt_addr, | 104 | unsigned long virt_addr, |
105 | unsigned long len, | 105 | unsigned long len, |
106 | unsigned long *bus_addr, | 106 | dma_addr_t *bus_addr, |
107 | u64 iopte_pp); | 107 | u64 iopte_pp); |
108 | int (*unmap)(struct ps3_dma_region *, | 108 | int (*unmap)(struct ps3_dma_region *, |
109 | unsigned long bus_addr, | 109 | dma_addr_t bus_addr, |
110 | unsigned long len); | 110 | unsigned long len); |
111 | }; | 111 | }; |
112 | /** | 112 | /** |
@@ -124,9 +124,9 @@ int ps3_dma_region_init(struct ps3_system_bus_device *dev, | |||
124 | int ps3_dma_region_create(struct ps3_dma_region *r); | 124 | int ps3_dma_region_create(struct ps3_dma_region *r); |
125 | int ps3_dma_region_free(struct ps3_dma_region *r); | 125 | int ps3_dma_region_free(struct ps3_dma_region *r); |
126 | int ps3_dma_map(struct ps3_dma_region *r, unsigned long virt_addr, | 126 | int ps3_dma_map(struct ps3_dma_region *r, unsigned long virt_addr, |
127 | unsigned long len, unsigned long *bus_addr, | 127 | unsigned long len, dma_addr_t *bus_addr, |
128 | u64 iopte_pp); | 128 | u64 iopte_pp); |
129 | int ps3_dma_unmap(struct ps3_dma_region *r, unsigned long bus_addr, | 129 | int ps3_dma_unmap(struct ps3_dma_region *r, dma_addr_t bus_addr, |
130 | unsigned long len); | 130 | unsigned long len); |
131 | 131 | ||
132 | /* mmio routines */ | 132 | /* mmio routines */ |
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index c09cffafb6ee..f00f83109ab3 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c | |||
@@ -590,6 +590,11 @@ static void __init check_cpu_slb_size(unsigned long node) | |||
590 | { | 590 | { |
591 | u32 *slb_size_ptr; | 591 | u32 *slb_size_ptr; |
592 | 592 | ||
593 | slb_size_ptr = of_get_flat_dt_prop(node, "slb-size", NULL); | ||
594 | if (slb_size_ptr != NULL) { | ||
595 | mmu_slb_size = *slb_size_ptr; | ||
596 | return; | ||
597 | } | ||
593 | slb_size_ptr = of_get_flat_dt_prop(node, "ibm,slb-size", NULL); | 598 | slb_size_ptr = of_get_flat_dt_prop(node, "ibm,slb-size", NULL); |
594 | if (slb_size_ptr != NULL) { | 599 | if (slb_size_ptr != NULL) { |
595 | mmu_slb_size = *slb_size_ptr; | 600 | mmu_slb_size = *slb_size_ptr; |
diff --git a/arch/powerpc/mm/slice.c b/arch/powerpc/mm/slice.c index db44e02e045b..ba5194817f8a 100644 --- a/arch/powerpc/mm/slice.c +++ b/arch/powerpc/mm/slice.c | |||
@@ -710,9 +710,18 @@ int is_hugepage_only_range(struct mm_struct *mm, unsigned long addr, | |||
710 | unsigned long len) | 710 | unsigned long len) |
711 | { | 711 | { |
712 | struct slice_mask mask, available; | 712 | struct slice_mask mask, available; |
713 | unsigned int psize = mm->context.user_psize; | ||
713 | 714 | ||
714 | mask = slice_range_to_mask(addr, len); | 715 | mask = slice_range_to_mask(addr, len); |
715 | available = slice_mask_for_size(mm, mm->context.user_psize); | 716 | available = slice_mask_for_size(mm, psize); |
717 | #ifdef CONFIG_PPC_64K_PAGES | ||
718 | /* We need to account for 4k slices too */ | ||
719 | if (psize == MMU_PAGE_64K) { | ||
720 | struct slice_mask compat_mask; | ||
721 | compat_mask = slice_mask_for_size(mm, MMU_PAGE_4K); | ||
722 | or_mask(available, compat_mask); | ||
723 | } | ||
724 | #endif | ||
716 | 725 | ||
717 | #if 0 /* too verbose */ | 726 | #if 0 /* too verbose */ |
718 | slice_dbg("is_hugepage_only_range(mm=%p, addr=%lx, len=%lx)\n", | 727 | slice_dbg("is_hugepage_only_range(mm=%p, addr=%lx, len=%lx)\n", |
diff --git a/arch/powerpc/platforms/ps3/device-init.c b/arch/powerpc/platforms/ps3/device-init.c index ca71a12b764c..bb028f165fb3 100644 --- a/arch/powerpc/platforms/ps3/device-init.c +++ b/arch/powerpc/platforms/ps3/device-init.c | |||
@@ -82,7 +82,7 @@ static int __init ps3_register_lpm_devices(void) | |||
82 | goto fail_rights; | 82 | goto fail_rights; |
83 | } | 83 | } |
84 | 84 | ||
85 | pr_debug("%s:%d: pu_id %lu, rights %lu(%lxh)\n", | 85 | pr_debug("%s:%d: pu_id %llu, rights %llu(%llxh)\n", |
86 | __func__, __LINE__, dev->lpm.pu_id, dev->lpm.rights, | 86 | __func__, __LINE__, dev->lpm.pu_id, dev->lpm.rights, |
87 | dev->lpm.rights); | 87 | dev->lpm.rights); |
88 | 88 | ||
@@ -348,7 +348,7 @@ static int ps3_setup_storage_dev(const struct ps3_repository_device *repo, | |||
348 | return -ENODEV; | 348 | return -ENODEV; |
349 | } | 349 | } |
350 | 350 | ||
351 | pr_debug("%s:%u: (%u:%u:%u): port %lu blk_size %lu num_blocks %lu " | 351 | pr_debug("%s:%u: (%u:%u:%u): port %llu blk_size %llu num_blocks %llu " |
352 | "num_regions %u\n", __func__, __LINE__, repo->bus_index, | 352 | "num_regions %u\n", __func__, __LINE__, repo->bus_index, |
353 | repo->dev_index, repo->dev_type, port, blk_size, num_blocks, | 353 | repo->dev_index, repo->dev_type, port, blk_size, num_blocks, |
354 | num_regions); | 354 | num_regions); |
@@ -394,7 +394,7 @@ static int ps3_setup_storage_dev(const struct ps3_repository_device *repo, | |||
394 | result = -ENODEV; | 394 | result = -ENODEV; |
395 | goto fail_read_region; | 395 | goto fail_read_region; |
396 | } | 396 | } |
397 | pr_debug("%s:%u: region %u: id %u start %lu size %lu\n", | 397 | pr_debug("%s:%u: region %u: id %u start %llu size %llu\n", |
398 | __func__, __LINE__, i, id, start, size); | 398 | __func__, __LINE__, i, id, start, size); |
399 | 399 | ||
400 | p->regions[i].id = id; | 400 | p->regions[i].id = id; |
@@ -662,13 +662,13 @@ static void ps3_find_and_add_device(u64 bus_id, u64 dev_id) | |||
662 | if (rem) | 662 | if (rem) |
663 | break; | 663 | break; |
664 | } | 664 | } |
665 | pr_warning("%s:%u: device %lu:%lu not found\n", __func__, __LINE__, | 665 | pr_warning("%s:%u: device %llu:%llu not found\n", __func__, __LINE__, |
666 | bus_id, dev_id); | 666 | bus_id, dev_id); |
667 | return; | 667 | return; |
668 | 668 | ||
669 | found: | 669 | found: |
670 | if (retries) | 670 | if (retries) |
671 | pr_debug("%s:%u: device %lu:%lu found after %u retries\n", | 671 | pr_debug("%s:%u: device %llu:%llu found after %u retries\n", |
672 | __func__, __LINE__, bus_id, dev_id, retries); | 672 | __func__, __LINE__, bus_id, dev_id, retries); |
673 | 673 | ||
674 | ps3_setup_dynamic_device(&repo); | 674 | ps3_setup_dynamic_device(&repo); |
@@ -715,14 +715,14 @@ static irqreturn_t ps3_notification_interrupt(int irq, void *data) | |||
715 | res = lv1_storage_get_async_status(PS3_NOTIFICATION_DEV_ID, &tag, | 715 | res = lv1_storage_get_async_status(PS3_NOTIFICATION_DEV_ID, &tag, |
716 | &status); | 716 | &status); |
717 | if (tag != dev->tag) | 717 | if (tag != dev->tag) |
718 | pr_err("%s:%u: tag mismatch, got %lx, expected %lx\n", | 718 | pr_err("%s:%u: tag mismatch, got %llx, expected %llx\n", |
719 | __func__, __LINE__, tag, dev->tag); | 719 | __func__, __LINE__, tag, dev->tag); |
720 | 720 | ||
721 | if (res) { | 721 | if (res) { |
722 | pr_err("%s:%u: res %d status 0x%lx\n", __func__, __LINE__, res, | 722 | pr_err("%s:%u: res %d status 0x%llx\n", __func__, __LINE__, res, |
723 | status); | 723 | status); |
724 | } else { | 724 | } else { |
725 | pr_debug("%s:%u: completed, status 0x%lx\n", __func__, | 725 | pr_debug("%s:%u: completed, status 0x%llx\n", __func__, |
726 | __LINE__, status); | 726 | __LINE__, status); |
727 | dev->lv1_status = status; | 727 | dev->lv1_status = status; |
728 | complete(&dev->done); | 728 | complete(&dev->done); |
@@ -761,7 +761,7 @@ static int ps3_notification_read_write(struct ps3_notification_device *dev, | |||
761 | } | 761 | } |
762 | 762 | ||
763 | if (dev->lv1_status) { | 763 | if (dev->lv1_status) { |
764 | pr_err("%s:%u: %s not completed, status 0x%lx\n", __func__, | 764 | pr_err("%s:%u: %s not completed, status 0x%llx\n", __func__, |
765 | __LINE__, op, dev->lv1_status); | 765 | __LINE__, op, dev->lv1_status); |
766 | return -EIO; | 766 | return -EIO; |
767 | } | 767 | } |
@@ -850,16 +850,16 @@ static int ps3_probe_thread(void *data) | |||
850 | if (res) | 850 | if (res) |
851 | break; | 851 | break; |
852 | 852 | ||
853 | pr_debug("%s:%u: notify event type 0x%lx bus id %lu dev id %lu" | 853 | pr_debug("%s:%u: notify event type 0x%llx bus id %llu dev id %llu" |
854 | " type %lu port %lu\n", __func__, __LINE__, | 854 | " type %llu port %llu\n", __func__, __LINE__, |
855 | notify_event->event_type, notify_event->bus_id, | 855 | notify_event->event_type, notify_event->bus_id, |
856 | notify_event->dev_id, notify_event->dev_type, | 856 | notify_event->dev_id, notify_event->dev_type, |
857 | notify_event->dev_port); | 857 | notify_event->dev_port); |
858 | 858 | ||
859 | if (notify_event->event_type != notify_region_probe || | 859 | if (notify_event->event_type != notify_region_probe || |
860 | notify_event->bus_id != dev.sbd.bus_id) { | 860 | notify_event->bus_id != dev.sbd.bus_id) { |
861 | pr_warning("%s:%u: bad notify_event: event %lu, " | 861 | pr_warning("%s:%u: bad notify_event: event %llu, " |
862 | "dev_id %lu, dev_type %lu\n", | 862 | "dev_id %llu, dev_type %llu\n", |
863 | __func__, __LINE__, notify_event->event_type, | 863 | __func__, __LINE__, notify_event->event_type, |
864 | notify_event->dev_id, | 864 | notify_event->dev_id, |
865 | notify_event->dev_type); | 865 | notify_event->dev_type); |
diff --git a/arch/powerpc/platforms/ps3/htab.c b/arch/powerpc/platforms/ps3/htab.c index 6eb1d4d182c9..1e8a1e39dfe8 100644 --- a/arch/powerpc/platforms/ps3/htab.c +++ b/arch/powerpc/platforms/ps3/htab.c | |||
@@ -75,7 +75,7 @@ static long ps3_hpte_insert(unsigned long hpte_group, unsigned long va, | |||
75 | 75 | ||
76 | if (result) { | 76 | if (result) { |
77 | /* all entries bolted !*/ | 77 | /* all entries bolted !*/ |
78 | pr_info("%s:result=%d va=%lx pa=%lx ix=%lx v=%lx r=%lx\n", | 78 | pr_info("%s:result=%d va=%lx pa=%lx ix=%lx v=%llx r=%llx\n", |
79 | __func__, result, va, pa, hpte_group, hpte_v, hpte_r); | 79 | __func__, result, va, pa, hpte_group, hpte_v, hpte_r); |
80 | BUG(); | 80 | BUG(); |
81 | } | 81 | } |
diff --git a/arch/powerpc/platforms/ps3/interrupt.c b/arch/powerpc/platforms/ps3/interrupt.c index e59634f7af96..8ec5ccf76b19 100644 --- a/arch/powerpc/platforms/ps3/interrupt.c +++ b/arch/powerpc/platforms/ps3/interrupt.c | |||
@@ -60,6 +60,8 @@ | |||
60 | * gives a usable range of plug values of {NUM_ISA_INTERRUPTS..63}. Note | 60 | * gives a usable range of plug values of {NUM_ISA_INTERRUPTS..63}. Note |
61 | * that there is no constraint on how many in this set an individual thread | 61 | * that there is no constraint on how many in this set an individual thread |
62 | * can acquire. | 62 | * can acquire. |
63 | * | ||
64 | * The mask is declared as unsigned long so we can use set/clear_bit on it. | ||
63 | */ | 65 | */ |
64 | 66 | ||
65 | #define PS3_BMP_MINALIGN 64 | 67 | #define PS3_BMP_MINALIGN 64 |
@@ -68,7 +70,7 @@ struct ps3_bmp { | |||
68 | struct { | 70 | struct { |
69 | u64 status; | 71 | u64 status; |
70 | u64 unused_1[3]; | 72 | u64 unused_1[3]; |
71 | u64 mask; | 73 | unsigned long mask; |
72 | u64 unused_2[3]; | 74 | u64 unused_2[3]; |
73 | }; | 75 | }; |
74 | u64 ipi_debug_brk_mask; | 76 | u64 ipi_debug_brk_mask; |
@@ -102,7 +104,7 @@ static void ps3_chip_mask(unsigned int virq) | |||
102 | struct ps3_private *pd = get_irq_chip_data(virq); | 104 | struct ps3_private *pd = get_irq_chip_data(virq); |
103 | unsigned long flags; | 105 | unsigned long flags; |
104 | 106 | ||
105 | pr_debug("%s:%d: thread_id %lu, virq %d\n", __func__, __LINE__, | 107 | pr_debug("%s:%d: thread_id %llu, virq %d\n", __func__, __LINE__, |
106 | pd->thread_id, virq); | 108 | pd->thread_id, virq); |
107 | 109 | ||
108 | local_irq_save(flags); | 110 | local_irq_save(flags); |
@@ -123,7 +125,7 @@ static void ps3_chip_unmask(unsigned int virq) | |||
123 | struct ps3_private *pd = get_irq_chip_data(virq); | 125 | struct ps3_private *pd = get_irq_chip_data(virq); |
124 | unsigned long flags; | 126 | unsigned long flags; |
125 | 127 | ||
126 | pr_debug("%s:%d: thread_id %lu, virq %d\n", __func__, __LINE__, | 128 | pr_debug("%s:%d: thread_id %llu, virq %d\n", __func__, __LINE__, |
127 | pd->thread_id, virq); | 129 | pd->thread_id, virq); |
128 | 130 | ||
129 | local_irq_save(flags); | 131 | local_irq_save(flags); |
@@ -221,7 +223,7 @@ static int ps3_virq_destroy(unsigned int virq) | |||
221 | { | 223 | { |
222 | const struct ps3_private *pd = get_irq_chip_data(virq); | 224 | const struct ps3_private *pd = get_irq_chip_data(virq); |
223 | 225 | ||
224 | pr_debug("%s:%d: ppe_id %lu, thread_id %lu, virq %u\n", __func__, | 226 | pr_debug("%s:%d: ppe_id %llu, thread_id %llu, virq %u\n", __func__, |
225 | __LINE__, pd->ppe_id, pd->thread_id, virq); | 227 | __LINE__, pd->ppe_id, pd->thread_id, virq); |
226 | 228 | ||
227 | set_irq_chip_data(virq, NULL); | 229 | set_irq_chip_data(virq, NULL); |
@@ -291,7 +293,7 @@ int ps3_irq_plug_destroy(unsigned int virq) | |||
291 | int result; | 293 | int result; |
292 | const struct ps3_private *pd = get_irq_chip_data(virq); | 294 | const struct ps3_private *pd = get_irq_chip_data(virq); |
293 | 295 | ||
294 | pr_debug("%s:%d: ppe_id %lu, thread_id %lu, virq %u\n", __func__, | 296 | pr_debug("%s:%d: ppe_id %llu, thread_id %llu, virq %u\n", __func__, |
295 | __LINE__, pd->ppe_id, pd->thread_id, virq); | 297 | __LINE__, pd->ppe_id, pd->thread_id, virq); |
296 | 298 | ||
297 | ps3_chip_mask(virq); | 299 | ps3_chip_mask(virq); |
@@ -322,7 +324,7 @@ EXPORT_SYMBOL_GPL(ps3_irq_plug_destroy); | |||
322 | int ps3_event_receive_port_setup(enum ps3_cpu_binding cpu, unsigned int *virq) | 324 | int ps3_event_receive_port_setup(enum ps3_cpu_binding cpu, unsigned int *virq) |
323 | { | 325 | { |
324 | int result; | 326 | int result; |
325 | unsigned long outlet; | 327 | u64 outlet; |
326 | 328 | ||
327 | result = lv1_construct_event_receive_port(&outlet); | 329 | result = lv1_construct_event_receive_port(&outlet); |
328 | 330 | ||
@@ -468,7 +470,7 @@ int ps3_io_irq_setup(enum ps3_cpu_binding cpu, unsigned int interrupt_id, | |||
468 | unsigned int *virq) | 470 | unsigned int *virq) |
469 | { | 471 | { |
470 | int result; | 472 | int result; |
471 | unsigned long outlet; | 473 | u64 outlet; |
472 | 474 | ||
473 | result = lv1_construct_io_irq_outlet(interrupt_id, &outlet); | 475 | result = lv1_construct_io_irq_outlet(interrupt_id, &outlet); |
474 | 476 | ||
@@ -525,7 +527,7 @@ int ps3_vuart_irq_setup(enum ps3_cpu_binding cpu, void* virt_addr_bmp, | |||
525 | unsigned int *virq) | 527 | unsigned int *virq) |
526 | { | 528 | { |
527 | int result; | 529 | int result; |
528 | unsigned long outlet; | 530 | u64 outlet; |
529 | u64 lpar_addr; | 531 | u64 lpar_addr; |
530 | 532 | ||
531 | BUG_ON(!is_kernel_addr((u64)virt_addr_bmp)); | 533 | BUG_ON(!is_kernel_addr((u64)virt_addr_bmp)); |
@@ -581,7 +583,7 @@ int ps3_spe_irq_setup(enum ps3_cpu_binding cpu, unsigned long spe_id, | |||
581 | unsigned int class, unsigned int *virq) | 583 | unsigned int class, unsigned int *virq) |
582 | { | 584 | { |
583 | int result; | 585 | int result; |
584 | unsigned long outlet; | 586 | u64 outlet; |
585 | 587 | ||
586 | BUG_ON(class > 2); | 588 | BUG_ON(class > 2); |
587 | 589 | ||
@@ -691,7 +693,7 @@ void __init ps3_register_ipi_debug_brk(unsigned int cpu, unsigned int virq) | |||
691 | 693 | ||
692 | pd->bmp.ipi_debug_brk_mask = 0x8000000000000000UL >> virq; | 694 | pd->bmp.ipi_debug_brk_mask = 0x8000000000000000UL >> virq; |
693 | 695 | ||
694 | pr_debug("%s:%d: cpu %u, virq %u, mask %lxh\n", __func__, __LINE__, | 696 | pr_debug("%s:%d: cpu %u, virq %u, mask %llxh\n", __func__, __LINE__, |
695 | cpu, virq, pd->bmp.ipi_debug_brk_mask); | 697 | cpu, virq, pd->bmp.ipi_debug_brk_mask); |
696 | } | 698 | } |
697 | 699 | ||
@@ -710,7 +712,7 @@ static unsigned int ps3_get_irq(void) | |||
710 | plug &= 0x3f; | 712 | plug &= 0x3f; |
711 | 713 | ||
712 | if (unlikely(plug == NO_IRQ)) { | 714 | if (unlikely(plug == NO_IRQ)) { |
713 | pr_debug("%s:%d: no plug found: thread_id %lu\n", __func__, | 715 | pr_debug("%s:%d: no plug found: thread_id %llu\n", __func__, |
714 | __LINE__, pd->thread_id); | 716 | __LINE__, pd->thread_id); |
715 | dump_bmp(&per_cpu(ps3_private, 0)); | 717 | dump_bmp(&per_cpu(ps3_private, 0)); |
716 | dump_bmp(&per_cpu(ps3_private, 1)); | 718 | dump_bmp(&per_cpu(ps3_private, 1)); |
@@ -745,7 +747,7 @@ void __init ps3_init_IRQ(void) | |||
745 | pd->thread_id = get_hard_smp_processor_id(cpu); | 747 | pd->thread_id = get_hard_smp_processor_id(cpu); |
746 | spin_lock_init(&pd->bmp.lock); | 748 | spin_lock_init(&pd->bmp.lock); |
747 | 749 | ||
748 | pr_debug("%s:%d: ppe_id %lu, thread_id %lu, bmp %lxh\n", | 750 | pr_debug("%s:%d: ppe_id %llu, thread_id %llu, bmp %lxh\n", |
749 | __func__, __LINE__, pd->ppe_id, pd->thread_id, | 751 | __func__, __LINE__, pd->ppe_id, pd->thread_id, |
750 | ps3_mm_phys_to_lpar(__pa(&pd->bmp))); | 752 | ps3_mm_phys_to_lpar(__pa(&pd->bmp))); |
751 | 753 | ||
@@ -770,6 +772,6 @@ void ps3_shutdown_IRQ(int cpu) | |||
770 | lv1_get_logical_ppe_id(&ppe_id); | 772 | lv1_get_logical_ppe_id(&ppe_id); |
771 | result = lv1_configure_irq_state_bitmap(ppe_id, thread_id, 0); | 773 | result = lv1_configure_irq_state_bitmap(ppe_id, thread_id, 0); |
772 | 774 | ||
773 | DBG("%s:%d: lv1_configure_irq_state_bitmap (%lu:%lu/%d) %s\n", __func__, | 775 | DBG("%s:%d: lv1_configure_irq_state_bitmap (%llu:%llu/%d) %s\n", __func__, |
774 | __LINE__, ppe_id, thread_id, cpu, ps3_result(result)); | 776 | __LINE__, ppe_id, thread_id, cpu, ps3_result(result)); |
775 | } | 777 | } |
diff --git a/arch/powerpc/platforms/ps3/mm.c b/arch/powerpc/platforms/ps3/mm.c index a4d49dd9e8a9..67de6bf3db3d 100644 --- a/arch/powerpc/platforms/ps3/mm.c +++ b/arch/powerpc/platforms/ps3/mm.c | |||
@@ -79,8 +79,8 @@ enum { | |||
79 | */ | 79 | */ |
80 | 80 | ||
81 | struct mem_region { | 81 | struct mem_region { |
82 | unsigned long base; | 82 | u64 base; |
83 | unsigned long size; | 83 | u64 size; |
84 | unsigned long offset; | 84 | unsigned long offset; |
85 | }; | 85 | }; |
86 | 86 | ||
@@ -103,9 +103,9 @@ struct mem_region { | |||
103 | */ | 103 | */ |
104 | 104 | ||
105 | struct map { | 105 | struct map { |
106 | unsigned long total; | 106 | u64 total; |
107 | unsigned long vas_id; | 107 | u64 vas_id; |
108 | unsigned long htab_size; | 108 | u64 htab_size; |
109 | struct mem_region rm; | 109 | struct mem_region rm; |
110 | struct mem_region r1; | 110 | struct mem_region r1; |
111 | }; | 111 | }; |
@@ -114,13 +114,13 @@ struct map { | |||
114 | static void __maybe_unused _debug_dump_map(const struct map *m, | 114 | static void __maybe_unused _debug_dump_map(const struct map *m, |
115 | const char *func, int line) | 115 | const char *func, int line) |
116 | { | 116 | { |
117 | DBG("%s:%d: map.total = %lxh\n", func, line, m->total); | 117 | DBG("%s:%d: map.total = %llxh\n", func, line, m->total); |
118 | DBG("%s:%d: map.rm.size = %lxh\n", func, line, m->rm.size); | 118 | DBG("%s:%d: map.rm.size = %llxh\n", func, line, m->rm.size); |
119 | DBG("%s:%d: map.vas_id = %lu\n", func, line, m->vas_id); | 119 | DBG("%s:%d: map.vas_id = %llu\n", func, line, m->vas_id); |
120 | DBG("%s:%d: map.htab_size = %lxh\n", func, line, m->htab_size); | 120 | DBG("%s:%d: map.htab_size = %llxh\n", func, line, m->htab_size); |
121 | DBG("%s:%d: map.r1.base = %lxh\n", func, line, m->r1.base); | 121 | DBG("%s:%d: map.r1.base = %llxh\n", func, line, m->r1.base); |
122 | DBG("%s:%d: map.r1.offset = %lxh\n", func, line, m->r1.offset); | 122 | DBG("%s:%d: map.r1.offset = %lxh\n", func, line, m->r1.offset); |
123 | DBG("%s:%d: map.r1.size = %lxh\n", func, line, m->r1.size); | 123 | DBG("%s:%d: map.r1.size = %llxh\n", func, line, m->r1.size); |
124 | } | 124 | } |
125 | 125 | ||
126 | static struct map map; | 126 | static struct map map; |
@@ -146,11 +146,11 @@ EXPORT_SYMBOL(ps3_mm_phys_to_lpar); | |||
146 | void __init ps3_mm_vas_create(unsigned long* htab_size) | 146 | void __init ps3_mm_vas_create(unsigned long* htab_size) |
147 | { | 147 | { |
148 | int result; | 148 | int result; |
149 | unsigned long start_address; | 149 | u64 start_address; |
150 | unsigned long size; | 150 | u64 size; |
151 | unsigned long access_right; | 151 | u64 access_right; |
152 | unsigned long max_page_size; | 152 | u64 max_page_size; |
153 | unsigned long flags; | 153 | u64 flags; |
154 | 154 | ||
155 | result = lv1_query_logical_partition_address_region_info(0, | 155 | result = lv1_query_logical_partition_address_region_info(0, |
156 | &start_address, &size, &access_right, &max_page_size, | 156 | &start_address, &size, &access_right, &max_page_size, |
@@ -164,7 +164,7 @@ void __init ps3_mm_vas_create(unsigned long* htab_size) | |||
164 | } | 164 | } |
165 | 165 | ||
166 | if (max_page_size < PAGE_SHIFT_16M) { | 166 | if (max_page_size < PAGE_SHIFT_16M) { |
167 | DBG("%s:%d: bad max_page_size %lxh\n", __func__, __LINE__, | 167 | DBG("%s:%d: bad max_page_size %llxh\n", __func__, __LINE__, |
168 | max_page_size); | 168 | max_page_size); |
169 | goto fail; | 169 | goto fail; |
170 | } | 170 | } |
@@ -208,7 +208,7 @@ void ps3_mm_vas_destroy(void) | |||
208 | { | 208 | { |
209 | int result; | 209 | int result; |
210 | 210 | ||
211 | DBG("%s:%d: map.vas_id = %lu\n", __func__, __LINE__, map.vas_id); | 211 | DBG("%s:%d: map.vas_id = %llu\n", __func__, __LINE__, map.vas_id); |
212 | 212 | ||
213 | if (map.vas_id) { | 213 | if (map.vas_id) { |
214 | result = lv1_select_virtual_address_space(0); | 214 | result = lv1_select_virtual_address_space(0); |
@@ -235,15 +235,14 @@ void ps3_mm_vas_destroy(void) | |||
235 | static int ps3_mm_region_create(struct mem_region *r, unsigned long size) | 235 | static int ps3_mm_region_create(struct mem_region *r, unsigned long size) |
236 | { | 236 | { |
237 | int result; | 237 | int result; |
238 | unsigned long muid; | 238 | u64 muid; |
239 | 239 | ||
240 | r->size = _ALIGN_DOWN(size, 1 << PAGE_SHIFT_16M); | 240 | r->size = _ALIGN_DOWN(size, 1 << PAGE_SHIFT_16M); |
241 | 241 | ||
242 | DBG("%s:%d requested %lxh\n", __func__, __LINE__, size); | 242 | DBG("%s:%d requested %lxh\n", __func__, __LINE__, size); |
243 | DBG("%s:%d actual %lxh\n", __func__, __LINE__, r->size); | 243 | DBG("%s:%d actual %llxh\n", __func__, __LINE__, r->size); |
244 | DBG("%s:%d difference %lxh (%luMB)\n", __func__, __LINE__, | 244 | DBG("%s:%d difference %llxh (%lluMB)\n", __func__, __LINE__, |
245 | (unsigned long)(size - r->size), | 245 | size - r->size, (size - r->size) / 1024 / 1024); |
246 | (size - r->size) / 1024 / 1024); | ||
247 | 246 | ||
248 | if (r->size == 0) { | 247 | if (r->size == 0) { |
249 | DBG("%s:%d: size == 0\n", __func__, __LINE__); | 248 | DBG("%s:%d: size == 0\n", __func__, __LINE__); |
@@ -277,7 +276,7 @@ static void ps3_mm_region_destroy(struct mem_region *r) | |||
277 | { | 276 | { |
278 | int result; | 277 | int result; |
279 | 278 | ||
280 | DBG("%s:%d: r->base = %lxh\n", __func__, __LINE__, r->base); | 279 | DBG("%s:%d: r->base = %llxh\n", __func__, __LINE__, r->base); |
281 | if (r->base) { | 280 | if (r->base) { |
282 | result = lv1_release_memory(r->base); | 281 | result = lv1_release_memory(r->base); |
283 | BUG_ON(result); | 282 | BUG_ON(result); |
@@ -355,7 +354,7 @@ static unsigned long dma_sb_lpar_to_bus(struct ps3_dma_region *r, | |||
355 | static void __maybe_unused _dma_dump_region(const struct ps3_dma_region *r, | 354 | static void __maybe_unused _dma_dump_region(const struct ps3_dma_region *r, |
356 | const char *func, int line) | 355 | const char *func, int line) |
357 | { | 356 | { |
358 | DBG("%s:%d: dev %lu:%lu\n", func, line, r->dev->bus_id, | 357 | DBG("%s:%d: dev %llu:%llu\n", func, line, r->dev->bus_id, |
359 | r->dev->dev_id); | 358 | r->dev->dev_id); |
360 | DBG("%s:%d: page_size %u\n", func, line, r->page_size); | 359 | DBG("%s:%d: page_size %u\n", func, line, r->page_size); |
361 | DBG("%s:%d: bus_addr %lxh\n", func, line, r->bus_addr); | 360 | DBG("%s:%d: bus_addr %lxh\n", func, line, r->bus_addr); |
@@ -390,7 +389,7 @@ struct dma_chunk { | |||
390 | static void _dma_dump_chunk (const struct dma_chunk* c, const char* func, | 389 | static void _dma_dump_chunk (const struct dma_chunk* c, const char* func, |
391 | int line) | 390 | int line) |
392 | { | 391 | { |
393 | DBG("%s:%d: r.dev %lu:%lu\n", func, line, | 392 | DBG("%s:%d: r.dev %llu:%llu\n", func, line, |
394 | c->region->dev->bus_id, c->region->dev->dev_id); | 393 | c->region->dev->bus_id, c->region->dev->dev_id); |
395 | DBG("%s:%d: r.bus_addr %lxh\n", func, line, c->region->bus_addr); | 394 | DBG("%s:%d: r.bus_addr %lxh\n", func, line, c->region->bus_addr); |
396 | DBG("%s:%d: r.page_size %u\n", func, line, c->region->page_size); | 395 | DBG("%s:%d: r.page_size %u\n", func, line, c->region->page_size); |
@@ -596,7 +595,7 @@ static int dma_ioc0_map_pages(struct ps3_dma_region *r, unsigned long phys_addr, | |||
596 | 595 | ||
597 | /* build ioptes for the area */ | 596 | /* build ioptes for the area */ |
598 | pages = len >> r->page_size; | 597 | pages = len >> r->page_size; |
599 | DBG("%s: pgsize=%#x len=%#lx pages=%#x iopteflag=%#lx\n", __func__, | 598 | DBG("%s: pgsize=%#x len=%#lx pages=%#x iopteflag=%#llx\n", __func__, |
600 | r->page_size, r->len, pages, iopte_flag); | 599 | r->page_size, r->len, pages, iopte_flag); |
601 | for (iopage = 0; iopage < pages; iopage++) { | 600 | for (iopage = 0; iopage < pages; iopage++) { |
602 | offset = (1 << r->page_size) * iopage; | 601 | offset = (1 << r->page_size) * iopage; |
@@ -648,13 +647,14 @@ fail_alloc: | |||
648 | static int dma_sb_region_create(struct ps3_dma_region *r) | 647 | static int dma_sb_region_create(struct ps3_dma_region *r) |
649 | { | 648 | { |
650 | int result; | 649 | int result; |
650 | u64 bus_addr; | ||
651 | 651 | ||
652 | DBG(" -> %s:%d:\n", __func__, __LINE__); | 652 | DBG(" -> %s:%d:\n", __func__, __LINE__); |
653 | 653 | ||
654 | BUG_ON(!r); | 654 | BUG_ON(!r); |
655 | 655 | ||
656 | if (!r->dev->bus_id) { | 656 | if (!r->dev->bus_id) { |
657 | pr_info("%s:%d: %lu:%lu no dma\n", __func__, __LINE__, | 657 | pr_info("%s:%d: %llu:%llu no dma\n", __func__, __LINE__, |
658 | r->dev->bus_id, r->dev->dev_id); | 658 | r->dev->bus_id, r->dev->dev_id); |
659 | return 0; | 659 | return 0; |
660 | } | 660 | } |
@@ -671,7 +671,8 @@ static int dma_sb_region_create(struct ps3_dma_region *r) | |||
671 | 671 | ||
672 | result = lv1_allocate_device_dma_region(r->dev->bus_id, r->dev->dev_id, | 672 | result = lv1_allocate_device_dma_region(r->dev->bus_id, r->dev->dev_id, |
673 | roundup_pow_of_two(r->len), r->page_size, r->region_type, | 673 | roundup_pow_of_two(r->len), r->page_size, r->region_type, |
674 | &r->bus_addr); | 674 | &bus_addr); |
675 | r->bus_addr = bus_addr; | ||
675 | 676 | ||
676 | if (result) { | 677 | if (result) { |
677 | DBG("%s:%d: lv1_allocate_device_dma_region failed: %s\n", | 678 | DBG("%s:%d: lv1_allocate_device_dma_region failed: %s\n", |
@@ -685,6 +686,7 @@ static int dma_sb_region_create(struct ps3_dma_region *r) | |||
685 | static int dma_ioc0_region_create(struct ps3_dma_region *r) | 686 | static int dma_ioc0_region_create(struct ps3_dma_region *r) |
686 | { | 687 | { |
687 | int result; | 688 | int result; |
689 | u64 bus_addr; | ||
688 | 690 | ||
689 | INIT_LIST_HEAD(&r->chunk_list.head); | 691 | INIT_LIST_HEAD(&r->chunk_list.head); |
690 | spin_lock_init(&r->chunk_list.lock); | 692 | spin_lock_init(&r->chunk_list.lock); |
@@ -692,7 +694,8 @@ static int dma_ioc0_region_create(struct ps3_dma_region *r) | |||
692 | result = lv1_allocate_io_segment(0, | 694 | result = lv1_allocate_io_segment(0, |
693 | r->len, | 695 | r->len, |
694 | r->page_size, | 696 | r->page_size, |
695 | &r->bus_addr); | 697 | &bus_addr); |
698 | r->bus_addr = bus_addr; | ||
696 | if (result) { | 699 | if (result) { |
697 | DBG("%s:%d: lv1_allocate_io_segment failed: %s\n", | 700 | DBG("%s:%d: lv1_allocate_io_segment failed: %s\n", |
698 | __func__, __LINE__, ps3_result(result)); | 701 | __func__, __LINE__, ps3_result(result)); |
@@ -720,7 +723,7 @@ static int dma_sb_region_free(struct ps3_dma_region *r) | |||
720 | BUG_ON(!r); | 723 | BUG_ON(!r); |
721 | 724 | ||
722 | if (!r->dev->bus_id) { | 725 | if (!r->dev->bus_id) { |
723 | pr_info("%s:%d: %lu:%lu no dma\n", __func__, __LINE__, | 726 | pr_info("%s:%d: %llu:%llu no dma\n", __func__, __LINE__, |
724 | r->dev->bus_id, r->dev->dev_id); | 727 | r->dev->bus_id, r->dev->dev_id); |
725 | return 0; | 728 | return 0; |
726 | } | 729 | } |
@@ -777,7 +780,7 @@ static int dma_ioc0_region_free(struct ps3_dma_region *r) | |||
777 | */ | 780 | */ |
778 | 781 | ||
779 | static int dma_sb_map_area(struct ps3_dma_region *r, unsigned long virt_addr, | 782 | static int dma_sb_map_area(struct ps3_dma_region *r, unsigned long virt_addr, |
780 | unsigned long len, unsigned long *bus_addr, | 783 | unsigned long len, dma_addr_t *bus_addr, |
781 | u64 iopte_flag) | 784 | u64 iopte_flag) |
782 | { | 785 | { |
783 | int result; | 786 | int result; |
@@ -800,7 +803,7 @@ static int dma_sb_map_area(struct ps3_dma_region *r, unsigned long virt_addr, | |||
800 | DBG("%s:%d lpar_addr %lxh\n", __func__, __LINE__, | 803 | DBG("%s:%d lpar_addr %lxh\n", __func__, __LINE__, |
801 | lpar_addr); | 804 | lpar_addr); |
802 | DBG("%s:%d len %lxh\n", __func__, __LINE__, len); | 805 | DBG("%s:%d len %lxh\n", __func__, __LINE__, len); |
803 | DBG("%s:%d bus_addr %lxh (%lxh)\n", __func__, __LINE__, | 806 | DBG("%s:%d bus_addr %llxh (%lxh)\n", __func__, __LINE__, |
804 | *bus_addr, len); | 807 | *bus_addr, len); |
805 | } | 808 | } |
806 | 809 | ||
@@ -832,7 +835,7 @@ static int dma_sb_map_area(struct ps3_dma_region *r, unsigned long virt_addr, | |||
832 | } | 835 | } |
833 | 836 | ||
834 | static int dma_ioc0_map_area(struct ps3_dma_region *r, unsigned long virt_addr, | 837 | static int dma_ioc0_map_area(struct ps3_dma_region *r, unsigned long virt_addr, |
835 | unsigned long len, unsigned long *bus_addr, | 838 | unsigned long len, dma_addr_t *bus_addr, |
836 | u64 iopte_flag) | 839 | u64 iopte_flag) |
837 | { | 840 | { |
838 | int result; | 841 | int result; |
@@ -872,7 +875,7 @@ static int dma_ioc0_map_area(struct ps3_dma_region *r, unsigned long virt_addr, | |||
872 | return result; | 875 | return result; |
873 | } | 876 | } |
874 | *bus_addr = c->bus_addr + phys_addr - aligned_phys; | 877 | *bus_addr = c->bus_addr + phys_addr - aligned_phys; |
875 | DBG("%s: va=%#lx pa=%#lx a_pa=%#lx bus=%#lx\n", __func__, | 878 | DBG("%s: va=%#lx pa=%#lx a_pa=%#lx bus=%#llx\n", __func__, |
876 | virt_addr, phys_addr, aligned_phys, *bus_addr); | 879 | virt_addr, phys_addr, aligned_phys, *bus_addr); |
877 | c->usage_count = 1; | 880 | c->usage_count = 1; |
878 | 881 | ||
@@ -889,7 +892,7 @@ static int dma_ioc0_map_area(struct ps3_dma_region *r, unsigned long virt_addr, | |||
889 | * This is the common dma unmap routine. | 892 | * This is the common dma unmap routine. |
890 | */ | 893 | */ |
891 | 894 | ||
892 | static int dma_sb_unmap_area(struct ps3_dma_region *r, unsigned long bus_addr, | 895 | static int dma_sb_unmap_area(struct ps3_dma_region *r, dma_addr_t bus_addr, |
893 | unsigned long len) | 896 | unsigned long len) |
894 | { | 897 | { |
895 | unsigned long flags; | 898 | unsigned long flags; |
@@ -903,7 +906,7 @@ static int dma_sb_unmap_area(struct ps3_dma_region *r, unsigned long bus_addr, | |||
903 | 1 << r->page_size); | 906 | 1 << r->page_size); |
904 | unsigned long aligned_len = _ALIGN_UP(len + bus_addr | 907 | unsigned long aligned_len = _ALIGN_UP(len + bus_addr |
905 | - aligned_bus, 1 << r->page_size); | 908 | - aligned_bus, 1 << r->page_size); |
906 | DBG("%s:%d: not found: bus_addr %lxh\n", | 909 | DBG("%s:%d: not found: bus_addr %llxh\n", |
907 | __func__, __LINE__, bus_addr); | 910 | __func__, __LINE__, bus_addr); |
908 | DBG("%s:%d: not found: len %lxh\n", | 911 | DBG("%s:%d: not found: len %lxh\n", |
909 | __func__, __LINE__, len); | 912 | __func__, __LINE__, len); |
@@ -926,12 +929,12 @@ static int dma_sb_unmap_area(struct ps3_dma_region *r, unsigned long bus_addr, | |||
926 | } | 929 | } |
927 | 930 | ||
928 | static int dma_ioc0_unmap_area(struct ps3_dma_region *r, | 931 | static int dma_ioc0_unmap_area(struct ps3_dma_region *r, |
929 | unsigned long bus_addr, unsigned long len) | 932 | dma_addr_t bus_addr, unsigned long len) |
930 | { | 933 | { |
931 | unsigned long flags; | 934 | unsigned long flags; |
932 | struct dma_chunk *c; | 935 | struct dma_chunk *c; |
933 | 936 | ||
934 | DBG("%s: start a=%#lx l=%#lx\n", __func__, bus_addr, len); | 937 | DBG("%s: start a=%#llx l=%#lx\n", __func__, bus_addr, len); |
935 | spin_lock_irqsave(&r->chunk_list.lock, flags); | 938 | spin_lock_irqsave(&r->chunk_list.lock, flags); |
936 | c = dma_find_chunk(r, bus_addr, len); | 939 | c = dma_find_chunk(r, bus_addr, len); |
937 | 940 | ||
@@ -941,7 +944,7 @@ static int dma_ioc0_unmap_area(struct ps3_dma_region *r, | |||
941 | unsigned long aligned_len = _ALIGN_UP(len + bus_addr | 944 | unsigned long aligned_len = _ALIGN_UP(len + bus_addr |
942 | - aligned_bus, | 945 | - aligned_bus, |
943 | 1 << r->page_size); | 946 | 1 << r->page_size); |
944 | DBG("%s:%d: not found: bus_addr %lxh\n", | 947 | DBG("%s:%d: not found: bus_addr %llxh\n", |
945 | __func__, __LINE__, bus_addr); | 948 | __func__, __LINE__, bus_addr); |
946 | DBG("%s:%d: not found: len %lxh\n", | 949 | DBG("%s:%d: not found: len %lxh\n", |
947 | __func__, __LINE__, len); | 950 | __func__, __LINE__, len); |
@@ -975,7 +978,8 @@ static int dma_ioc0_unmap_area(struct ps3_dma_region *r, | |||
975 | static int dma_sb_region_create_linear(struct ps3_dma_region *r) | 978 | static int dma_sb_region_create_linear(struct ps3_dma_region *r) |
976 | { | 979 | { |
977 | int result; | 980 | int result; |
978 | unsigned long virt_addr, len, tmp; | 981 | unsigned long virt_addr, len; |
982 | dma_addr_t tmp; | ||
979 | 983 | ||
980 | if (r->len > 16*1024*1024) { /* FIXME: need proper fix */ | 984 | if (r->len > 16*1024*1024) { /* FIXME: need proper fix */ |
981 | /* force 16M dma pages for linear mapping */ | 985 | /* force 16M dma pages for linear mapping */ |
@@ -1027,7 +1031,8 @@ static int dma_sb_region_create_linear(struct ps3_dma_region *r) | |||
1027 | static int dma_sb_region_free_linear(struct ps3_dma_region *r) | 1031 | static int dma_sb_region_free_linear(struct ps3_dma_region *r) |
1028 | { | 1032 | { |
1029 | int result; | 1033 | int result; |
1030 | unsigned long bus_addr, len, lpar_addr; | 1034 | dma_addr_t bus_addr; |
1035 | unsigned long len, lpar_addr; | ||
1031 | 1036 | ||
1032 | if (r->offset < map.rm.size) { | 1037 | if (r->offset < map.rm.size) { |
1033 | /* Unmap (part of) 1st RAM chunk */ | 1038 | /* Unmap (part of) 1st RAM chunk */ |
@@ -1072,7 +1077,7 @@ static int dma_sb_region_free_linear(struct ps3_dma_region *r) | |||
1072 | */ | 1077 | */ |
1073 | 1078 | ||
1074 | static int dma_sb_map_area_linear(struct ps3_dma_region *r, | 1079 | static int dma_sb_map_area_linear(struct ps3_dma_region *r, |
1075 | unsigned long virt_addr, unsigned long len, unsigned long *bus_addr, | 1080 | unsigned long virt_addr, unsigned long len, dma_addr_t *bus_addr, |
1076 | u64 iopte_flag) | 1081 | u64 iopte_flag) |
1077 | { | 1082 | { |
1078 | unsigned long phys_addr = is_kernel_addr(virt_addr) ? __pa(virt_addr) | 1083 | unsigned long phys_addr = is_kernel_addr(virt_addr) ? __pa(virt_addr) |
@@ -1091,7 +1096,7 @@ static int dma_sb_map_area_linear(struct ps3_dma_region *r, | |||
1091 | */ | 1096 | */ |
1092 | 1097 | ||
1093 | static int dma_sb_unmap_area_linear(struct ps3_dma_region *r, | 1098 | static int dma_sb_unmap_area_linear(struct ps3_dma_region *r, |
1094 | unsigned long bus_addr, unsigned long len) | 1099 | dma_addr_t bus_addr, unsigned long len) |
1095 | { | 1100 | { |
1096 | return 0; | 1101 | return 0; |
1097 | }; | 1102 | }; |
@@ -1169,13 +1174,13 @@ int ps3_dma_region_free(struct ps3_dma_region *r) | |||
1169 | EXPORT_SYMBOL(ps3_dma_region_free); | 1174 | EXPORT_SYMBOL(ps3_dma_region_free); |
1170 | 1175 | ||
1171 | int ps3_dma_map(struct ps3_dma_region *r, unsigned long virt_addr, | 1176 | int ps3_dma_map(struct ps3_dma_region *r, unsigned long virt_addr, |
1172 | unsigned long len, unsigned long *bus_addr, | 1177 | unsigned long len, dma_addr_t *bus_addr, |
1173 | u64 iopte_flag) | 1178 | u64 iopte_flag) |
1174 | { | 1179 | { |
1175 | return r->region_ops->map(r, virt_addr, len, bus_addr, iopte_flag); | 1180 | return r->region_ops->map(r, virt_addr, len, bus_addr, iopte_flag); |
1176 | } | 1181 | } |
1177 | 1182 | ||
1178 | int ps3_dma_unmap(struct ps3_dma_region *r, unsigned long bus_addr, | 1183 | int ps3_dma_unmap(struct ps3_dma_region *r, dma_addr_t bus_addr, |
1179 | unsigned long len) | 1184 | unsigned long len) |
1180 | { | 1185 | { |
1181 | return r->region_ops->unmap(r, bus_addr, len); | 1186 | return r->region_ops->unmap(r, bus_addr, len); |
diff --git a/arch/powerpc/platforms/ps3/os-area.c b/arch/powerpc/platforms/ps3/os-area.c index 1d201782d4e5..e1c83c23b435 100644 --- a/arch/powerpc/platforms/ps3/os-area.c +++ b/arch/powerpc/platforms/ps3/os-area.c | |||
@@ -306,7 +306,7 @@ static void _dump_params(const struct os_area_params *p, const char *func, | |||
306 | { | 306 | { |
307 | pr_debug("%s:%d: p.boot_flag: %u\n", func, line, p->boot_flag); | 307 | pr_debug("%s:%d: p.boot_flag: %u\n", func, line, p->boot_flag); |
308 | pr_debug("%s:%d: p.num_params: %u\n", func, line, p->num_params); | 308 | pr_debug("%s:%d: p.num_params: %u\n", func, line, p->num_params); |
309 | pr_debug("%s:%d: p.rtc_diff %ld\n", func, line, p->rtc_diff); | 309 | pr_debug("%s:%d: p.rtc_diff %lld\n", func, line, p->rtc_diff); |
310 | pr_debug("%s:%d: p.av_multi_out %u\n", func, line, p->av_multi_out); | 310 | pr_debug("%s:%d: p.av_multi_out %u\n", func, line, p->av_multi_out); |
311 | pr_debug("%s:%d: p.ctrl_button: %u\n", func, line, p->ctrl_button); | 311 | pr_debug("%s:%d: p.ctrl_button: %u\n", func, line, p->ctrl_button); |
312 | pr_debug("%s:%d: p.static_ip_addr: %u.%u.%u.%u\n", func, line, | 312 | pr_debug("%s:%d: p.static_ip_addr: %u.%u.%u.%u\n", func, line, |
diff --git a/arch/powerpc/platforms/ps3/repository.c b/arch/powerpc/platforms/ps3/repository.c index 22063adeb38b..5e304c292f68 100644 --- a/arch/powerpc/platforms/ps3/repository.c +++ b/arch/powerpc/platforms/ps3/repository.c | |||
@@ -44,7 +44,7 @@ static void _dump_field(const char *hdr, u64 n, const char *func, int line) | |||
44 | s[i] = (in[i] <= 126 && in[i] >= 32) ? in[i] : '.'; | 44 | s[i] = (in[i] <= 126 && in[i] >= 32) ? in[i] : '.'; |
45 | s[i] = 0; | 45 | s[i] = 0; |
46 | 46 | ||
47 | pr_debug("%s:%d: %s%016lx : %s\n", func, line, hdr, n, s); | 47 | pr_debug("%s:%d: %s%016llx : %s\n", func, line, hdr, n, s); |
48 | #endif | 48 | #endif |
49 | } | 49 | } |
50 | 50 | ||
@@ -70,8 +70,8 @@ static void _dump_node(unsigned int lpar_id, u64 n1, u64 n2, u64 n3, u64 n4, | |||
70 | _dump_field("n2: ", n2, func, line); | 70 | _dump_field("n2: ", n2, func, line); |
71 | _dump_field("n3: ", n3, func, line); | 71 | _dump_field("n3: ", n3, func, line); |
72 | _dump_field("n4: ", n4, func, line); | 72 | _dump_field("n4: ", n4, func, line); |
73 | pr_debug("%s:%d: v1: %016lx\n", func, line, v1); | 73 | pr_debug("%s:%d: v1: %016llx\n", func, line, v1); |
74 | pr_debug("%s:%d: v2: %016lx\n", func, line, v2); | 74 | pr_debug("%s:%d: v2: %016llx\n", func, line, v2); |
75 | } | 75 | } |
76 | 76 | ||
77 | /** | 77 | /** |
@@ -149,10 +149,10 @@ static int read_node(unsigned int lpar_id, u64 n1, u64 n2, u64 n3, u64 n4, | |||
149 | *_v2 = v2; | 149 | *_v2 = v2; |
150 | 150 | ||
151 | if (v1 && !_v1) | 151 | if (v1 && !_v1) |
152 | pr_debug("%s:%d: warning: discarding non-zero v1: %016lx\n", | 152 | pr_debug("%s:%d: warning: discarding non-zero v1: %016llx\n", |
153 | __func__, __LINE__, v1); | 153 | __func__, __LINE__, v1); |
154 | if (v2 && !_v2) | 154 | if (v2 && !_v2) |
155 | pr_debug("%s:%d: warning: discarding non-zero v2: %016lx\n", | 155 | pr_debug("%s:%d: warning: discarding non-zero v2: %016llx\n", |
156 | __func__, __LINE__, v2); | 156 | __func__, __LINE__, v2); |
157 | 157 | ||
158 | return 0; | 158 | return 0; |
@@ -327,7 +327,7 @@ int ps3_repository_find_device(struct ps3_repository_device *repo) | |||
327 | return result; | 327 | return result; |
328 | } | 328 | } |
329 | 329 | ||
330 | pr_debug("%s:%d: bus_type %u, bus_index %u, bus_id %lu, num_dev %u\n", | 330 | pr_debug("%s:%d: bus_type %u, bus_index %u, bus_id %llu, num_dev %u\n", |
331 | __func__, __LINE__, tmp.bus_type, tmp.bus_index, tmp.bus_id, | 331 | __func__, __LINE__, tmp.bus_type, tmp.bus_index, tmp.bus_id, |
332 | num_dev); | 332 | num_dev); |
333 | 333 | ||
@@ -353,7 +353,7 @@ int ps3_repository_find_device(struct ps3_repository_device *repo) | |||
353 | return result; | 353 | return result; |
354 | } | 354 | } |
355 | 355 | ||
356 | pr_debug("%s:%d: found: dev_type %u, dev_index %u, dev_id %lu\n", | 356 | pr_debug("%s:%d: found: dev_type %u, dev_index %u, dev_id %llu\n", |
357 | __func__, __LINE__, tmp.dev_type, tmp.dev_index, tmp.dev_id); | 357 | __func__, __LINE__, tmp.dev_type, tmp.dev_index, tmp.dev_id); |
358 | 358 | ||
359 | *repo = tmp; | 359 | *repo = tmp; |
@@ -367,7 +367,7 @@ int ps3_repository_find_device_by_id(struct ps3_repository_device *repo, | |||
367 | struct ps3_repository_device tmp; | 367 | struct ps3_repository_device tmp; |
368 | unsigned int num_dev; | 368 | unsigned int num_dev; |
369 | 369 | ||
370 | pr_debug(" -> %s:%u: find device by id %lu:%lu\n", __func__, __LINE__, | 370 | pr_debug(" -> %s:%u: find device by id %llu:%llu\n", __func__, __LINE__, |
371 | bus_id, dev_id); | 371 | bus_id, dev_id); |
372 | 372 | ||
373 | for (tmp.bus_index = 0; tmp.bus_index < 10; tmp.bus_index++) { | 373 | for (tmp.bus_index = 0; tmp.bus_index < 10; tmp.bus_index++) { |
@@ -382,7 +382,7 @@ int ps3_repository_find_device_by_id(struct ps3_repository_device *repo, | |||
382 | if (tmp.bus_id == bus_id) | 382 | if (tmp.bus_id == bus_id) |
383 | goto found_bus; | 383 | goto found_bus; |
384 | 384 | ||
385 | pr_debug("%s:%u: skip, bus_id %lu\n", __func__, __LINE__, | 385 | pr_debug("%s:%u: skip, bus_id %llu\n", __func__, __LINE__, |
386 | tmp.bus_id); | 386 | tmp.bus_id); |
387 | } | 387 | } |
388 | pr_debug(" <- %s:%u: bus not found\n", __func__, __LINE__); | 388 | pr_debug(" <- %s:%u: bus not found\n", __func__, __LINE__); |
@@ -416,7 +416,7 @@ found_bus: | |||
416 | if (tmp.dev_id == dev_id) | 416 | if (tmp.dev_id == dev_id) |
417 | goto found_dev; | 417 | goto found_dev; |
418 | 418 | ||
419 | pr_debug("%s:%u: skip, dev_id %lu\n", __func__, __LINE__, | 419 | pr_debug("%s:%u: skip, dev_id %llu\n", __func__, __LINE__, |
420 | tmp.dev_id); | 420 | tmp.dev_id); |
421 | } | 421 | } |
422 | pr_debug(" <- %s:%u: dev not found\n", __func__, __LINE__); | 422 | pr_debug(" <- %s:%u: dev not found\n", __func__, __LINE__); |
@@ -430,7 +430,7 @@ found_dev: | |||
430 | return result; | 430 | return result; |
431 | } | 431 | } |
432 | 432 | ||
433 | pr_debug(" <- %s:%u: found: type (%u:%u) index (%u:%u) id (%lu:%lu)\n", | 433 | pr_debug(" <- %s:%u: found: type (%u:%u) index (%u:%u) id (%llu:%llu)\n", |
434 | __func__, __LINE__, tmp.bus_type, tmp.dev_type, tmp.bus_index, | 434 | __func__, __LINE__, tmp.bus_type, tmp.dev_type, tmp.bus_index, |
435 | tmp.dev_index, tmp.bus_id, tmp.dev_id); | 435 | tmp.dev_index, tmp.bus_id, tmp.dev_id); |
436 | *repo = tmp; | 436 | *repo = tmp; |
diff --git a/arch/powerpc/platforms/ps3/setup.c b/arch/powerpc/platforms/ps3/setup.c index 35f3e85cf60e..3331ccbb8d38 100644 --- a/arch/powerpc/platforms/ps3/setup.c +++ b/arch/powerpc/platforms/ps3/setup.c | |||
@@ -186,7 +186,7 @@ early_param("ps3flash", early_parse_ps3flash); | |||
186 | #define prealloc_ps3flash_bounce_buffer() do { } while (0) | 186 | #define prealloc_ps3flash_bounce_buffer() do { } while (0) |
187 | #endif | 187 | #endif |
188 | 188 | ||
189 | static int ps3_set_dabr(u64 dabr) | 189 | static int ps3_set_dabr(unsigned long dabr) |
190 | { | 190 | { |
191 | enum {DABR_USER = 1, DABR_KERNEL = 2,}; | 191 | enum {DABR_USER = 1, DABR_KERNEL = 2,}; |
192 | 192 | ||
diff --git a/arch/powerpc/platforms/ps3/spu.c b/arch/powerpc/platforms/ps3/spu.c index ccae3d446b98..b3c6a993f9f3 100644 --- a/arch/powerpc/platforms/ps3/spu.c +++ b/arch/powerpc/platforms/ps3/spu.c | |||
@@ -149,7 +149,7 @@ EXPORT_SYMBOL_GPL(ps3_get_spe_id); | |||
149 | 149 | ||
150 | static unsigned long get_vas_id(void) | 150 | static unsigned long get_vas_id(void) |
151 | { | 151 | { |
152 | unsigned long id; | 152 | u64 id; |
153 | 153 | ||
154 | lv1_get_logical_ppe_id(&id); | 154 | lv1_get_logical_ppe_id(&id); |
155 | lv1_get_virtual_address_space_id_of_ppe(id, &id); | 155 | lv1_get_virtual_address_space_id_of_ppe(id, &id); |
@@ -160,14 +160,18 @@ static unsigned long get_vas_id(void) | |||
160 | static int __init construct_spu(struct spu *spu) | 160 | static int __init construct_spu(struct spu *spu) |
161 | { | 161 | { |
162 | int result; | 162 | int result; |
163 | unsigned long unused; | 163 | u64 unused; |
164 | u64 problem_phys; | ||
165 | u64 local_store_phys; | ||
164 | 166 | ||
165 | result = lv1_construct_logical_spe(PAGE_SHIFT, PAGE_SHIFT, PAGE_SHIFT, | 167 | result = lv1_construct_logical_spe(PAGE_SHIFT, PAGE_SHIFT, PAGE_SHIFT, |
166 | PAGE_SHIFT, PAGE_SHIFT, get_vas_id(), SPE_TYPE_LOGICAL, | 168 | PAGE_SHIFT, PAGE_SHIFT, get_vas_id(), SPE_TYPE_LOGICAL, |
167 | &spu_pdata(spu)->priv2_addr, &spu->problem_phys, | 169 | &spu_pdata(spu)->priv2_addr, &problem_phys, |
168 | &spu->local_store_phys, &unused, | 170 | &local_store_phys, &unused, |
169 | &spu_pdata(spu)->shadow_addr, | 171 | &spu_pdata(spu)->shadow_addr, |
170 | &spu_pdata(spu)->spe_id); | 172 | &spu_pdata(spu)->spe_id); |
173 | spu->problem_phys = problem_phys; | ||
174 | spu->local_store_phys = local_store_phys; | ||
171 | 175 | ||
172 | if (result) { | 176 | if (result) { |
173 | pr_debug("%s:%d: lv1_construct_logical_spe failed: %s\n", | 177 | pr_debug("%s:%d: lv1_construct_logical_spe failed: %s\n", |
diff --git a/arch/powerpc/platforms/ps3/system-bus.c b/arch/powerpc/platforms/ps3/system-bus.c index ee0d22911621..58311a867851 100644 --- a/arch/powerpc/platforms/ps3/system-bus.c +++ b/arch/powerpc/platforms/ps3/system-bus.c | |||
@@ -182,7 +182,7 @@ int ps3_open_hv_device(struct ps3_system_bus_device *dev) | |||
182 | case PS3_MATCH_ID_SYSTEM_MANAGER: | 182 | case PS3_MATCH_ID_SYSTEM_MANAGER: |
183 | pr_debug("%s:%d: unsupported match_id: %u\n", __func__, | 183 | pr_debug("%s:%d: unsupported match_id: %u\n", __func__, |
184 | __LINE__, dev->match_id); | 184 | __LINE__, dev->match_id); |
185 | pr_debug("%s:%d: bus_id: %lu\n", __func__, __LINE__, | 185 | pr_debug("%s:%d: bus_id: %llu\n", __func__, __LINE__, |
186 | dev->bus_id); | 186 | dev->bus_id); |
187 | BUG(); | 187 | BUG(); |
188 | return -EINVAL; | 188 | return -EINVAL; |
@@ -220,7 +220,7 @@ int ps3_close_hv_device(struct ps3_system_bus_device *dev) | |||
220 | case PS3_MATCH_ID_SYSTEM_MANAGER: | 220 | case PS3_MATCH_ID_SYSTEM_MANAGER: |
221 | pr_debug("%s:%d: unsupported match_id: %u\n", __func__, | 221 | pr_debug("%s:%d: unsupported match_id: %u\n", __func__, |
222 | __LINE__, dev->match_id); | 222 | __LINE__, dev->match_id); |
223 | pr_debug("%s:%d: bus_id: %lu\n", __func__, __LINE__, | 223 | pr_debug("%s:%d: bus_id: %llu\n", __func__, __LINE__, |
224 | dev->bus_id); | 224 | dev->bus_id); |
225 | BUG(); | 225 | BUG(); |
226 | return -EINVAL; | 226 | return -EINVAL; |
@@ -240,7 +240,7 @@ EXPORT_SYMBOL_GPL(ps3_close_hv_device); | |||
240 | static void _dump_mmio_region(const struct ps3_mmio_region* r, | 240 | static void _dump_mmio_region(const struct ps3_mmio_region* r, |
241 | const char* func, int line) | 241 | const char* func, int line) |
242 | { | 242 | { |
243 | pr_debug("%s:%d: dev %lu:%lu\n", func, line, r->dev->bus_id, | 243 | pr_debug("%s:%d: dev %llu:%llu\n", func, line, r->dev->bus_id, |
244 | r->dev->dev_id); | 244 | r->dev->dev_id); |
245 | pr_debug("%s:%d: bus_addr %lxh\n", func, line, r->bus_addr); | 245 | pr_debug("%s:%d: bus_addr %lxh\n", func, line, r->bus_addr); |
246 | pr_debug("%s:%d: len %lxh\n", func, line, r->len); | 246 | pr_debug("%s:%d: len %lxh\n", func, line, r->len); |
@@ -250,9 +250,11 @@ static void _dump_mmio_region(const struct ps3_mmio_region* r, | |||
250 | static int ps3_sb_mmio_region_create(struct ps3_mmio_region *r) | 250 | static int ps3_sb_mmio_region_create(struct ps3_mmio_region *r) |
251 | { | 251 | { |
252 | int result; | 252 | int result; |
253 | u64 lpar_addr; | ||
253 | 254 | ||
254 | result = lv1_map_device_mmio_region(r->dev->bus_id, r->dev->dev_id, | 255 | result = lv1_map_device_mmio_region(r->dev->bus_id, r->dev->dev_id, |
255 | r->bus_addr, r->len, r->page_size, &r->lpar_addr); | 256 | r->bus_addr, r->len, r->page_size, &lpar_addr); |
257 | r->lpar_addr = lpar_addr; | ||
256 | 258 | ||
257 | if (result) { | 259 | if (result) { |
258 | pr_debug("%s:%d: lv1_map_device_mmio_region failed: %s\n", | 260 | pr_debug("%s:%d: lv1_map_device_mmio_region failed: %s\n", |
@@ -568,7 +570,7 @@ static dma_addr_t ps3_sb_map_page(struct device *_dev, struct page *page, | |||
568 | { | 570 | { |
569 | struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev); | 571 | struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev); |
570 | int result; | 572 | int result; |
571 | unsigned long bus_addr; | 573 | dma_addr_t bus_addr; |
572 | void *ptr = page_address(page) + offset; | 574 | void *ptr = page_address(page) + offset; |
573 | 575 | ||
574 | result = ps3_dma_map(dev->d_region, (unsigned long)ptr, size, | 576 | result = ps3_dma_map(dev->d_region, (unsigned long)ptr, size, |
@@ -590,7 +592,7 @@ static dma_addr_t ps3_ioc0_map_page(struct device *_dev, struct page *page, | |||
590 | { | 592 | { |
591 | struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev); | 593 | struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev); |
592 | int result; | 594 | int result; |
593 | unsigned long bus_addr; | 595 | dma_addr_t bus_addr; |
594 | u64 iopte_flag; | 596 | u64 iopte_flag; |
595 | void *ptr = page_address(page) + offset; | 597 | void *ptr = page_address(page) + offset; |
596 | 598 | ||
diff --git a/drivers/block/ps3disk.c b/drivers/block/ps3disk.c index 936466f62afd..bccc42bb9212 100644 --- a/drivers/block/ps3disk.c +++ b/drivers/block/ps3disk.c | |||
@@ -141,7 +141,7 @@ static int ps3disk_submit_request_sg(struct ps3_storage_device *dev, | |||
141 | 141 | ||
142 | start_sector = req->sector * priv->blocking_factor; | 142 | start_sector = req->sector * priv->blocking_factor; |
143 | sectors = req->nr_sectors * priv->blocking_factor; | 143 | sectors = req->nr_sectors * priv->blocking_factor; |
144 | dev_dbg(&dev->sbd.core, "%s:%u: %s %lu sectors starting at %lu\n", | 144 | dev_dbg(&dev->sbd.core, "%s:%u: %s %llu sectors starting at %llu\n", |
145 | __func__, __LINE__, op, sectors, start_sector); | 145 | __func__, __LINE__, op, sectors, start_sector); |
146 | 146 | ||
147 | if (write) { | 147 | if (write) { |
@@ -178,7 +178,7 @@ static int ps3disk_submit_flush_request(struct ps3_storage_device *dev, | |||
178 | LV1_STORAGE_ATA_HDDOUT, 0, 0, 0, | 178 | LV1_STORAGE_ATA_HDDOUT, 0, 0, 0, |
179 | 0, &dev->tag); | 179 | 0, &dev->tag); |
180 | if (res) { | 180 | if (res) { |
181 | dev_err(&dev->sbd.core, "%s:%u: sync cache failed 0x%lx\n", | 181 | dev_err(&dev->sbd.core, "%s:%u: sync cache failed 0x%llx\n", |
182 | __func__, __LINE__, res); | 182 | __func__, __LINE__, res); |
183 | end_request(req, 0); | 183 | end_request(req, 0); |
184 | return 0; | 184 | return 0; |
@@ -238,11 +238,11 @@ static irqreturn_t ps3disk_interrupt(int irq, void *data) | |||
238 | 238 | ||
239 | if (tag != dev->tag) | 239 | if (tag != dev->tag) |
240 | dev_err(&dev->sbd.core, | 240 | dev_err(&dev->sbd.core, |
241 | "%s:%u: tag mismatch, got %lx, expected %lx\n", | 241 | "%s:%u: tag mismatch, got %llx, expected %llx\n", |
242 | __func__, __LINE__, tag, dev->tag); | 242 | __func__, __LINE__, tag, dev->tag); |
243 | 243 | ||
244 | if (res) { | 244 | if (res) { |
245 | dev_err(&dev->sbd.core, "%s:%u: res=%d status=0x%lx\n", | 245 | dev_err(&dev->sbd.core, "%s:%u: res=%d status=0x%llx\n", |
246 | __func__, __LINE__, res, status); | 246 | __func__, __LINE__, res, status); |
247 | return IRQ_HANDLED; | 247 | return IRQ_HANDLED; |
248 | } | 248 | } |
@@ -269,7 +269,7 @@ static irqreturn_t ps3disk_interrupt(int irq, void *data) | |||
269 | op = read ? "read" : "write"; | 269 | op = read ? "read" : "write"; |
270 | } | 270 | } |
271 | if (status) { | 271 | if (status) { |
272 | dev_dbg(&dev->sbd.core, "%s:%u: %s failed 0x%lx\n", __func__, | 272 | dev_dbg(&dev->sbd.core, "%s:%u: %s failed 0x%llx\n", __func__, |
273 | __LINE__, op, status); | 273 | __LINE__, op, status); |
274 | error = -EIO; | 274 | error = -EIO; |
275 | } else { | 275 | } else { |
@@ -297,7 +297,7 @@ static int ps3disk_sync_cache(struct ps3_storage_device *dev) | |||
297 | 297 | ||
298 | res = ps3stor_send_command(dev, LV1_STORAGE_ATA_HDDOUT, 0, 0, 0, 0); | 298 | res = ps3stor_send_command(dev, LV1_STORAGE_ATA_HDDOUT, 0, 0, 0, 0); |
299 | if (res) { | 299 | if (res) { |
300 | dev_err(&dev->sbd.core, "%s:%u: sync cache failed 0x%lx\n", | 300 | dev_err(&dev->sbd.core, "%s:%u: sync cache failed 0x%llx\n", |
301 | __func__, __LINE__, res); | 301 | __func__, __LINE__, res); |
302 | return -EIO; | 302 | return -EIO; |
303 | } | 303 | } |
@@ -388,7 +388,7 @@ static int ps3disk_identify(struct ps3_storage_device *dev) | |||
388 | sizeof(ata_cmnd), ata_cmnd.buffer, | 388 | sizeof(ata_cmnd), ata_cmnd.buffer, |
389 | ata_cmnd.arglen); | 389 | ata_cmnd.arglen); |
390 | if (res) { | 390 | if (res) { |
391 | dev_err(&dev->sbd.core, "%s:%u: identify disk failed 0x%lx\n", | 391 | dev_err(&dev->sbd.core, "%s:%u: identify disk failed 0x%llx\n", |
392 | __func__, __LINE__, res); | 392 | __func__, __LINE__, res); |
393 | return -EIO; | 393 | return -EIO; |
394 | } | 394 | } |
@@ -426,7 +426,7 @@ static int __devinit ps3disk_probe(struct ps3_system_bus_device *_dev) | |||
426 | 426 | ||
427 | if (dev->blk_size < 512) { | 427 | if (dev->blk_size < 512) { |
428 | dev_err(&dev->sbd.core, | 428 | dev_err(&dev->sbd.core, |
429 | "%s:%u: cannot handle block size %lu\n", __func__, | 429 | "%s:%u: cannot handle block size %llu\n", __func__, |
430 | __LINE__, dev->blk_size); | 430 | __LINE__, dev->blk_size); |
431 | return -EINVAL; | 431 | return -EINVAL; |
432 | } | 432 | } |
@@ -512,7 +512,7 @@ static int __devinit ps3disk_probe(struct ps3_system_bus_device *_dev) | |||
512 | dev->regions[dev->region_idx].size*priv->blocking_factor); | 512 | dev->regions[dev->region_idx].size*priv->blocking_factor); |
513 | 513 | ||
514 | dev_info(&dev->sbd.core, | 514 | dev_info(&dev->sbd.core, |
515 | "%s is a %s (%lu MiB total, %lu MiB for OtherOS)\n", | 515 | "%s is a %s (%llu MiB total, %lu MiB for OtherOS)\n", |
516 | gendisk->disk_name, priv->model, priv->raw_capacity >> 11, | 516 | gendisk->disk_name, priv->model, priv->raw_capacity >> 11, |
517 | get_capacity(gendisk) >> 11); | 517 | get_capacity(gendisk) >> 11); |
518 | 518 | ||
diff --git a/drivers/char/hvc_console.c b/drivers/char/hvc_console.c index 09676b4e5d89..94e7e3c8c05a 100644 --- a/drivers/char/hvc_console.c +++ b/drivers/char/hvc_console.c | |||
@@ -318,8 +318,6 @@ static int hvc_open(struct tty_struct *tty, struct file * filp) | |||
318 | } /* else count == 0 */ | 318 | } /* else count == 0 */ |
319 | 319 | ||
320 | tty->driver_data = hp; | 320 | tty->driver_data = hp; |
321 | if (!hp->irq_requested) | ||
322 | tty->low_latency = 1; /* Makes flushes to ldisc synchronous. */ | ||
323 | 321 | ||
324 | hp->tty = tty; | 322 | hp->tty = tty; |
325 | 323 | ||
diff --git a/drivers/char/ps3flash.c b/drivers/char/ps3flash.c index 79b6f461be75..afbe45676d71 100644 --- a/drivers/char/ps3flash.c +++ b/drivers/char/ps3flash.c | |||
@@ -44,7 +44,7 @@ static ssize_t ps3flash_read_write_sectors(struct ps3_storage_device *dev, | |||
44 | u64 res = ps3stor_read_write_sectors(dev, lpar, start_sector, sectors, | 44 | u64 res = ps3stor_read_write_sectors(dev, lpar, start_sector, sectors, |
45 | write); | 45 | write); |
46 | if (res) { | 46 | if (res) { |
47 | dev_err(&dev->sbd.core, "%s:%u: %s failed 0x%lx\n", __func__, | 47 | dev_err(&dev->sbd.core, "%s:%u: %s failed 0x%llx\n", __func__, |
48 | __LINE__, write ? "write" : "read", res); | 48 | __LINE__, write ? "write" : "read", res); |
49 | return -EIO; | 49 | return -EIO; |
50 | } | 50 | } |
@@ -59,7 +59,7 @@ static ssize_t ps3flash_read_sectors(struct ps3_storage_device *dev, | |||
59 | 59 | ||
60 | max_sectors = dev->bounce_size / dev->blk_size; | 60 | max_sectors = dev->bounce_size / dev->blk_size; |
61 | if (sectors > max_sectors) { | 61 | if (sectors > max_sectors) { |
62 | dev_dbg(&dev->sbd.core, "%s:%u Limiting sectors to %lu\n", | 62 | dev_dbg(&dev->sbd.core, "%s:%u Limiting sectors to %llu\n", |
63 | __func__, __LINE__, max_sectors); | 63 | __func__, __LINE__, max_sectors); |
64 | sectors = max_sectors; | 64 | sectors = max_sectors; |
65 | } | 65 | } |
@@ -144,7 +144,7 @@ static ssize_t ps3flash_read(struct file *file, char __user *buf, size_t count, | |||
144 | goto fail; | 144 | goto fail; |
145 | } | 145 | } |
146 | 146 | ||
147 | n = min(remaining, sectors_read*dev->blk_size-offset); | 147 | n = min_t(u64, remaining, sectors_read*dev->blk_size-offset); |
148 | dev_dbg(&dev->sbd.core, | 148 | dev_dbg(&dev->sbd.core, |
149 | "%s:%u: copy %lu bytes from 0x%p to user 0x%p\n", | 149 | "%s:%u: copy %lu bytes from 0x%p to user 0x%p\n", |
150 | __func__, __LINE__, n, dev->bounce_buf+offset, buf); | 150 | __func__, __LINE__, n, dev->bounce_buf+offset, buf); |
@@ -225,7 +225,7 @@ static ssize_t ps3flash_write(struct file *file, const char __user *buf, | |||
225 | if (end_read_sector >= start_read_sector) { | 225 | if (end_read_sector >= start_read_sector) { |
226 | /* Merge head and tail */ | 226 | /* Merge head and tail */ |
227 | dev_dbg(&dev->sbd.core, | 227 | dev_dbg(&dev->sbd.core, |
228 | "Merged head and tail: %lu sectors at %lu\n", | 228 | "Merged head and tail: %llu sectors at %llu\n", |
229 | chunk_sectors, start_write_sector); | 229 | chunk_sectors, start_write_sector); |
230 | res = ps3flash_read_sectors(dev, start_write_sector, | 230 | res = ps3flash_read_sectors(dev, start_write_sector, |
231 | chunk_sectors, 0); | 231 | chunk_sectors, 0); |
@@ -235,7 +235,7 @@ static ssize_t ps3flash_write(struct file *file, const char __user *buf, | |||
235 | if (head) { | 235 | if (head) { |
236 | /* Read head */ | 236 | /* Read head */ |
237 | dev_dbg(&dev->sbd.core, | 237 | dev_dbg(&dev->sbd.core, |
238 | "head: %lu sectors at %lu\n", head, | 238 | "head: %llu sectors at %llu\n", head, |
239 | start_write_sector); | 239 | start_write_sector); |
240 | res = ps3flash_read_sectors(dev, | 240 | res = ps3flash_read_sectors(dev, |
241 | start_write_sector, | 241 | start_write_sector, |
@@ -247,7 +247,7 @@ static ssize_t ps3flash_write(struct file *file, const char __user *buf, | |||
247 | start_write_sector+chunk_sectors) { | 247 | start_write_sector+chunk_sectors) { |
248 | /* Read tail */ | 248 | /* Read tail */ |
249 | dev_dbg(&dev->sbd.core, | 249 | dev_dbg(&dev->sbd.core, |
250 | "tail: %lu sectors at %lu\n", tail, | 250 | "tail: %llu sectors at %llu\n", tail, |
251 | start_read_sector); | 251 | start_read_sector); |
252 | sec_off = start_read_sector-start_write_sector; | 252 | sec_off = start_read_sector-start_write_sector; |
253 | res = ps3flash_read_sectors(dev, | 253 | res = ps3flash_read_sectors(dev, |
@@ -258,7 +258,7 @@ static ssize_t ps3flash_write(struct file *file, const char __user *buf, | |||
258 | } | 258 | } |
259 | } | 259 | } |
260 | 260 | ||
261 | n = min(remaining, dev->bounce_size-offset); | 261 | n = min_t(u64, remaining, dev->bounce_size-offset); |
262 | dev_dbg(&dev->sbd.core, | 262 | dev_dbg(&dev->sbd.core, |
263 | "%s:%u: copy %lu bytes from user 0x%p to 0x%p\n", | 263 | "%s:%u: copy %lu bytes from user 0x%p to 0x%p\n", |
264 | __func__, __LINE__, n, buf, dev->bounce_buf+offset); | 264 | __func__, __LINE__, n, buf, dev->bounce_buf+offset); |
@@ -299,11 +299,11 @@ static irqreturn_t ps3flash_interrupt(int irq, void *data) | |||
299 | 299 | ||
300 | if (tag != dev->tag) | 300 | if (tag != dev->tag) |
301 | dev_err(&dev->sbd.core, | 301 | dev_err(&dev->sbd.core, |
302 | "%s:%u: tag mismatch, got %lx, expected %lx\n", | 302 | "%s:%u: tag mismatch, got %llx, expected %llx\n", |
303 | __func__, __LINE__, tag, dev->tag); | 303 | __func__, __LINE__, tag, dev->tag); |
304 | 304 | ||
305 | if (res) { | 305 | if (res) { |
306 | dev_err(&dev->sbd.core, "%s:%u: res=%d status=0x%lx\n", | 306 | dev_err(&dev->sbd.core, "%s:%u: res=%d status=0x%llx\n", |
307 | __func__, __LINE__, res, status); | 307 | __func__, __LINE__, res, status); |
308 | } else { | 308 | } else { |
309 | dev->lv1_status = status; | 309 | dev->lv1_status = status; |
diff --git a/drivers/ps3/ps3-lpm.c b/drivers/ps3/ps3-lpm.c index 204158cf7a55..fe96793e3f08 100644 --- a/drivers/ps3/ps3-lpm.c +++ b/drivers/ps3/ps3-lpm.c | |||
@@ -732,7 +732,7 @@ static u64 pm_signal_group_to_ps3_lv1_signal_group(u64 group) | |||
732 | case 8: | 732 | case 8: |
733 | return pm_translate_signal_group_number_on_island8(subgroup); | 733 | return pm_translate_signal_group_number_on_island8(subgroup); |
734 | default: | 734 | default: |
735 | dev_dbg(sbd_core(), "%s:%u: island not found: %lu\n", __func__, | 735 | dev_dbg(sbd_core(), "%s:%u: island not found: %llu\n", __func__, |
736 | __LINE__, group); | 736 | __LINE__, group); |
737 | BUG(); | 737 | BUG(); |
738 | break; | 738 | break; |
@@ -765,7 +765,7 @@ static int __ps3_set_signal(u64 lv1_signal_group, u64 bus_select, | |||
765 | signal_select, attr1, attr2, attr3); | 765 | signal_select, attr1, attr2, attr3); |
766 | if (ret) | 766 | if (ret) |
767 | dev_err(sbd_core(), | 767 | dev_err(sbd_core(), |
768 | "%s:%u: error:%d 0x%lx 0x%lx 0x%lx 0x%lx 0x%lx 0x%lx\n", | 768 | "%s:%u: error:%d 0x%llx 0x%llx 0x%llx 0x%llx 0x%llx 0x%llx\n", |
769 | __func__, __LINE__, ret, lv1_signal_group, bus_select, | 769 | __func__, __LINE__, ret, lv1_signal_group, bus_select, |
770 | signal_select, attr1, attr2, attr3); | 770 | signal_select, attr1, attr2, attr3); |
771 | 771 | ||
@@ -908,7 +908,7 @@ void ps3_disable_pm(u32 cpu) | |||
908 | 908 | ||
909 | lpm_priv->tb_count = tmp; | 909 | lpm_priv->tb_count = tmp; |
910 | 910 | ||
911 | dev_dbg(sbd_core(), "%s:%u: tb_count %lu (%lxh)\n", __func__, __LINE__, | 911 | dev_dbg(sbd_core(), "%s:%u: tb_count %llu (%llxh)\n", __func__, __LINE__, |
912 | lpm_priv->tb_count, lpm_priv->tb_count); | 912 | lpm_priv->tb_count, lpm_priv->tb_count); |
913 | } | 913 | } |
914 | EXPORT_SYMBOL_GPL(ps3_disable_pm); | 914 | EXPORT_SYMBOL_GPL(ps3_disable_pm); |
@@ -938,7 +938,7 @@ int ps3_lpm_copy_tb(unsigned long offset, void *buf, unsigned long count, | |||
938 | if (offset >= lpm_priv->tb_count) | 938 | if (offset >= lpm_priv->tb_count) |
939 | return 0; | 939 | return 0; |
940 | 940 | ||
941 | count = min(count, lpm_priv->tb_count - offset); | 941 | count = min_t(u64, count, lpm_priv->tb_count - offset); |
942 | 942 | ||
943 | while (*bytes_copied < count) { | 943 | while (*bytes_copied < count) { |
944 | const unsigned long request = count - *bytes_copied; | 944 | const unsigned long request = count - *bytes_copied; |
@@ -993,7 +993,7 @@ int ps3_lpm_copy_tb_to_user(unsigned long offset, void __user *buf, | |||
993 | if (offset >= lpm_priv->tb_count) | 993 | if (offset >= lpm_priv->tb_count) |
994 | return 0; | 994 | return 0; |
995 | 995 | ||
996 | count = min(count, lpm_priv->tb_count - offset); | 996 | count = min_t(u64, count, lpm_priv->tb_count - offset); |
997 | 997 | ||
998 | while (*bytes_copied < count) { | 998 | while (*bytes_copied < count) { |
999 | const unsigned long request = count - *bytes_copied; | 999 | const unsigned long request = count - *bytes_copied; |
@@ -1013,7 +1013,7 @@ int ps3_lpm_copy_tb_to_user(unsigned long offset, void __user *buf, | |||
1013 | result = copy_to_user(buf, lpm_priv->tb_cache, tmp); | 1013 | result = copy_to_user(buf, lpm_priv->tb_cache, tmp); |
1014 | 1014 | ||
1015 | if (result) { | 1015 | if (result) { |
1016 | dev_dbg(sbd_core(), "%s:%u: 0x%lx bytes at 0x%p\n", | 1016 | dev_dbg(sbd_core(), "%s:%u: 0x%llx bytes at 0x%p\n", |
1017 | __func__, __LINE__, tmp, buf); | 1017 | __func__, __LINE__, tmp, buf); |
1018 | dev_err(sbd_core(), "%s:%u: copy_to_user failed: %d\n", | 1018 | dev_err(sbd_core(), "%s:%u: copy_to_user failed: %d\n", |
1019 | __func__, __LINE__, result); | 1019 | __func__, __LINE__, result); |
@@ -1148,8 +1148,8 @@ int ps3_lpm_open(enum ps3_lpm_tb_type tb_type, void *tb_cache, | |||
1148 | lpm_priv->shadow.group_control = PS3_LPM_SHADOW_REG_INIT; | 1148 | lpm_priv->shadow.group_control = PS3_LPM_SHADOW_REG_INIT; |
1149 | lpm_priv->shadow.debug_bus_control = PS3_LPM_SHADOW_REG_INIT; | 1149 | lpm_priv->shadow.debug_bus_control = PS3_LPM_SHADOW_REG_INIT; |
1150 | 1150 | ||
1151 | dev_dbg(sbd_core(), "%s:%u: lpm_id 0x%lx, outlet_id 0x%lx, " | 1151 | dev_dbg(sbd_core(), "%s:%u: lpm_id 0x%llx, outlet_id 0x%llx, " |
1152 | "tb_size 0x%lx\n", __func__, __LINE__, lpm_priv->lpm_id, | 1152 | "tb_size 0x%llx\n", __func__, __LINE__, lpm_priv->lpm_id, |
1153 | lpm_priv->outlet_id, tb_size); | 1153 | lpm_priv->outlet_id, tb_size); |
1154 | 1154 | ||
1155 | return 0; | 1155 | return 0; |
diff --git a/drivers/ps3/ps3-vuart.c b/drivers/ps3/ps3-vuart.c index 90c097a7a47a..e4ad5ba5d0a3 100644 --- a/drivers/ps3/ps3-vuart.c +++ b/drivers/ps3/ps3-vuart.c | |||
@@ -114,7 +114,7 @@ struct ports_bmp { | |||
114 | static void __maybe_unused _dump_ports_bmp( | 114 | static void __maybe_unused _dump_ports_bmp( |
115 | const struct ports_bmp *bmp, const char *func, int line) | 115 | const struct ports_bmp *bmp, const char *func, int line) |
116 | { | 116 | { |
117 | pr_debug("%s:%d: ports_bmp: %016lxh\n", func, line, bmp->status); | 117 | pr_debug("%s:%d: ports_bmp: %016llxh\n", func, line, bmp->status); |
118 | } | 118 | } |
119 | 119 | ||
120 | #define dump_port_params(_b) _dump_port_params(_b, __func__, __LINE__) | 120 | #define dump_port_params(_b) _dump_port_params(_b, __func__, __LINE__) |
@@ -159,11 +159,13 @@ int ps3_vuart_get_triggers(struct ps3_system_bus_device *dev, | |||
159 | struct vuart_triggers *trig) | 159 | struct vuart_triggers *trig) |
160 | { | 160 | { |
161 | int result; | 161 | int result; |
162 | unsigned long size; | 162 | u64 size; |
163 | unsigned long val; | 163 | u64 val; |
164 | u64 tx; | ||
164 | 165 | ||
165 | result = lv1_get_virtual_uart_param(dev->port_number, | 166 | result = lv1_get_virtual_uart_param(dev->port_number, |
166 | PARAM_TX_TRIGGER, &trig->tx); | 167 | PARAM_TX_TRIGGER, &tx); |
168 | trig->tx = tx; | ||
167 | 169 | ||
168 | if (result) { | 170 | if (result) { |
169 | dev_dbg(&dev->core, "%s:%d: tx_trigger failed: %s\n", | 171 | dev_dbg(&dev->core, "%s:%d: tx_trigger failed: %s\n", |
@@ -201,7 +203,7 @@ int ps3_vuart_set_triggers(struct ps3_system_bus_device *dev, unsigned int tx, | |||
201 | unsigned int rx) | 203 | unsigned int rx) |
202 | { | 204 | { |
203 | int result; | 205 | int result; |
204 | unsigned long size; | 206 | u64 size; |
205 | 207 | ||
206 | result = lv1_set_virtual_uart_param(dev->port_number, | 208 | result = lv1_set_virtual_uart_param(dev->port_number, |
207 | PARAM_TX_TRIGGER, tx); | 209 | PARAM_TX_TRIGGER, tx); |
@@ -248,7 +250,7 @@ static int ps3_vuart_get_rx_bytes_waiting(struct ps3_system_bus_device *dev, | |||
248 | dev_dbg(&dev->core, "%s:%d: rx_bytes failed: %s\n", | 250 | dev_dbg(&dev->core, "%s:%d: rx_bytes failed: %s\n", |
249 | __func__, __LINE__, ps3_result(result)); | 251 | __func__, __LINE__, ps3_result(result)); |
250 | 252 | ||
251 | dev_dbg(&dev->core, "%s:%d: %lxh\n", __func__, __LINE__, | 253 | dev_dbg(&dev->core, "%s:%d: %llxh\n", __func__, __LINE__, |
252 | *bytes_waiting); | 254 | *bytes_waiting); |
253 | return result; | 255 | return result; |
254 | } | 256 | } |
@@ -295,7 +297,7 @@ static int ps3_vuart_get_interrupt_status(struct ps3_system_bus_device *dev, | |||
295 | 297 | ||
296 | *status = tmp & priv->interrupt_mask; | 298 | *status = tmp & priv->interrupt_mask; |
297 | 299 | ||
298 | dev_dbg(&dev->core, "%s:%d: m %lxh, s %lxh, m&s %lxh\n", | 300 | dev_dbg(&dev->core, "%s:%d: m %llxh, s %llxh, m&s %lxh\n", |
299 | __func__, __LINE__, priv->interrupt_mask, tmp, *status); | 301 | __func__, __LINE__, priv->interrupt_mask, tmp, *status); |
300 | 302 | ||
301 | return result; | 303 | return result; |
@@ -363,7 +365,7 @@ int ps3_vuart_disable_interrupt_disconnect(struct ps3_system_bus_device *dev) | |||
363 | */ | 365 | */ |
364 | 366 | ||
365 | static int ps3_vuart_raw_write(struct ps3_system_bus_device *dev, | 367 | static int ps3_vuart_raw_write(struct ps3_system_bus_device *dev, |
366 | const void *buf, unsigned int bytes, unsigned long *bytes_written) | 368 | const void *buf, unsigned int bytes, u64 *bytes_written) |
367 | { | 369 | { |
368 | int result; | 370 | int result; |
369 | struct ps3_vuart_port_priv *priv = to_port_priv(dev); | 371 | struct ps3_vuart_port_priv *priv = to_port_priv(dev); |
@@ -379,7 +381,7 @@ static int ps3_vuart_raw_write(struct ps3_system_bus_device *dev, | |||
379 | 381 | ||
380 | priv->stats.bytes_written += *bytes_written; | 382 | priv->stats.bytes_written += *bytes_written; |
381 | 383 | ||
382 | dev_dbg(&dev->core, "%s:%d: wrote %lxh/%xh=>%lxh\n", __func__, __LINE__, | 384 | dev_dbg(&dev->core, "%s:%d: wrote %llxh/%xh=>%lxh\n", __func__, __LINE__, |
383 | *bytes_written, bytes, priv->stats.bytes_written); | 385 | *bytes_written, bytes, priv->stats.bytes_written); |
384 | 386 | ||
385 | return result; | 387 | return result; |
@@ -393,7 +395,7 @@ static int ps3_vuart_raw_write(struct ps3_system_bus_device *dev, | |||
393 | */ | 395 | */ |
394 | 396 | ||
395 | static int ps3_vuart_raw_read(struct ps3_system_bus_device *dev, void *buf, | 397 | static int ps3_vuart_raw_read(struct ps3_system_bus_device *dev, void *buf, |
396 | unsigned int bytes, unsigned long *bytes_read) | 398 | unsigned int bytes, u64 *bytes_read) |
397 | { | 399 | { |
398 | int result; | 400 | int result; |
399 | struct ps3_vuart_port_priv *priv = to_port_priv(dev); | 401 | struct ps3_vuart_port_priv *priv = to_port_priv(dev); |
@@ -411,7 +413,7 @@ static int ps3_vuart_raw_read(struct ps3_system_bus_device *dev, void *buf, | |||
411 | 413 | ||
412 | priv->stats.bytes_read += *bytes_read; | 414 | priv->stats.bytes_read += *bytes_read; |
413 | 415 | ||
414 | dev_dbg(&dev->core, "%s:%d: read %lxh/%xh=>%lxh\n", __func__, __LINE__, | 416 | dev_dbg(&dev->core, "%s:%d: read %llxh/%xh=>%lxh\n", __func__, __LINE__, |
415 | *bytes_read, bytes, priv->stats.bytes_read); | 417 | *bytes_read, bytes, priv->stats.bytes_read); |
416 | 418 | ||
417 | return result; | 419 | return result; |
@@ -500,7 +502,7 @@ int ps3_vuart_write(struct ps3_system_bus_device *dev, const void *buf, | |||
500 | spin_lock_irqsave(&priv->tx_list.lock, flags); | 502 | spin_lock_irqsave(&priv->tx_list.lock, flags); |
501 | 503 | ||
502 | if (list_empty(&priv->tx_list.head)) { | 504 | if (list_empty(&priv->tx_list.head)) { |
503 | unsigned long bytes_written; | 505 | u64 bytes_written; |
504 | 506 | ||
505 | result = ps3_vuart_raw_write(dev, buf, bytes, &bytes_written); | 507 | result = ps3_vuart_raw_write(dev, buf, bytes, &bytes_written); |
506 | 508 | ||
@@ -592,7 +594,7 @@ static int ps3_vuart_queue_rx_bytes(struct ps3_system_bus_device *dev, | |||
592 | list_add_tail(&lb->link, &priv->rx_list.head); | 594 | list_add_tail(&lb->link, &priv->rx_list.head); |
593 | priv->rx_list.bytes_held += bytes; | 595 | priv->rx_list.bytes_held += bytes; |
594 | 596 | ||
595 | dev_dbg(&dev->core, "%s:%d: buf_%lu: queued %lxh bytes\n", | 597 | dev_dbg(&dev->core, "%s:%d: buf_%lu: queued %llxh bytes\n", |
596 | __func__, __LINE__, lb->dbg_number, bytes); | 598 | __func__, __LINE__, lb->dbg_number, bytes); |
597 | 599 | ||
598 | *bytes_queued = bytes; | 600 | *bytes_queued = bytes; |
@@ -745,7 +747,7 @@ static int ps3_vuart_handle_interrupt_tx(struct ps3_system_bus_device *dev) | |||
745 | 747 | ||
746 | list_for_each_entry_safe(lb, n, &priv->tx_list.head, link) { | 748 | list_for_each_entry_safe(lb, n, &priv->tx_list.head, link) { |
747 | 749 | ||
748 | unsigned long bytes_written; | 750 | u64 bytes_written; |
749 | 751 | ||
750 | result = ps3_vuart_raw_write(dev, lb->head, lb->tail - lb->head, | 752 | result = ps3_vuart_raw_write(dev, lb->head, lb->tail - lb->head, |
751 | &bytes_written); | 753 | &bytes_written); |
@@ -762,7 +764,7 @@ static int ps3_vuart_handle_interrupt_tx(struct ps3_system_bus_device *dev) | |||
762 | if (bytes_written < lb->tail - lb->head) { | 764 | if (bytes_written < lb->tail - lb->head) { |
763 | lb->head += bytes_written; | 765 | lb->head += bytes_written; |
764 | dev_dbg(&dev->core, | 766 | dev_dbg(&dev->core, |
765 | "%s:%d cleared buf_%lu, %lxh bytes\n", | 767 | "%s:%d cleared buf_%lu, %llxh bytes\n", |
766 | __func__, __LINE__, lb->dbg_number, | 768 | __func__, __LINE__, lb->dbg_number, |
767 | bytes_written); | 769 | bytes_written); |
768 | goto port_full; | 770 | goto port_full; |
diff --git a/drivers/ps3/ps3stor_lib.c b/drivers/ps3/ps3stor_lib.c index 55955f16ad91..18066d555397 100644 --- a/drivers/ps3/ps3stor_lib.c +++ b/drivers/ps3/ps3stor_lib.c | |||
@@ -70,7 +70,7 @@ static int ps3stor_probe_access(struct ps3_storage_device *dev) | |||
70 | __func__, __LINE__, n); | 70 | __func__, __LINE__, n); |
71 | dev->region_idx = __ffs(dev->accessible_regions); | 71 | dev->region_idx = __ffs(dev->accessible_regions); |
72 | dev_info(&dev->sbd.core, | 72 | dev_info(&dev->sbd.core, |
73 | "First accessible region has index %u start %lu size %lu\n", | 73 | "First accessible region has index %u start %llu size %llu\n", |
74 | dev->region_idx, dev->regions[dev->region_idx].start, | 74 | dev->region_idx, dev->regions[dev->region_idx].start, |
75 | dev->regions[dev->region_idx].size); | 75 | dev->regions[dev->region_idx].size); |
76 | 76 | ||
@@ -220,7 +220,7 @@ u64 ps3stor_read_write_sectors(struct ps3_storage_device *dev, u64 lpar, | |||
220 | const char *op = write ? "write" : "read"; | 220 | const char *op = write ? "write" : "read"; |
221 | int res; | 221 | int res; |
222 | 222 | ||
223 | dev_dbg(&dev->sbd.core, "%s:%u: %s %lu sectors starting at %lu\n", | 223 | dev_dbg(&dev->sbd.core, "%s:%u: %s %llu sectors starting at %llu\n", |
224 | __func__, __LINE__, op, sectors, start_sector); | 224 | __func__, __LINE__, op, sectors, start_sector); |
225 | 225 | ||
226 | init_completion(&dev->done); | 226 | init_completion(&dev->done); |
@@ -238,7 +238,7 @@ u64 ps3stor_read_write_sectors(struct ps3_storage_device *dev, u64 lpar, | |||
238 | 238 | ||
239 | wait_for_completion(&dev->done); | 239 | wait_for_completion(&dev->done); |
240 | if (dev->lv1_status) { | 240 | if (dev->lv1_status) { |
241 | dev_dbg(&dev->sbd.core, "%s:%u: %s failed 0x%lx\n", __func__, | 241 | dev_dbg(&dev->sbd.core, "%s:%u: %s failed 0x%llx\n", __func__, |
242 | __LINE__, op, dev->lv1_status); | 242 | __LINE__, op, dev->lv1_status); |
243 | return dev->lv1_status; | 243 | return dev->lv1_status; |
244 | } | 244 | } |
@@ -268,7 +268,7 @@ u64 ps3stor_send_command(struct ps3_storage_device *dev, u64 cmd, u64 arg1, | |||
268 | { | 268 | { |
269 | int res; | 269 | int res; |
270 | 270 | ||
271 | dev_dbg(&dev->sbd.core, "%s:%u: send device command 0x%lx\n", __func__, | 271 | dev_dbg(&dev->sbd.core, "%s:%u: send device command 0x%llx\n", __func__, |
272 | __LINE__, cmd); | 272 | __LINE__, cmd); |
273 | 273 | ||
274 | init_completion(&dev->done); | 274 | init_completion(&dev->done); |
@@ -277,19 +277,19 @@ u64 ps3stor_send_command(struct ps3_storage_device *dev, u64 cmd, u64 arg1, | |||
277 | arg2, arg3, arg4, &dev->tag); | 277 | arg2, arg3, arg4, &dev->tag); |
278 | if (res) { | 278 | if (res) { |
279 | dev_err(&dev->sbd.core, | 279 | dev_err(&dev->sbd.core, |
280 | "%s:%u: send_device_command 0x%lx failed %d\n", | 280 | "%s:%u: send_device_command 0x%llx failed %d\n", |
281 | __func__, __LINE__, cmd, res); | 281 | __func__, __LINE__, cmd, res); |
282 | return -1; | 282 | return -1; |
283 | } | 283 | } |
284 | 284 | ||
285 | wait_for_completion(&dev->done); | 285 | wait_for_completion(&dev->done); |
286 | if (dev->lv1_status) { | 286 | if (dev->lv1_status) { |
287 | dev_dbg(&dev->sbd.core, "%s:%u: command 0x%lx failed 0x%lx\n", | 287 | dev_dbg(&dev->sbd.core, "%s:%u: command 0x%llx failed 0x%llx\n", |
288 | __func__, __LINE__, cmd, dev->lv1_status); | 288 | __func__, __LINE__, cmd, dev->lv1_status); |
289 | return dev->lv1_status; | 289 | return dev->lv1_status; |
290 | } | 290 | } |
291 | 291 | ||
292 | dev_dbg(&dev->sbd.core, "%s:%u: command 0x%lx completed\n", __func__, | 292 | dev_dbg(&dev->sbd.core, "%s:%u: command 0x%llx completed\n", __func__, |
293 | __LINE__, cmd); | 293 | __LINE__, cmd); |
294 | 294 | ||
295 | return 0; | 295 | return 0; |
diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c index ee0739b217b6..91ef669d98f6 100644 --- a/drivers/scsi/ibmvscsi/ibmvfc.c +++ b/drivers/scsi/ibmvscsi/ibmvfc.c | |||
@@ -933,7 +933,7 @@ static void ibmvfc_get_host_speed(struct Scsi_Host *shost) | |||
933 | fc_host_speed(shost) = FC_PORTSPEED_16GBIT; | 933 | fc_host_speed(shost) = FC_PORTSPEED_16GBIT; |
934 | break; | 934 | break; |
935 | default: | 935 | default: |
936 | ibmvfc_log(vhost, 3, "Unknown port speed: %ld Gbit\n", | 936 | ibmvfc_log(vhost, 3, "Unknown port speed: %lld Gbit\n", |
937 | vhost->login_buf->resp.link_speed / 100); | 937 | vhost->login_buf->resp.link_speed / 100); |
938 | fc_host_speed(shost) = FC_PORTSPEED_UNKNOWN; | 938 | fc_host_speed(shost) = FC_PORTSPEED_UNKNOWN; |
939 | break; | 939 | break; |
@@ -2149,8 +2149,8 @@ static void ibmvfc_handle_async(struct ibmvfc_async_crq *crq, | |||
2149 | { | 2149 | { |
2150 | const char *desc = ibmvfc_get_ae_desc(crq->event); | 2150 | const char *desc = ibmvfc_get_ae_desc(crq->event); |
2151 | 2151 | ||
2152 | ibmvfc_log(vhost, 3, "%s event received. scsi_id: %lx, wwpn: %lx," | 2152 | ibmvfc_log(vhost, 3, "%s event received. scsi_id: %llx, wwpn: %llx," |
2153 | " node_name: %lx\n", desc, crq->scsi_id, crq->wwpn, crq->node_name); | 2153 | " node_name: %llx\n", desc, crq->scsi_id, crq->wwpn, crq->node_name); |
2154 | 2154 | ||
2155 | switch (crq->event) { | 2155 | switch (crq->event) { |
2156 | case IBMVFC_AE_LINK_UP: | 2156 | case IBMVFC_AE_LINK_UP: |
@@ -2184,7 +2184,7 @@ static void ibmvfc_handle_async(struct ibmvfc_async_crq *crq, | |||
2184 | ibmvfc_link_down(vhost, IBMVFC_HALTED); | 2184 | ibmvfc_link_down(vhost, IBMVFC_HALTED); |
2185 | break; | 2185 | break; |
2186 | default: | 2186 | default: |
2187 | dev_err(vhost->dev, "Unknown async event received: %ld\n", crq->event); | 2187 | dev_err(vhost->dev, "Unknown async event received: %lld\n", crq->event); |
2188 | break; | 2188 | break; |
2189 | }; | 2189 | }; |
2190 | } | 2190 | } |
@@ -2261,13 +2261,13 @@ static void ibmvfc_handle_crq(struct ibmvfc_crq *crq, struct ibmvfc_host *vhost) | |||
2261 | * actually sent | 2261 | * actually sent |
2262 | */ | 2262 | */ |
2263 | if (unlikely(!ibmvfc_valid_event(&vhost->pool, evt))) { | 2263 | if (unlikely(!ibmvfc_valid_event(&vhost->pool, evt))) { |
2264 | dev_err(vhost->dev, "Returned correlation_token 0x%08lx is invalid!\n", | 2264 | dev_err(vhost->dev, "Returned correlation_token 0x%08llx is invalid!\n", |
2265 | crq->ioba); | 2265 | crq->ioba); |
2266 | return; | 2266 | return; |
2267 | } | 2267 | } |
2268 | 2268 | ||
2269 | if (unlikely(atomic_read(&evt->free))) { | 2269 | if (unlikely(atomic_read(&evt->free))) { |
2270 | dev_err(vhost->dev, "Received duplicate correlation_token 0x%08lx!\n", | 2270 | dev_err(vhost->dev, "Received duplicate correlation_token 0x%08llx!\n", |
2271 | crq->ioba); | 2271 | crq->ioba); |
2272 | return; | 2272 | return; |
2273 | } | 2273 | } |
@@ -3259,7 +3259,7 @@ static int ibmvfc_alloc_target(struct ibmvfc_host *vhost, u64 scsi_id) | |||
3259 | 3259 | ||
3260 | tgt = mempool_alloc(vhost->tgt_pool, GFP_KERNEL); | 3260 | tgt = mempool_alloc(vhost->tgt_pool, GFP_KERNEL); |
3261 | if (!tgt) { | 3261 | if (!tgt) { |
3262 | dev_err(vhost->dev, "Target allocation failure for scsi id %08lx\n", | 3262 | dev_err(vhost->dev, "Target allocation failure for scsi id %08llx\n", |
3263 | scsi_id); | 3263 | scsi_id); |
3264 | return -ENOMEM; | 3264 | return -ENOMEM; |
3265 | } | 3265 | } |
diff --git a/drivers/scsi/ibmvscsi/ibmvfc.h b/drivers/scsi/ibmvscsi/ibmvfc.h index babdf3db59df..87dafd0f8d44 100644 --- a/drivers/scsi/ibmvscsi/ibmvfc.h +++ b/drivers/scsi/ibmvscsi/ibmvfc.h | |||
@@ -691,13 +691,13 @@ struct ibmvfc_host { | |||
691 | #define DBG_CMD(CMD) do { if (ibmvfc_debug) CMD; } while (0) | 691 | #define DBG_CMD(CMD) do { if (ibmvfc_debug) CMD; } while (0) |
692 | 692 | ||
693 | #define tgt_dbg(t, fmt, ...) \ | 693 | #define tgt_dbg(t, fmt, ...) \ |
694 | DBG_CMD(dev_info((t)->vhost->dev, "%lX: " fmt, (t)->scsi_id, ##__VA_ARGS__)) | 694 | DBG_CMD(dev_info((t)->vhost->dev, "%llX: " fmt, (t)->scsi_id, ##__VA_ARGS__)) |
695 | 695 | ||
696 | #define tgt_info(t, fmt, ...) \ | 696 | #define tgt_info(t, fmt, ...) \ |
697 | dev_info((t)->vhost->dev, "%lX: " fmt, (t)->scsi_id, ##__VA_ARGS__) | 697 | dev_info((t)->vhost->dev, "%llX: " fmt, (t)->scsi_id, ##__VA_ARGS__) |
698 | 698 | ||
699 | #define tgt_err(t, fmt, ...) \ | 699 | #define tgt_err(t, fmt, ...) \ |
700 | dev_err((t)->vhost->dev, "%lX: " fmt, (t)->scsi_id, ##__VA_ARGS__) | 700 | dev_err((t)->vhost->dev, "%llX: " fmt, (t)->scsi_id, ##__VA_ARGS__) |
701 | 701 | ||
702 | #define ibmvfc_dbg(vhost, ...) \ | 702 | #define ibmvfc_dbg(vhost, ...) \ |
703 | DBG_CMD(dev_info((vhost)->dev, ##__VA_ARGS__)) | 703 | DBG_CMD(dev_info((vhost)->dev, ##__VA_ARGS__)) |
diff --git a/drivers/scsi/ps3rom.c b/drivers/scsi/ps3rom.c index ce48e2d0193c..ca0dd33497ec 100644 --- a/drivers/scsi/ps3rom.c +++ b/drivers/scsi/ps3rom.c | |||
@@ -290,11 +290,11 @@ static irqreturn_t ps3rom_interrupt(int irq, void *data) | |||
290 | 290 | ||
291 | if (tag != dev->tag) | 291 | if (tag != dev->tag) |
292 | dev_err(&dev->sbd.core, | 292 | dev_err(&dev->sbd.core, |
293 | "%s:%u: tag mismatch, got %lx, expected %lx\n", | 293 | "%s:%u: tag mismatch, got %llx, expected %llx\n", |
294 | __func__, __LINE__, tag, dev->tag); | 294 | __func__, __LINE__, tag, dev->tag); |
295 | 295 | ||
296 | if (res) { | 296 | if (res) { |
297 | dev_err(&dev->sbd.core, "%s:%u: res=%d status=0x%lx\n", | 297 | dev_err(&dev->sbd.core, "%s:%u: res=%d status=0x%llx\n", |
298 | __func__, __LINE__, res, status); | 298 | __func__, __LINE__, res, status); |
299 | return IRQ_HANDLED; | 299 | return IRQ_HANDLED; |
300 | } | 300 | } |
@@ -364,7 +364,7 @@ static int __devinit ps3rom_probe(struct ps3_system_bus_device *_dev) | |||
364 | 364 | ||
365 | if (dev->blk_size != CD_FRAMESIZE) { | 365 | if (dev->blk_size != CD_FRAMESIZE) { |
366 | dev_err(&dev->sbd.core, | 366 | dev_err(&dev->sbd.core, |
367 | "%s:%u: cannot handle block size %lu\n", __func__, | 367 | "%s:%u: cannot handle block size %llu\n", __func__, |
368 | __LINE__, dev->blk_size); | 368 | __LINE__, dev->blk_size); |
369 | return -EINVAL; | 369 | return -EINVAL; |
370 | } | 370 | } |
diff --git a/drivers/serial/of_serial.c b/drivers/serial/of_serial.c index a821e3a3d664..14f8fa9135be 100644 --- a/drivers/serial/of_serial.c +++ b/drivers/serial/of_serial.c | |||
@@ -163,6 +163,7 @@ static struct of_device_id __devinitdata of_platform_serial_table[] = { | |||
163 | { .type = "serial", .compatible = "ns16450", .data = (void *)PORT_16450, }, | 163 | { .type = "serial", .compatible = "ns16450", .data = (void *)PORT_16450, }, |
164 | { .type = "serial", .compatible = "ns16550", .data = (void *)PORT_16550, }, | 164 | { .type = "serial", .compatible = "ns16550", .data = (void *)PORT_16550, }, |
165 | { .type = "serial", .compatible = "ns16750", .data = (void *)PORT_16750, }, | 165 | { .type = "serial", .compatible = "ns16750", .data = (void *)PORT_16750, }, |
166 | { .type = "serial", .compatible = "ns16850", .data = (void *)PORT_16850, }, | ||
166 | #ifdef CONFIG_SERIAL_OF_PLATFORM_NWPSERIAL | 167 | #ifdef CONFIG_SERIAL_OF_PLATFORM_NWPSERIAL |
167 | { .type = "serial", .compatible = "ibm,qpace-nwp-serial", | 168 | { .type = "serial", .compatible = "ibm,qpace-nwp-serial", |
168 | .data = (void *)PORT_NWPSERIAL, }, | 169 | .data = (void *)PORT_NWPSERIAL, }, |
diff --git a/drivers/video/ps3fb.c b/drivers/video/ps3fb.c index 38ac805db97d..87f826e4c958 100644 --- a/drivers/video/ps3fb.c +++ b/drivers/video/ps3fb.c | |||
@@ -1006,7 +1006,7 @@ static int ps3fb_xdr_settings(u64 xdr_lpar, struct device *dev) | |||
1006 | __func__, status); | 1006 | __func__, status); |
1007 | return -ENXIO; | 1007 | return -ENXIO; |
1008 | } | 1008 | } |
1009 | dev_dbg(dev, "video:%p ioif:%lx lpar:%lx size:%lx\n", | 1009 | dev_dbg(dev, "video:%p ioif:%lx lpar:%llx size:%lx\n", |
1010 | ps3fb_videomemory.address, GPU_IOIF, xdr_lpar, | 1010 | ps3fb_videomemory.address, GPU_IOIF, xdr_lpar, |
1011 | ps3fb_videomemory.size); | 1011 | ps3fb_videomemory.size); |
1012 | 1012 | ||
@@ -1133,7 +1133,7 @@ static int __devinit ps3fb_probe(struct ps3_system_bus_device *dev) | |||
1133 | __func__, status); | 1133 | __func__, status); |
1134 | goto err; | 1134 | goto err; |
1135 | } | 1135 | } |
1136 | dev_dbg(&dev->core, "ddr:lpar:0x%lx\n", ddr_lpar); | 1136 | dev_dbg(&dev->core, "ddr:lpar:0x%llx\n", ddr_lpar); |
1137 | 1137 | ||
1138 | status = lv1_gpu_context_allocate(ps3fb.memory_handle, 0, | 1138 | status = lv1_gpu_context_allocate(ps3fb.memory_handle, 0, |
1139 | &ps3fb.context_handle, | 1139 | &ps3fb.context_handle, |
diff --git a/sound/ppc/snd_ps3.c b/sound/ppc/snd_ps3.c index 8f9e3859c37c..ff321110ec02 100644 --- a/sound/ppc/snd_ps3.c +++ b/sound/ppc/snd_ps3.c | |||
@@ -477,7 +477,7 @@ static int snd_ps3_pcm_prepare(struct snd_pcm_substream *substream) | |||
477 | card->dma_start_bus_addr[SND_PS3_CH_R] = | 477 | card->dma_start_bus_addr[SND_PS3_CH_R] = |
478 | runtime->dma_addr + (runtime->dma_bytes / 2); | 478 | runtime->dma_addr + (runtime->dma_bytes / 2); |
479 | 479 | ||
480 | pr_debug("%s: vaddr=%p bus=%#lx\n", __func__, | 480 | pr_debug("%s: vaddr=%p bus=%#llx\n", __func__, |
481 | card->dma_start_vaddr[SND_PS3_CH_L], | 481 | card->dma_start_vaddr[SND_PS3_CH_L], |
482 | card->dma_start_bus_addr[SND_PS3_CH_L]); | 482 | card->dma_start_bus_addr[SND_PS3_CH_L]); |
483 | 483 | ||
@@ -1030,7 +1030,7 @@ static int __init snd_ps3_driver_probe(struct ps3_system_bus_device *dev) | |||
1030 | pr_info("%s: nullbuffer alloc failed\n", __func__); | 1030 | pr_info("%s: nullbuffer alloc failed\n", __func__); |
1031 | goto clean_preallocate; | 1031 | goto clean_preallocate; |
1032 | } | 1032 | } |
1033 | pr_debug("%s: null vaddr=%p dma=%#lx\n", __func__, | 1033 | pr_debug("%s: null vaddr=%p dma=%#llx\n", __func__, |
1034 | the_card.null_buffer_start_vaddr, | 1034 | the_card.null_buffer_start_vaddr, |
1035 | the_card.null_buffer_start_dma_addr); | 1035 | the_card.null_buffer_start_dma_addr); |
1036 | /* set default sample rate/word width */ | 1036 | /* set default sample rate/word width */ |