Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932650AbWLSIAa (ORCPT ); Tue, 19 Dec 2006 03:00:30 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932651AbWLSIAa (ORCPT ); Tue, 19 Dec 2006 03:00:30 -0500 Received: from ug-out-1314.google.com ([66.249.92.170]:17648 "EHLO ug-out-1314.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932650AbWLSIA3 (ORCPT ); Tue, 19 Dec 2006 03:00:29 -0500 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:references:x-google-sender-auth; b=PYQ7lAumoalm3Obrx6xLs56yjFRMIfK8OtgZbUOwxgvUJWpKBfeO4j6bVruZZDy1Xsk3mTokX8In6I9xB4JFxsRIjIcRAeDWmwjlMiOCxc/cK/cw/SehVmT2FsQc9ELSTWwtph/tuKGsyhFbO6VFaonu8vPyOpyJFDrPQ6WGxdg= Message-ID: <86802c440612190000k7eb5e68et9c0a776ef85b5177@mail.gmail.com> Date: Tue, 19 Dec 2006 00:00:27 -0800 From: "Yinghai Lu" To: "Eric W. Biederman" Subject: Re: IO-APIC + timer doesn't work Cc: "Tobias Diedrich" , "Linus Torvalds" , "Linux Kernel Mailing List" , "Andi Kleen" , "Andrew Morton" In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_1013_20377670.1166515227471" References: <20061216174536.GA2753@melchior.yamamaya.is-a-geek.org> <20061216225338.GA2616@melchior.yamamaya.is-a-geek.org> <20061216230605.GA2789@melchior.yamamaya.is-a-geek.org> <20061217145714.GA2987@melchior.yamamaya.is-a-geek.org> <20061218152333.GA2400@melchior.yamamaya.is-a-geek.org> X-Google-Sender-Auth: cf97d1ef7c873c63 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 7239 Lines: 107 ------=_Part_1013_20377670.1166515227471 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline On 12/18/06, Eric W. Biederman wrote: > Thanks. The bug is simply that the new code doesn't setup the > ioapic for the cases it intends to test. But it does clear out > the original programming. So if the normal good case doesn't work the > code is going to have problems. Please check the patch. ------=_Part_1013_20377670.1166515227471 Content-Type: text/x-patch; name=timers_12182006.patch; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: base64 X-Attachment-Id: f_evw0ywjt Content-Disposition: attachment; filename="timers_12182006.patch" W1BBVENIXSB4ODZfNjQ6IGNoZWNrX3RpbWVyIHdpdGggaW8gYXBpYyBzZXR1cCBiZWZvcmUgdHJ5 X2FwaWNfcGluCgphZGQgaW8gYXBpYyBzZXR1cCBiZWZvcmUgdHJ5X2FwaWNfcGluCgpjYzogQW5k aSBLbGVlbiA8YWtAc3VzZS5kZT4KY2M6IEVyaWMgVy4gQmllZGVybWFuIDxlYmllZGVybUB4bWlz c2lvbi5jb20+ClNpZ25lZC1vZmYtYnk6IFlpbmdoYWkgTHUgPHlpbmdoYWkubHVAYW1kLmNvbT4K CmRpZmYgLS1naXQgYS9hcmNoL3g4Nl82NC9rZXJuZWwvaW9fYXBpYy5jIGIvYXJjaC94ODZfNjQv a2VybmVsL2lvX2FwaWMuYwppbmRleCAyYTFkY2Q1Li4wNjk4MmI0IDEwMDY0NAotLS0gYS9hcmNo L3g4Nl82NC9rZXJuZWwvaW9fYXBpYy5jCisrKyBiL2FyY2gveDg2XzY0L2tlcm5lbC9pb19hcGlj LmMKQEAgLTI3MywxMCArMjczLDE3IEBAIHN0YXRpYyB2b2lkIGFkZF9waW5fdG9faXJxKHVuc2ln bmVkIGludCBpcnEsIGludCBhcGljLCBpbnQgcGluKQogCXN0cnVjdCBpcnFfcGluX2xpc3QgKmVu dHJ5ID0gaXJxXzJfcGluICsgaXJxOwogCiAJQlVHX09OKGlycSA+PSBOUl9JUlFTKTsKLQl3aGls ZSAo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xlXzgyNTlBX2ly cSAqLworCQlpZiAoIXNldF90cnlfYXBpY19waW4oMCwgaSwgMCkgKSB7CisJCQl1bm1hc2tfSU9f QVBJQ19pcnEoMCk7CisJCQlpZiAodHJ5X2FwaWNfcGluKDAsIGksICJmYWxsYmFjayB3aXRoIDgy NTkgSVJRMCBkaXNhYmxlZCIpKQorCQkJCXJldHVybjsKKwkJCWNsZWFyX0lPX0FQSUNfcGluKDAs IGkpOworCQkJcmVtb3ZlX3Bpbl90b19pcnEoMCwgMCwgaSk7CisJICAgIAl9CisJfQorCisJdmVj dG9yID0gYXNzaWduX2lycV92ZWN0b3IoMCwgVEFSR0VUX0NQVVMsICZtYXNrKTsKIAogCS8qIFRo ZW4gdHJ5IHB1cmUgODI1OUEgcm91dGluZyBvbiB0aGUgODI1OSBhcyByZXBvcnRlZCBieSBCSU9T Ki8KLQllbmFibGVfODI1OUFfaXJxKDApOwogCWlmIChwaW4yICE9IC0xKSB7CiAJCXNldHVwX0V4 dElOVF9JUlEwX3BpbihhcGljMiwgcGluMiwgdmVjdG9yKTsKKwkJYWRkX3Bpbl90b19pcnEoMCwg YXBpYzIsIHBpbjIpOworCQllbmFibGVfODI1OUFfaXJxKDApOwogCQlpZiAodHJ5X2FwaWNfcGlu KGFwaWMyLHBpbjIsIjgyNTlBIGJyb2FkY2FzdCBFeHRJTlQgZnJvbSBCSU9TIikpCiAJCQlyZXR1 cm47CisJCWNsZWFyX0lPX0FQSUNfcGluKGFwaWMyLCBwaW4yKTsKKwkJcmVtb3ZlX3Bpbl90b19p cnEoMCwgYXBpYzIsIHBpbjIpOwogCX0KIAogCS8qIFRyaWVkIGFsbCBwb3NzaWJpbGl0aWVzIHRv IGdvIHRocm91Z2ggdGhlIElPLUFQSUMuIE5vdyBjb21lIHRoZQo= ------=_Part_1013_20377670.1166515227471-- - 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/