From patchwork Sat Jul 11 23:46:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Schwierzeck X-Patchwork-Id: 1327444 X-Patchwork-Delegate: daniel.schwierzeck@googlemail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=sxbxahuS; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4B465W3JqKz9sRN for ; Sun, 12 Jul 2020 09:47:11 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3EADF821FE; Sun, 12 Jul 2020 01:46:38 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="sxbxahuS"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9AC2081F80; Sun, 12 Jul 2020 01:46:29 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ej1-x641.google.com (mail-ej1-x641.google.com [IPv6:2a00:1450:4864:20::641]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 573DA81F80 for ; Sun, 12 Jul 2020 01:46:25 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=daniel.schwierzeck@gmail.com Received: by mail-ej1-x641.google.com with SMTP id p20so10218847ejd.13 for ; Sat, 11 Jul 2020 16:46:25 -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 :mime-version:content-transfer-encoding; bh=SoqZu+GZPqKhhJ7y2NfjkfVamGhyInPCJv3dnWW/FLU=; b=sxbxahuSAc66aeNnFYvCMA8OuIyHQbIEOsWgAamf08D4KPS6LAcVitrFQtBwMFtzPM 9obmAc45FysObn0dKq1cmtKzj9pO7XflpvEsFxnobP69G1XY2oZV/Drf5kbk7E3Jy4vk DjLbj8Z0of62EWCB5TByMEfB9II1nxiP6X7ajTHGAc6GC2sPX4qn4cRjO1gMcjgNuE6D GSqmlgqLjcQh/YANOlhwsYPtSrpZ5N9iHJ5M4laywLZg3eMxkW//2/tTgiP3qsKdp4Hp nrDDDb6oAOi8ocs9oTGbk722QBG3+uuYxkIxE4Jqi0z92esTSvydEPUewMJaQWzO1SpV G0Ug== 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:mime-version:content-transfer-encoding; bh=SoqZu+GZPqKhhJ7y2NfjkfVamGhyInPCJv3dnWW/FLU=; b=a5Sqh/mFlie83allXoRbGCxESrdUUeUgUxk5jXsQKPgX+q87MIQH53JXTLPUlJZN5y LyJWt0zvpUyklVIMp4Z42aDxQxc+empFh437/gNHJlARYxxUURhRK74PYy64SgJ0pAdz b5wni13kue9BkcaU1BDyhqaU60rRYj5IiW3GnMStz8kEVj0SopzY/j+2tds5pWXq8oal BwEL8EisASh4lBxeeove7uoLSBK6dgJh9fWvNVfEABUy7h0IuzcvhlKa7SfXjhfEOWh4 S7utx8sZ/kIeLBg987eUxy1J6KBwXnj4d/UF7rpfvXxIP0vyieXqcq8T5mGtUra5mGWS kegQ== X-Gm-Message-State: AOAM5337ec2Vg78slysbTy69RlPdqEGKuvAv+yvmvr2grYxQ+TpOCYOP 55lIKGdM6sPC3zZ1zsv7InGFy45C X-Google-Smtp-Source: ABdhPJxlEJJe6Gtf7Znlx8UR8fQlKvxSzKjuaMoN6/PENICNyS3y6wK1/Xqb1K3uk2JBjiUQ9Wb+EA== X-Received: by 2002:a17:906:c007:: with SMTP id e7mr882577ejz.481.1594511184694; Sat, 11 Jul 2020 16:46:24 -0700 (PDT) Received: from workstation.lan.schwierd.dedyn.io ([2001:16b8:559e:4701:4026:74cf:a34a:dfa1]) by smtp.gmail.com with ESMTPSA id s24sm6363403ejv.110.2020.07.11.16.46.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Jul 2020 16:46:24 -0700 (PDT) From: Daniel Schwierzeck To: u-boot@lists.denx.de Cc: Aaron Williams , Stefan Roese , Daniel Schwierzeck Subject: [PATCH 2/4] mips: sync asm/asm.h with Linux 5.7 Date: Sun, 12 Jul 2020 01:46:16 +0200 Message-Id: <20200711234618.943362-3-daniel.schwierzeck@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200711234618.943362-1-daniel.schwierzeck@gmail.com> References: <20200711234618.943362-1-daniel.schwierzeck@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean Sync asm/asm.h with Linux 5.7. Signed-off-by: Daniel Schwierzeck Reviewed-by: Stefan Roese Tested-by: Stefan Roese --- arch/mips/include/asm/asm.h | 130 +++--------------------------------- 1 file changed, 10 insertions(+), 120 deletions(-) diff --git a/arch/mips/include/asm/asm.h b/arch/mips/include/asm/asm.h index 7abcf6df07..a6876e1b07 100644 --- a/arch/mips/include/asm/asm.h +++ b/arch/mips/include/asm/asm.h @@ -16,37 +16,12 @@ #include -#ifndef CAT -#ifdef __STDC__ -#define __CAT(str1, str2) str1##str2 -#else -#define __CAT(str1, str2) str1/**/str2 -#endif -#define CAT(str1, str2) __CAT(str1, str2) -#endif - -/* - * PIC specific declarations - * Not used for the kernel but here seems to be the right place. - */ -#ifdef __PIC__ -#define CPRESTORE(register) \ - .cprestore register -#define CPADD(register) \ - .cpadd register -#define CPLOAD(register) \ - .cpload register -#else -#define CPRESTORE(register) -#define CPADD(register) -#define CPLOAD(register) -#endif - #define ENTRY(symbol) \ .globl symbol; \ .type symbol, @function; \ .ent symbol, 0; \ -symbol: +symbol: .cfi_startproc; \ + .insn /* * LEAF - declare leaf routine @@ -57,7 +32,9 @@ symbol: .type symbol, @function; \ .ent symbol, 0; \ .section .text.symbol, "x"; \ -symbol: .frame sp, 0, ra +symbol: .frame sp, 0, ra; \ + .cfi_startproc; \ + .insn /* * NESTED - declare nested routine entry point @@ -68,12 +45,15 @@ symbol: .frame sp, 0, ra .type symbol, @function; \ .ent symbol, 0; \ .section .text.symbol, "x"; \ -symbol: .frame sp, framesize, rpc +symbol: .frame sp, framesize, rpc; \ + .cfi_startproc; \ + .insn /* * END - mark end of function */ #define END(function) \ + .cfi_endproc; \ .end function; \ .size function, .-function @@ -90,7 +70,7 @@ symbol: #define FEXPORT(symbol) \ .globl symbol; \ .type symbol, @function; \ -symbol: +symbol: .insn /* * ABS - export absolute symbol @@ -128,96 +108,6 @@ symbol = value 8: .asciiz msg; \ .popsection; -/* - * Build text tables - */ -#define TTABLE(string) \ - .pushsection .text; \ - .word 1f; \ - .popsection \ - .pushsection .data; \ -1: .asciiz string; \ - .popsection - -/* - * MIPS IV pref instruction. - * Use with .set noreorder only! - * - * MIPS IV implementations are free to treat this as a nop. The R5000 - * is one of them. So we should have an option not to use this instruction. - */ -#ifdef CONFIG_CPU_HAS_PREFETCH - -#define PREF(hint, addr) \ - .set push; \ - .set arch=r5000; \ - pref hint, addr; \ - .set pop - -#define PREFE(hint, addr) \ - .set push; \ - .set mips0; \ - .set eva; \ - prefe hint, addr; \ - .set pop - -#define PREFX(hint, addr) \ - .set push; \ - .set arch=r5000; \ - prefx hint, addr; \ - .set pop - -#else /* !CONFIG_CPU_HAS_PREFETCH */ - -#define PREF(hint, addr) -#define PREFE(hint, addr) -#define PREFX(hint, addr) - -#endif /* !CONFIG_CPU_HAS_PREFETCH */ - -/* - * MIPS ISA IV/V movn/movz instructions and equivalents for older CPUs. - */ -#if (_MIPS_ISA == _MIPS_ISA_MIPS1) -#define MOVN(rd, rs, rt) \ - .set push; \ - .set reorder; \ - beqz rt, 9f; \ - move rd, rs; \ - .set pop; \ -9: -#define MOVZ(rd, rs, rt) \ - .set push; \ - .set reorder; \ - bnez rt, 9f; \ - move rd, rs; \ - .set pop; \ -9: -#endif /* _MIPS_ISA == _MIPS_ISA_MIPS1 */ -#if (_MIPS_ISA == _MIPS_ISA_MIPS2) || (_MIPS_ISA == _MIPS_ISA_MIPS3) -#define MOVN(rd, rs, rt) \ - .set push; \ - .set noreorder; \ - bnezl rt, 9f; \ - move rd, rs; \ - .set pop; \ -9: -#define MOVZ(rd, rs, rt) \ - .set push; \ - .set noreorder; \ - beqzl rt, 9f; \ - move rd, rs; \ - .set pop; \ -9: -#endif /* (_MIPS_ISA == _MIPS_ISA_MIPS2) || (_MIPS_ISA == _MIPS_ISA_MIPS3) */ -#if (_MIPS_ISA == _MIPS_ISA_MIPS4 ) || (_MIPS_ISA == _MIPS_ISA_MIPS5) || \ - (_MIPS_ISA == _MIPS_ISA_MIPS32) || (_MIPS_ISA == _MIPS_ISA_MIPS64) -#define MOVN(rd, rs, rt) \ - movn rd, rs, rt -#define MOVZ(rd, rs, rt) \ - movz rd, rs, rt -#endif /* MIPS IV, MIPS V, MIPS32 or MIPS64 */ - /* * Stack alignment */