[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v1 5/7] iommu: Remove dependency on __LINE__ for release builds



>>> On 06.05.16 at 17:48, <ross.lagerwall@xxxxxxxxxx> wrote:
> --- a/xen/drivers/passthrough/vtd/dmar.h
> +++ b/xen/drivers/passthrough/vtd/dmar.h
> @@ -108,6 +108,15 @@ struct acpi_atsr_unit *acpi_find_matched_atsr_unit(const 
> struct pci_dev *);
>  
>  #define DMAR_OPERATION_TIMEOUT MILLISECS(1000)
>  
> +#ifdef NDEBUG
> +#define IOMMU_WAIT_OP_PANIC \
> +    panic("%p: DMAR hardware is malfunctional", current_text_addr());
> +#else
> +#define IOMMU_WAIT_OP_PANIC \
> +    panic("%s:%d:%s: DMAR hardware is malfunctional",  \
> +          __FILE__, __LINE__, __func__);
> +#endif

The semicolons belong ...

> @@ -117,8 +126,7 @@ do {                                                \
>              break;                                  \
>          if ( NOW() > start_time + DMAR_OPERATION_TIMEOUT ) {    \
>              if ( !kexecing )                                    \
> -                panic("%s:%d:%s: DMAR hardware is malfunctional",\
> -                      __FILE__, __LINE__, __func__);            \
> +                IOMMU_WAIT_OP_PANIC                             \

 ... here. Also I think this would look better as a function style
macro.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.