All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* Device Tree support for x86_64 kernel?  Unresolved symbol apic_force_enable
@ 2014-03-03 17:57 Bob Paauwe
  0 siblings, 0 replies; 2+ messages in thread
From: Bob Paauwe @ 2014-03-03 17:57 UTC (permalink / raw
  To: kernelnewbies

Background:

I'm working on a project that needs device tree like capability. Using
the device tree OF driver works well and I don't want to create something
that closely duplicates that functionality.  

When building a 32bit kernel, all works fine. However when building a
64bit kernel, the linking stage fails with an unresolved symbol: 
  apic_force_enable

This symbol is getting called from arch/x86/kernel/devicetree.c and is
defined in arch/x86/kernel/apic/apic.c but only when !CONFIG_X86_64

I see two possible fixes but as I'm unfamiliar with this area of the
kernel I don't know which would be a better choice.

1) in arch/x86/kernel/apic/apic.c, define the apic_force_enable() 
   function in the X86_64 bit path and have it return 0.  Something like:

   
   int __init apic_force_enable(unsigned long addr)
   {
      return 0;
   }

2) wrap the call to apic_force_enable with a #ifndef CONFIG_X86_64 in
   devicetree.c. Something like :

   #ifndef CONFIG_X86_64
         if (apic_force_enable(r.start))
            return;
   #else
         return;
   #endif

I've been using #1 successfully in my development and it seems like it
would be the best choice long term.  I'm looking for some validation
that this makes sense and if so, I'll submit a patch to lkm with the
fix.

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

* Device Tree support for x86_64 kernel?  Unresolved symbol apic_force_enable
@ 2014-03-07 18:53 Bob Paauwe
  0 siblings, 0 replies; 2+ messages in thread
From: Bob Paauwe @ 2014-03-07 18:53 UTC (permalink / raw
  To: kernelnewbies

Background:

I'm working on a project that needs device tree like capability. Using
the device tree OF driver works well and I don't want to create something
that closely duplicates that functionality.  

When building a 32bit kernel, all works fine. However when building a
64bit kernel, the linking stage fails with an unresolved symbol: 
  apic_force_enable

This symbol is getting called from arch/x86/kernel/devicetree.c and is
defined in arch/x86/kernel/apic/apic.c but only when !CONFIG_X86_64

I see two possible fixes but as I'm unfamiliar with this area of the
kernel I don't know which would be a better choice.

1) in arch/x86/kernel/apic/apic.c, define the apic_force_enable() 
   function in the X86_64 bit path and have it return 0.  Something like:

   
   int __init apic_force_enable(unsigned long addr)
   {
      return 0;
   }

2) wrap the call to apic_force_enable with a #ifndef CONFIG_X86_64 in
   devicetree.c. Something like :

   #ifndef CONFIG_X86_64
         if (apic_force_enable(r.start))
            return;
   #else
         return;
   #endif

I've been using #1 successfully in my development and it seems like it
would be the best choice long term.  I'm looking for some validation
that this makes sense and if so, I'll submit a patch to lkm with the
fix.

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

end of thread, other threads:[~2014-03-07 18:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-03 17:57 Device Tree support for x86_64 kernel? Unresolved symbol apic_force_enable Bob Paauwe
  -- strict thread matches above, loose matches on Subject: below --
2014-03-07 18:53 Bob Paauwe

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.