Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754791AbdHYJrl (ORCPT ); Fri, 25 Aug 2017 05:47:41 -0400 Received: from ozlabs.org ([103.22.144.67]:34041 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755391AbdHYJrj (ORCPT ); Fri, 25 Aug 2017 05:47:39 -0400 From: Michael Ellerman To: Sukadev Bhattiprolu Cc: Benjamin Herrenschmidt , mikey@neuling.org, stewart@linux.vnet.ibm.com, apopple@au1.ibm.com, hbabu@us.ibm.com, oohall@gmail.com, linuxppc-dev@ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v7 01/12] powerpc/vas: Define macros, register fields and structures In-Reply-To: <1503556688-15412-2-git-send-email-sukadev@linux.vnet.ibm.com> References: <1503556688-15412-1-git-send-email-sukadev@linux.vnet.ibm.com> <1503556688-15412-2-git-send-email-sukadev@linux.vnet.ibm.com> User-Agent: Notmuch/0.21 (https://notmuchmail.org) Date: Fri, 25 Aug 2017 19:47:36 +1000 Message-ID: <87y3q8t1vr.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1119 Lines: 37 Sukadev Bhattiprolu writes: > diff --git a/arch/powerpc/platforms/powernv/vas.h b/arch/powerpc/platforms/powernv/vas.h > new file mode 100644 > index 0000000..c66aaf0 > --- /dev/null > +++ b/arch/powerpc/platforms/powernv/vas.h > @@ -0,0 +1,385 @@ ... > + > +/* > + * In-kernel state a VAS window. One per window. > + */ > +struct vas_window { > + /* Fields common to send and receive windows */ > + struct vas_instance *vinst; > + int winid; > + bool tx_win; /* True if send window */ > + bool nx_win; /* True if NX window */ > + bool user_win; /* True if user space window */ > + void *hvwc_map; /* HV window context */ > + void *uwc_map; /* OS/User window context */ > + pid_t pid; /* Linux process id of owner */ > + > + /* Fields applicable only to send windows */ > + void *paste_kaddr; > + char *paste_addr_name; > + struct vas_window *rxwin; > + > + /* Feilds applicable only to receive windows */ > + enum vas_cop_type cop; > + atomic_t num_txwins; Just noticed this. You should probably use the new refcount_t type, because AFAICS you're using this as a refcount. cheers