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:

committed by
Chris Metcalf

parent
9f9499ae8e
commit
f419e6f63c
@@ -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
|
||||
|
Reference in New Issue
Block a user