public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH]  apm cannot be compiled as a module in 2.5.31
@ 2002-08-25 13:21 Peter T. Breuer
  2002-08-25 14:30 ` Christoph Hellwig
  0 siblings, 1 reply; 2+ messages in thread
From: Peter T. Breuer @ 2002-08-25 13:21 UTC (permalink / raw)
  To: linux-kernel

apm complains about cpu_gdt_table and xtime_lock when compiled as a
module for SMP. Yes, it makes sense. I run the same kernel everywhere,
even on machines with one cpu.


--- kernel/ksyms.c.orig	Sun Aug 25 15:15:02 2002
+++ kernel/ksyms.c	Thu Aug 22 19:11:07 2002
@@ -428,6 +428,10 @@
 EXPORT_SYMBOL(__br_write_unlock);
 #endif
 
+#ifdef CONFIG_X86
+EXPORT_SYMBOL(cpu_gdt_table);
+#endif
+
 /* Kiobufs */
 EXPORT_SYMBOL(alloc_kiovec);
 EXPORT_SYMBOL(free_kiovec);


Hurrr .. the xtime_lock is harder. Have to EXPORT from the file where
it is defined. Locks only make sense in SMP so only export if compiled
for SMP.


--- kernel/timer.c.orig	Sun Aug 25 15:17:09 2002
+++ kernel/timer.c	Thu Aug 22 19:13:15 2002
@@ -635,6 +635,9 @@
  * playing with xtime and avenrun.
  */
 rwlock_t xtime_lock __cacheline_aligned_in_smp = RW_LOCK_UNLOCKED;
+#ifdef CONFIG_SMP
+EXPORT_SYMBOL(xtime_lock);
+#endif
 
 unsigned long last_time_offset;
 

And we need to fix the kernel/Makefile too?


--- kernel/Makefile.orig	Sun Aug 25 15:19:22 2002
+++ kernel/Makefile	Thu Aug 22 19:11:59 2002
@@ -10,7 +10,7 @@
 O_TARGET := kernel.o
 
 export-objs = signal.o sys.o kmod.o context.o ksyms.o pm.o exec_domain.o \
-		printk.o platform.o suspend.o dma.o
+		printk.o platform.o suspend.o dma.o timer.o
 
 obj-y     = sched.o fork.o exec_domain.o panic.o printk.o \
 	    module.o exit.o itimer.o time.o softirq.o resource.o \

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

* Re: [PATCH]  apm cannot be compiled as a module in 2.5.31
  2002-08-25 13:21 [PATCH] apm cannot be compiled as a module in 2.5.31 Peter T. Breuer
@ 2002-08-25 14:30 ` Christoph Hellwig
  0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2002-08-25 14:30 UTC (permalink / raw)
  To: Peter T. Breuer; +Cc: linux-kernel

On Sun, Aug 25, 2002 at 03:21:09PM +0200, Peter T. Breuer wrote:
> --- kernel/ksyms.c.orig	Sun Aug 25 15:15:02 2002
> +++ kernel/ksyms.c	Thu Aug 22 19:11:07 2002
> @@ -428,6 +428,10 @@
>  EXPORT_SYMBOL(__br_write_unlock);
>  #endif
>  
> +#ifdef CONFIG_X86
> +EXPORT_SYMBOL(cpu_gdt_table);
> +#endif

I think arch/i386/kernel/i386_ksysm.c is a better place for this

> Hurrr .. the xtime_lock is harder. Have to EXPORT from the file where
> it is defined. Locks only make sense in SMP so only export if compiled
> for SMP.
> 
> 
> --- kernel/timer.c.orig	Sun Aug 25 15:17:09 2002
> +++ kernel/timer.c	Thu Aug 22 19:13:15 2002
> @@ -635,6 +635,9 @@
>   * playing with xtime and avenrun.
>   */
>  rwlock_t xtime_lock __cacheline_aligned_in_smp = RW_LOCK_UNLOCKED;
> +#ifdef CONFIG_SMP
> +EXPORT_SYMBOL(xtime_lock);
> +#endif

you could aswell include the matching header in ksyms.c..


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

end of thread, other threads:[~2002-08-25 14:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-08-25 13:21 [PATCH] apm cannot be compiled as a module in 2.5.31 Peter T. Breuer
2002-08-25 14:30 ` Christoph Hellwig

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