Changeset 528 for trunk/kernel/mm


Ignore:
Timestamp:
Sep 21, 2018, 10:15:58 PM (6 years ago)
Author:
nicolas.van.phan@…
Message:

Change usage of y_max/x_max for iterating through clusters.

This is due to empty cluster (without memory or not CPU cluster),
like IO cluster of MIPS32 LETI architecture.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/mm/vmm.c

    r492 r528  
    13871387        uint32_t y_size  = LOCAL_CLUSTER->y_size;
    13881388        uint32_t y_width = LOCAL_CLUSTER->y_width;
    1389         uint32_t index   = vpn & ((x_size * y_size) - 1);
    1390         uint32_t x       = index / y_size;
    1391         uint32_t y       = index % y_size;
     1389        uint32_t index   = vpn & ((x_size * (y_size - 1)) - 1); // [FIXME]
     1390        uint32_t x       = index / (y_size - 1); // [FIXME]
     1391        uint32_t y       = index % (y_size - 1); // [FIXME]
    13921392        page_cxy         = (x<<y_width) + y;
    13931393    }
Note: See TracChangeset for help on using the changeset viewer.