From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3vtCCx17slzDq93 for ; Wed, 29 Mar 2017 13:59:40 +1100 (AEDT) Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id v2T2rqQ6141475 for ; Tue, 28 Mar 2017 22:59:38 -0400 Received: from e23smtp06.au.ibm.com (e23smtp06.au.ibm.com [202.81.31.148]) by mx0a-001b2d01.pphosted.com with ESMTP id 29fsu241m8-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Tue, 28 Mar 2017 22:59:37 -0400 Received: from localhost by e23smtp06.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 29 Mar 2017 12:59:35 +1000 Received: from d23av06.au.ibm.com (d23av06.au.ibm.com [9.190.235.151]) by d23relay09.au.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v2T2xOi89371842 for ; Wed, 29 Mar 2017 13:59:32 +1100 Received: from d23av06.au.ibm.com (localhost [127.0.0.1]) by d23av06.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id v2T2x0j5004590 for ; Wed, 29 Mar 2017 13:59:00 +1100 Subject: Re: [PATCH V3 3/7] cxl: Keep track of mm struct associated with a context To: Christophe Lombard , linuxppc-dev@lists.ozlabs.org, fbarrat@linux.vnet.ibm.com, imunsie@au1.ibm.com References: <1490714052-18902-1-git-send-email-clombard@linux.vnet.ibm.com> <1490714052-18902-4-git-send-email-clombard@linux.vnet.ibm.com> From: Andrew Donnellan Date: Wed, 29 Mar 2017 13:58:35 +1100 MIME-Version: 1.0 In-Reply-To: <1490714052-18902-4-git-send-email-clombard@linux.vnet.ibm.com> Content-Type: text/plain; charset=windows-1252; format=flowed Message-Id: <01a90c58-05cf-83d0-eaab-1ce8a2d05bf1@au1.ibm.com> List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On 29/03/17 02:14, Christophe Lombard wrote: > The mm_struct corresponding to the current task is acquired each time > an interrupt is raised. So to simplify the code, we only get the > mm_struct when attaching an AFU context to the process. > The mm_count reference is increased to ensure that the mm_struct can't > be freed. The mm_struct will be released when the context is detached. > A reference on mm_users is not kept to avoid a circular dependency if > the process mmaps its cxl mmio and forget to unmap before exiting. > > Signed-off-by: Christophe Lombard Reviewed-by: Andrew Donnellan -- Andrew Donnellan OzLabs, ADL Canberra andrew.donnellan@au1.ibm.com IBM Australia Limited