Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp1755311lqm; Fri, 3 May 2024 05:55:46 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWGUsdvZx2pYxHhur/Z+e0rb0hVwc8upMiUmEghJkIxko2fRffFODXYWboy/qYgfw51/OnkqpMQ/ahOdWUbk312WLNnPDjwLxuh9L2kYA== X-Google-Smtp-Source: AGHT+IEgX7Sim0ZJbi74E9RsT39yaIalgxrewnvVRl5nqcVfudqUwVIUGkvqvaeSzKyxg1QKgtXi X-Received: by 2002:a05:6a21:1a9:b0:1af:51f9:8597 with SMTP id le41-20020a056a2101a900b001af51f98597mr9501023pzb.6.1714740946348; Fri, 03 May 2024 05:55:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714740946; cv=pass; d=google.com; s=arc-20160816; b=kb9RoMq1+msFpS3AyhPJwfrjfB6lKpPaXqYFjPv/HJ5YU+ywr46DTOGlsdBDknZez7 oFGrfVlddUESViysTEhHzX+sj8eCw4DA/8gURh3L7gQBcDEFpA6+3XL7jDfOc2fGTpLU Po3113DLCRCPM9DXu+Q8S5IL1FUaqq2Px9JXf04QKW+hcLbVkbl8PYJMB2Wips/GmfPu +K6/pRnoUx6JvWEWhjLlitQHC4OIbesSPcduTUT14vSfzV+nytbuF4frz3kdhafQHPUJ 3ouzI0v9b0YQTtahCA/F0s8Cpfo0csAHNidHfu1Ckd/uAp6cHj658ILqgyOtfOjp6IOI D4ag== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=07dvTL5GFF1NDEQxmGDHoAzrUqBmYe5q2IYOk3f+kJw=; fh=hxC7cnvOyfmNA696iIMwZ5NNb4g5fXRxVhkNqxewCmY=; b=uE/81W++TJzVwr1hHW3YHk7Ldct0soWVryo9sryKSIj2k3RuFgvUlLhxTxxu++gVku kz4jXUhygOvZgq90v4owLPP572p6tcsH9UIrzAKQtsjMgd5ITcWDW8mMNSs/P8Gs3flO JTBnKXkZcgI16WeiOkqGe7kvJnj5TXcfBRagqhHpWepbXX1EZaTChdZo9YGJoVkY2K26 tNttSBUyNqvPZkq/etZD6rckL00pxUHSbQzY6x2n1VOI16xBfYSnf0gZ2nDFfBLhbQCR WwLY0nuU1tzQ2uugikmYZWMs2UMZrhKZweI5KGz/q+QTq7lpmLCXU3qIUnjJp8a3OaZp FSMQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=alpha.franken.de); spf=pass (google.com: domain of linux-kernel+bounces-167658-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-167658-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id a17-20020a656551000000b0060ced3b037bsi2768831pgw.311.2024.05.03.05.55.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 05:55:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-167658-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=alpha.franken.de); spf=pass (google.com: domain of linux-kernel+bounces-167658-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-167658-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id BFF68B21628 for ; Fri, 3 May 2024 12:55:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 746E915358C; Fri, 3 May 2024 12:55:36 +0000 (UTC) Received: from elvis.franken.de (elvis.franken.de [193.175.24.41]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6EA9F1514C7; Fri, 3 May 2024 12:55:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.175.24.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714740936; cv=none; b=FN5r1pSh44i2+v4mCeMDMsKaqDv0rMKyJEYNtjlKvK5RvbGlvrKMLpQ/qJA5g9eHpkdU4AJovBam7uRutL1b7TpIIL4+lYQjvY4k9rhev9FF4SOjs+CFH/b0cJ7IajU4uJTCTt6ZFoNI+njLLATs9U9adDqAOoGxfDLHxKPJQtc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714740936; c=relaxed/simple; bh=vW+H45nbFCrmwhT8G7VVpJ0tOe+9QNeobrWWa8qaOf0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=MSH1F6WiuOS28ZBsEn2iCOh0EWi7lTgOkZLirUrdvm+V+IVuU59/fBr9UCLtQa38iEjeQik2TogFpvl54fWZ/lABut8GADrxSmwm6OwtVBq6Wd7S80275Ht0awQvPmQPu2q+gW09sktn3V77K2c0jDLDIWCJdecyJ2GoePw3Jcc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=alpha.franken.de; spf=pass smtp.mailfrom=alpha.franken.de; arc=none smtp.client-ip=193.175.24.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=alpha.franken.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=alpha.franken.de Received: from uucp by elvis.franken.de with local-rmail (Exim 3.36 #1) id 1s2sRd-00031A-00; Fri, 03 May 2024 14:55:21 +0200 Received: by alpha.franken.de (Postfix, from userid 1000) id 7D90EC02CD; Fri, 3 May 2024 14:51:09 +0200 (CEST) Date: Fri, 3 May 2024 14:51:09 +0200 From: Thomas Bogendoerfer To: Siarhei Volkau Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] MIPS: Take in account load hazards for HI/LO restoring Message-ID: References: <20240430154601.1337028-1-lis8215@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240430154601.1337028-1-lis8215@gmail.com> On Tue, Apr 30, 2024 at 06:45:58PM +0300, Siarhei Volkau wrote: > MIPS CPUs usually have 1 to 4 cycles load hazards, thus doing load > and right after move to HI/LO will usually stall the pipeline for > significant amount of time. Let's take it into account and separate > loads and mthi/lo in instruction sequence. > > The patch uses t6 and t7 registers as temporaries in addition to t8. > > The patch tries to deal with SmartMIPS, but I know little about and > haven't tested it. > > Changes in v2: > - clear separation of actions for SmartMIPS and pre-MIPSR6. > > Signed-off-by: Siarhei Volkau > --- > arch/mips/include/asm/stackframe.h | 19 +++++++++++-------- > 1 file changed, 11 insertions(+), 8 deletions(-) > applied to mips-next. Thomas. -- Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ]