Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 356402
b: refs/heads/master
c: 05d694e
h: refs/heads/master
v: v3
  • Loading branch information
Michael Neuling authored and Benjamin Herrenschmidt committed Jan 29, 2013
1 parent ac50856 commit 00f20fd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 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: f53d168c025f27d64417a56bf129dbb39d2e1189
refs/heads/master: 05d694ea0daa2e442191a2128aaec78635823f08
10 changes: 9 additions & 1 deletion trunk/arch/powerpc/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ static inline int set_dabr(struct arch_hw_breakpoint *brk)

static inline int set_dawr(struct arch_hw_breakpoint *brk)
{
unsigned long dawr, dawrx;
unsigned long dawr, dawrx, mrd;

dawr = brk->address;

Expand All @@ -419,6 +419,14 @@ static inline int set_dawr(struct arch_hw_breakpoint *brk)
<< (63 - 59); //* translate */
dawrx |= (brk->type & (HW_BRK_TYPE_PRIV_ALL)) \
>> 3; //* PRIM bits */
/* dawr length is stored in field MDR bits 48:53. Matches range in
doublewords (64 bits) baised by -1 eg. 0b000000=1DW and
0b111111=64DW.
brk->len is in bytes.
This aligns up to double word size, shifts and does the bias.
*/
mrd = ((brk->len + 7) >> 3) - 1;
dawrx |= (mrd & 0x3f) << (63 - 53);

if (ppc_md.set_dawr)
return ppc_md.set_dawr(dawr, dawrx);
Expand Down

0 comments on commit 00f20fd

Please sign in to comment.