From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D4D39C4743C for ; Mon, 21 Jun 2021 18:02:17 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9334A60C41 for ; Mon, 21 Jun 2021 18:02:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9334A60C41 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=DXuER2Yp3wkLaoGB4wCrBnAsmw13NxmSzxIDLYN/3II=; b=dBuBM5KmZE/BBS UFf/kArzOL0vMWtTD9UOjvtJ3QuH9cw9lkHUUEUP4N3EH248pHNhysbFgyWwBu8dB5G1XwXWpt9w8 g2MBsqZTKsbNBg26tyxt1ajCKof71BXffLh7CyjqsR5xuM+ztMBQBpn66OnITa2uJ5cEcYMJxLQf7 4JAJoJc8EjXUHWvApb21kyyzI/ojemdXe4c75f9za0D6ZUlNfobPMBh3fJQqrKHn4rDfgvDLe3YR/ 9FpQI47UTvK0lCvEjFNyNSrThwk82sb1hkP77mag9nRn8Q4VZa91KPrR+gPPTHwyFyULjv+ksfq5c USD0Ou8GUh9G/Asn2MBg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lvOFK-004PGh-7L; Mon, 21 Jun 2021 18:02:06 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lvO72-004KcB-JS for linux-riscv@lists.infradead.org; Mon, 21 Jun 2021 17:53:33 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7E53D613AD; Mon, 21 Jun 2021 17:53:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624298012; bh=tgPcxuGjzy0G6s+Y43FulBrZ/Q/BfammVdZeVAAL3o4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bzjJSckKvOTlS8ep0J+UsjT3pQmdistkxCofKH92WW8e1xyj7rBvdHe/Fj1yqIlKG A7M0FfWau+yrPCc1iftZ8h4GOWpKSP7PVv1kZDeP/c9eDRltmiHcP2NnylUWagSnNm lxrSjJ+BrLPzwDnnCs/vyxItmbrnMtsJ8fsPiDGA5EyXcLCcBKvTQDzNrG/r6H4t0G 2IBrFiXaXr7PzoBxPGKELeA5QRfMhMbdoYWd8zSMphdcTdJUZ5PKD0vLyUqRmlHL3L zm/a1ecVjLxU5RUt/LmJlGlAZKafkUaoRvBRbcNOijuL3HF6mFU6sYEiofT+meXhst m7Xr/5JP0rDpw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Khem Raj , Palmer Dabbelt , Sasha Levin , linux-riscv@lists.infradead.org Subject: [PATCH AUTOSEL 5.10 21/35] riscv32: Use medany C model for modules Date: Mon, 21 Jun 2021 13:52:46 -0400 Message-Id: <20210621175300.735437-21-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210621175300.735437-1-sashal@kernel.org> References: <20210621175300.735437-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210621_105332_697789_0D7EC8C6 X-CRM114-Status: UNSURE ( 8.97 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org From: Khem Raj [ Upstream commit 5d2388dbf84adebeb6d9742164be8d32728e4269 ] When CONFIG_CMODEL_MEDLOW is used it ends up generating riscv_hi20_rela relocations in modules which are not resolved during runtime and following errors would be seen [ 4.802714] virtio_input: target 00000000c1539090 can not be addressed by the 32-bit offset from PC = 39148b7b [ 4.854800] virtio_input: target 00000000c1539090 can not be addressed by the 32-bit offset from PC = 9774456d Signed-off-by: Khem Raj Signed-off-by: Palmer Dabbelt Signed-off-by: Sasha Levin --- arch/riscv/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile index e241e0e85ac8..226c366072da 100644 --- a/arch/riscv/Makefile +++ b/arch/riscv/Makefile @@ -14,7 +14,7 @@ ifeq ($(CONFIG_DYNAMIC_FTRACE),y) LDFLAGS_vmlinux := --no-relax endif -ifeq ($(CONFIG_64BIT)$(CONFIG_CMODEL_MEDLOW),yy) +ifeq ($(CONFIG_CMODEL_MEDLOW),y) KBUILD_CFLAGS_MODULE += -mcmodel=medany endif -- 2.30.2 _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv