From patchwork Sat Jun 4 22:00:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zi Shen Lim X-Patchwork-Id: 9155003 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 82FED60221 for ; Sat, 4 Jun 2016 22:03:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 73306281FE for ; Sat, 4 Jun 2016 22:03:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 654AA28327; Sat, 4 Jun 2016 22:03:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 31635281FE for ; Sat, 4 Jun 2016 22:03:11 +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 1b9Jdb-0000TB-AZ; Sat, 04 Jun 2016 22:01:47 +0000 Received: from mail-pf0-x244.google.com ([2607:f8b0:400e:c00::244]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1b9JdY-0000QM-St for linux-arm-kernel@lists.infradead.org; Sat, 04 Jun 2016 22:01:45 +0000 Received: by mail-pf0-x244.google.com with SMTP id 62so14605793pfd.3 for ; Sat, 04 Jun 2016 15:01:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=nZPasN6tI6QXLDiAJ2+l/ubtbMdPxfZAzs2ouU9GSwk=; b=bBL1qBZ9W3Bq9bwOIcs1zrGEpVaay4MoLKpTo0nYlIsZcZ19KNyJW0BXY9lmjRFxB7 Xvokan1QaTVjouSCNnjUXsryc/3UlxCwWiJYcRnTpepfZXsD79cmKaRiJji8+1FQVEKc 9FbLfAUQQ7MTOF0T8UNkY0TLPOJXBJg6Zj4ajz6mictaUyIz4A/Da8gkjUTxIEk1HMVT szwolIWwRCefwDwYqy2pU2zQd8G1CiibKAXOAYCH3rl8647Fbh747atEoWO+oF4JueEM zqnm0gQ3pjjAQ1O+DpaUd4fWcds+TXhpHLe9+pbthqLy7JWn7yflfXN0Rm6wXdPBBz1n hgjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=nZPasN6tI6QXLDiAJ2+l/ubtbMdPxfZAzs2ouU9GSwk=; b=IODP+s14yZK1Y53GgvYH8tiClNBbd52BnZLhHTohc3HmA5rgAPPJaZ/ZWPf/BUHnTB WorybekjifkGiOSDv4nQxpPjxLm9EfRtmGCY822Fgutt6xVOobAhS+ZFRRgm4ZXSxRVp n3vjsL1kMbQgHuw4Cx9ba0MdCwTNFyufBMCybG35tWL5wDVstymlTpFOnSYpYtoC4WTz 7tAnrvkYAKNi1BtL2yaOD2ySjbQOqc5WDTQCU9M+dxBsne3hDYVTcBMorPr96zF2ZHD4 GjYL4Irg5JBOybCrVEV/ajHRv67YJI2kZqmDxl5UQkFym7UQlJZlW/iuZ2yKmgxSFRO+ bRPg== X-Gm-Message-State: ALyK8tLLyBiHBNr6itKz/WYyGSbfRkNDHR9FHELyQPLESwSkKEVsh3pzCQsrtDMyglG0oA== X-Received: by 10.98.5.133 with SMTP id 127mr14975654pff.110.1465077684065; Sat, 04 Jun 2016 15:01:24 -0700 (PDT) Received: from localhost.localdomain (c-73-223-118-172.hsd1.ca.comcast.net. [73.223.118.172]) by smtp.gmail.com with ESMTPSA id y186sm17385539pfb.13.2016.06.04.15.01.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 04 Jun 2016 15:01:23 -0700 (PDT) From: Zi Shen Lim To: "David S. Miller" , Catalin Marinas , Will Deacon Subject: [PATCH net-next 2/3] arm64: bpf: optimize JMP_CALL Date: Sat, 4 Jun 2016 15:00:29 -0700 Message-Id: <1465077630-633-2-git-send-email-zlim.lnx@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1465077630-633-1-git-send-email-zlim.lnx@gmail.com> References: <1465077630-633-1-git-send-email-zlim.lnx@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160604_150144_980450_BED228A0 X-CRM114-Status: UNSURE ( 8.99 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Yang Shi , Daniel Borkmann , Zi Shen Lim , Alexei Starovoitov , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Remove superfluous stack frame, saving us 3 instructions for every JMP_CALL. Signed-off-by: Zi Shen Lim --- arch/arm64/net/bpf_jit_comp.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/arch/arm64/net/bpf_jit_comp.c b/arch/arm64/net/bpf_jit_comp.c index 51abc97..7ae304e 100644 --- a/arch/arm64/net/bpf_jit_comp.c +++ b/arch/arm64/net/bpf_jit_comp.c @@ -578,11 +578,8 @@ emit_cond_jmp: const u64 func = (u64)__bpf_call_base + imm; emit_a64_mov_i64(tmp, func, ctx); - emit(A64_PUSH(A64_FP, A64_LR, A64_SP), ctx); - emit(A64_MOV(1, A64_FP, A64_SP), ctx); emit(A64_BLR(tmp), ctx); emit(A64_MOV(1, r0, A64_R(0)), ctx); - emit(A64_POP(A64_FP, A64_LR, A64_SP), ctx); break; } /* tail call */