From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8BE7DC4724C for ; Fri, 1 May 2020 10:42:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7441020787 for ; Fri, 1 May 2020 10:42:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728632AbgEAKmW (ORCPT ); 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