From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mitchel Humpherys Subject: Re: [RFC][PATCH 1/2] WIP: Devicetree bindings for Ion Date: Mon, 12 Oct 2015 11:39:43 -0700 Message-ID: References: <1444164433-9107-1-git-send-email-labbott@fedoraproject.org> <1444164433-9107-2-git-send-email-labbott@fedoraproject.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: In-Reply-To: (Rob Herring's message of "Tue, 6 Oct 2015 17:35:41 -0500") Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Rob Herring Cc: Laura Abbott , Rob Herring , Frank Rowand , Sumit Semwal , Andrew Andrianov , arve-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org, Riley Andrews , Laura Abbott , John Stultz , Grant Likely , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Tom Gall , Colin Cross , devel-gWbeCf7V1WCQmaza687I9mD2FQJk+8+b@public.gmane.org, Greg Kroah-Hartman , romlem-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org, "linux-arm-kernel@lists.infradead.org" , Feng Tang , Marek Szyprowski List-Id: devicetree@vger.kernel.org On Tue, Oct 06 2015 at 05:35:41 PM, Rob Herring wrote: > On Tue, Oct 6, 2015 at 3:47 PM, Laura Abbott wrote: [...] >> +Example: >> + >> + ion { >> + compatbile = "linux,ion"; >> + #address-cells = <1>; >> + #size-cells = <0>; >> + >> + ion-system-heap { >> + linux,ion-heap-id = <0>; >> + linux,ion-heap-type = ; >> + linux,ion-heap-name = "system"; > > How does this vary across platforms? Is all of this being pushed down > to DT, because there is no coordination of this at the kernel ABI > level across platforms. In other words, why can't heap 0 be hardcoded > as system heap in the driver. It seems to me any 1 of these 3 > properties could be used to derive the other 2. The heap-id<->heap-type mapping isn't necessarily 1:1. As Laura indicated elsewhere on this thread, a given heap might need to be contiguous on one platform but not on another. In that case you just swap out the heap-type here and there's no need for userspace to change. The heap-name, OTOH, could be derived from the heap-id, which is what we hackishly do here [1] and here[2]. [1] https://www.codeaurora.org/cgit/quic/la/kernel/msm-3.14/tree/drivers/staging/android/ion/msm/msm_ion.c?h=msm-3.14#n53 [2] https://www.codeaurora.org/cgit/quic/la/kernel/msm-3.14/tree/drivers/staging/android/ion/msm/msm_ion.c?h=msm-3.14#n398 -Mitch -- Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html