Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp200411pxu; Fri, 4 Dec 2020 00:42:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJwN51+GSLRT4ocSzwFm5oRNlSYYg3bFPLtNgwmD2a9wBhe21i2ZOrGPZl7Gp1DbDCZ00AJw X-Received: by 2002:a17:906:145b:: with SMTP id q27mr6243483ejc.86.1607071354853; Fri, 04 Dec 2020 00:42:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607071354; cv=none; d=google.com; s=arc-20160816; b=aJsvpmttG5ayEQvXQrJUnWxdJjJRFco/t3h1pmRxOZyh01ZrgM6or95QuOmEbfiEmD pGt6Url8Drg7fwHXfv9AoEJZrB4pmuDCIriXtbIYzENn94IRD3k//uAbIetr8UGO3xsp vCOPtZ7et0jiHZx1QQhcVEBwIHbm4LTCIB59PHaM+Sb/bJvB6feuyX7SzWPwkbYi3VIn hUtgy5iiGYn3mIE5RmqxU5iwzXrSOnGo4CUXtg48XkR/pLVgJJSUn3QF51v6P2i4xB7f eWq1yqnJrkgxekipgI0JRQtiB9jKljBUbRRuJYRDfsYFeT/GCW8HHCbjPJBZIFRPlX9N /hqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=85WE5u2j5hMfc/C5GbWvBbgQah+/rPALigryqx6bEEQ=; b=oXSBJrenPcQv7G70gJsXSr+q7uJD1MqL2xzLFsCgr9yGdptrrhFP94M85M1um3Gc1t 2RCq72A1CMZ7Nq0hitUTnA23WaHCYtZcUp/TKkivQW6HeevrQUMDVmbvzdqvqzRI+JO4 mXbvUvPGTTO5qNjSihldqW2XZa6CSerBNhElj+4cIEnchLRr0D8fTNbmlItbrTd1W11T abhbsx7oLozZC3X7QjIwGP+ML2iw4C7kQMMrRFz/AMxWsDpuvyY7FZISVTOosQQLnAM+ ohej992y/2vxvPAFQVI5WNJTSVOP50ktCX+F6sZXkQaOpBJJldo/q8d44GOY11KWZVQF /35w== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o16si963569ejx.217.2020.12.04.00.42.12; Fri, 04 Dec 2020 00:42:34 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729121AbgLDIjT (ORCPT + 99 others); Fri, 4 Dec 2020 03:39:19 -0500 Received: from mail-ot1-f66.google.com ([209.85.210.66]:42926 "EHLO mail-ot1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729110AbgLDIjS (ORCPT ); Fri, 4 Dec 2020 03:39:18 -0500 Received: by mail-ot1-f66.google.com with SMTP id 11so4464934oty.9; Fri, 04 Dec 2020 00:39:02 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=85WE5u2j5hMfc/C5GbWvBbgQah+/rPALigryqx6bEEQ=; b=GBjKbgJ9x9kVdONaB2rId4OsTPObEtcsOeFcc9EAwS+Qt4YfFFCwGtNYSti3oWe/oa /Ryq6M7gAhIV8OlZX0iNEFBtfWhEPoZlMAXIo/PAx09tSov17eyZQGOypDq71/OLcmlb u69yJWb5WjRebJVeF/YM6xN4lhmL49lmRAE5vlFDZvQmUTxUtcmPI7sdvbK2opS2aFYo /aOX7eI+teb6we4loBqs45f3Bh5sas3GPuq/y/6bWSWpsJjgDg41RmijOfJqewrVWtpe dnmvZ/iAosPAvDftYN2VBM4U/RJNSjFfWsDCGohkc08/EnLdCewf8k6SG+JQzZPhsOBv V3RQ== X-Gm-Message-State: AOAM533pZdjiTJv2umj2NG7cUDUCNIloPR8lVBPmQgQiETgZO1r2GtYC ILu4ClWGGpBC59uZ+CbPZ7Vl3ynFBhH1JO8T4fw= X-Received: by 2002:a05:6830:1f5a:: with SMTP id u26mr2817060oth.250.1607071117561; Fri, 04 Dec 2020 00:38:37 -0800 (PST) MIME-Version: 1.0 References: <58cf6feeaf5dae1ee0c78c1b25c00c73de15b087.1606805196.git.fthain@telegraphics.com.au> <20201201170547.d6ff743eeuh6en6s@linutronix.de> In-Reply-To: From: Geert Uytterhoeven Date: Fri, 4 Dec 2020 09:38:25 +0100 Message-ID: Subject: Re: [PATCH] scsi/NCR5380: Remove in_interrupt() test To: Finn Thain Cc: Sebastian Andrzej Siewior , Michael Schmitz , "James E.J. Bottomley" , "Martin K. Petersen" , "Ahmed S. Darwish" , Thomas Gleixner , scsi , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Finn, On Fri, Dec 4, 2020 at 12:11 AM Finn Thain wrote: > > --- a/drivers/scsi/g_NCR5380.c > > +++ b/drivers/scsi/g_NCR5380.c > > @@ -529,14 +529,14 @@ static inline int generic_NCR5380_precv(struct NCR5380_hostdata *hostdata, > > if (start == len - 128) { > > /* Ignore End of DMA interrupt for the final buffer */ > > if (NCR5380_poll_politely(hostdata, hostdata->c400_ctl_status, > > - CSR_HOST_BUF_NOT_RDY, 0, HZ / 64) < 0) > > + CSR_HOST_BUF_NOT_RDY, 0, 0) < 0) > > You've put your finger on a known problem with certain > NCR5380_poll_politely() call sites. That is, the nominal timeout, HZ / 64, > is meaningless because it is ignored in atomic context. So you may as well > specify 0 jiffies at these call sites. (There will be a 1 jiffy timeout > applied regardless.) Notwithstanding HZ / 64 breaks if HZ < 64. Possible values of HZ in the kernel: 24 32 48 64 100 128 200 250 256 300 500 1000 1024 1200 Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds