Commit 19b0bd025d6647549e07becf02b99e5168c17432
Committed by
Benjamin Herrenschmidt
1 parent
2b931fb67e
Exists in
master
and in
7 other branches
powerpc/cell: Use correct types in beat files
Only pass the address of a u64 if that is what the function requires. [Split out of a larger patch - sfr] [update comment - sfr] Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Showing 3 changed files with 15 additions and 14 deletions Side-by-side Diff
arch/powerpc/platforms/cell/beat_htab.c
... | ... | @@ -44,8 +44,8 @@ |
44 | 44 | |
45 | 45 | static inline unsigned int beat_read_mask(unsigned hpte_group) |
46 | 46 | { |
47 | - unsigned long hpte_v[5]; | |
48 | 47 | unsigned long rmask = 0; |
48 | + u64 hpte_v[5]; | |
49 | 49 | |
50 | 50 | beat_read_htab_entries(0, hpte_group + 0, hpte_v); |
51 | 51 | if (!(hpte_v[0] & HPTE_V_BOLTED)) |
... | ... | @@ -93,8 +93,7 @@ |
93 | 93 | int psize, int ssize) |
94 | 94 | { |
95 | 95 | unsigned long lpar_rc; |
96 | - unsigned long slot; | |
97 | - unsigned long hpte_v, hpte_r; | |
96 | + u64 hpte_v, hpte_r, slot; | |
98 | 97 | |
99 | 98 | /* same as iseries */ |
100 | 99 | if (vflags & HPTE_V_SECONDARY) |
101 | 100 | |
... | ... | @@ -153,8 +152,9 @@ |
153 | 152 | |
154 | 153 | static unsigned long beat_lpar_hpte_getword0(unsigned long slot) |
155 | 154 | { |
156 | - unsigned long dword0, dword[5]; | |
155 | + unsigned long dword0; | |
157 | 156 | unsigned long lpar_rc; |
157 | + u64 dword[5]; | |
158 | 158 | |
159 | 159 | lpar_rc = beat_read_htab_entries(0, slot & ~3UL, dword); |
160 | 160 | |
... | ... | @@ -170,7 +170,7 @@ |
170 | 170 | unsigned long size_bytes = 1UL << ppc64_pft_size; |
171 | 171 | unsigned long hpte_count = size_bytes >> 4; |
172 | 172 | int i; |
173 | - unsigned long dummy0, dummy1; | |
173 | + u64 dummy0, dummy1; | |
174 | 174 | |
175 | 175 | /* TODO: Use bulk call */ |
176 | 176 | for (i = 0; i < hpte_count; i++) |
... | ... | @@ -189,7 +189,8 @@ |
189 | 189 | int psize, int ssize, int local) |
190 | 190 | { |
191 | 191 | unsigned long lpar_rc; |
192 | - unsigned long dummy0, dummy1, want_v; | |
192 | + u64 dummy0, dummy1; | |
193 | + unsigned long want_v; | |
193 | 194 | |
194 | 195 | want_v = hpte_encode_v(va, psize, MMU_SEGSIZE_256M); |
195 | 196 | |
... | ... | @@ -255,7 +256,8 @@ |
255 | 256 | unsigned long ea, |
256 | 257 | int psize, int ssize) |
257 | 258 | { |
258 | - unsigned long lpar_rc, slot, vsid, va, dummy0, dummy1; | |
259 | + unsigned long lpar_rc, slot, vsid, va; | |
260 | + u64 dummy0, dummy1; | |
259 | 261 | |
260 | 262 | vsid = get_kernel_vsid(ea, MMU_SEGSIZE_256M); |
261 | 263 | va = (vsid << 28) | (ea & 0x0fffffff); |
... | ... | @@ -276,7 +278,7 @@ |
276 | 278 | { |
277 | 279 | unsigned long want_v; |
278 | 280 | unsigned long lpar_rc; |
279 | - unsigned long dummy1, dummy2; | |
281 | + u64 dummy1, dummy2; | |
280 | 282 | unsigned long flags; |
281 | 283 | |
282 | 284 | DBG_LOW(" inval : slot=%lx, va=%016lx, psize: %d, local: %d\n", |
... | ... | @@ -315,8 +317,7 @@ |
315 | 317 | int psize, int ssize) |
316 | 318 | { |
317 | 319 | unsigned long lpar_rc; |
318 | - unsigned long slot; | |
319 | - unsigned long hpte_v, hpte_r; | |
320 | + u64 hpte_v, hpte_r, slot; | |
320 | 321 | |
321 | 322 | /* same as iseries */ |
322 | 323 | if (vflags & HPTE_V_SECONDARY) |
arch/powerpc/platforms/cell/beat_udbg.c
drivers/char/hvc_beat.c
... | ... | @@ -44,7 +44,7 @@ |
44 | 44 | static unsigned char q[sizeof(unsigned long) * 2] |
45 | 45 | __attribute__((aligned(sizeof(unsigned long)))); |
46 | 46 | static int qlen = 0; |
47 | - unsigned long got; | |
47 | + u64 got; | |
48 | 48 | |
49 | 49 | again: |
50 | 50 | if (qlen) { |
... | ... | @@ -63,7 +63,7 @@ |
63 | 63 | } |
64 | 64 | } |
65 | 65 | if (beat_get_term_char(vtermno, &got, |
66 | - ((unsigned long *)q), ((unsigned long *)q) + 1) == 0) { | |
66 | + ((u64 *)q), ((u64 *)q) + 1) == 0) { | |
67 | 67 | qlen = got; |
68 | 68 | goto again; |
69 | 69 | } |