2009-04-21 18:55:34

by Subrata Modak

[permalink] [raw]
Subject: [BUILD FAILURE 11/12] Next April 21 : PPC64 randconfig [drivers/usb/host/ohci-hcd.o]

Observing this for the first time:

CC drivers/usb/host/ohci-hcd.o
In file included from drivers/usb/host/ohci-hcd.c:1060:
drivers/usb/host/ohci-ppc-of.c:242:2: error: #error "No endianess
selected for ppc-of-ohci"
make[3]: *** [drivers/usb/host/ohci-hcd.o] Error 1
make[2]: *** [drivers/usb/host] Error 2
make[1]: *** [drivers/usb] Error 2
make: *** [drivers] Error 2
---

Regards--
Subrata


Attachments:
randconfig11-next20090421-ppc64 (45.69 kB)

2009-04-21 19:03:51

by David Brownell

[permalink] [raw]
Subject: Re: [BUILD FAILURE 11/12] Next April 21 : PPC64 randconfig [drivers/usb/host/ohci-hcd.o]

On Tuesday 21 April 2009, Subrata Modak wrote:
> Observing this for the first time:
>
> CC drivers/usb/host/ohci-hcd.o
> In file included from drivers/usb/host/ohci-hcd.c:1060:
> drivers/usb/host/ohci-ppc-of.c:242:2: error: #error "No endianess

Hmm, scripts/get_maintainer.pl doesn't report
the PPC folk who maintain that file and its
kbuild infrastructure.

Can we have some PPC folk look at (and fix) this?


> selected for ppc-of-ohci"
> make[3]: *** [drivers/usb/host/ohci-hcd.o] Error 1
> make[2]: *** [drivers/usb/host] Error 2
> make[1]: *** [drivers/usb] Error 2
> make: *** [drivers] Error 2
> ---
>
> Regards--
> Subrata
>
>

2009-04-21 21:37:48

by Kumar Gala

[permalink] [raw]
Subject: Re: [BUILD FAILURE 11/12] Next April 21 : PPC64 randconfig [drivers/usb/host/ohci-hcd.o]


On Apr 21, 2009, at 2:03 PM, David Brownell wrote:

> On Tuesday 21 April 2009, Subrata Modak wrote:
>> Observing this for the first time:
>>
>> CC drivers/usb/host/ohci-hcd.o
>> In file included from drivers/usb/host/ohci-hcd.c:1060:
>> drivers/usb/host/ohci-ppc-of.c:242:2: error: #error "No endianess
>
> Hmm, scripts/get_maintainer.pl doesn't report
> the PPC folk who maintain that file and its
> kbuild infrastructure.
>
> Can we have some PPC folk look at (and fix) this?

The problem is in the drivers/usb/host/Kconfig:

config USB_OHCI_HCD_PPC_OF_BE
bool "Support big endian HC"
depends on USB_OHCI_HCD_PPC_OF
default y
select USB_OHCI_BIG_ENDIAN_DESC
select USB_OHCI_BIG_ENDIAN_MMIO

config USB_OHCI_HCD_PPC_OF_LE
bool "Support little endian HC"
depends on USB_OHCI_HCD_PPC_OF
default n
select USB_OHCI_LITTLE_ENDIAN

Since its feasible to say 'n' to both we get the compile error. How
do we enforce having at least one set?

- k

2009-04-21 22:05:40

by Randy Dunlap

[permalink] [raw]
Subject: Re: [BUILD FAILURE 11/12] Next April 21 : PPC64 randconfig [drivers/usb/host/ohci-hcd.o]

Kumar Gala wrote:
>
> On Apr 21, 2009, at 2:03 PM, David Brownell wrote:
>
>> On Tuesday 21 April 2009, Subrata Modak wrote:
>>> Observing this for the first time:
>>>
>>> CC drivers/usb/host/ohci-hcd.o
>>> In file included from drivers/usb/host/ohci-hcd.c:1060:
>>> drivers/usb/host/ohci-ppc-of.c:242:2: error: #error "No endianess
>>
>> Hmm, scripts/get_maintainer.pl doesn't report
>> the PPC folk who maintain that file and its
>> kbuild infrastructure.
>>
>> Can we have some PPC folk look at (and fix) this?
>
> The problem is in the drivers/usb/host/Kconfig:
>
> config USB_OHCI_HCD_PPC_OF_BE
> bool "Support big endian HC"
> depends on USB_OHCI_HCD_PPC_OF
> default y
> select USB_OHCI_BIG_ENDIAN_DESC
> select USB_OHCI_BIG_ENDIAN_MMIO
>
> config USB_OHCI_HCD_PPC_OF_LE
> bool "Support little endian HC"
> depends on USB_OHCI_HCD_PPC_OF
> default n
> select USB_OHCI_LITTLE_ENDIAN
>
> Since its feasible to say 'n' to both we get the compile error. How do
> we enforce having at least one set?

Looks like using "choice" without "optional" would do it.
See Documentation/kbuild/kconfig-language.txt and various examples
in Kconfig* files.

--
~Randy

2009-04-22 02:19:53

by David Brownell

[permalink] [raw]
Subject: Re: [BUILD FAILURE 11/12] Next April 21 : PPC64 randconfig [drivers/usb/host/ohci-hcd.o]

On Tuesday 21 April 2009, Randy Dunlap wrote:
>
> > Since its feasible to say 'n' to both we get the compile error. ?How do
> > we enforce having at least one set?
>
> Looks like using "choice" without "optional" would do it.
> See Documentation/kbuild/kconfig-language.txt and various examples
> in Kconfig* files.

That won't quite work ... "at least one" includes "two"
(i.e. a PCI card in little-endian, a native controller
in big-endian). Real-world systems need such configs,
or so I'm told, and that's why their supported.

Is there maybe a way to force Kconfig to just reject
such illegal configs -- neither option set -- rather
than trying some how to fix it?

Or maybe ... if neither one is set, have the header
force both on, and issue a warning.

2009-04-22 03:00:23

by Randy Dunlap

[permalink] [raw]
Subject: Re: [BUILD FAILURE 11/12] Next April 21 : PPC64 randconfig [drivers/usb/host/ohci-hcd.o]

David Brownell wrote:
> On Tuesday 21 April 2009, Randy Dunlap wrote:
>>> Since its feasible to say 'n' to both we get the compile error. How do
>>> we enforce having at least one set?
>> Looks like using "choice" without "optional" would do it.
>> See Documentation/kbuild/kconfig-language.txt and various examples
>> in Kconfig* files.
>
> That won't quite work ... "at least one" includes "two"
> (i.e. a PCI card in little-endian, a native controller
> in big-endian). Real-world systems need such configs,
> or so I'm told, and that's why their supported.

Yes, I see.

> Is there maybe a way to force Kconfig to just reject
> such illegal configs -- neither option set -- rather
> than trying some how to fix it?

Not that I know of. cc-ing Sam.

> Or maybe ... if neither one is set, have the header
> force both on, and issue a warning.

That should be doable. We'd prefer to catch it via Kconfig,
but that doesn't look promising just now.

--
~Randy

2009-04-22 07:32:34

by Arnd Bergmann

[permalink] [raw]
Subject: Re: [BUILD FAILURE 11/12] Next April 21 : PPC64 randconfig [drivers/usb/host/ohci-hcd.o]

On Wednesday 22 April 2009, Randy Dunlap wrote:
> > Is there maybe a way to force Kconfig to just reject
> > such illegal configs -- neither option set -- rather
> > than trying some how to fix it?
>
> Not that I know of. ?cc-ing Sam.

We could just make the USB_OHCI_HCD_PPC_OF option implicit
and selected only if at least one of USB_OHCI_HCD_PPC_OF_BE
and USB_OHCI_HCD_PPC_OF_LE are set.

Signed-off-by: Arnd Bergmann <[email protected]>

diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
index 845479f..07e3e25 100644
--- a/drivers/usb/host/Kconfig
+++ b/drivers/usb/host/Kconfig
@@ -161,26 +161,26 @@ config USB_OHCI_HCD_PPC_SOC
Enables support for the USB controller on the MPC52xx or
STB03xxx processor chip. If unsure, say Y.

-config USB_OHCI_HCD_PPC_OF
- bool "OHCI support for PPC USB controller on OF platform bus"
- depends on USB_OHCI_HCD && PPC_OF
- default y
- ---help---
- Enables support for the USB controller PowerPC present on the
- OpenFirmware platform bus.
-
config USB_OHCI_HCD_PPC_OF_BE
- bool "Support big endian HC"
- depends on USB_OHCI_HCD_PPC_OF
- default y
+ bool "OHCI support for OF platform bus (big endian)"
+ depends on USB_OHCI_HCD && PPC_OF
select USB_OHCI_BIG_ENDIAN_DESC
select USB_OHCI_BIG_ENDIAN_MMIO
+ ---help---
+ Enables support for big-endian USB controllers present on the
+ OpenFirmware platform bus.

config USB_OHCI_HCD_PPC_OF_LE
- bool "Support little endian HC"
- depends on USB_OHCI_HCD_PPC_OF
- default n
+ bool "OHCI support for OF platform bus (little endian)"
+ depends on USB_OHCI_HCD && PPC_OF
select USB_OHCI_LITTLE_ENDIAN
+ ---help---
+ Enables support for little-endian USB controllers present on the
+ OpenFirmware platform bus.
+
+config USB_OHCI_HCD_PPC_OF
+ bool
+ default USB_OHCI_HCD_PPC_OF_BE || USB_OHCI_HCD_PPC_OF_LE

config USB_OHCI_HCD_PCI
bool "OHCI support for PCI-bus USB controllers"