From patchwork Fri Oct 25 23:48:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 11213235 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D0A25112C for ; Fri, 25 Oct 2019 23:48:41 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B5CA121D7F for ; Fri, 25 Oct 2019 23:48:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B5CA121D7F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id ECD2D6EBD3; Fri, 25 Oct 2019 23:48:39 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pf1-x442.google.com (mail-pf1-x442.google.com [IPv6:2607:f8b0:4864:20::442]) by gabe.freedesktop.org (Postfix) with ESMTPS id BCE106EBD6 for ; Fri, 25 Oct 2019 23:48:38 +0000 (UTC) Received: by mail-pf1-x442.google.com with SMTP id c7so1490983pfo.12 for ; Fri, 25 Oct 2019 16:48:38 -0700 (PDT) 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=Bhq3e5+uTtbnGM7apONt9dMc+TmRaAuRWUEzjpFFxKA=; b=a77Ah38eIdbNS3t38PYhdWG1cmNbNUXcJrPkWA5wMScoVTtXEa/UHwad1NpMcfOt7q 8JfOcw/ODlbjj1bO08CErMRaDq7Ng9AKnvJrKwtQWOVz0nNcKzj0Y33QHFQYRFmC4e8h YAJK9cFK9zFSaNpZx4pXo9u3xNOjPc1PBHItW8pwhXZkaRPYqNE8JY/DTVa6ypcYyxjN 3T4ZMM6kHJIMKJfLDIX10L5kri4nQva1JPkFuE4KxPWNls0d2s37J6BIBiXhUxBCS5lc /udpp0fUSFV4+zktxCgnFatk2WeBFBZcJqH8CIL5wHnx4HE69tZjZYRmxV4dbQCSl6pL tZqw== X-Gm-Message-State: APjAAAVB39J1J2HIc9FllGovDPold/KBUsBED61DoEQ7ez6JrndZg7Ny h2l1YVkvZNNBq6zgXovVi/3bCA== X-Google-Smtp-Source: APXvYqxK5zzLBLTheaoqGS6HUi/9jdNBz4CMzP1n1AQBGIWin5A7To0oQJs4sRbfzAk1m2zELppMdw== X-Received: by 2002:a62:4d04:: with SMTP id a4mr7431646pfb.71.1572047318043; Fri, 25 Oct 2019 16:48:38 -0700 (PDT) Received: from localhost.localdomain ([2601:1c2:680:1319:692:26ff:feda:3a81]) by smtp.gmail.com with ESMTPSA id cx22sm2817179pjb.19.2019.10.25.16.48.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Oct 2019 16:48:37 -0700 (PDT) From: John Stultz To: lkml Subject: [RFC][PATCH 0/2] Allow DMA BUF heaps to be loaded as modules Date: Fri, 25 Oct 2019 23:48:32 +0000 Message-Id: <20191025234834.28214-1-john.stultz@linaro.org> X-Mailer: git-send-email 2.17.1 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=Bhq3e5+uTtbnGM7apONt9dMc+TmRaAuRWUEzjpFFxKA=; b=BYPTEufAVLkHLG6Q3wf3G8dMHPiwZIiYsyj+S/697RWsfwa4c9jd2jJRLAAI6tNE5/ m6ooU4AS61vxB4eWwc/gMw0I6ZRirirCkWb6cNM3lEFq16sXWQZdsyUaXQyaNVlqWkRf BtdDVyXgRgcMr6T9KEd41anhcn1llPhz2mwydOKMwn6LTs2HQxcFMHkupJgq01MNgo4W 5oz3n0ihU4nVYVEMw1Fn/wbsQ0VwgkpToV06QLqlc6ZrZ6QQM1+oRzY6c1z3qMdbCpN/ /sWbw8DaH9fC5a72hETtdQHBjO7CoWh2mrjP+c5mf3RSONmIB2rOuPH3hdpu03xNcTGx VnOw== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sandeep Patil , Mike Rapoport , Chenbo Feng , Alistair Strachan , Liam Mark , Yue Hu , dri-devel@lists.freedesktop.org, "Andrew F . Davis" , Hridya Valsaraju , Andrew Morton , Pratik Patel MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Now that the DMA BUF heaps core code has been queued, I wanted to send out some of the pending changes that I've been working on. For use with Android and their GKI effort, it is desired that DMA BUF heaps are able to be loaded as modules. This is required for migrating vendors off of ION which was also recently changed to support modules. So this patch series simply provides the necessary exported symbols and allows the system and CMA drivers to be built as modules. Due to the fact that dmabuf's allocated from a heap may be in use for quite some time, there isn't a way to safely unload the driver once it has been loaded. Thus these drivers do no implement module_exit() functions and will show up in lsmod as "[permanent]" Feedback and thoughts on this would be greatly appreciated! thanks -john Cc: Laura Abbott Cc: Benjamin Gaignard Cc: Sumit Semwal Cc: Liam Mark Cc: Pratik Patel Cc: Brian Starkey Cc: Andrew F. Davis Cc: Andrew Morton Cc: Yue Hu Cc: Mike Rapoport Cc: Chenbo Feng Cc: Alistair Strachan Cc: Sandeep Patil Cc: Hridya Valsaraju Cc: dri-devel@lists.freedesktop.org John Stultz (1): dma-buf: heaps: Allow system & cma heaps to be configured as a modules Sandeep Patil (1): mm: cma: Export cma symbols for cma heap as a module drivers/dma-buf/dma-heap.c | 2 ++ drivers/dma-buf/heaps/Kconfig | 4 ++-- drivers/dma-buf/heaps/heap-helpers.c | 2 ++ kernel/dma/contiguous.c | 1 + mm/cma.c | 5 +++++ 5 files changed, 12 insertions(+), 2 deletions(-)