]> pilppa.org Git - linux-2.6-omap-h63xx.git/log
linux-2.6-omap-h63xx.git
17 years ago[PARISC] Kill incorrect cast warning in unwinder
Kyle McMartin [Thu, 18 Oct 2007 07:03:56 +0000 (00:03 -0700)]
[PARISC] Kill incorrect cast warning in unwinder

Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
17 years ago[PARISC] Kill zone_to_nid printk warning
Kyle McMartin [Thu, 18 Oct 2007 07:03:53 +0000 (00:03 -0700)]
[PARISC] Kill zone_to_nid printk warning

zone_to_nid returns int, always.

Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
17 years ago[PARISC] Unbreak processor_probe when we have more than NR_CPUS
Kyle McMartin [Thu, 18 Oct 2007 07:03:50 +0000 (00:03 -0700)]
[PARISC] Unbreak processor_probe when we have more than NR_CPUS

If we already have NR_CPUS worth of cpus online, we obviously shouldn't
be trying to bring up more... Fixes a particularly vexing issue I had when
running another machines kernel on my rp3440.

Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
17 years ago[PARISC] Kill pointless variable use in time.c
Kyle McMartin [Thu, 18 Oct 2007 07:03:45 +0000 (00:03 -0700)]
[PARISC] Kill pointless variable use in time.c

Clean up a pointless use of a variable in update_cr16_clocksource. It just
looks silly.

Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
17 years ago[PARISC] import necessary bits of libgcc.a
Kyle McMartin [Thu, 18 Oct 2007 07:06:26 +0000 (00:06 -0700)]
[PARISC] import necessary bits of libgcc.a

Currently we're hacking libs-y to include libgcc.a, but this has
unforeseen consequences since the userspace libgcc is linked with fpregs
enabled. We need the kernel to stop using fpregs in an uncontrolled manner
to implement lazy fpu state saves.

Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
17 years ago[PARISC] Use page allocator instead of slab allocator in pci-dma.c
Christoph Lameter [Tue, 16 Oct 2007 21:24:58 +0000 (14:24 -0700)]
[PARISC] Use page allocator instead of slab allocator in pci-dma.c

Slab pages obtained via kmalloc are not cacheline aligned.  Nor is it
advisable to perform VM operations designed for page allocator pages on
memory obtained via kmalloc.

So replace the page sized allocations in kernel/pci-dma.c with page allocator
pages.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Cc: Hugh Dickins <hugh@veritas.com>
Cc: Grant Grundler <grundler@parisc-linux.org>
Cc: Matthew Wilcox <willy@debian.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
17 years ago[PARISC] parisc: "extern inline" -> "static inline"
Adrian Bunk [Tue, 16 Oct 2007 21:24:59 +0000 (14:24 -0700)]
[PARISC] parisc: "extern inline" -> "static inline"

"extern inline" will have different semantics with gcc 4.3, and "static
inline" is correct here.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Cc: Matthew Wilcox <willy@debian.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
17 years ago[PARISC] Update defconfigs
Kyle McMartin [Thu, 18 Oct 2007 07:06:18 +0000 (00:06 -0700)]
[PARISC] Update defconfigs

Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
17 years ago[PARISC] Clean up asm-parisc/pdc.h
Kyle McMartin [Thu, 18 Oct 2007 07:03:34 +0000 (00:03 -0700)]
[PARISC] Clean up asm-parisc/pdc.h

If we're going to export the header, at least let's organize it sensibly and
not have a mishmash of userspace, assembly, and kernel visible defines.

Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
17 years ago[PARISC] Export pdc.h for palo
Jeff Bailey [Fri, 28 Sep 2007 18:22:19 +0000 (14:22 -0400)]
[PARISC] Export pdc.h for palo

Signed-off-by: Jeff Bailey <jbailey@raspberryginger.com>
Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
17 years ago[PARISC] Wire up sys_fallocate (and compat_sys_fallocate)
Kyle McMartin [Fri, 28 Sep 2007 17:25:59 +0000 (13:25 -0400)]
[PARISC] Wire up sys_fallocate (and compat_sys_fallocate)

Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
17 years agoMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
Linus Torvalds [Wed, 17 Oct 2007 22:13:42 +0000 (15:13 -0700)]
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
  [IA64] fix non-numa build

17 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh...
Linus Torvalds [Wed, 17 Oct 2007 22:05:58 +0000 (15:05 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs:
  9p: remove sysctl
  9p: fix bad kconfig cross-dependency
  9p: soften invalidation in loose_mode
  9p: attach-per-user
  9p: rename uid and gid parameters
  9p: define session flags
  9p: Make transports dynamic

17 years ago[IA64] fix non-numa build
Andrew Morton [Wed, 17 Oct 2007 21:28:38 +0000 (14:28 -0700)]
[IA64] fix non-numa build

arch/ia64/kernel/machine_kexec.c: In function `arch_crash_save_vmcoreinfo':
arch/ia64/kernel/machine_kexec.c:131: error: `pgdat_list' undeclared (first use in this function)
arch/ia64/kernel/machine_kexec.c:131: error: (Each undeclared identifier is reported only once
arch/ia64/kernel/machine_kexec.c:131: error: for each function it appears in.)
arch/ia64/kernel/machine_kexec.c:134: error: `node_memblk' undeclared (first use in this function)
arch/ia64/kernel/machine_kexec.c:135: error: `NR_NODE_MEMBLKS' undeclared (first use in this function)
arch/ia64/kernel/machine_kexec.c:136: error: invalid application of `sizeof' to incomplete type `node_memblk_s'
arch/ia64/kernel/machine_kexec.c:137: error: dereferencing pointer to incomplete type
arch/ia64/kernel/machine_kexec.c:138: error: dereferencing pointer to incomplete type
make[1]: *** [arch/ia64/kernel/machine_kexec.o] Error 1

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc
Linus Torvalds [Wed, 17 Oct 2007 21:12:44 +0000 (14:12 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc:
  net: libertas sdio driver
  mmc: at91_mci: cleanup: use MCI_ERRORS
  mmc: possible leak in mmc_read_ext_csd

17 years agonet: libertas sdio driver
Pierre Ossman [Wed, 17 Oct 2007 20:24:24 +0000 (22:24 +0200)]
net: libertas sdio driver

Add driver for Marvell's Libertas 8385 and 8686 wifi chips.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Acked-by: Dan Williams <dcbw@redhat.com>
17 years agoMerge ssh://master.kernel.org/pub/scm/linux/kernel/git/tglx/linux-2.6-x86
Linus Torvalds [Wed, 17 Oct 2007 20:13:16 +0000 (13:13 -0700)]
Merge ssh://master.kernel.org/pub/scm/linux/kernel/git/tglx/linux-2.6-x86

* ssh://master.kernel.org/pub/scm/linux/kernel/git/tglx/linux-2.6-x86: (114 commits)
  x86: delete vsyscall files during make clean
  kbuild: fix typo SRCARCH in find_sources
  x86: fix kernel rebuild due to vsyscall fallout
  .gitignore update for x86 arch
  x86: unify include/asm/debugreg_32/64.h
  x86: unify include/asm/unwind_32/64.h
  x86: unify include/asm/types_32/64.h
  x86: unify include/asm/tlb_32/64.h
  x86: unify include/asm/siginfo_32/64.h
  x86: unify include/asm/bug_32/64.h
  x86: unify include/asm/mman_32/64.h
  x86: unify include/asm/agp_32/64.h
  x86: unify include/asm/kdebug_32/64.h
  x86: unify include/asm/ioctls_32/64.h
  x86: unify include/asm/floppy_32/64.h
  x86: apply missing DMA/OOM prevention to floppy_32.h
  x86: unify include/asm/cache_32/64.h
  x86: unify include/asm/cache_32/64.h
  x86: unify include/asm/dmi_32/64.h
  x86: unify include/asm/delay_32/64.h
  ...

17 years agox86: delete vsyscall files during make clean
Sam Ravnborg [Wed, 17 Oct 2007 20:06:30 +0000 (22:06 +0200)]
x86: delete vsyscall files during make clean

make clean failed to delete a few files in
x86/kernel. This is because kbuild does not
see the correct/full kernel/Makefile.

As a workaround until the Makefiles are merged specify
the files to be deleted in the common Makefile.

Reported by Mike Galbraith <efault@gmx.de>

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Mike Galbraith <efault@gmx.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agokbuild: fix typo SRCARCH in find_sources
Yinghai Lu [Tue, 16 Oct 2007 07:28:06 +0000 (00:28 -0700)]
kbuild: fix typo SRCARCH in find_sources

otherwise get the two copy file list in SRCARCH

for cscope:
C symbol: start_kernel

  File           Function            Line
0 proto.h        <global>              11 extern void start_kernel(void );
1 start_kernel.h <global>              10 extern asmlinkage void __init start_kernel(void );
2 head32.c       i386_start_kernel     37 start_kernel();
3 head32.c       i386_start_kernel     37 start_kernel();
4 head64.c       x86_64_start_kernel   85 start_kernel();
5 head64.c       x86_64_start_kernel   85 start_kernel();
6 head_32.S      options              199 cmpb $0,%cl #the first CPU calls start_kernel
7 head_32.S      options              199 cmpb $0,%cl #the first CPU calls start_kernel
8 enlighten.c    xen_start_kernel    1145 start_kernel();
9 enlighten.c    xen_start_kernel    1145 start_kernel();
a lguest.c       lguest_init         1095 start_kernel();
b main.c         start_kernel         513 asmlinkage void __init start_kernel(void )

after the patch:
C symbol: start_kernel

  File           Function            Line
0 proto.h        <global>              11 extern void start_kernel(void );
1 start_kernel.h <global>              10 extern asmlinkage void __init start_kernel(void );
2 head32.c       i386_start_kernel     37 start_kernel();
3 head64.c       x86_64_start_kernel   85 start_kernel();
4 head_32.S      options              199 cmpb $0,%cl #the first CPU calls start_kernel
5 enlighten.c    xen_start_kernel    1145 start_kernel();
6 lguest.c       lguest_init         1095 start_kernel();
7 main.c         start_kernel         513 asmlinkage void __init start_kernel(void )

Signed-off-by: Yinghai Lu <yinghai.lu@sun.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years ago9p: remove sysctl
Eric Van Hensbergen [Wed, 17 Oct 2007 19:35:15 +0000 (14:35 -0500)]
9p: remove sysctl

A sysctl method was added to enable and disable debugging levels.  After
further review, it was decided that there are better approaches to doing this
and the sysctl methodology isn't really desirable.  This patch removes the
sysctl code from 9p.

Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
17 years agommc: at91_mci: cleanup: use MCI_ERRORS
Andrew Victor [Wed, 17 Oct 2007 09:53:40 +0000 (11:53 +0200)]
mmc: at91_mci: cleanup: use MCI_ERRORS

A small MMC driver cleanup.

Use the defined AT91_MCI_ERRORS in at91_mci_completed_command() instead
of specifying all the error bits individually.

Signed-off-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
17 years agommc: possible leak in mmc_read_ext_csd
Florin Malita [Sat, 13 Oct 2007 16:27:20 +0000 (12:27 -0400)]
mmc: possible leak in mmc_read_ext_csd

The exception path associated with an invalid ext_csd_struct returns
without freeing ext_csd.

Coverity CID 1909.

Signed-off-by: Florin Malita
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
17 years ago9p: fix bad kconfig cross-dependency
Eric Van Hensbergen [Wed, 17 Oct 2007 19:31:07 +0000 (14:31 -0500)]
9p: fix bad kconfig cross-dependency

This patch moves transport dynamic registration and matching to the net
module to prevent a bad Kconfig dependency between the net and fs 9p modules.

Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
17 years ago9p: soften invalidation in loose_mode
Eric Van Hensbergen [Wed, 17 Oct 2007 19:31:07 +0000 (14:31 -0500)]
9p: soften invalidation in loose_mode

Loose mode in 9p utilizes the page cache without respecting coherency with
the server.  Any writes previously invaldiated the entire mapping for a file.
This patch softens the behavior to only invalidate the region of the actual
write.

Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
17 years ago9p: attach-per-user
Latchesar Ionkov [Wed, 17 Oct 2007 19:31:07 +0000 (14:31 -0500)]
9p: attach-per-user

The 9P2000 protocol requires the authentication and permission checks to be
done in the file server. For that reason every user that accesses the file
server tree has to authenticate and attach to the server separately.
Multiple users can share the same connection to the server.

Currently v9fs does a single attach and executes all I/O operations as a
single user. This makes using v9fs in multiuser environment unsafe as it
depends on the client doing the permission checking.

This patch improves the 9P2000 support by allowing every user to attach
separately. The patch defines three modes of access (new mount option
'access'):

- attach-per-user (access=user) (default mode for 9P2000.u)
 If a user tries to access a file served by v9fs for the first time, v9fs
 sends an attach command to the server (Tattach) specifying the user. If
 the attach succeeds, the user can access the v9fs tree.
 As there is no uname->uid (string->integer) mapping yet, this mode works
 only with the 9P2000.u dialect.

- allow only one user to access the tree (access=<uid>)
 Only the user with uid can access the v9fs tree. Other users that attempt
 to access it will get EPERM error.

- do all operations as a single user (access=any) (default for 9P2000)
 V9fs does a single attach and all operations are done as a single user.
 If this mode is selected, the v9fs behavior is identical with the current
 one.

Signed-off-by: Latchesar Ionkov <lucho@ionkov.net>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
17 years ago9p: rename uid and gid parameters
Latchesar Ionkov [Wed, 17 Oct 2007 19:31:07 +0000 (14:31 -0500)]
9p: rename uid and gid parameters

Change the names of 'uid' and 'gid' parameters to the more appropriate
'dfltuid' and 'dfltgid'.  This also sets the default uid/gid to -2
(aka nfsnobody)

Signed-off-by: Latchesar Ionkov <lucho@ionkov.net>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
17 years ago9p: define session flags
Latchesar Ionkov [Wed, 17 Oct 2007 19:31:07 +0000 (14:31 -0500)]
9p: define session flags

Create more general flags field in the v9fs_session_info struct and move the
'extended' flag as a bit in the flags.

Signed-off-by: Latchesar Ionkov <lucho@ionkov.net>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
17 years ago9p: Make transports dynamic
Eric Van Hensbergen [Wed, 17 Oct 2007 19:31:07 +0000 (14:31 -0500)]
9p: Make transports dynamic

This patch abstracts out the interfaces to underlying transports so that
new transports can be added as modules.  This should also allow kernel
configuration of transports without ifdef-hell.

Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
17 years agox86: fix kernel rebuild due to vsyscall fallout
Sam Ravnborg [Wed, 17 Oct 2007 19:16:33 +0000 (21:16 +0200)]
x86: fix kernel rebuild due to vsyscall fallout

Fix rebuild of kernel when there is no changes.
This happened for i386.
Using make V=2 hinted that the output files were
not assigned to targets - fixed by this patch.

Reported by: Boaz Harrosh <bharrosh@panasas.com>

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years ago.gitignore update for x86 arch
Denis V. Lunev [Tue, 16 Oct 2007 07:22:21 +0000 (11:22 +0400)]
.gitignore update for x86 arch

This patch:
- makes .gitignore files visible to git
- makes arch/x86/kernel/vsyscall_32.lds and arch/i386/boot invisible

Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agoMerge branch 'for-linus' of git://git.kernel.dk/data/git/linux-2.6-block
Linus Torvalds [Wed, 17 Oct 2007 18:56:06 +0000 (11:56 -0700)]
Merge branch 'for-linus' of git://git.kernel.dk/data/git/linux-2.6-block

* 'for-linus' of git://git.kernel.dk/data/git/linux-2.6-block:
  [BLOCK] blk_rq_map_sg() next_sg fixup
  Revert "[SCSI] Remove full sg table memset()"

17 years agox86: unify include/asm/debugreg_32/64.h
Thomas Gleixner [Wed, 17 Oct 2007 18:35:37 +0000 (20:35 +0200)]
x86: unify include/asm/debugreg_32/64.h

Almost identical except for the extra DR_LEN_8 and the different
DR_CONTROL_RESERVED defines.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Conflicts:

include/asm-x86/Kbuild

17 years agox86: unify include/asm/unwind_32/64.h
Thomas Gleixner [Mon, 15 Oct 2007 21:28:21 +0000 (23:28 +0200)]
x86: unify include/asm/unwind_32/64.h

32bit has an extra UNW_FP define, which does not hurt.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: unify include/asm/types_32/64.h
Thomas Gleixner [Wed, 17 Oct 2007 18:32:07 +0000 (20:32 +0200)]
x86: unify include/asm/types_32/64.h

Mostly the same. Make the few exceptions conditional.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Conflicts:

include/asm-x86/types_32.h

17 years agox86: unify include/asm/tlb_32/64.h
Thomas Gleixner [Mon, 15 Oct 2007 21:28:21 +0000 (23:28 +0200)]
x86: unify include/asm/tlb_32/64.h

Same file, except for whitespace, comment formatting.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: unify include/asm/siginfo_32/64.h
Thomas Gleixner [Mon, 15 Oct 2007 21:28:21 +0000 (23:28 +0200)]
x86: unify include/asm/siginfo_32/64.h

Same file, except for the 64bit PREAMBLE_SIZE define.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: unify include/asm/bug_32/64.h
Thomas Gleixner [Wed, 17 Oct 2007 15:19:30 +0000 (17:19 +0200)]
x86: unify include/asm/bug_32/64.h

Same file, except for whitespace, comment formatting and the
.long/.quad delta which can be solved by a define.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: unify include/asm/mman_32/64.h
Thomas Gleixner [Mon, 15 Oct 2007 21:28:21 +0000 (23:28 +0200)]
x86: unify include/asm/mman_32/64.h

Same file, except for the extra 64bit MAP_32BIT define, which does not hurt
for 32 bit compiles.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: unify include/asm/agp_32/64.h
Thomas Gleixner [Mon, 15 Oct 2007 21:28:20 +0000 (23:28 +0200)]
x86: unify include/asm/agp_32/64.h

The 32bit D(n) debug addon can be made exclusive for 32 bit compiles.
Otherwise all the same.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: unify include/asm/kdebug_32/64.h
Thomas Gleixner [Mon, 15 Oct 2007 21:28:20 +0000 (23:28 +0200)]
x86: unify include/asm/kdebug_32/64.h

The 64 bit variant has additional function prototypes which do no harm
for 32 bit.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: unify include/asm/ioctls_32/64.h
Thomas Gleixner [Mon, 15 Oct 2007 21:28:20 +0000 (23:28 +0200)]
x86: unify include/asm/ioctls_32/64.h

Same file, except for whitespace and comment formatting.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: unify include/asm/floppy_32/64.h
Thomas Gleixner [Wed, 17 Oct 2007 18:24:56 +0000 (20:24 +0200)]
x86: unify include/asm/floppy_32/64.h

Same file, except for whitespace, comment formatting and:

32-bit: if((unsigned int) addr >= (unsigned int) high_memory)
64-bit: if((unsigned long) addr >= (unsigned long) high_memory)

where the latter can be used safely for both.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Conflicts:
include/asm-x86/floppy_32.h
include/asm-x86/floppy_64.h

17 years agox86: apply missing DMA/OOM prevention to floppy_32.h
Thomas Gleixner [Mon, 15 Oct 2007 21:28:20 +0000 (23:28 +0200)]
x86: apply missing DMA/OOM prevention to floppy_32.h

commit 554d284ba90bc2306c31e5363789f05c320969c3 added _GPF_NORETRY
to floppy_64.h to prevent OOM killer on floppy DMA allocations.

Apply the same to the 32 bit variant.

Found during the attempt to unify the _32/_64 variants. Seperate commit
to document the resulting code change.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: unify include/asm/cache_32/64.h
Thomas Gleixner [Mon, 15 Oct 2007 21:28:20 +0000 (23:28 +0200)]
x86: unify include/asm/cache_32/64.h

Same file, except for whitespace, comment formatting and the two variants
of fb_is_primary_device()

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: unify include/asm/cache_32/64.h
Thomas Gleixner [Mon, 15 Oct 2007 21:28:20 +0000 (23:28 +0200)]
x86: unify include/asm/cache_32/64.h

Same file, except for whitespace, comment formatting and:

32-bit: unsigned long *virt_addr = va;
64-bit: unsigned int *virt_addr = va;

Both can be safely replaced by:
u32 i, *virt_addr = va;

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: unify include/asm/dmi_32/64.h
Thomas Gleixner [Mon, 15 Oct 2007 21:28:20 +0000 (23:28 +0200)]
x86: unify include/asm/dmi_32/64.h

Unification, so we have these things in one file.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: unify include/asm/delay_32/64.h
Thomas Gleixner [Mon, 15 Oct 2007 21:28:20 +0000 (23:28 +0200)]
x86: unify include/asm/delay_32/64.h

Same file, except for whitespace, comment formatting and the extra
function prototype usc_tsc_delay() in _32.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: unify include/asm/cache_32/64.h
Thomas Gleixner [Mon, 15 Oct 2007 21:28:20 +0000 (23:28 +0200)]
x86: unify include/asm/cache_32/64.h

Same file, except for whitespace, comment formatting and the extra
defines in _64, which are conditional on VSMP anyway.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: unify include/asm/cacheflush_32/64.h
Thomas Gleixner [Mon, 15 Oct 2007 21:28:20 +0000 (23:28 +0200)]
x86: unify include/asm/cacheflush_32/64.h

Same file, except for whitespace, comment formatting and the extra
DEBUG_PAGE_ALLOC function in _32.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: unify include/asm/auxvec_32/64.h
Thomas Gleixner [Mon, 15 Oct 2007 21:28:19 +0000 (23:28 +0200)]
x86: unify include/asm/auxvec_32/64.h

Same file, except for whitespace, comment formatting and the
AT_SYSINFO define for 32bit

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: unify include/asm/agp_32/64.h
Thomas Gleixner [Mon, 15 Oct 2007 21:28:19 +0000 (23:28 +0200)]
x86: unify include/asm/agp_32/64.h

Same file, except for whitespace, comment formatting and the
usage of wbinvd() instead of asm volatile("wbinvd":::"memory"), which is
the same.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: unify some more trivial include/asm-x86/ 32/64 variants
Thomas Gleixner [Mon, 15 Oct 2007 11:57:47 +0000 (13:57 +0200)]
x86: unify some more trivial include/asm-x86/ 32/64 variants

Scripted unification.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: merge some trivially mergeable headers
Roland Dreier [Mon, 15 Oct 2007 11:57:46 +0000 (13:57 +0200)]
x86: merge some trivially mergeable headers

Merge errno.h, resource.h, rtc.h, sections.h, serial.h and sockios.h,
where i386 and x86_64 have no or only trivial comment/include guard
differences.

Build tested on both 32-bit and 64-bit, and booted on 64-bit.

[tglx: fixup Kbuild as well]

Signed-off-by: Roland Dreier <roland@digitalvampire.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: trivial header merges
Brian Gerst [Mon, 15 Oct 2007 11:57:46 +0000 (13:57 +0200)]
x86: trivial header merges

Merge 32/64-bit headers that simply redirect to asm-generic

[tglx: fixup Kbuild as well]

Signed-off-by: Brian Gerst <bgerst@didntduck.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: vdso linker script cleanup
Roland McGrath [Wed, 17 Oct 2007 16:04:41 +0000 (18:04 +0200)]
x86: vdso linker script cleanup

I can't see the reason ".  = VDSO_PRELINK + 0x900;" was ever there in
the linker script for the x86_64 vDSO.  I can't find anything that
depends on this magic offset, or that should care at all about the
particular location of of the .data section (all from vvar.c) in the
vDSO image.  If it is really desireable to place .data at 0x900, then it
should be after all the other sections so they fill in the space up to
0x900.

This removes the 0x900 magic and cleans up the output sections generally
in the vDSO linker script.  This saves a few hundred bytes in the size
of the vDSO file, bringing it back well under 4kb total so that its vma
only needs one page.

Signed-off-by: Roland McGrath <roland@redhat.com>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: convert mm_context_t semaphore to a mutex
Luiz Fernando N. Capitulino [Wed, 17 Oct 2007 16:04:41 +0000 (18:04 +0200)]
x86: convert mm_context_t semaphore to a mutex

convert mm_context_t semaphore to a mutex.

Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: multi-byte single instruction NOPs
Jan Beulich [Wed, 17 Oct 2007 16:04:41 +0000 (18:04 +0200)]
x86: multi-byte single instruction NOPs

Add support for and use the multi-byte NOPs recently documented to be
available on all PentiumPro and later processors.

This patch only applies cleanly on top of the "x86: misc.
constifications" patch sent earlier.

[ tglx: arch/x86 adaptation ]

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
 arch/x86/kernel/alternative.c  |   23 ++++++++++++++++++++++-
 include/asm-x86/processor_32.h |   22 ++++++++++++++++++++++
 include/asm-x86/processor_64.h |   22 ++++++++++++++++++++++
 3 files changed, 66 insertions(+), 1 deletion(-)

17 years agox86: remove duplicated vsyscall nsec update
Andi Kleen [Wed, 17 Oct 2007 16:04:41 +0000 (18:04 +0200)]
x86: remove duplicated vsyscall nsec update

Spotted by Chuck Ebbert

[ tglx: arch/x86 adaptation ]

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agoi386: remove unnecessary code
Ingo Molnar [Wed, 17 Oct 2007 16:04:41 +0000 (18:04 +0200)]
i386: remove unnecessary code

Oleg Nesterov pointed out that the set_fs() calls in setup_frame()
and setup_rt_frame() were superfluous.

[ tglx: arch/x86 adaptation ]

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andi Kleen <ak@suse.de>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Chuck Ebbert <76306.1226@compuserve.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: convert mm_context_t semaphore to a mutex
Luiz Fernando N. Capitulino [Wed, 17 Oct 2007 16:04:41 +0000 (18:04 +0200)]
x86: convert mm_context_t semaphore to a mutex

[ tglx: arch/x86 adaptation ]

Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: Use string instruction memcpy on AMD Fam11h
Andi Kleen [Wed, 17 Oct 2007 16:04:41 +0000 (18:04 +0200)]
x86: Use string instruction memcpy on AMD Fam11h

[ tglx: arch/x86 adaptation ]

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: make io_apic not connected pin print complete
Yinghai Lu [Wed, 17 Oct 2007 16:04:41 +0000 (18:04 +0200)]
x86: make io_apic not connected pin print complete

Normally we will have two segment not connected pin pin0, and pin after
15...

So we need to print out "not connected\n" for previous segment, before
printing out connected pins info...

Signed-off-by: Yinghai Lu <yinghai.lu@sun.com>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
17 years agoi386: print better early fault info
Ingo Molnar [Wed, 17 Oct 2007 16:04:41 +0000 (18:04 +0200)]
i386: print better early fault info

improve early fault output.

old format:

 Int 14: CR2 010001e3  err 00000002  EIP c011f2f9  CS 00000060  flags 00010046
 Stack: c073695e c0791c10 00000000 ffffffff 00000000 01000000 00001000 c0791c10

new format:

 BUG: Int 14: CR2 010001e3
      EDI c1000000  ESI c0693c10  EBP c0637f9c  ESP c0637f08
      EBX 00000000  EDX 0000000e  ECX 00000000  EAX 010001e3
      err 00000002  EIP c0123119   CS 00000060  flg 00010046
 Stack: c064d589 c0693000 00000000 c0637f60 00c001e3 01000000 00038000 00000163
        00000000 00000163 00000000 ffffffff 00038000 00000000 00000000 00001000
        00001000 00000000 c0637f88 c06509be c0a2ae60 00001000 00001000 00000000

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: also show non-zero IRQ counts for vectors that currently don't have a handler
Jan Beulich [Wed, 17 Oct 2007 16:04:40 +0000 (18:04 +0200)]
x86: also show non-zero IRQ counts for vectors that currently don't have a handler

It doesn't seem to make sense to hide these, even if their counts
can't change at the point in time they're being displayed.

[ tglx: arch/x86 adaptation ]

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: expand /proc/interrupts to include missing vectors, v2
Joe Korty [Wed, 17 Oct 2007 16:04:40 +0000 (18:04 +0200)]
x86: expand /proc/interrupts to include missing vectors, v2

Add missing IRQs and IRQ descriptions to /proc/interrupts.

/proc/interrupts is most useful when it displays every IRQ vector in use by
the system, not just those somebody thought would be interesting.

This patch inserts the following vector displays to the i386 and x86_64
platforms, as appropriate:

rescheduling interrupts
TLB flush interrupts
function call interrupts
thermal event interrupts
threshold interrupts
spurious interrupts

A threshold interrupt occurs when ECC memory correction is occuring at too
high a frequency.  Thresholds are used by the ECC hardware as occasional
ECC failures are part of normal operation, but long sequences of ECC
failures usually indicate a memory chip that is about to fail.

Thermal event interrupts occur when a temperature threshold has been
exceeded for some CPU chip.  IIRC, a thermal interrupt is also generated
when the temperature drops back to a normal level.

A spurious interrupt is an interrupt that was raised then lowered by the
device before it could be fully processed by the APIC.  Hence the apic sees
the interrupt but does not know what device it came from.  For this case
the APIC hardware will assume a vector of 0xff.

Rescheduling, call, and TLB flush interrupts are sent from one CPU to
another per the needs of the OS.  Typically, their statistics would be used
to discover if an interrupt flood of the given type has been occuring.

AK: merged v2 and v4 which had some more tweaks
AK: replace Local interrupts with Local timer interrupts
AK: Fixed description of interrupt types.

[ tglx: arch/x86 adaptation ]
[ mingo: small cleanup ]

Signed-off-by: Joe Korty <joe.korty@ccur.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Cc: Tim Hockin <thockin@hockin.org>
Cc: Andi Kleen <ak@suse.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agoi386: clean up oops/bug reports
Pavel Emelyanov [Wed, 17 Oct 2007 16:04:40 +0000 (18:04 +0200)]
i386: clean up oops/bug reports

Typically the oops first lines look like this:

BUG: unable to handle kernel NULL pointer dereference at virtual address 00000000
 printing eip:
c049dfbd
*pde = 00000000
Oops: 0002 [#1]
PREEMPT SMP
...

Such output is gained with some ugly if (!nl) printk("\n"); code and
besides being a waste of lines, this is also annoying to read. The
following output looks better (and it is how it looks on x86_64):

BUG: unable to handle kernel NULL pointer dereference at virtual address 00000000
printing eip: c049dfbd *pde = 00000000
Oops: 0002 [#1] PREEMPT SMP
...

[ tglx: arch/x86 adaptation ]

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: print info about late C1E detection on 32bit as well
Thomas Gleixner [Wed, 17 Oct 2007 16:04:40 +0000 (18:04 +0200)]
x86: print info about late C1E detection on 32bit as well

Some BIOSes set the C1E flag only on the second core. Print a warning so
the Firmware Toolkit can check for it.

mingo: fix C1E build bug on 32-bit

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: call cache_add_dev() from cache_sysfs_init() explicitly
Satyam Sharma [Wed, 17 Oct 2007 16:04:40 +0000 (18:04 +0200)]
x86: call cache_add_dev() from cache_sysfs_init() explicitly

Call cache_add_dev() from cache_sysfs_init() explicitly, instead of
referencing the CPU notifier callback directly from generic startup
code. Looks cleaner (to me at least) this way, and also makes it
possible to use other tricks to replace __cpuinit{data} annotations, as
recently discussed on this list.

Signed-off-by: Satyam Sharma <satyam@infradead.org>
Cc: Andi Kleen <ak@suse.de>
Cc: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: fix dmi const-ify fallout
Thomas Gleixner [Wed, 17 Oct 2007 16:04:40 +0000 (18:04 +0200)]
x86: fix dmi const-ify fallout

The dmi const-ification missed acer_cpu_freq_pst. Fix it.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: unify include/asm/ldt_32/64.h
Thomas Gleixner [Wed, 17 Oct 2007 16:04:40 +0000 (18:04 +0200)]
x86: unify include/asm/ldt_32/64.h

The additional struct member of user_desc can be made conditional for
64 bit compiles.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: unify include/asm/ptrace-abi_32/64.h
Thomas Gleixner [Wed, 17 Oct 2007 16:04:40 +0000 (18:04 +0200)]
x86: unify include/asm/ptrace-abi_32/64.h

Aside of the register defines the content can be shared.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: unify include/asm/mce_32/64.h
Thomas Gleixner [Wed, 17 Oct 2007 16:04:40 +0000 (18:04 +0200)]
x86: unify include/asm/mce_32/64.h

Merge the files together.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: vdso put vars in rodata
Roland McGrath [Wed, 17 Oct 2007 16:04:40 +0000 (18:04 +0200)]
x86: vdso put vars in rodata

This adds a const to the definitions vvar.c makes, so that the vdso_*
variables go into .rodata instead of .data.  This is essentially a
cosmetic change, just giving the section headers in the vDSO file more
pleasing flags. These variables are read-only from the perspective of
the vDSO itself and user mode, even though the contents of the DSO image
were adjusted at boot.

Signed-off-by: Roland McGrath <roland@redhat.com>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: calgary get rid of translate_phb
Muli Ben-Yehuda [Wed, 17 Oct 2007 16:04:39 +0000 (18:04 +0200)]
x86: calgary get rid of translate_phb

Now that we check for translation enabled/disabled based on the presence
of the IOMMU translation table, we can get rid of translate_phb.

Signed-off-by: Muli Ben-Yehuda <muli@il.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: asm-i386/io.h fix constness
Andrew Morton [Wed, 17 Oct 2007 16:04:39 +0000 (18:04 +0200)]
x86: asm-i386/io.h fix constness

- Fix this:

include/asm/io.h: In function `memcpy_fromio':
include/asm/io.h:208: warning: passing argument 2 of `__memcpy' discards qualifiers from pointer target type

- Clean up code a bit

Reported-by: Uwe Bugla <uwe.bugla@gmx.de>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: visws extern inline to static inline
Adrian Bunk [Wed, 17 Oct 2007 16:04:39 +0000 (18:04 +0200)]
x86: visws extern inline to static inline

"extern inline" will have different semantics with gcc 4.3.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Acked-by: Andrey Panin <pazke@donpac.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: fix cpu_to_node references
Mike Travis [Wed, 17 Oct 2007 16:04:39 +0000 (18:04 +0200)]
x86: fix cpu_to_node references

In x86_64 and i386 architectures most arrays that are sized using
NR_CPUS lay in local memory on node 0.  Not only will most (99%?) of the
systems not use all the slots in these arrays, particularly when NR_CPUS
is increased to accommodate future very high cpu count systems, but a
number of cache lines are passed unnecessarily on the system bus when
these arrays are referenced by cpus on other nodes.

Typically, the values in these arrays are referenced by the cpu
accessing it's own values, though when passing IPI interrupts, the cpu
does access the data relevant to the targeted cpu/node.  Of course, if
the referencing cpu is not on node 0, then the reference will still
require cross node exchanges of cache lines.  A common use of this is
for an interrupt service routine to pass the interrupt to other cpus
local to that node.

Ideally, all the elements in these arrays should be moved to the per_cpu
data area.  In some cases (such as x86_cpu_to_apicid) the array is
referenced before the per_cpu data areas are setup.  In this case, a
static array is declared in the __initdata area and initialized by the
booting cpu (BSP).  The values are then moved to the per_cpu area after
it is initialized and the original static array is freed with the rest
of the __initdata.

This patch:

Fix four instances where cpu_to_node is referenced by array instead of
via the cpu_to_node macro.  This is preparation to moving it to the
per_cpu data area.

Signed-off-by: Mike Travis <travis@sgi.com>
Cc: Andi Kleen <ak@suse.de>
Cc: Christoph Lameter <clameter@sgi.com>
Cc: "Siddha, Suresh B" <suresh.b.siddha@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: cleanup 64bit unistd.h
Thomas Gleixner [Wed, 17 Oct 2007 16:04:39 +0000 (18:04 +0200)]
x86: cleanup 64bit unistd.h

sys_iopl is long gone and there is no reason to declare
sys_rt_sigaction here.

Remove it all together and fix the whitespace mess as well.
It's worth the trouble: 25897 -> 21337 bytes, the win is
larger than the memory of my first computer :)

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: configure HPET_EMULATE_RTC automatically
Stefan Richter [Wed, 17 Oct 2007 16:04:39 +0000 (18:04 +0200)]
x86: configure HPET_EMULATE_RTC automatically

It needs to be automatic. The HPET legacy interrupt mode disconnects
the RTC interrupt and connects the interrupt of the second HPET channel.

[ tglx: arch/x86 adaptation and comment fixup]

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agoi386: constify wd_ops
Jan Beulich [Wed, 17 Oct 2007 16:04:39 +0000 (18:04 +0200)]
i386: constify wd_ops

.. as they're, with a single exception, never written to.

[ tglx: arch/x86 adaptation ]

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: clean up mce= argument parsing slightly
Andi Kleen [Wed, 17 Oct 2007 16:04:38 +0000 (18:04 +0200)]
x86: clean up mce= argument parsing slightly

Move the = into the __setup line.
Document the option in kernel-parameters.txt by adding a pointer
to the x86-64 specific documentation.

[ tglx: arch/x86 adaptation ]

Pointed out by Robert Day
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agoi386: fix argument signedness warnings
Satyam Sharma [Wed, 17 Oct 2007 16:04:38 +0000 (18:04 +0200)]
i386: fix argument signedness warnings

These build warnings:

In file included from include/asm/thread_info.h:16,
from include/linux/thread_info.h:21,
from include/linux/preempt.h:9,
from include/linux/spinlock.h:49,
from include/linux/vmalloc.h:4,
from arch/i386/boot/compressed/misc.c:14:
include/asm/processor.h: In function cpuid_count
include/asm/processor.h:615: warning: pointer targets in passing argument 1 of native_cpuid differ in signedness
include/asm/processor.h:615: warning: pointer targets in passing argument 2 of native_cpuid differ in signedness
include/asm/processor.h:615: warning: pointer targets in passing argument 3 of native_cpuid differ in signedness
include/asm/processor.h:615: warning: pointer targets in passing argument 4 of native_cpuid differ in signedness

come because the arguments have been specified as pointers to (signed) int
types, not unsigned. So let's specify those as unsigned. Do some codingstyle
here and there while at it.

[ tglx: arch/x86 adaptation ]

Signed-off-by: Satyam Sharma <satyam@infradead.org>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: rename .i assembler includes to .h
Adrian Bunk [Wed, 17 Oct 2007 16:04:38 +0000 (18:04 +0200)]
x86: rename .i assembler includes to .h

.i is an ending used for preprocessed stuff.

This patch therefore renames assembler include files to .h and guards
the contents with an #ifdef __ASSEMBLY__.

[ tglx: arch/x86 adaptation ]

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: Add parenthesis to IRQ vector macros
Steven Rostedt [Wed, 17 Oct 2007 16:04:38 +0000 (18:04 +0200)]
x86: Add parenthesis to IRQ vector macros

It is not good taste to have macros with additions that do not have
parenthesises around them.  This patch parethesizes the IRQ vector
macros for x86_64 arch.

Note, this caused me a bit of heart-ache debugging lguest64.

[ tglx: arch/x86 adaptation ]

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: Eliminate result signage problem in asm-x86_64/bitops.h
Chuck Lever [Wed, 17 Oct 2007 16:04:38 +0000 (18:04 +0200)]
x86: Eliminate result signage problem in asm-x86_64/bitops.h

The return type of __scanbit() doesn't match the return type of
find_{first,next}_bit().  Thus when you construct something like
this:

   boolean ? __scanbit() : find_first_bit()

you get an unsigned long result if "boolean" is true, and a signed
long result if "boolean" is false.

In file included from /home/cel/src/linux/include/linux/mmzone.h:15,
                 from /home/cel/src/linux/include/linux/gfp.h:4,
                 from /home/cel/src/linux/include/linux/slab.h:14,
                 from /home/cel/src/linux/include/linux/percpu.h:5,
                 from
/home/cel/src/linux/include/linux/rcupdate.h:41,
                 from /home/cel/src/linux/include/linux/dcache.h:10,
                 from /home/cel/src/linux/include/linux/fs.h:275,
                 from /home/cel/src/linux/fs/nfs/sysctl.c:9:
/home/cel/src/linux/include/linux/nodemask.h: In function
â\80\98__first_nodeâ\80\99:
/home/cel/src/linux/include/linux/nodemask.h:229: warning: signed and
unsigned type in conditional expression
/home/cel/src/linux/include/linux/nodemask.h: In function
â\80\98__next_nodeâ\80\99:
/home/cel/src/linux/include/linux/nodemask.h:235: warning: signed and
unsigned type in conditional expression
/home/cel/src/linux/include/linux/nodemask.h: In function
â\80\98__first_unset_nodeâ\80\99:
/home/cel/src/linux/include/linux/nodemask.h:253: warning: signed and
unsigned type in conditional expression

[ tglx: arch/x86 adaptation ]

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: remove STR() macros
Glauber de Oliveira Costa [Wed, 17 Oct 2007 16:04:38 +0000 (18:04 +0200)]
x86: remove STR() macros

This patch removes the __STR() and STR() macros from x86_64 header files.
They seem to be legacy, and has no more users. Even if there were users,
they should use __stringify() instead.

In fact, there were one third place in which this macro was defined
(ia32_binfmt.c), and used just below. In this file, usage was properly
converted to __stringify()

[ tglx: arch/x86 adaptation ]

Signed-off-by: Glauber de Oliveira Costa <gcosta@redhat.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: remove x86_cpu_to_log_apicid
Mike Travis [Wed, 17 Oct 2007 16:04:38 +0000 (18:04 +0200)]
x86: remove x86_cpu_to_log_apicid

Remove the x86_cpu_to_log_apicid array.  It is set in
arch/x86_64/kernel/genapic_flat.c:flat_init_apic_ldr() and
arch/x86_64/kernel/smpboot.c:do_boot_cpu() but it is never
referenced.

[ tglx: arch/x86 adaptation ]

Signed-off-by: Mike Travis <travis@sgi.com>
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agoi386: Remove strrchr assembler implementation
Andi Kleen [Wed, 17 Oct 2007 16:04:38 +0000 (18:04 +0200)]
i386: Remove strrchr assembler implementation

The constraints in the inline assembler implementation of i386
strrchr() were incorrect and break the build with recent gcc 4.3.
Since there are only very few callers of strrchr() and none of them
are performance relevant just remove the assembler implementation
and use the C fallback instead.

[ tglx: arch/x86 adaptation ]

Cc: rguenther@suse.de
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: make atomic64_t work like atomic_t
Chris Snook [Wed, 17 Oct 2007 16:04:38 +0000 (18:04 +0200)]
x86: make atomic64_t work like atomic_t

The volatile keyword has already been removed from the declaration of atomic_t
on x86_64.  For consistency, remove it from atomic64_t as well.

[ tglx: arch/x86 adaptation ]

Signed-off-by: Chris Snook <csnook@redhat.com>
Signed-off-by: Andi Kleen <ak@suse.de>
CC: Andi Kleen <andi@firstfloor.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agoi386: simplify smp_call_function_single() call sequence in msr-on-cpu
Avi Kivity [Wed, 17 Oct 2007 16:04:38 +0000 (18:04 +0200)]
i386: simplify smp_call_function_single() call sequence in msr-on-cpu

smp_call_function_single() now knows how to call the function on the
current cpu.

[ tglx: arch/x86 adaptation ]

Cc: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agoi386: simplify smp_call_function_single() call sequence in cpuid
Avi Kivity [Wed, 17 Oct 2007 16:04:38 +0000 (18:04 +0200)]
i386: simplify smp_call_function_single() call sequence in cpuid

smp_call_function_single() now knows how to call the function on the
current cpu.

[ tglx: arch/x86 adaptation ]

Cc: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: kmalloc + memset conversion to kzalloc
Mariusz Kozlowski [Wed, 17 Oct 2007 16:04:38 +0000 (18:04 +0200)]
x86: kmalloc + memset conversion to kzalloc

arch/x86_64/kernel/io_apic.c | 56080 -> 56038 (-42 bytes)

also eliminate unnecessary local variable assignment.

[ tglx: arch/x86 adaptation ]

Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agoi386: no need to make enable_cpu_hotplug a variable
Adrian Bunk [Wed, 17 Oct 2007 16:04:38 +0000 (18:04 +0200)]
i386: no need to make enable_cpu_hotplug a variable

As long as there's no write access to this variable there's no reason to
let gcc check it at runtime.

[ tglx: arch/x86 adaptation ]

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agoi386: es7000 minor cleanups
Adrian Bunk [Wed, 17 Oct 2007 16:04:37 +0000 (18:04 +0200)]
i386: es7000 minor cleanups

This patch contains the following cleanups:
- make some needlessly global functions static
- #if 0 the unused es7000_stop_cpu()

AK: actually removed es7000_stop_cpu
AK: fixed a non ISO prototype too

[ tglx: arch/x86 adaptation ]

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agoi386: Remove local CPU logic in MTRR call to smp_call_function_single
akpm@linux-foundation.org [Wed, 17 Oct 2007 16:04:37 +0000 (18:04 +0200)]
i386: Remove local CPU logic in MTRR call to smp_call_function_single

smp_call_function_single handles the call to local CPU case correctly
now, no need to handle this in the caller.

[ tglx: arch/x86 adaptation ]

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: Create clflush() inline, remove hardcoded wbinvd
H. Peter Anvin [Wed, 17 Oct 2007 16:04:37 +0000 (18:04 +0200)]
x86: Create clflush() inline, remove hardcoded wbinvd

Create an inline function for clflush(), with the proper arguments,
and use it instead of hard-coding the instruction.

This also removes one instance of hard-coded wbinvd, based on a patch
by Bauder de Oliveira Costa.

[ tglx: arch/x86 adaptation ]

Cc: Andi Kleen <andi@firstfloor.org>
Cc: Glauber de Oliveira Costa <gcosta@redhat.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: constify stacktrace_ops
Jan Beulich [Wed, 17 Oct 2007 16:04:37 +0000 (18:04 +0200)]
x86: constify stacktrace_ops

.. as they're never written to.

[ tglx: arch/x86 adaptation ]

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: Some cleanups for pci gart code
Andi Kleen [Wed, 17 Oct 2007 16:04:37 +0000 (18:04 +0200)]
x86: Some cleanups for pci gart code

- Mark function static
- Clarify license

[ tglx: arch/x86 adaptation ]

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: misc. constifications
Jan Beulich [Wed, 17 Oct 2007 16:04:37 +0000 (18:04 +0200)]
x86: misc. constifications

Miscellaneous x86 stuff that can live in .rodata.

[ tglx: arch/x86 adaptation ]

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: more struct irqaction initializer cleanups
Thomas Gleixner [Wed, 17 Oct 2007 16:04:36 +0000 (18:04 +0200)]
x86: more struct irqaction initializer cleanups

more struct irqaction initializer cleanups.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>