irqdomain.c (b7f8f259896f669f131713b0c74ba4d008daa71d) | irqdomain.c (753ed9c95c37d058e50e7d42bbe296ee0bf6670d) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2 3/* 4 * Irqdomain for Linux to run as the root partition on Microsoft Hypervisor. 5 * 6 * Authors: 7 * Sunil Muthuswamy <sunilmut@microsoft.com> 8 * Wei Liu <wei.liu@kernel.org> --- 49 unchanged lines hidden (view full) --- 58 var_size = nr_bank + 1; 59 60 status = hv_do_rep_hypercall(HVCALL_MAP_DEVICE_INTERRUPT, 0, var_size, 61 input, output); 62 *entry = output->interrupt_entry; 63 64 local_irq_restore(flags); 65 | 1// SPDX-License-Identifier: GPL-2.0 2 3/* 4 * Irqdomain for Linux to run as the root partition on Microsoft Hypervisor. 5 * 6 * Authors: 7 * Sunil Muthuswamy <sunilmut@microsoft.com> 8 * Wei Liu <wei.liu@kernel.org> --- 49 unchanged lines hidden (view full) --- 58 var_size = nr_bank + 1; 59 60 status = hv_do_rep_hypercall(HVCALL_MAP_DEVICE_INTERRUPT, 0, var_size, 61 input, output); 62 *entry = output->interrupt_entry; 63 64 local_irq_restore(flags); 65 |
66 if ((status & HV_HYPERCALL_RESULT_MASK) != HV_STATUS_SUCCESS) | 66 if (!hv_result_success(status)) |
67 pr_err("%s: hypercall failed, status %lld\n", __func__, status); 68 | 67 pr_err("%s: hypercall failed, status %lld\n", __func__, status); 68 |
69 return status & HV_HYPERCALL_RESULT_MASK; | 69 return hv_result(status); |
70} 71 72static int hv_unmap_interrupt(u64 id, struct hv_interrupt_entry *old_entry) 73{ 74 unsigned long flags; 75 struct hv_input_unmap_device_interrupt *input; 76 struct hv_interrupt_entry *intr_entry; 77 u64 status; --- 5 unchanged lines hidden (view full) --- 83 intr_entry = &input->interrupt_entry; 84 input->partition_id = hv_current_partition_id; 85 input->device_id = id; 86 *intr_entry = *old_entry; 87 88 status = hv_do_hypercall(HVCALL_UNMAP_DEVICE_INTERRUPT, input, NULL); 89 local_irq_restore(flags); 90 | 70} 71 72static int hv_unmap_interrupt(u64 id, struct hv_interrupt_entry *old_entry) 73{ 74 unsigned long flags; 75 struct hv_input_unmap_device_interrupt *input; 76 struct hv_interrupt_entry *intr_entry; 77 u64 status; --- 5 unchanged lines hidden (view full) --- 83 intr_entry = &input->interrupt_entry; 84 input->partition_id = hv_current_partition_id; 85 input->device_id = id; 86 *intr_entry = *old_entry; 87 88 status = hv_do_hypercall(HVCALL_UNMAP_DEVICE_INTERRUPT, input, NULL); 89 local_irq_restore(flags); 90 |
91 return status & HV_HYPERCALL_RESULT_MASK; | 91 return hv_result(status); |
92} 93 94#ifdef CONFIG_PCI_MSI 95struct rid_data { 96 struct pci_dev *bridge; 97 u32 rid; 98}; 99 --- 286 unchanged lines hidden --- | 92} 93 94#ifdef CONFIG_PCI_MSI 95struct rid_data { 96 struct pci_dev *bridge; 97 u32 rid; 98}; 99 --- 286 unchanged lines hidden --- |