Re: [next] [arm64] [gpio] BUG: key has not been registered! DEBUG_LOCKS_WARN_ON:

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 8 Apr 2021 at 15:17, Andy Shevchenko <andy.shevchenko@xxxxxxxxx> wrote:
>
> On Thu, Apr 8, 2021 at 11:33 AM Naresh Kamboju
> <naresh.kamboju@xxxxxxxxxx> wrote:
> > On Thu, 8 Apr 2021 at 04:21, Andy Shevchenko <andy.shevchenko@xxxxxxxxx> wrote:
> > > On Thu, Apr 8, 2021 at 12:38 AM Naresh Kamboju
> > > <naresh.kamboju@xxxxxxxxxx> 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 <naresh.kamboju@xxxxxxxxxx>
Tested-by: Naresh Kamboju <naresh.kamboju@xxxxxxxxxx>

>
> > > 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



[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux