patch-2.4.20 linux-2.4.20/arch/parisc/tools/offset.c
Next file: linux-2.4.20/arch/parisc/vmlinux.lds
Previous file: linux-2.4.20/arch/parisc/tools/Makefile
Back to the patch index
Back to the overall index
- Lines: 137
- Date:
Thu Nov 28 15:53:10 2002
- Orig file:
linux-2.4.19/arch/parisc/tools/offset.c
- Orig date:
Tue Dec 5 12:29:39 2000
diff -urN linux-2.4.19/arch/parisc/tools/offset.c linux-2.4.20/arch/parisc/tools/offset.c
@@ -13,6 +13,13 @@
#include <asm/ptrace.h>
#include <asm/processor.h>
#include <asm/hardirq.h>
+#include <asm/pdc.h>
+
+#ifdef __LP64__
+#define FRAME_SIZE 128
+#else
+#define FRAME_SIZE 64
+#endif
#define text(t) __asm__("\n@@@" t)
#define _offset(type, member) (&(((type *)NULL)->member))
@@ -21,7 +28,7 @@
__asm__("\n@@@" string "%0" : : "i" (_offset(ptr, member)))
#define size(string, size) \
__asm__("\n@@@" string "%0" : : "i" (sizeof(size)))
-#define align(x,y) (((x)+(2*(y))-1)-(((x)+(y)-1)%(y)))
+#define align(x,y) (((x)+FRAME_SIZE+(y)-1)-(((x)+(y)-1)%(y)))
#define size_align(string, size, algn) \
__asm__("\n@@@" string "%0" : : "i" \
align(sizeof(size),algn))
@@ -32,6 +39,15 @@
text("#ifndef _PARISC_OFFSET_H");
text("#define _PARISC_OFFSET_H");
linefeed;
+#ifdef __LP64__
+text("#ifndef __LP64__");
+text("#error offset.h was generated for 64-bit build; did you do 'make dep'?");
+#else
+text("#ifdef __LP64__");
+text("#error offset.h was generated for 32-bit build; did you do 'make dep'?");
+#endif
+text("#endif");
+linefeed;
void output_task_ptreg_defines(void)
{
@@ -113,23 +129,14 @@
offset("#define TASK_PT_IASQ1 ", struct task_struct, thread.regs.iasq[1]);
offset("#define TASK_PT_IAOQ0 ", struct task_struct, thread.regs.iaoq[0]);
offset("#define TASK_PT_IAOQ1 ", struct task_struct, thread.regs.iaoq[1]);
- offset("#define TASK_PT_CR24 ", struct task_struct, thread.regs.cr24);
- offset("#define TASK_PT_CR25 ", struct task_struct, thread.regs.cr25);
- offset("#define TASK_PT_CR26 ", struct task_struct, thread.regs.cr26);
offset("#define TASK_PT_CR27 ", struct task_struct, thread.regs.cr27);
- offset("#define TASK_PT_CR30 ", struct task_struct, thread.regs.cr30);
offset("#define TASK_PT_ORIG_R28 ", struct task_struct, thread.regs.orig_r28);
offset("#define TASK_PT_KSP ", struct task_struct, thread.regs.ksp);
offset("#define TASK_PT_KPC ", struct task_struct, thread.regs.kpc);
offset("#define TASK_PT_SAR ", struct task_struct, thread.regs.sar);
- offset("#define TASK_PT_CR11 ", struct task_struct, thread.regs.sar);
offset("#define TASK_PT_IIR ", struct task_struct, thread.regs.iir);
offset("#define TASK_PT_ISR ", struct task_struct, thread.regs.isr);
offset("#define TASK_PT_IOR ", struct task_struct, thread.regs.ior);
- offset("#define TASK_PT_CR_PID0 ", struct task_struct, thread.regs.cr_pid[0]);
- offset("#define TASK_PT_CR_PID1 ", struct task_struct, thread.regs.cr_pid[1]);
- offset("#define TASK_PT_CR_PID2 ", struct task_struct, thread.regs.cr_pid[2]);
- offset("#define TASK_PT_CR_PID3 ", struct task_struct, thread.regs.cr_pid[3]);
size("#define TASK_SZ ", struct task_struct);
size_align("#define TASK_SZ_ALGN ", struct task_struct, 64);
linefeed;
@@ -214,23 +221,14 @@
offset("#define PT_IASQ1 ", struct pt_regs, iasq[1]);
offset("#define PT_IAOQ0 ", struct pt_regs, iaoq[0]);
offset("#define PT_IAOQ1 ", struct pt_regs, iaoq[1]);
- offset("#define PT_CR24 ", struct pt_regs, cr24);
- offset("#define PT_CR25 ", struct pt_regs, cr25);
- offset("#define PT_CR26 ", struct pt_regs, cr26);
offset("#define PT_CR27 ", struct pt_regs, cr27);
- offset("#define PT_CR30 ", struct pt_regs, cr30);
offset("#define PT_ORIG_R28 ", struct pt_regs, orig_r28);
offset("#define PT_KSP ", struct pt_regs, ksp);
offset("#define PT_KPC ", struct pt_regs, kpc);
offset("#define PT_SAR ", struct pt_regs, sar);
- offset("#define PT_CR11 ", struct pt_regs, sar);
offset("#define PT_IIR ", struct pt_regs, iir);
offset("#define PT_ISR ", struct pt_regs, isr);
offset("#define PT_IOR ", struct pt_regs, ior);
- offset("#define PT_CR_PID0 ", struct pt_regs, cr_pid[0]);
- offset("#define PT_CR_PID1 ", struct pt_regs, cr_pid[1]);
- offset("#define PT_CR_PID2 ", struct pt_regs, cr_pid[2]);
- offset("#define PT_CR_PID3 ", struct pt_regs, cr_pid[3]);
size("#define PT_SIZE ", struct pt_regs);
size_align("#define PT_SZ_ALGN ", struct pt_regs, 64);
linefeed;
@@ -249,6 +247,7 @@
offset("#define TASK_NICE ", struct task_struct, nice);
offset("#define TASK_MM ", struct task_struct, mm);
offset("#define TASK_PROCESSOR ", struct task_struct, processor);
+ offset("#define TASK_PERSONALITY ", struct task_struct, personality);
size ("#define TASK_SZ ", struct task_struct);
size_align("#define TASK_SZ_ALGN ", struct task_struct, 64);
linefeed;
@@ -257,12 +256,39 @@
void output_irq_stat_defines(void)
{
text("/* PARISC irq_cpustat_t offsets. */");
- offset("#define IRQSTAT_SI_ACTIVE ", irq_cpustat_t, __softirq_active);
- offset("#define IRQSTAT_SI_MASK ", irq_cpustat_t, __softirq_mask);
+ offset("#define IRQSTAT_SIRQ_PEND ", irq_cpustat_t, __softirq_pending);
size ("#define IRQSTAT_SZ ", irq_cpustat_t);
linefeed;
}
+void output_cache_info_defines(void)
+{
+ text("/* PARISC pdc_cache_info offsets. */");
+ offset("#define ICACHE_BASE ", struct pdc_cache_info, ic_base);
+ offset("#define ICACHE_STRIDE ", struct pdc_cache_info, ic_stride);
+ offset("#define ICACHE_COUNT ", struct pdc_cache_info, ic_count);
+ offset("#define ICACHE_LOOP ", struct pdc_cache_info, ic_loop);
+ offset("#define DCACHE_BASE ", struct pdc_cache_info, dc_base);
+ offset("#define DCACHE_STRIDE ", struct pdc_cache_info, dc_stride);
+ offset("#define DCACHE_COUNT ", struct pdc_cache_info, dc_count);
+ offset("#define DCACHE_LOOP ", struct pdc_cache_info, dc_loop);
+ offset("#define ITLB_SID_BASE ", struct pdc_cache_info, it_sp_base);
+ offset("#define ITLB_SID_STRIDE ", struct pdc_cache_info, it_sp_stride);
+ offset("#define ITLB_SID_COUNT ", struct pdc_cache_info, it_sp_count);
+ offset("#define ITLB_OFF_BASE ", struct pdc_cache_info, it_off_base);
+ offset("#define ITLB_OFF_STRIDE ", struct pdc_cache_info, it_off_stride);
+ offset("#define ITLB_OFF_COUNT ", struct pdc_cache_info, it_off_count);
+ offset("#define ITLB_LOOP ", struct pdc_cache_info, it_loop);
+ offset("#define DTLB_SID_BASE ", struct pdc_cache_info, dt_sp_base);
+ offset("#define DTLB_SID_STRIDE ", struct pdc_cache_info, dt_sp_stride);
+ offset("#define DTLB_SID_COUNT ", struct pdc_cache_info, dt_sp_count);
+ offset("#define DTLB_OFF_BASE ", struct pdc_cache_info, dt_off_base);
+ offset("#define DTLB_OFF_STRIDE ", struct pdc_cache_info, dt_off_stride);
+ offset("#define DTLB_OFF_COUNT ", struct pdc_cache_info, dt_off_count);
+ offset("#define DTLB_LOOP ", struct pdc_cache_info, dt_loop);
+ linefeed;
+}
+
#ifdef PRUMPF_HAD_MORE_TIME
void output_thread_defines(void)
{
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)