Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 80087
b: refs/heads/master
c: bde6f5f
h: refs/heads/master
i:
  80085: 1bb43f9
  80083: d9ddb19
  80079: c649853
v: v3
  • Loading branch information
Venki Pallipadi authored and Ingo Molnar committed Jan 30, 2008
1 parent 09088e4 commit c1e8212
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7d409d6057c7244f8757ce15245f6df27271be0c
refs/heads/master: bde6f5f59c2b2b48a7a849c129d5b48838fe77ee
3 changes: 2 additions & 1 deletion trunk/arch/x86/kernel/smp_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,13 +256,14 @@ static DEFINE_SPINLOCK(tlbstate_lock);
* We need to reload %cr3 since the page tables may be going
* away from under us..
*/
void leave_mm(unsigned long cpu)
void leave_mm(int cpu)
{
if (per_cpu(cpu_tlbstate, cpu).state == TLBSTATE_OK)
BUG();
cpu_clear(cpu, per_cpu(cpu_tlbstate, cpu).active_mm->cpu_vm_mask);
load_cr3(swapper_pg_dir);
}
EXPORT_SYMBOL_GPL(leave_mm);

/*
*
Expand Down
3 changes: 2 additions & 1 deletion trunk/arch/x86/kernel/smp_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,14 @@ static DEFINE_PER_CPU(union smp_flush_state, flush_state);
* We cannot call mmdrop() because we are in interrupt context,
* instead update mm->cpu_vm_mask.
*/
static inline void leave_mm(int cpu)
void leave_mm(int cpu)
{
if (read_pda(mmu_state) == TLBSTATE_OK)
BUG();
cpu_clear(cpu, read_pda(active_mm)->cpu_vm_mask);
load_cr3(swapper_pg_dir);
}
EXPORT_SYMBOL_GPL(leave_mm);

/*
*
Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/acpi/processor_idle.c
Original file line number Diff line number Diff line change
Expand Up @@ -534,6 +534,7 @@ static void acpi_processor_idle(void)
break;

case ACPI_STATE_C3:
acpi_unlazy_tlb(smp_processor_id());
/*
* Must be done before busmaster disable as we might
* need to access HPET !
Expand Down Expand Up @@ -1423,6 +1424,7 @@ static int acpi_idle_enter_simple(struct cpuidle_device *dev,
return 0;
}

acpi_unlazy_tlb(smp_processor_id());
/*
* Must be done before busmaster disable as we might need to
* access HPET !
Expand Down
2 changes: 2 additions & 0 deletions trunk/include/asm-ia64/acpi.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ extern int __devinitdata pxm_to_nid_map[MAX_PXM_DOMAINS];
extern int __initdata nid_to_pxm_map[MAX_NUMNODES];
#endif

#define acpi_unlazy_tlb(x)

#endif /*__KERNEL__*/

#endif /*_ASM_ACPI_H*/
3 changes: 3 additions & 0 deletions trunk/include/asm-x86/acpi.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

#include <asm/numa.h>
#include <asm/processor.h>
#include <asm/mmu.h>

#define COMPILER_DEPENDENT_INT64 long long
#define COMPILER_DEPENDENT_UINT64 unsigned long long
Expand Down Expand Up @@ -167,4 +168,6 @@ static inline void acpi_fake_nodes(const struct bootnode *fake_nodes,
}
#endif

#define acpi_unlazy_tlb(x) leave_mm(x)

#endif /*__X86_ASM_ACPI_H*/
8 changes: 8 additions & 0 deletions trunk/include/asm-x86/mmu.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,12 @@ typedef struct {
void *vdso;
} mm_context_t;

#ifdef CONFIG_SMP
void leave_mm(int cpu);
#else
static inline void leave_mm(int cpu)
{
}
#endif

#endif /* _ASM_X86_MMU_H */
2 changes: 0 additions & 2 deletions trunk/include/asm-x86/mmu_context_32.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
#endif
}

void leave_mm(unsigned long cpu);

static inline void switch_mm(struct mm_struct *prev,
struct mm_struct *next,
struct task_struct *tsk)
Expand Down

0 comments on commit c1e8212

Please sign in to comment.