Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp1096263pxb; Fri, 15 Apr 2022 21:26:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxR4IvMt4dUVzn5r3iBBhR6b4QYaMRdong/yJEM3SI1+tpZFKVQ5MZttUVZVUQt8MwWErRL X-Received: by 2002:a63:db57:0:b0:39d:48fc:f4ca with SMTP id x23-20020a63db57000000b0039d48fcf4camr1637646pgi.504.1650083207300; Fri, 15 Apr 2022 21:26:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650083207; cv=none; d=google.com; s=arc-20160816; b=FUXVQSEuLOPimuAByuWpoU4+80vPGZmW8hSSajEHos+kZjpGAy/QSg/ruMXq29O0JV jKMzyNfXZVPDhSXCrj/aCWhCbQ3FmDF5zVKW/oyWC+nPbkEDknZhBciUh+mHqTRMX52M Wa7DKBGf7jvd8j02hGfKFJtqRwwtqxT6LYSFajFAOCH8ayShM1I8VVXKk5rQq9oCdtlU rqSSaNArsevuf2h+2XtquX5jSuVIKArMIescFKzXXh3bx6gGBhk/PVGgvqO24Lpz4dqm Va6rdz9l0KEemZsrhoNbgSD82ky1Uj2c31Okb5s/0d7CDHmUn2JStjHjNTTBPRL6IsFE Otmg== 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=YHa9xpmpQgFowTSdL/t8+epnXDfvtPah99zB0+ARL/EvRAMJLGiEx6EQeGfsiYFpOz bKm+6/R0kYlbv5gT0I42oOz21aH3QJkLhQb0BimUSNTpHwTaCRWbg/pw8YNuNxrs3GKF 9nvRahfTuAfT7XiNuAbRA54By//1FtdpWXAf0jvOhfjUArsDv1VJT+my1z4CWd7kvHNx H8OBS7EUgYf6gslw4jRCsbkkR7qmLMHGGzyU9eaNJS4H/2N4E7gqJ4SAIcniooMoadhs 6GOMjoALKk6aRbD8X8w0Yv/aT7yw2+II7mCHzGRmn2VvtCKSfGEqLllye/xH8k8zgU+t aOZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Tis1KX6E; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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. [23.128.96.19]) by mx.google.com with ESMTPS id u2-20020a170902e80200b0015408cd595asi3214596plg.27.2022.04.15.21.26.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 21:26:47 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Tis1KX6E; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 EE70110FDEA; Fri, 15 Apr 2022 21:26:43 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230039AbiDPE3C (ORCPT + 99 others); Sat, 16 Apr 2022 00:29:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35438 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230015AbiDPE2x (ORCPT ); Sat, 16 Apr 2022 00:28:53 -0400 Received: from mail-pg1-x535.google.com (mail-pg1-x535.google.com [IPv6:2607:f8b0:4864:20::535]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C17310EDFD for ; Fri, 15 Apr 2022 21:26:23 -0700 (PDT) Received: by mail-pg1-x535.google.com with SMTP id r66so9618323pgr.3 for ; Fri, 15 Apr 2022 21:26:23 -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=Tis1KX6EZl0CEKsRc59x2S7dPKnR1WEi934au/E3F0d/WbgTIwTiOB8mewL/VD91Xs NVNfuXcfxjgdV732Lu5b4Cl4SjcXXhDmgDmEfFQYnwEEITd8cRsddJLvRqQeB1nN5UfY 1GhLBRb5baZWBJzDprbY1pFcugB/2KldCaTKCxhaYZaG80vcMypoQfzg8fuiGo9eGB7r yQ33Hv8IcLj2cP6UQGxKoI91xU8CBE3c1FBGN5nCn05e8F4PyMKg9z8DHT1FEG4BABJq P7AQC1/5enx+JxOt1ehoUlnvz+mHnSvg7RW7vJkdjXE/8EGXtyRNu0EiAkzfxqbCsYFg Kp6g== 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=RQqunYsz3TNA5AVuvKcQPiYosRnTG/yx0IHYg1m4PHx0LVsWUjVjliLPEjZbPcRrO3 oEgeNQ1dCnbNDRo5loEaSeV4Ntgs3vFbzf+pXfgIJt5DCN/pfEbopx9Dk8csvNT1mYVc jiV1CE5UddsDJhpRejPps/ADrwMGH3U8ylHuZP8SLe08vGKsQGcrVH58/PDS8x2I11tV BzOQNoAt4y0RaJbRIcqlyaI0QD5Q03YbmoHvIM3DqGiP/OhEiq2LITxWp3lOSrPvnm3s JIb2OqVy8CfnBZRbd8GqDmiJcpB7mBinORANq+JSpGduafaB4xZqDEtvTA3k7KVLfP9v RSgQ== X-Gm-Message-State: AOAM531thWV78hUMc35zgYtqZBIiRb9sJSmRNlnzWiY2d9Y0qjsOJNOY AAtqp2+dJLKs6ray1PwtJ9Y= X-Received: by 2002:a05:6a00:2391:b0:50a:3ea9:e84d with SMTP id f17-20020a056a00239100b0050a3ea9e84dmr2185640pfc.21.1650083182710; Fri, 15 Apr 2022 21:26:22 -0700 (PDT) Received: from octofox.hsd1.ca.comcast.net ([2601:641:401:1d20:9b6:6aad:72f6:6e16]) by smtp.gmail.com with ESMTPSA id d8-20020aa78688000000b00505793566f7sm4258513pfo.211.2022.04.15.21.26.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 21:26:22 -0700 (PDT) From: Max Filippov To: linux-xtensa@linux-xtensa.org Cc: Chris Zankel , linux-kernel@vger.kernel.org, Max Filippov Subject: [PATCH 4/6] xtensa: use callx0 opcode in fast_coprocessor Date: Fri, 15 Apr 2022 21:25:57 -0700 Message-Id: <20220416042559.2035015-5-jcmvbkbc@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220416042559.2035015-1-jcmvbkbc@gmail.com> References: <20220416042559.2035015-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,T_SCC_BODY_TEXT_LINE 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