From patchwork Wed Sep 2 19:38:40 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 7113381 Return-Path: X-Original-To: patchwork-linux-parisc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C9D4B9F1CD for ; Wed, 2 Sep 2015 19:38:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E68B520656 for ; Wed, 2 Sep 2015 19:38:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DB86020652 for ; Wed, 2 Sep 2015 19:38:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756065AbbIBTit (ORCPT ); Wed, 2 Sep 2015 15:38:49 -0400 Received: from mout.gmx.net ([212.227.15.18]:55871 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755159AbbIBTis (ORCPT ); Wed, 2 Sep 2015 15:38:48 -0400 Received: from ls3530.box ([92.203.6.179]) by mail.gmx.com (mrgmx002) with ESMTPSA (Nemesis) id 0LsCdj-1YY1Nc1vCh-013tBi; Wed, 02 Sep 2015 21:38:43 +0200 Date: Wed, 2 Sep 2015 21:38:40 +0200 From: Helge Deller To: linux-parisc@vger.kernel.org Cc: James Bottomley , ohn David Anglin Subject: [PATCH] parisc: Align locks for LWS syscalls to L1 cache size Message-ID: <20150902193840.GA4499@ls3530.box> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-Provags-ID: V03:K0:ky30SthOyU27rWc5CXPaub5tdphhQzDneBnyqK7SDryT7X5uJDJ VIJEoTJNxUYiTGFX8l1/eF2dbMhyBDJAKhZX9X8yrs7AQlZYxwJm+UAO6ix24ZKld/+psEP phk9AWHg9FsJnLVGozqLPm2/pOwSWcZhO5MBPWAMP/I8K6PY+GCv7Mj/r6hfPxI8VrDGuzY 0FgRHr1SGcu24rsls2i+w== X-UI-Out-Filterresults: notjunk:1; V01:K0:RPPj2ld2euQ=:Yt6srsuL2cWNzBapaVku03 xWRy5q29pPI+zVCY3STKoWgUCBQZptrX7XRS3gbLtxfitVGgqelTtpsqswtL1GcKFNw5+dcc9 rHTLVUyHAF1YOT0QV6R1S9bthzNDmdNvI0dr8YlBEQcTH9y88kx/TS+oEaP5/2DAjUf5m3QW6 daDK5ewF+5VRI9mZ+9hQ4tUJLSHp6FyQ7rAQQ3QePbclXOChXz1VvHdCW0qDzT5Kvx5cq4Lro RHlcSu4ouQ776KweILeXo24rvoQeTZLBQPjls3bg7gaW+r028ovj+O2HJZv62Ze3CGrO3vGYa YkI8mQYBqeJ+bo84LM4FcLxNpeaSX54M7XckTU2nL087JlbOJbKb+kbmvHW1Cp0wgwmJNOYv5 7/uD9+MvSbnHCf59x8ZcI2Bhb19FwJxQxNJTuVhqo9cCbortaWCYguwljmvXexQPHMu9leJ/s NWddUo9OO9jSMfUv1ZsjYD9er02Ms99WtVX2pF9J5f6eZ50v28m7g3HdzEqwfa6zO05Mt3xRJ FsGg3eul2G9THiW4AjEW0uyTlkOBHHr2awKJOwtyHREKzBGfrdHysj0hy1Py9bhmDqSqGzHJT /EOhhcZQe7ii4R44L3oYXMbD6x0DK39bkLrQUOHyYfidCpsGLjcp1eCv+Kexy5mj1ggbii05n x7cxwkJ5s1n5UlwI6NeWEeqpEwhc2ZJWmBbAF2MfpG972q0JuWJLe97jkhDtpMq9UOAGJ2QeA t8NGe7rH83ZMSA9j Sender: linux-parisc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI,T_RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Align the locks for the Light weight syscall (LWS) which is used for atomic userspace operations (e.g. gcc atomic builtins) on L1 cache boundaries. This should speed up LWS calls on PA20 systems. Reported-by: John David Anglin Signed-off-by: Helge Deller --- To unsubscribe from this list: send the line "unsubscribe linux-parisc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/parisc/kernel/syscall.S b/arch/parisc/kernel/syscall.S index 7ef22e3..80c2306 100644 --- a/arch/parisc/kernel/syscall.S +++ b/arch/parisc/kernel/syscall.S @@ -561,9 +561,9 @@ lws_compare_and_swap: extru %r26, 27, 4, %r20 /* Find lock to use, the hash is either one of 0 to - 15, multiplied by 16 (keep it 16-byte aligned) + 15, multiplied by L1_CACHE_BYTES (keep it L1 cache aligned) and add to the lock table offset. */ - shlw %r20, 4, %r20 + shlw %r20, L1_CACHE_SHIFT, %r20 add %r20, %r28, %r20 # if ENABLE_LWS_DEBUG @@ -751,9 +751,9 @@ cas2_lock_start: extru %r26, 27, 4, %r20 /* Find lock to use, the hash is either one of 0 to - 15, multiplied by 16 (keep it 16-byte aligned) + 15, multiplied by L1_CACHE_BYTES (keep it L1 cache aligned) and add to the lock table offset. */ - shlw %r20, 4, %r20 + shlw %r20, L1_CACHE_SHIFT, %r20 add %r20, %r28, %r20 rsm PSW_SM_I, %r0 /* Disable interrupts */ @@ -931,11 +931,9 @@ END(sys_call_table64) ENTRY(lws_lock_start) /* lws locks */ .rept 16 - /* Keep locks aligned at 16-bytes */ + /* Keep locks aligned to L1_CACHE_BYTES */ .word 1 - .word 0 - .word 0 - .word 0 + .align L1_CACHE_BYTES .endr END(lws_lock_start) .previous