Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S264989AbTFYTpN (ORCPT ); Wed, 25 Jun 2003 15:45:13 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S264997AbTFYTpN (ORCPT ); Wed, 25 Jun 2003 15:45:13 -0400 Received: from twilight.ucw.cz ([81.30.235.3]:39622 "EHLO twilight.ucw.cz") by vger.kernel.org with ESMTP id S264989AbTFYTpJ (ORCPT ); Wed, 25 Jun 2003 15:45:09 -0400 Date: Wed, 25 Jun 2003 21:58:47 +0200 From: Vojtech Pavlik To: davidm@hpl.hp.com Cc: Riley Williams , Vojtech Pavlik , linux-kernel@vger.kernel.org Subject: Re: [patch] input: Fix CLOCK_TICK_RATE usage ... [8/13] Message-ID: <20030625215847.A12212@ucw.cz> References: <20030618013114.A23697@ucw.cz> <16121.55803.509760.869572@napali.hpl.hp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <16121.55803.509760.869572@napali.hpl.hp.com>; from davidm@napali.hpl.hp.com on Wed, Jun 25, 2003 at 10:20:59AM -0700 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1376 Lines: 50 On Wed, Jun 25, 2003 at 10:20:59AM -0700, David Mosberger wrote: > Moreover, the current drivers would compile just fine on ia64, even > though they could not possibly work correctly with the current use of > CLOCK_TICK_RATE. With a separate header file (and a config option), > these dependencies would be made explicit and that would improve > overall cleanliness. > > In other words, I still think the right way to go about this is to > have . On x86, this could be: > > -- > #include > > #define PIT_FREQ CLOCK_TICK_RATE > #define PIT_LATCH ((PIT_FREQ + HZ/2) / HZ) > -- Actually, I think it should be the other way around: asm-i386/pit.h: #define PIT_FREQ 1193182 #define PIT_LATCH ((PIT_FREQ + HZ/2) / HZ) asm-i386/timex.h: #include #define CLOCK_TICK_RATE PIT_FREQ > If you insist, you could even put this in asm-generic, though > personally I don't think that's terribly elegant. > > On ia64, could be: > > #ifdef CONFIG_PIT > # define PIT_FREQ 1193182 > # define PIT_LATCH ((PIT_FREQ + HZ/2) / HZ) > #endif > > --david -- Vojtech Pavlik SuSE Labs, SuSE CR - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/