Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 9459
b: refs/heads/master
c: 411b67b
h: refs/heads/master
i:
  9457: a58ef5f
  9455: 6f06751
v: v3
  • Loading branch information
Kostik Belousov authored and Chris Wright committed Sep 29, 2005
1 parent e4bcd88 commit 27eacaf
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 59 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: a44fe13eab664ac488ced0845d9885b019bd24c5
refs/heads/master: 411b67b4b6a4dd1e0292a6a58dd753978179d173
16 changes: 0 additions & 16 deletions trunk/arch/i386/kernel/cpu/amd.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,6 @@ static void __init init_amd(struct cpuinfo_x86 *c)
int mbytes = num_physpages >> (20-PAGE_SHIFT);
int r;

#ifdef CONFIG_SMP
unsigned long value;

/* Disable TLB flush filter by setting HWCR.FFDIS on K8
* bit 6 of msr C001_0015
*
* Errata 63 for SH-B3 steppings
* Errata 122 for all steppings (F+ have it disabled by default)
*/
if (c->x86 == 15) {
rdmsrl(MSR_K7_HWCR, value);
value |= 1 << 6;
wrmsrl(MSR_K7_HWCR, value);
}
#endif

/*
* FIXME: We should handle the K5 here. Set up the write
* range and also turn on MSR 83 bits 4 and 31 (write alloc,
Expand Down
10 changes: 3 additions & 7 deletions trunk/arch/x86_64/kernel/mce.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,9 @@ void mce_log(struct mce *mce)
{
unsigned next, entry;
mce->finished = 0;
wmb();
smp_wmb();
for (;;) {
entry = rcu_dereference(mcelog.next);
/* The rmb forces the compiler to reload next in each
iteration */
rmb();
for (;;) {
/* When the buffer fills up discard new entries. Assume
that the earlier errors are the more interesting. */
Expand All @@ -72,17 +69,16 @@ void mce_log(struct mce *mce)
entry++;
continue;
}
break;
}
smp_rmb();
next = entry + 1;
if (cmpxchg(&mcelog.next, entry, next) == entry)
break;
}
memcpy(mcelog.entry + entry, mce, sizeof(struct mce));
wmb();
smp_wmb();
mcelog.entry[entry].finished = 1;
wmb();
smp_wmb();

if (!test_and_set_bit(0, &console_logged))
notify_user = 1;
Expand Down
22 changes: 10 additions & 12 deletions trunk/arch/x86_64/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -831,6 +831,8 @@ static void __init amd_detect_cmp(struct cpuinfo_x86 *c)
#endif
}

#define HWCR 0xc0010015

static int __init init_amd(struct cpuinfo_x86 *c)
{
int r;
Expand All @@ -839,18 +841,14 @@ static int __init init_amd(struct cpuinfo_x86 *c)
#ifdef CONFIG_SMP
unsigned long value;

/*
* Disable TLB flush filter by setting HWCR.FFDIS on K8
* bit 6 of msr C001_0015
*
* Errata 63 for SH-B3 steppings
* Errata 122 for all steppings (F+ have it disabled by default)
*/
if (c->x86 == 15) {
rdmsrl(MSR_K8_HWCR, value);
value |= 1 << 6;
wrmsrl(MSR_K8_HWCR, value);
}
// Disable TLB flush filter by setting HWCR.FFDIS:
// bit 6 of msr C001_0015
//
// Errata 63 for SH-B3 steppings
// Errata 122 for all(?) steppings
rdmsrl(HWCR, value);
value |= 1 << 6;
wrmsrl(HWCR, value);
#endif

/* Bit 31 in normal CPUID used for nonstandard 3DNow ID;
Expand Down
4 changes: 1 addition & 3 deletions trunk/drivers/macintosh/smu.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,8 @@ static irqreturn_t smu_db_intr(int irq, void *arg, struct pt_regs *regs)
spin_lock_irqsave(&smu->lock, flags);

gpio = pmac_do_feature_call(PMAC_FTR_READ_GPIO, NULL, smu->doorbell);
if ((gpio & 7) != 7) {
spin_unlock_irqrestore(&smu->lock, flags);
if ((gpio & 7) != 7)
return IRQ_HANDLED;
}

cmd = smu->cmd_cur;
smu->cmd_cur = NULL;
Expand Down
3 changes: 3 additions & 0 deletions trunk/fs/read_write.c
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,9 @@ static ssize_t do_readv_writev(int type, struct file *file,
}

ret = rw_verify_area(type, file, pos, tot_len);
if (ret)
goto out;
ret = security_file_permission(file, type == READ ? MAY_READ : MAY_WRITE);
if (ret)
goto out;

Expand Down
1 change: 0 additions & 1 deletion trunk/include/asm-x86_64/msr.h
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,6 @@ static inline unsigned int cpuid_edx(unsigned int op)
#define MSR_K8_TOP_MEM1 0xC001001A
#define MSR_K8_TOP_MEM2 0xC001001D
#define MSR_K8_SYSCFG 0xC0010010
#define MSR_K8_HWCR 0xC0010015

/* K6 MSRs */
#define MSR_K6_EFER 0xC0000080
Expand Down
22 changes: 5 additions & 17 deletions trunk/include/linux/sched.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,26 +107,14 @@ extern unsigned long nr_iowait(void);

#include <asm/processor.h>

/*
* Task state bitmask. NOTE! These bits are also
* encoded in fs/proc/array.c: get_task_state().
*
* We have two separate sets of flags: task->state
* is about runnability, while task->exit_state are
* about the task exiting. Confusing, but this way
* modifying one set can't modify the other one by
* mistake.
*/
#define TASK_RUNNING 0
#define TASK_INTERRUPTIBLE 1
#define TASK_UNINTERRUPTIBLE 2
#define TASK_STOPPED 4
#define TASK_TRACED 8
/* in tsk->exit_state */
#define EXIT_ZOMBIE 16
#define EXIT_DEAD 32
/* in tsk->state again */
#define TASK_NONINTERACTIVE 64
#define TASK_NONINTERACTIVE 4
#define TASK_STOPPED 8
#define TASK_TRACED 16
#define EXIT_ZOMBIE 32
#define EXIT_DEAD 64

#define __set_task_state(tsk, state_value) \
do { (tsk)->state = (state_value); } while (0)
Expand Down
3 changes: 1 addition & 2 deletions trunk/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -1763,8 +1763,7 @@ do_signal_stop(int signr)
* stop is always done with the siglock held,
* so this check has no races.
*/
if (!t->exit_state &&
!(t->state & (TASK_STOPPED|TASK_TRACED))) {
if (t->state < TASK_STOPPED) {
stop_count++;
signal_wake_up(t, 0);
}
Expand Down

0 comments on commit 27eacaf

Please sign in to comment.