From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751454AbaJAGsA (ORCPT ); Wed, 1 Oct 2014 02:48:00 -0400 Received: from ozlabs.org ([103.22.144.67]:60602 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750997AbaJAGr7 (ORCPT ); Wed, 1 Oct 2014 02:47:59 -0400 In-Reply-To: <1412073306-13812-3-git-send-email-mikey@neuling.org> To: Michael Neuling , greg@kroah.com, arnd@arndb.de, mpe@ellerman.id.au, benh@kernel.crashing.org From: Michael Ellerman Cc: mikey@neuling.org, anton@samba.org, linux-kernel@vger.kernel.org, linuxppc-dev@ozlabs.org, jk@ozlabs.org, imunsie@au.ibm.com, cbe-oss-dev@lists.ozlabs.org, "Aneesh Kumar K.V" Subject: Re: [PATCH v2 02/17] powerpc/cell: Move data segment faulting code out of cell platform Message-Id: <20141001064757.BFF88140174@ozlabs.org> Date: Wed, 1 Oct 2014 16:47:57 +1000 (EST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2014-30-09 at 10:34:51 UTC, Michael Neuling wrote: > From: Ian Munsie > > __spu_trap_data_seg() currently contains code to determine the VSID and ESID > required for a particular EA and mm struct. > > This code is generically useful for other co-processors. This moves the code > of the cell platform so it can be used by other powerpc code. It also adds 1TB > segment handling which Cell didn't have. I'm not loving this. For starters the name "copro_data_segment()" doesn't contain any verbs, and it doesn't tell me what it does. If we give it a name that says what it does, we get copro_get_ea_esid_and_vsid(). Or something equally ugly. And then in patch 10 you move the bulk of the logic into calculate_vsid(). So instead can we: - add a small helper that does the esid calculation, eg. calculate_esid() ? - factor out the vsid logic into a helper, calculate_vsid() ? - rework the spu code to use those, dropping __spu_trap_data_seg() - use the helpers in the cxl code cheers From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ozlabs.org (ozlabs.org [IPv6:2401:3900:2:1::2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id E9FAC1A08D3 for ; Wed, 1 Oct 2014 16:47:57 +1000 (EST) In-Reply-To: <1412073306-13812-3-git-send-email-mikey@neuling.org> To: Michael Neuling , greg@kroah.com, arnd@arndb.de, mpe@ellerman.id.au, benh@kernel.crashing.org From: Michael Ellerman Subject: Re: [PATCH v2 02/17] powerpc/cell: Move data segment faulting code out of cell platform Message-Id: <20141001064757.BFF88140174@ozlabs.org> Date: Wed, 1 Oct 2014 16:47:57 +1000 (EST) Cc: cbe-oss-dev@lists.ozlabs.org, mikey@neuling.org, "Aneesh Kumar K.V" , imunsie@au.ibm.com, linux-kernel@vger.kernel.org, linuxppc-dev@ozlabs.org, jk@ozlabs.org, anton@samba.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Tue, 2014-30-09 at 10:34:51 UTC, Michael Neuling wrote: > From: Ian Munsie > > __spu_trap_data_seg() currently contains code to determine the VSID and ESID > required for a particular EA and mm struct. > > This code is generically useful for other co-processors. This moves the code > of the cell platform so it can be used by other powerpc code. It also adds 1TB > segment handling which Cell didn't have. I'm not loving this. For starters the name "copro_data_segment()" doesn't contain any verbs, and it doesn't tell me what it does. If we give it a name that says what it does, we get copro_get_ea_esid_and_vsid(). Or something equally ugly. And then in patch 10 you move the bulk of the logic into calculate_vsid(). So instead can we: - add a small helper that does the esid calculation, eg. calculate_esid() ? - factor out the vsid logic into a helper, calculate_vsid() ? - rework the spu code to use those, dropping __spu_trap_data_seg() - use the helpers in the cxl code cheers