From owner-freebsd-mips@FreeBSD.ORG Wed Sep 28 16:36:37 2011 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E44C61065673 for ; Wed, 28 Sep 2011 16:36:37 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-yx0-f182.google.com (mail-yx0-f182.google.com [209.85.213.182]) by mx1.freebsd.org (Postfix) with ESMTP id A4B948FC14 for ; Wed, 28 Sep 2011 16:36:37 +0000 (UTC) Received: by yxk36 with SMTP id 36so8270715yxk.13 for ; Wed, 28 Sep 2011 09:36:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=lI27WY5bRLzJNejjHz0kIdNGpfrY6pqQtQEscVBcusI=; b=iTRA6iflWo+dBxy1SdlFeFbbM5MrQ4MF+m0UQJTm5X04vy//KxNKSr5c5aRKsOn0Ov f94/6tHJYaEDZTGMs4r4+pX48T2pDV0cvtVnFy1X3k7ElHpn3cdgrPZNwlUYYj51hJv4 zZ6UZePcc2emw/ONyKmJSjHbD1sTc1PgvT9bM= MIME-Version: 1.0 Received: by 10.236.201.165 with SMTP id b25mr6928511yho.72.1317227796766; Wed, 28 Sep 2011 09:36:36 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.236.111.42 with HTTP; Wed, 28 Sep 2011 09:36:36 -0700 (PDT) In-Reply-To: References: Date: Thu, 29 Sep 2011 00:36:36 +0800 X-Google-Sender-Auth: 4NtWMGHS-lzEwGXfKgEEQCjnBcY Message-ID: From: Adrian Chadd To: freebsd-mips@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: eventtimer issue on mips: temporary workaround X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Sep 2011 16:36:38 -0000 .. so, the patch is totallyw rong. intr_disable() needs to be moved before critical_enter() or it doesn't achieve anything. But the race is still there, between intr_enable() and "wait". The only way to eliminate this race is to completely eliminate all the code in cpu_idle(). Would someone clued in the implementation of wait please step up and help? :) Adrian