linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: majun258@huawei.com (majun (F))
To: linux-arm-kernel@lists.infradead.org
Subject: ARM: Question about irq-gic-v3-its.c
Date: Fri, 27 Nov 2015 10:31:20 +0800	[thread overview]
Message-ID: <5657C078.3020806@huawei.com> (raw)

Hi Marc:
	I think there is a bug in current its_alloc_tables().
When "val |= alloc_pages - 1;" is called
the "alloc_pages" is not updated accroding to "psz" value.

I mean we need do
alloc_pages = (alloc_size / psz);

Further more, I also have a question about GITS_CBASER register.
In gic-v3 spec:

Bits [7:0]. Size. The number of '4kB' pages of physical memory provided for the command queue, minus
one.

But In its_alloc_tables() function,

alloc_pages = (alloc_size / psz);   //  majun: pze = 64KB
if (alloc_pages > GITS_BASER_PAGES_MAX) {
	alloc_pages = GITS_BASER_PAGES_MAX;
	order = get_order(GITS_BASER_PAGES_MAX * psz);
	pr_warn("ITS at 0x%lx: Device Table too large, reduce its page order to %u (%u pages)\n",
		its->phys_base, order, alloc_pages);
}
GITS_BASER_PAGES_MAX = 256
I think this value means the maximum page number of 4KB ,right ?

But when calc alloc_pages for first time, the psz = 64KB.

So, I think maybe this is a bug too.

Thanks!
Ma Jun

                 reply	other threads:[~2015-11-27  2:31 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=5657C078.3020806@huawei.com \
    --to=majun258@huawei.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;
as well as URLs for NNTP newsgroup(s).