From: "Jan Beulich" Subject: Re: [PATCH V4] ns16550: Add support for UART present in Broadcom TruManage capable NetXtreme chips Date: Fri, 22 Nov 2013 13:12:11 +0000 Message-ID: <528F663B0200007800105D7C@nat28.tlf.novell.com> References: <1385074236-2100-1-git-send-email-Aravind.Gopalakrishnan@amd.com> <528F3593.1090108@citrix.com> <528F58BE0200007800105CD2@nat28.tlf.novell.com> <528F5799.6010207@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <528F5799.6010207@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: Andrew Cooper Cc: Thomas Lendacky , xen-devel@lists.xen.org, Aravind Gopalakrishnan , Suravee Suthikulpanit , sherry.hurwitz@amd.com, shurd@broadcom.com List-Id: xen-devel@lists.xenproject.org >>> On 22.11.13 at 14:09, Andrew Cooper wrote: > On 22/11/13 12:14, Jan Beulich wrote: >>>>> 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). > > ASSERT()s certain, as the non-debug builds will optimise away call. > > BUG/WARN_ON()s are different - they will be executed in all cases. That's currently the case, but since it's different from ASSERT() it's better to avoid the ambiguity. Jan