else if (!page_count(mem_map+i))
free++;
else
- shared += atomic_read(&mem_map[i].count) - 1;
+ shared += page_count(mem_map + i) - 1;
}
printk("%ld pages of RAM\n",total);
printk("%ld free pages\n",free);
/* Set the vptb. This is often done by the bootloader, but
shouldn't be required. */
- if (hwrpb->vptb != 0xfffffffe00000000) {
- wrvptptr(0xfffffffe00000000);
- hwrpb->vptb = 0xfffffffe00000000;
+ if (hwrpb->vptb != 0xfffffffe00000000UL) {
+ wrvptptr(0xfffffffe00000000UL);
+ hwrpb->vptb = 0xfffffffe00000000UL;
hwrpb_update_checksum(hwrpb);
}
/* Move the vptb back to where the SRM console expects it. */
swapper_pg_dir[1] = swapper_pg_dir[1023];
tbia();
- wrvptptr(0x200000000);
- hwrpb->vptb = 0x200000000;
+ wrvptptr(0x200000000UL);
+ hwrpb->vptb = 0x200000000UL;
hwrpb_update_checksum(hwrpb);
/* Reload the page tables that the console had in use. */