Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 136534
b: refs/heads/master
c: ab897d2
h: refs/heads/master
v: v3
  • Loading branch information
Jeremy Fitzhardinge authored and Ingo Molnar committed Jan 22, 2009
1 parent 5b6b506 commit 1d07ad8
Show file tree
Hide file tree
Showing 28 changed files with 388 additions and 463 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: fb746d0e1365b7472ccc4c3d5b0672b34a092d0b
refs/heads/master: ab897d2013128f470240a541b31cf5e636984e71
4 changes: 2 additions & 2 deletions trunk/arch/x86/Kconfig.cpu
Original file line number Diff line number Diff line change
Expand Up @@ -307,10 +307,10 @@ config X86_CMPXCHG

config X86_L1_CACHE_SHIFT
int
default "7" if MPENTIUM4 || MPSC
default "7" if MPENTIUM4 || X86_GENERIC || GENERIC_CPU || MPSC
default "4" if X86_ELAN || M486 || M386 || MGEODEGX1
default "5" if MWINCHIP3D || MWINCHIPC6 || MCRUSOE || MEFFICEON || MCYRIXIII || MK6 || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || M586 || MVIAC3_2 || MGEODE_LX
default "6" if MK7 || MK8 || MPENTIUMM || MCORE2 || MVIAC7 || X86_GENERIC || GENERIC_CPU
default "6" if MK7 || MK8 || MPENTIUMM || MCORE2 || MVIAC7

config X86_XADD
def_bool y
Expand Down
3 changes: 1 addition & 2 deletions trunk/arch/x86/include/asm/page.h
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ static inline pteval_t native_pte_val(pte_t pte)
return pte.pte;
}

static inline pteval_t native_pte_flags(pte_t pte)
static inline pteval_t pte_flags(pte_t pte)
{
return native_pte_val(pte) & PTE_FLAGS_MASK;
}
Expand All @@ -173,7 +173,6 @@ static inline pteval_t native_pte_flags(pte_t pte)
#endif

#define pte_val(x) native_pte_val(x)
#define pte_flags(x) native_pte_flags(x)
#define __pte(x) native_make_pte(x)

#endif /* CONFIG_PARAVIRT */
Expand Down
18 changes: 0 additions & 18 deletions trunk/arch/x86/include/asm/paravirt.h
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,6 @@ struct pv_mmu_ops {
pte_t *ptep, pte_t pte);

pteval_t (*pte_val)(pte_t);
pteval_t (*pte_flags)(pte_t);
pte_t (*make_pte)(pteval_t pte);

pgdval_t (*pgd_val)(pgd_t);
Expand Down Expand Up @@ -1084,23 +1083,6 @@ static inline pteval_t pte_val(pte_t pte)
return ret;
}

static inline pteval_t pte_flags(pte_t pte)
{
pteval_t ret;

if (sizeof(pteval_t) > sizeof(long))
ret = PVOP_CALL2(pteval_t, pv_mmu_ops.pte_flags,
pte.pte, (u64)pte.pte >> 32);
else
ret = PVOP_CALL1(pteval_t, pv_mmu_ops.pte_flags,
pte.pte);

#ifdef CONFIG_PARAVIRT_DEBUG
BUG_ON(ret & PTE_PFN_MASK);
#endif
return ret;
}

static inline pgd_t __pgd(pgdval_t val)
{
pgdval_t ret;
Expand Down
1 change: 0 additions & 1 deletion trunk/arch/x86/kernel/paravirt.c
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,6 @@ struct pv_mmu_ops pv_mmu_ops = {
#endif /* PAGETABLE_LEVELS >= 3 */

.pte_val = native_pte_val,
.pte_flags = native_pte_flags,
.pgd_val = native_pgd_val,

.make_pte = native_make_pte,
Expand Down
16 changes: 8 additions & 8 deletions trunk/arch/x86/kernel/tlb_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
* To avoid global state use 8 different call vectors.
* Each CPU uses a specific vector to trigger flushes on other
* CPUs. Depending on the received vector the target CPUs look into
* the right array slot for the flush data.
* the right per cpu variable for the flush data.
*
* With more than 8 CPUs they are hashed to the 8 available
* vectors. The limited global vector space forces us to this right now.
Expand All @@ -48,13 +48,13 @@ union smp_flush_state {
unsigned long flush_va;
spinlock_t tlbstate_lock;
};
char pad[CONFIG_X86_INTERNODE_CACHE_BYTES];
} ____cacheline_internodealigned_in_smp;
char pad[SMP_CACHE_BYTES];
} ____cacheline_aligned;

/* State is put into the per CPU data section, but padded
to a full cache line because other CPUs can access it and we don't
want false sharing in the per cpu data segment. */
static union smp_flush_state flush_state[NUM_INVALIDATE_TLB_VECTORS];
static DEFINE_PER_CPU(union smp_flush_state, flush_state);

/*
* We cannot call mmdrop() because we are in interrupt context,
Expand Down Expand Up @@ -129,7 +129,7 @@ asmlinkage void smp_invalidate_interrupt(struct pt_regs *regs)
* Use that to determine where the sender put the data.
*/
sender = ~regs->orig_ax - INVALIDATE_TLB_VECTOR_START;
f = &flush_state[sender];
f = &per_cpu(flush_state, sender);

if (!cpu_isset(cpu, f->flush_cpumask))
goto out;
Expand Down Expand Up @@ -169,7 +169,7 @@ void native_flush_tlb_others(const cpumask_t *cpumaskp, struct mm_struct *mm,

/* Caller has disabled preemption */
sender = smp_processor_id() % NUM_INVALIDATE_TLB_VECTORS;
f = &flush_state[sender];
f = &per_cpu(flush_state, sender);

/*
* Could avoid this lock when
Expand Down Expand Up @@ -205,8 +205,8 @@ static int __cpuinit init_smp_flush(void)
{
int i;

for (i = 0; i < ARRAY_SIZE(flush_state); i++)
spin_lock_init(&flush_state[i].tlbstate_lock);
for_each_possible_cpu(i)
spin_lock_init(&per_cpu(flush_state, i).tlbstate_lock);

return 0;
}
Expand Down
Loading

0 comments on commit 1d07ad8

Please sign in to comment.