From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754018AbdKFP74 (ORCPT ); Mon, 6 Nov 2017 10:59:56 -0500 Received: from mail-wr0-f195.google.com ([209.85.128.195]:44620 "EHLO mail-wr0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754005AbdKFP7z (ORCPT ); Mon, 6 Nov 2017 10:59:55 -0500 X-Google-Smtp-Source: ABhQp+Sa0Q3lIr9cZeKc4KaIGsp7DSr8dBVTu53YaSIyIS2wLdNKDRlUzTlF6TnyGoOJgtO/XqS3Dw== 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, linux-api@vger.kernel.org, Benjamin Gaignard Subject: [PATCH v6 0/2] staging: ion: get one device per heap Date: Mon, 6 Nov 2017 16:59:43 +0100 Message-Id: <1509983985-20950-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 version 6: - add an ION bus so heap are show as devices in /sys/bus/ion/ instead of platform bus. - split the patch in two: one for include reordering and one for per heap device change - rebased on top of next-2017110 tag version 5: - create a configuration flag to keep legacy Ion misc device version 4: - add a configuration flag to switch between legacy Ion misc device and one device per heap version. This change has been suggested after Laura talks at XDC 2017. 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. Using legacy Ion misc device is still by setting ION_LEGACY_DEVICE_API configuration flag. Benjamin Gaignard (2): staging: ion: reorder include staging: ion: create one device entry per heap drivers/staging/android/TODO | 1 - drivers/staging/android/ion/Kconfig | 7 +++ drivers/staging/android/ion/ion-ioctl.c | 18 +++++++- drivers/staging/android/ion/ion.c | 76 +++++++++++++++++++++++++++------ drivers/staging/android/ion/ion.h | 15 ++++++- 5 files changed, 98 insertions(+), 19 deletions(-) -- 2.7.4