From patchwork Tue Apr 4 05:20:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oliver O'Halloran X-Patchwork-Id: 746695 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vxy5B6whKz9s2x for ; Tue, 4 Apr 2017 15:21:50 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="XQ5e1fhk"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3vxy5B5yZNzDqJ0 for ; Tue, 4 Apr 2017 15:21:50 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="XQ5e1fhk"; dkim-atps=neutral X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Received: from mail-pg0-x242.google.com (mail-pg0-x242.google.com [IPv6:2607:f8b0:400e:c05::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3vxy4t3wTQzDq7c for ; Tue, 4 Apr 2017 15:21:33 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="XQ5e1fhk"; dkim-atps=neutral Received: by mail-pg0-x242.google.com with SMTP id o123so34646526pga.1 for ; Mon, 03 Apr 2017 22:21:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=bZSAeW+2E++C/pPGyJae5HurOCkat/v9ycuXULpG+sY=; b=XQ5e1fhkBxjB6wyUHXqOD/DnywVauZJlM+trH/hlD0w5+gszZ3pTlsLYRY5gofIPSy /9j0qZxVz4Hn1dmNpG2ccGh02U0MM1kDOa0Fk3SCIwUkczKD460Pw1i2PkfzUSkxnbhj X3IeFXB3iwyKnwZn7jDUrJvmaxWnMyUWHLc1j2ZHU8wbSUMM7ecI9FyTYyl9d8JlnXFi O0sXXf1gI23ZNhFQm/f1FZ7hPPrZCavhaGQEiDR0c3B/62i4MHE4IGRLD1GlMqFVNyPX qI2il8tEPTUqlZFCHM8TIlJ4bA6Oj0KxGk3uX8JVOP8PH6Us8IDasBRK0UykMaz8TrsK +m4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=bZSAeW+2E++C/pPGyJae5HurOCkat/v9ycuXULpG+sY=; b=NfrI8wLf6/RNKygcMJEOY1wkKRILjenNqg7WhWPBzIJQbmg8Bxy2TZtbPbhDaXJnFl qWF3qg8uCVkNX51zy62ecVlozQY/8v19pTqXMjiBGc7XXzBxWyat34ogB3GWFfw97iEX 1/cUm+yiBMfJyOw33dbjPWLF2GLY+wNCG9Upe248qND2uKUsZrhCCMFMddf+DLEzHMXi D2arAoM5xWfBJnM6oSPaLW28YL/2otngFl56GYxsyo0a665l6gXKibaPfVoAqdKCjrP/ l/09qoEzCoLOdYJeqVxC/dgoB9X3mcI2Uj16Gc0vAkt61yxm8VXkAKGNQQAR3S6tlTGc rSng== X-Gm-Message-State: AFeK/H28UpD3pgNxuTlkiKPOFErg4rpohr7tEOVLzl43uFwB2fqxb51uSTFQbx0KicO+0Q== X-Received: by 10.98.77.69 with SMTP id a66mr21698655pfb.4.1491283291572; Mon, 03 Apr 2017 22:21:31 -0700 (PDT) Received: from flat-canetoad.ozlabs.ibm.com ([122.99.82.10]) by smtp.gmail.com with ESMTPSA id b14sm28847991pfh.114.2017.04.03.22.21.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Apr 2017 22:21:31 -0700 (PDT) From: Oliver O'Halloran To: skiboot@lists.ozlabs.org Date: Tue, 4 Apr 2017 15:20:47 +1000 Message-Id: <20170404052047.11096-1-oohall@gmail.com> X-Mailer: git-send-email 2.9.3 Subject: [Skiboot] [PATCH] hdata: fix reservation size X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.23 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" The hostboot reserved ranges are [start, end] pairs rather than [start, end) so we need to stick a +1 in there to calculate the size properly. Signed-off-by: Oliver O'Halloran --- hdata/memory.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hdata/memory.c b/hdata/memory.c index 9b0c7666a510..2df1136c3627 100644 --- a/hdata/memory.c +++ b/hdata/memory.c @@ -475,7 +475,8 @@ static void get_hb_reserved_mem(struct HDIF_common_hdr *ms_vpd) prlog(PR_DEBUG, "MEM: Reserve '%s' %#" PRIx64 "-%#" PRIx64 " (type/inst=0x%08x)\n", label, start_addr, end_addr, be32_to_cpu(hb_resv_mem->type_instance)); - mem_reserve_hw(label, start_addr, end_addr - start_addr); + + mem_reserve_hw(label, start_addr, end_addr - start_addr + 1); } }