patches/linux/2.6.11.3/170-linux-2.6.11-allow-gcc-4.0-ppc-mikpe.patch
changeset 847 af75fc1fe0fc
parent 846 23d2d8defa03
child 848 5b3785e0d41d
     1.1 --- a/patches/linux/2.6.11.3/170-linux-2.6.11-allow-gcc-4.0-ppc-mikpe.patch	Fri Sep 05 16:15:34 2008 +0000
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,86 +0,0 @@
     1.4 -
     1.5 -Fixes
     1.6 -
     1.7 -In file included from arch/ppc/kernel/time.c:68:
     1.8 -arch/ppc/kernel/time.c:92: error: static declaration of 'time_offset' follows non-static declaration
     1.9 -include/linux/timex.h:236: error: previous declaration of 'time_offset' was here
    1.10 -make[1]: *** [arch/ppc/kernel/time.o] Error 1
    1.11 -
    1.12 -when compiling with gcc-4.0
    1.13 -
    1.14 -Taken from
    1.15 -http://user.it.uu.se/~mikpe/linux/patches/2.6/patch-gcc4-fixes-v2-2.6.11
    1.16 -Also removes some obsolete externs that caused problems for Mike
    1.17 -Mike's patch has a bit more stuff in it, but this was enough for me
    1.18 -
    1.19 -
    1.20 -diff -rupN linux-2.6.11/arch/ppc/kernel/time.c linux-2.6.11.gcc4-fixes-v2/arch/ppc/kernel/time.c
    1.21 ---- linux-2.6.11/arch/ppc/kernel/time.c	2005-03-02 19:24:14.000000000 +0100
    1.22 -+++ linux-2.6.11.gcc4-fixes-v2/arch/ppc/kernel/time.c	2005-03-02 19:36:26.000000000 +0100
    1.23 -@@ -89,7 +89,7 @@ unsigned long tb_to_ns_scale;
    1.24 - 
    1.25 - extern unsigned long wall_jiffies;
    1.26 - 
    1.27 --static long time_offset;
    1.28 -+static long ppc_time_offset;
    1.29 - 
    1.30 - DEFINE_SPINLOCK(rtc_lock);
    1.31 - 
    1.32 -@@ -172,7 +172,7 @@ void timer_interrupt(struct pt_regs * re
    1.33 - 		     xtime.tv_sec - last_rtc_update >= 659 &&
    1.34 - 		     abs((xtime.tv_nsec / 1000) - (1000000-1000000/HZ)) < 500000/HZ &&
    1.35 - 		     jiffies - wall_jiffies == 1) {
    1.36 --		  	if (ppc_md.set_rtc_time(xtime.tv_sec+1 + time_offset) == 0)
    1.37 -+		  	if (ppc_md.set_rtc_time(xtime.tv_sec+1 + ppc_time_offset) == 0)
    1.38 - 				last_rtc_update = xtime.tv_sec+1;
    1.39 - 			else
    1.40 - 				/* Try again one minute later */
    1.41 -@@ -289,7 +289,7 @@ void __init time_init(void)
    1.42 - 	unsigned old_stamp, stamp, elapsed;
    1.43 - 
    1.44 -         if (ppc_md.time_init != NULL)
    1.45 --                time_offset = ppc_md.time_init();
    1.46 -+                ppc_time_offset = ppc_md.time_init();
    1.47 - 
    1.48 - 	if (__USE_RTC()) {
    1.49 - 		/* 601 processor: dec counts down by 128 every 128ns */
    1.50 -@@ -334,10 +334,10 @@ void __init time_init(void)
    1.51 - 	set_dec(tb_ticks_per_jiffy);
    1.52 - 
    1.53 - 	/* If platform provided a timezone (pmac), we correct the time */
    1.54 --        if (time_offset) {
    1.55 --		sys_tz.tz_minuteswest = -time_offset / 60;
    1.56 -+        if (ppc_time_offset) {
    1.57 -+		sys_tz.tz_minuteswest = -ppc_time_offset / 60;
    1.58 - 		sys_tz.tz_dsttime = 0;
    1.59 --		xtime.tv_sec -= time_offset;
    1.60 -+		xtime.tv_sec -= ppc_time_offset;
    1.61 -         }
    1.62 -         set_normalized_timespec(&wall_to_monotonic,
    1.63 -                                 -xtime.tv_sec, -xtime.tv_nsec);
    1.64 -diff -rupN linux-2.6.11/arch/ppc/syslib/open_pic_defs.h linux-2.6.11.gcc4-fixes-v2/arch/ppc/syslib/open_pic_defs.h
    1.65 ---- linux-2.6.11/arch/ppc/syslib/open_pic_defs.h	2005-03-02 19:24:14.000000000 +0100
    1.66 -+++ linux-2.6.11.gcc4-fixes-v2/arch/ppc/syslib/open_pic_defs.h	2005-03-02 19:36:26.000000000 +0100
    1.67 -@@ -172,9 +172,6 @@ struct OpenPIC {
    1.68 -     OpenPIC_Processor Processor[OPENPIC_MAX_PROCESSORS];
    1.69 - };
    1.70 - 
    1.71 --extern volatile struct OpenPIC __iomem *OpenPIC;
    1.72 --
    1.73 --
    1.74 -     /*
    1.75 -      *  Current Task Priority Register
    1.76 -      */
    1.77 -diff -rupN linux-2.6.11/include/asm-ppc/prom.h linux-2.6.11.gcc4-fixes-v2/include/asm-ppc/prom.h
    1.78 ---- linux-2.6.11/include/asm-ppc/prom.h	2003-09-28 12:19:57.000000000 +0200
    1.79 -+++ linux-2.6.11.gcc4-fixes-v2/include/asm-ppc/prom.h	2005-03-02 19:36:26.000000000 +0100
    1.80 -@@ -13,9 +13,6 @@
    1.81 - typedef void *phandle;
    1.82 - typedef void *ihandle;
    1.83 - 
    1.84 --extern char *prom_display_paths[];
    1.85 --extern unsigned int prom_num_displays;
    1.86 --
    1.87 - struct address_range {
    1.88 - 	unsigned int space;
    1.89 - 	unsigned int address;