Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 322492
b: refs/heads/master
c: 1b6ca2a
h: refs/heads/master
v: v3
  • Loading branch information
Anton Blanchard authored and Benjamin Herrenschmidt committed Sep 5, 2012
1 parent 14e25dc commit 59c2160
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 375f561a4131a0f501c8845a2a20f2ca1abc8f7a
refs/heads/master: 1b6ca2a6fe56e7697d57348646e07df08f43b1bb
8 changes: 8 additions & 0 deletions trunk/arch/powerpc/kernel/sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,12 @@ static ssize_t show_dscr_default(struct device *dev,
return sprintf(buf, "%lx\n", dscr_default);
}

static void update_dscr(void *dummy)
{
if (!current->thread.dscr_inherit)
mtspr(SPRN_DSCR, dscr_default);
}

static ssize_t __used store_dscr_default(struct device *dev,
struct device_attribute *attr, const char *buf,
size_t count)
Expand All @@ -206,6 +212,8 @@ static ssize_t __used store_dscr_default(struct device *dev,
return -EINVAL;
dscr_default = val;

on_each_cpu(update_dscr, NULL, 1);

return count;
}

Expand Down

0 comments on commit 59c2160

Please sign in to comment.