[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202107160644.EIHoU9h3-lkp@intel.com>
Date: Fri, 16 Jul 2021 06:04:02 +0800
From: kernel test robot <lkp@...el.com>
To: Frédéric Pierret (fepitre)
<frederic.pierret@...es-os.org>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Kees Cook <keescook@...omium.org>,
Sasha Levin <sashal@...nel.org>
Subject: [linux-stable-rc:linux-4.14.y 9785/9999]
arch/powerpc/kernel/hw_breakpoint.c:106:6: error: no previous prototype for
'arch_unregister_hw_breakpoint'
Hi Frédéric,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.14.y
head: 4416c389d63e76d897a5788f6145f08522cf58b4
commit: a5ef8f46a2ab471eed32a948185a05eac9613b13 [9785/9999] gcc-common.h: Update for GCC 10
config: powerpc64-randconfig-r023-20210715 (attached as .config)
compiler: powerpc-linux-gcc (GCC) 10.3.0
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
# https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git/commit/?id=a5ef8f46a2ab471eed32a948185a05eac9613b13
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-4.14.y
git checkout a5ef8f46a2ab471eed32a948185a05eac9613b13
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross ARCH=powerpc64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All errors (new ones prefixed by >>):
In file included from include/linux/workqueue.h:9,
from include/linux/srcu.h:34,
from include/linux/notifier.h:16,
from include/linux/memory_hotplug.h:7,
from include/linux/mmzone.h:782,
from include/linux/gfp.h:6,
from include/linux/idr.h:16,
from include/linux/kernfs.h:14,
from include/linux/sysfs.h:16,
from include/linux/kobject.h:21,
from include/linux/device.h:17,
from arch/powerpc/include/asm/perf_event_server.h:14,
from arch/powerpc/include/asm/perf_event.h:18,
from include/linux/perf_event.h:24,
from include/linux/hw_breakpoint.h:5,
from arch/powerpc/kernel/hw_breakpoint.c:25:
include/linux/timer.h: In function 'timer_setup':
include/linux/timer.h:179:23: error: cast between incompatible function types from 'void (*)(struct timer_list *)' to 'void (*)(long unsigned int)' [-Werror=cast-function-type]
179 | __setup_timer(timer, (TIMER_FUNC_TYPE)callback,
| ^
include/linux/timer.h:144:25: note: in definition of macro '__setup_timer'
144 | (_timer)->function = (_fn); \
| ^~~
arch/powerpc/kernel/hw_breakpoint.c: At top level:
>> arch/powerpc/kernel/hw_breakpoint.c:106:6: error: no previous prototype for 'arch_unregister_hw_breakpoint' [-Werror=missing-prototypes]
106 | void arch_unregister_hw_breakpoint(struct perf_event *bp)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> arch/powerpc/kernel/hw_breakpoint.c:209:5: error: no previous prototype for 'hw_breakpoint_handler' [-Werror=missing-prototypes]
209 | int hw_breakpoint_handler(struct die_args *args)
| ^~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
--
In file included from include/linux/workqueue.h:9,
from include/linux/srcu.h:34,
from include/linux/notifier.h:16,
from include/linux/memory_hotplug.h:7,
from include/linux/mmzone.h:782,
from include/linux/gfp.h:6,
from include/linux/mm.h:10,
from include/linux/memblock.h:18,
from arch/powerpc/kernel/btext.c:11:
include/linux/timer.h: In function 'timer_setup':
include/linux/timer.h:179:23: error: cast between incompatible function types from 'void (*)(struct timer_list *)' to 'void (*)(long unsigned int)' [-Werror=cast-function-type]
179 | __setup_timer(timer, (TIMER_FUNC_TYPE)callback,
| ^
include/linux/timer.h:144:25: note: in definition of macro '__setup_timer'
144 | (_timer)->function = (_fn); \
| ^~~
arch/powerpc/kernel/btext.c: At top level:
>> arch/powerpc/kernel/btext.c:173:5: error: no previous prototype for 'btext_initialize' [-Werror=missing-prototypes]
173 | int btext_initialize(struct device_node *np)
| ^~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
--
In file included from include/linux/workqueue.h:9,
from include/linux/srcu.h:34,
from include/linux/notifier.h:16,
from arch/powerpc/include/asm/uprobes.h:25,
from include/linux/uprobes.h:62,
from include/linux/mm_types.h:14,
from include/linux/fs.h:22,
from include/linux/debugfs.h:18,
from arch/powerpc/mm/dump_hashpagetable.c:16:
include/linux/timer.h: In function 'timer_setup':
include/linux/timer.h:179:23: error: cast between incompatible function types from 'void (*)(struct timer_list *)' to 'void (*)(long unsigned int)' [-Werror=cast-function-type]
179 | __setup_timer(timer, (TIMER_FUNC_TYPE)callback,
| ^
include/linux/timer.h:144:25: note: in definition of macro '__setup_timer'
144 | (_timer)->function = (_fn); \
| ^~~
In file included from arch/powerpc/mm/dump_hashpagetable.c:27:
arch/powerpc/include/asm/plpar_wrappers.h: In function 'get_cede_latency_hint':
>> arch/powerpc/include/asm/plpar_wrappers.h:27:9: error: implicit declaration of function 'get_lppaca'; did you mean 'get_page'? [-Werror=implicit-function-declaration]
27 | return get_lppaca()->cede_latency_hint;
| ^~~~~~~~~~
| get_page
>> arch/powerpc/include/asm/plpar_wrappers.h:27:21: error: invalid type argument of '->' (have 'int')
27 | return get_lppaca()->cede_latency_hint;
| ^~
arch/powerpc/include/asm/plpar_wrappers.h: In function 'set_cede_latency_hint':
arch/powerpc/include/asm/plpar_wrappers.h:32:14: error: invalid type argument of '->' (have 'int')
32 | get_lppaca()->cede_latency_hint = latency_hint;
| ^~
arch/powerpc/include/asm/plpar_wrappers.h: In function 'extended_cede_processor':
>> arch/powerpc/include/asm/plpar_wrappers.h:51:4: error: implicit declaration of function '__hard_irq_enable'; did you mean 'may_hard_irq_enable'? [-Werror=implicit-function-declaration]
51 | __hard_irq_enable();
| ^~~~~~~~~~~~~~~~~
| may_hard_irq_enable
arch/powerpc/include/asm/plpar_wrappers.h: In function 'vpa_call':
>> arch/powerpc/include/asm/plpar_wrappers.h:62:16: error: left shift count >= width of type [-Werror=shift-count-overflow]
62 | flags = flags << H_VPA_FUNC_SHIFT;
| ^~
In file included from arch/powerpc/include/asm/plpar_wrappers.h:8,
from arch/powerpc/mm/dump_hashpagetable.c:27:
arch/powerpc/include/asm/plpar_wrappers.h: In function 'plpar_pte_read_4':
>> arch/powerpc/include/asm/hvcall.h:120:23: error: left shift count >= width of type [-Werror=shift-count-overflow]
120 | #define H_READ_4 (1UL<<(63-26)) /* Return 4 PTEs */
| ^~
arch/powerpc/include/asm/plpar_wrappers.h:183:44: note: in expansion of macro 'H_READ_4'
183 | rc = plpar_hcall9(H_READ, retbuf, flags | H_READ_4, ptex);
| ^~~~~~~~
arch/powerpc/include/asm/plpar_wrappers.h: In function 'plpar_pte_read_4_raw':
>> arch/powerpc/include/asm/hvcall.h:120:23: error: left shift count >= width of type [-Werror=shift-count-overflow]
120 | #define H_READ_4 (1UL<<(63-26)) /* Return 4 PTEs */
| ^~
arch/powerpc/include/asm/plpar_wrappers.h:201:48: note: in expansion of macro 'H_READ_4'
201 | rc = plpar_hcall9_raw(H_READ, retbuf, flags | H_READ_4, ptex);
| ^~~~~~~~
arch/powerpc/mm/dump_hashpagetable.c: At top level:
>> arch/powerpc/mm/dump_hashpagetable.c:69:13: error: 'SLB_VSID_B' undeclared here (not in a function)
69 | .mask = SLB_VSID_B,
| ^~~~~~~~~~
>> arch/powerpc/mm/dump_hashpagetable.c:70:13: error: 'SLB_VSID_B_256M' undeclared here (not in a function)
70 | .val = SLB_VSID_B_256M,
| ^~~~~~~~~~~~~~~
>> arch/powerpc/mm/dump_hashpagetable.c:74:11: error: 'HPTE_V_SECONDARY' undeclared here (not in a function)
74 | .mask = HPTE_V_SECONDARY,
| ^~~~~~~~~~~~~~~~
>> arch/powerpc/mm/dump_hashpagetable.c:79:11: error: 'HPTE_V_VALID' undeclared here (not in a function)
79 | .mask = HPTE_V_VALID,
| ^~~~~~~~~~~~
>> arch/powerpc/mm/dump_hashpagetable.c:84:11: error: 'HPTE_V_BOLTED' undeclared here (not in a function)
84 | .mask = HPTE_V_BOLTED,
| ^~~~~~~~~~~~~
>> arch/powerpc/mm/dump_hashpagetable.c:93:11: error: 'HPTE_R_PP0' undeclared here (not in a function)
93 | .mask = HPTE_R_PP0 | HPTE_R_PP,
| ^~~~~~~~~~
>> arch/powerpc/mm/dump_hashpagetable.c:93:24: error: 'HPTE_R_PP' undeclared here (not in a function)
93 | .mask = HPTE_R_PP0 | HPTE_R_PP,
| ^~~~~~~~~
>> arch/powerpc/mm/dump_hashpagetable.c:93:22: error: invalid operands to binary | (have 'const struct flag_info *' and 'const struct flag_info *')
93 | .mask = HPTE_R_PP0 | HPTE_R_PP,
| ~~~~~~~~~~ ^
| | |
| | const struct flag_info *
| const struct flag_info *
>> arch/powerpc/mm/dump_hashpagetable.c:93:11: error: initialization of 'long long unsigned int' from 'const struct flag_info *' makes integer from pointer without a cast [-Werror=int-conversion]
93 | .mask = HPTE_R_PP0 | HPTE_R_PP,
| ^~~~~~~~~~
arch/powerpc/mm/dump_hashpagetable.c:93:11: note: (near initialization for 'r_flag_array[0].mask')
>> arch/powerpc/mm/dump_hashpagetable.c:93:11: error: initializer element is not constant
arch/powerpc/mm/dump_hashpagetable.c:93:11: note: (near initialization for 'r_flag_array[0].mask')
arch/powerpc/mm/dump_hashpagetable.c:97:22: error: invalid operands to binary | (have 'const struct flag_info *' and 'const struct flag_info *')
97 | .mask = HPTE_R_PP0 | HPTE_R_PP,
| ~~~~~~~~~~ ^
| | |
| | const struct flag_info *
| const struct flag_info *
arch/powerpc/mm/dump_hashpagetable.c:97:11: error: initialization of 'long long unsigned int' from 'const struct flag_info *' makes integer from pointer without a cast [-Werror=int-conversion]
97 | .mask = HPTE_R_PP0 | HPTE_R_PP,
| ^~~~~~~~~~
arch/powerpc/mm/dump_hashpagetable.c:97:11: note: (near initialization for 'r_flag_array[1].mask')
arch/powerpc/mm/dump_hashpagetable.c:97:11: error: initializer element is not constant
arch/powerpc/mm/dump_hashpagetable.c:97:11: note: (near initialization for 'r_flag_array[1].mask')
arch/powerpc/mm/dump_hashpagetable.c:101:22: error: invalid operands to binary | (have 'const struct flag_info *' and 'const struct flag_info *')
101 | .mask = HPTE_R_PP0 | HPTE_R_PP,
| ~~~~~~~~~~ ^
| | |
| | const struct flag_info *
| const struct flag_info *
arch/powerpc/mm/dump_hashpagetable.c:101:11: error: initialization of 'long long unsigned int' from 'const struct flag_info *' makes integer from pointer without a cast [-Werror=int-conversion]
101 | .mask = HPTE_R_PP0 | HPTE_R_PP,
| ^~~~~~~~~~
arch/powerpc/mm/dump_hashpagetable.c:101:11: note: (near initialization for 'r_flag_array[2].mask')
arch/powerpc/mm/dump_hashpagetable.c:101:11: error: initializer element is not constant
arch/powerpc/mm/dump_hashpagetable.c:101:11: note: (near initialization for 'r_flag_array[2].mask')
arch/powerpc/mm/dump_hashpagetable.c:105:22: error: invalid operands to binary | (have 'const struct flag_info *' and 'const struct flag_info *')
105 | .mask = HPTE_R_PP0 | HPTE_R_PP,
| ~~~~~~~~~~ ^
| | |
| | const struct flag_info *
| const struct flag_info *
arch/powerpc/mm/dump_hashpagetable.c:105:11: error: initialization of 'long long unsigned int' from 'const struct flag_info *' makes integer from pointer without a cast [-Werror=int-conversion]
105 | .mask = HPTE_R_PP0 | HPTE_R_PP,
| ^~~~~~~~~~
arch/powerpc/mm/dump_hashpagetable.c:105:11: note: (near initialization for 'r_flag_array[3].mask')
arch/powerpc/mm/dump_hashpagetable.c:105:11: error: initializer element is not constant
arch/powerpc/mm/dump_hashpagetable.c:105:11: note: (near initialization for 'r_flag_array[3].mask')
arch/powerpc/mm/dump_hashpagetable.c:109:22: error: invalid operands to binary | (have 'const struct flag_info *' and 'const struct flag_info *')
109 | .mask = HPTE_R_PP0 | HPTE_R_PP,
| ~~~~~~~~~~ ^
| | |
| | const struct flag_info *
| const struct flag_info *
arch/powerpc/mm/dump_hashpagetable.c:109:11: error: initialization of 'long long unsigned int' from 'const struct flag_info *' makes integer from pointer without a cast [-Werror=int-conversion]
109 | .mask = HPTE_R_PP0 | HPTE_R_PP,
| ^~~~~~~~~~
arch/powerpc/mm/dump_hashpagetable.c:109:11: note: (near initialization for 'r_flag_array[4].mask')
arch/powerpc/mm/dump_hashpagetable.c:109:11: error: initializer element is not constant
arch/powerpc/mm/dump_hashpagetable.c:109:11: note: (near initialization for 'r_flag_array[4].mask')
>> arch/powerpc/mm/dump_hashpagetable.c:110:10: error: 'PP_RXXX' undeclared here (not in a function); did you mean 'PP_RXRX'?
110 | .val = PP_RXXX,
| ^~~~~~~
| PP_RXRX
arch/powerpc/mm/dump_hashpagetable.c:110:10: error: initialization of 'long long unsigned int' from 'const struct flag_info *' makes integer from pointer without a cast [-Werror=int-conversion]
arch/powerpc/mm/dump_hashpagetable.c:110:10: note: (near initialization for 'r_flag_array[4].val')
arch/powerpc/mm/dump_hashpagetable.c:110:10: error: initializer element is not constant
arch/powerpc/mm/dump_hashpagetable.c:110:10: note: (near initialization for 'r_flag_array[4].val')
>> arch/powerpc/mm/dump_hashpagetable.c:113:11: error: 'HPTE_R_KEY_HI' undeclared here (not in a function)
113 | .mask = HPTE_R_KEY_HI | HPTE_R_KEY_LO,
| ^~~~~~~~~~~~~
>> arch/powerpc/mm/dump_hashpagetable.c:113:27: error: 'HPTE_R_KEY_LO' undeclared here (not in a function)
113 | .mask = HPTE_R_KEY_HI | HPTE_R_KEY_LO,
| ^~~~~~~~~~~~~
arch/powerpc/mm/dump_hashpagetable.c:113:25: error: invalid operands to binary | (have 'const struct flag_info *' and 'const struct flag_info *')
113 | .mask = HPTE_R_KEY_HI | HPTE_R_KEY_LO,
| ~~~~~~~~~~~~~ ^
| | |
| | const struct flag_info *
| const struct flag_info *
arch/powerpc/mm/dump_hashpagetable.c:113:11: error: initialization of 'long long unsigned int' from 'const struct flag_info *' makes integer from pointer without a cast [-Werror=int-conversion]
113 | .mask = HPTE_R_KEY_HI | HPTE_R_KEY_LO,
| ^~~~~~~~~~~~~
arch/powerpc/mm/dump_hashpagetable.c:113:11: note: (near initialization for 'r_flag_array[5].mask')
arch/powerpc/mm/dump_hashpagetable.c:113:11: error: initializer element is not constant
arch/powerpc/mm/dump_hashpagetable.c:113:11: note: (near initialization for 'r_flag_array[5].mask')
arch/powerpc/mm/dump_hashpagetable.c:114:24: error: invalid operands to binary | (have 'const struct flag_info *' and 'const struct flag_info *')
114 | .val = HPTE_R_KEY_HI | HPTE_R_KEY_LO,
| ~~~~~~~~~~~~~ ^
| | |
| | const struct flag_info *
| const struct flag_info *
arch/powerpc/mm/dump_hashpagetable.c:114:10: error: initialization of 'long long unsigned int' from 'const struct flag_info *' makes integer from pointer without a cast [-Werror=int-conversion]
114 | .val = HPTE_R_KEY_HI | HPTE_R_KEY_LO,
| ^~~~~~~~~~~~~
arch/powerpc/mm/dump_hashpagetable.c:114:10: note: (near initialization for 'r_flag_array[5].val')
arch/powerpc/mm/dump_hashpagetable.c:114:10: error: initializer element is not constant
arch/powerpc/mm/dump_hashpagetable.c:114:10: note: (near initialization for 'r_flag_array[5].val')
>> arch/powerpc/mm/dump_hashpagetable.c:119:11: error: 'HPTE_R_R' undeclared here (not in a function)
119 | .mask = HPTE_R_R,
| ^~~~~~~~
arch/powerpc/mm/dump_hashpagetable.c:119:11: error: initialization of 'long long unsigned int' from 'const struct flag_info *' makes integer from pointer without a cast [-Werror=int-conversion]
arch/powerpc/mm/dump_hashpagetable.c:119:11: note: (near initialization for 'r_flag_array[6].mask')
arch/powerpc/mm/dump_hashpagetable.c:119:11: error: initializer element is not constant
arch/powerpc/mm/dump_hashpagetable.c:119:11: note: (near initialization for 'r_flag_array[6].mask')
arch/powerpc/mm/dump_hashpagetable.c:120:10: error: initialization of 'long long unsigned int' from 'const struct flag_info *' makes integer from pointer without a cast [-Werror=int-conversion]
120 | .val = HPTE_R_R,
| ^~~~~~~~
arch/powerpc/mm/dump_hashpagetable.c:120:10: note: (near initialization for 'r_flag_array[6].val')
arch/powerpc/mm/dump_hashpagetable.c:120:10: error: initializer element is not constant
arch/powerpc/mm/dump_hashpagetable.c:120:10: note: (near initialization for 'r_flag_array[6].val')
arch/powerpc/mm/dump_hashpagetable.c:124:11: error: 'HPTE_R_C' undeclared here (not in a function)
124 | .mask = HPTE_R_C,
| ^~~~~~~~
arch/powerpc/mm/dump_hashpagetable.c:124:11: error: initialization of 'long long unsigned int' from 'const struct flag_info *' makes integer from pointer without a cast [-Werror=int-conversion]
arch/powerpc/mm/dump_hashpagetable.c:124:11: note: (near initialization for 'r_flag_array[7].mask')
arch/powerpc/mm/dump_hashpagetable.c:124:11: error: initializer element is not constant
arch/powerpc/mm/dump_hashpagetable.c:124:11: note: (near initialization for 'r_flag_array[7].mask')
arch/powerpc/mm/dump_hashpagetable.c:125:10: error: initialization of 'long long unsigned int' from 'const struct flag_info *' makes integer from pointer without a cast [-Werror=int-conversion]
125 | .val = HPTE_R_C,
| ^~~~~~~~
arch/powerpc/mm/dump_hashpagetable.c:125:10: note: (near initialization for 'r_flag_array[7].val')
arch/powerpc/mm/dump_hashpagetable.c:125:10: error: initializer element is not constant
arch/powerpc/mm/dump_hashpagetable.c:125:10: note: (near initialization for 'r_flag_array[7].val')
arch/powerpc/mm/dump_hashpagetable.c:129:11: error: 'HPTE_R_N' undeclared here (not in a function)
129 | .mask = HPTE_R_N,
| ^~~~~~~~
arch/powerpc/mm/dump_hashpagetable.c:129:11: error: initialization of 'long long unsigned int' from 'const struct flag_info *' makes integer from pointer without a cast [-Werror=int-conversion]
arch/powerpc/mm/dump_hashpagetable.c:129:11: note: (near initialization for 'r_flag_array[8].mask')
arch/powerpc/mm/dump_hashpagetable.c:129:11: error: initializer element is not constant
arch/powerpc/mm/dump_hashpagetable.c:129:11: note: (near initialization for 'r_flag_array[8].mask')
arch/powerpc/mm/dump_hashpagetable.c:130:10: error: initialization of 'long long unsigned int' from 'const struct flag_info *' makes integer from pointer without a cast [-Werror=int-conversion]
130 | .val = HPTE_R_N,
| ^~~~~~~~
arch/powerpc/mm/dump_hashpagetable.c:130:10: note: (near initialization for 'r_flag_array[8].val')
arch/powerpc/mm/dump_hashpagetable.c:130:10: error: initializer element is not constant
arch/powerpc/mm/dump_hashpagetable.c:130:10: note: (near initialization for 'r_flag_array[8].val')
arch/powerpc/mm/dump_hashpagetable.c:133:11: error: 'HPTE_R_WIMG' undeclared here (not in a function)
133 | .mask = HPTE_R_WIMG,
| ^~~~~~~~~~~
arch/powerpc/mm/dump_hashpagetable.c:133:11: error: initialization of 'long long unsigned int' from 'const struct flag_info *' makes integer from pointer without a cast [-Werror=int-conversion]
arch/powerpc/mm/dump_hashpagetable.c:133:11: note: (near initialization for 'r_flag_array[9].mask')
arch/powerpc/mm/dump_hashpagetable.c:133:11: error: initializer element is not constant
arch/powerpc/mm/dump_hashpagetable.c:133:11: note: (near initialization for 'r_flag_array[9].mask')
arch/powerpc/mm/dump_hashpagetable.c:134:10: error: 'HPTE_R_W' undeclared here (not in a function)
134 | .val = HPTE_R_W,
| ^~~~~~~~
arch/powerpc/mm/dump_hashpagetable.c:134:10: error: initialization of 'long long unsigned int' from 'const struct flag_info *' makes integer from pointer without a cast [-Werror=int-conversion]
arch/powerpc/mm/dump_hashpagetable.c:134:10: note: (near initialization for 'r_flag_array[9].val')
arch/powerpc/mm/dump_hashpagetable.c:134:10: error: initializer element is not constant
arch/powerpc/mm/dump_hashpagetable.c:134:10: note: (near initialization for 'r_flag_array[9].val')
arch/powerpc/mm/dump_hashpagetable.c:137:11: error: initialization of 'long long unsigned int' from 'const struct flag_info *' makes integer from pointer without a cast [-Werror=int-conversion]
137 | .mask = HPTE_R_WIMG,
| ^~~~~~~~~~~
arch/powerpc/mm/dump_hashpagetable.c:137:11: note: (near initialization for 'r_flag_array[10].mask')
arch/powerpc/mm/dump_hashpagetable.c:137:11: error: initializer element is not constant
arch/powerpc/mm/dump_hashpagetable.c:137:11: note: (near initialization for 'r_flag_array[10].mask')
arch/powerpc/mm/dump_hashpagetable.c:138:10: error: 'HPTE_R_I' undeclared here (not in a function)
138 | .val = HPTE_R_I,
| ^~~~~~~~
arch/powerpc/mm/dump_hashpagetable.c:138:10: error: initialization of 'long long unsigned int' from 'const struct flag_info *' makes integer from pointer without a cast [-Werror=int-conversion]
arch/powerpc/mm/dump_hashpagetable.c:138:10: note: (near initialization for 'r_flag_array[10].val')
arch/powerpc/mm/dump_hashpagetable.c:138:10: error: initializer element is not constant
arch/powerpc/mm/dump_hashpagetable.c:138:10: note: (near initialization for 'r_flag_array[10].val')
arch/powerpc/mm/dump_hashpagetable.c:141:11: error: initialization of 'long long unsigned int' from 'const struct flag_info *' makes integer from pointer without a cast [-Werror=int-conversion]
141 | .mask = HPTE_R_WIMG,
| ^~~~~~~~~~~
arch/powerpc/mm/dump_hashpagetable.c:141:11: note: (near initialization for 'r_flag_array[11].mask')
arch/powerpc/mm/dump_hashpagetable.c:141:11: error: initializer element is not constant
arch/powerpc/mm/dump_hashpagetable.c:141:11: note: (near initialization for 'r_flag_array[11].mask')
arch/powerpc/mm/dump_hashpagetable.c:142:10: error: 'HPTE_R_G' undeclared here (not in a function)
142 | .val = HPTE_R_G,
| ^~~~~~~~
arch/powerpc/mm/dump_hashpagetable.c:142:10: error: initialization of 'long long unsigned int' from 'const struct flag_info *' makes integer from pointer without a cast [-Werror=int-conversion]
arch/powerpc/mm/dump_hashpagetable.c:142:10: note: (near initialization for 'r_flag_array[11].val')
arch/powerpc/mm/dump_hashpagetable.c:142:10: error: initializer element is not constant
arch/powerpc/mm/dump_hashpagetable.c:142:10: note: (near initialization for 'r_flag_array[11].val')
arch/powerpc/mm/dump_hashpagetable.c: In function 'dump_hpte_info':
arch/powerpc/mm/dump_hashpagetable.c:199:37: error: implicit declaration of function 'HPTE_V_AVPN_VAL' [-Werror=implicit-function-declaration]
199 | seq_printf(st->seq, "AVPN:%llx\t", HPTE_V_AVPN_VAL(v));
| ^~~~~~~~~~~~~~~
arch/powerpc/mm/dump_hashpagetable.c:199:31: error: format '%llx' expects argument of type 'long long unsigned int', but argument 3 has type 'int' [-Werror=format=]
199 | seq_printf(st->seq, "AVPN:%llx\t", HPTE_V_AVPN_VAL(v));
| ~~~^ ~~~~~~~~~~~~~~~~~~
| | |
| | int
| long long unsigned int
| %x
arch/powerpc/mm/dump_hashpagetable.c: In function 'native_find':
arch/powerpc/mm/dump_hashpagetable.c:217:17: error: 'mmu_kernel_ssize' undeclared (first use in this function)
217 | int i, ssize = mmu_kernel_ssize;
| ^~~~~~~~~~~~~~~~
arch/powerpc/mm/dump_hashpagetable.c:217:17: note: each undeclared identifier is reported only once for each function it appears in
arch/powerpc/mm/dump_hashpagetable.c:217:17: error: initialization of 'int' from 'const struct flag_info *' makes integer from pointer without a cast [-Werror=int-conversion]
arch/powerpc/mm/dump_hashpagetable.c:218:24: error: 'mmu_psize_defs' undeclared (first use in this function)
218 | unsigned long shift = mmu_psize_defs[psize].shift;
| ^~~~~~~~~~~~~~
arch/powerpc/mm/dump_hashpagetable.c:221:9: error: implicit declaration of function 'get_kernel_vsid'; did you mean 'get_kernel_page'? [-Werror=implicit-function-declaration]
221 | vsid = get_kernel_vsid(ea, ssize);
..
vim +/arch_unregister_hw_breakpoint +106 arch/powerpc/kernel/hw_breakpoint.c
5aae8a53708025 K.Prasad 2010-06-15 101
5aae8a53708025 K.Prasad 2010-06-15 102 /*
5aae8a53708025 K.Prasad 2010-06-15 103 * Perform cleanup of arch-specific counters during unregistration
5aae8a53708025 K.Prasad 2010-06-15 104 * of the perf-event
5aae8a53708025 K.Prasad 2010-06-15 105 */
5aae8a53708025 K.Prasad 2010-06-15 @106 void arch_unregister_hw_breakpoint(struct perf_event *bp)
5aae8a53708025 K.Prasad 2010-06-15 107 {
5aae8a53708025 K.Prasad 2010-06-15 108 /*
5aae8a53708025 K.Prasad 2010-06-15 109 * If the breakpoint is unregistered between a hw_breakpoint_handler()
5aae8a53708025 K.Prasad 2010-06-15 110 * and the single_step_dabr_instruction(), then cleanup the breakpoint
5aae8a53708025 K.Prasad 2010-06-15 111 * restoration variables to prevent dangling pointers.
fb822e6076d972 Ravi Bangoria 2016-03-02 112 * FIXME, this should not be using bp->ctx at all! Sayeth peterz.
5aae8a53708025 K.Prasad 2010-06-15 113 */
fb822e6076d972 Ravi Bangoria 2016-03-02 114 if (bp->ctx && bp->ctx->task && bp->ctx->task != ((void *)-1L))
5aae8a53708025 K.Prasad 2010-06-15 115 bp->ctx->task->thread.last_hit_ubp = NULL;
5aae8a53708025 K.Prasad 2010-06-15 116 }
5aae8a53708025 K.Prasad 2010-06-15 117
5aae8a53708025 K.Prasad 2010-06-15 118 /*
5aae8a53708025 K.Prasad 2010-06-15 119 * Check for virtual address in kernel space.
5aae8a53708025 K.Prasad 2010-06-15 120 */
5aae8a53708025 K.Prasad 2010-06-15 121 int arch_check_bp_in_kernelspace(struct perf_event *bp)
5aae8a53708025 K.Prasad 2010-06-15 122 {
5aae8a53708025 K.Prasad 2010-06-15 123 struct arch_hw_breakpoint *info = counter_arch_bp(bp);
5aae8a53708025 K.Prasad 2010-06-15 124
5aae8a53708025 K.Prasad 2010-06-15 125 return is_kernel_addr(info->address);
5aae8a53708025 K.Prasad 2010-06-15 126 }
5aae8a53708025 K.Prasad 2010-06-15 127
5aae8a53708025 K.Prasad 2010-06-15 128 int arch_bp_generic_fields(int type, int *gen_bp_type)
5aae8a53708025 K.Prasad 2010-06-15 129 {
9422de3e953d0e Michael Neuling 2012-12-20 130 *gen_bp_type = 0;
9422de3e953d0e Michael Neuling 2012-12-20 131 if (type & HW_BRK_TYPE_READ)
9422de3e953d0e Michael Neuling 2012-12-20 132 *gen_bp_type |= HW_BREAKPOINT_R;
9422de3e953d0e Michael Neuling 2012-12-20 133 if (type & HW_BRK_TYPE_WRITE)
9422de3e953d0e Michael Neuling 2012-12-20 134 *gen_bp_type |= HW_BREAKPOINT_W;
9422de3e953d0e Michael Neuling 2012-12-20 135 if (*gen_bp_type == 0)
5aae8a53708025 K.Prasad 2010-06-15 136 return -EINVAL;
5aae8a53708025 K.Prasad 2010-06-15 137 return 0;
5aae8a53708025 K.Prasad 2010-06-15 138 }
5aae8a53708025 K.Prasad 2010-06-15 139
5aae8a53708025 K.Prasad 2010-06-15 140 /*
5aae8a53708025 K.Prasad 2010-06-15 141 * Validate the arch-specific HW Breakpoint register settings
5aae8a53708025 K.Prasad 2010-06-15 142 */
5aae8a53708025 K.Prasad 2010-06-15 143 int arch_validate_hwbkpt_settings(struct perf_event *bp)
5aae8a53708025 K.Prasad 2010-06-15 144 {
4ae7ebe9522a9e Michael Neuling 2013-01-24 145 int ret = -EINVAL, length_max;
5aae8a53708025 K.Prasad 2010-06-15 146 struct arch_hw_breakpoint *info = counter_arch_bp(bp);
5aae8a53708025 K.Prasad 2010-06-15 147
5aae8a53708025 K.Prasad 2010-06-15 148 if (!bp)
5aae8a53708025 K.Prasad 2010-06-15 149 return ret;
5aae8a53708025 K.Prasad 2010-06-15 150
9422de3e953d0e Michael Neuling 2012-12-20 151 info->type = HW_BRK_TYPE_TRANSLATE;
9422de3e953d0e Michael Neuling 2012-12-20 152 if (bp->attr.bp_type & HW_BREAKPOINT_R)
9422de3e953d0e Michael Neuling 2012-12-20 153 info->type |= HW_BRK_TYPE_READ;
9422de3e953d0e Michael Neuling 2012-12-20 154 if (bp->attr.bp_type & HW_BREAKPOINT_W)
9422de3e953d0e Michael Neuling 2012-12-20 155 info->type |= HW_BRK_TYPE_WRITE;
9422de3e953d0e Michael Neuling 2012-12-20 156 if (info->type == HW_BRK_TYPE_TRANSLATE)
9422de3e953d0e Michael Neuling 2012-12-20 157 /* must set alteast read or write */
5aae8a53708025 K.Prasad 2010-06-15 158 return ret;
9422de3e953d0e Michael Neuling 2012-12-20 159 if (!(bp->attr.exclude_user))
9422de3e953d0e Michael Neuling 2012-12-20 160 info->type |= HW_BRK_TYPE_USER;
9422de3e953d0e Michael Neuling 2012-12-20 161 if (!(bp->attr.exclude_kernel))
9422de3e953d0e Michael Neuling 2012-12-20 162 info->type |= HW_BRK_TYPE_KERNEL;
9422de3e953d0e Michael Neuling 2012-12-20 163 if (!(bp->attr.exclude_hv))
9422de3e953d0e Michael Neuling 2012-12-20 164 info->type |= HW_BRK_TYPE_HYP;
5aae8a53708025 K.Prasad 2010-06-15 165 info->address = bp->attr.bp_addr;
5aae8a53708025 K.Prasad 2010-06-15 166 info->len = bp->attr.bp_len;
5aae8a53708025 K.Prasad 2010-06-15 167
5aae8a53708025 K.Prasad 2010-06-15 168 /*
5aae8a53708025 K.Prasad 2010-06-15 169 * Since breakpoint length can be a maximum of HW_BREAKPOINT_LEN(8)
5aae8a53708025 K.Prasad 2010-06-15 170 * and breakpoint addresses are aligned to nearest double-word
5aae8a53708025 K.Prasad 2010-06-15 171 * HW_BREAKPOINT_ALIGN by rounding off to the lower address, the
5aae8a53708025 K.Prasad 2010-06-15 172 * 'symbolsize' should satisfy the check below.
5aae8a53708025 K.Prasad 2010-06-15 173 */
4ae7ebe9522a9e Michael Neuling 2013-01-24 174 length_max = 8; /* DABR */
4ae7ebe9522a9e Michael Neuling 2013-01-24 175 if (cpu_has_feature(CPU_FTR_DAWR)) {
4ae7ebe9522a9e Michael Neuling 2013-01-24 176 length_max = 512 ; /* 64 doublewords */
4ae7ebe9522a9e Michael Neuling 2013-01-24 177 /* DAWR region can't cross 512 boundary */
919c9b8187bc8a Michael Neuling 2018-05-17 178 if ((bp->attr.bp_addr >> 9) !=
919c9b8187bc8a Michael Neuling 2018-05-17 179 ((bp->attr.bp_addr + bp->attr.bp_len - 1) >> 9))
4ae7ebe9522a9e Michael Neuling 2013-01-24 180 return -EINVAL;
4ae7ebe9522a9e Michael Neuling 2013-01-24 181 }
5aae8a53708025 K.Prasad 2010-06-15 182 if (info->len >
4ae7ebe9522a9e Michael Neuling 2013-01-24 183 (length_max - (info->address & HW_BREAKPOINT_ALIGN)))
5aae8a53708025 K.Prasad 2010-06-15 184 return -EINVAL;
5aae8a53708025 K.Prasad 2010-06-15 185 return 0;
5aae8a53708025 K.Prasad 2010-06-15 186 }
5aae8a53708025 K.Prasad 2010-06-15 187
06532a6743d83f K.Prasad 2010-06-15 188 /*
06532a6743d83f K.Prasad 2010-06-15 189 * Restores the breakpoint on the debug registers.
06532a6743d83f K.Prasad 2010-06-15 190 * Invoke this function if it is known that the execution context is
06532a6743d83f K.Prasad 2010-06-15 191 * about to change to cause loss of MSR_SE settings.
06532a6743d83f K.Prasad 2010-06-15 192 */
06532a6743d83f K.Prasad 2010-06-15 193 void thread_change_pc(struct task_struct *tsk, struct pt_regs *regs)
06532a6743d83f K.Prasad 2010-06-15 194 {
06532a6743d83f K.Prasad 2010-06-15 195 struct arch_hw_breakpoint *info;
06532a6743d83f K.Prasad 2010-06-15 196
06532a6743d83f K.Prasad 2010-06-15 197 if (likely(!tsk->thread.last_hit_ubp))
06532a6743d83f K.Prasad 2010-06-15 198 return;
06532a6743d83f K.Prasad 2010-06-15 199
06532a6743d83f K.Prasad 2010-06-15 200 info = counter_arch_bp(tsk->thread.last_hit_ubp);
06532a6743d83f K.Prasad 2010-06-15 201 regs->msr &= ~MSR_SE;
21f585073d6347 Paul Gortmaker 2014-04-29 202 __set_breakpoint(info);
06532a6743d83f K.Prasad 2010-06-15 203 tsk->thread.last_hit_ubp = NULL;
06532a6743d83f K.Prasad 2010-06-15 204 }
06532a6743d83f K.Prasad 2010-06-15 205
5aae8a53708025 K.Prasad 2010-06-15 206 /*
5aae8a53708025 K.Prasad 2010-06-15 207 * Handle debug exception notifications.
5aae8a53708025 K.Prasad 2010-06-15 208 */
03465f899bdac7 Nicholas Piggin 2016-09-16 @209 int hw_breakpoint_handler(struct die_args *args)
5aae8a53708025 K.Prasad 2010-06-15 210 {
5aae8a53708025 K.Prasad 2010-06-15 211 int rc = NOTIFY_STOP;
5aae8a53708025 K.Prasad 2010-06-15 212 struct perf_event *bp;
5aae8a53708025 K.Prasad 2010-06-15 213 struct pt_regs *regs = args->regs;
4ad8622dc54895 Christophe Leroy 2016-11-29 214 #ifndef CONFIG_PPC_8xx
5aae8a53708025 K.Prasad 2010-06-15 215 int stepped = 1;
5aae8a53708025 K.Prasad 2010-06-15 216 unsigned int instr;
4ad8622dc54895 Christophe Leroy 2016-11-29 217 #endif
4ad8622dc54895 Christophe Leroy 2016-11-29 218 struct arch_hw_breakpoint *info;
e3e94084adb561 K.Prasad 2010-06-15 219 unsigned long dar = regs->dar;
5aae8a53708025 K.Prasad 2010-06-15 220
5aae8a53708025 K.Prasad 2010-06-15 221 /* Disable breakpoints during exception handling */
9422de3e953d0e Michael Neuling 2012-12-20 222 hw_breakpoint_disable();
574cb24899d35e Paul Mackerras 2010-06-23 223
5aae8a53708025 K.Prasad 2010-06-15 224 /*
5aae8a53708025 K.Prasad 2010-06-15 225 * The counter may be concurrently released but that can only
5aae8a53708025 K.Prasad 2010-06-15 226 * occur from a call_rcu() path. We can then safely fetch
5aae8a53708025 K.Prasad 2010-06-15 227 * the breakpoint, use its callback, touch its counter
5aae8a53708025 K.Prasad 2010-06-15 228 * while we are in an rcu_read_lock() path.
5aae8a53708025 K.Prasad 2010-06-15 229 */
5aae8a53708025 K.Prasad 2010-06-15 230 rcu_read_lock();
5aae8a53708025 K.Prasad 2010-06-15 231
69111bac42f5ce Christoph Lameter 2014-10-21 232 bp = __this_cpu_read(bp_per_reg);
c21a493a2b4465 Ravi Bangoria 2016-11-22 233 if (!bp) {
c21a493a2b4465 Ravi Bangoria 2016-11-22 234 rc = NOTIFY_DONE;
5aae8a53708025 K.Prasad 2010-06-15 235 goto out;
c21a493a2b4465 Ravi Bangoria 2016-11-22 236 }
5aae8a53708025 K.Prasad 2010-06-15 237 info = counter_arch_bp(bp);
5aae8a53708025 K.Prasad 2010-06-15 238
5aae8a53708025 K.Prasad 2010-06-15 239 /*
5aae8a53708025 K.Prasad 2010-06-15 240 * Return early after invoking user-callback function without restoring
5aae8a53708025 K.Prasad 2010-06-15 241 * DABR if the breakpoint is from ptrace which always operates in
5aae8a53708025 K.Prasad 2010-06-15 242 * one-shot mode. The ptrace-ed process will receive the SIGTRAP signal
5aae8a53708025 K.Prasad 2010-06-15 243 * generated in do_dabr().
5aae8a53708025 K.Prasad 2010-06-15 244 */
574cb24899d35e Paul Mackerras 2010-06-23 245 if (bp->overflow_handler == ptrace_triggered) {
5aae8a53708025 K.Prasad 2010-06-15 246 perf_bp_event(bp, regs);
5aae8a53708025 K.Prasad 2010-06-15 247 rc = NOTIFY_DONE;
5aae8a53708025 K.Prasad 2010-06-15 248 goto out;
5aae8a53708025 K.Prasad 2010-06-15 249 }
5aae8a53708025 K.Prasad 2010-06-15 250
e3e94084adb561 K.Prasad 2010-06-15 251 /*
e3e94084adb561 K.Prasad 2010-06-15 252 * Verify if dar lies within the address range occupied by the symbol
574cb24899d35e Paul Mackerras 2010-06-23 253 * being watched to filter extraneous exceptions. If it doesn't,
574cb24899d35e Paul Mackerras 2010-06-23 254 * we still need to single-step the instruction, but we don't
574cb24899d35e Paul Mackerras 2010-06-23 255 * generate an event.
e3e94084adb561 K.Prasad 2010-06-15 256 */
540e07c67efe42 Michael Neuling 2013-06-24 257 info->type &= ~HW_BRK_TYPE_EXTRANEOUS_IRQ;
9422de3e953d0e Michael Neuling 2012-12-20 258 if (!((bp->attr.bp_addr <= dar) &&
9422de3e953d0e Michael Neuling 2012-12-20 259 (dar - bp->attr.bp_addr < bp->attr.bp_len)))
9422de3e953d0e Michael Neuling 2012-12-20 260 info->type |= HW_BRK_TYPE_EXTRANEOUS_IRQ;
e3e94084adb561 K.Prasad 2010-06-15 261
:::::: The code at line 106 was first introduced by commit
:::::: 5aae8a53708025d4e718f0d2e7c2f766779ddc71 powerpc, hw_breakpoints: Implement hw_breakpoints for 64-bit server processors
:::::: TO: K.Prasad <prasad@...ux.vnet.ibm.com>
:::::: CC: Paul Mackerras <paulus@...ba.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (25561 bytes)
Powered by blists - more mailing lists