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 18229C48BC2 for ; Mon, 21 Jun 2021 17:54:53 +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 E032A613E9 for ; Mon, 21 Jun 2021 17:54:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E032A613E9 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=9SiQiTzuid/UUbkix9ic6933r+OqthS3uZnm1+jQQqo=; b=QcTopV7fYHkIU5 o2D/pnlNijATVqgMzg2u52zNJrKVFZGlOMKTEB7aPOH3Q0D07eobbdCS63uEuHJGguZZzA6WElhOe RNLhbWqf4EYio5qA7wOinWjdGZidDJRY0Nh5Rc/UWKqRfHI6x5CoWuiBbp4qJxpee/GXdS9gd2lf5 snNwjXrPr+d7w8NgaAMgCfiTUqGNGdtrWV3THae3SFHGo3sEOq4iatwlX/bCVj+KApDKf7Lv/QqgK ngKFWikCT6VnE/TnF36129Rbmt/I55qnemSiKU9zc8C//BQwD23T4sh3W5auNPuVUB86Cb5qwFZNd j69Zc0bwgZDWA2irluog==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lvO8A-004LJQ-3O; Mon, 21 Jun 2021 17:54:42 +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 1lvO66-004K4W-LG for linux-riscv@lists.infradead.org; Mon, 21 Jun 2021 17:52:35 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8CEC2611C1; Mon, 21 Jun 2021 17:52:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624297954; bh=Fn+MfaRfUiknVaKYJyn4fWh6H+UdE8WZcI2glV1+a94=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=j02hr2VSL/JuomTkfvinWOrxip1Ax0vTtTyyZquNVMdNdUMrsrJy7m85ohl92o7YP TdPeowDXFGVdQpKgESCfsZhEUwKV9FTEcTia1OETLt8L6hVf3yxvP/kRUCdRpBz6md drV0GIzDNzel4gdFC9Av9Kga5H3nS8h94xjlOVZ6zaxawi6TkGfGwOBYccg6MqqX4F YpPfhrVQxjDWirG3LqHGZPPBzhrCqZ5ttMkPSN3UGs/9vXB3roWy6QO0/3DnoHiC/R LjyK01m/pPMHWkt30ZJ+W9klMm/ZIpmwSO7mmoWmAi4vIJWNFhbDfuPZHEy7I6g7ND kmRLnab812oxQ== 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.12 22/39] riscv32: Use medany C model for modules Date: Mon, 21 Jun 2021 13:51:38 -0400 Message-Id: <20210621175156.735062-22-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210621175156.735062-1-sashal@kernel.org> References: <20210621175156.735062-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_105234_753281_343721CA 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 5243bf2327c0..a5ee34117321 100644 --- a/arch/riscv/Makefile +++ b/arch/riscv/Makefile @@ -16,7 +16,7 @@ ifeq ($(CONFIG_DYNAMIC_FTRACE),y) CC_FLAGS_FTRACE := -fpatchable-function-entry=8 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