public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Ladislav.Michl@seznam.cz
To: Tony Lindgren <tony@atomide.com>
Cc: linux-omap@vger.kernel.org,
	Alexander Shishkin <virtuoso@slind.org>,
	Kevin Hilman <khilman@deeprootsystems.com>
Subject: Re: [APPLIED] [PATCH] [RFC] OMAP: eliminate OMAP_MAX_NR_PORTS
Date: Wed, 21 Oct 2009 01:53:26 +0200	[thread overview]
Message-ID: <20091020233115.GA7363@localhost.localdomain> (raw)
In-Reply-To: <notify-1255128339@atomide.com>

On Fri, Oct 09, 2009 at 06:46:23PM -0400, Tony Lindgren wrote:
> This patch has been applied to the linux-omap
> by youw fwiendly patch wobot.
> 
> Branch in linux-omap: omap2-upstream
> 
> Initial commit ID (Likely to change): 439d2c69335a28ffdb5a9795ff384b6755ca0f7f
> 
> PatchWorks
> http://patchwork.kernel.org/patch/52477/
> 
> Git (Likely to change, and takes a while to get mirrored)
> http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=commit;h=439d2c69335a28ffdb5a9795ff384b6755ca0f7f

This patch broke all OMAP1 boards. NULL terminator entry for omap1
serial_platform_data cannot be removed just because serial driver uses
is as last entry marker. Without it we end this way:
Unable to handle kernel NULL pointer dereference at virtual address 00000028
pgd = c0004000
[00000028] *pgd=00000000
Internal error: Oops: 80000005 [#1]
last sysfs file:
Modules linked in:
CPU: 0    Not tainted  (2.6.32-rc5-06314-g4155da6-dirty #12)
PC is at 0x28
LR is at serial8250_config_port+0x184/0xc34
(...etc...)

Please consider following fix (and while there fix OMAP2 too as patch broke
it as well (untested))

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>

diff --git a/arch/arm/mach-omap1/serial.c b/arch/arm/mach-omap1/serial.c
index 9c59332..0392ff5 100644
--- a/arch/arm/mach-omap1/serial.c
+++ b/arch/arm/mach-omap1/serial.c
@@ -86,7 +86,9 @@ static struct plat_serial8250_port serial_platform_data[] = {
 		.iotype		= UPIO_MEM,
 		.regshift	= 2,
 		.uartclk	= OMAP16XX_BASE_BAUD * 16,
-	},
+	}, {
+	}
+
 };
 
 static struct platform_device serial_device = {
@@ -119,7 +121,7 @@ void __init omap_serial_init(void)
 		serial_platform_data[2].uartclk = OMAP1510_BASE_BAUD * 16;
 	}
 
-	for (i = 0; i < ARRAY_SIZE(serial_platform_data); i++) {
+	for (i = 0; i < ARRAY_SIZE(serial_platform_data) - 1; i++) {
 		unsigned char reg;
 
 		/* Static mapping, never released */
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index dabc089..ca69ffa 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -585,7 +585,7 @@ void __init omap_serial_early_init(void)
 	 * if not needed.
 	 */
 
-	for (i = 0; i < ARRAY_SIZE(omap_uart); i++) {
+	for (i = 0; i < ARRAY_SIZE(omap_uart) - 1; i++) {
 		struct omap_uart_state *uart = &omap_uart[i];
 		struct platform_device *pdev = &uart->pdev;
 		struct device *dev = &pdev->dev;
@@ -637,7 +637,7 @@ void __init omap_serial_init(void)
 {
 	int i;
 
-	for (i = 0; i < ARRAY_SIZE(omap_uart); i++) {
+	for (i = 0; i < ARRAY_SIZE(omap_uart) - 1; i++) {
 		struct omap_uart_state *uart = &omap_uart[i];
 		struct platform_device *pdev = &uart->pdev;
 		struct device *dev = &pdev->dev;

  reply	other threads:[~2009-10-20 21:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-08  9:59 [PATCH] [RFC] OMAP: eliminate OMAP_MAX_NR_PORTS virtuoso
2009-10-09 16:38 ` Kevin Hilman
2009-10-09 22:46 ` [APPLIED] " Tony Lindgren
2009-10-20 23:53   ` Ladislav.Michl [this message]
2009-10-20 22:15     ` Tony Lindgren
2009-10-20 23:01       ` Tony Lindgren
2009-10-21  0:40         ` Tony Lindgren
2009-10-21  9:48           ` Ladislav.Michl

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=20091020233115.GA7363@localhost.localdomain \
    --to=ladislav.michl@seznam.cz \
    --cc=khilman@deeprootsystems.com \
    --cc=ladis@linux-mips.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=tony@atomide.com \
    --cc=virtuoso@slind.org \
    /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