kpatch/test/integration/linux-5.10.11/new-function.patch
Artem Savkov 6fa8e4fd43 test/integration/linux-5.10.11: fix patches to build on ppc64le
module-call-external.patch and new-function.patch fail to build on
ppc64le with "Found an unsupported sibling call". Add
fno-optimize-sibling-calls attributes to functions in question.

Signed-off-by: Artem Savkov <asavkov@redhat.com>
2021-11-19 10:12:12 +01:00

28 lines
944 B
Diff

diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c
index c2869489ba68..7a46fc7a88f1 100644
--- a/drivers/tty/n_tty.c
+++ b/drivers/tty/n_tty.c
@@ -2295,7 +2295,7 @@ static ssize_t n_tty_read(struct tty_struct *tty, struct file *file,
* lock themselves)
*/
-static ssize_t n_tty_write(struct tty_struct *tty, struct file *file,
+static ssize_t noinline kpatch_n_tty_write(struct tty_struct *tty, struct file *file,
const unsigned char *buf, size_t nr)
{
const unsigned char *b = buf;
@@ -2382,6 +2382,13 @@ static ssize_t n_tty_write(struct tty_struct *tty, struct file *file,
return (b - buf) ? b - buf : retval;
}
+__attribute__((optimize("-fno-optimize-sibling-calls")))
+static ssize_t n_tty_write(struct tty_struct *tty, struct file *file,
+ const unsigned char *buf, size_t nr)
+{
+ return kpatch_n_tty_write(tty, file, buf, nr);
+}
+
/**
* n_tty_poll - poll method for N_TTY
* @tty: terminal device