Commit 4d54d1dd authored by Anton Blanchard's avatar Anton Blanchard

Merge samba.org:/scratch/anton/export

into samba.org:/scratch/anton/linux-2.5_ppc64
parents 15dbac49 bf49e6b4
...@@ -197,11 +197,23 @@ void make_slbe(unsigned long esid, unsigned long vsid, int large) ...@@ -197,11 +197,23 @@ void make_slbe(unsigned long esid, unsigned long vsid, int large)
PMC_SW_PROCESSOR(stab_capacity_castouts); PMC_SW_PROCESSOR(stab_capacity_castouts);
/*
* Never cast out the segment for our kernel stack. Since we
* dont invalidate the ERAT we could have a valid translation
* for the kernel stack during the first part of exception exit
* which gets invalidated due to a tlbie from another cpu at a
* non recoverable point (after setting srr0/1) - Anton
*/
castout_entry = get_paca()->xStab_data.next_round_robin; castout_entry = get_paca()->xStab_data.next_round_robin;
entry = castout_entry; do {
castout_entry++; entry = castout_entry;
if (castout_entry >= naca->slb_size) castout_entry++;
castout_entry = 1; if (castout_entry >= naca->slb_size)
castout_entry = 1;
asm volatile("slbmfee %0,%1" : "=r" (esid_data) : "r" (entry));
} while (esid_data.data.esid == GET_ESID((unsigned long)_get_SP()) &&
esid_data.data.v);
get_paca()->xStab_data.next_round_robin = castout_entry; get_paca()->xStab_data.next_round_robin = castout_entry;
/* slbie not needed as the previous mapping is still valid. */ /* slbie not needed as the previous mapping is still valid. */
...@@ -346,7 +358,12 @@ static void preload_stab(struct task_struct *tsk, struct mm_struct *mm) ...@@ -346,7 +358,12 @@ static void preload_stab(struct task_struct *tsk, struct mm_struct *mm)
void flush_stab(struct task_struct *tsk, struct mm_struct *mm) void flush_stab(struct task_struct *tsk, struct mm_struct *mm)
{ {
if (cpu_has_slb()) { if (cpu_has_slb()) {
if (!STAB_PRESSURE && test_thread_flag(TIF_32BIT)) { /*
* XXX disable 32bit slb invalidate optimisation until we fix
* the issue where a 32bit app execed out of a 64bit app can
* cause segments above 4GB not to be flushed - Anton
*/
if (0 && !STAB_PRESSURE && test_thread_flag(TIF_32BIT)) {
union { union {
unsigned long word0; unsigned long word0;
slb_dword0 data; slb_dword0 data;
......
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