changed type of addr parameter to read_portal/write_portal to 'volatile unsigned int *'