From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934110AbbKSNlS (ORCPT ); Thu, 19 Nov 2015 08:41:18 -0500 Received: from 8bytes.org ([81.169.241.247]:50489 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934018AbbKSNlQ (ORCPT ); Thu, 19 Nov 2015 08:41:16 -0500 Date: Thu, 19 Nov 2015 14:41:14 +0100 From: Joerg Roedel To: Yong Wu Cc: iommu@lists.linux-foundation.org, Will Deacon , linux-kernel@vger.kernel.org, yingjoe.chen@mediatek.com Subject: Re: [PATCH 0/8] iommu: Make core iommu-groups code more generic Message-ID: <20151119134114.GC2064@8bytes.org> References: <1445464303-18206-1-git-send-email-joro@8bytes.org> <1447920801.27650.49.camel@mhfsdcap03> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1447920801.27650.49.camel@mhfsdcap03> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Yong Wu, On Thu, Nov 19, 2015 at 04:13:21PM +0800, Yong Wu wrote: > (151119_13:39:37.472)WARNING: > at /proj/mtk40525/upstreamdev/v4.4/kernel/mediatek/drivers/iommu/iommu.c:1154 > (151119_13:39:37.472)Modules linked in: > (151119_13:39:37.472)CPU: 1 PID: 731 Comm: sh Not tainted 4.4.0-rc1+ > #37 > (151119_13:39:37.472)Hardware name: MediaTek MT8173 evaluation board > (DT) > (151119_13:39:37.472)task: ffffffc076bb4d00 ti: ffffffc076bdc000 > task.ti: ffffffc076bdc000 > (151119_13:39:37.472)PC is at iommu_detach_device+0x5c/0xb0 > (151119_13:39:37.472)LR is at iommu_detach_device+0x30/0xb0 > xxx This warning triggers when you use iommu_detach_device() with a device that is in a group with other devices. For those devices you must attach/detach the whole group of devices. For that you have to use iommu_detach_group() and iommu_attach_group(). Joerg