From patchwork Mon Apr 27 06:26:22 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gavin Shan X-Patchwork-Id: 464803 X-Patchwork-Delegate: benh@kernel.crashing.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 6189C140318 for ; Mon, 27 Apr 2015 16:27:48 +1000 (AEST) Received: from ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3ACD51A0758 for ; Mon, 27 Apr 2015 16:27:48 +1000 (AEST) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Received: from e23smtp08.au.ibm.com (e23smtp08.au.ibm.com [202.81.31.141]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 76BDC1A0727 for ; Mon, 27 Apr 2015 16:27:36 +1000 (AEST) Received: from /spool/local by e23smtp08.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 27 Apr 2015 16:27:36 +1000 Received: from d23dlp03.au.ibm.com (202.81.31.214) by e23smtp08.au.ibm.com (202.81.31.205) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 27 Apr 2015 16:27:34 +1000 Received: from d23relay06.au.ibm.com (d23relay06.au.ibm.com [9.185.63.219]) by d23dlp03.au.ibm.com (Postfix) with ESMTP id 562DC3578047 for ; Mon, 27 Apr 2015 16:27:34 +1000 (EST) Received: from d23av03.au.ibm.com (d23av03.au.ibm.com [9.190.234.97]) by d23relay06.au.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t3R6RPL446202906 for ; Mon, 27 Apr 2015 16:27:34 +1000 Received: from d23av03.au.ibm.com (localhost [127.0.0.1]) by d23av03.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t3R6R0bP027507 for ; Mon, 27 Apr 2015 16:27:00 +1000 Received: from ozlabs.au.ibm.com (ozlabs.au.ibm.com [9.192.253.14]) by d23av03.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id t3R6R0dV026972; Mon, 27 Apr 2015 16:27:00 +1000 Received: from bran.ozlabs.ibm.com (haven.au.ibm.com [9.192.253.15]) by ozlabs.au.ibm.com (Postfix) with ESMTP id 207B6A02C7; Mon, 27 Apr 2015 16:26:37 +1000 (AEST) Received: from gwshan (shangw.ozlabs.ibm.com [10.61.2.199]) by bran.ozlabs.ibm.com (Postfix) with ESMTP id A014D16AA02; Mon, 27 Apr 2015 16:26:36 +1000 (AEST) Received: by gwshan (Postfix, from userid 1000) id 73DB19421F8; Mon, 27 Apr 2015 16:26:36 +1000 (AEST) From: Gavin Shan To: skiboot@lists.ozlabs.org Date: Mon, 27 Apr 2015 16:26:22 +1000 Message-Id: <1430115993-20560-5-git-send-email-gwshan@linux.vnet.ibm.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1430115993-20560-1-git-send-email-gwshan@linux.vnet.ibm.com> References: <1430115993-20560-1-git-send-email-gwshan@linux.vnet.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15042706-0029-0000-0000-00000176EEBE Subject: [Skiboot] [PATCH v5 04/15] hw/phb3: Fix reserved PE# for RID unmapping X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" PE#0, instead of PE#255, is the reserved PE# on PHB3. When unmapping RID to its corresponding PE, the reserved PE is picked to cover the RID. Signed-off-by: Gavin Shan --- hw/phb3.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/phb3.c b/hw/phb3.c index c349323..031c9de 100644 --- a/hw/phb3.c +++ b/hw/phb3.c @@ -1758,7 +1758,7 @@ static int64_t phb3_set_pe(struct phb *phb, for (idx = 0; idx < RTT_TABLE_ENTRIES; idx++) p->rte_cache[idx] = pe_num; } else { - memset(p->rte_cache, 0xff, RTT_TABLE_SIZE); + memset(p->rte_cache, 0, RTT_TABLE_SIZE); } memcpy((void *)p->tbl_rtt, p->rte_cache, RTT_TABLE_SIZE); out_be64(p->regs + PHB_RTC_INVALIDATE, @@ -1768,7 +1768,7 @@ static int64_t phb3_set_pe(struct phb *phb, for (idx = 0; idx < RTT_TABLE_ENTRIES; idx++, rte++) { if ((idx & mask) != val) continue; - p->rte_cache[idx] = (action ? pe_num : 0xffff); + p->rte_cache[idx] = (action ? pe_num : 0); *rte = p->rte_cache[idx]; /*