Kurt Hackel [Fri, 28 Apr 2006 01:51:26 +0000 (18:51 -0700)]
ocfs2: mle ref counting fixes
Signed-off-by: Kurt Hackel <kurt.hackel@oracle.com>
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Kurt Hackel [Fri, 28 Apr 2006 01:47:41 +0000 (18:47 -0700)]
ocfs2: better mle debugging
Signed-off-by: Kurt Hackel <kurt.hackel@oracle.com>
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Kurt Hackel [Fri, 28 Apr 2006 01:08:51 +0000 (18:08 -0700)]
ocfs2: clean up recovery related messages
Signed-off-by: Kurt Hackel <kurt.hackel@oracle.com>
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Kurt Hackel [Fri, 28 Apr 2006 01:06:58 +0000 (18:06 -0700)]
ocfs2: handle network errors during recovery
Signed-off-by: Kurt Hackel <kurt.hackel@oracle.com>
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Kurt Hackel [Fri, 28 Apr 2006 01:05:41 +0000 (18:05 -0700)]
ocfs2: only recover one dead node at a time
Signed-off-by: Kurt Hackel <kurt.hackel@oracle.com>
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Kurt Hackel [Fri, 28 Apr 2006 01:03:49 +0000 (18:03 -0700)]
ocfs2: Better tracking for recovery state changes
Signed-off-by: Kurt Hackel <kurt.hackel@oracle.com>
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Kurt Hackel [Fri, 28 Apr 2006 01:02:10 +0000 (18:02 -0700)]
ocfs2: Fix empty lvb check
The check for an empty lvb should check the entire buffer not just the first
byte.
Signed-off-by: Kurt Hackel <kurt.hackel@oracle.com>
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Kurt Hackel [Fri, 28 Apr 2006 01:00:21 +0000 (18:00 -0700)]
ocfs2: fix inverted logic in dlm_is_node_dead
Signed-off-by: Kurt Hackel <kurt.hackel@oracle.com>
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Kurt Hackel [Fri, 28 Apr 2006 00:59:46 +0000 (17:59 -0700)]
ocfs2: recheck lockres master before sending an unlock request.
Recovery may have happened and it may now be mastered locally.
Signed-off-by: Kurt Hackel <kurt.hackel@oracle.com>
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Kurt Hackel [Fri, 28 Apr 2006 00:58:23 +0000 (17:58 -0700)]
ocfs2: add a small delay after a failed migration
Otherwise we risk starving other threads.
Signed-off-by: Kurt Hackel <kurt.hackel@oracle.com>
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Mark Fasheh [Thu, 23 Mar 2006 19:23:29 +0000 (11:23 -0800)]
ocfs2: silence a compile warning in dlm_alloc_pagevec()
Reported by Andrew Morton.
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Joel Becker [Fri, 17 Mar 2006 01:40:37 +0000 (17:40 -0800)]
[PATCH] ocfs2: Alloc at least a page for the DLM hash
The OCFS2 DLM allocates a number of pages for a hash to lookup locks.
There was a bug where a PAGE_SIZE bigger than the hash size (eg, 64K
pages) would result in zero pages allocated.
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Daniel Phillips [Sat, 11 Mar 2006 02:08:16 +0000 (18:08 -0800)]
ocfs2: allocate lockres hash pages in an array
This allows us to have a hash table greater than a single page which greatly
improves dlm performance on some tests.
Signed-off-by: Daniel Phillips <phillips@google.com>
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Mark Fasheh [Fri, 10 Mar 2006 21:44:00 +0000 (13:44 -0800)]
ocfs2: inline dlm_lockres_get()
It's called on every lookup so this might help performance a bit.
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Daniel Phillips [Fri, 10 Mar 2006 21:31:47 +0000 (13:31 -0800)]
[PATCH] Clean up ocfs2 hash probe and make it faster
Signed-Off-By: Daniel Phillips <phillips@google.com>
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Mark Fasheh [Fri, 10 Mar 2006 01:55:56 +0000 (17:55 -0800)]
ocfs2: calculate lockid hash values outside of the spinlock
Fixes a performance bug - pointed out by Andrew.
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Mark Fasheh [Mon, 6 Mar 2006 23:36:17 +0000 (15:36 -0800)]
ocfs2: move lockres qstr next to hlist_node structure
Gains us a bit of performance on loads which heavily hit the lockres hash.
Patch suggested by Daniel Phillips <phillips@google.com>.
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Linus Torvalds [Mon, 26 Jun 2006 20:33:14 +0000 (13:33 -0700)]
Merge git://git./linux/kernel/git/bunk/trivial
* git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial:
typo fixes
Clean up 'inline is not at beginning' warnings for usb storage
Storage class should be first
i386: Trivial typo fixes
ixj: make ixj_set_tone_off() static
spelling fixes
fix paniced->panicked typos
Spelling fixes for Documentation/atomic_ops.txt
move acknowledgment for Mark Adler to CREDITS
remove the bouncing email address of David Campbell
Karsten Keil [Mon, 26 Jun 2006 18:21:01 +0000 (20:21 +0200)]
[PATCH] fix processing of the last byte in isdn_readbchan_tty()
The changes in the tty handling contain a bug while accessing
the last byte in the skb. Since special sequence for control of
DTMF and FAX via ttyI* devices handled via this path, these services
do not work anymore.
Signed-off-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Eric Sesterhenn [Wed, 21 Jun 2006 18:56:26 +0000 (20:56 +0200)]
[PATCH] Array overrun in drivers/infiniband/core/cma.c
This was spotted by coverity #id 1300. Since the array has only four
elements, we should just use those four.
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Acked-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Linus Torvalds [Mon, 26 Jun 2006 18:55:42 +0000 (11:55 -0700)]
Revert "[PATCH] kthread: update loop.c to use kthread"
This reverts commit
c7b2eff059fcc2d1b7085ee3d84b79fd657a537b.
Hugh Dickins explains:
"It seems too little tested: "losetup -d /dev/loop0" fails with
EINVAL because nothing sets lo_thread; but even when you patch
loop_thread() to set lo->lo_thread = current, it can't survive
more than a few dozen iterations of the loop below (with a tmpfs
mounted on /tst):
j=0
cp /dev/zero /tst
while :
do
let j=j+1
echo "Doing pass $j"
losetup /dev/loop0 /tst/zero
mkfs -t ext2 -b 1024 /dev/loop0 >/dev/null 2>&1
mount -t ext2 /dev/loop0 /mnt
umount /mnt
losetup -d /dev/loop0
done
it collapses with failed ioctl then BUG_ON(!bio).
I think the original lo_done completion was more subtle and safe
than the kthread conversion has allowed for."
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Linus Torvalds [Mon, 26 Jun 2006 18:05:15 +0000 (11:05 -0700)]
Merge git://git./linux/kernel/git/sam/kbuild
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild: (40 commits)
kbuild: trivial fixes in Makefile
kbuild: adding symbols in Kconfig and defconfig to TAGS
kbuild: replace abort() with exit(1)
kbuild: support for %.symtypes files
kbuild: fix silentoldconfig recursion
kbuild: add option for stripping modules while installing them
kbuild: kill some false positives from modpost
kbuild: export-symbol usage report generator
kbuild: fix make -rR breakage
kbuild: append -dirty for updated but uncommited changes
kbuild: append git revision for all untagged commits
kbuild: fix module.symvers parsing in modpost
kbuild: ignore make's built-in rules & variables
kbuild: bugfix with initramfs
kbuild: modpost build fix
kbuild: check license compatibility when building modules
kbuild: export-type enhancement to modpost.c
kbuild: add dependency on kernel.release to the package targets
kbuild: `make kernelrelease' speedup
kconfig: KCONFIG_OVERWRITECONFIG
...
Linus Torvalds [Mon, 26 Jun 2006 18:03:29 +0000 (11:03 -0700)]
Merge /pub/scm/linux/kernel/git/herbert/crypto-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/herbert/crypto-2.6:
[CRYPTO] tcrypt: Forbid tcrypt from being built-in
[CRYPTO] aes: Add wrappers for assembly routines
[CRYPTO] tcrypt: Speed benchmark support for digest algorithms
[CRYPTO] tcrypt: Return -EAGAIN from module_init()
[CRYPTO] api: Allow replacement when registering new algorithms
[CRYPTO] api: Removed const from cra_name/cra_driver_name
[CRYPTO] api: Added cra_init/cra_exit
[CRYPTO] api: Fixed incorrect passing of context instead of tfm
[CRYPTO] padlock: Rearrange context structure to reduce code size
[CRYPTO] all: Pass tfm instead of ctx to algorithms
[CRYPTO] digest: Remove unnecessary zeroing during init
[CRYPTO] aes-i586: Get rid of useless function wrappers
[CRYPTO] digest: Add alignment handling
[CRYPTO] khazad: Use 32-bit reads on key
Linus Torvalds [Mon, 26 Jun 2006 18:01:58 +0000 (11:01 -0700)]
Merge /pub/scm/linux/kernel/git/dtor/input
* master.kernel.org:/pub/scm/linux/kernel/git/dtor/input:
Input: iforce - remove some pointless casts
Input: psmouse - add support for Intellimouse 4.0
Input: atkbd - fix HANGEUL/HANJA keys
Input: fix misspelling of Hangeul key
Input: via-pmu - add input device support
Input: rearrange exports
Input: fix formatting to better follow CodingStyle
Input: reset name, phys and uniq when unregistering
Input: return correct size when reading modalias attribute
Input: change my e-mail address in MAINTAINERS file
Input: fix potential overflows in driver/input/keyboard
Input: fix potential overflows in driver/input/touchscreen
Input: fix potential overflows in driver/input/joystick
Input: fix potential overflows in driver/input/mouse
Input: fix accuracy of fixp-arith.h
Input: iforce - use ENOSPC instead of ENOMEM
Input: constify drivers/char/keyboard.c
Greg Ungerer [Mon, 26 Jun 2006 06:33:15 +0000 (16:33 +1000)]
[PATCH] m68knommu: use configurable RAM setup page_offset.h
Remove board specific base RAM conditionals from page_offset.h
With the Kconfig time configurable RAM setup none of this is required.
It is all based on the Kconfig (CONFIG_RAMBASE) option now.
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Greg Ungerer [Mon, 26 Jun 2006 06:33:09 +0000 (16:33 +1000)]
[PATCH] m68knommu: use configurable RAM setup in start up code
Change to using a configurable RAM setup in startup code. This cleans up
the whole RAM base/sizing issue, and removes a lot of board specific code.
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Greg Ungerer [Mon, 26 Jun 2006 06:33:05 +0000 (16:33 +1000)]
[PATCH] m68knommu: use configurable RAM setup in linker script
Remove the fixed RAM configurations for each board type from the
linker script. Replace with simple defines usng the flexible RAM
configuration options. This cleans out of lot of board specific
munging of addresses.
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Greg Ungerer [Mon, 26 Jun 2006 06:32:59 +0000 (16:32 +1000)]
[PATCH] m68knommu: create configurable RAM setup
Reworked the way RAM regions are defined. Instead of coding all the
variations for each board type we now just configure RAM base and size
in the usual Kconfig setup. This much simplifies the code, and makes it
a lot more flexible when setting up new boards or board varients.
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Greg Ungerer [Mon, 26 Jun 2006 06:34:09 +0000 (16:34 +1000)]
[PATCH] m68knommu: remove unused vars from generic 68328 start code
Clean out unused variable definitions from 68328 start up code.
Also use a more appropriate start address for the case of relocating
the kernel code to RAM (from ROM/flash).
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Greg Ungerer [Mon, 26 Jun 2006 06:34:04 +0000 (16:34 +1000)]
[PATCH] m68knommu: remove __ramvec from 68328/pilot start code
__ramvec has been removed from the linker script. The vector base
address is defined as a configurable option, use that. Remove its
use from the 68328/pilot startup code.
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Linus Torvalds [Mon, 26 Jun 2006 17:54:02 +0000 (10:54 -0700)]
Merge /pub/scm/linux/kernel/git/mchehab/v4l-dvb
* master.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb:
V4L/DVB (4227): Update this driver for recent header file movement.
V4L/DVB (4223): Add V4L2_CID_MPEG_STREAM_VBI_FMT control
V4L/DVB (4222): Always switch tuner mode when calling VIDIOC_S_FREQUENCY.
V4L/DVB (4221): Add HM12 YUV format define.
V4L/DVB (4219): Av7110: analog sound output of DVB-C rev 2.3
V4L/DVB (4217): Fix a misplaced closing bracket/else, which caused swzigzag not to be called
V4L/DVB (4215): Make VIDEO_CX88_BLACKBIRD a separate build option
V4L/DVB (4214): Make VIDEO_CX2341X a selectable build option
V4L/DVB (4213): Cx88: cleanups
V4L/DVB (4211): Fix an Oops for all fe that have get_frontend_algo == NULL
Linus Torvalds [Mon, 26 Jun 2006 17:51:09 +0000 (10:51 -0700)]
Merge branch 'x86-64'
* x86-64: (83 commits)
[PATCH] x86_64: x86_64 stack usage debugging
[PATCH] x86_64: (resend) x86_64 stack overflow debugging
[PATCH] x86_64: msi_apic.c build fix
[PATCH] x86_64: i386/x86-64 Add nmi watchdog support for new Intel CPUs
[PATCH] x86_64: Avoid broadcasting NMI IPIs
[PATCH] x86_64: fix apic error on bootup
[PATCH] x86_64: enlarge window for stack growth
[PATCH] x86_64: Minor string functions optimizations
[PATCH] x86_64: Move export symbols to their C functions
[PATCH] x86_64: Standardize i386/x86_64 handling of NMI_VECTOR
[PATCH] x86_64: Fix modular pc speaker
[PATCH] x86_64: remove sys32_ni_syscall()
[PATCH] x86_64: Do not use -ffunction-sections for modules
[PATCH] x86_64: Add cpu_relax to apic_wait_icr_idle
[PATCH] x86_64: adjust kstack_depth_to_print default
[PATCH] i386/x86-64: adjust /proc/interrupts column headings
[PATCH] x86_64: Fix race in cpu_local_* on preemptible kernels
[PATCH] x86_64: Fix fast check in safe_smp_processor_id
[PATCH] x86_64: x86_64 setup.c - printing cmp related boottime information
[PATCH] i386/x86-64/ia64: Move polling flag into thread_info_status
...
Manual resolve of trivial conflict in arch/i386/kernel/Makefile
Eric Sandeen [Mon, 26 Jun 2006 12:00:08 +0000 (14:00 +0200)]
[PATCH] x86_64: x86_64 stack usage debugging
Applies to git & 2.6.17-rc6 after CONFIG_DEBUG_STACKOVERFLOW patch
uses same stack-zeroing mechanism as on i386 to discover maximum stack
excursions.
Signed-off-by: Eric Sandeen <sandeen@sgi.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Eric Sandeen [Mon, 26 Jun 2006 12:00:05 +0000 (14:00 +0200)]
[PATCH] x86_64: (resend) x86_64 stack overflow debugging
Take two, now without spurious whitespace :( Applies to git & 2.6.17-rc6
CONFIG_DEBUG_STACKOVERFLOW existed for x86_64 in 2.4, but seems to have gone AWOL in 2.6.
I've pretty much just copied this over from the 2.4 code, with
appropriate tweaks for the 2.6 kernel, plus a bugfix. I'd personally
rather see it printed out the way other arches do it, i.e.
bytes-remaining-until-overflow, rather than having to do the subtraction
yourself. Also, only 128 bytes remaining seems awfully late to issue a
warning. But I'll start here :)
Signed-off-by: Eric Sandeen <sandeen@sgi.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Christian Kujau [Mon, 26 Jun 2006 12:00:02 +0000 (14:00 +0200)]
[PATCH] x86_64: msi_apic.c build fix
CC drivers/pci/msi-apic.o
In file included from include/asm/msi.h:11,
from drivers/pci/msi.h:71,
from drivers/pci/msi-apic.c:8:
include/asm/smp.h:103: error: syntax error before '->' token
akpm: nasty. It appears to be
static inline unsigned int cpu_mask_to_apicid(cpumask_t cpumask)
conflicting with include/asm-x86_64/mach_apic.h's
#define cpu_mask_to_apicid (genapic->cpu_mask_to_apicid)
And I don't know which patch in rc4-mm1 triggered this.
Fixing this in the .c file seems wrong.
Including asm/smp.h instead of linux/smp.h seems wrong too. Need that
.config.
Cc: Andi Kleen <ak@muc.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Venkatesh Pallipadi [Mon, 26 Jun 2006 11:59:59 +0000 (13:59 +0200)]
[PATCH] x86_64: i386/x86-64 Add nmi watchdog support for new Intel CPUs
Intel now has support for Architectural Performance Monitoring Counters
( Refer to IA-32 Intel Architecture Software Developer's Manual
http://www.intel.com/design/pentium4/manuals/253669.htm ). This
feature is present starting from Intel Core Duo and Intel Core Solo processors.
What this means is, the performance monitoring counters and some performance
monitoring events are now defined in an architectural way (using cpuid).
And there will be no need to check for family/model etc for these architectural
events.
Below is the patch to use this performance counters in nmi watchdog driver.
Patch handles both i386 and x86-64 kernels.
Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Keith Owens [Mon, 26 Jun 2006 11:59:56 +0000 (13:59 +0200)]
[PATCH] x86_64: Avoid broadcasting NMI IPIs
On some i386/x86_64 systems, sending an NMI IPI as a broadcast will
reset the system. This seems to be a BIOS bug which affects machines
where one or more cpus are not under OS control. It occurs on HT
systems with a version of the OS that is not compiled without HT
support. It also occurs when a system is booted with max_cpus=n where
2 <= n < cpus known to the BIOS. The fix is to always send NMI IPI as
a mask instead of as a broadcast.
Signed-off-by: Keith Owens <kaos@sgi.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Siddha, Suresh B [Mon, 26 Jun 2006 11:59:53 +0000 (13:59 +0200)]
[PATCH] x86_64: fix apic error on bootup
Appended patch fixes the "APIC error on CPUX: 00(40)" observed during bootup.
From SDM Vol-3A "Valid Interrupt Vectors" section:
"When an illegal vector value (0-15) is written to an LVT entry
and the delivery mode is Fixed, the APIC may signal an illegal
vector error, with out regard to whether the mask bit is set
or whether an interrupt is actually seen on input."
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Chuck Ebbert [Mon, 26 Jun 2006 11:59:50 +0000 (13:59 +0200)]
[PATCH] x86_64: enlarge window for stack growth
Allow stack growth so the 'enter' instruction works. Also
fixes problem in compat_sys_kexec_load() which could allocate
more than 128 bytes using compat_alloc_user_space().
Signed-off-by: Chuck Ebbert <76306.1226@compuserve.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andi Kleen [Mon, 26 Jun 2006 11:59:47 +0000 (13:59 +0200)]
[PATCH] x86_64: Minor string functions optimizations
- Use tail call from clear_user to __clear_user to save some code size
- Use standard memcpy for forward memmove
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andi Kleen [Mon, 26 Jun 2006 11:59:44 +0000 (13:59 +0200)]
[PATCH] x86_64: Move export symbols to their C functions
Only exports for assembler files are left in x8664_ksyms.c
Originally inspired by a patch from Al Viro
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Keith Owens [Mon, 26 Jun 2006 11:59:41 +0000 (13:59 +0200)]
[PATCH] x86_64: Standardize i386/x86_64 handling of NMI_VECTOR
x86_64 and i386 behave inconsistently when sending an IPI on vector 2
(NMI_VECTOR). Make both behave the same, so IPI 2 is sent as NMI.
The crash code was abusing send_IPI_allbutself() by passing a code
instead of a vector, it only worked because crash knew about the
internal code of send_IPI_allbutself(). Change crash to use NMI_VECTOR
instead, and remove the comment about how crash was abusing the function.
This patch is a pre-requisite for fixing the problem where sending an
IPI as NMI would reboot some Dell Xeon systems. I cannot fix that
problem while crash continus to abuse send_IPI_allbutself().
It also removes the inconsistency between i386 and x86_64 for
NMI_VECTOR. That will simplify all the RAS code that needs to bring
all the cpus to a clean stop, even when one or more cpus are spinning
disabled.
Signed-off-by: Keith Owens <kaos@sgi.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Piotr Kaczuba [Mon, 26 Jun 2006 11:59:38 +0000 (13:59 +0200)]
[PATCH] x86_64: Fix modular pc speaker
It turned out that the following change is needed when the speaker is
compiled as a module.
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Adrian Bunk [Mon, 26 Jun 2006 11:59:35 +0000 (13:59 +0200)]
[PATCH] x86_64: remove sys32_ni_syscall()
This patch removes the no longer used sys32_ni_syscall()
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Sergey Vlasov [Mon, 26 Jun 2006 11:59:32 +0000 (13:59 +0200)]
[PATCH] x86_64: Do not use -ffunction-sections for modules
Currently CONFIG_REORDER uses -ffunction-sections for all code;
however, creating a separate section for each function is not useful
for modules and just adds bloat. Moving this option from CFLAGS to
CFLAGS_KERNEL shrinks module object files (e.g., the module tree for a
kernel built with most drivers as modules shrinked from 54M to 46M),
and decreases the number of sysfs files in /sys/module/*/sections/
directories.
Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andreas Mohr [Mon, 26 Jun 2006 11:59:29 +0000 (13:59 +0200)]
[PATCH] x86_64: Add cpu_relax to apic_wait_icr_idle
This one is adding a cpu_relax() that already existed in the i386 version.
Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jan Beulich [Mon, 26 Jun 2006 11:59:26 +0000 (13:59 +0200)]
[PATCH] x86_64: adjust kstack_depth_to_print default
Defaulting to a value not evenly divisible by four makes little sense,
as four values are displayed per line (and hence the rest of the line
would otherwise be wasted).
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jan Beulich [Mon, 26 Jun 2006 11:59:23 +0000 (13:59 +0200)]
[PATCH] i386/x86-64: adjust /proc/interrupts column headings
With (significantly) more than 10 CPUs online, the column headings
drifted off the positions of the column contents with growing CPU
numbers.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andi Kleen [Mon, 26 Jun 2006 11:59:20 +0000 (13:59 +0200)]
[PATCH] x86_64: Fix race in cpu_local_* on preemptible kernels
When a process changes CPUs while doing the non atomic cpu_local_*
operations it might operate on the local_t of a different CPUs.
Fix that by disabling preemption.
Pointed out by Christopher Lameter
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andi Kleen [Mon, 26 Jun 2006 11:59:17 +0000 (13:59 +0200)]
[PATCH] x86_64: Fix fast check in safe_smp_processor_id
The APIC ID returned by hard_smp_processor_id can be beyond
NR_CPUS and then overflow the x86_cpu_to_apic[] array.
Add a check for overflow. If it happens then the slow loop below
will catch.
Bug pointed out by Doug Thompson
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Rohit Seth [Mon, 26 Jun 2006 11:59:14 +0000 (13:59 +0200)]
[PATCH] x86_64: x86_64 setup.c - printing cmp related boottime information
Getting phys_proc_id and cpu_core_id information to be printed at boot
time for AMD processors. Also matching the Node related boot time
information that gets printed for Intel and AMD processors for NUMA
configurations.
Signed-off-by: Rohit Seth <rohitseth@google.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andi Kleen [Mon, 26 Jun 2006 11:59:11 +0000 (13:59 +0200)]
[PATCH] i386/x86-64/ia64: Move polling flag into thread_info_status
During some profiling I noticed that default_idle causes a lot of
memory traffic. I think that is caused by the atomic operations
to clear/set the polling flag in thread_info. There is actually
no reason to make this atomic - only the idle thread does it
to itself, other CPUs only read it. So I moved it into ti->status.
Converted i386/x86-64/ia64 for now because that was the easiest
way to fix ACPI which also manipulates these flags in its idle
function.
Cc: Nick Piggin <npiggin@novell.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Len Brown <len.brown@intel.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andi Kleen [Mon, 26 Jun 2006 11:59:08 +0000 (13:59 +0200)]
[PATCH] x86_64: Remove bogus RED-PEN comment in signal.c
No red zone possible/needed on the alternative stack.
It caused confusion.
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrew Morton [Mon, 26 Jun 2006 11:59:05 +0000 (13:59 +0200)]
[PATCH] x86_64: check_addr() cleanups
- Use DMA_32BIT_MASK
- Use %z for size_t
- 80-cols
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jan Beulich [Mon, 26 Jun 2006 11:59:02 +0000 (13:59 +0200)]
[PATCH] x86_64: miscellaneous mm/init.c fixes
- fix an off-by-one error in phys_pmd_init()
- prevent phys_pmd_init() from removing mappings established earlier
- fix the direct mapping early printk to in fact show the end of the range
- remove an apparently orphan comment
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andi Kleen [Mon, 26 Jun 2006 11:58:59 +0000 (13:58 +0200)]
[PATCH] x86_64: Mark mce_amd cpu notifier __cpuinit/__cpuinitdata
Cc: Jacob Shin <jacob.shin@amd.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jacob Shin [Mon, 26 Jun 2006 11:58:56 +0000 (13:58 +0200)]
[PATCH] x86_64: mce_amd cleanup
Clean up mce_amd.c for readability and remove code no
longer needed.
Signed-off-by: Jacob Shin <jacob.shin@amd.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jacob Shin [Mon, 26 Jun 2006 11:58:53 +0000 (13:58 +0200)]
[PATCH] x86_64: mce_amd support for family 0x10 processors
Add support for mce threshold registers found in future
AMD family 0x10 processors. Backwards compatible with
family 0xF hardware.
AK: fixed build on !SMP
Signed-off-by: Jacob Shin <jacob.shin@amd.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jacob Shin [Mon, 26 Jun 2006 11:58:50 +0000 (13:58 +0200)]
[PATCH] x86_64: mce_amd relocate sysfs files
Get rid of /sys/devices/system/threshold directory and move
mce_amd thresholding files into the machine sysfs directory --
/sys/devices/system/machinecheck.
AK: Fixed warning
Signed-off-by: Jacob Shin <jacob.shin@amd.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jacob Shin [Mon, 26 Jun 2006 11:58:47 +0000 (13:58 +0200)]
[PATCH] x86_64: apic support for extended apic interrupt
Add support for extended APIC LVT found in future AMD processors.
Signed-off-by: Jacob Shin <jacob.shin@amd.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andi Kleen [Mon, 26 Jun 2006 11:58:44 +0000 (13:58 +0200)]
[PATCH] x86_64: Move VM86 config into arch/i386/Kconfig
Architecture specific configs like this have no business at all
in init/Kconfig. This prevents it from being set on x86-64
Pointed out by H.Peter Anvin
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andi Kleen [Mon, 26 Jun 2006 11:58:41 +0000 (13:58 +0200)]
[PATCH] i386/x86-64: Fix isoimage when syslinux is in /usr/share
It's like this on SUSE systems.
Cc: hpa@zytor.com
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Vojtech Pavlik [Mon, 26 Jun 2006 11:58:38 +0000 (13:58 +0200)]
[PATCH] x86_64: Update copyright in time.c
Update my copyright dates in arch/x86-64/kernel/time.c
Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Vojtech Pavlik [Mon, 26 Jun 2006 11:58:35 +0000 (13:58 +0200)]
[PATCH] x86_64: Explain why HPET T0_CMP register is written twice
After writing the CFG register, the first value written to the T0_CMP
register is the value at which next interrupt should be triggered, every
value after that sets the period of the interrupt. For that reason, the code
needs to write the value twice - to set both the phase and period.
[AK: I had already figured it out by myself, but it's still useful
to have a comment for this.]
Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Vojtech Pavlik [Mon, 26 Jun 2006 11:58:32 +0000 (13:58 +0200)]
[PATCH] x86_64: Make use of the *PER* constants in time.c
This patch makes use of the newly added conversion constants
in time.h to x86-64 time.c. The code gets significantly easier
to understand.
Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Vojtech Pavlik [Mon, 26 Jun 2006 11:58:29 +0000 (13:58 +0200)]
[PATCH] x86_64: Remove hack to manually enable HPET on AMD8111 southbridges
Remove #ifdefed code to manually enable HPET on AMD8111, where the
BIOS doesn't have ACPI HPET tables and doesn't enable it for us.
Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Vojtech Pavlik [Mon, 26 Jun 2006 11:58:26 +0000 (13:58 +0200)]
[PATCH] x86_64: Add X86_FEATURE_RDTSCP, fix rdtscp in /proc/cpuinfo
This patch adds the X86_FEATURE_RDTSCP #define, so that kernel code can
check for the feature easily and also fixes the location of the "rdtscp"
string in the cpuinfo tables.
Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Vojtech Pavlik [Mon, 26 Jun 2006 11:58:23 +0000 (13:58 +0200)]
[PATCH] x86_64: Rename oem_force_hpet_timer to apic_is_clustered_box
Rename oem_force_hpet_timer to apic_is_clustered_box, to give the
function a better fitting name - it really isn't at all about HPET.
Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Vojtech Pavlik [Mon, 26 Jun 2006 11:58:20 +0000 (13:58 +0200)]
[PATCH] x86_64: Add useful constants to time.h
In timekeeping code, one often does need to use conversion constants. Naming
these leads to code that's easier to understand, showing the reader between
which units the conversion is made.
Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Rohit Seth [Mon, 26 Jun 2006 11:58:17 +0000 (13:58 +0200)]
[PATCH] x86_64: moving phys_proc_id and cpu_core_id to cpuinfo_x86
Most of the fields of cpuinfo are defined in cpuinfo_x86 structure.
This patch moves the phys_proc_id and cpu_core_id for each processor to
cpuinfo_x86 structure as well.
Signed-off-by: Rohit Seth <rohitseth@google.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jon Mason [Mon, 26 Jun 2006 11:58:14 +0000 (13:58 +0200)]
[PATCH] x86_64: Calgary IOMMU - Calgary specific bits
This patch hooks Calgary into the build, the x86-64 IOMMU
initialization paths, and introduces the Calgary specific bits. The
implementation draws inspiration from both PPC (which has support for
the same chip but requires firmware support which we don't have on
x86-64) and gart. Calgary is different from gart in that it support a
translation table per PHB, as opposed to the single gart aperture.
Changes from previous version:
* Addition of boot-time disablement for bus-level translation/isolation
(e.g, enable userspace DMA for things like X)
* Usage of newer IOMMU abstraction functions
Signed-off-by: Muli Ben-Yehuda <muli@il.ibm.com>
Signed-off-by: Jon Mason <jdmason@us.ibm.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jon Mason [Mon, 26 Jun 2006 11:58:11 +0000 (13:58 +0200)]
[PATCH] x86_64: Calgary IOMMU - IOMMU abstractions
This patch creates a new interface for IOMMUs by adding a centralized
location for IOMMU allocation (for translation tables/apertures) and
IOMMU initialization. In creating these, code was moved around for
abstraction, uniformity, and consiceness.
Take note of the move of the iommu_setup bootarg parsing code to
__setup. This is enabled by moving back the location of the aperture
allocation/detection to mem init (which while ugly, was already the
location of the swiotlb_init).
While a slight departure from the previous patch, I belive this provides
the true intention of the previous versions of the patch which changed
this code. It also makes the addition of the upcoming calgary code much
cleaner than previous patches.
[AK: Removed one broken change. iommu_setup still has to be called
early]
Signed-off-by: Muli Ben-Yehuda <muli@il.ibm.com>
Signed-off-by: Jon Mason <jdmason@us.ibm.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jon Mason [Mon, 26 Jun 2006 11:58:08 +0000 (13:58 +0200)]
[PATCH] x86_64: Calgary IOMMU - move valid_dma_direction into the callers
Based on Andi Kleen's comments on the original Calgary patch, move
valid_dma_direction into the calling functions.
Signed-off-by: Muli Ben-Yehuda <muli@il.ibm.com>
Signed-off-by: Jon Mason <jdmason@us.ibm.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jon Mason [Mon, 26 Jun 2006 11:58:05 +0000 (13:58 +0200)]
[PATCH] x86_64: Calgary IOMMU - introduce iommu_detected
swiotlb relies on the gart specific iommu_aperture variable to know if
we discovered a hardware IOMMU before swiotlb initialization. Introduce
iommu_detected to do the same thing, but in a HW IOMMU neutral manner,
in preparation for adding the Calgary HW IOMMU.
Signed-Off-By: Muli Ben-Yehuda <muli@il.ibm.com>
Signed-Off-By: Jon Mason <jdmason@us.ibm.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Rohit Seth [Mon, 26 Jun 2006 11:58:02 +0000 (13:58 +0200)]
[PATCH] x86_64: Change assembly to use regular cpuid_count macro
Minor cleanup patch:
Replacing the asm statement with cpuid_count macro(which already
provides the same functionality).
Signed-off-by: Rohit Seth <rohitseth@google.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jan Beulich [Mon, 26 Jun 2006 11:57:59 +0000 (13:57 +0200)]
[PATCH] x86_64: use halt() instead of raw inline assembly
Use abstractions whenever possible.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andi Kleen [Mon, 26 Jun 2006 11:57:56 +0000 (13:57 +0200)]
[PATCH] x86_64: Get rid of pud_offset_k / __pud_offset_k
pud_offset_k() equivalent to pud_offset() now. Pointed out by Jan Beulich
Similar for __pud_offset_ok, which needs a small change in the callers.
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Carl-Daniel Hailfinger [Mon, 26 Jun 2006 11:57:53 +0000 (13:57 +0200)]
[PATCH] i386/x86-64: Consolidate arch/{i386,x86_64}/boot/compressed/misc.c
Clean up arch/{i386,x86_64}/boot/compressed/misc.c a bit to reduce their
differences. Should have zero effect on code generation.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jan Beulich [Mon, 26 Jun 2006 11:57:50 +0000 (13:57 +0200)]
[PATCH] x86_64: allow unwinder to build without module support
Add proper conditionals to be able to build with CONFIG_MODULES=n.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jan Beulich [Mon, 26 Jun 2006 11:57:47 +0000 (13:57 +0200)]
[PATCH] i386/x86-64: fall back to old-style call trace if no unwinding
If no unwinding is possible at all for a certain exception instance,
fall back to the old style call trace instead of not showing any trace
at all.
Also, allow setting the stack trace mode at the command line.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jan Beulich [Mon, 26 Jun 2006 11:57:44 +0000 (13:57 +0200)]
[PATCH] i386: reliable stack trace support i386 entry.S
To increase the usefulness of reliable stack unwinding, this adds CFI
unwind annotations to many low-level i386 routines.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jan Beulich [Mon, 26 Jun 2006 11:57:41 +0000 (13:57 +0200)]
[PATCH] i386: reliable stack trace support (i386)
These are the i386-specific pieces to enable reliable stack traces. This is
going to be even more useful once CFI annotations get added to he assembly
code, namely to entry.S.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jan Beulich [Mon, 26 Jun 2006 11:57:38 +0000 (13:57 +0200)]
[PATCH] x86_64: reliable stack trace support (x86-64 syscall
Adjust the CFA offset for 64- and 32-bit syscall entries so that the five
slots pre-subtracted from the stack pointer do not appear to reside outside
of the current frame.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jan Beulich [Mon, 26 Jun 2006 11:57:35 +0000 (13:57 +0200)]
[PATCH] x86_64: reliable stack trace support (x86-64 IRQ stack
Change the switching to/from the IRQ stack so that unwind annotations can
be added for it without requiring CFA expressions.
AK: I cleaned it up a bit, making it unconditional and removing the
obsolete DEBUG_INFO full frame code.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jan Beulich [Mon, 26 Jun 2006 11:57:32 +0000 (13:57 +0200)]
[PATCH] x86_64: reliable stack trace support (x86-64)
These are the x86_64-specific pieces to enable reliable stack traces. The
only restriction with this is that it currently cannot unwind across the
interrupt->normal stack boundary, as that transition is lacking proper
annotation.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jan Beulich [Mon, 26 Jun 2006 11:57:28 +0000 (13:57 +0200)]
[PATCH] x86_64: reliable stack trace support
These are the generic bits needed to enable reliable stack traces based
on Dwarf2-like (.eh_frame) unwind information. Subsequent patches will
enable x86-64 and i386 to make use of this.
Thanks to Andi Kleen and Ingo Molnar, who pointed out several possibilities
for improvement.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
bibo,mao [Mon, 26 Jun 2006 11:57:25 +0000 (13:57 +0200)]
[PATCH] x86_64: x86_86 msi miss one entry handler
In x86_64 architecture, if device driver with msi function
gets 0xee vector by assign_irq_vector() function, system will
crash if this interrupt happens. It is because 0xee interrupt
entry is empty. This patch modifies this. This patch is based
on 2.6.17-rc6.
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andi Kleen [Mon, 26 Jun 2006 11:57:22 +0000 (13:57 +0200)]
[PATCH] x86_64: Rename IOMMU option, fix help and mark option embedded.
- Rename the GART_IOMMU option to IOMMU to make clear it's not
just for AMD
- Rewrite the help text to better emphatise this fact
- Make it an embedded option because too many people get it wrong.
To my astonishment I discovered the aacraid driver tests this
symbol directly. This looks quite broken to me - it's an internal
implementation detail of the PCI DMA API. Can the maintainer
please clarify what this test was intended to do?
Cc: linux-scsi@vger.kernel.org
Cc: alan@redhat.com
Cc: markh@osdl.org
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andi Kleen [Mon, 26 Jun 2006 11:57:19 +0000 (13:57 +0200)]
[PATCH] x86_64: Make sure is_compat_task works early
Previously it would only work in the first 32bit system call, not during
early process setup.
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Ingo Molnar [Mon, 26 Jun 2006 11:57:16 +0000 (13:57 +0200)]
[PATCH] x86_64: fix vector_lock deadlock in io_apic.c
Fix a potential deadlock scenario introduced by io_apic.c's new vector_lock
on i386 and x86_64.
Found by the locking correctness validator. The patch was boot-tested on
x86. For details of the deadlock scenario, see the validator output:
======================================================
[ BUG: hard-safe -> hard-unsafe lock order detected! ]
------------------------------------------------------
idle/1 [HC0[0]:SC0[0]:HE0:SE1] is trying to acquire:
(msi_lock){....}, at: [<
c04ff8d2>] startup_msi_irq_wo_maskbit+0x10/0x35
and this task is already holding:
(&irq_desc[i].lock){++..}, at: [<
c015b924>] probe_irq_on+0x36/0x107
which would create a new lock dependency:
(&irq_desc[i].lock){++..} -> (msi_lock){....}
but this new dependency connects a hard-irq-safe lock:
(&irq_desc[i].lock){++..}
... which became hard-irq-safe at:
[<
c01468c4>] lockdep_acquire+0x68/0x84
[<
c10485e9>] _spin_lock+0x21/0x2f
[<
c015aff5>] __do_IRQ+0x3d/0x113
[<
c01062d3>] do_IRQ+0x8c/0xad
to a hard-irq-unsafe lock:
(vector_lock){--..}
... which became hard-irq-unsafe at:
... [<
c01468c4>] lockdep_acquire+0x68/0x84
[<
c10485e9>] _spin_lock+0x21/0x2f
[<
c011b5e8>] assign_irq_vector+0x34/0xc8
[<
c1aa82fa>] setup_IO_APIC+0x45a/0xcff
[<
c1aa56e3>] smp_prepare_cpus+0x5ea/0x8aa
[<
c010033f>] init+0x32/0x2cb
[<
c0102005>] kernel_thread_helper+0x5/0xb
which could potentially lead to deadlocks!
other info that might help us debug this:
3 locks held by idle/1:
#0: (port_mutex){--..}, at: [<
c067070d>] uart_add_one_port+0x61/0x289
#1: (&state->mutex){--..}, at: [<
c067071f>] uart_add_one_port+0x73/0x289
#2: (&irq_desc[i].lock){++..}, at: [<
c015b924>] probe_irq_on+0x36/0x107
the hard-irq-safe lock's dependencies:
-> (&irq_desc[i].lock){++..} ops: 9861 {
initial-use at:
[<
c01468c4>] lockdep_acquire+0x68/0x84
[<
c10487f4>] _spin_lock_irqsave+0x2a/0x3a
[<
c015b415>] setup_irq+0x9b/0x14d
[<
c1aaa4c4>] time_init_hook+0xf/0x11
[<
c1a9f320>] time_init+0x44/0x46
[<
c1a9955f>] start_kernel+0x191/0x38f
[<
c0100210>] 0xc0100210
in-hardirq-W at:
[<
c01468c4>] lockdep_acquire+0x68/0x84
[<
c10485e9>] _spin_lock+0x21/0x2f
[<
c015aff5>] __do_IRQ+0x3d/0x113
[<
c01062d3>] do_IRQ+0x8c/0xad
in-softirq-W at:
[<
c01468c4>] lockdep_acquire+0x68/0x84
[<
c10485e9>] _spin_lock+0x21/0x2f
[<
c015aff5>] __do_IRQ+0x3d/0x113
[<
c01062d3>] do_IRQ+0x8c/0xad
}
... key at: [<
c1ea31e0>] irq_desc_lock_type+0x0/0x20
-> (i8259A_lock){++..} ops: 5149 {
initial-use at:
[<
c01468c4>] lockdep_acquire+0x68/0x84
[<
c10487f4>] _spin_lock_irqsave+0x2a/0x3a
[<
c0108090>] init_8259A+0x11/0x8f
[<
c1aa0d22>] init_ISA_irqs+0x12/0x4d
[<
c1aaa4f0>] pre_intr_init_hook+0x8/0xa
[<
c1aa0cb9>] init_IRQ+0xe/0x65
[<
c1a99546>] start_kernel+0x178/0x38f
[<
c0100210>] 0xc0100210
in-hardirq-W at:
[<
c01468c4>] lockdep_acquire+0x68/0x84
[<
c10487f4>] _spin_lock_irqsave+0x2a/0x3a
[<
c0107fb0>] mask_and_ack_8259A+0x1b/0xcc
[<
c015b007>] __do_IRQ+0x4f/0x113
[<
c01062d3>] do_IRQ+0x8c/0xad
in-softirq-W at:
[<
c01468c4>] lockdep_acquire+0x68/0x84
[<
c10487f4>] _spin_lock_irqsave+0x2a/0x3a
[<
c0107fb0>] mask_and_ack_8259A+0x1b/0xcc
[<
c015b007>] __do_IRQ+0x4f/0x113
[<
c01062d3>] do_IRQ+0x8c/0xad
}
... key at: [<
c142f174>] i8259A_lock+0x14/0x40
... acquired at:
[<
c01468c4>] lockdep_acquire+0x68/0x84
[<
c10487f4>] _spin_lock_irqsave+0x2a/0x3a
[<
c0107eb2>] enable_8259A_irq+0x10/0x47
[<
c0107f12>] startup_8259A_irq+0x8/0xc
[<
c015b45e>] setup_irq+0xe4/0x14d
[<
c1aaa4c4>] time_init_hook+0xf/0x11
[<
c1a9f320>] time_init+0x44/0x46
[<
c1a9955f>] start_kernel+0x191/0x38f
[<
c0100210>] 0xc0100210
-> (ioapic_lock){+...} ops: 122 {
initial-use at:
[<
c01468c4>] lockdep_acquire+0x68/0x84
[<
c10487f4>] _spin_lock_irqsave+0x2a/0x3a
[<
c1aa71db>] io_apic_get_version+0x16/0x55
[<
c1aa5c73>] mp_register_ioapic+0xc6/0x127
[<
c1aa382e>] acpi_parse_ioapic+0x2d/0x39
[<
c1abe031>] acpi_table_parse_madt_family+0xb4/0x100
[<
c1abe093>] acpi_table_parse_madt+0x16/0x18
[<
c1aa3c8a>] acpi_boot_init+0x132/0x251
[<
c1aa08ea>] setup_arch+0xd36/0xe37
[<
c1a99434>] start_kernel+0x66/0x38f
[<
c0100210>] 0xc0100210
in-hardirq-W at:
[<
c01468c4>] lockdep_acquire+0x68/0x84
[<
c10487f4>] _spin_lock_irqsave+0x2a/0x3a
[<
c011bce1>] mask_IO_APIC_irq+0x11/0x31
[<
c011c5cc>] ack_edge_ioapic_vector+0x31/0x41
[<
c015b007>] __do_IRQ+0x4f/0x113
[<
c01062d3>] do_IRQ+0x8c/0xad
}
... key at: [<
c1432514>] ioapic_lock+0x14/0x3c
-> (i8259A_lock){++..} ops: 5149 {
initial-use at:
[<
c01468c4>] lockdep_acquire+0x68/0x84
[<
c10487f4>] _spin_lock_irqsave+0x2a/0x3a
[<
c0108090>] init_8259A+0x11/0x8f
[<
c1aa0d22>] init_ISA_irqs+0x12/0x4d
[<
c1aaa4f0>] pre_intr_init_hook+0x8/0xa
[<
c1aa0cb9>] init_IRQ+0xe/0x65
[<
c1a99546>] start_kernel+0x178/0x38f
[<
c0100210>] 0xc0100210
in-hardirq-W at:
[<
c01468c4>] lockdep_acquire+0x68/0x84
[<
c10487f4>] _spin_lock_irqsave+0x2a/0x3a
[<
c0107fb0>] mask_and_ack_8259A+0x1b/0xcc
[<
c015b007>] __do_IRQ+0x4f/0x113
[<
c01062d3>] do_IRQ+0x8c/0xad
in-softirq-W at:
[<
c01468c4>] lockdep_acquire+0x68/0x84
[<
c10487f4>] _spin_lock_irqsave+0x2a/0x3a
[<
c0107fb0>] mask_and_ack_8259A+0x1b/0xcc
[<
c015b007>] __do_IRQ+0x4f/0x113
[<
c01062d3>] do_IRQ+0x8c/0xad
}
... key at: [<
c142f174>] i8259A_lock+0x14/0x40
... acquired at:
[<
c01468c4>] lockdep_acquire+0x68/0x84
[<
c10487f4>] _spin_lock_irqsave+0x2a/0x3a
[<
c0107e6b>] disable_8259A_irq+0x10/0x47
[<
c011bdbd>] startup_edge_ioapic_vector+0x31/0x58
[<
c015b45e>] setup_irq+0xe4/0x14d
[<
c015b5a1>] request_irq+0xda/0xf9
[<
c1ac983a>] rtc_init+0x6a/0x1a7
[<
c0100457>] init+0x14a/0x2cb
[<
c0102005>] kernel_thread_helper+0x5/0xb
... acquired at:
[<
c01468c4>] lockdep_acquire+0x68/0x84
[<
c10487f4>] _spin_lock_irqsave+0x2a/0x3a
[<
c011bce1>] mask_IO_APIC_irq+0x11/0x31
[<
c011c5cc>] ack_edge_ioapic_vector+0x31/0x41
[<
c015b007>] __do_IRQ+0x4f/0x113
[<
c01062d3>] do_IRQ+0x8c/0xad
the hard-irq-unsafe lock's dependencies:
-> (vector_lock){--..} ops: 31 {
initial-use at:
[<
c01468c4>] lockdep_acquire+0x68/0x84
[<
c10485e9>] _spin_lock+0x21/0x2f
[<
c011b5e8>] assign_irq_vector+0x34/0xc8
[<
c1aa82fa>] setup_IO_APIC+0x45a/0xcff
[<
c1aa56e3>] smp_prepare_cpus+0x5ea/0x8aa
[<
c010033f>] init+0x32/0x2cb
[<
c0102005>] kernel_thread_helper+0x5/0xb
softirq-on-W at:
[<
c01468c4>] lockdep_acquire+0x68/0x84
[<
c10485e9>] _spin_lock+0x21/0x2f
[<
c011b5e8>] assign_irq_vector+0x34/0xc8
[<
c1aa82fa>] setup_IO_APIC+0x45a/0xcff
[<
c1aa56e3>] smp_prepare_cpus+0x5ea/0x8aa
[<
c010033f>] init+0x32/0x2cb
[<
c0102005>] kernel_thread_helper+0x5/0xb
hardirq-on-W at:
[<
c01468c4>] lockdep_acquire+0x68/0x84
[<
c10485e9>] _spin_lock+0x21/0x2f
[<
c011b5e8>] assign_irq_vector+0x34/0xc8
[<
c1aa82fa>] setup_IO_APIC+0x45a/0xcff
[<
c1aa56e3>] smp_prepare_cpus+0x5ea/0x8aa
[<
c010033f>] init+0x32/0x2cb
[<
c0102005>] kernel_thread_helper+0x5/0xb
}
... key at: [<
c1432574>] vector_lock+0x14/0x3c
stack backtrace:
[<
c0104f36>] show_trace+0xd/0xf
[<
c010543e>] dump_stack+0x17/0x19
[<
c0144e34>] check_usage+0x1f6/0x203
[<
c0146395>] __lockdep_acquire+0x8c2/0xaa5
[<
c01468c4>] lockdep_acquire+0x68/0x84
[<
c10487f4>] _spin_lock_irqsave+0x2a/0x3a
[<
c04ff8d2>] startup_msi_irq_wo_maskbit+0x10/0x35
[<
c015b932>] probe_irq_on+0x44/0x107
[<
c0673d58>] serial8250_config_port+0x84b/0x986
[<
c06707b1>] uart_add_one_port+0x105/0x289
[<
c1ace54b>] serial8250_init+0xc3/0x10a
[<
c0100457>] init+0x14a/0x2cb
[<
c0102005>] kernel_thread_helper+0x5/0xb
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: Jan Beulich <jbeulich@novell.com>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jon Mason [Mon, 26 Jun 2006 11:57:13 +0000 (13:57 +0200)]
[PATCH] x86_64: remove unused gart header file
include/asm-x86_64/gart-mapping.h is only ever used in
arch/x86_64/kernel/setup.c and none of its contents are referenced.
Looks to be leftover cruft not removed in the dma_ops patch.
Signed-off-by: Jon Mason <jdmason@us.ibm.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andi Kleen [Mon, 26 Jun 2006 11:57:10 +0000 (13:57 +0200)]
[PATCH] x86_64: Optimize bitmap_weight for small bitmaps
Use inline code bitmaps <= BITS_PER_LONG in bitmap_weight. This
gives _much_ better code.
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andi Kleen [Mon, 26 Jun 2006 11:57:07 +0000 (13:57 +0200)]
[PATCH] x86_64: Remove ia32_sys_call_table export
It was originally added for 2.4 oprofile, but 2.6 oprofile doesn't
need that anymore. Shouldn't be any use in tree anymore and it doesn't
make much sense to export the ia32 syscalls when the main syscalls
are not exported.
I think Adrian Bunk asked for removing it several times.
Also included hunk from Adrian to remove the .globl ia32_sys_call_table
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andi Kleen [Mon, 26 Jun 2006 11:57:04 +0000 (13:57 +0200)]
[PATCH] x86_64: Remove long obsolete CVS
Early development of x86-64 Linux was in CVS, but that hasn't been
the case for a long time now. Remove the obsolete $Id$s.
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Don Zickus [Mon, 26 Jun 2006 11:57:01 +0000 (13:57 +0200)]
[PATCH] x86_64: nmi watchdog header cleanup
Misc header cleanup for nmi watchdog.
Signed-off-by: Don Zickus <dzickus@redhat.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Ingo Molnar [Mon, 26 Jun 2006 11:56:58 +0000 (13:56 +0200)]
[PATCH] x86_64: fix unlikely profiling & vsyscalls on x86_64
fix unlikely profiling in vsyscalls ...
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jan Beulich [Mon, 26 Jun 2006 11:56:55 +0000 (13:56 +0200)]
[PATCH] x86_64: add END()/ENDPROC() annotations to entry.S
Since END()/ENDPROC() are now available, add respective annotations to
x86_64's entry.S. This should help debugging activities.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andi Kleen [Mon, 26 Jun 2006 11:56:52 +0000 (13:56 +0200)]
[PATCH] x86_64: Add compat_printk and sysctl to turn off compat layer warnings
Sometimes e.g. with crashme the compat layer warnings can be noisy.
Add a way to turn them off by gating all output through compat_printk
that checks a global sysctl. The default is not changed.
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andi Kleen [Mon, 26 Jun 2006 11:56:49 +0000 (13:56 +0200)]
[PATCH] x86_64: Use -ENODEV in IOMMU initialization
Fix
initcall at 0xffffffff806c5b89: pci_iommu_init+0x0/0x53c(): returned with error code -1
Return -ENODEV instead when the IOMMU is not used.
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jan Beulich [Mon, 26 Jun 2006 11:56:46 +0000 (13:56 +0200)]
[PATCH] i386/x86-64: simplify ioapic_register_intr()
Simplify (remove duplication of) code in ioapic_register_intr().
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>