From: "Jan Beulich" Subject: Re: [PATCH V4] ns16550: Add support for UART present in Broadcom TruManage capable NetXtreme chips Date: Fri, 22 Nov 2013 12:14:38 +0000 Message-ID: <528F58BE0200007800105CD2@nat28.tlf.novell.com> References: <1385074236-2100-1-git-send-email-Aravind.Gopalakrishnan@amd.com> <528F3593.1090108@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <528F3593.1090108@citrix.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Aravind Gopalakrishnan , Andrew Cooper Cc: Thomas Lendacky , xen-devel@lists.xen.org, shurd@broadcom.com, Suravee Suthikulpanit , sherry.hurwitz@amd.com List-Id: xen-devel@lists.xenproject.org >>> On 22.11.13 at 11:44, Andrew Cooper wrote: > On 21/11/13 22:50, Aravind Gopalakrishnan wrote: >> if ( uart->remapped_io_base ) >> + { >> + sfn = paddr_to_pfn((unsigned long) uart->io_base + PAGE_SIZE); >> + efn = paddr_to_pfn((unsigned long) uart->io_base + uart->io_size - 1); >> + if ( iomem_deny_access(dom0, sfn, efn) != 0 ) >> + BUG(); > > BUG_ON(!iomem_deny_access(dom0, sfn, efn)) Actually, we had more or less agreed to avoid side effects in ASSERT() and BUG_ON() expressions (to eliminate the ambiguity whether such expressions get always evaluated). > is slightly more compact, and has the advantage of showing the action > which failed in the BUG message. Since when does BUG() should any expression? Jan