diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2009-01-13 14:59:41 -0500 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-01-16 00:15:12 -0500 |
commit | b17b3df161814c43c03dbc8dbf8d32741bb30ba4 (patch) | |
tree | 5b830bd808a50c0fe201ee0751181fbe66548027 /arch | |
parent | 494fd07a88ea561e1bea73516d7e92c4c2d1f223 (diff) |
powerpc/ps3: The lv1_ routines have u64 parameters
We just fix up the reference parameters as the others are dealt with by
arithmetic promotion rules and don't cause warnings.
This removes warnings like this:
arch/powerpc/platforms/ps3/interrupt.c:327: warning: passing argument 1 of 'lv1_construct_event_receive_port' from incompatible pointer type
Also, these:
drivers/ps3/ps3-vuart.c:462: warning: passing argument 4 of 'ps3_vuart_raw_read' from incompatible pointer type
drivers/ps3/ps3-vuart.c:592: warning: passing argument 4 of 'ps3_vuart_raw_read' from incompatible pointer type
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/platforms/ps3/interrupt.c | 8 | ||||
-rw-r--r-- | arch/powerpc/platforms/ps3/mm.c | 38 | ||||
-rw-r--r-- | arch/powerpc/platforms/ps3/spu.c | 12 | ||||
-rw-r--r-- | arch/powerpc/platforms/ps3/system-bus.c | 4 |
4 files changed, 36 insertions, 26 deletions
diff --git a/arch/powerpc/platforms/ps3/interrupt.c b/arch/powerpc/platforms/ps3/interrupt.c index e59634f7af96..b746792d84ce 100644 --- a/arch/powerpc/platforms/ps3/interrupt.c +++ b/arch/powerpc/platforms/ps3/interrupt.c | |||
@@ -322,7 +322,7 @@ EXPORT_SYMBOL_GPL(ps3_irq_plug_destroy); | |||
322 | int ps3_event_receive_port_setup(enum ps3_cpu_binding cpu, unsigned int *virq) | 322 | int ps3_event_receive_port_setup(enum ps3_cpu_binding cpu, unsigned int *virq) |
323 | { | 323 | { |
324 | int result; | 324 | int result; |
325 | unsigned long outlet; | 325 | u64 outlet; |
326 | 326 | ||
327 | result = lv1_construct_event_receive_port(&outlet); | 327 | result = lv1_construct_event_receive_port(&outlet); |
328 | 328 | ||
@@ -468,7 +468,7 @@ int ps3_io_irq_setup(enum ps3_cpu_binding cpu, unsigned int interrupt_id, | |||
468 | unsigned int *virq) | 468 | unsigned int *virq) |
469 | { | 469 | { |
470 | int result; | 470 | int result; |
471 | unsigned long outlet; | 471 | u64 outlet; |
472 | 472 | ||
473 | result = lv1_construct_io_irq_outlet(interrupt_id, &outlet); | 473 | result = lv1_construct_io_irq_outlet(interrupt_id, &outlet); |
474 | 474 | ||
@@ -525,7 +525,7 @@ int ps3_vuart_irq_setup(enum ps3_cpu_binding cpu, void* virt_addr_bmp, | |||
525 | unsigned int *virq) | 525 | unsigned int *virq) |
526 | { | 526 | { |
527 | int result; | 527 | int result; |
528 | unsigned long outlet; | 528 | u64 outlet; |
529 | u64 lpar_addr; | 529 | u64 lpar_addr; |
530 | 530 | ||
531 | BUG_ON(!is_kernel_addr((u64)virt_addr_bmp)); | 531 | BUG_ON(!is_kernel_addr((u64)virt_addr_bmp)); |
@@ -581,7 +581,7 @@ int ps3_spe_irq_setup(enum ps3_cpu_binding cpu, unsigned long spe_id, | |||
581 | unsigned int class, unsigned int *virq) | 581 | unsigned int class, unsigned int *virq) |
582 | { | 582 | { |
583 | int result; | 583 | int result; |
584 | unsigned long outlet; | 584 | u64 outlet; |
585 | 585 | ||
586 | BUG_ON(class > 2); | 586 | BUG_ON(class > 2); |
587 | 587 | ||
diff --git a/arch/powerpc/platforms/ps3/mm.c b/arch/powerpc/platforms/ps3/mm.c index 4761e2dcf3e0..5c8d066283e6 100644 --- a/arch/powerpc/platforms/ps3/mm.c +++ b/arch/powerpc/platforms/ps3/mm.c | |||
@@ -79,7 +79,7 @@ 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 | unsigned long size; |
84 | unsigned long offset; | 84 | unsigned long offset; |
85 | }; | 85 | }; |
@@ -104,8 +104,8 @@ struct mem_region { | |||
104 | 104 | ||
105 | struct map { | 105 | struct map { |
106 | unsigned long total; | 106 | unsigned long 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 | }; |
@@ -116,9 +116,9 @@ static void __maybe_unused _debug_dump_map(const struct map *m, | |||
116 | { | 116 | { |
117 | DBG("%s:%d: map.total = %lxh\n", func, line, m->total); | 117 | DBG("%s:%d: map.total = %lxh\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 = %lxh\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 = %lxh\n", func, line, m->r1.size); |
124 | } | 124 | } |
@@ -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,7 +235,7 @@ 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 | ||
@@ -277,7 +277,7 @@ static void ps3_mm_region_destroy(struct mem_region *r) | |||
277 | { | 277 | { |
278 | int result; | 278 | int result; |
279 | 279 | ||
280 | DBG("%s:%d: r->base = %lxh\n", __func__, __LINE__, r->base); | 280 | DBG("%s:%d: r->base = %llxh\n", __func__, __LINE__, r->base); |
281 | if (r->base) { | 281 | if (r->base) { |
282 | result = lv1_release_memory(r->base); | 282 | result = lv1_release_memory(r->base); |
283 | BUG_ON(result); | 283 | BUG_ON(result); |
@@ -648,6 +648,7 @@ fail_alloc: | |||
648 | static int dma_sb_region_create(struct ps3_dma_region *r) | 648 | static int dma_sb_region_create(struct ps3_dma_region *r) |
649 | { | 649 | { |
650 | int result; | 650 | int result; |
651 | u64 bus_addr; | ||
651 | 652 | ||
652 | DBG(" -> %s:%d:\n", __func__, __LINE__); | 653 | DBG(" -> %s:%d:\n", __func__, __LINE__); |
653 | 654 | ||
@@ -671,7 +672,8 @@ static int dma_sb_region_create(struct ps3_dma_region *r) | |||
671 | 672 | ||
672 | result = lv1_allocate_device_dma_region(r->dev->bus_id, r->dev->dev_id, | 673 | 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, | 674 | roundup_pow_of_two(r->len), r->page_size, r->region_type, |
674 | &r->bus_addr); | 675 | &bus_addr); |
676 | r->bus_addr = bus_addr; | ||
675 | 677 | ||
676 | if (result) { | 678 | if (result) { |
677 | DBG("%s:%d: lv1_allocate_device_dma_region failed: %s\n", | 679 | DBG("%s:%d: lv1_allocate_device_dma_region failed: %s\n", |
@@ -685,6 +687,7 @@ static int dma_sb_region_create(struct ps3_dma_region *r) | |||
685 | static int dma_ioc0_region_create(struct ps3_dma_region *r) | 687 | static int dma_ioc0_region_create(struct ps3_dma_region *r) |
686 | { | 688 | { |
687 | int result; | 689 | int result; |
690 | u64 bus_addr; | ||
688 | 691 | ||
689 | INIT_LIST_HEAD(&r->chunk_list.head); | 692 | INIT_LIST_HEAD(&r->chunk_list.head); |
690 | spin_lock_init(&r->chunk_list.lock); | 693 | spin_lock_init(&r->chunk_list.lock); |
@@ -692,7 +695,8 @@ static int dma_ioc0_region_create(struct ps3_dma_region *r) | |||
692 | result = lv1_allocate_io_segment(0, | 695 | result = lv1_allocate_io_segment(0, |
693 | r->len, | 696 | r->len, |
694 | r->page_size, | 697 | r->page_size, |
695 | &r->bus_addr); | 698 | &bus_addr); |
699 | r->bus_addr = bus_addr; | ||
696 | if (result) { | 700 | if (result) { |
697 | DBG("%s:%d: lv1_allocate_io_segment failed: %s\n", | 701 | DBG("%s:%d: lv1_allocate_io_segment failed: %s\n", |
698 | __func__, __LINE__, ps3_result(result)); | 702 | __func__, __LINE__, ps3_result(result)); |
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 70ef793e5565..9bd4d677d3f2 100644 --- a/arch/powerpc/platforms/ps3/system-bus.c +++ b/arch/powerpc/platforms/ps3/system-bus.c | |||
@@ -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", |