24 Dec, 2011
1 commit
-
If the x2apic feature is not present (either the cpu is not capable of it
or the user has disabled the feature using boot-parameter etc), ignore the
x2apic MADT and SRAT entries provided by the ACPI tables.Signed-off-by: Yinghai Lu
Link: http://lkml.kernel.org/r/20111222014632.540896503@sbsiddha-desk.sc.intel.com
Signed-off-by: Suresh Siddha
Signed-off-by: H. Peter Anvin
04 Aug, 2011
1 commit
-
...and make it static
no functional change
cc: x86@kernel.org
Acked-by: H. Peter Anvin
Signed-off-by: Len Brown
07 Jul, 2011
1 commit
-
Some BIOSes will reset the Intel MISC_ENABLE MSR (specifically the
XD_DISABLE bit) when resuming from S3, which can interact poorly with
ebba638ae723d8a8fc2f7abce5ec18b688b791d7. In 32bit PAE mode, this can
lead to a fault when EFER is restored by the kernel wakeup routines,
due to it setting the NX bit for a CPU that (thanks to the BIOS reset)
now incorrectly thinks it lacks the NX feature. (64bit is not affected
because it uses a common CPU bring-up that specifically handles the
XD_DISABLE bit.)The need for MISC_ENABLE being restored so early is specific to the S3
resume path. Normally, MISC_ENABLE is saved in save_processor_state(),
but this happens after the resume header is created, so just reproduce
the logic here. (acpi_suspend_lowlevel() creates the header, calls
do_suspend_lowlevel, which calls save_processor_state(), so the saved
processor context isn't available during resume header creation.)[ hpa: Consider for stable if OK in mainline ]
Signed-off-by: Kees Cook
Link: http://lkml.kernel.org/r/20110707011034.GA8523@outflux.net
Signed-off-by: H. Peter Anvin
Cc: Rafael J. Wysocki
Cc: 2.6.38+
20 May, 2011
1 commit
-
Signed-off-by: Suresh Siddha
Cc: daniel.blueman@gmail.com
Link: http://lkml.kernel.org/r/20110518233157.909013179@sbsiddha-MOBL3.sc.intel.com
Signed-off-by: Ingo Molnar
18 May, 2011
1 commit
-
acpi_sleep=s4_nonvs is superseded by acpi_sleep=nonvs, so remove it.
Signed-off-by: WANG Cong
Acked-by: Pavel Machek
Acked-by: Len Brown
Signed-off-by: Rafael J. Wysocki
23 Mar, 2011
1 commit
-
Conflicts:
arch/x86/kernel/acpi/sleep.cSigned-off-by: Len Brown
19 Mar, 2011
1 commit
17 Mar, 2011
1 commit
-
…rnel/git/tip/linux-2.6-tip
* 'x86-trampoline-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
x86: Fix binutils-2.21 symbol related build failures
x86-64, trampoline: Remove unused variable
x86, reboot: Fix the use of passed arguments in 32-bit BIOS reboot
x86, reboot: Move the real-mode reboot code to an assembly file
x86: Make the GDT_ENTRY() macro in <asm/segment.h> safe for assembly
x86, trampoline: Use the unified trampoline setup for ACPI wakeup
x86, trampoline: Common infrastructure for low memory trampolinesFix up trivial conflicts in arch/x86/kernel/Makefile
15 Mar, 2011
1 commit
-
Conflicts:
arch/x86/mm/numa_64.cMerge reason: Resolve the conflict, update the branch to .38.
Signed-off-by: Ingo Molnar
09 Mar, 2011
1 commit
-
New binutils version 2.21.0.20110302-1 started checking that the symbol
parameter to the .size directive matches the entry name's
symbol parameter, unearthing two mismatches:AS arch/x86/kernel/acpi/wakeup_rm.o
arch/x86/kernel/acpi/wakeup_rm.S: Assembler messages:
arch/x86/kernel/acpi/wakeup_rm.S:12: Error: .size expression with symbol `wakeup_code_start' does not evaluate to a constantarch/x86/kernel/entry_32.S: Assembler messages:
arch/x86/kernel/entry_32.S:1421: Error: .size expression with
symbol `apf_page_fault' does not evaluate to a constantThe problem was discovered while using Debian's binutils
(2.21.0.20110302-1) and experimenting with binutils from
upstream.Thanks Alexander and H.J. for the vital help.
Signed-off-by: Sedat Dilek
Cc: Alexander van Heukelum
Cc: H.J. Lu
Cc: Len Brown
Cc: Pavel Machek
Cc: Rafael J. Wysocki
LKML-Reference:
Signed-off-by: Ingo Molnar
25 Feb, 2011
3 commits
-
On some SB800 systems polarity for IOAPIC pin2 is wrongly
specified as low active by BIOS. This caused system hangs after
resume from S3 when HPET was used in one-shot mode on such
systems because a timer interrupt was missed (HPET signal is
high active).For more details see:
http://marc.info/?l=linux-kernel&m=129623757413868
Tested-by: Manoj Iyer
Tested-by: Andre Przywara
Signed-off-by: Andreas Herrmann
Cc: Borislav Petkov
Cc: stable@kernel.org # 37.x, 32.x
LKML-Reference:
Signed-off-by: Ingo Molnar -
The function do_suspend_lowlevel() is specific to x86 and defined in
assembly code, so it should be called from the x86 low-level suspend
code rather than from acpi_suspend_enter().Merge do_suspend_lowlevel() into the x86's acpi_save_state_mem() and
change the name of the latter to acpi_suspend_lowlevel(), so that the
function's purpose is better reflected by its name.Signed-off-by: Rafael J. Wysocki
-
The function acpi_restore_state_mem() has never been and most likely
never will be used, so remove it.Signed-off-by: Rafael J. Wysocki
18 Feb, 2011
1 commit
-
Use the unified trampoline allocation setup to allocate and install
the ACPI wakeup code in low memory.Signed-off-by: H. Peter Anvin
LKML-Reference:
Cc: Rafael J. Wysocki
Cc: Matthieu Castet
Cc: Stephen Rothwell
14 Feb, 2011
1 commit
-
Merge reason: Merge latest fixes before applying new patch.
Signed-off-by: Ingo Molnar
07 Feb, 2011
1 commit
-
We reserve lowmem for the things that need it, like the ACPI
wakeup code, way early to guarantee availability. This happens
before we set up the proper pagetables, so set_memory_x() has no
effect.Until we have a better solution, use an initcall to mark the
wakeup code executable.Originally-by: Matthieu Castet
Signed-off-by: H. Peter Anvin
Cc: Matthias Hopf
Cc: rjw@sisk.pl
Cc: Suresh Siddha
LKML-Reference:
Signed-off-by: Ingo Molnar
05 Feb, 2011
1 commit
-
Since checkin ebba638ae723d8a8fc2f7abce5ec18b688b791d7 we call
verify_cpu even in 32-bit mode. Unfortunately, calling a function
means using the stack, and the stack pointer was not initialized in
the 32-bit setup code! This code initializes the stack pointer, and
simplifies the interface slightly since it is easier to rely on just a
pointer value rather than a descriptor; we need to have different
values for the segment register anyway.This retains start_stack as a virtual address, even though a physical
address would be more convenient for 32 bits; the 64-bit code wants
the other way around...Reported-by: Matthieu Castet
LKML-Reference:
Tested-by: Kees Cook
Signed-off-by: H. Peter Anvin
28 Jan, 2011
2 commits
-
Unlike 64bit, 32bit has been using its own cpu_to_node_map[] for
CPU -> NUMA node mapping. Replace it with early_percpu variable
x86_cpu_to_node_map and share the mapping code with 64bit.* USE_PERCPU_NUMA_NODE_ID is now enabled for 32bit too.
* x86_cpu_to_node_map and numa_set/clear_node() are moved from
numa_64 to numa. For now, on 32bit, x86_cpu_to_node_map is initialized
with 0 instead of NUMA_NO_NODE. This is to avoid introducing unexpected
behavior change and will be updated once init path is unified.* srat_detect_node() is now enabled for x86_32 too. It calls
numa_set_node() and initializes the mapping making explicit
cpu_to_node_map[] updates from map/unmap_cpu_to_node() unnecessary.Signed-off-by: Tejun Heo
Cc: eric.dumazet@gmail.com
Cc: yinghai@kernel.org
Cc: brgerst@gmail.com
Cc: gorcunov@gmail.com
Cc: penberg@kernel.org
Cc: shaohui.zheng@intel.com
Cc: rientjes@google.com
LKML-Reference:
Signed-off-by: Ingo Molnar
Cc: David Rientjes -
The mapping between cpu/apicid and node is done via
apicid_to_node[] on 64bit and apicid_2_node[] +
apic->x86_32_numa_cpu_node() on 32bit. This difference makes it
difficult to further unify 32 and 64bit NUMA handling.This patch unifies it by replacing both apicid_to_node[] and
apicid_2_node[] with __apicid_to_node[] array, which is accessed
by two accessors - set_apicid_to_node() and numa_cpu_node(). On
64bit, numa_cpu_node() always consults __apicid_to_node[]
directly while 32bit goes through apic->numa_cpu_node() method
to allow apic implementations to override it.srat_detect_node() for amd cpus contains workaround for broken
NUMA configuration which assumes relationship between APIC ID,
HT node ID and NUMA topology. Leave it to access
__apicid_to_node[] directly as mapping through CPU might result
in undesirable behavior change. The comment is reformatted and
updated to note the ugliness.Signed-off-by: Tejun Heo
Reviewed-by: Pekka Enberg
Cc: eric.dumazet@gmail.com
Cc: yinghai@kernel.org
Cc: brgerst@gmail.com
Cc: gorcunov@gmail.com
Cc: shaohui.zheng@intel.com
Cc: rientjes@google.com
LKML-Reference:
Signed-off-by: Ingo Molnar
Cc: David Rientjes
14 Jan, 2011
1 commit
-
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (59 commits)
ACPI / PM: Fix build problems for !CONFIG_ACPI related to NVS rework
ACPI: fix resource check message
ACPI / Battery: Update information on info notification and resume
ACPI: Drop device flag wake_capable
ACPI: Always check if _PRW is present before trying to evaluate it
ACPI / PM: Check status of power resources under mutexes
ACPI / PM: Rename acpi_power_off_device()
ACPI / PM: Drop acpi_power_nocheck
ACPI / PM: Drop acpi_bus_get_power()
Platform / x86: Make fujitsu_laptop use acpi_bus_update_power()
ACPI / Fan: Rework the handling of power resources
ACPI / PM: Register power resource devices as soon as they are needed
ACPI / PM: Register acpi_power_driver early
ACPI / PM: Add function for updating device power state consistently
ACPI / PM: Add function for device power state initialization
ACPI / PM: Introduce __acpi_bus_get_power()
ACPI / PM: Introduce function for refcounting device power resources
ACPI / PM: Add functions for manipulating lists of power resources
ACPI / PM: Prevent acpi_power_get_inferred_state() from making changes
ACPICA: Update version to 20101209
...
12 Jan, 2011
1 commit
-
Generic Hardware Error Source provides a way to report platform
hardware errors (such as that from chipset). It works in so called
"Firmware First" mode, that is, hardware errors are reported to
firmware firstly, then reported to Linux by firmware. This way, some
non-standard hardware error registers or non-standard hardware link
can be checked by firmware to produce more valuable hardware error
information for Linux.This patch adds POLL/IRQ/NMI notification types support.
Because the memory area used to transfer hardware error information
from BIOS to Linux can be determined only in NMI, IRQ or timer
handler, but general ioremap can not be used in atomic context, so a
special version of atomic ioremap is implemented for that.Known issue:
- Error information can not be printed for recoverable errors notified
via NMI, because printk is not NMI-safe. Will fix this via delay
printing to IRQ context via irq_work or make printk NMI-safe.v2:
- adjust printk format per comments.
Signed-off-by: Huang Ying
Reviewed-by: Andi Kleen
Signed-off-by: Len Brown
07 Jan, 2011
1 commit
-
Conflicts:
arch/x86/include/asm/io_apic.hMerge reason: Resolve the conflict, update to a more recent -rc base
Signed-off-by: Ingo Molnar
05 Jan, 2011
1 commit
-
Found one x2apic pre-enabled system, x2apic_mode suddenly get
corrupted after register some cpus, when compiled
CONFIG_NR_CPUS=255 instead of 512.It turns out that generic_processor_info() ==> phyid_set(apicid,
phys_cpu_present_map) causes the problem.phys_cpu_present_map is sized by MAX_APICS bits, and pre-enabled
system some cpus have an apic id > 255.The variable after phys_cpu_present_map may get corrupted
silently:ffffffff828e8420 B phys_cpu_present_map
ffffffff828e8440 B apic_verbosity
ffffffff828e8444 B local_apic_timer_c2_ok
ffffffff828e8448 B disable_apic
ffffffff828e844c B x2apic_mode
ffffffff828e8450 B x2apic_disabled
ffffffff828e8454 B num_processors
...Actually phys_cpu_present_map is referenced via apic id, instead
index. We should use MAX_LOCAL_APIC instead MAX_APICS.For 64-bit it will be 32768 in all cases. BSS will increase by 4k bytes
on 64-bit:text data bss dec filename
21696943 4193748 12787712 38678403 vmlinux.before
21696943 4193748 12791808 38682499 vmlinux.afterNo change on 32bit.
Finally we can remove MAX_APCIS that was rather confusing.
Signed-off-by: Yinghai Lu
Cc: H. Peter Anvin
Cc: "Eric W. Biederman"
LKML-Reference:
Signed-off-by: Ingo Molnar
04 Jan, 2011
1 commit
-
Conflicts:
arch/x86/include/asm/io_apic.hMerge reason: move to a fresh -rc, resolve the conflict.
Signed-off-by: Ingo Molnar
24 Dec, 2010
1 commit
-
Recent Intel new system have different order in MADT, aka will list all thread0
at first, then all thread1.
But SRAT table still old order, it will list cpus in one socket all together.If the user have compiled limited NR_CPUS or boot with nr_cpus=, could have missed
to put some cpus apic id to node mapping into apicid_to_node[].for example for 4 sockets system with 64 cpus with nr_cpus=32 will get crash...
[ 9.106288] Total of 32 processors activated (136190.88 BogoMIPS).
[ 9.235021] divide error: 0000 [#1] SMP
[ 9.235315] last sysfs file:
[ 9.235481] CPU 1
[ 9.235592] Modules linked in:
[ 9.245398]
[ 9.245478] Pid: 2, comm: kthreadd Not tainted 2.6.37-rc1-tip-yh-01782-ge92ef79-dirty #274 /Sun Fire x4800
[ 9.265415] RIP: 0010:[] [] select_task_rq_fair+0x4f0/0x623
...
[ 9.645938] RIP [] select_task_rq_fair+0x4f0/0x623
[ 9.665356] RSP
[ 9.665568] ---[ end trace 2296156d35fdfc87 ]---So let just parse all cpu entries in SRAT.
Also add apicid checking with MAX_LOCAL_APIC, in case We could out of boundaries of
apicid_to_node[].it fixes following bug too.
https://bugzilla.kernel.org/show_bug.cgi?id=22662-v2: expand to 32bit according to hpa
need to add MAX_LOCAL_APIC for 32bitReported-and-Tested-by: Wu Fengguang
Reported-by: Bjorn Helgaas
Tested-by: Myron Stowe
Signed-off-by: Yinghai Lu
LKML-Reference:
Signed-off-by: H. Peter Anvin
10 Dec, 2010
2 commits
-
There are 3 places defining similar functions of saving IRQ vector
info into mp_irqs[] array: mmparse/acpi/mrst.Replace the redundant code by a common function in io_apic.c as it's
only called when CONFIG_X86_IO_APIC=ySigned-off-by: Feng Tang
Cc: Alan Cox
Cc: Len Brown
Cc: Yinghai Lu
LKML-Reference:
Signed-off-by: Thomas Gleixner -
They are the same, move the common function to apic.c to allow
further cleanups.Signed-off-by: Yinghai Lu
Cc: Suresh Siddha
Cc: "Eric W. Biederman"
Cc: Len Brown
LKML-Reference:
Signed-off-by: Thomas Gleixner
29 Oct, 2010
1 commit
-
and branch 'for-linus' of git://xenbits.xen.org/people/sstabellini/linux-pvhvm
* 'for-linus' of git://xenbits.xen.org/people/sstabellini/linux-pvhvm:
xen: register xen pci notifier
xen: initialize cpu masks for pv guests in xen_smp_init
xen: add a missing #include to arch/x86/pci/xen.c
xen: mask the MTRR feature from the cpuid
xen: make hvc_xen console work for dom0.
xen: add the direct mapping area for ISA bus access
xen: Initialize xenbus for dom0.
xen: use vcpu_ops to setup cpu masks
xen: map a dummy page for local apic and ioapic in xen_set_fixmap
xen: remap MSIs into pirqs when running as initial domain
xen: remap GSIs as pirqs when running as initial domain
xen: introduce XEN_DOM0 as a silent option
xen: map MSIs into pirqs
xen: support GSI -> pirq remapping in PV on HVM guests
xen: add xen hvm acpi_register_gsi variant
acpi: use indirect call to register gsi in different modes
xen: implement xen_hvm_register_pirq
xen: get the maximum number of pirqs from xen
xen: support pirq != irq* 'stable/xen-pcifront-0.8.2' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen: (27 commits)
X86/PCI: Remove the dependency on isapnp_disable.
xen: Update Makefile with CONFIG_BLOCK dependency for biomerge.c
MAINTAINERS: Add myself to the Xen Hypervisor Interface and remove Chris Wright.
x86: xen: Sanitse irq handling (part two)
swiotlb-xen: On x86-32 builts, select SWIOTLB instead of depending on it.
MAINTAINERS: Add myself for Xen PCI and Xen SWIOTLB maintainer.
xen/pci: Request ACS when Xen-SWIOTLB is activated.
xen-pcifront: Xen PCI frontend driver.
xenbus: prevent warnings on unhandled enumeration values
xenbus: Xen paravirtualised PCI hotplug support.
xen/x86/PCI: Add support for the Xen PCI subsystem
x86: Introduce x86_msi_ops
msi: Introduce default_[teardown|setup]_msi_irqs with fallback.
x86/PCI: Export pci_walk_bus function.
x86/PCI: make sure _PAGE_IOMAP it set on pci mappings
x86/PCI: Clean up pci_cache_line_size
xen: fix shared irq device passthrough
xen: Provide a variant of xen_poll_irq with timeout.
xen: Find an unbound irq number in reverse order (high to low).
xen: statically initialize cpu_evtchn_mask_p
...Fix up trivial conflicts in drivers/pci/Makefile
26 Oct, 2010
1 commit
-
Commit b40827fa7268 ("x86-32, mm: Add an initial page table for core
bootstrapping") added an include directive which is needless and is
taken care of by a previous one. Remove it.Caught-by: Jaswinder Singh Rajput
Signed-off-by: Borislav Petkov
Signed-off-by: Linus Torvalds
23 Oct, 2010
3 commits
-
…rnel/git/tip/linux-2.6-tip
* 'x86-trampoline-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
x86-32, mm: Add an initial page table for core bootstrapping -
Signed-off-by: Jeremy Fitzhardinge
Signed-off-by: Stefano Stabellini
Reviewed-by: Konrad Rzeszutek Wilk
Acked-by: Rafael J. Wysocki -
Rather than using a tree of conditionals, use function pointer
for acpi_register_gsi.Signed-off-by: Jeremy Fitzhardinge
Reviewed-by: Konrad Rzeszutek Wilk
Acked-by: Rafael J. Wysocki
22 Oct, 2010
2 commits
-
…nel/git/tip/linux-2.6-tip
* 'core-memblock-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (74 commits)
x86-64: Only set max_pfn_mapped to 512 MiB if we enter via head_64.S
xen: Cope with unmapped pages when initializing kernel pagetable
memblock, bootmem: Round pfn properly for memory and reserved regions
memblock: Annotate memblock functions with __init_memblock
memblock: Allow memblock_init to be called early
memblock/arm: Fix memblock_region_is_memory() typo
x86, memblock: Remove __memblock_x86_find_in_range_size()
memblock: Fix wraparound in find_region()
x86-32, memblock: Make add_highpages honor early reserved ranges
x86, memblock: Fix crashkernel allocation
arm, memblock: Fix the sparsemem build
memblock: Fix section mismatch warnings
powerpc, memblock: Fix memblock API change fallout
memblock, microblaze: Fix memblock API change fallout
x86: Remove old bootmem code
x86, memblock: Use memblock_memory_size()/memblock_free_memory_size() to get correct dma_reserve
x86: Remove not used early_res code
x86, memblock: Replace e820_/_early string with memblock_
x86: Use memblock to replace early_res
x86, memblock: Use memblock_debug to control debug message print out
...Fix up trivial conflicts in arch/x86/kernel/setup.c and kernel/Makefile
-
* 'x86-idle-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
x86, hotplug: In the MWAIT case of play_dead, CLFLUSH the cache line
x86, hotplug: Move WBINVD back outside the play_dead loop
x86, hotplug: Use mwait to offline a processor, fix the legacy case
x86, mwait: Move mwait constants to a common header file
21 Oct, 2010
1 commit
-
This patch adds an initial page table with low mappings used exclusively
for booting APs/resuming after ACPI suspend/machine restart. After this,
there's no need to add low mappings to swapper_pg_dir and zap them later
or create own swsusp PGD page solely for ACPI sleep needs - we have
initial_page_table for that.Signed-off-by: Borislav Petkov
LKML-Reference:
Signed-off-by: H. Peter Anvin
08 Oct, 2010
1 commit
-
Merge reason: Update from -rc3 to -rc7.
Signed-off-by: Ingo Molnar
29 Sep, 2010
1 commit
-
cpu_cstate_entry is a percpu pointer
but was missing __percpu markup.Signed-off-by: Namhyung Kim
Acked-by: Tejun Heo
Signed-off-by: Len Brown
18 Sep, 2010
1 commit
-
We have MWAIT constants spread across three different .c files, for no
good reason. Move them all into a common header file.Signed-off-by: H. Peter Anvin
Reviewed-by: Arjan van de Ven
Cc: Len Brown
LKML-Reference:
31 Aug, 2010
1 commit
-
Conflicts:
arch/x86/kernel/trampoline.c
mm/memblock.cMerge reason: Resolve the conflicts, update to latest upstream.
Signed-off-by: Ingo Molnar
28 Aug, 2010
1 commit
-
1.include linux/memblock.h directly. so later could reduce e820.h reference.
2 this patch is done by sed scripts mainly-v2: use MEMBLOCK_ERROR instead of -1ULL or -1UL
Signed-off-by: Yinghai Lu
Signed-off-by: H. Peter Anvin