Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp1428209rda; Mon, 23 Oct 2023 12:14:34 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG8DG2hj7H7l+KTRFFdwBnBHmaWoQ+pPvu9iETwwZeTMpr5VW9G1UB4imL3u2gN1xQgiDxV X-Received: by 2002:a05:6a20:7d9f:b0:15e:dc75:66a7 with SMTP id v31-20020a056a207d9f00b0015edc7566a7mr649532pzj.24.1698088474619; Mon, 23 Oct 2023 12:14:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698088474; cv=none; d=google.com; s=arc-20160816; b=VO8V/PIuaLQ4AJLws5sobl1hK6BWmgQOWcjHpAoqOwhO9XTKSKGf0f9/O1PUaWmNx/ xdquQaxUuYrzLFHGuHY/1pfdRH8kGy7YLZ6j8Ol6+xOW+cQ37l5IkuyGEGI7dSGKje3Q WB+u0SwjuY7CSd96hjtcLUvYloT+AbiQeJbaE1gb5iKFanLXA3pXH5cP5X+0/lmVlXDf T9v5d/jjIcqEuRVuVtp0BfGxNuJ1PYKPj5+aV0eyXOzzIbDC5CTFYkVD4hqnqNQLFdcJ JUsRF3qfHKhNdJ4+72ILhEFnxNDs/NjbulTtp3v/AAc+J9C4HCtwSlG7v/c3XH7aDKxW kfHw== 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 :feedback-id:dkim-signature:dkim-signature; bh=QkagzItTcmygJhd+IgCnn6qdrUYk56vVzdHfbFmNb0k=; fh=34VXqKbbbRVUWYKB0XlF9D4jmhXxe51P2+smd1zcTfU=; b=DrYSqDRG9VARC/tQBKNVU7EEeR+K0deAB812tDhTekV4p2itOL+E5S4CU1jTYQC48p kNbh/sVUIE+BTmWJcX8on6uyo17aKOVDoc+pgaxNFWP1WCvgWSo8fxnbPs0LvJ1vvimr gUnYVi6k4+fBC0K9+SZD7t/MpyP+w6Q3ANHA4kPpXtMRefBliVcKLs4WE2zdYrSnURGi ctvB1TZFCFkJQGT3OH0B0oFoGSHJ4tW3SehNuOUrKkZCNvKY7Cw19pOWBoq4ZcOgJq6C iN3av3bFdibNcXVKptqjphuQP78CnYyivSPn3yic2vnyvL+nodears33UFuHH+pjZzx/ BI8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@flygoat.com header.s=fm1 header.b="T/E/5+zQ"; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=a3K19ixh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=flygoat.com Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id w63-20020a638242000000b00578b9fb24f3si6717352pgd.633.2023.10.23.12.14.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 12:14:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@flygoat.com header.s=fm1 header.b="T/E/5+zQ"; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=a3K19ixh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=flygoat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id E056F8060C8B; Mon, 23 Oct 2023 12:14:27 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231393AbjJWTOL (ORCPT + 99 others); Mon, 23 Oct 2023 15:14:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33162 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229532AbjJWTOJ (ORCPT ); Mon, 23 Oct 2023 15:14:09 -0400 Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB1D3101; Mon, 23 Oct 2023 12:14:07 -0700 (PDT) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 31DA45C0003; Mon, 23 Oct 2023 15:14:07 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Mon, 23 Oct 2023 15:14:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=flygoat.com; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm1; t=1698088447; x= 1698174847; bh=QkagzItTcmygJhd+IgCnn6qdrUYk56vVzdHfbFmNb0k=; b=T /E/5+zQuNigcfKSF7CMZ0lO9sjt4sK4g600xMPKbt2UIj9cqjGjyKzAvWavJszQ4 cNlF4IOTus0xeZg38meeoj4lN9GH9tsGQ02xwDO+kYXN8R8aFZugbL3iZz31ybDD CLrvfKOKTdcfE5wUgcVyoaQArKmzWAw7xylbskL5pyDMfkdX7hkOrF8CP/lwHOM4 yIBeFFb40qHnaqXXN89QiewLVq+ViQ/0N+6W2HKLWxmL20mWChVY2qtpNFox5pLc i4QwvaWiu1WanHvFVjA8c3I0v1k6CDGLIASuzq0KjJ0+Z9Z8kB49mujAvjwRR4Rl PZeLcixMv78DlUnS5W1Fw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1698088447; x= 1698174847; bh=QkagzItTcmygJhd+IgCnn6qdrUYk56vVzdHfbFmNb0k=; b=a 3K19ixhUgYwupkRenvXWOt4P0RKvWT97F34PLsdEaXmBCrJmUsC1cbjF1YaDBjQb STsQMZLCKhwx4dhIJDy4vHCzKcrUl7WlrkVW/7mruUMj6IIm14Byw5hxH+Ni/Rjq SFZ3e+gWUVLlPxuEKNgKrZE4cbf/ZHuU3Ad1xDzjeyBAm33wTMPC1KpLSyVEqvcS Yp4oR/Orq+zKnTPwoA6nzmN9jj8Wbx2iM5PWLiULuIOGnrGs22Cq4kKJYs+XG2T2 luvvFIEh06VDLIo+H5gHKeckPSWIUkPwE/uhgZlNnP0qH12kINqG6/BvUvWs5/vn s6Fra68jeHfTkW+i196TQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrkeeigddufedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtke ertdertddtnecuhfhrohhmpeflihgrgihunhcujggrnhhguceojhhirgiguhhnrdihrghn ghesfhhlhihgohgrthdrtghomheqnecuggftrfgrthhtvghrnhepfeeludefheegvdeuvd dvgeekgfdvtdettdelieeihfegtedugeekhfdvhfejfedtnecuvehluhhsthgvrhfuihii vgeptdenucfrrghrrghmpehmrghilhhfrhhomhepjhhirgiguhhnrdihrghnghesfhhlhi hgohgrthdrtghomh X-ME-Proxy: Feedback-ID: ifd894703:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 23 Oct 2023 15:14:05 -0400 (EDT) From: Jiaxun Yang To: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org, tsbogend@alpha.franken.de, gregory.clement@bootlin.com, vladimir.kondratiev@intel.com, Jiaxun Yang Subject: [PATCH 1/5] MIPS: Export higher/highest relocation functions in uasm Date: Mon, 23 Oct 2023 20:13:56 +0100 Message-Id: <20231023191400.170052-2-jiaxun.yang@flygoat.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231023191400.170052-1-jiaxun.yang@flygoat.com> References: <20231023191400.170052-1-jiaxun.yang@flygoat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Mon, 23 Oct 2023 12:14:28 -0700 (PDT) Export uasm_rel_{higher,highest} functions. Those functions can be helpful in dealing with 64bit immediates. Signed-off-by: Jiaxun Yang --- arch/mips/include/asm/uasm.h | 2 ++ arch/mips/mm/uasm.c | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/arch/mips/include/asm/uasm.h b/arch/mips/include/asm/uasm.h index 296bcf31abb5..12db6d2fca07 100644 --- a/arch/mips/include/asm/uasm.h +++ b/arch/mips/include/asm/uasm.h @@ -196,6 +196,8 @@ void uasm_build_label(struct uasm_label **lab, u32 *addr, #ifdef CONFIG_64BIT int uasm_in_compat_space_p(long addr); #endif +int uasm_rel_highest(long val); +int uasm_rel_higher(long val); int uasm_rel_hi(long val); int uasm_rel_lo(long val); void UASM_i_LA_mostly(u32 **buf, unsigned int rs, long addr); diff --git a/arch/mips/mm/uasm.c b/arch/mips/mm/uasm.c index 125140979d62..6846bf2084c5 100644 --- a/arch/mips/mm/uasm.c +++ b/arch/mips/mm/uasm.c @@ -425,7 +425,7 @@ int uasm_in_compat_space_p(long addr) } UASM_EXPORT_SYMBOL(uasm_in_compat_space_p); -static int uasm_rel_highest(long val) +int uasm_rel_highest(long val) { #ifdef CONFIG_64BIT return ((((val + 0x800080008000L) >> 48) & 0xffff) ^ 0x8000) - 0x8000; @@ -433,8 +433,9 @@ static int uasm_rel_highest(long val) return 0; #endif } +UASM_EXPORT_SYMBOL(uasm_rel_highest); -static int uasm_rel_higher(long val) +int uasm_rel_higher(long val) { #ifdef CONFIG_64BIT return ((((val + 0x80008000L) >> 32) & 0xffff) ^ 0x8000) - 0x8000; @@ -442,6 +443,7 @@ static int uasm_rel_higher(long val) return 0; #endif } +UASM_EXPORT_SYMBOL(uasm_rel_higher); int uasm_rel_hi(long val) { -- 2.34.1