From mboxrd@z Thu Jan 1 00:00:00 1970 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=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 85E1AC43470 for ; Thu, 8 Apr 2021 12:59:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 54252610FC for ; Thu, 8 Apr 2021 12:59:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231195AbhDHM7i (ORCPT ); Thu, 8 Apr 2021 08:59:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60266 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231474AbhDHM7f (ORCPT ); Thu, 8 Apr 2021 08:59:35 -0400 Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 495C1C061760 for ; Thu, 8 Apr 2021 05:59:24 -0700 (PDT) Received: by mail-ej1-x62f.google.com with SMTP id g17so108008ejp.8 for ; Thu, 08 Apr 2021 05:59:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=bXaNApsUJBQRijtom4CaAhgB0kqvpHWQ8lB5126OVbU=; b=GqDXqGZU3WOMP1JWd2baxuE3IyzrOvNzhGrIswRLTHGuF9mrtmJwVpIrBpcgr7FlcN WEcSKNIIFX/CsruJLWPGL2QL7ImMGOnkcsp4u/azNm0XV4gUEXVOaiUWAJdALRQxfC/e EBl1xxE1z3cTgnbymFn8WDpltPG/z1561B8cpvBdOK2NrfwBWW86pRBXFqXGMUUZEfsF 8NCZsV7VxOUJR/cqDBjxlkxe+o5yjfu0cflXxhoV5dOUDikes/YYz9H0NNJf5yThfhQx 9EbztooxPKJYpQmslI9JtPWXV8AMOJpwrD+Aq24gNXE2nQsLfZ2Eoaj5iHTaz1dnA8kC XhxA== 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=bXaNApsUJBQRijtom4CaAhgB0kqvpHWQ8lB5126OVbU=; b=Xqs0txmIOmV7Kvbr9crN/IypoMdDOYExxUnD7ywFp0Cl4HQyBrW9XS0uQyluPlhYrK 5a19nukxUmKV6KBTdkCnwh2l8Kx37Hd6wyr7cRVx15+4JaIEATTquSrYZUPrFChYPOp+ WWXGYfMngTJDYYUKxD/Ok1OY2M+884fMHqTed+2pFV+zGshE4UH5gRKIJmINACzshF9X iQIjVtxZ83zurC80fhaP07ZhPb+UutB9kPsu1Ug2j+5HpjUxxQ+hbg/ksOJvvP2zyFEh Cty7U5KJ1U8qApz11fmLwgXCll6vsPZNE5AoTMT6UfcLavt17YcY3c8q85fkzKyYN0t/ KYVA== X-Gm-Message-State: AOAM533+Q1H9kWe6i6ZcS30GjXgz5MywLv+0hTK9QJ8y/x6hLqjMHN4D PzfrIq9yj5JU7xt7LOGIBA/b8/q34E1qDJnamdMHEQ== X-Google-Smtp-Source: ABdhPJzT52+7fhpzyGdEPpFOaQHm0H5K5N9slJdZWOCE0StJyTV8DY7tAOulhTQU/LlU+EEkYf+hetlLkRsAW1D8TBw= X-Received: by 2002:a17:907:7785:: with SMTP id ky5mr10011936ejc.133.1617886762806; Thu, 08 Apr 2021 05:59:22 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Naresh Kamboju Date: Thu, 8 Apr 2021 18:29:11 +0530 Message-ID: Subject: Re: [next] [arm64] [gpio] BUG: key has not been registered! DEBUG_LOCKS_WARN_ON: To: Andy Shevchenko Cc: "open list:GPIO SUBSYSTEM" , Linux-Next Mailing List , open list , lkft-triage@lists.linaro.org, "open list:KERNEL SELFTEST FRAMEWORK" , Stephen Rothwell , Arnd Bergmann , Thomas Gleixner , Ingo Molnar , Peter Zijlstra , Colin King , Christian Brauner , Bartosz Golaszewski Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-next@vger.kernel.org On Thu, 8 Apr 2021 at 15:17, Andy Shevchenko wrote: > > On Thu, Apr 8, 2021 at 11:33 AM Naresh Kamboju > wrote: > > On Thu, 8 Apr 2021 at 04:21, Andy Shevchenko wrote: > > > On Thu, Apr 8, 2021 at 12:38 AM Naresh Kamboju > > > wrote: > > > > > > > > While running kselftest recently added gpio gpio-sim.sh test case the following > > > > warning was triggered on Linux next tag 20210330 tag running on arm64 juno > > > > and hikey devices. > > > > > > > > GOOD: next-20210326 > > > > BAD: next-20210330 > > > > > > > > This is still happening today on Linux next tag 20210407. > > > > > > Can you add the following > > > > > > sysfs_attr_init(attrs[i]); > > > > > > to the end of the loop in gpio_sim_setup_sysfs()? > > > > Do you mean like this, > > > > diff --git a/drivers/gpio/gpio-sim.c b/drivers/gpio/gpio-sim.c > > index ea17289a869c..5fe67ccf45f7 100644 > > --- a/drivers/gpio/gpio-sim.c > > +++ b/drivers/gpio/gpio-sim.c > > @@ -296,6 +296,7 @@ static int gpio_sim_setup_sysfs(struct gpio_sim_chip *chip) > > dev_attr->store = gpio_sim_sysfs_line_store; > > > > attrs[i] = &dev_attr->attr; > > + sysfs_attr_init(attrs[i]); > > } > > > > chip->attr_group.name = "line-ctrl"; > > Precisely. As per your suggestions the above line added and build tested the reported issue is fixed now. Reported-by: Naresh Kamboju Tested-by: Naresh Kamboju > > > > If it fixes an issue I'll send a formal patch. > > > > I will build and test this and report here. OTOH, LKFT builds kernel and rootfs on host and runs tests on various target devices. While doing this process "make install" is not installing required test files like gpio-mockup-cdev and gpio-line-name. # ./gpio-mockup.sh: line 106: ./gpio-mockup-cdev: No such file or directory # ./gpio-sim.sh: line 100: ./gpio-line-name: No such file or directory Test run log: ------------------ # selftests: gpio: gpio-mockup.sh # 1. Module load tests # 1.1. dynamic allocation of gpio # ./gpio-mockup.sh: line 106: ./gpio-mockup-cdev: No such file or directory # test failed: line value is 127 when 1 was expected # GPIO gpio-mockup test FAIL not ok 1 selftests: gpio: gpio-mockup.sh # exit=1 # selftests: gpio: gpio-sim.sh # 1. chip_name and dev_name attributes # 1.1. Chip name is communicated to user # 1.2. chip_name returns 'none' if the chip is still pending # 1.3. Device name is communicated to user # 1.4. dev_name returns 'none' if chip is still pending # 2. Creating simulated chips # 2.1. Default number of lines is 1 # 2.2. Number of lines can be specified # 2.3. Label can be set # 2.4. Label can be left empty # 2.5. Line names can be configured # ./gpio-sim.sh: line 100: ./gpio-line-name: No such file or directory # line name is incorrect # GPIO gpio-sim test FAIL not ok 2 selftests: gpio: gpio-sim.sh # exit=1 - Naresh