From patchwork Wed Oct 14 14:52:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Gleixner X-Patchwork-Id: 269736 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 BD8C4C433E7 for ; Wed, 14 Oct 2020 15:18:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 621082222A for ; Wed, 14 Oct 2020 15:18:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="Mkhg1oud"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="J4cIGbxk" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728756AbgJNPSs (ORCPT ); Wed, 14 Oct 2020 11:18:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39094 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726596AbgJNPSs (ORCPT ); Wed, 14 Oct 2020 11:18:48 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8475CC061755; Wed, 14 Oct 2020 08:18:48 -0700 (PDT) Message-Id: <20201014145215.518912759@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1602688726; 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=Xqc0nGkuw0k9CjZpwvy2mNqALgS9zNAoil65HHXmBWw=; b=Mkhg1oudooc1D7cLXeBlzAj7hV9tOJlOoUSWKfGCxcNRp6Akbl+i/CyTWi32vKAy7lg0HD MpTNLo8j0c6EvQX5dPujKOlzMfsWpRC/IAGFbyB7J30kUlouGRQC6UxMvviMD1Xi9LI5Gc /tUx+/iW5BkmL6l1c9DqG8PEMBYNYtnNrrLEc6+GyalxeR0rNtSyhrbWYjwHcPC/8G1wnD CipGvLyocVhb8dITN9e/hA/hw4WxMuO9L+LWd7F5MTfY497KVJQTe6u+JI+03auxA5jaGZ rWjukNONzdglu4DG3L22C67B3madfApoVOnOStsZF9GnCVFuDKsguAAGIFMFYw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1602688726; 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=Xqc0nGkuw0k9CjZpwvy2mNqALgS9zNAoil65HHXmBWw=; b=J4cIGbxkYeb16Mx6vnpQGhkkmyjGQDefyDOdSDcFR6lkamlOV2UI4C4rPB+qkrPUWny9bY +XT22bHmagnyoqAQ== Date: Wed, 14 Oct 2020 16:52:15 +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 00/12] UBS: 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. With the following series applied, USB is clean. Thanks, tglx --- atm/usbatm.c | 2 core/buffer.c | 6 +- core/hcd-pci.c | 6 +- core/hcd.c | 21 ++++---- core/hub.c | 3 - core/message.c | 35 +++++++++----- core/usb.c | 4 - gadget/udc/core.c | 2 gadget/udc/dummy_hcd.c | 5 +- gadget/udc/pxa27x_udc.c | 19 ++++--- host/ehci-fsl.c | 9 +-- host/ehci-pmcmsp.c | 15 +++--- host/isp1362.h | 5 +- host/ohci-at91.c | 11 +++- host/ohci-omap.c | 7 +- host/ohci-pxa27x.c | 11 ++-- host/ohci-s3c2410.c | 12 ++--- host/xhci-mem.c | 2 host/xhci.c | 6 -- misc/sisusbvga/Kconfig | 2 serial/digi_acceleport.c | 7 +- serial/keyspan_pda.c | 112 ++++++++++++++++++++--------------------------- usbip/usbip_common.c | 5 -- 23 files changed, 156 insertions(+), 151 deletions(-)