dawr.c (762f99f4f3cb41a775b5157dd761217beba65873) | dawr.c (1fd02f6605b855b4af2883f29a2abc88bdf17857) |
---|---|
1// SPDX-License-Identifier: GPL-2.0+ 2/* 3 * DAWR infrastructure 4 * 5 * Copyright 2019, Michael Neuling, IBM Corporation. 6 */ 7 8#include <linux/types.h> --- 13 unchanged lines hidden (view full) --- 22 dawr = brk->address; 23 24 dawrx = (brk->type & (HW_BRK_TYPE_READ | HW_BRK_TYPE_WRITE)) 25 << (63 - 58); 26 dawrx |= ((brk->type & (HW_BRK_TYPE_TRANSLATE)) >> 2) << (63 - 59); 27 dawrx |= (brk->type & (HW_BRK_TYPE_PRIV_ALL)) >> 3; 28 /* 29 * DAWR length is stored in field MDR bits 48:53. Matches range in | 1// SPDX-License-Identifier: GPL-2.0+ 2/* 3 * DAWR infrastructure 4 * 5 * Copyright 2019, Michael Neuling, IBM Corporation. 6 */ 7 8#include <linux/types.h> --- 13 unchanged lines hidden (view full) --- 22 dawr = brk->address; 23 24 dawrx = (brk->type & (HW_BRK_TYPE_READ | HW_BRK_TYPE_WRITE)) 25 << (63 - 58); 26 dawrx |= ((brk->type & (HW_BRK_TYPE_TRANSLATE)) >> 2) << (63 - 59); 27 dawrx |= (brk->type & (HW_BRK_TYPE_PRIV_ALL)) >> 3; 28 /* 29 * DAWR length is stored in field MDR bits 48:53. Matches range in |
30 * doublewords (64 bits) baised by -1 eg. 0b000000=1DW and | 30 * doublewords (64 bits) biased by -1 eg. 0b000000=1DW and |
31 * 0b111111=64DW. 32 * brk->hw_len is in bytes. 33 * This aligns up to double word size, shifts and does the bias. 34 */ 35 mrd = ((brk->hw_len + 7) >> 3) - 1; 36 dawrx |= (mrd & 0x3f) << (63 - 53); 37 38 if (ppc_md.set_dawr) --- 71 unchanged lines hidden --- | 31 * 0b111111=64DW. 32 * brk->hw_len is in bytes. 33 * This aligns up to double word size, shifts and does the bias. 34 */ 35 mrd = ((brk->hw_len + 7) >> 3) - 1; 36 dawrx |= (mrd & 0x3f) << (63 - 53); 37 38 if (ppc_md.set_dawr) --- 71 unchanged lines hidden --- |