summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2002-09-11 15:53:48 +1000
committerAnton Blanchard <anton@samba.org>2002-09-11 15:53:48 +1000
commit98398ebac81a1beb9342bec4fc36d6b9185249c0 (patch)
treeb79be2e9a19a1e1a70e5e797040a9fd558c009ea /include
parent09b1ed32b4aefc85e11c1dbdd66569cf1276a59d (diff)
parented245b591594a32d5ca1ee7d1285fef1d51f14ba (diff)
Merge samba.org:/scratch/anton/linux-2.5
into samba.org:/scratch/anton/linux-2.5_bar
Diffstat (limited to 'include')
-rw-r--r--include/asm-i386/mtrr.h7
-rw-r--r--include/linux/acpi.h4
-rw-r--r--include/linux/pci.h1
-rw-r--r--include/linux/time.h2
-rw-r--r--include/linux/timex.h25
5 files changed, 27 insertions, 12 deletions
diff --git a/include/asm-i386/mtrr.h b/include/asm-i386/mtrr.h
index ff3ea870d0d6..f2727e61fe63 100644
--- a/include/asm-i386/mtrr.h
+++ b/include/asm-i386/mtrr.h
@@ -115,13 +115,6 @@ static __inline__ void mtrr_centaur_report_mcr(int mcr, u32 lo, u32 hi) {;}
# endif
-/* The following functions are for initialisation: don't use them! */
-extern int mtrr_init (void);
-# if defined(CONFIG_SMP) && defined(CONFIG_MTRR)
-extern void mtrr_init_boot_cpu (void);
-extern void mtrr_init_secondary_cpu (void);
-# endif
-
#endif
#endif /* _LINUX_MTRR_H */
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index 9c619036dfb6..1bdcda4d36c8 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -354,11 +354,11 @@ void acpi_numa_arch_fixup(void);
extern int acpi_mp_config;
-#else /*!CONFIG_ACPI_BOOT*/
+#else
#define acpi_mp_config 0
-#endif /*CONFIG_ACPI_BOOT*/
+#endif
#ifdef CONFIG_ACPI_PCI
diff --git a/include/linux/pci.h b/include/linux/pci.h
index b82ec8e41174..79d909a8643a 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -634,7 +634,6 @@ void pci_insert_device(struct pci_dev *, struct pci_bus *);
void pci_remove_device(struct pci_dev *);
struct pci_driver *pci_dev_driver(const struct pci_dev *);
const struct pci_device_id *pci_match_device(const struct pci_device_id *ids, const struct pci_dev *dev);
-void pci_announce_device_to_drivers(struct pci_dev *);
unsigned int pci_do_scan_bus(struct pci_bus *bus);
struct pci_bus * pci_add_new_bus(struct pci_bus *parent, struct pci_dev *dev, int busnr);
diff --git a/include/linux/time.h b/include/linux/time.h
index d9f9c6a340d8..088c52d09449 100644
--- a/include/linux/time.h
+++ b/include/linux/time.h
@@ -113,7 +113,7 @@ mktime (unsigned int year, unsigned int mon,
)*60 + sec; /* finally seconds */
}
-extern struct timeval xtime;
+extern struct timespec xtime;
#define CURRENT_TIME (xtime.tv_sec)
diff --git a/include/linux/timex.h b/include/linux/timex.h
index b82cbdc776f7..5b2b0ac18ae7 100644
--- a/include/linux/timex.h
+++ b/include/linux/timex.h
@@ -155,6 +155,28 @@
/* LATCH is used in the interval timer and ftape setup. */
#define LATCH ((CLOCK_TICK_RATE + HZ/2) / HZ) /* For divider */
+/* Suppose we want to devide two numbers NOM and DEN: NOM/DEN, the we can
+ * improve accuracy by shifting LSH bits, hence calculating:
+ * (NOM << LSH) / DEN
+ * This however means trouble for large NOM, because (NOM << LSH) may no
+ * longer fit in 32 bits. The following way of calculating this gives us
+ * some slack, under the following onditions:
+ * - (NOM / DEN) fits in (32 - LSH) bits.
+ * - (NOM % DEN) fits in (32 - LSH) bits.
+ */
+#define SH_DIV(NOM,DEN,LSH) ( ((NOM / DEN) << LSH) \
+ + (((NOM % DEN) << LSH) + DEN / 2) / DEN)
+
+/* HZ is the requested value. ACTHZ is actual HZ ("<< 8" is for accuracy) */
+#define ACTHZ (SH_DIV (CLOCK_TICK_RATE, LATCH, 8))
+
+/* TICK_USEC is the time between ticks in usec assuming fake USER_HZ */
+#define TICK_USEC ((1000000UL + USER_HZ/2) / USER_HZ)
+
+/* TICK_NSEC is the time between ticks in nsec assuming real ACTHZ and */
+/* a value TUSEC for TICK_USEC (can be set bij adjtimex) */
+#define TICK_NSEC(TUSEC) (SH_DIV (TUSEC * USER_HZ * 1000, ACTHZ, 8))
+
/*
* syscall interface - used (mainly by NTP daemon)
* to discipline kernel clock oscillator
@@ -251,7 +273,8 @@ struct timex {
* Note: maximum error = NTP synch distance = dispersion + delay / 2;
* estimated error = NTP dispersion.
*/
-extern long tick; /* timer interrupt period */
+extern unsigned long tick_usec; /* USER_HZ period (usec) */
+extern unsigned long tick_nsec; /* ACTHZ period (nsec) */
extern int tickadj; /* amount of adjustment per tick */
/*