From patchwork Thu Jul 28 12:04:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Renner Berthing X-Patchwork-Id: 1661642 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=mKUZHxJl; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LtrNm6hP2z9sGD for ; Thu, 28 Jul 2022 23:00:40 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1oH2Fo-00088R-RV; Thu, 28 Jul 2022 12:04:36 +0000 Received: from smtp-relay-internal-0.internal ([10.131.114.225] helo=smtp-relay-internal-0.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1oH2Fn-00088I-FD for kernel-team@lists.ubuntu.com; Thu, 28 Jul 2022 12:04:35 +0000 Received: from mail-lj1-f200.google.com (mail-lj1-f200.google.com [209.85.208.200]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id E7BCD3F11C for ; Thu, 28 Jul 2022 12:04:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1659009874; bh=Ry69Rh5NIe+EtcuKVFomFueYlCMrL+p1xOz4+XKXGQA=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=mKUZHxJlMo6JlLFg69LxCQn/lwGoVO+PYhAZaL+ZZ7MuFxQwDB9VjiUhBklWjmTQi oew9FejpZmMHIyz5tTi3ZBjHu8vSBj+DV7wuZYJweaWYC1rq/CHkccyPtdm9WMJATg XHFc+Km/AhFnC/lTVTFfk5h6MsbwzYQxka/bduPFiVRcLnhHRKL3wTRxwTc0mug9az kvW8JxA1Z2DnfcaNBYrVP5QNK3uuSzki3gAnIITQ3zfPW7xxIt/IC0mHPRYQMNk+27 bWhF6qa2+3SOfI5OsZ0MwtZ0dw/VItAQcWM7KJSJaGRovYJDViY0Hks9clFXEzzakl DtHgPsaVGkyyQ== Received: by mail-lj1-f200.google.com with SMTP id x16-20020a2e9dd0000000b0025e1162d92aso321370ljj.11 for ; Thu, 28 Jul 2022 05:04:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=Ry69Rh5NIe+EtcuKVFomFueYlCMrL+p1xOz4+XKXGQA=; b=eIK2i2M25+FYXs5DbfMs7WzBcEQ4zwsE0fDL6+sZEAfZUjgwrPkkVkFtNSVg0PUWuE hD0UTObBajrd/2pRL2RNXFkI1KkveRcEE+6B/8d6nsN9cdQKPup91K9bfs5wNSPaMjO1 rlyFJo1bjz+TVAwv048w/AD6kdhvxJu9PCMO7JEnbh1iZuVMmeWdXeMghr3WLeNdQq36 py+ohuuKxBRSl1o/lj4BjHaZ1uZpc5VlBGIN7KBMds4fswjBBTcPc1Ki2WKZDiyAUr65 jQL+BXBMmoZPl+sY5oIaGm946J1iYbNfOjW8eNe6PmwA3VVP5+EibX/Xf6uikVRS4NZq /WPg== X-Gm-Message-State: AJIora+4wjMJpe8sQyXG6AVkT1zq6Eaz7FqV67z18Vz8SrgXSFxyYCt9 9DI1eTUTWKx0GRaFps3P4TK4+0LmY3oHCaxLu97diT3OpUhQBEU9wJbeLAu0MZsRFV9KM9QlJ35 7+gJYoQ24jTshmY+GTNCpdSsWCBbI77QL3TOHP9RUvw== X-Received: by 2002:a05:6512:34c5:b0:48a:9842:5660 with SMTP id w5-20020a05651234c500b0048a98425660mr5372053lfr.249.1659009874175; Thu, 28 Jul 2022 05:04:34 -0700 (PDT) X-Google-Smtp-Source: AGRyM1voK0w4IYmUGWCZDA5II/buH1Qgm4pA9O/W+S+Up9dKc105LqoGkDVj5Lilwe4xuBzcALinQw== X-Received: by 2002:a05:6512:34c5:b0:48a:9842:5660 with SMTP id w5-20020a05651234c500b0048a98425660mr5372044lfr.249.1659009873784; Thu, 28 Jul 2022 05:04:33 -0700 (PDT) Received: from stitch.. (2-111-35-127-dynamic.dk.customer.tdc.net. [2.111.35.127]) by smtp.gmail.com with ESMTPSA id f7-20020a0565123b0700b0048a757d1303sm166849lfv.217.2022.07.28.05.04.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Jul 2022 05:04:33 -0700 (PDT) From: Emil Renner Berthing To: kernel-team@lists.ubuntu.com Subject: [SRU][J/starfive-5.17][PATCH 0/1] Fix pinctrl-starfive race Date: Thu, 28 Jul 2022 14:04:31 +0200 Message-Id: <20220728120432.736696-1-emil.renner.berthing@canonical.com> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" [Impact] * The pinctrl-starfive driver has a race when initializing groups and functions that may result in other drivers not being able to initialize. * If this happens to the mmc driver the board will fail to boot. * This is an example of this happening: Loading device tree blob... [ 13.933777] pinctrl-starfive 11910000.pinctrl: does not have pin group sdio0-0.sdio-pins [ 13.941940] pinctrl-starfive 11910000.pinctrl: invalid group sdio0-0.sdio-pins in map table [ 13.957656] pinctrl-starfive 11910000.pinctrl: does not have pin group sdio0-0.sdio-pins [ 13.965801] pinctrl-starfive 11910000.pinctrl: could not map group config for "sdio0-0.sdio-pins" [ 13.974746] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000 [ 13.983581] Oops [#1] [ 13.985853] Modules linked in: phylink dw_mmc_pltfm clk_starfive_jh7100_audio reset_starfive_jh7100_audio(+) dw_mc [ 13.986227] starfive-drm soc:display-subsystem: bound 12000000.crtc (ops starfive_crtc_component_ops) [ 13.996286] CPU: 1 PID: 8 Comm: kworker/u4:0 Not tainted 5.17.0-1004-starfive #5-Ubuntu [ 13.996297] Hardware name: StarFive VisionFive V1 (DT) [ 13.996305] Workqueue: events_unbound async_run_entry_fn [ 14.023868] epc : strcmp+0x12/0x36 [ 14.027274] ra : pinmux_func_name_to_selector+0x5a/0x76 [ 14.032583] epc : ffffffff80521224 ra : ffffffff805307d8 sp : ffffffd88006bb00 [ 14.039781] gp : ffffffff81e32e30 tp : ffffffd87ffd0000 t0 : 0000000000000040 [ 14.046988] t1 : 0000000000000000 t2 : ffffffff81004ed4 s0 : ffffffd88006bb10 [ 14.054190] s1 : 0000000000000006 a0 : ffffffd9ff1d3cb8 a1 : 0000000000000000 [ 14.061392] a2 : 0000000000000000 a3 : 0000000000000000 a4 : ffffffd88c45ce00 [ 14.068594] a5 : 0000000000000073 a6 : ffffffd88c45cdb0 a7 : ffffffd88c45ce08 [ 14.075795] s2 : ffffffd897c53000 s3 : 0000000000000007 s4 : ffffffd9ff1d3cb8 [ 14.082996] s5 : ffffffff810776f0 s6 : 0000000000000000 s7 : ffffffd8801aa5c0 [ 14.090199] s8 : ffffffd890fdf780 s9 : fffffffffffffdfb s10: ffffffff81d80008 [ 14.097400] s11: 0000000000000000 t3 : 0000000000000002 t4 : 0000000000000402 [ 14.104600] t5 : ffffffd897c53040 t6 : ffffffd897c53048 [ 14.109896] status: 0000000200000120 badaddr: 0000000000000000 cause: 000000000000000d [ 14.117986] ---[ end trace 0000000000000000 ]--- [Test Plan] * Unfortunately this is a race that happens rarely so rebooting the board several times is the only known way to reproduce. [Where problems could occur] * The fix could get the locking wrong and lock up the machine at boot. Jianlong Huang (1): pinctrl: starfive: Serialize adding groups and functions drivers/pinctrl/pinctrl-starfive.c | 5 +++++ 1 file changed, 5 insertions(+)