linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Guido Guenther <agx@sigxcpu.org>
To: Joerg Dorchain <joerg@dorchain.net>
Cc: linuxppc-dev list <linuxppc-dev@ozlabs.org>
Subject: Re: nvram driver not possible as a module
Date: Thu, 20 Jan 2005 10:55:46 +0100	[thread overview]
Message-ID: <20050120095546.GD5810@bogon.ms20.nix> (raw)
In-Reply-To: <20050119101448.GA1374@Redstar.dorchain.net>

Hi Joerg,
On Wed, Jan 19, 2005 at 11:14:48AM +0100, Joerg Dorchain wrote:
> 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?
Does this help:

--- linux-2.6.9.orig/arch/ppc/platforms/pmac_nvram.c	2004-10-18 23:53:51.000000000 +0200
+++ linux-2.6.9/arch/ppc/platforms/pmac_nvram.c	2004-10-25 09:53:15.000000000 +0200
@@ -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

  reply	other threads:[~2005-01-20 10:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-19 10:14 nvram driver not possible as a module Joerg Dorchain
2005-01-20  9:55 ` Guido Guenther [this message]
2005-01-20 10:50   ` Joerg Dorchain
2005-01-22 21:20     ` [PATCH] nvram driver as module (was Re: nvram driver not possible as a module) Joerg Dorchain

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=20050120095546.GD5810@bogon.ms20.nix \
    --to=agx@sigxcpu.org \
    --cc=joerg@dorchain.net \
    --cc=linuxppc-dev@ozlabs.org \
    /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 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).