Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1225397pxb; Thu, 21 Oct 2021 18:50:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz5W66oe3Hew/oQhcztpQDdJ3kBDDo6c1zdAI2o59rUZMXHWAAQarrdztIhEGMyEgxjHiQ4 X-Received: by 2002:a63:688a:: with SMTP id d132mr7109967pgc.255.1634867459181; Thu, 21 Oct 2021 18:50:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634867459; cv=none; d=google.com; s=arc-20160816; b=SDFIuNxOE0tCN4Z9+WXXUwNaX0k6qrpLevuqyHeHyAVda0O9UxWbSGInXGW17GnL0Q A8kJcN1pjh7odytxKxgyTpffwfmVsFyPll2wKNNU+3oXnPp9a2z3iw42xRwSuoJb9m+9 TlpnDUyZXk+kqLi63EL0zwqTX7FhEUretK37M25Kn8sZwlH5xnGLdol0Hs1azGWjNOxW 9Ywej0x+IDD4KOKrb7tNNo5OLf86vKwo9FOqquZn+Z7tlg8/sCHLyLHYS7BHNV+CfRp0 nUvo0VkyjJIvwWLKmiW54sZ1keuUqOtTSaAzdhjG9jwQrm/8mrBbm0iiJrL4nRoZhhmf tx4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=xBJ/DPaPoZ+opA2wgapBsgSMz1ur33cONvltMiuEneE=; b=EsUF+T05EVE3qP9THuCAHJJUghT9W74K2OA7RuNfTXEJVHJgmf+jk9VQHm5dJIOQqj /YghGGPo7rOJrEAoVcbrlWrNXIDvaXn3zzg7qnLW/1RJJ4B3nqKvFzvLaoNLw819hpiw d1165CQcCe+loTyDcJsG8IleUDW5E4r3AGh5ojIU3h6h9exEvKPMGS3kUfPnT562QMoJ I3A79dbHwST/a3BHGZjGdgMlJJFfblPb8sFVB6it7E4kNyaqobEwjc5HDfE/4awIdOlZ NChY6D0JFUnMvpApKgU22A76Q3dkq6mvXqiWy3/zZkfJb6GU8cvPoW2rrjIqdS0MeHXW f15A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s133si9967514pgs.250.2021.10.21.18.50.46; Thu, 21 Oct 2021 18:50:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231567AbhJVBwA (ORCPT + 99 others); Thu, 21 Oct 2021 21:52:00 -0400 Received: from out28-148.mail.aliyun.com ([115.124.28.148]:50247 "EHLO out28-148.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230190AbhJVBwA (ORCPT ); Thu, 21 Oct 2021 21:52:00 -0400 X-Alimail-AntiSpam: AC=CONTINUE;BC=0.1947132|-1;CH=green;DM=|CONTINUE|false|;DS=CONTINUE|ham_system_inform|0.00895314-0.00138788-0.989659;FP=13645255560291118206|1|1|8|0|-1|-1|-1;HT=ay29a033018047211;MF=huangshuosheng@allwinnertech.com;NM=1;PH=DS;RN=10;RT=10;SR=0;TI=SMTPD_---.LflF5bR_1634867362; Received: from allwinnertech.com(mailfrom:huangshuosheng@allwinnertech.com fp:SMTPD_---.LflF5bR_1634867362) by smtp.aliyun-inc.com(10.147.40.44); Fri, 22 Oct 2021 09:49:41 +0800 From: Shuosheng Huang To: sumit.semwal@linaro.org, lmark@codeaurora.org, labbott@redhat.com, Brian.Starkey@arm.com, john.stultz@linaro.org, christian.koenig@amd.com Cc: linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Shuosheng Huang Subject: [PATCH v2] dma-buf: heaps: init heaps in subsys_initcall Date: Fri, 22 Oct 2021 09:48:50 +0800 Message-Id: <20211022014850.22933-1-huangshuosheng@allwinnertech.com> X-Mailer: git-send-email 2.29.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Some built-in modules will failed to use dma-buf heap to allocate memory if the heap drivers are too late to be initialized. To fix this issue, move initialization of dma-buf heap drivers in subsys_initcall() which is more earlier to be called. Signed-off-by: Shuosheng Huang --- drivers/dma-buf/heaps/cma_heap.c | 2 +- drivers/dma-buf/heaps/system_heap.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/dma-buf/heaps/cma_heap.c b/drivers/dma-buf/heaps/cma_heap.c index 0c05b79870f9..e051403a346d 100644 --- a/drivers/dma-buf/heaps/cma_heap.c +++ b/drivers/dma-buf/heaps/cma_heap.c @@ -400,6 +400,6 @@ static int add_default_cma_heap(void) return ret; } -module_init(add_default_cma_heap); +subsys_initcall(add_default_cma_heap); MODULE_DESCRIPTION("DMA-BUF CMA Heap"); MODULE_LICENSE("GPL v2"); diff --git a/drivers/dma-buf/heaps/system_heap.c b/drivers/dma-buf/heaps/system_heap.c index 23a7e74ef966..3d6927657ec9 100644 --- a/drivers/dma-buf/heaps/system_heap.c +++ b/drivers/dma-buf/heaps/system_heap.c @@ -435,5 +435,5 @@ static int system_heap_create(void) return 0; } -module_init(system_heap_create); +subsys_initcall(system_heap_create); MODULE_LICENSE("GPL v2"); -- 2.29.0