From: Ian Campbell Subject: Re: [XEN/ARM PATCH v6 1/1] Add OdroidXU board (Exynos 5410) Date: Wed, 10 Sep 2014 15:07:35 +0100 Message-ID: <1410358055.8217.402.camel@kazak.uk.xensource.com> References: <1409871443-15641-1-git-send-email-suriyan.r@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1409871443-15641-1-git-send-email-suriyan.r@gmail.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Suriyan Ramasami Cc: keir@xen.org, tim@xen.org, xen-devel@lists.xen.org, jbeulich@suse.com, ian.jackson@citrix.com, julien.grall@linaro.com List-Id: xen-devel@lists.xenproject.org On Thu, 2014-09-04 at 15:57 -0700, Suriyan Ramasami wrote: > BUILD_BUG_ON(EXYNOS5_MCT_G_TCON >= PAGE_SIZE); > > - mct = ioremap_attr(EXYNOS5_MCT_BASE, PAGE_SIZE, PAGE_HYPERVISOR_NOCACHE); > + node = dt_find_compatible_node(NULL, NULL, "samsung,exynos4210-mct"); > + if ( !node ) > + { > + dprintk(XENLOG_ERR, "samsung,exynos4210-mct missing in DT\n"); > + return -ENXIO; > + } > + > + rc = dt_device_get_address(node, 0, &mct_base_addr, &size); > + if ( rc ) > + { > + dprintk(XENLOG_ERR, "Error in \"samsung,exynos4210-mct\"\n"); > + return -ENXIO; > + } > + > + dprintk(XENLOG_INFO, "mct_base_addr: %016llx size: %016llx\n", > + mct_base_addr, size); > + > + mct = ioremap_attr(mct_base_addr, PAGE_SIZE, PAGE_HYPERVISOR_NOCACHE); I noticed this while applying, it wasn't enough to stop me but it would be nice to fix: We should drop that BUILD_BUG_ON and use the size retrieved from the DT for the mapping instead. Ian.