Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751609AbdITIpR (ORCPT ); Wed, 20 Sep 2017 04:45:17 -0400 Received: from mail-wm0-f45.google.com ([74.125.82.45]:44263 "EHLO mail-wm0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751228AbdITIpP (ORCPT ); Wed, 20 Sep 2017 04:45:15 -0400 X-Google-Smtp-Source: AOwi7QCa2uq8OaS5bfb7Wwj/cGEDBrBwHncl286jtcpMBoRzWBCLUsRC1Dac28RgHWu49//Lhtg8mw== From: Benjamin Gaignard To: labbott@redhat.com, sumit.semwal@linaro.org, gregkh@linuxfoundation.org, arve@android.com, riandrews@android.com, broonie@kernel.org, dan.carpenter@oracle.com Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Benjamin Gaignard Subject: [PATCH v3 0/2] staging: ion: get one device per heap Date: Wed, 20 Sep 2017 10:45:03 +0200 Message-Id: <1505897105-23721-1-git-send-email-benjamin.gaignard@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1485 Lines: 36 version 3: - change ion_device_add_heap prototype to return a possible error version 2: - simplify ioctl check like propose by Dan - make sure that we don't register more than ION_DEV_MAX heaps Until now all ion heaps are addressing using the same device "/dev/ion". This way of working doesn't allow to give access rights (for example with SElinux rules) per heap. This series propose to have one device "/dev/ionX" per heap. Query heaps informations will be possible on each device node but allocation request will only be possible if heap_mask_id match with device minor number. That really change ion ABI because: - device name change - allocation must be done on the correct device/heap. - device major number will not be the same and that could impact init scripts. Even if splitting ion device in multiple node was one of the item of the de-staging TODO list this must be agreed by a larger audience because it is (again) an ion ABI bing bang. Hopefully that could be discussed at next XDC to get a decission on this particular point. Benjamin Gaignard (2): staging: ion: simplify ioctl args checking function staging: ion: create one device entry per heap drivers/staging/android/TODO | 1 - drivers/staging/android/ion/ion-ioctl.c | 20 +++++++++++++------- drivers/staging/android/ion/ion.c | 27 ++++++++++++++++++++------- drivers/staging/android/ion/ion.h | 12 ++++++++---- 4 files changed, 41 insertions(+), 19 deletions(-) -- 2.7.4