Messages in this thread | | | Date | Fri, 13 Aug 2021 17:38:39 +0800 | From | kernel test robot <> | Subject | [linux-stable-rc:linux-5.4.y 3700/4278] arch/powerpc/kernel/traps.c:2073:6: warning: no previous prototype for function 'CacheLockingException' |
| |
tree: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.4.y head: f52a40401ee9825556cc803c110c67bfec5f6b94 commit: acac3f7d7d2283a1b8bc1e1c286dcd6c96e573e4 [3700/4278] powerpc: Drop -me200 addition to build flags config: powerpc64-randconfig-r035-20210813 (attached as .config) compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 62df4df41c939205b2dc0a2a3bfb75b8c1ed74fa) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # install powerpc64 cross compiling tool for clang build # apt-get install binutils-powerpc-linux-gnu # https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git/commit/?id=acac3f7d7d2283a1b8bc1e1c286dcd6c96e573e4 git remote add linux-stable-rc https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git git fetch --no-tags linux-stable-rc linux-5.4.y git checkout acac3f7d7d2283a1b8bc1e1c286dcd6c96e573e4 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
In file included from include/linux/hardirq.h:9: In file included from arch/powerpc/include/asm/hardirq.h:6: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/powerpc/include/asm/io.h:605: arch/powerpc/include/asm/io-defs.h:45:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] DEF_PCI_AC_NORET(insw, (unsigned long p, void *b, unsigned long c), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/powerpc/include/asm/io.h:602:3: note: expanded from macro 'DEF_PCI_AC_NORET' __do_##name al; \ ^~~~~~~~~~~~~~ <scratch space>:29:1: note: expanded from here __do_insw ^ arch/powerpc/include/asm/io.h:543:56: note: expanded from macro '__do_insw' #define __do_insw(p, b, n) readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n)) ~~~~~~~~~~~~~~~~~~~~~^ In file included from arch/powerpc/kernel/traps.c:24: In file included from include/linux/interrupt.h:11: In file included from include/linux/hardirq.h:9: In file included from arch/powerpc/include/asm/hardirq.h:6: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/powerpc/include/asm/io.h:605: arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/powerpc/include/asm/io.h:602:3: note: expanded from macro 'DEF_PCI_AC_NORET' __do_##name al; \ ^~~~~~~~~~~~~~ <scratch space>:31:1: note: expanded from here __do_insl ^ arch/powerpc/include/asm/io.h:544:56: note: expanded from macro '__do_insl' #define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n)) ~~~~~~~~~~~~~~~~~~~~~^ In file included from arch/powerpc/kernel/traps.c:24: In file included from include/linux/interrupt.h:11: In file included from include/linux/hardirq.h:9: In file included from arch/powerpc/include/asm/hardirq.h:6: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/powerpc/include/asm/io.h:605: arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/powerpc/include/asm/io.h:602:3: note: expanded from macro 'DEF_PCI_AC_NORET' __do_##name al; \ ^~~~~~~~~~~~~~ <scratch space>:33:1: note: expanded from here __do_outsb ^ arch/powerpc/include/asm/io.h:545:58: note: expanded from macro '__do_outsb' #define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n)) ~~~~~~~~~~~~~~~~~~~~~^ In file included from arch/powerpc/kernel/traps.c:24: In file included from include/linux/interrupt.h:11: In file included from include/linux/hardirq.h:9: In file included from arch/powerpc/include/asm/hardirq.h:6: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/powerpc/include/asm/io.h:605: arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/powerpc/include/asm/io.h:602:3: note: expanded from macro 'DEF_PCI_AC_NORET' __do_##name al; \ ^~~~~~~~~~~~~~ <scratch space>:35:1: note: expanded from here __do_outsw ^ arch/powerpc/include/asm/io.h:546:58: note: expanded from macro '__do_outsw' #define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n)) ~~~~~~~~~~~~~~~~~~~~~^ In file included from arch/powerpc/kernel/traps.c:24: In file included from include/linux/interrupt.h:11: In file included from include/linux/hardirq.h:9: In file included from arch/powerpc/include/asm/hardirq.h:6: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/powerpc/include/asm/io.h:605: arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/powerpc/include/asm/io.h:602:3: note: expanded from macro 'DEF_PCI_AC_NORET' __do_##name al; \ ^~~~~~~~~~~~~~ <scratch space>:37:1: note: expanded from here __do_outsl ^ arch/powerpc/include/asm/io.h:547:58: note: expanded from macro '__do_outsl' #define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n)) ~~~~~~~~~~~~~~~~~~~~~^ arch/powerpc/kernel/traps.c:1960:6: warning: no previous prototype for function 'DebugException' [-Wmissing-prototypes] void DebugException(struct pt_regs *regs, unsigned long debug_status) ^ arch/powerpc/kernel/traps.c:1960:1: note: declare 'static' if the function is not intended to be used outside of this translation unit void DebugException(struct pt_regs *regs, unsigned long debug_status) ^ static >> arch/powerpc/kernel/traps.c:2073:6: warning: no previous prototype for function 'CacheLockingException' [-Wmissing-prototypes] void CacheLockingException(struct pt_regs *regs, unsigned long address, ^ arch/powerpc/kernel/traps.c:2073:1: note: declare 'static' if the function is not intended to be used outside of this translation unit void CacheLockingException(struct pt_regs *regs, unsigned long address, ^ static >> arch/powerpc/kernel/traps.c:2087:6: warning: no previous prototype for function 'SPEFloatingPointException' [-Wmissing-prototypes] void SPEFloatingPointException(struct pt_regs *regs) ^ arch/powerpc/kernel/traps.c:2087:1: note: declare 'static' if the function is not intended to be used outside of this translation unit void SPEFloatingPointException(struct pt_regs *regs) ^ static >> arch/powerpc/kernel/traps.c:2139:6: warning: no previous prototype for function 'SPEFloatingPointRoundException' [-Wmissing-prototypes] void SPEFloatingPointRoundException(struct pt_regs *regs) ^ arch/powerpc/kernel/traps.c:2139:1: note: declare 'static' if the function is not intended to be used outside of this translation unit void SPEFloatingPointRoundException(struct pt_regs *regs) ^ static 11 warnings generated. -- arch/powerpc/include/asm/io.h:602:3: note: expanded from macro 'DEF_PCI_AC_NORET' __do_##name al; \ ^~~~~~~~~~~~~~ <scratch space>:60:1: note: expanded from here __do_insw ^ arch/powerpc/include/asm/io.h:543:56: note: expanded from macro '__do_insw' #define __do_insw(p, b, n) readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n)) ~~~~~~~~~~~~~~~~~~~~~^ In file included from arch/powerpc/perf/core-fsl-emb.c:10: In file included from include/linux/perf_event.h:57: In file included from include/linux/cgroup.h:26: In file included from include/linux/kernel_stat.h:9: In file included from include/linux/interrupt.h:11: In file included from include/linux/hardirq.h:9: In file included from arch/powerpc/include/asm/hardirq.h:6: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/powerpc/include/asm/io.h:605: arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/powerpc/include/asm/io.h:602:3: note: expanded from macro 'DEF_PCI_AC_NORET' __do_##name al; \ ^~~~~~~~~~~~~~ <scratch space>:62:1: note: expanded from here __do_insl ^ arch/powerpc/include/asm/io.h:544:56: note: expanded from macro '__do_insl' #define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n)) ~~~~~~~~~~~~~~~~~~~~~^ In file included from arch/powerpc/perf/core-fsl-emb.c:10: In file included from include/linux/perf_event.h:57: In file included from include/linux/cgroup.h:26: In file included from include/linux/kernel_stat.h:9: In file included from include/linux/interrupt.h:11: In file included from include/linux/hardirq.h:9: In file included from arch/powerpc/include/asm/hardirq.h:6: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/powerpc/include/asm/io.h:605: arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/powerpc/include/asm/io.h:602:3: note: expanded from macro 'DEF_PCI_AC_NORET' __do_##name al; \ ^~~~~~~~~~~~~~ <scratch space>:64:1: note: expanded from here __do_outsb ^ arch/powerpc/include/asm/io.h:545:58: note: expanded from macro '__do_outsb' #define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n)) ~~~~~~~~~~~~~~~~~~~~~^ In file included from arch/powerpc/perf/core-fsl-emb.c:10: In file included from include/linux/perf_event.h:57: In file included from include/linux/cgroup.h:26: In file included from include/linux/kernel_stat.h:9: In file included from include/linux/interrupt.h:11: In file included from include/linux/hardirq.h:9: In file included from arch/powerpc/include/asm/hardirq.h:6: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/powerpc/include/asm/io.h:605: arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/powerpc/include/asm/io.h:602:3: note: expanded from macro 'DEF_PCI_AC_NORET' __do_##name al; \ ^~~~~~~~~~~~~~ <scratch space>:66:1: note: expanded from here __do_outsw ^ arch/powerpc/include/asm/io.h:546:58: note: expanded from macro '__do_outsw' #define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n)) ~~~~~~~~~~~~~~~~~~~~~^ In file included from arch/powerpc/perf/core-fsl-emb.c:10: In file included from include/linux/perf_event.h:57: In file included from include/linux/cgroup.h:26: In file included from include/linux/kernel_stat.h:9: In file included from include/linux/interrupt.h:11: In file included from include/linux/hardirq.h:9: In file included from arch/powerpc/include/asm/hardirq.h:6: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/powerpc/include/asm/io.h:605: arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/powerpc/include/asm/io.h:602:3: note: expanded from macro 'DEF_PCI_AC_NORET' __do_##name al; \ ^~~~~~~~~~~~~~ <scratch space>:68:1: note: expanded from here __do_outsl ^ arch/powerpc/include/asm/io.h:547:58: note: expanded from macro '__do_outsl' #define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n)) ~~~~~~~~~~~~~~~~~~~~~^ arch/powerpc/perf/core-fsl-emb.c:661:6: warning: variable 'found' set but not used [-Wunused-but-set-variable] int found = 0; ^ >> arch/powerpc/perf/core-fsl-emb.c:700:6: warning: no previous prototype for function 'hw_perf_event_setup' [-Wmissing-prototypes] void hw_perf_event_setup(int cpu) ^ arch/powerpc/perf/core-fsl-emb.c:700:1: note: declare 'static' if the function is not intended to be used outside of this translation unit void hw_perf_event_setup(int cpu) ^ static 9 warnings generated. -- In file included from drivers/staging/exfat/exfat_super.c:12: In file included from include/linux/pagemap.h:11: In file included from include/linux/highmem.h:10: In file included from include/linux/hardirq.h:9: In file included from arch/powerpc/include/asm/hardirq.h:6: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/powerpc/include/asm/io.h:605: arch/powerpc/include/asm/io-defs.h:45:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] DEF_PCI_AC_NORET(insw, (unsigned long p, void *b, unsigned long c), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/powerpc/include/asm/io.h:602:3: note: expanded from macro 'DEF_PCI_AC_NORET' __do_##name al; \ ^~~~~~~~~~~~~~ <scratch space>:241:1: note: expanded from here __do_insw ^ arch/powerpc/include/asm/io.h:543:56: note: expanded from macro '__do_insw' #define __do_insw(p, b, n) readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n)) ~~~~~~~~~~~~~~~~~~~~~^ In file included from drivers/staging/exfat/exfat_super.c:12: In file included from include/linux/pagemap.h:11: In file included from include/linux/highmem.h:10: In file included from include/linux/hardirq.h:9: In file included from arch/powerpc/include/asm/hardirq.h:6: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/powerpc/include/asm/io.h:605: arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/powerpc/include/asm/io.h:602:3: note: expanded from macro 'DEF_PCI_AC_NORET' __do_##name al; \ ^~~~~~~~~~~~~~ <scratch space>:243:1: note: expanded from here __do_insl ^ arch/powerpc/include/asm/io.h:544:56: note: expanded from macro '__do_insl' #define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n)) ~~~~~~~~~~~~~~~~~~~~~^ In file included from drivers/staging/exfat/exfat_super.c:12: In file included from include/linux/pagemap.h:11: In file included from include/linux/highmem.h:10: In file included from include/linux/hardirq.h:9: In file included from arch/powerpc/include/asm/hardirq.h:6: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/powerpc/include/asm/io.h:605: arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/powerpc/include/asm/io.h:602:3: note: expanded from macro 'DEF_PCI_AC_NORET' __do_##name al; \ ^~~~~~~~~~~~~~ <scratch space>:245:1: note: expanded from here __do_outsb ^ arch/powerpc/include/asm/io.h:545:58: note: expanded from macro '__do_outsb' #define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n)) ~~~~~~~~~~~~~~~~~~~~~^ In file included from drivers/staging/exfat/exfat_super.c:12: In file included from include/linux/pagemap.h:11: In file included from include/linux/highmem.h:10: In file included from include/linux/hardirq.h:9: In file included from arch/powerpc/include/asm/hardirq.h:6: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/powerpc/include/asm/io.h:605: arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/powerpc/include/asm/io.h:602:3: note: expanded from macro 'DEF_PCI_AC_NORET' __do_##name al; \ ^~~~~~~~~~~~~~ <scratch space>:247:1: note: expanded from here __do_outsw ^ arch/powerpc/include/asm/io.h:546:58: note: expanded from macro '__do_outsw' #define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n)) ~~~~~~~~~~~~~~~~~~~~~^ In file included from drivers/staging/exfat/exfat_super.c:12: In file included from include/linux/pagemap.h:11: In file included from include/linux/highmem.h:10: In file included from include/linux/hardirq.h:9: In file included from arch/powerpc/include/asm/hardirq.h:6: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/powerpc/include/asm/io.h:605: arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/powerpc/include/asm/io.h:602:3: note: expanded from macro 'DEF_PCI_AC_NORET' __do_##name al; \ ^~~~~~~~~~~~~~ <scratch space>:249:1: note: expanded from here __do_outsl ^ arch/powerpc/include/asm/io.h:547:58: note: expanded from macro '__do_outsl' #define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n)) ~~~~~~~~~~~~~~~~~~~~~^ >> drivers/staging/exfat/exfat_super.c:3835:12: warning: stack frame size (1040) exceeds limit (1024) in function 'exfat_fill_super' [-Wframe-larger-than] static int exfat_fill_super(struct super_block *sb, void *data, int silent) ^ >> drivers/staging/exfat/exfat_super.c:2200:12: warning: stack frame size (1552) exceeds limit (1024) in function 'exfat_readdir' [-Wframe-larger-than] static int exfat_readdir(struct file *filp, struct dir_context *ctx) ^ 9 warnings generated.
Kconfig warnings: (for reference only) WARNING: unmet direct dependencies detected for FSL_EMB_PERFMON Depends on E500 || PPC_83xx Selected by - PPC_FSL_BOOK3E
vim +/CacheLockingException +2073 arch/powerpc/kernel/traps.c
14cf11af6cf608 Paul Mackerras 2005-09-26 2071 14cf11af6cf608 Paul Mackerras 2005-09-26 2072 #ifdef CONFIG_FSL_BOOKE 14cf11af6cf608 Paul Mackerras 2005-09-26 @2073 void CacheLockingException(struct pt_regs *regs, unsigned long address, 14cf11af6cf608 Paul Mackerras 2005-09-26 2074 unsigned long error_code) 14cf11af6cf608 Paul Mackerras 2005-09-26 2075 { 14cf11af6cf608 Paul Mackerras 2005-09-26 2076 /* We treat cache locking instructions from the user 14cf11af6cf608 Paul Mackerras 2005-09-26 2077 * as priv ops, in the future we could try to do 14cf11af6cf608 Paul Mackerras 2005-09-26 2078 * something smarter 14cf11af6cf608 Paul Mackerras 2005-09-26 2079 */ 14cf11af6cf608 Paul Mackerras 2005-09-26 2080 if (error_code & (ESR_DLK|ESR_ILK)) 14cf11af6cf608 Paul Mackerras 2005-09-26 2081 _exception(SIGILL, regs, ILL_PRVOPC, regs->nip); 14cf11af6cf608 Paul Mackerras 2005-09-26 2082 return; 14cf11af6cf608 Paul Mackerras 2005-09-26 2083 } 14cf11af6cf608 Paul Mackerras 2005-09-26 2084 #endif /* CONFIG_FSL_BOOKE */ 14cf11af6cf608 Paul Mackerras 2005-09-26 2085 14cf11af6cf608 Paul Mackerras 2005-09-26 2086 #ifdef CONFIG_SPE 14cf11af6cf608 Paul Mackerras 2005-09-26 @2087 void SPEFloatingPointException(struct pt_regs *regs) 14cf11af6cf608 Paul Mackerras 2005-09-26 2088 { 6a800f36acd5bf Liu Yu 2008-10-28 2089 extern int do_spe_mathemu(struct pt_regs *regs); 14cf11af6cf608 Paul Mackerras 2005-09-26 2090 unsigned long spefscr; 14cf11af6cf608 Paul Mackerras 2005-09-26 2091 int fpexc_mode; aeb1c0f6ff18f5 Eric W. Biederman 2018-04-17 2092 int code = FPE_FLTUNK; 6a800f36acd5bf Liu Yu 2008-10-28 2093 int err; 6a800f36acd5bf Liu Yu 2008-10-28 2094 ef4291243f51d0 Christophe Leroy 2019-04-30 2095 /* We restore the interrupt state now */ ef4291243f51d0 Christophe Leroy 2019-04-30 2096 if (!arch_irq_disabled_regs(regs)) ef4291243f51d0 Christophe Leroy 2019-04-30 2097 local_irq_enable(); ef4291243f51d0 Christophe Leroy 2019-04-30 2098 685659ee70db0b yu liu 2011-06-14 2099 flush_spe_to_thread(current); 14cf11af6cf608 Paul Mackerras 2005-09-26 2100 14cf11af6cf608 Paul Mackerras 2005-09-26 2101 spefscr = current->thread.spefscr; 14cf11af6cf608 Paul Mackerras 2005-09-26 2102 fpexc_mode = current->thread.fpexc_mode; 14cf11af6cf608 Paul Mackerras 2005-09-26 2103 14cf11af6cf608 Paul Mackerras 2005-09-26 2104 if ((spefscr & SPEFSCR_FOVF) && (fpexc_mode & PR_FP_EXC_OVF)) { 14cf11af6cf608 Paul Mackerras 2005-09-26 2105 code = FPE_FLTOVF; 14cf11af6cf608 Paul Mackerras 2005-09-26 2106 } 14cf11af6cf608 Paul Mackerras 2005-09-26 2107 else if ((spefscr & SPEFSCR_FUNF) && (fpexc_mode & PR_FP_EXC_UND)) { 14cf11af6cf608 Paul Mackerras 2005-09-26 2108 code = FPE_FLTUND; 14cf11af6cf608 Paul Mackerras 2005-09-26 2109 } 14cf11af6cf608 Paul Mackerras 2005-09-26 2110 else if ((spefscr & SPEFSCR_FDBZ) && (fpexc_mode & PR_FP_EXC_DIV)) 14cf11af6cf608 Paul Mackerras 2005-09-26 2111 code = FPE_FLTDIV; 14cf11af6cf608 Paul Mackerras 2005-09-26 2112 else if ((spefscr & SPEFSCR_FINV) && (fpexc_mode & PR_FP_EXC_INV)) { 14cf11af6cf608 Paul Mackerras 2005-09-26 2113 code = FPE_FLTINV; 14cf11af6cf608 Paul Mackerras 2005-09-26 2114 } 14cf11af6cf608 Paul Mackerras 2005-09-26 2115 else if ((spefscr & (SPEFSCR_FG | SPEFSCR_FX)) && (fpexc_mode & PR_FP_EXC_RES)) 14cf11af6cf608 Paul Mackerras 2005-09-26 2116 code = FPE_FLTRES; 14cf11af6cf608 Paul Mackerras 2005-09-26 2117 6a800f36acd5bf Liu Yu 2008-10-28 2118 err = do_spe_mathemu(regs); 6a800f36acd5bf Liu Yu 2008-10-28 2119 if (err == 0) { 6a800f36acd5bf Liu Yu 2008-10-28 2120 regs->nip += 4; /* skip emulated instruction */ 6a800f36acd5bf Liu Yu 2008-10-28 2121 emulate_single_step(regs); 6a800f36acd5bf Liu Yu 2008-10-28 2122 return; 6a800f36acd5bf Liu Yu 2008-10-28 2123 } 14cf11af6cf608 Paul Mackerras 2005-09-26 2124 6a800f36acd5bf Liu Yu 2008-10-28 2125 if (err == -EFAULT) { 6a800f36acd5bf Liu Yu 2008-10-28 2126 /* got an error reading the instruction */ 6a800f36acd5bf Liu Yu 2008-10-28 2127 _exception(SIGSEGV, regs, SEGV_ACCERR, regs->nip); 6a800f36acd5bf Liu Yu 2008-10-28 2128 } else if (err == -EINVAL) { 6a800f36acd5bf Liu Yu 2008-10-28 2129 /* didn't recognize the instruction */ 6a800f36acd5bf Liu Yu 2008-10-28 2130 printk(KERN_ERR "unrecognized spe instruction " 6a800f36acd5bf Liu Yu 2008-10-28 2131 "in %s at %lx\n", current->comm, regs->nip); 6a800f36acd5bf Liu Yu 2008-10-28 2132 } else { 14cf11af6cf608 Paul Mackerras 2005-09-26 2133 _exception(SIGFPE, regs, code, regs->nip); 6a800f36acd5bf Liu Yu 2008-10-28 2134 } 6a800f36acd5bf Liu Yu 2008-10-28 2135 14cf11af6cf608 Paul Mackerras 2005-09-26 2136 return; 14cf11af6cf608 Paul Mackerras 2005-09-26 2137 } 6a800f36acd5bf Liu Yu 2008-10-28 2138 6a800f36acd5bf Liu Yu 2008-10-28 @2139 void SPEFloatingPointRoundException(struct pt_regs *regs) 6a800f36acd5bf Liu Yu 2008-10-28 2140 { 6a800f36acd5bf Liu Yu 2008-10-28 2141 extern int speround_handler(struct pt_regs *regs); 6a800f36acd5bf Liu Yu 2008-10-28 2142 int err; 6a800f36acd5bf Liu Yu 2008-10-28 2143 ef4291243f51d0 Christophe Leroy 2019-04-30 2144 /* We restore the interrupt state now */ ef4291243f51d0 Christophe Leroy 2019-04-30 2145 if (!arch_irq_disabled_regs(regs)) ef4291243f51d0 Christophe Leroy 2019-04-30 2146 local_irq_enable(); ef4291243f51d0 Christophe Leroy 2019-04-30 2147 6a800f36acd5bf Liu Yu 2008-10-28 2148 preempt_disable(); 6a800f36acd5bf Liu Yu 2008-10-28 2149 if (regs->msr & MSR_SPE) 6a800f36acd5bf Liu Yu 2008-10-28 2150 giveup_spe(current); 6a800f36acd5bf Liu Yu 2008-10-28 2151 preempt_enable(); 6a800f36acd5bf Liu Yu 2008-10-28 2152 6a800f36acd5bf Liu Yu 2008-10-28 2153 regs->nip -= 4; 6a800f36acd5bf Liu Yu 2008-10-28 2154 err = speround_handler(regs); 6a800f36acd5bf Liu Yu 2008-10-28 2155 if (err == 0) { 6a800f36acd5bf Liu Yu 2008-10-28 2156 regs->nip += 4; /* skip emulated instruction */ 6a800f36acd5bf Liu Yu 2008-10-28 2157 emulate_single_step(regs); 6a800f36acd5bf Liu Yu 2008-10-28 2158 return; 6a800f36acd5bf Liu Yu 2008-10-28 2159 } 6a800f36acd5bf Liu Yu 2008-10-28 2160 6a800f36acd5bf Liu Yu 2008-10-28 2161 if (err == -EFAULT) { 6a800f36acd5bf Liu Yu 2008-10-28 2162 /* got an error reading the instruction */ 6a800f36acd5bf Liu Yu 2008-10-28 2163 _exception(SIGSEGV, regs, SEGV_ACCERR, regs->nip); 6a800f36acd5bf Liu Yu 2008-10-28 2164 } else if (err == -EINVAL) { 6a800f36acd5bf Liu Yu 2008-10-28 2165 /* didn't recognize the instruction */ 6a800f36acd5bf Liu Yu 2008-10-28 2166 printk(KERN_ERR "unrecognized spe instruction " 6a800f36acd5bf Liu Yu 2008-10-28 2167 "in %s at %lx\n", current->comm, regs->nip); 6a800f36acd5bf Liu Yu 2008-10-28 2168 } else { aeb1c0f6ff18f5 Eric W. Biederman 2018-04-17 2169 _exception(SIGFPE, regs, FPE_FLTUNK, regs->nip); 6a800f36acd5bf Liu Yu 2008-10-28 2170 return; 6a800f36acd5bf Liu Yu 2008-10-28 2171 } 6a800f36acd5bf Liu Yu 2008-10-28 2172 } 14cf11af6cf608 Paul Mackerras 2005-09-26 2173 #endif dc1c1ca3dcd94c Stephen Rothwell 2005-10-01 2174
:::::: The code at line 2073 was first introduced by commit :::::: 14cf11af6cf608eb8c23e989ddb17a715ddce109 powerpc: Merge enough to start building in arch/powerpc.
:::::: TO: Paul Mackerras <paulus@samba.org> :::::: CC: Paul Mackerras <paulus@samba.org>
--- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org [unhandled content-type:application/gzip] | |