Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 64776
b: refs/heads/master
c: 0eb0969
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Sep 11, 2007
1 parent f8bec64 commit 712bb1f
Show file tree
Hide file tree
Showing 11 changed files with 65 additions and 42 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: 3dcc323fe8d7158bd662c04d41ba8b25fa3ce27b
refs/heads/master: 0eb096933a02226dd0b6a2199453fcf0936bf7e4
6 changes: 2 additions & 4 deletions trunk/arch/i386/kernel/alternative.c
Original file line number Diff line number Diff line change
Expand Up @@ -445,8 +445,6 @@ void __kprobes text_poke(void *addr, unsigned char *opcode, int len)
{
memcpy(addr, opcode, len);
sync_core();
/* Not strictly needed, but can speed CPU recovery up. Ignore cross cacheline
case. */
if (cpu_has_clflush)
asm("clflush (%0) " :: "r" (addr) : "memory");
/* Could also do a CLFLUSH here to speed up CPU recovery; but
that causes hangs on some VIA CPUs. */
}
28 changes: 22 additions & 6 deletions trunk/arch/i386/kernel/cpu/perfctr-watchdog.c
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,8 @@ static int setup_k7_watchdog(unsigned nmi_hz)
unsigned int evntsel;
struct nmi_watchdog_ctlblk *wd = &__get_cpu_var(nmi_watchdog_ctlblk);

perfctr_msr = MSR_K7_PERFCTR0;
evntsel_msr = MSR_K7_EVNTSEL0;
perfctr_msr = wd_ops->perfctr;
evntsel_msr = wd_ops->evntsel;

wrmsrl(perfctr_msr, 0UL);

Expand Down Expand Up @@ -343,8 +343,8 @@ static int setup_p6_watchdog(unsigned nmi_hz)
unsigned int evntsel;
struct nmi_watchdog_ctlblk *wd = &__get_cpu_var(nmi_watchdog_ctlblk);

perfctr_msr = MSR_P6_PERFCTR0;
evntsel_msr = MSR_P6_EVNTSEL0;
perfctr_msr = wd_ops->perfctr;
evntsel_msr = wd_ops->evntsel;

/* KVM doesn't implement this MSR */
if (wrmsr_safe(perfctr_msr, 0, 0) < 0)
Expand Down Expand Up @@ -569,8 +569,8 @@ static int setup_intel_arch_watchdog(unsigned nmi_hz)
(ebx & ARCH_PERFMON_UNHALTED_CORE_CYCLES_PRESENT))
return 0;

perfctr_msr = MSR_ARCH_PERFMON_PERFCTR1;
evntsel_msr = MSR_ARCH_PERFMON_EVENTSEL1;
perfctr_msr = wd_ops->perfctr;
evntsel_msr = wd_ops->evntsel;

wrmsrl(perfctr_msr, 0UL);

Expand Down Expand Up @@ -605,6 +605,16 @@ static struct wd_ops intel_arch_wd_ops = {
.evntsel = MSR_ARCH_PERFMON_EVENTSEL1,
};

static struct wd_ops coreduo_wd_ops = {
.reserve = single_msr_reserve,
.unreserve = single_msr_unreserve,
.setup = setup_intel_arch_watchdog,
.rearm = p6_rearm,
.stop = single_msr_stop_watchdog,
.perfctr = MSR_ARCH_PERFMON_PERFCTR0,
.evntsel = MSR_ARCH_PERFMON_EVENTSEL0,
};

static void probe_nmi_watchdog(void)
{
switch (boot_cpu_data.x86_vendor) {
Expand All @@ -615,6 +625,12 @@ static void probe_nmi_watchdog(void)
wd_ops = &k7_wd_ops;
break;
case X86_VENDOR_INTEL:
/* Work around Core Duo (Yonah) errata AE49 where perfctr1
doesn't have a working enable bit. */
if (boot_cpu_data.x86 == 6 && boot_cpu_data.x86_model == 14) {
wd_ops = &coreduo_wd_ops;
break;
}
if (cpu_has(&boot_cpu_data, X86_FEATURE_ARCH_PERFMON)) {
wd_ops = &intel_arch_wd_ops;
break;
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/i386/kernel/nmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,12 @@ static int __init check_nmi_watchdog(void)
atomic_dec(&nmi_active);
}
}
endflag = 1;
if (!atomic_read(&nmi_active)) {
kfree(prev_nmi_count);
atomic_set(&nmi_active, -1);
return -1;
}
endflag = 1;
printk("OK.\n");

/* now that we know it works we can reduce NMI frequency to
Expand Down
1 change: 0 additions & 1 deletion trunk/arch/i386/kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,6 @@ static void clear_singlestep(struct task_struct *child)
void ptrace_disable(struct task_struct *child)
{
clear_singlestep(child);
clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
clear_tsk_thread_flag(child, TIF_SYSCALL_EMU);
}

Expand Down
1 change: 0 additions & 1 deletion trunk/arch/ia64/kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -1577,7 +1577,6 @@ sys_ptrace (long request, pid_t pid, unsigned long addr, unsigned long data)

case PTRACE_DETACH:
/* detach a process that was attached. */
clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
ret = ptrace_detach(child, data);
goto out_tsk;

Expand Down
1 change: 0 additions & 1 deletion trunk/arch/m68k/kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ static inline void singlestep_disable(struct task_struct *child)
void ptrace_disable(struct task_struct *child)
{
singlestep_disable(child);
clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
}

long arch_ptrace(struct task_struct *child, long request, long addr, long data)
Expand Down
20 changes: 15 additions & 5 deletions trunk/fs/nfsd/nfsfh.c
Original file line number Diff line number Diff line change
Expand Up @@ -566,13 +566,23 @@ enum fsid_source fsid_source(struct svc_fh *fhp)
case FSID_DEV:
case FSID_ENCODE_DEV:
case FSID_MAJOR_MINOR:
return FSIDSOURCE_DEV;
if (fhp->fh_export->ex_dentry->d_inode->i_sb->s_type->fs_flags
& FS_REQUIRES_DEV)
return FSIDSOURCE_DEV;
break;
case FSID_NUM:
return FSIDSOURCE_FSID;
default:
if (fhp->fh_export->ex_flags & NFSEXP_FSID)
return FSIDSOURCE_FSID;
else
return FSIDSOURCE_UUID;
break;
default:
break;
}
/* either a UUID type filehandle, or the filehandle doesn't
* match the export.
*/
if (fhp->fh_export->ex_flags & NFSEXP_FSID)
return FSIDSOURCE_FSID;
if (fhp->fh_export->ex_uuid)
return FSIDSOURCE_UUID;
return FSIDSOURCE_DEV;
}
3 changes: 2 additions & 1 deletion trunk/fs/nfsd/vfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ nfsd_cross_mnt(struct svc_rqst *rqstp, struct dentry **dpp,

exp2 = rqst_exp_get_by_name(rqstp, mnt, mounts);
if (IS_ERR(exp2)) {
err = PTR_ERR(exp2);
if (PTR_ERR(exp2) != -ENOENT)
err = PTR_ERR(exp2);
dput(mounts);
mntput(mnt);
goto out;
Expand Down
42 changes: 21 additions & 21 deletions trunk/include/asm-um/elf-x86_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,27 +67,27 @@ typedef struct { } elf_fpregset_t;
} while (0)

#define ELF_CORE_COPY_REGS(pr_reg, regs) \
(pr_reg)[0] = (regs)->regs.gp[0]; \
(pr_reg)[1] = (regs)->regs.gp[1]; \
(pr_reg)[2] = (regs)->regs.gp[2]; \
(pr_reg)[3] = (regs)->regs.gp[3]; \
(pr_reg)[4] = (regs)->regs.gp[4]; \
(pr_reg)[5] = (regs)->regs.gp[5]; \
(pr_reg)[6] = (regs)->regs.gp[6]; \
(pr_reg)[7] = (regs)->regs.gp[7]; \
(pr_reg)[8] = (regs)->regs.gp[8]; \
(pr_reg)[9] = (regs)->regs.gp[9]; \
(pr_reg)[10] = (regs)->regs.gp[10]; \
(pr_reg)[11] = (regs)->regs.gp[11]; \
(pr_reg)[12] = (regs)->regs.gp[12]; \
(pr_reg)[13] = (regs)->regs.gp[13]; \
(pr_reg)[14] = (regs)->regs.gp[14]; \
(pr_reg)[15] = (regs)->regs.gp[15]; \
(pr_reg)[16] = (regs)->regs.gp[16]; \
(pr_reg)[17] = (regs)->regs.gp[17]; \
(pr_reg)[18] = (regs)->regs.gp[18]; \
(pr_reg)[19] = (regs)->regs.gp[19]; \
(pr_reg)[20] = (regs)->regs.gp[20]; \
(pr_reg)[0] = (regs)->regs.skas.regs[0]; \
(pr_reg)[1] = (regs)->regs.skas.regs[1]; \
(pr_reg)[2] = (regs)->regs.skas.regs[2]; \
(pr_reg)[3] = (regs)->regs.skas.regs[3]; \
(pr_reg)[4] = (regs)->regs.skas.regs[4]; \
(pr_reg)[5] = (regs)->regs.skas.regs[5]; \
(pr_reg)[6] = (regs)->regs.skas.regs[6]; \
(pr_reg)[7] = (regs)->regs.skas.regs[7]; \
(pr_reg)[8] = (regs)->regs.skas.regs[8]; \
(pr_reg)[9] = (regs)->regs.skas.regs[9]; \
(pr_reg)[10] = (regs)->regs.skas.regs[10]; \
(pr_reg)[11] = (regs)->regs.skas.regs[11]; \
(pr_reg)[12] = (regs)->regs.skas.regs[12]; \
(pr_reg)[13] = (regs)->regs.skas.regs[13]; \
(pr_reg)[14] = (regs)->regs.skas.regs[14]; \
(pr_reg)[15] = (regs)->regs.skas.regs[15]; \
(pr_reg)[16] = (regs)->regs.skas.regs[16]; \
(pr_reg)[17] = (regs)->regs.skas.regs[17]; \
(pr_reg)[18] = (regs)->regs.skas.regs[18]; \
(pr_reg)[19] = (regs)->regs.skas.regs[19]; \
(pr_reg)[20] = (regs)->regs.skas.regs[20]; \
(pr_reg)[21] = current->thread.arch.fs; \
(pr_reg)[22] = 0; \
(pr_reg)[23] = 0; \
Expand Down
1 change: 1 addition & 0 deletions trunk/kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ int ptrace_detach(struct task_struct *child, unsigned int data)

/* Architecture-specific hardware disable .. */
ptrace_disable(child);
clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);

write_lock_irq(&tasklist_lock);
/* protect against de_thread()->release_task() */
Expand Down

0 comments on commit 712bb1f

Please sign in to comment.