Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753615AbbDTX5A (ORCPT ); Mon, 20 Apr 2015 19:57:00 -0400 Received: from mail-bl2on0112.outbound.protection.outlook.com ([65.55.169.112]:13920 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751650AbbDTX47 (ORCPT ); Mon, 20 Apr 2015 19:56:59 -0400 Authentication-Results: freescale.com; dkim=none (message not signed) header.d=none; Message-ID: <1429574206.4352.53.camel@freescale.com> Subject: Re: [RFC,1/8] soc/fman: Add FMan MURAM support From: Scott Wood To: Liberman Igal-B31950 CC: Kumar Gala , "linuxppc-dev@lists.ozlabs.org" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Bucur Madalin-Cristian-B32716 Date: Mon, 20 Apr 2015 18:56:46 -0500 In-Reply-To: References: <1426050469-12507-1-git-send-email-igal.liberman@freescale.com> <32CF85E2-A8AA-454D-A46F-0E778DAF97ED@kernel.crashing.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.10-0ubuntu1~14.10.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Originating-IP: [2601:2:5800:3f7:12bf:48ff:fe84:c9a0] X-ClientProxiedBy: CO2PR11CA0006.namprd11.prod.outlook.com (10.141.242.144) To BY1PR03MB1484.namprd03.prod.outlook.com (25.162.210.142) X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY1PR03MB1484; X-Forefront-Antispam-Report: BMV:1;SFV:NSPM;SFS:(10019020)(6009001)(51704005)(377424004)(377454003)(13464003)(24454002)(19580405001)(46102003)(87976001)(110136001)(19580395003)(92566002)(5820100001)(103116003)(86362001)(76176999)(47776003)(62966003)(33646002)(77156002)(36756003)(23676002)(50226001)(50466002)(2950100001)(122386002)(40100003)(42186005)(50986999)(3826002)(4001450100001)(4001430100001);DIR:OUT;SFP:1102;SCL:1;SRVR:BY1PR03MB1484;H:[IPv6:2601:2:5800:3f7:12bf:48ff:fe84:c9a0];FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(5002010)(5005006);SRVR:BY1PR03MB1484;BCL:0;PCL:0;RULEID:;SRVR:BY1PR03MB1484; X-Forefront-PRVS: 05529C6FDB X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Apr 2015 23:56:56.0105 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR03MB1484 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2053 Lines: 54 On Mon, 2015-04-20 at 03:58 -0500, Liberman Igal-B31950 wrote: > > Regards, > Igal Liberman. > > > -----Original Message----- > > From: Kumar Gala [mailto:galak@kernel.crashing.org] > > Sent: Thursday, March 12, 2015 5:57 PM > > To: Liberman Igal-B31950 > > Cc: linuxppc-dev@lists.ozlabs.org; netdev@vger.kernel.org; linux- > > kernel@vger.kernel.org; Wood Scott-B07421 > > Subject: Re: [RFC,1/8] soc/fman: Add FMan MURAM support > > > > > > On Mar 11, 2015, at 12:07 AM, Igal.Liberman > > wrote: > > > > > From: Igal Liberman > > > > > > Add Frame Manager Multi-User RAM support. > > > > > > Signed-off-by: Igal Liberman > > > --- > > > drivers/soc/fsl/fman/Kconfig | 1 + > > > drivers/soc/fsl/fman/Makefile | 5 +- > > > drivers/soc/fsl/fman/fm_muram.c | 174 > > +++++++++++++++++++++++++++++++ > > > drivers/soc/fsl/fman/inc/fm_muram_ext.h | 98 +++++++++++++++++ > > > 4 files changed, 276 insertions(+), 2 deletions(-) create mode 100644 > > > drivers/soc/fsl/fman/fm_muram.c create mode 100644 > > > drivers/soc/fsl/fman/inc/fm_muram_ext.h > > > > > > > use lib/genalloc instead of rheap > > > > Hi Kumar, > I looked into lib/genalloc allocator. > As far as I see, the genalloc allocator doesn't allow to control the memory alignment when you allocate a chunk of memory. > Two important notes regarding MURAM memory: > - The allocated memory chunks should have specific alignment (might be different in each chunk). > - The allocations must be efficient, we don't want to "waste" MURAM due to alignment issues. If the requirement is that allocations must be size-aligned, use gen_pool_first_fit_order_align. Otherwise, improve genalloc to do what you need. -Scott -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/