Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760857AbXLQOno (ORCPT ); Mon, 17 Dec 2007 09:43:44 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756113AbXLQOng (ORCPT ); Mon, 17 Dec 2007 09:43:36 -0500 Received: from mx3.mail.elte.hu ([157.181.1.138]:49545 "EHLO mx3.mail.elte.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756082AbXLQOnf (ORCPT ); Mon, 17 Dec 2007 09:43:35 -0500 Date: Mon, 17 Dec 2007 15:42:51 +0100 From: Ingo Molnar To: Pavel Machek Cc: Alan Cox , unlisted-recipients: no@elvis.elte.hu, To-header@elvis.elte.hu, on@elvis.elte.hu, "input <"@elvis.elte.hu, "; Rene Herman" , Paul Rolland , "H. Peter Anvin" , Krzysztof Halasa , Andi Kleen , linux-kernel@vger.kernel.org, Thomas Gleixner , Ingo Molnar , rol@witbe.net Illegal-Object: Syntax error in Cc: addresses found on vger.kernel.org: Cc: ;Rene Herman ^-extraneous tokens in mailbox, missing end of mailbox Illegal-Object: Syntax error in Cc: addresses found on vger.kernel.org: Cc: ;Rene Herman ^-extraneous tokens in mailbox, missing end of mailbox Subject: Re: RFC: outb 0x80 in inb_p, outb_p harmful on some modern AMD64 with MCP51 laptops Message-ID: <20071217144251.GB16604@elte.hu> References: <20071211173231.2b87a81f@the-village.bc.nu> <475EE2CA.6020601@reed.com> <475F23BD.3040903@reed.com> <20071212161245.3f388229@the-village.bc.nu> <20071214143328.GB10130@elte.hu> <20071216212628.GF14265@elf.ucw.cz> <20071217000301.1c280daa@the-village.bc.nu> <20071217002827.GG5692@elf.ucw.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20071217002827.GG5692@elf.ucw.cz> User-Agent: Mutt/1.5.17 (2007-11-01) X-ELTE-VirusStatus: clean X-ELTE-SpamScore: -1.5 X-ELTE-SpamLevel: X-ELTE-SpamCheck: no X-ELTE-SpamVersion: ELTE 2.0 X-ELTE-SpamCheck-Details: score=-1.5 required=5.9 tests=BAYES_00 autolearn=no SpamAssassin version=3.2.3 -1.5 BAYES_00 BODY: Bayesian spam probability is 0 to 1% [score: 0.0000] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1935 Lines: 63 * Pavel Machek wrote: > > > > ./char/epca.c > > > > ./char/sonypi.c > > > > ./scsi/megaraid.c > > > > ./ide/pci/serverworks.c > > > > ./ide/pci/cmd640.c > > > > ./input/mouse/pc110pad.c > > > > You are missing some watchdogs at least ? > > I snipped them, I only wanted to comment that pc110pad.c looks like > legitimate use of outb_p(). since this code seems to run late during bootup (a mouse driver), could we replace this with udelay(2), and get rid of that outb_p()? I.e. via the patch below? Ingo -----------------> Subject: x86: replace outb_p() with udelay(2) in drivers/input/mouse/pc110pad.c From: Ingo Molnar replace outb_p() with udelay(2). This is a real ISA device so it likely needs this particular delay. Signed-off-by: Ingo Molnar --- drivers/input/mouse/pc110pad.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) Index: linux-x86.q/drivers/input/mouse/pc110pad.c =================================================================== --- linux-x86.q.orig/drivers/input/mouse/pc110pad.c +++ linux-x86.q/drivers/input/mouse/pc110pad.c @@ -39,6 +39,7 @@ #include #include #include +#include #include #include @@ -62,8 +63,10 @@ static irqreturn_t pc110pad_interrupt(in int value = inb_p(pc110pad_io); int handshake = inb_p(pc110pad_io + 2); - outb_p(handshake | 1, pc110pad_io + 2); - outb_p(handshake & ~1, pc110pad_io + 2); + outb(handshake | 1, pc110pad_io + 2); + udelay(2); + outb(handshake & ~1, pc110pad_io + 2); + udelay(2); inb_p(0x64); pc110pad_data[pc110pad_count++] = value; -- 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/