LinuxPPC-Dev Archive on
 help / color / Atom feed
From: Randy Dunlap <>
Cc: kernel test robot <>,
	Randy Dunlap <>,
Subject: [PATCH 1/2] powerpc: add enable_kernel_fp() stub for ALTIVEC without PPC_FPU
Date: Sun, 18 Apr 2021 13:17:25 -0700
Message-ID: <> (raw)

On a kernel config with ALTIVEC=y and PPC_FPU not set/enabled,
there is a build error:

drivers/cpufreq/pmac32-cpufreq.c:262:2: error: implicit declaration of function 'enable_kernel_fp' [-Werror,-Wimplicit-function-declaration]

so add a stub function for that when PPC_FPU is not set.

Signed-off-by: Randy Dunlap <>
Reported-by: kernel test robot <>
Cc: Michael Ellerman <>
Cc: Christophe Leroy <>
Cc: Segher Boessenkool <>
 arch/powerpc/include/asm/switch_to.h |    1 +
 1 file changed, 1 insertion(+)

--- linux-next-20210416.orig/arch/powerpc/include/asm/switch_to.h
+++ linux-next-20210416/arch/powerpc/include/asm/switch_to.h
@@ -48,6 +48,7 @@ static inline void disable_kernel_fp(voi
 static inline void save_fpu(struct task_struct *t) { }
 static inline void flush_fp_to_thread(struct task_struct *t) { }
+static inline void enable_kernel_fp(void) { }

             reply index

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-18 20:17 Randy Dunlap [this message]
2021-04-18 20:17 ` [PATCH 2/2] powerpc: add ALTIVEC support to lib/ when PPC_FPU not set Randy Dunlap
2021-04-19 13:32   ` Segher Boessenkool
2021-04-19 13:38     ` Christophe Leroy
2021-04-19 13:57       ` Segher Boessenkool

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

LinuxPPC-Dev Archive on

Archives are clonable:
	git clone --mirror linuxppc-dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linuxppc-dev linuxppc-dev/ \
	public-inbox-index linuxppc-dev

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone