From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from e39.co.us.ibm.com ([32.97.110.160]) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QTY01-0002bP-FU for kexec@lists.infradead.org; Mon, 06 Jun 2011 11:29:38 +0000 Received: from d03relay02.boulder.ibm.com (d03relay02.boulder.ibm.com [9.17.195.227]) by e39.co.us.ibm.com (8.14.4/8.13.1) with ESMTP id p56BFPml004253 for ; Mon, 6 Jun 2011 05:15:25 -0600 Received: from d03av04.boulder.ibm.com (d03av04.boulder.ibm.com [9.17.195.170]) by d03relay02.boulder.ibm.com (8.13.8/8.13.8/NCO v9.1) with ESMTP id p56BTWda153984 for ; Mon, 6 Jun 2011 05:29:32 -0600 Received: from d03av04.boulder.ibm.com (loopback [127.0.0.1]) by d03av04.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p565TUSk029964 for ; Sun, 5 Jun 2011 23:29:30 -0600 Message-ID: <4DECBA16.7070300@in.ibm.com> Date: Mon, 06 Jun 2011 16:59:26 +0530 From: Suzuki Poulose MIME-Version: 1.0 Subject: Re: [RFC][PATCH] powerpc: Use the #address-cells information to parsememory/reg References: In-Reply-To: List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: kexec-bounces@lists.infradead.org Errors-To: kexec-bounces+dwmw2=twosheds.infradead.org@lists.infradead.org To: David Laight Cc: Sebastian Andrzej Siewior , kexec@lists.infradead.org, lkml , Simon Horman , linux ppc dev , Vivek Goyal On 06/06/11 14:30, David Laight wrote: >>> Changed the add_usable_mem_property() to accept FILE* fp instead of > int fd, >>> as most of the other users of read_memory_region_limits() deals with > FILE*. >>> >>> Signed-off-by: Suzuki K. Poulose >> >> Could you please let me know your thoughts/comments about this patch ? > > Is the change to use 'FILE *' actually progress? > I'd have thought that the randomly aligned read/lseek system calls > that this allows to happen are not desirable for anything that > isn't a true file. I will revert the other users back to 'fd' > > I'd also suggest that the sizeof's should be applied to the > actual type of the variable being read/written, not arbitrarily > 'long' or 'int', and this probably ought to be some fixed size type. I have used 'unsigned long'(for word sized values) or 'unsigned long long' (for double words) just to make sure we get the right values. Is this OK ? Thanks Suzuki _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from e31.co.us.ibm.com (e31.co.us.ibm.com [32.97.110.149]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "e31.co.us.ibm.com", Issuer "Equifax" (verified OK)) by ozlabs.org (Postfix) with ESMTPS id 57564B6FB6 for ; Mon, 6 Jun 2011 21:29:37 +1000 (EST) Received: from d03relay02.boulder.ibm.com (d03relay02.boulder.ibm.com [9.17.195.227]) by e31.co.us.ibm.com (8.14.4/8.13.1) with ESMTP id p56BCrXe029207 for ; Mon, 6 Jun 2011 05:12:53 -0600 Received: from d03av04.boulder.ibm.com (d03av04.boulder.ibm.com [9.17.195.170]) by d03relay02.boulder.ibm.com (8.13.8/8.13.8/NCO v9.1) with ESMTP id p56BTWDF055430 for ; Mon, 6 Jun 2011 05:29:32 -0600 Received: from d03av04.boulder.ibm.com (loopback [127.0.0.1]) by d03av04.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p565TUSm029964 for ; Sun, 5 Jun 2011 23:29:31 -0600 Message-ID: <4DECBA16.7070300@in.ibm.com> Date: Mon, 06 Jun 2011 16:59:26 +0530 From: Suzuki Poulose MIME-Version: 1.0 To: David Laight Subject: Re: [RFC][PATCH] powerpc: Use the #address-cells information to parsememory/reg References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Cc: Sebastian Andrzej Siewior , kexec@lists.infradead.org, lkml , Simon Horman , linux ppc dev , Vivek Goyal List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On 06/06/11 14:30, David Laight wrote: >>> Changed the add_usable_mem_property() to accept FILE* fp instead of > int fd, >>> as most of the other users of read_memory_region_limits() deals with > FILE*. >>> >>> Signed-off-by: Suzuki K. Poulose >> >> Could you please let me know your thoughts/comments about this patch ? > > Is the change to use 'FILE *' actually progress? > I'd have thought that the randomly aligned read/lseek system calls > that this allows to happen are not desirable for anything that > isn't a true file. I will revert the other users back to 'fd' > > I'd also suggest that the sizeof's should be applied to the > actual type of the variable being read/written, not arbitrarily > 'long' or 'int', and this probably ought to be some fixed size type. I have used 'unsigned long'(for word sized values) or 'unsigned long long' (for double words) just to make sure we get the right values. Is this OK ? Thanks Suzuki From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756155Ab1FFL3i (ORCPT ); Mon, 6 Jun 2011 07:29:38 -0400 Received: from e31.co.us.ibm.com ([32.97.110.149]:33020 "EHLO e31.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754302Ab1FFL3h (ORCPT ); Mon, 6 Jun 2011 07:29:37 -0400 Message-ID: <4DECBA16.7070300@in.ibm.com> Date: Mon, 06 Jun 2011 16:59:26 +0530 From: Suzuki Poulose User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc14 Thunderbird/3.1.10 MIME-Version: 1.0 To: David Laight CC: Simon Horman , linux ppc dev , Sebastian Andrzej Siewior , kexec@lists.infradead.org, lkml , Vivek Goyal Subject: Re: [RFC][PATCH] powerpc: Use the #address-cells information to parsememory/reg References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/06/11 14:30, David Laight wrote: >>> Changed the add_usable_mem_property() to accept FILE* fp instead of > int fd, >>> as most of the other users of read_memory_region_limits() deals with > FILE*. >>> >>> Signed-off-by: Suzuki K. Poulose >> >> Could you please let me know your thoughts/comments about this patch ? > > Is the change to use 'FILE *' actually progress? > I'd have thought that the randomly aligned read/lseek system calls > that this allows to happen are not desirable for anything that > isn't a true file. I will revert the other users back to 'fd' > > I'd also suggest that the sizeof's should be applied to the > actual type of the variable being read/written, not arbitrarily > 'long' or 'int', and this probably ought to be some fixed size type. I have used 'unsigned long'(for word sized values) or 'unsigned long long' (for double words) just to make sure we get the right values. Is this OK ? Thanks Suzuki