Kernel Newbies archive on
 help / color / Atom feed
From: Greg KH <>
To: Muni Sekhar <>
Cc: kernelnewbies <>
Subject: Re: read the memory mapped address - pcie - kernel hangs
Date: Wed, 8 Jan 2020 20:45:03 +0100
Message-ID: <> (raw)
In-Reply-To: <>

On Thu, Jan 09, 2020 at 12:30:20AM +0530, Muni Sekhar wrote:
> Hi All,
> I have module with Xilinx FPGA. It implements UART(s), SPI(s),
> parallel I/O and interfaces them to the Host CPU via PCI Express bus.
> I see that my system freezes without capturing the crash dump for certain tests.
> I debugged this issue and it was tracked down to the ‘readl()’ in
> interrupt handler code
> In ISR, first reads the Interrupt Status register using ‘readl()’ as
> given below.
>     status = readl(ctrl->reg + INT_STATUS);
> And then clears the pending interrupts using ‘writel()’ as given blow.
>         writel(status, ctrl->reg + INT_STATUS);
> I've noticed a kernel hang if INT_STATUS register read again after
> clearing the pending interrupts.

Why would you read that register again after writing to it?

And are you sure you are reading/writing the correct size of the irq
field?  I thought it was a "word" not "long"?  But that might depend on
your hardware, do you have a pointer to the kernel driver source you are
using for all of this?


greg k-h

Kernelnewbies mailing list

  reply index

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-08 19:00 Muni Sekhar
2020-01-08 19:45 ` Greg KH [this message]
2020-01-09 11:14   ` Muni Sekhar
2020-01-09 11:37     ` Greg KH
2020-01-09 12:20       ` Muni Sekhar
2020-01-09 18:12         ` Greg KH
2020-01-10 11:15 ` Primoz Beltram
2020-01-10 14:58   ` Muni Sekhar
2020-01-10 23:03     ` Onur Atilla
2020-01-11  3:13       ` Muni Sekhar

Reply instructions:

You may reply publically 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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Kernel Newbies archive on

Archives are clonable:
	git clone --mirror kernelnewbies/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 kernelnewbies kernelnewbies/ \
	public-inbox-index kernelnewbies

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone