diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2005-11-24 00:51:31 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-01-08 22:50:35 -0500 |
commit | 404849bbd2bfd62e05b36f4753f6e1af6050a824 (patch) | |
tree | f233dd7d1ca0a0324fbfec7d33f83406c193cb27 | |
parent | 1888e7b51c0cb5db49911b59cb758ad2c7a530f2 (diff) |
[PATCH] powerpc: Remove some unneeded fields from the paca
This patch removes several unnecessary fields from the paca:
- next_jiffy_update_tb was simply unused. Remove trivially.
- The exdsi exception save area was not used. There were plans to use
it, but they never seem to have gone anywhere. If they ever do, we
can put it back. Remove from the paca, and from asm-offsets.c
- The default_decr field was used from asm, but was only ever assigned
the value of tb_ticks_per_jiffy. Just access tb_ticks_per_jiffy from
asm directly instead.
Built and booted on POWER5 LPAR and iSeries RS64.
Signed-off-by: David Gibson <dwg@au1.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
-rw-r--r-- | arch/powerpc/kernel/asm-offsets.c | 2 | ||||
-rw-r--r-- | arch/powerpc/kernel/head_64.S | 3 | ||||
-rw-r--r-- | arch/powerpc/kernel/paca.c | 1 | ||||
-rw-r--r-- | arch/powerpc/kernel/smp.c | 4 | ||||
-rw-r--r-- | arch/powerpc/kernel/time.c | 4 | ||||
-rw-r--r-- | include/asm-powerpc/paca.h | 5 |
6 files changed, 2 insertions, 17 deletions
diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c index 3bf89d1a2de6..56399c5c931a 100644 --- a/arch/powerpc/kernel/asm-offsets.c +++ b/arch/powerpc/kernel/asm-offsets.c | |||
@@ -131,11 +131,9 @@ int main(void) | |||
131 | DEFINE(PACALOWHTLBAREAS, offsetof(struct paca_struct, context.low_htlb_areas)); | 131 | DEFINE(PACALOWHTLBAREAS, offsetof(struct paca_struct, context.low_htlb_areas)); |
132 | DEFINE(PACAHIGHHTLBAREAS, offsetof(struct paca_struct, context.high_htlb_areas)); | 132 | DEFINE(PACAHIGHHTLBAREAS, offsetof(struct paca_struct, context.high_htlb_areas)); |
133 | #endif /* CONFIG_HUGETLB_PAGE */ | 133 | #endif /* CONFIG_HUGETLB_PAGE */ |
134 | DEFINE(PACADEFAULTDECR, offsetof(struct paca_struct, default_decr)); | ||
135 | DEFINE(PACA_EXGEN, offsetof(struct paca_struct, exgen)); | 134 | DEFINE(PACA_EXGEN, offsetof(struct paca_struct, exgen)); |
136 | DEFINE(PACA_EXMC, offsetof(struct paca_struct, exmc)); | 135 | DEFINE(PACA_EXMC, offsetof(struct paca_struct, exmc)); |
137 | DEFINE(PACA_EXSLB, offsetof(struct paca_struct, exslb)); | 136 | DEFINE(PACA_EXSLB, offsetof(struct paca_struct, exslb)); |
138 | DEFINE(PACA_EXDSI, offsetof(struct paca_struct, exdsi)); | ||
139 | DEFINE(PACAEMERGSP, offsetof(struct paca_struct, emergency_sp)); | 137 | DEFINE(PACAEMERGSP, offsetof(struct paca_struct, emergency_sp)); |
140 | DEFINE(PACALPPACA, offsetof(struct paca_struct, lppaca)); | 138 | DEFINE(PACALPPACA, offsetof(struct paca_struct, lppaca)); |
141 | DEFINE(PACAHWCPUID, offsetof(struct paca_struct, hw_cpu_id)); | 139 | DEFINE(PACAHWCPUID, offsetof(struct paca_struct, hw_cpu_id)); |
diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S index 8a8bf79ef044..881e18e8ef59 100644 --- a/arch/powerpc/kernel/head_64.S +++ b/arch/powerpc/kernel/head_64.S | |||
@@ -726,7 +726,8 @@ iSeries_secondary_smp_loop: | |||
726 | decrementer_iSeries_masked: | 726 | decrementer_iSeries_masked: |
727 | li r11,1 | 727 | li r11,1 |
728 | stb r11,PACALPPACA+LPPACADECRINT(r13) | 728 | stb r11,PACALPPACA+LPPACADECRINT(r13) |
729 | lwz r12,PACADEFAULTDECR(r13) | 729 | LOADBASE(r12,tb_ticks_per_jiffy) |
730 | lwz r12,OFF(tb_ticks_per_jiffy)(r13) | ||
730 | mtspr SPRN_DEC,r12 | 731 | mtspr SPRN_DEC,r12 |
731 | /* fall through */ | 732 | /* fall through */ |
732 | 733 | ||
diff --git a/arch/powerpc/kernel/paca.c b/arch/powerpc/kernel/paca.c index 25420406c8c0..999bdd816769 100644 --- a/arch/powerpc/kernel/paca.c +++ b/arch/powerpc/kernel/paca.c | |||
@@ -37,7 +37,6 @@ extern unsigned long __toc_start; | |||
37 | #define PACA_INIT_COMMON(number, start, asrr, asrv) \ | 37 | #define PACA_INIT_COMMON(number, start, asrr, asrv) \ |
38 | .lock_token = 0x8000, \ | 38 | .lock_token = 0x8000, \ |
39 | .paca_index = (number), /* Paca Index */ \ | 39 | .paca_index = (number), /* Paca Index */ \ |
40 | .default_decr = 0x00ff0000, /* Initial Decr */ \ | ||
41 | .kernel_toc = (unsigned long)(&__toc_start) + 0x8000UL, \ | 40 | .kernel_toc = (unsigned long)(&__toc_start) + 0x8000UL, \ |
42 | .stab_real = (asrr), /* Real pointer to segment table */ \ | 41 | .stab_real = (asrr), /* Real pointer to segment table */ \ |
43 | .stab_addr = (asrv), /* Virt pointer to segment table */ \ | 42 | .stab_addr = (asrv), /* Virt pointer to segment table */ \ |
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c index 30374d2f88e5..a90df6bf0940 100644 --- a/arch/powerpc/kernel/smp.c +++ b/arch/powerpc/kernel/smp.c | |||
@@ -452,10 +452,6 @@ int __devinit __cpu_up(unsigned int cpu) | |||
452 | if (smp_ops->cpu_bootable && !smp_ops->cpu_bootable(cpu)) | 452 | if (smp_ops->cpu_bootable && !smp_ops->cpu_bootable(cpu)) |
453 | return -EINVAL; | 453 | return -EINVAL; |
454 | 454 | ||
455 | #ifdef CONFIG_PPC64 | ||
456 | paca[cpu].default_decr = tb_ticks_per_jiffy; | ||
457 | #endif | ||
458 | |||
459 | /* Make sure callin-map entry is 0 (can be leftover a CPU | 455 | /* Make sure callin-map entry is 0 (can be leftover a CPU |
460 | * hotplug | 456 | * hotplug |
461 | */ | 457 | */ |
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c index de8479769bb7..56f50e91bddb 100644 --- a/arch/powerpc/kernel/time.c +++ b/arch/powerpc/kernel/time.c | |||
@@ -699,10 +699,6 @@ void __init time_init(void) | |||
699 | div128_by_32(1024*1024, 0, tb_ticks_per_sec, &res); | 699 | div128_by_32(1024*1024, 0, tb_ticks_per_sec, &res); |
700 | tb_to_xs = res.result_low; | 700 | tb_to_xs = res.result_low; |
701 | 701 | ||
702 | #ifdef CONFIG_PPC64 | ||
703 | get_paca()->default_decr = tb_ticks_per_jiffy; | ||
704 | #endif | ||
705 | |||
706 | /* | 702 | /* |
707 | * Compute scale factor for sched_clock. | 703 | * Compute scale factor for sched_clock. |
708 | * The calibrate_decr() function has set tb_ticks_per_sec, | 704 | * The calibrate_decr() function has set tb_ticks_per_sec, |
diff --git a/include/asm-powerpc/paca.h b/include/asm-powerpc/paca.h index 73693db546b3..59a41dbbf73c 100644 --- a/include/asm-powerpc/paca.h +++ b/include/asm-powerpc/paca.h | |||
@@ -60,7 +60,6 @@ struct paca_struct { | |||
60 | u16 lock_token; /* Constant 0x8000, used in locks */ | 60 | u16 lock_token; /* Constant 0x8000, used in locks */ |
61 | u16 paca_index; /* Logical processor number */ | 61 | u16 paca_index; /* Logical processor number */ |
62 | 62 | ||
63 | u32 default_decr; /* Default decrementer value */ | ||
64 | u64 kernel_toc; /* Kernel TOC address */ | 63 | u64 kernel_toc; /* Kernel TOC address */ |
65 | u64 stab_real; /* Absolute address of segment table */ | 64 | u64 stab_real; /* Absolute address of segment table */ |
66 | u64 stab_addr; /* Virtual address of segment table */ | 65 | u64 stab_addr; /* Virtual address of segment table */ |
@@ -91,14 +90,10 @@ struct paca_struct { | |||
91 | struct task_struct *__current; /* Pointer to current */ | 90 | struct task_struct *__current; /* Pointer to current */ |
92 | u64 kstack; /* Saved Kernel stack addr */ | 91 | u64 kstack; /* Saved Kernel stack addr */ |
93 | u64 stab_rr; /* stab/slb round-robin counter */ | 92 | u64 stab_rr; /* stab/slb round-robin counter */ |
94 | u64 next_jiffy_update_tb; /* TB value for next jiffy update */ | ||
95 | u64 saved_r1; /* r1 save for RTAS calls */ | 93 | u64 saved_r1; /* r1 save for RTAS calls */ |
96 | u64 saved_msr; /* MSR saved here by enter_rtas */ | 94 | u64 saved_msr; /* MSR saved here by enter_rtas */ |
97 | u8 proc_enabled; /* irq soft-enable flag */ | 95 | u8 proc_enabled; /* irq soft-enable flag */ |
98 | 96 | ||
99 | /* not yet used */ | ||
100 | u64 exdsi[8]; /* used for linear mapping hash table misses */ | ||
101 | |||
102 | /* | 97 | /* |
103 | * iSeries structure which the hypervisor knows about - | 98 | * iSeries structure which the hypervisor knows about - |
104 | * this structure should not cross a page boundary. | 99 | * this structure should not cross a page boundary. |