2010-05-28 23:09:12 -04:00
/*
* Copyright 2010 Tilera Corporation . All Rights Reserved .
*
* This program is free software ; you can redistribute it and / or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation , version 2.
*
* This program is distributed in the hope that it will be useful , but
* WITHOUT ANY WARRANTY ; without even the implied warranty of
* MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE , GOOD TITLE or
* NON INFRINGEMENT . See the GNU General Public License for
* more details .
*
* Generates definitions from c - type structures used by assembly sources .
*/
/* Check for compatible compiler early in the build. */
# ifdef CONFIG_TILEGX
# ifndef __tilegx__
# error Can only build TILE-Gx configurations with tilegx compiler
# endif
# ifndef __LP64__
# error Must not specify -m32 when building the TILE-Gx kernel
# endif
# else
# ifdef __tilegx__
2013-08-13 14:42:36 -04:00
# error Can not build TILEPro configurations with tilegx compiler
2010-05-28 23:09:12 -04:00
# endif
# endif
2013-08-13 14:42:36 -04:00
# include <linux/kbuild.h>
# include <linux/thread_info.h>
# include <linux/sched.h>
# include <linux/hardirq.h>
# include <linux/ptrace.h>
# include <hv/hypervisor.h>
2010-05-28 23:09:12 -04:00
void foo ( void )
{
2013-08-07 10:34:10 -04:00
DEFINE ( SINGLESTEP_STATE_BUFFER_OFFSET ,
2010-05-28 23:09:12 -04:00
offsetof ( struct single_step_state , buffer ) ) ;
2013-08-07 10:34:10 -04:00
DEFINE ( SINGLESTEP_STATE_FLAGS_OFFSET ,
2010-05-28 23:09:12 -04:00
offsetof ( struct single_step_state , flags ) ) ;
2013-08-07 10:34:10 -04:00
DEFINE ( SINGLESTEP_STATE_ORIG_PC_OFFSET ,
2010-05-28 23:09:12 -04:00
offsetof ( struct single_step_state , orig_pc ) ) ;
2013-08-07 10:34:10 -04:00
DEFINE ( SINGLESTEP_STATE_NEXT_PC_OFFSET ,
2010-05-28 23:09:12 -04:00
offsetof ( struct single_step_state , next_pc ) ) ;
2013-08-07 10:34:10 -04:00
DEFINE ( SINGLESTEP_STATE_BRANCH_NEXT_PC_OFFSET ,
2010-05-28 23:09:12 -04:00
offsetof ( struct single_step_state , branch_next_pc ) ) ;
2013-08-07 10:34:10 -04:00
DEFINE ( SINGLESTEP_STATE_UPDATE_VALUE_OFFSET ,
2010-05-28 23:09:12 -04:00
offsetof ( struct single_step_state , update_value ) ) ;
2013-08-07 10:34:10 -04:00
DEFINE ( THREAD_INFO_TASK_OFFSET ,
2010-05-28 23:09:12 -04:00
offsetof ( struct thread_info , task ) ) ;
2013-08-07 10:34:10 -04:00
DEFINE ( THREAD_INFO_FLAGS_OFFSET ,
2010-05-28 23:09:12 -04:00
offsetof ( struct thread_info , flags ) ) ;
2013-08-07 10:34:10 -04:00
DEFINE ( THREAD_INFO_STATUS_OFFSET ,
2010-05-28 23:09:12 -04:00
offsetof ( struct thread_info , status ) ) ;
2013-08-07 10:34:10 -04:00
DEFINE ( THREAD_INFO_HOMECACHE_CPU_OFFSET ,
2010-05-28 23:09:12 -04:00
offsetof ( struct thread_info , homecache_cpu ) ) ;
2013-08-07 11:36:54 -04:00
DEFINE ( THREAD_INFO_PREEMPT_COUNT_OFFSET ,
offsetof ( struct thread_info , preempt_count ) ) ;
2013-08-07 10:34:10 -04:00
DEFINE ( THREAD_INFO_STEP_STATE_OFFSET ,
2010-05-28 23:09:12 -04:00
offsetof ( struct thread_info , step_state ) ) ;
2013-08-06 16:04:13 -04:00
# ifdef __tilegx__
DEFINE ( THREAD_INFO_UNALIGN_JIT_BASE_OFFSET ,
offsetof ( struct thread_info , unalign_jit_base ) ) ;
DEFINE ( THREAD_INFO_UNALIGN_JIT_TMP_OFFSET ,
offsetof ( struct thread_info , unalign_jit_tmp ) ) ;
# endif
2010-05-28 23:09:12 -04:00
DEFINE ( TASK_STRUCT_THREAD_KSP_OFFSET ,
offsetof ( struct task_struct , thread . ksp ) ) ;
DEFINE ( TASK_STRUCT_THREAD_PC_OFFSET ,
offsetof ( struct task_struct , thread . pc ) ) ;
2013-08-07 10:34:10 -04:00
DEFINE ( HV_TOPOLOGY_WIDTH_OFFSET ,
2010-05-28 23:09:12 -04:00
offsetof ( HV_Topology , width ) ) ;
2013-08-07 10:34:10 -04:00
DEFINE ( HV_TOPOLOGY_HEIGHT_OFFSET ,
2010-05-28 23:09:12 -04:00
offsetof ( HV_Topology , height ) ) ;
2013-08-07 10:34:10 -04:00
DEFINE ( IRQ_CPUSTAT_SYSCALL_COUNT_OFFSET ,
2010-05-28 23:09:12 -04:00
offsetof ( irq_cpustat_t , irq_syscall_count ) ) ;
}