aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2009-01-03Change domain_context_mapping_one for virtual machine domainWeidong Han
vm_domid won't be set in context, find available domain id for a device from its iommu. For a virtual machine domain, a default agaw will be set, and skip top levels of page tables for iommu which has less agaw than default. Signed-off-by: Weidong Han <weidong.han@intel.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2009-01-03Allocation and free functions of virtual machine domainWeidong Han
virtual machine domain is different from native DMA-API domain, implement separate allocation and free functions for virtual machine domain. Signed-off-by: Weidong Han <weidong.han@intel.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2009-01-03Add domain_flush_cacheWeidong Han
Because virtual machine domain may have multiple devices from different iommus, it cannot use __iommu_flush_cache. In some common low level functions, use domain_flush_cache instead of __iommu_flush_cache. On the other hand, in some functions, iommu can is specified or domain cannot be got, still use __iommu_flush_cache Signed-off-by: Weidong Han <weidong.han@intel.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2009-01-03Add/remove domain device info for virtual machine domainWeidong Han
Add iommu reference count in domain, and add a lock to protect iommu setting including iommu_bmp, iommu_count and iommu_coherency. virtual machine domain may have multiple devices from different iommus, so it needs to do more things when add/remove domain device info. Thus implement separate these functions for virtual machine domain. Signed-off-by: Weidong Han <weidong.han@intel.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2009-01-03Add domain flag DOMAIN_FLAG_VIRTUAL_MACHINEWeidong Han
Add this flag for VT-d used in virtual machine, like KVM. Signed-off-by: Weidong Han <weidong.han@intel.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2009-01-03iommu coherencyWeidong Han
In dmar_domain, more than one iommus may be included in iommu_bmp. Due to "Coherency" capability may be different across iommus, set this variable to indicate iommu access is coherent or not. Only when all related iommus in a dmar_domain are all coherent, iommu access of this domain is coherent. Signed-off-by: Weidong Han <weidong.han@intel.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2009-01-03calculate agaw for each iommuWeidong Han
"SAGAW" capability may be different across iommus. Use a default agaw, but if default agaw is not supported in some iommus, choose a less supported agaw. Signed-off-by: Weidong Han <weidong.han@intel.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2009-01-03iommu bitmap instead of iommu pointer in dmar_domainWeidong Han
In order to support assigning multiple devices from different iommus to a domain, iommu bitmap is used to keep all iommus the domain are related to. Signed-off-by: Weidong Han <weidong.han@intel.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2009-01-03Get iommu from g_iommus for deferred flushWeidong Han
deferred_flush[] uses the iommu seq_id to index, so its iommu is fixed and can get it from g_iommus. Signed-off-by: Weidong Han <weidong.han@intel.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2009-01-03Add global iommu listWeidong Han
Signed-off-by: Weidong Han <weidong.han@intel.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2009-01-03change P2P domain flagsWeidong Han
Signed-off-by: Weidong Han <weidong.han@intel.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2009-01-03Initialize domain flags to 0Weidong Han
It's random number after the domain is allocated by kmem_cache_alloc Signed-off-by: Weidong Han <weidong.han@intel.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2009-01-03V4L/DVB (10173): Missing v4l2_prio_close in radio_releaseUdo Steinberg
The radio_release function of the BTTV driver is missing a call to v4l2_prio_close. As a result, after the radio device has been opened at least once (e.g., by HAL during bootup), v4l2_priority will never drop below V4L2_PRIORITY_INTERACTIVE again. With the following patch against 2.6.28, applications that run with V4L2_PRIORITY_BACKGROUND are able to open devices again. Previous Linux versions are affected as well. Signed-off-by: Udo Steinberg <udo@hypervisor.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-03V4L/DVB (10172): add DVB_DEVICE_TYPE= to ueventKay Sievers
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-03V4L/DVB (10171): Use usb_set_intfdataJulia Lawall
This code had calls to both usb_set_intfdata and dev_set_drvdata, doing the same thing. The semantic patch that lead to finding this problem is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @header@ @@ @same depends on header@ position p; @@ usb_set_intfdata@p(...) { ... } @depends on header@ position _p!=same.p; identifier _f; struct usb_interface *intf; expression data; @@ _f@_p(...) { <+... - dev_set_drvdata(&intf->dev, data); + usb_set_intfdata(intf, data); ...+> } // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-03VT-d: fix segment number being ignored when searching DRHDYu Zhao
On platforms with multiple PCI segments, any of the segments can have a DRHD with INCLUDE_PCI_ALL flag. So need to check the DRHD's segment number against the PCI device's when searching its DRHD. Signed-off-by: Yu Zhao <yu.zhao@intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2009-01-03intel-iommu: trivially inline DMA PTE macrosMark McLoughlin
Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2009-01-03intel-iommu: trivially inline context entry macrosMark McLoughlin
Some macros were unused, so I just dropped them: context_fault_disable context_translation_type context_address_root context_address_width context_domain_id Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2009-01-03intel-iommu: move iommu_prepare_gfx_mapping() out of dma_remapping.hMark McLoughlin
Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2009-01-03intel-iommu: kill off duplicate def of dmar_disabledMark McLoughlin
This is only used in dmar.c and intel-iommu.h, so dma_remapping.h seems like the appropriate place for it. Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2009-01-03intel-iommu: move struct device_domain_info out of dma_remapping.hMark McLoughlin
Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2009-01-03intel-iommu: move struct dmar_domain def out dma_remapping.hMark McLoughlin
Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2009-01-03intel-iommu: move DMA PTE defs out of dma_remapping.hMark McLoughlin
DMA_PTE_READ/WRITE are needed by kvm. Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2009-01-03intel-iommu: move context entry defs out from dma_remapping.hMark McLoughlin
Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2009-01-03intel-iommu: move root entry defs from dma_remapping.hMark McLoughlin
We keep the struct root_entry forward declaration for the pointer in struct intel_iommu. Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2009-01-03intel-iommu: move DMA_32/64BIT_PFN into intel-iommu.cMark McLoughlin
Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2009-01-03intel-iommu: make init_dmars() staticMark McLoughlin
init_dmars() is not used outside of drivers/pci/intel-iommu.c Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2009-01-03intel-iommu: remove some unused struct intel_iommu fieldsMark McLoughlin
The seg, saved_msg and sysdev fields appear to be unused since before the code was first merged. linux/msi.h is not needed in linux/intel-iommu.h anymore since there is no longer a reference to struct msi_msg. The MSI code in drivers/pci/intel-iommu.c still has linux/msi.h included via linux/dmar.h. linux/sysdev.h isn't needed because there is no reference to struct sys_device. Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2009-01-03xtensa: define __flsRusty Russell
Like fls, but can't be handed 0 and returns the bit number. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2009-01-03mn10300: define __flsRusty Russell
Like fls, but can't be handed 0 and returns the bit number. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2009-01-03m32r: define __flsRusty Russell
Like fls, but can't be handed 0 and returns the bit number. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2009-01-03h8300: define __flsRusty Russell
Like fls, but can't be handed 0 and returns the bit number. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2009-01-03frv: define __flsRusty Russell
Like fls, but can't be handed 0 and returns the bit number. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2009-01-03cris: define __flsRusty Russell
Like fls, but can't be handed 0 and returns the bit number. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2009-01-02Merge branch 'linux-next' of git://git.infradead.org/ubifs-2.6Linus Torvalds
* 'linux-next' of git://git.infradead.org/ubifs-2.6: (33 commits) UBIFS: add more useful debugging prints UBIFS: print debugging messages properly UBIFS: fix numerous spelling mistakes UBIFS: allow mounting when short of space UBIFS: fix writing uncompressed files UBIFS: fix checkpatch.pl warnings UBIFS: fix sparse warnings UBIFS: simplify make_free_space UBIFS: do not lie about used blocks UBIFS: restore budg_uncommitted_idx UBIFS: always commit on unmount UBIFS: use ubi_sync UBIFS: always commit in sync_fs UBIFS: fix file-system synchronization UBIFS: fix constants initialization UBIFS: avoid unnecessary calculations UBIFS: re-calculate min_idx_size after the commit UBIFS: use nicer 64-bit math UBIFS: fix available blocks count UBIFS: various comment improvements and fixes ...
2009-01-02Merge branch 'linux-next' of git://git.infradead.org/~dedekind/ubi-2.6Linus Torvalds
* 'linux-next' of git://git.infradead.org/~dedekind/ubi-2.6: UBI: fix checkpatch.pl warnings UBI: simplify PEB protection code UBI: prepare for protection tree improvements UBI: return -ENOMEM upon failing vmalloc UBI: document UBI ioctls UBI: handle write errors in WL worker UBI: fix error path UBI: some code re-structuring UBI: fix deadlock UBI: fix warnings when debugging is enabled
2009-01-02Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-nextLinus Torvalds
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-next: kbuild: ignore a few files in headers_check kbuild: add checks for include of linux/types in userspace headers kbuild: drop debugging leftover in tags.sh kbuild: document environment variables kbuild: make *config usage docs kbuild: disable sparse warning "returning void-valued expression" kbuild: in headers_install autoconvert asm/inline/volatile to __xxx__ kbuild: check for leaked CONFIG_ symbols to userspace headers_check.pl: disallow extern's kconfig: improve error messages for bad source statements kconfig: struct property commented kconfig: add comments to symbol flags kconfig: explain symbol value defaults m68k: fix recursive dependency in Kconfig
2009-01-02Merge branch 'x86-fixes-for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (27 commits) x86: mpparse.c fix style problems x86: nmi.c fix style problems x86: ldt.c fix style problems x86: cpuid.c fix style problems x86, UV: remove erroneous BAU initialization x86: fix incorrect __read_mostly on _boot_cpu_pda x86: convert permanent_kmaps_init() from macro to inline x86: early_printk - use sizeof instead of hardcoded number x86: xsave.c: restore_user_xstate should be static x86: uv_bau.h: fix dubious bitfield x86: apic.c: xapic_icr_read and x2apic_icr_read should be static x86: bios_uv.c: uv_systab should be static x86: genx2apic_phys.c: x2apic_send_IPI_self and init_x2apic_ldr should be static x86: amd_iommu.c: prealloc_protection_domains should be static x86: amd_iommu_init.c: iommu_enable and iommu_enable_event_logging should be static x86, pci: move arch/x86/pci/pci.h to arch/x86/include/asm/pci_x86.h x86_64: pci-gart_64.c iommu_fullflush should be static x86: efi.c declare add_efi_memmap before they get used x86: io_apic.c io_apic_sync should be static x86: apic.c declare pic_mode before they get used ...
2009-01-02Merge branches 'x86/cleanups', 'x86/fpu' and 'x86/urgent' into x86/coreIngo Molnar
2009-01-02Merge branch 'linus' into x86/cleanupsIngo Molnar
Conflicts: arch/x86/kernel/reboot.c
2009-01-02Disallow gcc versions 3.{0,1}Ingo Molnar
GCC 3.0 and 3.1 are too old to build a working kernel. Signed-off-by: Ingo Molnar <mingo@elte.hu> [ This check got dropped as obsolete when I simplified the gcc header inclusion mess in f153b82121b0366fe0e5f9553545cce237335175, but Willy Tarreau reports actually having those old versions still.. -Linus ] Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-02Merge branch 'cpus4096-for-linus-2' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'cpus4096-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (66 commits) x86: export vector_used_by_percpu_irq x86: use logical apicid in x2apic_cluster's x2apic_cpu_mask_to_apicid_and() sched: nominate preferred wakeup cpu, fix x86: fix lguest used_vectors breakage, -v2 x86: fix warning in arch/x86/kernel/io_apic.c sched: fix warning in kernel/sched.c sched: move test_sd_parent() to an SMP section of sched.h sched: add SD_BALANCE_NEWIDLE at MC and CPU level for sched_mc>0 sched: activate active load balancing in new idle cpus sched: bias task wakeups to preferred semi-idle packages sched: nominate preferred wakeup cpu sched: favour lower logical cpu number for sched_mc balance sched: framework for sched_mc/smt_power_savings=N sched: convert BALANCE_FOR_xx_POWER to inline functions x86: use possible_cpus=NUM to extend the possible cpus allowed x86: fix cpu_mask_to_apicid_and to include cpu_online_mask x86: update io_apic.c to the new cpumask code x86: Introduce topology_core_cpumask()/topology_thread_cpumask() x86: xen: use smp_call_function_many() x86: use work_on_cpu in x86/kernel/cpu/mcheck/mce_amd_64.c ... Fixed up trivial conflict in kernel/time/tick-sched.c manually
2009-01-02kbuild: ignore a few files in headers_checkSam Ravnborg
The new check for asm/types.h and linux/types.h had a few false positives. o We cannot let linux/types.h include linux/types.h o The int-ll64.h and int-ll64.h define the types and are included by linux/types.h Handle this by hardcoding the filenames in the headers_check script. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2009-01-02kbuild: add checks for include of linux/types in userspace headersSam Ravnborg
If we see __[us](8|16|32|64) then we must include <linux/types.h> If wee see include of <asm/types.h> then we recommend <linux/types.h> Original script from Mike but modified by me. Cc: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2009-01-02kbuild: drop debugging leftover in tags.shSam Ravnborg
Noticed by Jike. Reported-by: "Jike Song" <albcamus@gmail.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2009-01-02kbuild: document environment variablesSam Ravnborg
Add kbuild.txt to Documentation/kbuild More stuff can be added later - at least we have som of the varous environment variables documented now. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2009-01-02kbuild: make *config usage docsRandy Dunlap
Create a kconfig user assistance guide, with a few tips and hints about using menuconfig, xconfig, and gconfig. Mostly contains user interface, environment variables, and search topics, along with mini.config/custom.config usage. Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2009-01-02kbuild: disable sparse warning "returning void-valued expression"Hannes Eder
The sparse warning -Wreturn-void ("returning void-valued expression") is off by default, but it is enabled with -Wall, so add -Wno-return-void to CHECKFLAGS to disable it. Signed-off-by: Hannes Eder <hannes@hanneseder.net> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2009-01-02kbuild: in headers_install autoconvert asm/inline/volatile to __xxx__Mike Frysinger
Headers in userspace should be using the __xxx__ form of the asm, inline, and volatile keywords. Since people like to revert these things without realizing what's going on, have the headers install step autoconvert these keywords. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2009-01-02kbuild: check for leaked CONFIG_ symbols to userspaceSam Ravnborg
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>