[PATCH] iommu/vt-d: Fix up error handling in alloc_iommu successfully in alloc_iommu

2016-01-07 Thread Joerg Roedel
On Mon, Jan 04, 2016 at 06:27:57PM -0500, Nicholas Krause wrote: > This adds the proper check to alloc_iommu to make sure that the call > to iommu_device_create has completed successfully and if not return > to the caller the error code returned after freeing up resources > allocated previously by

Re: [PATCH 5/6] iommu/amd: Add support for non-pci devices

2016-01-07 Thread Joerg Roedel
On Tue, Jan 05, 2016 at 05:07:23AM -0500, Wan Zongshun wrote: > -static inline u16 get_device_id(struct device *dev) > +static inline int match_hid_uid(struct device *dev, > + struct acpihid_map_entry *entry) > +{ > + const char *hid, *uid; > + > + hid = acpi_dev

Re: [PATCH 6/6] iommu/amd: Manage iommu_group for non-pci devices

2016-01-07 Thread Joerg Roedel
On Tue, Jan 05, 2016 at 05:07:24AM -0500, Wan Zongshun wrote: > +static struct iommu_group *amd_iommu_device_group(struct device *dev) > +{ > + if (dev_is_pci(dev)) > + return pci_device_group(dev); > + > + return acpihid_device_group(dev); > +} > + > > /**

Re: [patch] iommu/amd: remove an unneeded condition

2016-01-07 Thread Joerg Roedel
On Thu, Jan 07, 2016 at 12:36:06PM +0300, Dan Carpenter wrote: > get_device_id() returns an unsigned short device id. It never fails and > it never returns a negative so we can remove this condition. > > Signed-off-by: Dan Carpenter Applied, thanks.

Re: [PATCH v2 3/6] iommu/amd: Introduce amd_iommu_get_num_iommus()

2016-01-07 Thread Joerg Roedel
On Fri, Jan 01, 2016 at 12:13:37PM -0600, Suravee Suthikulpanit wrote: > +int amd_iommu_get_num_iommus(void) > +{ > + return amd_iommus_present; > +} > +EXPORT_SYMBOL(amd_iommu_get_num_iommus); Is this export needed? The perf code can't be build as a module. Otherwise it looks good.

[git pull] IOMMU Fixes for Linux v4.4-rc8

2016-01-07 Thread Joerg Roedel
Hi Linus, The following changes since commit 74bf8efb5fa6e958d2d7c7917b8bb672085ec0c6: Linux 4.4-rc7 (2015-12-27 18:17:37 -0800) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git tags/iommu-fixes-v4.4-rc8 for you to fetch changes up to 16

Re: [PATCH v7 3/5] memory: mediatek: Add SMI driver

2016-01-07 Thread Philipp Zabel
Hi, Am Montag, den 04.01.2016, 14:56 +0800 schrieb Yong Wu: > On Fri, 2015-12-18 at 16:09 +0800, Yong Wu wrote: > > This patch add SMI(Smart Multimedia Interface) driver. This driver > > is responsible to enable/disable iommu and control the power domain > > and clocks of each local arbiter. > >

Re: [PATCH 6/6] iommu/amd: Manage iommu_group for non-pci devices

2016-01-07 Thread Wan ZongShun
2016-01-07 20:06 GMT+08:00 Joerg Roedel : > On Tue, Jan 05, 2016 at 05:07:24AM -0500, Wan Zongshun wrote: >> +static struct iommu_group *amd_iommu_device_group(struct device *dev) >> +{ >> + if (dev_is_pci(dev)) >> + return pci_device_group(dev); >> + >> + return acpihid_device_

Re: [PATCH 5/6] iommu/amd: Add support for non-pci devices

2016-01-07 Thread Wan ZongShun
2016-01-07 20:04 GMT+08:00 Joerg Roedel : > On Tue, Jan 05, 2016 at 05:07:23AM -0500, Wan Zongshun wrote: >> -static inline u16 get_device_id(struct device *dev) >> +static inline int match_hid_uid(struct device *dev, >> + struct acpihid_map_entry *entry) >> +{ >> +