/* check if an address is reserved in the iomem resource tree returns 1 if reserved, 0 if not reserved.  */
int iomem_is_exclusive(u64 addr)
/* check if an address is reserved in the iomem resource tree returns 1 if reserved, 0 if not reserved.  */
int iomem_is_exclusive(u64 addr)
{
	struct resource *p = &iomem_resource;
	int err = 0;
	loff_t l;
	int size = PAGE_SIZE;
	if (!strict_iomem_checks)
		return 0;
	addr = addr & PAGE_MASK;
	read_lock(&resource_lock);
	for (p = p->child; p ; p = r_next(NULL, p, &l)) {
		if (p->start >= addr + size)
			break;
		if (p->end < addr)
			continue;
		if (p->flags & IORESOURCE_BUSY &&
		     p->flags & IORESOURCE_EXCLUSIVE) {
			err = 1;
			break;
		}
	}
	read_unlock(&resource_lock);
	return err;
}