diff options
Diffstat (limited to 'drivers/block/xor.c')
-rw-r--r-- | drivers/block/xor.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/block/xor.c b/drivers/block/xor.c index 18abb6621..362ec6f8f 100644 --- a/drivers/block/xor.c +++ b/drivers/block/xor.c @@ -1827,6 +1827,8 @@ static struct buffer_head b1, b2; void calibrate_xor_block(void) { + if (xor_block) + return; memset(&b1,0,sizeof(b1)); b2 = b1; @@ -1885,6 +1887,8 @@ void calibrate_xor_block(void) void calibrate_xor_block(void) { + if (xor_block) + return; printk(KERN_INFO "raid5: using high-speed VIS checksum routine\n"); xor_block = xor_block_VIS; } @@ -1892,3 +1896,12 @@ void calibrate_xor_block(void) #endif /* __sparc_v9__ */ MD_EXPORT_SYMBOL(xor_block); +MD_EXPORT_SYMBOL(calibrate_xor_block); + +#ifdef MODULE +int init_module(void) +{ + calibrate_xor_block(); + return 0; +} +#endif |