nvram driver not possible as a module
Hi,
KConfig says CONFIG_NVRAM is possible as a module. Loading the module fails because of an unknown symbol __alloc_bootmem. __alloc_bootmem is marked __init. The obvious workaround is to compile the driver not as a module, but how can this get really fixed?
Bye,
Joerg
Hi Joerg,
Quoted 4 lines · Joerg Dorchain
KConfig says
CONFIG_NVRAMis possible as a module. Loading the module fails because of an unknown symbol__alloc_bootmem.__alloc_bootmemis marked__init. The obvious workaround is to compile the driver not as a module, but how can this get really fixed?
Does this help:
arch/ppc/platforms/pmac_nvram.c +1 -1
@@ -488,7 +488,7 @@printk (KERN_ERR "nvram: no address\n" );return ; } - nvram_image =alloc_bootmem (NVRAM_SIZE ); + nvram_image =kmalloc (NVRAM_SIZE ,GFP_KERNEL );if (nvram_image ==NULL ) {printk (KERN_ERR "nvram: can't allocate ram image\n" );return ;
Cheers,
-- Guido
Quoted 7 lines · Guido Guenther
Hi Joerg,
Quoted 4 lines · Joerg Dorchain
KConfig says
CONFIG_NVRAMis possible as a module. Loading the module fails because of an unknown symbol__alloc_bootmem.__alloc_bootmemis marked__init. The obvious workaround is to compile the driver not as a module, but how can this get really fixed?Does this help:
[...]
Most likely, if there wasn't a specific reason to use bootmem.
I'll try tonight.
Thanks,
Joerg
PATCH 1/1 nvram driver as module (was Re: nvram driver not possible as a module)
Quoted 6 lines · Joerg Dorchain
Quoted 1 line
Does this help:
[...]
Most likely, if there wasn't a specific reason to use bootmem.
I'll try tonight.
Well, it did not crash. The following does even work ;-)
include/asm-ppc/system.h renamed from include/asm-ppc/system.h.orig +1 -1
@@ -69,7 +69,7 @@#define _set_L3CR (val) do { } while(0)#endif extern void via_cuda_init (void ); -extern void pmac_nvram_init (void ); +extern int pmac_nvram_init (void );extern void read_rtc_time (void );extern void pmac_find_display (void );extern void giveup_fpu (struct task_struct *);
ppc/platforms/pmac_nvram.c renamed from ppc/platforms/pmac_nvram.c.orig +36 -7
91 lines not on this page · raw message