tile: define a macro ktext_writable_addr to get writable kernel text address

It is used by kgdb, ftrace, kprobe and jump label, so we factor
this out into a helper routine.

Reviewed-by: Chris Metcalf <cmetcalf@ezchip.com>
Signed-off-by: Zhigang Lu <zlu@ezchip.com>
Signed-off-by: Chris Metcalf <cmetcalf@ezchip.com>
This commit is contained in:
Zhigang Lu
2015-09-30 09:53:47 +08:00
committed by Chris Metcalf
parent 9f9499ae8e
commit f419e6f63c
4 changed files with 14 additions and 4 deletions

View File

@@ -164,7 +164,7 @@ static unsigned long writable_address(unsigned long addr)
unsigned long ret = 0;
if (core_kernel_text(addr))
ret = addr - MEM_SV_START + PAGE_OFFSET;
ret = ktext_writable_addr(addr);
else if (is_module_text_address(addr))
ret = addr;
else