Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp827540pxb; Fri, 22 Apr 2022 12:03:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxMT7s5kopyWhgVZ9KYfBlAqiifVyY1/q1aMEJJpZg+JppWykXLHjvShz5O3hDS2nBpbDxo X-Received: by 2002:a05:6870:9a21:b0:e5:c836:9456 with SMTP id fo33-20020a0568709a2100b000e5c8369456mr2646825oab.282.1650654202429; Fri, 22 Apr 2022 12:03:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650654202; cv=none; d=google.com; s=arc-20160816; b=qF8ylIE+2xR8Zv4mi81YUJqy2XoW1b7fj28AOXfVsPztXNSVydIq4zJ+gqHkoa7vU/ G//HTe0vfE5EIIpaZiSOinze0oiFCoIuadPybnvTcQJPRPHcrRA6lE/nlUiqI826W89j fY8PMmC9h7B3eObDmIvj2oSLXnmr1k8etee7Iy+L+rYbKS/aGHSKSeNMs0tpeUqUc3+Y d4X1eCm2aigrOVEssjNMOaIs2I9M68mPX3MfJGN6UM9Y0tp056+R4HJnlwUqtFYyPooQ OyAEh+pvcyIT7h1bT18En324KMRlLHNjrTw3iNJgp8NaU4I2BQWKDVPpr/z5PF+a0xcu xyNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=8Y9Xga+Vf57beXiQKhYl2BdatYUIL77DBx/0ziFkle0=; b=JUlasA6OF8Y89BtMHlsaW6Unk4y9cmQO7D74dwTcZcileHlGckB1VNAAeqM1xD6AqP cz9D5z9NRC/3YCngB6gSwF8AvOrbxos9I8ljnJxL3+9/zdQEi8Orz9Lsdxr5P65UfUkn CTCohYblfTNChHuwpVcojB5kTOfVyZv0Xs2k00MTJb2wPDmN0bwUYyxDSM7jbs2CrtEu dEPpFsp/VjEFFxwNxmVy2c9tKQZ4VV/nKvbVCO2GAFIxl9LT+ZYZR470Lz28xdTEodap HtqfWJrv1Se5rsOi5UPDFSKaOqc39rshUL55k4X4IFZXMaWRr4L6DhkKdX/aaNk6fm5X QlKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=JAZkFfJ7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id t12-20020a0568301e2c00b00605442443fdsi5235016otr.310.2022.04.22.12.03.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 12:03:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=JAZkFfJ7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 272831472F3; Fri, 22 Apr 2022 11:24:14 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1388190AbiDUKOW (ORCPT + 99 others); Thu, 21 Apr 2022 06:14:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39822 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1388126AbiDUKNv (ORCPT ); Thu, 21 Apr 2022 06:13:51 -0400 Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2294CC27 for ; Thu, 21 Apr 2022 03:11:02 -0700 (PDT) Received: by mail-pj1-x102a.google.com with SMTP id md20-20020a17090b23d400b001cb70ef790dso7320605pjb.5 for ; Thu, 21 Apr 2022 03:11:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=8Y9Xga+Vf57beXiQKhYl2BdatYUIL77DBx/0ziFkle0=; b=JAZkFfJ7+0JGkIeYyVaeB4LmiW1XmZaU1cmKe9i/k7EtpF4WNVWAe+hmsZtaqwDuuJ cQPTRZ9jeBGZs4CE9oC/1fUOZ1YmuMXCY2KuUaSwPrEK8ogBw27qVe/kMNx6Z0pU8tXE qp+opEdKWZu84NT+UiVddz0MQa8WRKrFDx8pguYw6eC33C64paxkTleeLgmLQpNrOOgV VesmXJwKStxbpeGvktVyD4k10LP2nGwzbMjQc2Z4XRUwooUIjHKQuqfYsHWykeWEdn6W DF2MqLmkcjuiD74Z73OaVUp2vzH/cqxv1o3eEcP5+WocHhYbQ+vR+nQ5MOrN0I8l39eJ NbEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=8Y9Xga+Vf57beXiQKhYl2BdatYUIL77DBx/0ziFkle0=; b=472h9yx5xlju0QnXL42YU3v0KLknNtbwg09XiOe3LkM+U6QU08CfCDIl3Zj2V2SOWI +vk+dW0ZfvWroU4+bv1n+XbfpaRVMBkc8j/+u3FYpKgKVgQsCQWUuvoh6JW98wHCq13l R3a6FyZBD3765DWY+JMo+q46QYgXE8N3tUhy+B7V2TmNqPr55NR5OxXD8rzF7bTRXPe1 B2qHOWTKP4mARMyHcRADoZ6Eu83OcRwgbaRyH/doJ32W0+Rge0sRzPjGWCmJ1wmpLtv1 CganNAk4wy6abLv+rP/IzAHqd3kRidoh0ttahQIrD5L5FWbozNrHwtboNkk5mIrFpsMa Uq4g== X-Gm-Message-State: AOAM531R7URzv2MpGZP2f/8OeXT1JiCJ2EjdZ/k0AAsWDbiIhJaF9cFN +4EjsMuXd6lVI55tEqbX2rE= X-Received: by 2002:a17:903:2302:b0:158:cef1:79b9 with SMTP id d2-20020a170903230200b00158cef179b9mr25232476plh.64.1650535861665; Thu, 21 Apr 2022 03:11:01 -0700 (PDT) Received: from octofox.hsd1.ca.comcast.net ([2601:641:401:1d20:df13:3d47:8c92:6576]) by smtp.gmail.com with ESMTPSA id w196-20020a6282cd000000b0050ada022940sm2407806pfd.183.2022.04.21.03.11.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Apr 2022 03:11:00 -0700 (PDT) From: Max Filippov To: linux-xtensa@linux-xtensa.org Cc: Chris Zankel , linux-kernel@vger.kernel.org, Max Filippov Subject: [PATCH v2 05/10] xtensa: use callx0 opcode in fast_coprocessor Date: Thu, 21 Apr 2022 03:10:28 -0700 Message-Id: <20220421101033.216394-6-jcmvbkbc@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220421101033.216394-1-jcmvbkbc@gmail.com> References: <20220421101033.216394-1-jcmvbkbc@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, FROM_LOCAL_NOVOWEL,HEADER_FROM_DIFFERENT_DOMAINS,HK_RANDOM_FROM, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Instead of emulating call0 in fast_coprocessor use that opcode directly. Use 'ret' instead of 'jx a0'. Signed-off-by: Max Filippov --- arch/xtensa/kernel/coprocessor.S | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/arch/xtensa/kernel/coprocessor.S b/arch/xtensa/kernel/coprocessor.S index c7b9f12896f2..8bcbabbff38a 100644 --- a/arch/xtensa/kernel/coprocessor.S +++ b/arch/xtensa/kernel/coprocessor.S @@ -30,7 +30,7 @@ .align 4; \ .Lsave_cp_regs_cp##x: \ xchal_cp##x##_store a2 a3 a4 a5 a6; \ - jx a0; \ + ret; \ .endif #define SAVE_CP_REGS_TAB(x) \ @@ -47,7 +47,7 @@ .align 4; \ .Lload_cp_regs_cp##x: \ xchal_cp##x##_load a2 a3 a4 a5 a6; \ - jx a0; \ + ret; \ .endif #define LOAD_CP_REGS_TAB(x) \ @@ -163,21 +163,20 @@ ENTRY(fast_coprocessor) s32i a5, a4, THREAD_CPENABLE /* - * Get context save area and 'call' save routine. + * Get context save area and call save routine. * (a4 still holds previous owner (thread_info), a3 CP number) */ movi a5, .Lsave_cp_regs_jump_table - movi a0, 2f # a0: 'return' address addx8 a3, a3, a5 # a3: coprocessor number l32i a2, a3, 4 # a2: xtregs offset l32i a3, a3, 0 # a3: jump address add a2, a2, a4 - jx a3 + callx0 a3 /* Note that only a0 and a1 were preserved. */ -2: rsr a3, exccause + rsr a3, exccause addi a3, a3, -EXCCAUSE_COPROCESSOR0_DISABLED movi a0, coprocessor_owner addx4 a0, a3, a0 @@ -187,19 +186,18 @@ ENTRY(fast_coprocessor) 1: GET_THREAD_INFO (a4, a1) s32i a4, a0, 0 - /* Get context save area and 'call' load routine. */ + /* Get context save area and call load routine. */ movi a5, .Lload_cp_regs_jump_table - movi a0, 1f addx8 a3, a3, a5 l32i a2, a3, 4 # a2: xtregs offset l32i a3, a3, 0 # a3: jump address add a2, a2, a4 - jx a3 + callx0 a3 /* Restore all registers and return from exception handler. */ -1: l32i a6, a1, PT_AREG6 + l32i a6, a1, PT_AREG6 l32i a5, a1, PT_AREG5 l32i a4, a1, PT_AREG4 -- 2.30.2