lkml.org 
[lkml]   [2012]   [Sep]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 04/16] iommu/amd: Check if IOAPIC information is correct
On Fri, Sep 28, 2012 at 02:23:54PM +0200, Joerg Roedel wrote:
> When the IOAPIC information provided in the IVRS table is
> not correct or not complete the system may not boot at all
> when interrupt remapping is enabled. So check if this
> information is correct and print out a firmware bug message
> when it is not.
>
> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
> ---
> drivers/iommu/Kconfig | 2 +-
> drivers/iommu/amd_iommu_init.c | 27 ++++++++++++++++++++++++---
> 2 files changed, 25 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig
> index 9f69b56..e39f9db 100644
> --- a/drivers/iommu/Kconfig
> +++ b/drivers/iommu/Kconfig
> @@ -42,7 +42,7 @@ config AMD_IOMMU
> select PCI_PRI
> select PCI_PASID
> select IOMMU_API
> - depends on X86_64 && PCI && ACPI
> + depends on X86_64 && PCI && ACPI && X86_IO_APIC
> ---help---
> With this option you can enable support for AMD IOMMU hardware in
> your system. An IOMMU is a hardware component which provides
> diff --git a/drivers/iommu/amd_iommu_init.c b/drivers/iommu/amd_iommu_init.c
> index db100c5..3f0b68f 100644
> --- a/drivers/iommu/amd_iommu_init.c
> +++ b/drivers/iommu/amd_iommu_init.c
> @@ -33,6 +33,7 @@
> #include <asm/gart.h>
> #include <asm/x86_init.h>
> #include <asm/iommu_table.h>
> +#include <asm/io_apic.h>
>
> #include "amd_iommu_proto.h"
> #include "amd_iommu_types.h"
> @@ -1572,6 +1573,23 @@ static void __init free_on_init_error(void)
> #endif
> }
>
> +static bool __init check_ioapic_information(void)
> +{
> + int idx;
> +
> + for (idx = 0; idx < nr_ioapics; ++idx) {

That ++idx looks odd - and it looks like the file has a combination of
i++ and ++i. Any particular reason for using this particular one instead
of the more common: "idx++" ? Or just habit?


\
 
 \ /
  Last update: 2012-09-28 20:41    [W:0.221 / U:1.284 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site