kernel/kernel-generic.git
16 years agox86/pci: renaming numa into numaq
Robert Richter [Fri, 11 Jul 2008 10:18:41 +0000 (12:18 +0200)]
x86/pci: renaming numa into numaq

Cc: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Robert Richter <robert.richter@amd.com>
Cc: Robert Richter <robert.richter@amd.com>
Cc: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86/pci: renamed: numa.c -> numaq_32.c
Robert Richter [Fri, 11 Jul 2008 10:18:40 +0000 (12:18 +0200)]
x86/pci: renamed: numa.c -> numaq_32.c

Cc: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Robert Richter <robert.richter@amd.com>
Cc: Robert Richter <robert.richter@amd.com>
Cc: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86/pci: Changing subsystem initialization order for NUMA
Robert Richter [Fri, 11 Jul 2008 10:14:27 +0000 (12:14 +0200)]
x86/pci: Changing subsystem initialization order for NUMA

Cc: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Robert Richter <robert.richter@amd.com>
Cc: Robert Richter <robert.richter@amd.com>
Cc: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86/pci: Removing pci-y in Makefile
Robert Richter [Fri, 11 Jul 2008 10:13:59 +0000 (12:13 +0200)]
x86/pci: Removing pci-y in Makefile

Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Robert Richter <robert.richter@amd.com>
Cc: Robert Richter <robert.richter@amd.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agoMerge branch 'x86/generalize-visws' into x86/core
Ingo Molnar [Fri, 11 Jul 2008 19:22:18 +0000 (21:22 +0200)]
Merge branch 'x86/generalize-visws' into x86/core

16 years agox86: Recover timer_ack lost in the merge of the NMI watchdog
Maciej W. Rozycki [Fri, 11 Jul 2008 18:47:15 +0000 (19:47 +0100)]
x86: Recover timer_ack lost in the merge of the NMI watchdog

In the course of the recent unification of the NMI watchdog an assignment
to timer_ack to switch off unnecesary POLL commands to the 8259A in the
case of a watchdog failure has been accidentally removed.  The statement
used to be limited to the 32-bit variation as since the rewrite of the
timer code it has been relevant for the 82489DX only.  This change brings
it back.

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: I/O APIC: Never configure IRQ2
Maciej W. Rozycki [Fri, 11 Jul 2008 18:35:23 +0000 (19:35 +0100)]
x86: I/O APIC: Never configure IRQ2

There is no such entity as ISA IRQ2.  The ACPI spec does not make it
explicitly clear, but does not preclude it either -- all it says is ISA
legacy interrupts are identity mapped by default (subject to overrides),
but it does not state whether IRQ2 exists or not.  As a result if there is
no IRQ0 override, then IRQ2 is normally initialised as an ISA interrupt,
which implies an edge-triggered line, which is unmasked by default as this
is what we do for edge-triggered I/O APIC interrupts so as not to miss an
edge.

To the best of my knowledge it is useless, as IRQ2 has not been in use
since the PC/AT as back then it was taken by the 8259A cascade interrupt
to the slave, with the line position in the slot rerouted to newly-created
IRQ9.  No device could thus make use of this line with the pair of 8259A
chips.  Now in theory INTIN2 of the I/O APIC may be usable, but the
interrupt of the device wired to it would not be available in the PIC mode
at all, so I seriously doubt if anybody decided to reuse it for a regular
device.

However there are two common uses of INTIN2.  One is for IRQ0, with an
ACPI interrupt override (or its equivalent in the MP table).  But in this
case IRQ2 is gone entirely with INTIN0 left vacant.  The other one is for
an 8959A ExtINTA cascade.  In this case IRQ0 goes to INTIN0 and if ACPI is
used INTIN2 is assumed to be IRQ2 (there is no override and ACPI has no
way to report ExtINTA interrupts).  This is where a problem happens.

The problem is INTIN2 is configured as a native APIC interrupt, with a
vector assigned and the mask cleared.  And the line may indeed get active
and inject interrupts if the master 8959A has its timer interrupt enabled
(it might happen for other interrupts too, but they are normally masked in
the process of rerouting them to the I/O APIC).  There are two cases where
it will happen:

* When the I/O APIC NMI watchdog is enabled.  This is actually a misnomer
  as the watchdog pulses are delivered through the 8259A to the LINT0
  inputs of all the local APICs in the system.  The implication is the
  output of the master 8259A goes high and low repeatedly, signalling
  interrupts to INTIN2 which is enabled too!

  [The origin of the name is I think for a brief period during the
  development we had a capability in our code to configure the watchdog to
  use an I/O APIC input; that would be INTIN2 in this scenario.]

* When the native route of IRQ0 via INTIN0 fails for whatever reason -- as
  it happens with the system considered here.  In this scenario the timer
  pulse is delivered through the 8259A to LINT0 input of the local APIC of
  the bootstrap processor, quite similarly to how is done for the watchdog
  described above.  The result is, again, INTIN2 receives these pulses
  too.  Rafael's system used to escape this scenario, because an incorrect
  IRQ0 override would occupy INTIN2 and prevent it from being unmasked.

My conclusion is IRQ2 should be excluded from configuration in all the
cases and the current exception for ACPI systems should be lifted.  The
reason being the exception not only being useless, but harmful as well.

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Matthew Garrett <mjg59@srcf.ucam.org>
Cc: Andreas Herrmann <andreas.herrmann3@amd.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: L-APIC: Always fully configure IRQ0
Maciej W. Rozycki [Fri, 11 Jul 2008 18:35:17 +0000 (19:35 +0100)]
x86: L-APIC: Always fully configure IRQ0

Unlike the 32-bit one, the 64-bit variation of the LVT0 setup code for
the "8259A Virtual Wire" through the local APIC timer configuration does
not fully configure the relevant irq_chip structure.  Instead it relies on
the preceding I/O APIC code to have set it up, which does not happen if
the I/O APIC variants have not been tried.

The patch includes corresponding changes to the 32-bit variation too
which make them both the same, barring a small syntactic difference
involving sequence of functions in the source.  That should work as an aid
with the upcoming merge.

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Matthew Garrett <mjg59@srcf.ucam.org>
Cc: Andreas Herrmann <andreas.herrmann3@amd.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: L-APIC: Set IRQ0 as edge-triggered
Maciej W. Rozycki [Fri, 11 Jul 2008 18:34:36 +0000 (19:34 +0100)]
x86: L-APIC: Set IRQ0 as edge-triggered

 IRQ0 is edge-triggered, but the "8259A Virtual Wire" through the local
APIC configuration in the 32-bit version uses the "fasteoi" handler
suitable for level-triggered APIC interrupt.  Rewrite code so that the
"edge" handler is used.  The 64-bit version uses different code and is
unaffected.

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Matthew Garrett <mjg59@srcf.ucam.org>
Cc: Andreas Herrmann <andreas.herrmann3@amd.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: merge dwarf2 headers
Glauber Costa [Fri, 11 Jul 2008 15:36:52 +0000 (12:36 -0300)]
x86: merge dwarf2 headers

Merge dwarf2_32.h and dwarf2_64.h into dwarf2.h.

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: use AS_CFI instead of UNWIND_INFO
Glauber Costa [Thu, 10 Jul 2008 18:17:53 +0000 (15:17 -0300)]
x86: use AS_CFI instead of UNWIND_INFO

In dwarf2_32.h, test for CONFIG_AS_CFI instead of
CONFIG_UNWIND_INFO. Turns out that searching for UNWIND_INFO
returns no match in any Kconfig or Makefile, so we're really
just throwing everything away regarding dwarf frames for i386.

The test that generates CONFIG_AS_CFI does not have anything
x86_64-specific, and right now, checking V=1 builds shows me
that the flags is there anyway, although unused.

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: use ignore macro instead of hash comment
Glauber Costa [Thu, 10 Jul 2008 18:14:57 +0000 (15:14 -0300)]
x86: use ignore macro instead of hash comment

In dwarf_64.h header, use the "ignore" macro the way
i386 does.

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: use matching CFI_ENDPROC
Glauber Costa [Thu, 10 Jul 2008 18:09:20 +0000 (15:09 -0300)]
x86: use matching CFI_ENDPROC

The RING0_INT_FRAME macro defines a CFI_STARTPROC.
So we should really be using CFI_ENDPROC after it.

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: fix savesegment() bug causing crashes on 64-bit
Ingo Molnar [Fri, 11 Jul 2008 17:41:19 +0000 (19:41 +0200)]
x86: fix savesegment() bug causing crashes on 64-bit

i spent a fair amount of time chasing a 64-bit bootup crash that manifested
itself as bootup segfaults:

  S10network[1825]: segfault at 7f3e2b5d16b8 ip 00000031108748c9 sp 00007fffb9c14c70 error 4 in libc-2.7.so[3110800000+14d000]

eventually causing init to die and panic the system:

  Kernel panic - not syncing: Attempted to kill init!
  Pid: 1, comm: init Not tainted 2.6.26-rc9-tip #13878

after a maratonic bisection session, the bad commit turned out to be:

b7675791859075418199c7af86a116ea34eaf5bd is first bad commit
| commit b7675791859075418199c7af86a116ea34eaf5bd
| Author: Jeremy Fitzhardinge <jeremy@goop.org>
| Date:   Wed Jun 25 00:19:00 2008 -0400
|
|     x86: remove open-coded save/load segment operations
|
|     This removes a pile of buggy open-coded implementations of savesegment
|     and loadsegment.

after some more bisection of this patch itself, it turns out that what
makes the difference are the savesegment() changes to __switch_to().

Taking a look at this portion of arch/x86/kernel/process_64.o revealed
this crutial difference:

| good:    99c:       8c e0                   mov    %fs,%eax
|          99e:       89 45 cc                mov    %eax,-0x34(%rbp)
|
| bad:     99c:       8c 65 cc                mov    %fs,-0x34(%rbp)

which is due to:

|                 unsigned fsindex;
| -               asm volatile("movl %%fs,%0" : "=r" (fsindex));
| +               savesegment(fs, fsindex);

savesegment() is implemented as:

 #define savesegment(seg, value)                                \
          asm("mov %%" #seg ",%0":"=rm" (value) : : "memory")

note the "m" modifier - it allows GCC to generate the segment move
into a memory operand as well.

But regarding segment operands there's a subtle detail in the x86
instruction set: the above 16-bit moves are zero-extend, but only
if it goes to a register.

If it goes to a memory operand, -0x34(%rbp) in the above case, there's
no zero-extend to 32-bit and the instruction will only save 16 bits
instead of the intended 32-bit.

The other 16 bits is random data - which can cause problems when that
value is used later on.

The solution is to only allow segment operands to go to registers.
This fix allows my test-system to boot up without crashing.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86_64: vdso32 cleanup using feature flags
Jeremy Fitzhardinge [Fri, 11 Jul 2008 01:13:36 +0000 (18:13 -0700)]
x86_64: vdso32 cleanup using feature flags

Use the X86_FEATURE_SYSENTER32 to remove hard-coded CPU vendor check.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86_64: add pseudo-features for 32-bit compat syscall
Jeremy Fitzhardinge [Thu, 10 Jul 2008 23:22:56 +0000 (16:22 -0700)]
x86_64: add pseudo-features for 32-bit compat syscall

Add pseudo-feature bits to describe whether the CPU supports sysenter
and/or syscall from ia32-compat userspace.  This removes a hardcoded
test in vdso32-setup.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: fix tsc unification buglet with ftrace and stackprotector
Ingo Molnar [Fri, 11 Jul 2008 13:09:15 +0000 (15:09 +0200)]
x86: fix tsc unification buglet with ftrace and stackprotector

Yinghai Lu reported crashes on 64-bit x86:

 BUG: unable to handle kernel NULL pointer dereference at 0000000000000000
 IP: [<ffffffff80253b17>] hrtick_start_fair+0x89/0x173
 [...]

And with a long session of debugging and a lot of difficulty, tracked it down
to this commit:

 --------------->
 8fbbc4b45ce3e4c0eeb15004c79c72b6896a79c2 is first bad commit
 commit 8fbbc4b45ce3e4c0eeb15004c79c72b6896a79c2
 Author: Alok Kataria <akataria@vmware.com>
 Date:   Tue Jul 1 11:43:34 2008 -0700

     x86: merge tsc_init and clocksource code
 <--------------

The problem is that the TSC unification missed these Makefile rules
in arch/x86/kernel/Makefile:

  # Do not profile debug and lowlevel utilities
  CFLAGS_REMOVE_tsc_64.o = -pg
  CFLAGS_REMOVE_tsc_32.o = -pg
  ...
  CFLAGS_tsc_64.o         := $(nostackp)
  ...

which rules make sure that various instrumentation and debugging
facilities are disabled for code that might end up in a VDSO - such as
the TSC code.

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

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: introduce max_low_pfn_mapped for 64-bit
Yinghai Lu [Fri, 11 Jul 2008 03:38:26 +0000 (20:38 -0700)]
x86: introduce max_low_pfn_mapped for 64-bit

when more than 4g memory is installed, don't map the big hole below 4g.

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: reserve SLIT
Yinghai Lu [Fri, 11 Jul 2008 03:36:37 +0000 (20:36 -0700)]
x86: reserve SLIT

save the SLIT, in case we are using fixmap to read it, and that fixmap
could be cleared by others.

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: e820: user-defined memory maps: remove the range instead of update it to reserved
Yinghai Lu [Thu, 10 Jul 2008 11:17:00 +0000 (04:17 -0700)]
x86: e820: user-defined memory maps: remove the range instead of update it to reserved

also let mem= to print out modified e820 map too

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Cc: Bernhard Walle <bwalle@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: fix compile error in current tip.git
Jeremy Fitzhardinge [Thu, 10 Jul 2008 19:52:52 +0000 (12:52 -0700)]
x86: fix compile error in current tip.git

Gas 2.15 complains about 32-bit registers being used in lea.

  AS      arch/x86/lib/copy_user_64.o
/local/scratch-2/jeremy/hg/xen/paravirt/linux/arch/x86/lib/copy_user_64.S: Assembler messages:
/local/scratch-2/jeremy/hg/xen/paravirt/linux/arch/x86/lib/copy_user_64.S:188: Error: `(%edx,%ecx,8)' is not a valid 64 bit base/index expression
/local/scratch-2/jeremy/hg/xen/paravirt/linux/arch/x86/lib/copy_user_64.S:257: Error: `(%edx,%ecx,8)' is not a valid 64 bit base/index expression
  AS      arch/x86/lib/copy_user_nocache_64.o
/local/scratch-2/jeremy/hg/xen/paravirt/linux/arch/x86/lib/copy_user_nocache_64.S: Assembler messages:
/local/scratch-2/jeremy/hg/xen/paravirt/linux/arch/x86/lib/copy_user_nocache_64.S:107: Error: `(%edx,%ecx,8)' is not a valid 64 bit base/index expression

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Cc: Vitaly Mayatskikh <v.mayatskih@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86, VisWS: fix pci_direct_conf1 dependency
Ingo Molnar [Thu, 10 Jul 2008 18:06:30 +0000 (20:06 +0200)]
x86, VisWS: fix pci_direct_conf1 dependency

fix:

 arch/x86/pci/built-in.o: In function `pci_subsys_init':
 visws.c:(.init.text+0xfc5): undefined reference to `pci_direct_conf1'

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86, VisWS: build fix
Ingo Molnar [Thu, 10 Jul 2008 17:47:49 +0000 (19:47 +0200)]
x86, VisWS: build fix

fix:

 arch/x86/kernel/built-in.o: In function `visws_early_detect':
 : undefined reference to `mach_get_smp_config_quirk'
 arch/x86/kernel/built-in.o: In function `visws_early_detect':
 : undefined reference to `mach_find_smp_config_quirk'

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: remove duplicate call to use_tsc_delay
Glauber Costa [Thu, 10 Jul 2008 17:01:47 +0000 (14:01 -0300)]
x86: remove duplicate call to use_tsc_delay

Integration generated a duplicate call to use_tsc_delay.
Particularly, the one that is done before we check for general
tsc usability seems wrong.

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86, VisWS: build fix
Ingo Molnar [Thu, 10 Jul 2008 17:39:55 +0000 (19:39 +0200)]
x86, VisWS: build fix

fix:

arch/x86/kernel/visws_quirks.c: In function ‘visws_early_detect’:
arch/x86/kernel/visws_quirks.c:293: error: ‘no_broadcast’ undeclared (first use in this function)
arch/x86/kernel/visws_quirks.c:293: error: (Each undeclared identifier is reported only once
arch/x86/kernel/visws_quirks.c:293: error: for each function it appears in.)
make[1]: *** [arch/x86/kernel/visws_quirks.o] Error 1
make: *** [arch/x86/kernel/visws_quirks.o] Error 2

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86, VisWS: do not allow VisWS for Voyager
Ingo Molnar [Thu, 10 Jul 2008 17:37:44 +0000 (19:37 +0200)]
x86, VisWS: do not allow VisWS for Voyager

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86, VisWS: turn into generic arch, update include file change
Ingo Molnar [Thu, 10 Jul 2008 17:35:33 +0000 (19:35 +0200)]
x86, VisWS: turn into generic arch, update include file change

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86/pci: fix warnings in subsys_initcall functions
Robert Richter [Thu, 10 Jul 2008 16:58:25 +0000 (18:58 +0200)]
x86/pci: fix warnings in subsys_initcall functions

Signed-off-by: Robert Richter <robert.richter@amd.com>
Cc: Robert Richter <robert.richter@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86/pci merge: fixing numaq initialization
Robert Richter [Thu, 10 Jul 2008 16:58:24 +0000 (18:58 +0200)]
x86/pci merge: fixing numaq initialization

Patch d49c4288 (tip/x86/mpparse) introduced some changes in calling
subsys_init calls if CONFIG_X86_NUMAQ option is set. This patch
updates subsystem initalization according to this changes.

Signed-off-by: Robert Richter <robert.richter@amd.com>
Cc: Robert Richter <robert.richter@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86, VisWS: turn into generic arch, eliminate Kconfig specials
Ingo Molnar [Thu, 10 Jul 2008 15:02:10 +0000 (17:02 +0200)]
x86, VisWS: turn into generic arch, eliminate Kconfig specials

remove leftover traces of various VISWS related Kconfig specials.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86, VisWS: turn into generic arch, remove leftover files
Ingo Molnar [Thu, 10 Jul 2008 14:45:50 +0000 (16:45 +0200)]
x86, VisWS: turn into generic arch, remove leftover files

remove leftover arch/x86/mach-visws/* files.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86, VisWS: turn into generic arch, clean up
Ingo Molnar [Thu, 10 Jul 2008 14:21:38 +0000 (16:21 +0200)]
x86, VisWS: turn into generic arch, clean up

merge traps_visws.c and apic_visws.c into visws_quirks.c.

(no code changed)

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86, VisWS: turn into generic arch, clean up
Ingo Molnar [Thu, 10 Jul 2008 14:20:32 +0000 (16:20 +0200)]
x86, VisWS: turn into generic arch, clean up

rename setup_visws.c to visws_quirks.c.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86, VisWS: turn into generic arch, IO-APIC setup fix
Ingo Molnar [Thu, 10 Jul 2008 14:14:56 +0000 (16:14 +0200)]
x86, VisWS: turn into generic arch, IO-APIC setup fix

skip IO-APIC setup on a VISWS if it's enabled.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86, VisWS: turn into generic arch, clean up
Ingo Molnar [Thu, 10 Jul 2008 14:09:50 +0000 (16:09 +0200)]
x86, VisWS: turn into generic arch, clean up

remove VISWS Kconfig complications, now that it's supported by the generic
architecture.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86, VisWS: turn into generic arch, flip over VISWS to generic arch
Ingo Molnar [Thu, 10 Jul 2008 13:55:27 +0000 (15:55 +0200)]
x86, VisWS: turn into generic arch, flip over VISWS to generic arch

this is the big move: flip over VISWS to generic arch support.

From this commit on CONFIG_X86_VISWS is just another (default-disabled)
option that turns on certain quirks - no other complications.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86, VisWS: turn into generic arch, copy visws files
Ingo Molnar [Thu, 10 Jul 2008 13:50:37 +0000 (15:50 +0200)]
x86, VisWS: turn into generic arch, copy visws files

copy arch/x86/mach-visws/setup_visws.c, apic_visws.c and traps_visws.c
files to arch/x86/kernel/, in preparation of the switchover to a
non-subarch setup for VISWS.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86, VisWS: turn into generic arch, add early quirks to default architectures
Ingo Molnar [Thu, 10 Jul 2008 13:48:48 +0000 (15:48 +0200)]
x86, VisWS: turn into generic arch, add early quirks to default architectures

add early quirk support to the generic architecture code.

this allows VISWS to be supported by the generic code and allows us
to remove the VISWS subarch.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86, VisWS: turn into generic arch, add NR_IRQS quirk
Ingo Molnar [Thu, 10 Jul 2008 13:42:50 +0000 (15:42 +0200)]
x86, VisWS: turn into generic arch, add NR_IRQS quirk

NR_IRQS: let VISWS be just a sub-case of the generic code.

This can create a somewhat larger irq_desc[] array if NR_CPUS is high
but that should not worry VisWS which has 4 CPUs at most.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86, VisWS: turn into generic arch, eliminate include/asm-x86/mach-visws/setup_arch.h
Ingo Molnar [Thu, 10 Jul 2008 13:33:49 +0000 (15:33 +0200)]
x86, VisWS: turn into generic arch, eliminate include/asm-x86/mach-visws/setup_arch.h

use the generic version of setup_arch.h - it's the same.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86, VisWS: turn into generic arch, move definitions
Ingo Molnar [Thu, 10 Jul 2008 13:31:35 +0000 (15:31 +0200)]
x86, VisWS: turn into generic arch, move definitions

move the SGIVW definitions from setup_arch.h into its own header file.

preparation for turning VISWS into a generic PC architecture.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86, VisWS: turn into generic arch, create include/asm-x86/visws/
Ingo Molnar [Thu, 10 Jul 2008 13:25:21 +0000 (15:25 +0200)]
x86, VisWS: turn into generic arch, create include/asm-x86/visws/

move the include/asm-x86/mach-visws/ VISWS specific hardware
details include files into include/asm-x86/visws, to be used from
generic code.

No code changed.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86, VisWS: turn into generic arch, eliminate asm-x86/mach-visws/mach_apicdef.h
Ingo Molnar [Thu, 10 Jul 2008 13:13:41 +0000 (15:13 +0200)]
x86, VisWS: turn into generic arch, eliminate asm-x86/mach-visws/mach_apicdef.h

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86, VisWS: turn into generic arch, update asm-x86/mach-visws/mach_apicdef.h
Ingo Molnar [Thu, 10 Jul 2008 13:12:05 +0000 (15:12 +0200)]
x86, VisWS: turn into generic arch, update asm-x86/mach-visws/mach_apicdef.h

update asm-x86/mach-visws/mach_apicdef.h to the generic version.

This should work fine as VISWS has a standard local APIC and thus
its mach_apicdef.h copy is just an ancient version of the generic code.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86, VisWS: turn into generic arch, eliminate include/asm-x86/mach-visws/smpboot_hooks.h
Ingo Molnar [Thu, 10 Jul 2008 13:10:29 +0000 (15:10 +0200)]
x86, VisWS: turn into generic arch, eliminate include/asm-x86/mach-visws/smpboot_hooks.h

now that include/asm-x86/mach-visws/smpboot_hooks.h equals
to the default file in ../mach-default/smpboot_hooks.h, simply
include it instead of maintaining a copy.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86, VisWS: turn into generic arch, update include/asm-x86/mach-visws/smpboot_hooks.h
Ingo Molnar [Thu, 10 Jul 2008 13:06:07 +0000 (15:06 +0200)]
x86, VisWS: turn into generic arch, update include/asm-x86/mach-visws/smpboot_hooks.h

update include/asm-x86/mach-visws/smpboot_hooks.h to
include/asm-x86/mach-default/smpboot_hooks.h (the generic version).

this _should_ work, because VISWS sets skip_ioapic_setup, but it
should be tested on a real VISWS to make sure.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86, VisWS: turn into generic arch, enhance include/asm-x86/mach-default/smpboot_hooks.h
Ingo Molnar [Thu, 10 Jul 2008 13:09:04 +0000 (15:09 +0200)]
x86, VisWS: turn into generic arch, enhance include/asm-x86/mach-default/smpboot_hooks.h

Allow the generic smpboot quirks code to be built with
ONFIG_X86_IO_APIC disabled. This way VISWS will be able
to use it as-is.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86, VisWS: turn into generic arch, eliminate include/asm-x86/mach-visws/mach_apic.h
Ingo Molnar [Thu, 10 Jul 2008 13:04:13 +0000 (15:04 +0200)]
x86, VisWS: turn into generic arch, eliminate include/asm-x86/mach-visws/mach_apic.h

now that include/asm-x86/mach-visws/mach_apic.h equals
to include/asm-x86/mach-default/mach_apic.h, simply start
using the generic one.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86, VisWS: turn into generic arch, update asm-x86/mach-visws/mach_apic.h
Ingo Molnar [Thu, 10 Jul 2008 13:01:54 +0000 (15:01 +0200)]
x86, VisWS: turn into generic arch, update asm-x86/mach-visws/mach_apic.h

update asm-x86/mach-visws/mach_apic.h to the generic version.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86, VisWS: turn into generic arch, install proper PCI quirk
Ingo Molnar [Thu, 10 Jul 2008 14:53:21 +0000 (16:53 +0200)]
x86, VisWS: turn into generic arch, install proper PCI quirk

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86, VisWS: turn into generic arch, use generic mpparse code
Ingo Molnar [Thu, 10 Jul 2008 12:42:03 +0000 (14:42 +0200)]
x86, VisWS: turn into generic arch, use generic mpparse code

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86, VisWS: turn into generic arch, add early init quirks
Ingo Molnar [Thu, 10 Jul 2008 11:31:04 +0000 (13:31 +0200)]
x86, VisWS: turn into generic arch, add early init quirks

add early init quirks for VisWS. This gradually turns the VISWS subarch
into a generic PC architecture.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86, VisWS: turn into generic arch, make VisWS boot on a regular PC
Ingo Molnar [Thu, 10 Jul 2008 14:29:28 +0000 (16:29 +0200)]
x86, VisWS: turn into generic arch, make VisWS boot on a regular PC

first step: make the VISWS subarch boot on a regular PC.

We take various shortcuts for that. We copy the generic arch setup file over
into the VISWS setup file.

This is the only step that is not expected to boot on a real VISWS.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: add early quirk support
Ingo Molnar [Thu, 10 Jul 2008 15:30:40 +0000 (17:30 +0200)]
x86: add early quirk support

Add early quirks support.

In preparation of enabling the generic architecture to boot on a VISWS.

This will allow us to remove the VISWS subarch and all its complications.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agoMerge branch 'x86/core' into x86/generalize-visws
Ingo Molnar [Thu, 10 Jul 2008 16:55:17 +0000 (18:55 +0200)]
Merge branch 'x86/core' into x86/generalize-visws

16 years agoMerge branch 'x86/unify-pci' into x86/core
Ingo Molnar [Thu, 10 Jul 2008 16:47:29 +0000 (18:47 +0200)]
Merge branch 'x86/unify-pci' into x86/core

16 years agox86: fix visws and vsmp build
Ingo Molnar [Thu, 10 Jul 2008 10:21:58 +0000 (12:21 +0200)]
x86: fix visws and vsmp build

these two sub-architectures want PCI to be default-on, not default-off.

Reported-by: Robert Richter <robert.richter@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: I/O APIC: Add a 64-bit variation of replace_pin_at_irq()
Maciej W. Rozycki [Tue, 1 Jul 2008 00:19:31 +0000 (01:19 +0100)]
x86: I/O APIC: Add a 64-bit variation of replace_pin_at_irq()

When an interrupt is rerouted to a different I/O APIC pin the relevant
entry of the irq_2_pin list should get updated accordingly so that
operations are performed on the correct redirection entry.

This is already done by the 32-bit variation of the code and here is a
complementing 64-bit implementation.  Should make someone's decision less
tough when merging the two. ;)

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agoRevert "x86: fix IO APIC breakage on HP nx6325"
Ingo Molnar [Thu, 10 Jul 2008 09:00:50 +0000 (11:00 +0200)]
Revert "x86: fix IO APIC breakage on HP nx6325"

This reverts commit 90221a61a71b7ad659d8741cf1e404506b174982.

This too was just temporary diagnostics - not needed now that we've
got the final fix via:

| commit e2079c43861f71b2deb78ee20e247ad954fdd67e
| Author: Rafael J. Wysocki <rjw@sisk.pl>
| Date:   Tue Jul 8 16:12:26 2008 +0200
|
|     x86: fix C1E && nx6325 stability problem

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agoRevert "x86: fix IO APIC breakage on HP nx6325, v2"
Ingo Molnar [Thu, 10 Jul 2008 08:59:59 +0000 (10:59 +0200)]
Revert "x86: fix IO APIC breakage on HP nx6325, v2"

This reverts commit a74a1cc3df0be89658bc735c8aed80c8392e2c15.

This was just temporary diagnostics commit - not needed now that we've
got the final fix.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86, AMD IOMMU: clean up Kconfig entry
FUJITA Tomonori [Thu, 10 Jul 2008 00:50:50 +0000 (09:50 +0900)]
x86, AMD IOMMU: clean up Kconfig entry

AMD_IOMMU should depend on IOMMU_HELPER since they are the IOMMU
helper functions. SWIOTLB requires IOMMU_HELPER so declaring that
AMD_IOMMU depends on SWIOTLB properly fixes the problems.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: clean up iommu.h and gart.h
FUJITA Tomonori [Wed, 9 Jul 2008 23:27:49 +0000 (08:27 +0900)]
x86: clean up iommu.h and gart.h

This remove lots of duplications in iommu.h and gart.h.

The end result of this patch is:

- iommu.h is a header file for everyone related with IOMMUs.

- gart.h is the private header file. Only pci-gart_64.c and its friends
  include it.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: fujita.tomonori@lab.ntt.co.jp
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agoMerge branch 'x86/gart' into x86/core
Ingo Molnar [Thu, 10 Jul 2008 08:43:11 +0000 (10:43 +0200)]
Merge branch 'x86/gart' into x86/core

16 years agox86: make e820_end return end_of_ram again for 64bit
Yinghai Lu [Thu, 10 Jul 2008 03:17:50 +0000 (20:17 -0700)]
x86: make e820_end return end_of_ram again for 64bit

even on 64bit systems with less than 4G RAM, we can now use fixmap
to handle acpi SIT near end of ram.

change e820_end to e820_end_of_ram again?
or e820_ram_pfn?

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86, acpi: merge __acpi_map_table
Yinghai Lu [Thu, 10 Jul 2008 03:16:36 +0000 (20:16 -0700)]
x86, acpi: merge __acpi_map_table

and let 64-bit to fall back to use fixmap too.

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: overmapped fix when 4K pages on tail, 64-bit
Yinghai Lu [Thu, 10 Jul 2008 03:15:02 +0000 (20:15 -0700)]
x86: overmapped fix when 4K pages on tail, 64-bit

fix phys_pmd_init to make sure not to return bigger value than end.

also print out range split:1G/2M/4K in init_memory_mapping().

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: build fix for "x86: fix C1E && nx6325 stability problem"
Ingo Molnar [Wed, 9 Jul 2008 11:07:23 +0000 (13:07 +0200)]
x86: build fix for "x86: fix C1E && nx6325 stability problem"

fix:

 arch/x86/kernel/built-in.o: In function `dmi_ignore_irq0_timer_override':
 boot.c:(.init.text+0x3ea4): undefined reference to `force_mask_ioapic_irq_2'

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: fix copy_user on x86
Vitaly Mayatskikh [Wed, 2 Jul 2008 13:53:13 +0000 (15:53 +0200)]
x86: fix copy_user on x86

Switch copy_user_generic_string(), copy_user_generic_unrolled() and
__copy_user_nocache() from custom tail handlers to generic
copy_user_tail_handle().

Signed-off-by: Vitaly Mayatskikh <v.mayatskih@gmail.com>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: introduce copy_user_handle_tail() routine
Vitaly Mayatskikh [Wed, 2 Jul 2008 13:48:21 +0000 (15:48 +0200)]
x86: introduce copy_user_handle_tail() routine

Introduce generic C routine for handling necessary tail operations after
protection fault in copy_*_user on x86.

Signed-off-by: Vitaly Mayatskikh <v.mayatskih@gmail.com>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agoMerge branch 'x86/unify-lib' into x86/core
Ingo Molnar [Wed, 9 Jul 2008 13:00:48 +0000 (15:00 +0200)]
Merge branch 'x86/unify-lib' into x86/core

16 years agox86: e820 memmap - add checking for NULL early param
Cyrill Gorcunov [Sat, 5 Jul 2008 11:53:39 +0000 (15:53 +0400)]
x86: e820 memmap - add checking for NULL early param

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: akpm@linux-foundation.org
Cc: andi@firstfloor.org
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: make e820_end return max ram type only for 32 bit
Yinghai Lu [Wed, 9 Jul 2008 10:01:14 +0000 (03:01 -0700)]
x86: make e820_end return max ram type only for 32 bit

to avoid warning from find_low_pfn_range for high pages size etc

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86/pci: removing subsys_initcall ordering dependencies
Robert Richter [Wed, 2 Jul 2008 20:50:29 +0000 (22:50 +0200)]
x86/pci: removing subsys_initcall ordering dependencies

So far subsys_initcalls has been executed in this order depending on
the object order in the Makefile:

arch/x86/pci/visws.c:subsys_initcall(pcibios_init);
arch/x86/pci/numa.c:subsys_initcall(pci_numa_init);
arch/x86/pci/acpi.c:subsys_initcall(pci_acpi_init);
arch/x86/pci/legacy.c:subsys_initcall(pci_legacy_init);
arch/x86/pci/irq.c:subsys_initcall(pcibios_irq_init);
arch/x86/pci/common.c:subsys_initcall(pcibios_init);

This patch removes the ordering dependency. There is now only one
subsys_initcall function that contains subsystem initialization code
with a defined order.

Signed-off-by: Robert Richter <robert.richter@amd.com>
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86/pci: visws: renaming pcibios_init()
Robert Richter [Wed, 2 Jul 2008 20:50:28 +0000 (22:50 +0200)]
x86/pci: visws: renaming pcibios_init()

Signed-off-by: Robert Richter <robert.richter@amd.com>
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86/pci: Makefile merge: coalescing 32 and 64 bit
Robert Richter [Wed, 2 Jul 2008 20:50:27 +0000 (22:50 +0200)]
x86/pci: Makefile merge: coalescing 32 and 64 bit

Signed-off-by: Robert Richter <robert.richter@amd.com>
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86/pci: merge: moving mp_bus_to_node.c to amd_bus.c
Robert Richter [Wed, 2 Jul 2008 20:50:26 +0000 (22:50 +0200)]
x86/pci: merge: moving mp_bus_to_node.c to amd_bus.c

Signed-off-by: Robert Richter <robert.richter@amd.com>
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86/pci: mp_bus_to_node merge: moving code in amd_bus.c
Robert Richter [Wed, 2 Jul 2008 20:50:25 +0000 (22:50 +0200)]
x86/pci: mp_bus_to_node merge: moving code in amd_bus.c

Signed-off-by: Robert Richter <robert.richter@amd.com>
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86/pci: Makefile merge: creating pci-y for 64 bit
Robert Richter [Wed, 2 Jul 2008 20:50:24 +0000 (22:50 +0200)]
x86/pci: Makefile merge: creating pci-y for 64 bit

Signed-off-by: Robert Richter <robert.richter@amd.com>
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86/pci: Makefile merge: changing 64bit ordering
Robert Richter [Wed, 2 Jul 2008 20:50:23 +0000 (22:50 +0200)]
x86/pci: Makefile merge: changing 64bit ordering

This should be safe since mmconfig*.o and init.o do not contain
*initcalls with the same level as in other files.

Signed-off-by: Robert Richter <robert.richter@amd.com>
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86/pci: Makefile merge: decoupling options for mp_bus_to_node.o
Robert Richter [Wed, 2 Jul 2008 20:50:22 +0000 (22:50 +0200)]
x86/pci: Makefile merge: decoupling options for mp_bus_to_node.o

Signed-off-by: Robert Richter <robert.richter@amd.com>
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86/pci: Makefile merge: whitespace changes only
Robert Richter [Wed, 2 Jul 2008 20:50:21 +0000 (22:50 +0200)]
x86/pci: Makefile merge: whitespace changes only

Signed-off-by: Robert Richter <robert.richter@amd.com>
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86/pci: Makefile merge: removing include dir flag
Robert Richter [Wed, 2 Jul 2008 20:50:20 +0000 (22:50 +0200)]
x86/pci: Makefile merge: removing include dir flag

Signed-off-by: Robert Richter <robert.richter@amd.com>
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86/pci: Makefile merge: Removing Makefile_*
Robert Richter [Wed, 2 Jul 2008 20:50:19 +0000 (22:50 +0200)]
x86/pci: Makefile merge: Removing Makefile_*

No functional nor ordering changes here.

Signed-off-by: Robert Richter <robert.richter@amd.com>
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agoMerge branch 'x86/core' into x86/unify-pci
Ingo Molnar [Wed, 9 Jul 2008 09:39:02 +0000 (11:39 +0200)]
Merge branch 'x86/core' into x86/unify-pci

16 years agox86: build fix for "x86: fix C1E && nx6325 stability problem"
Ingo Molnar [Wed, 9 Jul 2008 09:32:10 +0000 (11:32 +0200)]
x86: build fix for "x86: fix C1E && nx6325 stability problem"

fix:

arch/x86/kernel/acpi/boot.c: In function ‘dmi_ignore_irq0_timer_override’:
arch/x86/kernel/acpi/boot.c:1443: error: implicit declaration of function ‘force_mask_ioapic_irq_2’

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: fix C1E && nx6325 stability problem
Rafael J. Wysocki [Tue, 8 Jul 2008 14:12:26 +0000 (16:12 +0200)]
x86: fix C1E && nx6325 stability problem

The problems are that, with the ACPI vs timer overring issue _fixed_,
after using the box for some time (between several seconds and 1 hour, at
random) processes get very high CPU loads (once I've got X using 107% of
the CPU, for example) and the system becomes unresponsive, as though there
were interrupts lost or something similar.

Andreas Herrman reproduced similar problems:

> Ok, now I've reproduced the stability problem.
> - Using tip/master,
> - reverting e38502eb8aa82314d5ab0eba45f50e6790dadd88 and
> - applying your patch from this posting
>   http://marc.info/?l=linux-kernel&m=121539354224562&w=4
>
> Starting X, firefox, gimp, tuxpaint and doing some drawing in tuxpaint
> results in a slow system. Drawing is almost not possible anymore --
> Selections of new colors, cursors etc. is performed with huge delay
> if it's performed at all.
>
> BTW, the code sets up timer IRQ as Virtual Wire IRQ:
>
> Jul  8 14:57:58 kodscha IO-APIC (apicid-pin) 2-22, 2-23 not connected.
> Jul  8 14:57:58 kodscha ..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1
> Jul  8 14:57:58 kodscha ...trying to set up timer as Virtual Wire IRQ... works.
>
> and both INT0 and INT2 of IOAPIC are masked:
>
> Jul  8 14:57:58 kodscha NR Dst Mask Trig IRR Pol Stat Dmod Deli Vect:
> Jul  8 14:57:58 kodscha 00 000 1    0    0   0   0    0    0    00
> Jul  8 14:57:58 kodscha 01 003 0    0    0   0   0    1    1    31
> Jul  8 14:57:58 kodscha 02 003 1    0    0   0   0    0    0    30
>
> I've also seen strange CPU utilization -- with syslog-ng:
>
> top - 15:33:06 up 35 min,  4 users,  load average: 1.70, 0.68, 0.37
> Tasks:  64 total,   4 running,  60 sleeping,   0 stopped,   0 zombie
> Cpu0  :  0.0%us,100.0%sy,  0.0%ni,  0.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
> Cpu1  :  6.4%us, 87.2%sy,  0.0%ni,  5.8%id,  0.0%wa,  0.6%hi,  0.0%si,  0.0%st
> Mem:    895384k total,   283568k used,   611816k free,    35492k buffers
> Swap:  1959920k total,        0k used,  1959920k free,   163044k cached
>
>   PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
>  4632 root      20   0 17216  800  580 S  104  0.1   0:34.22 syslog-ng
> 28505 root      20   0  205m  11m 4024 S    6  1.3   0:21.16 X
> 28518 root      20   0 56292 5652 4492 S    1  0.6   0:01.80 fluxbox
>     1 root      20   0  3724  608  508 S    0  0.1   0:00.36 init
>
> So far I have no clue why C1E-idle in conjunction with virtual wire
> mode causes this strange behaviour.
>
> ... and I start to think about the root cause of all this.
>
> I've performed similar tests under X with the IRQ0/INT0 configuration and
> I did not see above symptoms.

So lets fall back to the IRQ0/INT0 configuration on this box.

This basically restores the dont-use-the-lapic-timer exception mechanism
that was unconditional on this box prior commit 8750bf5 ("x86: add C1E
aware idle function").

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86, iommu: replace CONFIG_IOMMU with CONFIG_GART_IOMMU in iommu.h
FUJITA Tomonori [Wed, 9 Jul 2008 07:29:41 +0000 (16:29 +0900)]
x86, iommu: replace CONFIG_IOMMU with CONFIG_GART_IOMMU in iommu.h

Hmm, looks like it would be nice to have more cleanups of iommu.h and
gart.h.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: not overmap more than the end of RAM in init_memory_mapping - 64bit
Yinghai Lu [Tue, 8 Jul 2008 08:43:27 +0000 (01:43 -0700)]
x86: not overmap more than the end of RAM in init_memory_mapping - 64bit

handle head and tail that are not aligned to big pages (2MB/1GB boundary).

with this patch, on system that support gbpages, change:

  last_map_addr: 1080000000 end: 1078000000

to:

  last_map_addr: 1078000000 end: 1078000000

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: make max_pfn cover acpi table below 4g
Yinghai Lu [Wed, 9 Jul 2008 01:56:38 +0000 (18:56 -0700)]
x86: make max_pfn cover acpi table below 4g

When system have 4g less ram installed, and acpi table sit
near end of ram, make max_pfn cover them too,
so 64bit kernel don't need to mess up fixmap.

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Cc: "Suresh Siddha" <suresh.b.siddha@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: fix vmemmap printout check
Yinghai Lu [Thu, 3 Jul 2008 19:29:34 +0000 (12:29 -0700)]
x86: fix vmemmap printout check

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Cc: "Nick Piggin" <npiggin@suse.de>
Cc: "Mark McLoughlin" <markmc@redhat.com>
Cc: xen-devel <xen-devel@lists.xensource.com>
Cc: "Eduardo Habkost" <ehabkost@redhat.com>
Cc: "Vegard Nossum" <vegard.nossum@gmail.com>
Cc: "Stephen Tweedie" <sct@redhat.com>
Cc: "Jeremy Fitzhardinge" <jeremy@goop.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: introduce page_size_mask for 64bit
Yinghai Lu [Tue, 8 Jul 2008 08:41:05 +0000 (01:41 -0700)]
x86: introduce page_size_mask for 64bit

prepare for overmapped patch

also printout last_map_addr together with end

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: define architectural characteristics in uaccess.h.
Glauber Costa [Wed, 25 Jun 2008 17:56:53 +0000 (14:56 -0300)]
x86: define architectural characteristics in uaccess.h.

Remove them from the arch-specific file.

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: put movsl_mask into uaccess.h.
Glauber Costa [Wed, 25 Jun 2008 17:53:41 +0000 (14:53 -0300)]
x86: put movsl_mask into uaccess.h.

x86_64 does not need it, but it won't have X86_INTEL_USERCOPY
defined either.

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: move __get_user and __put_user into uaccess.h.
Glauber Costa [Wed, 25 Jun 2008 17:43:30 +0000 (14:43 -0300)]
x86: move __get_user and __put_user into uaccess.h.

We also carry the unaligned version with us. Only x86_64 uses
it, but there's no problem in defining it.

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: merge put_user.
Glauber Costa [Wed, 25 Jun 2008 16:17:43 +0000 (13:17 -0300)]
x86: merge put_user.

Move both versions, which are highly similar, to uaccess.h.
Note that, for x86_64, X86_WP_WORKS_OK is always defined.

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: turn __put_user_check directly into put_user.
Glauber Costa [Wed, 25 Jun 2008 16:00:48 +0000 (13:00 -0300)]
x86: turn __put_user_check directly into put_user.

We also check user pointer in x86_64 put_user, the way i386 does.

In a separate patch for bisecting purposes.

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: be more explicit in __put_user_x.
Glauber Costa [Wed, 25 Jun 2008 15:59:37 +0000 (12:59 -0300)]
x86: be more explicit in __put_user_x.

For both __put_user_x and __put_user_8 macros, pass the error
variable explicitly.

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: merge __get_user_asm and its users.
Glauber Costa [Wed, 25 Jun 2008 15:48:47 +0000 (12:48 -0300)]
x86: merge __get_user_asm and its users.

Move __get_user_asm and __get_user_size and __get_user_nocheck
to uaccess.h. This requires us to define a macro at __get_user_size
for the 64-bit access case.

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: don't always use EFAULT on __get_user_size.
Glauber Costa [Wed, 25 Jun 2008 14:57:33 +0000 (11:57 -0300)]
x86: don't always use EFAULT on __get_user_size.

Let the user of the macro specify the desired return.

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: merge __put_user_asm and its user.
Glauber Costa [Wed, 25 Jun 2008 14:48:29 +0000 (11:48 -0300)]
x86: merge __put_user_asm and its user.

Move both __put_user_asm and __put_user_size to
uaccess.h. i386 already had a special function for 64-bit access,
so for x86_64, we just define a macro with the same name.
Note that for X86_64, CONFIG_X86_WP_WORKS_OK will always
be defined, so the #else part will never be even compiled in.

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>