|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [RFC v2 02/15] iommu: Add iommu_intpost to control VT-d Posted-Interrupts feature
>>> On 08.05.15 at 11:07, <feng.wu@xxxxxxxxx> wrote:
> @@ -51,6 +52,7 @@ bool_t __read_mostly iommu_passthrough;
> bool_t __read_mostly iommu_snoop = 1;
> bool_t __read_mostly iommu_qinval = 1;
> bool_t __read_mostly iommu_intremap = 1;
> +bool_t __read_mostly iommu_intpost = 0;
Pointless initializer.
> @@ -94,7 +96,11 @@ static void __init parse_iommu_param(char *s)
> else if ( !strcmp(s, "qinval") )
> iommu_qinval = val;
> else if ( !strcmp(s, "intremap") )
> + {
> iommu_intremap = val;
> + if ( iommu_intremap == 0 )
> + iommu_intpost = 0;
Please help the compiler and use the local variable in the if() clause
rather than the global one. And considering it's a boolean, perhaps
!val would also be better than val == 0.
> @@ -272,7 +278,10 @@ int __init iommu_setup(void)
> iommu_enabled = (rc == 0);
> }
> if ( !iommu_enabled )
> + {
> iommu_intremap = 0;
> + iommu_intpost = 0;
> + }
I think you'd better do this in a second if ( !iommu_intremap ).
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |