From patchwork Tue Jan 13 02:15:02 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zi Shen Lim X-Patchwork-Id: 5617411 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 0F4849F3A0 for ; Tue, 13 Jan 2015 02:20:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4B76C2053A for ; Tue, 13 Jan 2015 02:19:59 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 533FA204FC for ; Tue, 13 Jan 2015 02:19:58 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YAr2u-00029a-Pl; Tue, 13 Jan 2015 02:17:28 +0000 Received: from mail-gw2-out.broadcom.com ([216.31.210.63]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YAr1C-0000Xu-As for linux-arm-kernel@lists.infradead.org; Tue, 13 Jan 2015 02:15:43 +0000 X-IronPort-AV: E=Sophos;i="5.07,746,1413270000"; d="scan'208";a="54662803" Received: from irvexchcas08.broadcom.com (HELO IRVEXCHCAS08.corp.ad.broadcom.com) ([10.9.208.57]) by mail-gw2-out.broadcom.com with ESMTP; 12 Jan 2015 18:50:47 -0800 Received: from IRVEXCHSMTP1.corp.ad.broadcom.com (10.9.207.51) by IRVEXCHCAS08.corp.ad.broadcom.com (10.9.208.57) with Microsoft SMTP Server (TLS) id 14.3.174.1; Mon, 12 Jan 2015 18:15:18 -0800 Received: from mail-sj1-12.sj.broadcom.com (10.10.10.20) by IRVEXCHSMTP1.corp.ad.broadcom.com (10.9.207.51) with Microsoft SMTP Server id 14.3.174.1; Mon, 12 Jan 2015 18:16:20 -0800 Received: from lc-sj1-5011.broadcom.com (lc-sj1-5011.sj.broadcom.com [10.66.65.229]) by mail-sj1-12.sj.broadcom.com (Postfix) with ESMTP id 81B1B27A81; Mon, 12 Jan 2015 18:15:20 -0800 (PST) Received: by lc-sj1-5011.broadcom.com (Postfix, from userid 28931) id 7B4232011AC; Mon, 12 Jan 2015 18:15:20 -0800 (PST) From: Zi Shen Lim To: Subject: [PATCH boot-wrapper-aarch64 2/4] psci: remove sentinel from id_table Date: Mon, 12 Jan 2015 18:15:02 -0800 Message-ID: <1421115304-19580-3-git-send-email-zlim@broadcom.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1421115304-19580-1-git-send-email-zlim@broadcom.com> References: <1421115304-19580-1-git-send-email-zlim@broadcom.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150112_181542_470182_FEB387E6 X-CRM114-Status: UNSURE ( 7.15 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.3 (--) Cc: zlim.lnx@gmail.com, Zi Shen Lim , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Tweak the limit check in find_logical_id so we can do away with the sentinel from id_table. While at it, also remove unused label and fix up spacing. Signed-off-by: Zi Shen Lim --- psci.S | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/psci.S b/psci.S index 234493d..d045e56 100644 --- a/psci.S +++ b/psci.S @@ -69,7 +69,6 @@ vector: id_table: .quad CPU_IDS __id_end: - .quad MPIDR_INVALID .equ nr_cpus, ((__id_end - id_table) / 8) @@ -159,17 +158,16 @@ psci_cpu_on: * Clobbers x1, x2, x3 */ find_logical_id: -__find_logical_index: adr x2, id_table mov x1, xzr 1: mov x3, #nr_cpus // check we haven't walked off the end of the array cmp x1, x3 - b.gt 3f + b.ge 3f ldr x3, [x2, x1, lsl #3] cmp x3, x0 b.eq 2f add x1, x1, #1 - b 1b + b 1b 2: mov x0, x1 ret 3: mov x0, #MPIDR_INVALID