From: Will Deacon <will.deacon@arm.com>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: "linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"devicetree-discuss@lists.ozlabs.org"
<devicetree-discuss@lists.ozlabs.org>,
"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
"linux-samsung-soc@vger.kernel.org"
<linux-samsung-soc@vger.kernel.org>,
STEricsson <STEricsson_nomadik_linux@list.st.com>
Subject: Re: [PATCH 21/31] ARM: amba: realview: get rid of private platform amba_device initializer
Date: Tue, 24 Jan 2012 16:00:44 +0000 [thread overview]
Message-ID: <20120124160044.GM19798@mudshark.cambridge.arm.com> (raw)
In-Reply-To: <E1RoAmo-0005Ff-DW@rmk-PC.arm.linux.org.uk>
Hi Russell,
On Fri, Jan 20, 2012 at 09:29:30AM +0000, Russell King - ARM Linux wrote:
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> ---
> arch/arm/mach-realview/core.h | 20 ++++-----------
> arch/arm/mach-realview/realview_eb.c | 38 +++++++++++++++---------------
> arch/arm/mach-realview/realview_pb1176.c | 38 +++++++++++++++---------------
> arch/arm/mach-realview/realview_pb11mp.c | 38 +++++++++++++++---------------
> arch/arm/mach-realview/realview_pba8.c | 38 +++++++++++++++---------------
> arch/arm/mach-realview/realview_pbx.c | 38 +++++++++++++++---------------
> 6 files changed, 100 insertions(+), 110 deletions(-)
After applying this patch, I get compile-time errors in realview_*.c.
E.g.:
arch/arm/mach-realview/realview_pb1176.c:158:1: error: ‘AACI’ undeclared here (not in a function)
arch/arm/mach-realview/realview_pb1176.c:159:1: error: ‘MMCI0’ undeclared here (not in a function)
arch/arm/mach-realview/realview_pb1176.c:160:1: error: ‘KMI0’ undeclared here (not in a function)
arch/arm/mach-realview/realview_pb1176.c:161:1: error: ‘KMI1’ undeclared here (not in a function)
arch/arm/mach-realview/realview_pb1176.c:162:1: error: ‘PB1176_UART4’ undeclared here (not in a function)
arch/arm/mach-realview/realview_pb1176.c:165:1: error: ‘PB1176_SMC’ undeclared here (not in a function)
arch/arm/mach-realview/realview_pb1176.c:166:1: error: ‘SCTL’ undeclared here (not in a function)
arch/arm/mach-realview/realview_pb1176.c:167:1: error: ‘PB1176_WATCHDOG’ undeclared here (not in a function)
arch/arm/mach-realview/realview_pb1176.c:168:1: error: ‘PB1176_GPIO0’ undeclared here (not in a function)
arch/arm/mach-realview/realview_pb1176.c:169:1: error: ‘GPIO1’ undeclared here (not in a function)
arch/arm/mach-realview/realview_pb1176.c:170:1: error: ‘GPIO2’ undeclared here (not in a function)
arch/arm/mach-realview/realview_pb1176.c:171:1: error: ‘PB1176_RTC’ undeclared here (not in a function)
arch/arm/mach-realview/realview_pb1176.c:172:1: error: ‘SCI’ undeclared here (not in a function)
arch/arm/mach-realview/realview_pb1176.c:173:1: error: ‘PB1176_UART0’ undeclared here (not in a function)
arch/arm/mach-realview/realview_pb1176.c:174:1: error: ‘PB1176_UART1’ undeclared here (not in a function)
arch/arm/mach-realview/realview_pb1176.c:175:1: error: ‘PB1176_UART2’ undeclared here (not in a function)
arch/arm/mach-realview/realview_pb1176.c:176:1: error: ‘PB1176_UART3’ undeclared here (not in a function)
arch/arm/mach-realview/realview_pb1176.c:177:1: error: ‘PB1176_SSP’ undeclared here (not in a function)
arch/arm/mach-realview/realview_pb1176.c:178:1: error: ‘PB1176_CLCD’ undeclared here (not in a function)
> diff --git a/arch/arm/mach-realview/core.h b/arch/arm/mach-realview/core.h
> index 735b57a..b1c6097 100644
> --- a/arch/arm/mach-realview/core.h
> +++ b/arch/arm/mach-realview/core.h
> @@ -28,21 +28,11 @@
> #include <asm/setup.h>
> #include <asm/leds.h>
>
> -#define AMBA_DEVICE(name,busid,base,plat) \
> -static struct amba_device name##_device = { \
> - .dev = { \
> - .coherent_dma_mask = ~0, \
> - .init_name = busid, \
> - .platform_data = plat, \
> - }, \
> - .res = { \
> - .start = REALVIEW_##base##_BASE, \
> - .end = (REALVIEW_##base##_BASE) + SZ_4K - 1, \
> - .flags = IORESOURCE_MEM, \
> - },
Which is because the old AMBA_DEVICE macro munges REALVIEW_ and _BASE
around the peripheral identifier...
> +#define APB_DEVICE(name, busid, base, plat) \
> +static AMBA_APB_DEVICE(name, busid, 0, base, base##_IRQ, plat)
> +
> +#define AHB_DEVICE(name, busid, base, plat) \
> +static AMBA_AHB_DEVICE(name, busid, 0, base, base##_IRQ, plat)
...whereas the new macros just use base directly.
Fixing the macro solves the build problem:
diff --git a/arch/arm/mach-realview/core.h b/arch/arm/mach-realview/core.h
index b1c6097..f8f2c0a 100644
--- a/arch/arm/mach-realview/core.h
+++ b/arch/arm/mach-realview/core.h
@@ -29,10 +29,10 @@
#include <asm/leds.h>
#define APB_DEVICE(name, busid, base, plat) \
-static AMBA_APB_DEVICE(name, busid, 0, base, base##_IRQ, plat)
+static AMBA_APB_DEVICE(name, busid, 0, REALVIEW_##base##_BASE, base##_IRQ, plat)
#define AHB_DEVICE(name, busid, base, plat) \
-static AMBA_AHB_DEVICE(name, busid, 0, base, base##_IRQ, plat)
+static AMBA_AHB_DEVICE(name, busid, 0, REALVIEW_##base##_BASE, base##_IRQ, plat)
struct machine_desc;
but then I see a warning during boot:
[ 1.669654] ------------[ cut here ]------------
[ 1.684021] WARNING: at drivers/amba/bus.c:514 amba_device_add+0x1b4/0x1d0()
[ 1.705585] Modules linked in:
[ 1.715195] [<c0013a00>] (unwind_backtrace+0x0/0xfc) from [<c03d1350>] (dump_stack+0x20/0x24)
[ 1.741288] [<c03d1350>] (dump_stack+0x20/0x24) from [<c001f9b8>] (warn_slowpath_common+0x5c/0x74)
[ 1.768689] [<c001f9b8>] (warn_slowpath_common+0x5c/0x74) from [<c001f9fc>] (warn_slowpath_null+0x2c/0x34)
[ 1.798165] [<c001f9fc>] (warn_slowpath_null+0x2c/0x34) from [<c023dcd4>] (amba_device_add+0x1b4/0x1d0)
[ 1.826857] [<c023dcd4>] (amba_device_add+0x1b4/0x1d0) from [<c023dd84>] (amba_device_register+0x94/0xc4)
[ 1.856106] [<c023dd84>] (amba_device_register+0x94/0xc4) from [<c0551934>] (realview_pb1176_init+0x74/0xac)
[ 1.886120] [<c0551934>] (realview_pb1176_init+0x74/0xac) from [<c054d60c>] (customize_machine+0x24/0x30)
[ 1.915340] [<c054d60c>] (customize_machine+0x24/0x30) from [<c000879c>] (do_one_initcall+0x48/0x1a0)
[ 1.943505] [<c000879c>] (do_one_initcall+0x48/0x1a0) from [<c054b870>] (kernel_init+0x80/0x128)
[ 1.970378] [<c054b870>] (kernel_init+0x80/0x128) from [<c000ea78>] (kernel_thread_exit+0x0/0x8)
[ 1.997192] ---[ end trace 1b75b31a2719ed1e ]---
I suspect that comes from PB1176_GPIO0_IRQ being -1.
Will
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2012-01-24 16:00 UTC|newest]
Thread overview: 69+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-20 9:22 [PATCH 00/31] Clean up amba/primecell bus support Russell King - ARM Linux
2012-01-20 9:22 ` [PATCH 01/31] ARM: amba: add amba_device allocation/add/put functions Russell King - ARM Linux
2012-01-20 9:23 ` [PATCH 02/31] ARM: amba: of: convert to use amba_device_alloc Russell King - ARM Linux
2012-01-20 13:58 ` Rob Herring
2012-01-20 9:23 ` [PATCH 03/31] ARM: amba: ux500: " Russell King - ARM Linux
2012-01-21 16:21 ` Srinidhi KASAGAR
2012-01-23 19:03 ` Linus Walleij
2012-01-20 9:23 ` [PATCH 04/31] ARM: amba: integrator: " Russell King - ARM Linux
2012-01-20 9:24 ` [PATCH 05/31] ARM: amba: mxs: " Russell King - ARM Linux
2012-01-20 12:25 ` Shawn Guo
2012-01-20 12:39 ` Russell King - ARM Linux
2012-01-20 9:24 ` [PATCH 06/31] ARM: amba: make irq 0 invalid Russell King - ARM Linux
2012-01-20 9:24 ` [PATCH 07/31] ARM: amba: ux500: get rid of NO_IRQ Russell King - ARM Linux
2012-01-21 16:19 ` Srinidhi KASAGAR
[not found] ` <E1RoAiE-0005Eh-7i-eh5Bv4kxaXIANfyc6IWni62ZND6+EDdj@public.gmane.org>
2012-01-23 19:04 ` Linus Walleij
2012-01-20 9:25 ` [PATCH 08/31] ARM: amba: get rid of NO_IRQ initializers Russell King - ARM Linux
2012-01-20 9:25 ` [PATCH 09/31] ARM: amba: samsung: " Russell King - ARM Linux
2012-01-21 0:28 ` Kukjin Kim
2012-01-20 9:25 ` [PATCH 10/31] ARM: amba: integrator/realview/versatile/vexpress: " Russell King - ARM Linux
2012-01-20 9:26 ` [PATCH 11/31] ARM: amba: lpc32xx: " Russell King - ARM Linux
2012-01-20 9:26 ` [PATCH 12/31] ARM: amba: mxs: " Russell King - ARM Linux
2012-01-20 12:27 ` Shawn Guo
2012-01-20 9:26 ` [PATCH 13/31] ARM: amba: nomadik: " Russell King - ARM Linux
2012-01-23 19:02 ` Linus Walleij
2012-01-20 9:27 ` [PATCH 14/31] ARM: amba: netx: " Russell King - ARM Linux
2012-01-20 9:27 ` [PATCH 15/31] ARM: amba: spear: " Russell King - ARM Linux
2012-01-20 9:30 ` Viresh Kumar
[not found] ` <20120120092207.GD1068-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2012-01-20 9:27 ` [PATCH 16/31] ARM: amba: u300: " Russell King - ARM Linux
2012-01-23 19:04 ` Linus Walleij
2012-01-20 9:28 ` [PATCH 17/31] ARM: amba: make use of -1 IRQs warn Russell King - ARM Linux
2012-01-20 9:30 ` [PATCH 24/31] ARM: amba: ep93xx: use common amba device initializers Russell King - ARM Linux
2012-01-20 16:56 ` H Hartley Sweeten
2012-01-21 0:59 ` [PATCH 00/31] Clean up amba/primecell bus support Kukjin Kim
2012-01-20 9:28 ` [PATCH 18/31] ARM: amba: provide common initializers for static amba devices Russell King - ARM Linux
2012-01-20 17:58 ` H Hartley Sweeten
2012-01-20 9:28 ` [PATCH 19/31] ARM: amba: vexpress: get rid of private platform amba_device initializer Russell King - ARM Linux
2012-01-24 14:27 ` Will Deacon
2012-01-20 9:29 ` [PATCH 20/31] ARM: amba: versatile: " Russell King - ARM Linux
2012-01-24 15:06 ` Will Deacon
2012-01-20 9:29 ` [PATCH 21/31] ARM: amba: realview: " Russell King - ARM Linux
2012-01-24 16:00 ` Will Deacon [this message]
[not found] ` <20120124160044.GM19798-MRww78TxoiP5vMa5CHWGZ34zcgK1vI+I0E9HWUfgJXw@public.gmane.org>
2012-01-24 16:23 ` Russell King - ARM Linux
2012-01-24 17:26 ` Will Deacon
2012-01-24 21:23 ` Linus Walleij
2012-01-24 21:45 ` Russell King - ARM Linux
2012-01-25 9:58 ` Will Deacon
2012-01-25 10:22 ` Russell King - ARM Linux
2012-01-25 10:39 ` Will Deacon
2012-01-25 11:06 ` Russell King - ARM Linux
2012-01-26 17:25 ` Russell King - ARM Linux
[not found] ` <20120126172527.GA12731-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2012-01-26 17:37 ` Will Deacon
2012-01-26 17:41 ` Russell King - ARM Linux
2012-01-20 9:29 ` [PATCH 22/31] ARM: amba: integrator: use common amba device initializers Russell King - ARM Linux
2012-01-24 16:13 ` Will Deacon
2012-01-20 9:30 ` [PATCH 23/31] ARM: amba: omap2: " Russell King - ARM Linux
2012-01-20 14:37 ` Tony Lindgren
2012-01-20 9:30 ` [PATCH 25/31] ARM: amba: bcmring: " Russell King - ARM Linux
2012-01-20 9:31 ` [PATCH 26/31] ARM: amba: netx: " Russell King - ARM Linux
2012-01-20 9:31 ` [PATCH 27/31] ARM: amba: lpc32xx: " Russell King - ARM Linux
2012-01-20 9:31 ` [PATCH 28/31] ARM: amba: u300: " Russell King - ARM Linux
2012-01-23 19:05 ` Linus Walleij
2012-01-20 9:32 ` [PATCH 29/31] ARM: amba: nomadik: " Russell King - ARM Linux
2012-01-23 19:02 ` Linus Walleij
2012-01-20 9:32 ` [PATCH 30/31] ARM: amba: spear: " Russell King - ARM Linux
2012-01-20 9:38 ` Viresh Kumar
2012-01-20 9:32 ` [PATCH 31/31] ARM: amba: samsung: " Russell King - ARM Linux
[not found] ` <E1RoAq3-0005GM-LI-eh5Bv4kxaXIANfyc6IWni62ZND6+EDdj@public.gmane.org>
2012-01-21 0:45 ` Kukjin Kim
2012-01-20 22:33 ` [PATCH 13/31] ARM: amba: nomadik: get rid of NO_IRQ initializers Alessandro Rubini
2012-01-20 22:33 ` [PATCH 29/31] ARM: amba: nomadik: use common amba device initializers Alessandro Rubini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120124160044.GM19798@mudshark.cambridge.arm.com \
--to=will.deacon@arm.com \
--cc=STEricsson_nomadik_linux@list.st.com \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).