Signed-off-by: xavier.bru@bull.net Signed-off-by: frederic.temporelli@bull.net --- linux/drivers/scsi/aic7xxx/aic79xx_osm.c 2006-08-23 23:16:33.000000000 +0200 +++ linux-new/drivers/scsi/aic7xxx/aic79xx_osm.c 2006-09-14 16:44:24.000000000 +0200 @@ -62,6 +62,7 @@ #include /* For fetching system memory size */ +extern unsigned long blk_max_pfn; static struct scsi_transport_template *ahd_linux_transport_template = NULL; #include /* __setup */ @@ -1175,10 +1176,9 @@ ahd_linux_register_host(struct ahd_softc uint64_t ahd_linux_get_memsize(void) { - struct sysinfo si; - - si_meminfo(&si); - return ((uint64_t)si.totalram << PAGE_SHIFT); + /* Need to take in account the max physical address in case + * of discontiguous memory. */ + return ((uint64_t)blk_max_pfn << PAGE_SHIFT); } /*