[patch 03/38] x86/apm: Remove last LATCH usage
Thomas Gleixner <[email protected]> Fri, 10 Apr 2026 14:18:42 +0200
| Newsgroups | gmane.linux.ports.riscv,gmane.linux.kernel,gmane.linux.network,gmane.linux.kernel.wireless.general,gmane.linux.kernel.cryptoapi,gmane.linux.kernel.mm,gmane.comp.file-systems.ext4,gmane.linux.hams,gmane.linux.ports.alpha,gmane.linux.ports.arm.kernel,gmane.linux.ports.parisc,gmane.linux.ports.ppc64.devel,gmane.linux.ports.sparc |
|---|---|
| Message-ID | <[email protected]> |
LATCH is a historical leftover and has been replaced with PIT_LATCH in all other places a decade ago. Replace the last holdout and remove the definition from jiffies.h. This allows to remove the otherwise unused CLOCK_TICK_RATE define in the next step. Signed-off-by: Thomas Gleixner <[email protected]> --- arch/x86/kernel/apm_32.c | 4 ++-- include/linux/jiffies.h | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) --- a/arch/x86/kernel/apm_32.c +++ b/arch/x86/kernel/apm_32.c @@ -1196,9 +1196,9 @@ static void reinit_timer(void) /* set the clock to HZ */ outb_p(0x34, PIT_MODE); /* binary, mode 2, LSB/MSB, ch 0 */ udelay(10); - outb_p(LATCH & 0xff, PIT_CH0); /* LSB */ + outb_p(PIT_LATCH & 0xff, PIT_CH0); /* LSB */ udelay(10); - outb_p(LATCH >> 8, PIT_CH0); /* MSB */ + outb_p(PIT_LATCH >> 8, PIT_CH0); /* MSB */ udelay(10); raw_spin_unlock_irqrestore(&i8253_lock, flags); #endif --- a/include/linux/jiffies.h +++ b/include/linux/jiffies.h @@ -56,9 +56,6 @@ #define SH_DIV(NOM,DEN,LSH) ( (((NOM) / (DEN)) << (LSH)) \ + ((((NOM) % (DEN)) << (LSH)) + (DEN) / 2) / (DEN)) -/* LATCH is used in the interval timer and ftape setup. */ -#define LATCH ((CLOCK_TICK_RATE + HZ/2) / HZ) /* For divider */ - extern void register_refined_jiffies(long clock_tick_rate); /* TICK_USEC is the time between ticks in usec */