From patchwork Thu May 15 16:14:44 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Jose E. Marchesi" X-Patchwork-Id: 349276 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id C3914140082 for ; Fri, 16 May 2014 02:11:00 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id :mime-version:content-type; q=dns; s=default; b=RkucoboCfERZd2Zb LOC6ObZoydKeiiX3Y/SZcCRYbUz6eOAp1gCFJg+iCCQ7KSzaliqteEw0vGn+08vz kV0968BmYS8AoYokDCV1XowQaHtIpQ7IFfhwthUXMAm0oo8AoBqTyAmXG/SrMcok +XJYzZdMDTaLXHnH53YXWmSbxYw= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id :mime-version:content-type; s=default; bh=mfPMkwiI2h/JGsjDQrLkUS cO3t8=; b=RDCAbIhKlBWB2+CA9KOTZv9JIJoKwrGJH1V2Z/qLO+ugs0O65b9A79 KOe2r2wvxW3uKGa3vDCWQmx+ZY56or1ixQhrgxcGEZpZZbGR3/GSkSpMteEMLlAl oM0r5VqNTFTev3hJXqHu1QpdBXrH75PxRMgtPAfwFPN14zrIV9Mnw= Received: (qmail 29587 invoked by alias); 15 May 2014 16:10:55 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 29578 invoked by uid 89); 15 May 2014 16:10:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_PASS, UNPARSEABLE_RELAY autolearn=ham version=3.3.2 X-HELO: userp1040.oracle.com From: jose.marchesi@oracle.com (Jose E. Marchesi) To: libc-alpha@sourceware.org Cc: davem@davemloft.net Subject: [PATCH][SPARC] missing membar in niagara2_memcpy Date: Thu, 15 May 2014 18:14:44 +0200 Message-ID: <87k39n6mtn.fsf@oracle.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Hi. The following patch prevents stores made before calling memcpy to overlap with the block stores in niagara2_memcpy. Tested on an Athena machine (sparc64x) running sparc64-*-linux-gnu. No new warnings triggered by the patch. No regressions detected. PS: virtually the same code lives in the kernel in linux/arch/sparc/lib/NG2memcpy.S. Probably that file shall be updated too... 2014-05-15 Jose E. Marchesi * sysdeps/sparc/sparc64/multiarch/memcpy-niagara2.S: Add missing membar to avoid block loads/stores to overlap previous stores. diff --git a/sysdeps/sparc/sparc64/multiarch/memcpy-niagara2.S b/sysdeps/sparc/sparc64/multiarch/memcpy-niagara2.S index b43a9e3..a1a9642 100644 --- a/sysdeps/sparc/sparc64/multiarch/memcpy-niagara2.S +++ b/sysdeps/sparc/sparc64/multiarch/memcpy-niagara2.S @@ -211,6 +211,7 @@ ENTRY(__memcpy_niagara2) */ VISEntryHalf + membar #Sync alignaddr %o1, %g0, %g0 add %o1, (64 - 1), %o4