diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2006-02-16 17:26:53 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-03-20 04:13:16 -0500 |
commit | 94f8762db9a80ed34252e9fe5fa38be87bb7826b (patch) | |
tree | 22279c62d2d4d583c64f1d2c6122f4eb98b429a6 /arch | |
parent | bc45e32e0fbf661d0c5c5b9c981bc0fe5da4901f (diff) |
[SPARC64]: Add sun4v_cpu_qconf() hypervisor call.
Call it from register_one_mondo().
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/sparc64/kernel/entry.S | 12 | ||||
-rw-r--r-- | arch/sparc64/kernel/irq.c | 26 |
2 files changed, 19 insertions, 19 deletions
diff --git a/arch/sparc64/kernel/entry.S b/arch/sparc64/kernel/entry.S index bf40b065bcc0..f5c8a293979f 100644 --- a/arch/sparc64/kernel/entry.S +++ b/arch/sparc64/kernel/entry.S | |||
@@ -1772,3 +1772,15 @@ sun4v_intr_settarget: | |||
1772 | retl | 1772 | retl |
1773 | nop | 1773 | nop |
1774 | 1774 | ||
1775 | /* %o0: type | ||
1776 | * %o1: queue paddr | ||
1777 | * %o2: num queue entries | ||
1778 | * | ||
1779 | * returns %o0: status | ||
1780 | */ | ||
1781 | .globl sun4v_cpu_qconf | ||
1782 | sun4v_cpu_qconf: | ||
1783 | mov HV_FAST_CPU_QCONF, %o5 | ||
1784 | ta HV_FAST_TRAP | ||
1785 | retl | ||
1786 | nop | ||
diff --git a/arch/sparc64/kernel/irq.c b/arch/sparc64/kernel/irq.c index 4d9931d124ab..e1729e5189a3 100644 --- a/arch/sparc64/kernel/irq.c +++ b/arch/sparc64/kernel/irq.c | |||
@@ -939,25 +939,13 @@ void init_irqwork_curcpu(void) | |||
939 | 939 | ||
940 | static void __cpuinit register_one_mondo(unsigned long paddr, unsigned long type) | 940 | static void __cpuinit register_one_mondo(unsigned long paddr, unsigned long type) |
941 | { | 941 | { |
942 | register unsigned long func __asm__("%o5"); | 942 | unsigned long num_entries = 128; |
943 | register unsigned long arg0 __asm__("%o0"); | 943 | unsigned long status; |
944 | register unsigned long arg1 __asm__("%o1"); | 944 | |
945 | register unsigned long arg2 __asm__("%o2"); | 945 | status = sun4v_cpu_qconf(type, paddr, num_entries); |
946 | 946 | if (status != HV_EOK) { | |
947 | func = HV_FAST_CPU_QCONF; | 947 | prom_printf("SUN4V: sun4v_cpu_qconf(%lu:%lx:%lu) failed, " |
948 | arg0 = type; | 948 | "err %lu\n", type, paddr, num_entries, status); |
949 | arg1 = paddr; | ||
950 | arg2 = 128; /* XXX Implied by Niagara queue offsets. XXX */ | ||
951 | __asm__ __volatile__("ta %8" | ||
952 | : "=&r" (func), "=&r" (arg0), | ||
953 | "=&r" (arg1), "=&r" (arg2) | ||
954 | : "0" (func), "1" (arg0), | ||
955 | "2" (arg1), "3" (arg2), | ||
956 | "i" (HV_FAST_TRAP)); | ||
957 | |||
958 | if (arg0 != HV_EOK) { | ||
959 | prom_printf("SUN4V: cpu_qconf(%lu) failed with error %lu\n", | ||
960 | type, func); | ||
961 | prom_halt(); | 949 | prom_halt(); |
962 | } | 950 | } |
963 | } | 951 | } |