linux_dsm_epyc7002/arch/x86/include/asm
Thomas Gleixner a1dafe857d 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 <tglx@linutronix.de>
Tested-by: Borislav Petkov <bp@alien8.de>
Acked-and-tested-by: Joerg Roedel <joro@8bytes.org>
Cc: Tony Luck <tony.luck@intel.com>
Cc: iommu@lists.linux-foundation.org
Cc: Joerg Roedel <jroedel@suse.de>
Cc: H. Peter Anvin <hpa@linux.intel.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: David Rientjes <rientjes@google.com>
Cc: HATAYAMA Daisuke <d.hatayama@jp.fujitsu.com>
Cc: Jan Beulich <JBeulich@suse.com>
Cc: Richard Weinberger <richard@nod.at>
Cc: Oren Twaig <oren@scalemp.com>
Cc: x86@kernel.org
Link: http://lkml.kernel.org/r/20141205084147.232633738@linutronix.de
Link: http://lkml.kernel.org/r/1420615903-28253-2-git-send-email-jiang.liu@linux.intel.com
Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2015-01-15 11:24:22 +01:00
..
crypto
numachip
trace
uv x86: UV BAU: Increase maximum CPUs per socket/hub 2014-11-03 13:49:24 +01:00
xen xen: introduce helper functions to do safe read and write accesses 2014-12-08 10:53:59 +00:00
a.out-core.h
acenv.h
acpi.h
agp.h
alternative-asm.h
alternative.h
amd_nb.h
apb_timer.h
apic_flat_64.h
apic.h Merge branch 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-08-13 18:23:32 -06:00
apicdef.h
apm.h
arch_hweight.h
archrandom.h
asm-offsets.h
asm.h
atomic64_32.h
atomic64_64.h locking,arch: Use ACCESS_ONCE() instead of cast to volatile in atomic_read() 2014-10-03 06:06:23 +02:00
atomic.h locking,arch: Use ACCESS_ONCE() instead of cast to volatile in atomic_read() 2014-10-03 06:06:23 +02:00
barrier.h arch: Add lightweight memory barriers dma_rmb() and dma_wmb() 2014-12-11 21:15:06 -05:00
bios_ebda.h
bitops.h Make ARCH_HAS_FAST_MULTIPLIER a real config variable 2014-09-13 11:14:53 -07:00
boot.h
bootparam_utils.h
bug.h
bugs.h
cache.h
cacheflush.h x86: mm: Move PAT only functions to mm/pat.c 2014-11-16 18:59:19 +01:00
calgary.h
calling.h x86_64, entry: Treat regs->ax the same in fastpath and slowpath syscalls 2014-09-08 14:14:08 -07:00
ce4100.h
checksum_32.h
checksum_64.h
checksum.h
clocksource.h
cmdline.h
cmpxchg_32.h
cmpxchg_64.h
cmpxchg.h
compat.h
context_tracking.h
cpu_device_id.h
cpu.h
cpufeature.h x86: Add support for Intel HWP feature detection. 2014-11-12 00:04:37 +01:00
cpumask.h
crash.h kexec: support for kexec on panic using new system call 2014-08-08 15:57:33 -07:00
current.h
debugreg.h x86: Replace __get_cpu_var uses 2014-08-26 13:45:49 -04:00
delay.h
desc_defs.h
desc.h
device.h
disabled-features.h x86, mpx: Add MPX to disabled features 2014-11-18 00:58:53 +01:00
div64.h
dma-mapping.h
dma.h x86/mm: Fix zone ranges boot printout 2014-12-11 11:35:02 +01:00
dmi.h
dwarf2.h
e820.h
edac.h
efi.h efi/x86: Move x86 back to libstub 2014-11-11 22:23:11 +00:00
elf.h x86: Reject x32 executables if x32 ABI not supported 2014-10-08 11:17:42 +02:00
emergency-restart.h
entry_arch.h
espfix.h
exec.h
fb.h x86: Use new cache mode type in include/asm/fb.h 2014-11-16 11:04:24 +01:00
fixmap.h Merge branch 'x86-vdso-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-12-10 14:24:20 -08:00
floppy.h
fpu-internal.h x86, fpu: Change __thread_fpu_begin() to use use_eager_fpu() 2014-09-02 14:51:15 -07:00
frame.h
ftrace.h ftrace/x86: Move MCOUNT_SAVE_FRAME out of header file 2014-12-01 14:07:16 -05:00
futex.h
gart.h
genapic.h
geode.h
gpio.h
hardirq.h
highmem.h x86: mm: Re-use the early_ioremap fixed area 2014-11-03 13:40:44 +01:00
hpet.h
hugetlb.h
hw_breakpoint.h
hw_irq.h x86, irq: Move IOAPIC related declarations from hw_irq.h into io_apic.h 2014-12-16 14:08:17 +01:00
hypertransport.h
hypervisor.h
i387.h
i8259.h
ia32_unistd.h
ia32.h
idle.h
inat_types.h
inat.h
init.h
insn.h x86: Remove arbitrary instruction size limit in instruction decoder 2014-11-18 00:58:52 +01:00
inst.h
intel_mid_vrtc.h
intel_scu_ipc.h
intel-mid.h
io_apic.h x86, irq: Move IRQ initialization routines from io_apic.c into vector.c 2014-12-16 14:08:17 +01:00
io.h Merge branch 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-12-10 13:59:34 -08:00
iomap.h
iommu_table.h
iommu.h
iosf_mbi.h
ipi.h
irq_regs.h
irq_remapping.h iommu, x86: Restructure setup of the irq remapping feature 2015-01-15 11:24:22 +01:00
irq_vectors.h x86: Avoid building unused IRQ entry stubs 2014-12-16 14:08:14 +01:00
irq_work.h x86: Tell irq work about self IPI support 2014-09-13 18:38:29 +02:00
irq.h
irqflags.h
ist.h
jump_label.h
kbdleds.h
Kbuild x86: use generic dma-contiguous.h 2014-09-22 13:35:52 +02:00
kdebug.h
kexec-bzimage64.h kexec-bzImage64: support for loading bzImage using 64bit entry 2014-08-08 15:57:33 -07:00
kexec.h kexec: support for kexec on panic using new system call 2014-08-08 15:57:33 -07:00
kgdb.h
kmap_types.h
kmemcheck.h
kprobes.h kprobes/x86: Remove stale ARCH_SUPPORTS_KPROBES_ON_FTRACE define 2014-10-17 07:18:34 +02:00
kvm_emulate.h
kvm_guest.h
kvm_host.h KVM: move APIC types to arch/x86/ 2014-12-18 09:39:51 +01:00
kvm_para.h x86: kvm: use alternatives for VMCALL vs. VMMCALL if kernel text is read-only 2014-09-24 14:07:57 +02:00
lguest_hcall.h
lguest.h
linkage.h
local64.h
local.h
mach_timer.h
mach_traps.h
math_emu.h
mc146818rtc.h
mce.h x86, mce, severity: Extend the the mce_severity mechanism to handle UCNA/DEFERRED error 2014-11-19 10:55:43 -08:00
microcode_amd.h x86, microcode: Reload microcode on resume 2014-12-06 13:03:03 +01:00
microcode_intel.h x86, microcode: Reload microcode on resume 2014-12-06 13:03:03 +01:00
microcode.h x86, microcode: Reload microcode on resume 2014-12-06 13:03:03 +01:00
misc.h
mmconfig.h
mmu_context.h Merge branch 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-12-10 12:09:26 -08:00
mmu.h
mmx.h
mmzone_32.h
mmzone_64.h
mmzone.h
module.h
mpspec_def.h
mpspec.h
mpx.h x86, mpx: Cleanup unused bound tables 2014-11-18 00:58:54 +01:00
mshyperv.h
msidef.h
msr.h
mtrr.h
mutex_32.h
mutex_64.h
mutex.h
mwait.h
nmi.h
nops.h
numa_32.h
numa.h x86/mm/numa: Drop dead code and rename setup_node_data() to setup_alloc_data() 2014-09-16 08:55:10 +02:00
olpc_ofw.h
olpc.h
page_32_types.h x86_64, traps: Stop using IST for #SS 2014-11-23 13:56:19 -08:00
page_32.h
page_64_types.h x86_64, traps: Stop using IST for #SS 2014-11-23 13:56:19 -08:00
page_64.h x86_64,vsyscall: Make vsyscall emulation configurable 2014-11-03 21:44:57 +01:00
page_types.h
page.h arm64,ia64,ppc,s390,sh,tile,um,x86,mm: remove default gate area 2014-08-08 15:57:27 -07:00
paravirt_types.h
paravirt.h x86: Cleanly separate use of asm-generic/mm_hooks.h 2014-11-19 11:54:13 +01:00
parport.h
pat.h x86: Enable PAT to use cache mode translation tables 2014-11-16 11:04:26 +01:00
pci_64.h
pci_x86.h x86: irq: Fix placement of mp_should_keep_irq() 2014-12-16 14:08:14 +01:00
pci-direct.h
pci-functions.h
pci.h x86, irq: Move PCI MSI related code from io_apic.c into msi.c 2014-12-16 14:08:17 +01:00
percpu.h x86-64: Use RIP-relative addressing for most per-CPU accesses 2014-11-04 20:43:14 +01:00
perf_event_p4.h percpu: Resolve ambiguities in __get_cpu_var/cpumask_var_t 2014-08-28 08:58:57 -04:00
perf_event.h perf/x86/amd/ibs: Update IBS MSRs and feature definitions 2014-11-12 15:12:32 +01:00
pgalloc.h
pgtable_32_types.h x86: mm: Re-use the early_ioremap fixed area 2014-11-03 13:40:44 +01:00
pgtable_32.h x86: Remove set_pmd_pfn 2014-09-01 10:15:31 +02:00
pgtable_64_types.h x86, ptdump: Add section for EFI runtime services 2014-11-11 22:28:57 +00:00
pgtable_64.h Merge branch 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-10-14 02:22:41 +02:00
pgtable_types.h xen: additional features for 3.19-rc0 2014-12-16 13:23:03 -08:00
pgtable-2level_types.h
pgtable-2level.h
pgtable-3level_types.h
pgtable-3level.h
pgtable.h Merge branch 'akpm' (patchbomb from Andrew) 2014-12-10 18:34:42 -08:00
platform_sst_audio.h ASoC: Intel: mrfld: Define sst_res_info for acpi 2014-10-27 18:02:38 +00:00
pmc_atom.h
posix_types.h
preempt.h sched: Kill task_preempt_count() 2014-10-28 10:47:56 +01:00
probe_roms.h
processor-cyrix.h
processor-flags.h
processor.h Merge branch 'x86-vdso-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-12-10 14:24:20 -08:00
prom.h
proto.h
ptrace.h x86: Split syscall_trace_enter into two phases 2014-09-08 14:14:03 -07:00
pvclock-abi.h
pvclock.h
qrwlock.h
realmode.h
reboot_fixups.h
reboot.h
required-features.h
resume-trace.h
rio.h
rmwcc.h
rtc.h
rwsem.h
seccomp_32.h
seccomp_64.h
seccomp.h
sections.h
segment.h x86/asm: Unify segment selector defines 2014-12-11 11:45:03 +01:00
serial.h x86/tty/serial/8250: Clean up the asm/serial.h include file a bit 2014-09-06 10:20:55 +02:00
setup_arch.h
setup.h
shmparam.h
sigcontext.h
sigframe.h
sighandling.h
signal.h
simd.h
smap.h
smp.h x86/core, x86/xen/smp: Use 'die_complete' completion when taking CPU down 2014-11-10 11:16:40 +01:00
smpboot_hooks.h
sparsemem.h
special_insns.h
spinlock_types.h locking/rwlock, x86: Clean up asm/spinlock*.h to remove old rwlock code 2014-09-10 11:46:38 +02:00
spinlock.h kernel: Provide READ_ONCE and ASSIGN_ONCE 2014-12-20 16:48:59 -08:00
sta2x11.h
stackprotector.h
stacktrace.h
string_32.h
string_64.h
string.h
suspend_32.h
suspend_64.h
suspend.h
svm.h
swiotlb.h
switch_to.h sched/x86_64: Don't save flags on context switch 2014-10-28 11:11:30 +01:00
sync_bitops.h
sys_ia32.h
syscall.h
syscalls.h
sysfb.h
tce.h
thread_info.h uprobes, x86: Fix _TIF_UPROBE vs _TIF_NOTIFY_RESUME 2014-11-23 14:25:28 -08:00
time.h
timer.h
timex.h
tlb.h
tlbflush.h
topology.h
trace_clock.h
traps.h x86_64, traps: Stop using IST for #SS 2014-11-23 13:56:19 -08:00
tsc.h
uaccess_32.h
uaccess_64.h
uaccess.h
unaligned.h
unistd.h
uprobes.h
user32.h
user_32.h
user_64.h
user.h
vdso.h
vga.h
vgtod.h x86, vdso: Use asm volatile in __getcpu 2014-12-23 13:05:30 -08:00
virtext.h
vm86.h
vmx.h kvm: x86: handle XSAVES vmcs and vmexit 2014-12-05 13:57:33 +01:00
vsyscall.h x86_64,vsyscall: Make vsyscall emulation configurable 2014-11-03 21:44:57 +01:00
vvar.h x86,vdso: Use LSL unconditionally for vgetcpu 2014-11-03 13:41:53 +01:00
word-at-a-time.h
x2apic.h
x86_init.h Revert "PCI: Add x86_msi.msi_mask_irq() and msix_mask_irq()" 2014-11-11 15:14:30 -07:00
xcr.h
xor_32.h
xor_64.h
xor_avx.h
xor.h
xsave.h KVM: x86: Enable Intel AVX-512 for guest 2014-11-03 12:07:30 +01:00