2011-02-23 12:54:43

by Narendra K

[permalink] [raw]
Subject: [PATCH] Fix build failure when CONFIG_NLS is set to 'm' by allmodconfig

Hello,

This patch fixes the build breakage as described in the post
http://marc.info/?l=linux-next&m=129478755528194&w=2 while compiling the
patch - http://marc.info/?l=linux-netdev&m=129846468529049&w=2 ([PATCH
V3] Export ACPI _DSM provided firmware instance number and string name
to sysfs).

Hi Al,

If this patch is acceptable, please consider for inclusion.

From: Narendra K <[email protected]>
Subject: [PATCH] Fix build failure when CONFIG_NLS is set to 'm' by allmodconfig

This patch fixes the following build breakage introduced by the patch
'[PATCH V3] Export ACPI _DSM provided firmware instance number and string to
sysfs'.

drivers/built-in.o: In function `T.647':
pci-label.c:(.text+0x28514): undefined reference to `utf16s_to_utf8s'

This happens because 'make allmodconfig' sets CONFIG_NLS=m and makes
'utf16s_to_utf8s` unavailable to drivers/pci/pci-label.o which is built
into vmlinux.

This is fixed by making fs/nls/nls_base.c compile conditionally into
vmlinux by introducing a new config option CONFIG_NLS_BASE which is
selected by (ACPI || DMI || NLS).

Signed-off-by: Narendra K <[email protected]>
---
fs/Makefile | 2 +-
fs/nls/Kconfig | 14 ++++++++++++++
fs/nls/Makefile | 2 +-
3 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/fs/Makefile b/fs/Makefile
index a7f7cef..1e78b9b 100644
--- a/fs/Makefile
+++ b/fs/Makefile
@@ -86,7 +86,7 @@ obj-$(CONFIG_NFS_FS) += nfs/
obj-$(CONFIG_EXPORTFS) += exportfs/
obj-$(CONFIG_NFSD) += nfsd/
obj-$(CONFIG_LOCKD) += lockd/
-obj-$(CONFIG_NLS) += nls/
+obj-y += nls/
obj-$(CONFIG_SYSV_FS) += sysv/
obj-$(CONFIG_CIFS) += cifs/
obj-$(CONFIG_NCP_FS) += ncpfs/
diff --git a/fs/nls/Kconfig b/fs/nls/Kconfig
index a39edc4..2fb92e5 100644
--- a/fs/nls/Kconfig
+++ b/fs/nls/Kconfig
@@ -4,6 +4,7 @@

menuconfig NLS
tristate "Native language support"
+ select NLS_BASE
---help---
The base Native Language Support. A number of filesystems
depend on it (e.g. FAT, JOLIET, NT, BEOS filesystems), as well
@@ -17,6 +18,19 @@ menuconfig NLS

if NLS

+config NLS_BASE
+ bool "Base NLS functions"
+ depends on ACPI || DMI
+ default y
+ ---help---
+ The base NLS support functions which handle unicode traslations.
+
+ If unsure, say Y.
+
+ This config option is selected by ACPI && DMI && NLS as the
+ functions defined here are needed in vmlinux and if built as
+ module cause build issues.
+
config NLS_DEFAULT
string "Default NLS Option"
default "iso8859-1"
diff --git a/fs/nls/Makefile b/fs/nls/Makefile
index f499dd7..dde741f 100644
--- a/fs/nls/Makefile
+++ b/fs/nls/Makefile
@@ -2,7 +2,7 @@
# Makefile for native language support
#

-obj-$(CONFIG_NLS) += nls_base.o
+obj-$(CONFIG_NLS_BASE) += nls_base.o

obj-$(CONFIG_NLS_CODEPAGE_437) += nls_cp437.o
obj-$(CONFIG_NLS_CODEPAGE_737) += nls_cp737.o
--
1.7.3.1

With regards,
Narendra K-


2011-02-23 13:17:58

by Matthew Garrett

[permalink] [raw]
Subject: Re: [PATCH] Fix build failure when CONFIG_NLS is set to 'm' by allmodconfig

On Wed, Feb 23, 2011 at 06:24:31PM +0530, [email protected] wrote:

> This patch fixes the following build breakage introduced by the patch
> '[PATCH V3] Export ACPI _DSM provided firmware instance number and string to
> sysfs'.

First, you should include this as part of your original patch so that
the build doesn't break during bisection.

> This is fixed by making fs/nls/nls_base.c compile conditionally into
> vmlinux by introducing a new config option CONFIG_NLS_BASE which is
> selected by (ACPI || DMI || NLS).

Why?

> -obj-$(CONFIG_NLS) += nls/
> +obj-y += nls/

You seem to have just broken building any of the NLS code as modules.

> menuconfig NLS
> tristate "Native language support"
> + select NLS_BASE

All CONFIG_NLS does is build nls_base.

> +config NLS_BASE
> + bool "Base NLS functions"
> + depends on ACPI || DMI

What in this code depends on ACPI or DMI?

> -obj-$(CONFIG_NLS) += nls_base.o
> +obj-$(CONFIG_NLS_BASE) += nls_base.o

And why make this change?

Just have something like

select NLS if (ACPI || DMI)

in drivers/pci/Kconfig.

--
Matthew Garrett | [email protected]

2011-03-04 18:15:27

by Jesse Barnes

[permalink] [raw]
Subject: Re: [PATCH] Fix build failure when CONFIG_NLS is set to 'm' by allmodconfig

On Wed, 23 Feb 2011 13:17:34 +0000
Matthew Garrett <[email protected]> wrote:

> On Wed, Feb 23, 2011 at 06:24:31PM +0530, [email protected] wrote:
>
> > This patch fixes the following build breakage introduced by the patch
> > '[PATCH V3] Export ACPI _DSM provided firmware instance number and string to
> > sysfs'.
>
> First, you should include this as part of your original patch so that
> the build doesn't break during bisection.
>
> > This is fixed by making fs/nls/nls_base.c compile conditionally into
> > vmlinux by introducing a new config option CONFIG_NLS_BASE which is
> > selected by (ACPI || DMI || NLS).
>
> Why?
>
> > -obj-$(CONFIG_NLS) += nls/
> > +obj-y += nls/
>
> You seem to have just broken building any of the NLS code as modules.
>
> > menuconfig NLS
> > tristate "Native language support"
> > + select NLS_BASE
>
> All CONFIG_NLS does is build nls_base.
>
> > +config NLS_BASE
> > + bool "Base NLS functions"
> > + depends on ACPI || DMI
>
> What in this code depends on ACPI or DMI?
>
> > -obj-$(CONFIG_NLS) += nls_base.o
> > +obj-$(CONFIG_NLS_BASE) += nls_base.o
>
> And why make this change?
>
> Just have something like
>
> select NLS if (ACPI || DMI)
>
> in drivers/pci/Kconfig.

Narendra, can you send me an updated patch including the build fix?
Either using this approach or the other one I outlined in my other mail.

Thanks,
--
Jesse Barnes, Intel Open Source Technology Center

2011-03-28 15:02:39

by Randy Dunlap

[permalink] [raw]
Subject: Re: [PATCH] Fix build failure when CONFIG_NLS is set to 'm' by allmodconfig

On Fri, 4 Mar 2011 10:15:09 -0800 Jesse Barnes wrote:

> On Wed, 23 Feb 2011 13:17:34 +0000
> Matthew Garrett <[email protected]> wrote:
>
> > On Wed, Feb 23, 2011 at 06:24:31PM +0530, [email protected] wrote:
> >
> > > This patch fixes the following build breakage introduced by the patch
> > > '[PATCH V3] Export ACPI _DSM provided firmware instance number and string to
> > > sysfs'.
> >
> > First, you should include this as part of your original patch so that
> > the build doesn't break during bisection.
> >
> > > This is fixed by making fs/nls/nls_base.c compile conditionally into
> > > vmlinux by introducing a new config option CONFIG_NLS_BASE which is
> > > selected by (ACPI || DMI || NLS).
> >
> > Why?
> >
> > > -obj-$(CONFIG_NLS) += nls/
> > > +obj-y += nls/
> >
> > You seem to have just broken building any of the NLS code as modules.
> >
> > > menuconfig NLS
> > > tristate "Native language support"
> > > + select NLS_BASE
> >
> > All CONFIG_NLS does is build nls_base.
> >
> > > +config NLS_BASE
> > > + bool "Base NLS functions"
> > > + depends on ACPI || DMI
> >
> > What in this code depends on ACPI or DMI?
> >
> > > -obj-$(CONFIG_NLS) += nls_base.o
> > > +obj-$(CONFIG_NLS_BASE) += nls_base.o
> >
> > And why make this change?
> >
> > Just have something like
> >
> > select NLS if (ACPI || DMI)
> >
> > in drivers/pci/Kconfig.
>
> Narendra, can you send me an updated patch including the build fix?
> Either using this approach or the other one I outlined in my other mail.


This driver still has build failures in linux-next 20110328.

pci-label.c:(.text+0x9a40): undefined reference to `utf16s_to_utf8s'

CONFIG_NLS=m

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

2011-03-28 16:17:43

by Jesse Barnes

[permalink] [raw]
Subject: Re: [PATCH] Fix build failure when CONFIG_NLS is set to 'm' by allmodconfig

On Mon, 28 Mar 2011 08:02:20 -0700
Randy Dunlap <[email protected]> wrote:

> This driver still has build failures in linux-next 20110328.
>
> pci-label.c:(.text+0x9a40): undefined reference to `utf16s_to_utf8s'
>
> CONFIG_NLS=m

Narenda, please send a fix asap.

Thanks,
--
Jesse Barnes, Intel Open Source Technology Center

2011-03-28 19:24:18

by shyam_iyer

[permalink] [raw]
Subject: RE: [PATCH] Fix build failure when CONFIG_NLS is set to 'm' by allmodconfig



> -----Original Message-----
> From: Randy Dunlap [mailto:[email protected]]
> Sent: Monday, March 28, 2011 11:02 AM
> To: Jesse Barnes
> Cc: Matthew Garrett; K, Narendra; [email protected];
> [email protected]; [email protected]; linux-
> [email protected]; Iyer, Shyam; Domsch, Matt; Rose, Charles;
> Hargrave, Jordan
> Subject: Re: [PATCH] Fix build failure when CONFIG_NLS is set to 'm' by
> allmodconfig
>
> On Fri, 4 Mar 2011 10:15:09 -0800 Jesse Barnes wrote:
>
> > On Wed, 23 Feb 2011 13:17:34 +0000
> > Matthew Garrett <[email protected]> wrote:
> >
> > > On Wed, Feb 23, 2011 at 06:24:31PM +0530, [email protected]
> wrote:
> > >
> > > > This patch fixes the following build breakage introduced by the
> patch
> > > > '[PATCH V3] Export ACPI _DSM provided firmware instance number
> and string to
> > > > sysfs'.
> > >
> > > First, you should include this as part of your original patch so
> that
> > > the build doesn't break during bisection.
> > >
> > > > This is fixed by making fs/nls/nls_base.c compile conditionally
> into
> > > > vmlinux by introducing a new config option CONFIG_NLS_BASE which
> is
> > > > selected by (ACPI || DMI || NLS).
> > >
> > > Why?
> > >
> > > > -obj-$(CONFIG_NLS) += nls/
> > > > +obj-y += nls/
> > >
> > > You seem to have just broken building any of the NLS code as
> modules.
> > >
> > > > menuconfig NLS
> > > > tristate "Native language support"
> > > > + select NLS_BASE
> > >
> > > All CONFIG_NLS does is build nls_base.
> > >
> > > > +config NLS_BASE
> > > > + bool "Base NLS functions"
> > > > + depends on ACPI || DMI
> > >
> > > What in this code depends on ACPI or DMI?
> > >
> > > > -obj-$(CONFIG_NLS) += nls_base.o
> > > > +obj-$(CONFIG_NLS_BASE) += nls_base.o
> > >
> > > And why make this change?
> > >
> > > Just have something like
> > >
> > > select NLS if (ACPI || DMI)
> > >
> > > in drivers/pci/Kconfig.
> >
> > Narendra, can you send me an updated patch including the build fix?
> > Either using this approach or the other one I outlined in my other
> mail.
>
>
> This driver still has build failures in linux-next 20110328.
>
> pci-label.c:(.text+0x9a40): undefined reference to `utf16s_to_utf8s'
>
> CONFIG_NLS=m

I don't get this.. you should not be getting CONFIG_NLS=m unless you have stripped you config files really.. :-) Is it possible to get your .config to hit this issue.

-Shyam
>
> ---
> ~Randy
> *** Remember to use Documentation/SubmitChecklist when testing your
> code ***

2011-03-28 20:22:25

by Randy Dunlap

[permalink] [raw]
Subject: Re: [PATCH] Fix build failure when CONFIG_NLS is set to 'm' by allmodconfig

On 03/28/11 12:14, [email protected] wrote:
>
>
>> -----Original Message-----
>> From: Randy Dunlap [mailto:[email protected]]
>> Sent: Monday, March 28, 2011 11:02 AM
>> To: Jesse Barnes
>> Cc: Matthew Garrett; K, Narendra; [email protected];
>> [email protected]; [email protected]; linux-
>> [email protected]; Iyer, Shyam; Domsch, Matt; Rose, Charles;
>> Hargrave, Jordan
>> Subject: Re: [PATCH] Fix build failure when CONFIG_NLS is set to 'm' by
>> allmodconfig
>>
>> On Fri, 4 Mar 2011 10:15:09 -0800 Jesse Barnes wrote:
>>
>>> On Wed, 23 Feb 2011 13:17:34 +0000
>>> Matthew Garrett <[email protected]> wrote:
>>>
>>>> On Wed, Feb 23, 2011 at 06:24:31PM +0530, [email protected]
>> wrote:
>>>>
>>>>> This patch fixes the following build breakage introduced by the
>> patch
>>>>> '[PATCH V3] Export ACPI _DSM provided firmware instance number
>> and string to
>>>>> sysfs'.
>>>>
>>>> First, you should include this as part of your original patch so
>> that
>>>> the build doesn't break during bisection.
>>>>
>>>>> This is fixed by making fs/nls/nls_base.c compile conditionally
>> into
>>>>> vmlinux by introducing a new config option CONFIG_NLS_BASE which
>> is
>>>>> selected by (ACPI || DMI || NLS).
>>>>
>>>> Why?
>>>>
>>>>> -obj-$(CONFIG_NLS) += nls/
>>>>> +obj-y += nls/
>>>>
>>>> You seem to have just broken building any of the NLS code as
>> modules.
>>>>
>>>>> menuconfig NLS
>>>>> tristate "Native language support"
>>>>> + select NLS_BASE
>>>>
>>>> All CONFIG_NLS does is build nls_base.
>>>>
>>>>> +config NLS_BASE
>>>>> + bool "Base NLS functions"
>>>>> + depends on ACPI || DMI
>>>>
>>>> What in this code depends on ACPI or DMI?
>>>>
>>>>> -obj-$(CONFIG_NLS) += nls_base.o
>>>>> +obj-$(CONFIG_NLS_BASE) += nls_base.o
>>>>
>>>> And why make this change?
>>>>
>>>> Just have something like
>>>>
>>>> select NLS if (ACPI || DMI)
>>>>
>>>> in drivers/pci/Kconfig.
>>>
>>> Narendra, can you send me an updated patch including the build fix?
>>> Either using this approach or the other one I outlined in my other
>> mail.
>>
>>
>> This driver still has build failures in linux-next 20110328.
>>
>> pci-label.c:(.text+0x9a40): undefined reference to `utf16s_to_utf8s'
>>
>> CONFIG_NLS=m
>
> I don't get this.. you should not be getting CONFIG_NLS=m unless you have stripped you config files really.. :-) Is it possible to get your .config to hit this issue.

I haven't stripped any config files -- but they are randconfig files.
Two (2) config files that cause build failures are attached.

--
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***


Attachments:
config-r5353 (63.32 kB)
config-r5358 (41.47 kB)
Download all attachments

2011-03-29 01:55:37

by OGAWA Hirofumi

[permalink] [raw]
Subject: Re: [PATCH] Fix build failure when CONFIG_NLS is set to 'm' by allmodconfig

Randy Dunlap <[email protected]> writes:

>> I don't get this.. you should not be getting CONFIG_NLS=m unless you
>> have stripped you config files really.. :-) Is it possible to get
>> your .config to hit this issue.
>
> I haven't stripped any config files -- but they are randconfig files.
> Two (2) config files that cause build failures are attached.

config PCI_IOAPIC
bool
depends on PCI
depends on ACPI
depends on HOTPLUG
default y

select NLS if (DMI || ACPI)

I guess this is simply wrong. It will be parsed as

config PCI_IOAPIC
bool
depends on PCI
depends on ACPI
depends on HOTPLUG
default y
select NLS if (DMI || ACPI)

How about something like the following?

config PCI_LABEL
bool
select NLS
depends on (DMI || ACPI)
--
OGAWA Hirofumi <[email protected]>

2011-03-29 16:18:20

by Randy Dunlap

[permalink] [raw]
Subject: Re: [PATCH] Fix build failure when CONFIG_NLS is set to 'm' by allmodconfig

On 03/28/11 18:55, OGAWA Hirofumi wrote:
> Randy Dunlap <[email protected]> writes:
>
>>> I don't get this.. you should not be getting CONFIG_NLS=m unless you
>>> have stripped you config files really.. :-) Is it possible to get
>>> your .config to hit this issue.
>>
>> I haven't stripped any config files -- but they are randconfig files.
>> Two (2) config files that cause build failures are attached.
>
> config PCI_IOAPIC
> bool
> depends on PCI
> depends on ACPI
> depends on HOTPLUG
> default y
>
> select NLS if (DMI || ACPI)

Ugh. That looks seriously mucked up.
Dell people, have you checked what it is linux-next for this pci-label stuff?

Jesse, I would drop the b0rked pieces and ask for a new patch.


> I guess this is simply wrong. It will be parsed as
>
> config PCI_IOAPIC
> bool
> depends on PCI
> depends on ACPI
> depends on HOTPLUG
> default y
> select NLS if (DMI || ACPI)
>
> How about something like the following?
>
> config PCI_LABEL
> bool
> select NLS
> depends on (DMI || ACPI)

What sets/enables it then?
or did you mean:
def_bool y
and in that case, should it be a user-visible & user-changeable kconfig option?

--
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

2011-03-29 16:23:55

by Jesse Barnes

[permalink] [raw]
Subject: Re: [PATCH] Fix build failure when CONFIG_NLS is set to 'm' by allmodconfig

On Tue, 29 Mar 2011 09:18:04 -0700
Randy Dunlap <[email protected]> wrote:

> On 03/28/11 18:55, OGAWA Hirofumi wrote:
> > Randy Dunlap <[email protected]> writes:
> >
> >>> I don't get this.. you should not be getting CONFIG_NLS=m unless you
> >>> have stripped you config files really.. :-) Is it possible to get
> >>> your .config to hit this issue.
> >>
> >> I haven't stripped any config files -- but they are randconfig files.
> >> Two (2) config files that cause build failures are attached.
> >
> > config PCI_IOAPIC
> > bool
> > depends on PCI
> > depends on ACPI
> > depends on HOTPLUG
> > default y
> >
> > select NLS if (DMI || ACPI)
>
> Ugh. That looks seriously mucked up.
> Dell people, have you checked what it is linux-next for this pci-label stuff?
>
> Jesse, I would drop the b0rked pieces and ask for a new patch.

Should be the same as what's in Linus master at this point... But yes
I'm tempted to revert since it's been nothing but trouble so far.

Narendra, any chance you can get me a fix today? If not I'll queue up
a revert and you can try again in the next cycle.

--
Jesse Barnes, Intel Open Source Technology Center

2011-03-29 16:39:56

by OGAWA Hirofumi

[permalink] [raw]
Subject: Re: [PATCH] Fix build failure when CONFIG_NLS is set to 'm' by allmodconfig

Randy Dunlap <[email protected]> writes:

>> config PCI_LABEL
>> bool
>> select NLS
>> depends on (DMI || ACPI)
>
> What sets/enables it then?
> or did you mean:
> def_bool y
> and in that case, should it be a user-visible & user-changeable kconfig option?

Whoops, last line was missed by copy&paste. It meant

config PCI_LABEL
bool
select NLS
depends on (DMI || ACPI)
default y

And no, it shouldn't be user-changeable (it would be better to
invisible in .config. At make *config, already invisible.). Because
PCI_LABEL is not user config and not used in Makefile.

And yeah, if you like def_bool

config PCI_LABEL
def_bool y if (DMI || ACPI)
select NLS

I guess it would work (it should be just syntax sugar and equivalent).

Thanks.
--
OGAWA Hirofumi <[email protected]>

2011-03-29 16:46:43

by Randy Dunlap

[permalink] [raw]
Subject: [PATCH] pci-label: Fix build failure when CONFIG_NLS is set to 'm' by allmodconfig

On Wed, 30 Mar 2011 01:39:46 +0900 OGAWA Hirofumi wrote:

> Randy Dunlap <[email protected]> writes:
>
> >> config PCI_LABEL
> >> bool
> >> select NLS
> >> depends on (DMI || ACPI)
> >
> > What sets/enables it then?
> > or did you mean:
> > def_bool y
> > and in that case, should it be a user-visible & user-changeable kconfig option?
>
> Whoops, last line was missed by copy&paste. It meant
>
> config PCI_LABEL
> bool
> select NLS
> depends on (DMI || ACPI)
> default y
>
> And no, it shouldn't be user-changeable (it would be better to
> invisible in .config. At make *config, already invisible.). Because
> PCI_LABEL is not user config and not used in Makefile.
>
> And yeah, if you like def_bool
>
> config PCI_LABEL
> def_bool y if (DMI || ACPI)
> select NLS
>
> I guess it would work (it should be just syntax sugar and equivalent).


This patch seems to work for me. Thanks.

---
From: Randy Dunlap <[email protected]>

Create a kconfig option symbol for PCI_LABEL and enable it
when DMI || ACPI are enabled.

Signed-off-by: Randy Dunlap <[email protected]>
---
drivers/pci/Kconfig | 4 +++-
drivers/pci/Makefile | 4 ++--
2 files changed, 5 insertions(+), 3 deletions(-)

--- linux-next-20110328.orig/drivers/pci/Kconfig
+++ linux-next-20110328/drivers/pci/Kconfig
@@ -88,4 +88,6 @@ config PCI_IOAPIC
depends on HOTPLUG
default y

-select NLS if (DMI || ACPI)
+config PCI_LABEL
+ def_bool y if (DMI || ACPI)
+ select NLS
--- linux-next-20110328.orig/drivers/pci/Makefile
+++ linux-next-20110328/drivers/pci/Makefile
@@ -56,10 +56,10 @@ obj-$(CONFIG_TILE) += setup-bus.o setup-
# ACPI Related PCI FW Functions
# ACPI _DSM provided firmware instance and string name
#
-obj-$(CONFIG_ACPI) += pci-acpi.o pci-label.o
+obj-$(CONFIG_ACPI) += pci-acpi.o

# SMBIOS provided firmware instance and labels
-obj-$(CONFIG_DMI) += pci-label.o
+obj-$(CONFIG_PCI_LABEL) += pci-label.o

# Cardbus & CompactPCI use setup-bus
obj-$(CONFIG_HOTPLUG) += setup-bus.o

2011-03-29 16:55:17

by Jesse Barnes

[permalink] [raw]
Subject: Re: [PATCH] pci-label: Fix build failure when CONFIG_NLS is set to 'm' by allmodconfig

On Tue, 29 Mar 2011 09:45:57 -0700
Randy Dunlap <[email protected]> wrote:

> On Wed, 30 Mar 2011 01:39:46 +0900 OGAWA Hirofumi wrote:
>
> > Randy Dunlap <[email protected]> writes:
> >
> > >> config PCI_LABEL
> > >> bool
> > >> select NLS
> > >> depends on (DMI || ACPI)
> > >
> > > What sets/enables it then?
> > > or did you mean:
> > > def_bool y
> > > and in that case, should it be a user-visible & user-changeable kconfig option?
> >
> > Whoops, last line was missed by copy&paste. It meant
> >
> > config PCI_LABEL
> > bool
> > select NLS
> > depends on (DMI || ACPI)
> > default y
> >
> > And no, it shouldn't be user-changeable (it would be better to
> > invisible in .config. At make *config, already invisible.). Because
> > PCI_LABEL is not user config and not used in Makefile.
> >
> > And yeah, if you like def_bool
> >
> > config PCI_LABEL
> > def_bool y if (DMI || ACPI)
> > select NLS
> >
> > I guess it would work (it should be just syntax sugar and equivalent).
>
>
> This patch seems to work for me. Thanks.
>
> ---
> From: Randy Dunlap <[email protected]>
>
> Create a kconfig option symbol for PCI_LABEL and enable it
> when DMI || ACPI are enabled.
>
> Signed-off-by: Randy Dunlap <[email protected]>
> ---
> drivers/pci/Kconfig | 4 +++-
> drivers/pci/Makefile | 4 ++--
> 2 files changed, 5 insertions(+), 3 deletions(-)
>
> --- linux-next-20110328.orig/drivers/pci/Kconfig
> +++ linux-next-20110328/drivers/pci/Kconfig
> @@ -88,4 +88,6 @@ config PCI_IOAPIC
> depends on HOTPLUG
> default y
>
> -select NLS if (DMI || ACPI)
> +config PCI_LABEL
> + def_bool y if (DMI || ACPI)
> + select NLS
> --- linux-next-20110328.orig/drivers/pci/Makefile
> +++ linux-next-20110328/drivers/pci/Makefile
> @@ -56,10 +56,10 @@ obj-$(CONFIG_TILE) += setup-bus.o setup-
> # ACPI Related PCI FW Functions
> # ACPI _DSM provided firmware instance and string name
> #
> -obj-$(CONFIG_ACPI) += pci-acpi.o pci-label.o
> +obj-$(CONFIG_ACPI) += pci-acpi.o
>
> # SMBIOS provided firmware instance and labels
> -obj-$(CONFIG_DMI) += pci-label.o
> +obj-$(CONFIG_PCI_LABEL) += pci-label.o
>
> # Cardbus & CompactPCI use setup-bus
> obj-$(CONFIG_HOTPLUG) += setup-bus.o
>

Applied to my fixes branch, thanks Randy & Hirofumi-san.

--
Jesse Barnes, Intel Open Source Technology Center

2011-03-31 09:27:52

by Narendra K

[permalink] [raw]
Subject: RE: [PATCH] pci-label: Fix build failure when CONFIG_NLS is set to 'm' by allmodconfig

> -----Original Message-----
> From: Jesse Barnes [mailto:[email protected]]
> Sent: Tuesday, March 29, 2011 10:25 PM
> To: Randy Dunlap
> Cc: OGAWA Hirofumi; Iyer, Shyam; [email protected]; K, Narendra;
> [email protected]; [email protected]; linux-
> [email protected]; [email protected]; Domsch, Matt; Rose,
> Charles; Hargrave, Jordan
> Subject: Re: [PATCH] pci-label: Fix build failure when CONFIG_NLS is set to
> 'm' by allmodconfig
>
> On Tue, 29 Mar 2011 09:45:57 -0700
> Randy Dunlap <[email protected]> wrote:
>
> > On Wed, 30 Mar 2011 01:39:46 +0900 OGAWA Hirofumi wrote:
> >
> > > Randy Dunlap <[email protected]> writes:
> > >
> > > >> config PCI_LABEL
> > > >> bool
> > > >> select NLS
> > > >> depends on (DMI || ACPI)
> > > >
> > > > What sets/enables it then?
> > > > or did you mean:
> > > > def_bool y
> > > > and in that case, should it be a user-visible & user-changeable kconfig
> option?
> > >
> > > Whoops, last line was missed by copy&paste. It meant
> > >
> > > config PCI_LABEL
> > > bool
> > > select NLS
> > > depends on (DMI || ACPI)
> > > default y
> > >
> > > And no, it shouldn't be user-changeable (it would be better to
> > > invisible in .config. At make *config, already invisible.). Because
> > > PCI_LABEL is not user config and not used in Makefile.
> > >
> > > And yeah, if you like def_bool
> > >
> > > config PCI_LABEL
> > > def_bool y if (DMI || ACPI)
> > > select NLS
> > >
> > > I guess it would work (it should be just syntax sugar and equivalent).
> >
> >
> > This patch seems to work for me. Thanks.
> >
> > ---
> > From: Randy Dunlap <[email protected]>
> >
> > Create a kconfig option symbol for PCI_LABEL and enable it when DMI ||
> > ACPI are enabled.
> >
> > Signed-off-by: Randy Dunlap <[email protected]>
> > ---
> > drivers/pci/Kconfig | 4 +++-
> > drivers/pci/Makefile | 4 ++--
> > 2 files changed, 5 insertions(+), 3 deletions(-)
> >
> > --- linux-next-20110328.orig/drivers/pci/Kconfig
> > +++ linux-next-20110328/drivers/pci/Kconfig
> > @@ -88,4 +88,6 @@ config PCI_IOAPIC
> > depends on HOTPLUG
> > default y
> >
> > -select NLS if (DMI || ACPI)
> > +config PCI_LABEL
> > + def_bool y if (DMI || ACPI)
> > + select NLS
> > --- linux-next-20110328.orig/drivers/pci/Makefile
> > +++ linux-next-20110328/drivers/pci/Makefile
> > @@ -56,10 +56,10 @@ obj-$(CONFIG_TILE) += setup-bus.o setup- # ACPI
> > Related PCI FW Functions # ACPI _DSM provided firmware instance and
> > string name #
> > -obj-$(CONFIG_ACPI) += pci-acpi.o pci-label.o
> > +obj-$(CONFIG_ACPI) += pci-acpi.o
> >
> > # SMBIOS provided firmware instance and labels
> > -obj-$(CONFIG_DMI) += pci-label.o
> > +obj-$(CONFIG_PCI_LABEL) += pci-label.o
> >
> > # Cardbus & CompactPCI use setup-bus
> > obj-$(CONFIG_HOTPLUG) += setup-bus.o
> >
>
> Applied to my fixes branch, thanks Randy & Hirofumi-san.

Jesse, Randy and Hirofumi-san,

Sorry for the late response and the build failure. Thank you for the patch to fix this.

With regards,
Narendra K





2011-04-19 06:07:04

by Ingo Molnar

[permalink] [raw]
Subject: Re: [PATCH] Fix build failure when CONFIG_NLS is set to 'm' by allmodconfig


* [email protected] <[email protected]> wrote:

> This patch fixes the following build breakage introduced by the patch
> '[PATCH V3] Export ACPI _DSM provided firmware instance number and string to
> sysfs'.
>
> drivers/built-in.o: In function `T.647':
> pci-label.c:(.text+0x28514): undefined reference to `utf16s_to_utf8s'

btw., this build bug still triggers upstream with .39-rc4 - any plans on when
this regression will be fixed?

Thanks,

Ingo

2011-04-19 08:44:02

by Narendra K

[permalink] [raw]
Subject: RE: [PATCH] Fix build failure when CONFIG_NLS is set to 'm' by allmodconfig

> -----Original Message-----
> From: Ingo Molnar [mailto:[email protected]]
> Sent: Tuesday, April 19, 2011 11:37 AM
> To: K, Narendra
> Cc: [email protected]; [email protected]; [email protected];
> [email protected]; [email protected]; linux-
> [email protected]; Iyer, Shyam; Domsch, Matt; Rose, Charles; Hargrave,
> Jordan
> Subject: Re: [PATCH] Fix build failure when CONFIG_NLS is set to 'm' by
> allmodconfig
>
>
> * [email protected] <[email protected]> wrote:
>
> > This patch fixes the following build breakage introduced by the patch
> > '[PATCH V3] Export ACPI _DSM provided firmware instance number and
> > string to sysfs'.
> >
> > drivers/built-in.o: In function `T.647':
> > pci-label.c:(.text+0x28514): undefined reference to `utf16s_to_utf8s'
>
> btw., this build bug still triggers upstream with .39-rc4 - any plans on when
> this regression will be fixed?

Hi,

The commit 8a226e00eeed8db843d4a580013a49ae3559bcd7 in linux-next fixes it (PCI: pci-label: Fix build failure when CONFIG_NLS is set to 'm' by allmodconfig).
It is not in .39-rc4.

With regards,
Narendra K

2011-04-19 16:25:18

by Jesse Barnes

[permalink] [raw]
Subject: Re: [PATCH] Fix build failure when CONFIG_NLS is set to 'm' by allmodconfig

On Tue, 19 Apr 2011 01:43:53 -0700
<[email protected]> wrote:

> > -----Original Message-----
> > From: Ingo Molnar [mailto:[email protected]]
> > Sent: Tuesday, April 19, 2011 11:37 AM
> > To: K, Narendra
> > Cc: [email protected]; [email protected]; [email protected];
> > [email protected]; [email protected]; linux-
> > [email protected]; Iyer, Shyam; Domsch, Matt; Rose, Charles; Hargrave,
> > Jordan
> > Subject: Re: [PATCH] Fix build failure when CONFIG_NLS is set to 'm' by
> > allmodconfig
> >
> >
> > * [email protected] <[email protected]> wrote:
> >
> > > This patch fixes the following build breakage introduced by the patch
> > > '[PATCH V3] Export ACPI _DSM provided firmware instance number and
> > > string to sysfs'.
> > >
> > > drivers/built-in.o: In function `T.647':
> > > pci-label.c:(.text+0x28514): undefined reference to `utf16s_to_utf8s'
> >
> > btw., this build bug still triggers upstream with .39-rc4 - any plans on when
> > this regression will be fixed?
>
> Hi,
>
> The commit 8a226e00eeed8db843d4a580013a49ae3559bcd7 in linux-next fixes it (PCI: pci-label: Fix build failure when CONFIG_NLS is set to 'm' by allmodconfig).
> It is not in .39-rc4.

Yeah, I'll push it today (it's in my for-linus branch too). Thanks for
the reminder.

--
Jesse Barnes, Intel Open Source Technology Center