Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp529079ybz; Fri, 1 May 2020 03:44:27 -0700 (PDT) X-Google-Smtp-Source: APiQypJTOzDLOUoosT2NTy8Vm60TIz5CeMtLdq9wG7PWhxm/EWxf9bplWxnxBMCDqwKdnmS/wwwN X-Received: by 2002:a17:907:2098:: with SMTP id pv24mr2666503ejb.22.1588329867740; Fri, 01 May 2020 03:44:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588329867; cv=none; d=google.com; s=arc-20160816; b=EaYd2P6Jwjk2Yrd4aF88GP6EJfFnDAe9J5JwfVuy76fdOCl5H6g6J1u8bjMDRilpsk Z/8vgWE59fwBvSiJSmVC/U5PpbyH8PAuQXTxg7EAPPSg7Ol7usAy5tv1R5csvKaKOO31 we53unqRc4SejdVJ1sMvAyo93WQlKx5jD2vhkXsNAQql3dhe0FYJYMVTwonoV8WolfUV QsnLsaEJKj95IIHdv1qNQhQA0aN1ZkYmZIFkXykqLhUVZEf6e9o1iPxIQOLOgsMpY9y5 cxZ4YnJZo2UX0r1MMzvd9dSH64kU3PaI5Q0D7rJ7+UOOkw032eih4VrsFuSiyu+XoQt4 6bJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=NH2reQWpX2jROBE8mc2Clh+3nIqSawyVfHUINcGs6pc=; b=Fd/N42u/LHjX/AB+jYcvSXaxuM2jDdzzh7nU7ybbaQ40i4SkhtXYBUIgvgjFULHvye YtITCmfxGmiFzoFt6vALafW8TyHQyC51YxTdAaGr2sOEXtEyDsRv2EmzCR646oBk+5nI yOEzmDmpUkt2KxnBr8PMhemj9sZAZosR52le70JGAZ4lbXWIp+sUYwSmdDqoy+c5kT5M xmQSvkWcS9HSEsDStoL6/ODJfnq4Zx4XIOWR9aW/qinzcPhebdBMh7TUleAX8ih0IHe1 qn+u/q0JP4B/x5TfdmTkYURnlOPc0/Xabdadfv6QPLu4aKwMkOGpJYtf7e//msjTwA+A 7jgA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o5si1420896ejr.501.2020.05.01.03.44.04; Fri, 01 May 2020 03:44:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728609AbgEAKmW (ORCPT + 99 others); Fri, 1 May 2020 06:42:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52650 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1728268AbgEAKmW (ORCPT ); Fri, 1 May 2020 06:42:22 -0400 Received: from Galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 317D3C08E859; Fri, 1 May 2020 03:42:22 -0700 (PDT) Received: from bigeasy by Galois.linutronix.de with local (Exim 4.80) (envelope-from ) id 1jUT7Y-0003fF-19; Fri, 01 May 2020 12:42:16 +0200 Date: Fri, 1 May 2020 12:42:15 +0200 From: Sebastian Andrzej Siewior To: "Jason A. Donenfeld" Cc: linux-kernel@vger.kernel.org, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, tglx@linutronix.de, chris@chris-wilson.co.uk, stable@vger.kernel.org Subject: Re: [PATCH] drm/i915: check to see if SIMD registers are available before using SIMD Message-ID: <20200501104215.s2eftchxm66lmbvj@linutronix.de> References: <20200430221016.3866-1-Jason@zx2c4.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200430221016.3866-1-Jason@zx2c4.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020-04-30 16:10:16 [-0600], Jason A. Donenfeld wrote: > Sometimes it's not okay to use SIMD registers, the conditions for which > have changed subtly from kernel release to kernel release. Usually the > pattern is to check for may_use_simd() and then fallback to using > something slower in the unlikely case SIMD registers aren't available. > So, this patch fixes up i915's accelerated memcpy routines to fallback > to boring memcpy if may_use_simd() is false. That would indicate that these functions are used from IRQ/softirq which break otherwise if the kernel is also using the registers. The crypto code uses it for that purpose. So Reviewed-by: Sebastian Andrzej Siewior May I ask how large the memcpy can be? I'm asking in case it is large and an explicit rescheduling point might be needed. > Cc: stable@vger.kernel.org > Signed-off-by: Jason A. Donenfeld Sebastian