From patchwork Wed Apr 19 13:05:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 752267 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@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 3w7N4P1rhQz9rvt for ; Wed, 19 Apr 2017 23:23:49 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="QW2f3vaa"; 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 3w7N4P0lh9zDr95 for ; Wed, 19 Apr 2017 23:23:49 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="QW2f3vaa"; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from mail-it0-x244.google.com (mail-it0-x244.google.com [IPv6:2607:f8b0:4001:c0b::244]) (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 3w7Mgy66LvzDqvk for ; Wed, 19 Apr 2017 23:06:06 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="QW2f3vaa"; dkim-atps=neutral Received: by mail-it0-x244.google.com with SMTP id a140so2675190ita.3 for ; Wed, 19 Apr 2017 06:06:06 -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:in-reply-to:references; bh=dt5PxcU3KgAuWq6fv3EQsgtCcnUgtXuKyUSZVIeYYvA=; b=QW2f3vaauNKCUHNxz7z8CXsR5xxtrnxhsPkFdTt/Tu3gDpd8VyBY+KlKys/PQfE5JN +P9KpwQ0a5mfrOVplhLd+MV6iQZr+hknMRGft6MTi/k/uOXLWiEkqB5vre9kCR0LYWVO Lh6iVI5y+/67x5dkdUhDYGePE6qLwXTtsZ4iUBJi3aZh1cALPcp1tOVHR/dkzMpV102u +omq5m/3H9O7SFsgh36aWdP7S6tI6BH4Byml+3XkOJ8Acjfu6s+ZcGiZp1aU3b9Wwfc3 it+7dx+ffVGmA/r+tCSWESK4ETXPthtL1Xw+idIMBDY1umfcJJcNDF6buAYaP5ogK0Wk 5RPQ== 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=dt5PxcU3KgAuWq6fv3EQsgtCcnUgtXuKyUSZVIeYYvA=; b=BQFSe8olkA2wwQi/4mBfbvIlvrhVUDk6PM3Q/69TkacQb+yce0SKxHlKwuuY9BsKrm nIUWN9Iqz4hafRWWxutmKlsWTNgun7L/lNmlqQxgZGfickZm2TpVCJQt30hCM3NSJgaQ zviMc1sLVqPKDy7zIQzSz/PE0+eUyJ6X9MTzwgbi4g0v+jmDCQHYmu00A9ijYbz5NETp L0fmSM+Wz6P4CI0Rz4MoL4uQoJV5+oaNp6kMjrLE8JHSy6sGheElpXy28qirrntOtFHM hKH5OFdZJPHIT1gFolT/+UzGdFwl1TsmWO6Jn6X0c7sqZP/ClLtoUpJQfzoIb47wec4J 5O2Q== X-Gm-Message-State: AN3rC/63zZPHDQXD6YzgQlTcot3Vj18hIz7p3DIP32FrHipAtmx0Jn/B 1L7PpHt4NOdS8Q== X-Received: by 10.99.185.66 with SMTP id v2mr2688998pgo.165.1492607164675; Wed, 19 Apr 2017 06:06:04 -0700 (PDT) Received: from roar.au.ibm.com (14-202-189-126.tpgi.com.au. [14.202.189.126]) by smtp.gmail.com with ESMTPSA id i15sm4728860pfj.51.2017.04.19.06.06.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Apr 2017 06:06:03 -0700 (PDT) From: Nicholas Piggin To: linuxppc-dev@lists.ozlabs.org Subject: [PATCH 1/9] powerpc/64s: Remove unnecessary relocation branch from idle handler Date: Wed, 19 Apr 2017 23:05:43 +1000 Message-Id: <20170419130551.32378-2-npiggin@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170419130551.32378-1-npiggin@gmail.com> References: <20170419130551.32378-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" The system reset idle handler system_reset_idle_common is relocated, so relocation is not required to branch to kvm_start_guest. The superfluous relocation does not result in incorrect code, but it does not compile outside of exception-64s.S (with fixed section definitions). Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/exception-64s.h | 8 -------- arch/powerpc/kernel/exceptions-64s.S | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/arch/powerpc/include/asm/exception-64s.h b/arch/powerpc/include/asm/exception-64s.h index 14752eee3d0c..ee21457e23d4 100644 --- a/arch/powerpc/include/asm/exception-64s.h +++ b/arch/powerpc/include/asm/exception-64s.h @@ -256,11 +256,6 @@ END_FTR_SECTION_NESTED(ftr,ftr,943) ld r9,area+EX_R9(r13); \ bctr -#define BRANCH_TO_KVM(reg, label) \ - __LOAD_FAR_HANDLER(reg, label); \ - mtctr reg; \ - bctr - #else #define BRANCH_TO_COMMON(reg, label) \ b label @@ -268,9 +263,6 @@ END_FTR_SECTION_NESTED(ftr,ftr,943) #define BRANCH_LINK_TO_FAR(reg, label) \ bl label -#define BRANCH_TO_KVM(reg, label) \ - b label - #define __BRANCH_TO_KVM_EXIT(area, label) \ ld r9,area+EX_R9(r13); \ b label diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S index 857bf7c5b946..7d496ee984fe 100644 --- a/arch/powerpc/kernel/exceptions-64s.S +++ b/arch/powerpc/kernel/exceptions-64s.S @@ -142,7 +142,7 @@ END_FTR_SECTION_IFCLR(CPU_FTR_ARCH_300) lbz r0,HSTATE_HWTHREAD_REQ(r13) cmpwi r0,0 beq 1f - BRANCH_TO_KVM(r10, kvm_start_guest) + b kvm_start_guest 1: #endif