From: Ben Dooks <ben.dooks@codethink.co.uk>
To: linux-riscv@lists.infradead.org, ajones@ventanamicro.com
Cc: Ben Dooks <ben.dooks@codethink.co.uk>,
Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
Subject: [PATCH] RISC-V: Fixup clear_page export when using Zicboz
Date: Fri, 24 Feb 2023 13:58:44 +0000 [thread overview]
Message-ID: <20230224135844.619054-1-ben.dooks@codethink.co.uk> (raw)
In-Reply-To: <20230221190916.572454-7-ajones@ventanamicro.com>
When the clear_page() via Zicboz is enabled, the module build
fails as clear_page() is not marked as a ksym entry. Fix this
by changing the asm code to use <asm-generic/export.h> to add
the correct export.
Also remove the weak clear_page() as there's nothing else in
the build defining this symbol, so just make it the entry when
the Zicboz is enabled.
Fixes modpost errors such as this:
ERROR: modpost: "clear_page" [drivers/gpu/drm/ttm/ttm.ko] undefined!
Reported-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
---
arch/riscv/lib/clear_page.S | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/arch/riscv/lib/clear_page.S b/arch/riscv/lib/clear_page.S
index 7c7fa45b5ab5..4ed5fef52d80 100644
--- a/arch/riscv/lib/clear_page.S
+++ b/arch/riscv/lib/clear_page.S
@@ -6,6 +6,7 @@
#include <linux/linkage.h>
#include <asm/asm.h>
#include <asm/alternative-macros.h>
+#include <asm-generic/export.h>
#include <asm/hwcap.h>
#include <asm/insn-def.h>
#include <asm/page.h>
@@ -17,7 +18,7 @@
/* void clear_page(void *page) */
ENTRY(__clear_page)
-WEAK(clear_page)
+SYM_FUNC_START(clear_page)
li a2, PAGE_SIZE
/*
@@ -70,4 +71,5 @@ WEAK(clear_page)
.Lno_zicboz:
li a1, 0
tail __memset
-END(__clear_page)
+SYM_FUNC_END(clear_page)
+EXPORT_SYMBOL(clear_page)
--
2.39.1
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2023-02-24 13:59 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-21 19:09 [PATCH v5 0/8] RISC-V: Apply Zicboz to clear_page Andrew Jones
2023-02-21 19:09 ` Andrew Jones
2023-02-21 19:09 ` Andrew Jones
2023-02-21 19:09 ` [PATCH v5 1/8] RISC-V: alternatives: Support patching multiple insns in assembly Andrew Jones
2023-02-21 19:09 ` Andrew Jones
2023-02-21 19:09 ` Andrew Jones
2023-02-21 19:09 ` [PATCH v5 2/8] RISC-V: Factor out body of riscv_init_cbom_blocksize loop Andrew Jones
2023-02-21 19:09 ` Andrew Jones
2023-02-21 19:09 ` Andrew Jones
2023-02-21 19:09 ` [PATCH v5 3/8] dt-bindings: riscv: Document cboz-block-size Andrew Jones
2023-02-21 19:09 ` Andrew Jones
2023-02-21 19:09 ` Andrew Jones
2023-02-21 19:09 ` [PATCH v5 4/8] RISC-V: Add Zicboz detection and block size parsing Andrew Jones
2023-02-21 19:09 ` Andrew Jones
2023-02-21 19:09 ` Andrew Jones
2023-02-21 19:09 ` [PATCH v5 5/8] riscv: cpufeatures: Put the upper 16 bits of patch ID to work Andrew Jones
2023-02-21 19:09 ` Andrew Jones
2023-02-21 19:09 ` Andrew Jones
2023-02-22 17:27 ` Conor Dooley
2023-02-22 17:28 ` Conor Dooley
2023-02-22 17:27 ` Conor Dooley
2023-02-23 12:53 ` Andrew Jones
2023-02-23 12:53 ` Andrew Jones
2023-02-23 12:53 ` Andrew Jones
2023-02-21 19:09 ` [PATCH v5 6/8] RISC-V: Use Zicboz in clear_page when available Andrew Jones
2023-02-21 19:09 ` Andrew Jones
2023-02-21 19:09 ` Andrew Jones
2023-02-24 13:58 ` Ben Dooks [this message]
2023-02-24 14:18 ` [PATCH] RISC-V: Fixup clear_page export when using Zicboz Andrew Jones
2023-02-24 14:42 ` Ben Dooks
2023-02-24 15:19 ` Andrew Jones
2023-02-24 14:44 ` Sudip Mukherjee
2023-02-24 15:11 ` Andrew Jones
2023-02-24 14:00 ` [PATCH v5 6/8] RISC-V: Use Zicboz in clear_page when available Ben Dooks
2023-02-24 14:00 ` Ben Dooks
2023-02-24 14:00 ` Ben Dooks
2023-02-24 14:25 ` Andrew Jones
2023-02-24 14:25 ` Andrew Jones
2023-02-24 14:25 ` Andrew Jones
2023-02-24 14:36 ` Andrew Jones
2023-02-24 14:36 ` Andrew Jones
2023-02-24 14:36 ` Andrew Jones
2023-02-21 19:09 ` [PATCH v5 7/8] RISC-V: KVM: Provide UAPI for Zicboz block size Andrew Jones
2023-02-21 19:09 ` Andrew Jones
2023-02-21 19:09 ` Andrew Jones
2023-02-21 19:09 ` [PATCH v5 8/8] RISC-V: KVM: Expose Zicboz to the guest Andrew Jones
2023-02-21 19:09 ` Andrew Jones
2023-02-21 19:09 ` Andrew Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230224135844.619054-1-ben.dooks@codethink.co.uk \
--to=ben.dooks@codethink.co.uk \
--cc=ajones@ventanamicro.com \
--cc=linux-riscv@lists.infradead.org \
--cc=sudip.mukherjee@codethink.co.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.