Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1980980imm; Sun, 23 Sep 2018 16:54:48 -0700 (PDT) X-Google-Smtp-Source: ACcGV627J/bB3tq2pc0LyN/H4MlpIaKu+EhJYA0g1TlaJTLnqfRli/Hs6v31MAQr3IDnrkWrrcYv X-Received: by 2002:a17:902:b90b:: with SMTP id bf11-v6mr1006915plb.52.1537746888020; Sun, 23 Sep 2018 16:54:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537746887; cv=none; d=google.com; s=arc-20160816; b=qRMHtOvTyfuBXpi7pIscaUHoIu0mWHc2lKoLA7dsNh/1Yf4e0VXNBaQ/yDZbXJKX5t TZ/d9MWZwk9BpfaX0fXE8UVUt9Q0t0ippixygEgczjpITlbz1o4rt+9ikOwPwD8ftqVm NRr3FvABKnLYeXxfXCC1fg3acrLUqZpr3acRxnKVpTA59clmYbPtlyDep/DbemXuh20h OKroW3zGss9bTtl75gvyBJucLf1o7Itd7J82+FIL4gipnbvNa18+RkDWHTsMMGbIvX1m mjaDILUKUa8DAXxpYQ+KpdpYDzMx8T/bR3Kn+d9+x4Ip7Ka8gLYCcpcqn5Gjeu1ObI0r pQcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=B+vWkV9PK2dW2ldgqA92Kie02InEocNbKcAQBBT4ZZo=; b=gndjEcqygd0io2qSv6sSeJi+GLDCnUz52YbcAQXRJYZb57LF13JAIhT5+EKXiSJmzb MkGuB4eCx6dZXQUSwnlaVBURWpaT4fMcGAatugTkXVxah/glpWPymvkaRgtqINbSI6Dq UBR47vWChyzpPEOTWWXg5K14HtjGloJP8BYXQhlb7VIyQ3W9wQlluQpcYr6DUm/waTX7 hS/TtfuSctXu5L0Yn+Wesp/0vIzomVBpQVLzWM/QOpWc+ip579cem78uSUFOl0ihAw/q FGcgbyBmGvAQ2sVi8THEq5iM42ZfQTp4YjMSM2WJ4Dqxl71/4DixDoOG7+dAEH6dkx8m oN1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="pU/30lVr"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i4-v6si1931066pgd.2.2018.09.23.16.54.32; Sun, 23 Sep 2018 16:54:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="pU/30lVr"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727234AbeIXFwD (ORCPT + 99 others); Mon, 24 Sep 2018 01:52:03 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:41956 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725919AbeIXFwC (ORCPT ); Mon, 24 Sep 2018 01:52:02 -0400 Received: by mail-lj1-f196.google.com with SMTP id y17-v6so16611747ljy.8; Sun, 23 Sep 2018 16:52:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=B+vWkV9PK2dW2ldgqA92Kie02InEocNbKcAQBBT4ZZo=; b=pU/30lVr5PxtDJpoiEk9N/gJiRxiEkf53c0h9LpydS1sJ9uJHqdHtyrFGiysB2qlVI /cohGpR3oywT2UA7PxgeVmqbl3/mixJ3Q4ALYNVJjv2yJow9fF+H5L3lZAJ2KJ4KaFTn fevevjodGrmfd+aKyAaLJ8XhGBm9bSBmaph3xUY+Jw5IwN43ImZJhaEN815rwfWgwfhJ nd+Ys8B43pH978psP6sxDNgZgM5Tqjfc8IXVs7dLexRqRw2sZbJJMdKShR6FAaJdWkVP jA/f9Dui+ZRJsK8N/iXPj/9NwrdE9Fwnl+76gQwNY6tt9KkUGWA4uBoW86sIBLOjEQsB qkQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=B+vWkV9PK2dW2ldgqA92Kie02InEocNbKcAQBBT4ZZo=; b=Tw+zmwxX0nGPaujhEOxYBuuWJSphBYrU4tlJWvXCK7Q8pEt0CBP2dTyfwMrThNqHQh X5KzPGeS9ZFyRUTvV5EuI5/iCetcbREEe6HxNjhdJ1GhDe2HQOeffm+KfxfO9/MB5lVc VXGVJ5O+mBA5QJ9aIudcnhOQ0tdMyysuY6Wms96yW5pviVkXNnEl8GZex2aSG2mN1yGc xrNbNXtixTRQBhBDpHxGzKb02CAblUBpZUY3cnsxog3OJRq+z0c9TUuyGgY9YeEY1623 LYA1eRrbrSTWjI7wwwu2HQZXwFeZIP4DTYugPPxuc8XduxkmuX87VZFz+3Lb/uGXWsFa ED/w== X-Gm-Message-State: ABuFfogFUnI67wx+b1MSZaHYnlNhTzokdFgED45+ywHEXOcI5UL0pz/t SDToE86JDnB2f3xS/mY7es8= X-Received: by 2002:a2e:4401:: with SMTP id r1-v6mr9187277lja.21.1537746751498; Sun, 23 Sep 2018 16:52:31 -0700 (PDT) Received: from z50.lan (93-181-165-181.internetia.net.pl. [93.181.165.181]) by smtp.gmail.com with ESMTPSA id m8-v6sm3419718lfh.25.2018.09.23.16.52.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 23 Sep 2018 16:52:30 -0700 (PDT) From: Janusz Krzysztofik To: Linus Walleij Cc: Jonathan Corbet , Miguel Ojeda Sandonis , Peter Korsgaard , Peter Rosin , Ulf Hansson , Andrew Lunn , Florian Fainelli , "David S. Miller" , Dominik Brodowski , Greg Kroah-Hartman , Kishon Vijay Abraham I , Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Hartmut Knaack , Peter Meerwald-Stadler , Jiri Slaby , Willy Tarreau , Geert Uytterhoeven , Sebastien Bourdelin , Lukas Wunner , Rojhalat Ibrahim , Russell King , Tony Lindgren , Yegor Yefremov , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Janusz Krzysztofik , linux-doc@vger.kernel.org, linux-i2c@vger.kernel.org, linux-mmc@vger.kernel.org, netdev@vger.kernel.org, linux-iio@vger.kernel.org, devel@driverdev.osuosl.org, linux-serial@vger.kernel.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Marek Szyprowski , Krzysztof Kozlowski , Linux Samsung SOC Subject: [PATCH 0/2] gpiolib: Fix issues introduced by fast bitmap processing path Date: Mon, 24 Sep 2018 01:53:34 +0200 Message-Id: <20180923235336.22148-1-jmkrzyszt@gmail.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <2785169.v6aIfS3K2k@z50> References: <2785169.v6aIfS3K2k@z50> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org While investigating possible reasons of GPIO fast bitmap processing related boot hang on Samsung Snow Chromebook, reported by Marek Szyprowski (thanks!), I've discovered one coding bug, addressed by PATCH 1/2 of this series, and one potential regression introduced at design level of the solution, hopefully fixed by PATCH 2/2. See commit messages for details. Janusz Krzysztofik (2): gpiolib: Fix missing updates of bitmap index gpiolib: Fix array members of same chip processed separately The fixes should resolve the boot hang observed by Marek, however the second change excludes that particular case from fast bitmap processing and restores the old behaviour. Hence, it is possible still another issue which have had an influence on that boot hang exists in the code. In order to fully verify the fix, it would have to be tested on a platform where an array of GPIO descriptors is used which starts from at least two consecutive pins of one GPIO chip in hardware order, starting ftom 0, followed by one or more pins belonging to other chip(s). In order to verify if separate calls to .set() chip callback for each pin instead of one call to .set_multiple() is actually the reason of boot hang on Samsung Snow Chromebook, the affected driver - drivers/mmc/core/pwrseq_simple.c - would have to be temporarily modified for testing purposes so it calls gpiod_set_value() for each pin instead of gpiod_set_array_value() for all of them. If that would also result in boot hang, we could be sure the issue was really the one addressed by the second fix. Marek, could you please try to perform such test? Thanks, Janusz diffstat: Documentation/driver-api/gpio/board.rst | 19 +++++++++---- drivers/gpio/gpiolib.c | 46 +++++++++++++++++++++----------- 2 files changed, 45 insertions(+), 20 deletions(-)