From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751581Ab0CARQ3 (ORCPT ); Mon, 1 Mar 2010 12:16:29 -0500 Received: from mail-fx0-f219.google.com ([209.85.220.219]:57917 "EHLO mail-fx0-f219.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751020Ab0CARQ1 convert rfc822-to-8bit (ORCPT ); Mon, 1 Mar 2010 12:16:27 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=aM5ng0uPQHi/OevYXA7I3AAkO5HhuJj0UrtfQGkQV1JfPhqPG3sRb9zlLEI/bEiC7f DbfLnbwsNBXL93zxXOkFRsJrAOLa8lR9uFFOrMC8vdbg/OR7PDPtQAbm34TdebvYoOdS aWddW3FFxm4vKsvpx81A0QqcdR25TD8Z3t92c= MIME-Version: 1.0 In-Reply-To: <4B8B6E43.9030305@zytor.com> References: <1266600404-16402-1-git-send-email-luca@luca-barbieri.com> <4B845AEE.5080604@zytor.com> <20100226101423.GA25641@elte.hu> <4B8B6E43.9030305@zytor.com> Date: Mon, 1 Mar 2010 18:16:25 +0100 X-Google-Sender-Auth: 1134ad3439369176 Message-ID: Subject: Re: [PATCH 0/5] x86-32: improve atomic64_t functions (v2) From: Luca Barbieri To: "H. Peter Anvin" Cc: Paul Mackerras , Ingo Molnar , a.p.zijlstra@chello.nl, akpm@linux-foundation.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > Yes, and with the test turned on, the kernel crashes immediately on boot > on x86-64. > > Some minor investigation reveals the following: > > lib/atomic64.c has the wrong return value for atomic64_add_unless(). > With "wrong" I mean it is the opposite sense compared to > atomic_add_unless(), not just on x86 but on all architectures. > > Accordingly, I have to conclude that lib/atomic64.c is buggy, and that > since your test matches that bug, I will have to conclude that your > x86-32 implementation is also buggy.  Thus, please send patches to fix > your test and your 32-bit implementations (and preferrably > lib/atomic64.c too, but I can do that just fine.) You are right: sent a patchset to fix it.