memory: fix some of the types for 32bit address spacing
authorAlan Cox <alan@linux.intel.com>
Sat, 13 Feb 2016 20:08:02 +0000 (20:08 +0000)
committerAlan Cox <alan@linux.intel.com>
Sat, 13 Feb 2016 20:08:02 +0000 (20:08 +0000)
Kernel/bank16k.c
Kernel/bank32k.c
Kernel/bankfixed.c
Kernel/include/kernel.h

index 1a9a9bc..0528686 100644 (file)
@@ -109,7 +109,7 @@ int pagemap_alloc(ptptr p)
 /*
  *     Reallocate the maps for a process
  */
-int pagemap_realloc(uint16_t size)
+int pagemap_realloc(usize_t size)
 {
        int have = maps_needed(udata.u_top);
        int want = maps_needed(size);
@@ -154,7 +154,7 @@ int pagemap_realloc(uint16_t size)
        return 0;
 }
 
-uint16_t pagemap_mem_used(void)
+usize_t pagemap_mem_used(void)
 {
        return pfptr << 4;
 }
index 0973210..24ff896 100644 (file)
@@ -116,7 +116,7 @@ int pagemap_alloc(ptptr p)
  *     at one size, and switchout at the other and the udata will just get
  *     saved/restored to the right places.
  */
-int pagemap_realloc(uint16_t size) {
+int pagemap_realloc(usize_t size) {
        int have = maps_needed(udata.u_top);
        int want = maps_needed(size);
        uint8_t *ptr = (uint8_t *) & udata.u_page;
@@ -149,7 +149,7 @@ int pagemap_realloc(uint16_t size) {
        return 0;
 }
 
-uint16_t pagemap_mem_used(void) {
+usize_t pagemap_mem_used(void) {
        return pfptr << 5;
 }
 
index 5315b72..1429d53 100644 (file)
@@ -69,14 +69,14 @@ int pagemap_alloc(ptptr p)
 }
 
 /* Realloc is trivial - we can't do anything useful */
-int pagemap_realloc(uint16_t size)
+int pagemap_realloc(usize_t size)
 {
        if (size > MAP_SIZE)
                return ENOMEM;
        return 0;
 }
 
-uint16_t pagemap_mem_used(void)
+usize_t pagemap_mem_used(void)
 {
        return (pfmax - pfptr) * (MAP_SIZE >> 10);
 }
index 696a0e2..1b93818 100644 (file)
@@ -848,7 +848,7 @@ extern void pagemap_add(uint8_t page);      /* FIXME: may need a page type for big bo
 extern void pagemap_free(ptptr p);
 extern int pagemap_alloc(ptptr p);
 extern int pagemap_realloc(usize_t p);
-extern uaddr_t pagemap_mem_used(void);
+extern usize_t pagemap_mem_used(void);
 extern void map_init(void);
 extern void platform_idle(void);
 extern uint8_t rtc_secs(void);