Re: [PATCH 1/3] x86/Hyper-V: Set x2apic destination mode to physical when x2apic is available

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

 



On Thu, Jan 31, 2019 at 06:17:31PM +0800, lantianyu1986@xxxxxxxxx wrote:
>
>

This comment needs to be indented one tab or it looks like we're outside
the funciton.

> +/*
> + * Hyper-V doesn't provide irq remapping for IO-APIC. To enable x2apic,
> + * set x2apic destination mode to physcial mode when x2apic is available
> + * and Hyper-V IOMMU driver makes sure cpus assigned with IO-APIC irqs
> + * have 8-bit APIC id.
> + */
> +# if IS_ENABLED(CONFIG_HYPERV_IOMMU)
> +	if (x2apic_supported())
> +		x2apic_phys = 1;
> +# endif

The IS_ENABLED() macro is really magical.  You could write this like so:

	if (IS_ENABLED(CONFIG_HYPERV_IOMMU) && x2apic_supported())
		x2apic_phys = 1;

It works the same and is slightly more pleasant to look at.

regards,
dan carpenter

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux