From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755675AbcFIIZT (ORCPT ); Thu, 9 Jun 2016 04:25:19 -0400 Received: from foss.arm.com ([217.140.101.70]:58087 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751675AbcFIIZQ (ORCPT ); Thu, 9 Jun 2016 04:25:16 -0400 Date: Thu, 9 Jun 2016 09:25:02 +0100 From: Brian Starkey To: Laura Abbott Cc: Sumit Semwal , John Stultz , Arve =?iso-8859-1?B?SGr4bm5lduVn?= , Riley Andrews , Laura Abbott , Daniel Vetter , linaro-mm-sig@lists.linaro.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Eun Taik Lee , Liviu Dudau , Jon Medhurst , Mitchel Humpherys , Jeremy Gebben , Bryan Huntsman , Greg Kroah-Hartman , Android Kernel Team Subject: Re: [RFC][PATCH 6/6] staging: android: ion: Introduce new ioctls for dynamic heaps Message-ID: <20160609082502.GA31014@e106950-lin.cambridge.arm.com> References: <1465237413-10549-7-git-send-email-labbott@redhat.com> <20160608153418.GA7722@e106950-lin.cambridge.arm.com> <9356ed78-76eb-ceac-30fa-b4496e6e3ae0@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <9356ed78-76eb-ceac-30fa-b4496e6e3ae0@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Laura, On Wed, Jun 08, 2016 at 12:14:12PM -0700, Laura Abbott wrote: > >For now I'm just going to focus on comments not about the heap ID mapping >because I'm leaning towards dropping the heap ID mapping. > Fair enough. Like you said, giving userspace enough information to just figure out the right heap IDs is already a big improvement. > >I'm not that familiar with the DRM ioctls but this sounds like a >good suggestion. One less ioctl to worry about. > Sorry, I probably should have pointed to an example: http://lxr.free-electrons.com/source/drivers/gpu/drm/drm_crtc.c#L2325 >>>+ */ >>>+struct ion_heap_query { >>>+ __u32 cnt; /* Total number of heaps to be copied */ >>>+ __u64 heaps; /* buffer to be populated */ >> >>I guess this field needs explicit alignment to 64 bits >> > >Yes, I was going by the suggestion in botching-up-ioctls.txt > >https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/ioctl/botching-up-ioctls.txt#n42 > The type is fine, but you should add a 32-bit padding field before heaps: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/ioctl/botching-up-ioctls.txt#n32 Cheers, -Brian