/* This function attempts to retrieve and register all the devices firmware knows about via the SYSTEM_MAP PDC call.  */
static void __init system_map_inventory(void)
/* This function attempts to retrieve and register all the devices firmware knows about via the SYSTEM_MAP PDC call.  */
static void __init system_map_inventory(void)
{
	int i;
	long status = PDC_OK;
	for (i = 0; i < 256; i++) {
		struct parisc_device *dev;
		struct pdc_system_map_mod_info module_result;
		struct pdc_module_path module_path;
		status = pdc_system_map_find_mods(&module_result,
				&module_path, i);
		if ((status == PDC_BAD_PROC) || (status == PDC_NE_MOD))
			break;
		if (status != PDC_OK)
			continue;
		dev = alloc_pa_dev(module_result.mod_addr, &module_path.path);
		if (!dev)
			continue;
		register_parisc_device(dev);
		if (!module_result.add_addrs)
			continue;
		add_system_map_addresses(dev, module_result.add_addrs, i);
	}
	walk_central_bus();
	return;
}