public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: rubini@gnudd.com (Alessandro Rubini)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] amba-pl011: fix panic introduced by "clear pending interrupts"
Date: Mon, 26 Mar 2012 22:32:09 +0200	[thread overview]
Message-ID: <20120326203209.GA8182@mail.gnudd.com> (raw)

patch 9b96fba, currently in linux-next, clears interrupts using
uap->port.membase that has not been assigned.  My x86 system,
that uses a pci-to-amba bridge, panics with a message like:

   BUG: unable to handle kernel NULL pointer dereference at 00000038
   IP: [<c12c85ed>] pl011_probe+0x119/0x303

Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
Acked-by: Giancarlo Asnaghi <giancarlo.asnaghi@st.com>
---
 drivers/tty/serial/amba-pl011.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
index 2b4e981..38c992d 100644
--- a/drivers/tty/serial/amba-pl011.c
+++ b/drivers/tty/serial/amba-pl011.c
@@ -1947,8 +1947,8 @@ static int pl011_probe(struct amba_device *dev, const struct amba_id *id)
 	}
 
 	/* Ensure interrupts from this UART are masked and cleared */
-	writew(0, uap->port.membase + UART011_IMSC);
-	writew(0xffff, uap->port.membase + UART011_ICR);
+	writew(0, base + UART011_IMSC);
+	writew(0xffff, base + UART011_ICR);
 
 	uap->vendor = vendor;
 	uap->lcrh_rx = vendor->lcrh_rx;
-- 
1.7.7.2

             reply	other threads:[~2012-03-26 20:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-26 20:32 Alessandro Rubini [this message]
2012-03-27  7:07 ` [PATCH] amba-pl011: fix panic introduced by "clear pending interrupts" Linus Walleij
2012-03-27 12:12 ` Sergei Shtylyov

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=20120326203209.GA8182@mail.gnudd.com \
    --to=rubini@gnudd.com \
    --cc=linux-arm-kernel@lists.infradead.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