Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Ingo Molnar and committed by
Benjamin Herrenschmidt
19b0bd02 2b931fb6

+15 -14
+11 -10
arch/powerpc/platforms/cell/beat_htab.c
··· 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 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) ··· 152 153 153 154 static unsigned long beat_lpar_hpte_getword0(unsigned long slot) 154 155 { 155 - unsigned long dword0, dword[5]; 156 + unsigned long dword0; 156 157 unsigned long lpar_rc; 158 + u64 dword[5]; 157 159 158 160 lpar_rc = beat_read_htab_entries(0, slot & ~3UL, dword); 159 161 ··· 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 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 ··· 256 255 unsigned long ea, 257 256 int psize, int ssize) 258 257 { 259 - unsigned long lpar_rc, slot, vsid, va, dummy0, dummy1; 258 + unsigned long lpar_rc, slot, vsid, va; 259 + u64 dummy0, dummy1; 260 260 261 261 vsid = get_kernel_vsid(ea, MMU_SEGSIZE_256M); 262 262 va = (vsid << 28) | (ea & 0x0fffffff); ··· 278 276 { 279 277 unsigned long want_v; 280 278 unsigned long lpar_rc; 281 - unsigned long dummy1, dummy2; 279 + u64 dummy1, dummy2; 282 280 unsigned long flags; 283 281 284 282 DBG_LOW(" inval : slot=%lx, va=%016lx, psize: %d, local: %d\n", ··· 317 315 int psize, int ssize) 318 316 { 319 317 unsigned long lpar_rc; 320 - unsigned long slot; 321 - unsigned long hpte_v, hpte_r; 318 + u64 hpte_v, hpte_r, slot; 322 319 323 320 /* same as iseries */ 324 321 if (vflags & HPTE_V_SECONDARY)
+2 -2
arch/powerpc/platforms/cell/beat_udbg.c
··· 40 40 } 41 41 42 42 /* Buffered chars getc */ 43 - static long inbuflen; 44 - static long inbuf[2]; /* must be 2 longs */ 43 + static u64 inbuflen; 44 + static u64 inbuf[2]; /* must be 2 u64s */ 45 45 46 46 static int udbg_getc_poll_beat(void) 47 47 {
+2 -2
drivers/char/hvc_beat.c
··· 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 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 }