All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Hilman <khilman@baylibre.com>
To: "Péter Ujfalusi" <peter.ujfalusi@gmail.com>, dmaengine@vger.kernel.org
Cc: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	Nicolas Frayer <nfrayer@baylibre.com>
Subject: Re: [PATCH 3/3] dma/ti: convert PSIL to be buildable as module
Date: Mon, 26 Sep 2022 11:50:46 -0700	[thread overview]
Message-ID: <7hfsgeezqx.fsf@baylibre.com> (raw)
In-Reply-To: <4c9f0284-f8d0-75e5-8bc9-944b040f9edb@gmail.com>

Péter Ujfalusi <peter.ujfalusi@gmail.com> writes:

> Hi Kevin,
>
> On 9/26/22 21:18, Kevin Hilman wrote:
>> map symbols need EXPORT_SYMBOL and files need MODULE_LICENSE.
>> 
>> Signed-off-by: Kevin Hilman <khilman@baylibre.com>
>> ---
>>  drivers/dma/ti/Kconfig          | 3 ++-
>>  drivers/dma/ti/k3-psil-am62.c   | 4 ++++
>>  drivers/dma/ti/k3-psil-am64.c   | 4 ++++
>>  drivers/dma/ti/k3-psil-am654.c  | 4 ++++
>>  drivers/dma/ti/k3-psil-j7200.c  | 4 ++++
>>  drivers/dma/ti/k3-psil-j721e.c  | 4 ++++
>>  drivers/dma/ti/k3-psil-j721s2.c | 4 ++++
>>  drivers/dma/ti/k3-psil.c        | 2 ++
>>  8 files changed, 28 insertions(+), 1 deletion(-)
>> 
>> diff --git a/drivers/dma/ti/Kconfig b/drivers/dma/ti/Kconfig
>> index f196be3b222f..2adc2cca10e9 100644
>> --- a/drivers/dma/ti/Kconfig
>> +++ b/drivers/dma/ti/Kconfig
>> @@ -56,7 +56,8 @@ config TI_K3_UDMA_GLUE_LAYER
>>  	  If unsure, say N.
>>  
>>  config TI_K3_PSIL
>> -	bool
>> +       tristate
>> +       default TI_K3_UDMA
>>  
>>  config TI_DMA_CROSSBAR
>>  	bool
>> diff --git a/drivers/dma/ti/k3-psil-am62.c b/drivers/dma/ti/k3-psil-am62.c
>> index 2b6fd6e37c61..7c4ca85f68b1 100644
>> --- a/drivers/dma/ti/k3-psil-am62.c
>> +++ b/drivers/dma/ti/k3-psil-am62.c
>> @@ -4,6 +4,7 @@
>>   */
>>  
>>  #include <linux/kernel.h>
>> +#include <linux/module.h>
>>  
>>  #include "k3-psil-priv.h"
>>  
>> @@ -184,3 +185,6 @@ struct psil_ep_map am62_ep_map = {
>>  	.dst = am62_dst_ep_map,
>>  	.dst_count = ARRAY_SIZE(am62_dst_ep_map),
>>  };
>> +EXPORT_SYMBOL_GPL(am62_ep_map);
>
> Wouldn't it be better to build one module (k3-psil.ko) and link all the
> platform libs into that?
> They are unconditionally built in all cases anyways and makes the lsmod
> under control.
> And no need to export these maps at all is a plus.

I guess that's one option, but seems to be to be the wrong direction for
a modular kernel.  To me, it seems like the next step would be to make
it so only the SoC specific module is loaded instead of always loading
them all.

Kevin

WARNING: multiple messages have this Message-ID (diff)
From: Kevin Hilman <khilman@baylibre.com>
To: "Péter Ujfalusi" <peter.ujfalusi@gmail.com>, dmaengine@vger.kernel.org
Cc: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	Nicolas Frayer <nfrayer@baylibre.com>
Subject: Re: [PATCH 3/3] dma/ti: convert PSIL to be buildable as module
Date: Mon, 26 Sep 2022 11:50:46 -0700	[thread overview]
Message-ID: <7hfsgeezqx.fsf@baylibre.com> (raw)
In-Reply-To: <4c9f0284-f8d0-75e5-8bc9-944b040f9edb@gmail.com>

Péter Ujfalusi <peter.ujfalusi@gmail.com> writes:

> Hi Kevin,
>
> On 9/26/22 21:18, Kevin Hilman wrote:
>> map symbols need EXPORT_SYMBOL and files need MODULE_LICENSE.
>> 
>> Signed-off-by: Kevin Hilman <khilman@baylibre.com>
>> ---
>>  drivers/dma/ti/Kconfig          | 3 ++-
>>  drivers/dma/ti/k3-psil-am62.c   | 4 ++++
>>  drivers/dma/ti/k3-psil-am64.c   | 4 ++++
>>  drivers/dma/ti/k3-psil-am654.c  | 4 ++++
>>  drivers/dma/ti/k3-psil-j7200.c  | 4 ++++
>>  drivers/dma/ti/k3-psil-j721e.c  | 4 ++++
>>  drivers/dma/ti/k3-psil-j721s2.c | 4 ++++
>>  drivers/dma/ti/k3-psil.c        | 2 ++
>>  8 files changed, 28 insertions(+), 1 deletion(-)
>> 
>> diff --git a/drivers/dma/ti/Kconfig b/drivers/dma/ti/Kconfig
>> index f196be3b222f..2adc2cca10e9 100644
>> --- a/drivers/dma/ti/Kconfig
>> +++ b/drivers/dma/ti/Kconfig
>> @@ -56,7 +56,8 @@ config TI_K3_UDMA_GLUE_LAYER
>>  	  If unsure, say N.
>>  
>>  config TI_K3_PSIL
>> -	bool
>> +       tristate
>> +       default TI_K3_UDMA
>>  
>>  config TI_DMA_CROSSBAR
>>  	bool
>> diff --git a/drivers/dma/ti/k3-psil-am62.c b/drivers/dma/ti/k3-psil-am62.c
>> index 2b6fd6e37c61..7c4ca85f68b1 100644
>> --- a/drivers/dma/ti/k3-psil-am62.c
>> +++ b/drivers/dma/ti/k3-psil-am62.c
>> @@ -4,6 +4,7 @@
>>   */
>>  
>>  #include <linux/kernel.h>
>> +#include <linux/module.h>
>>  
>>  #include "k3-psil-priv.h"
>>  
>> @@ -184,3 +185,6 @@ struct psil_ep_map am62_ep_map = {
>>  	.dst = am62_dst_ep_map,
>>  	.dst_count = ARRAY_SIZE(am62_dst_ep_map),
>>  };
>> +EXPORT_SYMBOL_GPL(am62_ep_map);
>
> Wouldn't it be better to build one module (k3-psil.ko) and link all the
> platform libs into that?
> They are unconditionally built in all cases anyways and makes the lsmod
> under control.
> And no need to export these maps at all is a plus.

I guess that's one option, but seems to be to be the wrong direction for
a modular kernel.  To me, it seems like the next step would be to make
it so only the SoC specific module is loaded instead of always loading
them all.

Kevin

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2022-09-26 18:50 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-26 18:18 [PATCH 0/3] dma/ti: enable udma and psil to be built as modules Kevin Hilman
2022-09-26 18:18 ` Kevin Hilman
2022-09-26 18:18 ` [PATCH 1/3] of/irq: export of_msi_get_domain Kevin Hilman
2022-09-26 18:18   ` Kevin Hilman
2022-09-26 18:18 ` [PATCH 2/3] dma/ti: convert k3-udma to module Kevin Hilman
2022-09-26 18:18   ` Kevin Hilman
2022-09-26 18:52   ` Péter Ujfalusi
2022-09-26 18:52     ` Péter Ujfalusi
2022-09-26 21:17     ` Kevin Hilman
2022-09-26 21:17       ` Kevin Hilman
2022-09-27 17:07       ` Péter Ujfalusi
2022-09-27 17:07         ` Péter Ujfalusi
2022-09-26 18:18 ` [PATCH 3/3] dma/ti: convert PSIL to be buildable as module Kevin Hilman
2022-09-26 18:18   ` Kevin Hilman
2022-09-26 18:47   ` Péter Ujfalusi
2022-09-26 18:47     ` Péter Ujfalusi
2022-09-26 18:50     ` Kevin Hilman [this message]
2022-09-26 18:50       ` Kevin Hilman
2022-09-27 17:19       ` Péter Ujfalusi
2022-09-27 17:19         ` Péter Ujfalusi
2022-09-27 22:56         ` Kevin Hilman
2022-09-27 22:56           ` Kevin Hilman
2022-09-26 19:02 ` [PATCH 0/3] dma/ti: enable udma and psil to be built as modules Péter Ujfalusi
2022-09-26 19:02   ` Péter Ujfalusi
2022-09-26 21:21   ` Kevin Hilman
2022-09-26 21:21     ` Kevin Hilman
2022-09-27 17:21     ` Péter Ujfalusi
2022-09-27 17:21       ` Péter Ujfalusi
2022-09-27 23:10       ` Kevin Hilman
2022-09-27 23:10         ` Kevin Hilman
2022-09-28 13:54         ` Péter Ujfalusi
2022-09-28 13:54           ` Péter Ujfalusi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7hfsgeezqx.fsf@baylibre.com \
    --to=khilman@baylibre.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=nfrayer@baylibre.com \
    --cc=peter.ujfalusi@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.