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: 11844021 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=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 C4778C433DF for ; Mon, 19 Oct 2020 10:20:01 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5493B22263 for ; Mon, 19 Oct 2020 10:20:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="UaDNsUmn"; dkim=fail reason="signature verification failed" (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" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5493B22263 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linutronix.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Subject:To:From:Date:Message-Id: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=NWxkhh9xDnjlDpydV6r5aE64TspMunbUk7jbP24f6xs=; b=UaDNsUmnX2hbz85I6V5Y3qJC7O wO1ds2TkDgypqsO+uk6kLBweG3mayaVN90BQd4Fs9DJIM7wKKpbIustrwXlhpAq1iy81SZEpJ5ham EnhsaJm034DeHKmdcogAPz70T0ZMtq+0+n1bdorkfUu3UUxodTY20nTJwTCogtDV3ZdSohKxP2vwU 3lBA02ThbRhx1SfpQ6TTGN9bjSuYqqbwrQ+F1AXJ/056pjszA0qaVVtumbS2yt2a0Q3LzTr3TZiCx DaDEHRMdJor24SCY7FA/yrYIjkGniExVagtSC4IVgjEKPOQ67GvRhi0cB0PEYzuTFxgt1AUZT0ekD d680LfWA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kUSEw-0002o6-42; Mon, 19 Oct 2020 10:18:06 +0000 Received: from galois.linutronix.de ([193.142.43.55]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kUSEt-0002mi-4H for linux-arm-kernel@lists.infradead.org; Mon, 19 Oct 2020 10:18:04 +0000 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 Subject: [patch V2 00/13] USB: Cleanup in_interupt/in_irq/in_atomic() usage MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201019_061803_305979_6E1D4A7A X-CRM114-Status: GOOD ( 10.41 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Felipe Balbi , linux-usb@vger.kernel.org, Mathias Nyman , Peter Zijlstra , Greg Kroah-Hartman , Sebastian Andrzej Siewior , Thomas Winischhofer , Johan Hovold , Krzysztof Kozlowski , Valentina Manea , linux-samsung-soc@vger.kernel.org, Kukjin Kim , Alan Stern , Duncan Sands , "Ahmed S. Darwish" , linux-omap@vger.kernel.org, Shuah Khan , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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