]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Pull vtd-iommu into release branch
authorTony Luck <tony.luck@intel.com>
Fri, 17 Oct 2008 20:52:22 +0000 (13:52 -0700)
committerTony Luck <tony.luck@intel.com>
Fri, 17 Oct 2008 20:52:22 +0000 (13:52 -0700)
Conflicts:
arch/ia64/kernel/acpi.c

1  2 
arch/ia64/Kconfig
arch/ia64/Makefile
arch/ia64/include/asm/machvec.h
arch/ia64/kernel/Makefile
arch/ia64/kernel/acpi.c

diff --combined arch/ia64/Kconfig
index 239ad6b1c74f4b1627cbd8424d9b6f03c4ed007d,a924a84df325df9fdcbfa3f9f8c31fc52da7d9d9..6200a40ff50dfb5144a36c996343acc8877067ef
@@@ -21,7 -21,6 +21,7 @@@ config IA6
        select HAVE_KRETPROBES
        select HAVE_DMA_ATTRS
        select HAVE_KVM
 +      select HAVE_ARCH_TRACEHOOK
        default y
        help
          The Itanium Processor Family is Intel's 64-bit successor to
@@@ -109,33 -108,6 +109,33 @@@ config AUDIT_ARC
        bool
        default y
  
 +menuconfig PARAVIRT_GUEST
 +      bool "Paravirtualized guest support"
 +      help
 +        Say Y here to get to see options related to running Linux under
 +        various hypervisors.  This option alone does not add any kernel code.
 +
 +        If you say N, all options in this submenu will be skipped and disabled.
 +
 +if PARAVIRT_GUEST
 +
 +config PARAVIRT
 +      bool "Enable paravirtualization code"
 +      depends on PARAVIRT_GUEST
 +      default y
 +      bool
 +      default y
 +      help
 +        This changes the kernel so it can modify itself when it is run
 +        under a hypervisor, potentially improving performance significantly
 +        over full virtualization.  However, when run without a hypervisor
 +        the kernel is theoretically slower and slightly larger.
 +
 +
 +source "arch/ia64/xen/Kconfig"
 +
 +endif
 +
  choice
        prompt "System type"
        default IA64_GENERIC
@@@ -145,6 -117,7 +145,7 @@@ config IA64_GENERI
        select NUMA
        select ACPI_NUMA
        select SWIOTLB
+       select PCI_MSI
        help
          This selects the system type of your hardware.  A "generic" kernel
          will run on any supported IA-64 system.  However, if you configure
  
          generic               For any supported IA-64 system
          DIG-compliant         For DIG ("Developer's Interface Guide") compliant systems
+         DIG+Intel+IOMMU       For DIG systems with Intel IOMMU
          HP-zx1/sx1000         For HP systems
          HP-zx1/sx1000+swiotlb For HP systems with (broken) DMA-constrained devices.
          SGI-SN2               For SGI Altix systems
          SGI-UV                For SGI UV systems
          Ski-simulator         For the HP simulator <http://www.hpl.hp.com/research/linux/ski/>
 +        Xen-domU              For xen domU system
  
          If you don't know what to do, choose "generic".
  
@@@ -165,6 -138,11 +167,11 @@@ config IA64_DI
        bool "DIG-compliant"
        select SWIOTLB
  
+ config IA64_DIG_VTD
+       bool "DIG+Intel+IOMMU"
+       select DMAR
+       select PCI_MSI
  config IA64_HP_ZX1
        bool "HP-zx1/sx1000"
        help
@@@ -208,10 -186,6 +215,10 @@@ config IA64_HP_SI
        bool "Ski-simulator"
        select SWIOTLB
  
 +config IA64_XEN_GUEST
 +      bool "Xen guest"
 +      depends on XEN
 +
  endchoice
  
  choice
@@@ -614,6 -588,16 +621,16 @@@ source "drivers/pci/hotplug/Kconfig
  
  source "drivers/pcmcia/Kconfig"
  
+ config DMAR
+         bool "Support for DMA Remapping Devices (EXPERIMENTAL)"
+         depends on IA64_GENERIC && ACPI && EXPERIMENTAL
+       help
+         DMA remapping (DMAR) devices support enables independent address
+         translations for Direct Memory Access (DMA) from devices.
+         These DMA remapping devices are reported via ACPI tables
+         and include PCI device scope covered by these DMA
+         remapping devices.
  endmenu
  
  endif
diff --combined arch/ia64/Makefile
index 40242501bcdda47ce16e2565f5d21f4532c8e089,04cecee1ed1bc7a55a4bb943ebef5f21ed9c44e7..58a7e46affda28b44daf8199244ab3eca354fa8a
@@@ -53,14 -53,13 +53,15 @@@ libs-y                             += arch/ia64/lib
  core-y                                += arch/ia64/kernel/ arch/ia64/mm/
  core-$(CONFIG_IA32_SUPPORT)   += arch/ia64/ia32/
  core-$(CONFIG_IA64_DIG)       += arch/ia64/dig/
+ core-$(CONFIG_IA64_DIG_VTD)   += arch/ia64/dig/
  core-$(CONFIG_IA64_GENERIC)   += arch/ia64/dig/
  core-$(CONFIG_IA64_HP_ZX1)    += arch/ia64/dig/
  core-$(CONFIG_IA64_HP_ZX1_SWIOTLB) += arch/ia64/dig/
 +core-$(CONFIG_IA64_XEN_GUEST) += arch/ia64/dig/
  core-$(CONFIG_IA64_SGI_SN2)   += arch/ia64/sn/
  core-$(CONFIG_IA64_SGI_UV)    += arch/ia64/uv/
  core-$(CONFIG_KVM)            += arch/ia64/kvm/
 +core-$(CONFIG_XEN)            += arch/ia64/xen/
  
  drivers-$(CONFIG_PCI)         += arch/ia64/pci/
  drivers-$(CONFIG_IA64_HP_SIM) += arch/ia64/hp/sim/
index de99cb2799cf30b94e6baab7c222db5a87df9044,ce9b1d05083a0150534996443d50342a71623fa5..1ea28bcee33be27b8bc141c15733837d4e0c0303
@@@ -120,6 -120,8 +120,8 @@@ extern void machvec_tlb_migrate_finish 
  #  include <asm/machvec_hpsim.h>
  # elif defined (CONFIG_IA64_DIG)
  #  include <asm/machvec_dig.h>
+ # elif defined(CONFIG_IA64_DIG_VTD)
+ #  include <asm/machvec_dig_vtd.h>
  # elif defined (CONFIG_IA64_HP_ZX1)
  #  include <asm/machvec_hpzx1.h>
  # elif defined (CONFIG_IA64_HP_ZX1_SWIOTLB)
  #  include <asm/machvec_sn2.h>
  # elif defined (CONFIG_IA64_SGI_UV)
  #  include <asm/machvec_uv.h>
 +# elif defined (CONFIG_IA64_XEN_GUEST)
 +#  include <asm/machvec_xen.h>
  # elif defined (CONFIG_IA64_GENERIC)
  
  # ifdef MACHVEC_PLATFORM_HEADER
index 55e6ca8eebda32feb6305030e540c17cca028ba8,af0e750705e384b7724eaec890dde6a48e22af82..c381ea9548924149835ba223f758729dea3ebc03
@@@ -42,6 -42,10 +42,10 @@@ obj-$(CONFIG_IA64_ESI)              += esi.
  ifneq ($(CONFIG_IA64_ESI),)
  obj-y                         += esi_stub.o   # must be in kernel proper
  endif
+ obj-$(CONFIG_DMAR)            += pci-dma.o
+ ifeq ($(CONFIG_DMAR), y)
+ obj-$(CONFIG_SWIOTLB)         += pci-swiotlb.o
+ endif
  
  # The gate DSO image is built using a special linker script.
  targets += gate.so gate-syms.o
@@@ -112,23 -116,5 +116,23 @@@ clean-files += $(objtree)/include/asm-i
  ASM_PARAVIRT_OBJS = ivt.o entry.o
  define paravirtualized_native
  AFLAGS_$(1) += -D__IA64_ASM_PARAVIRTUALIZED_NATIVE
 +AFLAGS_pvchk-sed-$(1) += -D__IA64_ASM_PARAVIRTUALIZED_PVCHECK
 +extra-y += pvchk-$(1)
  endef
  $(foreach obj,$(ASM_PARAVIRT_OBJS),$(eval $(call paravirtualized_native,$(obj))))
 +
 +#
 +# Checker for paravirtualizations of privileged operations.
 +#
 +quiet_cmd_pv_check_sed = PVCHK   $@
 +define cmd_pv_check_sed
 +      sed -f $(srctree)/arch/$(SRCARCH)/scripts/pvcheck.sed $< > $@
 +endef
 +
 +$(obj)/pvchk-sed-%.s: $(src)/%.S $(srctree)/arch/$(SRCARCH)/scripts/pvcheck.sed FORCE
 +      $(call if_changed_dep,as_s_S)
 +$(obj)/pvchk-%.s: $(obj)/pvchk-sed-%.s FORCE
 +      $(call if_changed,pv_check_sed)
 +$(obj)/pvchk-%.o: $(obj)/pvchk-%.s FORCE
 +      $(call if_changed,as_o_S)
 +.PRECIOUS: $(obj)/pvchk-sed-%.s $(obj)/pvchk-%.s $(obj)/pvchk-%.o
diff --combined arch/ia64/kernel/acpi.c
index 00936491933ee03c3c085c5f66a4aa9085658cd3,8cc2f8a610c4e6a397756d1cb27242d141e04da5..0635015d0aaada0de519d1b0487a787b41594db7
@@@ -52,7 -52,6 +52,7 @@@
  #include <asm/numa.h>
  #include <asm/sal.h>
  #include <asm/cyclone.h>
 +#include <asm/xen/hypervisor.h>
  
  #define BAD_MADT_ENTRY(entry, end) (                                        \
                (!entry) || (unsigned long)entry + sizeof(*entry) > end ||  \
@@@ -92,6 -91,9 +92,9 @@@ acpi_get_sysname(void
        struct acpi_table_rsdp *rsdp;
        struct acpi_table_xsdt *xsdt;
        struct acpi_table_header *hdr;
+ #ifdef CONFIG_DMAR
+       u64 i, nentries;
+ #endif
  
        rsdp_phys = acpi_find_rsdp();
        if (!rsdp_phys) {
                        return "uv";
                else
                        return "sn2";
 +      } else if (xen_pv_domain() && !strcmp(hdr->oem_id, "XEN")) {
 +              return "xen";
        }
  
+ #ifdef CONFIG_DMAR
+       /* Look for Intel IOMMU */
+       nentries = (hdr->length - sizeof(*hdr)) /
+                        sizeof(xsdt->table_offset_entry[0]);
+       for (i = 0; i < nentries; i++) {
+               hdr = __va(xsdt->table_offset_entry[i]);
+               if (strncmp(hdr->signature, ACPI_SIG_DMAR,
+                       sizeof(ACPI_SIG_DMAR) - 1) == 0)
+                       return "dig_vtd";
+       }
+ #endif
        return "dig";
  #else
  # if defined (CONFIG_IA64_HP_SIM)
        return "uv";
  # elif defined (CONFIG_IA64_DIG)
        return "dig";
 +# elif defined (CONFIG_IA64_XEN_GUEST)
 +      return "xen";
+ # elif defined(CONFIG_IA64_DIG_VTD)
+       return "dig_vtd";
  # else
  #     error Unknown platform.  Fix acpi.c.
  # endif