Commit graph android_kernel_sony_sdm845/arch
Message SHA1
kgdb: fix several kgdb regressions
kgdb core fixes:
- Check to see that mm->mmap_cache is not null before calling
  flush_cache_range(), else on arch=ARM it will cause a fatal
  fault.

- Breakpoints should only be restored if they are in the BP_ACTIVE
  state.

- Fix a typo in comments to "kgdb_register_io_module"

x86 kgdb fixes:
- Fix the x86 arch handler such that on a kill or detach that the
  appropriate cleanup on the single stepping flags gets run.

- Add in the DIE_NMIWATCHDOG call for x86_64

- Touch the nmi watchdog before returning the system to normal
  operation after performing any kind of kgdb operation, else
  the possibility exists to trigger the watchdog.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

Jason Wessel   authored and   Ingo Molnar   commited 2008-04-17 20:05:40 +02:00
737a460f21
kgdb: add x86 HW breakpoints
Add HW breakpoints into the arch specific portion of x86 kgdb.  In the
current x86 kernel.org kernels HW breakpoints are changed out in lazy
fashion because there is no infrastructure around changing them when
changing to a kernel task or entering the kernel mode via a system
call.  This lazy approach means that if a user process uses HW
breakpoints the kgdb will loose out.  This is an acceptable trade off
because the developer debugging the kernel is assumed to know what is
going on system wide and would be aware of this trade off.

There is a minor bug fix to the kgdb core so as to correctly call the
hw breakpoint functions with a valid value from the enum.

There is also a minor change to the x86_64 startup code when using
early HW breakpoints.  When the debugger is connected, the cpu startup
code must not zero out the HW breakpoint registers or you cannot hit
the breakpoints you are interested in, in the first place.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

Jason Wessel   authored and   Ingo Molnar   commited 2008-04-17 20:05:39 +02:00
64e9ee3095
kgdb: fix NMI hangs
This patch fixes the hang regression with kgdb when the NMI interrupt
comes in while the master core is returning from an exception.

Adjust the NMI logic such that KGDB will not stop NMI exceptions from
occurring by in general returning NOTIFY_DONE.  It is not possible to
distinguish the debug NMI sync vs the normal NMI apic interrupt so
kgdb needs to catch the unknown NMI if it the debugger was previously
active on one of the cpus.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

Jason Wessel   authored and   Ingo Molnar   commited 2008-04-17 20:05:38 +02:00
d359752407
x86: kgdb support
simplified and streamlined kgdb support on x86, both 32-bit and 64-bit,
based on patch from:

  Subject: kgdb: core-lite
  From: Jason Wessel <jason.wessel@windriver.com>

[ and countless other authors - see the patch for details. ]

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>

Ingo Molnar   commited 2008-04-17 20:05:37 +02:00
82da3ff89d
Pull miscellaneous into release branch
Conflicts:

	arch/ia64/kernel/mca.c

Tony Luck   commited 2008-04-17 10:14:51 -07:00
71b264f85f
Pull nptcg into release branch
Conflicts:

	arch/ia64/mm/tlb.c

Tony Luck   commited 2008-04-17 10:13:57 -07:00
f4df39cbdd
Pull kvm-patches into release branch
Tony Luck   commited 2008-04-17 10:13:09 -07:00
a49072bb36
Pull percpureserve into release branch
Tony Luck   commited 2008-04-17 10:12:55 -07:00
fc494d6c18
Pull regset into release branch
Tony Luck   commited 2008-04-17 10:12:44 -07:00
78514c106b
Pull virt-cpu-accounting into release branch
Tony Luck   commited 2008-04-17 10:12:27 -07:00
14d0647c98
Pull fsys_gettimeofday into release branch
Tony Luck   commited 2008-04-17 10:12:07 -07:00
2a467d5f7d
[ARM] 4963/1: S3C2410 - add basic machine support for the TCT Hammer
Add the TinCanTools Hammer board to list of supported machines in the
arch/arm/mach-s3c2410 directory, as well as a default config entry. the
mach-tct_hammer.c file initializes basic i/o, clocks, irqs, as well as
the mtd flash layout if enabled in the kernel configuration.

Signed-off-by: David Anders <danders@amltd.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

David Anders   authored and   Russell King   commited 2008-04-17 17:34:56 +01:00
79b34afa68
[ARM] 4987/1: S3C24XX: Ensure watchdog reset initiated from cached code.
There seems to be some problem with at-least the S3C2440 and
bus traffic during an reset. It is unlikely, but still possible
that the system will hang in such a way that the watchdog cannot
get the system out of the state it is in.

Change to making the code that calls the watchdog reset run from
cached memory so that instruction fetches have quiesced before the
watchdog fires.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

Ben Dooks   authored and   Russell King   commited 2008-04-17 17:04:41 +01:00
3c7d9c81e1
[ARM] 4986/1: S3C24XX: Simtec machines need UCLK as parent to DCLK
All current Simtec designs source the DCLK outputs from
the UPLL. This means the DCLK's parent must be set to UPLL
so that anything enabling and disabling an UPLL sourced
clock does not shutdown the DCLK due to missing open counts.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

Ben Dooks   authored and   Russell King   commited 2008-04-17 17:04:40 +01:00
d96a980441
[ARM] 4985/1: S3C2412: Fix ARMDIVN name in CLKDIVN definition.
Fix the name of the S3C2412_CLKDIVN_ARMDIVN define.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

Ben Dooks   authored and   Russell King   commited 2008-04-17 17:04:38 +01:00
1017be88d3
[ARM] 4984/1: S3C24XX: Do not assert nRSTOUT on BAST over suspend.
Change GPA21 to output over reset so that nRSTOUT is not
asserted whilst suspended.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

Ben Dooks   authored and   Russell King   commited 2008-04-17 17:04:37 +01:00
6ddc4b07a2
x86: standalone trampoline code
move the trampoline setup code out of smpboot.c - UP kernels can have
suspend support too.

Signed-off-by: Ingo Molnar <mingo@elte.hu>

Ingo Molnar   commited 2008-04-17 17:41:37 +02:00
77ad386e59
x86: move suspend wakeup code to C
Move wakeup code to .c, so that video mode setting code can be shared
between boot and wakeup. Remove nasty assembly code in 64-bit case by
re-using trampoline code. Stack setup was fixed to clear high 16bits
of %esp, maybe that fixes some machines.

.c code sharing and morse code was done H. Peter Anvin, Sam Ravnborg
reviewed kbuild related stuff, and it seems okay to him. Rafael did
some cleanups.

[rjw:
* Made the patch stop breaking compilation on x86-32
* Added arch/x86/kernel/acpi/sleep.h
* Got rid of compiler warnings in arch/x86/kernel/acpi/sleep.c
* Fixed 32-bit compilation on x86-64 systems
* Added include/asm-x86/trampoline.h and fixed the non-SMP
  compilation on 64-bit x86
* Removed arch/x86/kernel/acpi/sleep_32.c which was not used
* Fixed some breakage caused by the integration of smpboot.c done
  under us in the meantime]

Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

Pavel Machek   authored and   Ingo Molnar   commited 2008-04-17 17:41:37 +02:00
e44b7b7525
x86: coding style fixes to arch/x86/kernel/acpi/sleep.c
Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

Paolo Ciarrocchi   authored and   Ingo Molnar   commited 2008-04-17 17:41:37 +02:00
f49688d459
x86: setup_trampoline() - fix section mismatch warning
this patch fixes section mismatch warnings (on x86_64 host) in setup_trampoline(),
which was referencing __initdata variables trampoline_data and trampoline_end.

Warning messages:
WARNING: arch/x86/kernel/built-in.o(.cpuinit.text+0x2b6a): Section mismatch in reference from the function setup_trampoline()
to the variable .init.data:trampoline_data
The function __cpuinit setup_trampoline() references
a variable __initdata trampoline_data.
If trampoline_data is only used by setup_trampoline then
annotate trampoline_data with a matching annotation.

WARNING: arch/x86/kernel/built-in.o(.cpuinit.text+0x2b71): Section mismatch in reference from the function setup_trampoline()
to the variable .init.data:trampoline_end
The function __cpuinit setup_trampoline() references
a variable __initdata trampoline_end.
If trampoline_end is only used by setup_trampoline then
annotate trampoline_end with a matching annotation.

Signed-off-by: Ingo Molnar <mingo@elte.hu>

Jacek Luczak   authored and   Ingo Molnar   commited 2008-04-17 17:41:37 +02:00
e223f162a1
x86: section mismatch fixes, #1
This patch fixes mismatch warnings in smp_checks() (in arch/x86/kernel/smpboot.c):

WARNING: arch/x86/kernel/built-in.o(.text+0x11922): Section mismatch in reference from the function smp_checks()
to the variable .cpuinit.data:smp_b_stepping
The function smp_checks() references
the variable __cpuinitdata smp_b_stepping.
This is often because smp_checks lacks a __cpuinitdata
annotation or the annotation of smp_b_stepping is wrong.

Signed-off-by: Jacek Luczak <luczak.jacek@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

Jacek Luczak   authored and   Ingo Molnar   commited 2008-04-17 17:41:36 +02:00
df96323dfa
x86: fix paranoia about using BIOS quickboot mechanism.
> > Make sure that we clear the "shutdown status flag" in the CMOS
> > register after each CPU is brought up.  This fixes a problem where the
> > "shutdown status flag" may remain set when a CPU is brought up after
> > booting.
>
> btw., what problem does this result in, exactly?

The shutdown status flag set to "0xA", corresponds to "JMP double word
request without INT init".

This JMP at reboot time is at an unintended location. And results in
Triple faults in our case.
Though this error at reboot can be safely ignored in a VM environment,
am not sure what the effect would be on a physical system. May be it
will result in a triple fault and an eventual hardware reset thus
masking this BUG in the kernel.

This fix just makes sure that we reset that status flag after
initialization is done.

Fix paranoia about using BIOS quickboot mechanism.

Make sure that we clear the "shutdown status flag" in the CMOS register
after each CPU is brought up.  This fixes a problem where the "shutdown
status flag" may remain set when a CPU is brought up after booting.

Signed-off-by: Alok N Kataria <akataria@vmware.com>
Signed-off-by: Dan Arai <arai@vmware.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

Alok Kataria   authored and   Ingo Molnar   commited 2008-04-17 17:41:36 +02:00
63d38198a0
x86: print out buggy mptable
print out buggy mptable, instead of skipping it quietly

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

Yinghai Lu   authored and   Ingo Molnar   commited 2008-04-17 17:41:36 +02:00
711554dbc4
x86: use cpu_online()
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

Akinobu Mita   authored and   Ingo Molnar   commited 2008-04-17 17:41:36 +02:00
6107a7c4e2
x86: use cpumask_of_cpu()
Use cpumask_of_cpu() rather than the pair of cpus_clear() and cpu_set().

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

Akinobu Mita   authored and   Ingo Molnar   commited 2008-04-17 17:41:36 +02:00
7281c96f37
x86: remove unnecessary tmp local variable
There is no reason to use obscurer name.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

Akinobu Mita   authored and   Ingo Molnar   commited 2008-04-17 17:41:36 +02:00
addfc66bb5
x86: remove unnecessary memset()
No need to clear the memory allocated by alloc_bootmem().
It is already filled with zero.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

Akinobu Mita   authored and   Ingo Molnar   commited 2008-04-17 17:41:36 +02:00
07004b12a1
x86: use ioapic_read_entry() and ioapic_write_entry()
Remove duplicate code by using ioapic_read_entry() and ioapic_write_entry()
in io_apic_{32,64}.c

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

Akinobu Mita   authored and   Ingo Molnar   commited 2008-04-17 17:41:36 +02:00
a2249cba2f
x86: avoid redundant loop in io_apic_level_ack_pending()
If one can find an ack pending pin, there is no need to check
the rest of them.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

Akinobu Mita   authored and   Ingo Molnar   commited 2008-04-17 17:41:36 +02:00
9d25cb0811
x86: remove superfluous initialisation in boot code.
In arch/x86/boot/compressed/misc.c, the variable vidmem is
the only variable that ends up in de data segment. It's also
superfluous, because the first thing the code does is:

	if (RM_SCREEN_INFO.orig_video_mode == 7) {
		vidmem = (char *) 0xb0000;
		vidport = 0x3b4;
	} else {
		vidmem = (char *) 0xb8000;
		vidport = 0x3d4;
	}

This patch removes the initialisation.

Signed-off-by: Ingo Molnar <mingo@elte.hu>

Alexander van Heukelum   authored and   Ingo Molnar   commited 2008-04-17 17:41:36 +02:00
03056c88cf
x86: merge mpparse_{32,64}.c
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

Alexey Starikovskiy   authored and   Ingo Molnar   commited 2008-04-17 17:41:36 +02:00
85bdddec5e
x86: unify mp_register_gsi
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

Alexey Starikovskiy   authored and   Ingo Molnar   commited 2008-04-17 17:41:36 +02:00
cfa08d6cc3
x86: unify mp_config_acpi_legacy_irqs
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

Alexey Starikovskiy   authored and   Ingo Molnar   commited 2008-04-17 17:41:36 +02:00
c769bfee57
x86: unify mp_register_ioapic
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

Alexey Starikovskiy   authored and   Ingo Molnar   commited 2008-04-17 17:41:36 +02:00
57b733e902
x86: unify uniq_io_apic_id
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

Alexey Starikovskiy   authored and   Ingo Molnar   commited 2008-04-17 17:41:36 +02:00
22cbb4bd12
x86: unify smp_scan_config
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

Alexey Starikovskiy   authored and   Ingo Molnar   commited 2008-04-17 17:41:36 +02:00
92fd4b7abd
x86: unify get_smp_config
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

Alexey Starikovskiy   authored and   Ingo Molnar   commited 2008-04-17 17:41:36 +02:00
4421b1c8b9
x86: unify construct_default_ioirq_mptable
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

Alexey Starikovskiy   authored and   Ingo Molnar   commited 2008-04-17 17:41:36 +02:00
62441bf1e0
x86: unify smp_read_mpc
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

Alexey Starikovskiy   authored and   Ingo Molnar   commited 2008-04-17 17:41:35 +02:00
e950bea8bf
x86: unify mp_bus_info
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

Alexey Starikovskiy   authored and   Ingo Molnar   commited 2008-04-17 17:41:35 +02:00
f8924e770e
x86: unify arch/x86/kernel/mpparse_64.c
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

Alexey Starikovskiy   authored and   Ingo Molnar   commited 2008-04-17 17:41:35 +02:00
746f224406
x86: add early flags to mpparse_32.c
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

Alexey Starikovskiy   authored and   Ingo Molnar   commited 2008-04-17 17:41:35 +02:00
888032cd23
x86: lindent mpparse_32.c
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

Alexey Starikovskiy   authored and   Ingo Molnar   commited 2008-04-17 17:41:35 +02:00
4ef81297f7
x86: move mp_register_lapic_address to boot.c
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

Alexey Starikovskiy   authored and   Ingo Molnar   commited 2008-04-17 17:41:35 +02:00
31d2092eb0
x86: move mp_register_lapic to boot.c
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

Alexey Starikovskiy   authored and   Ingo Molnar   commited 2008-04-17 17:41:35 +02:00
dfac2189c2
x86: move up & smp variables to setup.c
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

Alexey Starikovskiy   authored and   Ingo Molnar   commited 2008-04-17 17:41:35 +02:00
2fe6014757
x86: move mp_irqs to io_apic_64.c
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

Alexey Starikovskiy   authored and   Ingo Molnar   commited 2008-04-17 17:41:35 +02:00
350bae1d3f
x86: move mp_irqs to io_apics_32.c
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

Alexey Starikovskiy   authored and   Ingo Molnar   commited 2008-04-17 17:41:35 +02:00
584f734d03
x86: move mp_ioapic_routing to boot.c
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

Alexey Starikovskiy   authored and   Ingo Molnar   commited 2008-04-17 17:41:35 +02:00
9e5c5f1dd2
x86: move mp_ioapics to io_apic_64.c
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

Alexey Starikovskiy   authored and   Ingo Molnar   commited 2008-04-17 17:41:35 +02:00
9c7408f3c4