aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/ps3/mm.c
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2009-01-13 14:59:41 -0500
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-01-16 00:15:12 -0500
commitb17b3df161814c43c03dbc8dbf8d32741bb30ba4 (patch)
tree5b830bd808a50c0fe201ee0751181fbe66548027 /arch/powerpc/platforms/ps3/mm.c
parent494fd07a88ea561e1bea73516d7e92c4c2d1f223 (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/powerpc/platforms/ps3/mm.c')
-rw-r--r--arch/powerpc/platforms/ps3/mm.c38
1 files changed, 21 insertions, 17 deletions
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
81struct mem_region { 81struct 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
105struct map { 105struct 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);
146void __init ps3_mm_vas_create(unsigned long* htab_size) 146void __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)
235static int ps3_mm_region_create(struct mem_region *r, unsigned long size) 235static 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:
648static int dma_sb_region_create(struct ps3_dma_region *r) 648static 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)
685static int dma_ioc0_region_create(struct ps3_dma_region *r) 687static 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));