From patchwork Thu Feb 16 18:38:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 728872 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vPQ8k2Rgvz9s0g for ; Fri, 17 Feb 2017 05:45:58 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="nLydGoMm"; 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 3vPQ8k1LxyzDq60 for ; Fri, 17 Feb 2017 05:45:58 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="nLydGoMm"; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from mail-pf0-x243.google.com (mail-pf0-x243.google.com [IPv6:2607:f8b0:400e:c00::243]) (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 3vPQ163VBDzDqGd for ; Fri, 17 Feb 2017 05:39:22 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="nLydGoMm"; dkim-atps=neutral Received: by mail-pf0-x243.google.com with SMTP id 68so2167989pfx.2 for ; Thu, 16 Feb 2017 10:39:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=NnQvk5n0z4d7olCZ0qeigRQ+aBaT9eOAFEsI5MCdkJo=; b=nLydGoMmBHfReiE12zPUXXyK2tfzqAiopgb0IHw7SyD5Ot7q6w8gmolW+nmKLFH3tU Ki8hKWjc+CzM6675gyt3A3SfpnXFl5Pg5V1S88JQobQzNL2RNbDu40XmQE5xnKi9EBCE VO8qH61RQrV2Igrjve0qF+PGAM0HnB+DGV3/tU7QKfguDfSbk3+wtNIWS6pXobp09iIF ANvEOtU0AYsnX5+J3C5KzP9B7vbQa/q2SafbFwF8adLsjANpfx12s1TmPTjNmmioTB7u cUadlgCXDHzYlUvDMrXtamFjuTSw0SVb52cAvXKbryeHZUT4BIAHu4h19mS/OE9tP777 YIXQ== 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:in-reply-to :references; bh=NnQvk5n0z4d7olCZ0qeigRQ+aBaT9eOAFEsI5MCdkJo=; b=dK+7lXXPYXL5awMl5iEaXKQ0kD+xtgitw+i+ZsN+HfrFyNNClM8OGcaqVbx/fxhvK1 O8J+su7NvgSRXILN0Hh9XFVZ+PQkgAhRLle4w886Bj9mUT0QicfV3tLuVJLsNrNB+1A1 OsxbrKD+duIQ4NpH8fZMVyfKq1tGRWbwNYBTkpC1kdyXm1iL5fdDazz5Mj5DI6XYMKPQ yMRN9GY+JXtu3wu4h+tcVUJCEhgg7/JKbnRsH5PSTS9GEVK1gLwXXhTriOZzgbn2QFMv wxDgVcqW70F076qRFYA/82CQFEAuO3i1y06ucEk6uXlYfS8SQg7YzKDdPEbthuqOCZlK mmEg== X-Gm-Message-State: AMke39m3ARAs3fmR+YYabLiAUywi5MknM7yKr7bmAvzH6gjT6CWt9ALdpQE9svKm6H7Vxw== X-Received: by 10.84.169.67 with SMTP id g61mr5169355plb.137.1487270360555; Thu, 16 Feb 2017 10:39:20 -0800 (PST) Received: from roar.local0.net ([61.68.126.103]) by smtp.gmail.com with ESMTPSA id 67sm14933494pfd.120.2017.02.16.10.39.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Feb 2017 10:39:19 -0800 (PST) From: Nicholas Piggin To: linuxppc-dev@lists.ozlabs.org Subject: [PATCH 3/5] powerpc/64s: use alternative feature patching Date: Fri, 17 Feb 2017 04:38:59 +1000 Message-Id: <20170216183901.28611-4-npiggin@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170216183901.28611-1-npiggin@gmail.com> References: <20170216183901.28611-1-npiggin@gmail.com> X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Nicholas Piggin Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" This reduces the number of nops for POWER8 Signed-off-by: Nicholas Piggin Reviewed-by: Gautham R. Shenoy --- arch/powerpc/kernel/idle_book3s.S | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/arch/powerpc/kernel/idle_book3s.S b/arch/powerpc/kernel/idle_book3s.S index 1271344e5523..ab15dee371c9 100644 --- a/arch/powerpc/kernel/idle_book3s.S +++ b/arch/powerpc/kernel/idle_book3s.S @@ -417,13 +417,8 @@ BEGIN_FTR_SECTION rldicl r5,r5,4,60 cmpd cr4,r5,r4 bge cr4,pnv_wakeup_tb_loss - /* - * Waking up without hypervisor state loss. Return to - * reset vector - */ - blr -END_FTR_SECTION_IFSET(CPU_FTR_ARCH_300) +FTR_SECTION_ELSE /* * POWER ISA 2.07 or less. @@ -440,9 +435,13 @@ END_FTR_SECTION_IFSET(CPU_FTR_ARCH_300) * indicates we are waking with hypervisor state loss from nap. */ bgt cr3,. +ALT_FTR_SECTION_END_IFSET(CPU_FTR_ARCH_300) - blr /* Return back to System Reset vector from where - pnv_restore_hyp_resource was invoked */ + /* + * Waking up without hypervisor state loss. Return to + * reset vector + */ + blr /* * Called if waking up from idle state which can cause either partial or