Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 99531
b: refs/heads/master
c: 3843fc2
h: refs/heads/master
i:
  99529: e460ce0
  99527: 935a1f8
v: v3
  • Loading branch information
Jeremy Fitzhardinge authored and Thomas Gleixner committed May 22, 2008
1 parent f03d9dd commit 10b02aa
Show file tree
Hide file tree
Showing 37 changed files with 478 additions and 198 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: e6b0edef3453677b13e175a104a83eb36d062dd3
refs/heads/master: 3843fc2575e3389f4f0ad0420a720240a5746a5d
36 changes: 11 additions & 25 deletions trunk/arch/sparc64/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -657,39 +657,20 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long sp,
struct task_struct *p, struct pt_regs *regs)
{
struct thread_info *t = task_thread_info(p);
struct sparc_stackf *parent_sf;
unsigned long child_stack_sz;
char *child_trap_frame;
int kernel_thread;

kernel_thread = (regs->tstate & TSTATE_PRIV) ? 1 : 0;
parent_sf = ((struct sparc_stackf *) regs) - 1;

/* Calculate offset to stack_frame & pt_regs */
child_stack_sz = ((STACKFRAME_SZ + TRACEREG_SZ) +
(kernel_thread ? STACKFRAME_SZ : 0));
child_trap_frame = (task_stack_page(p) +
(THREAD_SIZE - child_stack_sz));
memcpy(child_trap_frame, parent_sf, child_stack_sz);

t->flags = (t->flags & ~((0xffUL << TI_FLAG_CWP_SHIFT) |
(0xffUL << TI_FLAG_CURRENT_DS_SHIFT))) |
child_trap_frame = task_stack_page(p) + (THREAD_SIZE - (TRACEREG_SZ+STACKFRAME_SZ));
memcpy(child_trap_frame, (((struct sparc_stackf *)regs)-1), (TRACEREG_SZ+STACKFRAME_SZ));

t->flags = (t->flags & ~((0xffUL << TI_FLAG_CWP_SHIFT) | (0xffUL << TI_FLAG_CURRENT_DS_SHIFT))) |
(((regs->tstate + 1) & TSTATE_CWP) << TI_FLAG_CWP_SHIFT);
t->new_child = 1;
t->ksp = ((unsigned long) child_trap_frame) - STACK_BIAS;
t->kregs = (struct pt_regs *) (child_trap_frame +
sizeof(struct sparc_stackf));
t->kregs = (struct pt_regs *)(child_trap_frame+sizeof(struct sparc_stackf));
t->fpsaved[0] = 0;

if (kernel_thread) {
struct sparc_stackf *child_sf = (struct sparc_stackf *)
(child_trap_frame + (STACKFRAME_SZ + TRACEREG_SZ));

/* Zero terminate the stack backtrace. */
child_sf->fp = NULL;
t->kregs->u_regs[UREG_FP] =
((unsigned long) child_sf) - STACK_BIAS;

if (regs->tstate & TSTATE_PRIV) {
/* Special case, if we are spawning a kernel thread from
* a userspace task (via KMOD, NFS, or similar) we must
* disable performance counters in the child because the
Expand All @@ -700,7 +681,12 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long sp,
t->pcr_reg = 0;
t->flags &= ~_TIF_PERFCTR;
}
t->kregs->u_regs[UREG_FP] = t->ksp;
t->flags |= ((long)ASI_P << TI_FLAG_CURRENT_DS_SHIFT);
flush_register_windows();
memcpy((void *)(t->ksp + STACK_BIAS),
(void *)(regs->u_regs[UREG_FP] + STACK_BIAS),
sizeof(struct sparc_stackf));
t->kregs->u_regs[UREG_G6] = (unsigned long) t;
t->kregs->u_regs[UREG_G4] = (unsigned long) t->task;
} else {
Expand Down
1 change: 0 additions & 1 deletion trunk/arch/sparc64/kernel/rtrap.S
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,6 @@ kern_rtt: rdpr %canrestore, %g1
brz,pn %g1, kern_rtt_fill
nop
kern_rtt_restore:
stw %g0, [%sp + PTREGS_OFF + PT_V9_MAGIC]
restore
retry

Expand Down
12 changes: 5 additions & 7 deletions trunk/arch/sparc64/kernel/stacktrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ void save_stack_trace(struct stack_trace *trace)
fp = ksp + STACK_BIAS;
thread_base = (unsigned long) tp;
do {
struct sparc_stackf *sf;
struct reg_window *rw;
struct pt_regs *regs;
unsigned long pc;

Expand All @@ -28,17 +28,15 @@ void save_stack_trace(struct stack_trace *trace)
fp >= (thread_base + THREAD_SIZE))
break;

sf = (struct sparc_stackf *) fp;
regs = (struct pt_regs *) (sf + 1);
rw = (struct reg_window *) fp;
regs = (struct pt_regs *) (rw + 1);

if ((regs->magic & ~0x1ff) == PT_REGS_MAGIC) {
if (!(regs->tstate & TSTATE_PRIV))
break;
pc = regs->tpc;
fp = regs->u_regs[UREG_I6] + STACK_BIAS;
} else {
pc = sf->callers_pc;
fp = (unsigned long)sf->fp + STACK_BIAS;
pc = rw->ins[7];
fp = rw->ins[6] + STACK_BIAS;
}

if (trace->skip > 0)
Expand Down
12 changes: 5 additions & 7 deletions trunk/arch/sparc64/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -2116,25 +2116,23 @@ void show_stack(struct task_struct *tsk, unsigned long *_ksp)
printk("\n");
#endif
do {
struct sparc_stackf *sf;
struct reg_window *rw;
struct pt_regs *regs;
unsigned long pc;

/* Bogus frame pointer? */
if (fp < (thread_base + sizeof(struct thread_info)) ||
fp >= (thread_base + THREAD_SIZE))
break;
sf = (struct sparc_stackf *) fp;
regs = (struct pt_regs *) (sf + 1);
rw = (struct reg_window *)fp;
regs = (struct pt_regs *) (rw + 1);

if ((regs->magic & ~0x1ff) == PT_REGS_MAGIC) {
if (!(regs->tstate & TSTATE_PRIV))
break;
pc = regs->tpc;
fp = regs->u_regs[UREG_I6] + STACK_BIAS;
} else {
pc = sf->callers_pc;
fp = (unsigned long)sf->fp + STACK_BIAS;
pc = rw->ins[7];
fp = rw->ins[6] + STACK_BIAS;
}

printk(" [%016lx] ", pc);
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/x86/vdso/vma.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include "vextern.h" /* Just for VMAGIC. */
#undef VEXTERN

unsigned int __read_mostly vdso_enabled = 1;
int vdso_enabled = 1;

extern char vdso_start[], vdso_end[];
extern unsigned short vdso_sync_cpuid;
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/x86/xen/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ config XEN
bool "Xen guest support"
select PARAVIRT
depends on X86_32
depends on X86_CMPXCHG && X86_TSC && !(X86_VISWS || X86_VOYAGER)
depends on X86_CMPXCHG && X86_TSC && X86_PAE && !(X86_VISWS || X86_VOYAGER)
help
This is the Linux Xen port. Enabling this will allow the
kernel to boot in a paravirtualized environment under the
Expand Down
51 changes: 18 additions & 33 deletions trunk/arch/x86/xen/enlighten.c
Original file line number Diff line number Diff line change
Expand Up @@ -785,38 +785,35 @@ static __init void xen_set_pte_init(pte_t *ptep, pte_t pte)
static __init void xen_pagetable_setup_start(pgd_t *base)
{
pgd_t *xen_pgd = (pgd_t *)xen_start_info->pt_base;
int i;

/* special set_pte for pagetable initialization */
pv_mmu_ops.set_pte = xen_set_pte_init;

init_mm.pgd = base;
/*
* copy top-level of Xen-supplied pagetable into place. For
* !PAE we can use this as-is, but for PAE it is a stand-in
* while we copy the pmd pages.
* copy top-level of Xen-supplied pagetable into place. This
* is a stand-in while we copy the pmd pages.
*/
memcpy(base, xen_pgd, PTRS_PER_PGD * sizeof(pgd_t));

if (PTRS_PER_PMD > 1) {
int i;
/*
* For PAE, need to allocate new pmds, rather than
* share Xen's, since Xen doesn't like pmd's being
* shared between address spaces.
*/
for (i = 0; i < PTRS_PER_PGD; i++) {
if (pgd_val_ma(xen_pgd[i]) & _PAGE_PRESENT) {
pmd_t *pmd = (pmd_t *)alloc_bootmem_low_pages(PAGE_SIZE);
/*
* For PAE, need to allocate new pmds, rather than
* share Xen's, since Xen doesn't like pmd's being
* shared between address spaces.
*/
for (i = 0; i < PTRS_PER_PGD; i++) {
if (pgd_val_ma(xen_pgd[i]) & _PAGE_PRESENT) {
pmd_t *pmd = (pmd_t *)alloc_bootmem_low_pages(PAGE_SIZE);

memcpy(pmd, (void *)pgd_page_vaddr(xen_pgd[i]),
PAGE_SIZE);
memcpy(pmd, (void *)pgd_page_vaddr(xen_pgd[i]),
PAGE_SIZE);

make_lowmem_page_readonly(pmd);
make_lowmem_page_readonly(pmd);

set_pgd(&base[i], __pgd(1 + __pa(pmd)));
} else
pgd_clear(&base[i]);
}
set_pgd(&base[i], __pgd(1 + __pa(pmd)));
} else
pgd_clear(&base[i]);
}

/* make sure zero_page is mapped RO so we can use it in pagetables */
Expand Down Expand Up @@ -873,17 +870,7 @@ static __init void xen_pagetable_setup_done(pgd_t *base)

/* Actually pin the pagetable down, but we can't set PG_pinned
yet because the page structures don't exist yet. */
{
unsigned level;

#ifdef CONFIG_X86_PAE
level = MMUEXT_PIN_L3_TABLE;
#else
level = MMUEXT_PIN_L2_TABLE;
#endif

pin_pagetable_pfn(level, PFN_DOWN(__pa(base)));
}
pin_pagetable_pfn(MMUEXT_PIN_L3_TABLE, PFN_DOWN(__pa(base)));
}

/* This is called once we have the cpu_possible_map */
Expand Down Expand Up @@ -1093,7 +1080,6 @@ static const struct pv_mmu_ops xen_mmu_ops __initdata = {
.make_pte = xen_make_pte,
.make_pgd = xen_make_pgd,

#ifdef CONFIG_X86_PAE
.set_pte_atomic = xen_set_pte_atomic,
.set_pte_present = xen_set_pte_at,
.set_pud = xen_set_pud,
Expand All @@ -1102,7 +1088,6 @@ static const struct pv_mmu_ops xen_mmu_ops __initdata = {

.make_pmd = xen_make_pmd,
.pmd_val = xen_pmd_val,
#endif /* PAE */

.activate_mm = xen_activate_mm,
.dup_mmap = xen_dup_mmap,
Expand Down
19 changes: 2 additions & 17 deletions trunk/arch/x86/xen/mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ pmdval_t xen_pmd_val(pmd_t pmd)
ret = machine_to_phys(XMADDR(ret)).paddr | _PAGE_PRESENT;
return ret;
}
#ifdef CONFIG_X86_PAE

void xen_set_pud(pud_t *ptr, pud_t val)
{
struct multicall_space mcs;
Expand Down Expand Up @@ -272,12 +272,6 @@ pmd_t xen_make_pmd(pmdval_t pmd)

return native_make_pmd(pmd);
}
#else /* !PAE */
void xen_set_pte(pte_t *ptep, pte_t pte)
{
*ptep = pte;
}
#endif /* CONFIG_X86_PAE */

/*
(Yet another) pagetable walker. This one is intended for pinning a
Expand Down Expand Up @@ -430,8 +424,6 @@ static int pin_page(struct page *page, enum pt_level level)
read-only, and can be pinned. */
void xen_pgd_pin(pgd_t *pgd)
{
unsigned level;

xen_mc_batch();

if (pgd_walk(pgd, pin_page, TASK_SIZE)) {
Expand All @@ -441,14 +433,7 @@ void xen_pgd_pin(pgd_t *pgd)
xen_mc_batch();
}

#ifdef CONFIG_X86_PAE
level = MMUEXT_PIN_L3_TABLE;
#else
level = MMUEXT_PIN_L2_TABLE;
#endif

xen_do_pin(level, PFN_DOWN(__pa(pgd)));

xen_do_pin(MMUEXT_PIN_L3_TABLE, PFN_DOWN(__pa(pgd)));
xen_mc_issue(0);
}

Expand Down
24 changes: 6 additions & 18 deletions trunk/arch/x86/xen/mmu.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,13 @@ void xen_exit_mmap(struct mm_struct *mm);
void xen_pgd_pin(pgd_t *pgd);
//void xen_pgd_unpin(pgd_t *pgd);

#ifdef CONFIG_X86_PAE
unsigned long long xen_pte_val(pte_t);
unsigned long long xen_pmd_val(pmd_t);
unsigned long long xen_pgd_val(pgd_t);
pteval_t xen_pte_val(pte_t);
pmdval_t xen_pmd_val(pmd_t);
pgdval_t xen_pgd_val(pgd_t);

pte_t xen_make_pte(unsigned long long);
pmd_t xen_make_pmd(unsigned long long);
pgd_t xen_make_pgd(unsigned long long);
pte_t xen_make_pte(pteval_t);
pmd_t xen_make_pmd(pmdval_t);
pgd_t xen_make_pgd(pgdval_t);

void xen_set_pte_at(struct mm_struct *mm, unsigned long addr,
pte_t *ptep, pte_t pteval);
Expand All @@ -53,15 +52,4 @@ void xen_set_pud(pud_t *ptr, pud_t val);
void xen_pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep);
void xen_pmd_clear(pmd_t *pmdp);


#else
unsigned long xen_pte_val(pte_t);
unsigned long xen_pmd_val(pmd_t);
unsigned long xen_pgd_val(pgd_t);

pte_t xen_make_pte(unsigned long);
pmd_t xen_make_pmd(unsigned long);
pgd_t xen_make_pgd(unsigned long);
#endif

#endif /* _XEN_MMU_H */
4 changes: 0 additions & 4 deletions trunk/arch/x86/xen/xen-head.S
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,7 @@ ENTRY(hypercall_page)
ELFNOTE(Xen, XEN_ELFNOTE_ENTRY, .long startup_xen)
ELFNOTE(Xen, XEN_ELFNOTE_HYPERCALL_PAGE, .long hypercall_page)
ELFNOTE(Xen, XEN_ELFNOTE_FEATURES, .asciz "!writable_page_tables|pae_pgdir_above_4gb")
#ifdef CONFIG_X86_PAE
ELFNOTE(Xen, XEN_ELFNOTE_PAE_MODE, .asciz "yes")
#else
ELFNOTE(Xen, XEN_ELFNOTE_PAE_MODE, .asciz "no")
#endif
ELFNOTE(Xen, XEN_ELFNOTE_LOADER, .asciz "generic")

#endif /*CONFIG_XEN */
11 changes: 4 additions & 7 deletions trunk/drivers/net/cassini.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@

#define DRV_MODULE_NAME "cassini"
#define PFX DRV_MODULE_NAME ": "
#define DRV_MODULE_VERSION "1.6"
#define DRV_MODULE_RELDATE "21 May 2008"
#define DRV_MODULE_VERSION "1.5"
#define DRV_MODULE_RELDATE "4 Jan 2008"

#define CAS_DEF_MSG_ENABLE \
(NETIF_MSG_DRV | \
Expand Down Expand Up @@ -2136,12 +2136,9 @@ static int cas_rx_process_pkt(struct cas *cp, struct cas_rx_comp *rxc,
if (addr)
cas_page_unmap(addr);
}
skb->csum = csum_unfold(~csum);
skb->ip_summed = CHECKSUM_COMPLETE;
skb->protocol = eth_type_trans(skb, cp->dev);
if (skb->protocol == htons(ETH_P_IP)) {
skb->csum = csum_unfold(~csum);
skb->ip_summed = CHECKSUM_COMPLETE;
} else
skb->ip_summed = CHECKSUM_NONE;
return len;
}

Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/net/wireless/ath5k/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -1787,8 +1787,6 @@ ath5k_tasklet_rx(unsigned long data)

spin_lock(&sc->rxbuflock);
do {
rxs.flag = 0;

if (unlikely(list_empty(&sc->rxbuf))) {
ATH5K_WARN(sc, "empty rx buf pool\n");
break;
Expand Down
Loading

0 comments on commit 10b02aa

Please sign in to comment.