* Re: linux-next : cpuidle - could you add my tree please
From: Stephen Rothwell @ 2012-06-25 22:53 UTC (permalink / raw)
To: Daniel Lezcano
Cc: linux-acpi, linux-pm, Lists Linaro-dev, Linux Kernel Mailing List,
Kevin Hilman, Peter De Schrijver, Amit Kucheria, linux-next,
Colin Cross, Andrew Morton, Linus Torvalds, Rob Lee
In-Reply-To: <4FE86727.5010400@linaro.org>
[-- Attachment #1: Type: text/plain, Size: 1939 bytes --]
Hi Daniel,
On Mon, 25 Jun 2012 15:27:03 +0200 Daniel Lezcano <daniel.lezcano@linaro.org> wrote:
>
> we discussed last week to put in place a tree grouping the cpuidle
> modifications [1]. Is it possible to add the tree ?
>
> git://git.linaro.org/people/dlezcano/cpuidle-next.git #cpuidle-next
>
> It contains for the moment Colin Cross's cpuidle coupled states.
Added from today.
Thanks for adding your subsystem tree as a participant of linux-next. As
you may know, this is not a judgment of your code. The purpose of
linux-next is for integration testing and to lower the impact of
conflicts between subsystems in the next merge window.
You will need to ensure that the patches/commits in your tree/series have
been:
* submitted under GPL v2 (or later) and include the Contributor's
Signed-off-by,
* posted to the relevant mailing list,
* reviewed by you (or another maintainer of your subsystem tree),
* successfully unit tested, and
* destined for the current or next Linux merge window.
Basically, this should be just what you would send to Linus (or ask him
to fetch). It is allowed to be rebased if you deem it necessary.
--
Cheers,
Stephen Rothwell
sfr@canb.auug.org.au
Legal Stuff:
By participating in linux-next, your subsystem tree contributions are
public and will be included in the linux-next trees. You may be sent
e-mail messages indicating errors or other issues when the
patches/commits from your subsystem tree are merged and tested in
linux-next. These messages may also be cross-posted to the linux-next
mailing list, the linux-kernel mailing list, etc. The linux-next tree
project and IBM (my employer) make no warranties regarding the linux-next
project, the testing procedures, the results, the e-mails, etc. If you
don't agree to these ground rules, let me know and I'll remove your tree
from participation in linux-next.
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* Re: [PATCH] mod/file2alias: make modalias generation safe for cross compiling
From: Andreas Schwab @ 2012-06-25 21:43 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Bjørn Mork, Greg Kroah-Hartman, USB list,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, Linux-Next, linux-kbuild,
Linux/m68k
In-Reply-To: <alpine.DEB.2.00.1206252217580.21346-97SZ98TBZzA1xEWliksxXw@public.gmane.org>
Geert Uytterhoeven <geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org> writes:
> Hi Andreas,
>
> On Mon, 25 Jun 2012, Andreas Schwab wrote:
>> --- /dev/null
>> +++ b/scripts/mod/devicetable-offsets.c
>> @@ -0,0 +1,171 @@
>> +#include <linux/kbuild.h>
>> +#include <linux/mod_devicetable.h>
>> +
>> +#define DEVID(devid) DEFINE(SIZE_##devid, sizeof(struct devid))
>> +#define DEVID_FIELD(devid, field) \
>> + DEFINE(OFF_##devid##_##field, offsetof(struct devid, field))
>> +
>> +int main(void)
>> +{
>> + DEVID(usb_device_id);
>> + DEVID_FIELD(usb_device_id, match_flags);
>> + DEVID_FIELD(usb_device_id, idVendor);
>> + DEVID_FIELD(usb_device_id, idProduct);
>> + DEVID_FIELD(usb_device_id, bcdDevice_lo);
>> + DEVID_FIELD(usb_device_id, bcdDevice_hi);
>> + DEVID_FIELD(usb_device_id, bDeviceClass);
>> + DEVID_FIELD(usb_device_id, bDeviceSubClass);
>> + DEVID_FIELD(usb_device_id, bDeviceProtocol);
>> + DEVID_FIELD(usb_device_id, bInterfaceClass);
>> + DEVID_FIELD(usb_device_id, bInterfaceSubClass);
>> + DEVID_FIELD(usb_device_id, bInterfaceProtocol);
>
> These are all duplicates of the structures in <linux/mod_devicetable.h>.
> Can't you get rid of the duplication by putting e.g. the following
> in <linux/mod_devicetable.h>:
>
> DEVID_START(usb_device_id);
> DEVID_FIELD(usb_device_id, __u16, match_flags);
> DEVID_FIELD(usb_device_id, __u16, idVendor);
> DEVID_FIELD(usb_device_id, __u16, idProduct);
> DEVID_FIELD(usb_device_id, __u16, bcdDevice_lo);
> DEVID_FIELD(usb_device_id, __u16, bcdDevice_hi);
> DEVID_FIELD(usb_device_id, __u8, bDeviceClass);
> DEVID_FIELD(usb_device_id, __u8, bDeviceSubClass);
> DEVID_FIELD(usb_device_id, __u8, bDeviceProtocol);
> DEVID_FIELD(usb_device_id, __u8, bInterfaceClass);
> DEVID_FIELD(usb_device_id, __u8, bInterfaceSubClass);
> DEVID_FIELD(usb_device_id, __u8, bInterfaceProtocol);
> DEVID_END();
>
> and redefining the DEVID_*() macros depending on
> 1. __KERNEL__, to generate the C struct definitions for kernel builds,
> 2. first inclusion by devicetable-offsets.c, also to generate C struct
> definitions,
> 3. second inclusion by devicetable-offsets.c, to generate the sizes and
> offset definitions for modalias?
That requires some reorganisation of the struct pnp_card_device_id which
has a somewhat complicated structure (which also accounts for the
ugliest part of the patch).
Andreas.
--
Andreas Schwab, schwab-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* [PATCH -next] av32: Make sure _TIF_BREAKPOINT is defined
From: Geert Uytterhoeven @ 2012-06-25 20:58 UTC (permalink / raw)
To: Al Viro, Haavard Skinnemoen, Hans-Christian Egtvedt
Cc: linux-kernel, linux-next, Geert Uytterhoeven
commit 1deb667af4fc713364fed72ccdf217162b62ec7f ("avr32: trim masks")
replaced "1 << TIF_BREAKPOINT" by "_TIF_BREAKPOINT", but forgot to define
the latter:
arch/avr32/kernel/entry-avr32b.S: Assembler messages:
arch/avr32/kernel/entry-avr32b.S:232: Error: undefined symbol `_TIF_BREAKPOINT' in operation
arch/avr32/kernel/entry-avr32b.S:258: Error: undefined symbol `_TIF_BREAKPOINT' in operation
arch/avr32/kernel/entry-avr32b.S:852: Error: undefined symbol `_TIF_BREAKPOINT' in operation
arch/avr32/kernel/entry-avr32b.S:631: Error: undefined symbol `_TIF_BREAKPOINT' in operation
arch/avr32/kernel/entry-avr32b.S:631: Error: undefined symbol `_TIF_BREAKPOINT' in operation
arch/avr32/kernel/entry-avr32b.S:852: Error: undefined symbol `_TIF_BREAKPOINT' in operation
arch/avr32/kernel/entry-avr32b.S:852: Error: undefined symbol `_TIF_BREAKPOINT' in operation
arch/avr32/kernel/entry-avr32b.S:852: Error: undefined symbol `_TIF_BREAKPOINT' in operation
arch/avr32/kernel/entry-avr32b.S:852: Error: undefined symbol `_TIF_BREAKPOINT' in operation
Add the missing definition to fix this.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
http://kisskb.ellerman.id.au/kisskb/buildresult/6585460/
http://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.2.4/
---
arch/avr32/include/asm/thread_info.h | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/arch/avr32/include/asm/thread_info.h b/arch/avr32/include/asm/thread_info.h
index 2f0c412..6dc62e1 100644
--- a/arch/avr32/include/asm/thread_info.h
+++ b/arch/avr32/include/asm/thread_info.h
@@ -89,6 +89,7 @@ static inline struct thread_info *current_thread_info(void)
#define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE)
#define _TIF_SIGPENDING (1 << TIF_SIGPENDING)
#define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED)
+#define _TIF_BREAKPOINT (1 << TIF_BREAKPOINT)
#define _TIF_SINGLE_STEP (1 << TIF_SINGLE_STEP)
#define _TIF_MEMDIE (1 << TIF_MEMDIE)
#define _TIF_CPU_GOING_TO_SLEEP (1 << TIF_CPU_GOING_TO_SLEEP)
--
1.7.0.4
^ permalink raw reply related
* Re: [PATCH] mod/file2alias: make modalias generation safe for cross compiling
From: Geert Uytterhoeven @ 2012-06-25 20:32 UTC (permalink / raw)
To: Andreas Schwab
Cc: Bjørn Mork, Greg Kroah-Hartman, USB list,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, Linux-Next, linux-kbuild,
Linux/m68k
In-Reply-To: <m2d34n1sz9.fsf_-_-hBGjKatGTSWzQB+pC5nmwQ@public.gmane.org>
Hi Andreas,
On Mon, 25 Jun 2012, Andreas Schwab wrote:
> Use the target compiler to compute the offsets of the fields of the
> device_id structures, so that it won't be broken by different alignments
> between the host and target ABIs.
Thanks, very nice!
> --- a/include/linux/mod_devicetable.h
> +++ b/include/linux/mod_devicetable.h
> @@ -33,8 +33,7 @@ struct ieee1394_device_id {
> __u32 model_id;
> __u32 specifier_id;
> __u32 version;
> - kernel_ulong_t driver_data
> - __attribute__((aligned(sizeof(kernel_ulong_t))));
> + kernel_ulong_t driver_data;
After this, we can also get rid of kernel_ulong_t, but that's a more intruisive
patch all over the place.
> --- /dev/null
> +++ b/scripts/mod/devicetable-offsets.c
> @@ -0,0 +1,171 @@
> +#include <linux/kbuild.h>
> +#include <linux/mod_devicetable.h>
> +
> +#define DEVID(devid) DEFINE(SIZE_##devid, sizeof(struct devid))
> +#define DEVID_FIELD(devid, field) \
> + DEFINE(OFF_##devid##_##field, offsetof(struct devid, field))
> +
> +int main(void)
> +{
> + DEVID(usb_device_id);
> + DEVID_FIELD(usb_device_id, match_flags);
> + DEVID_FIELD(usb_device_id, idVendor);
> + DEVID_FIELD(usb_device_id, idProduct);
> + DEVID_FIELD(usb_device_id, bcdDevice_lo);
> + DEVID_FIELD(usb_device_id, bcdDevice_hi);
> + DEVID_FIELD(usb_device_id, bDeviceClass);
> + DEVID_FIELD(usb_device_id, bDeviceSubClass);
> + DEVID_FIELD(usb_device_id, bDeviceProtocol);
> + DEVID_FIELD(usb_device_id, bInterfaceClass);
> + DEVID_FIELD(usb_device_id, bInterfaceSubClass);
> + DEVID_FIELD(usb_device_id, bInterfaceProtocol);
These are all duplicates of the structures in <linux/mod_devicetable.h>.
Can't you get rid of the duplication by putting e.g. the following
in <linux/mod_devicetable.h>:
DEVID_START(usb_device_id);
DEVID_FIELD(usb_device_id, __u16, match_flags);
DEVID_FIELD(usb_device_id, __u16, idVendor);
DEVID_FIELD(usb_device_id, __u16, idProduct);
DEVID_FIELD(usb_device_id, __u16, bcdDevice_lo);
DEVID_FIELD(usb_device_id, __u16, bcdDevice_hi);
DEVID_FIELD(usb_device_id, __u8, bDeviceClass);
DEVID_FIELD(usb_device_id, __u8, bDeviceSubClass);
DEVID_FIELD(usb_device_id, __u8, bDeviceProtocol);
DEVID_FIELD(usb_device_id, __u8, bInterfaceClass);
DEVID_FIELD(usb_device_id, __u8, bInterfaceSubClass);
DEVID_FIELD(usb_device_id, __u8, bInterfaceProtocol);
DEVID_END();
and redefining the DEVID_*() macros depending on
1. __KERNEL__, to generate the C struct definitions for kernel builds,
2. first inclusion by devicetable-offsets.c, also to generate C struct
definitions,
3. second inclusion by devicetable-offsets.c, to generate the sizes and
offset definitions for modalias?
> --- a/scripts/mod/file2alias.c
> +++ b/scripts/mod/file2alias.c
> @@ -116,7 +129,6 @@ static inline void add_wildcard(char *str)
> strcat(str + len, "*");
> }
>
> -unsigned int cross_build = 0;
> /**
> * Check that sizeof(device_id type) are consistent with size of section
> * in .o file. If in-consistent then userspace and kernel does not agree
> @@ -131,8 +143,6 @@ static void device_id_check(const char *modname, const char *device_id,
> int i;
>
> if (size % id_size || size < id_size) {
> - if (cross_build != 0)
> - return;
> fatal("%s: sizeof(struct %s_device_id)=%lu is not a modulo "
> "of the size of section __mod_%s_device_table=%lu.\n"
> "Fix definition of struct %s_device_id "
Funny, I didn't know there was a check for cross-compiling, supposedly to
ignore the warnings.
And it didn't work, as the problem was noticed originally on the linux-next
build service (which uses cross-compiling), and also showed up for my own
cross-builds.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* nfs root problem in linux-next
From: Mark Salter @ 2012-06-25 20:26 UTC (permalink / raw)
To: Trond.Myklebust-HgOvQuBEEgTQT0dZR+AlfA
Cc: linux-next, linux-nfs-u79uwXL29TY76Z2rM5mHXA
As of Friday's linux-next I've been unable to successfully boot using an
nfs root with a c6x board. I bisected it to this patch:
commit cc3b296fd9a01c9e654bcb9373af70dd6e32fb24
Author: Trond Myklebust <Trond.Myklebust-HgOvQuBEEgTQT0dZR+AlfA@public.gmane.org>
Date: Thu Jun 21 14:53:10 2012 -0400
SUNRPC: Clean up xdr_read_pages and xdr_enter_page
I placed "good-boot" and "bad-boot" packet capture files at:
http://people.redhat.com/~msalter/linux-next/
The only difference in the kernels used is the above patch. The
bad-boot mounted the nfs root but was unable to find the init
file which caused a panic. The nfsroot= parameter uses v3,tcp
flags and the server side is running rhel6.
I'm not at all familiar with the nfs code, but can help with
testing or providing any addtional info needed.
--Mark
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: linux-next: build failure after merge of the akpm tree
From: Kees Cook @ 2012-06-25 16:40 UTC (permalink / raw)
To: Stephen Rothwell
Cc: Andrew Morton, linux-next, linux-kernel, Kees Cook, Al Viro,
Miklos Szeredi
In-Reply-To: <20120625164141.1c5b1b543e0309005dfd0d9c@canb.auug.org.au>
Hi Stephen,
On Mon, Jun 25, 2012 at 04:41:41PM +1000, Stephen Rothwell wrote:
> After merging the akpm tree, today's linux-next build (powerpc
> ppc64_defconfig) failed like this:
>
> fs/namei.c: In function 'path_openat':
> fs/namei.c:2874:4: error: 'filp' undeclared (first use in this function)
>
> Caused by patch "fs: add link restrictions" from the akpm tree
> interacting with (at least) commit 4066cd545681 ("vfs: remove open
> intents from nameidata") from the vfs tree.
>
> I don't know how to fix this, so I have reverted the akpm patch for today
> (in the hope that someone else will fix it).
It looks like namei.c changed the logic of the lookup loop. This should
fix it.
Signed-off-by: Kees Cook <keescook@chromium.org>
---
diff -uNrp a/fs/namei.c b/fs/namei.c
--- a/fs/namei.c 2012-06-25 09:30:28.125746562 -0700
+++ b/fs/namei.c 2012-06-25 09:31:29.456997558 -0700
@@ -2870,10 +2870,8 @@ static struct file *path_openat(int dfd,
break;
}
error = may_follow_link(&link);
- if (unlikely(error)) {
- filp = ERR_PTR(error);
+ if (unlikely(error))
break;
- }
nd->flags |= LOOKUP_PARENT;
nd->flags &= ~(LOOKUP_OPEN|LOOKUP_CREATE|LOOKUP_EXCL);
error = follow_link(&link, nd, &cookie);
--
Kees Cook
Chrome OS Security
^ permalink raw reply
* Re: linux-next: manual merge of the pci tree with Linus' tree
From: Alan Stern @ 2012-06-25 14:14 UTC (permalink / raw)
To: Stephen Rothwell
Cc: Bjorn Helgaas, linux-next, linux-kernel, Greg Kroah-Hartman,
Huang Ying, Zheng Yan
In-Reply-To: <20120625123108.06ef7f883a323df5221edc98@canb.auug.org.au>
On Mon, 25 Jun 2012, Stephen Rothwell wrote:
> Hi Bjorn,
>
> Today's linux-next merge of the pci tree got a conflict in
> drivers/pci/pci.c between commit c2fb8a3fa255 ("USB: add
> NO_D3_DURING_SLEEP flag and revert 151b61284776be2") from Linus' tree and
> commit 448bd857d48e ("PCI/PM: add PCIe runtime D3cold support") from the
> pci tree.
>
> I fixed it up (I think - see below) and can carry the fix as necessary.
> --
> Cheers,
> Stephen Rothwell sfr@canb.auug.org.au
>
> diff --cc drivers/pci/pci.c
> index 77cb54a,3f8b74f..0000000
> --- a/drivers/pci/pci.c
> +++ b/drivers/pci/pci.c
> @@@ -1744,11 -1803,10 +1803,15 @@@ int pci_prepare_to_sleep(struct pci_de
> if (target_state == PCI_POWER_ERROR)
> return -EIO;
>
> + /* D3cold during system suspend/hibernate is not supported */
> + if (target_state > PCI_D3hot)
> + target_state = PCI_D3hot;
> +
> + /* Some devices mustn't be in D3 during system sleep */
> + if (target_state == PCI_D3hot &&
> + (dev->dev_flags & PCI_DEV_FLAGS_NO_D3_DURING_SLEEP))
> + return 0;
> +
> pci_enable_wake(dev, target_state, device_may_wakeup(&dev->dev));
>
> error = pci_set_power_state(dev, target_state);
This looks right to me too.
Alan Stern
^ permalink raw reply
* linux-next : cpuidle - could you add my tree please
From: Daniel Lezcano @ 2012-06-25 13:27 UTC (permalink / raw)
To: Stephen Rothwell
Cc: linux-acpi, linux-pm, Lists Linaro-dev, Linux Kernel Mailing List,
Kevin Hilman, Peter De Schrijver, Amit Kucheria, linux-next,
Colin Cross, Andrew Morton, Linus Torvalds, Rob Lee
In-Reply-To: <4FDF2D58.9010006@ti.com>
Hi Stephen,
we discussed last week to put in place a tree grouping the cpuidle
modifications [1]. Is it possible to add the tree ?
git://git.linaro.org/people/dlezcano/cpuidle-next.git #cpuidle-next
It contains for the moment Colin Cross's cpuidle coupled states.
Thanks in advance
-- Daniel
[1] https://lkml.org/lkml/2012/6/18/113
^ permalink raw reply
* Re: [linux-pm] cpuidle future and improvements
From: Shilimkar, Santosh @ 2012-06-25 13:17 UTC (permalink / raw)
To: Daniel Lezcano
Cc: linux-acpi, linux-pm, Lists Linaro-dev, Linux Kernel Mailing List,
Kevin Hilman, Peter De Schrijver, Amit Kucheria, linux-next,
Colin Cross, Andrew Morton, Linus Torvalds, Rob Lee
In-Reply-To: <4FE86361.3050603@linaro.org>
On Mon, Jun 25, 2012 at 6:40 PM, Daniel Lezcano
<daniel.lezcano@linaro.org> wrote:
> On 06/25/2012 02:58 PM, Shilimkar, Santosh wrote:
>> On Mon, Jun 18, 2012 at 7:00 PM, a0393909 <santosh.shilimkar@ti.com> wrote:
>>> Daniel,
>>>
>>>
>>> On 06/18/2012 02:10 PM, Daniel Lezcano wrote:
>>>>
>>>>
>>>> Dear all,
>>>>
>>>> A few weeks ago, Peter De Schrijver proposed a patch [1] to allow per
>>>> cpu latencies. We had a discussion about this patchset because it
>>>> reverse the modifications Deepthi did some months ago [2] and we may
>>>> want to provide a different implementation.
>>>>
>>>> The Linaro Connect [3] event bring us the opportunity to meet people
>>>> involved in the power management and the cpuidle area for different SoC.
>>>>
>>>> With the Tegra3 and big.LITTLE architecture, making per cpu latencies
>>>> for cpuidle is vital.
>>>>
>>>> Also, the SoC vendors would like to have the ability to tune their cpu
>>>> latencies through the device tree.
>>>>
>>>> We agreed in the following steps:
>>>>
>>>> 1. factor out / cleanup the cpuidle code as much as possible
>>>> 2. better sharing of code amongst SoC idle drivers by moving common bits
>>>> to core code
>>>> 3. make the cpuidle_state structure contain only data
>>>> 4. add a API to register latencies per cpu
>>>>
>>>> These four steps impacts all the architecture. I began the factor out
>>>> code / cleanup [4] and that has been accepted upstream and I proposed
>>>> some modifications [5] but I had a very few answers.
>>>>
>>> Another thing which we discussed is bringing the CPU cluster/package
>>> notion in the core idle code. Couple idle did bring that idea to some
>>> extent but in can be further extended and abstracted. Atm, most of
>>> the work is done in back-end cpuidle drivers which can be easily
>>> abstracted if the "cluster idle" notion is supported in the core layer.
>>>
>> Are you considering the "cluster idle" as one of the topic ?
>
> Yes, absolutely. ATM, I am looking for refactoring the cpuidle code and
> cleanup whenever is possible.
>
Cool !!
regards
Santosh
^ permalink raw reply
* Re: [linux-pm] cpuidle future and improvements
From: Daniel Lezcano @ 2012-06-25 13:10 UTC (permalink / raw)
To: Shilimkar, Santosh
Cc: linux-acpi, linux-pm, Lists Linaro-dev, Linux Kernel Mailing List,
Kevin Hilman, Peter De Schrijver, Amit Kucheria, linux-next,
Colin Cross, Andrew Morton, Linus Torvalds, Rob Lee
In-Reply-To: <CAMQu2gz8aGC1DeOvWNNPaaMD9eJLuiJ5HGoKe98EDtV73_QRTQ@mail.gmail.com>
On 06/25/2012 02:58 PM, Shilimkar, Santosh wrote:
> On Mon, Jun 18, 2012 at 7:00 PM, a0393909 <santosh.shilimkar@ti.com> wrote:
>> Daniel,
>>
>>
>> On 06/18/2012 02:10 PM, Daniel Lezcano wrote:
>>>
>>>
>>> Dear all,
>>>
>>> A few weeks ago, Peter De Schrijver proposed a patch [1] to allow per
>>> cpu latencies. We had a discussion about this patchset because it
>>> reverse the modifications Deepthi did some months ago [2] and we may
>>> want to provide a different implementation.
>>>
>>> The Linaro Connect [3] event bring us the opportunity to meet people
>>> involved in the power management and the cpuidle area for different SoC.
>>>
>>> With the Tegra3 and big.LITTLE architecture, making per cpu latencies
>>> for cpuidle is vital.
>>>
>>> Also, the SoC vendors would like to have the ability to tune their cpu
>>> latencies through the device tree.
>>>
>>> We agreed in the following steps:
>>>
>>> 1. factor out / cleanup the cpuidle code as much as possible
>>> 2. better sharing of code amongst SoC idle drivers by moving common bits
>>> to core code
>>> 3. make the cpuidle_state structure contain only data
>>> 4. add a API to register latencies per cpu
>>>
>>> These four steps impacts all the architecture. I began the factor out
>>> code / cleanup [4] and that has been accepted upstream and I proposed
>>> some modifications [5] but I had a very few answers.
>>>
>> Another thing which we discussed is bringing the CPU cluster/package
>> notion in the core idle code. Couple idle did bring that idea to some
>> extent but in can be further extended and abstracted. Atm, most of
>> the work is done in back-end cpuidle drivers which can be easily
>> abstracted if the "cluster idle" notion is supported in the core layer.
>>
> Are you considering the "cluster idle" as one of the topic ?
Yes, absolutely. ATM, I am looking for refactoring the cpuidle code and
cleanup whenever is possible.
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [linux-pm] cpuidle future and improvements
From: Shilimkar, Santosh @ 2012-06-25 12:58 UTC (permalink / raw)
To: Daniel Lezcano
Cc: linux-acpi, linux-pm, Lists Linaro-dev, Linux Kernel Mailing List,
Kevin Hilman, Peter De Schrijver, Amit Kucheria, linux-next,
Colin Cross, Andrew Morton, Linus Torvalds, Rob Lee
In-Reply-To: <4FDF2D58.9010006@ti.com>
On Mon, Jun 18, 2012 at 7:00 PM, a0393909 <santosh.shilimkar@ti.com> wrote:
> Daniel,
>
>
> On 06/18/2012 02:10 PM, Daniel Lezcano wrote:
>>
>>
>> Dear all,
>>
>> A few weeks ago, Peter De Schrijver proposed a patch [1] to allow per
>> cpu latencies. We had a discussion about this patchset because it
>> reverse the modifications Deepthi did some months ago [2] and we may
>> want to provide a different implementation.
>>
>> The Linaro Connect [3] event bring us the opportunity to meet people
>> involved in the power management and the cpuidle area for different SoC.
>>
>> With the Tegra3 and big.LITTLE architecture, making per cpu latencies
>> for cpuidle is vital.
>>
>> Also, the SoC vendors would like to have the ability to tune their cpu
>> latencies through the device tree.
>>
>> We agreed in the following steps:
>>
>> 1. factor out / cleanup the cpuidle code as much as possible
>> 2. better sharing of code amongst SoC idle drivers by moving common bits
>> to core code
>> 3. make the cpuidle_state structure contain only data
>> 4. add a API to register latencies per cpu
>>
>> These four steps impacts all the architecture. I began the factor out
>> code / cleanup [4] and that has been accepted upstream and I proposed
>> some modifications [5] but I had a very few answers.
>>
> Another thing which we discussed is bringing the CPU cluster/package
> notion in the core idle code. Couple idle did bring that idea to some
> extent but in can be further extended and abstracted. Atm, most of
> the work is done in back-end cpuidle drivers which can be easily
> abstracted if the "cluster idle" notion is supported in the core layer.
>
Are you considering the "cluster idle" as one of the topic ?
Regards
Santosh
^ permalink raw reply
* Re: cpuidle future and improvements
From: Daniel Lezcano @ 2012-06-25 12:54 UTC (permalink / raw)
To: Colin Cross
Cc: linux-acpi, linux-pm, Lists Linaro-dev, Linux Kernel Mailing List,
Amit Kucheria, Deepthi Dharwar, lenb@kernel.org, Andrew Morton,
Linus Torvalds, Peter De Schrijver, Rob Lee, rjw, Kevin Hilman,
linux-next
In-Reply-To: <CAMbhsRQRFXcayyWjM1RirgFppVAK23z2+3EbYOCw-qmzuY9_2g@mail.gmail.com>
On 06/18/2012 08:15 PM, Colin Cross wrote:
> On Mon, Jun 18, 2012 at 1:40 AM, Daniel Lezcano
> <daniel.lezcano@linaro.org> wrote:
>> I propose to host a cpuidle-next tree where all these modifications will
>> be and where people can send patches against, preventing last minutes
>> conflicts and perhaps Lenb will agree to pull from this tree. In the
>> meantime, the tree will be part of the linux-next, the patches will be
>> more widely tested and could be fixed earlier.
>
> My coupled cpuidle patches were acked and temporarily in Len's
> next/Linus pull branch, but were later dropped when the first pull
> request to Linus was rejected. I asked Len to either put the coupled
> cpuidle patches into his next branch, or let me host them so people
> could base SoC branches off of them and let Len pull them later, but
> got no response. If you do start a cpuidle for-next branch, can you
> pull my coupled-cpuidle branch:
>
> The following changes since commit 76e10d158efb6d4516018846f60c2ab5501900bc:
>
> Linux 3.4 (2012-05-20 15:29:13 -0700)
>
> are available in the git repository at:
> https://android.googlesource.com/kernel/common.git coupled-cpuidle
>
> Colin Cross (4):
> cpuidle: refactor out cpuidle_enter_state
> cpuidle: fix error handling in __cpuidle_register_device
> cpuidle: add support for states that affect multiple cpus
> cpuidle: coupled: add parallel barrier function
>
> drivers/cpuidle/Kconfig | 3 +
> drivers/cpuidle/Makefile | 1 +
> drivers/cpuidle/coupled.c | 715 +++++++++++++++++++++++++++++++++++++++++++++
> drivers/cpuidle/cpuidle.c | 68 ++++-
> drivers/cpuidle/cpuidle.h | 32 ++
> include/linux/cpuidle.h | 11 +
> 6 files changed, 813 insertions(+), 17 deletions(-)
> create mode 100644 drivers/cpuidle/coupled.c
Done.
http://git.linaro.org/gitweb?p=people/dlezcano/cpuidle-next.git;a=shortlog;h=refs/heads/cpuidle-next
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
^ permalink raw reply
* [PATCH] mod/file2alias: make modalias generation safe for cross compiling
From: Andreas Schwab @ 2012-06-25 12:22 UTC (permalink / raw)
To: Bjørn Mork
Cc: Greg Kroah-Hartman, Geert Uytterhoeven, USB list, linux-kernel,
Linux-Next, linux-kbuild, Linux/m68k
In-Reply-To: <87fw9urqau.fsf@nemi.mork.no>
Use the target compiler to compute the offsets of the fields of the
device_id structures, so that it won't be broken by different alignments
between the host and target ABIs.
This also fixes missing endian corrections for some modaliases.
Signed-off-by: Andreas Schwab <schwab@linux-m68k.org>
---
This has been tested by cross-compiling a allmodconfig kernel for m68k
and comparing the generated modaliases with the ones generated by a
natively compiled modpost.
include/linux/mod_devicetable.h | 59 +---
scripts/Makefile.modpost | 3 +-
scripts/mod/.gitignore | 1 +
scripts/mod/Makefile | 35 ++
scripts/mod/devicetable-offsets.c | 171 ++++++++++
scripts/mod/file2alias.c | 649 +++++++++++++++++++++-----------------
scripts/mod/modpost.c | 5 +-
7 files changed, 571 insertions(+), 352 deletions(-)
create mode 100644 scripts/mod/devicetable-offsets.c
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h
index 501da4c..81c372b 100644
--- a/include/linux/mod_devicetable.h
+++ b/include/linux/mod_devicetable.h
@@ -33,8 +33,7 @@ struct ieee1394_device_id {
__u32 model_id;
__u32 specifier_id;
__u32 version;
- kernel_ulong_t driver_data
- __attribute__((aligned(sizeof(kernel_ulong_t))));
+ kernel_ulong_t driver_data;
};
@@ -135,11 +134,9 @@ struct usb_device_id {
struct hid_device_id {
__u16 bus;
- __u16 pad1;
__u32 vendor;
__u32 product;
- kernel_ulong_t driver_data
- __attribute__((aligned(sizeof(kernel_ulong_t))));
+ kernel_ulong_t driver_data;
};
/* s390 CCW devices */
@@ -163,8 +160,6 @@ struct ccw_device_id {
struct ap_device_id {
__u16 match_flags; /* which fields to match against */
__u8 dev_type; /* device type */
- __u8 pad1;
- __u32 pad2;
kernel_ulong_t driver_info;
};
@@ -174,13 +169,10 @@ struct ap_device_id {
struct css_device_id {
__u8 match_flags;
__u8 type; /* subchannel type */
- __u16 pad2;
- __u32 pad3;
kernel_ulong_t driver_data;
};
-#define ACPI_ID_LEN 16 /* only 9 bytes needed here, 16 bytes are used */
- /* to workaround crosscompile issues */
+#define ACPI_ID_LEN 9
struct acpi_device_id {
__u8 id[ACPI_ID_LEN];
@@ -221,11 +213,7 @@ struct of_device_id
char name[32];
char type[32];
char compatible[128];
-#ifdef __KERNEL__
void *data;
-#else
- kernel_ulong_t data;
-#endif
};
/* VIO */
@@ -250,24 +238,14 @@ struct pcmcia_device_id {
/* for pseudo multi-function devices */
__u8 device_no;
- __u32 prod_id_hash[4]
- __attribute__((aligned(sizeof(__u32))));
+ __u32 prod_id_hash[4];
/* not matched against in kernelspace*/
-#ifdef __KERNEL__
const char * prod_id[4];
-#else
- kernel_ulong_t prod_id[4]
- __attribute__((aligned(sizeof(kernel_ulong_t))));
-#endif
/* not matched against */
kernel_ulong_t driver_info;
-#ifdef __KERNEL__
char * cisfile;
-#else
- kernel_ulong_t cisfile;
-#endif
};
#define PCMCIA_DEV_ID_MATCH_MANF_ID 0x0001
@@ -363,8 +341,7 @@ struct sdio_device_id {
__u8 class; /* Standard interface or SDIO_ANY_ID */
__u16 vendor; /* Vendor or SDIO_ANY_ID */
__u16 device; /* Device ID or SDIO_ANY_ID */
- kernel_ulong_t driver_data /* Data private to the driver */
- __attribute__((aligned(sizeof(kernel_ulong_t))));
+ kernel_ulong_t driver_data; /* Data private to the driver */
};
/* SSB core, see drivers/ssb/ */
@@ -410,8 +387,7 @@ struct virtio_device_id {
*/
struct hv_vmbus_device_id {
__u8 guid[16];
- kernel_ulong_t driver_data /* Data private to the driver */
- __attribute__((aligned(sizeof(kernel_ulong_t))));
+ kernel_ulong_t driver_data; /* Data private to the driver */
};
/* rpmsg */
@@ -430,8 +406,7 @@ struct rpmsg_device_id {
struct i2c_device_id {
char name[I2C_NAME_SIZE];
- kernel_ulong_t driver_data /* Data private to the driver */
- __attribute__((aligned(sizeof(kernel_ulong_t))));
+ kernel_ulong_t driver_data; /* Data private to the driver */
};
/* spi */
@@ -441,8 +416,7 @@ struct i2c_device_id {
struct spi_device_id {
char name[SPI_NAME_SIZE];
- kernel_ulong_t driver_data /* Data private to the driver */
- __attribute__((aligned(sizeof(kernel_ulong_t))));
+ kernel_ulong_t driver_data; /* Data private to the driver */
};
/* dmi */
@@ -474,15 +448,6 @@ struct dmi_strmatch {
char substr[79];
};
-#ifndef __KERNEL__
-struct dmi_system_id {
- kernel_ulong_t callback;
- kernel_ulong_t ident;
- struct dmi_strmatch matches[4];
- kernel_ulong_t driver_data
- __attribute__((aligned(sizeof(kernel_ulong_t))));
-};
-#else
struct dmi_system_id {
int (*callback)(const struct dmi_system_id *);
const char *ident;
@@ -496,7 +461,6 @@ struct dmi_system_id {
* error: storage size of '__mod_dmi_device_table' isn't known
*/
#define dmi_device_id dmi_system_id
-#endif
#define DMI_MATCH(a, b) { a, b }
@@ -505,8 +469,7 @@ struct dmi_system_id {
struct platform_device_id {
char name[PLATFORM_NAME_SIZE];
- kernel_ulong_t driver_data
- __attribute__((aligned(sizeof(kernel_ulong_t))));
+ kernel_ulong_t driver_data;
};
#define MDIO_MODULE_PREFIX "mdio:"
@@ -562,11 +525,7 @@ struct isapnp_device_id {
struct amba_id {
unsigned int id;
unsigned int mask;
-#ifndef __KERNEL__
- kernel_ulong_t data;
-#else
void *data;
-#endif
};
/*
diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost
index 08dce14..ff22206 100644
--- a/scripts/Makefile.modpost
+++ b/scripts/Makefile.modpost
@@ -80,8 +80,7 @@ modpost = scripts/mod/modpost \
$(if $(KBUILD_EXTRA_SYMBOLS), $(patsubst %, -e %,$(KBUILD_EXTRA_SYMBOLS))) \
$(if $(KBUILD_EXTMOD),-o $(modulesymfile)) \
$(if $(CONFIG_DEBUG_SECTION_MISMATCH),,-S) \
- $(if $(KBUILD_EXTMOD)$(KBUILD_MODPOST_WARN),-w) \
- $(if $(cross_build),-c)
+ $(if $(KBUILD_EXTMOD)$(KBUILD_MODPOST_WARN),-w)
quiet_cmd_modpost = MODPOST $(words $(filter-out vmlinux FORCE, $^)) modules
cmd_modpost = $(modpost) -s
diff --git a/scripts/mod/.gitignore b/scripts/mod/.gitignore
index e9b7abe..33bae0d 100644
--- a/scripts/mod/.gitignore
+++ b/scripts/mod/.gitignore
@@ -1,4 +1,5 @@
elfconfig.h
mk_elfconfig
modpost
+devicetable-offsets.h
diff --git a/scripts/mod/Makefile b/scripts/mod/Makefile
index ff954f8..9415b56 100644
--- a/scripts/mod/Makefile
+++ b/scripts/mod/Makefile
@@ -3,9 +3,44 @@ always := $(hostprogs-y) empty.o
modpost-objs := modpost.o file2alias.o sumversion.o
+devicetable-offsets-file := devicetable-offsets.h
+
+define sed-y
+ "/^->/{s:->#\(.*\):/* \1 */:; \
+ s:^->\([^ ]*\) [\$$#]*\([-0-9]*\) \(.*\):#define \1 \2 /* \3 */:; \
+ s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; \
+ s:->::; p;}"
+endef
+
+quiet_cmd_offsets = GEN $@
+define cmd_offsets
+ (set -e; \
+ echo "#ifndef __DEVICEVTABLE_OFFSETS_H__"; \
+ echo "#define __DEVICEVTABLE_OFFSETS_H__"; \
+ echo "/*"; \
+ echo " * DO NOT MODIFY."; \
+ echo " *"; \
+ echo " * This file was generated by Kbuild"; \
+ echo " *"; \
+ echo " */"; \
+ echo ""; \
+ sed -ne $(sed-y) $<; \
+ echo ""; \
+ echo "#endif" ) > $@
+endef
+
+# We use internal kbuild rules to avoid the "is up to date" message from make
+scripts/mod/devicetable-offsets.s: scripts/mod/devicetable-offsets.c FORCE
+ $(Q)mkdir -p $(dir $@)
+ $(call if_changed_dep,cc_s_c)
+
+$(obj)/$(devicetable-offsets-file): scripts/mod/devicetable-offsets.s
+ $(call cmd,offsets)
+
# dependencies on generated files need to be listed explicitly
$(obj)/modpost.o $(obj)/file2alias.o $(obj)/sumversion.o: $(obj)/elfconfig.h
+$(obj)/file2alias.o: $(obj)/$(devicetable-offsets-file)
quiet_cmd_elfconfig = MKELF $@
cmd_elfconfig = $(obj)/mk_elfconfig < $< > $@
diff --git a/scripts/mod/devicetable-offsets.c b/scripts/mod/devicetable-offsets.c
new file mode 100644
index 0000000..ee482c3
--- /dev/null
+++ b/scripts/mod/devicetable-offsets.c
@@ -0,0 +1,171 @@
+#include <linux/kbuild.h>
+#include <linux/mod_devicetable.h>
+
+#define DEVID(devid) DEFINE(SIZE_##devid, sizeof(struct devid))
+#define DEVID_FIELD(devid, field) \
+ DEFINE(OFF_##devid##_##field, offsetof(struct devid, field))
+
+int main(void)
+{
+ DEVID(usb_device_id);
+ DEVID_FIELD(usb_device_id, match_flags);
+ DEVID_FIELD(usb_device_id, idVendor);
+ DEVID_FIELD(usb_device_id, idProduct);
+ DEVID_FIELD(usb_device_id, bcdDevice_lo);
+ DEVID_FIELD(usb_device_id, bcdDevice_hi);
+ DEVID_FIELD(usb_device_id, bDeviceClass);
+ DEVID_FIELD(usb_device_id, bDeviceSubClass);
+ DEVID_FIELD(usb_device_id, bDeviceProtocol);
+ DEVID_FIELD(usb_device_id, bInterfaceClass);
+ DEVID_FIELD(usb_device_id, bInterfaceSubClass);
+ DEVID_FIELD(usb_device_id, bInterfaceProtocol);
+
+ DEVID(hid_device_id);
+ DEVID_FIELD(hid_device_id, bus);
+ DEVID_FIELD(hid_device_id, vendor);
+ DEVID_FIELD(hid_device_id, product);
+
+ DEVID(ieee1394_device_id);
+ DEVID_FIELD(ieee1394_device_id, match_flags);
+ DEVID_FIELD(ieee1394_device_id, vendor_id);
+ DEVID_FIELD(ieee1394_device_id, model_id);
+ DEVID_FIELD(ieee1394_device_id, specifier_id);
+ DEVID_FIELD(ieee1394_device_id, version);
+
+ DEVID(pci_device_id);
+ DEVID_FIELD(pci_device_id, vendor);
+ DEVID_FIELD(pci_device_id, device);
+ DEVID_FIELD(pci_device_id, subvendor);
+ DEVID_FIELD(pci_device_id, subdevice);
+ DEVID_FIELD(pci_device_id, class);
+ DEVID_FIELD(pci_device_id, class_mask);
+
+ DEVID(ccw_device_id);
+ DEVID_FIELD(ccw_device_id, match_flags);
+ DEVID_FIELD(ccw_device_id, cu_type);
+ DEVID_FIELD(ccw_device_id, cu_model);
+ DEVID_FIELD(ccw_device_id, dev_type);
+ DEVID_FIELD(ccw_device_id, dev_model);
+
+ DEVID(ap_device_id);
+ DEVID_FIELD(ap_device_id, dev_type);
+
+ DEVID(css_device_id);
+ DEVID_FIELD(css_device_id, type);
+
+ DEVID(serio_device_id);
+ DEVID_FIELD(serio_device_id, type);
+ DEVID_FIELD(serio_device_id, proto);
+ DEVID_FIELD(serio_device_id, id);
+ DEVID_FIELD(serio_device_id, extra);
+
+ DEVID(acpi_device_id);
+ DEVID_FIELD(acpi_device_id, id);
+
+ DEVID(pnp_device_id);
+ DEVID_FIELD(pnp_device_id, id);
+
+ DEVID(pnp_card_device_id);
+ DEVID_FIELD(pnp_card_device_id, devs);
+
+ DEVID(pcmcia_device_id);
+ DEVID_FIELD(pcmcia_device_id, match_flags);
+ DEVID_FIELD(pcmcia_device_id, manf_id);
+ DEVID_FIELD(pcmcia_device_id, card_id);
+ DEVID_FIELD(pcmcia_device_id, func_id);
+ DEVID_FIELD(pcmcia_device_id, function);
+ DEVID_FIELD(pcmcia_device_id, device_no);
+ DEVID_FIELD(pcmcia_device_id, prod_id_hash);
+
+ DEVID(of_device_id);
+ DEVID_FIELD(of_device_id, name);
+ DEVID_FIELD(of_device_id, type);
+ DEVID_FIELD(of_device_id, compatible);
+
+ DEVID(vio_device_id);
+ DEVID_FIELD(vio_device_id, type);
+ DEVID_FIELD(vio_device_id, compat);
+
+ DEVID(input_device_id);
+ DEVID_FIELD(input_device_id, flags);
+ DEVID_FIELD(input_device_id, bustype);
+ DEVID_FIELD(input_device_id, vendor);
+ DEVID_FIELD(input_device_id, product);
+ DEVID_FIELD(input_device_id, version);
+ DEVID_FIELD(input_device_id, evbit);
+ DEVID_FIELD(input_device_id, keybit);
+ DEVID_FIELD(input_device_id, relbit);
+ DEVID_FIELD(input_device_id, absbit);
+ DEVID_FIELD(input_device_id, mscbit);
+ DEVID_FIELD(input_device_id, ledbit);
+ DEVID_FIELD(input_device_id, sndbit);
+ DEVID_FIELD(input_device_id, ffbit);
+ DEVID_FIELD(input_device_id, swbit);
+
+ DEVID(eisa_device_id);
+ DEVID_FIELD(eisa_device_id, sig);
+
+ DEVID(parisc_device_id);
+ DEVID_FIELD(parisc_device_id, hw_type);
+ DEVID_FIELD(parisc_device_id, hversion);
+ DEVID_FIELD(parisc_device_id, hversion_rev);
+ DEVID_FIELD(parisc_device_id, sversion);
+
+ DEVID(sdio_device_id);
+ DEVID_FIELD(sdio_device_id, class);
+ DEVID_FIELD(sdio_device_id, vendor);
+ DEVID_FIELD(sdio_device_id, device);
+
+ DEVID(ssb_device_id);
+ DEVID_FIELD(ssb_device_id, vendor);
+ DEVID_FIELD(ssb_device_id, coreid);
+ DEVID_FIELD(ssb_device_id, revision);
+
+ DEVID(bcma_device_id);
+ DEVID_FIELD(bcma_device_id, manuf);
+ DEVID_FIELD(bcma_device_id, id);
+ DEVID_FIELD(bcma_device_id, rev);
+ DEVID_FIELD(bcma_device_id, class);
+
+ DEVID(virtio_device_id);
+ DEVID_FIELD(virtio_device_id, device);
+ DEVID_FIELD(virtio_device_id, vendor);
+
+ DEVID(hv_vmbus_device_id);
+ DEVID_FIELD(hv_vmbus_device_id, guid);
+
+ DEVID(i2c_device_id);
+ DEVID_FIELD(i2c_device_id, name);
+
+ DEVID(spi_device_id);
+ DEVID_FIELD(spi_device_id, name);
+
+ DEVID(dmi_system_id);
+ DEVID_FIELD(dmi_system_id, matches);
+
+ DEVID(platform_device_id);
+ DEVID_FIELD(platform_device_id, name);
+
+ DEVID(mdio_device_id);
+ DEVID_FIELD(mdio_device_id, phy_id);
+ DEVID_FIELD(mdio_device_id, phy_id_mask);
+
+ DEVID(zorro_device_id);
+ DEVID_FIELD(zorro_device_id, id);
+
+ DEVID(isapnp_device_id);
+ DEVID_FIELD(isapnp_device_id, vendor);
+ DEVID_FIELD(isapnp_device_id, function);
+
+ DEVID(amba_id);
+ DEVID_FIELD(amba_id, id);
+ DEVID_FIELD(amba_id, mask);
+
+ DEVID(x86_cpu_id);
+ DEVID_FIELD(x86_cpu_id, feature);
+ DEVID_FIELD(x86_cpu_id, family);
+ DEVID_FIELD(x86_cpu_id, model);
+ DEVID_FIELD(x86_cpu_id, vendor);
+
+ return 0;
+}
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c
index 44ddaa5..d23b325 100644
--- a/scripts/mod/file2alias.c
+++ b/scripts/mod/file2alias.c
@@ -11,6 +11,7 @@
*/
#include "modpost.h"
+#include "devicetable-offsets.h"
/* We use the ELF typedefs for kernel_ulong_t but bite the bullet and
* use either stdint.h or inttypes.h for the rest. */
@@ -84,13 +85,25 @@ extern struct devtable *__start___devtable[], *__stop___devtable[];
# define __used __attribute__((__used__))
#endif
+/* Define a variable f that holds the value of field f of struct devid
+ * based at address m.
+ */
+#define DEF_FIELD(m, devid, f) \
+ typeof(((struct devid *)0)->f) f = TO_NATIVE(*(typeof(f) *)((m) + OFF_##devid##_##f))
+/* Define a variable f that holds the address of field f of struct devid
+ * based at address m. Due to the way typeof works, for a field of type
+ * T[N] the variable has type T(*)[N], _not_ T*.
+ */
+#define DEF_FIELD_ADDR(m, devid, f) \
+ typeof(((struct devid *)0)->f) *f = ((m) + OFF_##devid##_##f)
+
/* Add a table entry. We test function type matches while we're here. */
#define ADD_TO_DEVTABLE(device_id, type, function) \
static struct devtable __cat(devtable,__LINE__) = { \
device_id + 0*sizeof((function)((const char *)NULL, \
- (type *)NULL, \
+ (void *)NULL, \
(char *)NULL)), \
- sizeof(type), (function) }; \
+ SIZE_##type, (function) }; \
static struct devtable *SECTION(__devtable) __used \
__cat(devtable_ptr,__LINE__) = &__cat(devtable,__LINE__)
@@ -116,7 +129,6 @@ static inline void add_wildcard(char *str)
strcat(str + len, "*");
}
-unsigned int cross_build = 0;
/**
* Check that sizeof(device_id type) are consistent with size of section
* in .o file. If in-consistent then userspace and kernel does not agree
@@ -131,8 +143,6 @@ static void device_id_check(const char *modname, const char *device_id,
int i;
if (size % id_size || size < id_size) {
- if (cross_build != 0)
- return;
fatal("%s: sizeof(struct %s_device_id)=%lu is not a modulo "
"of the size of section __mod_%s_device_table=%lu.\n"
"Fix definition of struct %s_device_id "
@@ -157,17 +167,28 @@ static void device_id_check(const char *modname, const char *device_id,
/* USB is special because the bcdDevice can be matched against a numeric range */
/* Looks like "usb:vNpNdNdcNdscNdpNicNiscNipN" */
-static void do_usb_entry(struct usb_device_id *id,
+static void do_usb_entry(void *symval,
unsigned int bcdDevice_initial, int bcdDevice_initial_digits,
unsigned char range_lo, unsigned char range_hi,
unsigned char max, struct module *mod)
{
char alias[500];
+ DEF_FIELD(symval, usb_device_id, match_flags);
+ DEF_FIELD(symval, usb_device_id, idVendor);
+ DEF_FIELD(symval, usb_device_id, idProduct);
+ DEF_FIELD(symval, usb_device_id, bcdDevice_lo);
+ DEF_FIELD(symval, usb_device_id, bDeviceClass);
+ DEF_FIELD(symval, usb_device_id, bDeviceSubClass);
+ DEF_FIELD(symval, usb_device_id, bDeviceProtocol);
+ DEF_FIELD(symval, usb_device_id, bInterfaceClass);
+ DEF_FIELD(symval, usb_device_id, bInterfaceSubClass);
+ DEF_FIELD(symval, usb_device_id, bInterfaceProtocol);
+
strcpy(alias, "usb:");
- ADD(alias, "v", id->match_flags&USB_DEVICE_ID_MATCH_VENDOR,
- id->idVendor);
- ADD(alias, "p", id->match_flags&USB_DEVICE_ID_MATCH_PRODUCT,
- id->idProduct);
+ ADD(alias, "v", match_flags&USB_DEVICE_ID_MATCH_VENDOR,
+ idVendor);
+ ADD(alias, "p", match_flags&USB_DEVICE_ID_MATCH_PRODUCT,
+ idProduct);
strcat(alias, "d");
if (bcdDevice_initial_digits)
@@ -190,26 +211,21 @@ static void do_usb_entry(struct usb_device_id *id,
range_lo);
}
}
- if (bcdDevice_initial_digits < (sizeof(id->bcdDevice_lo) * 2 - 1))
+ if (bcdDevice_initial_digits < (sizeof(bcdDevice_lo) * 2 - 1))
strcat(alias, "*");
- ADD(alias, "dc", id->match_flags&USB_DEVICE_ID_MATCH_DEV_CLASS,
- id->bDeviceClass);
- ADD(alias, "dsc",
- id->match_flags&USB_DEVICE_ID_MATCH_DEV_SUBCLASS,
- id->bDeviceSubClass);
- ADD(alias, "dp",
- id->match_flags&USB_DEVICE_ID_MATCH_DEV_PROTOCOL,
- id->bDeviceProtocol);
- ADD(alias, "ic",
- id->match_flags&USB_DEVICE_ID_MATCH_INT_CLASS,
- id->bInterfaceClass);
- ADD(alias, "isc",
- id->match_flags&USB_DEVICE_ID_MATCH_INT_SUBCLASS,
- id->bInterfaceSubClass);
- ADD(alias, "ip",
- id->match_flags&USB_DEVICE_ID_MATCH_INT_PROTOCOL,
- id->bInterfaceProtocol);
+ ADD(alias, "dc", match_flags&USB_DEVICE_ID_MATCH_DEV_CLASS,
+ bDeviceClass);
+ ADD(alias, "dsc", match_flags&USB_DEVICE_ID_MATCH_DEV_SUBCLASS,
+ bDeviceSubClass);
+ ADD(alias, "dp", match_flags&USB_DEVICE_ID_MATCH_DEV_PROTOCOL,
+ bDeviceProtocol);
+ ADD(alias, "ic", match_flags&USB_DEVICE_ID_MATCH_INT_CLASS,
+ bInterfaceClass);
+ ADD(alias, "isc", match_flags&USB_DEVICE_ID_MATCH_INT_SUBCLASS,
+ bInterfaceSubClass);
+ ADD(alias, "ip", match_flags&USB_DEVICE_ID_MATCH_INT_PROTOCOL,
+ bInterfaceProtocol);
add_wildcard(alias);
buf_printf(&mod->dev_table_buf,
@@ -255,24 +271,28 @@ static unsigned int incbcd(unsigned int *bcd,
return init;
}
-static void do_usb_entry_multi(struct usb_device_id *id, struct module *mod)
+static void do_usb_entry_multi(void *symval, struct module *mod)
{
unsigned int devlo, devhi;
unsigned char chi, clo, max;
int ndigits;
- id->match_flags = TO_NATIVE(id->match_flags);
- id->idVendor = TO_NATIVE(id->idVendor);
- id->idProduct = TO_NATIVE(id->idProduct);
+ DEF_FIELD(symval, usb_device_id, match_flags);
+ DEF_FIELD(symval, usb_device_id, idVendor);
+ DEF_FIELD(symval, usb_device_id, idProduct);
+ DEF_FIELD(symval, usb_device_id, bcdDevice_lo);
+ DEF_FIELD(symval, usb_device_id, bcdDevice_hi);
+ DEF_FIELD(symval, usb_device_id, bDeviceClass);
+ DEF_FIELD(symval, usb_device_id, bInterfaceClass);
- devlo = id->match_flags & USB_DEVICE_ID_MATCH_DEV_LO ?
- TO_NATIVE(id->bcdDevice_lo) : 0x0U;
- devhi = id->match_flags & USB_DEVICE_ID_MATCH_DEV_HI ?
- TO_NATIVE(id->bcdDevice_hi) : ~0x0U;
+ devlo = match_flags & USB_DEVICE_ID_MATCH_DEV_LO ?
+ bcdDevice_lo : 0x0U;
+ devhi = match_flags & USB_DEVICE_ID_MATCH_DEV_HI ?
+ bcdDevice_hi : ~0x0U;
/* Figure out if this entry is in bcd or hex format */
max = 0x9; /* Default to decimal format */
- for (ndigits = 0 ; ndigits < sizeof(id->bcdDevice_lo) * 2 ; ndigits++) {
+ for (ndigits = 0 ; ndigits < sizeof(bcdDevice_lo) * 2 ; ndigits++) {
clo = (devlo >> (ndigits << 2)) & 0xf;
chi = ((devhi > 0x9999 ? 0x9999 : devhi) >> (ndigits << 2)) & 0xf;
if (clo > max || chi > max) {
@@ -285,11 +305,11 @@ static void do_usb_entry_multi(struct usb_device_id *id, struct module *mod)
* Some modules (visor) have empty slots as placeholder for
* run-time specification that results in catch-all alias
*/
- if (!(id->idVendor | id->idProduct | id->bDeviceClass | id->bInterfaceClass))
+ if (!(idVendor | idProduct | bDeviceClass | bInterfaceClass))
return;
/* Convert numeric bcdDevice range into fnmatch-able pattern(s) */
- for (ndigits = sizeof(id->bcdDevice_lo) * 2 - 1; devlo <= devhi; ndigits--) {
+ for (ndigits = sizeof(bcdDevice_lo) * 2 - 1; devlo <= devhi; ndigits--) {
clo = devlo & 0xf;
chi = devhi & 0xf;
if (chi > max) /* If we are in bcd mode, truncate if necessary */
@@ -298,20 +318,20 @@ static void do_usb_entry_multi(struct usb_device_id *id, struct module *mod)
devhi >>= 4;
if (devlo == devhi || !ndigits) {
- do_usb_entry(id, devlo, ndigits, clo, chi, max, mod);
+ do_usb_entry(symval, devlo, ndigits, clo, chi, max, mod);
break;
}
if (clo > 0x0)
- do_usb_entry(id,
+ do_usb_entry(symval,
incbcd(&devlo, 1, max,
- sizeof(id->bcdDevice_lo) * 2),
+ sizeof(bcdDevice_lo) * 2),
ndigits, clo, max, max, mod);
if (chi < max)
- do_usb_entry(id,
+ do_usb_entry(symval,
incbcd(&devhi, -1, max,
- sizeof(id->bcdDevice_lo) * 2),
+ sizeof(bcdDevice_lo) * 2),
ndigits, 0x0, chi, max, mod);
}
}
@@ -320,7 +340,7 @@ static void do_usb_table(void *symval, unsigned long size,
struct module *mod)
{
unsigned int i;
- const unsigned long id_size = sizeof(struct usb_device_id);
+ const unsigned long id_size = SIZE_usb_device_id;
device_id_check(mod->name, "usb", size, id_size, symval);
@@ -333,78 +353,78 @@ static void do_usb_table(void *symval, unsigned long size,
/* Looks like: hid:bNvNpN */
static int do_hid_entry(const char *filename,
- struct hid_device_id *id, char *alias)
+ void *symval, char *alias)
{
- id->bus = TO_NATIVE(id->bus);
- id->vendor = TO_NATIVE(id->vendor);
- id->product = TO_NATIVE(id->product);
+ DEF_FIELD(symval, hid_device_id, bus);
+ DEF_FIELD(symval, hid_device_id, vendor);
+ DEF_FIELD(symval, hid_device_id, product);
- sprintf(alias, "hid:b%04X", id->bus);
- ADD(alias, "v", id->vendor != HID_ANY_ID, id->vendor);
- ADD(alias, "p", id->product != HID_ANY_ID, id->product);
+ sprintf(alias, "hid:b%04X", bus);
+ ADD(alias, "v", vendor != HID_ANY_ID, vendor);
+ ADD(alias, "p", product != HID_ANY_ID, product);
return 1;
}
-ADD_TO_DEVTABLE("hid", struct hid_device_id, do_hid_entry);
+ADD_TO_DEVTABLE("hid", hid_device_id, do_hid_entry);
/* Looks like: ieee1394:venNmoNspNverN */
static int do_ieee1394_entry(const char *filename,
- struct ieee1394_device_id *id, char *alias)
+ void *symval, char *alias)
{
- id->match_flags = TO_NATIVE(id->match_flags);
- id->vendor_id = TO_NATIVE(id->vendor_id);
- id->model_id = TO_NATIVE(id->model_id);
- id->specifier_id = TO_NATIVE(id->specifier_id);
- id->version = TO_NATIVE(id->version);
+ DEF_FIELD(symval, ieee1394_device_id, match_flags);
+ DEF_FIELD(symval, ieee1394_device_id, vendor_id);
+ DEF_FIELD(symval, ieee1394_device_id, model_id);
+ DEF_FIELD(symval, ieee1394_device_id, specifier_id);
+ DEF_FIELD(symval, ieee1394_device_id, version);
strcpy(alias, "ieee1394:");
- ADD(alias, "ven", id->match_flags & IEEE1394_MATCH_VENDOR_ID,
- id->vendor_id);
- ADD(alias, "mo", id->match_flags & IEEE1394_MATCH_MODEL_ID,
- id->model_id);
- ADD(alias, "sp", id->match_flags & IEEE1394_MATCH_SPECIFIER_ID,
- id->specifier_id);
- ADD(alias, "ver", id->match_flags & IEEE1394_MATCH_VERSION,
- id->version);
+ ADD(alias, "ven", match_flags & IEEE1394_MATCH_VENDOR_ID,
+ vendor_id);
+ ADD(alias, "mo", match_flags & IEEE1394_MATCH_MODEL_ID,
+ model_id);
+ ADD(alias, "sp", match_flags & IEEE1394_MATCH_SPECIFIER_ID,
+ specifier_id);
+ ADD(alias, "ver", match_flags & IEEE1394_MATCH_VERSION,
+ version);
add_wildcard(alias);
return 1;
}
-ADD_TO_DEVTABLE("ieee1394", struct ieee1394_device_id, do_ieee1394_entry);
+ADD_TO_DEVTABLE("ieee1394", ieee1394_device_id, do_ieee1394_entry);
/* Looks like: pci:vNdNsvNsdNbcNscNiN. */
static int do_pci_entry(const char *filename,
- struct pci_device_id *id, char *alias)
+ void *symval, char *alias)
{
/* Class field can be divided into these three. */
unsigned char baseclass, subclass, interface,
baseclass_mask, subclass_mask, interface_mask;
- id->vendor = TO_NATIVE(id->vendor);
- id->device = TO_NATIVE(id->device);
- id->subvendor = TO_NATIVE(id->subvendor);
- id->subdevice = TO_NATIVE(id->subdevice);
- id->class = TO_NATIVE(id->class);
- id->class_mask = TO_NATIVE(id->class_mask);
+ DEF_FIELD(symval, pci_device_id, vendor);
+ DEF_FIELD(symval, pci_device_id, device);
+ DEF_FIELD(symval, pci_device_id, subvendor);
+ DEF_FIELD(symval, pci_device_id, subdevice);
+ DEF_FIELD(symval, pci_device_id, class);
+ DEF_FIELD(symval, pci_device_id, class_mask);
strcpy(alias, "pci:");
- ADD(alias, "v", id->vendor != PCI_ANY_ID, id->vendor);
- ADD(alias, "d", id->device != PCI_ANY_ID, id->device);
- ADD(alias, "sv", id->subvendor != PCI_ANY_ID, id->subvendor);
- ADD(alias, "sd", id->subdevice != PCI_ANY_ID, id->subdevice);
-
- baseclass = (id->class) >> 16;
- baseclass_mask = (id->class_mask) >> 16;
- subclass = (id->class) >> 8;
- subclass_mask = (id->class_mask) >> 8;
- interface = id->class;
- interface_mask = id->class_mask;
+ ADD(alias, "v", vendor != PCI_ANY_ID, vendor);
+ ADD(alias, "d", device != PCI_ANY_ID, device);
+ ADD(alias, "sv", subvendor != PCI_ANY_ID, subvendor);
+ ADD(alias, "sd", subdevice != PCI_ANY_ID, subdevice);
+
+ baseclass = (class) >> 16;
+ baseclass_mask = (class_mask) >> 16;
+ subclass = (class) >> 8;
+ subclass_mask = (class_mask) >> 8;
+ interface = class;
+ interface_mask = class_mask;
if ((baseclass_mask != 0 && baseclass_mask != 0xFF)
|| (subclass_mask != 0 && subclass_mask != 0xFF)
|| (interface_mask != 0 && interface_mask != 0xFF)) {
warn("Can't handle masks in %s:%04X\n",
- filename, id->class_mask);
+ filename, class_mask);
return 0;
}
@@ -414,101 +434,105 @@ static int do_pci_entry(const char *filename,
add_wildcard(alias);
return 1;
}
-ADD_TO_DEVTABLE("pci", struct pci_device_id, do_pci_entry);
+ADD_TO_DEVTABLE("pci", pci_device_id, do_pci_entry);
/* looks like: "ccw:tNmNdtNdmN" */
static int do_ccw_entry(const char *filename,
- struct ccw_device_id *id, char *alias)
+ void *symval, char *alias)
{
- id->match_flags = TO_NATIVE(id->match_flags);
- id->cu_type = TO_NATIVE(id->cu_type);
- id->cu_model = TO_NATIVE(id->cu_model);
- id->dev_type = TO_NATIVE(id->dev_type);
- id->dev_model = TO_NATIVE(id->dev_model);
+ DEF_FIELD(symval, ccw_device_id, match_flags);
+ DEF_FIELD(symval, ccw_device_id, cu_type);
+ DEF_FIELD(symval, ccw_device_id, cu_model);
+ DEF_FIELD(symval, ccw_device_id, dev_type);
+ DEF_FIELD(symval, ccw_device_id, dev_model);
strcpy(alias, "ccw:");
- ADD(alias, "t", id->match_flags&CCW_DEVICE_ID_MATCH_CU_TYPE,
- id->cu_type);
- ADD(alias, "m", id->match_flags&CCW_DEVICE_ID_MATCH_CU_MODEL,
- id->cu_model);
- ADD(alias, "dt", id->match_flags&CCW_DEVICE_ID_MATCH_DEVICE_TYPE,
- id->dev_type);
- ADD(alias, "dm", id->match_flags&CCW_DEVICE_ID_MATCH_DEVICE_MODEL,
- id->dev_model);
+ ADD(alias, "t", match_flags&CCW_DEVICE_ID_MATCH_CU_TYPE,
+ cu_type);
+ ADD(alias, "m", match_flags&CCW_DEVICE_ID_MATCH_CU_MODEL,
+ cu_model);
+ ADD(alias, "dt", match_flags&CCW_DEVICE_ID_MATCH_DEVICE_TYPE,
+ dev_type);
+ ADD(alias, "dm", match_flags&CCW_DEVICE_ID_MATCH_DEVICE_MODEL,
+ dev_model);
add_wildcard(alias);
return 1;
}
-ADD_TO_DEVTABLE("ccw", struct ccw_device_id, do_ccw_entry);
+ADD_TO_DEVTABLE("ccw", ccw_device_id, do_ccw_entry);
/* looks like: "ap:tN" */
static int do_ap_entry(const char *filename,
- struct ap_device_id *id, char *alias)
+ void *symval, char *alias)
{
- sprintf(alias, "ap:t%02X*", id->dev_type);
+ DEF_FIELD(symval, ap_device_id, dev_type);
+
+ sprintf(alias, "ap:t%02X*", dev_type);
return 1;
}
-ADD_TO_DEVTABLE("ap", struct ap_device_id, do_ap_entry);
+ADD_TO_DEVTABLE("ap", ap_device_id, do_ap_entry);
/* looks like: "css:tN" */
static int do_css_entry(const char *filename,
- struct css_device_id *id, char *alias)
+ void *symval, char *alias)
{
- sprintf(alias, "css:t%01X", id->type);
+ DEF_FIELD(symval, css_device_id, type);
+
+ sprintf(alias, "css:t%01X", type);
return 1;
}
-ADD_TO_DEVTABLE("css", struct css_device_id, do_css_entry);
+ADD_TO_DEVTABLE("css", css_device_id, do_css_entry);
/* Looks like: "serio:tyNprNidNexN" */
static int do_serio_entry(const char *filename,
- struct serio_device_id *id, char *alias)
+ void *symval, char *alias)
{
- id->type = TO_NATIVE(id->type);
- id->proto = TO_NATIVE(id->proto);
- id->id = TO_NATIVE(id->id);
- id->extra = TO_NATIVE(id->extra);
+ DEF_FIELD(symval, serio_device_id, type);
+ DEF_FIELD(symval, serio_device_id, proto);
+ DEF_FIELD(symval, serio_device_id, id);
+ DEF_FIELD(symval, serio_device_id, extra);
strcpy(alias, "serio:");
- ADD(alias, "ty", id->type != SERIO_ANY, id->type);
- ADD(alias, "pr", id->proto != SERIO_ANY, id->proto);
- ADD(alias, "id", id->id != SERIO_ANY, id->id);
- ADD(alias, "ex", id->extra != SERIO_ANY, id->extra);
+ ADD(alias, "ty", type != SERIO_ANY, type);
+ ADD(alias, "pr", proto != SERIO_ANY, proto);
+ ADD(alias, "id", id != SERIO_ANY, id);
+ ADD(alias, "ex", extra != SERIO_ANY, extra);
add_wildcard(alias);
return 1;
}
-ADD_TO_DEVTABLE("serio", struct serio_device_id, do_serio_entry);
+ADD_TO_DEVTABLE("serio", serio_device_id, do_serio_entry);
/* looks like: "acpi:ACPI0003 or acpi:PNP0C0B" or "acpi:LNXVIDEO" */
static int do_acpi_entry(const char *filename,
- struct acpi_device_id *id, char *alias)
+ void *symval, char *alias)
{
- sprintf(alias, "acpi*:%s:*", id->id);
+ DEF_FIELD_ADDR(symval, acpi_device_id, id);
+ sprintf(alias, "acpi*:%s:*", *id);
return 1;
}
-ADD_TO_DEVTABLE("acpi", struct acpi_device_id, do_acpi_entry);
+ADD_TO_DEVTABLE("acpi", acpi_device_id, do_acpi_entry);
/* looks like: "pnp:dD" */
static void do_pnp_device_entry(void *symval, unsigned long size,
struct module *mod)
{
- const unsigned long id_size = sizeof(struct pnp_device_id);
+ const unsigned long id_size = SIZE_pnp_device_id;
const unsigned int count = (size / id_size)-1;
- const struct pnp_device_id *devs = symval;
unsigned int i;
device_id_check(mod->name, "pnp", size, id_size, symval);
for (i = 0; i < count; i++) {
- const char *id = (char *)devs[i].id;
- char acpi_id[sizeof(devs[0].id)];
+ DEF_FIELD_ADDR(symval + i*id_size, pnp_device_id, id);
+ char acpi_id[sizeof(*id)];
int j;
buf_printf(&mod->dev_table_buf,
- "MODULE_ALIAS(\"pnp:d%s*\");\n", id);
+ "MODULE_ALIAS(\"pnp:d%s*\");\n", *id);
/* fix broken pnp bus lowercasing */
for (j = 0; j < sizeof(acpi_id); j++)
- acpi_id[j] = toupper(id[j]);
+ acpi_id[j] = toupper((*id)[j]);
buf_printf(&mod->dev_table_buf,
"MODULE_ALIAS(\"acpi*:%s:*\");\n", acpi_id);
}
@@ -518,19 +542,18 @@ static void do_pnp_device_entry(void *symval, unsigned long size,
static void do_pnp_card_entries(void *symval, unsigned long size,
struct module *mod)
{
- const unsigned long id_size = sizeof(struct pnp_card_device_id);
+ const unsigned long id_size = SIZE_pnp_card_device_id;
const unsigned int count = (size / id_size)-1;
- const struct pnp_card_device_id *cards = symval;
unsigned int i;
device_id_check(mod->name, "pnp", size, id_size, symval);
for (i = 0; i < count; i++) {
unsigned int j;
- const struct pnp_card_device_id *card = &cards[i];
+ DEF_FIELD_ADDR(symval + i*id_size, pnp_card_device_id, devs);
for (j = 0; j < PNP_MAX_DEVICES; j++) {
- const char *id = (char *)card->devs[j].id;
+ const char *id = (char *)(*devs)[j].id;
int i2, j2;
int dup = 0;
@@ -539,10 +562,10 @@ static void do_pnp_card_entries(void *symval, unsigned long size,
/* find duplicate, already added value */
for (i2 = 0; i2 < i && !dup; i2++) {
- const struct pnp_card_device_id *card2 = &cards[i2];
+ DEF_FIELD_ADDR(symval + i2*id_size, pnp_card_device_id, devs);
for (j2 = 0; j2 < PNP_MAX_DEVICES; j2++) {
- const char *id2 = (char *)card2->devs[j2].id;
+ const char *id2 = (char *)(*devs)[j2].id;
if (!id2[0])
break;
@@ -556,7 +579,7 @@ static void do_pnp_card_entries(void *symval, unsigned long size,
/* add an individual alias for every device entry */
if (!dup) {
- char acpi_id[sizeof(card->devs[0].id)];
+ char acpi_id[PNP_ID_LEN];
int k;
buf_printf(&mod->dev_table_buf,
@@ -574,54 +597,58 @@ static void do_pnp_card_entries(void *symval, unsigned long size,
/* Looks like: pcmcia:mNcNfNfnNpfnNvaNvbNvcNvdN. */
static int do_pcmcia_entry(const char *filename,
- struct pcmcia_device_id *id, char *alias)
+ void *symval, char *alias)
{
unsigned int i;
-
- id->match_flags = TO_NATIVE(id->match_flags);
- id->manf_id = TO_NATIVE(id->manf_id);
- id->card_id = TO_NATIVE(id->card_id);
- id->func_id = TO_NATIVE(id->func_id);
- id->function = TO_NATIVE(id->function);
- id->device_no = TO_NATIVE(id->device_no);
+ DEF_FIELD(symval, pcmcia_device_id, match_flags);
+ DEF_FIELD(symval, pcmcia_device_id, manf_id);
+ DEF_FIELD(symval, pcmcia_device_id, card_id);
+ DEF_FIELD(symval, pcmcia_device_id, func_id);
+ DEF_FIELD(symval, pcmcia_device_id, function);
+ DEF_FIELD(symval, pcmcia_device_id, device_no);
+ DEF_FIELD_ADDR(symval, pcmcia_device_id, prod_id_hash);
for (i=0; i<4; i++) {
- id->prod_id_hash[i] = TO_NATIVE(id->prod_id_hash[i]);
- }
-
- strcpy(alias, "pcmcia:");
- ADD(alias, "m", id->match_flags & PCMCIA_DEV_ID_MATCH_MANF_ID,
- id->manf_id);
- ADD(alias, "c", id->match_flags & PCMCIA_DEV_ID_MATCH_CARD_ID,
- id->card_id);
- ADD(alias, "f", id->match_flags & PCMCIA_DEV_ID_MATCH_FUNC_ID,
- id->func_id);
- ADD(alias, "fn", id->match_flags & PCMCIA_DEV_ID_MATCH_FUNCTION,
- id->function);
- ADD(alias, "pfn", id->match_flags & PCMCIA_DEV_ID_MATCH_DEVICE_NO,
- id->device_no);
- ADD(alias, "pa", id->match_flags & PCMCIA_DEV_ID_MATCH_PROD_ID1, id->prod_id_hash[0]);
- ADD(alias, "pb", id->match_flags & PCMCIA_DEV_ID_MATCH_PROD_ID2, id->prod_id_hash[1]);
- ADD(alias, "pc", id->match_flags & PCMCIA_DEV_ID_MATCH_PROD_ID3, id->prod_id_hash[2]);
- ADD(alias, "pd", id->match_flags & PCMCIA_DEV_ID_MATCH_PROD_ID4, id->prod_id_hash[3]);
+ (*prod_id_hash)[i] = TO_NATIVE((*prod_id_hash)[i]);
+ }
+
+ strcpy(alias, "pcmcia:");
+ ADD(alias, "m", match_flags & PCMCIA_DEV_ID_MATCH_MANF_ID,
+ manf_id);
+ ADD(alias, "c", match_flags & PCMCIA_DEV_ID_MATCH_CARD_ID,
+ card_id);
+ ADD(alias, "f", match_flags & PCMCIA_DEV_ID_MATCH_FUNC_ID,
+ func_id);
+ ADD(alias, "fn", match_flags & PCMCIA_DEV_ID_MATCH_FUNCTION,
+ function);
+ ADD(alias, "pfn", match_flags & PCMCIA_DEV_ID_MATCH_DEVICE_NO,
+ device_no);
+ ADD(alias, "pa", match_flags & PCMCIA_DEV_ID_MATCH_PROD_ID1, (*prod_id_hash)[0]);
+ ADD(alias, "pb", match_flags & PCMCIA_DEV_ID_MATCH_PROD_ID2, (*prod_id_hash)[1]);
+ ADD(alias, "pc", match_flags & PCMCIA_DEV_ID_MATCH_PROD_ID3, (*prod_id_hash)[2]);
+ ADD(alias, "pd", match_flags & PCMCIA_DEV_ID_MATCH_PROD_ID4, (*prod_id_hash)[3]);
add_wildcard(alias);
- return 1;
+ return 1;
}
-ADD_TO_DEVTABLE("pcmcia", struct pcmcia_device_id, do_pcmcia_entry);
+ADD_TO_DEVTABLE("pcmcia", pcmcia_device_id, do_pcmcia_entry);
-static int do_of_entry (const char *filename, struct of_device_id *of, char *alias)
+static int do_of_entry (const char *filename, void *symval, char *alias)
{
int len;
char *tmp;
+ DEF_FIELD_ADDR(symval, of_device_id, name);
+ DEF_FIELD_ADDR(symval, of_device_id, type);
+ DEF_FIELD_ADDR(symval, of_device_id, compatible);
+
len = sprintf (alias, "of:N%sT%s",
- of->name[0] ? of->name : "*",
- of->type[0] ? of->type : "*");
+ (*name)[0] ? *name : "*",
+ (*type)[0] ? *type : "*");
- if (of->compatible[0])
+ if (compatible[0])
sprintf (&alias[len], "%sC%s",
- of->type[0] ? "*" : "",
- of->compatible);
+ (*type)[0] ? "*" : "",
+ *compatible);
/* Replace all whitespace with underscores */
for (tmp = alias; tmp && *tmp; tmp++)
@@ -631,15 +658,17 @@ static int do_of_entry (const char *filename, struct of_device_id *of, char *ali
add_wildcard(alias);
return 1;
}
-ADD_TO_DEVTABLE("of", struct of_device_id, do_of_entry);
+ADD_TO_DEVTABLE("of", of_device_id, do_of_entry);
-static int do_vio_entry(const char *filename, struct vio_device_id *vio,
+static int do_vio_entry(const char *filename, void *symval,
char *alias)
{
char *tmp;
+ DEF_FIELD_ADDR(symval, vio_device_id, type);
+ DEF_FIELD_ADDR(symval, vio_device_id, compat);
- sprintf(alias, "vio:T%sS%s", vio->type[0] ? vio->type : "*",
- vio->compat[0] ? vio->compat : "*");
+ sprintf(alias, "vio:T%sS%s", (*type)[0] ? *type : "*",
+ (*compat)[0] ? *compat : "*");
/* Replace all whitespace with underscores */
for (tmp = alias; tmp && *tmp; tmp++)
@@ -649,7 +678,7 @@ static int do_vio_entry(const char *filename, struct vio_device_id *vio,
add_wildcard(alias);
return 1;
}
-ADD_TO_DEVTABLE("vio", struct vio_device_id, do_vio_entry);
+ADD_TO_DEVTABLE("vio", vio_device_id, do_vio_entry);
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
@@ -658,154 +687,172 @@ static void do_input(char *alias,
{
unsigned int i;
+ for (i = min / BITS_PER_LONG; i < max / BITS_PER_LONG + 1; i++)
+ arr[i] = TO_NATIVE(arr[i]);
for (i = min; i < max; i++)
if (arr[i / BITS_PER_LONG] & (1L << (i%BITS_PER_LONG)))
sprintf(alias + strlen(alias), "%X,*", i);
}
/* input:b0v0p0e0-eXkXrXaXmXlXsXfXwX where X is comma-separated %02X. */
-static int do_input_entry(const char *filename, struct input_device_id *id,
+static int do_input_entry(const char *filename, void *symval,
char *alias)
{
+ DEF_FIELD(symval, input_device_id, flags);
+ DEF_FIELD(symval, input_device_id, bustype);
+ DEF_FIELD(symval, input_device_id, vendor);
+ DEF_FIELD(symval, input_device_id, product);
+ DEF_FIELD(symval, input_device_id, version);
+ DEF_FIELD_ADDR(symval, input_device_id, evbit);
+ DEF_FIELD_ADDR(symval, input_device_id, keybit);
+ DEF_FIELD_ADDR(symval, input_device_id, relbit);
+ DEF_FIELD_ADDR(symval, input_device_id, absbit);
+ DEF_FIELD_ADDR(symval, input_device_id, mscbit);
+ DEF_FIELD_ADDR(symval, input_device_id, ledbit);
+ DEF_FIELD_ADDR(symval, input_device_id, sndbit);
+ DEF_FIELD_ADDR(symval, input_device_id, ffbit);
+ DEF_FIELD_ADDR(symval, input_device_id, swbit);
+
sprintf(alias, "input:");
- ADD(alias, "b", id->flags & INPUT_DEVICE_ID_MATCH_BUS, id->bustype);
- ADD(alias, "v", id->flags & INPUT_DEVICE_ID_MATCH_VENDOR, id->vendor);
- ADD(alias, "p", id->flags & INPUT_DEVICE_ID_MATCH_PRODUCT, id->product);
- ADD(alias, "e", id->flags & INPUT_DEVICE_ID_MATCH_VERSION, id->version);
+ ADD(alias, "b", flags & INPUT_DEVICE_ID_MATCH_BUS, bustype);
+ ADD(alias, "v", flags & INPUT_DEVICE_ID_MATCH_VENDOR, vendor);
+ ADD(alias, "p", flags & INPUT_DEVICE_ID_MATCH_PRODUCT, product);
+ ADD(alias, "e", flags & INPUT_DEVICE_ID_MATCH_VERSION, version);
sprintf(alias + strlen(alias), "-e*");
- if (id->flags & INPUT_DEVICE_ID_MATCH_EVBIT)
- do_input(alias, id->evbit, 0, INPUT_DEVICE_ID_EV_MAX);
+ if (flags & INPUT_DEVICE_ID_MATCH_EVBIT)
+ do_input(alias, *evbit, 0, INPUT_DEVICE_ID_EV_MAX);
sprintf(alias + strlen(alias), "k*");
- if (id->flags & INPUT_DEVICE_ID_MATCH_KEYBIT)
- do_input(alias, id->keybit,
+ if (flags & INPUT_DEVICE_ID_MATCH_KEYBIT)
+ do_input(alias, *keybit,
INPUT_DEVICE_ID_KEY_MIN_INTERESTING,
INPUT_DEVICE_ID_KEY_MAX);
sprintf(alias + strlen(alias), "r*");
- if (id->flags & INPUT_DEVICE_ID_MATCH_RELBIT)
- do_input(alias, id->relbit, 0, INPUT_DEVICE_ID_REL_MAX);
+ if (flags & INPUT_DEVICE_ID_MATCH_RELBIT)
+ do_input(alias, *relbit, 0, INPUT_DEVICE_ID_REL_MAX);
sprintf(alias + strlen(alias), "a*");
- if (id->flags & INPUT_DEVICE_ID_MATCH_ABSBIT)
- do_input(alias, id->absbit, 0, INPUT_DEVICE_ID_ABS_MAX);
+ if (flags & INPUT_DEVICE_ID_MATCH_ABSBIT)
+ do_input(alias, *absbit, 0, INPUT_DEVICE_ID_ABS_MAX);
sprintf(alias + strlen(alias), "m*");
- if (id->flags & INPUT_DEVICE_ID_MATCH_MSCIT)
- do_input(alias, id->mscbit, 0, INPUT_DEVICE_ID_MSC_MAX);
+ if (flags & INPUT_DEVICE_ID_MATCH_MSCIT)
+ do_input(alias, *mscbit, 0, INPUT_DEVICE_ID_MSC_MAX);
sprintf(alias + strlen(alias), "l*");
- if (id->flags & INPUT_DEVICE_ID_MATCH_LEDBIT)
- do_input(alias, id->ledbit, 0, INPUT_DEVICE_ID_LED_MAX);
+ if (flags & INPUT_DEVICE_ID_MATCH_LEDBIT)
+ do_input(alias, *ledbit, 0, INPUT_DEVICE_ID_LED_MAX);
sprintf(alias + strlen(alias), "s*");
- if (id->flags & INPUT_DEVICE_ID_MATCH_SNDBIT)
- do_input(alias, id->sndbit, 0, INPUT_DEVICE_ID_SND_MAX);
+ if (flags & INPUT_DEVICE_ID_MATCH_SNDBIT)
+ do_input(alias, *sndbit, 0, INPUT_DEVICE_ID_SND_MAX);
sprintf(alias + strlen(alias), "f*");
- if (id->flags & INPUT_DEVICE_ID_MATCH_FFBIT)
- do_input(alias, id->ffbit, 0, INPUT_DEVICE_ID_FF_MAX);
+ if (flags & INPUT_DEVICE_ID_MATCH_FFBIT)
+ do_input(alias, *ffbit, 0, INPUT_DEVICE_ID_FF_MAX);
sprintf(alias + strlen(alias), "w*");
- if (id->flags & INPUT_DEVICE_ID_MATCH_SWBIT)
- do_input(alias, id->swbit, 0, INPUT_DEVICE_ID_SW_MAX);
+ if (flags & INPUT_DEVICE_ID_MATCH_SWBIT)
+ do_input(alias, *swbit, 0, INPUT_DEVICE_ID_SW_MAX);
return 1;
}
-ADD_TO_DEVTABLE("input", struct input_device_id, do_input_entry);
+ADD_TO_DEVTABLE("input", input_device_id, do_input_entry);
-static int do_eisa_entry(const char *filename, struct eisa_device_id *eisa,
+static int do_eisa_entry(const char *filename, void *symval,
char *alias)
{
- if (eisa->sig[0])
- sprintf(alias, EISA_DEVICE_MODALIAS_FMT "*", eisa->sig);
+ DEF_FIELD_ADDR(symval, eisa_device_id, sig);
+ if (sig[0])
+ sprintf(alias, EISA_DEVICE_MODALIAS_FMT "*", *sig);
else
strcat(alias, "*");
return 1;
}
-ADD_TO_DEVTABLE("eisa", struct eisa_device_id, do_eisa_entry);
+ADD_TO_DEVTABLE("eisa", eisa_device_id, do_eisa_entry);
/* Looks like: parisc:tNhvNrevNsvN */
-static int do_parisc_entry(const char *filename, struct parisc_device_id *id,
+static int do_parisc_entry(const char *filename, void *symval,
char *alias)
{
- id->hw_type = TO_NATIVE(id->hw_type);
- id->hversion = TO_NATIVE(id->hversion);
- id->hversion_rev = TO_NATIVE(id->hversion_rev);
- id->sversion = TO_NATIVE(id->sversion);
+ DEF_FIELD(symval, parisc_device_id, hw_type);
+ DEF_FIELD(symval, parisc_device_id, hversion);
+ DEF_FIELD(symval, parisc_device_id, hversion_rev);
+ DEF_FIELD(symval, parisc_device_id, sversion);
strcpy(alias, "parisc:");
- ADD(alias, "t", id->hw_type != PA_HWTYPE_ANY_ID, id->hw_type);
- ADD(alias, "hv", id->hversion != PA_HVERSION_ANY_ID, id->hversion);
- ADD(alias, "rev", id->hversion_rev != PA_HVERSION_REV_ANY_ID, id->hversion_rev);
- ADD(alias, "sv", id->sversion != PA_SVERSION_ANY_ID, id->sversion);
+ ADD(alias, "t", hw_type != PA_HWTYPE_ANY_ID, hw_type);
+ ADD(alias, "hv", hversion != PA_HVERSION_ANY_ID, hversion);
+ ADD(alias, "rev", hversion_rev != PA_HVERSION_REV_ANY_ID, hversion_rev);
+ ADD(alias, "sv", sversion != PA_SVERSION_ANY_ID, sversion);
add_wildcard(alias);
return 1;
}
-ADD_TO_DEVTABLE("parisc", struct parisc_device_id, do_parisc_entry);
+ADD_TO_DEVTABLE("parisc", parisc_device_id, do_parisc_entry);
/* Looks like: sdio:cNvNdN. */
static int do_sdio_entry(const char *filename,
- struct sdio_device_id *id, char *alias)
+ void *symval, char *alias)
{
- id->class = TO_NATIVE(id->class);
- id->vendor = TO_NATIVE(id->vendor);
- id->device = TO_NATIVE(id->device);
+ DEF_FIELD(symval, sdio_device_id, class);
+ DEF_FIELD(symval, sdio_device_id, vendor);
+ DEF_FIELD(symval, sdio_device_id, device);
strcpy(alias, "sdio:");
- ADD(alias, "c", id->class != (__u8)SDIO_ANY_ID, id->class);
- ADD(alias, "v", id->vendor != (__u16)SDIO_ANY_ID, id->vendor);
- ADD(alias, "d", id->device != (__u16)SDIO_ANY_ID, id->device);
+ ADD(alias, "c", class != (__u8)SDIO_ANY_ID, class);
+ ADD(alias, "v", vendor != (__u16)SDIO_ANY_ID, vendor);
+ ADD(alias, "d", device != (__u16)SDIO_ANY_ID, device);
add_wildcard(alias);
return 1;
}
-ADD_TO_DEVTABLE("sdio", struct sdio_device_id, do_sdio_entry);
+ADD_TO_DEVTABLE("sdio", sdio_device_id, do_sdio_entry);
/* Looks like: ssb:vNidNrevN. */
static int do_ssb_entry(const char *filename,
- struct ssb_device_id *id, char *alias)
+ void *symval, char *alias)
{
- id->vendor = TO_NATIVE(id->vendor);
- id->coreid = TO_NATIVE(id->coreid);
- id->revision = TO_NATIVE(id->revision);
+ DEF_FIELD(symval, ssb_device_id, vendor);
+ DEF_FIELD(symval, ssb_device_id, coreid);
+ DEF_FIELD(symval, ssb_device_id, revision);
strcpy(alias, "ssb:");
- ADD(alias, "v", id->vendor != SSB_ANY_VENDOR, id->vendor);
- ADD(alias, "id", id->coreid != SSB_ANY_ID, id->coreid);
- ADD(alias, "rev", id->revision != SSB_ANY_REV, id->revision);
+ ADD(alias, "v", vendor != SSB_ANY_VENDOR, vendor);
+ ADD(alias, "id", coreid != SSB_ANY_ID, coreid);
+ ADD(alias, "rev", revision != SSB_ANY_REV, revision);
add_wildcard(alias);
return 1;
}
-ADD_TO_DEVTABLE("ssb", struct ssb_device_id, do_ssb_entry);
+ADD_TO_DEVTABLE("ssb", ssb_device_id, do_ssb_entry);
/* Looks like: bcma:mNidNrevNclN. */
static int do_bcma_entry(const char *filename,
- struct bcma_device_id *id, char *alias)
+ void *symval, char *alias)
{
- id->manuf = TO_NATIVE(id->manuf);
- id->id = TO_NATIVE(id->id);
- id->rev = TO_NATIVE(id->rev);
- id->class = TO_NATIVE(id->class);
+ DEF_FIELD(symval, bcma_device_id, manuf);
+ DEF_FIELD(symval, bcma_device_id, id);
+ DEF_FIELD(symval, bcma_device_id, rev);
+ DEF_FIELD(symval, bcma_device_id, class);
strcpy(alias, "bcma:");
- ADD(alias, "m", id->manuf != BCMA_ANY_MANUF, id->manuf);
- ADD(alias, "id", id->id != BCMA_ANY_ID, id->id);
- ADD(alias, "rev", id->rev != BCMA_ANY_REV, id->rev);
- ADD(alias, "cl", id->class != BCMA_ANY_CLASS, id->class);
+ ADD(alias, "m", manuf != BCMA_ANY_MANUF, manuf);
+ ADD(alias, "id", id != BCMA_ANY_ID, id);
+ ADD(alias, "rev", rev != BCMA_ANY_REV, rev);
+ ADD(alias, "cl", class != BCMA_ANY_CLASS, class);
add_wildcard(alias);
return 1;
}
-ADD_TO_DEVTABLE("bcma", struct bcma_device_id, do_bcma_entry);
+ADD_TO_DEVTABLE("bcma", bcma_device_id, do_bcma_entry);
/* Looks like: virtio:dNvN */
-static int do_virtio_entry(const char *filename, struct virtio_device_id *id,
+static int do_virtio_entry(const char *filename, void *symval,
char *alias)
{
- id->device = TO_NATIVE(id->device);
- id->vendor = TO_NATIVE(id->vendor);
+ DEF_FIELD(symval, virtio_device_id, device);
+ DEF_FIELD(symval, virtio_device_id, vendor);
strcpy(alias, "virtio:");
- ADD(alias, "d", id->device != VIRTIO_DEV_ANY_ID, id->device);
- ADD(alias, "v", id->vendor != VIRTIO_DEV_ANY_ID, id->vendor);
+ ADD(alias, "d", device != VIRTIO_DEV_ANY_ID, device);
+ ADD(alias, "v", vendor != VIRTIO_DEV_ANY_ID, vendor);
add_wildcard(alias);
return 1;
}
-ADD_TO_DEVTABLE("virtio", struct virtio_device_id, do_virtio_entry);
+ADD_TO_DEVTABLE("virtio", virtio_device_id, do_virtio_entry);
/*
* Looks like: vmbus:guid
@@ -813,41 +860,44 @@ ADD_TO_DEVTABLE("virtio", struct virtio_device_id, do_virtio_entry);
* in the name.
*/
-static int do_vmbus_entry(const char *filename, struct hv_vmbus_device_id *id,
+static int do_vmbus_entry(const char *filename, void *symval,
char *alias)
{
int i;
- char guid_name[((sizeof(id->guid) + 1)) * 2];
+ DEF_FIELD_ADDR(symval, hv_vmbus_device_id, guid);
+ char guid_name[(sizeof(*guid) + 1) * 2];
- for (i = 0; i < (sizeof(id->guid) * 2); i += 2)
- sprintf(&guid_name[i], "%02x", id->guid[i/2]);
+ for (i = 0; i < (sizeof(*guid) * 2); i += 2)
+ sprintf(&guid_name[i], "%02x", TO_NATIVE((*guid)[i/2]));
strcpy(alias, "vmbus:");
strcat(alias, guid_name);
return 1;
}
-ADD_TO_DEVTABLE("vmbus", struct hv_vmbus_device_id, do_vmbus_entry);
+ADD_TO_DEVTABLE("vmbus", hv_vmbus_device_id, do_vmbus_entry);
/* Looks like: i2c:S */
-static int do_i2c_entry(const char *filename, struct i2c_device_id *id,
+static int do_i2c_entry(const char *filename, void *symval,
char *alias)
{
- sprintf(alias, I2C_MODULE_PREFIX "%s", id->name);
+ DEF_FIELD_ADDR(symval, i2c_device_id, name);
+ sprintf(alias, I2C_MODULE_PREFIX "%s", *name);
return 1;
}
-ADD_TO_DEVTABLE("i2c", struct i2c_device_id, do_i2c_entry);
+ADD_TO_DEVTABLE("i2c", i2c_device_id, do_i2c_entry);
/* Looks like: spi:S */
-static int do_spi_entry(const char *filename, struct spi_device_id *id,
+static int do_spi_entry(const char *filename, void *symval,
char *alias)
{
- sprintf(alias, SPI_MODULE_PREFIX "%s", id->name);
+ DEF_FIELD_ADDR(symval, spi_device_id, name);
+ sprintf(alias, SPI_MODULE_PREFIX "%s", *name);
return 1;
}
-ADD_TO_DEVTABLE("spi", struct spi_device_id, do_spi_entry);
+ADD_TO_DEVTABLE("spi", spi_device_id, do_spi_entry);
static const struct dmifield {
const char *prefix;
@@ -879,21 +929,21 @@ static void dmi_ascii_filter(char *d, const char *s)
}
-static int do_dmi_entry(const char *filename, struct dmi_system_id *id,
+static int do_dmi_entry(const char *filename, void *symval,
char *alias)
{
int i, j;
-
+ DEF_FIELD_ADDR(symval, dmi_system_id, matches);
sprintf(alias, "dmi*");
for (i = 0; i < ARRAY_SIZE(dmi_fields); i++) {
for (j = 0; j < 4; j++) {
- if (id->matches[j].slot &&
- id->matches[j].slot == dmi_fields[i].field) {
+ if ((*matches)[j].slot &&
+ (*matches)[j].slot == dmi_fields[i].field) {
sprintf(alias + strlen(alias), ":%s*",
dmi_fields[i].prefix);
dmi_ascii_filter(alias + strlen(alias),
- id->matches[j].substr);
+ (*matches)[j].substr);
strcat(alias, "*");
}
}
@@ -902,27 +952,30 @@ static int do_dmi_entry(const char *filename, struct dmi_system_id *id,
strcat(alias, ":");
return 1;
}
-ADD_TO_DEVTABLE("dmi", struct dmi_system_id, do_dmi_entry);
+ADD_TO_DEVTABLE("dmi", dmi_system_id, do_dmi_entry);
static int do_platform_entry(const char *filename,
- struct platform_device_id *id, char *alias)
+ void *symval, char *alias)
{
- sprintf(alias, PLATFORM_MODULE_PREFIX "%s", id->name);
+ DEF_FIELD_ADDR(symval, platform_device_id, name);
+ sprintf(alias, PLATFORM_MODULE_PREFIX "%s", *name);
return 1;
}
-ADD_TO_DEVTABLE("platform", struct platform_device_id, do_platform_entry);
+ADD_TO_DEVTABLE("platform", platform_device_id, do_platform_entry);
static int do_mdio_entry(const char *filename,
- struct mdio_device_id *id, char *alias)
+ void *symval, char *alias)
{
int i;
+ DEF_FIELD(symval, mdio_device_id, phy_id);
+ DEF_FIELD(symval, mdio_device_id, phy_id_mask);
alias += sprintf(alias, MDIO_MODULE_PREFIX);
for (i = 0; i < 32; i++) {
- if (!((id->phy_id_mask >> (31-i)) & 1))
+ if (!((phy_id_mask >> (31-i)) & 1))
*(alias++) = '?';
- else if ((id->phy_id >> (31-i)) & 1)
+ else if ((phy_id >> (31-i)) & 1)
*(alias++) = '1';
else
*(alias++) = '0';
@@ -933,32 +986,34 @@ static int do_mdio_entry(const char *filename,
return 1;
}
-ADD_TO_DEVTABLE("mdio", struct mdio_device_id, do_mdio_entry);
+ADD_TO_DEVTABLE("mdio", mdio_device_id, do_mdio_entry);
/* Looks like: zorro:iN. */
-static int do_zorro_entry(const char *filename, struct zorro_device_id *id,
+static int do_zorro_entry(const char *filename, void *symval,
char *alias)
{
- id->id = TO_NATIVE(id->id);
+ DEF_FIELD(symval, zorro_device_id, id);
strcpy(alias, "zorro:");
- ADD(alias, "i", id->id != ZORRO_WILDCARD, id->id);
+ ADD(alias, "i", id != ZORRO_WILDCARD, id);
return 1;
}
-ADD_TO_DEVTABLE("zorro", struct zorro_device_id, do_zorro_entry);
+ADD_TO_DEVTABLE("zorro", zorro_device_id, do_zorro_entry);
/* looks like: "pnp:dD" */
static int do_isapnp_entry(const char *filename,
- struct isapnp_device_id *id, char *alias)
+ void *symval, char *alias)
{
+ DEF_FIELD(symval, isapnp_device_id, vendor);
+ DEF_FIELD(symval, isapnp_device_id, function);
sprintf(alias, "pnp:d%c%c%c%x%x%x%x*",
- 'A' + ((id->vendor >> 2) & 0x3f) - 1,
- 'A' + (((id->vendor & 3) << 3) | ((id->vendor >> 13) & 7)) - 1,
- 'A' + ((id->vendor >> 8) & 0x1f) - 1,
- (id->function >> 4) & 0x0f, id->function & 0x0f,
- (id->function >> 12) & 0x0f, (id->function >> 8) & 0x0f);
+ 'A' + ((vendor >> 2) & 0x3f) - 1,
+ 'A' + (((vendor & 3) << 3) | ((vendor >> 13) & 7)) - 1,
+ 'A' + ((vendor >> 8) & 0x1f) - 1,
+ (function >> 4) & 0x0f, function & 0x0f,
+ (function >> 12) & 0x0f, (function >> 8) & 0x0f);
return 1;
}
-ADD_TO_DEVTABLE("isapnp", struct isapnp_device_id, do_isapnp_entry);
+ADD_TO_DEVTABLE("isapnp", isapnp_device_id, do_isapnp_entry);
/*
* Append a match expression for a single masked hex digit.
@@ -1009,25 +1064,27 @@ static void append_nibble_mask(char **outp,
* a ? or [] pattern matching exactly one digit.
*/
static int do_amba_entry(const char *filename,
- struct amba_id *id, char *alias)
+ void *symval, char *alias)
{
unsigned int digit;
char *p = alias;
+ DEF_FIELD(symval, amba_id, id);
+ DEF_FIELD(symval, amba_id, mask);
- if ((id->id & id->mask) != id->id)
+ if ((id & mask) != id)
fatal("%s: Masked-off bit(s) of AMBA device ID are non-zero: "
"id=0x%08X, mask=0x%08X. Please fix this driver.\n",
- filename, id->id, id->mask);
+ filename, id, mask);
p += sprintf(alias, "amba:d");
for (digit = 0; digit < 8; digit++)
append_nibble_mask(&p,
- (id->id >> (4 * (7 - digit))) & 0xf,
- (id->mask >> (4 * (7 - digit))) & 0xf);
+ (id >> (4 * (7 - digit))) & 0xf,
+ (mask >> (4 * (7 - digit))) & 0xf);
return 1;
}
-ADD_TO_DEVTABLE("amba", struct amba_id, do_amba_entry);
+ADD_TO_DEVTABLE("amba", amba_id, do_amba_entry);
/* LOOKS like x86cpu:vendor:VVVV:family:FFFF:model:MMMM:feature:*,FEAT,*
* All fields are numbers. It would be nicer to use strings for vendor
@@ -1035,24 +1092,24 @@ ADD_TO_DEVTABLE("amba", struct amba_id, do_amba_entry);
* complicated.
*/
-static int do_x86cpu_entry(const char *filename, struct x86_cpu_id *id,
+static int do_x86cpu_entry(const char *filename, void *symval,
char *alias)
{
- id->feature = TO_NATIVE(id->feature);
- id->family = TO_NATIVE(id->family);
- id->model = TO_NATIVE(id->model);
- id->vendor = TO_NATIVE(id->vendor);
+ DEF_FIELD(symval, x86_cpu_id, feature);
+ DEF_FIELD(symval, x86_cpu_id, family);
+ DEF_FIELD(symval, x86_cpu_id, model);
+ DEF_FIELD(symval, x86_cpu_id, vendor);
strcpy(alias, "x86cpu:");
- ADD(alias, "vendor:", id->vendor != X86_VENDOR_ANY, id->vendor);
- ADD(alias, ":family:", id->family != X86_FAMILY_ANY, id->family);
- ADD(alias, ":model:", id->model != X86_MODEL_ANY, id->model);
+ ADD(alias, "vendor:", vendor != X86_VENDOR_ANY, vendor);
+ ADD(alias, ":family:", family != X86_FAMILY_ANY, family);
+ ADD(alias, ":model:", model != X86_MODEL_ANY, model);
strcat(alias, ":feature:*");
- if (id->feature != X86_FEATURE_ANY)
- sprintf(alias + strlen(alias), "%04X*", id->feature);
+ if (feature != X86_FEATURE_ANY)
+ sprintf(alias + strlen(alias), "%04X*", feature);
return 1;
}
-ADD_TO_DEVTABLE("x86cpu", struct x86_cpu_id, do_x86cpu_entry);
+ADD_TO_DEVTABLE("x86cpu", x86_cpu_id, do_x86cpu_entry);
/* Does namelen bytes of name exactly match the symbol? */
static bool sym_is(const char *name, unsigned namelen, const char *symbol)
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index c4e7d15..8e7b9fb 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -2113,7 +2113,7 @@ int main(int argc, char **argv)
struct ext_sym_list *extsym_iter;
struct ext_sym_list *extsym_start = NULL;
- while ((opt = getopt(argc, argv, "i:I:e:cmsSo:awM:K:")) != -1) {
+ while ((opt = getopt(argc, argv, "i:I:e:msSo:awM:K:")) != -1) {
switch (opt) {
case 'i':
kernel_read = optarg;
@@ -2122,9 +2122,6 @@ int main(int argc, char **argv)
module_read = optarg;
external_module = 1;
break;
- case 'c':
- cross_build = 1;
- break;
case 'e':
external_module = 1;
extsym_iter =
--
1.7.11.1
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply related
* Re: linux-next: build failure after merge of the sound-asoc tree
From: Mark Brown @ 2012-06-25 9:03 UTC (permalink / raw)
To: Rajeev kumar
Cc: Stephen Rothwell, Liam Girdwood, linux-next@vger.kernel.org,
linux-kernel@vger.kernel.org
In-Reply-To: <4FE8009A.4020503@st.com>
[-- Attachment #1: Type: text/plain, Size: 528 bytes --]
On Mon, Jun 25, 2012 at 11:39:30AM +0530, Rajeev kumar wrote:
> 3. We can pick the patches circulated by Viresh Kumar where we don't
> have HAVE_CLK defined for x86_64, then the inline routines like
> following should come into play:
This is what *should* be happening, in conjunction with architectures
doing the trivial work required to turn the clock API on now that there
is a generic clock API, but both of these things seem to be going
nowhere. I've applied a bodge until someone decides it's worth applying
the stubs.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* Re: linux-next: build failure after merge of the sound-asoc tree
From: viresh kumar @ 2012-06-25 8:06 UTC (permalink / raw)
To: Rajeev kumar, Mark Brown
Cc: Stephen Rothwell, Liam Girdwood, linux-next@vger.kernel.org,
linux-kernel@vger.kernel.org
In-Reply-To: <4FE8009A.4020503@st.com>
On 25/06/12 07:09, Rajeev kumar wrote:
> 1. Protecting clk_get/clk_put* calls under macro 'CONFIG_HAVE_CLK' in
> the driver.
Not at all now.
> 2. Adding a check in Kconfig for HAVE_CLK.
> (But that will limit the compilation of this driver for only platforms
> which are ARM based/or similar).
Not actually required
> 3. We can pick the patches circulated by Viresh Kumar where we don't
> have HAVE_CLK defined for x86_64, then the inline routines like
> following should come into play:
That's the best. But probably Mark need to pull in AKPM's tree first into
sound-asoc tree. Mark?
--
Viresh
-- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
^ permalink raw reply
* linux-next: Tree for Jun 25
From: Stephen Rothwell @ 2012-06-25 7:06 UTC (permalink / raw)
To: linux-next; +Cc: LKML
[-- Attachment #1: Type: text/plain, Size: 30505 bytes --]
Hi all,
Changes since 20120622:
The vfs tree gained a conflict against the cifs tree.
The pci tree gained a conflict against Linus' tree.
The slave-dma tree lost its build failure.
The net-next tree gained conflicts against the net tree.
The wireless-next tree lost its build failure.
The sound-asoc tree gained a build failure so I used the version from
next-20120622.
The tip tree lost a conflict but gained another against the jdelvare-hwmon tree.
The akpm tree lost a couple of commits that turned up elsewhere and
gained a build failure for which I reverted a commit.
----------------------------------------------------------------------------
I have created today's linux-next tree at
git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
(patches at http://www.kernel.org/pub/linux/kernel/next/ ). If you
are tracking the linux-next tree using git, you should not use "git pull"
to do so as that will try to merge the new linux-next release with the
old one. You should use "git fetch" as mentioned in the FAQ on the wiki
(see below).
You can see which trees have been included by looking in the Next/Trees
file in the source. There are also quilt-import.log and merge.log files
in the Next directory. Between each merge, the tree was built with
a ppc64_defconfig for powerpc and an allmodconfig for x86_64. After the
final fixups (if any), it is also built with powerpc allnoconfig (32 and
64 bit), ppc44x_defconfig and allyesconfig (minus
CONFIG_PROFILE_ALL_BRANCHES - this fails its final link) and i386, sparc,
sparc64 and arm defconfig. These builds also have
CONFIG_ENABLE_WARN_DEPRECATED, CONFIG_ENABLE_MUST_CHECK and
CONFIG_DEBUG_INFO disabled when necessary.
Below is a summary of the state of the merge.
We are up to 189 trees (counting Linus' and 26 trees of patches pending
for Linus' tree), more are welcome (even if they are currently empty).
Thanks to those who have contributed, and to those who haven't, please do.
Status of my local build tests will be at
http://kisskb.ellerman.id.au/linux-next . If maintainers want to give
advice about cross compilers/configs that work, we are always open to add
more builds.
Thanks to Randy Dunlap for doing many randconfig builds. And to Paul
Gortmaker for triage and bug fixes.
There is a wiki covering stuff to do with linux-next at
http://linux.f-seidel.de/linux-next/pmwiki/ . Thanks to Frank Seidel.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
$ git checkout master
$ git reset --hard stable
Merging origin/master (6b16351 Linux 3.5-rc4)
Merging fixes/master (9023a40 Merge tag 'mmc-fixes-for-3.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc)
Merging kbuild-current/rc-fixes (464076b Makefile: Do not call cc-option before including the arch's Makefile)
Merging arm-current/fixes (10aa5a3 SPI: fix over-eager devm_xxx() conversion)
Merging m68k-current/for-linus (d8ce726 m68k: Use generic strncpy_from_user(), strlen_user(), and strnlen_user())
Merging powerpc-merge/merge (7c0482e powerpc/irq: Fix another case of lazy IRQ state getting out of sync)
Merging sparc/master (39a50b4 Merge branch 'hfsplus')
Merging net/master (8b8e4bc batman-adv: fix race condition in TT full-table replacement)
Merging sound-current/for-linus (b3c5dce ALSA: HDA: Add inverted internal mic quirk for Lenovo S205)
Merging pci-current/for-linus (314489b Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc)
Merging wireless/master (8311f0d mwifiex: improve error path handling in usb.c)
Merging driver-core.current/driver-core-linus (96c9f05 extcon: max8997: Add missing kfree for info->edev in max8997_muic_remove())
Merging tty.current/tty-linus (78d80c5 serial/amba-pl011: move custom pin control to driver)
Merging usb.current/usb-linus (0a6a2da Merge tag 'fixes-for-v3.5-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus)
Merging staging.current/staging-linus (3026b0e staging: r8712u: Add new USB IDs)
Merging char-misc.current/char-misc-linus (49fbd3f misc: mei: set WDIOF_ALARMONLY on mei watchdog)
Merging input-current/for-linus (2177905 Input: fix input.h kernel-doc warning)
Merging md-current/for-linus (aba336b md: raid1/raid10: fix problem with merge_bvec_fn)
Merging audit-current/for-linus (c158a35 audit: no leading space in audit_log_d_path prefix)
Merging crypto-current/master (c475c06 hwrng: atmel-rng - fix data valid check)
Merging ide/master (39a50b4 Merge branch 'hfsplus')
Merging dwmw2/master (244dc4e Merge git://git.infradead.org/users/dwmw2/random-2.6)
Merging sh-current/sh-fixes-for-linus (790b9d4 Merge tag 'sh-for-linus' of git://github.com/pmundt/linux-sh)
Merging irqdomain-current/irqdomain/merge (15e06bf irqdomain: Fix debugfs formatting)
Merging devicetree-current/devicetree/merge (4e8383b of: release node fix for of_parse_phandle_with_args)
Merging spi-current/spi/merge (d1c185b of/spi: Fix SPI module loading by using proper "spi:" modalias prefixes.)
Merging gpio-current/gpio/merge (96b7064 gpio/tca6424: merge I2C transactions, remove cast)
Merging arm/for-next (4d0d790 Merge branches 'fixes' and 'misc' into for-next)
Merging arm-perf/for-next/perf (dee8c1b ARM: perf: remove arm_perf_pmu_ids global enumeration)
Merging davinci/davinci-next (fe0d422 Linux 3.0-rc6)
Merging samsung/next-samsung (9edb240 ARM: H1940/RX1950: Change default LED triggers)
Merging xilinx/arm-next (b85a3ef ARM: Xilinx: Adding Xilinx board support)
Merging blackfin/for-linus (672552a blackfin: fix build after add bf60x mach/pm.h)
Merging c6x/for-linux-next (485802a Linux 3.5-rc3)
Merging cris/for-next (2608747 CRIS: Remove VCS simulator specific code)
Merging hexagon/linux-next (5042ab9 various Kconfig cleanup and old platform build code removal)
Merging ia64/next (f28fa72 [IA64] Port OOM changes to ia64_do_page_fault)
Merging m68k/for-next (4fa0cff m68knommu: Allow ColdFire CPUs to use unaligned accesses)
Merging m68knommu/for-next (faf6f71 m68knommu: Add clk definitions for m532x.)
Merging microblaze/next (a01ee16 Merge branch 'for-linus' of git://git.open-osd.org/linux-open-osd)
Merging mips/mips-for-linux-next (1f04189 Merge branch 'next/loongson1b' into mips-for-linux-next)
Merging openrisc/for-upstream (207e715 openrisc: use scratch regs in atomic syscall)
Merging parisc/for-next (4c01acc [PARISC] fix code to find libgcc)
Merging powerpc/next (2074b1d powerpc: Fix irq distribution)
Merging 4xx/next (2074b1d powerpc: Fix irq distribution)
Merging mpc5xxx/next (f8d5842 powerpc: Option FB_FSL_DIU is not really optional for mpc512x)
Merging galak/next (fa1b42b powerpc/qe: Update the SNUM table for MPC8569 Rev2.0)
Merging s390/features (fbe7656 s390/smp: make absolute lowcore / cpu restart parameter accesses more robust)
Merging sh/sh-latest (7b98cf0 Merge branch 'common/pfc' into sh-latest)
Merging sparc-next/master (31a6710 Fix blocking allocations called very early during bootup)
Merging tile/master (7a9349b bounce: allow use of bounce pool via config option)
Merging unicore32/unicore32 (e4baa56 UniCore32-bugfix: Remove definitions in asm/bug.h to solve difference between native and cross compiler)
Merging ceph/master (26ce171 libceph: fix NULL dereference in reset_connection())
CONFLICT (content): Merge conflict in net/ceph/osd_client.c
Merging cifs/for-next (4d0b178 CIFS: Add SMB2 credits support)
Merging configfs/linux-next (b930c26 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs)
Merging ecryptfs/next (5a52c0d eCryptfs: Initialize empty lower files when opening them)
Merging ext3/for_next (7d5a4b0 quota: fix checkpatch.pl warning by replacing <asm/uaccess.h> with <linux/uaccess.h>)
Merging ext4/dev (b22b1f1 ext4: don't set i_flags in EXT4_IOC_SETFLAGS)
Merging fuse/for-next (203627b fuse: fix blksize calculation)
Merging gfs2/master (666d1d8 GFS2: Combine functions get_local_rgrp and gfs2_inplace_reserve)
Merging logfs/master (cd8bfa9 logfs: initialize the number of iovecs in bio)
Merging nfs/linux-next (d4c2898 Define ENONAMESERVICE and ENAMEUNKNOWN to indicate name service errors)
Merging nfsd/nfsd-next (7df302f NFSD: TEST_STATEID should not return NFS4ERR_STALE_STATEID)
Merging ocfs2/linux-next (9392557 ocfs2: avoid unaligned access to dqc_bitmap)
Merging omfs/for-next (976d167 Linux 3.1-rc9)
Merging squashfs/master (4b0180a Squashfs: add mount time sanity check for block_size and block_log match)
Merging v9fs/for-next (5fcb08b 9p: BUG before corrupting memory)
Merging ubifs/linux-next (1cfb727 UBIFS: fix assertion)
Merging xfs/for-next (9a8d2fd xfs: remove xlog_t typedef)
CONFLICT (content): Merge conflict in fs/xfs/xfs_log_priv.h
CONFLICT (content): Merge conflict in fs/xfs/xfs_log.c
Merging vfs/for-next (01aa470 do_dentry_open(): close the race with mark_files_ro() in failure exit)
CONFLICT (content): Merge conflict in fs/cifs/dir.c
Merging pci/next (35e7f73 Merge branch 'topic/huang-d3cold-v7' into next)
CONFLICT (content): Merge conflict in drivers/pci/quirks.c
CONFLICT (content): Merge conflict in drivers/pci/pci.c
Merging hid/for-next (f79185b Merge branch 'uhid' into for-next)
Merging quilt/i2c (54b0574 i2c/writing-clients: Mention module_i2c_driver())
Merging bjdooks-i2c/next-i2c (fc84fe1 Merge branch 'for_3.3/i2c/misc' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm into for-33/i2c/omap)
CONFLICT (content): Merge conflict in drivers/i2c/busses/i2c-omap.c
Merging i2c-embedded/i2c-embedded/for-next (0f009a9 i2c: tegra: make all resource allocation through devm_*)
Merging quilt/jdelvare-hwmon (3c1aae2 hwmon: struct x86_cpu_id arrays can be __initconst)
Merging hwmon-staging/hwmon-next (2893d05 hwmon: (applesmc) correct email address for Jesper Juhl)
Merging v4l-dvb/master (9d5c332 Merge /home/v4l/v4l/patchwork)
CONFLICT (content): Merge conflict in drivers/hid/hid-ids.h
Merging kbuild/for-next (c6ff25b Merge branch 'kbuild/rc-fixes' into kbuild/for-next)
Merging kconfig/for-next (4503379 localmodconfig: Add debug environment variable LOCALMODCONFIG_DEBUG)
Merging libata/NEXT (2fff275 PATA host controller driver for ep93xx)
Merging infiniband/for-next (a323e3f Merge branch 'cma' into for-next)
Merging acpi/next (4e86d6d Merge branch 'turbostat-v2' into next)
CONFLICT (content): Merge conflict in drivers/pci/pci-acpi.c
Merging cpupowerutils/master (f166033 cpupower tools: add install target to the debug tools' makefiles)
Merging ieee1394/for-next (e18907c firewire: ohci: initialize multiChanMode bits after reset)
Merging ubi/linux-next (f8f5701 Linux 3.5-rc1)
Merging dlm/next (6b70194 dlm: fix conversion deadlock from recovery)
Merging scsi/for-next (6ef2448 [SCSI] qla4xxx: Update driver version to 5.02.00-k18)
Merging target-updates/for-next (4318efc target: move unmap to struct spc_ops)
Merging target-merge/for-next-merge (cfaf025 Linux 3.5-rc2)
Merging ibft/linux-next (935a9fe ibft: Fix finding IBFT ACPI table on UEFI)
Merging isci/all (6df8ea3 merge: devel rnc-devel fixes)
Merging slave-dma/next (49d57b5 dmaengine: mmp_tdma: fix the arch dependency)
Merging dmaengine/next (a2bd114 netdma: adding alignment check for NETDMA ops)
Merging net-next/master (7011d08 tcp: Fix bug in tcp socket early demux)
CONFLICT (content): Merge conflict in net/ipv6/route.c
CONFLICT (content): Merge conflict in net/batman-adv/translation-table.c
CONFLICT (content): Merge conflict in drivers/net/usb/qmi_wwan.c
Merging wireless-next/master (5ea2769 rtlwifi: Change debug level for deletion of an entry in CAM)
Merging bluetooth/master (790eff4 Bluetooth: Use GFP_KERNEL in mgmt events functions)
Merging mtd/master (ea3b2ea mtd: nand: initialize bitflip_threshold prior to BBT scanning)
Merging l2-mtd/master (b27ebae mtd: m25p80: Add support for n25q064)
Merging crypto/master (3987103 crypto: algapi - Move larval completion into algboss)
Merging drm/drm-next (9c19415 Merge tag 'drm-intel-next-2012-06-04' of git://people.freedesktop.org/~danvet/drm-intel into drm-core-next)
Merging sound/for-next (124078e Merge branch 'topic/hda' into for-next)
Merging sound-asoc/for-next (e14c739 Merge branch 'for-3.6' into asoc-next)
$ git reset --hard HEAD^
Merging refs/next/20120622/sound-asoc
Merging quilt/rr (231e4d6 Taint kernel when lve module is loaded)
Merging input/next (e7ec014 Input: twl6040-vibra - update for device tree support)
Merging input-mt/for-next (27c347d Input: MT - fix null pointer warning)
Merging cgroup/for-next (f9b6023f Merge branch 'for-3.5-fixes' into for-next)
Merging block/for-next (f45d342 Merge branch 'for-linus' into for-next)
Merging quilt/device-mapper (f87f942 dm-thin will be most likely used with a block size that is a power of two. So it should be optimized for this case.)
Merging embedded/master (4744b43 embedded: fix vc_translate operator precedence)
Merging firmware/master (6e03a20 firmware: speed up request_firmware(), v3)
Merging pcmcia/master (80af9e6 pcmcia at91_cf: fix raw gpio number usage)
Merging mmc/mmc-next (8da55ef mmc: core: Fix the HPI execution sequence)
Merging kgdb/kgdb-next (3751d3e x86,kgdb: Fix DEBUG_RODATA limitation using text_poke())
Merging slab/for-next (43d7786 slub: refactoring unfreeze_partials())
Merging uclinux/for-next (5e442a4 Revert "proc: fix races against execve() of /proc/PID/fd**")
Merging md/for-next (aba336b md: raid1/raid10: fix problem with merge_bvec_fn)
Merging mfd/for-next (6b16351 Linux 3.5-rc4)
Merging battery/master (85a392d test_power: Add VOLTAGE_NOW and BATTERY_TEMP properties)
Applying: ACPI-Thermal: fix for an API change
Merging fbdev/fbdev-next (0f90fa5 Merge branch 'planes' of git://linuxtv.org/pinchartl/fbdev into fbdev-next)
Merging viafb/viafb-next (838ac78 viafb: avoid refresh and mode lookup in set_par)
Merging omap_dss2/for-next (05dd0f5 OMAPDSS: DISPC: Update Accumulator configuration for chroma plane)
Merging regulator/for-next (14e977b Merge branch 'regulator-drivers' into regulator-next)
Merging security/next (3072928 tpm: check the chip reference before using it)
Merging selinux/master (c737f82 SELinux: remove unused common_audit_data in flush_unauthorized_files)
Merging lblnet/master (7e27d6e Linux 2.6.35-rc3)
Merging watchdog/master (002b758 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client)
Merging dwmw2-iommu/master (c3b92c8 Linux 3.1)
Merging iommu/next (eee5353 iommu/amd: Fix deadlock in ppr-handling error path)
Merging osd/linux-next (8b56a30 exofs: Add SYSFS info for autologin/pNFS export)
Merging jc_docs/docs-next (5c050fb docs: update the development process document)
Merging trivial/for-next (c224071 parisc: cleanup quoted include)
Merging audit/for-next (dcd6c92 Linux 3.3-rc1)
Merging pm/linux-next (fc7d839 PM / Hibernate: Print hibernation/thaw progress indicator one line at a time.)
Merging apm/for-next (f283d22 APM: fix deadlock in APM_IOC_SUSPEND ioctl)
Merging fsnotify/for-next (1aec9c0 inotify: automatically restart syscalls)
Merging edac/linux_next (2d9531a Merge branch 'devel' into next)
Merging edac-amd/for-next (305f1c3 Merge branch '3.3-pci_device_id' into edac-for-next)
CONFLICT (content): Merge conflict in drivers/edac/amd64_edac.c
CONFLICT (content): Merge conflict in Documentation/edac.txt
Merging devicetree/devicetree/next (efd68e7 devicetree: add helper inline for retrieving a node's full name)
Merging spi/spi/next (d8e328b spi: Add "spi:" prefix to modalias attribute of spi devices)
Merging tip/auto-latest (fbf2aa6 Merge branch 'linus')
CONFLICT (content): Merge conflict in mm/slub.c
CONFLICT (content): Merge conflict in mm/slab.c
CONFLICT (content): Merge conflict in drivers/hwmon/coretemp.c
Merging rcu/rcu/next (79a70ef Merge branches 'bigrt.2012.06.24a', 'doctorture.2012.06.15a', 'fixes.2012.06.24a' and 'fnh.2012.06.15a' into dev.3.6.2012.06.24a)
Merging cputime/cputime (c3e0ef9 [S390] fix cputime overflow in uptime_proc_show)
Merging uprobes/for-next (0326f5a uprobes/core: Handle breakpoint and singlestep exceptions)
Merging kmemleak/kmemleak (4878677 kmemleak: do not leak object after tree insertion error)
Merging kvm/linux-next (dcce048 KVM: trace events: update list of exit reasons)
Merging kvm-ppc/kvm-ppc-next (5e5054c booke: Added crit/mc exception handler for e500v2)
Merging oprofile/for-next (c16fa4f Linux 3.3)
Merging xen/upstream/xen (af3a3ab Merge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-3.0-fixes)
Merging xen-two/linux-next (e4e7b82 Merge branch 'stable/for-linus-3.6' into linux-next)
Merging xen-pvhvm/linux-next (b056b6a xen: suspend: remove xen_hvm_suspend)
Merging percpu/for-next (61011677 Merge tag 'dlm-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm)
Merging workqueues/for-next (61011677 Merge tag 'dlm-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm)
Merging drivers-x86/linux-next (d0e0a477 dell-laptop: Add touchpad led support for Dell V3450)
Merging hwpoison/hwpoison (46e387b Merge branch 'hwpoison-hugepages' into hwpoison)
Merging sysctl/master (4e474a0 sysctl: protect poll() in entries that may go away)
Merging regmap/for-next (dabefce Merge branch 'regmap-page' into regmap-next)
Merging hsi/for-next (43139a6 HSI: hsi_char: Update ioctl-number.txt)
Merging leds/for-next (e6c0032 leds: Add LED driver for lm3556 chip)
Merging driver-core/driver-core-next (6790126 w1: Fix a typo in 'hardware' word)
CONFLICT (content): Merge conflict in drivers/extcon/extcon_gpio.c
Merging tty/tty-next (fe89def pch_uart: Add eg20t_port lock field, avoid recursive spinlocks)
Merging usb/usb-next (ff446f2 Merge 3.5-rc3 into usb-next)
Merging staging/staging-next (1c1b862 staging: r8712u: Remove useless driver version info)
Merging char-misc/char-misc-next (21c66d1 mei: group wd_interface_reg with watchdog variables within struct mei_device)
Merging tmem/linux-next (3bebf5b Merge branch 'stable/for-linus-3.6' into linux-next)
Merging writeback/writeback-for-next (331cbde writeback: Fix some comment errors)
Merging arm-dt/devicetree/arm-next (ede338f dt: add documentation of ARM dt boot interface)
Merging hwspinlock/linux-next (8b37fcf hwspinlock: add MAINTAINERS entries)
Merging pinctrl/for-next (8df6653 pinctrl: pinctrl-imx: fix map setting problem if NO_PAD_CTL is set)
Merging moduleh/for-sfr (f9e1b2b tile: fix compile failure on start_kernel in setup.c)
Merging vhost/linux-next (e0953c8 tun: experimental zero copy tx support)
Merging kmap_atomic/kmap_atomic (cf43378 pipe: remove KM_USER0 from comments)
Merging memblock/memblock-kill-early_node_map (7bd0b0f memblock: Reimplement memblock allocation using reverse free area iterator)
Merging remoteproc/for-next (5414687 MAINTAINERS: add remoteproc's git)
CONFLICT (content): Merge conflict in drivers/remoteproc/remoteproc_core.c
Merging irqdomain/irqdomain/next (aed9804 irqdomain: Make ops->map hook optional)
Merging gpio/gpio/next (3e11f7b gpio/generic: initialize basic_mmio_gpio shadow variables properly)
Merging arm-soc/for-next (513bd72 Merge branch 'fixes' into for-next)
Merging ep93xx/ep93xx-for-next (9b6a359 Merge branch 'ep93xx-fixes' into ep93xx-for-next)
Merging renesas/next (386213b Merge branch 'renesas-sh7372' into renesas-next)
Merging s5p/for-next (99f9f4c Merge branch 'v3.5-samsung-fixes-1' into for-next)
Merging tegra/for-next (118fef7 Merge branch 'for-3.6/defconfig' into for-next)
Merging kvmtool/master (5fffd63 kvm tools: set the HYPERVISOR flag in cpuid)
Merging dma-mapping/dma-mapping-next (7756e89 Merge remote branch 'dma-public/fixes-for-linus' into HEAD)
Merging dma-buf/for-next (b48b2c3 openrisc: use generic strnlen_user() function)
Merging userns/for-next (491fa9e userns: Allow the usernamespace support to build after the removal of usbfs)
Merging ktest/for-next (648a182 ktest: Allow a test to override REBOOT_ON_SUCCESS)
Merging signal/for-next (2c95605 Uninclude linux/freezer.h)
Merging scsi-post-merge/merge-base:master ()
$ git checkout akpm
Applying: selinux: fix something
Applying: memory hotplug: fix invalid memory access caused by stale kswapd pointer
Applying: memory-hotplug-fix-invalid-memory-access-caused-by-stale-kswapd-pointer-fix
Applying: drivers/rtc/rtc-spear.c: fix use-after-free in spear_rtc_remove()
Applying: mn10300: move setup_jiffies_interrupt() to cevt-mn10300.c
Applying: mn10300: remove duplicate definition of PTRACE_O_TRACESYSGOOD
Applying: mn10300: kernel/internal.h needs <linux/irqreturn.h>
Applying: mn10300: kernel/traps.c needs <linux/export.h>
Applying: mn10300: mm/dma-alloc.c needs <linux/export.h>
Applying: mn10300: use "#elif defined(CONFIG_*)" instead of "#elif CONFIG_*"
Applying: ocfs2: fix NULL pointer dereference in __ocfs2_change_file_space()
Applying: c/r: prctl: less paranoid prctl_set_mm_exe_file()
Applying: drivers/gpio/devres.c: export devm_gpio_request_one() to modules
Applying: mm, thp: abort compaction if migration page cannot be charged to memcg
Applying: cciss: fix incorrect scsi status reporting
Applying: arch/x86/platform/iris/iris.c: register a platform device and a platform driver
Applying: arch/x86/include/asm/spinlock.h: fix comment
Applying: arch/x86/kernel/cpu/perf_event_intel_uncore.h: make UNCORE_PMU_HRTIMER_INTERVAL 64-bit
Applying: timeconst.pl: remove deprecated defined(@array)
Applying: time: don't inline EXPORT_SYMBOL functions
Applying: thermal: fix potential out-of-bounds memory access
Applying: ocfs2: use find_last_bit()
Applying: ocfs2: use bitmap_weight()
Applying: drivers/scsi/ufs: use module_pci_driver
Applying: drivers/scsi/ufs: reverse the ufshcd_is_device_present logic
Applying: drivers/scsi/ufs: fix incorrect return value about SUCCESS and FAILED
Applying: drivers/scsi/atp870u.c: fix bad use of udelay
Applying: vfs: increment iversion when a file is truncated
Applying: fs: push rcu_barrier() from deactivate_locked_super() to filesystems
Applying: hfs: push lock_super down
Applying: hfs: get rid of lock_super
Applying: hfs: remove extra mdb write on unmount
Applying: hfs: simplify a bit checking for R/O
Applying: hfs: introduce VFS superblock object back-reference
Applying: hfs: get rid of hfs_sync_super
Applying: hfs-get-rid-of-hfs_sync_super-checkpatch-fixes
Applying: fs/xattr.c:getxattr(): improve handling of allocation failures
Applying: fs: add link restrictions
Applying: mm/slab: remove duplicate check
Applying: slab: move FULL state transition to an initcall
Applying: vmalloc: walk vmap_areas by sorted list instead of rb_next()
Applying: mm: make vb_alloc() more foolproof
Applying: mm-make-vb_alloc-more-foolproof-fix
Applying: memcg: rename MEM_CGROUP_STAT_SWAPOUT as MEM_CGROUP_STAT_SWAP
Applying: memcg: rename MEM_CGROUP_CHARGE_TYPE_MAPPED as MEM_CGROUP_CHARGE_TYPE_ANON
Applying: memcg: remove MEM_CGROUP_CHARGE_TYPE_FORCE
Applying: swap: allow swap readahead to be merged
Applying: documentation: update how page-cluster affects swap I/O
Applying: mm: account the total_vm in the vm_stat_account()
Applying: mm: compaction: handle incorrect MIGRATE_UNMOVABLE type pageblocks
Applying: mm-compaction-handle-incorrect-migrate_unmovable-type-pageblocks-fix
Applying: mm/buddy: cleanup on should_fail_alloc_page
Applying: mm: prepare for removal of obsolete /proc/sys/vm/nr_pdflush_threads
Applying: hugetlb: rename max_hstate to hugetlb_max_hstate
Applying: hugetlb: don't use ERR_PTR with VM_FAULT* values
Applying: hugetlb: add an inline helper for finding hstate index
Applying: hugetlb: use mmu_gather instead of a temporary linked list for accumulating pages
Applying: hugetlb: avoid taking i_mmap_mutex in unmap_single_vma() for hugetlb
Applying: hugetlb: simplify migrate_huge_page()
Applying: hugetlb: add a list for tracking in-use HugeTLB pages
Applying: hugetlb: make some static variables global
Applying: hugeltb: mark hugelb_max_hstate __read_mostly
Applying: mm/hugetlb: add new HugeTLB cgroup
Applying: hugetlb/cgroup: Mark root_h_cgroup static
Applying: hugetlb/cgroup: add the cgroup pointer to page lru
Applying: hugetlb/cgroup: add charge/uncharge routines for hugetlb cgroup
Applying: hugetlb/cgroup: add support for cgroup removal
Applying: hugetlb/cgroup: add hugetlb cgroup control files
Applying: hugetlb/cgroup: migrate hugetlb cgroup info from oldpage to new page during migration
Applying: hugetlb/cgroup: add HugeTLB controller documentation
Applying: hugetlb: move all the in use pages to active list
Applying: hugetlb/cgroup: assign the page hugetlb cgroup when we move the page to active list.
Applying: hugetlb/cgroup: remove exclude and wakeup rmdir calls from migrate
Applying: mm, oom: do not schedule if current has been killed
Applying: mm/memblock.c:memblock_double_array(): cosmetic cleanups
Applying: memcg: remove check for signal_pending() during rmdir()
Applying: memcg: clean up force_empty_list() return value check
Applying: memcg: mem_cgroup_move_parent() doesn't need gfp_mask
Applying: memcg: make mem_cgroup_force_empty_list() return bool
Applying: memcg-make-mem_cgroup_force_empty_list-return-bool-fix
Applying: mm/compaction: cleanup on compaction_deferred
Applying: memcg: prevent OOM with too many dirty pages
Applying: tmpfs: implement NUMA node interleaving
Applying: tmpfs-implement-numa-node-interleaving-fix
Applying: avr32/mm/fault.c: port OOM changes to do_page_fault
Applying: avr32-mm-faultc-port-oom-changes-to-do_page_fault-fix
Applying: clk: add non CONFIG_HAVE_CLK routines
Applying: clk: remove redundant depends on from drivers/Kconfig
Applying: i2c/i2c-pxa: remove conditional compilation of clk code
Applying: usb/marvell: remove conditional compilation of clk code
Applying: usb/musb: remove conditional compilation of clk code
Applying: ata/pata_arasan: remove conditional compilation of clk code
Applying: net/c_can: remove conditional compilation of clk code
Applying: net/stmmac: remove conditional compilation of clk code
Applying: gadget/m66592: remove conditional compilation of clk code
Applying: gadget/r8a66597: remove conditional compilation of clk code
Applying: usb/host/r8a66597: remove conditional compilation of clk code
Applying: clk: validate pointer in __clk_disable()
Applying: NMI watchdog: fix for lockup detector breakage on resume
Applying: kmsg: /dev/kmsg - properly return possible copy_from_user() failure
Applying: printk: add generic functions to find KERN_<LEVEL> headers
Applying: printk-add-generic-functions-to-find-kern_level-headers-fix
Applying: printk: add kern_levels.h to make KERN_<LEVEL> available for asm use
Applying: arch: remove direct definitions of KERN_<LEVEL> uses
Applying: btrfs: use printk_get_level and printk_skip_level, add __printf, fix fallout
Applying: btrfs-use-printk_get_level-and-printk_skip_level-add-__printf-fix-fallout-fix
Applying: btrfs-use-printk_get_level-and-printk_skip_level-add-__printf-fix-fallout-checkpatch-fixes
Applying: sound: use printk_get_level and printk_skip_level
Applying: printk: convert the format for KERN_<LEVEL> to a 2 byte pattern
Applying: printk: only look for prefix levels in kernel messages
Applying: printk: remove the now unnecessary "C" annotation for KERN_CONT
Applying: vsprintf: add %pMR for Bluetooth MAC address
Applying: Documentation/printk-formats.txt: add description for %pMR
Applying: lib/vsprintf.c: remind people to update Documentation/printk-formats.txt when adding printk formats
Applying: drivers/video/backlight/atmel-pwm-bl.c: use devm_ functions
Applying: drivers/video/backlight/ot200_bl.c: use devm_ functions
Applying: drivers/video/backlight/lm3533_bl.c: use devm_ functions
Applying: backlight: atmel-pwm-bl: use devm_gpio_request()
Applying: backlight: ot200_bl: use devm_gpio_request()
Applying: backlight: tosa_lcd: use devm_gpio_request()
Applying: backlight: tosa_bl: use devm_gpio_request()
Applying: backlight: lms283gf05: use devm_gpio_request()
Applying: backlight: corgi_lcd: use devm_gpio_request()
Applying: backlight: l4f00242t03: export and use devm_gpio_request_one()
Applying: string: introduce memweight()
Applying: string-introduce-memweight-fix
Applying: string: fix build error caused by memweight() introduction
Applying: qnx4fs: use memweight()
Applying: dm: use memweight()
Applying: affs: use memweight()
Applying: video/uvc: use memweight()
Applying: ocfs2: use memweight()
Applying: ext2: use memweight()
Applying: ext3: use memweight()
Applying: ext4: use memweight()
Applying: checkpatch: Update alignment check
Applying: checkpatch: test for non-standard signatures
Applying: checkpatch: check usleep_range() arguments
Applying: drivers/rtc/rtc-coh901331.c: use clk_prepare/unprepare
Applying: drivers/rtc/rtc-coh901331.c: use devm allocation
Applying: drivers/rtc/rtc-ab8500.c: use IRQF_ONESHOT when requesting a threaded IRQ
Applying: rtc: pl031: encapsulate per-vendor ops
Applying: rtc: pl031: use per-vendor variables for special init
Applying: rtc: pl031: fix up IRQ flags
Applying: drivers/rtc/rtc-ab8500.c: use UIE emulation
Applying: drivers-rtc-rtc-ab8500c-use-uie-emulation-checkpatch-fixes
Applying: drivers/rtc/rtc-ab8500.c: remove fix for AB8500 ED version
Applying: drivers/rtc/rtc-r9701.c: avoid second call to rtc_valid_tm()
Applying: drivers/rtc/rtc-r9701.c: check that r9701_set_datetime() succeeded
Applying: hfsplus: use -ENOMEM when kzalloc() fails
Applying: hfsplus: make hfsplus_sync_fs() static
Applying: hfsplus: amend debugging print
Applying: hfsplus: remove useless check
Applying: hfsplus: get rid of write_super
Applying: hfsplus-get-rid-of-write_super-checkpatch-fixes
Applying: kmod: avoid deadlock from recursive kmod call
Applying: fork: use vma_pages() to simplify the code
Applying: fork-use-vma_pages-to-simplify-the-code-fix
Applying: ipc/sem.c: alternatives to preempt_disable()
Applying: drivers/char/ipmi/ipmi_watchdog.c: remove local ioctl defines replaced by generic ones
Applying: fs: cachefiles: add support for large files in filesystem caching
Applying: fs-cachefiles-add-support-for-large-files-in-filesystem-caching-fix
Applying: c/r: fcntl: add F_GETOWNER_UIDS option
Merging quilt/akpm (6b3cb7c c/r: fcntl: add F_GETOWNER_UIDS option)
[master af93cf2] Revert "fs: add link restrictions"
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* linux-next: build failure after merge of the akpm tree
From: Stephen Rothwell @ 2012-06-25 6:41 UTC (permalink / raw)
To: Andrew Morton
Cc: linux-next, linux-kernel, Kees Cook, Al Viro, Miklos Szeredi
[-- Attachment #1: Type: text/plain, Size: 604 bytes --]
Hi Andrew,
After merging the akpm tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:
fs/namei.c: In function 'path_openat':
fs/namei.c:2874:4: error: 'filp' undeclared (first use in this function)
Caused by patch "fs: add link restrictions" from the akpm tree
interacting with (at least) commit 4066cd545681 ("vfs: remove open
intents from nameidata") from the vfs tree.
I don't know how to fix this, so I have reverted the akpm patch for today
(in the hope that someone else will fix it).
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* Re: linux-next: manual merge of the pci tree with Linus' tree
From: huang ying @ 2012-06-25 6:32 UTC (permalink / raw)
To: Stephen Rothwell
Cc: Bjorn Helgaas, linux-next, linux-kernel, Alan Stern,
Greg Kroah-Hartman, Huang Ying, Zheng Yan
In-Reply-To: <20120625123108.06ef7f883a323df5221edc98@canb.auug.org.au>
Hi, Stephen,
On Mon, Jun 25, 2012 at 10:31 AM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> Hi Bjorn,
>
> Today's linux-next merge of the pci tree got a conflict in
> drivers/pci/pci.c between commit c2fb8a3fa255 ("USB: add
> NO_D3_DURING_SLEEP flag and revert 151b61284776be2") from Linus' tree and
> commit 448bd857d48e ("PCI/PM: add PCIe runtime D3cold support") from the
> pci tree.
>
> I fixed it up (I think - see below) and can carry the fix as necessary.
> --
> Cheers,
> Stephen Rothwell sfr@canb.auug.org.au
>
> diff --cc drivers/pci/pci.c
> index 77cb54a,3f8b74f..0000000
> --- a/drivers/pci/pci.c
> +++ b/drivers/pci/pci.c
> @@@ -1744,11 -1803,10 +1803,15 @@@ int pci_prepare_to_sleep(struct pci_de
> if (target_state == PCI_POWER_ERROR)
> return -EIO;
>
> + /* D3cold during system suspend/hibernate is not supported */
> + if (target_state > PCI_D3hot)
> + target_state = PCI_D3hot;
> +
> + /* Some devices mustn't be in D3 during system sleep */
> + if (target_state == PCI_D3hot &&
> + (dev->dev_flags & PCI_DEV_FLAGS_NO_D3_DURING_SLEEP))
> + return 0;
> +
> pci_enable_wake(dev, target_state, device_may_wakeup(&dev->dev));
>
> error = pci_set_power_state(dev, target_state);
I found this conflict during development too. I think the fixing is
correct. Thanks.
Best Regards,
Huang Ying
^ permalink raw reply
* Re: linux-next: build failure after merge of the sound-asoc tree
From: Rajeev kumar @ 2012-06-25 6:09 UTC (permalink / raw)
To: Stephen Rothwell
Cc: Mark Brown, Liam Girdwood, linux-next@vger.kernel.org,
linux-kernel@vger.kernel.org
In-Reply-To: <20120625141140.c6d71065dab293005514ee1a@canb.auug.org.au>
Hi Stephen,
On 6/25/2012 9:41 AM, Stephen Rothwell wrote:
> Hi all,
>
> After merging the sound-asoc tree, today's linux-next build (x86_64
> allmodconfig) failed like this:
>
> ERROR: "clk_disable" [sound/soc/dwc/designware_i2s.ko] undefined!
> ERROR: "clk_get" [sound/soc/dwc/designware_i2s.ko] undefined!
> ERROR: "clk_enable" [sound/soc/dwc/designware_i2s.ko] undefined!
> ERROR: "clk_put" [sound/soc/dwc/designware_i2s.ko] undefined!
I have checked this on ARM platform where these definitions are
available (clk_get/clk_put* variants are usually used by ARM platforms).
To ensure compilation does not fail on x86_64 we can do either of three
things:
1. Protecting clk_get/clk_put* calls under macro 'CONFIG_HAVE_CLK' in
the driver.
2. Adding a check in Kconfig for HAVE_CLK.
(But that will limit the compilation of this driver for only platforms
which are ARM based/or similar).
3. We can pick the patches circulated by Viresh Kumar where we don't
have HAVE_CLK defined for x86_64, then the inline routines like
following should come into play:
static inline unsigned long clk_get_rate(struct clk *clk)
{
return 0;
}
See the patches for the same here:
http://lkml.org/lkml/2012/4/24/154
Please let me know your opinion.
Best Regards
Rajeev
^ permalink raw reply
* Re: linux-next: manual merge of the tip tree with the jdelvare-hwmon tree
From: H. Peter Anvin @ 2012-06-25 5:25 UTC (permalink / raw)
To: Stephen Rothwell, Thomas Gleixner, Ingo Molnar, Peter Zijlstra
Cc: linux-next, linux-kernel, Jan Beulich, Jean Delvare
In-Reply-To: <20120625150130.5fd1716cabf02aed85918c20@canb.auug.org.au>
Yes, I know... a mistake on my part.
Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>Hi all,
>
>Today's linux-next merge of the tip tree got a conflict in
>drivers/hwmon/coretemp.c between commit 3c1aae21b09d ("hwmon: struct
>x86_cpu_id arrays can be __initconst") from the jdelvare-hwmon tree and
>commit 3bac8715443f ("x86, cpufeature: Rename X86_FEATURE_DTS to
>X86_FEATURE_DTHERM") from the tip tree.
>
>Just context changes. I fixed it up (see below) and can carry the fix
>as
>necessary.
>
>P.S. that tip tree commit has no Signed-off-by line at all :-(
>--
>Cheers,
>Stephen Rothwell sfr@canb.auug.org.au
>
>diff --cc drivers/hwmon/coretemp.c
>index b405781,637c51c..0000000
>--- a/drivers/hwmon/coretemp.c
>+++ b/drivers/hwmon/coretemp.c
>@@@ -793,8 -793,8 +793,8 @@@ static struct notifier_block coretemp_c
> .notifier_call = coretemp_cpu_callback,
> };
>
> -static const struct x86_cpu_id coretemp_ids[] = {
> +static const struct x86_cpu_id __initconst coretemp_ids[] = {
>- { X86_VENDOR_INTEL, X86_FAMILY_ANY, X86_MODEL_ANY, X86_FEATURE_DTS
>},
>+ { X86_VENDOR_INTEL, X86_FAMILY_ANY, X86_MODEL_ANY,
>X86_FEATURE_DTHERM },
> {}
> };
> MODULE_DEVICE_TABLE(x86cpu, coretemp_ids);
--
Sent from my mobile phone. Please excuse brevity and lack of formatting.
^ permalink raw reply
* Re: error: implicit declarations of BUG/BUG_ON/WARN_ON/WARN_ON_ONCE
From: Randy Dunlap @ 2012-06-25 5:05 UTC (permalink / raw)
To: Fengguang Wu
Cc: Paul Mundt, Stephen Rothwell, linux-next, LKML, Arnd Bergmann
In-Reply-To: <20120625045513.GC11989@localhost>
On 06/24/2012 09:55 PM, Fengguang Wu wrote:
> On Sun, Jun 24, 2012 at 09:39:50PM -0700, Randy Dunlap wrote:
>> On 06/24/2012 09:38 PM, Fengguang Wu wrote:
>>
>>> On Sun, Jun 24, 2012 at 09:23:38PM -0700, Randy Dunlap wrote:
>>>> On 06/24/2012 09:20 PM, Fengguang Wu wrote:
>>>>
>>>>> Hi Paul,
>>>>>
>>>>> The patch builds fine, thank you!
>>>>>
>>>>> Tested-by: Fengguang Wu <wfg@linux.intel.com>
>>>>
>>>> Acked-by: Randy Dunlap <rdunlap@xenotime.net>
>>>>
>>>> You clearly have better build hardware than I do (a simple Core i5
>>>> laptop). ;)
>>>
>>> Thanks, and it's a surprise that you caught so many bugs with a laptop! ;)
>>
>> Well, that "automation" stuff helps. It runs overnight while I sleep,
>> then I report results during the day.
>
> Kudos! I never thought of utilizing my laptop this way at night.
> Hmm, not a bad idea, especially during the code winter ;-)
>
> Do you do auto bisections when catch any build errors?
Nope, I don't even use git trees for linux-next, just the daily
tarball.
--
~Randy
^ permalink raw reply
* linux-next: manual merge of the tip tree with the jdelvare-hwmon tree
From: Stephen Rothwell @ 2012-06-25 5:01 UTC (permalink / raw)
To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra
Cc: linux-next, linux-kernel, Jan Beulich, Jean Delvare
[-- Attachment #1: Type: text/plain, Size: 1134 bytes --]
Hi all,
Today's linux-next merge of the tip tree got a conflict in
drivers/hwmon/coretemp.c between commit 3c1aae21b09d ("hwmon: struct
x86_cpu_id arrays can be __initconst") from the jdelvare-hwmon tree and
commit 3bac8715443f ("x86, cpufeature: Rename X86_FEATURE_DTS to
X86_FEATURE_DTHERM") from the tip tree.
Just context changes. I fixed it up (see below) and can carry the fix as
necessary.
P.S. that tip tree commit has no Signed-off-by line at all :-(
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
diff --cc drivers/hwmon/coretemp.c
index b405781,637c51c..0000000
--- a/drivers/hwmon/coretemp.c
+++ b/drivers/hwmon/coretemp.c
@@@ -793,8 -793,8 +793,8 @@@ static struct notifier_block coretemp_c
.notifier_call = coretemp_cpu_callback,
};
-static const struct x86_cpu_id coretemp_ids[] = {
+static const struct x86_cpu_id __initconst coretemp_ids[] = {
- { X86_VENDOR_INTEL, X86_FAMILY_ANY, X86_MODEL_ANY, X86_FEATURE_DTS },
+ { X86_VENDOR_INTEL, X86_FAMILY_ANY, X86_MODEL_ANY, X86_FEATURE_DTHERM },
{}
};
MODULE_DEVICE_TABLE(x86cpu, coretemp_ids);
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* Re: error: implicit declarations of BUG/BUG_ON/WARN_ON/WARN_ON_ONCE
From: Fengguang Wu @ 2012-06-25 4:55 UTC (permalink / raw)
To: Randy Dunlap
Cc: Paul Mundt, Stephen Rothwell, linux-next, LKML, Arnd Bergmann
In-Reply-To: <4FE7EB96.4050908@xenotime.net>
On Sun, Jun 24, 2012 at 09:39:50PM -0700, Randy Dunlap wrote:
> On 06/24/2012 09:38 PM, Fengguang Wu wrote:
>
> > On Sun, Jun 24, 2012 at 09:23:38PM -0700, Randy Dunlap wrote:
> >> On 06/24/2012 09:20 PM, Fengguang Wu wrote:
> >>
> >>> Hi Paul,
> >>>
> >>> The patch builds fine, thank you!
> >>>
> >>> Tested-by: Fengguang Wu <wfg@linux.intel.com>
> >>
> >> Acked-by: Randy Dunlap <rdunlap@xenotime.net>
> >>
> >> You clearly have better build hardware than I do (a simple Core i5
> >> laptop). ;)
> >
> > Thanks, and it's a surprise that you caught so many bugs with a laptop! ;)
>
> Well, that "automation" stuff helps. It runs overnight while I sleep,
> then I report results during the day.
Kudos! I never thought of utilizing my laptop this way at night.
Hmm, not a bad idea, especially during the code winter ;-)
Do you do auto bisections when catch any build errors?
Thanks,
Fengguang
^ permalink raw reply
* Re: error: implicit declarations of BUG/BUG_ON/WARN_ON/WARN_ON_ONCE
From: Paul Mundt @ 2012-06-25 4:54 UTC (permalink / raw)
To: Randy Dunlap
Cc: Fengguang Wu, Stephen Rothwell, linux-next, LKML, Arnd Bergmann
In-Reply-To: <4FE7E7CA.2030706@xenotime.net>
On Sun, Jun 24, 2012 at 09:23:38PM -0700, Randy Dunlap wrote:
> On 06/24/2012 09:20 PM, Fengguang Wu wrote:
>
> > Hi Paul,
> >
> > The patch builds fine, thank you!
> >
> > Tested-by: Fengguang Wu <wfg@linux.intel.com>
>
>
> You clearly have better build hardware than I do (a simple Core i5
> laptop). ;)
>
> Acked-by: Randy Dunlap <rdunlap@xenotime.net>
>
> Thanks.
>
Great, I'll send it off to Linus, thanks for testing.
^ permalink raw reply
* Re: error: implicit declarations of BUG/BUG_ON/WARN_ON/WARN_ON_ONCE
From: Randy Dunlap @ 2012-06-25 4:39 UTC (permalink / raw)
To: Fengguang Wu
Cc: Paul Mundt, Stephen Rothwell, linux-next, LKML, Arnd Bergmann
In-Reply-To: <20120625043836.GA11937@localhost>
On 06/24/2012 09:38 PM, Fengguang Wu wrote:
> On Sun, Jun 24, 2012 at 09:23:38PM -0700, Randy Dunlap wrote:
>> On 06/24/2012 09:20 PM, Fengguang Wu wrote:
>>
>>> Hi Paul,
>>>
>>> The patch builds fine, thank you!
>>>
>>> Tested-by: Fengguang Wu <wfg@linux.intel.com>
>>
>> Acked-by: Randy Dunlap <rdunlap@xenotime.net>
>>
>> You clearly have better build hardware than I do (a simple Core i5
>> laptop). ;)
>
> Thanks, and it's a surprise that you caught so many bugs with a laptop! ;)
Well, that "automation" stuff helps. It runs overnight while I sleep,
then I report results during the day.
> Thanks,
> Fengguang
>
>>>> I'm really starting to loathe this header. This should take care of it:
>>>>
>>>> ---
--
~Randy
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox