From patchwork Mon Oct 19 10:06:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Gleixner X-Patchwork-Id: 295456 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.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, 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 95793C433DF for ; Mon, 19 Oct 2020 10:18:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3210E2225A for ; Mon, 19 Oct 2020 10:18:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="prsk2Grq"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="KOQvTape" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727650AbgJSKSF (ORCPT ); Mon, 19 Oct 2020 06:18:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727355AbgJSKSD (ORCPT ); Mon, 19 Oct 2020 06:18:03 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 70306C0613CE; Mon, 19 Oct 2020 03:18:03 -0700 (PDT) Message-Id: <20201019100629.419020859@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1603102682; 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: content-transfer-encoding:content-transfer-encoding; bh=Nyd4isVe6/GlM1d8iTI7s5tTrdG55U0GZrO0TXajZMY=; b=prsk2GrqguL50vaRVvTirHV4Z4d/yPRByAva/n4GAOW3dudDcCf4OrBJiJbEsZ9LusQZmm 144HDNgi/TNWLnZw47pxOf7qQCQGMl2Ils0Ud6jMjvPKFiiZs1rQMU0IDwcMp/5hpHIC8k wRnttnpe0Qe3GFhtxaBoXwQZPxvv5gI1GEsh/TiIcYky/azodFH5q11LomuQevbOxM87DJ tfNI/qvQijt6vHGnQ6El8iPvjc0qFHKS08Tq2PFaiP8b2pXAIpOcflpvP474wq4Ier+AFs V1yFKpeVCg/t64w+ThJHVptS8TAAyOsj1F3p03D6RE4bPb86Wsggn1U+cvUyRA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1603102682; 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: content-transfer-encoding:content-transfer-encoding; bh=Nyd4isVe6/GlM1d8iTI7s5tTrdG55U0GZrO0TXajZMY=; b=KOQvTapeQAwwd6S4dECHvrg4lU4tGebpNrPm2NEKwpUfQV9ga2UJj6PCcTWSU+ldfo/FJ+ NmpvpBTJ8s1tz0CQ== Date: Mon, 19 Oct 2020 12:06:29 +0200 From: Thomas Gleixner To: LKML Cc: Peter Zijlstra , Thomas Winischhofer , Greg Kroah-Hartman , linux-usb@vger.kernel.org, "Ahmed S. Darwish" , Sebastian Andrzej Siewior , Johan Hovold , Mathias Nyman , Valentina Manea , Shuah Khan , Alan Stern , linux-omap@vger.kernel.org, Kukjin Kim , Krzysztof Kozlowski , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, Felipe Balbi , Duncan Sands Subject: [patch V2 00/13] USB: Cleanup in_interupt/in_irq/in_atomic() usage MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Folks, in the discussion about preempt count consistency accross kernel configurations: https://lore.kernel.org/r/20200914204209.256266093@linutronix.de/ Linus clearly requested that code in drivers and libraries which changes behaviour based on execution context should either be split up so that e.g. task context invocations and BH invocations have different interfaces or if that's not possible the context information has to be provided by the caller which knows in which context it is executing. This includes conditional locking, allocation mode (GFP_*) decisions and avoidance of code paths which might sleep. In the long run, usage of 'preemptible, in_*irq etc.' should be banned from driver code completely. The usage of such constructs in USB is rather limited. Most of it is in debug code and (misleading) comments. But of course there are also a few few bugs including one unfixable. That's an update to V1 of this series which can be found here: https://lore.kernel.org/r/20201014145215.518912759@linutronix.de Changes vs. V1: - Fix the keyspan_pda query buffer properly - Seperate the static change from the comments changes - Address review feedback vs. comments - Fix the typo in isp1362 - Collected acks/reviewed-by tags Thanks, tglx