All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hiep Cao Minh <cm-hiep@jinso.co.jp>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: linux-renesas-soc@vger.kernel.org,
	"Geert Uytterhoeven" <geert+renesas@glider.be>,
	"Yoshihiro Shimoda" <yoshihiro.shimoda.uh@renesas.com>,
	"Magnus Damm" <magnus.damm@gmail.com>,
	"Sakato Ryusuke" <ryusuke.sakato.bx@renesas.com>,
	"kuninori morimoto" <kuninori.morimoto.gx@renesas.com>,
	"Nguyen Viet Dung" <nv-dung@jinso.co.jp>,
	"LE MINH DUC" <lm-duc@jinso.co.jp>,
	稲吉:人ソ <h-inayoshi@jinso.co.jp>, "M.Miura" <m-miura@jinso.co.jp>
Subject: Re: [Bug]:LAGER: GPIO-KEYS: Warning occurs after unbinding the e6051000.gpio
Date: Tue, 28 Jun 2016 10:41:46 +0900	[thread overview]
Message-ID: <5771D5DA.1020702@jinso.co.jp> (raw)
In-Reply-To: <57204CDA.6030403@jinso.co.jp>

Hi Linus-san

I am Hiep from Jinzai Solution.
We work for Renesas's drivers development project.

I am sorry to bother you again!
As I have reported you the issue that related to your released patch.
Could you please consider this issue and tell me how to resolve this 
problem?
This issue still happens on Rcar-H2 and Rcar-M2 (Renesas's SOC) at the 
Linux upstream version v4.7-rc2.

Thank you!
Hiep.


On 04/27/2016 02:23 PM, Cao Minh Hiep wrote:
> Hi Linus-san
> Thanks for your reply!
>
> On 04/26/2016 06:20 PM, Linus Walleij wrote:
>> On Mon, Apr 25, 2016 at 11:32 AM, Cao Minh Hiep <cm-hiep@jinso.co.jp> 
>> wrote:
>>
>>> Hello Linus Walleij-san
>>>
>>> We have tested Linux upstream v4.6-rc2 on Renesas's Lager board.
>>> When we tried to unbind the e6051000.gpio, the following warning 
>>> messages
>>> occurs:
>>>
>>> "root@linaro-nano:/sys/bus/platform/drivers/gpio_rcar# echo 
>>> e6051000.gpio >
>>> unbind
>>> [  241.511034] ------------[ cut here ]------------
>>> [  241.525054] WARNING: CPU: 0 PID: 2104 at fs/proc/generic.c:575
>>> remove_proc_entry+0x13c/0x160
>>> [  241.550456] remove_proc_entry: removing non-empty directory 
>>> 'irq/169',
>>> leaking at least '6-0039'
>> Do you mean that you set up a handler in userspace, using the
>> deprecated sysfs ABI and then unbind the module providing the
>> IRQ resource?
>>
> Please see the attach file for procedure test of this case.
> In order to make sure that driver works normally after unbind and 
> rebind the device.
>
>>> And we found a patch between v4.5 and v4.6-rc2 that causing of this 
>>> issue.
>>> The patch is "ff2b1359 gpio: make the gpiochip a real device"
>> It seems the issue is not a bug in the kernel, the issue is that the
>> kernel is warning you about something that was wrong also before
>> but you didn't get a warning for it until now.
>>
>> It is not OK to unbind a driver providing IRQs.
>>
>> It is even unclear if we should even allow modules to provide
>> IRQs because there is no way to handle irqchips going away
>> when it has consumers.
>>
>> Maybe we should just do this?
>>
>> diff --git a/drivers/gpio/gpio-rcar.c b/drivers/gpio/gpio-rcar.c
>> index 3fe8e773d95c..ae5e81358ec5 100644
>> --- a/drivers/gpio/gpio-rcar.c
>> +++ b/drivers/gpio/gpio-rcar.c
>> @@ -562,6 +562,7 @@ static struct platform_driver 
>> gpio_rcar_device_driver = {
>>          .driver         = {
>>                  .name   = "gpio_rcar",
>>                  .of_match_table = of_match_ptr(gpio_rcar_of_table),
>> +               .suppress_bind_attrs = true,
>>          }
>>   };
>>
> I have just tried to patch this patch on v4.6-rc2, then make a test.
> The results is: I could not unbind the device.
>
> "Welcome to Linaro 14.04 (GNU/Linux 4.6.0-rc2-dirty armv7l)
>
>  * Documentation:  https://wiki.linaro.org/
> root@linaro-nano:~# uname -a
> Linux linaro-nano 4.6.0-rc2-dirty #8 SMP Wed Apr 27 13:40:12 JST 2016 
> armv7l armv7l armv7l GNU/Linux
> root@linaro-nano:~# cd /sys/bus/platform/drivers/gpio-keys; ls -d 
> keyboard
> keyboard
> root@linaro-nano:/sys/bus/platform/drivers/gpio-keys# echo keyboard > 
> unbind
> root@linaro-nano:/sys/bus/platform/drivers/gpio-keys# cd
> root@linaro-nano:~#
> root@linaro-nano:~# cd /sys/bus/platform/drivers/gpio_rcar; ls -d 
> e6051000.gpio
> e6051000.gpio
> root@linaro-nano:/sys/bus/platform/drivers/gpio_rcar# echo 
> e6051000.gpio > unbind
> -bash: unbind: Permission denied
>
> root@linaro-nano:/sys/bus/platform/drivers/gpio_rcar# ls
> e6050000.gpio  e6052000.gpio  e6054000.gpio  uevent
> e6051000.gpio  e6053000.gpio  e6055000.gpio
> root@linaro-nano:/sys/bus/platform/drivers/gpio_rcar#
> "
>
> before patching the patch, gpio-rcar devices are shown as below:
>
> "root@linaro-nano:~# cd /sys/bus/platform/drivers/gpio_rcar; ls
> bind           e6051000.gpio  e6053000.gpio  e6055000.gpio  unbind
> e6050000.gpio  e6052000.gpio  e6054000.gpio  uevent
> root@linaro-nano:/sys/bus/platform/drivers/gpio_rcar# "
>
>
> Best Regards,
> Jinso/Cao Minh Hiep.
>

  reply	other threads:[~2016-06-28  1:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <56FE29DC.4060605@jinso.co.jp>
     [not found] ` <571DE43D.3020308@jinso.co.jp>
2016-04-26  9:20   ` [Bug]:LAGER: GPIO-KEYS: Warning occurs after unbinding the e6051000.gpio Linus Walleij
2016-04-27  5:23     ` Cao Minh Hiep
2016-06-28  1:41       ` Hiep Cao Minh [this message]
2016-06-29  8:47         ` Linus Walleij
2016-07-01  7:58           ` Hiep Cao Minh
2016-07-01  8:13             ` Geert Uytterhoeven
2016-07-01  8:37               ` Hiep Cao Minh
     [not found] ` <CAMuHMdWQL4S5Lf1pqXmHp7L5Dojo=HKWGRuu=-OhQ0FiKa+DZg@mail.gmail.com>
     [not found]   ` <5703247F.2060600@jinso.co.jp>
     [not found]     ` <CAMuHMdWM-JiB4y9-SxX9toiQvu429tG91vFd+t=bTvyLoTz5+w@mail.gmail.com>
     [not found]       ` <57046AB8.5020307@jinso.co.jp>
     [not found]         ` <CAMuHMdVZGsgXDpa=dQFNCi+nEVt1+1w6sPw8m+xZy0wSZE5O-Q@mail.gmail.com>
     [not found]           ` <5705B36D.5000803@jinso.co.jp>
     [not found]             ` <CAMuHMdUNZUEuni9U6gPAPGyb7G-EM339c=KT+0ik=JXdSa2hOg@mail.gmail.com>
2016-06-28  0:32               ` [Bug]:Koelsch: DU, Could not show an image or picture on HDMI display Hiep Cao Minh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5771D5DA.1020702@jinso.co.jp \
    --to=cm-hiep@jinso.co.jp \
    --cc=geert+renesas@glider.be \
    --cc=h-inayoshi@jinso.co.jp \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=lm-duc@jinso.co.jp \
    --cc=m-miura@jinso.co.jp \
    --cc=magnus.damm@gmail.com \
    --cc=nv-dung@jinso.co.jp \
    --cc=ryusuke.sakato.bx@renesas.com \
    --cc=yoshihiro.shimoda.uh@renesas.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.