aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-07-28 08:59:19 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-07-28 08:59:19 -0400
commit55f9c40ff632d03c527d6a6ceddcda0a224587a6 (patch)
tree215b843439f1d6b7620789ac6e919742db99b7a6
parentd5eab9152a3b4ce962c02ad0a0e4d0ec94aadd92 (diff)
parenteb7caf35951b1a56aabee028c1b20727abccc34f (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc: n2_crypto: Attach on Niagara-T3. n2rng: Attach on Niagara-T3. sparc: Detect and handle UltraSPARC-T3 cpu types. sparc: Don't do expensive hypervisor PCR write unless necessary. sparc: Add T3 sun4v cpu type and hypervisor group defines. sparc: Don't leave sparc_pmu_type NULL on sun4v.
-rw-r--r--arch/sparc/include/asm/elf_64.h6
-rw-r--r--arch/sparc/include/asm/hypervisor.h1
-rw-r--r--arch/sparc/include/asm/spitfire.h1
-rw-r--r--arch/sparc/include/asm/xor_64.h3
-rw-r--r--arch/sparc/kernel/cpu.c7
-rw-r--r--arch/sparc/kernel/cpumap.c1
-rw-r--r--arch/sparc/kernel/head_64.S31
-rw-r--r--arch/sparc/kernel/hvapi.c1
-rw-r--r--arch/sparc/kernel/pcr.c11
-rw-r--r--arch/sparc/kernel/perf_event.c3
-rw-r--r--drivers/char/hw_random/n2-drv.c29
-rw-r--r--drivers/char/hw_random/n2rng.h2
-rw-r--r--drivers/crypto/n2_core.c33
13 files changed, 95 insertions, 34 deletions
diff --git a/arch/sparc/include/asm/elf_64.h b/arch/sparc/include/asm/elf_64.h
index cfa9cd2e5519..64f7a00b3747 100644
--- a/arch/sparc/include/asm/elf_64.h
+++ b/arch/sparc/include/asm/elf_64.h
@@ -177,9 +177,11 @@ static inline unsigned int sparc64_elf_hwcap(void)
177 cap |= HWCAP_SPARC_ULTRA3; 177 cap |= HWCAP_SPARC_ULTRA3;
178 else if (tlb_type == hypervisor) { 178 else if (tlb_type == hypervisor) {
179 if (sun4v_chip_type == SUN4V_CHIP_NIAGARA1 || 179 if (sun4v_chip_type == SUN4V_CHIP_NIAGARA1 ||
180 sun4v_chip_type == SUN4V_CHIP_NIAGARA2) 180 sun4v_chip_type == SUN4V_CHIP_NIAGARA2 ||
181 sun4v_chip_type == SUN4V_CHIP_NIAGARA3)
181 cap |= HWCAP_SPARC_BLKINIT; 182 cap |= HWCAP_SPARC_BLKINIT;
182 if (sun4v_chip_type == SUN4V_CHIP_NIAGARA2) 183 if (sun4v_chip_type == SUN4V_CHIP_NIAGARA2 ||
184 sun4v_chip_type == SUN4V_CHIP_NIAGARA3)
183 cap |= HWCAP_SPARC_N2; 185 cap |= HWCAP_SPARC_N2;
184 } 186 }
185 187
diff --git a/arch/sparc/include/asm/hypervisor.h b/arch/sparc/include/asm/hypervisor.h
index 75686409be24..7a5f80df15d0 100644
--- a/arch/sparc/include/asm/hypervisor.h
+++ b/arch/sparc/include/asm/hypervisor.h
@@ -2950,6 +2950,7 @@ extern unsigned long sun4v_ncs_request(unsigned long request,
2950#define HV_GRP_N2_CPU 0x0202 2950#define HV_GRP_N2_CPU 0x0202
2951#define HV_GRP_NIU 0x0204 2951#define HV_GRP_NIU 0x0204
2952#define HV_GRP_VF_CPU 0x0205 2952#define HV_GRP_VF_CPU 0x0205
2953#define HV_GRP_KT_CPU 0x0209
2953#define HV_GRP_DIAG 0x0300 2954#define HV_GRP_DIAG 0x0300
2954 2955
2955#ifndef __ASSEMBLY__ 2956#ifndef __ASSEMBLY__
diff --git a/arch/sparc/include/asm/spitfire.h b/arch/sparc/include/asm/spitfire.h
index f0d0c40c44da..55a17c6efeb8 100644
--- a/arch/sparc/include/asm/spitfire.h
+++ b/arch/sparc/include/asm/spitfire.h
@@ -42,6 +42,7 @@
42#define SUN4V_CHIP_INVALID 0x00 42#define SUN4V_CHIP_INVALID 0x00
43#define SUN4V_CHIP_NIAGARA1 0x01 43#define SUN4V_CHIP_NIAGARA1 0x01
44#define SUN4V_CHIP_NIAGARA2 0x02 44#define SUN4V_CHIP_NIAGARA2 0x02
45#define SUN4V_CHIP_NIAGARA3 0x03
45#define SUN4V_CHIP_UNKNOWN 0xff 46#define SUN4V_CHIP_UNKNOWN 0xff
46 47
47#ifndef __ASSEMBLY__ 48#ifndef __ASSEMBLY__
diff --git a/arch/sparc/include/asm/xor_64.h b/arch/sparc/include/asm/xor_64.h
index bee4bf4be3af..9ed6ff679ab7 100644
--- a/arch/sparc/include/asm/xor_64.h
+++ b/arch/sparc/include/asm/xor_64.h
@@ -65,6 +65,7 @@ static struct xor_block_template xor_block_niagara = {
65#define XOR_SELECT_TEMPLATE(FASTEST) \ 65#define XOR_SELECT_TEMPLATE(FASTEST) \
66 ((tlb_type == hypervisor && \ 66 ((tlb_type == hypervisor && \
67 (sun4v_chip_type == SUN4V_CHIP_NIAGARA1 || \ 67 (sun4v_chip_type == SUN4V_CHIP_NIAGARA1 || \
68 sun4v_chip_type == SUN4V_CHIP_NIAGARA2)) ? \ 68 sun4v_chip_type == SUN4V_CHIP_NIAGARA2 || \
69 sun4v_chip_type == SUN4V_CHIP_NIAGARA3)) ? \
69 &xor_block_niagara : \ 70 &xor_block_niagara : \
70 &xor_block_VIS) 71 &xor_block_VIS)
diff --git a/arch/sparc/kernel/cpu.c b/arch/sparc/kernel/cpu.c
index 138dbbc8dc84..17cf290dc2bc 100644
--- a/arch/sparc/kernel/cpu.c
+++ b/arch/sparc/kernel/cpu.c
@@ -474,11 +474,18 @@ static void __init sun4v_cpu_probe(void)
474 sparc_pmu_type = "niagara2"; 474 sparc_pmu_type = "niagara2";
475 break; 475 break;
476 476
477 case SUN4V_CHIP_NIAGARA3:
478 sparc_cpu_type = "UltraSparc T3 (Niagara3)";
479 sparc_fpu_type = "UltraSparc T3 integrated FPU";
480 sparc_pmu_type = "niagara3";
481 break;
482
477 default: 483 default:
478 printk(KERN_WARNING "CPU: Unknown sun4v cpu type [%s]\n", 484 printk(KERN_WARNING "CPU: Unknown sun4v cpu type [%s]\n",
479 prom_cpu_compatible); 485 prom_cpu_compatible);
480 sparc_cpu_type = "Unknown SUN4V CPU"; 486 sparc_cpu_type = "Unknown SUN4V CPU";
481 sparc_fpu_type = "Unknown SUN4V FPU"; 487 sparc_fpu_type = "Unknown SUN4V FPU";
488 sparc_pmu_type = "Unknown SUN4V PMU";
482 break; 489 break;
483 } 490 }
484} 491}
diff --git a/arch/sparc/kernel/cpumap.c b/arch/sparc/kernel/cpumap.c
index d91fd782743a..4197e8d62d4c 100644
--- a/arch/sparc/kernel/cpumap.c
+++ b/arch/sparc/kernel/cpumap.c
@@ -324,6 +324,7 @@ static int iterate_cpu(struct cpuinfo_tree *t, unsigned int root_index)
324 switch (sun4v_chip_type) { 324 switch (sun4v_chip_type) {
325 case SUN4V_CHIP_NIAGARA1: 325 case SUN4V_CHIP_NIAGARA1:
326 case SUN4V_CHIP_NIAGARA2: 326 case SUN4V_CHIP_NIAGARA2:
327 case SUN4V_CHIP_NIAGARA3:
327 rover_inc_table = niagara_iterate_method; 328 rover_inc_table = niagara_iterate_method;
328 break; 329 break;
329 default: 330 default:
diff --git a/arch/sparc/kernel/head_64.S b/arch/sparc/kernel/head_64.S
index aa594c792d19..c752603a7c0d 100644
--- a/arch/sparc/kernel/head_64.S
+++ b/arch/sparc/kernel/head_64.S
@@ -132,6 +132,8 @@ prom_sun4v_name:
132 .asciz "sun4v" 132 .asciz "sun4v"
133prom_niagara_prefix: 133prom_niagara_prefix:
134 .asciz "SUNW,UltraSPARC-T" 134 .asciz "SUNW,UltraSPARC-T"
135prom_sparc_prefix:
136 .asciz "SPARC-T"
135 .align 4 137 .align 4
136prom_root_compatible: 138prom_root_compatible:
137 .skip 64 139 .skip 64
@@ -382,6 +384,22 @@ sun4v_chip_type:
38290: ldub [%g7], %g2 38490: ldub [%g7], %g2
383 ldub [%g1], %g4 385 ldub [%g1], %g4
384 cmp %g2, %g4 386 cmp %g2, %g4
387 bne,pn %icc, 89f
388 add %g7, 1, %g7
389 subcc %g3, 1, %g3
390 bne,pt %xcc, 90b
391 add %g1, 1, %g1
392 ba,pt %xcc, 91f
393 nop
394
39589: sethi %hi(prom_cpu_compatible), %g1
396 or %g1, %lo(prom_cpu_compatible), %g1
397 sethi %hi(prom_sparc_prefix), %g7
398 or %g7, %lo(prom_sparc_prefix), %g7
399 mov 7, %g3
40090: ldub [%g7], %g2
401 ldub [%g1], %g4
402 cmp %g2, %g4
385 bne,pn %icc, 4f 403 bne,pn %icc, 4f
386 add %g7, 1, %g7 404 add %g7, 1, %g7
387 subcc %g3, 1, %g3 405 subcc %g3, 1, %g3
@@ -390,6 +408,15 @@ sun4v_chip_type:
390 408
391 sethi %hi(prom_cpu_compatible), %g1 409 sethi %hi(prom_cpu_compatible), %g1
392 or %g1, %lo(prom_cpu_compatible), %g1 410 or %g1, %lo(prom_cpu_compatible), %g1
411 ldub [%g1 + 7], %g2
412 cmp %g2, '3'
413 be,pt %xcc, 5f
414 mov SUN4V_CHIP_NIAGARA3, %g4
415 ba,pt %xcc, 4f
416 nop
417
41891: sethi %hi(prom_cpu_compatible), %g1
419 or %g1, %lo(prom_cpu_compatible), %g1
393 ldub [%g1 + 17], %g2 420 ldub [%g1 + 17], %g2
394 cmp %g2, '1' 421 cmp %g2, '1'
395 be,pt %xcc, 5f 422 be,pt %xcc, 5f
@@ -397,6 +424,7 @@ sun4v_chip_type:
397 cmp %g2, '2' 424 cmp %g2, '2'
398 be,pt %xcc, 5f 425 be,pt %xcc, 5f
399 mov SUN4V_CHIP_NIAGARA2, %g4 426 mov SUN4V_CHIP_NIAGARA2, %g4
427
4004: 4284:
401 mov SUN4V_CHIP_UNKNOWN, %g4 429 mov SUN4V_CHIP_UNKNOWN, %g4
4025: sethi %hi(sun4v_chip_type), %g2 4305: sethi %hi(sun4v_chip_type), %g2
@@ -514,6 +542,9 @@ niagara_tlb_fixup:
514 cmp %g1, SUN4V_CHIP_NIAGARA2 542 cmp %g1, SUN4V_CHIP_NIAGARA2
515 be,pt %xcc, niagara2_patch 543 be,pt %xcc, niagara2_patch
516 nop 544 nop
545 cmp %g1, SUN4V_CHIP_NIAGARA3
546 be,pt %xcc, niagara2_patch
547 nop
517 548
518 call generic_patch_copyops 549 call generic_patch_copyops
519 nop 550 nop
diff --git a/arch/sparc/kernel/hvapi.c b/arch/sparc/kernel/hvapi.c
index 7c60afb835b0..d306e648c33c 100644
--- a/arch/sparc/kernel/hvapi.c
+++ b/arch/sparc/kernel/hvapi.c
@@ -38,6 +38,7 @@ static struct api_info api_table[] = {
38 { .group = HV_GRP_N2_CPU, }, 38 { .group = HV_GRP_N2_CPU, },
39 { .group = HV_GRP_NIU, }, 39 { .group = HV_GRP_NIU, },
40 { .group = HV_GRP_VF_CPU, }, 40 { .group = HV_GRP_VF_CPU, },
41 { .group = HV_GRP_KT_CPU, },
41 { .group = HV_GRP_DIAG, .flags = FLAG_PRE_API }, 42 { .group = HV_GRP_DIAG, .flags = FLAG_PRE_API },
42}; 43};
43 44
diff --git a/arch/sparc/kernel/pcr.c b/arch/sparc/kernel/pcr.c
index 8ac23e660080..343b0f9e2e7b 100644
--- a/arch/sparc/kernel/pcr.c
+++ b/arch/sparc/kernel/pcr.c
@@ -80,8 +80,11 @@ static void n2_pcr_write(u64 val)
80{ 80{
81 unsigned long ret; 81 unsigned long ret;
82 82
83 ret = sun4v_niagara2_setperf(HV_N2_PERF_SPARC_CTL, val); 83 if (val & PCR_N2_HTRACE) {
84 if (ret != HV_EOK) 84 ret = sun4v_niagara2_setperf(HV_N2_PERF_SPARC_CTL, val);
85 if (ret != HV_EOK)
86 write_pcr(val);
87 } else
85 write_pcr(val); 88 write_pcr(val);
86} 89}
87 90
@@ -106,6 +109,10 @@ static int __init register_perf_hsvc(void)
106 perf_hsvc_group = HV_GRP_N2_CPU; 109 perf_hsvc_group = HV_GRP_N2_CPU;
107 break; 110 break;
108 111
112 case SUN4V_CHIP_NIAGARA3:
113 perf_hsvc_group = HV_GRP_KT_CPU;
114 break;
115
109 default: 116 default:
110 return -ENODEV; 117 return -ENODEV;
111 } 118 }
diff --git a/arch/sparc/kernel/perf_event.c b/arch/sparc/kernel/perf_event.c
index 171e8d84dc3f..614da624330c 100644
--- a/arch/sparc/kernel/perf_event.c
+++ b/arch/sparc/kernel/perf_event.c
@@ -1343,7 +1343,8 @@ static bool __init supported_pmu(void)
1343 sparc_pmu = &niagara1_pmu; 1343 sparc_pmu = &niagara1_pmu;
1344 return true; 1344 return true;
1345 } 1345 }
1346 if (!strcmp(sparc_pmu_type, "niagara2")) { 1346 if (!strcmp(sparc_pmu_type, "niagara2") ||
1347 !strcmp(sparc_pmu_type, "niagara3")) {
1347 sparc_pmu = &niagara2_pmu; 1348 sparc_pmu = &niagara2_pmu;
1348 return true; 1349 return true;
1349 } 1350 }
diff --git a/drivers/char/hw_random/n2-drv.c b/drivers/char/hw_random/n2-drv.c
index ac6739e085e3..c3de70de00d4 100644
--- a/drivers/char/hw_random/n2-drv.c
+++ b/drivers/char/hw_random/n2-drv.c
@@ -1,6 +1,6 @@
1/* n2-drv.c: Niagara-2 RNG driver. 1/* n2-drv.c: Niagara-2 RNG driver.
2 * 2 *
3 * Copyright (C) 2008 David S. Miller <davem@davemloft.net> 3 * Copyright (C) 2008, 2011 David S. Miller <davem@davemloft.net>
4 */ 4 */
5 5
6#include <linux/kernel.h> 6#include <linux/kernel.h>
@@ -22,8 +22,8 @@
22 22
23#define DRV_MODULE_NAME "n2rng" 23#define DRV_MODULE_NAME "n2rng"
24#define PFX DRV_MODULE_NAME ": " 24#define PFX DRV_MODULE_NAME ": "
25#define DRV_MODULE_VERSION "0.1" 25#define DRV_MODULE_VERSION "0.2"
26#define DRV_MODULE_RELDATE "May 15, 2008" 26#define DRV_MODULE_RELDATE "July 27, 2011"
27 27
28static char version[] __devinitdata = 28static char version[] __devinitdata =
29 DRV_MODULE_NAME ".c:v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n"; 29 DRV_MODULE_NAME ".c:v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n";
@@ -623,14 +623,14 @@ static const struct of_device_id n2rng_match[];
623static int __devinit n2rng_probe(struct platform_device *op) 623static int __devinit n2rng_probe(struct platform_device *op)
624{ 624{
625 const struct of_device_id *match; 625 const struct of_device_id *match;
626 int victoria_falls; 626 int multi_capable;
627 int err = -ENOMEM; 627 int err = -ENOMEM;
628 struct n2rng *np; 628 struct n2rng *np;
629 629
630 match = of_match_device(n2rng_match, &op->dev); 630 match = of_match_device(n2rng_match, &op->dev);
631 if (!match) 631 if (!match)
632 return -EINVAL; 632 return -EINVAL;
633 victoria_falls = (match->data != NULL); 633 multi_capable = (match->data != NULL);
634 634
635 n2rng_driver_version(); 635 n2rng_driver_version();
636 np = kzalloc(sizeof(*np), GFP_KERNEL); 636 np = kzalloc(sizeof(*np), GFP_KERNEL);
@@ -640,8 +640,8 @@ static int __devinit n2rng_probe(struct platform_device *op)
640 640
641 INIT_DELAYED_WORK(&np->work, n2rng_work); 641 INIT_DELAYED_WORK(&np->work, n2rng_work);
642 642
643 if (victoria_falls) 643 if (multi_capable)
644 np->flags |= N2RNG_FLAG_VF; 644 np->flags |= N2RNG_FLAG_MULTI;
645 645
646 err = -ENODEV; 646 err = -ENODEV;
647 np->hvapi_major = 2; 647 np->hvapi_major = 2;
@@ -658,10 +658,10 @@ static int __devinit n2rng_probe(struct platform_device *op)
658 } 658 }
659 } 659 }
660 660
661 if (np->flags & N2RNG_FLAG_VF) { 661 if (np->flags & N2RNG_FLAG_MULTI) {
662 if (np->hvapi_major < 2) { 662 if (np->hvapi_major < 2) {
663 dev_err(&op->dev, "VF RNG requires HVAPI major " 663 dev_err(&op->dev, "multi-unit-capable RNG requires "
664 "version 2 or later, got %lu\n", 664 "HVAPI major version 2 or later, got %lu\n",
665 np->hvapi_major); 665 np->hvapi_major);
666 goto out_hvapi_unregister; 666 goto out_hvapi_unregister;
667 } 667 }
@@ -688,8 +688,8 @@ static int __devinit n2rng_probe(struct platform_device *op)
688 goto out_free_units; 688 goto out_free_units;
689 689
690 dev_info(&op->dev, "Found %s RNG, units: %d\n", 690 dev_info(&op->dev, "Found %s RNG, units: %d\n",
691 ((np->flags & N2RNG_FLAG_VF) ? 691 ((np->flags & N2RNG_FLAG_MULTI) ?
692 "Victoria Falls" : "Niagara2"), 692 "multi-unit-capable" : "single-unit"),
693 np->num_units); 693 np->num_units);
694 694
695 np->hwrng.name = "n2rng"; 695 np->hwrng.name = "n2rng";
@@ -751,6 +751,11 @@ static const struct of_device_id n2rng_match[] = {
751 .compatible = "SUNW,vf-rng", 751 .compatible = "SUNW,vf-rng",
752 .data = (void *) 1, 752 .data = (void *) 1,
753 }, 753 },
754 {
755 .name = "random-number-generator",
756 .compatible = "SUNW,kt-rng",
757 .data = (void *) 1,
758 },
754 {}, 759 {},
755}; 760};
756MODULE_DEVICE_TABLE(of, n2rng_match); 761MODULE_DEVICE_TABLE(of, n2rng_match);
diff --git a/drivers/char/hw_random/n2rng.h b/drivers/char/hw_random/n2rng.h
index 4bea07f30978..f244ac89087f 100644
--- a/drivers/char/hw_random/n2rng.h
+++ b/drivers/char/hw_random/n2rng.h
@@ -68,7 +68,7 @@ struct n2rng {
68 struct platform_device *op; 68 struct platform_device *op;
69 69
70 unsigned long flags; 70 unsigned long flags;
71#define N2RNG_FLAG_VF 0x00000001 /* Victoria Falls RNG, else N2 */ 71#define N2RNG_FLAG_MULTI 0x00000001 /* Multi-unit capable RNG */
72#define N2RNG_FLAG_CONTROL 0x00000002 /* Operating in control domain */ 72#define N2RNG_FLAG_CONTROL 0x00000002 /* Operating in control domain */
73#define N2RNG_FLAG_READY 0x00000008 /* Ready for hw-rng layer */ 73#define N2RNG_FLAG_READY 0x00000008 /* Ready for hw-rng layer */
74#define N2RNG_FLAG_SHUTDOWN 0x00000010 /* Driver unregistering */ 74#define N2RNG_FLAG_SHUTDOWN 0x00000010 /* Driver unregistering */
diff --git a/drivers/crypto/n2_core.c b/drivers/crypto/n2_core.c
index 2e5b2044c96f..d0183ddb3076 100644
--- a/drivers/crypto/n2_core.c
+++ b/drivers/crypto/n2_core.c
@@ -1,6 +1,6 @@
1/* n2_core.c: Niagara2 Stream Processing Unit (SPU) crypto support. 1/* n2_core.c: Niagara2 Stream Processing Unit (SPU) crypto support.
2 * 2 *
3 * Copyright (C) 2010 David S. Miller <davem@davemloft.net> 3 * Copyright (C) 2010, 2011 David S. Miller <davem@davemloft.net>
4 */ 4 */
5 5
6#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 6#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
@@ -31,8 +31,8 @@
31#include "n2_core.h" 31#include "n2_core.h"
32 32
33#define DRV_MODULE_NAME "n2_crypto" 33#define DRV_MODULE_NAME "n2_crypto"
34#define DRV_MODULE_VERSION "0.1" 34#define DRV_MODULE_VERSION "0.2"
35#define DRV_MODULE_RELDATE "April 29, 2010" 35#define DRV_MODULE_RELDATE "July 28, 2011"
36 36
37static char version[] __devinitdata = 37static char version[] __devinitdata =
38 DRV_MODULE_NAME ".c:v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n"; 38 DRV_MODULE_NAME ".c:v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n";
@@ -1823,22 +1823,17 @@ static int spu_mdesc_scan(struct mdesc_handle *mdesc, struct platform_device *de
1823static int __devinit get_irq_props(struct mdesc_handle *mdesc, u64 node, 1823static int __devinit get_irq_props(struct mdesc_handle *mdesc, u64 node,
1824 struct spu_mdesc_info *ip) 1824 struct spu_mdesc_info *ip)
1825{ 1825{
1826 const u64 *intr, *ino; 1826 const u64 *ino;
1827 int intr_len, ino_len; 1827 int ino_len;
1828 int i; 1828 int i;
1829 1829
1830 intr = mdesc_get_property(mdesc, node, "intr", &intr_len);
1831 if (!intr)
1832 return -ENODEV;
1833
1834 ino = mdesc_get_property(mdesc, node, "ino", &ino_len); 1830 ino = mdesc_get_property(mdesc, node, "ino", &ino_len);
1835 if (!ino) 1831 if (!ino) {
1832 printk("NO 'ino'\n");
1836 return -ENODEV; 1833 return -ENODEV;
1834 }
1837 1835
1838 if (intr_len != ino_len) 1836 ip->num_intrs = ino_len / sizeof(u64);
1839 return -EINVAL;
1840
1841 ip->num_intrs = intr_len / sizeof(u64);
1842 ip->ino_table = kzalloc((sizeof(struct ino_blob) * 1837 ip->ino_table = kzalloc((sizeof(struct ino_blob) *
1843 ip->num_intrs), 1838 ip->num_intrs),
1844 GFP_KERNEL); 1839 GFP_KERNEL);
@@ -1847,7 +1842,7 @@ static int __devinit get_irq_props(struct mdesc_handle *mdesc, u64 node,
1847 1842
1848 for (i = 0; i < ip->num_intrs; i++) { 1843 for (i = 0; i < ip->num_intrs; i++) {
1849 struct ino_blob *b = &ip->ino_table[i]; 1844 struct ino_blob *b = &ip->ino_table[i];
1850 b->intr = intr[i]; 1845 b->intr = i + 1;
1851 b->ino = ino[i]; 1846 b->ino = ino[i];
1852 } 1847 }
1853 1848
@@ -2204,6 +2199,10 @@ static struct of_device_id n2_crypto_match[] = {
2204 .name = "n2cp", 2199 .name = "n2cp",
2205 .compatible = "SUNW,vf-cwq", 2200 .compatible = "SUNW,vf-cwq",
2206 }, 2201 },
2202 {
2203 .name = "n2cp",
2204 .compatible = "SUNW,kt-cwq",
2205 },
2207 {}, 2206 {},
2208}; 2207};
2209 2208
@@ -2228,6 +2227,10 @@ static struct of_device_id n2_mau_match[] = {
2228 .name = "ncp", 2227 .name = "ncp",
2229 .compatible = "SUNW,vf-mau", 2228 .compatible = "SUNW,vf-mau",
2230 }, 2229 },
2230 {
2231 .name = "ncp",
2232 .compatible = "SUNW,kt-mau",
2233 },
2231 {}, 2234 {},
2232}; 2235};
2233 2236