From: "Jon Fraser" Subject: Re: [PATCH V3] xen/arm: UART addresses are not always aligned to a page. Date: Thu, 31 Oct 2013 16:11:28 -0400 Message-ID: <1383250288.2465.76.camel@chaos.and.broadcom.com> References: <1383236842.25018.130.camel@dagon.hellion.org.uk> <1383248258-1965-1-git-send-email-jfraser@broadcom.com> <1383249177.5436.107.camel@dagon.hellion.org.uk> Reply-To: jfraser@broadcom.com Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1383249177.5436.107.camel@dagon.hellion.org.uk> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: andrew.cooper3@citrix.com, jfraser@broadcom.com, julien.grall@linaro.org, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Thu, 2013-10-31 at 19:52 +0000, Ian Campbell wrote: > 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. > The dummy functions for early_printk and early_panic need to be visible for not EARLY_PRINTK, but not visible for __ASSEMBLY__.