All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch]: pmac nvram driver shouldn't be compileable as a module
@ 2006-05-15 23:01 Guido Guenther
  2006-05-15 23:11 ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 3+ messages in thread
From: Guido Guenther @ 2006-05-15 23:01 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: paulus

Hi,
currently when selecting CONFIG_NVRAM=m on PPC_PMAC on loading the nvram
module one gets:

nvram: module license 'unspecified' taints kernel.
nvram: Unknown symbol of_address_to_resource
nvram: Unknown symbol __alloc_bootmem
nvram: Unknown symbol pmac_newworld

instead of exporting all these to modules it'd be nice to make the
corresponding CONFIG_NVRAM options bool instead of tristate on PMAC_PPC.
I don't think it's intended to be compiled as a module, since it resides
under arch/powerpc/platforms/powermac and not drivers/macintosh. Is
there an easier way to achive this with the build system than the patch
below? If not, please apply.

--- orig/linux-2.6.17-rc4/drivers/char/Kconfig	2006-05-14 21:57:51.000000000 -0500
+++ linux-2.6.17-rc4/drivers/char/Kconfig	2006-05-15 17:06:10.000000000 -0500
@@ -687,7 +687,7 @@
 
 config NVRAM
 	tristate "/dev/nvram support"
-	depends on ATARI || X86 || ARM || GENERIC_NVRAM
+	depends on ATARI || X86 || ARM || (GENERIC_NVRAM && !PPC_PMAC)
 	---help---
 	  If you say Y here and create a character special file /dev/nvram
 	  with major number 10 and minor number 144 using mknod ("man mknod"),
--- orig/linux-2.6.17-rc4/drivers/macintosh/Kconfig	2006-03-19 23:53:29.000000000 -0600
+++ linux-2.6.17-rc4/drivers/macintosh/Kconfig	2006-05-15 17:14:40.000000000 -0500
@@ -200,4 +200,13 @@
 	tristate "Support for ANS LCD display"
 	depends on ADB_CUDA && PPC_PMAC
 
+config PMAC_NVRAM
+	bool "/dev/nvram support"
+	depends on GENERIC_NVRAM && PPC_PMAC
+	---help---
+	  If you say Y here and create a character special file /dev/nvram with
+	  major number 10 and minor number 144 using mknod ("man mknod"), you
+	  get read and write access to the non-volatile memory of your
+	  machine.
+
 endmenu
diff -u -u orig/linux-2.6.17-rc4/arch/powerpc/platforms/powermac/Makefile linux-2.6.17-rc4/arch/powerpc/platforms/powermac/Makefile
--- orig/linux-2.6.17-rc4/arch/powerpc/platforms/powermac/Makefile	2006-03-19 23:53:29.000000000 -0600
+++ linux-2.6.17-rc4/arch/powerpc/platforms/powermac/Makefile	2006-05-15 17:22:43.000000000 -0500
@@ -6,7 +6,7 @@
 obj-$(CONFIG_PMAC_BACKLIGHT)	+= backlight.o
 obj-$(CONFIG_CPU_FREQ_PMAC)	+= cpufreq_32.o
 obj-$(CONFIG_CPU_FREQ_PMAC64)	+= cpufreq_64.o
-obj-$(CONFIG_NVRAM)		+= nvram.o
+obj-$(CONFIG_PMAC_NVRAM)	+= nvram.o
 # ppc64 pmac doesn't define CONFIG_NVRAM but needs nvram stuff
 obj-$(CONFIG_PPC64)		+= nvram.o
 obj-$(CONFIG_PPC32)		+= bootx_init.o

Singed-Off-By: Guido Guenther <agx@sigxcpu.org>
Cheers,
 -- Guido

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

* Re: [patch]: pmac nvram driver shouldn't be compileable as a module
  2006-05-15 23:01 [patch]: pmac nvram driver shouldn't be compileable as a module Guido Guenther
@ 2006-05-15 23:11 ` Benjamin Herrenschmidt
  2006-05-15 23:39   ` Guido Guenther
  0 siblings, 1 reply; 3+ messages in thread
From: Benjamin Herrenschmidt @ 2006-05-15 23:11 UTC (permalink / raw)
  To: Guido Guenther; +Cc: linuxppc-dev, paulus

On Mon, 2006-05-15 at 18:01 -0500, Guido Guenther wrote:
> Hi,
> currently when selecting CONFIG_NVRAM=m on PPC_PMAC on loading the nvram
> module one gets:
> 
> nvram: module license 'unspecified' taints kernel.
> nvram: Unknown symbol of_address_to_resource
> nvram: Unknown symbol __alloc_bootmem
> nvram: Unknown symbol pmac_newworld
> 
> instead of exporting all these to modules it'd be nice to make the
> corresponding CONFIG_NVRAM options bool instead of tristate on PMAC_PPC.
> I don't think it's intended to be compiled as a module, since it resides
> under arch/powerpc/platforms/powermac and not drivers/macintosh. Is
> there an easier way to achive this with the build system than the patch
> below? If not, please apply.

Maybe simply not wrapping it with CONFIG_NVRAM ... 

Ben.

> --- orig/linux-2.6.17-rc4/drivers/char/Kconfig	2006-05-14 21:57:51.000000000 -0500
> +++ linux-2.6.17-rc4/drivers/char/Kconfig	2006-05-15 17:06:10.000000000 -0500
> @@ -687,7 +687,7 @@
>  
>  config NVRAM
>  	tristate "/dev/nvram support"
> -	depends on ATARI || X86 || ARM || GENERIC_NVRAM
> +	depends on ATARI || X86 || ARM || (GENERIC_NVRAM && !PPC_PMAC)
>  	---help---
>  	  If you say Y here and create a character special file /dev/nvram
>  	  with major number 10 and minor number 144 using mknod ("man mknod"),
> --- orig/linux-2.6.17-rc4/drivers/macintosh/Kconfig	2006-03-19 23:53:29.000000000 -0600
> +++ linux-2.6.17-rc4/drivers/macintosh/Kconfig	2006-05-15 17:14:40.000000000 -0500
> @@ -200,4 +200,13 @@
>  	tristate "Support for ANS LCD display"
>  	depends on ADB_CUDA && PPC_PMAC
>  
> +config PMAC_NVRAM
> +	bool "/dev/nvram support"
> +	depends on GENERIC_NVRAM && PPC_PMAC
> +	---help---
> +	  If you say Y here and create a character special file /dev/nvram with
> +	  major number 10 and minor number 144 using mknod ("man mknod"), you
> +	  get read and write access to the non-volatile memory of your
> +	  machine.
> +
>  endmenu
> diff -u -u orig/linux-2.6.17-rc4/arch/powerpc/platforms/powermac/Makefile linux-2.6.17-rc4/arch/powerpc/platforms/powermac/Makefile
> --- orig/linux-2.6.17-rc4/arch/powerpc/platforms/powermac/Makefile	2006-03-19 23:53:29.000000000 -0600
> +++ linux-2.6.17-rc4/arch/powerpc/platforms/powermac/Makefile	2006-05-15 17:22:43.000000000 -0500
> @@ -6,7 +6,7 @@
>  obj-$(CONFIG_PMAC_BACKLIGHT)	+= backlight.o
>  obj-$(CONFIG_CPU_FREQ_PMAC)	+= cpufreq_32.o
>  obj-$(CONFIG_CPU_FREQ_PMAC64)	+= cpufreq_64.o
> -obj-$(CONFIG_NVRAM)		+= nvram.o
> +obj-$(CONFIG_PMAC_NVRAM)	+= nvram.o
>  # ppc64 pmac doesn't define CONFIG_NVRAM but needs nvram stuff
>  obj-$(CONFIG_PPC64)		+= nvram.o
>  obj-$(CONFIG_PPC32)		+= bootx_init.o
> 
> Singed-Off-By: Guido Guenther <agx@sigxcpu.org>
> Cheers,
>  -- Guido

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

* Re: [patch]: pmac nvram driver shouldn't be compileable as a module
  2006-05-15 23:11 ` Benjamin Herrenschmidt
@ 2006-05-15 23:39   ` Guido Guenther
  0 siblings, 0 replies; 3+ messages in thread
From: Guido Guenther @ 2006-05-15 23:39 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev, paulus

On Tue, May 16, 2006 at 09:11:53AM +1000, Benjamin Herrenschmidt wrote:
> On Mon, 2006-05-15 at 18:01 -0500, Guido Guenther wrote:
> > Hi,
> > currently when selecting CONFIG_NVRAM=3Dm on PPC_PMAC on loading the nv=
ram
> > module one gets:
> >=20
> > nvram: module license 'unspecified' taints kernel.
> > nvram: Unknown symbol of_address_to_resource
> > nvram: Unknown symbol __alloc_bootmem
> > nvram: Unknown symbol pmac_newworld
> >=20
> > instead of exporting all these to modules it'd be nice to make the
> > corresponding CONFIG_NVRAM options bool instead of tristate on PMAC_PPC.
> > I don't think it's intended to be compiled as a module, since it resides
> > under arch/powerpc/platforms/powermac and not drivers/macintosh. Is
> > there an easier way to achive this with the build system than the patch
> > below? If not, please apply.
>=20
> Maybe simply not wrapping it with CONFIG_NVRAM ...=20
=2E..which would make it non selectable at all. That's why I introduced
the PMAC_NVRAM.
 -- Guido
>=20
> Ben.
>=20
> > --- orig/linux-2.6.17-rc4/drivers/char/Kconfig	2006-05-14 21:57:51.0000=
00000 -0500
> > +++ linux-2.6.17-rc4/drivers/char/Kconfig	2006-05-15 17:06:10.000000000=
 -0500
> > @@ -687,7 +687,7 @@
> > =20
> >  config NVRAM
> >  	tristate "/dev/nvram support"
> > -	depends on ATARI || X86 || ARM || GENERIC_NVRAM
> > +	depends on ATARI || X86 || ARM || (GENERIC_NVRAM && !PPC_PMAC)
> >  	---help---
> >  	  If you say Y here and create a character special file /dev/nvram
> >  	  with major number 10 and minor number 144 using mknod ("man mknod"),
> > --- orig/linux-2.6.17-rc4/drivers/macintosh/Kconfig	2006-03-19 23:53:29=
=2E000000000 -0600
> > +++ linux-2.6.17-rc4/drivers/macintosh/Kconfig	2006-05-15 17:14:40.0000=
00000 -0500
> > @@ -200,4 +200,13 @@
> >  	tristate "Support for ANS LCD display"
> >  	depends on ADB_CUDA && PPC_PMAC
> > =20
> > +config PMAC_NVRAM
> > +	bool "/dev/nvram support"
> > +	depends on GENERIC_NVRAM && PPC_PMAC
> > +	---help---
> > +	  If you say Y here and create a character special file /dev/nvram wi=
th
> > +	  major number 10 and minor number 144 using mknod ("man mknod"), you
> > +	  get read and write access to the non-volatile memory of your
> > +	  machine.
> > +
> >  endmenu
> > diff -u -u orig/linux-2.6.17-rc4/arch/powerpc/platforms/powermac/Makefi=
le linux-2.6.17-rc4/arch/powerpc/platforms/powermac/Makefile
> > --- orig/linux-2.6.17-rc4/arch/powerpc/platforms/powermac/Makefile	2006=
-03-19 23:53:29.000000000 -0600
> > +++ linux-2.6.17-rc4/arch/powerpc/platforms/powermac/Makefile	2006-05-1=
5 17:22:43.000000000 -0500
> > @@ -6,7 +6,7 @@
> >  obj-$(CONFIG_PMAC_BACKLIGHT)	+=3D backlight.o
> >  obj-$(CONFIG_CPU_FREQ_PMAC)	+=3D cpufreq_32.o
> >  obj-$(CONFIG_CPU_FREQ_PMAC64)	+=3D cpufreq_64.o
> > -obj-$(CONFIG_NVRAM)		+=3D nvram.o
> > +obj-$(CONFIG_PMAC_NVRAM)	+=3D nvram.o
> >  # ppc64 pmac doesn't define CONFIG_NVRAM but needs nvram stuff
> >  obj-$(CONFIG_PPC64)		+=3D nvram.o
> >  obj-$(CONFIG_PPC32)		+=3D bootx_init.o
> >=20
> > Singed-Off-By: Guido Guenther <agx@sigxcpu.org>
> > Cheers,
> >  -- Guido
>=20

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

end of thread, other threads:[~2006-05-15 23:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-15 23:01 [patch]: pmac nvram driver shouldn't be compileable as a module Guido Guenther
2006-05-15 23:11 ` Benjamin Herrenschmidt
2006-05-15 23:39   ` Guido Guenther

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.