dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

71142 Commits

Author SHA1 Message Date
Thomas Gleixner 68fdc55c48 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>
2007-10-17 20:26:16 +02:00
Thomas Gleixner 5c8eec5019 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>
2007-10-17 20:26:15 +02:00
Thomas Gleixner c4ac82a881 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>
2007-10-17 20:26:13 +02:00
Thomas Gleixner 35cc46119d 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>
2007-10-17 20:26:12 +02:00
Thomas Gleixner 612d26a72a x86: unify include/asm/ioctls_32/64.h
Same file, except for whitespace and comment formatting.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-10-17 20:26:11 +02:00
Thomas Gleixner b515e4767f 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
2007-10-17 20:24:56 +02:00
Thomas Gleixner 2dc27f01ec x86: apply missing DMA/OOM prevention to floppy_32.h
commit 554d284ba9 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>
2007-10-17 20:17:22 +02:00
Thomas Gleixner 106619c440 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>
2007-10-17 20:17:21 +02:00
Thomas Gleixner 1f7afb08a5 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>
2007-10-17 20:17:19 +02:00
Thomas Gleixner 327c21bc3d 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>
2007-10-17 20:17:18 +02:00
Thomas Gleixner f1ea05466a 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>
2007-10-17 20:17:17 +02:00
Thomas Gleixner 9bfa23df56 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>
2007-10-17 20:17:15 +02:00
Thomas Gleixner b2bba72c10 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>
2007-10-17 20:17:14 +02:00
Thomas Gleixner 0b4dc7c352 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>
2007-10-17 20:17:13 +02:00
Thomas Gleixner 17d36707dd 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>
2007-10-17 20:17:12 +02:00
Thomas Gleixner 003a46cfff x86: unify some more trivial include/asm-x86/ 32/64 variants
Scripted unification.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-10-17 20:17:10 +02:00
Roland Dreier 217d115cd5 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>
2007-10-17 20:17:09 +02:00
Brian Gerst 020bd9f1c7 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>
2007-10-17 20:17:08 +02:00
Roland McGrath c65916fe35 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>
2007-10-17 20:17:06 +02:00
Luiz Fernando N. Capitulino de8aacbe6a 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>
2007-10-17 20:17:05 +02:00
Jan Beulich 32c464f5d9 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(-)
2007-10-17 20:17:04 +02:00
Andi Kleen c861eff88c 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>
2007-10-17 20:17:02 +02:00
Ingo Molnar b93b6ca3bf 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>
2007-10-17 20:17:01 +02:00
Luiz Fernando N. Capitulino c7537ab234 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>
2007-10-17 20:17:00 +02:00
Andi Kleen 99741faa34 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>
2007-10-17 20:16:58 +02:00
Yinghai Lu 20d225b991 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>
2007-10-17 20:16:57 +02:00
Ingo Molnar 382f64ab8f 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>
2007-10-17 20:16:56 +02:00
Jan Beulich 072f5d82b5 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>
2007-10-17 20:16:54 +02:00
Joe Korty 38e760a133 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>
2007-10-17 20:16:53 +02:00
Pavel Emelyanov 9aa8d7195a 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>
2007-10-17 20:16:52 +02:00
Thomas Gleixner c1e3619edd 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>
2007-10-17 20:16:50 +02:00
Satyam Sharma c789c037e9 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>
2007-10-17 20:16:49 +02:00
Thomas Gleixner 0b4b5dde45 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>
2007-10-17 20:16:48 +02:00
Thomas Gleixner f6a2e7f201 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>
2007-10-17 20:16:47 +02:00
Thomas Gleixner 686d8c63d5 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>
2007-10-17 20:16:45 +02:00
Thomas Gleixner e2f430291f 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>
2007-10-17 20:16:44 +02:00
Roland McGrath 06f99ac87e 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>
2007-10-17 20:16:43 +02:00
Muli Ben-Yehuda bc3c6058bc 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>
2007-10-17 20:16:41 +02:00
Andrew Morton 3c215b6680 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>
2007-10-17 20:16:40 +02:00
Adrian Bunk 95c1e9aefa 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>
2007-10-17 20:16:39 +02:00
Mike Travis 98c9e27a56 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>
2007-10-17 20:16:37 +02:00
Thomas Gleixner 6b556ffc4b 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>
2007-10-17 20:16:36 +02:00
Stefan Richter d9a6294303 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>
2007-10-17 20:16:35 +02:00
Jan Beulich d1e084746b 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>
2007-10-17 20:16:33 +02:00
Andi Kleen 909dd324fb 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>
2007-10-17 20:16:32 +02:00
Satyam Sharma ffecad95ee 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>
2007-10-17 20:16:31 +02:00
Adrian Bunk 7e02cb941d 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>
2007-10-17 20:16:29 +02:00
Steven Rostedt 3f4ed1511d 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>
2007-10-17 20:16:28 +02:00
Chuck Lever d2ccc3fdde 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
‘__first_node’:
/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
‘__next_node’:
/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
‘__first_unset_node’:
/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>
2007-10-17 20:16:27 +02:00
Glauber de Oliveira Costa 92b2dc79c3 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>
2007-10-17 20:16:25 +02:00