Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 64772
b: refs/heads/master
c: 08ebd43
h: refs/heads/master
v: v3
  • Loading branch information
Laurent Riffard authored and Jeff Garzik committed Sep 11, 2007
1 parent c0e6b55 commit 5b7305f
Show file tree
Hide file tree
Showing 12 changed files with 52 additions and 68 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: 980abe215b861891c39aba0936817c46f372143b
refs/heads/master: 08ebd43d6b9b63de681b8f255c0fabae8033527c
6 changes: 4 additions & 2 deletions trunk/arch/i386/kernel/alternative.c
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,8 @@ void __kprobes text_poke(void *addr, unsigned char *opcode, int len)
{
memcpy(addr, opcode, len);
sync_core();
/* Could also do a CLFLUSH here to speed up CPU recovery; but
that causes hangs on some VIA CPUs. */
/* Not strictly needed, but can speed CPU recovery up. Ignore cross cacheline
case. */
if (cpu_has_clflush)
asm("clflush (%0) " :: "r" (addr) : "memory");
}
28 changes: 6 additions & 22 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 = wd_ops->perfctr;
evntsel_msr = wd_ops->evntsel;
perfctr_msr = MSR_K7_PERFCTR0;
evntsel_msr = MSR_K7_EVNTSEL0;

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 = wd_ops->perfctr;
evntsel_msr = wd_ops->evntsel;
perfctr_msr = MSR_P6_PERFCTR0;
evntsel_msr = MSR_P6_EVNTSEL0;

/* 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 = wd_ops->perfctr;
evntsel_msr = wd_ops->evntsel;
perfctr_msr = MSR_ARCH_PERFMON_PERFCTR1;
evntsel_msr = MSR_ARCH_PERFMON_EVENTSEL1;

wrmsrl(perfctr_msr, 0UL);

Expand Down Expand Up @@ -605,16 +605,6 @@ 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 @@ -625,12 +615,6 @@ 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: 1 addition & 0 deletions trunk/arch/i386/kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ 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: 1 addition & 0 deletions trunk/arch/ia64/kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -1577,6 +1577,7 @@ 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: 1 addition & 0 deletions trunk/arch/m68k/kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ 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
13 changes: 10 additions & 3 deletions trunk/drivers/ata/pata_via.c
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,6 @@ static void via_do_set_mode(struct ata_port *ap, struct ata_device *adev, int mo
int ut;
int offset = 3 - (2*ap->port_no) - adev->devno;


/* Calculate the timing values we require */
ata_timing_compute(adev, mode, &t, T, UT);

Expand Down Expand Up @@ -290,9 +289,17 @@ static void via_do_set_mode(struct ata_port *ap, struct ata_device *adev, int mo
ut = t.udma ? (0xe0 | (FIT(t.udma, 2, 9) - 2)) : 0x07;
break;
}

/* Set UDMA unless device is not UDMA capable */
if (udma_type)
pci_write_config_byte(pdev, 0x50 + offset, ut);
if (udma_type) {
u8 cable80_status;

/* Get 80-wire cable detection bit */
pci_read_config_byte(pdev, 0x50 + offset, &cable80_status);
cable80_status &= 0x10;

pci_write_config_byte(pdev, 0x50 + offset, ut | cable80_status);
}
}

static void via_set_piomode(struct ata_port *ap, struct ata_device *adev)
Expand Down
20 changes: 5 additions & 15 deletions trunk/fs/nfsd/nfsfh.c
Original file line number Diff line number Diff line change
Expand Up @@ -566,23 +566,13 @@ enum fsid_source fsid_source(struct svc_fh *fhp)
case FSID_DEV:
case FSID_ENCODE_DEV:
case FSID_MAJOR_MINOR:
if (fhp->fh_export->ex_dentry->d_inode->i_sb->s_type->fs_flags
& FS_REQUIRES_DEV)
return FSIDSOURCE_DEV;
break;
return FSIDSOURCE_DEV;
case FSID_NUM:
return FSIDSOURCE_FSID;
default:
if (fhp->fh_export->ex_flags & NFSEXP_FSID)
return FSIDSOURCE_FSID;
break;
default:
break;
else
return FSIDSOURCE_UUID;
}
/* 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: 1 addition & 2 deletions trunk/fs/nfsd/vfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,7 @@ nfsd_cross_mnt(struct svc_rqst *rqstp, struct dentry **dpp,

exp2 = rqst_exp_get_by_name(rqstp, mnt, mounts);
if (IS_ERR(exp2)) {
if (PTR_ERR(exp2) != -ENOENT)
err = PTR_ERR(exp2);
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.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)[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)[21] = current->thread.arch.fs; \
(pr_reg)[22] = 0; \
(pr_reg)[23] = 0; \
Expand Down
1 change: 0 additions & 1 deletion trunk/kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,6 @@ 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 5b7305f

Please sign in to comment.