aboutsummaryrefslogtreecommitdiff
path: root/lib/string_helpers.c
diff options
context:
space:
mode:
authorThomas Gleixner <[email protected]>2015-01-07 15:31:28 +0800
committerThomas Gleixner <[email protected]>2015-01-15 11:24:22 +0100
commita1dafe857db56c35878c71560089a4694ac841fd (patch)
treeff793dd8cfbe73b697ee5e5a1284a6130e02fd9b /lib/string_helpers.c
parenteaa27f34e91a14cdceed26ed6c6793ec1d186115 (diff)
iommu, x86: Restructure setup of the irq remapping feature
enable_IR_x2apic() calls setup_irq_remapping_ops() which by default installs the intel dmar remapping ops and then calls the amd iommu irq remapping prepare callback to figure out whether we are running on an AMD machine with irq remapping hardware. Right after that it calls irq_remapping_prepare() which pointlessly checks: if (!remap_ops || !remap_ops->prepare) return -ENODEV; and then calls remap_ops->prepare() which is silly in the AMD case as it got called from setup_irq_remapping_ops() already a few microseconds ago. Simplify this and just collapse everything into irq_remapping_prepare(). The irq_remapping_prepare() remains still silly as it assigns blindly the intel ops, but that's not scope of this patch. The scope here is to move the preperatory work, i.e. memory allocations out of the atomic section which is required to enable irq remapping. Signed-off-by: Thomas Gleixner <[email protected]> Tested-by: Borislav Petkov <[email protected]> Acked-and-tested-by: Joerg Roedel <[email protected]> Cc: Tony Luck <[email protected]> Cc: [email protected] Cc: Joerg Roedel <[email protected]> Cc: H. Peter Anvin <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: Yinghai Lu <[email protected]> Cc: David Rientjes <[email protected]> Cc: HATAYAMA Daisuke <[email protected]> Cc: Jan Beulich <[email protected]> Cc: Richard Weinberger <[email protected]> Cc: Oren Twaig <[email protected]> Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Jiang Liu <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]>
Diffstat (limited to 'lib/string_helpers.c')
0 files changed, 0 insertions, 0 deletions