Commit 94ebcd44 authored by William Lee Irwin III's avatar William Lee Irwin III Committed by Linus Torvalds

[PATCH] ppc64: remove iseries profiling

From: Anton Blanchard <anton@samba.org>

- Remove iseries specific profiling, there were no complaints when I
  suggested removal on the linuxppc64 list a few weeks ago.

- Also remove another instance of that pesky abs() function.
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 0794bff0
......@@ -98,11 +98,6 @@ int main(void)
DEFINE(PACAHTLBSEGS, offsetof(struct paca_struct, context.htlb_segs));
#endif /* CONFIG_HUGETLB_PAGE */
DEFINE(PACADEFAULTDECR, offsetof(struct paca_struct, default_decr));
DEFINE(PACAPROFENABLED, offsetof(struct paca_struct, prof_enabled));
DEFINE(PACAPROFLEN, offsetof(struct paca_struct, prof_len));
DEFINE(PACAPROFSHIFT, offsetof(struct paca_struct, prof_shift));
DEFINE(PACAPROFBUFFER, offsetof(struct paca_struct, prof_buffer));
DEFINE(PACAPROFSTEXT, offsetof(struct paca_struct, prof_stext));
DEFINE(PACA_EXGEN, offsetof(struct paca_struct, exgen));
DEFINE(PACA_EXMC, offsetof(struct paca_struct, exmc));
DEFINE(PACA_EXSLB, offsetof(struct paca_struct, exslb));
......
......@@ -322,36 +322,11 @@ label##_Iseries: \
HMT_MEDIUM; \
mtspr SPRG1,r13; /* save r13 */ \
EXCEPTION_PROLOG_ISERIES_1(PACA_EXGEN); \
lbz r10,PACAPROFENABLED(r13); \
cmpwi r10,0; \
bne- label##_Iseries_profile; \
label##_Iseries_prof_ret: \
lbz r10,PACAPROCENABLED(r13); \
cmpwi 0,r10,0; \
beq- label##_Iseries_masked; \
EXCEPTION_PROLOG_ISERIES_2; \
b label##_common; \
label##_Iseries_profile: \
ld r12,PACALPPACA+LPPACASRR1(r13); \
andi. r12,r12,MSR_PR; /* Test if in kernel */ \
bne label##_Iseries_prof_ret; \
ld r11,PACALPPACA+LPPACASRR0(r13); \
ld r12,PACAPROFSTEXT(r13); /* _stext */ \
subf r11,r12,r11; /* offset into kernel */ \
lwz r12,PACAPROFSHIFT(r13); \
srd r11,r11,r12; \
lwz r12,PACAPROFLEN(r13); /* profile table length - 1 */ \
cmpd r11,r12; /* off end? */ \
ble 1f; \
mr r11,r12; /* force into last entry */ \
1: sldi r11,r11,2; /* convert to offset */ \
ld r12,PACAPROFBUFFER(r13);/* profile buffer */ \
add r12,r12,r11; \
2: lwarx r11,0,r12; /* atomically increment */ \
addi r11,r11,1; \
stwcx. r11,0,r12; \
bne- 2b; \
b label##_Iseries_prof_ret
#ifdef DO_SOFT_DISABLE
#define DISABLE_INTS \
......
......@@ -36,6 +36,7 @@
#include <asm/pgtable.h>
#include <asm/mmu_context.h>
#include <asm/cputable.h>
#include <asm/sections.h>
#include <asm/time.h>
#include "iSeries_setup.h"
......@@ -54,17 +55,12 @@
#include <asm/iSeries/mf.h>
/* Function Prototypes */
extern void abort(void);
extern void ppcdbg_initialize(void);
extern void iSeries_pcibios_init(void);
extern void tce_init_iSeries(void);
static void build_iSeries_Memory_Map(void);
static void setup_iSeries_cache_sizes(void);
static void iSeries_bolt_kernel(unsigned long saddr, unsigned long eaddr);
extern void build_valid_hpte(unsigned long vsid, unsigned long ea, unsigned long pa,
pte_t *ptep, unsigned hpteflags, unsigned bolted);
static void iSeries_setup_dprofile(void);
extern void iSeries_setup_arch(void);
extern void iSeries_pci_final_fixup(void);
......@@ -77,16 +73,10 @@ static unsigned long tbFreqHz;
static unsigned long tbFreqMhz;
static unsigned long tbFreqMhzHundreths;
unsigned long dprof_shift;
unsigned long dprof_len;
unsigned int *dprof_buffer;
int piranha_simulator;
int boot_cpuid;
extern char _end[];
extern int rd_size; /* Defined in drivers/block/rd.c */
extern unsigned long klimit;
extern unsigned long embedded_sysmap_start;
......@@ -366,30 +356,6 @@ void __init iSeries_init(unsigned long r3, unsigned long r4, unsigned long r5,
}
*p = 0;
if (strstr(cmd_line, "dprofile=")) {
for (q = cmd_line; (p = strstr(q, "dprofile=")) != 0; ) {
unsigned long size, new_klimit;
q = p + 9;
if ((p > cmd_line) && (p[-1] != ' '))
continue;
dprof_shift = simple_strtoul(q, &q, 0);
dprof_len = (unsigned long)_etext -
(unsigned long)_stext;
dprof_len >>= dprof_shift;
size = ((dprof_len * sizeof(unsigned int)) +
(PAGE_SIZE-1)) & PAGE_MASK;
dprof_buffer = (unsigned int *)((klimit +
(PAGE_SIZE-1)) & PAGE_MASK);
new_klimit = ((unsigned long)dprof_buffer) + size;
lmb_reserve(__pa(klimit), (new_klimit-klimit));
klimit = new_klimit;
memset(dprof_buffer, 0, size);
}
}
iSeries_setup_dprofile();
mf_init();
mf_initialized = 1;
mb();
......@@ -837,22 +803,6 @@ void iSeries_fixup_klimit(void)
}
}
static void iSeries_setup_dprofile(void)
{
if (dprof_buffer) {
unsigned i;
for (i = 0; i < NR_CPUS; ++i) {
paca[i].prof_shift = dprof_shift;
paca[i].prof_len = dprof_len - 1;
paca[i].prof_buffer = dprof_buffer;
paca[i].prof_stext = (unsigned *)_stext;
mb();
paca[i].prof_enabled = 1;
}
}
}
int __init iSeries_src_init(void)
{
/* clear the progress line */
......
......@@ -454,12 +454,6 @@ _GLOBAL(_outsl_ns)
sync
blr
_GLOBAL(abs)
cmpi 0,r3,0
bge 10f
neg r3,r3
10: blr
_GLOBAL(_get_PVR)
mfspr r3,PVR
blr
......
......@@ -592,10 +592,7 @@ void __init smp_init_pSeries(void)
void smp_local_timer_interrupt(struct pt_regs * regs)
{
if (!--(get_paca()->prof_counter)) {
update_process_times(user_mode(regs));
(get_paca()->prof_counter)=get_paca()->prof_multiplier;
}
update_process_times(user_mode(regs));
}
void smp_message_recv(int msg, struct pt_regs *regs)
......@@ -824,8 +821,6 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
/* Fixup boot cpu */
smp_store_cpu_info(boot_cpuid);
cpu_callin_map[boot_cpuid] = 1;
paca[boot_cpuid].prof_counter = 1;
paca[boot_cpuid].prof_multiplier = 1;
#ifndef CONFIG_PPC_ISERIES
paca[boot_cpuid].next_jiffy_update_tb = tb_last_stamp = get_tb();
......@@ -878,8 +873,6 @@ int __devinit __cpu_up(unsigned int cpu)
if (system_state == SYSTEM_BOOTING && !cpu_present(cpu))
return -ENOENT;
paca[cpu].prof_counter = 1;
paca[cpu].prof_multiplier = 1;
paca[cpu].default_decr = tb_ticks_per_jiffy / decr_overclock;
if (!(cur_cpu_spec->cpu_features & CPU_FTR_SLB)) {
......
......@@ -105,21 +105,6 @@ struct paca_struct {
*/
struct ItLpPaca lppaca __attribute__((aligned(0x80)));
struct ItLpRegSave reg_save;
/*
* iSeries profiling support
*
* FIXME: do we still want this, or can we ditch it in favour
* of oprofile?
*/
u32 *prof_buffer; /* iSeries profiling buffer */
u32 *prof_stext; /* iSeries start of kernel text */
u32 prof_multiplier;
u32 prof_counter;
u32 prof_shift; /* iSeries shift for profile
* bucket size */
u32 prof_len; /* iSeries length of profile */
u8 prof_enabled; /* 1=iSeries profiling enabled */
};
#endif /* _PPC64_PACA_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment