public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* [Linux-ia64] Some Modules fail w/ unresolved cpu_info__per_cpu
@ 2002-10-17  1:08 Lee, Jung-Ik
  2002-10-17  7:45 ` Christian Cotte-Barrot
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Lee, Jung-Ik @ 2002-10-17  1:08 UTC (permalink / raw)
  To: linux-ia64

On 2.5.39, 
it fails to insmod some modules that refers to "cpu_info__per_cpu".
That global IS DEFINE_PER_CPU'd, DECLARE_PER_CPU'd and is in System.map but
for some reason it fails to resolve.
Have you guys seen this ?

thanks
J.I.

-----Original Message-----
From: Luck, Tony [mailto:tony.luck@intel.com]
Sent: Wednesday, October 16, 2002 10:56 AM
To: Luck, Tony; linux ia64 kernel list
Cc: linux-kernel@vger.kernel.org
Subject: RE: [Linux-ia64] [patch 2.5.39] allow kernel to be virtually
mapp ed from any physi cal address


Yesterday I wrote:
> This patch provides just the code needed to virtually map the
> kernel to a fixed virtual address from whatever physical address
> it happened to be loaded at (it is assumed that the bootloader
> handled the issue of finding a suitably aligned piece of memory).

Elilo already knows how to find memory, as long as you either use
the "relocatable" keyword in elilo.conf, or the "-r" command-line
option to let it know that it is OK to relocate.

Using this elilo option means that the changes I provided for
vmlinux.ld.S can be very slightly simplified, it isn't necessary
to define BASE_KVADDR as "KERNEL_START + KERNEL_TR_PAGE_SIZE", you
can just use:

#define BASE_KVADDR	KERNEL_START

-Tony

_______________________________________________
Linux-IA64 mailing list
Linux-IA64@linuxia64.org
http://lists.linuxia64.org/lists/listinfo/linux-ia64


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

* Re: [Linux-ia64] Some Modules fail w/ unresolved cpu_info__per_cpu
  2002-10-17  1:08 [Linux-ia64] Some Modules fail w/ unresolved cpu_info__per_cpu Lee, Jung-Ik
@ 2002-10-17  7:45 ` Christian Cotte-Barrot
  2002-10-17  8:19 ` Keith Owens
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Christian Cotte-Barrot @ 2002-10-17  7:45 UTC (permalink / raw)
  To: linux-ia64

"Lee, Jung-Ik" wrote:
> 
> On 2.5.39,
> it fails to insmod some modules that refers to "cpu_info__per_cpu".
> That global IS DEFINE_PER_CPU'd, DECLARE_PER_CPU'd and is in System.map but
> for some reason it fails to resolve.
> Have you guys seen this ?
> 
> thanks
> J.I.
>

Yes I have seen something similar with the ipmi driver ("imb") on Tiger
but with the 2.5.35 release.
I found that the exported symbol name via /proc/ksyms is in fact:  
  cpu_info__per_cpu_R__ver_cpu_info__per_cpu

Then I did not ask much more questions to me trying to find the root
cause of the problem within the kernel sources and I just added the 
following trivial modification in the driver's code:
#define cpu_info__per_cpu   cpu_info__per_cpu_R__ver_cpu_info__per_cpu

With this workaround insmod didn't complain anymore about "cpu_info__per_cpu"
and the driver works correctly.

But I am agree it is just a workaround and we shouldn't have to
modify drivers's code for such problem.

> -----Original Message-----
> From: Luck, Tony [mailto:tony.luck@intel.com]
> Sent: Wednesday, October 16, 2002 10:56 AM
> To: Luck, Tony; linux ia64 kernel list
> Cc: linux-kernel@vger.kernel.org
> Subject: RE: [Linux-ia64] [patch 2.5.39] allow kernel to be virtually
> mapp ed from any physi cal address
> 
> Yesterday I wrote:
> > This patch provides just the code needed to virtually map the
> > kernel to a fixed virtual address from whatever physical address
> > it happened to be loaded at (it is assumed that the bootloader
> > handled the issue of finding a suitably aligned piece of memory).
> 
> Elilo already knows how to find memory, as long as you either use
> the "relocatable" keyword in elilo.conf, or the "-r" command-line
> option to let it know that it is OK to relocate.
> 
> Using this elilo option means that the changes I provided for
> vmlinux.ld.S can be very slightly simplified, it isn't necessary
> to define BASE_KVADDR as "KERNEL_START + KERNEL_TR_PAGE_SIZE", you
> can just use:
> 
> #define BASE_KVADDR     KERNEL_START
> 
> -Tony
> 
> _______________________________________________
> Linux-IA64 mailing list
> Linux-IA64@linuxia64.org
> http://lists.linuxia64.org/lists/listinfo/linux-ia64
> 
> _______________________________________________
> Linux-IA64 mailing list
> Linux-IA64@linuxia64.org
> http://lists.linuxia64.org/lists/listinfo/linux-ia64


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

* Re: [Linux-ia64] Some Modules fail w/ unresolved cpu_info__per_cpu
  2002-10-17  1:08 [Linux-ia64] Some Modules fail w/ unresolved cpu_info__per_cpu Lee, Jung-Ik
  2002-10-17  7:45 ` Christian Cotte-Barrot
@ 2002-10-17  8:19 ` Keith Owens
  2002-10-17 10:31 ` Christian Cotte-Barrot
  2003-02-19 11:55 ` Christian Cotte-Barrot
  3 siblings, 0 replies; 5+ messages in thread
From: Keith Owens @ 2002-10-17  8:19 UTC (permalink / raw)
  To: linux-ia64

On Thu, 17 Oct 2002 09:45:48 +0200, 
Christian Cotte-Barrot <Christian.Cotte-Barrot@bull.net> wrote:
>I found that the exported symbol name via /proc/ksyms is in fact:  
>  cpu_info__per_cpu_R__ver_cpu_info__per_cpu
>
>Then I did not ask much more questions to me trying to find the root
>cause of the problem within the kernel sources and I just added the 
>following trivial modification in the driver's code:
>#define cpu_info__per_cpu   cpu_info__per_cpu_R__ver_cpu_info__per_cpu
>
>With this workaround insmod didn't complain anymore about "cpu_info__per_cpu"
>and the driver works correctly.
>
>But I am agree it is just a workaround and we shouldn't have to
>modify drivers's code for such problem.

Arrghh, don't do that!  FAQ: http://www.tux.org/lkml/#s8-8.



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

* Re: [Linux-ia64] Some Modules fail w/ unresolved cpu_info__per_cpu
  2002-10-17  1:08 [Linux-ia64] Some Modules fail w/ unresolved cpu_info__per_cpu Lee, Jung-Ik
  2002-10-17  7:45 ` Christian Cotte-Barrot
  2002-10-17  8:19 ` Keith Owens
@ 2002-10-17 10:31 ` Christian Cotte-Barrot
  2003-02-19 11:55 ` Christian Cotte-Barrot
  3 siblings, 0 replies; 5+ messages in thread
From: Christian Cotte-Barrot @ 2002-10-17 10:31 UTC (permalink / raw)
  To: linux-ia64

Keith Owens wrote:
> 
> On Thu, 17 Oct 2002 09:45:48 +0200,
> Christian Cotte-Barrot <Christian.Cotte-Barrot@bull.net> wrote:
> >I found that the exported symbol name via /proc/ksyms is in fact:
> >  cpu_info__per_cpu_R__ver_cpu_info__per_cpu
> >
> >Then I did not ask much more questions to me trying to find the root
> >cause of the problem within the kernel sources and I just added the
> >following trivial modification in the driver's code:
> >#define cpu_info__per_cpu   cpu_info__per_cpu_R__ver_cpu_info__per_cpu
> >
> >With this workaround insmod didn't complain anymore about "cpu_info__per_cpu"
> >and the driver works correctly.
> >
> >But I am agree it is just a workaround and we shouldn't have to
> >modify drivers's code for such problem.
> 
> Arrghh, don't do that!  FAQ: http://www.tux.org/lkml/#s8-8.

Agree, agree, agree, ...

In my case I had just the need to verify that the ipmi driver still worked
on Tiger platform and I applied a very temporary workaround in order that
the module would be successfully loaded.
I agree it is a nasty huge correction and I won't pretend it is a clean one.
I just wanted to answer I hit the problem and give an easy and simple way to
bybass it.


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

* Re: [Linux-ia64] Some Modules fail w/ unresolved cpu_info__per_cpu
  2002-10-17  1:08 [Linux-ia64] Some Modules fail w/ unresolved cpu_info__per_cpu Lee, Jung-Ik
                   ` (2 preceding siblings ...)
  2002-10-17 10:31 ` Christian Cotte-Barrot
@ 2003-02-19 11:55 ` Christian Cotte-Barrot
  3 siblings, 0 replies; 5+ messages in thread
From: Christian Cotte-Barrot @ 2003-02-19 11:55 UTC (permalink / raw)
  To: linux-ia64

"Lee, Jung-Ik" wrote:
> 
> On 2.5.39,
> it fails to insmod some modules that refers to "cpu_info__per_cpu".
> That global IS DEFINE_PER_CPU'd, DECLARE_PER_CPU'd and is in System.map but
> for some reason it fails to resolve.
> Have you guys seen this ?
> 
> thanks
> J.I.
> 

That's an old story but we met the "unresolved symbol cpu_info__per_cpu"
problem again with e100.o and e1000.o modules on a 2.4.45 release.
Looks like the EXPORT_SYMBOL macro has problem to generate the
checksum for symbols defined with *PER_CPU* macros.
The kernel exports the wrong cpu_info__per_cpu_R__ver_cpu_info__per_cpu
symbol where "__ver_cpu_info__per_cpu" should be a checksum ?
Found a cleaner patch than in the past, just replaced
    EXPORT_SYMBOL(cpu_info__per_cpu);
  with
    EXPORT_SYMBOL_NOVERS(cpu_info__per_cpu);
  in
    ./arch/ia64/kernel/ia64_ksyms.c

CCB.


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

end of thread, other threads:[~2003-02-19 11:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-17  1:08 [Linux-ia64] Some Modules fail w/ unresolved cpu_info__per_cpu Lee, Jung-Ik
2002-10-17  7:45 ` Christian Cotte-Barrot
2002-10-17  8:19 ` Keith Owens
2002-10-17 10:31 ` Christian Cotte-Barrot
2003-02-19 11:55 ` Christian Cotte-Barrot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox