From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH V3] xen/arm: UART addresses are not always aligned to a page. Date: Thu, 31 Oct 2013 19:52:57 +0000 Message-ID: <1383249177.5436.107.camel@dagon.hellion.org.uk> References: <1383236842.25018.130.camel@dagon.hellion.org.uk> <1383248258-1965-1-git-send-email-jfraser@broadcom.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1383248258-1965-1-git-send-email-jfraser@broadcom.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: Jon Fraser Cc: andrew.cooper3@citrix.com, julien.grall@linaro.org, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Thu, 2013-10-31 at 15:37 -0400, Jon Fraser wrote: > diff --git a/xen/include/asm-arm/early_printk.h b/xen/include/asm-arm/early_printk.h > index 5f7c529..707bbf7 100644 > --- a/xen/include/asm-arm/early_printk.h > +++ b/xen/include/asm-arm/early_printk.h > @@ -14,6 +14,16 @@ > > #ifdef EARLY_PRINTK > > +/* need to add the uart address offset in page to the fixmap address */ > +#define EARLY_UART_VIRTUAL_ADDRESS \ > + (FIXMAP_ADDR(FIXMAP_CONSOLE) +(EARLY_UART_BASE_ADDRESS & ~PAGE_MASK)) > + > +#endif > + > +#ifndef __ASSEMBLY__ > + > +#ifdef EARLY_PRINTK > + Is there something wrong with: #ifdef EARLY_PRINT +#define EARLY_UART_VIETRUAL_ADDRESS ... + +#ifndef __ASSEMBLY__ + [... existing C code...] + +#endif /* !__ASSEMBLY__ */ + #endif /* EARLY_PRINTK */ Rather than two lots of early_printk ifdefery. Ian.