Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753847AbbK0CdO (ORCPT ); Thu, 26 Nov 2015 21:33:14 -0500 Received: from szxga01-in.huawei.com ([58.251.152.64]:60813 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753716AbbK0CdL (ORCPT ); Thu, 26 Nov 2015 21:33:11 -0500 To: Marc Zyngier , LKML , linux-arm-kernel From: "majun (F)" Subject: ARM: Question about irq-gic-v3-its.c Message-ID: <5657C078.3020806@huawei.com> Date: Fri, 27 Nov 2015 10:31:20 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 Content-Type: text/plain; charset="gbk" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.235.245] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020205.5657C089.002E,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 8b322366111a763943cdbe4b88994240 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1219 Lines: 48 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@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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/