From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ingo Molnar Subject: Re: [PATCH v2] Add suspend/resume for HPET Date: Thu, 29 Mar 2007 19:51:17 +0200 Message-ID: <20070329175117.GA5521@elte.hu> References: <460BBD1B.4040308@ru.mvista.com> <200703291531.18253.maximlevitsky@gmail.com> <200703291546.48996.maximlevitsky@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-pm-bounces@lists.linux-foundation.org Errors-To: linux-pm-bounces@lists.linux-foundation.org To: Linus Torvalds Cc: Maxim Levitsky , Jeff Chua , linux-ide@vger.kernel.org, Sergei Shtylyov , gregkh@suse.de, linux-pm@lists.osdl.org, Linux Kernel Mailing List , Adrian Bunk , linux-acpi@vger.kernel.org, linux-pci@atrey.karlin.mff.cuni.cz, "Eric W. Biederman" , Jens Axboe , "Michael S. Tsirkin" , Thomas Gleixner , jgarzik@pobox.com, Andrew Morton List-Id: linux-acpi@vger.kernel.org * Linus Torvalds wrote: > Btw, what about arch/x86_64/kernel/hpet.c? at least wrt. suspend/resume it should be fine, because in = arch/x86_64/kernel/time.c it does this upon resume: static int timer_resume(struct sys_device *dev) { if (hpet_address) hpet_reenable(); else i8254_timer_resume(); [ barring the issue that mixing two pieces of hardware like this in a = single resume function is wrong - all timer hardware should be = separated like we did it for i386. I've got 64-bit clockevents code in = -rt which does this separation. ] > That thing seems totally broken. Lookie here: > = > arch/x86_64/kernel/hpet.c:irqreturn_t hpet_rtc_interrupt(int irq, void = *dev_id, struct pt_regs *regs) > drivers/char/rtc.c:extern irqreturn_t hpet_rtc_interrupt(int irq, void = *dev_id); > = > anybody see a problem? The x86-64 version doesn't seem to be very well = > maintained. Is there some fundamental reason why this file isn't = > shared across architectures? there's no fundamental reason. x86_64 COW-ed hpet_timer.c and = time_hpet.c years ago and drifted off into different areas. They should be unified: more power to arch/x86/ ;-) Ingo From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030555AbXC2RxQ (ORCPT ); Thu, 29 Mar 2007 13:53:16 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1030580AbXC2RxP (ORCPT ); Thu, 29 Mar 2007 13:53:15 -0400 Received: from mx2.mail.elte.hu ([157.181.151.9]:44264 "EHLO mx2.mail.elte.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030573AbXC2RxM (ORCPT ); Thu, 29 Mar 2007 13:53:12 -0400 Date: Thu, 29 Mar 2007 19:51:17 +0200 From: Ingo Molnar To: Linus Torvalds Cc: Maxim Levitsky , Sergei Shtylyov , Thomas Gleixner , Jeff Chua , Adrian Bunk , Andrew Morton , Linux Kernel Mailing List , "Eric W. Biederman" , "Rafael J. Wysocki" , pavel@suse.cz, linux-pm@lists.osdl.org, gregkh@suse.de, linux-pci@atrey.karlin.mff.cuni.cz, Jens Axboe , Len Brown , linux-acpi@vger.kernel.org, jgarzik@pobox.com, linux-ide@vger.kernel.org, "Michael S. Tsirkin" Subject: Re: [PATCH v2] Add suspend/resume for HPET Message-ID: <20070329175117.GA5521@elte.hu> References: <460BBD1B.4040308@ru.mvista.com> <200703291531.18253.maximlevitsky@gmail.com> <200703291546.48996.maximlevitsky@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.2i X-ELTE-VirusStatus: clean X-ELTE-SpamScore: -2.0 X-ELTE-SpamLevel: X-ELTE-SpamCheck: no X-ELTE-SpamVersion: ELTE 2.0 X-ELTE-SpamCheck-Details: score=-2.0 required=5.9 tests=BAYES_00 autolearn=no SpamAssassin version=3.0.3 -2.0 BAYES_00 BODY: Bayesian spam probability is 0 to 1% [score: 0.0000] Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org * Linus Torvalds wrote: > Btw, what about arch/x86_64/kernel/hpet.c? at least wrt. suspend/resume it should be fine, because in arch/x86_64/kernel/time.c it does this upon resume: static int timer_resume(struct sys_device *dev) { if (hpet_address) hpet_reenable(); else i8254_timer_resume(); [ barring the issue that mixing two pieces of hardware like this in a single resume function is wrong - all timer hardware should be separated like we did it for i386. I've got 64-bit clockevents code in -rt which does this separation. ] > That thing seems totally broken. Lookie here: > > arch/x86_64/kernel/hpet.c:irqreturn_t hpet_rtc_interrupt(int irq, void *dev_id, struct pt_regs *regs) > drivers/char/rtc.c:extern irqreturn_t hpet_rtc_interrupt(int irq, void *dev_id); > > anybody see a problem? The x86-64 version doesn't seem to be very well > maintained. Is there some fundamental reason why this file isn't > shared across architectures? there's no fundamental reason. x86_64 COW-ed hpet_timer.c and time_hpet.c years ago and drifted off into different areas. They should be unified: more power to arch/x86/ ;-) Ingo