Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 330234
b: refs/heads/master
c: 7187daf
h: refs/heads/master
v: v3
  • Loading branch information
Michael Ellerman authored and Benjamin Herrenschmidt committed Sep 5, 2012
1 parent 8805488 commit c05907c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 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: c6e565f2bef551326b65d801206d688708f1eeb5
refs/heads/master: 7187dafc1e7fde551001ba91ea94cf6faa73256a
17 changes: 8 additions & 9 deletions trunk/drivers/crypto/nx/nx.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
#include <linux/device.h>
#include <linux/of.h>
#include <asm/pSeries_reconfig.h>
#include <asm/abs_addr.h>
#include <asm/hvcall.h>
#include <asm/vio.h>

Expand Down Expand Up @@ -104,10 +103,10 @@ struct nx_sg *nx_build_sg_list(struct nx_sg *sg_head,
/* determine the start and end for this address range - slightly
* different if this is in VMALLOC_REGION */
if (is_vmalloc_addr(start_addr))
sg_addr = phys_to_abs(page_to_phys(vmalloc_to_page(start_addr)))
sg_addr = page_to_phys(vmalloc_to_page(start_addr))
+ offset_in_page(sg_addr);
else
sg_addr = virt_to_abs(sg_addr);
sg_addr = __pa(sg_addr);

end_addr = sg_addr + len;

Expand Down Expand Up @@ -265,17 +264,17 @@ void nx_ctx_init(struct nx_crypto_ctx *nx_ctx, unsigned int function)
nx_ctx->csbcpb->csb.valid |= NX_CSB_VALID_BIT;

nx_ctx->op.flags = function;
nx_ctx->op.csbcpb = virt_to_abs(nx_ctx->csbcpb);
nx_ctx->op.in = virt_to_abs(nx_ctx->in_sg);
nx_ctx->op.out = virt_to_abs(nx_ctx->out_sg);
nx_ctx->op.csbcpb = __pa(nx_ctx->csbcpb);
nx_ctx->op.in = __pa(nx_ctx->in_sg);
nx_ctx->op.out = __pa(nx_ctx->out_sg);

if (nx_ctx->csbcpb_aead) {
nx_ctx->csbcpb_aead->csb.valid |= NX_CSB_VALID_BIT;

nx_ctx->op_aead.flags = function;
nx_ctx->op_aead.csbcpb = virt_to_abs(nx_ctx->csbcpb_aead);
nx_ctx->op_aead.in = virt_to_abs(nx_ctx->in_sg);
nx_ctx->op_aead.out = virt_to_abs(nx_ctx->out_sg);
nx_ctx->op_aead.csbcpb = __pa(nx_ctx->csbcpb_aead);
nx_ctx->op_aead.in = __pa(nx_ctx->in_sg);
nx_ctx->op_aead.out = __pa(nx_ctx->out_sg);
}
}

Expand Down

0 comments on commit c05907c

Please sign in to comment.