pandora-kernel.git
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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

15 years agoMerge branch 'for-2.6.26' of git://neil.brown.name/md
Linus Torvalds [Thu, 10 Jul 2008 16:49:46 +0000 (09:49 -0700)]
Merge branch 'for-2.6.26' of git://neil.brown.name/md

* 'for-2.6.26' of git://neil.brown.name/md:
  md: ensure all blocks are uptodate or locked when syncing

15 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

15 years agoocfs2: Fix flags in ocfs2_file_lock
Mark Fasheh [Thu, 10 Jul 2008 16:25:39 +0000 (09:25 -0700)]
ocfs2: Fix flags in ocfs2_file_lock

The stack-glue merge changed the way we use flags in dlmglue in that we now
use the fs/dlm equivalents. Unfortunately, a merge error left the new flock
code only partially updated. This took a while to show up though, because
the lock level constants are actually identical between o2dlm and fs/dlm.
The *_CONVERT and *_NOQUEUE flags have different values though, which is
eventually causing a crash in flags_to_o2dlm().

Signed-off-by: Mark Fasheh <mfasheh@suse.com>
15 years agocrypto: chainiv - Invoke completion function
Herbert Xu [Thu, 10 Jul 2008 09:42:36 +0000 (17:42 +0800)]
crypto: chainiv - Invoke completion function

When chainiv postpones requests it never calls their completion functions.
This causes symptoms such as memory leaks when IPsec is in use.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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

15 years agox86: fix /dev/mem compatibility under PAT
Venkatesh Pallipadi [Thu, 10 Jul 2008 08:09:59 +0000 (10:09 +0200)]
x86: fix /dev/mem compatibility under PAT

Add ioremap_default(), which gives a sane mapping without worrying about
type conflicts.

Use it in /dev/mem read in place of ioremap(), as with ioremap(),
any mapping of the region (other than UC_MINUS) will cause a conflict
and failure of /dev/mem read.

Should address the vbetest failure reported at:

  http://bugzilla.kernel.org/show_bug.cgi?id=11057

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agosched: fix cpu hotplug
Dmitry Adamushko [Wed, 9 Jul 2008 22:32:40 +0000 (00:32 +0200)]
sched: fix cpu hotplug

I think we may have a race between try_to_wake_up() and
migrate_live_tasks() -> move_task_off_dead_cpu() when the later one
may end up looping endlessly.

Interrupts are enabled on other CPUs when migration_call(CPU_DEAD, ...) is
called so we may get a race between try_to_wake_up() and
migrate_live_tasks() -> move_task_off_dead_cpu(). The former one may push
a task out of a dead CPU causing the later one to loop endlessly.

Heiko Carstens observed:

| That's exactly what explains a dump I got yesterday. Thanks for fixing! :)

Signed-off-by: Dmitry Adamushko <dmitry.adamushko@gmail.com>
Cc: miaox@cn.fujitsu.com
Cc: Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Avi Kivity <avi@qumranet.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 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>
15 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>
15 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>
15 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>
15 years agomd: ensure all blocks are uptodate or locked when syncing
Dan Williams [Thu, 10 Jul 2008 11:54:57 +0000 (04:54 -0700)]
md: ensure all blocks are uptodate or locked when syncing

Remove the dubious attempt to prefer 'compute' over 'read'.  Not only is it
wrong given commit c337869d (md: do not compute parity unless it is on a failed
drive), but it can trigger a BUG_ON in handle_parity_checks5().

Cc: <stable@kernel.org>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Neil Brown <neilb@suse.de>
15 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
David S. Miller [Wed, 9 Jul 2008 22:10:09 +0000 (15:10 -0700)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-2.6

15 years agonetfilter: nf_nat_snmp_basic: fix a range check in NAT for SNMP
David Howells [Wed, 9 Jul 2008 22:06:45 +0000 (15:06 -0700)]
netfilter: nf_nat_snmp_basic: fix a range check in NAT for SNMP

Fix a range check in netfilter IP NAT for SNMP to always use a big enough size
variable that the compiler won't moan about comparing it to ULONG_MAX/8 on a
64-bit platform.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonetfilter: nf_conntrack_tcp: fix endless loop
Patrick McHardy [Wed, 9 Jul 2008 22:06:12 +0000 (15:06 -0700)]
netfilter: nf_conntrack_tcp: fix endless loop

When a conntrack entry is destroyed in process context and destruction
is interrupted by packet processing and the packet is an attempt to
reopen a closed connection, TCP conntrack tries to kill the old entry
itself and returns NF_REPEAT to pass the packet through the hook
again. This may lead to an endless loop: TCP conntrack repeatedly
finds the old entry, but can not kill it itself since destruction
is already in progress, but destruction in process context can not
complete since TCP conntrack is keeping the CPU busy.

Drop the packet in TCP conntrack if we can't kill the connection
ourselves to avoid this.

Reported by: hemao77@gmail.com [ Kernel bugzilla #11058 ]
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland...
Linus Torvalds [Wed, 9 Jul 2008 21:16:23 +0000 (14:16 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/roland/infiniband

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
  RDMA/cxgb3: Fix regression caused by class_device -> device conversion

15 years agolibertas: fix memory alignment problems on the blackfin
Ihar Hrachyshka [Wed, 9 Jul 2008 06:29:58 +0000 (09:29 +0300)]
libertas: fix memory alignment problems on the blackfin

Fixing unaligned memory access on the blackfin architecture.

Signed-off-by: Ihar Hrachyshka <ihar.hrachyshka@promwad.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agozd1211rw: stop beacons on remove_interface
Luis Carlos Cobo [Tue, 8 Jul 2008 14:19:21 +0000 (16:19 +0200)]
zd1211rw: stop beacons on remove_interface

If a mesh or ad-hoc interface is brought up and later it is replaced
by managed interface, the managed interface will keep transmitting
the beacons that were configured for the former interface. This patch
fixes that behaviour.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agort2x00: Disable synchronization during initialization
Ivo van Doorn [Tue, 8 Jul 2008 11:45:20 +0000 (13:45 +0200)]
rt2x00: Disable synchronization during initialization

As soon as init_registers() was called, the rt2400/rt2500
would start raising beacondone interrupts. Since this is highly
premature since no beacons were provided yet, we should
initialize the synchronization register to 0.

This will make all drivers initialize it to 0 regardless
if they are raising beacondone interrupts or not, since it only
makes sense to have it completely disabled.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agorc80211_pid: Fix fast_start parameter handling
Mattias Nissler [Mon, 7 Jul 2008 21:08:19 +0000 (23:08 +0200)]
rc80211_pid: Fix fast_start parameter handling

This removes the fast_start parameter from the rc_pid parameters
information and instead uses the parameter macro when initializing
the rc_pid state. Since the parameter is only used on initialization,
there is no point of making exporting it via debugfs. This also fixes
uninitialized memory references to the fast_start and norm_offset
parameters detected by the kmemcheck utility.  Thanks to Vegard Nossum
for reporting the bug.

Signed-off-by: Mattias Nissler <mattias.nissler@gmx.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 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>
15 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>
15 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

15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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

15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 years agox86: don't always use EFAULT on __put_user_size.
Glauber Costa [Wed, 25 Jun 2008 15:00:44 +0000 (12:00 -0300)]
x86: don't always use EFAULT on __put_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>
15 years agox86: mark x86_64 as having a working WP.
Glauber Costa [Wed, 25 Jun 2008 14:40:42 +0000 (11:40 -0300)]
x86: mark x86_64 as having a working WP.

Select X86_WP_WORKS_OK for x86_64 too.

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>
15 years agox86: use k modifier for 4-byte access.
Glauber Costa [Wed, 25 Jun 2008 14:35:06 +0000 (11:35 -0300)]
x86: use k modifier for 4-byte access.

Do it in a separate patch for bisectability.
Goal is to have put_user_size integrated.

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>
15 years agox86: move __addr_ok to uaccess.h.
Glauber Costa [Wed, 25 Jun 2008 14:08:51 +0000 (11:08 -0300)]
x86: move __addr_ok to uaccess.h.

Take it out of uaccess_32.h. Since it seems that no users
of the x86_64 exists, we simply pick the i386 version.

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>
15 years agox86: merge getuser.
Glauber Costa [Wed, 25 Jun 2008 14:05:11 +0000 (11:05 -0300)]
x86: merge getuser.

Merge versions of getuser from uaccess_32.h and uaccess_64.h into
uaccess.h. There is a part which is 64-bit only (for now), and for
that, we use a __get_user_8 macro.

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>
15 years agox86: merge common parts of uaccess.
Glauber Costa [Fri, 13 Jun 2008 17:39:25 +0000 (14:39 -0300)]
x86: merge common parts of uaccess.

Common parts of uaccess_32.h and uaccess_64.h
are put in uaccess.h. Bits in uaccess_32.h and
uaccess_64.h that come to this file are equal
except for comments and whitespaces differences.

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>
15 years agox86: use something common for both architectures.
Glauber Costa [Sat, 14 Jun 2008 00:01:46 +0000 (21:01 -0300)]
x86: use something common for both architectures.

Using explicit hexa (0xFFFFFFUL) introduces an unnecessary difference
between i386 and x86_64 because of the size of their long. Use -1UL instead.

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>
15 years agox86: use long instead of int.
Glauber Costa [Mon, 30 Jun 2008 20:37:08 +0000 (17:37 -0300)]
x86: use long instead of int.

Do not refer to the processor word-size with int, as it won't
work with x86_64. Use long instead.

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>
15 years agox86: introduce likely in macro.
Glauber Costa [Mon, 30 Jun 2008 20:34:39 +0000 (17:34 -0300)]
x86: introduce likely in macro.

Put the likely hint in access_ok. Just for
bisectability.

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>
15 years agox86: change asm constraint.
Glauber Costa [Mon, 30 Jun 2008 20:07:51 +0000 (17:07 -0300)]
x86: change asm constraint.

Our integration efforts broke a build with this function being used
with i386. Reason is "g" can put the operand in an imm32, which according
to The Book (tm), is invalid as the second operand.

This is actually a bug
in x86_64 too, since the x86_64 instruction set reference does not list
it as valid.

We probably didn't trigger this before due to the ammount of
registers available for 64-bit platforms. But that's just my guess.

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>
15 years agox86: commonize __range_not_ok.
Glauber Costa [Wed, 25 Jun 2008 13:14:13 +0000 (10:14 -0300)]
x86: commonize __range_not_ok.

For i386, __range_not_ok is a better name than __range_ok, since
it returns 0 when it is in fact okay. Other than that,
both versions does not need the word size specifiers, and we remove them.

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>
15 years agox86: merge putuser asm functions.
Glauber Costa [Tue, 24 Jun 2008 20:40:14 +0000 (17:40 -0300)]
x86: merge putuser asm functions.

putuser_32.S and putuser_64.S are merged into putuser.S.

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>
15 years agox86: use macros from asm.h.
Glauber Costa [Tue, 24 Jun 2008 20:36:31 +0000 (17:36 -0300)]
x86: use macros from asm.h.

In putuser_32.S and putuser_64.S, replace things like .quad, .long,
and explicit references to [r|e]ax for the apropriate macros
in asm/asm.h.

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>
15 years agox86: don't use word-size specifiers in putuser files.
Glauber Costa [Tue, 24 Jun 2008 19:59:05 +0000 (16:59 -0300)]
x86: don't use word-size specifiers in putuser files.

Remove them where unambiguous.

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>
15 years agox86: replace function headers by macros.
Glauber Costa [Tue, 24 Jun 2008 19:56:30 +0000 (16:56 -0300)]
x86: replace function headers by macros.

In putuser_64.S, do it the i386 way, and replace the code
in beginning and end of functions with macros, since it's
always the same thing. Save lines.

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>
15 years agox86: change testing logic in putuser_64.S.
Glauber Costa [Tue, 24 Jun 2008 19:51:59 +0000 (16:51 -0300)]
x86: change testing logic in putuser_64.S.

Instead of operating over a register we need to put back
into normal state afterwards (the memory position), just
sub from rbx, which is trashed anyway. We can save a few instructions.

Also, this is the i386 way.

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>
15 years agox86: pass argument to putuser_64 functions in ax register.
Glauber Costa [Tue, 24 Jun 2008 19:44:39 +0000 (16:44 -0300)]
x86: pass argument to putuser_64 functions in ax register.

This is consistent with i386 usage.

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>
15 years agox86: clobber rbx in putuser_64.S.
Glauber Costa [Tue, 24 Jun 2008 18:03:40 +0000 (15:03 -0300)]
x86: clobber rbx in putuser_64.S.

Instead of clobbering r8, clobber rbx, which is the i386 way.

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>
15 years agox86: user put_user_x instead of all variants.
Glauber Costa [Tue, 24 Jun 2008 18:02:31 +0000 (15:02 -0300)]
x86: user put_user_x instead of all variants.

Follow the pattern, and define a single put_user_x, instead
of defining macros for all available sizes. Exception is
put_user_8, since the "A" constraint does not give us enough
power to specify which register (a or d) to use in the 32-bit
common 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>
15 years agox86: don't save ebx in putuser_32.S.
Glauber Costa [Tue, 24 Jun 2008 15:40:55 +0000 (12:40 -0300)]
x86: don't save ebx in putuser_32.S.

Clobber it in the inline asm macros, and let the compiler do this for us.

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>
15 years agox86: merge getuser asm functions.
Glauber Costa [Tue, 24 Jun 2008 15:05:11 +0000 (12:05 -0300)]
x86: merge getuser asm functions.

getuser_32.S and getuser_64.S are merged into getuser.S.

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>
15 years agox86: use _ASM_PTR instead of explicit word-size pointers.
Glauber Costa [Tue, 24 Jun 2008 15:02:44 +0000 (12:02 -0300)]
x86: use _ASM_PTR instead of explicit word-size pointers.

Switch .long and .quad with _ASM_PTR in getuser*.S.

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>