diff options
author | kroeckx <kroeckx@0070b5ef-2f16-0410-befa-9a02bd1d6ddb> | 2011-06-03 19:45:43 +0000 |
---|---|---|
committer | kroeckx <kroeckx@0070b5ef-2f16-0410-befa-9a02bd1d6ddb> | 2011-06-03 19:45:43 +0000 |
commit | 3493733373933e08832a81f2be9962ef78ee9119 (patch) | |
tree | e03501b9b4ff4af7a86acc8aa19145fac052832f | |
parent | 90e2522fc895a6d4336d873d36610d50c81fb296 (diff) | |
download | ntp-3493733373933e08832a81f2be9962ef78ee9119.tar.gz |
Drop nanokernel-status.patch.
git-svn-id: svn://svn.debian.org/pkg-ntp/ntp/trunk@328 0070b5ef-2f16-0410-befa-9a02bd1d6ddb
-rw-r--r-- | debian/changelog | 3 | ||||
-rw-r--r-- | debian/patches/nanokernel-status.patch | 120 | ||||
-rw-r--r-- | debian/patches/series | 1 |
3 files changed, 3 insertions, 121 deletions
diff --git a/debian/changelog b/debian/changelog index a685db7..2b3b208 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,9 @@ ntp (1:4.2.6.p3+dfsg-1) unstable; urgency=low - Require newer autogen version * Include sntp in source, it got rewritting and licensed changed. * Re-add neoclock4x driver, license got changed. + * Drop nanokernel-status.patch. 2.6.26 was part of lenny, so everybody + really should have nanokernel support now. The patch also didn't + actually enable the nano kernel. -- Kurt Roeckx <kurt@roeckx.be> Fri, 03 Jun 2011 16:39:02 +0200 diff --git a/debian/patches/nanokernel-status.patch b/debian/patches/nanokernel-status.patch deleted file mode 100644 index 63c8bdf..0000000 --- a/debian/patches/nanokernel-status.patch +++ /dev/null @@ -1,120 +0,0 @@ -From: Kurt Roeckx <kurt@roeckx.be> -Subject: Detect that the kernel has nano support or not. -Bug: https://support.ntp.org/bugs/show_bug.cgi?id=888 - -The code assumed that if STA_NANO is defined the kernel has nano -support. But on Linux, only kernel 2.6.26 and later have nano -kernel support. If run on an older kernel, ntpd does not behave -properly because all values it sends to the kernel are -off by a factor 1000. - -When the nano kernel was designed there was logic added to -detect it. But this got removed from the ntpd binary. This -adds the code again like it was in 4.2.0. - -Index: ntp-4.2.6+dfsg/ntpd/ntp_loopfilter.c -=================================================================== ---- ntp-4.2.6+dfsg.orig/ntpd/ntp_loopfilter.c 2009-12-09 07:36:36.000000000 +0000 -+++ ntp-4.2.6+dfsg/ntpd/ntp_loopfilter.c 2009-12-23 21:10:40.000000000 +0000 -@@ -130,6 +130,7 @@ - #ifdef KERNEL_PLL - static struct timex ntv; /* ntp_adjtime() parameters */ - int pll_status; /* last kernel status bits */ -+int pll_nano; /* nanosecond kernel switch */ - #if defined(STA_NANO) && NTP_API == 4 - static u_int loop_tai; /* last TAI offset */ - #endif /* STA_NANO */ -@@ -516,24 +517,23 @@ - if (ext_enable) { - ntv.modes = MOD_STATUS; - } else { --#ifdef STA_NANO -- ntv.modes = MOD_BITS | MOD_NANO; --#else /* STA_NANO */ -- ntv.modes = MOD_BITS; --#endif /* STA_NANO */ -+ if (pll_nano) -+ ntv.modes = MOD_BITS | MOD_NANO; -+ else -+ ntv.modes = MOD_BITS; - if (clock_offset < 0) - dtemp = -.5; - else - dtemp = .5; --#ifdef STA_NANO -- ntv.offset = (int32)(clock_offset * 1e9 + -- dtemp); -- ntv.constant = sys_poll; --#else /* STA_NANO */ -- ntv.offset = (int32)(clock_offset * 1e6 + -- dtemp); -- ntv.constant = sys_poll - 4; --#endif /* STA_NANO */ -+ if (pll_nano) { -+ ntv.offset = (int32)(clock_offset * 1e9 + -+ dtemp); -+ ntv.constant = sys_poll; -+ } else { -+ ntv.offset = (int32)(clock_offset * 1e6 + -+ dtemp); -+ ntv.constant = sys_poll - 4; -+ } - ntv.esterror = (u_int32)(clock_jitter * 1e6); - ntv.maxerror = (u_int32)((sys_rootdelay / 2 + - sys_rootdisp) * 1e6); -@@ -571,22 +571,20 @@ - "PPS no signal"); - } - pll_status = ntv.status; --#ifdef STA_NANO -- clock_offset = ntv.offset / 1e9; --#else /* STA_NANO */ -- clock_offset = ntv.offset / 1e6; --#endif /* STA_NANO */ -+ if (pll_nano) -+ clock_offset = ntv.offset / 1e9; -+ else -+ clock_offset = ntv.offset / 1e6; - clock_frequency = FREQTOD(ntv.freq); - - /* - * If the kernel PPS is lit, monitor its performance. - */ - if (ntv.status & STA_PPSTIME) { --#ifdef STA_NANO -- clock_jitter = ntv.jitter / 1e9; --#else /* STA_NANO */ -- clock_jitter = ntv.jitter / 1e6; --#endif /* STA_NANO */ -+ if (pll_nano) -+ clock_jitter = ntv.jitter / 1e9; -+ else -+ clock_jitter = ntv.jitter / 1e6; - } - - #if defined(STA_NANO) && NTP_API == 4 -@@ -768,11 +766,10 @@ - if (pll_control && kern_enable) { - memset(&ntv, 0, sizeof(ntv)); - ntp_adjtime(&ntv); --#ifdef STA_NANO -- clock_offset = ntv.offset / 1e9; --#else /* STA_NANO */ -- clock_offset = ntv.offset / 1e6; --#endif /* STA_NANO */ -+ if (pll_nano) -+ clock_offset = ntv.offset / 1e9; -+ else -+ clock_offset = ntv.offset / 1e6; - drift_comp = FREQTOD(ntv.freq); - } - #endif /* KERNEL_PLL */ -@@ -909,6 +906,8 @@ - pll_status = ntv.status; - if (pll_control) { - #ifdef STA_NANO -+ if (pll_status & STA_NANO) -+ pll_nano = 1; - if (pll_status & STA_CLK) - ext_enable = 1; - #endif /* STA_NANO */ diff --git a/debian/patches/series b/debian/patches/series index d50e1d7..2517d24 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -8,4 +8,3 @@ openssl-disable-check.patch libedit.patch autotools.patch mod_nano.patch -nanokernel-status.patch |