From patchwork Tue Jun 26 14:18:11 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 9624 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id A445B23E23 for ; Tue, 26 Jun 2012 14:18:39 +0000 (UTC) Received: from mail-gg0-f180.google.com (mail-gg0-f180.google.com [209.85.161.180]) by fiordland.canonical.com (Postfix) with ESMTP id 5DD7EA18C62 for ; Tue, 26 Jun 2012 14:18:39 +0000 (UTC) Received: by ggnf1 with SMTP id f1so4139609ggn.11 for ; Tue, 26 Jun 2012 07:18:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to :date:message-id:x-mailer:in-reply-to:references:subject:x-beenthere :x-mailman-version:precedence:list-id:list-unsubscribe:list-archive :list-post:list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:sender:errors-to:x-gm-message-state; bh=8T1OljqCgt0gN5LXosqGycf/6kvi/RbzCJxx+ruQKM0=; b=Bq4hmj1WBbdAmOaDTvJoQ7mdLucjA36qxaLFTq8Uwog4GO1DEFIu3jPB9VDC2E7nhZ Qh56K5e61zTBn12AA1VcMoqlgo8le9OvFEYgcscat2RabcsZMe5bqvSJ/UUeh4mcUH6X asqjsjSldBt6rpZchHXpRFu3dVI75COO0Y9g6Qk2Ku3UUT6G5r6LrAU1BzTqhTG0hcMO U+HxWcxa/z6qT9/YILANzi3+oYnLlh6lwC+rR5nYqr66/CEZuFTFgpw0XZ2/Y6X26wCQ hKlu4ULxSglvR1s2gLy+g5xIwztepJVXwEDGC8CntvoAYfK8TTwdowkDH7qJv1qLVSKG xWkQ== Received: by 10.50.57.167 with SMTP id j7mr11198539igq.53.1340720318496; Tue, 26 Jun 2012 07:18:38 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.24.148 with SMTP id v20csp79224ibb; Tue, 26 Jun 2012 07:18:37 -0700 (PDT) Received: by 10.216.195.19 with SMTP id o19mr8713353wen.207.1340720316517; Tue, 26 Jun 2012 07:18:36 -0700 (PDT) Received: from mombin.canonical.com (mombin.canonical.com. [91.189.95.16]) by mx.google.com with ESMTP id d46si19764963wed.122.2012.06.26.07.18.35; Tue, 26 Jun 2012 07:18:36 -0700 (PDT) Received-SPF: neutral (google.com: 91.189.95.16 is neither permitted nor denied by best guess record for domain of linaro-mm-sig-bounces@lists.linaro.org) client-ip=91.189.95.16; Authentication-Results: mx.google.com; spf=neutral (google.com: 91.189.95.16 is neither permitted nor denied by best guess record for domain of linaro-mm-sig-bounces@lists.linaro.org) smtp.mail=linaro-mm-sig-bounces@lists.linaro.org Received: from localhost ([127.0.0.1] helo=mombin.canonical.com) by mombin.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1SjWbC-0007BE-9v; Tue, 26 Jun 2012 14:18:34 +0000 Received: from mail-bk0-f42.google.com ([209.85.214.42]) by mombin.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1SjWbA-00078J-Eg for linaro-mm-sig@lists.linaro.org; Tue, 26 Jun 2012 14:18:32 +0000 Received: by mail-bk0-f42.google.com with SMTP id ik5so8676947bkc.1 for ; Tue, 26 Jun 2012 07:18:32 -0700 (PDT) Received: by 10.204.154.138 with SMTP id o10mr5555316bkw.34.1340720312055; Tue, 26 Jun 2012 07:18:32 -0700 (PDT) Received: from localhost.localdomain (LPuteaux-156-14-44-212.w82-127.abo.wanadoo.fr. [82.127.83.212]) by mx.google.com with ESMTPS id h18sm50991055bkh.8.2012.06.26.07.18.30 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 26 Jun 2012 07:18:31 -0700 (PDT) From: Benjamin Gaignard To: linaro-mm-sig@lists.linaro.org Date: Tue, 26 Jun 2012 16:18:11 +0200 Message-Id: <1340720293-21221-3-git-send-email-benjamin.gaignard@linaro.org> X-Mailer: git-send-email 1.7.10 In-Reply-To: <1340720293-21221-1-git-send-email-benjamin.gaignard@linaro.org> References: <1340720293-21221-1-git-send-email-benjamin.gaignard@linaro.org> Subject: [Linaro-mm-sig] [PATCH v6 2/4] add private field in ion_heap and ion_platform_heap structure X-BeenThere: linaro-mm-sig@lists.linaro.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Unified memory management interest group." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linaro-mm-sig-bounces@lists.linaro.org Errors-To: linaro-mm-sig-bounces@lists.linaro.org X-Gm-Message-State: ALoCoQnjLfrggxSyidkZPFYarI6fKEfd0bE+MWcMVsTuBMnjW2X+c5e49/6NPXe8CS/ZFasIC8fT copy private field from platform configuration to internal heap structure. Signed-off-by: Benjamin Gaignard --- drivers/gpu/ion/ion_heap.c | 1 + drivers/gpu/ion/ion_priv.h | 2 ++ include/linux/ion.h | 2 ++ 3 files changed, 5 insertions(+) diff --git a/drivers/gpu/ion/ion_heap.c b/drivers/gpu/ion/ion_heap.c index 8ce3c19..f9ab1df 100644 --- a/drivers/gpu/ion/ion_heap.c +++ b/drivers/gpu/ion/ion_heap.c @@ -47,6 +47,7 @@ struct ion_heap *ion_heap_create(struct ion_platform_heap *heap_data) heap->name = heap_data->name; heap->id = heap_data->id; + heap->priv = heap_data->priv; return heap; } diff --git a/drivers/gpu/ion/ion_priv.h b/drivers/gpu/ion/ion_priv.h index cf4a960..58945ab 100644 --- a/drivers/gpu/ion/ion_priv.h +++ b/drivers/gpu/ion/ion_priv.h @@ -99,6 +99,7 @@ struct ion_heap_ops { * allocating. These are specified by platform data and * MUST be unique * @name: used for debugging + * @priv: heap private data * * Represents a pool of memory from which buffers can be made. In some * systems the only heap is regular system memory allocated via vmalloc. @@ -112,6 +113,7 @@ struct ion_heap { struct ion_heap_ops *ops; int id; const char *name; + void *priv; }; /** diff --git a/include/linux/ion.h b/include/linux/ion.h index a03b3a3..b914dbc 100644 --- a/include/linux/ion.h +++ b/include/linux/ion.h @@ -65,6 +65,7 @@ struct ion_buffer; * @name: used for debug purposes * @base: base address of heap in physical memory if applicable * @size: size of the heap in bytes if applicable + * @priv: heap private data * * Provided by the board file. */ @@ -74,6 +75,7 @@ struct ion_platform_heap { const char *name; ion_phys_addr_t base; size_t size; + void *priv; }; /**