From patchwork Tue Sep 5 19:08:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 13375036 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4370CCA100E for ; Tue, 5 Sep 2023 20:14:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231669AbjIEUOi (ORCPT ); Tue, 5 Sep 2023 16:14:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42902 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243229AbjIEUOJ (ORCPT ); Tue, 5 Sep 2023 16:14:09 -0400 X-Greylist: delayed 309 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Tue, 05 Sep 2023 13:13:47 PDT Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6549C113; Tue, 5 Sep 2023 13:13:47 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7C022C433BC; Tue, 5 Sep 2023 19:08:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1693940920; bh=odwCFoRqriyJMZJrebmLnyD9HgaYVBoEzbQlKC/Vgpg=; h=From:To:Cc:Subject:Date:From; b=YKMBKsPSFKtFPv5MEheuC31zhPo4TBoTqN/xXx4sMBGIsnBAaDGg1q4r5Dc6MujZb HfH+pwUFiH7j9iuWoVWnTXdZTrZ4lBwuNmVmcx1ARg4CrBIQY44REJNeYJXC2+QN0P 4IGmU06qzeg9HYhiSrYbfAODaeypqb3JHZhMl9JWrlZEY9MGbllG0fNXRkhfZ6hFQw nQV1tPFMmr6Gce5ImEaWjhLpmpW0n7fWMUxtaKkLSwnProe9ELQIg9rEO0q84JLSE7 HowNLOZWJbuuIAZMxF8tH6FoSB+3Ie1QgzQknqiCwJGfFcl6TuTa6H8CeJqUdKkpMi UrUa3ehP3iJKQ== From: Masahiro Yamada To: linux-parisc@vger.kernel.org, Helge Deller , John David Anglin Cc: linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, Masahiro Yamada , Nick Desaulniers Subject: [PATCH] linux/export: fix reference to exported functions for parisc64 Date: Wed, 6 Sep 2023 04:08:28 +0900 Message-Id: <20230905190828.790400-1-masahiroy@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org John David Anglin reported parisc has been broken since commit ddb5cdbafaaa ("kbuild: generate KSYMTAB entries by modpost"). I checked the assembler output, and noticed function references are prefixed with P%, so the situation in parisc64 is similar to ia64. Fixes: ddb5cdbafaaa ("kbuild: generate KSYMTAB entries by modpost") Reported-by: John David Anglin Closes: https://lore.kernel.org/linux-parisc/1901598a-e11d-f7dd-a5d9-9a69d06e6b6e@bell.net/T/#u Signed-off-by: Masahiro Yamada Tested-by: Helge Deller --- I just checked the assembler output, and I created this patch based on my best guess. Only compile-tested. I hope somebody will run-test this patch. include/linux/export-internal.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/export-internal.h b/include/linux/export-internal.h index 1c849db953a5..45fca09b2319 100644 --- a/include/linux/export-internal.h +++ b/include/linux/export-internal.h @@ -52,6 +52,8 @@ #ifdef CONFIG_IA64 #define KSYM_FUNC(name) @fptr(name) +#elif defined(CONFIG_PARISC) && defined(CONFIG_64BIT) +#define KSYM_FUNC(name) P%name #else #define KSYM_FUNC(name) name #endif