- 09 Aug, 2023 40 commits
-
-
Thomas Gleixner authored
There are already two variants of update mechanism for particular callbacks and virtualization just writes into the data structure. Provide an interface and use a shadow data structure to preserve callbacks so they can be reapplied when the APIC driver is replaced. The extra data structure is intentional as any new callback needs to be also updated in the core code. This also prepares for static calls. Signed-off-by:
Thomas Gleixner <tglx@linutronix.de> Signed-off-by:
Dave Hansen <dave.hansen@linux.intel.com> Acked-by:
Peter Zijlstra (Intel) <peterz@infradead.org> Tested-by:
Michael Kelley <mikelley@microsoft.com> Tested-by:
Sohil Mehta <sohil.mehta@intel.com> Tested-by: Juergen Gross <jgross@suse.com> # Xen PV (dom0 and unpriv. guest)
-
Juergen Gross authored
Instead of setting the Xen PV apic driver very early during boot, just use the standard apic driver probing by setting an appropriate x86_init.irqs.intr_mode_init callback. At the same time eliminate xen_apic_check() which has never been used. The #ifdef CONFIG_X86_LOCAL_APIC around the call of xen_init_apic() can be removed, too, as CONFIG_XEN depends on CONFIG_X86_LOCAL_APIC. Signed-off-by:
Juergen Gross <jgross@suse.com> Signed-off-by:
Thomas Gleixner <tglx@linutronix.de> Signed-off-by:
Dave Hansen <dave.hansen@linux.intel.com> Tested-by:
Michael Kelley <mikelley@microsoft.com> Tested-by:
Sohil Mehta <sohil.mehta@intel.com> Tested-by: Juergen Gross <jgross@suse.com> # Xen PV (dom0 and unpriv. guest) Link: https://lore.kernel.org/lkml/aa086365-fd02-210f-67c6-5c9175c0dfee@suse.com
-
Thomas Gleixner authored
In preparation for converting the hotpath APIC callbacks to static keys, provide common initialization infrastructure. Lift apic_install_drivers() from probe_64.c and convert all places which switch the apic instance by storing the pointer to use apic_install_driver() as a first step. Signed-off-by:
Thomas Gleixner <tglx@linutronix.de> Signed-off-by:
Dave Hansen <dave.hansen@linux.intel.com> Acked-by:
Peter Zijlstra (Intel) <peterz@infradead.org> Tested-by:
Michael Kelley <mikelley@microsoft.com> Tested-by:
Sohil Mehta <sohil.mehta@intel.com> Tested-by: Juergen Gross <jgross@suse.com> # Xen PV (dom0 and unpriv. guest)
-
Thomas Gleixner authored
Prepare for converting the hotpath APIC callbacks to static calls. Signed-off-by:
Thomas Gleixner <tglx@linutronix.de> Signed-off-by:
Dave Hansen <dave.hansen@linux.intel.com> Acked-by:
Peter Zijlstra (Intel) <peterz@infradead.org> Tested-by:
Michael Kelley <mikelley@microsoft.com> Tested-by:
Sohil Mehta <sohil.mehta@intel.com> Tested-by: Juergen Gross <jgross@suse.com> # Xen PV (dom0 and unpriv. guest)
-
Dave Hansen authored
Yet another wrapper of a wrapper gone along with the outdated comment that this compiles to a single instruction. Signed-off-by:
Thomas Gleixner <tglx@linutronix.de> Signed-off-by:
Dave Hansen <dave.hansen@linux.intel.com> Reviewed-by:
Wei Liu <wei.liu@kernel.org> Acked-by:
Peter Zijlstra (Intel) <peterz@infradead.org> Tested-by:
Michael Kelley <mikelley@microsoft.com> Tested-by:
Sohil Mehta <sohil.mehta@intel.com> Tested-by: Juergen Gross <jgross@suse.com> # Xen PV (dom0 and unpriv. guest)
-
Thomas Gleixner authored
Every callsite hands in the same constants which is a pointless exercise and cannot be optimized by the compiler due to the indirect calls. Use the constants in the eoi() callbacks and remove the arguments. Signed-off-by:
Thomas Gleixner <tglx@linutronix.de> Signed-off-by:
Dave Hansen <dave.hansen@linux.intel.com> Reviewed-by:
Wei Liu <wei.liu@kernel.org> Acked-by:
Peter Zijlstra (Intel) <peterz@infradead.org> Tested-by:
Michael Kelley <mikelley@microsoft.com> Tested-by:
Sohil Mehta <sohil.mehta@intel.com> Tested-by: Juergen Gross <jgross@suse.com> # Xen PV (dom0 and unpriv. guest)
-
Thomas Gleixner authored
First of all apic_noop can't be probed because it's not registered. So there is no point for implementing a probe callback. The machine is rightfully to die when that is invoked. Remove the gunk and tidy up the other space consuming dummy callbacks. This gunk should simply die. Nothing should ever invoke APIC callbacks once this is installed, But that's a differrent story for another round of cleanups. The comment on top of this file which was intentionally left in place tells exactly why this is needed: voodoo programming. In fact the kernel of today should just outright refuse to boot on a system with no (functional) local APIC. That would spare tons of #ifdeffery and other nonsense. Signed-off-by:
Thomas Gleixner <tglx@linutronix.de> Signed-off-by:
Dave Hansen <dave.hansen@linux.intel.com> Acked-by:
Peter Zijlstra (Intel) <peterz@infradead.org> Tested-by:
Michael Kelley <mikelley@microsoft.com> Tested-by:
Sohil Mehta <sohil.mehta@intel.com> Tested-by: Juergen Gross <jgross@suse.com> # Xen PV (dom0 and unpriv. guest)
-
Thomas Gleixner authored
Wasted space for no value. Signed-off-by:
Thomas Gleixner <tglx@linutronix.de> Signed-off-by:
Dave Hansen <dave.hansen@linux.intel.com> Acked-by:
Peter Zijlstra (Intel) <peterz@infradead.org> Tested-by:
Michael Kelley <mikelley@microsoft.com> Tested-by:
Sohil Mehta <sohil.mehta@intel.com> Tested-by: Juergen Gross <jgross@suse.com> # Xen PV (dom0 and unpriv. guest)
-
Thomas Gleixner authored
Now that everything has apic::max_apic_id set and the eventual update for the x2APIC case is in place, switch the apic_id_valid() helper to use apic::max_apic_id and remove the apic::apic_id_valid() callback. [ dhansen: Fix subject typo ] Signed-off-by:
Thomas Gleixner <tglx@linutronix.de> Signed-off-by:
Dave Hansen <dave.hansen@linux.intel.com> Acked-by:
Peter Zijlstra (Intel) <peterz@infradead.org> Tested-by:
Michael Kelley <mikelley@microsoft.com> Tested-by:
Sohil Mehta <sohil.mehta@intel.com> Tested-by: Juergen Gross <jgross@suse.com> # Xen PV (dom0 and unpriv. guest)
-
Thomas Gleixner authored
In order to remove the apic::apic_id_valid() callback and switch to checking apic::max_apic_id, it is required to update apic::max_apic_id when the APIC initialization code overrides it via x2apic_set_max_apicid(). Make the existing booleans a bitfield and add a flag which lets the update function and the core code which switches the driver detect whether the apic instance wants to have that update or not and apply it if required. Signed-off-by:
Thomas Gleixner <tglx@linutronix.de> Signed-off-by:
Dave Hansen <dave.hansen@linux.intel.com> Acked-by:
Peter Zijlstra (Intel) <peterz@infradead.org> Tested-by:
Michael Kelley <mikelley@microsoft.com> Tested-by:
Sohil Mehta <sohil.mehta@intel.com> Tested-by: Juergen Gross <jgross@suse.com> # Xen PV (dom0 and unpriv. guest)
-
Thomas Gleixner authored
Currently, x2apic_max_apicid==0 means that there is no max APIC id limit. But, this means that 0 needs to be special-cased. Designate UINT_MAX to mean unlimited so that a plain old less than or equal compare works and there is no special-casing. Replace the 0 initialization with UINT_MAX. [ dhansen: muck with changelog ] Signed-off-by:
Thomas Gleixner <tglx@linutronix.de> Signed-off-by:
Dave Hansen <dave.hansen@linux.intel.com> Acked-by:
Peter Zijlstra (Intel) <peterz@infradead.org> Tested-by:
Michael Kelley <mikelley@microsoft.com> Tested-by:
Sohil Mehta <sohil.mehta@intel.com> Tested-by: Juergen Gross <jgross@suse.com> # Xen PV (dom0 and unpriv. guest)
-
Thomas Gleixner authored
There is really no point to have a callback which compares numbers. Add a field which allows each APIC to store the maximum APIC ID supported and fill it in for all APIC incarnations. The next step will remove the callback. Signed-off-by:
Thomas Gleixner <tglx@linutronix.de> Signed-off-by:
Dave Hansen <dave.hansen@linux.intel.com> Acked-by:
Peter Zijlstra (Intel) <peterz@infradead.org> Tested-by:
Michael Kelley <mikelley@microsoft.com> Tested-by:
Sohil Mehta <sohil.mehta@intel.com> Tested-by: Juergen Gross <jgross@suse.com> # Xen PV (dom0 and unpriv. guest)
-
Thomas Gleixner authored
Prepare for removing the callback and making this as simple comparison to an upper limit, which is the obvious solution to do for limit checks... Signed-off-by:
Thomas Gleixner <tglx@linutronix.de> Signed-off-by:
Dave Hansen <dave.hansen@linux.intel.com> Acked-by:
Peter Zijlstra (Intel) <peterz@infradead.org> Tested-by:
Michael Kelley <mikelley@microsoft.com> Tested-by:
Sohil Mehta <sohil.mehta@intel.com> Tested-by: Juergen Gross <jgross@suse.com> # Xen PV (dom0 and unpriv. guest)
-
Thomas Gleixner authored
No need for the same thing twice. Also prepares for simplifying the APIC ID validation checks. Signed-off-by:
Thomas Gleixner <tglx@linutronix.de> Signed-off-by:
Dave Hansen <dave.hansen@linux.intel.com> Acked-by:
Peter Zijlstra (Intel) <peterz@infradead.org> Tested-by:
Michael Kelley <mikelley@microsoft.com> Tested-by:
Sohil Mehta <sohil.mehta@intel.com> Tested-by: Juergen Gross <jgross@suse.com> # Xen PV (dom0 and unpriv. guest)
-
Thomas Gleixner authored
Yet more copy and pasta gone. Signed-off-by:
Thomas Gleixner <tglx@linutronix.de> Signed-off-by:
Dave Hansen <dave.hansen@linux.intel.com> Acked-by:
Peter Zijlstra (Intel) <peterz@infradead.org> Tested-by:
Michael Kelley <mikelley@microsoft.com> Tested-by:
Sohil Mehta <sohil.mehta@intel.com> Tested-by: Juergen Gross <jgross@suse.com> # Xen PV (dom0 and unpriv. guest)
-
Thomas Gleixner authored
Why on earth makes a wrapper around some common function sense? Just to be able to slap some vendor name on it... Signed-off-by:
Thomas Gleixner <tglx@linutronix.de> Signed-off-by:
Dave Hansen <dave.hansen@linux.intel.com> Acked-by:
Peter Zijlstra (Intel) <peterz@infradead.org> Tested-by:
Michael Kelley <mikelley@microsoft.com> Tested-by:
Sohil Mehta <sohil.mehta@intel.com> Tested-by: Juergen Gross <jgross@suse.com> # Xen PV (dom0 and unpriv. guest)
-
Thomas Gleixner authored
Move it next to apic_mem_wait_icr_idle(), rename it so that it's clear what it does and rewrite it in readable form. Signed-off-by:
Thomas Gleixner <tglx@linutronix.de> Signed-off-by:
Dave Hansen <dave.hansen@linux.intel.com> Acked-by:
Peter Zijlstra (Intel) <peterz@infradead.org> Tested-by:
Michael Kelley <mikelley@microsoft.com> Tested-by:
Sohil Mehta <sohil.mehta@intel.com> Tested-by: Juergen Gross <jgross@suse.com> # Xen PV (dom0 and unpriv. guest)
-
Thomas Gleixner authored
Remove tons of NOOP callbacks by making the invocation of safe_wait_icr_idle() conditional in the inline wrapper. Will be replaced by a static_call_cond() later. Signed-off-by:
Thomas Gleixner <tglx@linutronix.de> Signed-off-by:
Dave Hansen <dave.hansen@linux.intel.com> Acked-by:
Peter Zijlstra (Intel) <peterz@infradead.org> Tested-by:
Michael Kelley <mikelley@microsoft.com> Tested-by:
Sohil Mehta <sohil.mehta@intel.com> Tested-by: Juergen Gross <jgross@suse.com> # Xen PV (dom0 and unpriv. guest)
-
Thomas Gleixner authored
Nuke more NOOP callbacks and make the invocation conditional. Will be replaced with a static call later. Signed-off-by:
Thomas Gleixner <tglx@linutronix.de> Signed-off-by:
Dave Hansen <dave.hansen@linux.intel.com> Acked-by:
Peter Zijlstra (Intel) <peterz@infradead.org> Tested-by:
Michael Kelley <mikelley@microsoft.com> Tested-by:
Sohil Mehta <sohil.mehta@intel.com> Tested-by: Juergen Gross <jgross@suse.com> # Xen PV (dom0 and unpriv. guest)
-
Thomas Gleixner authored
Two copies and also needlessly public. Move it into ipi.c so it can be inlined. Rename it to apic_mem_wait_icr_idle(). Signed-off-by:
Thomas Gleixner <tglx@linutronix.de> Signed-off-by:
Dave Hansen <dave.hansen@linux.intel.com> Acked-by:
Peter Zijlstra (Intel) <peterz@infradead.org> Tested-by:
Michael Kelley <mikelley@microsoft.com> Tested-by:
Sohil Mehta <sohil.mehta@intel.com> Tested-by: Juergen Gross <jgross@suse.com> # Xen PV (dom0 and unpriv. guest)
-
Thomas Gleixner authored
Replace the undecodable comment on top of the function, replace the space consuming zero content comments with useful ones and tidy up the implementation to prevent further eye bleed. Make __default_send_IPI_shortcut() static as it has no other users. Signed-off-by:
Thomas Gleixner <tglx@linutronix.de> Signed-off-by:
Dave Hansen <dave.hansen@linux.intel.com> Acked-by:
Peter Zijlstra (Intel) <peterz@infradead.org> Tested-by:
Michael Kelley <mikelley@microsoft.com> Tested-by:
Sohil Mehta <sohil.mehta@intel.com> Tested-by: Juergen Gross <jgross@suse.com> # Xen PV (dom0 and unpriv. guest)
-
Thomas Gleixner authored
Really not a hotpath and again no reason for having a gazillion of empty callbacks returning 1. Make it return bool and provide one shared implementation for the remaining users. Signed-off-by:
Thomas Gleixner <tglx@linutronix.de> Signed-off-by:
Dave Hansen <dave.hansen@linux.intel.com> Acked-by:
Peter Zijlstra (Intel) <peterz@infradead.org> Tested-by:
Michael Kelley <mikelley@microsoft.com> Tested-by:
Sohil Mehta <sohil.mehta@intel.com> Tested-by: Juergen Gross <jgross@suse.com> # Xen PV (dom0 and unpriv. guest)
-
Thomas Gleixner authored
default_setup_apic_routing() is a complete misnomer. On 64bit it does the actual APIC probing and on 32bit it is used to force select the bigsmp APIC and to emit a redundant message in the apic::setup_apic_routing() callback. Rename the 64bit and 32bit function so they reflect what they are doing and remove the useless APIC callback. Signed-off-by:
Thomas Gleixner <tglx@linutronix.de> Signed-off-by:
Dave Hansen <dave.hansen@linux.intel.com> Acked-by:
Peter Zijlstra (Intel) <peterz@infradead.org> Tested-by:
Michael Kelley <mikelley@microsoft.com> Tested-by:
Sohil Mehta <sohil.mehta@intel.com> Tested-by: Juergen Gross <jgross@suse.com> # Xen PV (dom0 and unpriv. guest)
-
Thomas Gleixner authored
The operation to set the IOAPIC ID in phys_id_present_map is as convoluted as it can be. 1) Allocate a bitmap of 32byte size on the stack 2) Zero the bitmap and set the IOAPIC ID bit 3) Or the temporary bitmap over phys_id_present_map The same functionality can be achieved by setting the IOAPIC ID bit directly in the phys_id_present_map. Signed-off-by:
Thomas Gleixner <tglx@linutronix.de> Signed-off-by:
Dave Hansen <dave.hansen@linux.intel.com> Acked-by:
Peter Zijlstra (Intel) <peterz@infradead.org> Tested-by:
Michael Kelley <mikelley@microsoft.com> Tested-by:
Sohil Mehta <sohil.mehta@intel.com> Tested-by: Juergen Gross <jgross@suse.com> # Xen PV (dom0 and unpriv. guest)
-
Thomas Gleixner authored
This is only used on 32bit and is a wrapper around physid_set_mask_of_physid() in all 32bit APIC drivers. Remove the callback and use physid_set_mask_of_physid() in the code directly, Signed-off-by:
Thomas Gleixner <tglx@linutronix.de> Signed-off-by:
Dave Hansen <dave.hansen@linux.intel.com> Acked-by:
Peter Zijlstra (Intel) <peterz@infradead.org> Tested-by:
Michael Kelley <mikelley@microsoft.com> Tested-by:
Sohil Mehta <sohil.mehta@intel.com> Tested-by: Juergen Gross <jgross@suse.com> # Xen PV (dom0 and unpriv. guest)
-
Thomas Gleixner authored
apic::init_apic_ldr() is only invoked when the APIC is initialized. So there is really no point in having: - Default empty callbacks all over the place - Two implementations of the actual LDR init function where one is just unreadable gunk but does exactly the same as the other. Make the apic::init_apic_ldr() invocation conditional, remove the empty callbacks and consolidate the two implementation into one. Signed-off-by:
Thomas Gleixner <tglx@linutronix.de> Signed-off-by:
Dave Hansen <dave.hansen@linux.intel.com> Acked-by:
Peter Zijlstra (Intel) <peterz@infradead.org> Tested-by:
Michael Kelley <mikelley@microsoft.com> Tested-by:
Sohil Mehta <sohil.mehta@intel.com> Tested-by: Juergen Gross <jgross@suse.com> # Xen PV (dom0 and unpriv. guest)
-
Thomas Gleixner authored
It's a copy of default_cpu_present_to_apicid() with the omission of the actual check whether the CPU is present. This APIC callback should die completely, but the XEN APIC implementation does something different which needs to be addressed first. Signed-off-by:
Thomas Gleixner <tglx@linutronix.de> Signed-off-by:
Dave Hansen <dave.hansen@linux.intel.com> Acked-by:
Peter Zijlstra (Intel) <peterz@infradead.org> Tested-by:
Michael Kelley <mikelley@microsoft.com> Tested-by:
Sohil Mehta <sohil.mehta@intel.com> Tested-by: Juergen Gross <jgross@suse.com> # Xen PV (dom0 and unpriv. guest)
-
Thomas Gleixner authored
If the system has more than 8 CPUs then XAPIC and the bigsmp APIC driver is required. This is ensured via: 1) Enumerating all possible CPUs up to NR_CPUS 2) Checking at boot CPU APIC setup time whether the system has more than 8 CPUs and has an XAPIC. If that's the case then it's attempted to install the bigsmp APIC driver and a magic variable 'def_to_bigsmp' is set to one. 3) If that magic variable is set and CONFIG_X86_BIGSMP=n and the system has more than 8 CPUs smp_sanity_check() removes all CPUs >= #8 from the present and possible mask in the most convoluted way. This logic is completely broken for the case where the bigsmp driver is enabled, but not selected due to a command line option specifying the default APIC. In that case the system boots with default APIC in logical destination mode and fails to reduce the number of CPUs. That aside the above which is sprinkled over 3 different places is yet another piece of art. It would have been too obvious to check the requirements upfront and limit nr_cpu_ids _before_ enumerating tons of CPUs and then removing them again. Implement exactly this. Check the bigsmp requirement when the boot APIC is registered which happens _before_ ACPI/MPTABLE parsing and limit the number of CPUs to 8 if it can't be used. Switch it over when the boot CPU apic is set up if necessary. [ dhansen: fix nr_cpu_ids off-by-one in default_setup_apic_routing() ] Signed-off-by:
Thomas Gleixner <tglx@linutronix.de> Signed-off-by:
Dave Hansen <dave.hansen@linux.intel.com> Acked-by:
Peter Zijlstra (Intel) <peterz@infradead.org> Tested-by:
Michael Kelley <mikelley@microsoft.com> Tested-by:
Sohil Mehta <sohil.mehta@intel.com> Tested-by: Juergen Gross <jgross@suse.com> # Xen PV (dom0 and unpriv. guest)
-
Thomas Gleixner authored
On 32bit there is no APIC implementing the acpi_madt_oem_check() except XEN PV, but that does not matter at all. generic_apic_probe() runs before ACPI tables are parsed. This selects the XEN APIC if there is no command line override because the XEN APIC driver is the first to be probed. If there is a command line override then the XEN PV driver won't be selected in the MADT OEM check either. As there is no other MADT check implemented for 32bit APICs, this whole excercise is a NOOP and can be removed. Signed-off-by:
Thomas Gleixner <tglx@linutronix.de> Signed-off-by:
Dave Hansen <dave.hansen@linux.intel.com> Acked-by:
Peter Zijlstra (Intel) <peterz@infradead.org> Tested-by:
Michael Kelley <mikelley@microsoft.com> Tested-by:
Sohil Mehta <sohil.mehta@intel.com> Tested-by: Juergen Gross <jgross@suse.com> # Xen PV (dom0 and unpriv. guest)
-
Thomas Gleixner authored
UV X2APIC uses the per CPU variable from: native_smp_prepare_cpus() uv_system_init() uv_system_init_hub() which is long after the per CPU areas have been set up. Signed-off-by:
Thomas Gleixner <tglx@linutronix.de> Signed-off-by:
Dave Hansen <dave.hansen@linux.intel.com> Acked-by:
Peter Zijlstra (Intel) <peterz@infradead.org> Tested-by:
Michael Kelley <mikelley@microsoft.com> Tested-by:
Sohil Mehta <sohil.mehta@intel.com> Tested-by: Juergen Gross <jgross@suse.com> # Xen PV (dom0 and unpriv. guest)
-
Thomas Gleixner authored
Remove completely useless and mindlessly copied comments and tidy up the code which causes eye bleed when looking at it. Signed-off-by:
Thomas Gleixner <tglx@linutronix.de> Signed-off-by:
Dave Hansen <dave.hansen@linux.intel.com> Acked-by:
Peter Zijlstra (Intel) <peterz@infradead.org> Tested-by:
Michael Kelley <mikelley@microsoft.com> Tested-by:
Sohil Mehta <sohil.mehta@intel.com> Tested-by: Juergen Gross <jgross@suse.com> # Xen PV (dom0 and unpriv. guest)
-
Thomas Gleixner authored
This per CPU variable is just yet another form of voodoo programming. The boot ordering is: per_cpu(x86_cpu_to_logical_apicid, cpu) = 1U << cpu; ..... setup_apic() apic->init_apic_ldr() default_init_apic_ldr() apic_write(SET_APIC_LOGICAL_ID(1UL << smp_processor_id(), APIC_LDR); id = GET_APIC_LOGICAL_ID(apic_read(APIC_LDR); WARN_ON(id != per_cpu(x86_cpu_to_logical_apicid, cpu)); per_cpu(x86_cpu_to_logical_apicid, cpu) = id; So first write the default into LDR and then validate it against the same default which was set up during early boot APIC enumeration. Brilliant, isn't it? The comment above the per CPU variable declaration describes it well: 'Let's keep it ugly for now.' Remove the useless gunk and use '1U << cpu' consistently all over the place. Signed-off-by:
Thomas Gleixner <tglx@linutronix.de> Signed-off-by:
Dave Hansen <dave.hansen@linux.intel.com> Acked-by:
Peter Zijlstra (Intel) <peterz@infradead.org> Tested-by:
Michael Kelley <mikelley@microsoft.com> Tested-by:
Sohil Mehta <sohil.mehta@intel.com> Tested-by: Juergen Gross <jgross@suse.com> # Xen PV (dom0 and unpriv. guest)
-
Thomas Gleixner authored
apic::x86_32_early_logical_apicid() is yet another historical joke. It is used to preset the x86_cpu_to_logical_apicid per CPU variable during APIC enumeration with: - 1 shifted left by the CPU number - the physical APIC ID in case of bigsmp The latter is hillarious because bigsmp uses physical destination mode which never can use the logical APIC ID. It gets even worse. As bigsmp can be enforced late in the boot process the probe function overwrites the per CPU variable which is never used for this APIC type once again. Remove that gunk and store 1 << cpunr unconditionally if and only if the CPU number is less than 8, because the default logical destination mode only allows up to 8 CPUs. This is just an intermediate step before removing the per CPU insanity completely. Stay tuned. Signed-off-by:
Thomas Gleixner <tglx@linutronix.de> Signed-off-by:
Dave Hansen <dave.hansen@linux.intel.com> Acked-by:
Peter Zijlstra (Intel) <peterz@infradead.org> Tested-by:
Michael Kelley <mikelley@microsoft.com> Tested-by:
Sohil Mehta <sohil.mehta@intel.com> Tested-by: Juergen Gross <jgross@suse.com> # Xen PV (dom0 and unpriv. guest)
-
Thomas Gleixner authored
No need for an extra variable to find out whether the APIC has been mapped or is accessible (X2APIC mode). Provide an inline for this and check apic_mmio_base which is only set when the local APIC has been mapped. Signed-off-by:
Thomas Gleixner <tglx@linutronix.de> Signed-off-by:
Dave Hansen <dave.hansen@linux.intel.com> Acked-by:
Peter Zijlstra (Intel) <peterz@infradead.org> Tested-by:
Michael Kelley <mikelley@microsoft.com> Tested-by:
Sohil Mehta <sohil.mehta@intel.com> Tested-by: Juergen Gross <jgross@suse.com> # Xen PV (dom0 and unpriv. guest)
-
Thomas Gleixner authored
The only silly usage site is gone. Remove the gunk which was even outright wrong in the bigsmp_32 case which returned true unconditionally. Signed-off-by:
Thomas Gleixner <tglx@linutronix.de> Signed-off-by:
Dave Hansen <dave.hansen@linux.intel.com> Acked-by:
Peter Zijlstra (Intel) <peterz@infradead.org> Tested-by:
Michael Kelley <mikelley@microsoft.com> Tested-by:
Sohil Mehta <sohil.mehta@intel.com> Tested-by: Juergen Gross <jgross@suse.com> # Xen PV (dom0 and unpriv. guest)
-
Thomas Gleixner authored
The boot CPUs local APIC is now always registered, so there is no point to have another unreadable validatation for it. Signed-off-by:
Thomas Gleixner <tglx@linutronix.de> Signed-off-by:
Dave Hansen <dave.hansen@linux.intel.com> Acked-by:
Peter Zijlstra (Intel) <peterz@infradead.org> Tested-by:
Michael Kelley <mikelley@microsoft.com> Tested-by:
Sohil Mehta <sohil.mehta@intel.com> Tested-by: Juergen Gross <jgross@suse.com> # Xen PV (dom0 and unpriv. guest)
-
Thomas Gleixner authored
num_processors is 0 by default and only gets incremented when local APICs are registered. Make init_apic_mappings(), which tries to enable the local APIC in the case that no SMP configuration was found set num_processors to 1. This allows to remove yet another check for the local APIC and yet another place which registers the boot CPUs local APIC ID. Signed-off-by:
Thomas Gleixner <tglx@linutronix.de> Signed-off-by:
Dave Hansen <dave.hansen@linux.intel.com> Acked-by:
Peter Zijlstra (Intel) <peterz@infradead.org> Tested-by:
Michael Kelley <mikelley@microsoft.com> Tested-by:
Sohil Mehta <sohil.mehta@intel.com> Tested-by: Juergen Gross <jgross@suse.com> # Xen PV (dom0 and unpriv. guest)
-
Thomas Gleixner authored
Unlike all other SMP configuration "parsers" XEN/PV does not set smp_found_config which is inconsistent and prevents doing proper decision logic based on this flag. Make XEN/PV pretend that it found SMP configuration. Signed-off-by:
Thomas Gleixner <tglx@linutronix.de> Signed-off-by:
Dave Hansen <dave.hansen@linux.intel.com> Tested-by:
Michael Kelley <mikelley@microsoft.com> Tested-by:
Sohil Mehta <sohil.mehta@intel.com> Tested-by: Juergen Gross <jgross@suse.com> # Xen PV (dom0 and unpriv. guest)
-
Thomas Gleixner authored
Convert places which just write mp_lapic_addr and let them register the local APIC address directly instead of relying on magic other code to do so. Add a WARN_ON() into register_lapic_address() which is raised when register_lapic_address() is invoked more than once during boot. Signed-off-by:
Thomas Gleixner <tglx@linutronix.de> Signed-off-by:
Dave Hansen <dave.hansen@linux.intel.com> Acked-by:
Peter Zijlstra (Intel) <peterz@infradead.org> Tested-by:
Michael Kelley <mikelley@microsoft.com> Tested-by:
Sohil Mehta <sohil.mehta@intel.com> Tested-by: Juergen Gross <jgross@suse.com> # Xen PV (dom0 and unpriv. guest)
-
Thomas Gleixner authored
Split the fixmap setup out of register_lapic_address() and reuse it when the X2APIC is disabled during setup. This avoids registering the APIC ID (setting 'mp_lapic_addr') twice. [ dhansen: changelog wording tweak ] Signed-off-by:
Thomas Gleixner <tglx@linutronix.de> Signed-off-by:
Dave Hansen <dave.hansen@linux.intel.com> Acked-by:
Peter Zijlstra (Intel) <peterz@infradead.org> Tested-by:
Michael Kelley <mikelley@microsoft.com> Tested-by:
Sohil Mehta <sohil.mehta@intel.com> Tested-by: Juergen Gross <jgross@suse.com> # Xen PV (dom0 and unpriv. guest)
-