Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp779511pxb; Wed, 8 Sep 2021 12:08:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyNTT5rsDYiZwXcpvrO+cFhMP98P4poTNPKsLCJskqpQlx76BAB0cmURiwdd17jczHJ9a5c X-Received: by 2002:a05:6402:5107:: with SMTP id m7mr5362867edd.63.1631128120640; Wed, 08 Sep 2021 12:08:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631128120; cv=none; d=google.com; s=arc-20160816; b=u7WpWx2s3/hW5ZMvTaCpw4vtWX779MDG0tse4mN7kftnsLeBCkjNHRsAbwayaYLQRm d8Zjx6B5K1OPeAHu636egnW3Kwao4Uvl0t36VhkrguXiM51alP3f9T9JsJHwweZWRcxB bLDP4fRTVtebN3tjFKfVrKyQJocRjDC+EhQRs95bz2aNppLcPCOUJBimU25feul9DCcI LuIQ3wBOlW8uJwBOhBER4PGVK3T2mAGjh30YBkr3ntNOLMiQEKMot+sP5k6hb1fdI8Kt vFyAcby6IDQv8r76+X37k7/pt/h6cmnwVv9X3Yso7xABlF1hzFafYRE16P5gMz3z68g3 qKRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:dkim-signature :dkim-signature:date; bh=5aGeWY7DO3MzPMypk/VyLpu8f2mEs1dGB7dzzGJfmcI=; b=IUwSQFlFx+36/WFmG9DtpijrlgA5wSGSw+PctHOdiN5yrVuymq+CGwYMV5lAkhK0g4 cJKOQina563OLluwTR0JG29Stw/xQprvjpgfbJG2PzpUPbZb6bb9VpScb1WiSWXxiW1W eoNGbHqmMj6VNp1v+O3sW75RocaIF+1zyq1T5llbfrAgkXC0LWBYbISA6AkFBiHMWZEY A0g3qBbNzcfiLURGXMPxS+XrfiPje14N+O87UNPemlp/zOjRLQw+ZEaq9O2AZ3KGEk8t MvosQKMH0fjQoZNQ5/Uu81oLgKVNawbsDDJXDK91pGqFzYrXQZU+kFjjufvX5xaum9sd 9FIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=CMwV+ckr; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=nTWC5aXS; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l7si2957782edr.368.2021.09.08.12.08.15; Wed, 08 Sep 2021 12:08:40 -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; dkim=pass header.i=@linutronix.de header.s=2020 header.b=CMwV+ckr; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=nTWC5aXS; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348539AbhIHTGX (ORCPT + 99 others); Wed, 8 Sep 2021 15:06:23 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:54116 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240432AbhIHTGW (ORCPT ); Wed, 8 Sep 2021 15:06:22 -0400 Date: Wed, 8 Sep 2021 21:05:12 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1631127913; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=5aGeWY7DO3MzPMypk/VyLpu8f2mEs1dGB7dzzGJfmcI=; b=CMwV+ckrrDH9kmSgeaPQ8vRtQtH+WL4pOXJFZAwtgHdzpJ/Sw0g9p8xRlCLIR0Y1oXpiVn ZMvcRD04gS/zH9XA6udIyK7rAsoHeYS5UOzNFRBl/amplVKObDGK85x6KVwwQn0Oy0J6ei WDPqZop0iAlYw8jncZvDmA7DLhzmKwzIG0XbnzFgZZRN+nDMqcSp1VxH5dGJPuHpvoB6II WunQ7MRJqFQff6VeSzua5F1fGi8ItIJPr80/cwhCoJIpgXvBl2VtUN97U4YYKNAGfQkJ8M D0P66QjUyMIXknUUmT6jyQQz2tDMFg7tCwBIB9BaS5xDatpKP+NHpnFBaOZTVw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1631127913; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=5aGeWY7DO3MzPMypk/VyLpu8f2mEs1dGB7dzzGJfmcI=; b=nTWC5aXSoVBtlTqWZrexkU4VusCmN7zXjuKf2Tl2pfLHhvSL0WR6L3qwSJXo/e01N+kps+ /YoRHL+5WdhV/RCQ== From: Sebastian Andrzej Siewior To: Clark Williams Cc: Thomas Gleixner , Steven Rostedt , David Airlie , LKML , RT , Daniel Vetter Subject: Re: [PATCH PREEMPT_RT] i915: fix PREEMPT_RT locking splats Message-ID: <20210908190512.ocuyu2uzuyexas2m@linutronix.de> References: <20210823150015.61ebc7d6@theseus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210823150015.61ebc7d6@theseus> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021-08-23 15:00:15 [-0500], Clark Williams wrote: > Found two separate spots where i915 was throwing "sleeping > function called from invalid context" when running on a > PREEMPT_RT kernel. In both cases it was from calling > local_irq_disable prior to taking a spin_lock. Since spin > locks are converted to rt_mutex_t on PREEMPT_RT this means > that we might sleep with interrupts disabled. > > Since in both cases the calls were in threaded context on RT > (irq or ksoftirqd) and in no danger of reentrance, change the > code to only disable interrupts on non-PREEMPT_RT kernels. > > Signed-off-by: Clark Williams I try to deal with this in https://lkml.kernel.org/r/20210908185703.2989414-1-bigeasy@linutronix.de Sebastian