LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] bus: brcmstb_gisb: Allow building as module
@ 2021-09-24 19:10 Florian Fainelli
  2021-09-27 21:04 ` Florian Fainelli
  2021-11-05  2:51 ` Guenter Roeck
  0 siblings, 2 replies; 5+ messages in thread
From: Florian Fainelli @ 2021-09-24 19:10 UTC (permalink / raw)
  To: linux-kernel
  Cc: Florian Fainelli, maintainer:BROADCOM BCM7XXX ARM ARCHITECTURE,
	Arnd Bergmann, Linus Walleij, open list,
	moderated list:BROADCOM BCM7XXX ARM ARCHITECTURE

Allow building the Broadcom STB GISB arbiter driver as a module, however
similar to interrupt controller drivers, don't allow its unbind/removal
since it is not quite prepared for that and we want it to catch bus
errors all the time.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 drivers/bus/Kconfig        | 2 +-
 drivers/bus/brcmstb_gisb.c | 7 ++++++-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/bus/Kconfig b/drivers/bus/Kconfig
index a5b96f3aad67..9cfeae3fc244 100644
--- a/drivers/bus/Kconfig
+++ b/drivers/bus/Kconfig
@@ -30,7 +30,7 @@ config ARM_INTEGRATOR_LM
 	  found on the ARM Integrator AP (Application Platform)
 
 config BRCMSTB_GISB_ARB
-	bool "Broadcom STB GISB bus arbiter"
+	tristate "Broadcom STB GISB bus arbiter"
 	depends on ARM || ARM64 || MIPS
 	default ARCH_BRCMSTB || BMIPS_GENERIC
 	help
diff --git a/drivers/bus/brcmstb_gisb.c b/drivers/bus/brcmstb_gisb.c
index 6551286a60cc..4c2f7d61cb9b 100644
--- a/drivers/bus/brcmstb_gisb.c
+++ b/drivers/bus/brcmstb_gisb.c
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0-only
 /*
- * Copyright (C) 2014-2017 Broadcom
+ * Copyright (C) 2014-2021 Broadcom
  */
 
 #include <linux/init.h>
@@ -536,6 +536,7 @@ static struct platform_driver brcmstb_gisb_arb_driver = {
 		.name	= "brcm-gisb-arb",
 		.of_match_table = brcmstb_gisb_arb_of_match,
 		.pm	= &brcmstb_gisb_arb_pm_ops,
+		.suppress_bind_attrs = true,
 	},
 };
 
@@ -546,3 +547,7 @@ static int __init brcm_gisb_driver_init(void)
 }
 
 module_init(brcm_gisb_driver_init);
+
+MODULE_AUTHOR("Broadcom");
+MODULE_DESCRIPTION("Broadcom STB GISB arbiter driver");
+MODULE_LICENSE("GPL v2");
-- 
2.25.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] bus: brcmstb_gisb: Allow building as module
  2021-09-24 19:10 [PATCH] bus: brcmstb_gisb: Allow building as module Florian Fainelli
@ 2021-09-27 21:04 ` Florian Fainelli
  2021-11-05  2:51 ` Guenter Roeck
  1 sibling, 0 replies; 5+ messages in thread
From: Florian Fainelli @ 2021-09-27 21:04 UTC (permalink / raw)
  To: bcm-kernel-feedback-list, linux-kernel
  Cc: Arnd Bergmann, Linus Walleij, open list,
	moderated list:BROADCOM BCM7XXX ARM ARCHITECTURE

On Fri, 24 Sep 2021 12:10:34 -0700, Florian Fainelli <f.fainelli@gmail.com> wrote:
> Allow building the Broadcom STB GISB arbiter driver as a module, however
> similar to interrupt controller drivers, don't allow its unbind/removal
> since it is not quite prepared for that and we want it to catch bus
> errors all the time.
> 
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
> ---

Applied to https://github.com/Broadcom/stblinux/commits/drivers/next, thanks!
--
Florian

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] bus: brcmstb_gisb: Allow building as module
  2021-09-24 19:10 [PATCH] bus: brcmstb_gisb: Allow building as module Florian Fainelli
  2021-09-27 21:04 ` Florian Fainelli
@ 2021-11-05  2:51 ` Guenter Roeck
  2021-11-05  2:56   ` Florian Fainelli
  1 sibling, 1 reply; 5+ messages in thread
From: Guenter Roeck @ 2021-11-05  2:51 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: linux-kernel, maintainer:BROADCOM BCM7XXX ARM ARCHITECTURE,
	Arnd Bergmann, Linus Walleij, open list,
	moderated list:BROADCOM BCM7XXX ARM ARCHITECTURE

On Fri, Sep 24, 2021 at 12:10:34PM -0700, Florian Fainelli wrote:
> Allow building the Broadcom STB GISB arbiter driver as a module, however
> similar to interrupt controller drivers, don't allow its unbind/removal
> since it is not quite prepared for that and we want it to catch bus
> errors all the time.
> 
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>

Hmm, did you actually test that ?

Building mips:allmodconfig ... failed
--------------
Error log:
<stdin>:1559:2: warning: #warning syscall futex_waitv not implemented [-Wcpp]
ERROR: modpost: "board_be_handler" [drivers/bus/brcmstb_gisb.ko] undefined!

Guenter

>  drivers/bus/Kconfig        | 2 +-
>  drivers/bus/brcmstb_gisb.c | 7 ++++++-
>  2 files changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/bus/Kconfig b/drivers/bus/Kconfig
> index a5b96f3aad67..9cfeae3fc244 100644
> --- a/drivers/bus/Kconfig
> +++ b/drivers/bus/Kconfig
> @@ -30,7 +30,7 @@ config ARM_INTEGRATOR_LM
>  	  found on the ARM Integrator AP (Application Platform)
>  
>  config BRCMSTB_GISB_ARB
> -	bool "Broadcom STB GISB bus arbiter"
> +	tristate "Broadcom STB GISB bus arbiter"
>  	depends on ARM || ARM64 || MIPS
>  	default ARCH_BRCMSTB || BMIPS_GENERIC
>  	help
> diff --git a/drivers/bus/brcmstb_gisb.c b/drivers/bus/brcmstb_gisb.c
> index 6551286a60cc..4c2f7d61cb9b 100644
> --- a/drivers/bus/brcmstb_gisb.c
> +++ b/drivers/bus/brcmstb_gisb.c
> @@ -1,6 +1,6 @@
>  // SPDX-License-Identifier: GPL-2.0-only
>  /*
> - * Copyright (C) 2014-2017 Broadcom
> + * Copyright (C) 2014-2021 Broadcom
>   */
>  
>  #include <linux/init.h>
> @@ -536,6 +536,7 @@ static struct platform_driver brcmstb_gisb_arb_driver = {
>  		.name	= "brcm-gisb-arb",
>  		.of_match_table = brcmstb_gisb_arb_of_match,
>  		.pm	= &brcmstb_gisb_arb_pm_ops,
> +		.suppress_bind_attrs = true,
>  	},
>  };
>  
> @@ -546,3 +547,7 @@ static int __init brcm_gisb_driver_init(void)
>  }
>  
>  module_init(brcm_gisb_driver_init);
> +
> +MODULE_AUTHOR("Broadcom");
> +MODULE_DESCRIPTION("Broadcom STB GISB arbiter driver");
> +MODULE_LICENSE("GPL v2");

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] bus: brcmstb_gisb: Allow building as module
  2021-11-05  2:51 ` Guenter Roeck
@ 2021-11-05  2:56   ` Florian Fainelli
  2021-11-05  8:13     ` Thomas Bogendoerfer
  0 siblings, 1 reply; 5+ messages in thread
From: Florian Fainelli @ 2021-11-05  2:56 UTC (permalink / raw)
  To: Guenter Roeck, Thomas Bogendoerfer
  Cc: linux-kernel, maintainer:BROADCOM BCM7XXX ARM ARCHITECTURE,
	Arnd Bergmann, Linus Walleij, open list,
	moderated list:BROADCOM BCM7XXX ARM ARCHITECTURE



On 11/4/2021 7:51 PM, Guenter Roeck wrote:
> On Fri, Sep 24, 2021 at 12:10:34PM -0700, Florian Fainelli wrote:
>> Allow building the Broadcom STB GISB arbiter driver as a module, however
>> similar to interrupt controller drivers, don't allow its unbind/removal
>> since it is not quite prepared for that and we want it to catch bus
>> errors all the time.
>>
>> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
> 
> Hmm, did you actually test that ?

Great way to introduce someone to a problem, really.

> 
> Building mips:allmodconfig ... failed
> --------------
> Error log:
> <stdin>:1559:2: warning: #warning syscall futex_waitv not implemented [-Wcpp]
> ERROR: modpost: "board_be_handler" [drivers/bus/brcmstb_gisb.ko] undefined!

I did not indeed test a modular build for MIPS and had not anticipated 
it to fail. Thomas, do you have any objections exporting 
board_be_handler to modules or would you rather not do it and force the 
driver to be boolean for MIPS?

> 
> Guenter
> 
>>   drivers/bus/Kconfig        | 2 +-
>>   drivers/bus/brcmstb_gisb.c | 7 ++++++-
>>   2 files changed, 7 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/bus/Kconfig b/drivers/bus/Kconfig
>> index a5b96f3aad67..9cfeae3fc244 100644
>> --- a/drivers/bus/Kconfig
>> +++ b/drivers/bus/Kconfig
>> @@ -30,7 +30,7 @@ config ARM_INTEGRATOR_LM
>>   	  found on the ARM Integrator AP (Application Platform)
>>   
>>   config BRCMSTB_GISB_ARB
>> -	bool "Broadcom STB GISB bus arbiter"
>> +	tristate "Broadcom STB GISB bus arbiter"
>>   	depends on ARM || ARM64 || MIPS
>>   	default ARCH_BRCMSTB || BMIPS_GENERIC
>>   	help
>> diff --git a/drivers/bus/brcmstb_gisb.c b/drivers/bus/brcmstb_gisb.c
>> index 6551286a60cc..4c2f7d61cb9b 100644
>> --- a/drivers/bus/brcmstb_gisb.c
>> +++ b/drivers/bus/brcmstb_gisb.c
>> @@ -1,6 +1,6 @@
>>   // SPDX-License-Identifier: GPL-2.0-only
>>   /*
>> - * Copyright (C) 2014-2017 Broadcom
>> + * Copyright (C) 2014-2021 Broadcom
>>    */
>>   
>>   #include <linux/init.h>
>> @@ -536,6 +536,7 @@ static struct platform_driver brcmstb_gisb_arb_driver = {
>>   		.name	= "brcm-gisb-arb",
>>   		.of_match_table = brcmstb_gisb_arb_of_match,
>>   		.pm	= &brcmstb_gisb_arb_pm_ops,
>> +		.suppress_bind_attrs = true,
>>   	},
>>   };
>>   
>> @@ -546,3 +547,7 @@ static int __init brcm_gisb_driver_init(void)
>>   }
>>   
>>   module_init(brcm_gisb_driver_init);
>> +
>> +MODULE_AUTHOR("Broadcom");
>> +MODULE_DESCRIPTION("Broadcom STB GISB arbiter driver");
>> +MODULE_LICENSE("GPL v2");

-- 
Florian

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] bus: brcmstb_gisb: Allow building as module
  2021-11-05  2:56   ` Florian Fainelli
@ 2021-11-05  8:13     ` Thomas Bogendoerfer
  0 siblings, 0 replies; 5+ messages in thread
From: Thomas Bogendoerfer @ 2021-11-05  8:13 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: Guenter Roeck, linux-kernel,
	maintainer:BROADCOM BCM7XXX ARM ARCHITECTURE, Arnd Bergmann,
	Linus Walleij, open list,
	moderated list:BROADCOM BCM7XXX ARM ARCHITECTURE

On Thu, Nov 04, 2021 at 07:56:12PM -0700, Florian Fainelli wrote:
> 
> 
> On 11/4/2021 7:51 PM, Guenter Roeck wrote:
> > On Fri, Sep 24, 2021 at 12:10:34PM -0700, Florian Fainelli wrote:
> > > Allow building the Broadcom STB GISB arbiter driver as a module, however
> > > similar to interrupt controller drivers, don't allow its unbind/removal
> > > since it is not quite prepared for that and we want it to catch bus
> > > errors all the time.
> > > 
> > > Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
> > 
> > Hmm, did you actually test that ?
> 
> Great way to introduce someone to a problem, really.
> 
> > 
> > Building mips:allmodconfig ... failed
> > --------------
> > Error log:
> > <stdin>:1559:2: warning: #warning syscall futex_waitv not implemented [-Wcpp]
> > ERROR: modpost: "board_be_handler" [drivers/bus/brcmstb_gisb.ko] undefined!
> 
> I did not indeed test a modular build for MIPS and had not anticipated it to
> fail. Thomas, do you have any objections exporting board_be_handler to
> modules or would you rather not do it and force the driver to be boolean for
> MIPS?

I'd prefer to not export it, so making the driver non-modular for MIPS
would be a solution. If there is a need to set the bus error handling
I'd like to see a function setting and that function could be exported.

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-11-05  8:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-24 19:10 [PATCH] bus: brcmstb_gisb: Allow building as module Florian Fainelli
2021-09-27 21:04 ` Florian Fainelli
2021-11-05  2:51 ` Guenter Roeck
2021-11-05  2:56   ` Florian Fainelli
2021-11-05  8:13     ` Thomas Bogendoerfer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).