From patchwork Wed Sep 20 08:45:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 113086 Delivered-To: patch@linaro.org Received: by 10.80.163.150 with SMTP id s22csp426281edb; Wed, 20 Sep 2017 01:45:20 -0700 (PDT) X-Received: by 10.98.65.27 with SMTP id o27mr1398284pfa.205.1505897120719; Wed, 20 Sep 2017 01:45:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505897120; cv=none; d=google.com; s=arc-20160816; b=GP6H2bFLATXELSYsOSGsGf7Y/XyPUjlJqo+EK5unyeQSsa73RpscSklvv3c/uUjyuo GHMthrKe/cmNF6cq0x+FjEGSo8+gBYXQ/prkbl8z8rnS6ecY1Z29O1+eyg7gpUX1MRGE AXsC1J5Hlmds41RkQDE941PtnqbXBf4q3soca3BnnDJbcw6ncAPWsVJiP38gSiT3GUgV Mi0p2D8KLPpCRHLjfGXFWbmi6IXpprbgZriJH8olme0Tb0ht5X0s78YvAhsyNCifw6kG ji1dr979ISeaZVgf1kOv76p1tGkNCMIEDmJcNOvyFwlCBcD3rAkVPkIetRfK6JfjT6dn OI/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=GTVqEpVCORTgknP/Uu7azOr00ceHhXkOlkKER/yHqiM=; b=lPAJx0t7bQbyiOS5kPn4wy8+fFLkTy91Mf8dvgwjjJaEmjplWXG5NGhNN8WNK3WRc7 MP/xrQvZ2nJkw45MfcMU7DSuVYCjwqApi5A/ajJ+PPmv5WIS8/G2Am5Eje3dXsIC977R Y7DlkhgJwYtX1y/DnY7luGTAU4gKsLrJEqbXDO3b6M6VUVCalvpVnSlrICh/+ISL2bo+ vas+PMEvUm2Mty1UmY0OPhliWWwikE3Bjsea/E54z1JQNQjVmgMVLyTPXjFCupnjzy1Q jUOz03u5WtxZ9yl8wIQQvoNSZHw0vynBrsMYvXlsEIu4/POMNwX2MKTOUcM2g1AejmkP IAhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jGWMhDrS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t89si2702386pfk.382.2017.09.20.01.45.20; Wed, 20 Sep 2017 01:45:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jGWMhDrS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751648AbdITIpS (ORCPT + 26 others); Wed, 20 Sep 2017 04:45:18 -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 Received: by mail-wm0-f45.google.com with SMTP id 189so3655950wmh.1 for ; Wed, 20 Sep 2017 01:45:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=GTVqEpVCORTgknP/Uu7azOr00ceHhXkOlkKER/yHqiM=; b=jGWMhDrSl0MGA7JJbKLoGI7/3uiMFuMUWMAGDB1KrSl0wawl0cHlz+NNyVMHnmXFvK oMLNlXXR9S+kWWkGOzoXKcS4oeWMsvmz4EeM816BrO5iAepTAEinlHvaYeWawBc8CYEc RoKc3Ul3ggOtfArvCh11omQAEW7L1fCPOM1LI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=GTVqEpVCORTgknP/Uu7azOr00ceHhXkOlkKER/yHqiM=; b=PuflheEf3iWLUh4YeQP6PIszjJoTEpT8h9QCJp48AFm4WA+P8bzDvR18przVGvRSn6 M0AzCEw/YNG37RFFCq4z0ahBa4wr8ALvGcgmflxe15OyKOlnqXo41ASTfDD3/xNijgTm 8zeUgDT5gZXfxe832+5EWWA40XgS59y9lp/qNoTHpi6/w+WDtMbbkXsMxJ9asWgFFRyb b/nLD6fzVFl48kdRI90YMoxi9wUrKNEBOfcrloNRLd/1kJ/vI9qGoGfRUngVwKbPsAq8 3QjNJ4A/3E67lvhKow6AKceHNHa07mITXaQFgjiqr7pNG9H2afAE9b2K7nuevwVKZl+m Wz1A== X-Gm-Message-State: AHPjjUgi3oHHrNuenm2lNY7HwerSckKKUV8ZCWjRLQgSGuYUbf3IOapT ZJmW1yQ/k/kpKTfLodZ+uIydlg== X-Google-Smtp-Source: AOwi7QCa2uq8OaS5bfb7Wwj/cGEDBrBwHncl286jtcpMBoRzWBCLUsRC1Dac28RgHWu49//Lhtg8mw== X-Received: by 10.28.125.6 with SMTP id y6mr3571567wmc.85.1505897113720; Wed, 20 Sep 2017 01:45:13 -0700 (PDT) Received: from lmecxl0911.lme.st.com ([80.215.133.231]) by smtp.gmail.com with ESMTPSA id w9sm1188700wre.58.2017.09.20.01.45.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 20 Sep 2017 01:45:13 -0700 (PDT) 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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