patch-2.3.16 linux/arch/sparc64/kernel/smp.c
Next file: linux/arch/sparc64/kernel/starfire.c
Previous file: linux/arch/sparc64/kernel/setup.c
Back to the patch index
Back to the overall index
- Lines: 102
- Date:
Tue Aug 31 11:23:30 1999
- Orig file:
v2.3.15/linux/arch/sparc64/kernel/smp.c
- Orig date:
Mon Aug 2 22:07:16 1999
diff -u --recursive --new-file v2.3.15/linux/arch/sparc64/kernel/smp.c linux/arch/sparc64/kernel/smp.c
@@ -83,7 +83,7 @@
return len;
}
-__initfunc(void smp_store_cpu_info(int id))
+void __init smp_store_cpu_info(int id)
{
int i;
@@ -103,7 +103,7 @@
cpu_data[id].irq_worklists[i] = 0;
}
-__initfunc(void smp_commence(void))
+void __init smp_commence(void)
{
}
@@ -115,7 +115,7 @@
extern void inherit_locked_prom_mappings(int save_p);
extern void cpu_probe(void);
-__initfunc(void smp_callin(void))
+void __init smp_callin(void)
{
int cpuid = hard_smp_processor_id();
@@ -192,7 +192,7 @@
*/
static struct task_struct *cpu_new_task = NULL;
-__initfunc(void smp_boot_cpus(void))
+void __init smp_boot_cpus(void)
{
int cpucount = 0, i;
@@ -547,10 +547,18 @@
atomic_dec(&smp_capture_registry);
}
-static inline void sparc64_do_profile(unsigned long pc)
+static inline void sparc64_do_profile(unsigned long pc, unsigned long g3)
{
if (prof_buffer && current->pid) {
extern int _stext;
+ extern int rwlock_impl_begin, rwlock_impl_end;
+ extern int atomic_impl_begin, atomic_impl_end;
+
+ if ((pc >= (unsigned long) &rwlock_impl_begin &&
+ pc < (unsigned long) &rwlock_impl_end) ||
+ (pc >= (unsigned long) &atomic_impl_begin &&
+ pc < (unsigned long) &atomic_impl_end))
+ pc = g3;
pc -= (unsigned long) &_stext;
pc >>= prof_shift;
@@ -589,7 +597,7 @@
clear_softint((1UL << 0));
do {
if(!user)
- sparc64_do_profile(regs->tpc);
+ sparc64_do_profile(regs->tpc, regs->u_regs[UREG_G3]);
if(!--prof_counter(cpu))
{
if (cpu == boot_cpu_id) {
@@ -647,7 +655,7 @@
} while (tick >= compare);
}
-__initfunc(static void smp_setup_percpu_timer(void))
+static void __init smp_setup_percpu_timer(void)
{
int cpu = smp_processor_id();
@@ -661,7 +669,7 @@
: "g1");
}
-__initfunc(void smp_tick_init(void))
+void __init smp_tick_init(void)
{
int i;
@@ -707,7 +715,7 @@
cycles_t cacheflush_time;
-__initfunc(static void smp_tune_scheduling (void))
+static void __init smp_tune_scheduling (void)
{
unsigned long flush_base, flags, *p;
unsigned int ecache_size;
@@ -775,7 +783,8 @@
(int) cacheflush_time);
}
-int __init setup_profiling_timer(unsigned int multiplier)
+/* /proc/profile writes can call this, don't __init it please. */
+int setup_profiling_timer(unsigned int multiplier)
{
unsigned long flags;
int i;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)