powerpc: Fix some compile problems with the VDSO stuff
authorPaul Mackerras <paulus@samba.org>
Fri, 11 Nov 2005 12:04:40 +0000 (23:04 +1100)
committerPaul Mackerras <paulus@samba.org>
Fri, 11 Nov 2005 12:04:40 +0000 (23:04 +1100)
We needed the VDSO symbols in the arch/ppc asm-offsets.c, and there
were a few usages of _systemcfg still left lying around.

Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/kernel/lparcfg.c
arch/powerpc/kernel/vdso32/Makefile
arch/powerpc/platforms/pseries/rtasd.c
arch/powerpc/platforms/pseries/smp.c
arch/ppc/kernel/asm-offsets.c

index e45ce48ec12642bc972c9fa57142ef21135166cd..1b3ba8a440a6095b9ded96f591814badde7de552 100644 (file)
@@ -35,7 +35,7 @@
 #include <asm/time.h>
 #include <asm/iseries/it_exp_vpd_panel.h>
 #include <asm/prom.h>
-#include <asm/systemcfg.h>
+#include <asm/vdso_datapage.h>
 
 #define MODULE_VERS "1.6"
 #define MODULE_NAME "lparcfg"
@@ -369,7 +369,7 @@ static int lparcfg_data(struct seq_file *m, void *v)
        lrdrp = (int *)get_property(rtas_node, "ibm,lrdr-capacity", NULL);
 
        if (lrdrp == NULL) {
-               partition_potential_processors = _systemcfg->processorCount;
+               partition_potential_processors = vdso_data->processorCount;
        } else {
                partition_potential_processors = *(lrdrp + 4);
        }
index 758331d4d1a51de036a42ae9058a7780e35adf8b..8a3bed5f143a14f4a226a26fbcae4a2ba07e9791 100644 (file)
@@ -19,7 +19,7 @@ EXTRA_AFLAGS := -D__VDSO32__ -s
 
 obj-y += vdso32_wrapper.o
 extra-y += vdso32.lds
-CPPFLAGS_vdso32.lds += -P -C -U$(ARCH)
+CPPFLAGS_vdso32.lds += -P -C -Upowerpc
 
 # Force dependency (incbin is bad)
 $(obj)/vdso32_wrapper.o : $(obj)/vdso32.so
index 00cf331a1dc4dd1c53de8e72c044611f5b8a1ee2..a6f628d4c9dc59130e2c226b7abf6348fa9764d0 100644 (file)
@@ -27,7 +27,6 @@
 #include <asm/prom.h>
 #include <asm/nvram.h>
 #include <asm/atomic.h>
-#include <asm/systemcfg.h>
 
 #if 0
 #define DEBUG(A...)    printk(KERN_ERR A)
index 3ba794ca3288c72fbed747cf1f254fdd5c8ed59a..5800cde7d5adf66c10699b757564d09d3b07fcf8 100644 (file)
@@ -46,7 +46,7 @@
 #include <asm/rtas.h>
 #include <asm/pSeries_reconfig.h>
 #include <asm/mpic.h>
-#include <asm/systemcfg.h>
+#include <asm/vdso_datapage.h>
 
 #include "plpar_wrappers.h"
 
@@ -97,7 +97,7 @@ int pSeries_cpu_disable(void)
        int cpu = smp_processor_id();
 
        cpu_clear(cpu, cpu_online_map);
-       _systemcfg->processorCount--;
+       vdso_data->processorCount--;
 
        /*fix boot_cpuid here*/
        if (cpu == boot_cpuid)
index 968261d6957223a88b3812a414ac0574bb365667..fe0e767fb94ed51f916ce087be3f5efdbd70ea8f 100644 (file)
@@ -25,6 +25,7 @@
 #include <asm/processor.h>
 #include <asm/cputable.h>
 #include <asm/thread_info.h>
+#include <asm/vdso_datapage.h>
 
 #define DEFINE(sym, val) \
        asm volatile("\n->" #sym " %0 " #val : : "i" (val))
@@ -143,5 +144,32 @@ main(void)
 
        DEFINE(TASK_SIZE, TASK_SIZE);
        DEFINE(NUM_USER_SEGMENTS, TASK_SIZE>>28);
+
+       /* datapage offsets for use by vdso */
+       DEFINE(CFG_TB_ORIG_STAMP, offsetof(struct vdso_data, tb_orig_stamp));
+       DEFINE(CFG_TB_TICKS_PER_SEC, offsetof(struct vdso_data, tb_ticks_per_sec));
+       DEFINE(CFG_TB_TO_XS, offsetof(struct vdso_data, tb_to_xs));
+       DEFINE(CFG_STAMP_XSEC, offsetof(struct vdso_data, stamp_xsec));
+       DEFINE(CFG_TB_UPDATE_COUNT, offsetof(struct vdso_data, tb_update_count));
+       DEFINE(CFG_TZ_MINUTEWEST, offsetof(struct vdso_data, tz_minuteswest));
+       DEFINE(CFG_TZ_DSTTIME, offsetof(struct vdso_data, tz_dsttime));
+       DEFINE(CFG_SYSCALL_MAP32, offsetof(struct vdso_data, syscall_map_32));
+       DEFINE(WTOM_CLOCK_SEC, offsetof(struct vdso_data, wtom_clock_sec));
+       DEFINE(WTOM_CLOCK_NSEC, offsetof(struct vdso_data, wtom_clock_nsec));
+       DEFINE(TVAL32_TV_SEC, offsetof(struct timeval, tv_sec));
+       DEFINE(TVAL32_TV_USEC, offsetof(struct timeval, tv_usec));
+       DEFINE(TSPEC32_TV_SEC, offsetof(struct timespec, tv_sec));
+       DEFINE(TSPEC32_TV_NSEC, offsetof(struct timespec, tv_nsec));
+
+       /* timeval/timezone offsets for use by vdso */
+       DEFINE(TZONE_TZ_MINWEST, offsetof(struct timezone, tz_minuteswest));
+       DEFINE(TZONE_TZ_DSTTIME, offsetof(struct timezone, tz_dsttime));
+
+       /* Other bits used by the vdso */
+       DEFINE(CLOCK_REALTIME, CLOCK_REALTIME);
+       DEFINE(CLOCK_MONOTONIC, CLOCK_MONOTONIC);
+       DEFINE(NSEC_PER_SEC, NSEC_PER_SEC);
+       DEFINE(CLOCK_REALTIME_RES, TICK_NSEC);
+
        return 0;
 }