Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1214263imm; Tue, 2 Oct 2018 04:50:31 -0700 (PDT) X-Google-Smtp-Source: ACcGV626kD/xXyMLBTwTDxqVOBeaLxF4JgU8cKGdfpA8R6U9FzuPiKTWLvdfgSjzQWHZH0bCnKNB X-Received: by 2002:a17:902:968d:: with SMTP id n13-v6mr16424663plp.33.1538481031698; Tue, 02 Oct 2018 04:50:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538481031; cv=none; d=google.com; s=arc-20160816; b=c1Gghtdn16AgioJ/M+VOhVxcxUT+H+6skQJCzpGdb9rbs1n7Xc8OA2Rkq0eZFuUBdj 9+s+yn+GH+ICUQuP8ozq2NMitYpuMydErjd9f93pAXybXofql4+tqj2MaeuTBCs9mtc+ +dJTAMPXEIMjbckIaIhCyx71IQtQNMw13Az2HnpDn0dBqio0wRP+8V4tag7ZMiL9zcCO 0V30KoTnJGWu/sILcUwRqFX+K35OnxCWLBa4FqEZJ7rHU1k/Dy1TlcDYIMjTBvp9Ju6N zQ9PSe/IKcCSwwZwsZnU3E9SbA1+ZjVNhb+sD2q6us6fIlz7K0YrFs198YcxysqhkGtf SUjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :subject:cc:to:from:date; bh=lRWZ74Oa8AMc0jFxRWWnlufLJfuS2bMk3hSu/GihBRc=; b=l4flcCqH8BnQWtYp3khfynj99Su3LZFTP1MReLJZ6Od5/69Wk/XePJqUjICQqSSgAs C6X+QYAuMn7zl5P61pPArpU2ucrnqgzS0GJlnMzFAMZM5xgQB//pOw+Hys+0x4vLKDkb UV374Nu2ZPzJFHJv13kZXFosxbmJCls6nHBVK41XOPVTj+EzK7TG1v2ZXGu/ptvnPZqE yvUBB8iv6mw7T+xA2skfOVxian4xh7BZtBrxX3YRn1O4zaoduqapnlq/XMXwAu1+o0PI UAXxSqm6K0+O+l/H4S6xI2RPqtJOxR325SV788qcwxqqcOaSMzJOJYtrG2wmey+yl+Sd eI9A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v23-v6si7241505pgh.581.2018.10.02.04.50.16; Tue, 02 Oct 2018 04:50:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727619AbeJBSc6 (ORCPT + 99 others); Tue, 2 Oct 2018 14:32:58 -0400 Received: from eddie.linux-mips.org ([148.251.95.138]:36828 "EHLO cvs.linux-mips.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727434AbeJBSc5 (ORCPT ); Tue, 2 Oct 2018 14:32:57 -0400 Received: (from localhost user: 'macro', uid#1010) by eddie.linux-mips.org with ESMTP id S23994586AbeJBLuAvKkbM (ORCPT ); Tue, 2 Oct 2018 13:50:00 +0200 Date: Tue, 2 Oct 2018 12:50:00 +0100 (BST) From: "Maciej W. Rozycki" To: Ralf Baechle , Paul Burton cc: linux-mips@linux-mips.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/2] MIPS: memset: Fix `noreorder' issues Message-ID: User-Agent: Alpine 2.21 (LFD 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, A recent change broke CPU_DADDI_WORKAROUNDS support in memset.S, due to a delay-slot instruction expanding to multiple hardware operations for the affected configurations. The underlying cause is the excessive use of the `noreorder' assembly mode, while it is only needed in couple of places where either there is a data dependency between a branch and its delay slot instruction, or there is a section switch involved that would prevent automatic delay slot scheduling. These changes address both problems and for clarity, not to mix multiple conceptually separate changes and to make backporting easier I made them a small patch series. See individual change descriptions for details. This has been build-time and run-time verified with 32-bit and 64-bit DECstation configurations, build-time verified with big-endian and little-endian 64-bit SWARM configurations. Build-time verification was made by running `objdump -d arch/mips/lib/memset.o' with a pristine and and a patched build to make sure there has been no change in machine code generation, except for the delay-slot multiple instruction with the 64-bit CPU_DADDI_WORKAROUNDS DECstation configuration. Please apply. Maciej