mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-10 03:49:50 +00:00
scripts: clean up IA-64 code
A little more janitorial work after commit cf8e865810 ("arch: Remove
Itanium (IA-64) architecture").
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
This commit is contained in:
@@ -86,21 +86,12 @@ LxPs()
|
||||
|
||||
thread_info_type = utils.CachedType("struct thread_info")
|
||||
|
||||
ia64_task_size = None
|
||||
|
||||
|
||||
def get_thread_info(task):
|
||||
thread_info_ptr_type = thread_info_type.get_type().pointer()
|
||||
if utils.is_target_arch("ia64"):
|
||||
global ia64_task_size
|
||||
if ia64_task_size is None:
|
||||
ia64_task_size = gdb.parse_and_eval("sizeof(struct task_struct)")
|
||||
thread_info_addr = task.address + ia64_task_size
|
||||
thread_info = thread_info_addr.cast(thread_info_ptr_type)
|
||||
else:
|
||||
if task.type.fields()[0].type == thread_info_type.get_type():
|
||||
return task['thread_info']
|
||||
thread_info = task['stack'].cast(thread_info_ptr_type)
|
||||
if task.type.fields()[0].type == thread_info_type.get_type():
|
||||
return task['thread_info']
|
||||
thread_info = task['stack'].cast(thread_info_ptr_type)
|
||||
return thread_info.dereference()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user