aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/crypto/nx/nx.c
diff options
context:
space:
mode:
authorMichael Ellerman <michael@ellerman.id.au>2012-07-25 17:19:48 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2012-09-05 01:18:42 -0400
commit7187dafc1e7fde551001ba91ea94cf6faa73256a (patch)
tree133544bcfd6820d3f15ed14faa2457b43e35ff57 /drivers/crypto/nx/nx.c
parentc6e565f2bef551326b65d801206d688708f1eeb5 (diff)
powerpc/crypto: Remove users of virt_to_abs() and phys_to_abs() in nx crypto driver
phys_to_abs() is a nop, don't use it. virt_to_abs() is just a wrapper around __pa(), call __pa() directly. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'drivers/crypto/nx/nx.c')
-rw-r--r--drivers/crypto/nx/nx.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/crypto/nx/nx.c b/drivers/crypto/nx/nx.c
index d7f179cc2e98..638110efae9b 100644
--- a/drivers/crypto/nx/nx.c
+++ b/drivers/crypto/nx/nx.c
@@ -34,7 +34,6 @@
34#include <linux/device.h> 34#include <linux/device.h>
35#include <linux/of.h> 35#include <linux/of.h>
36#include <asm/pSeries_reconfig.h> 36#include <asm/pSeries_reconfig.h>
37#include <asm/abs_addr.h>
38#include <asm/hvcall.h> 37#include <asm/hvcall.h>
39#include <asm/vio.h> 38#include <asm/vio.h>
40 39
@@ -104,10 +103,10 @@ struct nx_sg *nx_build_sg_list(struct nx_sg *sg_head,
104 /* determine the start and end for this address range - slightly 103 /* determine the start and end for this address range - slightly
105 * different if this is in VMALLOC_REGION */ 104 * different if this is in VMALLOC_REGION */
106 if (is_vmalloc_addr(start_addr)) 105 if (is_vmalloc_addr(start_addr))
107 sg_addr = phys_to_abs(page_to_phys(vmalloc_to_page(start_addr))) 106 sg_addr = page_to_phys(vmalloc_to_page(start_addr))
108 + offset_in_page(sg_addr); 107 + offset_in_page(sg_addr);
109 else 108 else
110 sg_addr = virt_to_abs(sg_addr); 109 sg_addr = __pa(sg_addr);
111 110
112 end_addr = sg_addr + len; 111 end_addr = sg_addr + len;
113 112
@@ -265,17 +264,17 @@ void nx_ctx_init(struct nx_crypto_ctx *nx_ctx, unsigned int function)
265 nx_ctx->csbcpb->csb.valid |= NX_CSB_VALID_BIT; 264 nx_ctx->csbcpb->csb.valid |= NX_CSB_VALID_BIT;
266 265
267 nx_ctx->op.flags = function; 266 nx_ctx->op.flags = function;
268 nx_ctx->op.csbcpb = virt_to_abs(nx_ctx->csbcpb); 267 nx_ctx->op.csbcpb = __pa(nx_ctx->csbcpb);
269 nx_ctx->op.in = virt_to_abs(nx_ctx->in_sg); 268 nx_ctx->op.in = __pa(nx_ctx->in_sg);
270 nx_ctx->op.out = virt_to_abs(nx_ctx->out_sg); 269 nx_ctx->op.out = __pa(nx_ctx->out_sg);
271 270
272 if (nx_ctx->csbcpb_aead) { 271 if (nx_ctx->csbcpb_aead) {
273 nx_ctx->csbcpb_aead->csb.valid |= NX_CSB_VALID_BIT; 272 nx_ctx->csbcpb_aead->csb.valid |= NX_CSB_VALID_BIT;
274 273
275 nx_ctx->op_aead.flags = function; 274 nx_ctx->op_aead.flags = function;
276 nx_ctx->op_aead.csbcpb = virt_to_abs(nx_ctx->csbcpb_aead); 275 nx_ctx->op_aead.csbcpb = __pa(nx_ctx->csbcpb_aead);
277 nx_ctx->op_aead.in = virt_to_abs(nx_ctx->in_sg); 276 nx_ctx->op_aead.in = __pa(nx_ctx->in_sg);
278 nx_ctx->op_aead.out = virt_to_abs(nx_ctx->out_sg); 277 nx_ctx->op_aead.out = __pa(nx_ctx->out_sg);
279 } 278 }
280} 279}
281 280