* RE: Compile error with gregkh-07-usb-2.6.33-rc7.patch [not found] <5A47E75E594F054BAF48C5E4FC4B92AB031E80D6E0@dbde02.ent.ti.com> @ 2010-02-12 15:30 ` Alan Stern 2010-02-17 14:32 ` Michal Marek 0 siblings, 1 reply; 4+ messages in thread From: Alan Stern @ 2010-02-12 15:30 UTC (permalink / raw) To: Gadiyar, Anand Cc: jidong xiao, linux-usb@vger.kernel.org, Greg Kroah-Hartman, linux-kbuild On Fri, 12 Feb 2010, Gadiyar, Anand wrote: > > >> I guess you did _not_ enable CONFIG_PM_RUNTIME, right? > > >> > > >> pm_wq is only defined when CONFIG_PM_RUNTIME is enabled. > > >> > > >> 15 #ifdef CONFIG_PM_RUNTIME > > >> 16 > > >> 17 extern struct workqueue_struct *pm_wq; > > > > > > Right, I had CONFIG_PM_RUNTIME disabled. Enabling it allowed the > > > compile to go through. > > > > > > Does that compile failure still needs to be fixed. I'm guessing > > > not everyone will build with this option enabled? > > > > > Well, looking at gregkh-07-usb-2.6.33-rc7.patch, I noticed following > > hunk of patch: > > > > diff -Naur -X linux-2.6.33-rc7-tty/Documentation/dontdiff linux-2.6.33-rc7-tty/drivers/usb/core/Kconfig linux-2.6.33-rc7-usb/drivers/usb/core/Kconfig > > --- linux-2.6.33-rc7-tty/drivers/usb/core/Kconfig 2009-09-09 15:13:59.000000000 -0700 > > +++ linux-2.6.33-rc7-usb/drivers/usb/core/Kconfig 2010-02-09 13:21:32.000000000 -0800 > > @@ -91,8 +91,8 @@ > > If you are unsure about this, say N here. > > > > config USB_SUSPEND > > - bool "USB selective suspend/resume and wakeup" > > - depends on USB && PM > > + bool "USB runtime power management (suspend/resume and wakeup)" > > + depends on USB && PM_RUNTIME > > help > > If you say Y here, you can use driver calls or the sysfs > > "power/level" file to suspend or resume individual USB > > > > This patch is saying, USB_SUSPEND is depends on PM_RUNTIME, in your > > case, USB_SUSPEND is enabled, but PM_RUNTIME is disabled, this is a > > little bit strange, I guess you have manually edited .config instead > > of running the command `make menuconfig`. I am afraid this might cause > > some dependency problem. > > Nope. I did `make ARCH=arm omap_3430sdp_defconfig`, and this generated > the .config. Wouldn't the dependencies be taken care of by this? > > (omap_3430sdp_defconfig has CONFIG_USB_SUSPEND=y and CONFIG_PM_RUNTIME > not set, since the defconfig is old. But wouldn't CONFIG_USB_SUSPEND > get turned off in this case?) I would expect it to get turned off. This sounds like a bug in the kernel build system. Adding the linux-kbuild mailing list to the CC:. Alan Stern ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Compile error with gregkh-07-usb-2.6.33-rc7.patch 2010-02-12 15:30 ` Compile error with gregkh-07-usb-2.6.33-rc7.patch Alan Stern @ 2010-02-17 14:32 ` Michal Marek 2010-02-18 4:16 ` Greg KH 0 siblings, 1 reply; 4+ messages in thread From: Michal Marek @ 2010-02-17 14:32 UTC (permalink / raw) To: Alan Stern Cc: Gadiyar, Anand, jidong xiao, linux-usb@vger.kernel.org, Greg Kroah-Hartman, linux-kbuild, Vegard Nossum On 12.2.2010 16:30, Alan Stern wrote: > On Fri, 12 Feb 2010, Gadiyar, Anand wrote: > >>>>> I guess you did _not_ enable CONFIG_PM_RUNTIME, right? >>>>> >>>>> pm_wq is only defined when CONFIG_PM_RUNTIME is enabled. >>>>> >>>>> 15 #ifdef CONFIG_PM_RUNTIME >>>>> 16 >>>>> 17 extern struct workqueue_struct *pm_wq; >>>> >>>> Right, I had CONFIG_PM_RUNTIME disabled. Enabling it allowed the >>>> compile to go through. >>>> >>>> Does that compile failure still needs to be fixed. I'm guessing >>>> not everyone will build with this option enabled? >>>> >>> Well, looking at gregkh-07-usb-2.6.33-rc7.patch, I noticed following >>> hunk of patch: >>> >>> diff -Naur -X linux-2.6.33-rc7-tty/Documentation/dontdiff linux-2.6.33-rc7-tty/drivers/usb/core/Kconfig linux-2.6.33-rc7-usb/drivers/usb/core/Kconfig >>> --- linux-2.6.33-rc7-tty/drivers/usb/core/Kconfig 2009-09-09 15:13:59.000000000 -0700 >>> +++ linux-2.6.33-rc7-usb/drivers/usb/core/Kconfig 2010-02-09 13:21:32.000000000 -0800 >>> @@ -91,8 +91,8 @@ >>> If you are unsure about this, say N here. >>> >>> config USB_SUSPEND >>> - bool "USB selective suspend/resume and wakeup" >>> - depends on USB && PM >>> + bool "USB runtime power management (suspend/resume and wakeup)" >>> + depends on USB && PM_RUNTIME >>> help >>> If you say Y here, you can use driver calls or the sysfs >>> "power/level" file to suspend or resume individual USB >>> >>> This patch is saying, USB_SUSPEND is depends on PM_RUNTIME, in your >>> case, USB_SUSPEND is enabled, but PM_RUNTIME is disabled, this is a >>> little bit strange, I guess you have manually edited .config instead >>> of running the command `make menuconfig`. I am afraid this might cause >>> some dependency problem. >> >> Nope. I did `make ARCH=arm omap_3430sdp_defconfig`, and this generated >> the .config. Wouldn't the dependencies be taken care of by this? >> >> (omap_3430sdp_defconfig has CONFIG_USB_SUSPEND=y and CONFIG_PM_RUNTIME >> not set, since the defconfig is old. But wouldn't CONFIG_USB_SUSPEND >> get turned off in this case?) > > I would expect it to get turned off. This sounds like a bug in the > kernel build system. Adding the linux-kbuild mailing list to the CC:. The problem is a few lines below config USB_OTG bool depends on USB && EXPERIMENTAL select USB_SUSPEND ^^^^^^^^^^^^^^^^^^ default n This triggers a know bug of the select statement (Documentation/kbuild/kconfig-language.txt): select should be used with care. select will force a symbol to a value without visiting the dependencies. By abusing select you are able to select a symbol FOO even if FOO depends on BAR that is not set. In general use select only for non-visible symbols (no prompts anywhere) and for symbols with no dependencies. That will limit the usefulness but on the other hand avoid the illegal configurations all over. kconfig should one day warn about such things. Vegard Nossum is going to work on replacing the current kconfig dependency solver with something smarter during this year's GSoC, so there is light at the end of the tunnel. In the meantime, you can change the logic from "select USB_SUSPEND" to "depends on USB_SUSPEND". This will force one to first set USB_SUSPEND manually, but will avoid the build error. Michal ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Compile error with gregkh-07-usb-2.6.33-rc7.patch 2010-02-17 14:32 ` Michal Marek @ 2010-02-18 4:16 ` Greg KH 2010-02-18 6:34 ` Gadiyar, Anand 0 siblings, 1 reply; 4+ messages in thread From: Greg KH @ 2010-02-18 4:16 UTC (permalink / raw) To: Michal Marek Cc: Alan Stern, Gadiyar, Anand, jidong xiao, linux-usb@vger.kernel.org, linux-kbuild, Vegard Nossum On Wed, Feb 17, 2010 at 03:32:45PM +0100, Michal Marek wrote: > On 12.2.2010 16:30, Alan Stern wrote: > > On Fri, 12 Feb 2010, Gadiyar, Anand wrote: > > > >>>>> I guess you did _not_ enable CONFIG_PM_RUNTIME, right? > >>>>> > >>>>> pm_wq is only defined when CONFIG_PM_RUNTIME is enabled. > >>>>> > >>>>> 15 #ifdef CONFIG_PM_RUNTIME > >>>>> 16 > >>>>> 17 extern struct workqueue_struct *pm_wq; > >>>> > >>>> Right, I had CONFIG_PM_RUNTIME disabled. Enabling it allowed the > >>>> compile to go through. > >>>> > >>>> Does that compile failure still needs to be fixed. I'm guessing > >>>> not everyone will build with this option enabled? > >>>> > >>> Well, looking at gregkh-07-usb-2.6.33-rc7.patch, I noticed following > >>> hunk of patch: > >>> > >>> diff -Naur -X linux-2.6.33-rc7-tty/Documentation/dontdiff linux-2.6.33-rc7-tty/drivers/usb/core/Kconfig linux-2.6.33-rc7-usb/drivers/usb/core/Kconfig > >>> --- linux-2.6.33-rc7-tty/drivers/usb/core/Kconfig 2009-09-09 15:13:59.000000000 -0700 > >>> +++ linux-2.6.33-rc7-usb/drivers/usb/core/Kconfig 2010-02-09 13:21:32.000000000 -0800 > >>> @@ -91,8 +91,8 @@ > >>> If you are unsure about this, say N here. > >>> > >>> config USB_SUSPEND > >>> - bool "USB selective suspend/resume and wakeup" > >>> - depends on USB && PM > >>> + bool "USB runtime power management (suspend/resume and wakeup)" > >>> + depends on USB && PM_RUNTIME > >>> help > >>> If you say Y here, you can use driver calls or the sysfs > >>> "power/level" file to suspend or resume individual USB > >>> > >>> This patch is saying, USB_SUSPEND is depends on PM_RUNTIME, in your > >>> case, USB_SUSPEND is enabled, but PM_RUNTIME is disabled, this is a > >>> little bit strange, I guess you have manually edited .config instead > >>> of running the command `make menuconfig`. I am afraid this might cause > >>> some dependency problem. > >> > >> Nope. I did `make ARCH=arm omap_3430sdp_defconfig`, and this generated > >> the .config. Wouldn't the dependencies be taken care of by this? > >> > >> (omap_3430sdp_defconfig has CONFIG_USB_SUSPEND=y and CONFIG_PM_RUNTIME > >> not set, since the defconfig is old. But wouldn't CONFIG_USB_SUSPEND > >> get turned off in this case?) > > > > I would expect it to get turned off. This sounds like a bug in the > > kernel build system. Adding the linux-kbuild mailing list to the CC:. > > The problem is a few lines below > > config USB_OTG > bool > depends on USB && EXPERIMENTAL > select USB_SUSPEND > ^^^^^^^^^^^^^^^^^^ > default n > > This triggers a know bug of the select statement > (Documentation/kbuild/kconfig-language.txt): > > select should be used with care. select will force > a symbol to a value without visiting the dependencies. > By abusing select you are able to select a symbol FOO even > if FOO depends on BAR that is not set. > In general use select only for non-visible symbols > (no prompts anywhere) and for symbols with no dependencies. > That will limit the usefulness but on the other hand avoid > the illegal configurations all over. > kconfig should one day warn about such things. > > Vegard Nossum is going to work on replacing the current kconfig > dependency solver with something smarter during this year's GSoC, so > there is light at the end of the tunnel. In the meantime, you can change > the logic from "select USB_SUSPEND" to "depends on USB_SUSPEND". This > will force one to first set USB_SUSPEND manually, but will avoid the > build error. A patch to do this would probably be best so we don't run into it again. thanks, greg k-h ^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: Compile error with gregkh-07-usb-2.6.33-rc7.patch 2010-02-18 4:16 ` Greg KH @ 2010-02-18 6:34 ` Gadiyar, Anand 0 siblings, 0 replies; 4+ messages in thread From: Gadiyar, Anand @ 2010-02-18 6:34 UTC (permalink / raw) To: Greg KH, Michal Marek Cc: Alan Stern, jidong xiao, linux-usb@vger.kernel.org, linux-kbuild@vger.kernel.org, Vegard Nossum <snip> > > In the meantime, you can change > > the logic from "select USB_SUSPEND" to "depends on USB_SUSPEND". This > > will force one to first set USB_SUSPEND manually, but will avoid the > > build error. > > A patch to do this would probably be best so we don't run > into it again. > Thanks for the explanations. Patch coming up in a bit, as soon as I finish testing with a few configs. - Anand ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-02-18 6:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <5A47E75E594F054BAF48C5E4FC4B92AB031E80D6E0@dbde02.ent.ti.com>
2010-02-12 15:30 ` Compile error with gregkh-07-usb-2.6.33-rc7.patch Alan Stern
2010-02-17 14:32 ` Michal Marek
2010-02-18 4:16 ` Greg KH
2010-02-18 6:34 ` Gadiyar, Anand
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox