types: more type tidy up
authorAlan Cox <alan@linux.intel.com>
Wed, 14 Sep 2016 12:30:40 +0000 (13:30 +0100)
committerAlan Cox <alan@linux.intel.com>
Wed, 14 Sep 2016 12:30:40 +0000 (13:30 +0100)
Kernel/flat.c
Kernel/flat_mem.c
Kernel/include/kernel32.h
Kernel/syscall_exec32.c

index c58a13d..16dd360 100644 (file)
@@ -254,7 +254,7 @@ unsigned long pagemap_mem_used(void)
 
 /* Extra helper for exec32 */
 
-uint8_t *pagemap_base(void)
+uaddr_t pagemap_base(void)
 {
        unsigned int proc = udata.u_page;
        return mem[proc]->memblk[0].start;
index 20de5c3..d040483 100644 (file)
@@ -524,7 +524,7 @@ int pagemap_realloc(usize_t size)
        return 0;
 }
 
-uint8_t *pagemap_base(void)
+uaddr_t pagemap_base(void)
 {
        return mmu_context[udata.u_page].base;
 }
index 44d7eda..e1c6924 100644 (file)
@@ -15,7 +15,7 @@ extern unsigned long kmemused(void);
 
 /* flat.c */
 extern void pagemap_switch(ptptr p);
-extern uint8_t *pagemap_base(void);
+extern uaddr_t pagemap_base(void);
 #define PROGLOAD pagemap_base()
 extern uint32_t ugetl(void *uaddr, int *err);
 extern int uputl(uint32_t val, void *uaddr);
index 7239df4..6ff2377 100644 (file)
@@ -91,14 +91,14 @@ static int valid_hdr(inoptr ino, struct binfmt_flat *bf)
 
 /* For now we load the binary in one block, including code/data/bss. We can
    look at better formats, split binaries etc later maybe */
-static void relocate(struct binfmt_flat *bf, uint8_t *progbase, uint32_t size)
+static void relocate(struct binfmt_flat *bf, uaddr_t progbase, uint32_t size)
 {
        uint32_t *rp = (uint32_t *)(progbase + bf->reloc_start);
        uint32_t n = bf->reloc_count;
        while (n--) {
                uint32_t v = *rp++;
                if (v < size && !(v&1)) /* Revisit for non 68K */
-                       *((uint32_t *)(rp + v)) += (uint32_t)progbase;
+                       *((uint32_t *)(rp + v)) += progbase;
        }
 }
 
@@ -124,7 +124,7 @@ arg_t _execve(void)
        struct s_argblk *abuf, *ebuf;
        int argc;
        uint32_t bin_size;      /* Will need to be bigger on some cpus */
-       uint8_t *progbase, *top;
+       uaddr_t progbase, top;
        uaddr_t go;
 
        if (!(ino = n_open(name, NULLINOPTR)))
@@ -207,13 +207,13 @@ arg_t _execve(void)
 
        bin_size = binflat->reloc_start + 4 * binflat->reloc_count;
        if (bin_size > 512)
-               bload(ino, 1, progbase + 512, bin_size - 512);
+               bload(ino, 1, (uint8_t *)progbase + 512, bin_size - 512);
        
        go = (uint32_t)progbase + binflat->entry;
 
        relocate(binflat, progbase, bin_size);
        /* This may wipe the relocations */     
-       uzero(progbase + binflat->data_end, 
+       uzero((uint8_t *)progbase + binflat->data_end,
                binflat->bss_end - binflat->data_end + binflat->stack_size);
 
        brelse(buf);