* [arm:ktext 16/19] arch/arm64/mm/ktext.c:96:17: error: implicit declaration of function 'clean_dcache_range_nopatch'
@ 2022-08-11 20:50 kernel test robot
2022-08-12 11:46 ` Russell King (Oracle)
0 siblings, 1 reply; 4+ messages in thread
From: kernel test robot @ 2022-08-11 20:50 UTC (permalink / raw)
To: Russell King (Oracle); +Cc: kbuild-all, linux-arm-kernel
Hi Russell,
First bad commit (maybe != root cause):
tree: git://git.armlinux.org.uk/~rmk/linux-arm.git ktext
head: 6f969d4aee6bbafad356a7bae6e37d9e2dce9e08
commit: 5e25ed1e1f5ddef3d1be949922f9ea10c2e45b24 [16/19] arm64: text replication: add Kconfig
config: arm64-allyesconfig (https://download.01.org/0day-ci/archive/20220812/202208120434.0ibxs7Y5-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 12.1.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
git remote add arm git://git.armlinux.org.uk/~rmk/linux-arm.git
git fetch --no-tags arm ktext
git checkout 5e25ed1e1f5ddef3d1be949922f9ea10c2e45b24
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash arch/arm64/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
arch/arm64/mm/ktext.c: In function 'ktext_replication_patch_alternative':
>> arch/arm64/mm/ktext.c:96:17: error: implicit declaration of function 'clean_dcache_range_nopatch' [-Werror=implicit-function-declaration]
96 | clean_dcache_range_nopatch((u64)p, (u64)p + size);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm64/mm/ktext.c: In function 'ktext_replication_init':
>> arch/arm64/mm/ktext.c:145:37: error: implicit declaration of function 'memblock_alloc_node'; did you mean 'kmem_cache_alloc_node'? [-Werror=implicit-function-declaration]
145 | kernel_texts[nid] = memblock_alloc_node(size, PAGE_SIZE, nid);
| ^~~~~~~~~~~~~~~~~~~
| kmem_cache_alloc_node
arch/arm64/mm/ktext.c:145:35: warning: assignment to 'void *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
145 | kernel_texts[nid] = memblock_alloc_node(size, PAGE_SIZE, nid);
| ^
arch/arm64/mm/ktext.c:151:31: warning: assignment to 'struct pgtables *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
151 | pgtables[nid] = memblock_alloc_node(sizeof(*pgtables[0]),
| ^
cc1: some warnings being treated as errors
vim +/clean_dcache_range_nopatch +96 arch/arm64/mm/ktext.c
b8557d9117093e Russell King (Oracle 2022-05-24 73)
b8557d9117093e Russell King (Oracle 2022-05-24 74) /* Copy the patched alternative from the node0 image to the other
b8557d9117093e Russell King (Oracle 2022-05-24 75) * modes. src is the node 0 linear-mapping address.
b8557d9117093e Russell King (Oracle 2022-05-24 76) */
b8557d9117093e Russell King (Oracle 2022-05-24 77) void ktext_replication_patch_alternative(__le32 *src, int nr_inst)
b8557d9117093e Russell King (Oracle 2022-05-24 78) {
b8557d9117093e Russell King (Oracle 2022-05-24 79) unsigned long offset;
b8557d9117093e Russell King (Oracle 2022-05-24 80) size_t size;
b8557d9117093e Russell King (Oracle 2022-05-24 81) int nid;
b8557d9117093e Russell King (Oracle 2022-05-24 82) __le32 *p;
b8557d9117093e Russell King (Oracle 2022-05-24 83)
b8557d9117093e Russell King (Oracle 2022-05-24 84) offset = (unsigned long)src - (unsigned long)lm_alias(_stext);
b8557d9117093e Russell King (Oracle 2022-05-24 85) if (WARN_ON_ONCE(offset >= _etext - _stext))
b8557d9117093e Russell King (Oracle 2022-05-24 86) return;
b8557d9117093e Russell King (Oracle 2022-05-24 87)
b8557d9117093e Russell King (Oracle 2022-05-24 88) size = AARCH64_INSN_SIZE * nr_inst;
b8557d9117093e Russell King (Oracle 2022-05-24 89)
b8557d9117093e Russell King (Oracle 2022-05-24 90) for_each_node(nid) {
b8557d9117093e Russell King (Oracle 2022-05-24 91) if (!kernel_texts[nid])
b8557d9117093e Russell King (Oracle 2022-05-24 92) continue;
b8557d9117093e Russell King (Oracle 2022-05-24 93)
b8557d9117093e Russell King (Oracle 2022-05-24 94) p = kernel_texts[nid] + offset;
b8557d9117093e Russell King (Oracle 2022-05-24 95) memcpy(p, src, size);
b8557d9117093e Russell King (Oracle 2022-05-24 @96) clean_dcache_range_nopatch((u64)p, (u64)p + size);
b8557d9117093e Russell King (Oracle 2022-05-24 97) }
b8557d9117093e Russell King (Oracle 2022-05-24 98) }
b8557d9117093e Russell King (Oracle 2022-05-24 99)
c328a296007681 Russell King (Oracle 2022-07-07 100) static bool ktext_enabled = true;
c328a296007681 Russell King (Oracle 2022-07-07 101)
c328a296007681 Russell King (Oracle 2022-07-07 102) static int __init parse_ktext(char *str)
c328a296007681 Russell King (Oracle 2022-07-07 103) {
c328a296007681 Russell King (Oracle 2022-07-07 104) bool enabled;
c328a296007681 Russell King (Oracle 2022-07-07 105) int ret = strtobool(str, &enabled);
c328a296007681 Russell King (Oracle 2022-07-07 106)
c328a296007681 Russell King (Oracle 2022-07-07 107) if (ret)
c328a296007681 Russell King (Oracle 2022-07-07 108) return ret;
c328a296007681 Russell King (Oracle 2022-07-07 109)
c328a296007681 Russell King (Oracle 2022-07-07 110) ktext_enabled = enabled;
c328a296007681 Russell King (Oracle 2022-07-07 111) return 0;
c328a296007681 Russell King (Oracle 2022-07-07 112) }
c328a296007681 Russell King (Oracle 2022-07-07 113) early_param("ktext", parse_ktext);
c328a296007681 Russell King (Oracle 2022-07-07 114)
06e9efea0a2391 Russell King (Oracle 2022-04-20 115) /* Allocate page tables and memory for the replicated kernel texts. */
4a17b67dc0c254 Russell King (Oracle 2022-04-21 116) void ktext_replication_init(void)
4a17b67dc0c254 Russell King (Oracle 2022-04-21 117) {
c5ce21bcc37dcf Russell King (Oracle 2022-06-17 118) size_t size = __end_rodata - _stext;
cc8a46d8fdca7d Russell King (Oracle 2022-04-21 119) int kidx = pgd_index((phys_addr_t)KERNEL_START);
62f0b42355e0b5 Russell King (Oracle 2022-05-16 120) int nid;
cc8a46d8fdca7d Russell King (Oracle 2022-04-21 121)
cc8a46d8fdca7d Russell King (Oracle 2022-04-21 122) /*
cc8a46d8fdca7d Russell King (Oracle 2022-04-21 123) * If we've messed up and the kernel shares a L0 entry with the
cc8a46d8fdca7d Russell King (Oracle 2022-04-21 124) * module or vmalloc area, then don't even attempt to use text
cc8a46d8fdca7d Russell King (Oracle 2022-04-21 125) * replication.
cc8a46d8fdca7d Russell King (Oracle 2022-04-21 126) */
cc8a46d8fdca7d Russell King (Oracle 2022-04-21 127) if (pgd_index(MODULES_VADDR) == kidx) {
cc8a46d8fdca7d Russell King (Oracle 2022-04-21 128) pr_warn("Kernel is located in the same L0 index as modules - text replication disabled\n");
cc8a46d8fdca7d Russell King (Oracle 2022-04-21 129) return;
cc8a46d8fdca7d Russell King (Oracle 2022-04-21 130) }
cc8a46d8fdca7d Russell King (Oracle 2022-04-21 131) if (pgd_index(VMALLOC_START) == kidx) {
cc8a46d8fdca7d Russell King (Oracle 2022-04-21 132) pr_warn("Kernel is located in the same L0 index as vmalloc - text replication disabled\n");
cc8a46d8fdca7d Russell King (Oracle 2022-04-21 133) return;
cc8a46d8fdca7d Russell King (Oracle 2022-04-21 134) }
62f0b42355e0b5 Russell King (Oracle 2022-05-16 135)
c328a296007681 Russell King (Oracle 2022-07-07 136) if (!ktext_enabled)
c328a296007681 Russell King (Oracle 2022-07-07 137) return;
c328a296007681 Russell King (Oracle 2022-07-07 138)
62f0b42355e0b5 Russell King (Oracle 2022-05-16 139) for_each_node(nid) {
62f0b42355e0b5 Russell King (Oracle 2022-05-16 140) /* Nothing to do for node 0 */
62f0b42355e0b5 Russell King (Oracle 2022-05-16 141) if (!nid)
62f0b42355e0b5 Russell King (Oracle 2022-05-16 142) continue;
62f0b42355e0b5 Russell King (Oracle 2022-05-16 143)
62f0b42355e0b5 Russell King (Oracle 2022-05-16 144) /* Allocate and copy initial kernel text for this node */
62f0b42355e0b5 Russell King (Oracle 2022-05-16 @145) kernel_texts[nid] = memblock_alloc_node(size, PAGE_SIZE, nid);
62f0b42355e0b5 Russell King (Oracle 2022-05-16 146) memcpy(kernel_texts[nid], _stext, size);
62f0b42355e0b5 Russell King (Oracle 2022-05-16 147) caches_clean_inval_pou((u64)kernel_texts[nid],
62f0b42355e0b5 Russell King (Oracle 2022-05-16 148) (u64)kernel_texts[nid] + size);
06e9efea0a2391 Russell King (Oracle 2022-04-20 149)
06e9efea0a2391 Russell King (Oracle 2022-04-20 150) /* Allocate the pagetables for this node */
06e9efea0a2391 Russell King (Oracle 2022-04-20 151) pgtables[nid] = memblock_alloc_node(sizeof(*pgtables[0]),
06e9efea0a2391 Russell King (Oracle 2022-04-20 152) PGD_SIZE, nid);
06e9efea0a2391 Russell King (Oracle 2022-04-20 153)
06e9efea0a2391 Russell King (Oracle 2022-04-20 154) /* Copy initial swapper page directory */
06e9efea0a2391 Russell King (Oracle 2022-04-20 155) memcpy(pgtables[nid]->swapper_pg_dir, swapper_pg_dir, PGD_SIZE);
26904e19f00089 Russell King (Oracle 2022-05-16 156)
26904e19f00089 Russell King (Oracle 2022-05-16 157) /* Clear the kernel mapping */
26904e19f00089 Russell King (Oracle 2022-05-16 158) memset(&pgtables[nid]->swapper_pg_dir[kidx], 0,
26904e19f00089 Russell King (Oracle 2022-05-16 159) sizeof(pgtables[nid]->swapper_pg_dir[kidx]));
26904e19f00089 Russell King (Oracle 2022-05-16 160)
26904e19f00089 Russell King (Oracle 2022-05-16 161) /* Create kernel mapping pointing at our local copy */
26904e19f00089 Russell King (Oracle 2022-05-16 162) create_kernel_nid_map(pgtables[nid]->swapper_pg_dir,
26904e19f00089 Russell King (Oracle 2022-05-16 163) kernel_texts[nid]);
06e9efea0a2391 Russell King (Oracle 2022-04-20 164) }
06e9efea0a2391 Russell King (Oracle 2022-04-20 165) }
06e9efea0a2391 Russell King (Oracle 2022-04-20 166)
:::::: The code at line 96 was first introduced by commit
:::::: b8557d9117093ebe17320d36dadd47fc742820c9 arm64: text replication: add node text patching
:::::: TO: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
:::::: CC: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
--
0-DAY CI Kernel Test Service
https://01.org/lkp
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [arm:ktext 16/19] arch/arm64/mm/ktext.c:96:17: error: implicit declaration of function 'clean_dcache_range_nopatch'
2022-08-11 20:50 [arm:ktext 16/19] arch/arm64/mm/ktext.c:96:17: error: implicit declaration of function 'clean_dcache_range_nopatch' kernel test robot
@ 2022-08-12 11:46 ` Russell King (Oracle)
2022-09-07 14:22 ` Catalin Marinas
0 siblings, 1 reply; 4+ messages in thread
From: Russell King (Oracle) @ 2022-08-12 11:46 UTC (permalink / raw)
To: Catalin Marinas, Will Deacon; +Cc: linux-arm-kernel
ARM64 folk,
What do you think would be the best way to fix the issue with
clean_dcache_range_nopatch() in this patch set? I see two possible
solutions to it:
1) duplicate clean_dcache_range_nopatch() in arch/arm64/mm/ktext.c
2) make clean_dcache_range_nopatch() globally visible so ktext.c
can call it.
Neither of these feels like a great solution.
I've thought about moving the code into arch/arm64/kernel/alternative.c
but that means making other stuff globally visible instead. So it seems
to be a case of what is the lesser of all the evils.
The patch can be viewed at:
http://git.armlinux.org.uk/cgit/linux-arm.git/commit/?h=ktext&id=b8557d9117093ebe17320d36dadd47fc742820c9
Thanks.
On Fri, Aug 12, 2022 at 04:50:31AM +0800, kernel test robot wrote:
> Hi Russell,
>
> First bad commit (maybe != root cause):
>
> tree: git://git.armlinux.org.uk/~rmk/linux-arm.git ktext
> head: 6f969d4aee6bbafad356a7bae6e37d9e2dce9e08
> commit: 5e25ed1e1f5ddef3d1be949922f9ea10c2e45b24 [16/19] arm64: text replication: add Kconfig
> config: arm64-allyesconfig (https://download.01.org/0day-ci/archive/20220812/202208120434.0ibxs7Y5-lkp@intel.com/config)
> compiler: aarch64-linux-gcc (GCC) 12.1.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
> git remote add arm git://git.armlinux.org.uk/~rmk/linux-arm.git
> git fetch --no-tags arm ktext
> git checkout 5e25ed1e1f5ddef3d1be949922f9ea10c2e45b24
> # save the config file
> mkdir build_dir && cp config build_dir/.config
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash arch/arm64/
>
> If you fix the issue, kindly add following tag where applicable
> Reported-by: kernel test robot <lkp@intel.com>
>
> All errors (new ones prefixed by >>):
>
> arch/arm64/mm/ktext.c: In function 'ktext_replication_patch_alternative':
> >> arch/arm64/mm/ktext.c:96:17: error: implicit declaration of function 'clean_dcache_range_nopatch' [-Werror=implicit-function-declaration]
> 96 | clean_dcache_range_nopatch((u64)p, (u64)p + size);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~
> arch/arm64/mm/ktext.c: In function 'ktext_replication_init':
> >> arch/arm64/mm/ktext.c:145:37: error: implicit declaration of function 'memblock_alloc_node'; did you mean 'kmem_cache_alloc_node'? [-Werror=implicit-function-declaration]
> 145 | kernel_texts[nid] = memblock_alloc_node(size, PAGE_SIZE, nid);
> | ^~~~~~~~~~~~~~~~~~~
> | kmem_cache_alloc_node
> arch/arm64/mm/ktext.c:145:35: warning: assignment to 'void *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
> 145 | kernel_texts[nid] = memblock_alloc_node(size, PAGE_SIZE, nid);
> | ^
> arch/arm64/mm/ktext.c:151:31: warning: assignment to 'struct pgtables *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
> 151 | pgtables[nid] = memblock_alloc_node(sizeof(*pgtables[0]),
> | ^
> cc1: some warnings being treated as errors
>
>
> vim +/clean_dcache_range_nopatch +96 arch/arm64/mm/ktext.c
>
> b8557d9117093e Russell King (Oracle 2022-05-24 73)
> b8557d9117093e Russell King (Oracle 2022-05-24 74) /* Copy the patched alternative from the node0 image to the other
> b8557d9117093e Russell King (Oracle 2022-05-24 75) * modes. src is the node 0 linear-mapping address.
> b8557d9117093e Russell King (Oracle 2022-05-24 76) */
> b8557d9117093e Russell King (Oracle 2022-05-24 77) void ktext_replication_patch_alternative(__le32 *src, int nr_inst)
> b8557d9117093e Russell King (Oracle 2022-05-24 78) {
> b8557d9117093e Russell King (Oracle 2022-05-24 79) unsigned long offset;
> b8557d9117093e Russell King (Oracle 2022-05-24 80) size_t size;
> b8557d9117093e Russell King (Oracle 2022-05-24 81) int nid;
> b8557d9117093e Russell King (Oracle 2022-05-24 82) __le32 *p;
> b8557d9117093e Russell King (Oracle 2022-05-24 83)
> b8557d9117093e Russell King (Oracle 2022-05-24 84) offset = (unsigned long)src - (unsigned long)lm_alias(_stext);
> b8557d9117093e Russell King (Oracle 2022-05-24 85) if (WARN_ON_ONCE(offset >= _etext - _stext))
> b8557d9117093e Russell King (Oracle 2022-05-24 86) return;
> b8557d9117093e Russell King (Oracle 2022-05-24 87)
> b8557d9117093e Russell King (Oracle 2022-05-24 88) size = AARCH64_INSN_SIZE * nr_inst;
> b8557d9117093e Russell King (Oracle 2022-05-24 89)
> b8557d9117093e Russell King (Oracle 2022-05-24 90) for_each_node(nid) {
> b8557d9117093e Russell King (Oracle 2022-05-24 91) if (!kernel_texts[nid])
> b8557d9117093e Russell King (Oracle 2022-05-24 92) continue;
> b8557d9117093e Russell King (Oracle 2022-05-24 93)
> b8557d9117093e Russell King (Oracle 2022-05-24 94) p = kernel_texts[nid] + offset;
> b8557d9117093e Russell King (Oracle 2022-05-24 95) memcpy(p, src, size);
> b8557d9117093e Russell King (Oracle 2022-05-24 @96) clean_dcache_range_nopatch((u64)p, (u64)p + size);
> b8557d9117093e Russell King (Oracle 2022-05-24 97) }
> b8557d9117093e Russell King (Oracle 2022-05-24 98) }
> b8557d9117093e Russell King (Oracle 2022-05-24 99)
> c328a296007681 Russell King (Oracle 2022-07-07 100) static bool ktext_enabled = true;
> c328a296007681 Russell King (Oracle 2022-07-07 101)
> c328a296007681 Russell King (Oracle 2022-07-07 102) static int __init parse_ktext(char *str)
> c328a296007681 Russell King (Oracle 2022-07-07 103) {
> c328a296007681 Russell King (Oracle 2022-07-07 104) bool enabled;
> c328a296007681 Russell King (Oracle 2022-07-07 105) int ret = strtobool(str, &enabled);
> c328a296007681 Russell King (Oracle 2022-07-07 106)
> c328a296007681 Russell King (Oracle 2022-07-07 107) if (ret)
> c328a296007681 Russell King (Oracle 2022-07-07 108) return ret;
> c328a296007681 Russell King (Oracle 2022-07-07 109)
> c328a296007681 Russell King (Oracle 2022-07-07 110) ktext_enabled = enabled;
> c328a296007681 Russell King (Oracle 2022-07-07 111) return 0;
> c328a296007681 Russell King (Oracle 2022-07-07 112) }
> c328a296007681 Russell King (Oracle 2022-07-07 113) early_param("ktext", parse_ktext);
> c328a296007681 Russell King (Oracle 2022-07-07 114)
> 06e9efea0a2391 Russell King (Oracle 2022-04-20 115) /* Allocate page tables and memory for the replicated kernel texts. */
> 4a17b67dc0c254 Russell King (Oracle 2022-04-21 116) void ktext_replication_init(void)
> 4a17b67dc0c254 Russell King (Oracle 2022-04-21 117) {
> c5ce21bcc37dcf Russell King (Oracle 2022-06-17 118) size_t size = __end_rodata - _stext;
> cc8a46d8fdca7d Russell King (Oracle 2022-04-21 119) int kidx = pgd_index((phys_addr_t)KERNEL_START);
> 62f0b42355e0b5 Russell King (Oracle 2022-05-16 120) int nid;
> cc8a46d8fdca7d Russell King (Oracle 2022-04-21 121)
> cc8a46d8fdca7d Russell King (Oracle 2022-04-21 122) /*
> cc8a46d8fdca7d Russell King (Oracle 2022-04-21 123) * If we've messed up and the kernel shares a L0 entry with the
> cc8a46d8fdca7d Russell King (Oracle 2022-04-21 124) * module or vmalloc area, then don't even attempt to use text
> cc8a46d8fdca7d Russell King (Oracle 2022-04-21 125) * replication.
> cc8a46d8fdca7d Russell King (Oracle 2022-04-21 126) */
> cc8a46d8fdca7d Russell King (Oracle 2022-04-21 127) if (pgd_index(MODULES_VADDR) == kidx) {
> cc8a46d8fdca7d Russell King (Oracle 2022-04-21 128) pr_warn("Kernel is located in the same L0 index as modules - text replication disabled\n");
> cc8a46d8fdca7d Russell King (Oracle 2022-04-21 129) return;
> cc8a46d8fdca7d Russell King (Oracle 2022-04-21 130) }
> cc8a46d8fdca7d Russell King (Oracle 2022-04-21 131) if (pgd_index(VMALLOC_START) == kidx) {
> cc8a46d8fdca7d Russell King (Oracle 2022-04-21 132) pr_warn("Kernel is located in the same L0 index as vmalloc - text replication disabled\n");
> cc8a46d8fdca7d Russell King (Oracle 2022-04-21 133) return;
> cc8a46d8fdca7d Russell King (Oracle 2022-04-21 134) }
> 62f0b42355e0b5 Russell King (Oracle 2022-05-16 135)
> c328a296007681 Russell King (Oracle 2022-07-07 136) if (!ktext_enabled)
> c328a296007681 Russell King (Oracle 2022-07-07 137) return;
> c328a296007681 Russell King (Oracle 2022-07-07 138)
> 62f0b42355e0b5 Russell King (Oracle 2022-05-16 139) for_each_node(nid) {
> 62f0b42355e0b5 Russell King (Oracle 2022-05-16 140) /* Nothing to do for node 0 */
> 62f0b42355e0b5 Russell King (Oracle 2022-05-16 141) if (!nid)
> 62f0b42355e0b5 Russell King (Oracle 2022-05-16 142) continue;
> 62f0b42355e0b5 Russell King (Oracle 2022-05-16 143)
> 62f0b42355e0b5 Russell King (Oracle 2022-05-16 144) /* Allocate and copy initial kernel text for this node */
> 62f0b42355e0b5 Russell King (Oracle 2022-05-16 @145) kernel_texts[nid] = memblock_alloc_node(size, PAGE_SIZE, nid);
> 62f0b42355e0b5 Russell King (Oracle 2022-05-16 146) memcpy(kernel_texts[nid], _stext, size);
> 62f0b42355e0b5 Russell King (Oracle 2022-05-16 147) caches_clean_inval_pou((u64)kernel_texts[nid],
> 62f0b42355e0b5 Russell King (Oracle 2022-05-16 148) (u64)kernel_texts[nid] + size);
> 06e9efea0a2391 Russell King (Oracle 2022-04-20 149)
> 06e9efea0a2391 Russell King (Oracle 2022-04-20 150) /* Allocate the pagetables for this node */
> 06e9efea0a2391 Russell King (Oracle 2022-04-20 151) pgtables[nid] = memblock_alloc_node(sizeof(*pgtables[0]),
> 06e9efea0a2391 Russell King (Oracle 2022-04-20 152) PGD_SIZE, nid);
> 06e9efea0a2391 Russell King (Oracle 2022-04-20 153)
> 06e9efea0a2391 Russell King (Oracle 2022-04-20 154) /* Copy initial swapper page directory */
> 06e9efea0a2391 Russell King (Oracle 2022-04-20 155) memcpy(pgtables[nid]->swapper_pg_dir, swapper_pg_dir, PGD_SIZE);
> 26904e19f00089 Russell King (Oracle 2022-05-16 156)
> 26904e19f00089 Russell King (Oracle 2022-05-16 157) /* Clear the kernel mapping */
> 26904e19f00089 Russell King (Oracle 2022-05-16 158) memset(&pgtables[nid]->swapper_pg_dir[kidx], 0,
> 26904e19f00089 Russell King (Oracle 2022-05-16 159) sizeof(pgtables[nid]->swapper_pg_dir[kidx]));
> 26904e19f00089 Russell King (Oracle 2022-05-16 160)
> 26904e19f00089 Russell King (Oracle 2022-05-16 161) /* Create kernel mapping pointing at our local copy */
> 26904e19f00089 Russell King (Oracle 2022-05-16 162) create_kernel_nid_map(pgtables[nid]->swapper_pg_dir,
> 26904e19f00089 Russell King (Oracle 2022-05-16 163) kernel_texts[nid]);
> 06e9efea0a2391 Russell King (Oracle 2022-04-20 164) }
> 06e9efea0a2391 Russell King (Oracle 2022-04-20 165) }
> 06e9efea0a2391 Russell King (Oracle 2022-04-20 166)
>
> :::::: The code at line 96 was first introduced by commit
> :::::: b8557d9117093ebe17320d36dadd47fc742820c9 arm64: text replication: add node text patching
>
> :::::: TO: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
> :::::: CC: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
>
> --
> 0-DAY CI Kernel Test Service
> https://01.org/lkp
>
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [arm:ktext 16/19] arch/arm64/mm/ktext.c:96:17: error: implicit declaration of function 'clean_dcache_range_nopatch'
2022-08-12 11:46 ` Russell King (Oracle)
@ 2022-09-07 14:22 ` Catalin Marinas
2022-09-07 14:29 ` Russell King (Oracle)
0 siblings, 1 reply; 4+ messages in thread
From: Catalin Marinas @ 2022-09-07 14:22 UTC (permalink / raw)
To: Russell King (Oracle); +Cc: Will Deacon, linux-arm-kernel
Hi Russell,
Sorry, holidays and lots of emails to go through.
On Fri, Aug 12, 2022 at 12:46:55PM +0100, Russell King wrote:
> What do you think would be the best way to fix the issue with
> clean_dcache_range_nopatch() in this patch set? I see two possible
> solutions to it:
>
> 1) duplicate clean_dcache_range_nopatch() in arch/arm64/mm/ktext.c
> 2) make clean_dcache_range_nopatch() globally visible so ktext.c
> can call it.
>
> Neither of these feels like a great solution.
>
> I've thought about moving the code into arch/arm64/kernel/alternative.c
> but that means making other stuff globally visible instead. So it seems
> to be a case of what is the lesser of all the evils.
>
> The patch can be viewed at:
> http://git.armlinux.org.uk/cgit/linux-arm.git/commit/?h=ktext&id=b8557d9117093ebe17320d36dadd47fc742820c9
I'd prefer the second option above. It's easier to maintain in case we
have to change this function (errata etc.)
You could also pass a function pointer to ktext_replication_* to call
for cache maintenance but I'm not sure it's worth it.
--
Catalin
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [arm:ktext 16/19] arch/arm64/mm/ktext.c:96:17: error: implicit declaration of function 'clean_dcache_range_nopatch'
2022-09-07 14:22 ` Catalin Marinas
@ 2022-09-07 14:29 ` Russell King (Oracle)
0 siblings, 0 replies; 4+ messages in thread
From: Russell King (Oracle) @ 2022-09-07 14:29 UTC (permalink / raw)
To: Catalin Marinas; +Cc: Will Deacon, linux-arm-kernel
On Wed, Sep 07, 2022 at 03:22:38PM +0100, Catalin Marinas wrote:
> Hi Russell,
>
> Sorry, holidays and lots of emails to go through.
Will mentioned you were away.
> On Fri, Aug 12, 2022 at 12:46:55PM +0100, Russell King wrote:
> > What do you think would be the best way to fix the issue with
> > clean_dcache_range_nopatch() in this patch set? I see two possible
> > solutions to it:
> >
> > 1) duplicate clean_dcache_range_nopatch() in arch/arm64/mm/ktext.c
> > 2) make clean_dcache_range_nopatch() globally visible so ktext.c
> > can call it.
> >
> > Neither of these feels like a great solution.
> >
> > I've thought about moving the code into arch/arm64/kernel/alternative.c
> > but that means making other stuff globally visible instead. So it seems
> > to be a case of what is the lesser of all the evils.
> >
> > The patch can be viewed at:
> > http://git.armlinux.org.uk/cgit/linux-arm.git/commit/?h=ktext&id=b8557d9117093ebe17320d36dadd47fc742820c9
>
> I'd prefer the second option above. It's easier to maintain in case we
> have to change this function (errata etc.)
>
> You could also pass a function pointer to ktext_replication_* to call
> for cache maintenance but I'm not sure it's worth it.
Thanks - (2) is what I ended up doing, so that's great! I'll post the
patches in the next day or so as the series needs to be rebased on to
something more recent than 5.19!
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-09-07 14:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-11 20:50 [arm:ktext 16/19] arch/arm64/mm/ktext.c:96:17: error: implicit declaration of function 'clean_dcache_range_nopatch' kernel test robot
2022-08-12 11:46 ` Russell King (Oracle)
2022-09-07 14:22 ` Catalin Marinas
2022-09-07 14:29 ` Russell King (Oracle)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).